/* Common dark ship's oak, carved controls and explicit construction readiness. */
:root body#realm-ui[data-ui-theme] #workspace #content-page .empty{background:#241c14 var(--weathered-oak) center/600px;border:7px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 9px / 0 stretch;color:#ffe6b8;box-shadow:none}
:root body#realm-ui[data-ui-theme] #workspace #content-page .empty :is(h3,p){color:#ffe6b8}
:root body#realm-ui[data-ui-theme] #workspace #content-page .stationed-fleet{background:#241c14 var(--weathered-oak) center/600px;border:6px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 8px / 0 stretch}
:root body#realm-ui[data-ui-theme] #workspace #content-page .stationed-fleet>button{background:#241c14 var(--weathered-oak) center/350px;border:5px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 6px / 0 stretch;box-shadow:none}
:root body#realm-ui[data-ui-theme] #workspace #content-page .realm-island-card{background:#edd7ac url('/art/interface/parchment.webp') center/600px;border:6px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 8px / 0 stretch}
:root body#realm-ui[data-ui-theme] #workspace #content-page .realm-island-name{background:linear-gradient(transparent,#21170ff5)}
@media(min-width:1200px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)){grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-island-picture{height:clamp(80px,calc((var(--game-height,100dvh) - 560px)/2),140px)}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-island-name{padding:16px 9px 6px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-island-name strong{font-size:19px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-island-name small{font-size:12px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-island-ledger{padding:5px 7px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-stock{padding:0;min-height:30px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-stock .painted-icon{width:24px;height:24px;flex-basis:24px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-island-order{margin-top:3px;padding:3px 0;min-height:30px;font-size:13px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .realm-islands:has(.realm-island-card:nth-child(4)) .realm-island-actions button{min-height:34px;font-size:13px;padding:3px}
}
:root body#realm-ui[data-ui-theme] #modal:has(#mission-form) .voyage-planner .voyage-quantity button{background:#251c13 var(--weathered-oak) center/350px;border:5px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 6px / 0 stretch;box-shadow:none;color:#ffe2a2}
:root body#realm-ui[data-ui-theme] #modal:has(#mission-form) .voyage-planner .voyage-ships>div{background:#ebd4a8 url('/art/interface/parchment.webp') center/600px}
:root body#realm-ui[data-ui-theme] #modal:has(#mission-form) .voyage-planner :is(select,input),
:root body#realm-ui[data-ui-theme] #modal #voyage-picker :is(select,input){background-color:#251c13;color:#ffedc8;border-color:#aa8045}
:root body#realm-ui[data-ui-theme] #modal:has(#mission-form) .voyage-planner .voyage-quantity input{background:#f3e6ca;color:#281b0f}
:root body#realm-ui[data-ui-theme] #modal .voyage-missions button{background:#251c13 var(--weathered-oak) center/500px}
:root body#realm-ui[data-ui-theme] #modal .voyage-missions button[aria-pressed=true]{background:#251c13 var(--weathered-oak) center/500px;outline:2px solid #e9bf68;outline-offset:-3px;box-shadow:none}
:root body#realm-ui[data-ui-theme] #modal:has(#mission-form) .voyage-planner h3>b{background:#251c13 var(--weathered-oak) center/350px}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-scene{background-size:auto 300px;background-position:left top;background-color:#211c16}
}
/* A report opens as a focused logbook page; its summary returns to the list. */
:root body#realm-ui[data-ui-theme] #workspace .report-back{display:none}
:root body#realm-ui[data-ui-theme] #workspace .report-journal:has(.report[open]) .report:not([open]){display:none}
:root body#realm-ui[data-ui-theme] #workspace .report-journal:has(.report[open]) .journal-heading{padding:4px 8px;margin:0;min-height:44px;flex-wrap:nowrap}
:root body#realm-ui[data-ui-theme] #workspace .report-journal:has(.report[open]) .journal-heading :is(h2,.painted-icon){display:none}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]{clip-path:none;margin:0}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]>summary{padding:4px 10px;min-height:44px;background:#241c14 var(--weathered-oak);border-bottom:1px solid #92703d;cursor:pointer}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]>summary>.painted-icon,
:root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]:has(.scout-report,.battle-archive)>summary h3{display:none}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]>summary .report-back{display:block;color:#ffe5ac;font-size:15px;white-space:nowrap}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]>summary small{color:#edd6b1;text-align:right;margin:0}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]>summary h3{color:#ffe7b8;font-size:14px}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .battle-archive[open]>summary{display:none}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .battle-archive{padding-top:0}
:root body#realm-ui[data-ui-theme] #workspace .report-journal .archive-result{background:#241c14 var(--weathered-oak)}
@media(min-width:951px){
 :root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]:has(.scout-report)::details-content{display:contents}
 :root body#realm-ui[data-ui-theme] #workspace .battle-archive[open]::details-content{display:contents}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .report-journal:has(.report[open]){height:calc(var(--game-height,100dvh) - var(--workspace-top,128px) - 82px);display:flex;flex-direction:column;overflow:hidden;padding:0}
 :root body#realm-ui[data-ui-theme] #workspace .report-journal:has(.report[open]) .journal-heading{flex-shrink:0}
 :root body#realm-ui[data-ui-theme] #workspace .report-journal:has(.report[open]) .reports{flex:1;min-height:0;overflow:auto;display:block}
 :root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]:has(.scout-report){height:100%;display:block;overflow:hidden}
 :root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]>summary{flex-shrink:0}
 :root body#realm-ui[data-ui-theme] #workspace .scout-report{height:calc(100% - 44px);min-height:0;grid-template-rows:auto minmax(0,1fr) auto;padding:0}
 :root body#realm-ui[data-ui-theme] #workspace .scout-report .report-panorama{min-height:0}
 :root body#realm-ui[data-ui-theme] #workspace .scout-report .scout-sheets{min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#a47b3c #392a19}
 :root body#realm-ui[data-ui-theme] #workspace .scout-report .scout-actions{padding:8px 10px}
}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace .report-journal:has(.report[open]) .journal-heading{display:none}
 :root body#realm-ui[data-ui-theme] #workspace .report-journal .report[open]>summary small{font-size:12px}
 :root body#realm-ui[data-ui-theme] #workspace .report-journal .archive-result>h3{margin-bottom:4px;padding:8px;font-size:24px}
 :root body#realm-ui[data-ui-theme] #workspace .report-journal .archive-totals{padding:0 8px}
}
:root body#realm-ui[data-ui-theme]{--weathered-oak:url('/art/realm/weathered-oak.webp');--cabin:var(--weathered-oak)}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.research-board,.research-project,.research-selection,.research-contribution,.recruitment-workbench,.recruitment-order>header,.recruitment-catalog,.recruitment-catalog-heading,.recruitment-status,.construction-catalog,.construction-catalog>header,.build-dossier,.build-dossier article>header,.construction-queue,.construction-queue>header,.active-construction,.construction-orders>li,.fleet-board,.fleet-row,.fleet-board-heading,.fleet-board-actions,.captains-desk,.study-heading){background:#211c16 var(--weathered-oak) center/700px}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.construction-catalog,.recruitment-catalog,.research-board,.fleet-board){box-shadow:0 4px 12px #0005}
:root body#realm-ui[data-ui-theme] #workspace #content-page .construction-orders>li{border:0;border-bottom:1px solid #a9864b66}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.catalog-scroll,.fleet-tabs,.research-tree){background:transparent}
:root body#realm-ui[data-ui-theme] #workspace #content-page .fleet-tabs button,
:root body#realm-ui[data-ui-theme] #workspace #content-page .construction-catalog nav button{background:#211b14 var(--weathered-oak) center/400px;color:#ffedc8;border:0;border-bottom:2px solid transparent;box-shadow:none}
:root body#realm-ui[data-ui-theme] #workspace #content-page .fleet-tabs button[aria-pressed=true],
:root body#realm-ui[data-ui-theme] #workspace #content-page .construction-catalog nav button[aria-pressed=true]{background:#211b14 var(--weathered-oak) center/400px;color:#ffe6a3;border-bottom-color:#efbd54;text-shadow:0 0 8px #d68c3233}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog>button,
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-ribbon>button{background:#231d16 var(--weathered-oak) center/400px;color:#ffedc8;box-shadow:none}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog>button[aria-pressed=true],
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-ribbon>button.selected{outline:2px solid #f2c76e;outline-offset:-3px;box-shadow:inset 0 -4px #a9782e55}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.recruitment-quantity button,.order-controls button,.queue-controls button){background:#271d13 var(--weathered-oak) center/400px;color:#ffe5b0;border:5px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 7px / 0 stretch;box-shadow:none;border-radius:0}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.recruitment-quantity button,.order-controls button,.queue-controls button):disabled{color:#9b8e76;filter:grayscale(.8);opacity:.7}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.recruitment-quantity input,.research-level-picker select){background:#171611 var(--weathered-oak) center/400px;color:#fff0cd;border-color:#b18b4c}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-gates{background:#322417 var(--weathered-oak) center/500px;color:#ffe1aa;border:1px solid #a98043}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-gates :is(strong,button){color:#ffe1aa}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-bonuses span{background:#26331e;color:#d8f0af;border:1px solid #819155;padding:4px 7px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-bonuses b{color:#e4ffb9}
:root body#realm-ui[data-ui-theme] #workspace #content-page .needs-supply .catalog-art img,
:root body#realm-ui[data-ui-theme] #workspace #content-page .build-dossier[data-start-ready=false] article>header>img{filter:grayscale(1)}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness{padding:8px 10px;margin:8px 0;background:#e3c99c;border-left:3px solid #9b6424;color:#402911}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness>summary{display:flex;align-items:center;min-height:32px;font-size:14px;line-height:1.3;color:#402911;cursor:pointer;font-weight:bold;list-style:none}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness>div{display:flex;gap:12px;flex-wrap:wrap;margin:5px 0}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness>div>span{display:flex;align-items:center;gap:4px;font-size:14px;color:#402911}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness .painted-icon{width:24px;height:24px;flex:0 0 24px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness small{font-size:12px;line-height:1.4;color:#594021}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness p{margin:3px 0;color:#402911;font-size:13px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness .text-button{color:#60380f;min-height:32px;padding:2px 3px;text-decoration:underline}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .dossier-paper{background:#211c16 var(--weathered-oak) center/700px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:6px;padding:8px;min-height:82px;align-items:center}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>img{width:30px;height:30px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project h2{font-size:16px;margin:4px 0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>strong{font-size:13px;max-width:75px;text-align:right;line-height:1.5}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>div>small{font-size:10px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>div>span{font-size:12px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-branch{border:6px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 8px / 0 stretch;background:var(--weathered-oak)}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-branch.selected{outline:2px solid #f1c872;outline-offset:-2px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-branch-title>span:not(.painted-icon){background:#211c16 var(--weathered-oak) center/500px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness{padding:8px;margin:8px 0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness small{font-size:13px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness .text-button{min-height:44px;font-size:14px}
 :root body#realm-ui[data-ui-theme] #mobile-dock{background:#211c16 var(--weathered-oak) center/700px;border-top:0;box-shadow:0 -3px 8px #0006;padding-top:4px}
 :root body#realm-ui[data-ui-theme] #mobile-dock button{border:0;border-radius:0;box-shadow:none;background:none!important;color:#f6e4bc!important}
 :root body#realm-ui[data-ui-theme] #mobile-dock button.active{border-top:2px solid #edc46c;color:#fff0c2!important;background:none!important;box-shadow:inset 0 -3px #bd8c4055}
 :root body#realm-ui[data-ui-theme] #mobile-dock button.active::after{content:'◆';position:absolute;top:-7px;left:calc(50% - 5px);color:#edc46c;font-size:10px;line-height:10px;pointer-events:none}
}

:root body#realm-ui[data-ui-theme]:is([data-view=island],[data-view=ships],[data-view=troops],[data-view=research],[data-view=fleets],[data-view=battles]) #workspace{background:#211c16 var(--weathered-oak) center/700px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .construction-screen #construction-queue,
:root body#realm-ui[data-ui-theme] #workspace #content-page .construction-screen #construction-queue :is(.active-construction,.queue-idle,.construction-orders>li){background:#211c16 var(--weathered-oak) center/700px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .queue-idle{border:0;color:#f6e0b7}
:root body#realm-ui[data-ui-theme] #workspace #content-page .research-branch{background:#211c16 var(--weathered-oak) center/700px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness p{display:flex;gap:10px;flex-wrap:wrap}

@media(min-width:951px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .construction-screen .build-dossier{overflow:hidden;display:flex;flex-direction:column}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .build-dossier>article{height:100%;min-height:0;display:flex;flex-direction:column}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .build-dossier>article>header{flex-shrink:0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .dossier-paper{flex:1;min-height:0;display:flex;flex-direction:column}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .dossier-details{min-height:0;flex:1;overflow:auto;scrollbar-width:thin;scrollbar-color:#a17a40 #dcc49b}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .upgrade-payment{flex-shrink:0;margin-top:6px;padding-top:6px;border-top:1px solid #ac8b55}
}

:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness>summary::after{content:"⌄";margin-left:auto;padding-left:8px;font-size:18px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness[open]>summary::after{content:"⌃"}
@media(max-width:950px){:root body#realm-ui[data-ui-theme] #workspace #content-page .building-readiness>summary{min-height:44px}}

@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project{position:relative;grid-template-columns:32px minmax(0,1fr)}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>div{min-width:0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project h2{max-width:calc(100% - 85px)}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>strong{position:absolute;right:10px;top:10px;grid-column:auto;white-space:normal}
}

@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>div{line-height:1.3}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project :is(small,h2,span){line-height:1.3}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project progress{margin:5px 0}
}
/* 2.39: continuous scenery, stable workspaces and visible work plans. */
:root body#realm-ui[data-ui-theme] #workspace{min-height:var(--game-height,100dvh);background-size:cover;background-position:center;background-attachment:fixed}
:root body#realm-ui[data-ui-theme] #workspace #content-page{min-height:calc(var(--game-height,100dvh) - var(--workspace-top,150px));background-size:cover;background-position:center top}
:root body#realm-ui[data-ui-theme][data-view=realm] #workspace{background:linear-gradient(#13271955,#11251a55),url('/art/realm/settlement-scene.webp') center/cover fixed}
:root body#realm-ui[data-ui-theme] #workspace .island-command-rail{position:absolute;right:12px;top:12px;width:310px;max-height:calc(100% - 185px);overflow:auto;scrollbar-width:thin;z-index:8;display:flex;flex-direction:column;gap:6px}
:root body#realm-ui[data-ui-theme] #workspace .island-command-rail :is(.scene-orders,.scene-inspector){position:static;inset:auto;transform:none;width:100%;max-height:none;margin:0;flex:none;order:initial}
:root body#realm-ui[data-ui-theme] #workspace .island-command-rail .scene-orders{padding:4px 8px;border-width:8px;border-image-width:11px;overflow:visible}
:root body#realm-ui[data-ui-theme] #workspace .island-command-rail .scene-orders header{display:none}
:root body#realm-ui[data-ui-theme] #workspace .island-command-rail .scene-job{min-height:44px;padding:3px;gap:5px}
:root body#realm-ui[data-ui-theme] #workspace .island-command-rail .scene-job img{width:34px;height:34px}
:root body#realm-ui[data-ui-theme] #workspace .island-command-rail .scene-job strong{font-size:14px}
:root body#realm-ui[data-ui-theme] #workspace .scene-build-plan,:root body#realm-ui[data-ui-theme] #workspace .work-queue{background:#22190f var(--weathered-oak) center/600px;color:#ffedc6;border:7px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 10px / 0 stretch;min-width:0;flex-shrink:0}
:root body#realm-ui[data-ui-theme] #workspace :is(.scene-build-plan,.work-queue)>summary{font-size:15px;padding:6px;min-height:36px;cursor:pointer;color:#ffe6b4;display:flex;justify-content:space-between;align-items:center}
:root body#realm-ui[data-ui-theme] #workspace .scene-build-plan .construction-queue{position:static;display:block;width:auto;height:auto;max-height:none;border:0;margin:0;padding:4px}
:root body#realm-ui[data-ui-theme] #workspace .scene-build-plan .construction-queue>header{flex-wrap:wrap;height:auto;gap:4px;padding:4px}
:root body#realm-ui[data-ui-theme] #workspace .scene-build-plan .queue-plan-scroll{max-height:220px;overflow:auto}
:root body#realm-ui[data-ui-theme] #workspace .scene-build-plan .construction-orders>li{grid-template-columns:20px 30px minmax(0,1fr);gap:5px}
:root body#realm-ui[data-ui-theme] #workspace .scene-build-plan .order-controls{grid-column:2/-1;justify-content:flex-end}
:root body#realm-ui[data-ui-theme] #workspace .work-queue ol{padding:0;margin:0;max-height:150px;overflow:auto;scrollbar-width:thin}
:root body#realm-ui[data-ui-theme] #workspace .work-queue li{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:6px;align-items:center;padding:5px;border-top:1px solid #9d784744}
:root body#realm-ui[data-ui-theme] #workspace .work-queue img{width:36px;height:36px;object-fit:contain}
:root body#realm-ui[data-ui-theme] #workspace .work-queue strong{font-size:14px;display:block}
:root body#realm-ui[data-ui-theme] #workspace .work-queue small{display:block;font-size:12px;color:#e8cc9c}
:root body#realm-ui[data-ui-theme] #workspace .work-queue li>div{display:flex}
:root body#realm-ui[data-ui-theme] #workspace .work-queue button{min-width:30px;min-height:32px;padding:3px;background:#2f2012 var(--weathered-oak);border:1px solid #a88750;color:#ffe7ae;border-radius:0}
:root body#realm-ui[data-ui-theme] #workspace .work-queue p{font-size:13px;padding:6px}
:root body#realm-ui[data-ui-theme] #workspace :is(.realm-section-tabs,.island-subnav nav,.fleet-tabs,.construction-catalog nav) button{position:relative;background:#24190f var(--weathered-oak) center/450px;color:#ffedc6;border:6px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 8px / 0 stretch;box-shadow:none;border-radius:0;text-shadow:0 1px 2px #000;min-height:40px}
:root body#realm-ui[data-ui-theme] #workspace :is(.realm-section-tabs,.island-subnav nav,.fleet-tabs,.construction-catalog nav) button:is([aria-current=page],[aria-pressed=true],.active){background:#24190f var(--weathered-oak) center/450px;color:#ffe29c;box-shadow:inset 0 -3px #d8ab52}
:root body#realm-ui[data-ui-theme] #workspace :is(.realm-section-tabs,.island-subnav nav,.fleet-tabs,.construction-catalog nav) button:is([aria-current=page],[aria-pressed=true],.active)::after{content:'◆';position:absolute;bottom:-5px;left:calc(50% - 5px);font-size:10px;line-height:10px;color:#f1ce7e;background:none;width:10px;height:10px;display:block}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource-gauge{display:block!important;position:absolute;left:8px;right:8px;bottom:0;width:calc(100% - 16px);height:5px;margin:0;appearance:none;border:1px solid #b79455;background:#18160f;border-radius:0;color:#8fa95d;--stock-color:#8fa95d}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource-gauge[data-fill=warn]{--stock-color:#edbb3d}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource-gauge[data-fill=full]{--stock-color:#dd5c43}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource-gauge::-webkit-progress-bar{background:#18160f}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource-gauge::-webkit-progress-value{background:var(--stock-color)}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource-gauge::-moz-progress-bar{background:var(--stock-color)}
:root body#realm-ui[data-ui-theme] #workspace .header-shortcuts{display:flex;gap:3px;align-items:center}
:root body#realm-ui[data-ui-theme] #workspace .header-shortcuts button{width:34px;min-height:38px;padding:4px;background:none;box-shadow:none;border:0;color:#edc77e}
:root body#realm-ui[data-ui-theme] #workspace .header-shortcuts .painted-icon{width:26px;height:26px}
:root body#realm-ui[data-ui-theme] #sidebar .sidebar-bottom>button{display:none}
:root body#realm-ui[data-ui-theme] #workspace .research-node{aspect-ratio:1;flex-shrink:0}
:root body#realm-ui[data-ui-theme] #workspace .research-hex{width:100%;height:100%;aspect-ratio:1}
:root body#realm-ui[data-ui-theme] #workspace .research-hex .painted-icon{object-fit:contain;aspect-ratio:1;flex-shrink:0}
:root body#realm-ui[data-ui-theme] #workspace .recruitment-catalog>button>span{background:#f4e1b4;color:#302012;border-top:1px solid #ac8246;font-size:13px;font-weight:bold;width:100%;padding:3px 0}
:root body#realm-ui[data-ui-theme] #modal .chart-fleet-sheet{text-align:center}
:root body#realm-ui[data-ui-theme] #modal .chart-fleet-sheet>img{width:140px;height:100px;object-fit:contain}
:root body#realm-ui[data-ui-theme] #modal .chart-fleet-sheet>small{display:block;margin-top:10px}
:root body#realm-ui[data-ui-theme] #modal .map-fleet-list{display:grid;gap:8px}
:root body#realm-ui[data-ui-theme] #workspace [data-map-fleets] .painted-icon{width:24px;height:24px}
@media(min-width:951px){
 :root body#realm-ui[data-ui-theme] #workspace .island-command-strip{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
 :root body#realm-ui[data-ui-theme] #workspace #resources .resource-copy strong{font-size:18px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-screen{grid-template-rows:minmax(0,1fr) 30px 124px;grid-template-columns:minmax(240px,1fr) minmax(400px,1.1fr);gap:6px 14px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-status{grid-column:1;grid-row:1;align-self:start}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-screen>.work-queue{grid-column:1;grid-row:1;align-self:end;max-height:calc(100% - 105px);overflow:auto}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-workbench{grid-column:2;grid-row:1;min-height:0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog-heading{grid-column:1/-1;grid-row:2}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:repeat(10,minmax(0,1fr));width:100%;height:124px;overflow:visible}
 :root body#realm-ui[data-ui-theme] #workspace #content-page [data-recruitment=troops] .recruitment-catalog{grid-template-columns:repeat(5,minmax(0,1fr))}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog>button{width:100%;min-width:0;flex:none}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog img{width:100%;max-width:100px;height:51px;object-fit:contain}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog strong{font-size:12px;overflow-wrap:anywhere}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-catalog span{font-size:11px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-node{width:36px;height:36px;min-width:36px;min-height:36px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-ladder{gap:3px;justify-content:center;flex:0 0 auto}
}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace .island-command-rail{position:static;width:auto;max-height:none;overflow:visible;order:2;margin:0 6px 8px}
 :root body#realm-ui[data-ui-theme] #workspace .island-command-rail .scene-inspector{padding:5px}
 :root body#realm-ui[data-ui-theme][data-player=captain] #workspace .topbar{height:103px;min-height:103px;grid-template-rows:50px 36px}
 :root body#realm-ui[data-ui-theme][data-player=captain] #workspace .header-shortcuts{grid-column:2/4;grid-row:2;justify-content:flex-end}
 :root body#realm-ui[data-ui-theme] #workspace .header-shortcuts button{min-height:34px;width:36px}
 :root body#realm-ui[data-ui-theme] #workspace #resources .resource-copy strong{font-size:13px}
 :root body#realm-ui[data-ui-theme] #workspace #resources .resource{padding-bottom:7px}
 :root body#realm-ui[data-ui-theme][data-player=guest] #workspace .header-shortcuts{display:none}
 :root body#realm-ui[data-ui-theme][data-view=map][data-player=captain] #workspace .topbar{flex-basis:103px}
 :root body#realm-ui[data-ui-theme] #workspace .recruitment-screen>.work-queue{order:4;margin-top:6px}
 :root body#realm-ui[data-ui-theme] #workspace .work-queue li{grid-template-columns:32px minmax(0,1fr)}
 :root body#realm-ui[data-ui-theme] #workspace .work-queue li>div{grid-column:2;justify-content:flex-end}
 :root body#realm-ui[data-ui-theme] #workspace .work-queue button{min-width:42px;min-height:42px}
}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-paper{background:#241b10 var(--weathered-oak) center/700px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-quantity button{background:#241b10 var(--weathered-oak) center/350px;color:#ffe1a1;border:5px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 7px / 0 stretch;border-radius:0}
:root body#realm-ui[data-ui-theme] #workspace #content-page button.primary,:root body#realm-ui[data-ui-theme] #modal button.primary{background:#e8c889 url('/art/interface/parchment.webp') center/500px;color:#302010;text-shadow:none;border:7px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 10px / 0 stretch;border-radius:0;box-shadow:0 2px 4px #0005}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.ranking-tabs,.tab-strip) button{background:#24190f var(--weathered-oak) center/400px;color:#ffe4ac;box-shadow:none;border-radius:0;border:5px solid transparent;border-image:var(--carved-frame) 170 140 170 140 / 7px / 0 stretch}
:root body#realm-ui[data-ui-theme] #workspace #content-page :is(.ranking-tabs,.tab-strip) button.active{box-shadow:inset 0 -3px #e9c574;color:#fff2d3}
@media(max-width:950px){:root body#realm-ui[data-ui-theme][data-player=captain] #workspace .topbar{height:110px;min-height:110px;grid-template-rows:50px 44px}:root body#realm-ui[data-ui-theme] #workspace .header-shortcuts button{width:44px;min-height:44px}:root body#realm-ui[data-ui-theme][data-view=map][data-player=captain] #workspace .topbar{flex-basis:110px}}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .queue-track{display:block;height:auto;min-height:0;overflow:visible}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .queue-plans{width:100%;height:auto;min-height:0;display:block;padding:3px 0;grid-column:auto;grid-row:auto}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .queue-plans>summary{padding:6px;font-size:14px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .active-construction{display:grid;grid-template-columns:34px minmax(0,1fr);gap:4px;min-height:64px;width:100%;padding:5px;margin:0}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .active-construction progress{grid-column:1/-1;height:6px;display:block}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .active-construction img{width:34px;height:34px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .active-construction>div{display:flex;flex-wrap:wrap;gap:3px 8px;align-items:center}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .active-construction small{width:100%;font-size:11px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .queue-free-slots{display:none}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders .costs{display:none}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders>li{min-height:55px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders strong{font-size:14px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .recruitment-quantity button{background:#241b10 var(--weathered-oak) center/350px!important}
:root body#realm-ui[data-ui-theme] #modal:has(.chart-fleet-sheet){background:#241b10 var(--weathered-oak) center/650px}
@media(min-width:951px){
 :root body#realm-ui[data-ui-theme] #workspace{padding-bottom:0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page{min-height:calc(var(--game-height,100dvh) - var(--workspace-top,150px) - 12px)}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector{padding:5px 7px;border-width:8px;border-image-width:11px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector article>header{min-height:48px;padding:2px;gap:6px;margin:0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector article>header img{width:48px;height:40px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector h2{font-size:21px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector .inspector-effect{padding:4px;font-size:13px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector .costs{padding:4px;margin:0;min-height:28px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector footer{padding:3px;margin:0;min-height:44px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector .scene-inspector-more{min-height:30px;padding:2px;margin:0}
}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders>li{display:grid;grid-template-columns:18px 30px minmax(0,1fr);grid-template-rows:auto auto;padding:5px;gap:3px 5px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders .order-number{position:static;grid-column:1;grid-row:1}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders .construction-art{position:static;grid-column:2;grid-row:1;width:30px;height:30px;display:block}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders .order-copy{grid-column:3;grid-row:1;min-width:0;width:auto;display:block}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders .order-copy strong{display:block;white-space:normal;overflow:visible;text-overflow:clip;font-size:14px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders .order-copy small{font-size:12px;white-space:normal}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .construction-orders .order-controls{grid-column:2/-1;grid-row:2;display:flex;position:static;gap:3px}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .order-controls button{display:block;width:32px;min-width:32px;min-height:30px;padding:2px;flex:none;position:static;opacity:1}
:root body#realm-ui[data-ui-theme] #workspace #content-page .scene-build-plan .active-construction>div>span{display:block;position:static;font-size:13px;color:#f9e0b6}
@media(min-width:951px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-board{display:grid;grid-template-columns:minmax(0,1fr) 40%;grid-template-rows:36px 26px auto minmax(192px,1fr) auto auto;gap:0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-scene-title{grid-column:1/-1;grid-row:1}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-policy{grid-column:1/-1;grid-row:2;padding:3px 8px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project{grid-column:1;grid-row:3;min-height:0;padding:6px;display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:6px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>img{width:28px;height:28px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project h2{font-size:16px;margin:3px 0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project>strong{font-size:12px;max-width:65px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-project progress{height:6px;margin:3px 0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-board>.work-queue{grid-column:2;grid-row:3;max-height:90px;overflow:auto;align-self:start}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-board>.work-queue>summary{font-size:13px;padding:4px;min-height:30px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-board>.work-queue li{grid-template-columns:minmax(0,1fr) auto;padding:4px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-board>.work-queue li img{display:none}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-board>.work-queue li small{font-size:10px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-tree{grid-column:1/-1;grid-row:4;min-height:192px;height:100%;max-height:none;overflow:auto}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-branch-title{height:42px;min-height:42px;font-size:12px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-node{width:30px;height:30px;min-width:30px;min-height:30px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-branch>small{font-size:10px;margin:0}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-selection{grid-column:1/-1;grid-row:5;padding:5px 7px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-selection h2{font-size:18px}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .research-contribution{grid-column:1/-1;grid-row:6}
}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail{display:flex}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-orders{order:0;max-height:none}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-inspector{order:1}
 :root body#realm-ui[data-ui-theme] #workspace #content-page .island-command-rail .scene-build-plan{order:2}
 :root body#realm-ui[data-ui-theme][data-player=captain][data-view=map] #workspace .island-command-strip{display:contents!important}
 :root body#realm-ui[data-ui-theme][data-player=captain][data-view=map] #workspace .topbar #resources{display:grid!important}
 :root body#realm-ui[data-ui-theme][data-player=captain][data-view=map] #workspace .topbar::after{display:none;content:none}
 :root body#realm-ui[data-ui-theme][data-player=captain][data-view=map] #workspace .topbar .header-shortcuts{display:flex}
}
:root body#realm-ui[data-ui-theme][data-player=captain][data-view=map] #workspace .topbar .island-command-strip:has(#resources){display:grid!important}
@media(max-width:950px){:root body#realm-ui[data-ui-theme][data-player=captain][data-view=map] #workspace .topbar .island-command-strip:has(#resources){display:contents!important}}
