/* Island-first Caribbean interface. Shared navigation stays small; the landscape is the workspace. */
:root body#realm-ui #workspace .island-building{border-image:none;background:none;box-shadow:none;transform:translate(-50%,-85%)}
:root body#realm-ui #workspace .island-building:hover:not(:disabled){transform:translate(-50%,-85%);background:none;box-shadow:none;filter:none}
:root body#realm-ui #workspace :is(.island-switch,.island-subnav nav button,.realm-island-picture,.chart-popup-close,.desk-latest button){border-image:none}
:root body#realm-ui #workspace .topbar :is(.current-island,.header-world-badge,#inventory-toggle){display:none!important}
:root body#realm-ui #workspace .building-inspector .costs span{color:#fff0ce}
:root body#realm-ui #workspace .building-inspector .costs span.missing{color:#ffb5a0}
:root body#realm-ui #sidebar :is(.world-label,.sidebar-section,#my-islands,.season){display:none!important}
:root body#realm-ui #workspace .resource .rate{color:#ecd2a5;font-size:13px;line-height:1.2}
:root body#realm-ui #workspace .topbar::after{position:static;inset:auto;width:auto;height:auto;transform:none;background:none;border:0;box-shadow:none;pointer-events:none}
:root body#realm-ui[data-view=map] #workspace .chart-overview-wrap{top:auto;height:auto;min-height:0}
:root body#realm-ui[data-view=map] #workspace .map-controls{left:auto;top:auto}
:root body#realm-ui[data-ui-theme]{--font-body:'EB Garamond',Georgia,serif;--font-display:'EB Garamond',Georgia,serif;--title:var(--font-display);font-family:var(--font-body);font-size:17px;background:#183c49;color:#f9ecd2}
:root body#realm-ui[data-ui-theme] :is(button,input,select,textarea){font-family:var(--font-body)}
:root body#realm-ui[data-ui-theme] .shell{grid-template-columns:164px minmax(0,1fr)}
:root body#realm-ui[data-ui-theme] #workspace{padding:0 18px 20px;min-width:0;background:linear-gradient(#142e38d9,#142e38ed),url('/art/realm/island.webp') center/cover fixed}
:root body#realm-ui[data-ui-theme] .sidebar{width:164px;padding:12px 8px;background:linear-gradient(90deg,#1b120db0,#39261785),url('/art/interface/cabin-timber.webp') center/320px;border-right:3px solid #9c713d;box-shadow:3px 0 0 #20160f,6px 0 12px #0005;z-index:50}
:root body#realm-ui[data-ui-theme] .sidebar::after{width:5px;opacity:.65}
:root body#realm-ui[data-ui-theme] .brand{padding:0;gap:4px;min-height:65px;justify-content:center}
:root body#realm-ui[data-ui-theme] .brand-crest{width:43px;height:52px}
:root body#realm-ui[data-ui-theme] .brand>span{font-size:19px;letter-spacing:.03em;color:#ffe1a4}
:root body#realm-ui[data-ui-theme] .brand small{font-size:10px;margin-top:4px}
:root body#realm-ui[data-ui-theme] .world-label,:root body#realm-ui[data-ui-theme] .sidebar-section,:root body#realm-ui[data-ui-theme] #my-islands,:root body#realm-ui[data-ui-theme] .season{display:none}
:root body#realm-ui[data-ui-theme] #navigation{padding:12px 0;display:grid;gap:6px}
:root body#realm-ui[data-ui-theme] #navigation .nav-item{display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:77px;padding:5px 4px;color:#fce6bb;font-size:17px;font-weight:600;line-height:1.15;border:1px solid #98703e75;border-radius:2px;background:linear-gradient(105deg,#5c3c2433,#160f0b60);box-shadow:inset 0 1px #f4d49918;text-shadow:0 1px 2px #000}
:root body#realm-ui[data-ui-theme] #navigation .nav-item>.painted-icon{width:43px;height:43px;flex-basis:43px}
:root body#realm-ui[data-ui-theme] #navigation .nav-item.active{color:#fff4d7;background:linear-gradient(90deg,#064c68e8,#0e7290b5),url('/art/interface/cabin-timber.webp');border:1px solid #e1b968;box-shadow:inset 0 0 0 2px #062b3a,0 2px 5px #0008}
:root body#realm-ui[data-ui-theme] #navigation .nav-item.active::after{display:none}
:root body#realm-ui[data-ui-theme] .sidebar-bottom{margin-top:auto;padding:10px 0 0}
:root body#realm-ui[data-ui-theme] .sidebar-bottom .nav-item{min-height:36px;font-size:14px;margin:2px 0;padding:3px 7px}
:root body#realm-ui[data-ui-theme] .sidebar-bottom .painted-icon{width:25px;height:25px}
:root body#realm-ui[data-ui-theme] .legal-links{font-size:10px;line-height:1.5;padding:9px 4px}
:root body#realm-ui[data-ui-theme] #workspace .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:72px;padding:7px 18px;margin:0 -18px;border-bottom:3px solid #a88049;background:linear-gradient(#261a11aa,#261a11aa),url('/art/interface/cabin-timber.webp') center/640px;box-shadow:0 3px 8px #0007;position:relative;z-index:35}
:root body#realm-ui[data-ui-theme] .topbar .helm{display:contents}
:root body#realm-ui[data-ui-theme] .topbar :is(.current-island,.header-world-badge,#inventory-toggle){display:none}
:root body#realm-ui[data-ui-theme] #account{grid-column:2;grid-row:1;min-width:0}
:root body#realm-ui[data-ui-theme] #workspace .island-command-strip{grid-column:1;grid-row:1;display:block;margin:0;padding:0;border:0;min-width:0}
:root body#realm-ui[data-ui-theme] #resources{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource{display:flex;align-items:center;gap:8px;min-height:52px;padding:4px 12px;border:0;border-right:1px solid #a68045;background:none;box-shadow:none;color:#fff0cf;position:relative}
:root body#realm-ui[data-ui-theme] #workspace #resources .resource:last-child{border-right:0}
:root body#realm-ui[data-ui-theme] #workspace .resource-icon{width:40px;height:40px;flex:0 0 40px}
:root body#realm-ui[data-ui-theme] #workspace .resource-icon .painted-icon{width:40px;height:40px}
:root body#realm-ui[data-ui-theme] #workspace .resource strong{font-size:23px;line-height:1.05;color:#fff0cf;text-shadow:0 1px 2px #000;font-weight:600}
:root body#realm-ui[data-ui-theme] #workspace .resource-copy{min-width:0}
:root body#realm-ui[data-ui-theme] #workspace .resource small{font-size:13px;line-height:1.2;color:#edcf9a}
:root body#realm-ui[data-ui-theme] #workspace .resource-label{display:none}
:root body#realm-ui[data-ui-theme] #workspace .resource-gauge{display:none}
:root body#realm-ui[data-ui-theme] #workspace :is(#harbor-summary,#header-status){display:none}
:root body#realm-ui[data-ui-theme] #account .captain-caption{display:none}
:root body#realm-ui[data-ui-theme] #account .captain-name{font-size:18px}
:root body#realm-ui[data-ui-theme] #account .captain-portrait{width:48px;height:48px}
:root body#realm-ui[data-ui-theme] #workspace .page-heading{background:none;border:0;box-shadow:none;margin:0;min-height:64px;padding:10px 0}
:root body#realm-ui[data-ui-theme] #workspace .page-heading h1{font-family:var(--font-display);font-size:29px;font-weight:600;color:#fff0cf}
:root body#realm-ui[data-ui-theme] #workspace .page-heading .world-meta{display:none}
:root body#realm-ui[data-ui-theme] #workspace .page-heading .view-emblem{width:40px;height:40px;flex-basis:40px}
:root body#realm-ui[data-ui-theme] #workspace .page-heading .view-emblem .painted-icon{width:40px;height:40px}
:root body#realm-ui[data-ui-theme] #workspace .content-page{padding:0;margin:0;min-width:0}
:root body#realm-ui[data-ui-theme] #workspace .island-subnav{display:flex;align-items:center;gap:20px;min-height:62px;padding:4px 18px;margin:0 -18px;background:linear-gradient(#2f2119ee,#2f2119ee),url('/art/interface/cabin-timber.webp');border-bottom:1px solid #ad8349}
:root body#realm-ui[data-ui-theme] #workspace .island-subnav[hidden]{display:none}
:root body#realm-ui[data-ui-theme] #workspace .island-switch{display:flex;align-items:center;gap:9px;min-width:180px;max-width:330px;padding:0 8px 0 0;border:0;box-shadow:none;background:none;color:#ffefd0;text-align:left}
:root body#realm-ui[data-ui-theme] .island-switch>img{width:54px;height:44px;object-fit:cover;border:1px solid #b38b50}
:root body#realm-ui[data-ui-theme] .island-switch strong{font-size:19px;display:block;line-height:1.1;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root body#realm-ui[data-ui-theme] .island-switch small{display:block;font-size:12px;color:#dfbe86}
:root body#realm-ui[data-ui-theme] .island-subnav nav{display:flex;align-self:stretch;gap:5px}
:root body#realm-ui[data-ui-theme] .island-subnav nav button{display:flex;align-items:center;gap:7px;min-width:108px;min-height:48px;padding:2px 12px;font-size:18px;background:transparent;box-shadow:none;border:0;border-bottom:3px solid transparent;border-radius:0;color:#f1d8ae}
:root body#realm-ui[data-ui-theme] .island-subnav nav button[aria-current]{background:#b58a4326;border-color:#e5bf77;color:#fff2ce}
:root body#realm-ui[data-ui-theme] .island-subnav .painted-icon{width:32px;height:32px}
:root body#realm-ui[data-ui-theme][data-view=island] #workspace .page-heading,:root body#realm-ui[data-ui-theme][data-view=ships] #workspace .page-heading,:root body#realm-ui[data-ui-theme][data-view=troops] #workspace .page-heading{display:none}
:root body#realm-ui[data-ui-theme][data-view=ships] #content-page,:root body#realm-ui[data-ui-theme][data-view=troops] #content-page{padding-top:18px}
/* The scene is a genuine set of independent building hit targets and a shared inspector. */
:root body#realm-ui[data-ui-theme][data-view=island] #workspace{padding-bottom:10px}
:root body#realm-ui[data-ui-theme] .island-theatre{position:relative;margin:0 -18px;background:#0d4860;isolation:isolate;border-bottom:2px solid #ba9658;overflow:hidden}
:root body#realm-ui[data-ui-theme] .island-viewport{overflow:auto;max-height:calc(var(--game-height,100dvh) - 380px);scrollbar-width:thin;scrollbar-color:#b89352 #124658;overscroll-behavior:contain}
:root body#realm-ui[data-ui-theme] .island-panorama{width:calc(100% * var(--island-zoom));min-width:900px;position:relative;aspect-ratio:16/9}
:root body#realm-ui[data-ui-theme] .island-terrain{width:100%;height:100%;display:block;object-fit:fill;user-select:none}
:root body#realm-ui[data-ui-theme] .island-building{position:absolute;left:var(--plot-x);top:var(--plot-y);width:var(--plot-size);height:auto;aspect-ratio:1;transform:translate(-50%,-85%);padding:0;margin:0;border:0;background:none;box-shadow:none;display:flex;align-items:flex-end;justify-content:center;isolation:isolate;border-radius:0;color:#fff1ce;z-index:2}
:root body#realm-ui[data-ui-theme] .island-building::before,:root body#realm-ui[data-ui-theme] .island-building::after{display:none}
:root body#realm-ui[data-ui-theme] .island-building>img{width:100%;height:100%;object-fit:contain;transform-origin:bottom center;transform:scale(var(--building-scale));filter:drop-shadow(0 6px 3px #24190b55);transition:filter .15s;pointer-events:none}
:root body#realm-ui[data-ui-theme] .island-building.unbuilt>img{opacity:.48;filter:sepia(.5) saturate(.6)}
:root body#realm-ui[data-ui-theme] .island-building:hover>img,:root body#realm-ui[data-ui-theme] .island-building.selected>img{filter:drop-shadow(0 0 3px #fff3a6) drop-shadow(0 0 6px #f2c364);opacity:1}
:root body#realm-ui[data-ui-theme] .building-plaque{position:absolute;bottom:3%;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:7px;white-space:nowrap;background:#26190eef;border:1px solid #c79b50;box-shadow:0 2px 3px #0007;padding:2px 6px;border-radius:2px;color:#fff1c9;font-size:13px;font-weight:600;line-height:1.25;pointer-events:none}
:root body#realm-ui[data-ui-theme] .building-plaque>span{display:none}
:root body#realm-ui[data-ui-theme] .island-building:hover .building-plaque>span,:root body#realm-ui[data-ui-theme] .island-building.selected .building-plaque>span{display:block}
:root body#realm-ui[data-ui-theme] .building-plaque b{display:grid;place-items:center;min-width:19px;min-height:19px;color:#ffe5a2;font-size:14px}
:root body#realm-ui[data-ui-theme] .building-plaque i{font-style:normal}
:root body#realm-ui[data-ui-theme] .island-building.under-construction .building-plaque{border-color:#ffe29b;background:#614116}
:root body#realm-ui[data-ui-theme] .island-scene-toolbar{position:absolute;left:12px;top:12px;display:flex;gap:4px;z-index:8}
:root body#realm-ui[data-ui-theme] .island-scene-toolbar button{height:38px;min-width:38px;padding:1px;font-size:23px;color:#ffebbf;background:#2b2119e8;border:1px solid #b88d49;box-shadow:inset 0 0 0 2px #4e3625}
:root body#realm-ui[data-ui-theme] .island-scene-toolbar .painted-icon{width:26px;height:26px}
:root body#realm-ui[data-ui-theme] .island-scene-toolbar [data-show-queue]{display:flex;align-items:center;gap:4px;padding:2px 7px;font-size:16px}
:root body#realm-ui[data-ui-theme] #island-viewport{cursor:grab;user-select:none}
:root body#realm-ui[data-ui-theme] .building-inspector{position:absolute;right:16px;top:14px;width:288px;z-index:7;padding:12px;color:#fff0ce;border:2px solid #ba8d46;outline:2px solid #382315;outline-offset:-5px;border-radius:4px;background:linear-gradient(#281b14ed,#281b14ed),url('/art/interface/cabin-timber.webp') center/420px;box-shadow:0 6px 20px #0007}
:root body#realm-ui[data-ui-theme] .building-inspector header{display:flex;align-items:center;gap:9px;margin-bottom:8px}
:root body#realm-ui[data-ui-theme] .building-inspector header>img{width:66px;height:66px;object-fit:contain}
:root body#realm-ui[data-ui-theme] .building-inspector header>div{flex:1;min-width:0}
:root body#realm-ui[data-ui-theme] .building-inspector h2{color:#ffe8b5;font-size:23px;line-height:1.08;margin:2px 0;font-weight:600}
:root body#realm-ui[data-ui-theme] .building-inspector small{color:#e7c18b;font-size:12px;letter-spacing:.04em}
:root body#realm-ui[data-ui-theme] .building-inspector .inspector-effect{font-size:16px;line-height:1.3;color:#f1d9b0;padding:4px 0 8px;border-bottom:1px solid #aa804642}
:root body#realm-ui[data-ui-theme] .building-inspector .costs{margin:8px 0;gap:12px;display:flex;flex-wrap:wrap;color:#fff0ce;font-size:17px}
:root body#realm-ui[data-ui-theme] .building-inspector .costs img{width:24px;height:24px;object-fit:contain}
:root body#realm-ui[data-ui-theme] .building-inspector .costs .missing{color:#ffb5a0}
:root body#realm-ui[data-ui-theme] .building-inspector footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:15px}
:root body#realm-ui[data-ui-theme] .building-inspector footer button{font-size:17px;min-height:40px;padding:5px 15px}
:root body#realm-ui[data-ui-theme] .building-ribbon{position:relative;display:flex;gap:5px;justify-content:center;padding:8px 10px;background:linear-gradient(#2c2014ee,#1a130ff5),url('/art/interface/cabin-timber.webp');border-top:2px solid #b18a4c;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#b18a4c #261b13}
:root body#realm-ui[data-ui-theme] .building-ribbon button{position:relative;flex:0 0 9.3%;min-width:78px;max-width:140px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:2px 3px 5px;color:#f5dbad;background:#1d160f;border:1px solid #926b38;border-radius:2px;box-shadow:inset 0 0 0 2px #60432650;font-size:13px;line-height:1.1}
:root body#realm-ui[data-ui-theme] .building-ribbon button.selected{border-color:#ffe0a1;background:#1c4c5b;box-shadow:inset 0 0 0 2px #bfa16b}
:root body#realm-ui[data-ui-theme] .building-ribbon img{height:57px;width:100%;object-fit:contain;pointer-events:none}
:root body#realm-ui[data-ui-theme] .building-ribbon b{position:absolute;right:4px;top:4px;display:grid;place-items:center;min-width:19px;height:19px;border:1px solid #b38a4b;background:#261b12;color:#ffe4a9;font-size:12px}
:root body#realm-ui[data-ui-theme] #workspace .construction-queue{margin:10px 0 0;background:linear-gradient(#2b2016f0,#2b2016f0),url('/art/interface/cabin-timber.webp');color:#f7dfb6;border:1px solid #ad8449}
:root body#realm-ui[data-ui-theme] #workspace .construction-queue :is(h3,strong,.construction-state,.queue-count,small,.queue-idle){color:#f7dfb6}
:root body#realm-ui[data-ui-theme] #workspace .construction-queue :is(.active-construction,.construction-orders>li,.queue-idle){background:#1e1910bb;border-color:#ab844650;color:#f7dfb6}
:root body#realm-ui[data-ui-theme] #workspace .construction-queue .costs{color:#f7dfb6}
:root body#realm-ui[data-ui-theme] #workspace .construction-art{background-size:cover}
/* Overview and captain's desk use the same limited wood, gold and parchment materials. */
:root body#realm-ui[data-ui-theme] .realm-islands{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px;max-width:1400px}
:root body#realm-ui[data-ui-theme] .realm-island-card{max-width:620px;background:#f2dfb9;border:2px solid #b0894f;color:#332315;box-shadow:0 6px 16px #0003}
:root body#realm-ui[data-ui-theme] .realm-island-picture{display:block;position:relative;width:100%;height:200px;margin:0;padding:0;background:none;border:0;box-shadow:none;border-radius:0;overflow:hidden}
:root body#realm-ui[data-ui-theme] .realm-island-picture>img{width:100%;height:100%;object-fit:cover}
:root body#realm-ui[data-ui-theme] .realm-island-name{position:absolute;inset:auto 0 0;padding:26px 18px 12px;background:linear-gradient(transparent,#172326f5);color:#fff1d3;text-align:left;line-height:1.25}
:root body#realm-ui[data-ui-theme] .realm-island-name strong{font-size:25px;display:block}
:root body#realm-ui[data-ui-theme] .realm-island-name small{font-size:14px;color:#ecd1a2}
:root body#realm-ui[data-ui-theme] .realm-island-ledger{padding:12px}
:root body#realm-ui[data-ui-theme] .realm-stock{display:flex;justify-content:space-between;gap:5px;flex-wrap:wrap}
:root body#realm-ui[data-ui-theme] .realm-stock>span{display:flex;align-items:center;gap:4px;font-size:18px}
:root body#realm-ui[data-ui-theme] .realm-stock .painted-icon{width:29px;height:29px}
:root body#realm-ui[data-ui-theme] .realm-island-order{display:flex;align-items:center;gap:8px;border-top:1px solid #ac864e55;margin-top:10px;padding:8px 0;font-size:16px}
:root body#realm-ui[data-ui-theme] .realm-island-order .painted-icon{width:25px;height:25px;flex:0 0 25px}
:root body#realm-ui[data-ui-theme] .realm-island-order>span:not(.painted-icon){flex:1}
:root body#realm-ui[data-ui-theme] .realm-island-actions{display:flex;gap:6px}
:root body#realm-ui[data-ui-theme] .realm-island-actions button{flex:1;min-height:40px;font-size:17px;padding:5px}
:root body#realm-ui[data-ui-theme] .realm-section-tabs{display:flex;align-items:center;gap:6px;margin:0 0 14px;overflow-x:auto;scrollbar-width:thin}
:root body#realm-ui[data-ui-theme] .realm-section-tabs button{white-space:nowrap;min-height:40px;font-size:17px;padding:5px 14px}
:root body#realm-ui[data-ui-theme] .realm-section-tabs button[aria-current]{background:#e5c183;color:#2a1c10;border-color:#f8db9f;text-shadow:none}
:root body#realm-ui[data-ui-theme] .realm-section-tabs [data-new-voyage]{margin-left:auto}
:root body#realm-ui[data-ui-theme] .captains-desk{max-width:1100px;background:linear-gradient(#f6e7cceb,#eed8afea),url('/art/interface/ledger-paper.webp');padding:22px;color:#392819;border:2px solid #aa8149}
:root body#realm-ui[data-ui-theme] .desk-welcome{display:flex;align-items:center;gap:18px}
:root body#realm-ui[data-ui-theme] .desk-welcome>img{width:110px;height:90px;object-fit:contain}
:root body#realm-ui[data-ui-theme] .desk-welcome h2{font-size:32px;margin:0;color:#382616}
:root body#realm-ui[data-ui-theme] .desk-welcome :is(small,p){color:#6c4c2c;margin:4px 0;font-size:16px}
:root body#realm-ui[data-ui-theme] .desk-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:20px 0}
:root body#realm-ui[data-ui-theme] .desk-metrics button{display:grid;grid-template-columns:44px 1fr;align-items:center;gap:2px 9px;background:#3c2b1b;color:#ffebc4;border:1px solid #a68048;padding:12px;text-align:left;box-shadow:none}
:root body#realm-ui[data-ui-theme] .desk-metrics .painted-icon{width:42px;height:42px;grid-row:span 2}
:root body#realm-ui[data-ui-theme] .desk-metrics strong{font-size:28px;line-height:1}
:root body#realm-ui[data-ui-theme] .desk-metrics span:not(.painted-icon){font-size:15px}
:root body#realm-ui[data-ui-theme] .desk-shortcuts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
:root body#realm-ui[data-ui-theme] .desk-shortcuts button{display:flex;align-items:center;gap:8px;padding:8px;font-size:18px;min-height:58px}
:root body#realm-ui[data-ui-theme] .desk-shortcuts .painted-icon{width:34px;height:34px}
:root body#realm-ui[data-ui-theme] .desk-shortcuts b{margin-left:auto}
:root body#realm-ui[data-ui-theme] .desk-latest h3{color:#392819;font-size:23px;margin:22px 0 7px}
:root body#realm-ui[data-ui-theme] .desk-latest button{display:flex;justify-content:space-between;align-items:center;width:100%;background:none;color:#392819;border:0;border-bottom:1px solid #b18b4d55;border-radius:0;box-shadow:none;text-shadow:none;text-align:left;padding:9px 0;font-size:18px;min-height:44px}
/* Global research: one actual empire-wide project with transparent production funding. */
:root body#realm-ui[data-ui-theme] .research-policy{display:flex;align-items:center;gap:12px;background:#352519;color:#ffebc9;padding:12px 16px;border:1px solid #ac8447;margin:0 0 14px}
:root body#realm-ui[data-ui-theme] .research-policy>.painted-icon{width:44px;height:44px}
:root body#realm-ui[data-ui-theme] .research-policy>div{flex:1}
:root body#realm-ui[data-ui-theme] .research-policy strong{display:block;font-size:21px}
:root body#realm-ui[data-ui-theme] .research-policy span:not(.painted-icon){display:block;font-size:16px;color:#f3d3a0}
:root body#realm-ui[data-ui-theme] .research-project{display:flex;align-items:center;gap:14px;padding:14px;background:#f4e3c2;color:#352419;border:1px solid #ad8349;margin-bottom:12px}
:root body#realm-ui[data-ui-theme] .research-project>img{width:72px;height:72px;object-fit:cover}
:root body#realm-ui[data-ui-theme] .research-project>div{flex:1}
:root body#realm-ui[data-ui-theme] .research-project h2{color:#352419;font-size:23px;margin:2px 0}
:root body#realm-ui[data-ui-theme] .research-project small{font-size:12px;color:#68492b}
:root body#realm-ui[data-ui-theme] .research-project progress{display:block;width:100%;height:9px;margin:7px 0;accent-color:#176982}
:root body#realm-ui[data-ui-theme] .research-contribution{padding:10px 14px;background:#f4e3c2;color:#352419;margin:0 0 14px;border:1px solid #ad8349}
:root body#realm-ui[data-ui-theme] .research-contribution summary{font-size:18px;cursor:pointer;min-height:28px}
:root body#realm-ui[data-ui-theme] .research-contribution form{padding-top:12px}
:root body#realm-ui[data-ui-theme] .research-contribution label{color:#352419;font-size:16px}
:root body#realm-ui[data-ui-theme] .research-fund-inputs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}
:root body#realm-ui[data-ui-theme] .research-fund-inputs .painted-icon{width:32px;height:32px;float:left;margin-right:5px}
:root body#realm-ui[data-ui-theme] .realm-research-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
:root body#realm-ui[data-ui-theme] .realm-research-grid article{display:flex;align-items:center;gap:13px;background:linear-gradient(#f4e4c5ef,#eed9b1ef),url('/art/interface/ledger-paper.webp');border:1px solid #ae854a;padding:12px;color:#382718}
:root body#realm-ui[data-ui-theme] .realm-research-grid article>img{width:94px;height:94px;object-fit:cover;border:1px solid #aa834c}
:root body#realm-ui[data-ui-theme] .realm-research-grid article>div{flex:1;min-width:0}
:root body#realm-ui[data-ui-theme] .realm-research-grid header{display:flex;align-items:center;gap:10px}
:root body#realm-ui[data-ui-theme] .realm-research-grid h3{font-size:23px;color:#382718;margin:0;flex:1;line-height:1.2}
:root body#realm-ui[data-ui-theme] .realm-research-grid p{color:#694a2b;font-size:16px;line-height:1.2;margin:7px 0}
:root body#realm-ui[data-ui-theme] .realm-research-grid footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
:root body#realm-ui[data-ui-theme] .realm-research-grid footer button{min-height:38px;padding:4px 16px;font-size:17px}
/* The world page has only a full-size chart and contextual controls. */
:root body#realm-ui[data-ui-theme][data-view=map] #workspace{padding:0;height:var(--game-height,100dvh);display:flex;flex-direction:column;overflow:hidden}
:root body#realm-ui[data-ui-theme][data-view=map] #workspace .topbar{margin:0;flex:0 0 64px;min-height:64px;grid-template-columns:1fr auto}
:root body#realm-ui[data-ui-theme][data-view=map] #workspace .topbar::before{content:'Die Karibische See';font-size:26px;color:#ffe5af;font-weight:600}
:root body#realm-ui[data-ui-theme][data-view=map] #workspace :is(.page-heading,#activity-bar,.island-command-strip){display:none!important}
:root body#realm-ui[data-ui-theme][data-view=map] #map-page{display:block;position:relative;flex:1;min-height:0;grid-template-columns:none;height:auto;margin:0;padding:0;gap:0}
:root body#realm-ui[data-ui-theme][data-view=map] #map-page .map-card{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;border:0;border-radius:0;box-shadow:none;margin:0}
:root body#realm-ui[data-ui-theme][data-view=map] #world-map{width:100%;height:100%;display:block;touch-action:none}
:root body#realm-ui[data-ui-theme][data-view=map] .map-region{display:none}
:root body#realm-ui[data-ui-theme][data-view=map] .map-toolbar{top:34px;left:28px;right:auto;padding:0;gap:6px}
:root body#realm-ui[data-ui-theme][data-view=map] :is(.map-toolbar button,.map-controls button){background:#2d2118e8;border:1px solid #bc9654;color:#ffe8b7;box-shadow:inset 0 0 0 2px #5e4325;min-width:40px;min-height:40px}
:root body#realm-ui[data-ui-theme][data-view=map] .map-controls{right:16px;bottom:164px;background:none;padding:0;border:0;gap:4px}
:root body#realm-ui[data-ui-theme][data-view=map] .chart-overview-wrap{right:16px;bottom:22px;border:3px solid #b08a4b;background:#281d13;color:#ffebbf;box-shadow:0 0 0 2px #3f2c1b,0 4px 12px #0006;border-radius:3px;padding:4px}
:root body#realm-ui[data-ui-theme][data-view=map] .chart-overview-wrap>span{font-size:11px}
:root body#realm-ui[data-ui-theme][data-view=map] .map-legend{bottom:24px;left:30px;right:auto;display:flex;gap:10px;flex-wrap:wrap;padding:8px 12px;max-width:calc(100% - 270px);background:#211c15e8;border:1px solid #ae8b51;color:#ffedc4;font-size:14px}
:root body#realm-ui[data-ui-theme][data-view=map] .map-compass{display:none}
:root body#realm-ui[data-ui-theme][data-view=map] #island-detail{position:absolute;top:35px;right:16px;bottom:auto;width:300px;max-height:calc(100% - 80px);overflow:auto;z-index:12;background:linear-gradient(#2a2018f5,#2a2018f5),url('/art/interface/cabin-timber.webp');padding:18px;border:2px solid #c19a54;box-shadow:0 7px 24px #0006;color:#ffeaca}
:root body#realm-ui[data-ui-theme][data-view=map] #island-detail[hidden]{display:none!important}
:root body#realm-ui[data-ui-theme][data-view=map] #island-detail h2{color:#ffe8b3;font-size:25px;line-height:1.2;padding-right:14px;margin:8px 0}
:root body#realm-ui[data-ui-theme][data-view=map] #island-detail :is(small,p){color:#e5ca9e;font-size:15px}
:root body#realm-ui[data-ui-theme] .chart-popup-close{position:absolute;right:4px;top:3px;width:32px;height:32px;min-height:32px;padding:0;background:none;border:0;color:#ffedc4;font-size:24px}
:root body#realm-ui[data-ui-theme] .chart-popup-actions{display:flex;gap:8px;flex-wrap:wrap}
:root body#realm-ui[data-ui-theme] .chart-popup-actions button{min-height:40px;padding:5px 12px;font-size:16px}
:root body#realm-ui[data-ui-theme] #workspace :is(.shipyard-row,.compact-troop){background:linear-gradient(#f5e5c7ed,#efdbb8ed),url('/art/interface/ledger-paper.webp');border-color:#a98148}
:root body#realm-ui[data-ui-theme] #workspace .compact-shipyard{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
:root body#realm-ui[data-ui-theme] #workspace .shipyard-row{display:grid;grid-template-columns:110px minmax(0,1fr);padding:12px;gap:10px;align-items:center}
:root body#realm-ui[data-ui-theme] #workspace .shipyard-art{width:110px;height:90px;grid-column:1;grid-row:1;object-fit:contain;background:none;border:0;box-shadow:none}
:root body#realm-ui[data-ui-theme] #workspace .shipyard-identity{grid-column:2;grid-row:1}
:root body#realm-ui[data-ui-theme] #workspace .shipyard-order{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center}
:root body#realm-ui[data-ui-theme] #workspace .shipyard-title h3{font-size:23px}
:root body#realm-ui[data-ui-theme] #workspace .shipyard-order form{grid-template-columns:58px minmax(35px,1fr) auto;gap:8px}
:root body#realm-ui[data-ui-theme] #workspace .shipyard-order button{font-size:16px;padding:5px 12px}
:root body#realm-ui[data-ui-theme] #workspace .compact-troop .troop-card-copy h3{font-size:23px}
:root body#realm-ui[data-ui-theme] :is(button,a,input,select,textarea):focus-visible{outline:3px solid #ffd277;outline-offset:3px}
@media(min-width:951px) and (max-width:1250px){
 :root body#realm-ui[data-ui-theme] .shell{grid-template-columns:134px minmax(0,1fr)}
 :root body#realm-ui[data-ui-theme] .sidebar{width:134px}
 :root body#realm-ui[data-ui-theme] .brand-crest{display:none}
 :root body#realm-ui[data-ui-theme] #workspace .resource strong{font-size:20px}
 :root body#realm-ui[data-ui-theme] #workspace #resources .resource{padding:4px 7px;gap:4px}
 :root body#realm-ui[data-ui-theme] #account .captain-copy{display:none}
 :root body#realm-ui[data-ui-theme] .building-inspector{width:250px}
 :root body#realm-ui[data-ui-theme] #workspace .compact-shipyard{grid-template-columns:1fr}
}
@media(max-width:950px){
 :root body#realm-ui[data-ui-theme] .shell{display:block;grid-template-columns:none}
 :root body#realm-ui[data-ui-theme] #workspace{padding:0 12px 78px;min-height:var(--game-height,100dvh)}
 :root body#realm-ui[data-ui-theme] .sidebar{width:min(340px,90vw);padding:15px;z-index:202}
 :root body#realm-ui[data-ui-theme] #sidebar-backdrop{z-index:201}
 :root body#realm-ui[data-ui-theme] #navigation{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 :root body#realm-ui[data-ui-theme] #navigation .nav-item{min-height:98px;font-size:19px}
 :root body#realm-ui[data-ui-theme] #navigation .nav-item>.painted-icon{width:47px;height:47px}
 :root body#realm-ui[data-ui-theme] .brand{justify-content:flex-start;gap:10px}
 :root body#realm-ui[data-ui-theme] .brand>span{font-size:24px}
 :root body#realm-ui[data-ui-theme] .brand-crest{width:56px;height:56px}
 :root body#realm-ui[data-ui-theme] #workspace .topbar{grid-template-columns:44px 1fr auto;grid-template-rows:44px 52px;min-height:106px;padding:5px 10px;gap:0 8px;margin:0 -12px}
 :root body#realm-ui[data-ui-theme] #mobile-menu{grid-column:1;grid-row:1;display:grid;place-items:center;width:44px;height:44px;min-height:44px;margin:0;padding:5px}
 :root body#realm-ui[data-ui-theme] #mobile-menu .painted-icon{width:30px;height:30px}
 :root body#realm-ui[data-ui-theme] #workspace .topbar::after{content:'KARIBIKKAMPF';grid-column:2;grid-row:1;font-size:20px;font-weight:600;letter-spacing:.035em;color:#ffdf9f}
 :root body#realm-ui[data-ui-theme] #account{grid-column:3;grid-row:1}
 :root body#realm-ui[data-ui-theme] #account .captain-portrait{width:40px;height:40px}
 :root body#realm-ui[data-ui-theme] #account .captain-copy{display:none}
 :root body#realm-ui[data-ui-theme] #account #player-menu-toggle{height:44px;min-height:44px;margin:0;padding:0 3px}
 :root body#realm-ui[data-ui-theme] #workspace .island-command-strip{grid-column:1/-1;grid-row:2;width:100%}
 :root body#realm-ui[data-ui-theme] #workspace #resources .resource{gap:4px;padding:4px;min-height:48px;justify-content:center}
 :root body#realm-ui[data-ui-theme] #workspace .resource-icon,:root body#realm-ui[data-ui-theme] #workspace .resource-icon .painted-icon{width:29px;height:29px;flex-basis:29px}
 :root body#realm-ui[data-ui-theme] #workspace .resource strong{font-size:19px}
 :root body#realm-ui[data-ui-theme] #workspace .resource small{font-size:12px}
 :root body#realm-ui[data-ui-theme] #workspace .page-heading{min-height:56px;padding:7px 0}
 :root body#realm-ui[data-ui-theme] #workspace .page-heading h1{font-size:27px}
 :root body#realm-ui[data-ui-theme] #workspace .island-subnav{display:flex;flex-wrap:wrap;gap:2px;padding:5px 10px 0;margin:0 -12px;min-height:0}
 :root body#realm-ui[data-ui-theme] #workspace .island-switch{min-height:44px;width:100%;max-width:100%;padding:0;gap:8px}
 :root body#realm-ui[data-ui-theme] .island-switch>img{width:46px;height:36px}
 :root body#realm-ui[data-ui-theme] .island-switch strong{font-size:19px;max-width:260px}
 :root body#realm-ui[data-ui-theme] .island-switch small{font-size:12px}
 :root body#realm-ui[data-ui-theme] .island-subnav nav{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:3px}
 :root body#realm-ui[data-ui-theme] .island-subnav nav button{justify-content:center;min-width:0;min-height:45px;padding:3px;font-size:18px}
 :root body#realm-ui[data-ui-theme] .island-subnav .painted-icon{width:26px;height:26px}
 :root body#realm-ui[data-ui-theme] .island-theatre{margin:0 -12px;overflow:visible}
 :root body#realm-ui[data-ui-theme] .island-viewport{height:285px;max-height:none;overflow:auto}
 :root body#realm-ui[data-ui-theme] .island-panorama{min-width:690px;width:calc(690px * var(--island-zoom));aspect-ratio:16/9}
 :root body#realm-ui[data-ui-theme] .island-building{min-height:44px;min-width:44px}
 :root body#realm-ui[data-ui-theme] .building-plaque{font-size:13px;padding:2px 4px}
 :root body#realm-ui[data-ui-theme] .building-inspector{position:relative;inset:auto;width:100%;border-radius:0;border-width:1px 0;padding:8px 12px;outline:0;box-shadow:none}
 :root body#realm-ui[data-ui-theme] .building-inspector header{margin:0;gap:9px}
 :root body#realm-ui[data-ui-theme] .building-inspector header>img{width:48px;height:48px}
 :root body#realm-ui[data-ui-theme] .building-inspector h2{font-size:23px}
 :root body#realm-ui[data-ui-theme] .building-inspector .inspector-effect{font-size:16px;padding:4px 0;border:0}
 :root body#realm-ui[data-ui-theme] .building-inspector .costs{margin:3px 0;display:inline-flex;gap:10px;min-height:28px;font-size:17px}
 :root body#realm-ui[data-ui-theme] .building-inspector footer{font-size:16px}
 :root body#realm-ui[data-ui-theme] .building-inspector footer button{min-height:44px;font-size:18px;padding:5px 18px}
 :root body#realm-ui[data-ui-theme] .building-ribbon{justify-content:flex-start;gap:5px;padding:7px 8px}
 :root body#realm-ui[data-ui-theme] .building-ribbon button{flex-basis:91px;min-width:91px;font-size:13px;min-height:76px}
 :root body#realm-ui[data-ui-theme] .building-ribbon img{height:48px}
 :root body#realm-ui[data-ui-theme] .island-scene-toolbar{left:8px;top:8px}
 :root body#realm-ui[data-ui-theme] .island-scene-toolbar button{min-width:44px;min-height:44px}
 :root body#realm-ui[data-ui-theme] .realm-islands{grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:12px}
 :root body#realm-ui[data-ui-theme] .realm-island-picture{height:160px}
 :root body#realm-ui[data-ui-theme] .realm-island-actions button{min-height:44px;font-size:18px}
 :root body#realm-ui[data-ui-theme] .realm-section-tabs{margin-bottom:12px;gap:4px}
 :root body#realm-ui[data-ui-theme] .realm-section-tabs button{min-height:44px;padding:6px 12px;font-size:17px}
 :root body#realm-ui[data-ui-theme] .realm-section-tabs [data-new-voyage]{position:fixed;bottom:76px;right:12px;z-index:20;box-shadow:0 3px 12px #0008}
 :root body#realm-ui[data-ui-theme] .captains-desk{padding:14px}
 :root body#realm-ui[data-ui-theme] .desk-welcome>img{width:80px;height:70px}
 :root body#realm-ui[data-ui-theme] .desk-welcome h2{font-size:27px}
 :root body#realm-ui[data-ui-theme] .desk-welcome small{font-size:12px}
 :root body#realm-ui[data-ui-theme] .desk-metrics,:root body#realm-ui[data-ui-theme] .desk-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}
 :root body#realm-ui[data-ui-theme] .desk-metrics{padding:14px 0}
 :root body#realm-ui[data-ui-theme] .desk-metrics button{grid-template-columns:32px 1fr;padding:9px;gap:3px 6px}
 :root body#realm-ui[data-ui-theme] .desk-metrics .painted-icon{width:32px;height:32px}
 :root body#realm-ui[data-ui-theme] .desk-metrics strong{font-size:26px}
 :root body#realm-ui[data-ui-theme] .desk-shortcuts button{font-size:17px;gap:5px;padding:7px}
 :root body#realm-ui[data-ui-theme] .desk-latest button{font-size:17px;gap:10px}
 :root body#realm-ui[data-ui-theme] .research-policy{padding:10px;gap:8px}
 :root body#realm-ui[data-ui-theme] .research-policy strong{font-size:21px;line-height:1.15}
 :root body#realm-ui[data-ui-theme] .research-policy span:not(.painted-icon){font-size:15px;line-height:1.2;margin-top:4px}
 :root body#realm-ui[data-ui-theme] .research-policy>.painted-icon{width:36px;height:36px;flex:0 0 36px}
 :root body#realm-ui[data-ui-theme] .realm-research-grid{grid-template-columns:1fr;gap:10px}
 :root body#realm-ui[data-ui-theme] .realm-research-grid article{gap:10px;padding:10px}
 :root body#realm-ui[data-ui-theme] .realm-research-grid article>img{width:64px;height:72px;align-self:flex-start}
 :root body#realm-ui[data-ui-theme] .realm-research-grid h3{font-size:22px}
 :root body#realm-ui[data-ui-theme] .realm-research-grid header{gap:6px}
 :root body#realm-ui[data-ui-theme] .realm-research-grid p{font-size:17px}
 :root body#realm-ui[data-ui-theme] .realm-research-grid footer button{min-height:44px;font-size:18px}
 :root body#realm-ui[data-ui-theme] .research-project{gap:8px;flex-wrap:wrap;padding:10px}
 :root body#realm-ui[data-ui-theme] .research-project>img{width:52px;height:52px}
 :root body#realm-ui[data-ui-theme] .research-project>strong{margin-left:auto}
 :root body#realm-ui[data-ui-theme] .research-fund-inputs{grid-template-columns:repeat(2,1fr)}
 :root body#realm-ui[data-ui-theme] .research-contribution summary{min-height:44px;display:flex;align-items:center;font-size:18px}
 :root body#realm-ui[data-ui-theme][data-view=map] #workspace{height:calc(var(--game-height,100dvh) - 64px);min-height:0;padding:0}
 :root body#realm-ui[data-ui-theme][data-view=map] #workspace .topbar{flex:0 0 54px;min-height:54px;grid-template-columns:44px 1fr auto;grid-template-rows:44px;padding:5px 10px}
 :root body#realm-ui[data-ui-theme][data-view=map] #workspace .topbar::before{display:none}
 :root body#realm-ui[data-ui-theme][data-view=map] #workspace .topbar::after{content:'Weltkarte';font-size:23px}
 :root body#realm-ui[data-ui-theme][data-view=map] #map-page .map-card{min-height:0;height:100%}
 :root body#realm-ui[data-ui-theme][data-view=map] .map-toolbar{top:30px;left:30px}
 :root body#realm-ui[data-ui-theme][data-view=map] :is(.map-toolbar button,.map-controls button){min-width:44px;min-height:44px}
 :root body#realm-ui[data-ui-theme][data-view=map] .chart-overview-wrap{display:block;right:10px;bottom:22px;width:126px;padding:3px}
 :root body#realm-ui[data-ui-theme][data-view=map] #chart-overview{width:114px;height:78px;display:block}
 :root body#realm-ui[data-ui-theme][data-view=map] .chart-overview-wrap>span{display:none}
 :root body#realm-ui[data-ui-theme][data-view=map] .map-controls{right:10px;bottom:120px}
 :root body#realm-ui[data-ui-theme][data-view=map] .map-legend{max-width:200px;left:16px;bottom:24px;gap:8px;padding:7px}
 :root body#realm-ui[data-ui-theme][data-view=map] .map-legend .legend-label{display:none}
 :root body#realm-ui[data-ui-theme][data-view=map] #island-detail{top:auto;bottom:12px;left:12px;right:12px;width:auto;max-height:55%;padding:12px 14px}
 :root body#realm-ui[data-ui-theme] .chart-popup-actions button{min-height:44px;font-size:18px}
 :root body#realm-ui[data-ui-theme] .chart-popup-close{min-width:44px;min-height:44px}
 :root body#realm-ui[data-ui-theme] #workspace .compact-shipyard{grid-template-columns:1fr;gap:10px}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-row{grid-template-columns:83px minmax(0,1fr);gap:9px;padding:10px}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-art{width:83px;height:82px}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-title h3{font-size:22px}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-order{display:block}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-order button{min-height:44px;font-size:18px}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-order input{min-height:44px;font-size:18px}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-order form{grid-template-columns:58px 1fr auto}
 :root body#realm-ui[data-ui-theme] #workspace .shipyard-cost{margin-bottom:6px}
 :root body#realm-ui[data-ui-theme] .mobile-dock{min-height:64px;background:linear-gradient(#2e2015ee,#2e2015ee),url('/art/interface/cabin-timber.webp');border-top:2px solid #b88d4c;z-index:60}
 :root body#realm-ui[data-ui-theme] .mobile-dock button{min-height:60px;padding:3px 1px;color:#ffe8be;font-size:12px}
 :root body#realm-ui[data-ui-theme] .mobile-dock .painted-icon{width:29px;height:29px}
 :root body#realm-ui[data-ui-theme] .mobile-dock button.active{background:#15566be0;color:#fff4d7;border-color:#e9c37c}
 :root body#realm-ui[data-ui-theme] #workspace .info-button{min-height:40px;min-width:40px;width:40px;height:40px}
}
@media(prefers-reduced-motion:reduce){:root body#realm-ui[data-ui-theme] .island-building>img{transition:none}}
