:root {
  color-scheme: dark;
  --bg: #000000;
  --s1: #0a0907;
  --s2: #110f0b;
  --s3: #18150f;
  --line: rgba(232, 190, 110, 0.09);
  --line2: rgba(232, 190, 110, 0.17);
  --text: #f6f0e3;
  --muted: #a69c88;
  --dim: #6f6756;
  --light: #e8b65a;
  --light2: #ffe2a6;
  --outer: #d9cba6;
  --belt: #e8b65a;
  --core: #c4802c;
  --heart: #fff0c8;
  --good: #f2cf72;
  --bad: #e0646a;
  --violet: #eadcbc;
  --r: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- shared atoms ---------- */
.wordmark { font-weight: 300; letter-spacing: .42em; text-transform: uppercase; background: linear-gradient(90deg, #fff1cf, #e8b65a 60%, #b8862e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card::after { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,214,140,.35), transparent); pointer-events: none; }
.card { background: linear-gradient(180deg, rgba(20,17,12,.92), rgba(7,6,4,.92)); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; position: relative; overflow: hidden; }
.card h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card h3 small { letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--dim); font-size: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 10px -1px currentColor; }
.who { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; min-width: 0; }
.who .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; font-size: 12px; background: rgba(232,190,110,.07); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip:empty { display: none; }
.chip.live { color: var(--light2); border-color: rgba(244,184,96,.4); background: rgba(244,184,96,.1); }
.chip.ok { color: var(--good); border-color: rgba(242,207,114,.3); background: rgba(242,207,114,.08); }
.chip.warn { color: var(--bad); border-color: rgba(255,100,112,.3); background: rgba(255,100,112,.08); }
.chip.vio { color: var(--violet); border-color: rgba(234,220,188,.3); background: rgba(234,220,188,.08); }
.ring-outer { color: var(--outer); } .ring-belt { color: var(--belt); } .ring-core { color: var(--core); } .ring-heart { color: var(--heart); }
.ringtag { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.btn { white-space: nowrap; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; background: rgba(232,190,110,.08); border: 1px solid var(--line2); transition: transform .12s, background .2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: rgba(255,255,255,.1); }
.btn:active { transform: scale(.97); }
.btn.gold, .primary { background: linear-gradient(180deg, #ffe7bb, #f4b860); color: #1b1206; border: 0; box-shadow: 0 8px 26px -12px rgba(244,184,96,.7); }
.btn.gold:hover, .primary:hover { filter: brightness(1.05); }
.btn.red { color: var(--bad); }
.btn.wide { width: 100%; }
.btn.lg { padding: 15px 18px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .4; pointer-events: none; }
.btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btns > .btn { flex: 1; }
input.field, select.field { width: 100%; background: rgba(232,190,110,.04); border: 1px solid var(--line2); border-radius: 14px; padding: 14px 15px; font-size: 16px; outline: none; transition: border-color .2s; }
input.field:focus { border-color: rgba(244,184,96,.55); }
label.lab { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 14px 0 7px; font-weight: 600; }
.err { color: var(--bad); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; }
.hint b { color: var(--text); font-weight: 600; }
.empty { color: var(--muted); font-size: 14px; padding: 4px 0; line-height: 1.5; }
.seg3, .segN { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(232,190,110,.04); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg3 button, .segN button { padding: 9px 4px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg3 button.on, .segN button.on { background: rgba(232,190,110,.16); color: var(--text); }
.switch { width: 46px; height: 28px; border-radius: 99px; background: rgba(232,190,110,.16); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch.on { background: var(--light); }
.switch.on::after { transform: translateX(18px); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 14px; }

/* ---------- landing ---------- */
.landing { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: calc(14px + var(--safe-t)) 20px calc(40px + var(--safe-b)); }
.lnav { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 10px; }
.lnav .wordmark { font-size: 14px; }
.lnav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.hero { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; padding: 8px 0 18px; }
.hero-art { width: min(420px, 92vw); aspect-ratio: 1; margin: 0 auto; position: relative; }
.hero-art svg { width: 100%; height: 100%; overflow: visible; }
.hero h1 { font-size: clamp(34px, 8.5vw, 64px); line-height: 1.02; letter-spacing: -.035em; margin: 0; font-weight: 700; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #ffe1a8, #f4b860 40%, #ff8a4c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { color: var(--muted); font-size: 17px; line-height: 1.55; margin: 16px 0 0; max-width: 34em; }
.ctas { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
.cta { background: linear-gradient(180deg, rgba(24,20,13,.92), rgba(9,8,6,.92)); border: 1px solid var(--line2); border-radius: 20px; padding: 18px; }
.cta h2 { margin: 0 0 4px; font-size: 18px; }
.cta p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.cta.start { border-color: rgba(244,184,96,.35); background: radial-gradient(120% 140% at 0% 0%, rgba(244,184,96,.16), transparent 55%), linear-gradient(180deg, rgba(24,20,13,.95), rgba(9,8,6,.95)); }
.codebox { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.codebox input { width: 100%; aspect-ratio: .86; text-align: center; font-size: 26px; font-weight: 700; text-transform: uppercase; background: rgba(232,190,110,.05); border: 1px solid var(--line2); border-radius: 12px; outline: none; padding: 0; caret-color: var(--light); }
.codebox input:focus { border-color: rgba(244,184,96,.7); box-shadow: 0 0 0 3px rgba(244,184,96,.12); }
.myleagues { margin-top: 26px; }
.sectionh { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 2px 12px; display: flex; justify-content: space-between; }
.lgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lcard { display: block; text-align: left; width: 100%; background: linear-gradient(180deg, rgba(20,17,12,.92), rgba(7,6,4,.92)); border: 1px solid var(--line); border-radius: 18px; padding: 16px; position: relative; overflow: hidden; transition: border-color .2s, transform .15s; }
.lcard:hover { border-color: var(--line2); }
.lcard:active { transform: scale(.99); }
.lcard .lname { font-size: 18px; font-weight: 650; }
.lcard .lmeta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.lcard .lstat { display: flex; gap: 16px; margin-top: 14px; }
.lcard .lstat div b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.lcard .lstat div span { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.lcard .lglow { position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; opacity: .16; pointer-events: none; }
.lcard .gone { color: var(--dim); }
.how { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 30px; }
.how .step { background: rgba(232,190,110,.025); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.how .step .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--light); font-weight: 700; }
.how .step h4 { margin: 6px 0 6px; font-size: 17px; }
.how .step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.lfoot { color: var(--dim); font-size: 12px; text-align: center; margin-top: 36px; }
@media (min-width: 820px) {
  .hero { grid-template-columns: 1.05fr .95fr; gap: 30px; padding-top: 30px; }
  .hero-art { order: 2; }
  .ctas { grid-template-columns: 1fr 1fr; }
  .lgrid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .how { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- join page ---------- */
.joinpage { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 20px calc(40px + var(--safe-b)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.joinpage .back { position: absolute; top: calc(16px + var(--safe-t)); left: 16px; }
.lprev { text-align: center; margin-bottom: 18px; }
.lprev .code { display: inline-flex; gap: 5px; margin-top: 10px; }
.lprev .code span { width: 34px; height: 40px; display: grid; place-items: center; background: rgba(232,190,110,.05); border: 1px solid var(--line2); border-radius: 9px; font-weight: 700; font-size: 18px; }
.lprev h1 { margin: 16px 0 4px; font-size: 30px; letter-spacing: -.02em; }
.seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.seatcell { border: 1px dashed var(--line2); border-radius: 14px; padding: 10px 8px; text-align: center; font-size: 13px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dim); }
.seatcell.taken { border-style: solid; color: var(--text); background: rgba(232,190,110,.035); }
.seatcell.ghost { border-style: solid; color: var(--muted); }
.seatcell.pick { cursor: pointer; }
.seatcell.picked { border-color: rgba(244,184,96,.8); background: rgba(244,184,96,.1); }
.seatcell .av { width: 22px; height: 22px; border-radius: 50%; }

/* ---------- game shell ---------- */
.game { position: relative; z-index: 1; max-width: 1380px; margin: 0 auto; padding: calc(8px + var(--safe-t)) 16px calc(110px + var(--safe-b)); }
.top { display: flex; justify-content: space-between; align-items: flex-end; padding: 8px 2px 10px; gap: 10px; }
.top-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.back { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(232,190,110,.07); border: 1px solid var(--line); font-size: 22px; line-height: 1; text-decoration: none; color: var(--muted); flex: none; padding-bottom: 3px; }
.league-name { font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.phase-line { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.phase-line b { color: var(--light); font-weight: 600; }
.top-r { text-align: right; flex: none; }
.clock-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.clock { font-size: 30px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 2px; }
.clock.hot { color: var(--light2); text-shadow: 0 0 22px rgba(244,184,96,.45); }
.rail { display: grid; grid-template-columns: 1fr 22px 1fr 22px 1fr; gap: 4px; margin: 2px 0 14px; }
.seg { position: relative; height: 26px; border-radius: 8px; background: var(--s1); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.seg.gap { border-radius: 6px; background: transparent; border-style: dashed; }
.seg .fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, rgba(244,184,96,.18), rgba(244,184,96,.38)); }
.seg span { position: relative; }
.seg.done { color: var(--muted); background: rgba(244,184,96,.07); border-color: rgba(244,184,96,.16); }
.seg.on { color: var(--light2); border-color: rgba(244,184,96,.5); box-shadow: 0 0 18px -6px rgba(244,184,96,.7); }
.seg.on.gap { border-style: solid; }
.tabs { position: sticky; top: calc(6px + var(--safe-t)); z-index: 5; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(7,6,4,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.tabs button { position: relative; z-index: 1; padding: 10px 0; font-weight: 600; font-size: 14px; color: var(--muted); transition: color .25s; }
.tabs button.on { color: #14100a; }
.tab-ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; border-radius: 10px; background: linear-gradient(180deg, #fff1d6, #f2c27a); transition: transform .35s var(--ease), width .35s var(--ease); }
.gamegrid { display: block; }
.desktop-only { display: none; }
main { animation: rise .35s var(--ease); min-width: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

@media (min-width: 1000px) {
  .game { padding-left: 24px; padding-right: 24px; }
  .gamegrid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr); gap: 20px; align-items: start; }
  .desktop-only { display: block; }
  .mobile-only { display: none !important; }
  .mappane { position: sticky; top: calc(70px + var(--safe-t)); max-height: calc(100vh - 90px); overflow-y: auto; scrollbar-width: none; }
  .mappane::-webkit-scrollbar { display: none; }
  .mappane .map { max-height: calc(100vh - 250px); }
  .mappane .mapcard { max-width: calc(100vh - 230px); margin-left: auto; margin-right: auto; }
  .league-name, .phase-line { max-width: 60vw; }
  .rail { max-width: 720px; }
  .tabs { max-width: none; }
}

/* ---------- You ---------- */
.seat { padding: 18px; }
.seat::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, var(--me, #5b8cff) 0%, transparent 65%); opacity: .2; pointer-events: none; }
.seat .name { font-size: 20px; font-weight: 650; display: flex; align-items: center; gap: 9px; }
.seat .bank { text-align: right; }
.seat .bank b { display: block; font-size: 38px; font-weight: 650; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.seat .bank span { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: rgba(232,190,110,.035); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; min-width: 0; }
.stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.stat > span { font-size: 11px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner { border-color: rgba(244,184,96,.22); background: radial-gradient(120% 140% at 0% 0%, rgba(244,184,96,.12), transparent 60%), linear-gradient(180deg, rgba(20,17,12,.95), rgba(7,6,4,.95)); }
.banner .big { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.tl:first-child { border-top: 0; padding-top: 2px; }
.tl .when { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.tl .when small { display: block; letter-spacing: 0; text-transform: none; color: var(--dim); font-weight: 500; font-size: 12px; margin-top: 2px; }
.tl .what { font-size: 14px; display: grid; gap: 4px; }
.tl .what .q { color: var(--dim); }
.tl.done .when, .tl.done .what { opacity: .55; }
.tl.now .when { color: var(--light2); }
.fleet { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.fleet:first-of-type { border-top: 0; padding-top: 2px; }
.fleet .pip { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.fleet .pip::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }
.fleet .meta { flex: 1; min-width: 0; }
.fleet .where { font-weight: 600; }
.fleet .what { color: var(--muted); font-size: 13px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fleet .what b { color: var(--text); font-weight: 600; }
.chev { color: var(--dim); font-size: 18px; }
.deal { padding: 12px 0; border-top: 1px solid var(--line); }
.deal:first-of-type { border-top: 0; padding-top: 0; }
.swap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.swap .arrow { color: var(--dim); }

/* fights */
.fight { padding: 14px; border-radius: 16px; background: rgba(232,190,110,.03); border: 1px solid var(--line); margin-top: 10px; position: relative; overflow: hidden; }
.fight:first-child { margin-top: 0; }
.fight.mine { border-color: rgba(244,184,96,.3); background: radial-gradient(140% 120% at 100% 0%, rgba(244,184,96,.09), transparent 55%), rgba(232,190,110,.03); }
.fight .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fight .title { font-weight: 650; font-size: 16px; }
.fight .vs { display: flex; align-items: flex-start; justify-content: space-between; margin: 10px 0 8px; font-size: 13px; gap: 10px; }
.fight .vs .side { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fight .vs .side.r { align-items: flex-end; text-align: right; }
.fight .vs .role { color: var(--dim); font-size: 11px; letter-spacing: .06em; }
.ground { display: flex; align-items: baseline; gap: 8px; }
.ground b { font-size: 44px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; transition: color .4s; }
.ground span { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.districts { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; margin: 12px 0 8px; }
.districts i { height: 14px; border-radius: 3px; background: rgba(232,190,110,.07); transition: background .5s, box-shadow .5s; }
.spark { width: 100%; height: 40px; display: block; }
.stamp { position: absolute; right: 12px; top: 12px; transform: rotate(-6deg); font-weight: 800; letter-spacing: .16em; font-size: 13px; padding: 4px 9px; border: 2px solid currentColor; border-radius: 7px; text-transform: uppercase; opacity: 0; background: rgba(7,8,12,.6); }
.stamp.show { animation: stamp .5s var(--ease) forwards; }
@keyframes stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.8); } to { opacity: .95; transform: rotate(-6deg) scale(1); } }
.fight.small { padding: 11px 12px; }
.fight.small .ground b { font-size: 24px; }
.fight.small .districts { margin: 8px 0 0; }
.fight.small .districts i { height: 8px; }
.walkrow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.walkrow:first-child { border-top: 0; }
.walkrow.mine b { color: var(--light2); }
.wr-v { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.recap li { list-style: none; display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.recap li:first-child { border-top: 0; }
.recap ul { margin: 0; padding: 0; }
.recap .tg { flex: none; width: 64px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); padding-top: 3px; }
.tg.Heart, .tg.Nexus { color: var(--heart); } .tg.Lucky { color: var(--light2); } .tg.Upset { color: var(--bad); } .tg.Dark { color: var(--violet); } .tg.Nobody { color: var(--muted); } .tg.Knife { color: #ff8a9a; }
.tg.Taken { color: var(--core); } .tg.Held { color: var(--belt); } .tg.Matchup, .tg.Rivalry { color: var(--light); } .tg.Walked { color: var(--outer); } .tg.Blocked { color: var(--dim); }
.gains { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.award { border: 1px solid var(--line2); border-radius: 14px; padding: 10px 12px; background: rgba(232,190,110,.03); }
.award .at { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--light); font-weight: 700; }
.award .aw { margin-top: 5px; }
.award .ax { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* map */
.mapcard { padding: 0; background: #000; }
.mapwrap { position: relative; }
.map { width: 100%; height: auto; aspect-ratio: 1; display: block; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.map:active { cursor: grabbing; }
.map text { pointer-events: none; }
.map .lbl { font-size: 7.4px; fill: #b4b6c6; letter-spacing: .02em; paint-order: stroke; stroke: #05060a; stroke-width: 2.4px; stroke-linejoin: round; }
.map .lbl.me { fill: #fff; font-weight: 700; }
.map .lbl.heart { fill: #ffe1a8; font-weight: 700; font-size: 9px; letter-spacing: .14em; }
.map .ringname { font-size: 6.4px; font-weight: 700; letter-spacing: .32em; paint-order: stroke; stroke: #000; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.map .pts { font-weight: 800; fill: rgba(255,255,255,.82); }
.map .sph { cursor: pointer; }
.map .lane { stroke-width: .7; }
.map .lane.hot { stroke: rgba(255,225,168,.6) !important; stroke-width: 1.3; }
.map .order { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.map .order.back { stroke-dasharray: 1 3.5; }
.map .target { fill: none; stroke: var(--light2); stroke-width: 1.4; stroke-dasharray: 3 3; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -12; } }
.map .sel { fill: none; stroke: #fff; stroke-width: 1.6; }
.map .contest { fill: none; stroke-width: 3; stroke-linecap: round; }
.map .contest-bg { fill: none; stroke-width: 3; }
.map .pulse { fill: none; stroke: var(--light2); stroke-width: 1; animation: pulse 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
.map .draftable { fill: none; stroke: var(--light2); stroke-width: 1.2; animation: pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.map .tw { animation: tw 4s ease-in-out infinite; }
@keyframes tw { 50% { opacity: .25; } }
.map .corona { animation: corona 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes corona { 50% { transform: scale(1.18); opacity: .55; } }
.map .rays { animation: spin 90s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.map .front { fill: none; stroke: url(#frontGrad); stroke-width: 12; opacity: 0; }
.map .front.go { animation: front 2.2s var(--ease) forwards; }
@keyframes front { 0% { opacity: .9; } 100% { opacity: 0; } }
.maptools { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.maptools button { width: 34px; height: 34px; border-radius: 10px; background: rgba(7,6,4,.8); border: 1px solid var(--line2); color: var(--muted); font-size: 17px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.layers { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: 70%; }
.layers button { padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: rgba(7,6,4,.8); border: 1px solid var(--line2); color: var(--dim); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.layers button.on { color: var(--light2); border-color: rgba(244,184,96,.4); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lgdot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.lgpip { width: 8px; height: 8px; transform: rotate(45deg); display: inline-block; border-radius: 2px; }

/* matchup */
.matchup { text-align: center; padding: 20px 16px; }
.matchup .sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.matchup .side b { display: block; font-size: 52px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 8px; }
.matchup .side .who { justify-content: center; }
.matchup .side .rec { color: var(--muted); font-size: 12px; margin-top: 4px; }
.matchup .v { color: var(--dim); font-size: 12px; letter-spacing: .2em; }
.beltring { width: 210px; height: 210px; margin: 14px auto 6px; display: block; }
.vsrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; gap: 8px; }
.vsrow:first-child { border-top: 0; }
.vsrow .c { color: var(--muted); font-size: 12px; text-align: center; letter-spacing: .06em; }
.vsrow .r { text-align: right; justify-self: end; }
.vsrow .w { color: var(--light2); }

/* league */
.subtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; padding-bottom: 2px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: none; padding: 8px 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: rgba(232,190,110,.03); }
.subtabs button.on { color: #14100a; background: linear-gradient(180deg, #fff1d6, #f2c27a); border-color: transparent; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 600; text-align: left; padding: 0 4px 8px; }
.table th.r, .table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.table td { padding: 10px 4px; border-top: 1px solid var(--line); }
.table .rank { color: var(--dim); width: 20px; }
.table .me td { color: var(--light2); }
.online { width: 6px; height: 6px; border-radius: 50%; background: #7fdc9a; display: inline-block; margin-left: 6px; box-shadow: 0 0 6px #7fdc9a; flex: none; }
.ghost { font-size: 10px; color: var(--dim); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 5px; margin-left: 6px; letter-spacing: .06em; font-weight: 500; }
.rep { font-size: 12px; color: var(--muted); white-space: nowrap; }
.progress { height: 6px; border-radius: 99px; background: rgba(232,190,110,.07); overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--light), var(--light2)); border-radius: 99px; }
.wk { padding: 12px 0; border-top: 1px solid var(--line); }
.wk:first-of-type { border-top: 0; padding-top: 0; }
.wk .wkh { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 6px; display: flex; justify-content: space-between; }
.wk.cur .wkh { color: var(--light2); }
.feed div { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.feed div:first-child { border-top: 0; }
.feed .k-betrayal { color: #ffb3bc; }
.feed .k-trade { color: #d7c2ff; }
.tape .tp { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 6px 0; font-size: 13px; }
.tape .tp .rg { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; padding-top: 2px; }
.tape .pl { padding: 10px 0; border-top: 1px solid var(--line); }
.tape .pl:first-child { border-top: 0; }
.leaders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.champ { text-align: center; padding: 22px 16px; border-color: rgba(255,211,138,.35); background: radial-gradient(100% 120% at 50% 0%, rgba(255,211,138,.16), transparent 60%), linear-gradient(180deg, rgba(20,17,12,.95), rgba(7,6,4,.95)); }
.champ .trophy { font-size: 44px; }
.champ h2 { margin: 6px 0 2px; font-size: 26px; }
.invite { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bigcode { display: flex; gap: 6px; }
.bigcode span { width: 40px; height: 48px; display: grid; place-items: center; background: rgba(232,190,110,.05); border: 1px solid var(--line2); border-radius: 10px; font-weight: 800; font-size: 22px; }
@media (max-width: 380px) { .bigcode span { width: 34px; height: 42px; font-size: 19px; } }

/* draft */
.draftboard .order { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.draftboard .order .chip.on { color: #14100a; background: linear-gradient(180deg, #fff1d6, #f2c27a); border-color: transparent; }
.picks { display: grid; gap: 0; margin-top: 8px; }
.picks div { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.picks div:first-child { border-top: 0; }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-width: 580px; margin: 0 auto; max-height: 88vh; max-height: 88dvh; overflow-y: auto; background: linear-gradient(180deg, #15120c, #0a0907); border: 1px solid var(--line2); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 8px 18px calc(22px + var(--safe-b)); transform: translateY(105%); box-shadow: 0 -20px 60px rgba(0,0,0,.5); }
.sheet.open { transform: translateY(0); visibility: visible; transition: transform .38s var(--ease), visibility 0s; }
.sheet:not(.open) { visibility: hidden; transition: transform .38s var(--ease), visibility 0s .38s; }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--muted); font-size: 14px; display: grid; place-items: center; z-index: 2; }
.grab { width: 40px; height: 5px; border-radius: 99px; background: rgba(232,190,110,.25); margin: 4px auto 12px; }
.sheet h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.01em; padding-right: 40px; }
.sheet .sub { color: var(--muted); margin: 4px 0 14px; font-size: 14px; line-height: 1.5; }
.sheet h4 { margin: 18px 0 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
@media (min-width: 1000px) {
  .sheet { top: 50%; bottom: auto; border-radius: 24px; border-bottom: 1px solid var(--line2); max-height: 84vh; transform: translateY(-46%) scale(.97); opacity: 0; }
  .sheet.open { transform: translateY(-50%) scale(1); opacity: 1; transition: transform .3s var(--ease), opacity .2s, visibility 0s; }
  .sheet:not(.open) { transition: transform .25s var(--ease), opacity .2s, visibility 0s .25s; }
  .grab { display: none; }
  .sheet { padding-top: 22px; }
}
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.opt { text-align: left; padding: 11px 12px; border-radius: 14px; background: rgba(232,190,110,.045); border: 1px solid var(--line2); transition: transform .12s, border-color .2s, background .2s; min-width: 0; }
.opt:hover { border-color: rgba(255,255,255,.2); }
.opt:active { transform: scale(.97); }
.opt.on { border-color: rgba(244,184,96,.7); background: rgba(244,184,96,.12); }
.opt:disabled { opacity: .35; }
.opt .t { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.opt .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.explain { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: rgba(232,190,110,.025); font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 12px; }
.explain b { color: var(--text); }
.timing { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--light2); background: rgba(244,184,96,.08); border: 1px solid rgba(244,184,96,.25); padding: 4px 10px; border-radius: 99px; }

/* talk */
.thread { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 16px; background: rgba(232,190,110,.07); font-size: 15px; line-height: 1.35; align-self: flex-start; word-wrap: break-word; position: relative; cursor: pointer; }
.msg .from { font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.msg.me { align-self: flex-end; background: linear-gradient(180deg, #ffe7bb, #f2bd6c); color: #1b1206; border-bottom-right-radius: 6px; }
.msg.them { border-bottom-left-radius: 6px; }
.res { display: flex; gap: 4px; flex-wrap: wrap; margin-top: -2px; }
.res.r { align-self: flex-end; } .res.l { align-self: flex-start; }
.res button { font-size: 12px; padding: 2px 7px; border-radius: 99px; background: rgba(232,190,110,.08); border: 1px solid var(--line); }
.res button.mine { border-color: rgba(244,184,96,.6); }
.reactbar { display: flex; gap: 4px; padding: 6px; border-radius: 99px; background: #1f1a11; border: 1px solid var(--line2); align-self: flex-start; }
.reactbar.r { align-self: flex-end; }
.reactbar button { font-size: 20px; padding: 2px 5px; border-radius: 50%; transition: transform .1s; }
.reactbar button:active { transform: scale(1.3); }
.ev { align-self: center; text-align: center; font-size: 12px; color: var(--muted); max-width: 90%; padding: 4px 0; }
.ev.private { color: var(--violet); }
.ev.result { color: var(--light2); }
.ev.betrayal { color: #ffb3bc; font-weight: 600; }
.compose { position: sticky; bottom: calc(-22px - var(--safe-b)); display: flex; gap: 8px; padding: 10px 0 4px; background: linear-gradient(180deg, transparent, #0a0907 30%); }
.compose input { padding: 12px 14px; font-size: 16px; border-radius: 99px; }
.compose button { flex: none; width: 46px; height: 46px; border-radius: 50%; }
.dmlist button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border-top: 1px solid var(--line); text-align: left; }
.dmlist button:first-child { border-top: 0; }
.dmlist .last { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmlist .meta { flex: 1; min-width: 0; }
.unread { min-width: 18px; height: 18px; border-radius: 99px; background: var(--light); color: #1b1206; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.fab { position: fixed; z-index: 30; right: max(16px, calc(50% - 674px)); bottom: calc(18px + var(--safe-b)); width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(180deg, #1f1a11, #0f0d09); border: 1px solid var(--line2); color: var(--text); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: transform .15s; }
.fab:active { transform: scale(.94); }
.badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 99px; background: var(--light); color: #1b1206; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.toasts { position: fixed; z-index: 60; left: 0; right: 0; top: calc(10px + var(--safe-t)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 520px; width: 100%; background: rgba(24,20,13,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line2); border-radius: 16px; padding: 12px 14px; font-size: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.45); animation: tin .4s var(--ease); pointer-events: auto; }
.toast.gold { border-color: rgba(244,184,96,.5); }
.toast.knife { border-color: rgba(255,100,112,.6); background: rgba(38,14,12,.95); }
.toast.warn { border-color: rgba(255,100,112,.5); }
.toast.out { animation: tout .3s forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes tout { to { opacity: 0; transform: translateY(-10px); } }
.footer { text-align: center; color: var(--dim); font-size: 12px; margin: 22px 0 8px; line-height: 1.6; }
.footer button { color: var(--muted); text-decoration: underline dotted; }

/* how to play */
.howcards { display: grid; gap: 10px; }
.howcard { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: rgba(232,190,110,.03); }
.howcard .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--light); font-weight: 700; }
.howcard h4 { margin: 4px 0 4px !important; font-size: 16px !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text) !important; }
.howcard p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.shiftbox { border: 1px solid rgba(232,182,90,.45); border-radius: 16px; padding: 14px; margin: 4px 0 14px; background: radial-gradient(120% 140% at 0% 0%, rgba(232,182,90,.16), transparent 60%), rgba(232,190,110,.03); }
.shiftbox .sbh { font-weight: 650; font-size: 16px; margin-bottom: 4px; color: var(--light2); }
.allrow { border: 1px solid var(--line2); border-radius: 14px; padding: 10px 12px; margin: 0 0 12px; }

/* ---- v4: duels, the Commons, zones ---- */
.ring-commons { color: var(--belt); } .ring-key { color: #f4c46a; } .ring-lens { color: var(--outer); } .ring-home { color: var(--dim); } .ring-edge { color: var(--outer); }
.map .duelname { font-weight: 700; letter-spacing: .08em; fill: rgba(232,214,170,.62); paint-order: stroke; stroke: #000; stroke-width: 2.6px; stroke-linejoin: round; pointer-events: none; text-transform: uppercase; }
.map .duelname.mine { fill: #f4c46a; }
.lensart { width: 100%; max-width: 360px; height: auto; display: block; margin: 12px auto 8px; }
.duel .sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.duel .side b { display: block; font-size: 34px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 6px; }
.duel .side .who { justify-content: center; }
.duel .v { color: var(--dim); font-size: 11px; letter-spacing: .2em; }
.duel.compact .lensart { max-width: 300px; margin: 6px auto 4px; }
.table tr.cutline td { border-bottom: 1px solid rgba(244,196,106,.65) !important; }
.tg.Duel, .tg.Final, .tg.Semifinal, .tg.Quarterfinal, .tg.Thirdplace { color: var(--light); } .tg.Spoiler { color: var(--dim); } .tg.Meddled { color: #f4c46a; }
.recap .tg { width: 76px; }
