/* Caribbean captain's deck: original illustrations, clear ink, quiet paper. */
body[data-ui-theme]{--ink:#2d2117;--muted-ink:#59432e;--ivory:#fff3d7;--paper-color:#f4e7cc;--paper:url('/art/interface/ledger-paper.webp');--timber:url('/art/interface/cabin-timber.webp');--surface-base:#102631;--surface-ink:#fff3d7;--text:#fff3d7;--muted:#e5d5b7;--gold:#f4cf7b;font-family:'Libre Baskerville',Georgia,serif;font-size:16px;line-height:1.55;color:#fff3d7;background:#102631}
body[data-ui-theme] :is(h1,h2,h3,h4){font-family:var(--font-display);font-weight:700;letter-spacing:-.02em}
body[data-ui-theme] :is(button,input,select,textarea){font-family:var(--font-body);font-size:15px;line-height:1.5}
body[data-ui-theme] :is(button,a,input,select,textarea):focus-visible{outline:3px solid #ffd274;outline-offset:3px}
body[data-ui-theme] :is(button,a.button){touch-action:manipulation}
body[data-ui-theme] button:disabled{opacity:1;cursor:not-allowed;filter:saturate(.35);color:#e5d6bd}
body[data-ui-theme] #workspace{min-width:0;padding:0 24px 28px;background:linear-gradient(#0c2630e8,#102631f7 580px),url('/art/landing-hero.webp') center top/cover fixed}
body[data-ui-theme] .content-page{padding-top:18px}
body[data-ui-theme] .painted-icon{display:block;flex:0 0 auto;opacity:1;filter:drop-shadow(0 2px 2px #120a0877);background-image:url('/art/interface/navigation-atlas.webp');background-size:400% 400%;background-repeat:no-repeat;background-position:calc(var(--sprite-x)*100%/3) calc(var(--sprite-y)*100%/3)}
/* A wooden navigation with a distinct painting for each destination. */
body[data-ui-theme] .shell{grid-template-columns:264px minmax(0,1fr)}
body[data-ui-theme] #sidebar{--surface-base:#291b12;padding:18px 14px 22px;background:linear-gradient(#24160ce0,#24160ce0),var(--timber) center/540px;border-right:5px solid #634020;box-shadow:1px 0 #dbb96d,5px 0 14px #0006}
body[data-ui-theme] #sidebar:before{display:none}
body[data-ui-theme] #sidebar:after{left:255px;width:10px;background:url('/art/interface/rope.svg') center/10px 45px repeat-y}
body[data-ui-theme] .brand{gap:8px;padding:0 0 16px;text-shadow:0 2px 3px #120903}
body[data-ui-theme] .brand .brand-crest{width:77px;height:84px}
body[data-ui-theme] .brand>span{font:700 23px/1.1 var(--font-body);color:#ffe1a0;letter-spacing:.01em}
body[data-ui-theme] .brand>span>span{font:inherit;letter-spacing:inherit;margin-top:3px}
body[data-ui-theme] .brand small{font:11px/1.5 var(--font-body);color:#fff3d7;letter-spacing:.04em}
body[data-ui-theme] .world-label{font-size:12px;color:#fff3d7;padding:8px;margin:0 0 8px}
body[data-ui-theme] #sidebar #navigation{gap:4px}
body[data-ui-theme] #sidebar #navigation .nav-group-label{font:700 11px/1.5 var(--font-body);letter-spacing:.035em;color:#e5d5b7;margin:18px 9px 5px}
body[data-ui-theme] #sidebar #navigation .nav-item{display:flex;gap:10px;min-height:52px;padding:3px 8px;margin:0;border:1px solid #bf965c55;border-radius:0;background:linear-gradient(#291b12db,#291b12db),var(--timber) center/340px;box-shadow:inset 0 1px #ffe5ae16,0 2px 3px #10090466;color:#fff3d7;text-shadow:0 1px #0f0905;font-size:15px;line-height:1.4}
body[data-ui-theme] #sidebar #navigation .nav-item .painted-icon{width:46px;height:46px;margin:0}
body[data-ui-theme] #sidebar #navigation .nav-item:hover{border-color:#f2cd82;background-color:#57391f}
body[data-ui-theme] #sidebar #navigation .nav-item.active{--surface-base:#f4e7cc;color:#2d2117;text-shadow:none;background:linear-gradient(#f4e7cceb,#f4e7cceb),var(--paper) center/480px;border:1px solid #efcf8b;box-shadow:inset 3px 0 #af7930,0 3px 5px #10090477;font-weight:700}
body[data-ui-theme] #sidebar #navigation .nav-item.active:before{display:none}
body[data-ui-theme] #sidebar #navigation .nav-item.active:after{color:#513515;font-size:25px}
body[data-ui-theme] #sidebar .nav-item .badge{background:#704518;color:#fff6df;border:1px solid #e7c17e;font-size:12px;min-width:22px;text-align:center}
body[data-ui-theme] #sidebar .sidebar-section{margin:18px 8px 8px;color:#fff3d7}
body[data-ui-theme] #sidebar .sidebar-section .eyebrow{font-size:12px;letter-spacing:0}
body[data-ui-theme] #sidebar .my-islands button{font-size:14px;min-height:58px;background:#24170f;border-color:#ac834a;color:#fff3d7;padding:7px}
body[data-ui-theme] #sidebar .my-islands button.active{background:#49321d;border-color:#edc982}
body[data-ui-theme] #sidebar .my-islands small{font-size:12px;color:#e5d5b7}
body[data-ui-theme] #sidebar .my-islands .painted-icon{width:42px;height:42px}
body[data-ui-theme] #sidebar .sidebar-bottom>.nav-item{font-size:14px;min-height:48px;background:#24170f;border:1px solid #ac834a;gap:10px}
body[data-ui-theme] #sidebar .sidebar-bottom>.nav-item .painted-icon{width:34px;height:34px}
body[data-ui-theme] #sidebar .legal-links{font-size:12px;color:#e5d5b7;gap:9px;line-height:1.5}
body[data-ui-theme] #sidebar .legal-links a{color:#fff3d7}
/* Island, supplies and captain form one illustrated helm. */
body[data-ui-theme] #workspace .topbar{--surface-base:#291b12;display:block;height:auto;min-height:0;margin:0 -24px;padding:0 24px 10px;background:linear-gradient(#24160de0,#24160de0),var(--timber) center/650px;border-bottom:3px solid #976a34;box-shadow:0 2px #d4ae66,0 7px 18px #06141c66}
body[data-ui-theme] .topbar .helm{display:flex;gap:18px;align-items:center;height:82px;background:transparent}
body[data-ui-theme] .topbar #account{margin-left:auto}
body[data-ui-theme] .topbar .current-island{gap:12px;max-width:480px}
body[data-ui-theme] .topbar .current-island>span{display:block;width:55px;height:55px;border:0;background:none;box-shadow:none}
body[data-ui-theme] .topbar .current-island .painted-icon{width:55px;height:55px}
body[data-ui-theme] .topbar .current-island small{display:block;color:#e5d5b7;font-size:12px;letter-spacing:.015em;line-height:1.4;margin:0}
body[data-ui-theme] #workspace .topbar #active-island{appearance:none;-webkit-appearance:none;width:100%;max-width:360px;min-height:42px;color:#fff3d7;background:transparent;border:0;border-image:none;box-shadow:none;font:700 23px/1.3 var(--font-body);padding:3px 24px 3px 0;text-shadow:0 1px #120905;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m2 2 4 4 4-4' stroke='%23ffe2a3' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 4px center}
body[data-ui-theme] .header-world-badge{display:none}
body[data-ui-theme] .captain-label{max-width:180px}
body[data-ui-theme] .captain-kicker{font-size:12px!important;color:#e5d5b7!important;letter-spacing:.02em!important}
body[data-ui-theme] .captain-name{font:700 20px/1.3 var(--font-body)!important;color:#fff3d7!important}
body[data-ui-theme] .captain-rank{font-size:13px;color:#e5d5b7}
body[data-ui-theme] .captain-portrait{width:62px;height:62px;padding:3px;box-shadow:0 0 0 2px #2b1b0f,0 0 0 3px #a98244,0 3px 6px #0b0705}
body[data-ui-theme] .topbar .island-command-strip{display:flex;align-items:stretch;gap:10px;padding:0;background:none;box-shadow:none}
body[data-ui-theme] .inventory-section-label{display:none}
body[data-ui-theme] .topbar .resources{flex:1;gap:8px;margin:0;min-width:0}
body[data-ui-theme] #workspace .topbar .resource{display:flex;align-items:center;gap:9px;padding:8px 10px;min-height:72px;color:#2d2117;background:linear-gradient(#f4e7cced,#f4e7cced),var(--paper) center/480px;border:2px solid #a77a3d;box-shadow:inset 0 0 0 1px #fffae4,0 2px 4px #0d0705}
body[data-ui-theme] #workspace .topbar .resource-icon{position:static;width:42px;height:42px;flex:0 0 42px;background:none;border:0;box-shadow:none;opacity:1;filter:none}
body[data-ui-theme] .topbar .resource-icon .painted-icon{width:100%;height:100%;opacity:1;filter:drop-shadow(0 1px 1px #4d2d1040)}
body[data-ui-theme] .resource-copy{display:block;min-width:0}
body[data-ui-theme] #workspace .topbar .resource strong{display:block;font:700 22px/1.2 var(--font-body);color:#2d2117;text-shadow:none;letter-spacing:-.03em;white-space:nowrap}
body[data-ui-theme] #workspace .topbar .resource small{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px;font-size:12px;color:#59432e;line-height:1.3}
body[data-ui-theme] #workspace #resources .resource-label{font-size:13px;color:#2d2117}
body[data-ui-theme] #workspace .topbar .resource .rate{font-size:12px;color:#59432e;font-weight:700}
body[data-ui-theme] .resource-gauge{height:3px;background:#c4aa75}
body[data-ui-theme] .resource-gauge::-webkit-progress-bar{background:#c4aa75}
body[data-ui-theme] .resource-gauge::-webkit-progress-value{background:#73501d}
body[data-ui-theme] .resource-gauge::-moz-progress-bar{background:#73501d}
body[data-ui-theme] #workspace #harbor-summary{display:flex;flex:0 0 320px;min-width:0;gap:0;padding:5px;background:#102631;border:1px solid #b28a4c;box-shadow:inset 0 0 0 2px #071820}
body[data-ui-theme] #workspace .header-ship{display:flex;flex-direction:column;gap:3px;padding:3px!important;color:#fff3d7;background:none!important;box-shadow:none;border:0!important;border-right:1px solid #b8975c55!important;border-image:none;min-width:0}
body[data-ui-theme] .topbar .ship-miniature{width:34px;height:34px;filter:none}
body[data-ui-theme] .header-ship-copy{display:flex;gap:5px;align-items:center;flex-direction:column}
body[data-ui-theme] .topbar .header-ship strong{font:700 18px/1 var(--font-body);color:#fff3d7}
body[data-ui-theme] .topbar .ship-label{font-size:10px;color:#e5d5b7;max-width:64px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
body[data-ui-theme] #workspace .header-army{padding:3px;min-width:60px;background:#102631;border:0;box-shadow:none;color:#fff3d7}
body[data-ui-theme] .topbar .garrison-label{font-size:11px;color:#e5d5b7}
body[data-ui-theme] #workspace #header-status{flex:0 0 130px;max-width:150px;padding:8px;background:#102631;border:1px solid #b28a4c;color:#fff3d7;font-size:12px;box-shadow:none}
body[data-ui-theme] #header-status strong{font-size:12px;color:#fff3d7}
body[data-ui-theme] #header-status small{font-size:12px;color:#e5d5b7}
body[data-ui-theme] #header-status svg{color:#ffe0a2}
/* Protected lettering over the Caribbean scenery. */
body[data-ui-theme] #workspace .page-heading{padding:24px 0 18px}
body[data-ui-theme] .page-heading h1{font-size:32px;color:#fff3d7}
body[data-ui-theme] .page-heading .eyebrow,body[data-ui-theme] .page-heading .world-meta{font-size:12px;color:#e5d5b7;letter-spacing:.03em}
body[data-ui-theme] .page-heading:after{background:#102631}
body[data-ui-theme] #workspace .scene-banner{min-height:125px;padding:18px 24px;border:3px solid #704822;box-shadow:0 0 0 1px #d4ae65,0 5px 15px #04151e66;background-image:linear-gradient(90deg,#09212cf5,#09212cd9 42%,#09212c08 76%),var(--scene);background-position:center;background-size:cover}
body[data-ui-theme] #workspace .scene-banner:before,body[data-ui-theme] #workspace .scene-banner:after{display:none}
body[data-ui-theme] #workspace .scene-banner h3{color:#fff7e4;font-size:30px;margin:4px 0;max-width:62%;text-shadow:0 2px 3px #001019}
body[data-ui-theme] #workspace .scene-banner>span{font-size:11px;color:#fff0c6;letter-spacing:.05em}
body[data-ui-theme] #workspace .scene-banner p{font-size:15px;color:#fff3d7;max-width:62%;line-height:1.5;text-shadow:0 1px #001019}
body[data-ui-theme] .island-overview-title{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:154px;padding:20px 24px;margin:0 0 14px;border:3px solid #70502c;box-shadow:0 0 0 1px #d4ae65,0 4px 12px #04151e88;background:linear-gradient(90deg,#08232df5,#08232dba 44%,#08232d00 75%),url('/art/harbor.webp') center 57%/cover}
body[data-ui-theme] .island-overview-title .eyebrow{font-size:12px;letter-spacing:.04em;color:#fff3d7}
body[data-ui-theme] .island-overview-title h2{font-size:31px;color:#fff9e8;margin:4px 0;text-shadow:0 2px 3px #001019}
body[data-ui-theme] #workspace .island-overview-title .text-button{color:#fff3d7;background:#102631;padding:9px 14px;border:1px solid #d6b473;font-size:14px;min-height:44px}
body[data-ui-theme] #workspace #activity-bar.harbor-briefing{margin-top:16px;padding:12px 16px;background:linear-gradient(#f4e7ccf2,#f4e7ccf2),var(--paper) center/500px;border:1px solid #ad8245;border-left:5px solid #b28b47;color:#2d2117;box-shadow:0 3px 8px #00101a55}
body[data-ui-theme] #workspace .briefing-emblem{width:44px;flex:0 0 44px}
body[data-ui-theme] .briefing-emblem .painted-icon{width:44px;height:44px}
body[data-ui-theme] #workspace .briefing-copy>strong{font-size:16px;color:#2d2117;line-height:1.5}
body[data-ui-theme] #workspace .briefing-copy>span{font-size:14px;color:#59432e;line-height:1.5}
body[data-ui-theme] #workspace .briefing-links{padding-left:56px;gap:6px 20px}
body[data-ui-theme] #workspace .briefing-links .text-button{font-size:14px;min-height:38px;color:#4b321d;gap:7px}
body[data-ui-theme] .briefing-links .painted-icon{width:25px;height:25px}
/* Dark ink on quiet paper. Text families are reset together on every light record. */
body[data-ui-theme] #workspace :is(.construction-card,.construction-queue,.illustrated-card,.progress-card,.troop-card,.community-panel,.report,.help-card,.battle-card,.account-card,.painted-fleet-row,.table-wrap,.island-detail,.painted-guest-copy){--surface-base:#f4e7cc;--surface-ink:#2d2117;--muted:#59432e;color:#2d2117;background-color:#f4e7cc;background-image:linear-gradient(#f4e7ccef,#f4e7ccef),var(--paper);background-size:auto,600px;border:1px solid #aa8046;border-radius:1px;box-shadow:inset 0 0 0 1px #fffae6,0 4px 10px #00131c55}
body[data-ui-theme] #workspace :is(.construction-card,.construction-queue,.card-info,.progress-card,.troop-card,.community-panel,.report,.help-card,.battle-card,.account-card,.painted-fleet-row,.island-detail) :is(h2,h3,h4,p,label,strong,b){color:#2d2117;text-shadow:none}
body[data-ui-theme] #workspace :is(.construction-card,.construction-queue,.card-info,.progress-card,.troop-card,.community-panel,.report,.help-card,.battle-card,.account-card,.painted-fleet-row,.island-detail) :is(small,.eyebrow,.duration,.level,.building-effect,.rule-note,.training-estimate){color:#59432e;text-shadow:none}
body[data-ui-theme] #workspace .card-info{background:transparent}
body[data-ui-theme] #workspace .card-info h3,body[data-ui-theme] #workspace .progress-card h3,body[data-ui-theme] #workspace .troop-card h3{font-size:23px;line-height:1.3}
body[data-ui-theme] #workspace .progress-card p,body[data-ui-theme] #workspace .troop-card p{font-size:15px;line-height:1.6}
body[data-ui-theme] .costs{font:700 14px/1.5 var(--font-body);color:#2d2117}
body[data-ui-theme] .costs img{width:25px;height:25px;opacity:1;filter:none;mask:none;-webkit-mask:none}
body[data-ui-theme] .costs .missing{color:#9a251b}
body[data-ui-theme] #workspace .costs,body[data-ui-theme] #workspace .ship-strength{color:#2d2117}
body[data-ui-theme] #workspace .content-intro>p,body[data-ui-theme] #workspace .content-intro>h3,body[data-ui-theme] #workspace .trade-introduction{color:#fff3d7;font-size:16px}
body[data-ui-theme] #workspace .text-button{color:#ffe0a2;font-size:15px;min-height:40px}
body[data-ui-theme] #workspace :is(.construction-card,.construction-queue,.card-info,.progress-card,.troop-card,.community-panel,.report,.help-card,.battle-card,.account-card,.painted-fleet-row,.island-detail) .text-button{color:#593612;text-decoration:underline;text-underline-offset:3px}
body[data-ui-theme] #workspace .prerequisite-link{font-size:14px}
/* Carved commands with brass-edged primary actions. */
body[data-ui-theme] :is(#workspace,#sidebar,#modal) :is(button,a.button):not(:where(.nav-item,.text-button,.captain-button,.resource,.header-ship,.header-army,.workplace,.avatar-choice,.account-seal,.password-toggle,.link-button)){--surface-base:#372214;--surface-ink:#fff3d7;border:2px solid #725029;border-image:url('/art/interface/carved-plank.svg') 10 / 9px / 0 stretch;border-radius:0;background:linear-gradient(#372214ed,#372214ed),var(--timber) center/350px;color:#fff3d7;box-shadow:0 2px 3px #11090466;text-shadow:0 1px #130903;font-weight:700;min-height:44px;padding:9px 16px}
body[data-ui-theme] :is(#workspace,#sidebar,#modal) :is(.primary,.button-gold){border-image:url('/art/interface/brass-plank.svg') 10 / 9px / 0 stretch;background:linear-gradient(#372214ed,#372214ed),var(--timber) center/350px;color:#fff8e7}
body[data-ui-theme] :is(#workspace,#sidebar,#modal) button:disabled{color:#e5d6bd;background-color:#594832;text-shadow:none}
body[data-ui-theme] :is(#workspace,#modal) :is(input,select,textarea){--surface-base:#fff5df;--surface-ink:#2d2117;background:#fff5df;border:1px solid #9b713b;border-image:none;box-shadow:inset 0 2px 3px #8d68201c;border-radius:0;color:#2d2117;font-size:16px;min-height:44px;text-shadow:none}
body[data-ui-theme] :is(#workspace,#modal) :is(input,textarea)::placeholder{color:#68513a;opacity:1}
/* Buildings and the build plan share one island workspace. */
body[data-ui-theme] .island-workplaces{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 18px}
body[data-ui-theme] #workspace .workplace{display:flex;align-items:center;gap:12px;padding:10px 14px;min-width:0;min-height:88px;text-align:left;color:#fff3d7;background:#102631;border:1px solid #bb955b;border-radius:0;box-shadow:inset 0 0 0 2px #061820,0 3px 6px #04131b66;text-shadow:none}
body[data-ui-theme] .workplace .workplace-art{width:54px;height:54px}
body[data-ui-theme] .workplace-copy{display:flex;flex:1;flex-direction:column;min-width:0;gap:3px}
body[data-ui-theme] .workplace-title{font:700 16px/1.4 var(--font-body);color:#fff3d7}
body[data-ui-theme] .workplace-copy>strong{font-size:14px;font-weight:400;color:#fff3d7}
body[data-ui-theme] .workplace-copy>small{font-size:13px;color:#e5d5b7}
body[data-ui-theme] .workplace-arrow{color:#ffe0a2;font-size:22px}
body[data-ui-theme] .island-management{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;align-items:start}
body[data-ui-theme] .island-buildings{min-width:0}
body[data-ui-theme] .building-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:4px}
body[data-ui-theme] .building-section-heading h3{font-size:25px;margin:0;color:#fff3d7}
body[data-ui-theme] .island-buildings h4{font-size:13px;font-weight:700;color:#e5d5b7;letter-spacing:.04em;text-transform:uppercase;margin:14px 0 10px}
body[data-ui-theme] .construction-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body[data-ui-theme] .construction-card{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px 13px;padding:14px;min-width:0;scroll-margin-top:180px}
body[data-ui-theme] .construction-art{display:block;width:64px;height:64px;flex-shrink:0;background-image:url('/art/buildings.webp');background-size:300% 300%;background-position:var(--x) var(--y);object-fit:cover;border:2px solid #9b7035;box-shadow:0 2px 3px #58371944}
body[data-ui-theme] .construction-title{min-width:0;align-self:center}
body[data-ui-theme] .construction-title h3{font-size:17px;margin:0 0 4px;overflow-wrap:anywhere}
body[data-ui-theme] .construction-title>span{font-size:13px;color:#59432e}
body[data-ui-theme] .planned-level{display:block;color:#614318;font-weight:700}
body[data-ui-theme] .construction-card .building-effect{grid-column:1/-1;font-size:14px;line-height:1.5;margin:2px 0}
body[data-ui-theme] .construction-card .costs{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:12px;margin:0;font-size:14px}
body[data-ui-theme] .construction-card .costs span{display:inline-flex;align-items:center;gap:4px}
body[data-ui-theme] .construction-action{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:2px}
body[data-ui-theme] .construction-action .duration{font-size:13px;margin:0;white-space:normal}
body[data-ui-theme] #workspace .construction-action button{min-height:44px;padding:9px 12px;font-size:13px;line-height:1.4;margin:0;white-space:normal;flex-shrink:0}
body[data-ui-theme] .construction-queue{position:sticky;top:180px;padding:16px;min-width:0;scroll-margin-top:180px;border-top:4px solid #a47c3d!important}
body[data-ui-theme] .construction-queue>header{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;border-bottom:1px solid #b79b68;padding-bottom:12px;margin-bottom:14px}
body[data-ui-theme] .construction-queue h3{display:flex;gap:9px;align-items:center;font-size:19px;margin:0}
body[data-ui-theme] .queue-heading-art{width:34px;height:34px}
body[data-ui-theme] .construction-state{font-size:12px;color:#59432e;font-weight:700}
body[data-ui-theme] .construction-state.paused{color:#8d2b1c}
body[data-ui-theme] .active-construction{display:grid;grid-template-columns:48px minmax(0,1fr);gap:10px;padding-bottom:16px}
body[data-ui-theme] .active-construction .construction-art{width:48px;height:52px}
body[data-ui-theme] .active-construction small{display:block;font-size:11px;letter-spacing:.01em;margin-bottom:4px}
body[data-ui-theme] .active-construction strong{display:block;font-size:14px;line-height:1.5}
body[data-ui-theme] .active-construction span:not(.construction-art){display:block;font-size:12px;line-height:1.6;margin-top:4px;color:#59432e}
body[data-ui-theme] .active-construction progress{grid-column:1/-1;height:7px;width:100%;accent-color:#73501d;border:0;background:#c4aa75}
body[data-ui-theme] .active-construction progress::-webkit-progress-bar{background:#c4aa75}
body[data-ui-theme] .active-construction progress::-webkit-progress-value{background:#73501d}
body[data-ui-theme] .active-construction progress::-moz-progress-bar{background:#73501d}
body[data-ui-theme] .queue-subhead{display:flex;justify-content:space-between;font-size:14px;border-top:1px solid #b79b68;padding-top:10px}
body[data-ui-theme] .queue-empty,body[data-ui-theme] .queue-payment{font-size:13px;color:#59432e;line-height:1.65;margin:0 0 12px}
body[data-ui-theme] .queue-hint{margin-top:8px}
body[data-ui-theme] .construction-orders{list-style:none;margin:0;padding:0}
body[data-ui-theme] .construction-orders>li{display:flex;gap:8px;padding:14px 0 10px;border-bottom:1px solid #b79b68}
body[data-ui-theme] .order-number{font-size:13px;width:16px;flex-shrink:0;color:#59432e}
body[data-ui-theme] .order-copy{min-width:0;flex:1}
body[data-ui-theme] .order-copy>strong{display:block;font-size:14px;line-height:1.5}
body[data-ui-theme] .order-copy>strong>span{white-space:nowrap;font-weight:400}
body[data-ui-theme] .order-copy>small{display:block;font-size:12px;line-height:1.6;margin-top:4px}
body[data-ui-theme] .order-copy .costs{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;margin:7px 0}
body[data-ui-theme] .order-copy .costs img{width:22px;height:22px}
body[data-ui-theme] .order-controls{display:flex;justify-content:flex-end;gap:6px}
body[data-ui-theme] #workspace .order-controls .text-button{min-width:40px;min-height:40px;padding:6px;border:1px solid #a07b44;text-decoration:none;font-size:13px;margin:0;color:#4d3117}
body[data-ui-theme] #workspace .order-controls .text-button:nth-child(-n+2){font-size:20px}
body[data-ui-theme] .queue-payment{margin:12px 0 0}
body[data-ui-theme] .queue-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
body[data-ui-theme] #workspace .queue-controls button{font-size:12px;padding:8px 10px;margin:0;min-height:42px}
/* Dark nested panels explicitly override the surrounding light record. */
body[data-ui-theme] #workspace :is(.fleet-overview-card,.captain-standing,.queue,.crew-contract-header,.crew-banner,.community-controls,.brotherhood-rules,.battle-forces section,.battle-roster>div,.account-recovery,.account-help){--surface-base:#102631;--surface-ink:#fff3d7;color:#fff3d7;background:#102631;border-color:#b59254;box-shadow:inset 0 0 0 1px #071820}
body[data-ui-theme] #workspace :is(.fleet-overview-card,.captain-standing,.queue,.crew-contract-header,.crew-banner,.community-controls,.brotherhood-rules,.battle-forces section,.battle-roster>div,.account-recovery,.account-help) :is(h2,h3,h4,p,label,strong,b,small,.eyebrow,.account-eyebrow,.account-intro,.account-help-note,.rule-note){color:#fff3d7;text-shadow:none}
body[data-ui-theme] #workspace .captain-standing :is(.standing-identity small,.standing-identity p,.standing-position small,.standing-score small){color:#e5d5b7}
body[data-ui-theme] #workspace .account-stat-strip>div{min-width:0;background:#f4e7cc;border:1px solid #ab8249;color:#2d2117;padding:16px 13px;gap:10px}
body[data-ui-theme] #workspace .account-stat-strip :is(strong,small,.account-stat-icon){color:#2d2117}
body[data-ui-theme] .account-stat-strip>div>div{min-width:0;overflow-wrap:anywhere}
body[data-ui-theme] .account-stat-strip strong{font-size:23px}
body[data-ui-theme] .account-profile:before{background:linear-gradient(90deg,#09212cf5,#09212cd6 55%,#09212c55)}
body[data-ui-theme] #workspace .account-profile :is(h2,p,small,.account-eyebrow){color:#fff3d7}
body[data-ui-theme] #workspace .account-form label{color:inherit;font-size:15px}
body[data-ui-theme] #workspace .account-email-summary{background:#e8d6af;color:#2d2117;border-color:#a8834f}
body[data-ui-theme] #workspace .account-email-summary :is(p,span,strong,small){color:#2d2117}
body[data-ui-theme] #workspace .account-email-status{background:#e2c791;color:#432b14;border-color:#96703a}
body[data-ui-theme] #workspace .account-current-tag{background:#102631;color:#fff3d7}
body[data-ui-theme] #workspace .account-recovery-note{background:#f4e7cc;color:#2d2117}
body[data-ui-theme] #workspace .account-recovery-note :is(p,strong,small){color:#2d2117}
body[data-ui-theme] #workspace .account-help a{color:#ffe0a2}
body[data-ui-theme] #workspace .form-error{color:#9a251a}
body[data-ui-theme] #workspace .account-recovery .form-error{color:#ffd2bb}
body[data-ui-theme] #workspace .route-panel :is(.route-port>span,.route-manifest-cargo>small,.route-progress-summary,.route-next-departure,.route-status-message){color:#59432e}
body[data-ui-theme] #workspace .route-panel .route-port strong{color:#2d2117}
body[data-ui-theme] #workspace .ranking-crew{color:#59432e}
body[data-ui-theme] #workspace .painted-ranking-table :is(td,.ranking-captain,.ranking-score-value,.rank-number){color:#2d2117}
body[data-ui-theme] #workspace .painted-ranking-table thead{background:#102631;color:#fff3d7}
body[data-ui-theme] #workspace .painted-ranking-table th{color:#fff3d7}
body[data-ui-theme] #workspace .member-row,body[data-ui-theme] #workspace .crew-create,body[data-ui-theme] #workspace .brotherhood-card{background:linear-gradient(#f4e7ccef,#f4e7ccef),var(--paper) center/600px;color:#2d2117}
body[data-ui-theme] #workspace .member-row :is(b,small),body[data-ui-theme] #workspace .brotherhood-card :is(h3,p,small){color:#2d2117}
body[data-ui-theme] #workspace .crew-member-actions .text-button{color:#593612}
body[data-ui-theme] #workspace .tavern-page{background:linear-gradient(#291b12de,#291b12de),var(--timber) center/650px;color:#fff3d7}
body[data-ui-theme] #workspace .chat-messages{background:#e6d2a9;border-color:#a88044}
body[data-ui-theme] #workspace .chat-message{background:#f4e7cc;color:#2d2117;border-color:#ac8449}
body[data-ui-theme] #workspace .chat-message :is(p,strong,small,span,time){color:#2d2117}
body[data-ui-theme] #workspace .chat-message .text-button{color:#593612}
body[data-ui-theme] #workspace .chat-compose{background:transparent;color:#fff3d7}
body[data-ui-theme] #workspace .chat-compose label{color:#fff3d7}
body[data-ui-theme] #workspace .fleet-painting>span{display:block;font-size:12px;max-width:100%;white-space:normal;line-height:1.4;padding:5px 3px;background:#102631;color:#fff3d7}
body[data-ui-theme] #workspace .fleet-painting .fleet-unknown-flag{display:grid;background:#102631;color:#fff3d7}
body[data-ui-theme] #workspace .fleet-order h3{font-size:24px;color:#2d2117}
body[data-ui-theme] #workspace .fleet-route-port{color:#2d2117}
body[data-ui-theme] #workspace .fleet-time :is(strong,small){color:#59432e}
body[data-ui-theme] #workspace .detail-body :is(p,small,strong,.detail-line,.captain-stamp){color:#2d2117}
body[data-ui-theme] #workspace .detail-body .coordinate{color:#59432e;font-size:12px}
body[data-ui-theme] #workspace .detail-body .protection{color:#275033}
body[data-ui-theme] #workspace .battle-card .battle-meta{color:#59432e}
body[data-ui-theme] #workspace .battle-playback :is(label,small,p,strong){color:#fff3d7}
body[data-ui-theme] #workspace .battle-card .battle-playback>small{color:#fff3d7}
body[data-ui-theme] #workspace .battle-card .battle-forces section :is(strong,small,p,span){color:#fff3d7}
body[data-ui-theme] #workspace .report p,body[data-ui-theme] #workspace .help-card p{color:#2d2117;font-size:16px;line-height:1.7}
/* Illustrated captain menu and high-contrast mission dialogs. */
body[data-ui-theme] .player-menu{background:linear-gradient(#291b12e8,#291b12e8),var(--timber) center/500px;color:#fff3d7;border:3px solid #986e35;box-shadow:0 0 0 1px #ddb96f,0 12px 28px #00111cbb}
body[data-ui-theme] .player-menu-header :is(strong,small){color:#fff3d7}
body[data-ui-theme] #workspace .player-menu .player-menu-action{display:flex;gap:13px;align-items:center;min-height:54px;color:#fff3d7;background:#21160f;border:1px solid #c19d6255;border-image:none;box-shadow:none;text-shadow:none;font-size:15px;padding:7px 10px;text-align:left}
body[data-ui-theme] .player-menu-art{width:39px;height:39px}
body[data-ui-theme] #modal{border:4px solid #7d552c;box-shadow:0 0 0 1px #dbb96d,0 20px 70px #0009;background:#102631;color:#fff3d7}
body[data-ui-theme] #modal .modal-inner{background:linear-gradient(#102631f2,#102631f2),url('/art/harbor.webp') center/cover;color:#fff3d7;padding:28px}
body[data-ui-theme] #modal :is(h2,h3,p,label,.rule-note,.eyebrow,.mission-estimate,.mission-estimate strong,.voyage-destination strong,.voyage-destination span){color:#fff3d7}
body[data-ui-theme] #modal .form-error{color:#ffd2bb}
body[data-ui-theme] #modal .voyage-ships>div{background:#f4e7cc;border-color:#a98046;color:#2d2117}
body[data-ui-theme] #modal .voyage-ships>div :is(label,strong,small,span){color:#2d2117}
body[data-ui-theme] #modal .voyage-destination,body[data-ui-theme] #modal .mission-estimate{background:#071b25;color:#fff3d7}
body[data-ui-theme] #modal .avatar-choice{background:#f4e7cc;color:#2d2117;border-color:#b18c51}
body[data-ui-theme] #modal .avatar-choice>span{color:#2d2117}
body[data-ui-theme] #modal .avatar-choice.selected{border-color:#ffe2a0;box-shadow:0 0 0 3px #d6a247}
body[data-ui-theme] #modal #avatar-preview :is(strong,small){color:#fff3d7}
body[data-ui-theme] #workspace .map-toolbar .segmented button.active{background:#704e24;color:#fff3d7}
body[data-ui-theme] .map-legend{color:#fff3d7}
body[data-ui-theme] .map-region{color:#fff3d7;text-shadow:0 2px 4px #06222c;opacity:.85}
body[data-ui-theme] .sidebar-backdrop{background:#00151dc9}
body[data-ui-theme] #workspace #mobile-menu,body[data-ui-theme] #workspace #inventory-toggle,body[data-ui-theme] #sidebar #sidebar-close{background:linear-gradient(#372214ed,#372214ed),var(--timber) center/350px;border:2px solid #725029;border-image:url('/art/interface/carved-plank.svg') 10 / 9px / 0 stretch;color:#fff3d7;box-shadow:0 2px 3px #11090466}
@media(min-width:951px) and (max-width:1300px){
 body[data-ui-theme] .shell{grid-template-columns:244px minmax(0,1fr)}
 body[data-ui-theme] #sidebar:after{left:235px}
 body[data-ui-theme] #workspace{padding-left:18px;padding-right:18px}
 body[data-ui-theme] #workspace .topbar{margin-left:-18px;margin-right:-18px;padding-left:18px;padding-right:18px}
 body[data-ui-theme] .topbar .island-command-strip{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:8px}
 body[data-ui-theme] #workspace #harbor-summary{width:280px}
 body[data-ui-theme] #workspace #header-status{grid-column:1/-1;max-width:none;min-height:28px;display:flex;padding:3px 9px;justify-content:flex-start}
 body[data-ui-theme] #header-status>div{display:flex;gap:12px;align-items:center}
 body[data-ui-theme] .topbar .resource .rate{display:none}
 body[data-ui-theme] #workspace .topbar .resource{gap:5px;padding:8px 6px;flex-direction:column}
 body[data-ui-theme] #workspace .topbar .resource-icon{width:34px;height:32px;flex-basis:32px}
 body[data-ui-theme] #workspace .topbar .resource small{margin:0}
 body[data-ui-theme] .resource-copy{text-align:center}
 body[data-ui-theme] .island-management{grid-template-columns:minmax(0,1fr) 280px;gap:16px}
 body[data-ui-theme] .construction-grid{grid-template-columns:1fr}
 body[data-ui-theme] .workplace .workplace-art{width:42px;height:42px}
 body[data-ui-theme] #workspace .workplace{gap:7px;padding:10px 8px}
 body[data-ui-theme] .workplace-copy>small{display:none}
}
@media(max-width:950px){
 body[data-ui-theme]{font-size:16px}
 body[data-ui-theme] .shell{display:block}
 body[data-ui-theme] #workspace{padding:0 14px calc(110px + env(safe-area-inset-bottom))}
 body[data-ui-theme] #workspace .topbar{position:relative;margin:0 -14px;padding:calc(80px + env(safe-area-inset-top)) 14px 12px}
 body[data-ui-theme] .topbar .helm{position:fixed;inset:0 0 auto;display:grid;grid-template-columns:48px minmax(0,1fr) 52px;gap:10px;height:calc(76px + env(safe-area-inset-top));padding:calc(8px + env(safe-area-inset-top)) 12px 8px;background:linear-gradient(#291b12eb,#291b12eb),var(--timber) center/500px;border-bottom:2px solid #b38b4c;box-shadow:0 4px 12px #00101b66}
 body[data-ui-theme] #workspace #mobile-menu{width:48px;height:48px;padding:4px;min-height:48px}
 body[data-ui-theme] #mobile-menu .painted-icon{width:36px;height:36px}
 body[data-ui-theme] .topbar .current-island{width:100%;max-width:none;display:block!important}
 body[data-ui-theme] .topbar .current-island>span{display:none!important}
 body[data-ui-theme] .topbar .current-island small{font-size:12px;line-height:1.3}
 body[data-ui-theme] .topbar .header-harbor-caption{display:none}
 body[data-ui-theme] #workspace .topbar #active-island{font-size:19px;min-height:38px;max-width:none;line-height:1.4}
 body[data-ui-theme] .topbar #account{margin:0;width:52px;justify-content:center}
 body[data-ui-theme] .topbar .captain-portrait{width:48px;height:48px}
 body[data-ui-theme] .topbar .captain-label{display:none}
 body[data-ui-theme] .topbar .captain-button{min-width:48px;min-height:48px}
 body[data-ui-theme] .topbar .island-command-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:0}
 body[data-ui-theme] .topbar .resources{grid-column:1/-1;width:100%;gap:6px;padding:0}
 body[data-ui-theme] #workspace .topbar .resource{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:0;min-height:80px;padding:8px 7px 9px;overflow:visible}
 body[data-ui-theme] #workspace .topbar .resource-icon{position:absolute;right:5px;top:4px;width:32px;height:32px}
 body[data-ui-theme] .topbar .resource-copy{display:flex;flex-direction:column-reverse;width:100%;text-align:left}
 body[data-ui-theme] #workspace .topbar .resource small{display:block;min-height:23px;margin:0 0 8px}
 body[data-ui-theme] #workspace #resources .resource-label{font-size:13px;line-height:20px}
 body[data-ui-theme] #workspace .topbar .resource strong{font-size:20px;line-height:25px;letter-spacing:-.04em}
 body[data-ui-theme] #workspace .topbar .resource .rate{display:none}
 body[data-ui-theme] #workspace .topbar #inventory-toggle{display:grid;grid-column:1/-1;grid-template-columns:minmax(0,1fr) 22px;min-height:46px;font-size:14px;padding:8px 12px;margin:0}
 body[data-ui-theme] #workspace #mobile-harbor-total{font-size:14px;color:#fff3d7}
 body[data-ui-theme] #workspace #harbor-summary{grid-column:1/-1;width:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px;flex:none}
 body[data-ui-theme] .topbar:not(.inventory-open) #harbor-summary,body[data-ui-theme] .topbar:not(.inventory-open) #header-status{display:none!important}
 body[data-ui-theme] #workspace .header-ship{min-height:86px;gap:5px}
 body[data-ui-theme] .topbar .ship-miniature{width:35px;height:35px}
 body[data-ui-theme] .topbar .ship-label{max-width:none;white-space:normal;font-size:12px;line-height:1.5}
 body[data-ui-theme] .topbar .header-ship strong{font-size:20px}
 body[data-ui-theme] .topbar .header-ship-copy{gap:4px}
 body[data-ui-theme] #workspace .header-army{grid-column:1/-1;min-height:48px;flex-direction:row;justify-content:space-between;padding:8px}
 body[data-ui-theme] .topbar .garrison-label{font-size:14px}
 body[data-ui-theme] #workspace #header-status{grid-column:1/-1;max-width:none;min-height:44px;font-size:14px}
 body[data-ui-theme] #header-status :is(strong,small){font-size:14px}
 body[data-ui-theme] .content-page{padding-top:16px}
 body[data-ui-theme] #workspace .page-heading{padding:20px 0 16px}
 body[data-ui-theme] .page-heading h1{font-size:27px}
 body[data-ui-theme] #workspace .scene-banner{min-height:135px;padding:18px;background-image:linear-gradient(90deg,#09212cf5,#09212ce3 65%,#09212c66),var(--scene)}
 body[data-ui-theme] #workspace .scene-banner h3{font-size:25px;max-width:100%}
 body[data-ui-theme] #workspace .scene-banner p{font-size:15px;max-width:100%}
 body[data-ui-theme] #workspace .scene-banner>span{font-size:11px}
 body[data-ui-theme] .island-overview-title{min-height:150px;padding:16px;align-items:flex-start;flex-direction:column;background:linear-gradient(90deg,#09212ce8,#09212c80 70%,#09212c33),url('/art/harbor.webp') center/cover}
 body[data-ui-theme] .island-overview-title h2{font-size:26px;line-height:1.4}
 body[data-ui-theme] #workspace .island-overview-title .text-button{min-height:40px;padding:6px 10px;font-size:13px;align-self:flex-end}
 body[data-ui-theme] #workspace #activity-bar.harbor-briefing{padding:12px;margin-top:12px}
 body[data-ui-theme] .briefing-main{grid-template-columns:36px minmax(0,1fr);gap:10px}
 body[data-ui-theme] #workspace .briefing-emblem{width:36px;flex-basis:36px}
 body[data-ui-theme] .briefing-emblem .painted-icon{width:36px;height:36px}
 body[data-ui-theme] #workspace .briefing-copy>strong{font-size:16px}
 body[data-ui-theme] #workspace .briefing-copy>span{font-size:14px}
 body[data-ui-theme] #workspace .briefing-main>button{font-size:14px;min-height:48px;padding:10px 12px}
 body[data-ui-theme] #workspace .briefing-links{padding:0;gap:0 10px}
 body[data-ui-theme] #workspace .briefing-links .text-button{font-size:13px;min-height:44px}
 body[data-ui-theme] .island-workplaces{gap:6px;margin-bottom:16px}
 body[data-ui-theme] #workspace .workplace{min-height:126px;flex-direction:column;align-items:flex-start;gap:6px;padding:10px 8px}
 body[data-ui-theme] .workplace .workplace-art{width:42px;height:42px;align-self:center}
 body[data-ui-theme] .workplace-title{font-size:14px}
 body[data-ui-theme] .workplace-copy{width:100%;gap:4px}
 body[data-ui-theme] .workplace-copy>strong{font-size:12px;line-height:1.6}
 body[data-ui-theme] .workplace-copy>small{display:none}
 body[data-ui-theme] .workplace-arrow{display:none}
 body[data-ui-theme] .island-management{display:flex;flex-direction:column;gap:22px}
 body[data-ui-theme] .island-buildings{width:100%;order:2}
 body[data-ui-theme] .construction-queue{position:static;width:100%;order:1;padding:16px;scroll-margin-top:90px}
 body[data-ui-theme] .construction-queue h3{font-size:19px}
 body[data-ui-theme] .construction-state{font-size:13px}
 body[data-ui-theme] .active-construction strong{font-size:16px}
 body[data-ui-theme] .active-construction small,body[data-ui-theme] .active-construction span:not(.construction-art){font-size:14px}
 body[data-ui-theme] .queue-empty,body[data-ui-theme] .queue-payment{font-size:14px;line-height:1.7}
 body[data-ui-theme] .queue-subhead{font-size:15px}
 body[data-ui-theme] .order-copy>strong{font-size:16px}
 body[data-ui-theme] .order-copy>small,body[data-ui-theme] .order-copy .costs{font-size:14px}
 body[data-ui-theme] #workspace .order-controls .text-button{min-height:48px;min-width:48px;font-size:14px}
 body[data-ui-theme] #workspace .queue-controls button{font-size:14px;min-height:48px;padding:10px 12px}
 body[data-ui-theme] .construction-grid{grid-template-columns:1fr}
 body[data-ui-theme] .construction-card{padding:16px;grid-template-columns:64px minmax(0,1fr);gap:10px 14px;scroll-margin-top:90px}
 body[data-ui-theme] .construction-title h3{font-size:18px}
 body[data-ui-theme] .construction-title>span{font-size:14px}
 body[data-ui-theme] .construction-card .building-effect{font-size:16px;line-height:1.6}
 body[data-ui-theme] .construction-card .costs{font-size:15px;gap:14px}
 body[data-ui-theme] .construction-card .costs img{width:26px;height:26px}
 body[data-ui-theme] .construction-action .duration{font-size:14px}
 body[data-ui-theme] #workspace .construction-action button{min-height:48px;font-size:14px;padding:10px 12px}
 body[data-ui-theme] .building-section-heading h3{font-size:25px}
 body[data-ui-theme] #workspace .building-section-heading .text-button{font-size:14px}
 body[data-ui-theme] #workspace .account-stat-strip>div{padding:12px;min-width:0}
 body[data-ui-theme] #modal .modal-inner{padding:22px 16px}
 body[data-ui-theme] .player-menu{width:calc(100vw - 24px);max-width:390px}
 body[data-ui-theme] #workspace .player-menu .player-menu-action{font-size:16px;min-height:58px}
 body[data-ui-theme] #sidebar{width:min(390px,calc(100vw - 18px));max-width:calc(100vw - 18px);padding:16px 14px calc(24px + env(safe-area-inset-bottom));border-right:4px solid #a0783e;box-shadow:16px 0 50px #0008}
 body[data-ui-theme] #sidebar:after{display:none}
 body[data-ui-theme] #sidebar .brand{padding-top:20px;min-height:100px;gap:12px}
 body[data-ui-theme] #sidebar .brand .brand-crest{width:70px;height:76px}
 body[data-ui-theme] #sidebar .brand>span{font-size:23px}
 body[data-ui-theme] #sidebar .brand small{font-size:11px}
 body[data-ui-theme] #sidebar #sidebar-close{top:8px;right:8px;width:44px;height:44px;padding:2px;font-size:28px;min-height:44px}
 body[data-ui-theme] #sidebar #navigation{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 body[data-ui-theme] #sidebar #navigation .nav-group-label{grid-column:1/-1;font-size:12px;margin:16px 2px 2px}
 body[data-ui-theme] #sidebar #navigation .nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:96px;padding:8px 4px;gap:3px;position:relative;font-size:14px;text-align:center}
 body[data-ui-theme] #sidebar #navigation .nav-item .painted-icon{width:48px;height:48px}
 body[data-ui-theme] #sidebar #navigation .nav-item.active:after{display:none}
 body[data-ui-theme] #sidebar #navigation .nav-item .badge{position:absolute!important;top:5px;right:5px;margin:0;font-size:12px}
 body[data-ui-theme] #sidebar .my-islands button{min-height:64px;font-size:15px}
 body[data-ui-theme] #sidebar .my-islands small{font-size:12px}
 body[data-ui-theme] #mobile-dock{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:linear-gradient(#291b12f2,#291b12f2),var(--timber) center/550px;border:0;border-top:2px solid #c4a164;box-shadow:0 -5px 16px #00121c77;padding-top:3px}
 body[data-ui-theme] #mobile-dock:before,body[data-ui-theme] #mobile-dock:after{display:none}
 body[data-ui-theme] #mobile-dock button{display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;gap:1px;padding:3px 1px;min-height:72px;background:none;border:0;box-shadow:none;color:#fff3d7;font:13px/1.25 var(--font-body)!important;text-shadow:0 1px #130903}
 body[data-ui-theme] #mobile-dock .painted-icon{width:38px;height:38px}
 body[data-ui-theme] #mobile-dock button.active{background:#edc27718;color:#fff3d7;border-top:2px solid #f6d993;box-shadow:none}
 body[data-ui-theme] #mobile-dock .dock-order-count{position:absolute;top:0;right:7px;min-width:20px;font:700 12px/20px var(--font-body);background:#f1d390;color:#35200f;border:1px solid #fff0bc;border-radius:50%;padding:0 2px}
 body[data-ui-theme] #mobile-dock .dock-alert{top:0;right:4px;color:#fff3d7;background:#8f2c20}
}
@media(min-width:640px) and (max-width:950px){body[data-ui-theme] .construction-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-ui-theme] #workspace .workplace{flex-direction:row;min-height:90px;align-items:center;padding:12px;gap:12px}body[data-ui-theme] .workplace-title{font-size:16px}body[data-ui-theme] .workplace-copy>strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){body[data-ui-theme] *{scroll-behavior:auto!important;transition:none!important}}

/* Explicit local surfaces for labels that previously inherited unrelated palettes. */
body[data-ui-theme] #workspace .island-overview-title .text-button{background:linear-gradient(#372214ed,#372214ed),var(--timber) center/350px!important;border:2px solid #9e763e!important;border-image:url('/art/interface/carved-plank.svg') 10 / 9px / 0 stretch!important;box-shadow:0 2px 4px #00101980!important;color:#fff3d7!important}
body[data-ui-theme] #workspace .battle-card>header>span,body[data-ui-theme] #workspace .battle-card .battle-round,body[data-ui-theme] #workspace .battle-card .battle-history summary{color:#2d2117}
body[data-ui-theme] #workspace .battle-card .battle-round span{color:#2d2117}
body[data-ui-theme] #workspace .ranking-rank,body[data-ui-theme] #workspace .ranking-you{color:#2d2117}
body[data-ui-theme] #workspace .account-card .account-eyebrow{color:#59432e}
body[data-ui-theme] #workspace .account-card.account-recovery,body[data-ui-theme] #workspace .account-card.account-help{background:#102631;color:#fff3d7}
body[data-ui-theme] #workspace .account-card.account-recovery :is(h3,.account-eyebrow),body[data-ui-theme] #workspace .account-card.account-help :is(h3,.account-eyebrow){color:#fff3d7}
@media(max-width:950px){body[data-ui-theme] .topbar .ship-label{font-size:14px}body[data-ui-theme] .workplace-copy>strong{font-size:14px}}

body[data-ui-theme] :is(#workspace,#sidebar,#modal) :is(button,a).primary{border-image:url('/art/interface/brass-plank.svg') 10 / 9px / 0 stretch;background:linear-gradient(#372214ed,#372214ed),var(--timber) center/350px;color:#fff8e7}

/* Keep the destination and action readable before the first phone scroll. */
body[data-ui-theme] .island-title-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body[data-ui-theme] #workspace #harbor-summary{flex-basis:355px}
body[data-ui-theme] .topbar .ship-label{max-width:none;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:normal;font-size:12px;line-height:1.4}
body[data-ui-theme] #workspace .fleet-painting>.fleet-mission-ribbon{display:none}
body[data-ui-theme] #workspace .painted-ranking-table th{background:#102631}
body[data-ui-theme] #workspace .painted-ranking-table tr.me{background:#ba914421}
body[data-ui-theme] #workspace .painted-ranking-table button{color:#3c2816;background:#ead8b2!important;border:1px solid #9c733e!important;min-width:44px;min-height:44px;box-shadow:none!important;border-image:none;padding:6px!important}
@media(max-width:950px){
 body[data-ui-theme] #workspace .topbar #active-island{min-height:44px}
 body[data-ui-theme] #workspace #resources .resource-label{font-size:14px}
 body[data-ui-theme] #world-population{font-size:14px}
 body[data-ui-theme] #workspace .island-overview-title .text-button{font-size:14px;min-height:44px}
 body[data-ui-theme] #workspace .building-section-heading .text-button{min-height:48px}
 body[data-ui-theme] #workspace .scene-banner p,body[data-ui-theme] #workspace .progress-card p,body[data-ui-theme] #workspace .troop-card p{font-size:16px}
 body[data-ui-theme] #workspace .account-form label{font-size:16px}
 body[data-ui-theme] #mobile-dock button{font-size:14px!important}
 body[data-ui-theme] #sidebar #navigation .nav-item{flex-direction:column!important;justify-content:center!important;font-size:16px;min-height:90px;gap:2px;padding:6px 3px}
 body[data-ui-theme] #sidebar #navigation .nav-item .painted-icon{width:42px;height:42px}
 body[data-ui-theme] #sidebar #navigation .nav-label{font-size:16px!important}
 body[data-ui-theme] #sidebar #navigation .nav-group-label{margin-top:12px}
 body[data-ui-theme] #sidebar .brand{min-height:82px;padding-bottom:10px}
 body[data-ui-theme] #workspace .workplace{min-height:108px;gap:4px}
 body[data-ui-theme] .workplace .workplace-art{width:36px;height:36px}
 body[data-ui-theme] #workspace .briefing-links{flex-wrap:nowrap;gap:6px}
 body[data-ui-theme] #workspace .briefing-links .text-button{font-size:14px;line-height:1.4;min-width:0;padding:4px 0}
 body[data-ui-theme] #workspace .briefing-links .painted-icon{width:22px;height:22px}
 body[data-ui-theme] #workspace .painted-ranking-table tr{min-height:112px;padding:12px;grid-template-columns:34px minmax(0,1fr) 64px;gap:6px}
 body[data-ui-theme] #workspace .painted-ranking-table td{min-height:0}
 body[data-ui-theme] #workspace .painted-ranking-table td:last-child{position:static;grid-column:3;grid-row:2;justify-self:end;align-self:center}
}

/* Icon-only controls keep a real centre; command padding must not move the art. */
body[data-ui-theme] #workspace .map-toolbar button,
body[data-ui-theme] #workspace .map-controls button,
body[data-ui-theme] #modal .modal-top>[data-close]{display:grid;place-items:center;flex:0 0 auto;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;line-height:1}
body[data-ui-theme] #workspace .map-toolbar button>span,
body[data-ui-theme] #workspace .map-controls button>span{display:grid;place-items:center;width:24px;height:24px;line-height:0}
body[data-ui-theme] #workspace .map-toolbar button svg,
body[data-ui-theme] #workspace .map-controls button svg{display:block;width:22px;height:22px;margin:0;vertical-align:initial}
body[data-ui-theme] #workspace .map-controls button{font-size:25px}
body[data-ui-theme] .map-compass{display:grid;grid-template-rows:18px 56px 18px;justify-items:center;align-items:center;width:72px;height:92px;line-height:1}
body[data-ui-theme] .map-compass>span,
body[data-ui-theme] .map-compass>small{position:static;margin:0;inset:auto;font:12px/1 var(--font-body);color:#fff3d7}
body[data-ui-theme] .map-compass .compass-rose{display:block;width:56px;height:56px;line-height:0}
body[data-ui-theme] .map-compass .compass-rose svg{display:block;width:56px;height:56px}

/* Four supplies retain room for a full count; the resource icon never covers it. */
body[data-ui-theme] .topbar .resources{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-ui-theme] #workspace .topbar .resource-icon{display:grid!important;place-items:center;align-self:center}
body[data-ui-theme] #workspace .topbar .resource-icon img{display:block;width:100%;height:100%;object-fit:contain;opacity:1;filter:none;margin:0}
body[data-ui-theme] #modal .stock-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body[data-ui-theme] #modal .stock-detail-row{display:flex;align-items:center;gap:10px;min-width:0;padding:12px;background:#f4e7cc;border:1px solid #a98046;color:#2d2117}
body[data-ui-theme] #modal .stock-detail-row>div{min-width:0;flex:1}
body[data-ui-theme] #modal .stock-detail-row img{display:block;width:36px;height:36px;flex:0 0 36px;object-fit:contain;opacity:1}
body[data-ui-theme] #modal .stock-detail-row :is(span,strong,small){color:#2d2117}
body[data-ui-theme] #modal .stock-detail-row strong{font-size:22px;line-height:1.45;overflow-wrap:anywhere}
body[data-ui-theme] #modal .stock-detail-row small{font-size:13px;line-height:1.5}
body[data-ui-theme] #modal .voyage-destination small,body[data-ui-theme] #modal .voyage-rules summary{color:#e5d5b7;font-size:14px}
body[data-ui-theme] #modal .voyage-ships label span{font-size:13px}
body[data-ui-theme] #modal .mission-warning{color:#fff3d7}
body[data-ui-theme] #modal .mission-warning.has-problem{color:#ffd2bb;background:#421f1a;border:1px solid #bb7058;padding:10px}
body[data-ui-theme] #modal .mission-fuel{display:flex;align-items:center;gap:8px;flex-wrap:wrap;line-height:1.55}
body[data-ui-theme] #modal .mission-fuel .rum-fuel-icon{display:block;width:24px;height:24px;flex:0 0 24px;object-fit:contain;margin:0;opacity:1}
body[data-ui-theme] #modal .voyage-estimate{flex-wrap:wrap;gap:12px}
body[data-ui-theme] #modal .voyage-ships input{text-align:center}
body[data-ui-theme] #modal .voyage-estimate{font-size:16px;line-height:1.6}
body[data-ui-theme] :is(#workspace,#modal) .rum-fuel-icon{display:inline-block;width:24px;height:24px;flex:0 0 24px;object-fit:contain;vertical-align:middle;margin:0;opacity:1;filter:none}
body[data-ui-theme] #workspace .route-fuel{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
body[data-ui-theme] #modal #cargo-fields label{display:flex;align-items:center;gap:6px}
body[data-ui-theme] #modal .cargo-resource-art{display:block;width:24px;height:24px;flex:0 0 24px;object-fit:contain;opacity:1;filter:none}
body[data-ui-theme] #workspace .island-detail .ship-token{display:grid;justify-items:center;align-content:center;gap:3px;min-width:0;padding:5px 3px;color:#2d2117;text-shadow:none;background:#f4e7cc;border:1px solid #a98046;border-image:none;box-shadow:inset 0 0 0 1px #fffae6}
body[data-ui-theme] #workspace .island-detail .ship-token .atlas-token{width:48px;max-width:100%;height:48px;aspect-ratio:1;mix-blend-mode:normal;background-color:#efd5a1}
body[data-ui-theme] #workspace .island-detail .ship-token strong{margin:0;color:#2d2117;font:700 20px/1.4 var(--font-body);text-shadow:none}
body[data-ui-theme] #workspace .account-card .form-error:not(:empty){color:#8d251b;background:#fff1dc;border-left:3px solid #9a251a;padding:8px 12px}
body[data-ui-theme] #workspace .account-card.account-recovery .form-error:not(:empty){color:#ffd2bb;background:#421f1a;border-color:#bb7058}
body[data-ui-theme] #modal .troop-cargo .input-grid>div{min-width:0}
body[data-ui-theme] #modal .troop-cargo img{display:block;margin:auto;object-fit:contain}
body[data-ui-theme] #modal .troop-cargo label{color:#fff3d7}
body[data-ui-theme] #modal .avatar-picker-footer{position:relative;z-index:2;background:#102631;padding:14px 0 0;margin-top:14px;color:#fff3d7}
body[data-ui-theme] #modal .avatar-picker-footer>span{color:#fff3d7}
body[data-ui-theme] #modal .avatar-choice span{min-height:32px;font-size:12px;line-height:1.4}
body[data-ui-theme] :is(#workspace,#modal) button:disabled{opacity:1;filter:none;color:#e7dfce;background:#4b4135;border-color:#9d8a69;text-shadow:none}
@media(min-width:1301px) and (max-width:1420px){
 body[data-ui-theme] #workspace .topbar .resource{gap:6px;padding:8px 6px}
 body[data-ui-theme] #workspace .topbar .resource-icon{width:28px;height:28px;flex-basis:28px}
 body[data-ui-theme] #workspace .topbar .resource strong{font-size:20px}
}
@media(min-width:951px) and (max-width:1300px){
 body[data-ui-theme] .topbar .resources{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-ui-theme] #workspace .topbar .resource{flex-direction:row;gap:8px;min-height:64px;padding:7px 9px}
 body[data-ui-theme] .topbar .resource-copy{text-align:left}
}
@media(max-width:950px){
 body[data-ui-theme] .topbar .resources{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 body[data-ui-theme] #workspace .topbar .resource{display:flex;flex-direction:row;align-items:center;gap:9px;min-height:62px;padding:7px 10px;overflow:hidden}
 body[data-ui-theme] #workspace .topbar .resource-icon{position:static;inset:auto;width:32px;height:32px;flex:0 0 32px}
 body[data-ui-theme] .topbar .resource-copy{display:flex;flex:1;flex-direction:column-reverse;gap:1px;min-width:0;width:auto;text-align:left}
 body[data-ui-theme] #workspace .topbar .resource small{min-height:0;margin:0;font-size:14px;line-height:19px}
 body[data-ui-theme] #workspace .topbar .resource strong{font-size:20px;line-height:26px;letter-spacing:-.03em}
 body[data-ui-theme] #modal .stock-detail{grid-template-columns:1fr}
 body[data-ui-theme] #modal .stock-detail-row{padding:12px;gap:14px}
 body[data-ui-theme] #modal .stock-detail-row img{width:44px;height:44px;flex-basis:44px}
 body[data-ui-theme] #modal .stock-detail-row :is(span,small){font-size:16px;line-height:1.5}
 body[data-ui-theme] #modal .stock-detail-row strong{font-size:24px}
 body[data-ui-theme] #workspace .account-panel-grid>.account-card{width:100%;max-width:100%}
 body[data-ui-theme] #workspace .account-card>header>div{min-width:0}
 body[data-ui-theme] #workspace .account-card h3{hyphens:auto;overflow-wrap:anywhere;word-break:normal}
 body[data-ui-theme] #modal .voyage-ships label span{font-size:16px}
 body[data-ui-theme] #modal .voyage-destination small,body[data-ui-theme] #modal .voyage-rules summary{font-size:16px}
 body[data-ui-theme] #modal .mission-fuel{font-size:16px}
 body[data-ui-theme] #modal #cargo-fields .input-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body[data-ui-theme] #modal #cargo-fields .input-grid>div{min-width:0}
 body[data-ui-theme] #modal #cargo-fields input{width:100%;min-width:0}
 body[data-ui-theme] #modal.avatar-dialog .modal-inner{height:calc(var(--game-height,100dvh) - 24px);max-height:calc(var(--game-height,100dvh) - 24px);padding:18px 14px}
 body[data-ui-theme] #modal.avatar-dialog #avatar-form{flex:1 1 0}
 body[data-ui-theme] #modal.avatar-dialog .avatar-gallery{position:relative;isolation:isolate;contain:paint;overflow:auto;min-height:90px;flex:1 1 0;max-height:none}
 body[data-ui-theme] #modal.avatar-dialog .avatar-picker-footer{flex:none;gap:6px;padding-top:10px;margin-top:10px}
 body[data-ui-theme] #modal.avatar-dialog .avatar-choice span{font-size:14px;min-height:44px;overflow-wrap:normal;word-break:normal;hyphens:auto}
 body[data-ui-theme] #modal.avatar-dialog .modal-top h2{font-size:27px}
 body[data-ui-theme] #modal.avatar-dialog .modal-top .eyebrow{font-size:12px}
 body[data-ui-theme] #modal.avatar-dialog .avatar-picker-intro{margin-bottom:10px;gap:10px}
 body[data-ui-theme] #modal.avatar-dialog .avatar-filters{margin-top:10px;gap:6px}
}
/* Desktop ledger text stays compact; headings, navigation and mobile keep their scale. */
@media(min-width:951px){
 :root body[data-ui-theme]{font-size:15px}
 :root body[data-ui-theme] #workspace :is(.account-page p,.help-card p,.help-card li,.report>p,.brotherhood-page p,.tavern-page .chat-message p,.content-intro>p,.trade-introduction,.rule-note,.standing-identity p),
 :root body[data-ui-theme] #modal :is(p,.rule-note,.mission-warning){font-size:15px;line-height:1.6}
 :root body[data-ui-theme] #workspace .help-card :is(ol,ul){font-size:15px;line-height:1.6}
 :root body[data-ui-theme] :is(#workspace,#modal) label{font-size:14px}
 :root body[data-ui-theme] :is(#workspace,#modal) :is(input,select,textarea){font-size:15px}
 :root body[data-ui-theme] #workspace .account-page p:is(.account-session-note,.account-help-note,.account-recovery-note,.account-email-form-note,.account-email-delivery,.account-email-privacy),
 :root body[data-ui-theme] #modal .stock-detail-note{font-size:13px;line-height:1.6}
}
/* Desktop puts the working surface first: a small helm and one shared status line. */
@media(min-width:951px){
 body[data-ui-theme] .shell{grid-template-columns:232px minmax(0,1fr)}
 body[data-ui-theme] #sidebar{padding:12px 12px 16px}
 body[data-ui-theme] #sidebar:after{left:223px}
 body[data-ui-theme] .brand{gap:7px;padding-bottom:10px}
 body[data-ui-theme] .brand .brand-crest{width:60px;height:64px}
 body[data-ui-theme] .brand>span{font-size:20px}
 body[data-ui-theme] .brand small{font-size:10px;margin-top:6px}
 body[data-ui-theme] #sidebar .world-label{margin-bottom:4px;padding:6px;font-size:11px}
 body[data-ui-theme] #sidebar #navigation{gap:3px}
 body[data-ui-theme] #sidebar #navigation .nav-group-label{margin:12px 7px 4px;font-size:10px}
 body[data-ui-theme] #sidebar #navigation .nav-item{min-height:44px;padding:3px 7px;gap:8px;font-size:14px}
 body[data-ui-theme] #sidebar #navigation .nav-item .painted-icon{width:36px;height:36px}
 body[data-ui-theme] #sidebar .my-islands button{min-height:44px;padding:5px;font-size:13px}
 body[data-ui-theme] #sidebar .my-islands .painted-icon{width:32px;height:32px}
 body[data-ui-theme] #sidebar .sidebar-section{margin:12px 7px 6px}
 body[data-ui-theme] #workspace .topbar{padding-top:0;padding-bottom:6px;border-bottom-width:2px}
 body[data-ui-theme] .topbar .helm{height:52px;gap:12px}
 body[data-ui-theme] #workspace .topbar #account{position:static}
 body[data-ui-theme] .topbar .player-menu{top:calc(100% + 8px);right:24px}
 body[data-ui-theme] .topbar .current-island{gap:8px;max-width:460px}
 body[data-ui-theme] .topbar .current-island>span,
 body[data-ui-theme] .topbar .current-island .painted-icon{width:36px;height:36px}
 body[data-ui-theme] .topbar .current-island small{font-size:10px;line-height:1.3}
 body[data-ui-theme] #workspace .topbar #active-island{font-size:19px;min-height:28px;padding-top:0;padding-bottom:0}
 body[data-ui-theme] .captain-portrait{width:40px;height:40px;padding:2px}
 body[data-ui-theme] .captain-kicker{font-size:10px!important}
 body[data-ui-theme] .captain-name{font-size:17px!important;line-height:1.2!important}
 body[data-ui-theme] .captain-rank{font-size:11px}
 body[data-ui-theme] .topbar .island-command-strip{display:flex;gap:8px;align-items:stretch}
 body[data-ui-theme] .topbar .resources{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:1 1 0;width:auto}
 body[data-ui-theme] #workspace .topbar .resource{flex-direction:row;min-height:50px;height:50px;gap:6px;padding:5px 7px}
 body[data-ui-theme] #workspace .topbar .resource-icon{width:30px;height:30px;flex:0 0 30px}
 body[data-ui-theme] .topbar .resource-copy{text-align:left}
 body[data-ui-theme] #workspace .topbar .resource strong{font-size:20px;line-height:1.2}
 body[data-ui-theme] #workspace .topbar .resource small{margin-top:1px;gap:4px;line-height:1.2}
 body[data-ui-theme] #workspace #resources .resource-label{font-size:11px}
 body[data-ui-theme] #workspace .topbar .resource .rate{display:inline;font-size:10px}
 body[data-ui-theme] #workspace #harbor-summary{flex:0 0 350px;width:350px;min-width:350px;min-height:50px;padding:3px}
 body[data-ui-theme] #workspace .header-ship{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:36px 13px;align-items:center;justify-items:center;column-gap:3px;row-gap:0;padding:0 2px!important}
 body[data-ui-theme] .topbar .ship-miniature{grid-column:1;grid-row:1;width:48px;height:36px;object-fit:contain;padding:0;background:none;border:0;box-shadow:none}
 body[data-ui-theme] .header-ship-copy{display:contents}
 body[data-ui-theme] .topbar .header-ship strong{grid-column:2;grid-row:1;font-size:16px;line-height:1.15}
 :root body[data-ui-theme] .topbar .ship-label{grid-column:1/-1;grid-row:2;font-size:11px;line-height:1.15;white-space:nowrap;max-width:none;overflow:visible;text-overflow:clip}
 body[data-ui-theme] #workspace .header-army{min-width:54px;padding:0 3px}
 body[data-ui-theme] #workspace .header-army .troop-tokens img{width:16px;height:26px}
 body[data-ui-theme] .topbar .garrison-label{font-size:10px}
 body[data-ui-theme] #workspace #header-status{flex:0 0 150px;min-height:50px;max-width:150px;padding:4px 6px;font-size:11px;display:flex;align-items:center;gap:5px}
 body[data-ui-theme] #header-status>div{display:block;min-width:0}
 :root body[data-ui-theme] #header-status :is(strong,small){font-size:11px;line-height:1.25}
 body[data-ui-theme] #header-status svg{width:17px;height:17px;flex:0 0 17px}
 body[data-ui-theme] #workspace #activity-bar.harbor-briefing{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:8px;padding:4px 10px}
 body[data-ui-theme] #workspace .briefing-main{display:flex;flex:1;gap:8px;min-width:0}
 body[data-ui-theme] #workspace .briefing-emblem{width:28px;flex-basis:28px}
 body[data-ui-theme] .briefing-emblem .painted-icon{width:28px;height:28px}
 body[data-ui-theme] #workspace .briefing-copy{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;min-width:0}
 body[data-ui-theme] #workspace .briefing-copy>strong{font-size:14px;line-height:1.4;margin:0}
 body[data-ui-theme] #workspace .briefing-copy>span{font-size:13px;line-height:1.4;margin:0}
 body[data-ui-theme] #workspace .briefing-main>button{min-height:32px;padding:4px 10px;font-size:13px}
 body[data-ui-theme] #workspace .briefing-links{padding:0;margin:0;gap:8px;flex-wrap:nowrap;align-items:center}
 body[data-ui-theme] #workspace .briefing-links .text-button{min-height:32px;padding:3px 0;font-size:12px;gap:4px;white-space:nowrap}
 body[data-ui-theme] .briefing-links .painted-icon{width:20px;height:20px}
 body[data-ui-theme] #workspace .content-page{padding-top:10px}
 body[data-ui-theme] #workspace .scene-banner{display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:14px minmax(29px,auto);align-content:center;align-items:center;column-gap:12px;row-gap:0;min-height:66px;padding:7px 16px;margin-bottom:12px;border-width:2px;background-position:center 45%}
 body[data-ui-theme] #workspace .scene-banner>span{grid-column:1/-1;grid-row:1;font-size:10px;line-height:1.3;max-width:62%}
 body[data-ui-theme] #workspace .scene-banner h3{grid-column:1;grid-row:2;font-size:24px;line-height:1.2;margin:0;width:auto;max-width:none}
 body[data-ui-theme] #workspace .scene-banner p{grid-column:2;grid-row:2;font-size:13px;line-height:1.4;margin:0;width:auto;max-width:65ch}
 body[data-ui-theme] .island-overview-title{min-height:70px;padding:10px 16px;margin-bottom:12px;border-width:2px}
 body[data-ui-theme] .island-overview-title .eyebrow{display:block;font-size:10px;line-height:1.2;margin:0}
 body[data-ui-theme] .island-overview-title h2{font-size:25px;margin:0;line-height:1.2}
 body[data-ui-theme] #workspace .island-overview-title .text-button{min-height:34px;padding:5px 10px;font-size:13px}
 body[data-ui-theme] #workspace .page-heading{padding:14px 0 10px;margin-bottom:12px;gap:10px}
 body[data-ui-theme] .page-heading h1{font-size:28px}
 body[data-ui-theme] .view-emblem .painted-icon{width:42px;height:42px}
 body[data-ui-theme] .page-heading .eyebrow{font-size:10px}
 body[data-ui-theme] .island-workplaces{margin-bottom:12px;gap:8px}
 body[data-ui-theme] #workspace .workplace{min-height:58px;padding:6px 10px;gap:8px}
 body[data-ui-theme] .workplace .workplace-art{width:36px;height:36px}
 body[data-ui-theme] .workplace-title{font-size:14px}
 body[data-ui-theme] .workplace-copy>strong{font-size:13px}
 body[data-ui-theme] .workplace-copy>small{font-size:12px}
}
@media(min-width:951px) and (max-width:1250px){
 body[data-ui-theme] .topbar .island-command-strip{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:6px}
 body[data-ui-theme] .topbar .resources{grid-column:1/-1;grid-row:1}
 body[data-ui-theme] #workspace #harbor-summary{grid-column:1;grid-row:2;width:auto;min-width:0;min-height:40px}
 body[data-ui-theme] #workspace #header-status{grid-column:2;grid-row:2;max-width:none;min-height:40px}
 body[data-ui-theme] #workspace .briefing-copy>span{display:none}
 body[data-ui-theme] #workspace .briefing-links{gap:6px}
}

/* Public identity of the rule-based world opponents. */
.ai-badge{display:inline-flex;align-items:center;vertical-align:middle;min-height:20px;padding:1px 5px;border:1px solid #826037;border-radius:2px;background:#eddbaf;color:#382419;font:700 11px/1.35 "Libre Baskerville",Georgia,serif;white-space:nowrap;text-shadow:none}
/* Reading help keeps one urgent warning; routine summaries stay in the harbor. */
body:is([data-view=wiki],[data-view=help],[data-view=tutorial],[data-view=achievements]) #activity-bar:not([data-situation=danger]){display:none!important}
body:is([data-view=wiki],[data-view=help],[data-view=tutorial],[data-view=achievements]) #activity-bar .briefing-links{display:none!important}
@media(max-width:950px){body:is([data-view=wiki],[data-view=help],[data-view=tutorial],[data-view=achievements]) #activity-bar{padding:8px 10px!important}body:is([data-view=wiki],[data-view=help],[data-view=tutorial],[data-view=achievements]) #activity-bar .briefing-main{grid-template-columns:1fr auto!important;gap:6px 10px!important}body:is([data-view=wiki],[data-view=help],[data-view=tutorial],[data-view=achievements]) #activity-bar .briefing-emblem,body:is([data-view=wiki],[data-view=help],[data-view=tutorial],[data-view=achievements]) #activity-bar .briefing-copy>span{display:none!important}body:is([data-view=wiki],[data-view=help],[data-view=tutorial],[data-view=achievements]) #activity-bar .briefing-main>button{grid-column:auto!important;margin:0!important}}
@media(max-width:950px){.ai-badge{font-size:14px;min-height:23px}}
