/* CG Trivia v2 — Creative Grace design system
   Brand: Deep Royal Blue #3557B7 (accent only), warm whites #FCFAF7 / #FFFFF5, dark ink text. */
@layer ui-sdk;
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&family=Schibsted+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap");

:root {
  --bg: #FCFAF7;
  --surface: #FFFFF5;
  --surface-2: #F7F4EE;
  --white: #FFFFFF;
  --ink: #131A2B;
  --text: #1B2234;
  --muted: #586076;
  --faint: #6B7183;
  --accent: #3557B7;
  --accent-hover: #2C4BA3;
  --accent-press: #233D87;
  --accent-2: #5B7BDA;
  --accent-soft: #EAEFFB;
  --accent-softer: #F3F6FD;
  --accent-ring: rgba(53, 87, 183, 0.22);
  --line: rgba(19, 26, 43, 0.08);
  --line-strong: rgba(19, 26, 43, 0.14);
  --win: #17794A; --win-soft: #E6F5EC;
  --lose: #B42318; --lose-soft: #FDECEA;
  --draw: #8A5A12; --draw-soft: #FAF1DD;
  --gold: #C98A1B; --gold-soft: #FBF1DA;
  --silver: #7B8496; --bronze: #A8642E;
  --r-sm: 10px; --r: 14px; --r-lg: 22px; --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(19, 26, 43, 0.05), 0 1px 1px rgba(19, 26, 43, 0.03);
  --sh-2: 0 1px 2px rgba(19, 26, 43, 0.04), 0 6px 16px -6px rgba(19, 26, 43, 0.08), 0 18px 40px -20px rgba(53, 87, 183, 0.14);
  --sh-3: 0 2px 4px rgba(19, 26, 43, 0.04), 0 12px 28px -10px rgba(19, 26, 43, 0.14), 0 32px 64px -28px rgba(53, 87, 183, 0.28);
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.6 var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: -20vh -10vw auto; height: 80vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 18% 20%, rgba(53, 87, 183, 0.10), transparent 70%),
    radial-gradient(35% 45% at 85% 10%, rgba(122, 147, 224, 0.12), transparent 70%),
    radial-gradient(30% 40% at 60% 60%, rgba(232, 184, 109, 0.08), transparent 70%);
}
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 .4em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; }
p { margin: 0 0 .75em; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.xs { font-size: .75rem; }
.mono { font-family: var(--mono); font-size: .86em; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.ok { color: var(--win); }
.err { color: var(--lose); }
.center { text-align: center; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }

/* header */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(252, 250, 247, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { max-width: var(--maxw); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; }
.brand:hover { color: inherit; }
.logo {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: linear-gradient(145deg, #4A6BCB, var(--accent) 55%, #263F8C);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 14px -4px rgba(53,87,183,.5);
  display: grid; place-items: center; color: #fff;
  font: 800 15px/1 var(--display); letter-spacing: -0.04em;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text strong { font: 700 1.08rem/1.1 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.brand-text span { font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; align-items: center; gap: 2px; padding: 4px; background: rgba(19, 26, 43, 0.04); border: 1px solid var(--line); border-radius: 999px; }
.tabs button, .tabs a {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-weight: 600; font-size: .88rem; color: var(--muted);
  transition: color .2s, background .2s, box-shadow .2s; white-space: nowrap;
}
.tabs .ic { width: 16px; height: 16px; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs button.active, .tabs a.active { background: var(--white); color: var(--ink); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.tabs button.active .ic, .tabs a.active .ic { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.who {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 14px 4px 4px; box-shadow: var(--sh-1);
  min-width: 0; transition: box-shadow .2s, transform .2s var(--ease);
}
.who:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.who .meta { line-height: 1.15; min-width: 0; }
.who .name { font-weight: 700; font-size: .86rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.who .bal { font-size: .74rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.av { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 2px 6px -2px rgba(19,26,43,.25); }
.av svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.av b { position: relative; color: #fff; font: 800 1em/1 var(--display); letter-spacing: -0.02em; text-shadow: 0 1px 2px rgba(0,0,0,.18); }

/* layout */
main { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 96px; }
.panel { display: none; }
.panel.show { display: block; animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stack > * + * { margin-top: 20px; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bento { display: grid; gap: 20px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 48px 0 18px; }
.section-head h2 { margin: 4px 0 0; font-size: 1.75rem; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 560px; }

/* card */
.card { position: relative; background: linear-gradient(180deg, var(--white), var(--surface)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-2); }
.card.flat { box-shadow: none; background: var(--surface-2); border-color: transparent; padding: 16px; border-radius: var(--r); }
.card.lift { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-strong); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h3 { margin: 6px 0 0; }
.kicker { display: inline-flex; align-items: center; gap: 7px; font: 600 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.kicker .ic { width: 14px; height: 14px; }
.icon-tile { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(53,87,183,.10); }
.icon-tile .ic { width: 20px; height: 20px; }
.icon-tile.lg { width: 52px; height: 52px; border-radius: 16px; }
.icon-tile.lg .ic { width: 26px; height: 26px; }
.icon-tile.gold { background: var(--gold-soft); color: #A06A0E; box-shadow: inset 0 0 0 1px rgba(201,138,27,.15); }
.icon-tile.green { background: var(--win-soft); color: var(--win); box-shadow: inset 0 0 0 1px rgba(23,121,74,.15); }
.icon-tile.rose { background: #FCEBF1; color: #B4235A; }
.icon-tile.violet { background: #F2EAFB; color: #7C3AAD; }
.icon-tile.orange { background: #FDEEE3; color: #C2410C; }
.icon-tile.teal { background: #E3F4F7; color: #0E7490; }
.icon-tile.ink { background: #EDEEF2; color: var(--ink); }

/* buttons */
.btn {
  appearance: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink);
  font-weight: 700; font-size: .92rem; letter-spacing: -0.005em;
  box-shadow: var(--sh-1), inset 0 -1px 0 rgba(19,26,43,.04);
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); border-color: rgba(19,26,43,.2); color: var(--ink); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: var(--sh-1); }
.btn:focus-visible, .tabs button:focus-visible, input:focus-visible, .tile:focus-visible, .mode:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn .ic { width: 17px; height: 17px; }
.btn.primary { background: linear-gradient(180deg, #3F63C6, var(--accent)); border-color: #2C4BA3; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 2px rgba(19,26,43,.15), 0 8px 20px -8px rgba(53,87,183,.65); }
.btn.primary:hover { background: linear-gradient(180deg, #3A5DBF, var(--accent-hover)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 28px -10px rgba(53,87,183,.75); }
.btn.primary:active { background: var(--accent-press); }
.btn.lg { height: 54px; padding: 0 26px; font-size: 1rem; border-radius: 15px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: .82rem; border-radius: 10px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(19,26,43,.05); }
.btn.danger { color: var(--lose); border-color: rgba(180,35,24,.25); background: #FFF8F7; }
.btn.danger:hover { color: var(--lose); border-color: rgba(180,35,24,.45); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; font: 600 .72rem/1 var(--mono); color: var(--muted); background: var(--white); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; }

/* chips */
.chip, .badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.3; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.chip .ic, .badge .ic { width: 13px; height: 13px; }
.badge.ok, .chip.ok { background: var(--win-soft); color: var(--win); }
.badge.bad, .chip.bad { background: var(--lose-soft); color: var(--lose); }
.badge.warn, .chip.warn { background: var(--draw-soft); color: var(--draw); }
.chip.neutral, .badge.neutral { background: rgba(19,26,43,.06); color: var(--muted); }
.chip.onchain { background: var(--accent-soft); color: var(--accent); }
.chip.ledger { background: rgba(19,26,43,.06); color: var(--muted); }
.chip.gold { background: var(--gold-soft); color: #845508; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #E5484D; position: relative; flex: none; display: inline-block; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: rgba(229,72,77,.35); animation: pulse 1.6s ease-out infinite; }
.live-dot.green { background: #22A06B; } .live-dot.green::after { background: rgba(34,160,107,.35); }
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22A06B; margin-right: 6px; box-shadow: 0 0 0 3px rgba(34,160,107,.18); animation: blink 1.6s infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: .45; } }

/* hero */
.hero-wrap { position: relative; overflow: hidden; border-radius: var(--r-xl); background: linear-gradient(180deg, #FFFFFB, var(--surface)); border: 1px solid var(--line); box-shadow: var(--sh-3); padding: 56px 56px 48px; isolation: isolate; }
.hero-wrap::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(42% 60% at 88% 30%, rgba(53, 87, 183, 0.20), transparent 70%),
    radial-gradient(30% 45% at 70% 90%, rgba(122, 147, 224, 0.20), transparent 70%),
    radial-gradient(28% 40% at 98% 95%, rgba(232, 184, 109, 0.22), transparent 70%),
    radial-gradient(30% 50% at 0% 0%, rgba(53, 87, 183, 0.07), transparent 70%); }
.hero-wrap::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(19,26,43,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(19,26,43,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 80% at 75% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 80% at 75% 40%, #000 20%, transparent 75%); }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-1); font-size: .8rem; font-weight: 700; color: var(--ink); }
.eyebrow .pill { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: .7rem; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 6px; }
.eyebrow .pill .live-dot { background: #fff; width: 6px; height: 6px; }
.eyebrow .pill .live-dot::after { background: rgba(255,255,255,.5); }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); line-height: .98; letter-spacing: -0.045em; font-weight: 800; margin: 22px 0 18px; }
.grad-text { color: var(--ink); }
@keyframes sheen { 50% { background-position: 100% 0; } }
.hero .lead { font-size: 1.1rem; line-height: 1.6; color: var(--muted); max-width: 520px; margin-bottom: 28px; }
.hero .btn-row { margin-top: 0; gap: 12px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.stat-chip { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: rgba(255,255,255,.78); border: 1px solid var(--line); backdrop-filter: blur(8px); box-shadow: var(--sh-1); }
.stat-chip .icon-tile { width: 34px; height: 34px; border-radius: 10px; }
.stat-chip .icon-tile .ic { width: 17px; height: 17px; }
.stat-chip b { display: block; font: 700 1.1rem/1.1 var(--display); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-chip span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.hero .stat-chip { padding: 8px 12px 8px 8px; gap: 8px; }

.art { position: relative; height: 440px; perspective: 1200px; }
.orbit { position: absolute; left: 50%; top: 50%; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; border: 1px dashed rgba(53,87,183,.22); animation: spin 40s linear infinite; }
.orbit.o2 { width: 300px; height: 300px; margin: -150px 0 0 -150px; animation-duration: 28s; animation-direction: reverse; border-color: rgba(53,87,183,.14); }
.orbit .coin { position: absolute; animation: spin 40s linear infinite reverse; }
.orbit.o2 .coin { animation-duration: 28s; animation-direction: normal; }
@keyframes spin { to { transform: rotate(360deg); } }
.coin { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #FFF3C9, #F2C14E 42%, #C98A1B 100%); box-shadow: inset 0 -3px 0 rgba(120,70,0,.25), inset 0 2px 0 rgba(255,255,255,.6), 0 10px 20px -8px rgba(160,100,10,.55); display: grid; place-items: center; font: 800 .74rem/1 var(--display); color: #3A2401; letter-spacing: -0.02em; }
.coin.sm { width: 34px; height: 34px; font-size: .6rem; }
.coin.blue { background: radial-gradient(circle at 32% 28%, #5B7BDA, #3557B7 45%, #233D87 100%); color: #fff; box-shadow: inset 0 -3px 0 rgba(20,40,110,.3), inset 0 2px 0 rgba(255,255,255,.5), 0 10px 20px -8px rgba(53,87,183,.6); }
.q-card { position: absolute; left: 50%; top: 50%; width: 320px; margin-left: -160px; margin-top: -150px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 2px 4px rgba(19,26,43,.04), 0 30px 60px -20px rgba(19,26,43,.25), 0 40px 80px -30px rgba(53,87,183,.4); padding: 20px; transform: rotateY(-10deg) rotateX(6deg) rotate(-2deg); animation: float 6s ease-in-out infinite; z-index: 2; }
.q-card.back { transform: rotateY(-10deg) rotateX(6deg) rotate(8deg) translate(70px, -70px) scale(.86); opacity: .75; animation: none; z-index: 1; box-shadow: 0 20px 40px -20px rgba(19,26,43,.2); }
.art::before { content: ""; position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%; background: radial-gradient(circle, rgba(53,87,183,.28), rgba(122,147,224,.12) 45%, transparent 70%); filter: blur(10px); }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.q-card .qh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.q-card .qt { font: 700 1.08rem/1.3 var(--display); color: var(--ink); margin-bottom: 14px; letter-spacing: -0.015em; }
.q-card .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-card .opt { border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 12px; padding: 9px 10px; font-size: .84rem; font-weight: 700; display: flex; gap: 8px; align-items: center; background: var(--white); color: var(--ink); }
.q-card .opt i { font: 700 .66rem/1 var(--mono); font-style: normal; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: rgba(19,26,43,.06); color: var(--muted); }
.q-card .opt.right { border-color: rgba(23,121,74,.45); background: var(--win-soft); color: var(--win); }
.q-card .opt.right i { background: var(--win); color: #fff; }
.float-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.94); border: 1px solid var(--line); backdrop-filter: blur(8px); box-shadow: 0 14px 30px -12px rgba(19,26,43,.3); font-size: .8rem; font-weight: 800; color: var(--ink); animation: float 5s ease-in-out infinite; }
.float-chip .ic { width: 16px; height: 16px; }
.float-chip.win { top: 30px; right: 0; animation-delay: -1s; }
.float-chip.win .ic { color: var(--win); }
.float-chip.streak { bottom: 44px; left: 0; animation-delay: -2.5s; }
.float-chip.streak .ic { color: #EA580C; }
.float-chip.live { bottom: 18px; right: 30px; animation-delay: -3.5s; }

/* pool / stats */
.big-num { font: 800 clamp(2.2rem, 4vw, 3.2rem)/1 var(--display); letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.big-num small { font: 700 1rem/1 var(--font); color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.meter { position: relative; height: 12px; border-radius: 999px; background: rgba(19,26,43,.07); overflow: hidden; margin: 18px 0 10px; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #5B7BDA, var(--accent)); box-shadow: 0 2px 6px -1px rgba(53,87,183,.45); transition: width 1s var(--ease); min-width: 8px; }
.bar { height: 6px; border-radius: 999px; background: rgba(19,26,43,.07); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5B7BDA, var(--accent)); transition: width .6s var(--ease); }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat .label { font: 600 .76rem/1.2 var(--font); letter-spacing: 0; color: var(--muted); }
.stat .value { font: 800 1.6rem/1.15 var(--display); color: var(--ink); letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .76rem; color: var(--muted); margin-top: 2px; font-weight: 600; }
.mini-stat { padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid rgba(19,26,43,.04); }
.mini-stat .row { gap: 8px; }
.mode-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--accent-softer); border: 1px solid rgba(53,87,183,.12); font-size: .84rem; font-weight: 600; color: var(--ink); }
.mode-note .ic { color: var(--accent); }
.prize-list { display: grid; gap: 10px; }
.prize { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--white); transition: transform .2s var(--ease), box-shadow .2s; }
.prize:hover { transform: translateX(3px); box-shadow: var(--sh-1); }
.prize .t { font-weight: 700; color: var(--ink); font-size: .92rem; }
.prize .d { font-size: .78rem; color: var(--muted); font-weight: 600; }
.prize .amt { font: 800 1.05rem/1 var(--display); color: var(--ink); letter-spacing: -0.02em; text-align: right; white-space: nowrap; }
.prize .amt small { font: 700 .7rem var(--font); color: var(--muted); margin-left: 3px; }
.prize.hot { background: linear-gradient(135deg, #FFFBF0, var(--gold-soft)); border-color: rgba(201,138,27,.25); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { position: relative; padding: 22px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.step .n { position: absolute; top: 20px; right: 20px; font: 700 .72rem/1 var(--mono); color: var(--faint); }
.step strong { display: block; margin: 14px 0 6px; font: 700 1.02rem/1.25 var(--display); color: var(--ink); letter-spacing: -0.015em; }
.step p { font-size: .86rem; color: var(--muted); margin: 0; }
.feed { display: grid; gap: 4px; }
.feed-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; transition: background .2s; }
.feed-row:hover { background: rgba(19,26,43,.03); }
.feed-row .who-n { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-row .meta { font-size: .76rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-weight: 600; }
.feed-row .amt { font: 800 1rem/1 var(--display); color: var(--win); text-align: right; white-space: nowrap; }
.empty { display: grid; place-items: center; gap: 10px; text-align: center; padding: 28px 16px; color: var(--muted); font-weight: 600; }

/* forms / modal */
label { display: block; font-weight: 700; font-size: .84rem; color: var(--ink); margin: 16px 0 6px; }
input, select, textarea { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--white); color: var(--ink); font-weight: 600; transition: border-color .2s, box-shadow .2s; }
input::placeholder { color: var(--faint); font-weight: 500; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.field-help { font-size: .78rem; color: var(--muted); margin: 6px 0 0; display: flex; gap: 6px; align-items: flex-start; font-weight: 600; }
.field-help .ic { width: 14px; height: 14px; margin-top: 2px; color: var(--win); }
span[data-tip] { position: relative; color: var(--accent); cursor: help; font-weight: 600; font-size: .78rem; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 60; width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: #fff; font: 600 .76rem/1.4 var(--font); text-transform: none; letter-spacing: 0; box-shadow: var(--sh-2); pointer-events: none; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19, 26, 43, 0.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .25s both; }
.modal-card { position: relative; width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--white); border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 40px 80px -20px rgba(19,26,43,.4); padding: 28px; animation: popIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.modal-card h2 { font-size: 1.5rem; margin: 14px 0 6px; }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(19,26,43,.05); border: 1px solid var(--line); }
.seg button { appearance: none; border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: .84rem; color: var(--muted); cursor: pointer; transition: all .2s; }
.seg button.active { background: var(--white); color: var(--ink); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.stepper { display: flex; align-items: center; gap: 8px; margin: 22px 0 4px; }
.stepper .s { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--faint); white-space: nowrap; }
.stepper .s i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 .74rem/1 var(--mono); font-style: normal; background: rgba(19,26,43,.06); color: var(--muted); transition: all .25s; }
.stepper .s.on { color: var(--ink); }
.stepper .s.on i { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-ring); }
.stepper .s.done i { background: var(--win); color: #fff; }
.stepper .line { flex: 1; height: 2px; border-radius: 2px; background: rgba(19,26,43,.08); min-width: 12px; }
.stepper .line.done { background: var(--win); }
.step-pane { animation: pageIn .3s var(--ease) both; }

/* match / game */
.modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.mode { appearance: none; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--white); border-radius: 20px; padding: 18px; box-shadow: var(--sh-1); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; display: flex; flex-direction: column; gap: 10px; min-height: 172px; color: var(--text); }
.mode:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: rgba(53,87,183,.35); }
.mode:active { transform: translateY(0) scale(.98); }
.mode .t { font: 700 1.1rem/1.2 var(--display); color: var(--ink); letter-spacing: -0.015em; }
.mode .d { font-size: .82rem; color: var(--muted); font-weight: 600; flex: 1; }
.mode .pz { align-self: flex-start; }
.mode.feature { background: linear-gradient(160deg, #FFFFFF, var(--accent-soft)); border-color: rgba(53,87,183,.28); }
.game { padding: 0; overflow: hidden; }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.6); flex-wrap: wrap; }
.scoreboard { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 24px; }
.player { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px; border-radius: 18px; border: 1px solid transparent; transition: all .3s; }
.player.right { flex-direction: row-reverse; text-align: right; }
.player.lead { background: var(--accent-softer); border-color: rgba(53,87,183,.15); }
.player .pi { min-width: 0; }
.player .pn { font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; }
.player .ps { font-size: .74rem; color: var(--muted); font-weight: 600; display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.player.right .ps { justify-content: flex-end; }
.player .pts { font: 800 2.4rem/1 var(--display); color: var(--ink); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-left: auto; }
.player.right .pts { margin-left: 0; margin-right: auto; }
.player.lead .pts { color: var(--accent); }
.you-tag { font: 700 .62rem/1 var(--font); padding: 3px 7px; border-radius: 999px; background: var(--accent); color: #fff; margin-left: 6px; vertical-align: 2px; }
.vs-badge { font: 800 .8rem/1 var(--display); color: var(--muted); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); letter-spacing: .02em; }
.dots { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(19,26,43,.12); transition: all .3s var(--ease); }
.dots i.done { background: var(--accent); opacity: .5; }
.dots i.now { width: 24px; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.q-stage { padding: 0 24px 28px; }
.q-box { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 28px; border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, var(--accent-softer), var(--white) 55%); border: 1px solid rgba(53,87,183,.14); }
.q-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.prompt { font: 700 clamp(1.3rem, 2.4vw, 1.75rem)/1.3 var(--display); color: var(--ink); letter-spacing: -0.02em; margin: 0; }
.blurb { margin: 10px 0 0; color: var(--muted); font-size: .86rem; font-weight: 600; }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .ring-bg { stroke: rgba(19,26,43,.08); }
.ring .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .4s linear, stroke .3s; filter: drop-shadow(0 0 4px rgba(53,87,183,.35)); }
.ring .ring-num { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.35rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.ring.urgent .ring-fg { stroke: #E5484D; filter: drop-shadow(0 0 5px rgba(229,72,77,.45)); }
.ring.urgent .ring-num { color: #C62B31; animation: thump 1s infinite; }
@keyframes thump { 50% { transform: scale(1.12); } }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.tile { appearance: none; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 14px 18px; border-radius: 18px; background: var(--white); border: 1.5px solid var(--line-strong); border-bottom-width: 4px; font: 700 1.02rem/1.3 var(--font); color: var(--ink); transition: transform .12s var(--ease), border-color .2s, background .2s, box-shadow .2s; }
.tile:hover { border-color: var(--accent); background: var(--accent-softer); transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(53,87,183,.5); }
.tile:active, .tile.pressed { transform: translateY(2px); border-bottom-width: 1.5px; margin-bottom: 2.5px; }
.tile .key { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font: 700 .82rem/1 var(--mono); background: var(--accent-soft); color: var(--accent); }
.tile:nth-child(4n+2) .key { background: #FCEBF1; color: #B4235A; }
.tile:nth-child(4n+3) .key { background: var(--gold-soft); color: #845508; }
.tile:nth-child(4n+4) .key { background: var(--win-soft); color: var(--win); }
.tile.is-selected, .tile[aria-checked="true"], .choices .tile:has([data-checked]), .choices .tile:has(ui-radio[data-checked]), .choices .tile:has([aria-checked="true"]) {
  border-color: var(--accent);
  background: var(--accent-softer);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.tile.is-selected .key, .tile[aria-checked="true"] .key, .choices .tile:has([data-checked]) .key {
  background: var(--accent);
  color: #fff;
}
.choices ui-radio, .choices [data-slot="radio"], .choices [data-slot="radio-indicator"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}
.choices .tile { position: relative; }
.answer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; margin-top: 14px; flex-wrap: wrap; }
.answer-actions .btn { flex: none; }
.answer-actions .small { flex: 1 1 220px; }
ui-radio-group.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.answer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 20px; }
.answer-row input { height: 60px; font-size: 1.1rem; border-radius: 16px; padding: 0 18px; border-width: 1.5px; }
.answer-row .btn { height: 60px; border-radius: 16px; padding: 0 26px; }
.conf { display: flex; gap: 10px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.conf .lab { font-weight: 700; font-size: .84rem; color: var(--ink); margin-right: 4px; }
.conf button { appearance: none; cursor: pointer; height: 40px; min-width: 64px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--white); font-weight: 800; color: var(--muted); transition: all .2s; }
.conf button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.powerups { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.waiting { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 18px 20px; border-radius: 18px; background: var(--accent-softer); border: 1px dashed rgba(53,87,183,.3); font-weight: 700; color: var(--ink); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: typing 1.2s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-6px); opacity: 1; } }
.ans-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--white); border: 1px solid var(--line); color: var(--muted); }
.ans-pill.in { background: var(--win-soft); color: var(--win); border-color: rgba(23,121,74,.2); }
.ans-pill .typing i { width: 5px; height: 5px; background: var(--muted); }
.ans-pill .ic { width: 14px; height: 14px; }
.streak { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: #C2410C; }
.streak .ic { width: 15px; height: 15px; fill: #FDBA74; animation: flame 1.4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes flame { 50% { transform: scale(1.12) rotate(-4deg); } }
.overlay { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.overlay .modal-backdrop { background: rgba(19,26,43,.45); }
.result-card { position: relative; width: min(440px, 100%); text-align: center; background: var(--white); border-radius: 28px; padding: 36px 28px 28px; box-shadow: 0 40px 90px -20px rgba(19,26,43,.5); animation: popIn .45s var(--ease) both; overflow: hidden; }
.result-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 180px; background: radial-gradient(60% 100% at 50% 0%, rgba(53,87,183,.18), transparent); }
.result-card.win::before { background: radial-gradient(60% 100% at 50% 0%, rgba(232,184,109,.4), transparent); }
.result-card.lose::before { background: radial-gradient(60% 100% at 50% 0%, rgba(19,26,43,.08), transparent); }
.result-card > * { position: relative; }
.result-card .medal { width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #5B7BDA, var(--accent)); box-shadow: 0 16px 30px -10px rgba(53,87,183,.6); transform: rotate(-6deg); }
.result-card.win .medal { background: linear-gradient(145deg, #F7CF6A, #C98A1B); box-shadow: 0 16px 30px -10px rgba(201,138,27,.6); }
.result-card.lose .medal { background: linear-gradient(145deg, #8A90A0, #586076); box-shadow: 0 16px 30px -10px rgba(19,26,43,.4); }
.result-card .medal .ic { width: 42px; height: 42px; }
.result-card h2 { font-size: 2rem; margin: 0 0 6px; }
.result-card .final { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 18px 0; font: 800 2.2rem/1 var(--display); color: var(--ink); letter-spacing: -0.04em; }
.result-card .final span { color: var(--faint); font-size: 1rem; }
.result-card .prize-won { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--gold-soft); color: #845508; font-weight: 800; margin-bottom: 8px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; margin-top: 16px; font-weight: 600; }
.banner.win { background: var(--win-soft); color: var(--win); }
.banner.lose { background: var(--lose-soft); color: var(--lose); }
.banner.draw { background: var(--draw-soft); color: var(--draw); }
.banner.info { background: var(--accent-softer); color: var(--ink); }
.rounds { display: grid; gap: 8px; }
.round-row { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); font-size: .86rem; }
.round-row .n { font: 700 .74rem/1 var(--mono); color: var(--faint); }
.round-row .q { font-weight: 700; color: var(--ink); min-width: 0; }
.round-row .q div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-row .q small { display: block; font-weight: 600; color: var(--muted); font-size: .74rem; }
.round-row .a { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.round-row .a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-row .a b { margin-left: auto; font: 800 .86rem/1 var(--display); }
.round-row .a.hit { background: var(--win-soft); } .round-row .a.hit b { color: var(--win); }
.round-row .a.miss b { color: var(--faint); }
.round-row .a .ic { width: 14px; height: 14px; }
.round-row .a.hit .ic { color: var(--win); } .round-row .a.miss .ic { color: var(--faint); }

/* profile */
.profile-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 24px; row-gap: 0; align-items: start; overflow: hidden; padding-top: 0; }
.profile-hero .cover { grid-column: 1 / -1; height: 104px; margin: 0 -24px 0; background: linear-gradient(110deg, var(--accent-soft), #EFE7FA 55%, var(--gold-soft)); position: relative; overflow: hidden; }
.profile-hero .cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(53,87,183,.18) 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }
.profile-hero .av { box-shadow: 0 0 0 5px var(--white), 0 12px 24px -8px rgba(19,26,43,.35); position: relative; margin-top: -48px; }
.profile-hero .info { padding-top: 16px; min-width: 0; }
.profile-hero .level-badge { margin-top: 16px; }
.profile-hero h2 { font-size: 2rem; margin: 0 0 4px; }
.profile-hero .addr { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .78rem; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 12px; max-width: 100%; }
.profile-hero .addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-hero .addr button { appearance: none; border: 0; background: var(--white); border-radius: 999px; width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.profile-hero .addr button .ic { width: 13px; height: 13px; }
.xp { margin-top: 12px; max-width: 380px; }
.level-badge { text-align: center; padding: 14px 20px; border-radius: 18px; background: var(--accent-softer); border: 1px solid rgba(53,87,183,.14); }
.level-badge b { display: block; font: 800 2rem/1 var(--display); color: var(--accent); letter-spacing: -0.04em; }
.level-badge span { font: 600 .76rem/1.2 var(--font); letter-spacing: 0; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-tile { padding: 18px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: transform .2s var(--ease), box-shadow .2s; }
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat-tile .top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 600 .76rem/1.2 var(--font); letter-spacing: 0; }
.stat-tile .top .ic { width: 16px; height: 16px; color: var(--accent); }
.stat-tile .v { font: 800 1.75rem/1.1 var(--display); color: var(--ink); letter-spacing: -0.03em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.stat-tile .s { font-size: .76rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.hist { display: grid; gap: 8px; }
.hist-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--white); transition: box-shadow .2s; }
.hist-row:hover { box-shadow: var(--sh-1); }
.hist-row .ttl { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .sub { font-size: .76rem; color: var(--muted); font-weight: 600; }
.res { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font: 800 .72rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.res.win { background: var(--win-soft); color: var(--win); }
.res.loss { background: var(--lose-soft); color: var(--lose); }
.res.draw { background: var(--draw-soft); color: var(--draw); }
.res.none { background: rgba(19,26,43,.06); color: var(--muted); }
.hist-row .sc { font: 800 1.05rem/1 var(--display); color: var(--ink); white-space: nowrap; }
.hist-row .py { font-size: .78rem; text-align: right; font-weight: 600; color: var(--muted); }
.result-win { color: var(--win); font-weight: 700; } .result-loss { color: var(--lose); font-weight: 700; } .result-draw { color: var(--draw); font-weight: 700; }
.history-payout { font-size: .76rem; color: var(--muted); }

/* shop */
.shop-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.wallet-chip { display: flex; align-items: center; gap: 14px; padding: 14px 20px 14px 14px; border-radius: 18px; background: linear-gradient(135deg, var(--ink), #2A3658); color: #fff; box-shadow: 0 16px 30px -14px rgba(19,26,43,.6); }
.wallet-chip .icon-tile { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.wallet-chip .l { font: 600 .76rem/1.2 var(--font); letter-spacing: 0; color: rgba(255,255,255,.72); }
.wallet-chip .v { font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.03em; margin-top: 4px; }
.wallet-chip .v small { font: 700 .8rem var(--font); color: rgba(255,255,255,.72); margin-left: 4px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.shop-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.shop-card .art-tile { height: 120px; border-radius: 16px; display: grid; place-items: center; position: relative; overflow: hidden; margin-bottom: 6px; }
.shop-card .art-tile::before { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(2px); }
.shop-card .art-tile .ic { width: 46px; height: 46px; position: relative; z-index: 1; filter: drop-shadow(0 6px 10px rgba(19,26,43,.15)); }
.shop-card h3 { margin: 4px 0 0; font-size: 1.12rem; }
.shop-card .desc { font-size: .86rem; color: var(--text); margin: 0; font-weight: 500; }
.shop-card .eff { font-size: .78rem; color: var(--muted); margin: 0; flex: 1; font-weight: 600; }
.shop-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.price-chip { display: inline-flex; align-items: baseline; gap: 4px; font: 800 1.25rem/1 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.price-chip small { font: 700 .7rem var(--font); color: var(--muted); }
.shop-card .tags { position: absolute; top: 28px; left: 28px; right: 28px; display: flex; justify-content: space-between; z-index: 2; }
.price { font: 800 1.2rem/1 var(--display); }

/* boards */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 16px; align-items: end; margin: 26px 0 24px; }
.pod { text-align: center; padding: 26px 16px 20px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-2); position: relative; min-width: 0; }
.pod .av { margin: 0 auto 12px; }
.pod .pn { font: 700 1.02rem/1.2 var(--display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .pv { font: 800 1.5rem/1.1 var(--display); color: var(--ink); margin-top: 6px; letter-spacing: -0.03em; }
.pod .pl { font-size: .74rem; color: var(--muted); font-weight: 600; }
.pod .place { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 .82rem/1 var(--display); color: #fff; box-shadow: 0 6px 14px -4px rgba(19,26,43,.35); }
.pod.p1 { padding-top: 34px; padding-bottom: 30px; background: linear-gradient(180deg, #FFF8E6, var(--white)); border-color: rgba(201,138,27,.3); box-shadow: 0 30px 60px -30px rgba(201,138,27,.55), var(--sh-2); }
.pod.p1 .place { background: linear-gradient(145deg, #F7CF6A, #C98A1B); width: 36px; height: 36px; top: -18px; }
.pod.p2 .place { background: linear-gradient(145deg, #C8CDD8, var(--silver)); }
.pod.p3 .place { background: linear-gradient(145deg, #E2A877, var(--bronze)); }
.pod .crown { color: var(--gold); width: 24px; height: 24px; margin: 0 auto 6px; }
.lb { display: grid; gap: 4px; }
.lb-row { display: grid; grid-template-columns: 36px 24px minmax(0, 1fr) repeat(var(--cols, 3), minmax(60px, auto)); gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; transition: background .2s; }
.lb-row:hover { background: rgba(19,26,43,.03); }
.lb-row.head { font: 600 .76rem/1.2 var(--font); letter-spacing: 0; color: var(--muted); padding-top: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 4px; }
.lb-row.head:hover { background: none; }
.lb-row.me { background: var(--accent-softer); box-shadow: inset 0 0 0 1px rgba(53,87,183,.15); }
.lb-row .rk { font: 800 .95rem/1 var(--display); color: var(--muted); text-align: center; }
.lb-row .pl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-row .pl div { min-width: 0; }
.lb-row .pl b { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .pl small { display: block; font-family: var(--mono); font-size: .7rem; color: var(--faint); }
.lb-row .c { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.lb-row .c.dim { color: var(--muted); font-weight: 600; }
.delta { display: inline-flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 800; }
.delta .ic { width: 14px; height: 14px; }
.delta.up { color: var(--win); } .delta.down { color: var(--lose); } .delta.same { color: var(--faint); } .delta.new { color: var(--accent); }

/* guide */
.rule-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.rule-list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: .92rem; color: var(--text); }
.rule-list li .ic { width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }
.rule-list.ok li .ic { color: var(--win); }
ol.wallet-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
ol.wallet-steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; font-size: .92rem; }
ol.wallet-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 700 .8rem/1 var(--mono); }
.faq { border: 1px solid var(--line); border-radius: 16px; background: var(--white); margin-bottom: 10px; transition: box-shadow .2s; overflow: hidden; }
.faq[open] { box-shadow: var(--sh-2); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.3rem/1 var(--font); color: var(--accent); transition: transform .25s var(--ease); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq .body { padding: 0 20px 18px; color: var(--muted); font-size: .92rem; font-weight: 500; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { text-align: left; font: 600 .78rem/1.2 var(--font); letter-spacing: 0; color: var(--muted); padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--accent-softer); }
td.num, th.num { text-align: right; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user b { display: block; color: var(--ink); white-space: nowrap; }
.cell-user small { display: block; font-family: var(--mono); font-size: .7rem; color: var(--faint); }

/* skeleton / toast */
.skel { height: 16px; border-radius: 8px; margin: 10px 0; background: linear-gradient(90deg, rgba(19,26,43,.06) 25%, rgba(19,26,43,.11) 37%, rgba(19,26,43,.06) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skel.tall { height: 60px; border-radius: 14px; }
.skel.card { height: 260px; border-radius: 22px; margin: 0; }
.reconnect { padding: 4px 0 8px; }
.reconnect-msg { margin: 10px 0 0; color: var(--muted); font-size: .92rem; font-weight: 600; letter-spacing: .01em; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: .88rem; box-shadow: 0 16px 40px -10px rgba(19,26,43,.5); animation: popIn .3s var(--ease) both; transition: opacity .4s, transform .4s; }
.toast .ic { color: #6CC49A; }
.toast.err .ic { color: #F59E9E; }
.toast.out { opacity: 0; transform: translateY(8px); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; width: 100%; height: 100%; }

/* footer */
footer.site { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; font-weight: 600; border-top: 1px solid var(--line); }
footer.site .row { gap: 18px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }
.bottom-nav { display: none; }

/* watch */
.page-hero { position: relative; padding: 40px; border-radius: var(--r-xl); overflow: hidden; background: linear-gradient(180deg, #FFFFFB, var(--surface)); border: 1px solid var(--line); box-shadow: var(--sh-2); isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 80% at 90% 0%, rgba(53,87,183,.16), transparent 70%), radial-gradient(30% 60% at 100% 100%, rgba(232,184,109,.18), transparent 70%); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(19,26,43,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(19,26,43,.04) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(60% 100% at 90% 30%, #000, transparent 70%); -webkit-mask-image: radial-gradient(60% 100% at 90% 30%, #000, transparent 70%); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.04em; font-weight: 800; margin: 14px 0 10px; }
.page-hero p { color: var(--muted); max-width: 620px; font-size: 1.02rem; margin: 0; }
.page-hero .row { margin-top: 20px; }
.watch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.watch-card { cursor: pointer; padding: 0; overflow: hidden; }
.watch-card .wc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .8rem; font-weight: 700; color: var(--muted); }
.watch-card .wc-vs { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; padding: 22px 18px 16px; }
.watch-card .side { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.watch-card .side b { color: var(--ink); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-card .side small { font-family: var(--mono); font-size: .68rem; color: var(--faint); }
.watch-card .sc { font: 800 2rem/1 var(--display); color: var(--ink); letter-spacing: -0.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.watch-card .sc span { color: var(--faint); margin: 0 6px; font-weight: 600; }
.watch-card .wc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 16px; }
.watch-card .cta { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 700; font-size: .84rem; }
.watch-card .cta .ic { width: 15px; height: 15px; transition: transform .2s; }
.watch-card:hover .cta .ic { transform: translateX(3px); }

/* live TV */
body.tv { min-height: 100vh; display: flex; flex-direction: column; }
body.tv::before { inset: 0; height: auto; background: radial-gradient(50% 50% at 50% 35%, rgba(53,87,183,.14), transparent 70%), radial-gradient(30% 40% at 8% 92%, rgba(232,184,109,.16), transparent 70%), radial-gradient(30% 40% at 92% 92%, rgba(122,147,224,.18), transparent 70%); }
.tv-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 32px; }
.tv-top .left { display: flex; align-items: center; gap: 18px; }
.tv-live { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 10px; background: #D93036; color: #fff; font: 800 .8rem/1 var(--display); letter-spacing: .14em; animation: livePulse 2s infinite; }
.tv-live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(217,48,54,.5); } 70% { box-shadow: 0 0 0 14px rgba(217,48,54,0); } 100% { box-shadow: 0 0 0 0 rgba(217,48,54,0); } }
.tv-counters { display: flex; gap: 10px; }
.tv-counters .stat-chip { padding: 8px 16px 8px 8px; }
.tv-counters .stat-chip b { font-size: 1.2rem; }
.tv-stage { flex: 1; display: grid; place-items: center; padding: 8px 32px 28px; position: relative; }
.tv-stage::before { content: ""; position: absolute; left: 50%; top: 42%; width: 900px; height: 420px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(53,87,183,.16), transparent); pointer-events: none; }
.tv-title { text-align: center; margin-bottom: 18px; }
.tv-title .kicker { justify-content: center; }
.tv-title h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.04em; margin: 8px 0 0; }
.tv-card { width: min(1240px, 100%); }
.tv-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tv-meta .chip { background: var(--white); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-1); padding: 6px 12px; }
.tv-meta .chip .ic { color: var(--accent); }
.tv-vs { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 28px; align-items: center; }
.tv-side { display: flex; align-items: center; gap: 24px; padding: 34px 36px; border-radius: 28px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-3); min-width: 0; transition: box-shadow .3s, border-color .3s; }
.tv-side.right { flex-direction: row-reverse; text-align: right; }
.tv-side.lead { border-color: rgba(53,87,183,.35); box-shadow: 0 0 0 4px var(--accent-ring), var(--sh-3); }
.tv-side .info { min-width: 0; flex: 1; }
.tv-side .nm { font: 800 1.75rem/1.1 var(--display); color: var(--ink); letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-side .sub { font-family: var(--mono); font-size: .74rem; color: var(--faint); margin-top: 6px; }
.tv-side .st { margin-top: 10px; }
.tv-side .score { font: 800 clamp(3rem, 6vw, 5.2rem)/1 var(--display); letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tv-side.lead .score { color: var(--accent); }
.bump { animation: bump .6s var(--ease); }
@keyframes bump { 30% { transform: scale(1.18); } }
.tv-vs .mid { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tv-vs .vs { font: 800 1.4rem/1 var(--display); color: #fff; width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(145deg, #5B7BDA, var(--accent)); box-shadow: 0 16px 30px -10px rgba(53,87,183,.6); transform: rotate(-6deg); }
.tv-q { margin-top: 26px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 28px; align-items: center; padding: 30px 34px; border-radius: 28px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-2); position: relative; }
.tv-prompt { font: 700 clamp(1.4rem, 2.6vw, 2.2rem)/1.25 var(--display); letter-spacing: -0.025em; color: var(--ink); margin: 0; }
.tv-q .pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.tv-rounds { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.tv-rounds .rp { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.85); border: 1px solid var(--line); font-size: .76rem; font-weight: 700; color: var(--muted); }
.tv-rounds .rp b { color: var(--ink); }
.tv-final { margin-top: 26px; text-align: center; padding: 34px; border-radius: 28px; background: linear-gradient(180deg, #FFF8E6, var(--white)); border: 1px solid rgba(201,138,27,.3); box-shadow: var(--sh-3); }
.tv-final h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); margin: 10px 0 4px; letter-spacing: -0.04em; }
.tv-empty { text-align: center; padding: 60px 20px; }
.ticker { display: flex; align-items: stretch; height: 52px; background: var(--ink); color: #fff; overflow: hidden; flex: none; }
.ticker .tl { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 20px; background: var(--accent); font: 800 .78rem/1 var(--display); letter-spacing: .12em; position: relative; z-index: 2; box-shadow: 10px 0 20px rgba(19,26,43,.6); }
.ticker .tl .ic { width: 16px; height: 16px; }
.ticker-view { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: tick 70s linear infinite; }
.ticker-track span { display: inline-flex; align-items: center; gap: 8px; padding: 0 26px; font-size: .88rem; font-weight: 600; color: rgba(255,255,255,.9); border-right: 1px solid rgba(255,255,255,.14); }
.ticker-track span em { font-style: normal; color: #B9C9F7; font-weight: 800; }
.ticker-track span strong { color: #F7CF6A; }
.ticker-track span .ic { width: 15px; height: 15px; color: #F7CF6A; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* house dashboard */
.status-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px; background: var(--win-soft); border: 1px solid rgba(23,121,74,.18); color: var(--ink); font-weight: 600; margin-bottom: 20px; }
.status-banner .row { gap: 10px; }
.status-banner.paused { background: var(--lose-soft); border-color: rgba(180,35,24,.2); }
.alert-row { display: grid; gap: 10px; margin-bottom: 16px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: .9rem; background: var(--draw-soft); color: var(--draw); border: 1px solid rgba(138,90,18,.15); }
.alert.high, .alert.bad, .alert.red, .alert.critical { background: var(--lose-soft); color: var(--lose); border-color: rgba(180,35,24,.2); }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { padding: 18px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: box-shadow .2s, transform .2s var(--ease); }
.kpi:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.kpi .l { font: 600 .76rem/1.2 var(--font); letter-spacing: 0; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi .l .ic { width: 15px; height: 15px; color: var(--accent); }
.kpi .v { font: 800 1.55rem/1.15 var(--display); color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.kpi .s { font-size: .74rem; color: var(--muted); font-weight: 600; }
.kpi .spark { margin-top: auto; padding-top: 10px; height: 42px; width: 100%; }
.kpi.hero-kpi { background: linear-gradient(150deg, #3F63C6, var(--accent) 50%, #263F8C); color: #fff; border-color: transparent; box-shadow: 0 20px 40px -20px rgba(53,87,183,.8); }
.kpi.hero-kpi .l, .kpi.hero-kpi .s { color: rgba(255,255,255,.8); }
.kpi.hero-kpi .l .ic { color: #fff; }
.kpi.hero-kpi .v { color: #fff; }
.chart { width: 100%; height: auto; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 10px; font-weight: 600; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.heat { display: grid; gap: 4px; overflow-x: auto; }
.heat-row { display: grid; grid-template-columns: 44px repeat(24, minmax(10px, 1fr)); gap: 4px; align-items: center; }
.heat-cell { height: 20px; border-radius: 5px; transition: transform .15s; }
.heat-cell:hover { transform: scale(1.25); }
.heat-lab { font: 600 .62rem/1 var(--mono); color: var(--faint); text-align: center; }
.lock { max-width: 460px; margin: 8vh auto; }
.lock .icon-tile { margin-bottom: 18px; }
.gate-err { min-height: 1.2em; margin-top: 10px; }
.dash-section { margin-top: 20px; }

/* responsive */
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .art { height: 380px; }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .tabs .hide-md { display: none; }
}
@media (max-width: 760px) {
  .header-row { padding: 10px 16px; }
  .app-header .tabs { display: none; }
  .brand-text span { display: none; }
  main { padding: 18px 14px 112px; }
  .hero-wrap { padding: 28px 20px 22px; border-radius: 24px; }
  .hero h1 { font-size: 2.7rem; margin: 18px 0 14px; }
  .hero .lead { font-size: 1rem; margin-bottom: 22px; }
  .hero .btn-row .btn { flex: 1; }
  .hero { gap: 8px; }
  .art { height: 330px; margin: 0 -10px; }
  .q-card { width: 262px; margin-left: -131px; margin-top: -128px; padding: 16px; }
  .q-card .qt { font-size: .98rem; }
  .orbit { width: 330px; height: 330px; margin: -165px 0 0 -165px; }
  .orbit.o2 { width: 240px; height: 240px; margin: -120px 0 0 -120px; }
  .float-chip { font-size: .72rem; padding: 6px 10px; }
  .float-chip.win { right: 4px; top: 6px; }
  .float-chip.live { display: none; }
  .float-chip.streak { bottom: 18px; left: 8px; }
  .stat-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .bento { gap: 14px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 20px; border-radius: 20px; }
  .section-head { margin: 36px 0 14px; flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: 1.45rem; }
  .modes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode { min-height: 156px; padding: 14px; }
  .scoreboard { padding: 14px; gap: 8px; }
  .player { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .player.right { flex-direction: column; align-items: flex-end; }
  .player .pts { margin: 0; font-size: 2rem; }
  .player.right .pts { margin: 0; }
  .player .pn { font-size: .9rem; max-width: 120px; }
  .vs-badge { width: 36px; height: 36px; font-size: .7rem; }
  .q-stage { padding: 0 14px 18px; }
  .q-box { grid-template-columns: 1fr; padding: 20px; gap: 12px; }
  .q-box .ring { position: absolute; top: 14px; right: 14px; width: 56px !important; height: 56px !important; }
  .q-box .ring .ring-num { font-size: 1.05rem; }
  .q-box .q-meta { padding-right: 64px; }
  .choices, ui-radio-group.choices { grid-template-columns: 1fr; }
  .answer-actions .btn { width: 100%; justify-content: center; }
  .answer-row { grid-template-columns: 1fr; }
  .game-top { padding: 12px 16px; }
  .profile-hero { grid-template-columns: auto minmax(0,1fr); gap: 14px; }
  .profile-hero .cover { margin: 0 -20px 0; height: 84px; }
  .profile-hero .av { width: 80px !important; height: 80px !important; font-size: 28px !important; margin-top: -40px; }
  .profile-hero .level-badge { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px; }
  .profile-hero .level-badge b { font-size: 1.4rem; }
  .profile-hero h2 { font-size: 1.5rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-tile { padding: 14px; }
  .stat-tile .v { font-size: 1.4rem; }
  .hist-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .hist-row .py { grid-column: 2 / -1; text-align: left; }
  .shop-head { grid-template-columns: 1fr; }
  .podium { gap: 8px; }
  .pod { padding: 22px 6px 14px; border-radius: 18px; }
  .pod.p1 { padding-top: 28px; }
  .pod .av { width: 44px !important; height: 44px !important; font-size: 16px !important; }
  .pod .pv { font-size: 1.1rem; }
  .pod .pn { font-size: .84rem; }
  .lb-row { grid-template-columns: 24px 18px minmax(0, 1fr) repeat(var(--cols-m, 2), minmax(40px, auto)); gap: 8px; padding: 10px 6px; }
  .lb-row .hide-m { display: none; }
  .round-row { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); }
  .round-row .q { grid-column: 2 / -1; }
  .round-row .a:first-of-type { grid-column: 2; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .v { font-size: 1.25rem; }
  .watch-list { grid-template-columns: 1fr; }
  .page-hero { padding: 26px 20px; border-radius: 22px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; padding: 6px; border-radius: 22px; background: rgba(255,255,255,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 16px 40px -12px rgba(19,26,43,.3); }
  .bottom-nav button, .bottom-nav a { appearance: none; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; border-radius: 16px; font-size: .66rem; font-weight: 700; color: var(--muted); cursor: pointer; }
  .bottom-nav .ic { width: 20px; height: 20px; }
  .bottom-nav .active { color: var(--accent); background: var(--accent-soft); }
  .who .meta { display: none; }
  .who { padding: 3px; }
  .header-actions .btn.hide-sm { display: none; }
  .tv-top { padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .tv-counters { order: 3; width: 100%; overflow-x: auto; }
  .tv-stage { padding: 8px 14px 16px; place-items: start center; }
  .tv-vs { grid-template-columns: 1fr; gap: 10px; }
  .tv-vs .mid { flex-direction: row; justify-content: center; }
  .tv-vs .vs { width: 44px; height: 44px; font-size: .95rem; border-radius: 14px; }
  .tv-side, .tv-side.right { flex-direction: row; text-align: left; padding: 14px 16px; border-radius: 20px; gap: 14px; }
  .tv-side .av { width: 52px !important; height: 52px !important; font-size: 19px !important; }
  .tv-side .nm { font-size: 1.15rem; }
  .tv-side .score { font-size: 2.6rem; }
  .tv-q { grid-template-columns: 1fr; padding: 20px; border-radius: 22px; margin-top: 16px; }
  .tv-q .ring { position: absolute; top: 16px; right: 16px; width: 60px !important; height: 60px !important; }
  .tv-q .tv-prompt { padding-right: 64px; font-size: 1.3rem; }
  .ticker .tl span { display: none; }
}
@media (max-width: 400px) {
  .hero h1 { font-size: 2.35rem; }
  .stat-chip { padding: 8px 10px 8px 8px; gap: 8px; }
  .stat-chip b { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.promo { margin-top: 20px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: linear-gradient(120deg, var(--accent-softer), #FFF8E6); border: 1px solid rgba(53,87,183,.12); }
.promo .coins { position: relative; width: 64px; height: 52px; }
.promo .coins .coin { position: absolute; }
.promo b { display: block; font: 800 1.05rem/1.25 var(--display); color: var(--ink); letter-spacing: -0.015em; }
.promo span { font-size: .8rem; color: var(--muted); font-weight: 600; }
#auth-card, #pool-card { display: flex; flex-direction: column; }
#auth-body { flex: 1; display: flex; flex-direction: column; }
#auth-body .promo { margin-top: auto; }
.reset-row { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.reset-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.in-match #queue-card { display: none; }
.in-match #match-box { margin-top: 0 !important; }
.queue-live { display: none; }
.in-match .queue-live { display: inline-flex; }
@media (max-width: 760px) { .stat-chips { display: grid; grid-template-columns: 1fr 1fr; } .tv-title { display: none; } }
.seg button { white-space: nowrap; }
.reset-row b { white-space: nowrap; }
@media (max-width: 760px) {
  .q-card.back { display: none; }
  .art { height: 300px; }
  .card-head { flex-wrap: wrap; }
  .reset-row { flex-wrap: wrap; }
  .shop-card .art-tile { height: 96px; }
  .seg button { padding: 7px 11px; }
  .result-card { padding: 30px 20px 22px; }
  .result-card .btn-row .btn { flex: 1; }
}

.page-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.faces { position: relative; width: 260px; height: 180px; }
.faces .ringfx { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1.5px solid rgba(53,87,183,.25); transform: translate(-50%, -50%); animation: ripple 3s ease-out infinite; }
.faces .ringfx.r2 { animation-delay: 1s; } .faces .ringfx.r3 { animation-delay: 2s; }
@keyframes ripple { from { width: 60px; height: 60px; opacity: 1; } to { width: 260px; height: 260px; opacity: 0; } }
.faces .core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #5B7BDA, var(--accent)); box-shadow: 0 16px 30px -10px rgba(53,87,183,.6); }
.faces .core .ic { width: 32px; height: 32px; }
.faces .f { position: absolute; animation: float 5s ease-in-out infinite; }
.faces .f .av { box-shadow: 0 0 0 3px #fff, 0 10px 20px -8px rgba(19,26,43,.4); }
@media (max-width: 760px) { .page-hero { grid-template-columns: 1fr; } .faces { display: none; } }
.tv-card { position: relative; z-index: 1; }

/* UI SDK dialogs — same look as the existing auth modal; no default web.css theme. */
[data-slot][hidden]:not([hidden="until-found"]) { display: none !important; }
ui-dialog, ui-dialog-trigger, ui-dialog-close, ui-dialog-title, ui-dialog-description { display: contents; }
ui-dialog-backdrop, [data-slot="dialog-backdrop"] {
  position: fixed;
  inset: 0;
  z-index: 80;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(19, 26, 43, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
ui-dialog-content, [data-slot="dialog-content"].shop-dialog-card, [data-slot="dialog-content"] {
  position: fixed;
  inset: 0;
  z-index: 81;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(480px, calc(100% - 40px));
  height: fit-content;
  max-height: calc(100dvh - 40px);
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -20px rgba(19,26,43,.4);
  padding: 28px;
  color: var(--ink);
  outline: none;
}
.shop-modal { z-index: 82; }
.shop-modal + .shop-modal, .cg-sdk-dialog + .cg-sdk-dialog { }
ui-dialog-title, [data-slot="dialog-title"] {
  display: block;
  font-size: 1.5rem;
  margin: 14px 0 6px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
ui-dialog-description, [data-slot="dialog-description"] {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.45;
}
.shop-dialog-card { position: relative; }
.shop-dialog-art {
  height: 120px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.shop-dialog-art::before { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(2px); }
.shop-dialog-art .ic { width: 46px; height: 46px; position: relative; z-index: 1; filter: drop-shadow(0 6px 10px rgba(19,26,43,.15)); }
.shop-dialog-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-dialog-body { display: flex; flex-direction: column; gap: 12px; }
.shop-dialog-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.shop-dialog-actions { justify-content: flex-end; margin-top: 4px; }
.shop-card { cursor: pointer; }
@media (max-width: 760px) {
  ui-dialog-content, [data-slot="dialog-content"], .shop-dialog-card {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
    margin: auto;
    inset: 0;
  }
  .shop-dialog-art { height: 96px; }
  .shop-dialog-actions { flex-direction: column-reverse; }
  .shop-dialog-actions .btn { width: 100%; justify-content: center; }
}


/* ───────────────────────── v4 · polish layer ─────────────────────────
   Impeccable audit fixes: no eyebrow labels over headings, themed browser
   surfaces, 11px+ functional text, calmer live indicators. */
::selection { background: rgba(53, 87, 183, 0.18); color: var(--ink); }
html { scrollbar-color: rgba(19,26,43,.22) transparent; scrollbar-width: thin; accent-color: var(--accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(19,26,43,.18); border-radius: 999px; border: 2px solid var(--bg); }
input, textarea { caret-color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 8px; }
a { text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.card-head .kicker, .section-head .kicker, .lock > .kicker, .shop-head .kicker { display: none; }
.card-head h3 { margin-top: 0; }
.section-head h2 { margin-top: 0; }
.tabs button, .tabs a { font-size: .8rem; }
.mini-stat .label, .wallet-chip .l, .bottom-nav button, .bottom-nav a { font-size: .72rem !important; }
.chip, .badge { font-size: .75rem; }
.live-dot::after { animation-duration: 2.4s; }
.dot { animation: none; }

/* shared page head for content pages */
.page-head { display: grid; gap: 10px; margin: 8px 0 28px; max-width: 760px; }
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 800; margin: 0; }
.page-head p { font-size: 1.06rem; color: var(--muted); margin: 0; max-width: 62ch; }
.page-head .row { margin-top: 8px; gap: 10px; flex-wrap: wrap; }
.muted-note { font-size: .84rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.muted-note .ic { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 24px; align-items: start; }
.sticky-side { position: sticky; top: 88px; }
.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list-clean li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .92rem; }
.list-clean li .ic { width: 18px; height: 18px; margin-top: 3px; color: var(--win); }

/* ── Guide: the journey track ── */
.gd-track { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 28px 8px 8px; }
.gd-track svg.gd-path { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 120px; overflow: visible; pointer-events: none; }
.gd-path path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 9; opacity: .5; }
.gd-stop { position: relative; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 0 14px; }
.gd-node { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line-strong); box-shadow: 0 2px 4px rgba(19,26,43,.05), 0 14px 28px -14px rgba(19,26,43,.28); position: relative; z-index: 1; }
.gd-node .ic { width: 30px; height: 30px; color: var(--ink); }
.gd-stop.win .gd-node { background: var(--accent); border-color: var(--accent-press); }
.gd-stop.win .gd-node .ic { color: #fff; }
.gd-stop .n { font: 700 .75rem/1 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.gd-stop strong { font: 700 1.15rem/1.2 var(--display); color: var(--ink); letter-spacing: -0.02em; }
.gd-stop p { font-size: .88rem; color: var(--muted); margin: 0; max-width: 28ch; }
@media (prefers-reduced-motion: no-preference) {
  .gd-path path.draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: gdDraw 1.8s cubic-bezier(.16,1,.3,1) .2s forwards; }
  .gd-stop { opacity: 0; transform: translateY(8px); animation: gdIn .6s cubic-bezier(.16,1,.3,1) forwards; }
  .gd-stop:nth-child(2) { animation-delay: .35s; } .gd-stop:nth-child(3) { animation-delay: .7s; } .gd-stop:nth-child(4) { animation-delay: 1.05s; } .gd-stop:nth-child(5) { animation-delay: 1.4s; }
}
@keyframes gdDraw { to { stroke-dashoffset: 0; } }
@keyframes gdIn { to { opacity: 1; transform: none; } }
.gd-rounds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--white); }
.gd-round { padding: 22px; border-right: 1px solid var(--line); }
.gd-round:last-child { border-right: 0; }
.gd-round .t { display: flex; align-items: center; gap: 10px; font: 700 1.05rem/1.2 var(--display); color: var(--ink); margin-bottom: 8px; }
.gd-round .t .ic { color: var(--accent); }
.gd-round p { font-size: .88rem; color: var(--muted); margin: 0; }
.gd-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.gd-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
.gd-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.gd-table tr:last-child td { border-bottom: 0; }
.gd-table td.amt { text-align: right; font: 700 1.05rem/1.2 var(--display); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gd-table td.amt small { font: 600 .74rem var(--font); color: var(--muted); margin-left: 3px; }
.gd-table td .d { color: var(--muted); font-size: .84rem; }
.gd-table tr.top td.amt { color: var(--accent); }
.gd-faq { display: grid; gap: 10px; }
.gd-faq details { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; transition: border-color .2s, box-shadow .2s; }
.gd-faq details[open] { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.gd-faq summary { cursor: pointer; list-style: none; padding: 18px 0; font: 700 1rem/1.35 var(--display); color: var(--ink); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.gd-faq summary::-webkit-details-marker { display: none; }
.gd-faq summary::after { content: "+"; font: 500 1.4rem/1 var(--font); color: var(--accent); transition: transform .25s var(--ease); }
.gd-faq details[open] summary::after { transform: rotate(45deg); }
.gd-faq summary .ic { width: 18px; height: 18px; color: var(--muted); transition: transform .25s var(--ease); flex: none; }
.gd-faq details[open] summary .ic { transform: rotate(90deg); color: var(--accent); }
.gd-faq details p { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }

/* ── Join: onboarding stepper ── */
.ob-steps { display: flex; gap: 8px; margin-bottom: 22px; list-style: none; padding: 0; }
.ob-steps li { flex: 1; display: grid; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.ob-steps li::before { content: ""; height: 4px; border-radius: 999px; background: rgba(19,26,43,.08); transition: background .4s var(--ease); }
.ob-steps li.on { color: var(--ink); }
.ob-steps li.on::before, .ob-steps li.done::before { background: var(--accent); }
.ob-steps li.done { color: var(--muted); }
.ob-pane { display: none; }
.ob-pane.show { display: block; animation: obIn .35s var(--ease) both; }
@keyframes obIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.ob-pane h2 { font-size: 1.5rem; margin-bottom: 6px; }
.ob-pane > p.lede { color: var(--muted); margin-bottom: 4px; }
.field-hint { font-size: .82rem; color: var(--muted); margin-top: 7px; min-height: 1.3em; display: flex; gap: 6px; align-items: center; }
.field-hint .ic { width: 15px; height: 15px; }
.field-hint.ok { color: var(--win); } .field-hint.bad { color: var(--lose); }
input.is-ok { border-color: rgba(23,121,74,.55); } input.is-bad { border-color: rgba(180,35,24,.55); }
input.mono-in { font-family: var(--mono); font-size: .86rem; letter-spacing: -0.01em; }
.secret-box { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 14px; background: var(--ink); color: #F4F1E8; font: 600 .9rem/1.3 var(--mono); word-break: break-all; }
.secret-box code { flex: 1; min-width: 0; }
.secret-box .btn { flex: none; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); box-shadow: none; }
.secret-box .btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.warn-line { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: #6B4405; font-size: .86rem; font-weight: 600; margin: 12px 0; }
.warn-line .ic { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.code-tabs { margin-top: 18px; border-radius: 16px; overflow: hidden; border: 1px solid #1F2840; background: #131A2B; }
.code-tabs .bar { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.code-tabs .bar button { appearance: none; border: 0; background: transparent; color: rgba(244,241,232,.65); font: 600 .8rem var(--font); padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.code-tabs .bar button.active { background: rgba(255,255,255,.1); color: #fff; }
.code-tabs .bar .sp { flex: 1; }
.code-tabs .bar .copy { display: inline-flex; gap: 6px; align-items: center; }
.code-tabs .bar .copy .ic { width: 15px; height: 15px; }
.code-tabs pre { margin: 0; padding: 18px 20px; overflow-x: auto; color: #E8E4D8; font: 500 .82rem/1.65 var(--mono); tab-size: 2; }
.code-tabs pre .c { color: #8A93A8; } .code-tabs pre .s { color: #A9C7FF; } .code-tabs pre .k { color: #F2C97D; }
.ob-side h3 { font-size: 1.05rem; }
.ob-side .list-clean li { font-size: .88rem; color: var(--text); }

/* ── Agent profile ── */
.ag-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 28px; }
.ag-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.035em; margin: 0 0 6px; line-height: 1.05; }
.ag-hero .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .88rem; font-weight: 600; align-items: center; }
.ag-hero .meta .ic { width: 15px; height: 15px; }
.ag-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.ag-level { display: grid; justify-items: center; gap: 2px; padding: 14px 18px; border-radius: 18px; background: var(--accent-softer); border: 1px solid rgba(53,87,183,.14); min-width: 108px; }
.ag-level b { font: 800 2.1rem/1 var(--display); color: var(--accent); letter-spacing: -0.03em; }
.ag-level span { font-size: .76rem; color: var(--muted); font-weight: 600; }
.ag-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); overflow: hidden; }
.ag-stat { padding: 18px 20px; border-right: 1px solid var(--line); }
.ag-stat:last-child { border-right: 0; }
.ag-stat .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.ag-stat .v { font: 800 1.75rem/1.1 var(--display); color: var(--ink); letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ag-stat .v small { font: 600 .8rem var(--font); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.ag-stat .s { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.ag-form { display: flex; gap: 5px; flex-wrap: wrap; }
.ag-form i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 800 .74rem/1 var(--display); font-style: normal; }
.ag-form i.W { background: var(--win-soft); color: var(--win); }
.ag-form i.L { background: var(--lose-soft); color: var(--lose); }
.ag-form i.D { background: var(--draw-soft); color: var(--draw); }
.ag-wl { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(19,26,43,.06); margin: 12px 0 8px; }
.ag-wl span { display: block; height: 100%; }
.ag-wl .w { background: var(--win); } .ag-wl .d { background: #D6A84A; } .ag-wl .l { background: #E07A70; }
.ag-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); font-weight: 600; }
.ag-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; }
.ag-matches { display: grid; }
.ag-match { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.ag-match:last-child { border-bottom: 0; }
.ag-match .ag-res { justify-self: start; }
.ag-match .opp { font-weight: 700; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-match .opp a { color: var(--ink); }
.ag-match .opp a:hover { color: var(--accent); }
.ag-match .sub { font-size: .8rem; color: var(--muted); font-weight: 600; }
.ag-match .score { font: 700 1rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-match .prize { padding: 0; border: 0; background: none; display: block; font-weight: 700; font-size: .86rem; color: var(--win); text-align: right; white-space: nowrap; }
.ag-match .prize:hover { transform: none; box-shadow: none; }
.ag-items { display: flex; flex-wrap: wrap; gap: 8px; }
.ag-items .chip { padding: 6px 12px; font-size: .8rem; }
.streak-hot { display: inline-flex; align-items: center; gap: 6px; color: #C2410C; font-weight: 800; }
.streak-hot .ic { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .streak-hot.on .ic { animation: flicker 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
  .ag-stat .v.pop { animation: statPop .7s cubic-bezier(.16,1,.3,1) both; }
}
@keyframes flicker { 0%,100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.12) rotate(-4deg); } 70% { transform: scale(.96) rotate(3deg); } }
@keyframes statPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
a.lb-name { color: var(--ink); }
a.lb-name:hover { color: var(--accent); text-decoration: underline; }

/* ── Owner login ── */
.lg-shell { min-height: calc(100vh - 160px); display: grid; place-items: center; }
.lg-card { width: min(440px, 100%); padding: 34px; }
.lg-card h1 { font-size: 2rem; letter-spacing: -0.035em; margin: 16px 0 6px; }
.lg-card .lede { color: var(--muted); margin-bottom: 8px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-wrap button { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pw-wrap button:hover { background: rgba(19,26,43,.05); color: var(--ink); }
.lg-err { min-height: 1.4em; margin: 10px 0 0; font-size: .86rem; font-weight: 600; color: var(--lose); }
.lg-card .btn.primary { width: 100%; margin-top: 18px; }
.lg-foot { margin-top: 18px; font-size: .82rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.lg-foot .ic { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) { .lg-card.shake { animation: shake .4s cubic-bezier(.36,.07,.19,.97); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (max-width: 960px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .gd-rounds { grid-template-columns: 1fr 1fr; }
  .gd-round:nth-child(2) { border-right: 0; }
  .gd-round:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .gd-track { grid-template-columns: 1fr; gap: 26px; padding: 0 0 0 4px; }
  .gd-track svg.gd-path { display: none; }
  .gd-stop { grid-template-columns: 64px 1fr; justify-items: start; text-align: left; column-gap: 16px; row-gap: 4px; padding: 0; }
  .gd-stop .gd-node { grid-row: span 3; width: 60px; height: 60px; border-radius: 18px; }
  .gd-stop .gd-node .ic { width: 24px; height: 24px; }
  .gd-rounds { grid-template-columns: 1fr; }
  .gd-round { border-right: 0; border-bottom: 1px solid var(--line); }
  .gd-round:last-child { border-bottom: 0; }
  .ag-hero { grid-template-columns: auto 1fr; padding: 20px; gap: 14px; }
  .ag-hero .ag-level { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
  .ag-stats { grid-template-columns: 1fr 1fr; }
  .ag-stat:nth-child(2) { border-right: 0; }
  .ag-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .ag-match { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .ag-match .prize { grid-column: 2 / -1; text-align: left; }
  .lg-card { padding: 24px; }
  .page-head h1 { font-size: 2.2rem; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.gd-table th { background: transparent; }
.gd-table td { font-family: var(--font); }

.two-col > * { min-width: 0; }
.code-tabs, .secret-box { max-width: 100%; }
.gd-table .m-only { display: none; }
@media (max-width: 760px) {
  .gd-table.shop th:nth-child(2), .gd-table.shop td:nth-child(2) { display: none; }
  .gd-table .m-only { display: block; }
  .ob-steps li { font-size: .74rem; }
  .ag-match .sub { white-space: normal; }
}
