:root {
  color-scheme: dark;
  --bg: #0b141a;
  --panel: #14232b;
  --panel-2: #1b2d35;
  --line: #32454b;
  --line-bright: #526367;
  --gold: #e0bf79;
  --gold-bright: #f0d784;
  --text: #f0eee5;
  --muted: #b3c1c4;
  --teal: #7ed3c4;
  --danger: #ffb1a4;
  --serif: Georgia, 'Times New Roman', serif;
  --topbar-height: 62px;
  --resource-height: 60px;
  --status-height: 36px;
  --nav-height: 66px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body { margin: 0; background: #081117; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--text); min-height: 46px; padding: 11px 16px; font-weight: 650; }
button:hover { border-color: var(--gold); background: #263b43; }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
a { color: var(--gold); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(29px, 8.5vw, 38px); line-height: 1.08; }
h2 { font-size: 23px; }
h3 { font-size: 20px; line-height: 1.2; }
p { line-height: 1.5; }
small, .muted { color: var(--muted); }
.app-shell { width: min(100%, 760px); height: 100dvh; margin: auto; display: flex; flex-direction: column; overflow: hidden; border-inline: 1px solid #26353d; background: var(--bg); }
.topbar { flex: 0 0 var(--topbar-height); min-height: var(--topbar-height); padding: max(8px, env(safe-area-inset-top)) 18px 8px; display: flex; align-items: center; justify-content: space-between; background: #101e24; border-bottom: 1px solid #24343c; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: .17em; font-family: var(--serif); font-size: 21px; color: var(--text); }
.wordmark small { display: block; font-family: system-ui; font-size: 8px; letter-spacing: .19em; margin-top: 2px; }
.crest { font: 25px var(--serif); border: 1px solid var(--gold); color: var(--gold); width: 34px; height: 40px; display: grid; place-items: center; border-radius: 4px 4px 13px 13px; }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; min-height: 44px; padding: 8px; }
#game { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.resource-bar { flex: 0 0 var(--resource-height); min-height: var(--resource-height); display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); z-index: 7; }
.resource { min-width: 0; background: #15232b; padding: 8px 11px; display: flex; align-items: center; gap: 8px; }
.resource svg { width: 21px; height: 21px; color: var(--gold); flex-shrink: 0; }
.resource strong { font-size: 18px; font-variant-numeric: tabular-nums; display: block; font-weight: 700; }
.resource small { display: block; font-size: 9px; letter-spacing: .04em; }
.world-status { flex: 0 0 var(--status-height); min-height: var(--status-height); display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 16px; font-size: 10px; color: var(--teal); background: #102127; border-bottom: 1px solid #243940; }
.world-status .text-button { min-height: 44px; }
.world-status.offline { color: var(--danger); }
main { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #41555d transparent; padding: 0 18px 24px; scroll-padding: 12px 0 28px; background: radial-gradient(circle at 88% 8%, rgba(126, 211, 196, .045), transparent 28%), var(--bg); }
main:focus { outline: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: 10px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.page-heading { padding: 18px 0 13px; }
.page-heading p:last-child { font-size: 13px; color: var(--muted); margin-top: 7px; max-width: 58ch; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 11px; gap: 12px; }
.section-heading:first-child { margin-top: 11px; }
.section-heading small { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.view-tabs { position: sticky; top: 0; z-index: 6; display: flex; gap: 5px; padding: 7px 0; margin: 0 0 7px; background: rgba(11, 20, 26, .97); backdrop-filter: blur(16px); }
.view-tab { flex: 1 1 0; min-width: 0; min-height: 45px; padding: 7px 5px; border-radius: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.view-tab.active { color: var(--gold-bright); border-color: #7c6941; background: #29362f; box-shadow: inset 0 -2px 0 var(--gold); }
.tab-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 4px; padding-inline: 4px; border-radius: 9px; background: var(--gold); color: #14232b; font-size: 9px; font-weight: 800; }
.workspace-panel { animation: workspace-in .18s ease-out both; }
.hero { height: clamp(168px, 28dvh, 235px); margin: 0 -18px 14px; position: relative; overflow: hidden; background: #172b31; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: brightness(.82) saturate(.92); }
.hero:after { content: ''; position: absolute; inset: 26% 0 0; background: linear-gradient(transparent, rgba(8, 19, 25, .97)); }
.hero-copy { position: absolute; bottom: 18px; left: 18px; right: 18px; z-index: 1; text-shadow: 0 2px 10px #000; }
.hero-copy p:last-child { font-size: 12px; color: #d4dedb; margin-top: 6px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick { min-width: 0; min-height: 68px; padding: 10px 5px 9px; text-align: center; background: var(--panel); }
.quick svg { display: block; width: 23px; height: 23px; margin: 0 auto 6px; color: var(--gold); }
.quick span { display: block; font-size: 11px; }
.welcome { border-left: 2px solid var(--gold); padding-left: 13px; margin: 16px 0 18px; }
.welcome h3 { font-size: 19px; margin-bottom: 5px; }
.welcome p { font-size: 13px; color: var(--muted); }
.card { border: 1px solid var(--line); background: var(--panel); border-radius: 11px; padding: 15px; margin-bottom: 10px; overflow: hidden; }
.card p { font-size: 13px; color: var(--muted); margin-top: 7px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.compact-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; }
.compact-card .card-head { min-width: 0; }
.compact-card .row-action { min-width: 108px; }
.badge { display: inline-flex; align-items: center; border: 1px solid #415b5b; padding: 4px 7px; border-radius: 4px; color: var(--teal); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.badge.gold { color: var(--gold); border-color: #655c40; }
.badge.danger { color: var(--danger); border-color: #755149; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #2c3c44; }
.row:last-child { border-bottom: 0; }
.row strong { font-size: 13px; }
.row small { display: block; font-size: 11px; margin-top: 5px; }
.row button { font-size: 12px; flex-shrink: 0; }
.row .grow { min-width: 0; flex: 1; }
.row-action { align-self: stretch; min-height: 46px; padding: 8px 12px; font-size: 11px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions button { flex: 1; font-size: 12px; }
.primary { background: var(--gold); border-color: var(--gold); color: #172126; }
.primary:hover { background: #efd49b; color: #172126; }
.danger-button { color: var(--danger); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 13px 0; }
.stat { border-left: 1px solid var(--line); padding-left: 11px; }
.stat strong { display: block; font: 22px var(--serif); color: var(--gold); }
.stat small { font-size: 10px; }
.progress { height: 5px; accent-color: var(--teal); width: 100%; margin: 13px 0 8px; }
.empty { padding: 17px; border: 1px dashed #425157; border-radius: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty strong { color: var(--text); display: block; margin-bottom: 3px; }
.council-alert { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; margin: 14px 0; border-color: var(--gold); background: #26352e; }
.council-alert strong { font-size: 13px; }
.council-alert small { display: block; margin-top: 5px; font-size: 10px; }
.first-objective { position: relative; margin: 0 0 14px; padding: 16px; border: 1px solid #8a7648; border-radius: 12px; background: #1d2e2c; box-shadow: inset 0 1px 0 rgba(240, 215, 132, .12), 0 10px 28px rgba(0, 0, 0, .18); }
.objective-kicker { display: flex; justify-content: space-between; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.first-objective h2 { margin-top: 10px; }
.first-objective p { margin: 7px 0 13px; color: var(--muted); font-size: 12px; }
.first-objective > button { width: 100%; }
.order-path { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 13px; color: var(--teal); font-size: 9px; text-align: center; text-transform: uppercase; letter-spacing: .08em; }
.order-path span { position: relative; padding-top: 15px; }
.order-path span:before { content: ''; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: #4b6664; }
.order-path span:after { content: ''; position: absolute; top: 1px; left: 50%; width: 7px; height: 7px; border: 1px solid var(--teal); border-radius: 50%; background: #1d2e2c; transform: translateX(-50%); }
.nav-count { position: absolute; top: 4px; right: calc(50% - 19px); display: inline-grid; place-items: center; min-width: 16px; height: 16px; border-radius: 9px; background: var(--gold); color: #14232b; padding: 0 4px; font-size: 9px; font-weight: 800; }
.petition-card { position: relative; padding: 16px; border-color: #756541; background: linear-gradient(135deg, #1b2d31, #16262d); box-shadow: inset 0 1px 0 rgba(240, 215, 132, .09); }
.petition-seal { position: absolute; top: 14px; right: 14px; width: 30px; height: 34px; display: grid; place-items: center; border: 1px solid #8d7746; border-radius: 4px 4px 12px 12px; color: var(--gold); font: 18px var(--serif); opacity: .8; }
.petition-copy { padding-right: 36px; }
.petition-copy .deadline { color: var(--gold); font-size: 11px; }
.petition-choices { margin-top: 13px; display: grid; gap: 8px; }
.event-choice { margin: 0; }
.decision-choice { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; line-height: 1.35; }
.decision-choice > span { min-width: 0; }
.decision-choice small { flex: 0 0 auto; display: block; max-width: 42%; color: var(--gold); font-size: 10px; text-align: right; }
.council-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.tool-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 9px 11px; font-size: 11px; }
.tool-button svg { width: 20px; height: 20px; color: var(--gold); }
.council-footer-action { display: flex; justify-content: center; margin-top: 13px; }
.council-footer-action .tool-button { width: min(100%, 220px); }
.knowledge-list .row, .law-list .row { min-height: 62px; }
.office-list, .realm-list, .people-list { display: grid; gap: 9px; }
.person-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; }
.person-card p { margin-top: 4px; }
.map-frame { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #e5decd; box-shadow: 0 12px 32px rgba(0, 0, 0, .22); }
.world-map { width: 100%; height: auto; display: block; }
.map-pin { cursor: pointer; }
.map-pin circle { fill: #12262f; stroke: #d8c28b; stroke-width: 3; }
.map-pin.own circle { fill: #306459; stroke: #99e1ce; }
.map-pin circle.hit { fill: transparent; stroke: none; }
.map-pin text { fill: #fff; font: 600 19px system-ui; }
.map-pin:focus { outline: none; }
.map-pin:focus circle:not(.hit) { stroke: #fff; stroke-width: 6; }
.map-instruction { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border-radius: 7px; background: rgba(11, 20, 26, .88); color: var(--muted); font-size: 9px; backdrop-filter: blur(8px); }
.map-key { width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 5px; border: 1px solid #d8c28b; border-radius: 50%; color: white; background: #12262f; font-size: 9px; }
.map-key.own { border-color: #99e1ce; background: #306459; }
.map-caption { font-size: 10px; color: var(--muted); margin: 8px 2px 4px; }
.territory-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.territory-grid button { text-align: left; font-size: 12px; padding: 12px; min-height: 68px; }
.territory-grid small { font-weight: 400; display: block; font-size: 10px; margin-top: 6px; }
.income-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.income-grid strong { font: 25px var(--serif); color: var(--teal); display: block; }
.income-grid small { font-size: 10px; }
.ruler-card { display: flex; gap: 15px; align-items: flex-start; }
.ruler-card > img { width: 76px; height: 106px; object-fit: cover; flex-shrink: 0; border: 1px solid #88734c; border-radius: 4px; }
.ruler-card h3 { font-size: 18px; }
.ruler-card .card-head { flex-wrap: wrap; }
.ruler-card p { font-size: 12px; }
.cost { color: var(--gold); font-size: 12px; margin: 8px 0; }
.army-banner { display: flex; align-items: center; gap: 9px; margin: -15px -15px 16px; padding: 11px 15px; background: linear-gradient(110deg, #31433c, #15242c); color: var(--gold); font-size: 9px; letter-spacing: .18em; border-bottom: 1px solid #6f694b; }
.army-banner svg { width: 22px; height: 22px; }
.commander { display: flex; gap: 13px; margin: 16px 0; align-items: center; }
.commander > img { width: 76px; height: 98px; object-fit: cover; border: 1px solid #7e7451; border-radius: 4px; }
.commander > svg { width: 66px; height: 66px; }
.commander h3 { font-size: 21px; }
.commander .eyebrow { font-size: 9px; }
.route-strip { display: flex; justify-content: space-between; gap: 8px; padding: 11px 8px; background: #0e1d23; border-block: 1px solid var(--line); font-size: 10px; color: var(--teal); }
.officer { border-bottom: 1px solid var(--line); padding: 4px 0; }
.officer:last-child { border: 0; }
.officer summary { cursor: pointer; min-height: 54px; padding: 8px 5px; font-size: 13px; border-radius: 6px; }
.officer summary:hover { background: rgba(126, 211, 196, .05); }
.officer small { display: block; font-size: 11px; margin: 5px 0 0 16px; }
.officer-record { padding: 0 9px 12px 16px; }
.officer-record p { padding: 0; }
.chronicle-list { display: grid; gap: 9px; }
.dispatch { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.dispatch summary { position: relative; min-height: 74px; display: grid; grid-template-columns: 10px minmax(0, 1fr) 16px; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.dispatch summary::-webkit-details-marker { display: none; }
.dispatch-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(224, 191, 121, .1); }
.dispatch-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dispatch-heading .eyebrow { margin: 0; }
.dispatch time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.dispatch-preview { grid-column: 2 / 4; color: var(--muted); font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dispatch-chevron { width: 9px; height: 9px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .16s ease; }
.dispatch[open] .dispatch-chevron { transform: rotate(225deg); }
.dispatch[open] .dispatch-preview { display: none; }
.dispatch-full { padding: 0 34px 15px; color: var(--text); font-size: 13px; line-height: 1.58; }
#navigation { position: relative; flex: 0 0 auto; min-height: var(--nav-height); width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(16, 30, 36, .98); border-top: 1px solid #48534c; padding: 4px 5px max(6px, env(safe-area-inset-bottom)); z-index: 10; backdrop-filter: blur(16px); }
#navigation button { position: relative; min-width: 0; border: 0; background: none; color: var(--muted); padding: 6px 2px; font-weight: 550; font-size: 9px; border-radius: 7px; min-height: 54px; }
#navigation button > span:not(.nav-count) { display: block; }
#navigation svg { display: block; width: 21px; height: 21px; margin: 0 auto 4px; }
#navigation button[aria-current=page] { color: var(--gold-bright); background: #28312b; box-shadow: inset 0 2px 0 rgba(240, 215, 132, .28); }
#notice { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-height) + 14px); width: calc(100% - 32px); max-width: 620px; border: 1px solid var(--gold); padding: 13px 17px; background: #24373d; box-shadow: 0 8px 30px #0009; border-radius: 10px; font-size: 13px; line-height: 1.5; }
dialog { padding: 20px; border: 1px solid #5c665d; border-radius: 18px 18px 0 0; background: #14232b; color: var(--text); max-height: min(88dvh, 760px); width: min(100%, 720px); max-width: 100%; margin: auto auto 0; overflow: auto; box-shadow: 0 -15px 60px #0009; }
dialog::backdrop { background: #050b10bf; backdrop-filter: blur(3px); }
#onboarding { width: min(calc(100% - 24px), 620px); height: min(calc(100dvh - 24px), 720px); max-width: 620px; max-height: 720px; margin: auto; padding: 0; overflow: hidden; border: 1px solid #89754a; border-radius: 16px; background: #101f26; box-shadow: 0 24px 80px #000c, inset 0 1px 0 rgba(240, 215, 132, .12); }
#onboarding[open] { display: flex; flex-direction: column; }
#onboarding::backdrop { background: #050a0ee8; backdrop-filter: blur(7px); }
#onboardingContent { min-height: 0; height: 100%; display: flex; flex-direction: column; padding: 16px; overflow: hidden; }
.onboarding-top { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.onboarding-skip { min-height: 44px; padding: 5px 7px; border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.onboarding-progress { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 4px 0 13px; }
.onboarding-progress span { height: 3px; border-radius: 2px; background: #2e4349; }
.onboarding-progress .filled { background: var(--gold); box-shadow: 0 0 10px rgba(224, 191, 121, .22); }
.onboarding-scene { position: relative; flex: 1 1 210px; min-height: 145px; max-height: 245px; margin: 0 -16px 15px; overflow: hidden; border-block: 1px solid #34484e; background: #172b31; }
.onboarding-scene > img:first-child { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7) saturate(.9); }
.onboarding-scene:after { content: ''; position: absolute; inset: 25% 0 0; background: linear-gradient(transparent, #101f26); }
.onboarding-ruler { position: absolute; z-index: 1; right: 16px; bottom: 0; width: 88px; height: 126px; object-fit: cover; object-position: top; border: 1px solid #9a8352; border-bottom: 0; border-radius: 5px 5px 0 0; box-shadow: 0 8px 24px #0008; }
.onboarding-resources { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 22px; }
.onboarding-resources > div { min-width: 0; min-height: 112px; padding: 14px 7px; border: 1px solid var(--line); border-radius: 10px; background: #16272e; text-align: center; }
.onboarding-resources svg { width: 27px; height: 27px; margin-bottom: 9px; color: var(--gold); }
.onboarding-resources strong, .onboarding-resources small { display: block; }
.onboarding-resources strong { font-size: 12px; }
.onboarding-resources small { margin-top: 5px; font-size: 9px; line-height: 1.35; }
.onboarding-loop { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 24px; }
.onboarding-loop > div { position: relative; min-width: 0; min-height: 118px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 10px; background: #16272e; text-align: center; }
.onboarding-loop > div:not(:last-child):after { content: ''; position: absolute; right: -9px; top: 35px; z-index: 2; width: 16px; height: 1px; background: var(--gold); }
.onboarding-loop span { width: 28px; height: 28px; display: grid; place-items: center; margin: 0 auto 10px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: 16px var(--serif); }
.onboarding-loop strong, .onboarding-loop small { display: block; }
.onboarding-loop strong { font-size: 12px; }
.onboarding-loop small { margin-top: 5px; font-size: 9px; line-height: 1.35; }
.onboarding-mission { flex: 0 0 auto; min-height: 128px; display: flex; align-items: center; gap: 17px; margin: 17px 0 23px; padding: 20px; border: 1px solid #847146; border-radius: 12px; background: #21332f; }
.onboarding-mission svg { flex: 0 0 auto; width: 46px; height: 46px; color: var(--gold); }
.onboarding-mission strong, .onboarding-mission small { display: block; }
.onboarding-mission small { margin-top: 7px; font-size: 11px; line-height: 1.45; }
.onboarding-copy { flex: 0 0 auto; }
.onboarding-copy h1:focus { outline: none; }
.onboarding-copy h1 { font-size: clamp(28px, 8vw, 38px); }
.onboarding-copy > p:last-child { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.onboarding-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 16px; }
.onboarding-actions .primary { flex: 1; min-height: 50px; }
.onboarding-actions small { flex: 0 0 auto; font-size: 9px; }
.settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 15px 0; }
.sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.close { font-size: 26px; min-width: 46px; min-height: 46px; padding: 0; background: transparent; border: 0; }
.sheet-top .eyebrow { margin: 0; }
#sheetContent > p { margin: 13px 0; color: var(--muted); font-size: 14px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 17px 0 8px; }
input, select { width: 100%; min-height: 48px; border: 1px solid var(--line-bright); border-radius: 7px; background: #0c1b22; color: var(--text); padding: 11px; font-size: 16px; }
form > .primary { width: 100%; margin: 19px 0 5px; }
.login { min-height: 0; overflow-y: auto; }
.login-art { height: 230px; background: url(capital.png) center / cover; }
.login-copy { padding: 27px 25px; }
.login-copy > p { margin: 17px 0; color: var(--muted); font-size: 14px; }
.login-copy .eyebrow { color: var(--gold); font-size: 10px; }
.inline-note { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 12px 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
[hidden] { display: none !important; }
@media (min-width: 600px) {
  .resource { justify-content: center; }
  main { padding-inline: 26px; }
  .hero { margin-inline: -26px; }
  .hero-copy { left: 28px; }
  .territory-grid { grid-template-columns: repeat(3, 1fr); }
  .realm-list, .office-list, .people-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .petition-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-art { height: 320px; }
}
@media (max-width: 360px) {
  main { padding-inline: 14px; }
  .hero { margin-inline: -14px; }
  .wordmark { font-size: 19px; }
  .resource { padding-inline: 8px; gap: 6px; }
  .resource svg { width: 19px; height: 19px; }
  .resource strong { font-size: 16px; }
  .view-tab { font-size: 10px; padding-inline: 3px; }
  .decision-choice { align-items: flex-start; flex-direction: column; }
  .decision-choice small { max-width: none; text-align: left; }
  .compact-card { grid-template-columns: 1fr; }
  .compact-card .row-action { width: 100%; }
}
@media (max-height: 700px) {
  :root { --topbar-height: 50px; --resource-height: 50px; --status-height: 44px; --nav-height: 58px; }
  .topbar { padding-block: 5px; }
  .crest { width: 30px; height: 34px; font-size: 21px; }
  .wordmark { font-size: 19px; }
  .resource { padding-block: 5px; }
  .resource strong { font-size: 16px; }
  .hero { height: 150px; }
  .hero-copy { bottom: 13px; }
  .page-heading { padding-block: 13px 9px; }
  .page-heading p:last-child { display: none; }
  .quick { min-height: 58px; padding-block: 7px; }
  .quick svg { width: 20px; height: 20px; margin-bottom: 4px; }
  #navigation button { min-height: 48px; padding-block: 4px; }
  #onboardingContent { padding: 12px 14px; }
  .onboarding-progress { margin-bottom: 8px; }
  .onboarding-scene { min-height: 110px; max-height: 145px; margin-inline: -14px; margin-bottom: 10px; }
  .onboarding-ruler { height: 96px; width: 68px; }
  .onboarding-resources, .onboarding-loop { margin-block: 7px 11px; }
  .onboarding-resources > div, .onboarding-loop > div { min-height: 88px; padding-block: 9px; }
  .onboarding-copy h1 { font-size: 27px; }
  .onboarding-copy > p:last-child { margin-top: 7px; font-size: 12px; line-height: 1.43; }
  .onboarding-mission { min-height: 86px; margin-block: 7px 11px; padding: 12px; }
  .onboarding-actions { padding-top: 10px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  :root { --topbar-height: 42px; --resource-height: 42px; --status-height: 44px; --nav-height: 52px; }
  .topbar { padding-inline: 14px; }
  .wordmark small, .resource small { display: none; }
  .crest { width: 27px; height: 30px; font-size: 19px; border-radius: 3px 3px 10px 10px; }
  .resource { justify-content: center; padding: 3px 8px; }
  .resource strong { font-size: 15px; }
  .resource svg { width: 18px; height: 18px; }
  main { padding-bottom: 14px; }
  .hero { height: 116px; }
  .hero-copy h1 { font-size: 27px; }
  .page-heading { padding-block: 10px 7px; }
  .view-tabs { padding-block: 4px; }
  .view-tab { min-height: 40px; }
  .section-heading { margin-block: 10px 8px; }
  .army-card { max-width: 560px; margin-inline: auto; }
  dialog { max-height: 94dvh; }
  #onboarding { width: min(calc(100% - 20px), 760px); height: calc(100dvh - 16px); max-width: 760px; max-height: none; }
  #onboardingContent { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(330px, 1.1fr); grid-template-rows: 44px 10px 1fr auto; column-gap: 20px; padding: 11px 16px; }
  .onboarding-top, .onboarding-progress { grid-column: 1 / -1; }
  .onboarding-scene, .onboarding-resources, .onboarding-loop, .onboarding-mission { grid-column: 1; grid-row: 3 / 5; align-self: stretch; margin: 7px 0 0; max-height: none; min-height: 0; }
  .onboarding-scene { height: auto; }
  .onboarding-resources, .onboarding-loop { grid-template-columns: 1fr; gap: 5px; }
  .onboarding-resources > div, .onboarding-loop > div { min-height: 0; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 5px 9px; text-align: left; }
  .onboarding-resources svg, .onboarding-loop span { grid-row: 1 / 3; margin: 0; }
  .onboarding-loop > div:not(:last-child):after { display: none; }
  .onboarding-copy { grid-column: 2; grid-row: 3; align-self: center; }
  .onboarding-actions { grid-column: 2; grid-row: 4; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .dispatch-chevron { transition: background .15s, border-color .15s, color .15s, transform .15s; }
  dialog[open] { animation: arrive .18s ease-out; }
  @keyframes arrive { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes workspace-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}
