/* Pre-Genesis: monumental lettering, bronze relief, midnight stone. */
@font-face{font-family:'PreGenesis Display';src:url('./assets/fonts/PreGenesis-Display.woff2') format('woff2');font-weight:800;font-style:normal;font-display:swap}
:root{--ink:#fff3d9;--muted:#c1ccd4;--gold:#edc57c;--panel:#102336f5;--line:#aa83594d;--font:'PreGenesis Display',Georgia,serif;--body:'Segoe UI',system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif}
html,body{font-family:var(--body);font-size:14px;font-weight:500;background:#071421}
button,input,select{font-family:var(--body)}
button{font-weight:650;transition:background .15s,border-color .15s,box-shadow .15s}
button:hover:not(:disabled){filter:none;border-color:#f0ce91;background-color:#35516a}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #fff0ba;outline-offset:4px}
.eyebrow,.section-label{font-size:11px;font-weight:750;letter-spacing:1.6px;color:#e3bf80}
.panel{border-color:#b78e5a77;box-shadow:0 12px 28px #020b1466,inset 0 1px #ffe1a714;background:linear-gradient(135deg,#193248f5,#0a1d2ef8)}
h1,h2,h3,.realm-identity h2,.selection h2,dialog h2,.research-card .research-title,.city-row strong,.tech-small strong,.end-turn strong,.room-code{font-family:var(--font);font-weight:800;letter-spacing:.3px}
.welcome{background:#07121e;align-items:stretch;padding:34px 0;isolation:isolate}
.welcome-art{position:fixed;background-position:58% center;filter:saturate(1.04) contrast(1.06)}
.welcome-shade{position:fixed;background:linear-gradient(90deg,#07131ff5 0%,#081a29ed 28%,#0b203599 44%,#12243710 72%),linear-gradient(0deg,#061424b3,transparent 40%,#101c2520)}
.welcome-content{width:660px;max-width:100%;padding:25px 64px;margin:auto 0;position:relative;text-align:center}
.welcome-content:before{content:'';position:absolute;inset:20px 24px;z-index:-1;background:radial-gradient(ellipse,#1a334033,transparent 70%);pointer-events:none}
.welcome-content>.eyebrow{font:750 11px/1.5 var(--body);letter-spacing:2.7px;color:#edc57c}
.welcome-ring{height:76px;margin:22px auto 16px;width:76px;filter:drop-shadow(0 4px 16px #e7b96826)}
.welcome-ring img{display:block;width:100%;height:100%}
.welcome h1{margin:0;color:#f8dba2;font:800 clamp(64px,5.6vw,94px)/.98 var(--font);letter-spacing:1px;text-shadow:0 3px 0 #6c4f2a,0 6px 0 #1d2024,0 12px 32px #000b}
.welcome h1 .title-prefix{display:flex;align-items:center;justify-content:center;gap:20px;font:800 29px/1 var(--font);letter-spacing:8px;margin:0 0 13px;padding-left:8px;color:#f7e8c9;text-shadow:0 2px 0 #5d482b,0 6px 20px #0008}
.title-prefix:before,.title-prefix:after{content:'';height:2px;width:56px;background:linear-gradient(90deg,transparent,#b9925a)}
.title-prefix:after{transform:rotate(180deg)}
.welcome-sub{font:600 16px/1.5 var(--body);letter-spacing:0;color:#f1eee4;margin:24px 0 26px;text-shadow:0 2px 8px #000}
.patron-label{display:flex;align-items:center;gap:12px;margin:0 0 13px;color:#edc57c;font:750 11px/1.4 var(--body);letter-spacing:1.6px}
.patron-label:before,.patron-label:after{content:'';height:1px;flex:1;background:#bd945d55}
.faction-picker{gap:9px;margin:0 0 9px}
.faction-choice{position:relative;min-height:110px;padding:13px 5px 12px;background:linear-gradient(160deg,#213b4cd9,#091c2fe8);border:1px solid #9c86577a;border-bottom:3px solid #7a6243;box-shadow:inset 0 1px #ffe2a814,0 6px 13px #0003;border-radius:3px}
.faction-choice:hover{background:linear-gradient(160deg,#355265,#142b3e)}
.faction-choice.selected{background:linear-gradient(150deg,#725a35aa,#273948e8 80%);border-color:#f5ce88;box-shadow:inset 0 0 0 2px #e7bf6233,0 3px 16px #030b13}
.faction-choice.selected:after{content:'\2713';position:absolute;right:6px;top:4px;font:800 12px var(--body);color:#ffdb93}
.faction-choice>span{height:42px;margin-bottom:9px}.faction-choice .faction-crest{filter:drop-shadow(0 2px 2px #0008);max-width:52px}
.faction-choice strong{font:750 16px/1.2 var(--body);color:#fff1d6}.faction-choice small{font:550 11px/1.4 var(--body);color:#ced5d9;margin-top:5px}
#faction-description{min-height:0;font:550 14px/1.55 var(--body);color:#d7dfe2}
.roster-open{font:650 13px/1.4 var(--body);margin:0 0 15px;padding:12px 2px;border-color:#a8895855;color:#eecb8c}
#faction-description>b{font:800 22px/1.25 var(--font);color:#f4e1b9;margin-bottom:8px}
#faction-description>span{min-height:24px;max-width:440px;margin:0 auto}
#faction-description .text-button{font-size:12px;padding:8px;min-height:34px;margin:3px 0 9px}
.start-game,.friends-button{font:750 17px/1.3 var(--body);text-transform:none;letter-spacing:.2px;min-height:58px;border-radius:3px;margin-top:10px;padding:16px 21px}
.start-game{color:#15202a;background:linear-gradient(110deg,#bf9454,#f3dba4 56%,#d3ad6d);border:1px solid #ffe2a4;border-bottom:3px solid #8c6635;box-shadow:inset 0 1px #fff1c5,0 5px 17px #0005}
.start-game:hover:not(:disabled){background:linear-gradient(110deg,#e2b46b,#ffe6b0 56%,#eac280);box-shadow:inset 0 1px #fff5d1,0 5px 22px #dba85626;color:#081521}
.start-game>span{font-size:24px}.friends-button{background:linear-gradient(#1b384e,#10283d);border:1px solid #a18b64;color:#f5e7cd;min-height:52px;padding:14px 20px}.friends-button span{font:650 12px var(--body);letter-spacing:.3px;color:#dcc49a}
.text-button{font:650 13px/1.5 var(--body);color:#efcd92}.welcome-settings{margin-top:9px;padding:10px}.offline-status{font:500 11px/1.5 var(--body);color:#b3c4d1;margin:7px 0}.build-note{font:700 10px/1.4 var(--body);color:#b6c1c9;letter-spacing:1.5px;margin:9px 0 0}
.topbar{height:76px;background:linear-gradient(90deg,#081725,#142c40 52%,#0a1b2b);border-bottom:2px solid #b18b52;box-shadow:0 4px 20px #0004}
#world{top:76px}.brand{font:800 20px/1 var(--font);letter-spacing:.1px;gap:10px;color:#f3d599}.brand small{font:750 9px var(--body);letter-spacing:2px;color:#b5c6d4;margin-top:2px}.ring-mark{height:43px;width:43px}.resource span strong{font:750 23px var(--body);color:#fff2d1}.resource span small{font-weight:650;font-size:12px}.resource-label{font-size:10px;font-weight:700;letter-spacing:.8px}.icon-button{border-color:#a5895a88;background:#152e42;width:36px;height:36px;color:#f5dfb4;font-weight:750}
.realm-identity h2{font-size:22px;line-height:1.25}.realm-identity p,.city-row small{font-size:13px;color:#cdd7dd;font-weight:500}.side-tabs button{font-size:13px;font-weight:700;min-height:44px}.city-row strong{font-size:21px}.research-card{background:linear-gradient(145deg,#3651673b,#12263a);border-color:#a3885744}.research-card .research-title{font-size:21px}.progress{height:5px;background:#020d1cb3;box-shadow:inset 0 1px 2px #0008}.progress-detail{font-size:12px;color:#d2dce3;font-weight:550}.section-label,.research-card .section-label{font-size:10px}.chronicle-link{font-size:13px;font-weight:650}
.objective h3{font-size:24px;line-height:1.2;color:#ffe3ad}.objective p{font-size:14px;line-height:1.45;color:#e0e6e9;font-weight:550}.objective button{font-size:12px;font-weight:650}.objective .eyebrow{font-size:10px}.friend-room-bar[hidden]~.objective{top:96px}
.selection h2{font-size:30px;color:#f6dfb5}.selection .subtitle,.selection .action-help{font-size:13px;color:#d2dce3}.selection .unit-stats{font-size:13px}.selection .unit-stats b{font-weight:750}.action-button,.secondary{font:650 13px/1.4 var(--body);min-height:40px;padding:10px 14px;border-color:#8d9fac77;background:linear-gradient(#294457,#163046);box-shadow:inset 0 1px #cde9ff0a}.action-button.gold,.primary{font-weight:750}.selection .unit-tabs button{font-size:12px;font-weight:650;min-height:34px}.end-turn strong{font-size:26px;font-weight:800}.end-turn small{font-size:10px;font-weight:750}.turn-foot{font-size:10px;font-weight:650}.controls-hint{font-size:12px;font-weight:500}.minimap>span{font-size:9px;font-weight:700}
dialog{background:radial-gradient(ellipse at 50% 0,#29485b88,transparent 60%),linear-gradient(125deg,#172e43,#081b2d);border:1px solid #b48d55;border-top:4px solid #deb776;box-shadow:0 24px 100px #000e,inset 0 0 0 5px #c29b5010;padding:36px}
dialog h2{font-size:34px;font-weight:800;color:#f6ddb0;line-height:1.2}dialog h3,.option-card h3,.guide-steps h3{font-weight:800;color:#f6dfb6;line-height:1.25}dialog .intro,dialog p,dialog details p,.option-card p{font:500 15px/1.65 var(--body);color:#d3dce3}dialog summary{font-size:15px;font-weight:650}.option-card small{font-size:12px;font-weight:650}.guide-steps b{font-weight:800}.guide-steps p{font:550 15px/1.6 var(--body)}.modal-close{font-weight:600;border-color:#c7a06b}.settings-grid .settings-row{font-weight:550}.room-code{font:800 32px var(--font)}.friend-room-bar{font-weight:650}.friend-form label{font-weight:650}.roster-card strong{font:750 22px var(--body)}.roster-card>span>span,.roster-card small{font-size:13px}.roster-card small{font-weight:600}.world-city-label{font-family:var(--body)!important;font-weight:750!important;letter-spacing:.4px!important}.menu-rail button{font-weight:700;font-size:14px}
@media(min-width:1700px){.welcome-content{width:700px;padding:32px 80px}.welcome h1{font-size:96px}.resources{gap:48px}}
@media(max-width:1100px){.welcome-content{width:600px;padding:25px 50px}.welcome h1{font-size:80px}.brand{font-size:17px}.topbar{gap:18px}.resources{gap:22px}.resource span strong{font-size:20px}.realm-identity h2{font-size:20px}.objective h3{font-size:22px}}
@media(max-width:900px){.topbar{height:66px;gap:13px}.brand{font-size:16px}.brand small{font-size:7px;letter-spacing:1px}.ring-mark{height:31px;width:31px}#world{top:66px}.resource span strong{font-size:19px}.resource-label{display:none}.resource span small{font-size:11px}.icon-button{width:32px;height:34px}.realm-toggle{font-weight:700}.selection h2{font-size:27px}.selection .action-button{font-size:13px}.objective p{font-size:13px}.objective h3{font-size:21px}.welcome-content{padding:24px 44px}.welcome-shade{background:linear-gradient(90deg,#07131ff5,#0b2035da 58%,#0c20366b)}}
@media(max-width:580px){.welcome{padding:22px 0}.welcome-content{width:100%;padding:12px 22px max(20px,env(safe-area-inset-bottom));margin:auto}.welcome-art{background-position:65% center;filter:saturate(.95) contrast(1.08)}.welcome-shade{background:linear-gradient(#081827d6,#091b2aea 64%,#071723f5)}.welcome-ring{width:58px;height:58px;margin:19px auto 14px}.welcome h1{font-size:clamp(53px,14vw,76px);letter-spacing:0}.welcome h1 .title-prefix{font-size:23px;letter-spacing:6px;gap:16px;margin-bottom:10px}.title-prefix:before,.title-prefix:after{width:36px}.welcome-content>.eyebrow{font-size:10px;letter-spacing:2px}.welcome-sub{font-size:14px;margin:20px 0 22px}.patron-label{font-size:10px;letter-spacing:1.3px}.faction-picker{gap:6px}.faction-choice{min-height:100px;padding:12px 3px 10px}.faction-choice>span{height:37px;margin-bottom:8px}.faction-choice strong{font-size:14px}.faction-choice small{font-size:10px}.faction-choice.selected:after{right:4px;font-size:10px}#faction-description>b{font-size:21px}#faction-description{font-size:13px}.start-game{min-height:55px}.friends-button{font-size:16px}.friends-button span{font-size:11px}.build-note{font-size:9px}.offline-status{font-size:11px}.topbar{height:calc(66px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 8px 0;gap:7px}.brand{font:800 12px/1.1 var(--font);width:78px;white-space:normal;gap:0;text-align:left}.brand .ring-mark{display:none}.brand small{display:none}#world{top:calc(66px + env(safe-area-inset-top))}.resources{gap:9px}.resource span strong{font-size:16px}.resource span small{font-size:10px}.icon-button{width:34px;height:44px}.top-actions{gap:2px}.resource-symbol{font-size:15px}.realm-toggle,.map-tools{top:calc(78px + env(safe-area-inset-top))}.friend-room-bar[hidden]~.objective{top:calc(78px + env(safe-area-inset-top))}.objective h3{font-size:19px}.objective p{font-size:12px;line-height:1.4}.objective .eyebrow{font-size:9px}.objective button{font-size:11px}.selection{max-height:240px}.selection h2{font-size:26px}.selection .action-button{font-size:13px;min-height:44px}.selection .subtitle,.selection .action-help{font-size:12px}.selection .unit-tabs button{font-size:12px;min-height:38px}.end-turn strong{font-size:24px}.turn-foot{font-size:9px}.controls-hint{font-size:11px}.realm-identity h2{font-size:24px}dialog{padding:30px 20px 22px}dialog h2{font-size:29px}dialog:has(.guide-steps) h2{font-size:29px}.guide-steps h3{font-size:23px}.guide-steps p{font-size:15px}.roster-card strong{font-size:22px}.room-code{font-size:28px}.friend-room-bar{font-size:12px}}
@media(max-height:800px) and (min-width:581px){.welcome{padding:20px 0}.welcome-content{padding-top:8px;padding-bottom:8px}.welcome-ring{height:50px;width:50px;margin:12px auto}.welcome h1{font-size:72px}.welcome h1 .title-prefix{font-size:23px;margin-bottom:9px}.welcome-sub{margin:16px 0 18px;font-size:15px}.faction-choice{min-height:92px;padding-top:9px;padding-bottom:9px}.faction-choice>span{height:32px;margin-bottom:7px}.roster-open{padding:9px 2px;margin-bottom:12px}.start-game{min-height:51px;padding:12px 18px}.friends-button{min-height:47px;padding:11px 18px}.welcome-settings{margin-top:3px;padding:7px}.welcome-content>.eyebrow{font-size:10px}.offline-status{margin:3px 0}.build-note{margin-top:6px}}
html[data-contrast="high"] .welcome-shade{background:#051321ed}html[data-contrast="high"] .faction-choice{background:#061726;border-color:#e4c17f}html[data-contrast="high"] .faction-choice.selected{background:#354c5c;outline:2px solid #ffdf99}html[data-contrast="high"] .panel,html[data-contrast="high"] dialog{background:#061726;color:#fff}
html[data-text-size="large"] .welcome-sub,html[data-text-size="large"] #faction-description{font-size:17px}html[data-text-size="large"] .faction-choice strong{font-size:18px}html[data-text-size="large"] .faction-choice small{font-size:12px}

/* Lore and city planning share the same bronze-and-ink hierarchy. */
.codex-heading{display:flex;align-items:center;gap:20px;margin-bottom:24px}.codex-heading h2{margin:0 0 5px}.codex-heading p{margin:0;font-size:13px;color:#d8bb83}.codex-seal{width:84px;height:84px;flex:0 0 84px;display:grid;place-items:center;background:radial-gradient(circle,#49607366,#142b3a);border:1px solid #d6ac62;border-radius:50%;box-shadow:inset 0 0 0 5px #cda05f16,0 8px 24px #0004}.codex-seal img{width:58px;height:58px}.codex-switch{display:block;font-size:12px;font-weight:700;color:#d7c39d;margin-bottom:20px}.codex-switch select{display:block;width:100%;margin-top:7px;padding:13px;background:#0c2032;color:#fff0d2;border:1px solid #a1875d;border-radius:3px;font-size:14px;min-height:48px}.codex-identity{font-size:17px!important;color:#f4e8ce!important;line-height:1.6!important}.trait-panel{padding:20px 23px;margin:24px 0;background:linear-gradient(120deg,#4d472d50,#102d4255);border:1px solid #c29d635c;border-left:4px solid #dcb879}.trait-panel h3{margin:9px 0;font-size:24px}.trait-panel p{margin:8px 0}.trait-counter{font-size:13px!important;color:#d9c8a8!important}.codex-list>details,.lore-story{border-bottom:1px solid #b99b5a38;padding:14px 0}.codex-list summary{cursor:pointer;min-height:30px;color:#f0dbb4}.codex-list details[open]>summary{color:#ffd38a;margin-bottom:14px}.lore-section-label{font-size:10px;font-weight:750;letter-spacing:1.8px;margin:26px 0 5px;color:#b7c9d9}.lore-citations{display:flex;flex-direction:column;gap:7px;margin:15px 0}.lore-citations a,.lore-sources a,.lore-figure a{font-size:12px;line-height:1.5;color:#edc786;text-decoration:underline;text-underline-offset:3px}.lore-pairs{margin:0}.lore-pairs>div{display:grid;grid-template-columns:minmax(110px,1fr) 3fr;gap:20px;border-bottom:1px solid #abc5df18;padding:12px 0}.lore-pairs dt{font-weight:750;color:#ead6af}.lore-pairs dd{margin:0;color:#cbd9e3;line-height:1.6}.lore-figure{padding:10px 0 24px;border-bottom:1px solid #ac8b5140}.lore-figure h3{font-size:22px;margin-bottom:5px}.lore-figure small{color:#d7b778}.lore-sources{padding-left:20px}.lore-sources li{padding:9px 0}.lore-sources small{display:block;font-size:11px;color:#a7b9c8;margin-top:4px}.city-ledger{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:24px 0}.city-ledger>div{background:#071d2c;border:1px solid #a78d574a;padding:17px;text-align:center}.city-ledger strong{display:block;color:#ffe3af;font:800 26px var(--font)}.city-ledger span{font-size:11px;color:#c6d0d8;display:block;margin-top:7px}.city-focus{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0 18px}.city-focus .action-button{flex:1;min-width:105px}.city-yield-ledger{display:flex;flex-wrap:wrap;gap:12px;padding:15px 0;color:#cfddde}.city-yield-ledger b{color:#f3d295}.city-worked{border-block:1px solid #a58b5544;padding:17px 0;margin:10px 0 24px}.worked-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:20px}.worked-grid>div,.city-buildings>div{background:#0a2132aa;border-left:2px solid #c4a363;padding:12px}.worked-grid b,.worked-grid span,.city-buildings b,.city-buildings span{display:block;font-size:12px;line-height:1.6}.worked-grid span,.city-buildings span{color:#b6c8d6}.city-buildings{display:grid;gap:8px;margin-bottom:24px}.production-kind{font:750 10px var(--body);text-transform:uppercase;letter-spacing:1.4px;color:#e3bc7b}.option-card h3{margin-top:9px}.city-focus [aria-pressed=true]{outline:1px solid #f6d49a;outline-offset:2px}
@media(max-width:580px){.codex-heading{gap:13px}.codex-seal{flex-basis:62px;width:62px;height:62px}.codex-seal img{width:44px;height:44px}.codex-heading h2{font-size:28px}.codex-heading p{font-size:12px}.codex-identity{font-size:16px!important}.trait-panel{padding:16px}.lore-pairs>div{display:block}.lore-pairs dd{margin-top:5px}.city-ledger>div{padding:12px 5px}.city-ledger strong{font-size:22px}.city-ledger span{font-size:10px}.worked-grid{grid-template-columns:1fr}.codex-switch select{font-size:13px}}
/* Keep complete command groups within the larger type layout. */
@media(min-width:901px){.selection:not([data-kind="unit"]){max-height:330px}}
@media(max-width:580px){.selection{max-height:260px}}

/* Status remains readable while orders are being confirmed or paused. */
.order-status,.modal-feedback{padding:10px 12px;margin:0 0 12px;border-left:3px solid #e5bd79;background:#29485b66;color:#ffe7ba;font:600 13px/1.5 var(--body);grid-column:1/-1}
.modal-feedback{position:sticky;top:0;z-index:2;margin:0 0 18px;background:#163146;box-shadow:0 6px 16px #07182788}
button:disabled{cursor:default}.end-turn:disabled{background:#263d4d;color:#d5dee3;border-color:#8ba0ad;box-shadow:none}.end-turn:disabled .turn-arrow{opacity:.35}
.selection,.realm-panel,dialog{scroll-padding:14px;overscroll-behavior:contain}.selection :is(button,summary),dialog :is(button,input,select,summary){scroll-margin:14px}
.selection-heading>div:last-child,.city-row>span,.setting-line>div,.friend-seats li>span{min-width:0}.selection h2,.realm-identity h2,.option-card h3{overflow-wrap:anywhere}
input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #fff0ba;outline-offset:3px}
.update-notice{position:fixed;z-index:70;top:calc(86px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);max-width:calc(100vw - 24px);min-height:44px;padding:11px 17px;border:1px solid #f1d195;border-radius:3px;background:#17364c;color:#ffdfaa;box-shadow:0 8px 30px #0009;font-size:13px;font-weight:700}
body:has(.welcome:not([hidden])) .update-notice{top:calc(10px + env(safe-area-inset-top))}
html[data-contrast="high"] :is(.order-status,.modal-feedback,.friend-room-bar,.update-notice){background:#061726;color:#fff;border-color:#ffe0a0}
html[data-contrast="high"] :is(.option-card,.action-button,.order-row):disabled{opacity:1;color:#b8c9d6;background:#132633;border-style:dashed;filter:none}
html[data-text-size="large"] :is(.setting-line strong,.setting-line small,.setting-line select,.menu-footnote,.menu-rail button,.binding-list label,.binding-list select,.friend-status,.friend-error,.order-status,.modal-feedback,.order-row small,.friend-room-bar,.offline-status){font-size:17px;line-height:1.55}
html[data-text-size="large"] .setting-line{flex-wrap:wrap;gap:12px}html[data-text-size="large"] .unit-tabs{flex-wrap:wrap}
html[data-reduced-motion="true"] *,html[data-reduced-motion="true"] *::before,html[data-reduced-motion="true"] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(max-width:900px){.realm-panel.expanded{z-index:7}.map-tools button,.icon-button{min-width:40px;min-height:44px}.selection{max-height:min(320px,calc(100dvh - 215px))}}
@media(max-width:580px){
 .topbar{gap:6px}.top-actions{gap:0}.icon-button{width:44px;min-width:44px}.brand{width:56px;flex-shrink:0;font-size:11px}.resources{gap:7px}.resource{gap:3px}.resource span strong{font-size:15px}.resource-symbol{font-size:13px}
 .selection{width:auto;left:10px;right:10px;bottom:calc(78px + env(safe-area-inset-bottom));max-height:min(310px,calc(100dvh - 240px));overflow-y:auto;touch-action:pan-y}.selection .unit-tabs button{min-height:44px}
 .realm-panel.expanded{top:calc(128px + env(safe-area-inset-top));bottom:calc(78px + env(safe-area-inset-bottom));width:calc(100% - 20px);max-height:none}
 .map-tools button{width:44px}.objective{width:calc(100% - 170px)}.selection .actions{padding-bottom:3px}.selection .order-status{font-size:12px}.modal-feedback{font-size:14px}
 html[data-text-size="large"] .objective p{display:none}html[data-text-size="large"] .selection{max-height:min(340px,calc(100dvh - 210px))}
 dialog{max-height:calc(100dvh - 24px);overflow:auto}.campaign-menu,.menu-page,.setting-line{min-width:0}
 .friend-room-bar{top:calc(70px + env(safe-area-inset-top))}.friend-room-bar:not([hidden])~.objective{top:calc(122px + env(safe-area-inset-top))}
 body:has(.friend-room-bar:not([hidden])) :is(.realm-toggle,.map-tools){top:calc(122px + env(safe-area-inset-top))}
}
@media(max-width:400px){.topbar .brand{display:none}.topbar .resources{justify-content:flex-start}.topbar{gap:4px}.resource span small{font-size:10px}}
@media(max-width:350px){.resource.food{display:none}}
@media(max-height:500px) and (orientation:landscape){.selection{left:12px;right:auto;width:calc(100% - 214px);bottom:12px;max-height:calc(100dvh - 150px)}.turn-corner{bottom:12px}.realm-panel.expanded{top:124px;bottom:12px;max-height:none}.objective{display:none}.minimap{display:none}.controls-hint{display:none}}
@media(max-height:500px) and (min-width:701px) and (orientation:landscape){
 #game{height:100dvh;min-height:0}
 .selection,html[data-text-size="large"] .selection{left:12px;right:212px;width:auto;bottom:calc(12px + env(safe-area-inset-bottom));min-height:0;max-height:min(230px,calc(100dvh - 154px));padding:10px 13px;overflow-y:auto}
 .selection :is(.selection-emblem,.subtitle,.action-help){display:none}.selection h2{font-size:24px;line-height:1.15;margin:1px 0 3px}.selection .unit-stats{margin:6px 0;gap:7px 14px}.selection .city-yields{margin:7px 0}.selection .actions{margin-top:8px;gap:6px}.selection .action-button,.selection .unit-tabs button{min-height:44px;padding:8px 10px}.selection .unit-tabs{margin-top:8px;padding-top:7px}.selection .order-status{padding:6px 9px;margin-bottom:7px}
 .turn-corner{right:12px;bottom:calc(12px + env(safe-area-inset-bottom));width:176px}.end-turn{min-height:52px;padding:10px 12px;gap:6px}.end-turn strong{font-size:20px;line-height:1.15;white-space:nowrap}.end-turn small{display:none}.turn-arrow{font-size:18px;flex-shrink:0}.turn-foot{font-size:9px;padding-top:7px;letter-spacing:.4px}
 .realm-panel.expanded{top:124px;bottom:12px;max-height:calc(100dvh - 136px)}
}

/* Keep the map open while a district site is being chosen. */
.placing-district .selection{display:none}
.placing-district .objective{padding:12px 18px;width:min(420px,calc(100% - 365px));display:grid;grid-template-columns:1fr auto;gap:4px 16px;text-align:left}
.placing-district .objective .eyebrow{grid-column:1/-1}
.placing-district .objective h3{font-size:21px;margin:0}
.placing-district .objective p{grid-column:1;font-size:13px;margin:0}
.placing-district .objective button{grid-column:2;grid-row:2/4;align-self:center;min-height:44px;padding:0 8px;border-left:1px solid #d8b57955}
@media(max-width:900px){.placing-district .objective{width:calc(100% - 170px);padding:10px 12px;gap:3px 8px}.placing-district .objective h3{font-size:18px}.placing-district .objective p{font-size:12px}}
@media(max-width:580px){.placing-district .objective{left:84px;right:68px;transform:none;width:auto;display:block}.placing-district .objective .eyebrow{display:none}.placing-district .objective p{margin:5px 0}.placing-district .objective button{min-height:36px;border:0;padding:0}}
@media(max-height:500px) and (orientation:landscape){.placing-district .objective{display:grid;top:76px;right:72px;left:auto;transform:none;width:370px}.placing-district .objective .eyebrow{display:none}.placing-district .objective button{grid-row:1/3}.placing-district .objective p{display:block}}

.primary.action-button{color:#102032;background:linear-gradient(135deg,#f3d9a1,#c89e59);border:1px solid #f2d394;box-shadow:inset 0 1px #fff5d766;font-weight:750}

.end-turn.needs-decision strong{font-size:20px;line-height:1.15;white-space:normal;overflow-wrap:normal}
@media(max-width:900px),(max-height:500px){.end-turn.needs-decision strong{font-size:18px}}
