/* SNOWBALL. Frosted glass and pills on arctic night, one accent (aurora mint). The title is a snow globe in the middle of
   the page; in game everything about you sits in one dock at the bottom. Every number has a fixed slot. */
:root {
  --bg: #040a12; --s1: #0a1522; --s2: #0f1d2d; --s3: #172a3e;
  --ink: #eef6fb; --ink2: #a9bfd0; --ink3: #6b8399;
  --glass: rgba(16, 33, 52, .58); --well: rgba(5, 13, 23, .55);
  --line: rgba(220, 240, 255, .12); --line2: rgba(220, 240, 255, .22); --rim: rgba(255, 255, 255, .14);
  --acc: #6ff2c8; --acc-hi: #a3f9df; --acc-ink: #03140e; --acc-soft: rgba(111, 242, 200, .1); --down: #ff7b6b; --ice: #bfe3ff;
  --r1: 14px; --r2: 20px; --r3: 30px;
  --f-d: 'Fredoka', 'Nunito', 'Arial Rounded MT Bold', system-ui, sans-serif; --f-t: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-m: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1); --pop: cubic-bezier(.3, 1.5, .5, 1);
  --frost: blur(18px) saturate(145%);
  --gd: min(40vw, calc(100vh - 320px), 740px);           /* the snow globe's diameter on the title */
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--f-t); overflow: hidden; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
::selection { background: var(--acc); color: var(--acc-ink); }
:where(a) { color: inherit; text-decoration: none; }
:where(button, input) { font: inherit; color: inherit; }
:where(button) { background: none; border: 0; padding: 0; cursor: pointer; }
:where(ol, ul) { list-style: none; margin: 0; padding: 0; }
:where(h1, h2, p) { margin: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; cursor: crosshair; }

/* ---- the material: frosted glass */
.glass { background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim), 0 28px 60px -32px rgba(0, 0, 0, .85); -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost); }
.lab { font: 600 10.5px/1 var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); white-space: nowrap; }
.lab i { font-style: normal; letter-spacing: .02em; text-transform: none; color: var(--ink3); opacity: .85; margin-left: 6px; font-family: var(--f-t); font-weight: 400; }
.num, .mono { font-family: var(--f-m); font-variant-numeric: tabular-nums; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(220, 240, 255, .1); border: 1px solid var(--line2); font: 600 10.5px/1 var(--f-m); color: var(--ink2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 rgba(111, 242, 200, .6); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111, 242, 200, .55); } 100% { box-shadow: 0 0 0 9px rgba(111, 242, 200, 0); } }
.is-hidden { visibility: hidden; }

/* ---- pills: chips, fields, buttons */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--well); border: 1px solid var(--line); font: 600 12px/1 var(--f-m); color: var(--ink); white-space: nowrap; }
.pill:hover { border-color: var(--line2); }
.pill-live { font: 500 13px/1 var(--f-t); color: var(--ink2); gap: 9px; }
.pill-x { width: 34px; padding: 0; justify-content: center; color: var(--ink2); }
.pill-x:hover { color: var(--ink); }
.pill-x svg { width: 14px; height: 14px; fill: currentColor; }
.burn-live { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--ink3); vertical-align: 1px; }
.burn-cell.is-live .burn-live, .standings-foot.is-live .burn-live { background: #ff9a5a; box-shadow: 0 0 0 0 rgba(255, 154, 90, .6); animation: burnpulse 1s var(--ease) infinite; }
@keyframes burnpulse { 0% { box-shadow: 0 0 0 0 rgba(255, 154, 90, .6); } 100% { box-shadow: 0 0 0 7px rgba(255, 154, 90, 0); } }
.readout b.is-bump, .standings-foot b.is-bump { animation: bump .45s var(--pop); }
.standings-foot { display: flex; justify-content: space-between; align-items: center; height: 38px; margin-top: 2px; padding: 0 14px; border-radius: 999px; background: var(--well); }
.standings-foot b { font: 600 14px/1 var(--f-m); color: #ffb37f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.pill-live b { color: var(--ink); font-family: var(--f-m); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.pill-field { display: grid; grid-template-rows: 12px 22px; align-content: center; row-gap: 4px; height: 54px; padding: 0 22px; border-radius: 999px; background: var(--well); border: 1px solid var(--line2); transition: border-color .14s, background .14s; min-width: 0; }
.pill-field:focus-within { border-color: var(--acc); background: rgba(5, 13, 23, .75); }
.pill-field .lab { font-size: 9.5px; }
.pill-field input { width: 100%; height: 22px; padding: 0; border: 0; background: none; outline: 0; color: var(--ink); font-size: 15px; }
.pill-field input.mono { font-size: 13px; }
.pill-field input::placeholder { color: var(--ink3); }
.pill-field input.is-bad { color: var(--down); }
.pill-field:has(input.is-bad) { border-color: var(--down); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 54px; padding: 0 26px; border-radius: 999px; font: 600 20px/1 var(--f-d); letter-spacing: .01em; white-space: nowrap; transition: transform .16s var(--pop), background .14s, border-color .14s, color .14s; }
.btn-go { background: var(--acc); color: var(--acc-ink); box-shadow: 0 10px 30px -12px rgba(111, 242, 200, .7), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.btn-go:hover { background: var(--acc-hi); transform: translateY(-2px) scale(1.02); }
.btn-go:active { transform: translateY(1px) scale(.98); }
.btn-go kbd { background: rgba(3, 20, 14, .12); border-color: rgba(3, 20, 14, .25); color: var(--acc-ink); }
.btn-soft { border: 1px solid var(--line2); color: var(--ink2); font-size: 17px; background: var(--well); }
.btn-soft:hover { border-color: var(--ink2); color: var(--ink); }
.btn-small { height: 36px; padding: 0 18px; font-size: 15px; }
.hint { font-size: 12px; line-height: 1.4; color: var(--ink3); min-height: 17px; }
.hint.is-bad { color: var(--down); }
.acct { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 18px; font-size: 12.5px; color: var(--ink3); }
.acct b { color: var(--ink); font-weight: 600; }
.link { color: var(--acc); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--acc-hi); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink2); }
.check input { width: 16px; height: 16px; accent-color: var(--acc); }
.slider { display: grid; gap: 8px; }
.slider input { width: 100%; accent-color: var(--acc); }

/* ---- the nav island */
.island { position: fixed; z-index: 30; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 24px; height: 54px; max-width: calc(100vw - 24px); padding: 0 9px 0 12px; border-radius: 999px; background: rgba(9, 20, 33, .66); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim), 0 18px 40px -24px #000; -webkit-backdrop-filter: var(--frost); backdrop-filter: var(--frost); white-space: nowrap; }
.brand { display: flex; flex: none; align-items: center; gap: 10px; font: 600 22px/1 var(--f-d); letter-spacing: -.01em; }
.mark { width: 32px; height: 32px; flex: none; }
.island-links { display: flex; flex: none; gap: 20px; font-size: 14px; }
.island-links a, .island-links .link { color: var(--ink2); font-size: 14px; text-decoration: none; transition: color .14s; }
.island-links a:hover, .island-links .link:hover { color: var(--ink); }
.island-side { display: flex; align-items: center; gap: 8px; }
body.is-playing .island { display: none; }

/* ---- the title: a snow globe in the middle of the page */
.globe-page { position: fixed; inset: 0; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr) max(var(--gd), 500px) minmax(0, 1fr); column-gap: clamp(28px, 3vw, 60px); align-items: center; padding: 84px clamp(24px, 3vw, 56px) 20px; }
.pitch { align-self: center; max-width: 520px; justify-self: end; animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 600 11.5px/1 var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); margin-bottom: 16px; }
.eyebrow.is-down { color: var(--down); }
.h1 { font-family: var(--f-d); font-weight: 600; font-size: clamp(40px, 3.7vw, 80px); line-height: .98; letter-spacing: -.02em; }
.h1 em { font-style: normal; color: var(--acc); }
.lead { margin: 18px 0 22px; font-size: 15.5px; line-height: 1.55; color: var(--ink2); }
.beats { display: grid; gap: 8px; }
.beats li { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 40px; padding: 5px 16px 5px 5px; border-radius: 999px; background: var(--well); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink2); }
.beats li > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--acc-soft); border: 1px solid rgba(111, 242, 200, .35); font: 600 14px/1 var(--f-d); font-style: normal; color: var(--acc); }
.beats b { color: var(--ink); font-weight: 600; }
.globe-stage { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.globe { width: var(--gd); height: var(--gd); border-radius: 50%; pointer-events: none; flex: none; }
.base { position: relative; z-index: 1; width: 100%; margin-top: -28px; padding: 14px; border-radius: var(--r3); display: grid; gap: 10px; animation: rise .7s .08s var(--ease) both; }
.base-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; }
.base-go { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
.base-go .btn { min-width: 168px; }
.base-notes { display: grid; gap: 3px; min-width: 0; }
.base-notes .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.base-notes .acct { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.base-notes .acct span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.readout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; margin-top: 10px; animation: rise .7s .16s var(--ease) both; }
.readout li { display: grid; gap: 6px; padding: 11px 14px 10px; border-radius: var(--r2); min-width: 0; }
.readout b { font: 600 17px/1 var(--f-m); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout i { font-style: normal; font-size: 11px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icers { align-self: center; max-width: 360px; width: 100%; justify-self: start; animation: rise .7s .12s var(--ease) both; }
.icers-empty { padding: 14px 18px; border-radius: var(--r2); background: var(--well); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--ink2); }
.icers-head { display: flex; justify-content: space-between; align-items: center; height: 34px; padding: 0 14px; }

/* rows: one per ball; the swatch is a circle sized by the ball */
.rows { padding: 4px 0; }
.rows li { display: grid; grid-template-columns: 22px 24px minmax(0, 1fr) 58px 66px; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; }
.rows li.is-me { background: rgba(111, 242, 200, .1); }
.rows li.is-gap { box-shadow: inset 0 1px 0 var(--line); border-radius: 0; }
.rows .rk { font: 500 11px/1 var(--f-m); color: var(--ink3); text-align: right; }
.rows .sw { justify-self: center; width: var(--d, 10px); height: var(--d, 10px); border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), 0 0 0 2px rgba(240, 248, 255, .85); }
.rows .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }
.rows .pc { font: 500 12px/1 var(--f-m); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink2); }
.rows .cy { font: 500 12px/1 var(--f-m); font-variant-numeric: tabular-nums; text-align: right; color: var(--acc); }
.icers .rows li { height: 36px; background: var(--well); border: 1px solid var(--line); margin-bottom: 6px; }

/* ---- in game: fixed slots, nothing moves */
.hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.hud > * { pointer-events: auto; position: absolute; }
.globe-mini { top: 16px; left: 16px; width: 178px; height: 178px; padding: 8px; border-radius: 50%; }
.globe-mini canvas { display: block; width: 160px; height: 160px; border-radius: 50%; }
.hud > .hud-menu { top: 206px; left: 16px; height: 32px; padding: 0 12px; font: 500 12px/1 var(--f-t); color: var(--ink2); background: rgba(9, 20, 33, .72); }
.hud > .hud-menu:hover { color: var(--ink); }
.hud > .feed { top: 250px; left: 16px; width: 340px; height: 150px; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.feed li { align-self: flex-start; max-width: 100%; height: 26px; padding: 0 12px; border-radius: 999px; background: rgba(9, 20, 33, .78); border: 1px solid var(--line); font-size: 12.5px; line-height: 24px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: slidein .3s var(--ease) both; }
.feed li b { color: var(--ink); font-weight: 600; }
.feed li em { font-style: normal; color: var(--acc); font-family: var(--f-m); font-size: 12px; }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.standings { top: 16px; right: 16px; width: 318px; padding: 6px; border-radius: 26px; }
.standings-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 44px; padding: 0 14px; margin-bottom: 2px; border-radius: 999px; background: var(--well); }
.standings-head b { font: 600 17px/1 var(--f-m); color: var(--ink); text-align: right; }
.standings-head i { font-style: normal; font-size: 11px; color: var(--ink3); }
.standings .rows li { height: 27px; grid-template-columns: 20px 24px minmax(0, 1fr) 54px 64px; padding: 0 10px; }

/* the moment: one line in the middle of the screen when something big happens */
.hud > .moment { top: 21%; left: 50%; transform: translateX(-50%); width: min(720px, calc(100vw - 744px)); display: grid; justify-items: center; gap: 6px; text-align: center; opacity: 0; pointer-events: none; }
.moment b { font-family: var(--f-d); font-weight: 700; font-size: clamp(40px, 3.6vw, 58px); line-height: 1.02; letter-spacing: -.01em; color: #fff; text-shadow: 0 4px 0 rgba(4, 10, 18, .45), 0 0 28px rgba(111, 242, 200, .35); }
.moment span { min-height: 22px; font-size: 16px; color: var(--ink); text-shadow: 0 2px 8px rgba(4, 10, 18, .8); }
.moment.is-good b { color: var(--acc); }
.moment.is-bad b { color: var(--down); text-shadow: 0 4px 0 rgba(4, 10, 18, .45), 0 0 28px rgba(255, 123, 107, .35); }
.moment.is-on { animation: moment 2.6s var(--ease) both; }
@keyframes moment { 0% { opacity: 0; transform: translateX(-50%) scale(.7); } 9% { opacity: 1; transform: translateX(-50%) scale(1.06); } 16% { transform: translateX(-50%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-14px); } }

/* the dock: everything about you, bottom centre */
.dock { left: 50%; bottom: 18px; transform: translateX(-50%); width: min(800px, calc(100vw - 32px)); height: 88px; border-radius: var(--r3); display: grid; grid-template-columns: 92px 196px minmax(0, 1fr) 238px; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.dock > .seg { height: 88px; overflow: hidden; }
.seg { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 14px 1fr 6px; align-items: center; column-gap: 8px; padding: 13px 18px 13px; min-width: 0; }
.seg + .seg { box-shadow: inset 1px 0 0 var(--line); }
.seg > i { font-style: normal; font-size: 11px; color: var(--ink3); white-space: nowrap; text-align: right; }
.seg > b { grid-column: 1 / 3; align-self: center; font-size: 25px; font-weight: 600; line-height: 1; white-space: nowrap; }
.seg-dash { display: grid; grid-template-columns: 1fr; grid-template-rows: 46px 18px; justify-items: center; align-content: center; row-gap: 5px; padding: 8px 0; }
.seg-dash .ring, .seg-dash-word { grid-area: 1 / 1; }
.ring { width: 46px; height: 46px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(220, 240, 255, .12); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--ink3); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 138.23; stroke-dashoffset: 0; transition: stroke .2s; }
.seg-dash-word { align-self: center; font: 600 12px/1 var(--f-d); color: var(--ink3); letter-spacing: .02em; }
.seg-dash kbd { height: 18px; font-size: 9.5px; }
.seg-dash.is-ready .ring-fg { stroke: var(--acc); }
.seg-dash.is-ready .seg-dash-word { color: var(--acc); }
.seg-size { grid-template-columns: minmax(0, 1fr) 70px; }
.seg-size > b { font-size: 26px; }
.seg-size > b.is-bump { animation: bump .45s var(--pop); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.14); color: var(--acc); } 100% { transform: scale(1); } }
.meter { grid-column: 1 / 3; position: relative; height: 6px; border-radius: 3px; background: var(--s3); }
.meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--ice); transition: width .3s var(--ease); }
.meter u { position: absolute; top: -3px; width: 2px; height: 12px; border-radius: 1px; background: var(--acc); left: 5%; }
.seg-worth { background: rgba(111, 242, 200, .07); grid-template-columns: minmax(0, 1fr) 92px; }
.seg-worth > b { font-size: 32px; color: var(--acc); text-shadow: 0 0 22px rgba(111, 242, 200, .25); }
.seg-worth > i { color: var(--ink2); }
.seg-cash { grid-template-columns: minmax(0, 1fr) 56px; transition: background .2s, box-shadow .2s; }
.seg-cash > .lab { grid-row: 1; grid-column: 1; }
.seg-cash > b { grid-row: 1; grid-column: 2; font-size: 13px; color: var(--ink2); text-align: right; }
.cash-text { grid-column: 1 / 3; font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cash-text b { color: var(--ink); font-weight: 600; }
.cash-text kbd { height: 17px; }
.cash-bar { grid-column: 1 / 3; height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; }
.cash-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--ink3); }
.seg-cash.is-idle .cash-text { color: var(--ink); }
.seg-cash.is-idle > b { color: var(--acc); }
.seg-cash.is-on { background: rgba(111, 242, 200, .16); box-shadow: inset 0 0 0 2px rgba(111, 242, 200, .55); }
.seg-cash.is-on .cash-text, .seg-cash.is-on > b { color: var(--ink); }
.seg-cash.is-on .cash-bar i { background: var(--acc); }
.seg-cash.is-wait .cash-text { color: var(--ink); }
.seg-cash.is-bad { background: rgba(255, 123, 107, .14); box-shadow: inset 0 0 0 2px rgba(255, 123, 107, .55); animation: shake .4s var(--ease); }
.seg-cash.is-bad .cash-text, .seg-cash.is-bad > b { color: var(--down); }
.seg-cash.is-need .cash-bar i { background: var(--ice); }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.touch { display: none; width: 86px; height: 86px; border-radius: 50%; place-items: center; text-align: center; background: rgba(9, 20, 33, .78); border: 1.5px solid var(--line2); font: 600 15px/1.1 var(--f-d); color: var(--ink); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: none; }
.hud > .touch-dash { left: 16px; bottom: 124px; }
.touch-dash.is-ready { border-color: var(--acc); color: var(--acc); }
.hud > .touch-cash { right: 16px; bottom: 124px; background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.touch-cash.is-low { background: rgba(9, 20, 33, .78); border-color: var(--line2); color: var(--ink3); }
.hud > .stick { width: 116px; height: 116px; margin: -58px 0 0 -58px; border-radius: 50%; border: 1.5px solid rgba(234, 243, 249, .25); background: rgba(234, 243, 249, .05); pointer-events: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(111, 242, 200, .6); }

.toast { position: fixed; z-index: 60; top: 84px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 11px 20px; border-radius: 999px; background: rgba(9, 20, 33, .9); border: 1px solid var(--line2); font-size: 14px; color: var(--ink); text-align: center; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.toast.is-hidden { opacity: 0; transform: translate(-50%, -6px); }
.toast.is-bad { border-color: rgba(255, 123, 107, .6); }
.toast.is-good { border-color: rgba(111, 242, 200, .6); }
.toast em { font-style: normal; color: var(--acc); font-family: var(--f-m); }

/* ---- sheets */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(3, 7, 13, .58); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: min(500px, calc(100vw - 32px)); padding: 30px; border-radius: var(--r3); display: grid; gap: 16px; animation: rise .35s var(--ease) both; background: rgba(13, 28, 45, .82); }
.sheet-wide { width: min(640px, calc(100vw - 32px)); }
.sheet .eyebrow { margin: 0; }
.sheet-medal { margin-top: 30px; padding-top: 44px; justify-items: center; text-align: center; }
.sheet-medal .row-btns, .sheet-medal .tally, .sheet-medal .track { width: 100%; }
.medal { width: 76px; height: 76px; margin: -82px 0 -4px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(13, 28, 45, .9), 0 16px 32px -12px #000; }
.medal-bank { animation: medal .7s var(--pop) both; }
.medal-sea { animation: sink 1.1s var(--ease) both; }
@keyframes sink { from { transform: translateY(-14px); opacity: 0; } 60% { transform: translateY(3px); opacity: 1; } to { transform: none; } }
@keyframes medal { from { transform: scale(.4) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.h2 { font: 600 36px/1.04 var(--f-d); letter-spacing: -.015em; }
#d-title { font-size: 31px; }
.h2.num { font: 600 46px/1 var(--f-m); letter-spacing: -.02em; color: var(--acc); text-shadow: 0 0 30px rgba(111, 242, 200, .3); }
.sub { font-size: 14.5px; line-height: 1.5; color: var(--ink2); min-height: 22px; }
.sub b { color: var(--ink); font-weight: 600; }
.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tally-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tally .cell { display: grid; gap: 8px; padding: 12px 10px; border-radius: var(--r2); background: var(--well); border: 1px solid var(--line); min-width: 0; text-align: center; }
.tally .cell b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.row-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: 4px; }
.track { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.track::before { content: ''; position: absolute; left: 16%; right: 16%; top: 50%; height: 2px; background: var(--line2); }
.step { position: relative; height: 34px; display: grid; place-items: center; border-radius: 999px; background: var(--s2); border: 1px solid var(--line); font: 600 10.5px/1 var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.step.is-on { color: var(--acc-ink); background: var(--acc); border-color: var(--acc); }
.step.is-bad { color: #fff; background: var(--down); border-color: var(--down); }
.txlink { font-size: 13px; color: var(--acc); text-decoration: underline; text-underline-offset: 3px; height: 20px; }
.howto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.howto li { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 12px; row-gap: 6px; padding: 16px; border-radius: var(--r2); background: var(--well); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--ink2); }
.howto li > i { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); font: 600 17px/1 var(--f-d); font-style: normal; }
.howto li > b { font: 600 19px/1.2 var(--f-d); color: var(--ink); }
.howto kbd { margin: 0 1px; }

/* ---- docs and ledger pages */
body.is-page { overflow: auto; }
body.is-page .island { position: fixed; }
.page { position: relative; z-index: 5; width: min(920px, calc(100vw - 48px)); margin: 0 auto; padding: 116px 0 80px; display: grid; gap: 52px; }
.page-head .h1 { font-size: clamp(42px, 5vw, 72px); }
.page-head .lead { margin-bottom: 0; max-width: 62ch; }
.sec { display: grid; gap: 16px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sec-head h2 { font: 600 28px/1 var(--f-d); letter-spacing: -.01em; margin: 0; }
.sec-head .lab { height: 28px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--well); border: 1px solid var(--line); }
.sec p { color: var(--ink2); max-width: 70ch; }
.sec p b { color: var(--ink); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tiles .cell { display: grid; gap: 10px; padding: 18px; border-radius: var(--r2); background: var(--glass); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--rim); min-width: 0; }
.tiles .cell b { font: 600 19px/1 var(--f-m); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiles .cell i { font-style: normal; font-size: 12px; color: var(--ink3); }
.rules { display: grid; gap: 8px; }
.rules li { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; padding: 16px 20px; border-radius: var(--r2); background: var(--s1); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink2); }
.rules li b { font: 600 17px/1.3 var(--f-d); color: var(--ink); }
.table { border-radius: var(--r2); overflow: hidden; border: 1px solid var(--line); background: var(--s1); }
.table .tr { display: grid; grid-template-columns: 96px 170px minmax(0, 1fr) 130px 110px; align-items: center; gap: 12px; height: 42px; padding: 0 20px; font-size: 13.5px; border-top: 1px solid var(--line); }
.table .tr:first-child { border-top: 0; background: var(--s2); height: 38px; }
.table .tr4 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
#worth { margin-top: 4px; }
.table .tr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.table .tr .amt { text-align: right; color: var(--ink); }
.table .tr .amt.is-in { color: var(--acc); }
.table .tr a { color: var(--acc); font-family: var(--f-m); font-size: 12px; text-align: right; }
.table .empty { padding: 26px 20px; color: var(--ink3); font-size: 14px; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; border-radius: 999px; background: var(--s1); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink3); }

/* ---- smaller screens */
@media (max-height: 820px) and (min-width: 821px) { .lead { font-size: 14.5px; margin: 14px 0 16px; } .beats li { min-height: 36px; } .base-go .btn { min-width: 140px; } }
@media (max-width: 1240px) { .globe-page { grid-template-columns: minmax(0, 1fr) max(var(--gd), 480px); } .icers { display: none; } .pitch { justify-self: stretch; } }
@media (max-width: 1240px) and (min-width: 821px) { :root { --gd: min(46vw, calc(100vh - 320px), 640px); } }
@media (max-width: 1100px) { .standings { display: none; } .readout i { display: none; } .hud > .feed { display: none; } .hud > .moment { top: 30%; width: min(720px, calc(100vw - 32px)); } }
@media (max-width: 820px) {
  :root { --gd: min(calc(100vw - 56px), 50vh); }
  .island { gap: 12px; height: 48px; top: 10px; } .island-links { display: none; } .brand { font-size: 19px; } .mark { width: 28px; height: 28px; } .island-side .pill:first-child { display: none; }
  .globe-page { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; padding: 74px 16px 28px; overflow-y: auto; row-gap: 18px; }
  .pitch { order: 0; justify-self: stretch; max-width: none; text-align: center; }
  .pitch .eyebrow { justify-content: center; margin-bottom: 12px; }
  .h1 { font-size: 40px; }
  .lead, .beats { display: none; }
  .globe-stage { order: 1; }
  .base-fields { grid-template-columns: minmax(0, 1fr); }
  .base-go { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .base-go .btn { width: 100%; }
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout i { display: block; }
  .globe-mini { top: 12px; left: 12px; width: 108px; height: 108px; padding: 5px; } .globe-mini canvas { width: 98px; height: 98px; }
  .hud > .hud-menu { top: 12px; left: auto; right: 12px; }
  .hud > .feed { display: none; }
  .hud > .moment { top: 19%; width: calc(100vw - 32px); } .moment b { font-size: 34px; } .moment span { font-size: 14px; }
  .dock { bottom: 8px; width: calc(100vw - 16px); height: 76px; border-radius: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
  .seg-dash { display: none; }
  .dock > .seg { height: 76px; }
  .seg { padding: 10px 11px; grid-template-rows: 12px 1fr 5px; }
  .seg-size, .seg-worth { grid-template-columns: minmax(0, 1fr) 0; column-gap: 0; }
  .seg .lab { font-size: 9px; letter-spacing: .06em; }
  .seg > i { display: none; }
  .seg-size > b { font-size: 19px; } .seg-worth > b { font-size: 21px; }
  .cash-text { font-size: 11px; }
  .seg-cash { grid-template-columns: minmax(0, 1fr) 40px; }
  .seg-cash > .lab { visibility: hidden; }
  .seg-cash > b { font-size: 11px; }
  .hud > .touch-dash, .hud > .touch-cash { bottom: 96px; }
  .sheet { padding: 24px 20px; }
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .howto { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .howto li { padding: 11px 14px; font-size: 12.5px; line-height: 1.42; grid-template-columns: 28px minmax(0, 1fr); row-gap: 3px; }
  .howto li > i { width: 28px; height: 28px; font-size: 14px; }
  .howto li > b { font-size: 17px; }
  .h2 { font-size: 30px; } #d-title { font-size: 26px; } .h2.num { font-size: 38px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules li { grid-template-columns: 1fr; }
  .table .tr { grid-template-columns: 70px minmax(0, 1fr) 96px; } .table .tr span:nth-child(2), .table .tr :nth-child(5) { display: none; }
  .foot { flex-direction: column; border-radius: var(--r2); }
}
@media (pointer: coarse) {
  .touch { display: grid; } .hud-menu kbd { display: none; } .seg-dash { display: none; }
  .dock { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
  .hud > .feed { display: none; }
  .glass, .island { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass { background: rgba(12, 26, 42, .86); }
  #game { cursor: default; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
