/* Weather or Not - skin from the Claude Design handoff (deisgn/README.md).
 * Tokens first; gold means Favor / the divine / the primary action and nothing else. */
:root {
  --sky-0: #070b18; --sky-1: #0c1226; --sky-2: #121a33; --sky-3: #1a2446; --sky-4: #243059;
  --line: #2a3659; --line-strong: #3b4a7a;
  --ink: #eef1fb; --ink-2: #aab4d4; --ink-3: #717ea6;
  --gold: #e3bd6a; --gold-bright: #f6dc96; --gold-deep: #b58a2e; --gold-ink: #241a06;
  --grew: #86e3a6; --held: #c7cfe6; --suffered: #ffc857; --lost: #ff7b6b; --flood: #6fb6ff;
  --forecast: #b8a3ff; --forecast-ink: #d6cbff;
  --frostkin: #8fcbff; --meadfolk: #ff8fa3; --sunwalkers: #ffab3d; --tidefolk: #40d9b0;
  --serif: Baskerville, "Baskerville Old Face", "Hoefler Text", "Iowan Old Style", Garamond, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-chip: 6px; --r-card: 10px; --r-panel: 12px; --r-modal: 14px;
  --shadow-card: 0 6px 20px rgba(0,0,0,.5);
  --shadow-modal: 0 30px 80px rgba(0,0,0,.6);
  --board-frame: 0 0 0 3px var(--sky-1), 0 0 0 4px rgba(227,189,106,.35), 0 14px 40px rgba(0,0,0,.6);
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
:root { color-scheme: dark; }
.ap { font: normal .85em var(--sans); margin-right: 1px; }
html, body { height: 100%; margin: 0; }
body { background: radial-gradient(900px 500px at 50% -20%, #182448, var(--sky-0) 65%) fixed; background-color: var(--sky-0); color: var(--ink);
  font: 13px/1.45 var(--sans); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; }
p { margin: 0; }
svg.ic { flex: none; vertical-align: -2px; }
button, select, input { font: inherit; color: var(--ink); background: var(--sky-3); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 12px; }
input { background: var(--sky-3); border-color: var(--line); }
input::placeholder { color: var(--ink-3); }
button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: transform .08s, border-color .12s, background .12s; }
button:hover:not(:disabled) { background: var(--sky-4); }
button:active:not(:disabled) { transform: scale(.97); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
button:disabled { opacity: .55; color: var(--ink-3); cursor: not-allowed; }
button.primary { background: linear-gradient(#f3d27d, #d9a93f); color: var(--gold-ink); border-color: var(--gold-bright); font-weight: 600; box-shadow: 0 2px 12px rgba(227,189,106,.3); border-radius: 10px; padding: 9px 16px; }
button.primary:hover:not(:disabled) { background: linear-gradient(#f8dc8f, #e0b34b); }
button.primary:disabled { color: var(--gold-ink); }
button.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
button.ghost:hover:not(:disabled) { background: var(--sky-3); }
button.on, button.ghost.on { border-color: var(--gold); background: #2a2a3f; color: var(--gold-bright); }
button.forecast { border: 1px dashed var(--forecast); background: rgba(184,163,255,.08); color: var(--forecast-ink); font-weight: 500; border-radius: 10px; }
button.forecast:hover:not(:disabled) { background: rgba(184,163,255,.16); }
.label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.note { color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.cost { color: var(--gold); font-size: 11px; white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

@keyframes won-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(227,189,106,.5); } 50% { box-shadow: 0 0 0 6px rgba(227,189,106,0); } }
@keyframes won-rise { from { opacity: 0; transform: translate(-50%, -18px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes won-in-right { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes won-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes won-row { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes won-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes won-modal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes won-spin { to { transform: rotate(360deg); } }
@keyframes won-drain { from { background: var(--gold); } to { background: rgba(227,189,106,.18); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- wordmark, faction disc, segmented control ---------- */
.wordmark { font: 400 58px/1 var(--serif); display: flex; align-items: baseline; gap: .18em; margin: 0; }
.wordmark .or { font-style: italic; font-size: .5em; color: var(--gold); }
.wordmark.brand { font-size: 22px; width: 204px; flex: none; } .wordmark.brand .or, .wordmark.sm .or { font-size: .6em; }
.wordmark.sm { font-size: 26px; justify-content: center; color: var(--ink-2); }
.disc { --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #0a1220; display: inline-grid; place-items: center; flex: none; }
.disc svg { width: 60%; height: 60%; }
.disc.ring { box-shadow: 0 0 0 2px #0a1220, 0 0 0 3px var(--c); }
.disc.hollow { background: transparent; border: 1px dashed var(--c); color: var(--c); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; color: var(--ink-2); padding: 6px 4px; font-size: 12px; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--sky-4); color: var(--gold-bright); font-weight: 600; }
.seg button:active { transform: none; }

/* ---------- setup ---------- */
.screen { min-height: 100%; }
#setup, #loading { display: grid; place-items: center; padding: 32px 24px; }
.setup-grid { width: min(1170px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.setup-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 14px; color: var(--gold); margin-bottom: 8px; }
.eyebrow span { font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: var(--ink-2); }
.tag { color: var(--ink-2); font-size: 14px; margin-top: 12px; max-width: 560px; text-wrap: pretty; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seat { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; background: var(--sky-2); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 16px; }
.seat.human { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
.seat.empty { border-style: dashed; opacity: .6; }
.seat .disc { --s: 46px; }
.seat .who { line-height: 1.25; min-width: 0; }
.seat .who b { font: 600 18px var(--serif); display: flex; align-items: baseline; gap: 8px; }
.seat .who b em { font: 600 10px var(--sans); letter-spacing: .14em; color: var(--c); }
.seat .who span { display: block; font-size: 12px; color: var(--ink-2); } .seat .who i { font-style: normal; font-size: 12px; color: var(--c); }
.seat .kinds { grid-column: 1 / -1; display: flex; gap: 8px; } .seat .kinds .seg { flex: 1; } .seat .kinds select { padding: 4px 8px; font-size: 12px; }
.seat .thrives { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; } .seat .thrives svg { color: var(--gold); }
.setup-side { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; }
.field input { font-size: 14px; padding: 9px 12px; width: 100%; } #seed { font: 600 15px var(--sans); letter-spacing: .06em; }
.field .seg button { padding: 8px 4px; }
.seedrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; } #reseed { padding: 9px 12px; }
button.big { padding: 13px 18px; border-radius: 12px; font-size: 16px; box-shadow: 0 4px 20px rgba(227,189,106,.3); margin-top: 6px; }
.online { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .online > button { padding: 10px; border-radius: 10px; }
.join { display: flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
#joincode { flex: 1; min-width: 0; border: 0; border-radius: 0; background: var(--sky-1); font: 600 14px var(--serif); letter-spacing: .3em; text-align: center; text-transform: uppercase; padding: 8px 4px; }
#btn-join { border: 0; border-left: 1px solid var(--line-strong); border-radius: 0; padding: 10px 12px; }
.msg { color: var(--suffered); min-height: 1.4em; font-size: 12.5px; }
.lobby { background: var(--sky-2); border: 1px dashed var(--gold); border-radius: var(--r-modal); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; animation: won-modal .24s ease-out; }
.code { display: flex; gap: 8px; justify-content: center; }
.code span { width: 52px; height: 64px; border-radius: 10px; background: var(--sky-1); border: 1px solid var(--gold); display: grid; place-items: center; font: 600 34px var(--serif); color: var(--gold-bright); }
.lobby p { color: var(--ink-2); font-size: 12.5px; text-align: center; text-wrap: pretty; }
.lobby-seats { display: flex; flex-direction: column; gap: 6px; }
.lobby-seats .ls { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--sky-1); border: 1px solid var(--line); }
.lobby-seats .ls.open { border-style: dashed; } .lobby-seats .ls.open b { color: var(--ink-2); }
.lobby-seats .disc { --s: 22px; } .lobby-seats b { font: 600 13px var(--serif); }
.lobby-seats .w { margin-left: auto; color: var(--ink-2); font-size: 12px; } .lobby-seats .open .w { color: var(--ink-3); font-style: italic; } .lobby-seats .w em { font-style: normal; color: var(--c); }
.howto { color: var(--ink-2); font-size: 12.5px; }
.howto summary { cursor: pointer; color: var(--ink); display: flex; align-items: center; gap: 6px; list-style: none; } .howto summary::-webkit-details-marker { display: none; }
.howto summary svg { color: var(--gold); transition: transform .15s; } .howto[open] summary svg { transform: rotate(90deg); }
.howto ol { margin: 8px 0; padding-left: 18px; line-height: 1.5; }
.loading-card { width: min(520px, 100%); text-align: center; display: flex; flex-direction: column; gap: 14px; }
.loading-card h2 { font-size: 26px; color: var(--gold-bright); } .loading-card .tag { margin: 0 auto; }
.bar { height: 8px; background: var(--sky-1); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); transition: width .2s; }

/* ---------- game layout ---------- */
#game { display: grid; grid-template: 52px minmax(0, 1fr) / 236px minmax(0, 1fr) 316px; height: 100vh; background: var(--sky-1); }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--sky-1); border-bottom: 1px solid var(--line); min-width: 0; }
.yearbox { display: flex; align-items: baseline; gap: 8px; min-width: 190px; white-space: nowrap; }
.yearbox b { font: 600 19px/1 var(--serif); color: var(--gold-bright); } #yearof { color: var(--ink-3); }
#phaselbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-left: 6px; } #phaselbl.live { color: var(--suffered); }
.gauges { display: flex; gap: 5px; flex: 1; min-width: 0; overflow: hidden; }
.gauges .g { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 7px; border-radius: var(--r-chip); background: var(--sky-2); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; }
.gauges .g svg { color: var(--ink-2); } .gauges .g.chg { border-color: var(--gold); } .gauges .g em { font-style: normal; font-size: 9px; color: var(--gold-bright); }
.topbtns { display: flex; gap: 6px; } .topbtns button { padding: 6px 10px; }
.left, .right { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--sky-2); min-height: 0; overflow-y: auto; }
.left { border-right: 1px solid var(--line); } .right { border-left: 1px solid var(--line); gap: 10px; }
.left .label:not(:first-child) { margin-top: 6px; }
.peoples { display: flex; flex-direction: column; gap: 8px; }
.pcard { display: flex; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--sky-1); box-shadow: inset 3px 0 0 var(--c); cursor: pointer; text-align: left; width: 100%; align-items: flex-start; justify-content: flex-start; font: inherit; color: inherit; }
.pcard:hover:not(:disabled) { background: var(--sky-1); border-color: var(--line-strong); }
.pcard.me { border-color: var(--c); background: var(--sky-3); } .pcard.me:hover { background: var(--sky-3); border-color: var(--c); }
.pcard.on { box-shadow: inset 3px 0 0 var(--c), 0 0 0 1px var(--c); }
.pcard.dead { opacity: .5; filter: grayscale(1); }
.pcard .pi { flex: 1; min-width: 0; }
.pcard .nm { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pcard .nm b { font: 600 14px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .tg { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; display: inline-flex; gap: 3px; align-items: center; }
.pcard.me .tg { color: var(--c); } .pcard .tg.sealed { color: var(--grew); }
.st { display: flex; gap: 9px; font-size: 11px; color: var(--ink-2); margin: 2px 0 5px; } .st span { display: inline-flex; gap: 3px; align-items: center; } .st .fv { color: var(--gold); }
.mo { display: block; height: 4px; border-radius: 2px; background: var(--sky-1); overflow: hidden; } .pcard:not(.me) .mo { background: var(--sky-3); }
.mo i { display: block; height: 100%; background: var(--grew); transition: width .3s; } .mo i.mid { background: var(--suffered); } .mo i.low { background: var(--lost); }
.layers button { font-size: 11px; padding: 6px 2px; }
.legend { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.chronicle { flex: 1; min-height: 90px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--sky-1); padding: 2px 8px; font-size: 11.5px; }
.chronicle .c { display: flex; gap: 6px; padding: 4px 0; border-bottom: 1px dotted var(--line); align-items: flex-start; line-height: 1.35; color: var(--ink-2); animation: won-fade .25s; }
.chronicle .y { font-size: 10px; color: var(--ink-3); width: 20px; flex: none; padding-top: 2px; } .chronicle svg { margin-top: 2px; color: var(--ink-3); }
.chronicle .act svg { color: var(--gold-bright); }
.chronicle .bad { color: #ffb3a8; } .chronicle .bad svg { color: var(--lost); }
.chronicle .good { color: var(--grew); } .chronicle .good svg { color: var(--grew); }
.chronicle .flood { color: #a9d3ff; } .chronicle .flood svg { color: var(--flood); }
.chronicle .warn { color: var(--suffered); } .chronicle .warn svg { color: var(--suffered); }
.chronicle b { font-weight: 600; } .chronicle small { color: var(--ink-3); }

.mapwrap { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-width: 0; min-height: 0; overflow-y: auto; }
.mapbox { position: relative; width: min(100%, calc((100vh - 262px) * 2)); min-width: min(100%, 480px); aspect-ratio: 2 / 1; flex: none; margin: 4px auto 0; border: 1px solid var(--line-strong); border-radius: var(--r-card); overflow: hidden; background: #050912; box-shadow: var(--board-frame); }
.mapbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; } #overlay { touch-action: manipulation; } .mapbox.aiming #overlay { cursor: crosshair; }
.aimpill { position: absolute; left: 10px; top: 8px; display: flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; background: rgba(7,11,24,.8); border: 1px solid var(--line-strong); font-size: 11px; color: var(--ink-2); animation: won-fade .12s; pointer-events: none; z-index: 2; }
.aimpill svg, .aimpill b { color: var(--gold-bright); font-weight: 600; }
.banner { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(460px, 86%); padding: 12px 18px 14px; border-radius: var(--r-panel); background: rgba(7,11,24,.92); border: 1px solid var(--gold); box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 0 4px rgba(227,189,106,.08); pointer-events: none; animation: won-rise .24s ease-out; z-index: 2; }
.banner .ttl { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font: 600 16px var(--serif); color: var(--gold-bright); white-space: nowrap; }
.banner .ttl::before, .banner .ttl::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold)); } .banner .ttl::after { transform: scaleX(-1); }
.banner .lines { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.rv { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; } .rv .disc { --s: 18px; } .rv .disc svg { width: 66%; height: 66%; } .rv svg.ic { color: var(--ink-2); }
.rv .who { font-weight: 600; } .rv .act { font: italic 13.5px var(--serif); } .rv .where, .rv small { color: var(--ink-2); font-size: inherit; }
.placepill { position: absolute; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(7,11,24,.92); border: 1px solid var(--gold); transform: translate(-50%, 0); z-index: 3; animation: won-fade .12s; }
.placepill button { border-radius: 999px; padding: 5px 12px; font-size: 12px; box-shadow: none; } .placepill .ghost { border: 0; padding: 5px 8px; }
.tip { position: absolute; width: 188px; padding: 7px 10px; border-radius: 8px; background: rgba(12,18,38,.94); border: 1px solid var(--line-strong); font-size: 11.5px; line-height: 1.4; box-shadow: var(--shadow-card); pointer-events: none; z-index: 4; color: var(--ink-2); }
.tip b { display: block; font: 600 12.5px var(--serif); color: var(--ink); } .tip .hint { color: var(--gold-bright); } .tip .cold { color: var(--ink-3); }
.yearbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(7,11,24,.6); opacity: 0; transition: opacity .2s; } .yearbar.on { opacity: 1; }
.yearbar i, .pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); }

.wheels-wrap { display: flex; flex-direction: column; gap: 6px; width: min(100%, max(calc((100vh - 262px) * 2), 480px)); margin: 0 auto; transition: opacity .2s; }
.wheels-wrap.locked { opacity: .45; pointer-events: none; }
.head { display: flex; align-items: baseline; gap: 10px; } .head .h { font: 600 14px var(--serif); color: var(--gold-bright); } .head .sub { font-size: 11px; color: var(--ink-3); }
.wheels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wheel { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 6px; align-items: center; padding: 6px 8px; border-radius: var(--r-card); background: var(--sky-2); border: 1px solid var(--line); }
.wheel.pushed { border-color: var(--gold); } .wheel.poor .wbtn:not(.on) { opacity: .45; }
.wbtn { width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 1px solid var(--line-strong); background: var(--sky-3); color: var(--ink); }
.wbtn.on { border-color: var(--gold); background: rgba(227,189,106,.18); color: var(--gold-bright); }
.wheel .mid { text-align: center; min-width: 0; }
.wheel .wl { font: 600 12px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .wheel.pushed .wl { color: var(--gold-bright); }
.track { position: relative; height: 5px; margin: 5px 8px 3px; border-radius: 3px; background: var(--sky-3); }
.track .fill { position: absolute; top: 0; height: 100%; background: rgba(227,189,106,.45); }
.track .knob { position: absolute; top: -3px; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--sky-2); transition: left .3s; }
.track .knob.next { background: var(--gold); box-shadow: 0 0 6px rgba(227,189,106,.8); }
.wheel .wv { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; } .wheel .wv .cost { margin-left: 4px; font-size: 10.5px; }
.wheelnote { font-size: 11.5px; color: var(--ink-2); line-height: 1.45; min-height: 2.9em; } .wheelnote b { color: var(--ink); font: 600 12px var(--serif); margin-right: 4px; }

/* ---------- your column ---------- */
.mehead { display: flex; gap: 10px; align-items: center; } .mehead .disc { --s: 40px; }
.mehead b { font: 600 17px/1.15 var(--serif); display: block; } .mehead small { font-size: 11.5px; color: var(--ink-2); }
.favor { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 8px; background: var(--sky-1); border: 1px solid var(--line); }
.favor i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--line-strong); flex: none; }
.favor i.free { background: var(--gold); border-color: var(--gold-bright); box-shadow: 0 0 6px rgba(227,189,106,.6); }
.favor i.spent { border-color: var(--gold); background: rgba(227,189,106,.18); animation: won-drain .2s; }
.favor span { margin-left: auto; font-size: 12px; color: var(--gold); white-space: nowrap; }
.right h3 { font-size: 17px; color: var(--gold-bright); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.abtn { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--sky-3); text-align: left; position: relative; }
.abtn .nm { flex: 1; font: 600 12px/1.2 var(--serif); }
.abtn.on { border-color: var(--gold); background: #2a2a3f; color: var(--gold-bright); transform: translateY(-1px); animation: won-pulse 1.8s infinite; }
.abtn:disabled .cost { color: var(--ink-3); }
.abtn .chk { position: absolute; right: 4px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 5px var(--gold); }
.armed { padding: 9px 11px; border-radius: 9px; background: var(--sky-1); border: 1px solid var(--gold); font-size: 11.5px; line-height: 1.4; }
.armed .t { display: flex; align-items: center; gap: 7px; font: 600 13px var(--serif); color: var(--gold-bright); } .armed p { color: var(--ink-2); margin-top: 3px; }
.armed details { margin-top: 5px; color: #c9d3ee; } .armed summary { cursor: pointer; color: var(--ink-2); display: flex; align-items: center; gap: 5px; list-style: none; } .armed summary::-webkit-details-marker { display: none; } .armed summary svg { color: var(--gold); }
.plan { display: flex; flex-direction: column; gap: 4px; }
.plan .pl { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--sky-1); border: 1px solid var(--line); font-size: 12px; }
.plan .pl.new { animation: won-in-right .18s ease-out; }
.plan .pl > svg { color: var(--gold-bright); } .plan .pl b { font: 600 12px var(--serif); white-space: nowrap; }
.plan .pl .where { color: var(--ink-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan .x { width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; background: transparent; color: var(--ink-3); } .plan .x:hover { color: var(--ink); }
.plan .none { color: var(--ink-3); font-style: italic; font-size: 12px; padding: 4px 2px; }
.commit { margin-top: auto; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding-top: 4px; } .commit button { padding: 10px 8px; }
.commit .busy svg { animation: won-spin .8s linear; }
.rightbox { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r-card); background: var(--sky-1); border: 1px solid var(--line); font-size: 12px; }
.rightbox .lg { display: flex; align-items: center; gap: 8px; } .rightbox .sw { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.seasons { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.seasons .names { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); } .seasons .names .now { color: var(--suffered); }
.pbar { height: 6px; border-radius: 3px; background: var(--sky-1); border: 1px solid var(--line); overflow: hidden; }
.scard { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--sky-1); box-shadow: inset 3px 0 0 var(--c); }
.scard h4 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; } .scard h4 .disc { --s: 22px; } .scard h4 small { font: 11.5px var(--sans); color: var(--ink-2); }
.wells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wells div { background: var(--sky-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 4px; text-align: center; }
.wells b { display: block; font: 600 17px/1.2 var(--serif); } .wells span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.scard .clim { font-size: 12px; color: var(--ink-2); margin: 8px 0 4px; } .scard .note b { color: var(--suffered); font-weight: 600; }

/* ---------- pass the device ---------- */
.pass { position: fixed; inset: 0; z-index: 20; background: radial-gradient(520px 420px at 50% 42%, color-mix(in srgb, var(--c) 22%, transparent), var(--sky-0) 70%), var(--sky-0);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 60px 20px 30px; animation: won-up .28s ease-out; }
.pass .bar-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 14px; padding: 14px 20px; color: var(--ink-3); font-size: 12px; }
.pass .bar-top .wordmark { font-size: 20px; color: var(--ink-2); }
.pass .disc { --s: 156px; box-shadow: 0 0 0 6px var(--sky-0), 0 0 0 8px var(--c), 0 0 80px color-mix(in srgb, var(--c) 50%, transparent); }
.pass .to { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 55%, white); margin-top: 10px; }
.pass h2 { font-size: 56px; line-height: 1; } .pass .ti { font: italic 20px/1.2 var(--serif); color: var(--ink-2); } .pass .hush { color: var(--ink-3); }
.pass button { margin-top: 14px; padding: 14px 30px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 70%, white); background: var(--c); color: #0a1220; font: 600 17px var(--sans); box-shadow: 0 4px 24px color-mix(in srgb, var(--c) 40%, transparent); }
.pass button:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 85%, white); }
.pass::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .6; }

/* ---------- modal: report, forecast, game over ---------- */
.modal { position: fixed; inset: 0; background: rgba(5,8,18,.78); display: grid; place-items: center; z-index: 10; padding: 20px; animation: won-fade .15s; }
.modal-card { position: relative; width: min(780px, 100%); max-height: 88vh; overflow-y: auto; background: var(--sky-2); border: 1px solid var(--gold); border-radius: var(--r-modal); padding: 22px 26px 20px; box-shadow: var(--shadow-modal); display: flex; flex-direction: column; gap: 14px; animation: won-modal .22s ease-out; }
.modal-card h2 { font-size: 26px; line-height: 1.1; color: var(--gold-bright); }
.mhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } .mhead .sub { color: var(--ink-3); }
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; color: var(--ink-2); padding: 8px 12px; border-radius: 8px; background: var(--sky-1); border: 1px solid var(--line); }
.strip .label { font-size: 10px; letter-spacing: .14em; } .strip .rv { gap: 5px; flex-wrap: nowrap; font-size: 12px; } .strip .rv .disc { display: none; } .strip .rv .act { font-size: 13px; color: var(--ink); }
.strip .w { display: inline-flex; align-items: center; gap: 5px; } .strip button { margin-left: auto; }
.up { color: var(--grew); } .dn { color: var(--suffered); } .gone { color: var(--lost); }
.rp { border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 14px; background: var(--sky-1); box-shadow: inset 4px 0 0 var(--c); }
.rp.mine { border-color: var(--c); border-radius: var(--r-panel); padding: 14px 16px; }
.rp .rh { display: flex; align-items: center; gap: 8px; } .rp .rh .disc { --s: 22px; } .rp.mine .rh { gap: 10px; } .rp.mine .rh .disc { --s: 30px; }
.rp .rh .t { flex: 1; min-width: 0; } .rp .rh .t b { font: 600 15px var(--serif); } .rp.mine .rh .t b { font-size: 18px; line-height: 1.15; display: block; } .rp .rh .t span { font-size: 12px; color: var(--ink-2); }
.rp .tot { font: 600 16px var(--serif); white-space: nowrap; text-align: right; } .rp .tot small { font: 12px var(--sans); margin-left: 2px; } .rp .tot em { display: block; font: 11px var(--sans); color: var(--ink-3); margin-top: 3px; }
.rp.mine .tot { font-size: 24px; line-height: 1; } .rp .nset { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.rows { display: grid; grid-template-columns: 16px minmax(90px, 140px) 118px minmax(0, 1fr); gap: 4px 10px; align-items: center; margin-top: 8px; font-size: 12px; }
.rp.mine .rows { grid-template-columns: 18px minmax(90px, 150px) 132px 64px minmax(0, 1fr); gap: 6px 12px; margin-top: 12px; font-size: 12.5px; }
.rows > * { animation: won-row .25s both; animation-delay: calc(var(--i, 0) * 40ms); }
.rows .nm { font: 600 12.5px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rp.mine .rows .nm { font-size: 13.5px; }
.rows .pp { color: var(--ink-2); white-space: nowrap; } .rows .pp b { color: var(--ink); font-weight: 600; } .rows .pp small { font-size: 11px; }
.rows .mo { background: var(--sky-3); height: 5px; border-radius: 3px; }
.rows .lostrow { color: var(--lost); } .rows .pp .lostrow { font-weight: 600; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.chip { padding: 1px 8px; border-radius: var(--r-chip); font-size: 11.5px; background: rgba(199,207,230,.1); color: var(--held); }
.chip.g { background: rgba(134,227,166,.14); color: var(--grew); } .chip.b { background: rgba(255,200,87,.13); color: var(--suffered); }
.chip.f { background: rgba(111,182,255,.14); color: #a9d3ff; } .chip.x { background: rgba(255,123,107,.14); color: #ffa699; }
.modal-card.forecast { border: 1px dashed var(--forecast); box-shadow: var(--shadow-modal), inset 0 0 0 1px rgba(184,163,255,.15); width: min(660px, 100%);
  background: repeating-linear-gradient(135deg, rgba(184,163,255,.035) 0 10px, transparent 10px 24px), var(--sky-2); }
.forecast h2 { font-style: italic; color: var(--forecast-ink); } .forecast .mhead { align-items: center; } .forecast .mhead > svg { color: var(--forecast); }
.badge { margin-left: auto; padding: 3px 9px; border-radius: 6px; border: 1px dashed var(--forecast); color: var(--forecast-ink); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.fplan { display: flex; flex-wrap: wrap; gap: 6px; } .fplan span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: rgba(184,163,255,.1); border: 1px solid rgba(184,163,255,.4); color: var(--forecast-ink); font-size: 12px; } .fplan small { color: var(--ink-2); font-size: 12px; }
.forecast .rp { border-style: dashed; background: rgba(12,18,38,.8); box-shadow: none; } .forecast .rows .nm { font-style: italic; }
.forecast .chip { background: transparent; border: 1px dashed currentColor; }
.forecast .rp:not(.mine) { display: flex; align-items: center; gap: 8px; padding: 8px 12px; } .forecast .rp:not(.mine) .disc { --s: 20px; } .forecast .rp:not(.mine) .t b { font: 600 14px var(--serif); } .forecast .rp:not(.mine) .t span { font-size: 12px; color: var(--ink-2); } .forecast .rp:not(.mine) .sum { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.over { align-items: center; text-align: center; gap: 16px; width: min(620px, 100%); padding: 28px 30px 24px; }
.over .flourish { display: flex; align-items: center; gap: 12px; color: var(--gold); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; }
.over .flourish::before, .over .flourish::after { content: ""; height: 1px; width: 60px; background: linear-gradient(90deg, transparent, var(--gold)); } .over .flourish::after { transform: scaleX(-1); }
.over > .disc { --s: 84px; box-shadow: 0 0 0 4px var(--sky-2), 0 0 0 6px var(--c), 0 0 60px color-mix(in srgb, var(--c) 45%, transparent); }
.over h2 { font-size: 38px; } .over > p { color: var(--ink-2); max-width: 420px; text-wrap: pretty; } .over .seedline { font-size: 12px; color: var(--ink-3); }
.rank { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.rank .rk { display: grid; grid-template-columns: 24px 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r-card); background: var(--sky-1); border: 1px solid var(--line); text-align: left; }
.rank .rk.win { border-color: var(--c); } .rank .rk.out { opacity: .6; }
.rank .pl { font: 600 16px var(--serif); color: var(--ink-3); } .rank .disc { --s: 24px; } .rank b { font: 600 14px var(--serif); } .rank .ppl { color: var(--ink-2); }
.rank .rb { display: block; height: 4px; border-radius: 2px; background: var(--sky-3); margin-top: 5px; overflow: hidden; } .rank .rb i { display: block; height: 100%; background: var(--c); }
.rank .sm { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.over .row { width: 100%; }

/* ---------- narrow screens: one column ---------- */
@media (max-width: 1100px) {
  .setup-grid { grid-template-columns: 1fr; } .setup-side { padding-top: 0; }
  #game { grid-template: auto auto auto auto / minmax(0, 1fr); height: auto; }
  .top { flex-wrap: wrap; padding: 8px 12px; gap: 8px 12px; } .gauges { flex-wrap: wrap; order: 5; flex-basis: 100%; } .wordmark.brand { width: auto; }
  .mapwrap { order: 1; overflow: visible; } .right { order: 2; } .left { order: 3; } .left, .right { border: 0; border-top: 1px solid var(--line); overflow: visible; }
  .mapbox, .wheels-wrap { width: 100%; min-width: 0; } .chronicle { max-height: 220px; } .commit { margin-top: 4px; }
}
@media (max-width: 700px) { .seats { grid-template-columns: 1fr; } .wheels { grid-template-columns: 1fr 1fr; } .wordmark { font-size: 44px; } .pass h2 { font-size: 40px; } .pass .disc { --s: 110px; }
  .rows, .rp.mine .rows { grid-template-columns: 16px minmax(0, 1fr) auto; } .rows .mo { display: none; } .rows .chips { grid-column: 2 / -1; } }
