/* Workspaces keep related decisions together and secondary detail close at hand. */
/* Three stable HUD groups; narrow screens put the wallet on its own row. */
:root{--masthead:96px}
.topbar{display:grid;grid-template-columns:minmax(90px,1fr) minmax(560px,600px) max-content;column-gap:26px;padding:10px 24px;height:var(--masthead);min-height:var(--masthead)}
.captain-status{min-width:0}
.captain-status>div{min-width:0}
.captain-status small{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar .wallet{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%;min-width:0}
.topbar .resource{display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:13px 25px 15px;min-width:0;padding:10px 12px;column-gap:10px;row-gap:0;align-content:center;align-items:center;justify-content:flex-start;text-align:left}
.topbar .resource>div{display:contents}
.topbar .resource>div>small:first-child{grid-column:2;grid-row:1}
.topbar .resource .icon{grid-column:1;grid-row:1/3;width:30px;height:32px}
.topbar .resource small{font-size:10px;line-height:13px}
.topbar .resource strong{grid-column:2;grid-row:2;font-size:20px;letter-spacing:0;white-space:nowrap}
.topbar .cargo-resource strong{font-size:20px}
.topbar .resource .resource-reserve{grid-column:1/-1;grid-row:3;font-size:10px!important;line-height:15px;min-height:15px}
.topbar .top-actions{display:flex;gap:10px;justify-content:flex-end;margin:0;padding-left:18px;border-left:1px solid #91a7b63b;min-width:0}
.topbar .sea-time{display:grid;grid-template-columns:1fr auto;gap:2px 7px;width:118px;min-width:118px;text-align:right;font-variant-numeric:tabular-nums}
.sea-time .time{grid-column:1;line-height:16px}
.sea-time .daylight{grid-column:2;line-height:16px}
.sea-time>small,.sea-time>.time-hold{grid-column:1/-1;line-height:13px}
.sea-time>.time-hold{font-size:9px;min-height:13px}
.sea-time>.time-hold:empty{display:block;visibility:hidden}
.topbar .speed-control{display:flex;flex:none}
.topbar .icon-button{flex:none}
.world-chart>.panel-head{gap:12px;align-items:center;flex-wrap:wrap}
.world-chart .chart-scope{gap:12px;flex-wrap:wrap;min-width:0}
.world-chart .chart-scope h1{display:flex;align-items:center;gap:9px;margin:0;color:#f6eedf;font:19px/1.45 var(--display)}
.world-chart .chart-scope h1>.icon{width:28px;height:28px}
.world-chart .map-toolbar{display:block;position:relative;padding:8px 12px;background:#1b3c51;color:#d8e3e5;border-color:#5b748044}
.world-chart .atlas-navigation{padding:0;margin:0;border:0;border-radius:0;box-shadow:none;background:transparent;color:inherit}
.world-chart .atlas-navigation>summary{min-height:36px;padding:6px 185px 6px 0;gap:7px;color:#dbe7e9;font-size:12px;border:0;background:transparent}
.world-chart .atlas-navigation>summary::after{content:'+';margin-left:4px;color:#c0d1d8}
.world-chart .atlas-navigation[open]>summary::after{content:'−'}
.world-chart .atlas-navigation>summary .icon{width:20px;height:20px}
.world-chart .map-destinations{position:absolute;right:12px;top:9px}
.world-chart .map-destinations .map-select{max-width:172px;min-height:34px;background:#24475d;border-color:#6d8791;color:#f1f0e5;font-size:12px}
.world-chart .atlas-filter-options{padding:14px 0 8px;margin-top:7px;border-top:1px solid #5b748066;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;background:transparent}
.world-chart .atlas-filter-options .continent-tabs,.world-chart .atlas-display-filters,.world-chart .city-search-results{grid-column:1/-1}
.world-chart .atlas-filter-options .continent-tabs{gap:7px;margin:0}
.world-chart .continent-tabs button{background:transparent;border-color:#718997;color:#d6e1e4;font-size:12px;padding:7px 10px}
.world-chart .continent-tabs button.active,.world-chart .continent-tabs button:hover{background:#e6e6db;color:#17364a;border-color:#e6e6db}
.world-chart .city-search{width:auto;min-width:0;max-width:none;margin:0}
.world-chart .city-search input{min-width:0;background:#f4f0e6;border-color:#7e9299;color:#243f50;font-size:13px}
.world-chart .city-search>button{color:#e2e8e8;background:#2b4e62;border-color:#7e9299;font-size:12px}
.world-chart .atlas-sea-filter{color:#cfdee2;margin:0;font-size:12px;gap:8px}
.world-chart .atlas-display-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:5px 16px;padding:10px 0 0;background:transparent;border-top:1px solid #71899755;color:#d5e1e3}
.world-chart .atlas-display-filters label{font-size:12px;min-height:30px}
.world-chart .atlas-display-filters input{accent-color:#d7e3df}
.world-chart .city-search-results .btn{background:#24475d;border-color:#6d8791;color:#f1f0e5}
.world-chart .city-search-results small{color:#c4d7dc}
.world-chart .world-map-viewport{aspect-ratio:20/13;height:auto;min-height:190px;max-height:clamp(190px,calc(100svh - var(--masthead) - 320px),640px);background:#12364e;scrollbar-gutter:auto}
.world-map-canvas .world-port b{pointer-events:none}
.world-chart .world-map-canvas{background:transparent}
.world-map-stage>.atlas-ocean-fill>img{inset:0;width:100%;height:100%;object-fit:cover}
.world-map-canvas>.world-map-paint::after{background:transparent}
.chart-selection{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 17px;background:#17384d;color:#eee9dc;border-top:1px solid #62798555}
.chart-selection>div{display:grid;gap:3px;min-width:0}
.chart-selection small{font-size:11px;color:#bfd0d8}
.chart-selection strong{font-size:17px;font-weight:550;line-height:1.5;overflow-wrap:anywhere}
.chart-selection>.btn{flex:none;font-size:12px;background:#e6e4d7;border-color:#e6e4d7;color:#18364a;box-shadow:none}
.chart-selection>.btn:hover{background:#fbf5e8}
.chart-detail-dialog{position:fixed;inset:calc(var(--masthead) + 12px) 14px 14px auto;margin:0;width:min(470px,calc(100% - 28px));height:calc(100dvh - var(--masthead) - 26px);max-height:none;max-width:none;min-width:0;padding:0;overflow:hidden;border:1px solid #bfb4a2;border-radius:5px;background:var(--paper-light);color:var(--text);box-shadow:0 12px 45px #071b3266}
.chart-detail-dialog[open]{display:flex;flex-direction:column}
.chart-detail-dialog::backdrop{background:#081c2a70}
.chart-detail-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;background:#ede7da;border-bottom:1px solid var(--line);flex:none}
.chart-detail-heading h2{font-size:16px;margin:0;color:var(--navy-light)}
.chart-detail-heading>.btn{min-height:34px;flex:none}
.chart-detail-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:0 18px 18px;scrollbar-width:thin}
.chart-detail-body>.panel{background:transparent;border:0;border-radius:0;box-shadow:none;margin:0 0 14px}
.chart-detail-body>.panel>.panel-head{padding:14px 0;background:transparent}
.chart-detail-body>.panel>.panel-body{padding:14px 0}
.chart-detail-body .port-detail>.panel-body{padding-top:0}
.chart-detail-body .port-panorama{border-radius:0;height:135px}
.chart-detail-body .port-detail .port-quick-action{padding-inline:0}
.merged-section>summary{gap:16px;min-height:48px;line-height:1.5;overflow-wrap:anywhere}
.merged-section>summary::after{flex:0 0 18px;text-align:center}
.chart-detail-body .merged-section{margin:4px 0 16px;background:transparent;border:0;border-radius:0;box-shadow:none}
.chart-detail-body .merged-section>summary{padding:13px 16px;font-size:15px;border-bottom:1px solid var(--line);background:transparent}
.chart-detail-body .merged-body{padding:14px 0 0}
.chart-detail-body .atlas-city{border:0;background:transparent;box-shadow:none}
.chart-detail-body .atlas-city>.panel-head{display:none}
.chart-detail-body .atlas-city>.panel-body{padding:0}
.chart-detail-body .city-office{border:0;padding-inline:0;background:transparent}
.chart-detail-body .crew-inline{margin-top:14px}
.chart-detail-body .tide-panel{flex-wrap:wrap;gap:10px;background:#eee9df;border-color:var(--line);border-left-color:#637d87}
.chart-detail-body .tide-panel>p{flex:1 1 110px;min-width:0}
.chart-detail-body .tide-phases{display:flex;flex:1 1 100%;justify-content:space-between;gap:10px;margin:0;padding:9px 0 0;border-left:0;border-top:1px solid var(--line)}
.chart-detail-body .tide-phases>span{white-space:normal}
@media(max-width:1350px){
 :root{--masthead:154px}
 .topbar{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:46px 76px;padding:10px 18px;gap:12px 18px}
 .topbar .captain-status{grid-column:1;grid-row:1}
 .topbar .top-actions{grid-column:2;grid-row:1;padding:0;border:0;gap:12px}
 .topbar .wallet{grid-column:1/-1;grid-row:2;max-width:760px;justify-self:center}
 .topbar .sea-time{width:118px;min-width:118px}
}
@media(max-width:760px){
 .topbar{padding:10px 12px;gap:12px 10px}
 .topbar .top-actions{gap:9px}
 .topbar .sea-time{width:105px;min-width:105px;grid-template-columns:1fr}
 .topbar .sea-time .daylight{display:none}
 .topbar .sea-time .time{grid-column:1}
 .topbar .speed-control{display:none}
 .world-chart>.panel-head{padding:11px 12px;gap:10px}
 .world-chart .chart-scope{gap:8px}
 .world-chart .chart-scope h1{font-size:16px;gap:6px}
 .world-chart .chart-scope h1>.icon{width:24px;height:24px}
 .world-chart .chart-tools{gap:4px}
 .world-chart .map-toolbar{padding-inline:10px}
 .world-chart .atlas-navigation>summary{padding-right:160px}
 .world-chart .map-destinations{right:10px}
 .world-chart .map-destinations .map-select{max-width:150px;font-size:11px}
 .world-chart .atlas-filter-options{grid-template-columns:minmax(0,1fr)}
 .world-chart .atlas-filter-options .continent-tabs{display:flex;flex-wrap:wrap}
 .world-chart .continent-tabs button{font-size:11px;padding:7px 8px}
 .world-chart .atlas-display-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px}
 .world-chart .world-map-viewport{min-height:190px;max-height:none}
 .chart-selection{padding:10px 12px;gap:10px}
 .chart-selection strong{font-size:15px}
 .chart-selection>.btn{font-size:12px;padding:8px 10px;white-space:normal;max-width:45%}
 .chart-detail-dialog{inset:calc(var(--masthead) + 7px) 7px max(78px,env(safe-area-inset-bottom)) 7px;width:calc(100% - 14px);height:calc(100dvh - var(--masthead) - 85px)}
 .chart-detail-heading{padding:10px 12px}
 .chart-detail-heading h2{font-size:15px}
 .chart-detail-body{padding:0 14px 14px}
}
@media(max-width:640px){
 :root{--masthead:180px}
 .topbar{grid-template-rows:40px 116px;padding-block:8px;row-gap:8px}
 .topbar .wallet{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:54px;gap:8px}
 .topbar .resource{grid-template-columns:26px minmax(0,1fr);grid-template-rows:12px 20px 12px;padding:5px 12px;column-gap:10px}
 .topbar .resource .icon{width:26px;height:28px}
 .topbar .resource strong,.topbar .cargo-resource strong{font-size:20px}
 .topbar .resource small{line-height:12px}
 .topbar .resource .resource-reserve{line-height:12px;min-height:12px}
}
@media(max-width:370px){
 .world-chart .chart-tools .map-fit{font-size:10px}
}
.ship-presence{padding:9px 14px;margin-bottom:14px;gap:12px;min-height:48px}
.presence-heading{gap:9px}
.presence-heading>.icon{width:25px;height:25px}
.presence-heading>div{gap:8px}
.presence-heading span{font-size:12px;letter-spacing:0}
.presence-heading strong{font-size:16px;line-height:1.4}
.presence-actions{max-width:none;gap:7px}
.presence-actions .btn{min-height:32px;padding:5px 10px;font-size:12px}
.page-head{margin-bottom:14px}
.page-head h1{font-size:27px;line-height:1.35;letter-spacing:1px}
.page-head p{font-size:13px;line-height:1.6;margin-top:4px}
.page-tabs button{font-size:13px;min-height:43px;line-height:1.5}
.workspace-nav{display:flex;flex-wrap:wrap;gap:0 24px;padding:0;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;margin:0 0 18px;scroll-margin-top:calc(var(--masthead) + 64px)}
.workspace-nav>button{flex:0 1 auto;min-height:42px;padding:9px 2px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#637078;font-size:13px;line-height:1.5}
.workspace-nav>button:hover{background:transparent;color:var(--navy-light);border-bottom-color:#b8ada0}
.workspace-nav>button.active{background:transparent;border-bottom-color:var(--rust);color:var(--navy-light);box-shadow:none;font-weight:700}
.workspace-nav>button:focus-visible{outline:2px solid #a64c3c;outline-offset:1px}
.dock-workshops{display:block}
.dock-workshops>.panel+.panel{margin-top:16px}
.dock-workshops #dock-labor{display:flex;align-items:center;gap:24px;padding:14px 18px}
.dock-workshops #dock-labor>.panel-head{display:grid;gap:4px;padding:0;background:transparent;border:0;flex:0 0 auto}
.dock-workshops #dock-labor>.panel-body{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:0;flex:1;min-width:0}
.dock-workshops #dock-labor .hint,.dock-workshops #dock-labor .inline-actions{margin:0}
.dock-workshops #dock-labor :is(.progress-info,.bar,.work-deadline){grid-column:1/-1}
.dock-recipes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:20px 28px}
.dock-recipes>.recipe{border:0;margin:0;padding:0;min-width:0}
.dock-recipes .recipe-head{flex-wrap:wrap;gap:5px 10px}
.dock-workshops .work-progress{margin-bottom:20px}
@media(max-width:760px){.dock-workshops #dock-labor{display:block;padding:13px 14px}.dock-workshops #dock-labor>.panel-head{display:flex;justify-content:space-between;margin-bottom:12px}.dock-recipes{gap:20px}}
.voyage-guide{padding:10px 14px;margin:0 0 15px;border-left:3px solid #577987}
.guide-compact-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.guide-compact-heading>span{font-size:12px;color:#647783}
.guide-compact-heading>strong{font-size:14px;flex:1 1 200px;color:#244b60}
.guide-compact-heading>.btn{font-size:12px;min-height:32px;padding:5px 10px}
.guide-instructions{margin-top:8px;border-top:1px solid #d7d3c7;padding-top:7px}
.guide-instructions>summary{font-size:12px;color:#48616b;cursor:pointer}
.guide-instructions p{font-size:14px;line-height:1.8;margin:10px 0}
.running-tasks{gap:6px 18px;margin-bottom:14px;display:flex;flex-wrap:wrap}
.running-tasks>button{font-size:12px;min-height:32px;padding:4px 0;background:transparent;border:0;border-radius:0;color:#4b626b;box-shadow:none}
.running-tasks>button:hover{background:transparent;color:var(--navy-light);text-decoration:underline;text-underline-offset:4px}
.running-tasks>button>small{font-size:12px;color:#68777d}
.running-tasks>button>i{background:#64817e;box-shadow:none;width:5px;height:5px}
.world-workgrid{display:block}
.world-workgrid>.chart-primary{display:block;margin-bottom:16px}
.world-workgrid>.chart-secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.chart-secondary>.trade-lead{grid-column:1/-1}
.chart-secondary>.running-tasks{grid-column:1/-1;margin:0;gap:5px 18px}
.chart-secondary>.world-pulse{grid-column:1/-1}
.chart-secondary>.merged-section{margin:0;min-width:0}
.chart-secondary>.merged-section>summary{padding:14px 17px;font-size:14px;background:#f2ede3;color:#294a59;cursor:pointer}
.chart-secondary .merged-body{padding:12px}
.chart-secondary .merged-body>.panel{margin-bottom:12px}
.market-overview{margin-bottom:13px;grid-template-columns:140px minmax(0,1fr) auto}
.market-overview .market-panorama{height:76px}
.market-overview .trade-dashboard strong{font-size:25px}
.market-overview .trade-dashboard small{font-size:12px}
.license-summary{display:flex;align-items:center;gap:7px;padding:6px 2px;margin:0 0 10px;font-size:12px;color:#50696f;background:transparent;border:0}
.license-summary .icon{width:20px;height:20px}
.market-workgrid{grid-template-columns:minmax(0,1fr) 310px;align-items:start}
.market-workgrid .market-services{position:sticky;top:calc(var(--masthead) + 67px);gap:10px}
.market-workgrid .market-services>.btn{font-size:13px;min-height:40px}
.market-intelligence{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.market-intelligence>.merged-section{margin:0}
.market-intelligence .rival-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.market-intelligence .rival-list article{min-width:0}
.market-services .market-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:4px 16px;padding-block:10px}
.market-services .market-item,.market-services .market-item>div{display:contents}
.market-services .market-item>.icon{grid-column:1;grid-row:1}
.market-services .market-item h4{grid-column:2;grid-row:1;min-width:0}
.market-services .market-item small{grid-column:2/-1;grid-row:2;min-width:0}
.market-services .market-row>.btn,.market-services .market-buttons{grid-column:3;grid-row:1;max-width:100%;justify-self:end}
.market-services .market-item small{font-size:12px;line-height:1.6}
.commodity-row h3{font-size:14px}
.commodity-row small,.commodity-heading,.market-footnote{font-size:12px}
.commodity-actions .btn{font-size:13px}
.iteration-dockyard>.ship-condition{margin:0 0 18px}
.workshop-deck .module-grid{align-items:start}
.workshop-deck .module-card{height:auto;min-height:0}
.workshop-deck .module-foot{margin-top:0}
.ship-care-layout{align-items:start}
.ship-care-layout p,.ship-care-layout .cost{font-size:13px;line-height:1.7}
.ship-condition .panel-head h2{font-size:16px}
.crew-directory{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:8px;margin:0 0 16px;max-height:240px;overflow-y:auto;padding:2px;scrollbar-width:thin}
.crew-directory>button{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:4px 9px;min-width:0;text-align:left;background:#f6f1e8;border:1px solid #d0c7b7;border-radius:4px;padding:10px 12px;color:#355568}
.crew-directory>button.active{background:#e6edf0;border-color:#5f8191;box-shadow:inset 3px 0 #446e84}
.crew-directory strong{font-size:14px;overflow-wrap:anywhere}
.crew-directory>button>span:not(.crew-rarity),.crew-directory>button>small{grid-column:2;font-size:12px;color:#62747d;line-height:1.6}
.crew-grid:has(>.crew-card:only-child){grid-template-columns:minmax(0,1fr);max-width:none}
.crew-grid>.crew-card.fullbody-crew-card:only-child{grid-template-columns:minmax(180px,.34fr) minmax(0,.66fr)}
.fullbody-crew-card>.crew-fullbody{position:sticky;top:calc(var(--masthead) + 65px);align-self:start}
.crew-profile .crew-talent-line,.crew-profile .crew-training small,.crew-profile .crew-ability small{font-size:12px;line-height:1.7}
.crew-profile .crew-training,.crew-ability,.crew-learned,.mastery-learned>div{flex-wrap:wrap;gap:12px 16px}
.crew-profile .crew-training>small,.crew-ability>div,.crew-learned>div,.mastery-learned>div>span{flex:1 1 150px;min-width:0;overflow-wrap:anywhere}
.crew-profile .crew-training>.btn,.crew-ability>.btn,.crew-learned>.btn,.mastery-learned>div>.btn{flex:0 0 auto;max-width:100%;white-space:normal}
.ad-camp-tasks>div{column-gap:16px}
.ad-camp-tasks>div>.btn{max-width:100%;white-space:normal}
.crew-profile>.btn[data-action='workspace']{margin:12px 20px}
.crew-careers{margin-top:0}
.tavern-scene{min-height:100px;padding:15px 20px;margin-bottom:12px}
.tavern-scene h2{display:none}
.tavern-scene small{display:block;margin:0;font-size:13px;line-height:1.7;max-width:650px}
.crew-grade-guide{margin-bottom:14px}
.crew-grade-guide>summary{font-size:12px;cursor:pointer}
.recruit-profile .recruit-aptitude,.recruit-profile .trait-line,.recruit-identity>small{font-size:12px}
.recruit-profile .recruit-skill{font-size:14px}
.recruit-fee small{font-size:13px}
.fishing-workspace{align-items:start}
.fishing-workspace .ad-painted-field .ad-fish-cell{aspect-ratio:auto;width:100%}
.ad-painted-field .ad-fish-cell>strong{white-space:normal;overflow-wrap:anywhere;text-align:center;flex-shrink:0}
.fish-preparation{background:#f6ede0;border:1px solid #d8bea1;border-radius:4px;padding:12px 15px;margin:0 0 16px;font-size:14px;line-height:1.7}
.fish-preparation .inline-actions{margin-top:8px;gap:8px}
.fish-preparation .btn{font-size:13px}
.fishing-inventory{border:1px solid #ccc2b3;border-radius:4px;background:#f6f1e8;margin-top:16px}
.fishing-inventory>summary{padding:15px 18px;font-size:14px;color:#294c60;cursor:pointer}
.fishing-inventory[open]>summary{border-bottom:1px solid #d7cdbd}
.fishing-inventory>.ad-fish-stock{padding:15px;margin:0}
.fishing-inventory>.ad-kitchen{margin:0 15px 15px}
.play-next p{font-size:14px;line-height:1.7}
.play-next h2{font-size:21px;line-height:1.45}
.play-next>div>small{font-size:12px}
.council-region-select{display:flex;align-items:center;gap:14px;margin-bottom:15px;font-size:14px;color:#38596a}
.council-region-select select{min-width:0;max-width:100%;padding:10px 12px;background:#fbf8f0;border:1px solid #c8bca8;color:#294c60;border-radius:4px;font-size:14px}
.council-banner{min-height:160px}
.council-projects{margin-bottom:16px}
.council-projects>summary{padding:15px 18px;font-size:14px;cursor:pointer}
.council-projects>.public-works{padding:15px}
.intro-ledger{margin:10px 0 14px;font-size:13px;color:#466273}
.intro-ledger>summary{padding:7px 0;cursor:pointer}
.origin-dialog>.dialog-image{height:65px}
.origin-dialog .dialog-body{padding:20px 26px}
.origin-dialog .narrative{font-size:14px;line-height:1.65;margin:8px 0 13px}
.origin-dialog .origin-portrait{height:165px}
.origin-dialog .origin-offer{padding:12px}
.origin-dialog .origin-offer h3{font-size:19px}
.origin-dialog .origin-offer p{font-size:12px;line-height:1.65;margin:7px 0}
.origin-dialog .origin-offer>.btn{min-height:37px}
.origin-offer>.origin-details{font-size:12px;border-top:1px solid #d6cbb8;margin-top:6px;padding-top:9px}
.origin-details>summary{font-size:12px;cursor:pointer;color:#526978}
.origin-details p{font-size:12px;line-height:1.7;margin-block:8px}
.origin-offer>.btn[data-action='origin-choose']{margin-top:5px;order:0}
@media(min-width:1051px){.iteration-market[data-market-pane='supplies'] .market-services{border:2px solid #658493;border-radius:5px;padding:10px;background:#e7edf0}}
@media(max-width:1050px){
  .market-workgrid{grid-template-columns:minmax(0,1fr)}
  .iteration-market[data-market-pane='trade'] .market-services,.iteration-market[data-market-pane='supplies'] .market-trading{display:none}
  .market-workgrid .market-services{position:static}
  .world-workgrid>.chart-secondary{grid-column:1/-1;grid-row:auto}
  .world-workgrid>.right-column{grid-row:auto}
  .market-intelligence{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:900px){.workshop-deck>.workshop-sidebar{grid-row:auto}}
@media(max-width:650px){
  .page-tabs{margin-bottom:10px;gap:14px;overflow-x:auto;scroll-padding-inline:4px;scrollbar-width:thin}
  .page-tabs button{flex:0 0 auto;font-size:12px;min-height:43px;padding:7px 4px;white-space:nowrap}
  .ship-presence{flex-direction:row;flex-wrap:wrap;align-items:center;padding:8px 10px;gap:7px;margin-bottom:12px}
  .presence-heading{flex:1 1 160px}
  .presence-heading strong{font-size:14px}
  .presence-heading span{font-size:12px}
  .presence-heading>.icon{width:21px;height:21px}
  .presence-actions{width:auto;flex:0 1 auto;justify-content:flex-end}
  .presence-actions .btn{min-height:32px;padding:5px 8px;font-size:12px}
  .presence-actions .presence-remaining{font-size:12px}
  .page-head,.iteration-market .page-head{align-items:center;margin-bottom:12px}
  .page-head h1,main[data-page='chart'] .page-head h1{font-size:23px;letter-spacing:.5px}
  .page-head p{font-size:12px}
  .page-head .pill{font-size:11px}
  .workspace-nav{gap:0 17px;padding:0;margin-bottom:13px}
  .workspace-nav>button{flex:0 1 auto;min-width:0;min-height:43px;padding:8px 1px;font-size:12px}
  .guide-compact-heading{gap:7px}
  .guide-compact-heading>span{flex-basis:100%}
  .guide-compact-heading>strong{font-size:14px;flex:1 1 120px}
  .guide-compact-heading>.btn{font-size:12px}
  .running-tasks{gap:5px}
  .running-tasks>button{font-size:12px;padding:5px 0;gap:6px}
  .running-tasks>button>small{font-size:12px}
  .world-workgrid>.chart-secondary{display:flex;flex-direction:column;gap:10px}
  .chart-secondary>.merged-section{width:100%}
  .market-overview{grid-template-columns:65px minmax(0,1fr) 63px;margin-bottom:12px}
  .market-overview .market-panorama{height:72px}
  .market-overview .trade-dashboard strong{font-size:21px}
  .market-overview .trade-dashboard small,.market-accounts>summary{font-size:11px}
  .license-summary{font-size:12px;line-height:1.6}
  .commodity-heading{font-size:11px}
  .commodity-row h3{font-size:14px}
  .commodity-row small{font-size:12px;line-height:1.5}
  .commodity-actions .btn{font-size:12px;min-height:36px}
  .market-intelligence .rival-list{grid-template-columns:minmax(0,1fr)}
  .crew-directory{display:flex;overflow-x:auto;overflow-y:hidden;max-height:none;padding:2px 2px 8px;scroll-snap-type:x proximity}
  .crew-directory>button{flex:0 0 170px;scroll-snap-align:start;padding:9px 11px}
  .crew-grid>.crew-card.fullbody-crew-card:only-child{grid-template-columns:110px minmax(0,1fr)}
  .fullbody-crew-card>.crew-fullbody{top:calc(var(--masthead) + 55px)}
  .crew-profile .crew-talent-line{font-size:12px}
  .crew-profile>.btn[data-action='workspace']{margin:10px 12px}
  .ad-camp-tasks>div{grid-template-columns:32px minmax(0,1fr);gap:10px 12px}
  .ad-camp-tasks>div>.btn{grid-column:2;justify-self:start}
  .tavern-scene{min-height:80px;padding:12px 15px;margin-bottom:12px}
  .tavern-scene small{font-size:12px;line-height:1.7}
  .recruit-profile .recruit-aptitude,.recruit-profile .trait-line,.recruit-identity>small{font-size:12px}
  .recruit-profile .recruit-skill{font-size:13px}
  .recruit-profile .recruit-fee .btn{font-size:12px;min-height:38px}
  .play-next{padding:14px;gap:12px;margin-bottom:14px}
  .play-next h2{font-size:20px}
  .play-next p{font-size:13px;line-height:1.7}
  .fishing-inventory>.ad-fish-stock{padding:10px}
  .fishing-inventory>.ad-kitchen{margin:0 10px 10px}
  .council-region-select{display:grid;gap:6px}
  .council-banner{min-height:155px}
  .origin-dialog>.dialog-image{height:42px}
  .origin-dialog .dialog-body{padding:15px}
  .origin-dialog .origin-portrait{height:190px}
  .origin-dialog .origin-offer h3{font-size:19px}
}
@media(max-width:370px){
  .crew-grid>.crew-card.fullbody-crew-card:only-child{grid-template-columns:90px minmax(0,1fr)}
  .presence-heading{flex-basis:150px}
  .presence-actions .btn{padding:5px 7px}
  .page-tabs button{font-size:12px;padding-inline:3px}
}

.commodity-market #market-quantity{scroll-margin-top:calc(var(--masthead) + 65px)}
.commodity-name .commodity-availability{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;min-height:32px;margin-top:4px;font-size:12px;line-height:1.5;color:#435b68}
.commodity-availability>span{font-variant-numeric:tabular-nums}
.commodity-availability .btn{min-height:32px;padding:4px 8px;font-size:12px}

/* Costs and exits stay beside the decision, with secondary explanations folded. */
.port-opportunities{display:grid;gap:12px;margin:16px 0;padding:14px 16px;border:1px solid #c7c8b8;border-radius:4px;background:#eef0e6;color:#294b56;font-size:13px;line-height:1.75}
.port-opportunities>b{font-size:14px}
.port-opportunities>div{display:grid;gap:7px;padding-top:10px;border-top:1px solid #ccd2c4;min-width:0}
.port-opportunities .btn{justify-self:start;margin-top:3px;max-width:100%;white-space:normal}
.survey-budget{display:grid;gap:8px;padding:14px 16px;margin:14px 0;border:1px solid #c9c4b4;border-left:3px solid #607d7b;border-radius:4px;background:#f0ede3;color:#324f5c;font-size:13px;line-height:1.75;overflow-wrap:anywhere}
.survey-budget>b{font-size:14px;color:#24485c}
.survey-budget>small{font-size:12px;color:#566972}
.survey-budget .requirements{margin:2px 0;color:#965039}
.relic-scope{font-size:13px;line-height:1.75;color:#435a66;margin:12px 0}
.relic-impact{display:grid;gap:8px;padding:12px 14px;margin:12px 0;background:#e9eee7;border:1px solid #c8d0bf;border-radius:4px;color:#2e4e53;font-size:13px;line-height:1.6}
.relic-impact>span{display:flex;flex-wrap:wrap;gap:5px 14px;justify-content:space-between}
.relic-impact small,.relic-example{font-size:12px;line-height:1.75;color:#52676c}
.relic-example{display:block;margin:8px 0 12px}
.crew-talent-details{padding:12px 0;border-top:1px solid #d5cdbc}
.crew-talent-details>summary{font-size:13px;color:#52676c;cursor:pointer;min-height:32px;display:flex;align-items:center;gap:8px}
.crew-talent-details>summary::after{content:'+';margin-left:auto}
.crew-talent-details[open]>summary::after{content:'−'}
.crew-talent-details .crew-talent-line{margin-top:8px}
.crew-release,.vessel-release{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 22px;padding-top:16px;margin-top:16px;border-top:1px solid #d3c9b8}
.crew-release>small,.vessel-release>small{flex:1 1 180px;font-size:12px;line-height:1.75;color:#665f55;overflow-wrap:anywhere}
.crew-release>.btn,.vessel-release>.btn{flex:0 0 auto;white-space:normal;max-width:100%;min-height:38px}
.sale-quote{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 24px;padding:16px;background:#eee9dc;border:1px solid #d1c4af;margin:18px 0}
.sale-quote strong{font-size:22px;color:#2d5260;font-variant-numeric:tabular-nums}
.season-preview{display:grid;gap:12px;padding:16px;margin-top:20px;border:1px solid #bfc9bb;border-radius:4px;background:#eaf0e7;color:#2e4e53;font-size:13px;line-height:1.75}
.season-preview>dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;margin:0}
.season-preview dl>div{display:grid;gap:3px;min-width:0}
.season-preview dt{color:#536a70;font-size:12px}
.season-preview dd{margin:0;font-size:15px;font-weight:600;overflow-wrap:anywhere}
.season-preview small{font-size:12px;color:#52676c}
.legacy-accounting{font-size:13px;line-height:1.8;margin-top:14px;color:#52676c}
.legacy-accounting>summary{cursor:pointer;min-height:32px;display:flex;align-items:center}
.legacy-accounting p{margin-top:10px;font-size:13px}
@media(max-width:540px){.survey-budget,.port-opportunities{padding:12px}.season-preview>dl{grid-template-columns:1fr}.season-preview{padding:13px}.relic-impact{padding:10px}.crew-release{gap:12px}.sale-quote{padding:13px}}

.topbar .resource strong>span{font-size:12px;color:#bfced3;font-weight:400}
.supply-market .market-item{min-width:0;align-items:flex-start}
.supply-market .market-item>div{min-width:0}
.supply-market .market-item h4{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 16px}
.supply-capacity{font:14px var(--data);white-space:nowrap}
.supply-market .market-buttons{flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0}
.supply-market .requirements{margin:6px 0 0;line-height:1.7}
.supply-capacity-note{margin:0 0 8px}
@media(max-width:600px){.supply-market .market-row{align-items:flex-start;flex-wrap:wrap;gap:12px}.supply-market .market-buttons{margin-left:auto}.topbar .resource strong>span{font-size:11px}}
