/* Settlement RTS camp (task-33 T-RTS-FRONTEND).
   Layer: route-local command view. The global header/nav/footer are hidden on
   /settlement only; the camp owns the viewport with a 56 px top bar, the scene,
   a 360 px context rail and an 84 px command bar. Every colour comes from the
   shared tokens; mobile is a purpose-built dock + bottom-sheet layout. CSP-safe:
   no inline styles, no external assets. */
.settlement-view.rts-camp { --rts-edge: rgba(153,178,174,.26); --rts-panel: linear-gradient(160deg, rgba(16,38,44,.96), rgba(8,23,29,.97)); --rts-amber: #d9ac6c; --rts-muted: #a9bbb6; position: fixed; inset: 0; z-index: 30; display: grid; grid-template-rows: 56px minmax(0,1fr) 84px; gap: 0; background: radial-gradient(120% 90% at 50% 0%, #132b33 0%, #07151c 62%, #050f14 100%); color: #e8ede6; font-size: .9rem; overflow: hidden; }
body[data-page="command"] .game-header, body[data-page="command"] .game-footer, body[data-page="command"] .page-location, body[data-page="command"] .bottom-nav, body[data-page="command"] .rebirth-hero { display: none !important; }
body[data-page="command"] #command.command { display: block; margin: 0; padding: 0; min-height: 0; border: 0; background: transparent; }
body[data-page="command"] { margin: 0; overflow: hidden; background: #050f14; }
.rts-camp *, .rts-camp *::before, .rts-camp *::after { box-sizing: border-box; }
.rts-camp button { font: inherit; }
.rts-camp h1, .rts-camp h2, .rts-camp h3, .rts-camp p, .rts-camp ul { margin: 0; }
.rts-camp :focus-visible { outline: 3px solid var(--rts-amber); outline-offset: 2px; }
.rts-camp a { color: var(--rts-amber); }
.rts-app { position: relative; grid-row: 1 / span 3; display: grid; grid-template-rows: 56px minmax(0,1fr) 84px; min-height: 0; }
.rts-live { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.rts-live:not(:empty) { left: 50%; top: 58px; width: auto; height: auto; transform: translateX(-50%); z-index: 60; padding: .35rem .8rem; border: 1px solid var(--rts-edge); border-left: 3px solid var(--rts-amber); background: #0b2229; color: #f0eee5; font-size: .78rem; }
.rts-live--error:not(:empty) { border-left-color: var(--status-danger); }
.rts-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Top bar 56 px */
.rts-topbar { grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 0 max(.75rem, env(safe-area-inset-left)); border-bottom: 1px solid var(--rts-edge); background: linear-gradient(180deg, rgba(10,29,35,.98), rgba(7,20,26,.96)); min-width: 0; }
.rts-topbar__camp { display: flex; align-items: center; gap: .7rem; min-width: 0; flex: 1 1 auto; }
.rts-brand { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 1px solid rgba(217,172,108,.5); border-radius: 3px; color: var(--rts-amber); font-weight: 800; font-size: .7rem; letter-spacing: .02em; }
.rts-camp-id { min-width: 0; }
.rts-camp-name { font-size: 1.02rem; line-height: 1.1; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rts-camp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; color: var(--rts-muted); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.rts-breach { color: var(--status-warning); }
.rts-modechip, .rts-fsstate { padding: .12rem .4rem; border: 1px solid rgba(153,178,174,.3); border-radius: 2px; font-size: .6rem; letter-spacing: .12em; color: #cfe0da; }
.rts-theater-exit { min-height: 2.75rem; padding: .2rem .6rem; border: 1px solid var(--rts-amber); border-radius: 3px; background: transparent; color: var(--rts-amber); font-size: .7rem; cursor: pointer; }
.rts-topbar__profile { display: flex; align-items: center; gap: .4rem; position: relative; min-width: 0; flex: 0 0 auto; }
.rts-profile-btn { display: flex; align-items: center; gap: .45rem; min-height: 2.75rem; min-width: 0; max-width: min(12rem, 26vw); padding: .2rem .55rem; border: 1px solid rgba(153,178,174,.35); border-radius: 3px; background: rgba(4,17,23,.55); color: #e8ede6; cursor: pointer; }
.rts-profile-avatar { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgba(217,172,108,.18); color: var(--rts-amber); font-weight: 700; }
.rts-profile-name { display: block; min-width: 0; max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
@media (max-width: 1100px) { .rts-profile-name { display: none; } }
.rts-menu { position: absolute; top: calc(100% + .35rem); right: 0; z-index: 70; width: 280px; max-height: min(70vh, 34rem); overflow: auto; display: grid; gap: .12rem; padding: .45rem; border: 1px solid var(--rts-edge); border-radius: 4px; background: #0b2029; box-shadow: 0 18px 48px rgba(0,0,0,.5); }
.rts-menu[hidden] { display: none; }
.rts-menu__head { padding: .4rem .5rem .5rem; border-bottom: 1px solid rgba(153,178,174,.2); margin-bottom: .25rem; }
.rts-menu__identity { font-weight: 700; color: #f0eee5; }
.rts-menu__meta { color: var(--rts-muted); font-size: .72rem; }
.rts-menu__item { display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 2.75rem; padding: .35rem .5rem; border: 0; border-radius: 3px; background: transparent; color: #e8ede6; text-align: left; font-size: .8rem; cursor: pointer; text-decoration: none; }
.rts-menu__item:hover, .rts-menu__item:focus-visible { background: rgba(217,172,108,.12); }
.rts-menu__item[aria-pressed="true"], .rts-menu__item[aria-checked="true"] { color: var(--rts-amber); }
.rts-settings { display: grid; gap: .1rem; padding-left: .55rem; border-left: 2px solid rgba(217,172,108,.35); margin-left: .5rem; }
.rts-settings[hidden] { display: none; }
.rts-settings .rts-menu__item { min-height: 2.75rem; font-size: .76rem; }
.rts-symbol { display: inline-flex; flex: none; color: var(--rts-amber); }
.rts-symbol svg, .rts-camp svg.rts-icon { display: block; }
.rts-hint { color: var(--rts-muted); font-size: .72rem; line-height: 1.45; }
.rts-empty { color: var(--rts-muted); font-size: .78rem; padding: .5rem 0; }
.rts-line { color: #dfe7e0; font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
.rts-link { display: inline-block; min-height: 2.75rem; padding: .6rem 0; color: var(--rts-amber); font-size: .76rem; }
/* Main scene + rail */
.rts-main { grid-row: 2; display: grid; grid-template-columns: minmax(0,1fr) 360px; min-height: 0; min-width: 0; }
.rts-stage { position: relative; min-width: 0; min-height: 68vh; overflow: hidden; background: radial-gradient(120% 100% at 50% 20%, #16343c 0%, #0a1d24 60%, #061218 100%); }
.rts-scene { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; }
.rts-canvas { position: relative; width: 100%; max-height: 100%; aspect-ratio: 2 / 1; }
.rts-canvas .settlement-illustration { position: absolute; inset: 0; margin: 0; border: 0; padding: 0; background: transparent; }
.rts-canvas .settlement-illustration__art { position: absolute; inset: 0; }
.rts-canvas .city-diorama { display: block; width: 100%; height: 100%; }
.rts-canvas .settlement-illustration__caption { display: none; }
.rts-hotspots { position: absolute; inset: 0; }
.rts-hotspot { position: absolute; width: 2.75rem; height: 2.75rem; min-width: 44px; min-height: 44px; transform: translate(-50%, -50%); border: 1px solid transparent; border-radius: 50%; background: transparent; color: transparent; cursor: pointer; padding: 0; }
.rts-hotspot:hover { border-color: rgba(217,172,108,.8); background: rgba(217,172,108,.14); }
.rts-hotspot:focus-visible { border-color: var(--rts-amber); background: rgba(217,172,108,.2); outline: 3px solid var(--rts-amber); outline-offset: 2px; }
.rts-ring { position: absolute; width: 3.25rem; height: 3.25rem; transform: translate(-50%, -50%); border: 3px solid var(--rts-amber); border-radius: 50%; box-shadow: 0 0 0 3px rgba(217,172,108,.2); pointer-events: none; }
.rts-frame { position: absolute; inset: 0; pointer-events: none; color: var(--rts-amber); }
.rts-frame__corner, .rts-frame__edge { position: absolute; display: block; width: 28px; height: 28px; }
.rts-frame__corner--tl { left: 0; top: 0; }
.rts-frame__corner--tr { right: 0; top: 0; }
.rts-frame__corner--bl { left: 0; bottom: 0; }
.rts-frame__corner--br { right: 0; bottom: 0; }
.rts-frame__edge--top { left: 50%; top: 0; transform: translateX(-50%); }
.rts-frame__edge--bottom { left: 50%; bottom: 0; transform: translateX(-50%); }
.rts-frame__edge--left { left: 0; top: 50%; transform: translateY(-50%); }
.rts-frame__edge--right { right: 0; top: 50%; transform: translateY(-50%); }
.rts-scene-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .8rem; padding: .4rem .7rem; background: linear-gradient(0deg, rgba(4,14,19,.9), rgba(4,14,19,0)); font-size: .68rem; color: var(--rts-muted); }
.rts-caption { max-width: 70ch; }
.rts-scene-links { display: flex; gap: .75rem; }
.game-shell .rts-scene-links a { color: #f0dbab; }
.rts-scene-links a { min-height: 2.75rem; display: inline-flex; align-items: center; font-size: .72rem; }
/* In-scene HUD 52â€“76 px */
.rts-hud { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: grid; gap: .2rem; padding: .3rem .45rem; background: linear-gradient(180deg, rgba(4,16,21,.94), rgba(4,16,21,.65) 70%, rgba(4,16,21,0)); }
.rts-hud__resources { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: .25rem; min-width: 0; }
.rts-res { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-rows: auto auto auto; column-gap: .3rem; align-items: center; min-width: 0; min-height: 2.75rem; padding: .18rem .35rem; border: 1px solid rgba(153,178,174,.28); border-radius: 3px; background: rgba(6,24,30,.8); color: #e8ede6; text-align: left; cursor: pointer; }
.rts-res:hover, .rts-res:focus-visible { border-color: rgba(217,172,108,.6); }
.rts-res__label { font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; color: var(--rts-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rts-res__value { font-size: clamp(.86rem, 1.2vw, 1.05rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.rts-res__rate { grid-column: 1 / -1; font-size: .62rem; color: var(--status-growth); font-variant-numeric: tabular-nums; }
.rts-res__rate.is-negative { color: var(--status-danger); }
.rts-res__bar { grid-column: 1 / -1; width: 100%; height: .3rem; accent-color: var(--rts-amber); }
.rts-hud__status { display: flex; align-items: center; gap: .3rem; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.rts-hudchip { position: relative; display: inline-flex; align-items: center; gap: .3rem; flex: none; min-height: 2.75rem; padding: .18rem .45rem; border: 1px solid rgba(153,178,174,.28); border-radius: 3px; background: rgba(6,24,30,.8); color: #e8ede6; font-size: .72rem; cursor: pointer; text-decoration: none; }
.rts-hudchip:hover, .rts-hudchip:focus-visible { border-color: rgba(217,172,108,.6); }
.rts-hudchip__label { font-size: .56rem; letter-spacing: .1em; text-transform: uppercase; color: var(--rts-muted); }
.rts-hudchip strong { font-variant-numeric: tabular-nums; }
.rts-hudchip__band { color: var(--status-warning); font-size: .58rem; letter-spacing: .08em; }
.rts-hudchip--bell { margin-left: auto; }
.rts-badge { display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem; padding: 0 .22rem; border-radius: 999px; background: var(--status-warning); color: #1a1206; font-size: .64rem; }
/* Tooltips: hover + keyboard focus + touch click; Escape closes. */
.rts-tip { position: absolute; left: 0; top: calc(100% + .35rem); z-index: 80; display: none; width: max-content; max-width: min(22rem, calc(100vw - 1rem)); padding: .45rem .55rem; border: 1px solid rgba(217,172,108,.55); border-left-width: 3px; border-radius: 3px; background: #0b2229; color: #e8ede6; box-shadow: 0 12px 30px rgba(0,0,0,.5); font-size: .7rem; line-height: 1.45; }
.rts-tip__line { display: block; white-space: normal; }
.rts-res:hover .rts-tip, .rts-res:focus .rts-tip, .rts-res:focus-visible .rts-tip, .rts-res.is-open .rts-tip, .rts-hudchip:hover .rts-tip, .rts-hudchip:focus .rts-tip, .rts-hudchip:focus-visible .rts-tip, .rts-hudchip.is-open .rts-tip { display: block; }
.rts-hudchip .rts-tip { left: auto; right: 0; }
/* Right rail 360 px */
.rts-rail { display: flex; flex-direction: column; gap: .4rem; min-width: 0; min-height: 0; overflow-y: auto; padding: .4rem; border-left: 1px solid var(--rts-edge); background: linear-gradient(180deg, rgba(8,24,30,.96), rgba(5,15,20,.98)); scrollbar-width: thin; }
.rts-panel { border: 1px solid rgba(153,178,174,.22); border-radius: 3px; background: rgba(4,17,23,.55); }
.rts-panel__head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .35rem .5rem; border-bottom: 1px solid rgba(153,178,174,.16); }
.rts-panel__head h2 { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rts-amber); }
.rts-panel__body { display: grid; gap: .3rem; padding: .45rem .5rem .55rem; }
.rts-meter { width: 100%; height: .5rem; accent-color: var(--rts-amber); }
.rts-effects { display: grid; gap: .15rem; padding-left: 1rem; color: #dfe7e0; font-size: .72rem; }
.rts-weather-name { color: #f0eee5; font-size: .85rem; }
.rts-weather-season { color: var(--rts-amber); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; }
.rts-line--important { color: var(--status-warning); }
.rts-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .4rem .7rem; border: 1px solid rgba(217,172,108,.45); border-radius: 3px; background: rgba(217,172,108,.1); color: #f0dbab; font-size: .76rem; cursor: pointer; text-align: center; }
.rts-button:hover, .rts-button:focus-visible { background: rgba(217,172,108,.2); }
.rts-button:disabled { opacity: .55; cursor: not-allowed; }
.rts-button--primary { background: var(--rts-amber); border-color: var(--rts-amber); color: #191306; font-weight: 700; }
/* Context strip 44 px + command dock 84 px */
.rts-contextstrip { position: absolute; left: 0; right: 0; bottom: 84px; z-index: 6; display: flex; align-items: center; gap: .3rem; min-width: 0; min-height: 44px; padding: .1rem .45rem; border-top: 1px solid var(--rts-edge); background: rgba(6,20,26,.96); overflow-x: auto; scrollbar-width: thin; }
.rts-strip__label { color: var(--rts-amber); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.rts-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.rts-strip__btn { min-height: 2.75rem; padding: .3rem .6rem; border: 1px solid rgba(153,178,174,.32); border-radius: 3px; background: rgba(6,24,30,.8); color: #e8ede6; font-size: .74rem; cursor: pointer; white-space: nowrap; }
.rts-strip__btn--primary { border-color: var(--rts-amber); color: var(--rts-amber); }
.rts-strip__btn:disabled { opacity: .55; cursor: not-allowed; }
.rts-dock { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: .25rem; align-items: stretch; min-width: 0; padding: .3rem .45rem max(.3rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--rts-edge); background: linear-gradient(0deg, #071b22, #0a232b); }
.rts-command { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-width: 0; min-height: 2.75rem; padding: .25rem .2rem; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #cfe0da; font-size: .64rem; letter-spacing: .03em; cursor: pointer; }
.rts-command:hover, .rts-command:focus-visible { border-color: rgba(217,172,108,.55); background: rgba(217,172,108,.1); color: #f0dbab; }
.rts-command:disabled { opacity: .5; cursor: not-allowed; }
.rts-dock__reason { position: absolute; left: -9999px; }
/* Dialogs / bottom sheets */
.rts-modal { width: min(34rem, calc(100vw - 1.5rem)); max-height: min(84vh, 42rem); padding: 0; border: 1px solid rgba(217,172,108,.5); border-radius: 4px; background: linear-gradient(160deg, #0d252d, #07161c); color: #e8ede6; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.rts-modal::backdrop { background: rgba(2,9,12,.72); }
.rts-modal[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.rts-modal:not([open]) { display: none !important; }
.rts-modal__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .7rem; border-bottom: 1px solid rgba(153,178,174,.22); }
.rts-modal__head h2 { font-size: .92rem; letter-spacing: .05em; }
.rts-modal__body { overflow-y: auto; padding: .7rem; display: grid; gap: .5rem; align-content: start; }
.rts-modal__actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.rts-iconbtn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid rgba(153,178,174,.3); border-radius: 3px; background: transparent; color: #e8ede6; cursor: pointer; }
.rts-iconbtn.rts-profile-btn { display: flex; width: auto; height: auto; min-height: 2.75rem; }
.rts-iconbtn:hover, .rts-iconbtn:focus-visible { border-color: var(--rts-amber); color: var(--rts-amber); }
.rts-tabs { display: flex; gap: .2rem; overflow-x: auto; border-bottom: 1px solid rgba(153,178,174,.2); }
.rts-tab { min-height: 2.75rem; padding: .3rem .6rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #cfe0da; font-size: .74rem; cursor: pointer; white-space: nowrap; }
.rts-tab[aria-selected="true"] { color: var(--rts-amber); border-bottom-color: var(--rts-amber); }
.rts-tabpanel { padding: .5rem 0; display: grid; gap: .4rem; }
.rts-context__meta { color: var(--rts-muted); font-size: .74rem; letter-spacing: .04em; }
.rts-reqs { display: grid; gap: .2rem; padding-left: 1rem; color: #f0dbab; font-size: .76rem; }
.rts-stepper { display: flex; align-items: center; gap: .4rem; }
.rts-stepper__label { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--rts-muted); }
.rts-stepbtn { display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; border: 1px solid rgba(153,178,174,.35); border-radius: 3px; background: rgba(6,24,30,.8); color: #e8ede6; font-size: 1rem; cursor: pointer; }
.rts-stepbtn:disabled { opacity: .5; cursor: not-allowed; }
.rts-stepcount { min-width: 3.2rem; text-align: center; font-variant-numeric: tabular-nums; color: #f0dbee5; }
.rts-facts { display: grid; gap: .15rem; }
.rts-fact { font-size: .76rem; color: #dfe7e0; }
.rts-poprow { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 2.75rem; border-bottom: 1px solid rgba(153,178,174,.14); }
.rts-poprow strong { font-size: .76rem; }
.rts-notifylist { list-style: none; display: grid; gap: .4rem; padding: 0; margin: 0; }
.rts-notify { display: grid; gap: .15rem; padding: .45rem .55rem; border: 1px solid rgba(153,178,174,.2); border-left: 3px solid rgba(153,178,174,.35); border-radius: 3px; background: rgba(4,17,23,.5); }
.rts-notify--important { border-left-color: var(--status-warning); }
.rts-notify__title { font-weight: 700; color: #f0eee5; font-size: .82rem; }
.rts-notify__body { color: #dfe7e0; font-size: .76rem; line-height: 1.45; }
.rts-important { display: inline-block; padding: .05rem .3rem; border: 1px solid var(--status-warning); border-radius: 2px; color: var(--status-warning); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.rts-catalog .rts-modal__body { align-content: start; }
.rts-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.rts-chip { min-height: 2.75rem; padding: .3rem .6rem; border: 1px solid rgba(153,178,174,.3); border-radius: 3px; background: rgba(6,24,30,.8); color: #dfe7e0; font-size: .72rem; cursor: pointer; }
.rts-chip[aria-pressed="true"] { border-color: var(--rts-amber); color: var(--rts-amber); background: rgba(217,172,108,.12); }
.rts-catalog { display: grid; gap: .4rem; }
.rts-brow { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: .45rem; padding: .4rem .5rem; border: 1px solid rgba(153,178,174,.17); border-radius: 3px; background: rgba(4,17,23,.45); }
.rts-brow__info { min-width: 0; display: grid; gap: .1rem; }
.rts-brow__name { font-size: .8rem; color: #f0eee5; }
.rts-glyph { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 1px solid rgba(153,178,174,.25); border-radius: 3px; color: #dfe7e0; }
.rts-glyph svg { width: 2rem; height: 2rem; }
.rts-sheethandle { display: none; }
/* Theater mode: stage â‰¥82vh, chrome already hidden */
html[data-rts-theater="on"] .rts-camp .rts-app, html.rts-mode-theater .rts-camp .rts-app { grid-template-rows: 56px minmax(0,1fr) 84px; }
html[data-rts-theater="on"] .rts-camp .rts-stage, html.rts-mode-theater .rts-camp .rts-stage { min-height: 82vh; }
html[data-rts-theater="on"] .rts-camp .rts-rail, html.rts-mode-theater .rts-camp .rts-rail { display: none; }
html[data-rts-theater="on"] .rts-camp .rts-main, html.rts-mode-theater .rts-camp .rts-main { grid-template-columns: minmax(0,1fr); }
/* Reduced motion + compact HUD */
.rts-camp.rts-reduced-motion *, .rts-camp.rts-reduced-motion *::before, .rts-camp.rts-reduced-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
.rts-hud-compact .rts-hud { padding: .15rem .3rem; }
.rts-hud-compact .rts-res { min-height: 2.2rem; }
.rts-hud-compact .rts-res__label, .rts-hud-compact .rts-res__rate { font-size: .5rem; }
.rts-audio-trigger { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
/* Responsive: 1024â€“1280 keeps the rail narrower */
@media (max-width: 1280px) { .rts-main { grid-template-columns: minmax(0,1fr) 300px; } }
@media (max-width: 1024px) {
  .settlement-view.rts-camp { grid-template-rows: 52px minmax(0,1fr) 76px; }
  .rts-app { grid-template-rows: 52px minmax(0,1fr) 76px; }
  .rts-main { grid-template-columns: minmax(0,1fr); }
  .rts-rail { display: none; }
  .rts-dock { grid-template-columns: repeat(8, minmax(4.5rem, 1fr)); overflow-x: auto; }
  .rts-stage { min-height: 55vh; }
}
/* Mobile: purpose-built dock + sheet (390/320) */
@media (max-width: 768px) {
  .settlement-view.rts-camp { grid-template-rows: 48px minmax(0,1fr) 64px; }
  .rts-app { grid-template-rows: 48px minmax(0,1fr) 64px; }
  body[data-page="command"] { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .rts-topbar { padding: 0 .4rem; gap: .35rem; }
  .rts-brand { display: none; }
  .rts-camp-name { font-size: .86rem; letter-spacing: .06em; }
  .rts-camp-sub { font-size: .58rem; gap: .15rem .45rem; }
  .rts-modechip, .rts-fsstate { display: none; }
  .rts-profile-name { display: none; }
  .rts-stage { min-height: clamp(440px, 58vh, 520px); }
  .rts-hud { padding: .2rem .25rem; gap: .15rem; }
  .rts-hud__resources { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; }
  .rts-res { flex: none; min-width: 4.6rem; min-height: 2.75rem; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto; padding: .15rem .3rem; }
  .rts-res__label { grid-row: 1; }
  .rts-res__value { grid-row: 2; font-size: .82rem; }
  .rts-res__rate { grid-column: 1; font-size: .58rem; }
  .rts-hud__status { overflow-x: auto; }
  .rts-hudchip { min-height: 2.75rem; }
  .rts-hudchip__label { display: none; }
  .rts-hudchip--bell { position: absolute; right: .3rem; top: .25rem; margin-left: 0; z-index: 6; }
  .rts-hud { padding-right: 4.2rem; }
  .rts-tip { position: fixed; left: .5rem; right: .5rem; top: auto; bottom: calc(64px + env(safe-area-inset-bottom) + .4rem); width: auto; max-width: none; z-index: 90; }
  .rts-scene-foot { display: none; }
  .rts-scene-links { display: none; }
  .rts-contextstrip { position: absolute; bottom: 64px; min-height: 44px; padding: .1rem .3rem; }
  .rts-strip__label { font-size: .6rem; }
  .rts-strip__btn { min-height: 2.75rem; font-size: .68rem; padding: .25rem .45rem; }
  .rts-dock { display: flex; gap: .2rem; overflow-x: auto; padding: .2rem .3rem max(.2rem, env(safe-area-inset-bottom)); scrollbar-width: none; }
  .rts-command { flex: 0 0 4.6rem; min-height: 2.75rem; height: 56px; font-size: .58rem; }
  .rts-command svg { width: 20px; height: 20px; }
  .rts-modal { width: 100vw; max-width: 100vw; max-height: 78vh; margin: auto 0 0; border-radius: 8px 8px 0 0; border-bottom: 0; }
  .rts-modal[open] { margin: auto 0 0; }
  .rts-sheethandle { display: block; width: 3rem; height: .3rem; margin: .35rem auto .15rem; border-radius: 999px; background: rgba(153,178,174,.5); }
  .rts-catalog .rts-brow { grid-template-columns: auto minmax(0,1fr); }
  .rts-brow .rts-button { min-height: 2.75rem; }
  .rts-menu { position: fixed; inset: auto 0 0 0; width: 100%; max-height: 70vh; border-radius: 8px 8px 0 0; }
  .rts-rail { display: none; }
  html.rts-mode-theater .rts-camp .rts-app, html[data-rts-theater="on"] .rts-camp .rts-app { grid-template-rows: 48px minmax(0,1fr) 64px; }
}
@media (max-width: 390px) {
  .rts-res { min-width: 4.1rem; }
  .rts-command { flex-basis: 4.2rem; }
  .rts-modal__body { padding: .55rem; }
}
@media (max-width: 320px) {
  .rts-res { min-width: 3.8rem; }
  .rts-command { flex-basis: 3.9rem; }
  .rts-hudchip { padding: .15rem .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rts-camp, .rts-camp * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .rts-res, .rts-hudchip, .rts-panel, .rts-hotspot, .rts-ring, .rts-command, .rts-strip__btn, .rts-menu__item, .rts-modal, .rts-button, .rts-tab, .rts-chip { border: 1px solid CanvasText; }
  .rts-tab[aria-selected="true"], .rts-chip[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; background: Canvas; color: CanvasText; }
  .rts-badge { border: 1px solid CanvasText; forced-color-adjust: none; background: Canvas; color: CanvasText; }
}
/* Deprecated wrapper kept for module routes that still mount the old panels. */
.rts-deprecated { display: none; }

/* Settlement river: animated overlay clipped to the real painted water channel (river-layer.js).
   Decorative only; CSP-safe (classes only) and still under prefers-reduced-motion. */
.river-flow { pointer-events: none; mix-blend-mode: screen; }
.river-band { fill: none; stroke: #e9f9ff; stroke-linecap: round; stroke-width: 7; opacity: .12; animation: river-flow 15s linear infinite; }
.river-band--b { stroke-width: 10; opacity: .085; animation-duration: 20s; animation-delay: -7s; }
.river-streak { fill: none; stroke: #f1fbff; stroke-linecap: round; stroke-width: 1; stroke-dasharray: 8 16; opacity: .34; animation: river-flow 9s linear infinite; }
.river-streak--slow { stroke-width: 1.5; stroke-dasharray: 15 24; opacity: .22; animation-duration: 14s; }
.river-streak--fine { stroke-width: .75; stroke-dasharray: 5 12; opacity: .3; animation-duration: 6.5s; animation-delay: -2.2s; }
.river-glint { fill: none; stroke: #ffffff; stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 5 15; opacity: .42; animation: river-glint 8s linear infinite; }
.river-glint--b { animation-duration: 11s; animation-delay: -3.4s; opacity: .3; }
.river-glint--c { animation-duration: 7s; animation-delay: -5.2s; opacity: .36; }
.river-spark { fill: #ffffff; opacity: 0; animation: river-spark 5.8s ease-in-out infinite; }
.river-spark--b { animation-delay: -2.1s; animation-duration: 7.3s; }
.river-spark--c { animation-delay: -4.4s; animation-duration: 6.4s; }
@keyframes river-flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -190; } }
@keyframes river-glint { from { stroke-dashoffset: 0; opacity: .18; } 50% { opacity: .58; } to { stroke-dashoffset: -110; opacity: .18; } }
@keyframes river-spark { 0%, 100% { opacity: 0; } 40% { opacity: .85; } 70% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .river-flow, .river-flow * { animation: none !important; } }


/* Keep hotspot click geometry stable: the shared skin's button:active rule must not cancel the centering transform (QA R1). */
body.waz-theme .rts-hotspot:active, .rts-camp .rts-hotspot:active { transform: translate(-50%,-50%) translateY(1px); }
/* Escape dismisses any open HUD tooltip even while the control keeps DOM focus (WCAG 1.4.13). */
.rts-camp.rts-tip-dismissed .rts-tip { display: none !important; }

/* Mobile settlement sections (2026-11-07): Camp / Objectives / Progress are separate views. */
.rts-mobile-sections { display: none; }
@media (max-width: 768px) {
  .rts-topbar { flex-wrap: wrap; align-content: center; padding-bottom: 0; }
  .rts-mobile-sections { display: flex; order: 3; flex: 0 0 100%; margin: 0 -.75rem; border-top: 1px solid var(--rts-edge); background: rgba(5,18,24,.96); }
  .rts-mobile-sections button { flex: 1 1 0; min-height: 2.6rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #a9bbb6; font: 700 .66rem/1 var(--rts-font, inherit); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
  .rts-mobile-sections button[aria-pressed="true"] { color: #f0dbab; border-bottom-color: #d9ac6c; background: rgba(217,172,108,.08); }
  .rts-mobile-sections button:focus-visible { outline: 3px solid #d9ac6c; outline-offset: -3px; }
  .rts-app { grid-template-rows: auto minmax(0, 1fr) 64px; }
  .rts-stage { min-height: 0; height: 100%; }
  .rts-canvas { height: 100%; max-height: none; aspect-ratio: auto; }
  .rts-canvas .settlement-illustration__art { width: 100%; height: 100%; }
  .rts-canvas .settlement-illustration__art img, .rts-canvas .settlement-illustration__art svg { width: 100%; height: 100%; object-fit: cover; }
  #settlement-view .objectives-host { display: none; }
  #settlement-view[data-mobile-section="objectives"] .rts-main,
  #settlement-view[data-mobile-section="progress"] .rts-main { display: block; overflow-y: auto; min-height: 0; }
  #settlement-view[data-mobile-section="objectives"] .rts-stage,
  #settlement-view[data-mobile-section="objectives"] .rts-rail,
  #settlement-view[data-mobile-section="progress"] .rts-stage,
  #settlement-view[data-mobile-section="objectives"] .rts-dock,
  #settlement-view[data-mobile-section="progress"] .rts-dock,
  #settlement-view[data-mobile-section="objectives"] .rts-contextstrip,
  #settlement-view[data-mobile-section="progress"] .rts-contextstrip { display: none !important; }
  #settlement-view[data-mobile-section="objectives"] .rts-app,
  #settlement-view[data-mobile-section="progress"] .rts-app { grid-template-rows: auto minmax(0, 1fr) 0; }
  #settlement-view[data-mobile-section="progress"] .rts-rail { display: flex; overflow: visible; border-left: 0; padding: .6rem; }
  #settlement-view[data-mobile-section="objectives"] .objectives-host { display: block; position: static; width: auto; max-height: none; margin: .65rem; pointer-events: auto; }
  #settlement-view[data-mobile-section="objectives"] .obj-card { max-height: none; box-shadow: 0 12px 30px rgba(0,0,0,.32); }
  #settlement-view[data-mobile-section="objectives"] .obj-card.obj-expanded .obj-body { max-height: none; overflow: visible; }
}

@media (max-width: 768px) {
  .rts-mobile-sections { min-width: 0; max-width: 100%; margin: 0 !important; }
  .rts-mobile-sections button { min-width: 0; overflow-wrap: anywhere; }
}

@media (max-width: 768px) {
  .rts-mobile-sections button[hidden] { display: none !important; }
}

/* RTS restructure: collapsible management rail, slim HUD, objectives drawer. */
.rts-topbar__profile { gap: .35rem; }
.rts-objectives-toggle, .rts-rail-toggle { min-height: 2.5rem; padding: 0 .55rem; border: 1px solid rgba(153,178,174,.3); border-radius: 4px; background: rgba(8,26,33,.55); color: #d9e5df; font-size: .66rem; letter-spacing: .06em; display: inline-flex; align-items: center; gap: .3rem; }
.rts-objectives-toggle:hover, .rts-objectives-toggle:focus-visible, .rts-rail-toggle:hover, .rts-rail-toggle:focus-visible { border-color: #d9ac6c; color: #f0dbab; }
.rts-rail-toggle svg { transition: transform .18s ease; }
.rts-camp.rts-rail-collapsed .rts-rail-toggle svg { transform: rotate(180deg); }
.rts-main { transition: grid-template-columns .2s ease; }
.rts-camp.rts-rail-collapsed .rts-main { grid-template-columns: minmax(0, 1fr) 0; }
.rts-camp.rts-rail-collapsed .rts-rail { display: none; }
.rts-hud { padding: .18rem .35rem .3rem; gap: .12rem; }
.rts-hud__resources { gap: .2rem; }
.rts-res { min-height: 2.45rem; padding: .1rem .35rem; }
.rts-res__label { font-size: .5rem; }
.rts-res__value { font-size: .8rem; }
.rts-hudchip { min-height: 2.2rem; padding: .1rem .38rem; }
.rts-hudchip__label { font-size: .5rem; }
@media (min-width: 769px) {
  .objectives-host { display: none !important; }
  #settlement-view[data-objectives-open="true"] .objectives-host { display: block !important; }
}
@media (max-width: 768px) {
  .rts-rail-toggle, .rts-objectives-toggle { display: none !important; }
}
@media (max-width: 1100px) {
  .rts-objectives-toggle { font-size: .6rem; padding: 0 .4rem; }
}

.rts-objectives-toggle { width: auto !important; min-width: 5.6rem !important; padding: 0 .55rem !important; white-space: nowrap; }
.rts-rail-toggle { width: 2.5rem !important; min-width: 2.5rem !important; padding: 0 !important; justify-content: center; }

.rts-objectives-toggle[hidden] { display: none !important; }

.rts-top-fullscreen, .rts-top-theater { display: inline-flex; width: 2.5rem; min-width: 2.5rem; padding: 0; align-items: center; justify-content: center; }
.rts-top-theater[aria-pressed="true"] { border-color: var(--rts-amber); color: var(--rts-amber); }
@media (max-width: 768px) { .rts-top-fullscreen, .rts-top-theater { display: none !important; } }
@media (max-width: 1100px) { .rts-top-theater { display: none !important; } }

.rts-top-fullscreen, .rts-top-theater { display: inline-flex; width: 2.5rem; min-width: 2.5rem; padding: 0; align-items: center; justify-content: center; }
.rts-top-theater[aria-pressed="true"] { border-color: var(--rts-amber); color: var(--rts-amber); }
@media (max-width: 768px) { .rts-top-fullscreen, .rts-top-theater { display: none !important; } }
@media (max-width: 1100px) { .rts-top-theater { display: none !important; } }

.rts-top-fullscreen, .rts-top-theater, .rts-rail-toggle { width: 2.75rem !important; min-width: 2.75rem !important; height: 2.75rem !important; min-height: 2.75rem !important; }

.rts-hudchip { min-height: 2.75rem !important; }


/* Scene hotspots aligned to the 2026-11-07 district layout. */

/* In-game command console: real actions without leaving the settlement. */
.rts-command-center { width: min(780px, calc(100vw - 1.5rem)); max-height: min(86vh, 780px); border-radius: 8px; }
.rts-command-center .rts-modal__body { overflow-y: auto; padding: 0; }
.rts-command-tabs { display: flex; gap: .25rem; overflow-x: auto; padding: .35rem .6rem; border-bottom: 1px solid rgba(153,178,174,.24); background: rgba(4,18,24,.55); }
.rts-command-tab { min-height: 2.75rem; padding: .35rem .7rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #b9cbc7; font-size: .72rem; font-weight: 700; letter-spacing: .06em; cursor: pointer; white-space: nowrap; }
.rts-command-tab[aria-selected="true"] { color: var(--rts-amber); border-bottom-color: var(--rts-amber); }
.rts-command-tab:hover, .rts-command-tab:focus-visible { color: #f0dbab; }
.rts-command-body { padding: .8rem; display: grid; gap: .65rem; }
.rts-cmd-card { border: 1px solid rgba(153,178,174,.26); border-radius: 6px; background: rgba(7,25,31,.72); padding: .7rem .8rem; }
.rts-cmd-card h3 { margin: 0 0 .3rem; color: #e7d7b6; font-size: .9rem; letter-spacing: .04em; }
.rts-cmd-card h4 { margin: .6rem 0 .25rem; color: #d9ac6c; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.rts-cmd-fact { display: flex; justify-content: space-between; gap: 1rem; margin: .18rem 0; color: #a9bbb6; font-size: .76rem; }
.rts-cmd-fact strong { color: #edf3ed; font-variant-numeric: tabular-nums; }
.rts-cmd-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .45rem 0; border-top: 1px solid rgba(153,178,174,.14); }
.rts-cmd-row:first-of-type { border-top: 0; }
.rts-cmd-rowtext { display: grid; gap: .12rem; min-width: 0; }
.rts-cmd-rowtext strong { color: #e8eee8; font-size: .8rem; }
.rts-cmd-rowtext span { color: #a9bbb6; font-size: .7rem; }
.rts-cmd-rowtext small { color: #7f9792; font-size: .68rem; line-height: 1.35; }
.rts-cmd-actions { display: flex; gap: .25rem; flex: none; }
.rts-cmd-actions .rts-button { min-width: 2.75rem; min-height: 2.75rem; padding: .2rem .45rem; }
.rts-command-center .rts-hint { margin: .2rem 0; }
.rts-command-center .rts-button { min-height: 2.75rem; }
@media (max-width: 768px) {
  .rts-command-center { width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border-radius: 8px 8px 0 0; }
  .rts-command-tabs { padding: .25rem .35rem; }
  .rts-command-tab { font-size: .66rem; padding: .3rem .55rem; }
  .rts-command-body { padding: .6rem; }
  .rts-cmd-row { align-items: flex-start; }
}

/* Phase 1 AoE-style camera: the settlement map is larger than the viewport and can be panned. */
.rts-scene { overflow: hidden; }
.rts-camera { position: absolute; inset: 0; overflow: auto; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior: contain; cursor: grab; touch-action: pan-x pan-y; scroll-behavior: auto; }
.rts-camera::-webkit-scrollbar { display: none; }
.rts-camera.is-dragging { cursor: grabbing; }
.rts-camera:focus-visible { outline: 2px solid var(--rts-amber); outline-offset: -2px; }
.rts-camera .rts-canvas { width: 152%; height: 152%; max-height: none; aspect-ratio: auto; margin: 0; }
.rts-camera .rts-canvas .settlement-illustration__art img, .rts-camera .rts-canvas .settlement-illustration__art svg { width: 100%; height: 100%; object-fit: cover; }
.rts-camera .rts-canvas .city-diorama { width: 100%; height: 100%; }
@media (max-width: 768px) {
  .rts-camera .rts-canvas { width: 170%; height: 170%; }
}
@media (prefers-reduced-motion: reduce) { .rts-camera { scroll-behavior: auto; } }

/* Camera zoom presets and controls. */
.rts-camera .rts-canvas { width: 100%; height: 100%; }
.rts-camera.rts-zoom-2 .rts-canvas { width: 125%; height: 125%; }
.rts-camera.rts-zoom-3 .rts-canvas { width: 155%; height: 155%; }
.rts-camera-controls { position: absolute; left: .55rem; bottom: 2.8rem; z-index: 7; display: flex; gap: .2rem; padding: .2rem; border: 1px solid rgba(153,178,174,.35); border-radius: 4px; background: rgba(5,19,25,.82); }
.rts-camera-control { min-width: 2.75rem; min-height: 2.75rem; padding: 0 .45rem; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #d9e5df; font-size: .68rem; font-weight: 700; cursor: pointer; }
.rts-camera-control:hover, .rts-camera-control:focus-visible { border-color: var(--rts-amber); color: #f0dbab; background: rgba(217,172,108,.12); }
@media (max-width: 768px) {
  .rts-camera.rts-zoom-2 .rts-canvas { width: 135%; height: 135%; }
  .rts-camera.rts-zoom-3 .rts-canvas { width: 165%; height: 165%; }
  .rts-camera-controls { left: .45rem; bottom: 4.2rem; }
}

.rts-camera.rts-zoom-2 .rts-canvas { width: 112%; height: 112%; }
@media (max-width: 768px) { .rts-camera.rts-zoom-2 .rts-canvas { width: 122%; height: 122%; } }

/* World map of player kingdoms. */
.rts-world-btn { width: 2.75rem !important; min-width: 2.75rem !important; height: 2.75rem !important; }
.rts-world { width: min(980px, calc(100vw - 1.5rem)); max-height: min(88vh, 820px); }
.rts-world__layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; min-height: 0; }
.rts-world__map { position: relative; padding: .5rem; background: #0b2024; min-width: 0; overflow: hidden; }
.rts-world__svg { display: block; width: 100%; height: auto; max-height: 62vh; background: radial-gradient(circle at 50% 45%, #1b3433, #091a1e); border: 1px solid rgba(153,178,174,.22); border-radius: 4px; }
.rts-world__label { fill: #b8c9bd; font-size: 9px; font-weight: 700; letter-spacing: .04em; paint-order: stroke; stroke: #0b1f20; stroke-width: 2px; }
.rts-world__marker { cursor: pointer; color: #7fd0db; }
.rts-world__marker circle { fill: #2a7d8c; stroke: #bfeaf0; stroke-width: 1.5; }
.rts-world__marker.is-own circle { fill: #d9ac6c; stroke: #fff1c9; stroke-width: 2; }
.rts-world__marker:hover circle, .rts-world__marker:focus circle { fill: #d9ac6c; stroke: #fff; }
.rts-world__marker:focus { outline: 2px solid var(--rts-amber); outline-offset: 2px; }
.rts-world__name { fill: #e7eee7; font-size: 10px; font-weight: 700; paint-order: stroke; stroke: #0b1f20; stroke-width: 2.5px; }
.rts-world__legend { margin: .4rem 0 0; color: #9fb5ae; font-size: .68rem; }
.rts-world__detail { border-left: 1px solid rgba(153,178,174,.24); padding: .8rem; overflow-y: auto; background: rgba(5,19,25,.7); }
.rts-world__detail h3 { margin: 0 0 .2rem; color: #f0e3c4; font-size: 1rem; }
.rts-world__sub { margin: 0 0 .8rem; color: #a9bbb6; font-size: .74rem; }
.rts-world__fact { display: flex; justify-content: space-between; gap: .8rem; margin: .3rem 0; color: #a9bbb6; font-size: .74rem; }
.rts-world__fact strong { color: #edf3ed; }
.rts-world__attack { width: 100%; margin-top: .7rem; min-height: 2.75rem; }
@media (max-width: 768px) {
  .rts-world { width: 100vw; max-width: 100vw; max-height: 90vh; margin: auto 0 0; }
  .rts-world__layout { grid-template-columns: 1fr; }
  .rts-world__svg { max-height: 44vh; }
  .rts-world__detail { border-left: 0; border-top: 1px solid rgba(153,178,174,.24); max-height: 28vh; }
}


/* Free building placement on the tactical map. */
.rts-placement { position: absolute; inset: 0; z-index: 8; cursor: crosshair; background-image: linear-gradient(rgba(217,172,108,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(217,172,108,.18) 1px, transparent 1px); background-size: 42px 21px; background-position: center; }
.rts-placement::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px rgba(217,172,108,.55); pointer-events: none; }
.rts-placement__hint { position: sticky; top: .5rem; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: .6rem; width: max-content; max-width: calc(100% - 1rem); padding: .45rem .65rem; border: 1px solid var(--rts-amber); border-radius: 4px; background: rgba(5,19,25,.94); color: #e8ede6; pointer-events: auto; }
.rts-placement__hint strong { color: var(--rts-amber); font-size: .76rem; letter-spacing: .06em; }
.rts-placement__hint span { color: #b8cbc4; font-size: .7rem; }
.rts-placement__hint .rts-button { min-height: 2.75rem; }
@media (max-width: 768px) { .rts-placement__hint { flex-wrap: wrap; top: auto; bottom: 5rem; width: calc(100% - 1rem); justify-content: center; } .rts-placement { background-size: 32px 16px; } }

/* Original isometric visual prototype. */
.rts-iso-dialog { width: min(1040px, calc(100vw - 1.5rem)); max-height: min(92vh, 900px); }
.rts-iso-dialog__body { padding: 0; overflow: auto; background: #122a2a; }
.iso-prototype { min-height: 480px; color: #e8eee5; }
.iso-prototype__head { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border-bottom: 1px solid rgba(153,178,174,.25); background: rgba(5,19,25,.75); }
.iso-prototype__kicker { color: #e0b45c; font-size: .58rem; letter-spacing: .14em; }
.iso-prototype__head h3 { margin: .1rem 0; color: #f0e3c4; font-size: 1.1rem; }
.iso-prototype__head p { margin: 0; max-width: 36rem; color: #a9bbb6; font-size: .72rem; line-height: 1.45; }
.iso-prototype__controls { display: flex; gap: .3rem; align-items: flex-start; }
.iso-prototype__controls button { min-width: 2.75rem; min-height: 2.75rem; border: 1px solid rgba(217,172,108,.55); border-radius: 4px; background: rgba(4,18,24,.8); color: #f0dbab; font-size: 1.1rem; cursor: pointer; }
.iso-prototype__viewport { overflow: hidden; touch-action: none; cursor: grab; background: #173b38; }
.iso-prototype__viewport:active { cursor: grabbing; }
.iso-prototype__svg { display: block; width: 100%; height: auto; min-height: 420px; }
.iso-prototype__foot { margin: 0; padding: .55rem .9rem; color: #9fb5ae; font-size: .68rem; border-top: 1px solid rgba(153,178,174,.2); background: rgba(4,18,24,.65); }
.iso-villager { animation: iso-bob 2.8s ease-in-out infinite; transform-origin: center bottom; }
.iso-villager:nth-child(2) { animation-delay: -.9s; }
.iso-villager:nth-child(3) { animation-delay: -1.7s; }
.iso-wall { filter: drop-shadow(0 3px 0 rgba(12,31,28,.3)); }
.iso-tower { filter: drop-shadow(0 4px 0 rgba(12,31,28,.35)); }
@keyframes iso-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (max-width: 768px) {
  .rts-iso-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; }
  .iso-prototype__head { flex-wrap: wrap; }
  .iso-prototype__svg { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) { .iso-villager { animation: none; } }

/* Keep the entire riverbank and the facility overlay in the same 2:1 frame. */
.rts-camera { container-type: size; }
.rts-camera.rts-zoom-1 .rts-canvas,
.rts-camera.rts-zoom-2 .rts-canvas,
.rts-camera.rts-zoom-3 .rts-canvas {
  width: min(calc(100cqw * var(--camp-zoom, 1)), calc(200cqh * var(--camp-zoom, 1)));
  height: auto;
  aspect-ratio: 2 / 1;
  margin-inline: auto;
  margin-block: max(0px, calc((100cqh - min(50cqw * var(--camp-zoom, 1), 100cqh * var(--camp-zoom, 1))) / 2)) 0;
}
.rts-camera.rts-zoom-2 { --camp-zoom: 1.25; }
.rts-camera.rts-zoom-3 { --camp-zoom: 1.55; }

.rts-world__province { cursor: pointer; transition: fill-opacity .15s ease; }
.rts-world__province:hover, .rts-world__province:focus-visible { fill-opacity: .3; stroke: #f8de9f; stroke-width: 3; }
.rts-world__label { pointer-events: none; }
.rts-world__controls { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.rts-world__detail a.rts-button { display: block; margin-top: .35rem; }

.rts-placement__footprint {
  position: absolute; width: 2.1rem; height: 1rem; transform: translate(-50%, -50%);
  border: 2px solid #b6dc8c; background: #8cbb6244; border-radius: 50%; pointer-events: none;
}
.rts-placement__footprint.is-invalid { border-color: #f4937c; background: #dc655744; }

.rts-placement__segment { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rts-placement__segment line { stroke: #f2d181; stroke-width: 3; stroke-dasharray: 6 4; }
.rts-placement__segment circle { fill: #26313b; stroke: #f2d181; stroke-width: 2; }

.rts-camera-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.rts-camera .rts-hotspots { pointer-events: none; }
.rts-camera .rts-hotspot { display: grid; place-items: center; pointer-events: auto; }
.rts-camera .rts-hotspot::before {
  content: '';
  width: 11px;
  height: 11px;
  border: 2px solid #fff1c7;
  border-radius: 50%;
  background: #78522c;
  box-shadow: 0 0 0 3px #171e1c8c;
}
.rts-hotspot__label {
  display: none;
  position: absolute;
  bottom: 95%;
  padding: .25rem .5rem;
  border-radius: 4px;
  background: #fbf6e9;
  color: #22312a;
  box-shadow: 0 2px 8px #18171045;
  font-size: .75rem;
  white-space: nowrap;
  pointer-events: none;
}
.rts-hotspot:hover, .rts-hotspot:focus-visible { z-index: 2; }
.rts-hotspot:hover .rts-hotspot__label, .rts-hotspot:focus-visible .rts-hotspot__label { display: block; }

.rts-modal[open] {
  position: fixed;
  inset: 0;
  height: fit-content;
  margin: auto;
  z-index: 100;
}
@media (max-width: 768px) {
  .rts-modal[open] { margin: auto 0 0; }
}

.rts-canvas > .rts-living-activity {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border: 0;
  background: transparent;
}
.city-diorama :is(.building, .traced-fortification, .defensive-gate, .defensive-wall, .perimeter-rear)[data-damage]:not([data-damage="0"]) {
  filter: saturate(.54) brightness(.76);
}
.construction-pulley { animation: construction-lift 2.5s ease-in-out infinite alternate; }
@keyframes construction-lift { to { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
  .construction-pulley { animation: none; }
}

.rts-res > .rts-symbol { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.rts-res > .rts-res__label { grid-column: 2; }
.rts-res > .rts-res__value { grid-column: 2; }
.rts-res > .rts-res__rate { grid-column: 2; }
.rts-res > .rts-symbol .waz-icon, .rts-symbol .rts-icon { padding: 0; border: 0; background: transparent; }

.rts-poprow { display: grid; grid-template-columns: minmax(0, 1fr) 2.75rem minmax(3.2rem, auto) 2.75rem; padding-block: .28rem; }
.rts-poprow .rts-stepcount { font-weight: 650; color: #e7ede6; }
.rts-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; margin-block-end: .65rem; }
.rts-facts .rts-fact { padding: .4rem .5rem; background: #102831; border: 1px solid #27434c; border-radius: 5px; }

.game-shell .rts-dock { background: #e3e8e2; border-color: #b9c8bd; gap: .35rem; }
.game-shell .rts-command { color: #24343a; font-size: .76rem; border-radius: 8px; }
.game-shell .rts-command svg { color: #386f73; }
.game-shell .rts-command:hover, .game-shell .rts-command:focus-visible { color: #1c4f52; background: #f8f7f1; border-color: #8ea9a0; }
.game-shell .rts-hud { background: none; pointer-events: none; }
.game-shell .rts-hudchip { pointer-events: auto; background: #f8f7f1ed; color: #24343a; border-color: #bdc9c1; }
.game-shell .rts-hudchip__label { color: #456369; }
.game-shell .rts-hudchip__band { color: #865017; }
.game-shell .rts-hudchip .rts-symbol { color: #386f73; }
.game-shell .rts-scene-shortcut { font-size: .75rem; }
.game-shell .rts-modal { border-radius: 12px; box-shadow: 0 18px 64px #020b1280; }
.game-shell .rts-modal__head { background: #e3e8e2; color: #24343a; padding: .7rem 1rem; }
.game-shell .rts-modal__head h2 { font-size: 1rem; }
.game-shell .rts-modal__head .rts-iconbtn { background: #f8f7f1; color: #386f73; border-color: #a8bcb3; border-radius: 7px; }
@media (max-width: 700px) {
  .game-shell .rts-hudchip--bell { position: static; margin-left: auto; }
  .game-shell .rts-hud__status { pointer-events: auto; }
  .game-shell .rts-scene-shortcut > span:not(.rts-symbol) { display: none; }
  .game-shell .rts-scene-shortcut { min-width: 44px; justify-content: center; }
  .game-shell .rts-mobile-sections { background: #e3e8e2; }
  .game-shell .rts-mobile-sections button { color: #40595e; }
  .game-shell .rts-mobile-sections button[aria-pressed="true"] { color: #214e50; border-bottom-color: #386f73; background: #f8f7f1; }
}

.rts-building-portrait {
  float: inline-end;
  width: clamp(80px, 24%, 116px);
  margin: 0 0 .65rem .8rem;
  border-radius: 9px;
  border: 1px solid #40616a;
  background: radial-gradient(ellipse at 50% 75%, #52675e, #122c34 72%);
}
.rts-building-portrait > svg { display: block; width: 100%; aspect-ratio: 1; }

.rts-camp-portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.rts-camp-portrait[hidden], .rts-camera[hidden], .rts-camera-control[hidden] { display: none; }
.rts-camera-controls { flex-wrap: wrap; max-width: calc(100% - 1.1rem); }

.rts-portrait-view {
  position: absolute;
  inset: 0;
  container-type: size;
  background: #09171a;
}
.rts-portrait-view[hidden] { display: none; }
.rts-portrait-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100cqw, 200cqh);
  aspect-ratio: 2;
  transform: translate(-50%, -50%);
}
.rts-portrait-frame { container-type: inline-size; }
.rts-portrait-pin {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, calc(-100% - var(--sign-stem)));
  --sign-stem: calc(clamp(5px, 1.25cqw, 17px) + var(--sign-lift, 0px));
  display: flex;
  align-items: center;
  gap: clamp(3px, .4cqw, 6px);
  min-height: 24px;
  max-width: clamp(74px, 16cqw, 158px);
  padding: .18rem .36rem;
  border: 1px solid #d5b47b;
  border-radius: 5px;
  background: linear-gradient(145deg, #262119fa, #11100df7);
  box-shadow: 0 2px 7px #0009;
  color: #fff6e5;
  text-align: start;
  cursor: pointer;
}
.rts-portrait-pin::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  height: var(--sign-stem);
  border-inline-start: 1px solid #ffe3b4;
  pointer-events: none;
}
.rts-portrait-pin[data-sign-below] { transform: translate(-50%, var(--sign-stem)); }
.rts-portrait-pin[data-strategic-damage] { border-color: #e3986e; }
.rts-portrait-pin[data-ruined="true"] { filter: grayscale(.8); }
.rts-portrait-pin[data-occupied="true"] { border-color: #dc626c; }
.rts-strategic-effect { position:absolute; z-index:3; width:50px; height:46px; transform:translate(-50%,-60%); pointer-events:none; }
.rts-strategic-flame { position:absolute; inset:8px 10px 0; border-radius:60% 25% 55% 45%; background:radial-gradient(ellipse at 50% 80%,#fff4a3 10%,#ffac30 35%,#ef5120 60%,transparent 72%); box-shadow:0 5px 22px #ff8a348c; animation:strategic-fire .8s ease-in-out infinite alternate; }
.rts-strategic-smoke { position:absolute; inset:-22px 10px 24px; border-radius:50%; background:radial-gradient(ellipse,#403d38b8,transparent 70%); animation:strategic-smoke 3s ease-out infinite; }
.rts-strategic-rubble { position:absolute; inset:20px 2px 0; border-radius:40%; background:repeating-linear-gradient(35deg,#51483a 0 5px,#81715a 6px 9px,#332e27 10px 13px); box-shadow:0 5px 12px #15150c80; }
@keyframes strategic-fire { to { transform:scale(.85,1.15) rotate(5deg); opacity:.8; } }
@keyframes strategic-smoke { to { transform:translate(10px,-35px) scale(1.7); opacity:0; } }
@media(prefers-reduced-motion:reduce){ .rts-strategic-flame,.rts-strategic-smoke { animation:none; } }
.waz-war-alert { position:fixed; z-index:120; right:1rem; bottom:1rem; width:min(33rem,calc(100vw - 2rem)); padding:.8rem 1rem; border:2px solid #f38b72; border-radius:8px; background:#402126f5; color:#fff2df; box-shadow:0 10px 35px #080c14a8; }
.waz-war-alert[hidden] { display:none; }
.waz-war-alert>strong { display:block; font-size:1rem; color:#ffd2a1; }
.waz-war-alert p { margin:.4rem 0; font-size:.85rem; }
.waz-war-alert>div { display:flex; flex-wrap:wrap; gap:.4rem; }
.waz-war-alert a { display:inline-flex; align-items:center; min-height:44px; padding:.35rem .6rem; color:#fff2df; border:1px solid #d7987c; border-radius:4px; text-decoration:none; }
@media(max-width:700px){.waz-war-alert {right:.5rem;bottom:7rem;width:calc(100vw - 1rem);max-height:45vh;overflow:auto;padding:.65rem;}}
.rts-portrait-pin[data-sign-below]::after { top: auto; bottom: 100%; }
body.waz-theme .rts-portrait-pin:active {
  transform: translate(-50%, calc(-100% - var(--sign-stem)));
}
body.waz-theme .rts-portrait-pin[data-sign-below]:active {
  transform: translate(-50%, var(--sign-stem));
}
.rts-portrait-pin .rts-symbol { color: #ffd18a; flex: none; }
.rts-portrait-pin .rts-symbol svg { display: block; width: clamp(11px, 1.7cqw, 20px); height: auto; border: none; background: none; }
.rts-portrait-pin__label { min-width: 0; font-size: clamp(9px, 1.15cqw, 13px); line-height: 1.12; }
.rts-portrait-pin__label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rts-portrait-pin__label small { display: block; color: #ffd18a; font-size: .86em; white-space: nowrap; }
.rts-portrait-pin:hover, .rts-portrait-pin:focus-visible { z-index: 6; border-color: #ffe3a9; background: #33281a; max-width: 11rem; }
.rts-portrait-pin:focus-visible { outline: 2px solid #fff0ca; outline-offset: 2px; }

@container (max-width: 520px) {
  #settlement-view .rts-portrait-frame .rts-portrait-pin {
    min-height: 28px;
    min-width: 34px;
    height: auto;
    gap: 3px;
    padding-inline: 4px;
  }
  .rts-portrait-pin__label strong { display: none; }
  .rts-portrait-pin:hover .rts-portrait-pin__label strong,
  .rts-portrait-pin:focus-visible .rts-portrait-pin__label strong { display: block; white-space: normal; }
}

.rts-portrait-frame > .rts-portrait-effects {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: transparent;
  border: 0;
}
.rts-portrait-frame > .rts-portrait-effects[data-daylight=night] { background: transparent; }
.rts-portrait-frame > .rts-living-activity { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; border:0; background:transparent; }
.rts-portrait-firelight { opacity: .55; animation: rts-firelight 1.1s ease-in-out infinite alternate; }
@keyframes rts-firelight { 0% { opacity: .25; } 55% { opacity: .7; } 100% { opacity: .43; } }
.weather-still .rts-portrait-firelight { animation: none; }
@media (max-width: 700px) {
  .game-shell .rts-camp { --mobile-command-height: calc(6.15rem + env(safe-area-inset-bottom)); }
  .game-shell .rts-camp .rts-app { grid-template-rows: auto minmax(0, 1fr) var(--mobile-command-height); }
  .game-shell .rts-camp .rts-topbar { padding-inline: .5rem; }
  .game-shell .rts-camp .rts-mobile-sections button {
    min-height: 44px;
    font-size: clamp(.64rem, 2.9vw, .8rem);
    letter-spacing: .02em;
    overflow-wrap: normal;
  }
  .game-shell .rts-camp .rts-dock {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .1rem .25rem;
    overflow: visible;
  }
  .game-shell .rts-camp .rts-command {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: auto;
    font-size: clamp(.59rem, 2.7vw, .75rem);
    letter-spacing: 0;
  }
  .game-shell .rts-camp .rts-contextstrip { bottom: var(--mobile-command-height); }
  .game-shell .rts-camp .rts-contextstrip:not(:has(button)) { display: none; }
  .rts-portrait-view { overflow: hidden; }
  .rts-portrait-view[data-portrait-art="survivor"] { --portrait-backdrop: url('/art/camp-survivor-v2.webp'); }
  .rts-portrait-view[data-portrait-art="foothold"] { --portrait-backdrop: url('/art/camp-foothold-v2.webp'); }
  .rts-portrait-view[data-portrait-art="settlement"] { --portrait-backdrop: url('/art/camp-settlement-v2.webp'); }
  .rts-portrait-view[data-portrait-art="industry"] { --portrait-backdrop: url('/art/camp-industry-v2.webp'); }
  .rts-portrait-view::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--portrait-backdrop) center / cover no-repeat;
    filter: blur(13px) brightness(.62);
    transform: scale(1.08);
    pointer-events: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rts-portrait-firelight { animation: none; }
}


.rts-portrait-frame[data-season="spring"] > .rts-camp-portrait { filter: saturate(1.1); }
.rts-portrait-frame[data-season="summer"] > .rts-camp-portrait { filter: sepia(.12) saturate(1.18); }
.rts-portrait-frame[data-season="autumn"] > .rts-camp-portrait { filter: sepia(.28) saturate(1.16) hue-rotate(-13deg); }
.rts-portrait-frame[data-season="winter"] > .rts-camp-portrait { filter: saturate(.53) brightness(1.11) contrast(.9); }
.rts-portrait-effects[data-season="winter"] .season-frost { opacity: .28; }
.rts-portrait-effects[data-weather="snow"] .weather-snow { opacity: .95; }
.rts-portrait-effects[data-weather="snow"] .weather-snow circle { animation-duration: 2.5s; }
@media (prefers-reduced-motion: reduce) {
  .rts-portrait-effects[data-weather="snow"] .weather-snow circle { animation: none; }
}

.rts-season-short + .rts-weather-condition::before { content: '· '; }
@media (max-width: 768px) {
  .game-shell .rts-scene-shortcut > .rts-season-short { display: inline; font-size: .66rem; }
}

.city-diorama:is([data-weather=rain],[data-weather=storm],[data-weather=snow])
  :is(.campfire-glow,.campfire-flame,.campfire-smoke,.campfire-ember) { display: none; }

.rts-portrait-view[data-portrait-art="empty"] { --portrait-backdrop: url('/art/settlement-panorama-v1.png'); }
.rts-portrait-first, .rts-portrait-first svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rts-portrait-first { z-index: 0; }
.rts-portrait-first-pin { left: 50%; top: 54%; }
.rts-portrait-facilities { position: absolute; z-index: 5; bottom: .65rem; right: .65rem; max-width: min(19rem, 86%); max-height: 52%; overflow: auto; background: #f7f5ed; color: #263c36; padding: .4rem .65rem; border-radius: .35rem; }
.rts-portrait-facilities summary { cursor: pointer; padding: .25rem 0; }
.rts-portrait-facilities button { display: block; margin: .2rem 0; }

/* Keep settlement actions beside each other in the shared resource header. */
.game-shell .game-hud > .rts-camp-info { margin-inline-start: auto; }
.game-shell .game-hud > .rts-topbar__profile { margin-inline-start: 0; gap: .3rem; }
.game-shell .game-hud > .rts-camp-info + .rts-topbar__profile { margin-inline-start: .3rem; }
@media (max-width: 640px) {
  .game-shell .game-hud > .rts-camp-info { grid-column: 2; grid-row: 2; margin-inline-start: 0; }
  .game-shell .game-hud > .rts-topbar__profile { grid-column: 3; grid-row: 2; justify-content: flex-end; flex-wrap: nowrap; }
}
.rts-portrait-pin[data-sabotaged="true"]{border-color:#e0aa43;box-shadow:0 0 0 2px #6f451b,0 3px 12px #000b}
