:root {
  color-scheme: dark;
  --black: #0c0c0a;
  --ink: #12110d;
  --glass: rgba(18, 17, 13, 0.94);
  --glass-soft: rgba(18, 17, 13, 0.78);
  --paper: #f1ead8;
  --muted: #aaa18f;
  --line: rgba(241, 234, 216, 0.18);
  --line-strong: rgba(241, 234, 216, 0.34);
  --gold: #e2bd62;
  --gold-deep: #8f6822;
  --red: #d84b3f;
  --red-deep: #76251f;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-h: 68px;
  --reserve-h: 118px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
html { background: var(--black); }
body {
  background: var(--black);
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
button:focus-visible, a:focus-visible, canvas:focus-visible, summary:focus-visible {
  outline: 3px solid #fff3c8;
  outline-offset: 3px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
#game { position: fixed; inset: 0; overflow: hidden; background: #19160f; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#stage.is-dragging { cursor: grabbing; }
#stage.is-commanding { cursor: crosshair; }

.command-bar {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  min-height: calc(var(--bar-h) + var(--safe-top));
  padding: var(--safe-top) 18px 0;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 118px minmax(250px, 360px) minmax(155px, .52fr) auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 10, 8, .97), rgba(14, 14, 11, .9));
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .22);
}
.identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.back {
  min-height: 44px; display: inline-flex; align-items: center;
  color: var(--muted); text-decoration: none;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
}
.back:hover { color: var(--paper); }
.brand { display: flex; align-items: baseline; white-space: nowrap; letter-spacing: .18em; font-size: 21px; }
.brand > span { color: var(--paper); }
.brand > em { color: var(--red); font-style: normal; }
.brand small {
  margin-left: 10px; color: var(--muted);
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}
.match-clock { min-width: 0; display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 4px 10px; }
.match-clock > span { color: var(--muted); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
.match-clock > strong { color: var(--paper); font: 600 22px/1 Georgia, serif; font-variant-numeric: tabular-nums; }
.match-clock > small { grid-column: 1/-1; color: var(--muted); font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; white-space: nowrap; }
.match-clock small b:first-child { color: var(--gold); }.match-clock small b:last-child { color: var(--red); }
.war-score { display: grid; grid-template-columns: 75px minmax(100px,1fr) 75px; align-items: center; gap: 10px; }
.score { display: flex; align-items: baseline; gap: 7px; }
.score small { color: var(--muted); font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.score strong { font: 600 27px/1 Georgia, serif; font-variant-numeric: tabular-nums; }
.score-gold strong { color: var(--gold); }.score-crimson { justify-content: flex-end; }.score-crimson strong { color: var(--red); }
.score-objectives { display: flex; align-items: center; justify-content: center; gap: 8px; height: 20px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.score-objectives i { width: 11px; height: 11px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(241,234,216,.08); transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.score-objectives i[data-owner="gold"] { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 4px rgba(226,189,98,.12); }
.score-objectives i[data-owner="crimson"] { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px rgba(216,75,63,.12); }
.score-objectives i[data-contested="true"] { background: #f5edd9; transform: scale(1.2); }
#mobile-match-time { display: none; }
.field-state { display: grid; grid-template-columns: 82px minmax(90px, 1fr) 82px; align-items: center; gap: 10px; }
.force { display: flex; align-items: baseline; gap: 8px; }
.force span, .command-points > span {
  color: var(--muted); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em;
}
.force strong { font: 600 23px/1 Georgia, serif; }
.force-us strong { color: var(--gold); }
.force-them { justify-content: flex-end; text-align: right; }
.force-them strong { color: var(--red); order: -1; }
.balance { position: relative; height: 7px; background: rgba(216, 75, 63, .42); overflow: hidden; }
.balance i { display: block; width: 50%; height: 100%; background: var(--gold); transition: width .35s ease; }
.balance b { position: absolute; top: -4px; bottom: -4px; left: 50%; width: 1px; background: rgba(255,255,255,.65); transform: translateX(-.5px); }
.command-points { justify-self: center; display: grid; grid-template-columns: auto auto auto; align-items: baseline; column-gap: 6px; min-width: 170px; }
.command-points strong { color: var(--paper); font: 600 26px/1 Georgia, serif; font-variant-numeric: tabular-nums; }
.command-points small { color: var(--muted); font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.points-track { grid-column: 1 / -1; margin-top: 7px; height: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.points-track i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .18s linear; }
.bar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.connection { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.connection i { width: 6px; height: 6px; border-radius: 50%; background: #b78235; box-shadow: 0 0 0 3px rgba(183,130,53,.12); }
.connection b { font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.connection[data-state="live"] i { background: #69b58a; box-shadow: 0 0 0 3px rgba(105,181,138,.12); }
.connection[data-state="offline"] i { background: var(--red); box-shadow: 0 0 0 3px rgba(216,75,63,.14); }
#intel-toggle, #support-toggle, #intel-close, #support-close, .map-tools button, #order-actions button {
  min-height: 44px; border: 1px solid var(--line-strong); background: rgba(12,12,10,.72);
  padding: 0 13px; cursor: pointer;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em;
}
#intel-toggle:hover, #intel-toggle[aria-expanded="true"], #support-toggle:hover, #support-toggle[aria-expanded="true"], .map-tools button:hover { border-color: var(--gold); color: #fff; }

#objective-bar { position: fixed; z-index: 18; top: calc(var(--bar-h) + var(--safe-top)); left: 50%; width: min(720px, calc(100vw - 360px)); min-width: 480px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-top: 0; background: rgba(11,10,8,.92); backdrop-filter: blur(12px); }
#objective-bar button { position: relative; min-width: 0; min-height: 52px; display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 8px; padding: 6px 12px 9px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
#objective-bar button:last-child { border-right: 0; }
#objective-bar button:hover { background: rgba(255,255,255,.035); }
#objective-bar button > i { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--paper); font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; }
#objective-bar span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#objective-bar b, #objective-bar small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#objective-bar b { color: var(--paper); font-size: 10px; letter-spacing: .08em; }
#objective-bar small { color: var(--muted); font-size: 9px; letter-spacing: .1em; }
#objective-bar em { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; background: rgba(255,255,255,.06); }
#objective-bar em u { display: block; width: 0; height: 100%; background: var(--paper); transform-origin: left; transition: width .18s linear, background .18s ease; text-decoration: none; }
#objective-bar button[data-owner="gold"] > i { border-color: var(--gold); color: var(--gold); }
#objective-bar button[data-owner="crimson"] > i { border-color: var(--red); color: var(--red); }
#objective-bar button[data-owner="gold"] em u { background: var(--gold); }
#objective-bar button[data-owner="crimson"] em u { background: var(--red); }
#objective-bar button[data-contested="true"] { background: rgba(255,255,255,.07); }

.map-tools { position: fixed; z-index: 12; top: calc(var(--bar-h) + var(--safe-top) + 66px); left: 14px; display: flex; gap: 6px; }
.map-tools button { min-width: 44px; min-height: 44px; padding: 0 10px; background: var(--glass-soft); backdrop-filter: blur(8px); }

#tactics { position: fixed; z-index: 16; top: calc(var(--bar-h) + var(--safe-top) + 66px); right: 14px; display: flex; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--line); background: var(--glass-soft); backdrop-filter: blur(10px); }
#tactics > span { padding: 0 6px; color: var(--muted); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
#tactics button { min-width: 86px; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 0 10px; border: 1px solid var(--line-strong); background: rgba(12,12,10,.82); cursor: pointer; }
#tactics button b { font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
#tactics button small { color: var(--gold); font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
#tactics button:hover, #tactics button.is-active { border-color: var(--gold); background: #211d12; }
#tactics button.is-locked { border-color: var(--line); background: rgba(12,12,10,.72); }
#tactics button.is-locked small { color: var(--muted); }
#tactics button[data-ability="barrage"]:hover, #tactics button[data-ability="barrage"].is-active { border-color: var(--red); }

#order-ribbon {
  position: fixed; z-index: 15; left: 50%; bottom: calc(var(--reserve-h) + var(--safe-bottom) + 12px);
  transform: translateX(-50%); max-width: min(650px, calc(100vw - 32px)); min-height: 48px;
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 10px 9px 14px; border: 1px solid var(--line-strong);
  background: var(--glass); backdrop-filter: blur(12px); box-shadow: 0 12px 35px rgba(0,0,0,.32);
}
.order-eyebrow { color: var(--gold); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
#game[data-mode="command"] .order-eyebrow { color: #fff; }
#order-title { white-space: nowrap; font-size: 15px; }
#order-help { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#order-actions { display: flex; align-items: center; gap: 5px; }
#order-actions button { min-width: 52px; min-height: 44px; padding: 0 9px; background: rgba(12,12,10,.78); }
#order-actions button:hover { border-color: var(--gold); }
#order-actions button[hidden] { display: none; }
#formation-toggle { color: var(--gold); }
#select-all { color: var(--paper); }

#reserve {
  position: fixed; z-index: 14; left: 0; right: 0; bottom: 0;
  height: calc(var(--reserve-h) + var(--safe-bottom)); padding: 10px 18px calc(10px + var(--safe-bottom));
  display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: stretch; gap: 12px;
  border-top: 1px solid var(--line); background: linear-gradient(0deg, rgba(9,9,7,.98), rgba(15,14,11,.94));
  backdrop-filter: blur(14px);
}
.reserve-label { align-self: center; display: flex; flex-direction: column; gap: 5px; }
.reserve-label span { color: var(--paper); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.reserve-label small { color: var(--muted); font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
#cards { display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); gap: 8px; min-width: 0; }
#cards button {
  position: relative; min-width: 0; min-height: 96px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: #171610; padding: 10px 9px 8px 72px; text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
#cards button:hover { border-color: var(--line-strong); background: #1d1b13; transform: translateY(-1px); }
#cards button.is-active { border-color: var(--gold); background: #211d12; box-shadow: inset 0 0 0 1px rgba(226,189,98,.35); }
#cards button.is-locked { opacity: .62; }
#cards img { position: absolute; left: 5px; bottom: 2px; width: 62px; height: 78px; object-fit: contain; object-position: center bottom; filter: saturate(.86) contrast(1.08); }
#cards .key { position: absolute; top: 6px; right: 7px; color: var(--muted); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
#cards strong { display: block; font-size: 16px; line-height: 1.1; }
#cards .cost { display: block; margin-top: 5px; color: var(--gold); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
#cards .role { display: block; margin-top: 6px; color: var(--muted); font: 9px/1.15 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .06em; }

#intel, #support {
  position: fixed; z-index: 30; top: calc(var(--bar-h) + var(--safe-top)); right: 0; bottom: calc(var(--reserve-h) + var(--safe-bottom));
  width: min(390px, 92vw); padding: 18px; overflow: auto; overscroll-behavior: contain;
  border-left: 1px solid var(--line-strong); background: rgba(13,13,10,.98); box-shadow: -22px 0 60px rgba(0,0,0,.38);
  transform: translateX(102%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s;
  touch-action: pan-y;
}
#intel.is-open, #support.is-open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
.intel-head, .support-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.intel-head > div, .support-head > div { display: flex; flex-direction: column; gap: 5px; }
.intel-head span, .support-head span, .section-label span, .intel-split span { color: var(--red); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; }
.intel-head strong, .support-head strong { font-size: 18px; }

#support { z-index: 32; width: min(430px, 94vw); }
.support-deck { margin: 18px 0; color: #d7cebb; font-size: 15px; line-height: 1.55; }
#support-tiers { display: grid; gap: 8px; }
#support-tiers button { min-height: 68px; display: grid; grid-template-columns: 56px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; gap: 3px 12px; padding: 10px 13px; border: 1px solid var(--line); background: #171610; text-align: left; cursor: pointer; }
#support-tiers button:hover { border-color: var(--gold); background: #211d12; }
#support-tiers button b { grid-row: 1/-1; color: var(--gold); font: 600 25px/1 Georgia, serif; }
#support-tiers button span { color: var(--paper); font-size: 15px; }
#support-tiers button small { color: var(--muted); font: 10px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; }
#custom-support { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
#custom-support label { display: block; margin-bottom: 8px; color: var(--muted); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
#custom-support > div { min-height: 50px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; border: 1px solid var(--line-strong); background: #11100c; }
#custom-support > div > span { padding-left: 12px; color: var(--gold); font: 600 20px/1 Georgia, serif; }
#support-amount { min-width: 0; height: 48px; padding: 0 9px; border: 0; outline: 0; background: transparent; color: var(--paper); font: 600 20px/1 Georgia, serif; user-select: text; }
#custom-support button { align-self: stretch; min-width: 108px; border: 0; border-left: 1px solid var(--line-strong); background: var(--gold); color: #17130a; cursor: pointer; font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
#custom-support button:disabled, #support-tiers button:disabled { opacity: .55; cursor: wait; }
#support-status { min-height: 18px; margin: 12px 0 0; color: var(--gold); font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
#support-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.section-label { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 8px; }
.section-label small { color: var(--muted); font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
#radar { display: block; width: 100%; height: 150px; border: 1px solid var(--line); background: #17150f; cursor: crosshair; touch-action: manipulation; }
.intel-split { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.intel-split > div { padding: 13px 10px 13px 0; display: flex; flex-direction: column; gap: 5px; }
.intel-split > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.intel-split strong { font-size: 18px; }
.intel-split small { color: var(--muted); }
#roster-lines, #feed { list-style: none; padding: 0; margin: 0; }
#roster-lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
#roster-lines li span { font: 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
#roster-lines li .ours { color: var(--gold); }
#roster-lines li .theirs { color: var(--red); }
#feed { max-height: 150px; overflow: hidden; }
#feed li { padding: 5px 0; color: var(--muted); font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
#feed li.hot { color: var(--paper); }
.orders-help { margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.orders-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--paper); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; }
.orders-help p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.orders-help b { color: var(--paper); }
.intel-match p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.intel-score { margin-top: 12px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.intel-score b { font: 600 25px/1 Georgia, serif; }.intel-score b:first-child { color: var(--gold); }.intel-score b:last-child { color: var(--red); }
.intel-score span { color: var(--muted); text-align: center; font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }

#toast { position: fixed; z-index: 40; top: calc(var(--bar-h) + var(--safe-top) + 14px); left: 50%; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; padding: 10px 14px; background: #11100c; border: 1px solid var(--line-strong); color: var(--paper); font: 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; transition: opacity .16s ease, transform .16s ease; }
#toast.is-showing { opacity: 1; transform: translate(-50%, 0); }

#resolution { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .28s ease, visibility 0s linear .28s; }
#resolution.is-open { visibility: visible; opacity: 1; pointer-events: auto; transition-delay: 0s; }
.resolution-wash { position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(13,12,8,.72), rgba(8,8,6,.96)); backdrop-filter: blur(7px); }
.resolution-copy { position: relative; width: min(620px, calc(100vw - 36px)); padding: 52px 42px; text-align: center; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--line-strong); background: rgba(12,11,8,.88); box-shadow: 0 40px 100px rgba(0,0,0,.5); }
#resolution[data-result="defeat"] .resolution-copy { border-top-color: var(--red); }
#resolution-kicker { margin: 0 0 10px; color: var(--gold); font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; }
#resolution[data-result="defeat"] #resolution-kicker { color: var(--red); }
#resolution h2 { margin: 0; font-size: clamp(42px, 7vw, 86px); line-height: .9; letter-spacing: -.035em; }
#resolution-reason { margin: 18px auto 22px; color: var(--muted); font-size: 16px; }
.resolution-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; max-width: 360px; margin: 0 auto; }
.resolution-score b { font: 600 38px/1 Georgia, serif; }.resolution-score b:first-child { color: var(--gold); }.resolution-score b:last-child { color: var(--red); }
.resolution-score span { color: var(--muted); font: 800 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
#resolution-next { margin: 22px 0 12px; color: var(--paper); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
#view-aftermath { min-height: 48px; padding: 0 18px; border: 1px solid var(--line-strong); background: transparent; color: var(--paper); cursor: pointer; font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
#view-aftermath:hover { border-color: var(--gold); }

#boot { position: fixed; z-index: 100; inset: 0; overflow: hidden; background: #0c0b09; transition: opacity .45s ease, visibility 0s linear .45s; }
#boot.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
#boot-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .86; filter: saturate(.84) contrast(1.08) brightness(.86); transform: scale(1.03); animation: boot-breathe 12s ease-in-out infinite alternate; }
.boot-wash { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,9,7,.96) 0%, rgba(10,9,7,.78) 38%, rgba(10,9,7,.2) 70%, rgba(10,9,7,.52) 100%), linear-gradient(0deg, rgba(8,8,6,.72), transparent 48%); }
.boot-copy { position: relative; z-index: 1; width: min(620px, 88vw); min-height: 100%; padding: max(32px, var(--safe-top)) 5vw max(38px, var(--safe-bottom)); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.boot-back { position: absolute; top: max(22px, calc(var(--safe-top) + 16px)); left: 5vw; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; }
.boot-kicker { margin: 0 0 13px; color: var(--red); font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .22em; }
#boot h1 { margin: 0; display: flex; font-size: clamp(58px, 9vw, 126px); line-height: .83; letter-spacing: -.035em; text-shadow: 0 5px 25px #000; }
#boot h1 span { color: var(--paper); }
#boot h1 em { color: var(--red); font-style: normal; }
.boot-deck { max-width: 550px; margin: 24px 0 20px; color: #ddd4c0; font-size: clamp(17px, 2vw, 22px); line-height: 1.45; text-wrap: balance; }
.boot-sides { display: flex; gap: 22px; margin-bottom: 25px; }
.boot-sides div { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .11em; }
.boot-sides i { width: 9px; height: 9px; border-radius: 50%; }
.boot-sides .gold { background: var(--gold); box-shadow: 0 0 0 4px rgba(226,189,98,.12); }
.boot-sides .red { background: var(--red); box-shadow: 0 0 0 4px rgba(216,75,63,.12); }
#enter { min-width: 280px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 5px; padding: 12px 22px; border: 1px solid #edcf82; background: var(--gold); color: #17130a; cursor: pointer; box-shadow: 0 10px 35px rgba(0,0,0,.28); transition: transform .15s ease, filter .15s ease; }
#enter:hover { filter: brightness(1.08); }
#enter span { font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; }
#enter small { font-size: 12px; }
.boot-note { margin: 12px 0 0; color: var(--muted); font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }

@keyframes boot-breathe { from { transform: scale(1.03); } to { transform: scale(1.08); } }

@media (max-width: 920px) {
  :root { --bar-h: 58px; --reserve-h: 96px; }
  .command-bar { grid-template-columns: minmax(145px, 1fr) 86px minmax(190px, 230px) 96px auto; gap: 7px; padding-left: 11px; padding-right: 9px; }
  .identity { gap: 8px; }.back { font-size: 8px; }.brand { font-size: 16px; }.brand small { display: none; }
  .match-clock > small { display: none; }.match-clock > strong { font-size: 19px; }
  .war-score { grid-template-columns: 48px minmax(80px,1fr) 48px; gap: 6px; }.score small { display: none; }.score strong { font-size: 22px; }
  .field-state { grid-template-columns: 55px minmax(64px, 1fr) 55px; gap: 6px; }
  .force { gap: 4px; }.force span { display: none; }.force strong { font-size: 20px; }
  .command-points { min-width: 96px; grid-template-columns: auto auto; column-gap: 4px; }.command-points > span { display: none; }.command-points strong { font-size: 22px; }.points-track { grid-column: 1/-1; }
  .connection b { display: none; }
  #intel-toggle { padding: 0 10px; }
  #reserve { grid-template-columns: 0 minmax(0,1fr); gap: 0; padding: 7px 6px calc(7px + var(--safe-bottom)); }
  .reserve-label { overflow: hidden; opacity: 0; }
  #cards { display: flex; gap: 5px; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: none; scroll-snap-type: x proximity; }
  #cards::-webkit-scrollbar { display: none; }
  #cards button { flex: 0 0 112px; min-height: 82px; padding: 47px 2px 4px; text-align: center; scroll-snap-align: start; }
  #cards img { left: 50%; transform: translateX(-50%); bottom: 27px; width: 54px; height: 54px; object-fit: contain; object-position: center bottom; }
  #cards strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #cards .cost { margin-top: 3px; font-size: 9px; }
  #cards .role { display: none; }
  #cards .key { top: 4px; right: 5px; font-size: 8px; }
  #order-ribbon { bottom: calc(var(--reserve-h) + var(--safe-bottom) + 8px); max-width: calc(100vw - 20px); grid-template-columns: auto auto minmax(0,1fr) auto; gap: 7px; padding: 8px 8px 8px 10px; }
  #order-title { font-size: 13px; }
  #order-help { font-size: 11px; }
  #objective-bar { width: min(620px, calc(100vw - 24px)); min-width: 0; }
  .map-tools { top: calc(var(--bar-h) + var(--safe-top) + 62px); left: 8px; }
  .map-tools button { min-height: 44px; font-size: 8px; padding: 0 8px; }
  #tactics { top: calc(var(--bar-h) + var(--safe-top) + 62px); right: 8px; }
  #intel, #support { top: calc(var(--bar-h) + var(--safe-top)); bottom: calc(var(--reserve-h) + var(--safe-bottom)); }
}

@media (max-width: 560px) {
  :root { --bar-h: 54px; --reserve-h: 88px; }
  .command-bar { grid-template-columns: minmax(76px, 1fr) minmax(92px, 1.05fr) 42px 94px; gap: 4px; padding-left: 8px; padding-right: 7px; }
  .back { display: none; }.brand { font-size: 14px; letter-spacing: .1em; }
  .match-clock { display: none; }
  .war-score { grid-template-columns: 23px minmax(54px,1fr) 23px; gap: 4px; }.score strong { font-size: 18px; }.score-objectives { height: 42px; display: grid; grid-template-columns: repeat(3,8px); place-content: center; gap: 4px 5px; border: 0; }.score-objectives i { width: 8px; height: 8px; }#mobile-match-time { display: block; grid-column: 1/-1; color: var(--muted); font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-align: center; white-space: nowrap; }
  .field-state { grid-template-columns: 23px minmax(52px, 1fr) 23px; gap: 4px; }.force strong { font-size: 17px; }
  .command-points { min-width: 0; justify-self: end; grid-template-columns: auto; }.command-points strong { font-size: 19px; }.command-points small { display: none; }.points-track { width: 43px; }
  .command-points { border-left: 1px solid var(--line); padding-left: 8px; }
  .bar-actions { gap: 4px; }.connection { display: none; }#intel-toggle, #support-toggle { min-width: 44px; min-height: 44px; padding: 0 5px; font-size: 7px; letter-spacing: .05em; }
  #objective-bar { top: calc(var(--bar-h) + var(--safe-top)); left: 0; width: 100%; min-width: 0; transform: none; }
  #objective-bar button { min-height: 52px; grid-template-columns: 23px minmax(0,1fr); gap: 5px; padding: 5px 6px 8px; }
  #objective-bar button > i { width: 22px; height: 22px; font-size: 8px; }
  #objective-bar b { font-size: 9px; letter-spacing: .03em; }#objective-bar small { font-size: 8px; }
  .map-tools { top: calc(var(--bar-h) + var(--safe-top) + 59px); }.map-tools button { min-height: 44px; }
  .map-tools #fullscreen { display: none; }
  #tactics { top: calc(var(--bar-h) + var(--safe-top) + 59px); right: 8px; padding: 4px; }
  #tactics > span { display: none; }#tactics button { min-width: 66px; min-height: 44px; padding: 0 7px; gap: 5px; }#tactics button b { font-size: 9px; letter-spacing: .04em; }
  #order-ribbon { min-height: 44px; grid-template-columns: auto minmax(0,1fr) auto; }
  .order-eyebrow { font-size: 8px; }#order-title { overflow: hidden; text-overflow: ellipsis; }#order-help { display: none; }
  #order-actions { gap: 3px; }
  #order-actions button { min-width: 44px; min-height: 44px; padding: 0 6px; font-size: 8px; letter-spacing: .05em; }
  #cards button { flex-basis: 96px; min-height: 74px; padding-top: 39px; }
  #cards img { bottom: 24px; width: 45px; height: 47px; }
  #cards strong { font-size: 10px; }
  #intel, #support { top: 0; bottom: 0; width: 100%; padding: calc(16px + var(--safe-top)) 14px calc(18px + var(--safe-bottom)); border-left: 0; background:#0d0d0a; }
  #radar { height: 138px; }
  .boot-wash { background: linear-gradient(0deg, rgba(10,9,7,.98) 0%, rgba(10,9,7,.78) 47%, rgba(10,9,7,.3) 100%); }
  #boot-art { object-position: 58% center; opacity: .72; }
  .boot-copy { justify-content: flex-end; width: 100%; padding: max(72px, var(--safe-top)) 20px max(28px, calc(var(--safe-bottom) + 20px)); }
  .boot-back { left: 20px; }
  .boot-kicker { font-size: 9px; margin-bottom: 9px; }
  #boot h1 { font-size: clamp(42px, 13vw, 58px); }
  .boot-deck { margin: 17px 0 15px; font-size: 16px; line-height: 1.42; }
  .boot-sides { flex-direction: column; gap: 10px; margin-bottom: 18px; }
  #enter { width: 100%; min-width: 0; min-height: 58px; }
  .resolution-copy { padding: 38px 20px; }.resolution-score { gap: 12px; }#resolution h2 { font-size: clamp(40px, 14vw, 58px); }
}

@media (max-width: 350px) {
  .brand { font-size: 12px; }.war-score { display: none; }.command-bar { grid-template-columns: 1fr 58px 94px; }
  #cards strong { font-size: 9px; }.map-tools #fit-view { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
