/* يَلو 2027 launch countdown. Tokens follow the Yellow 2027 system (y27.css, D7):
   indigo #4B4F9A, the ONE yellow #FCD11A, Effra CC Arabic 400/600/700/900,
   radius rule 28 story / 20 panels / pill controls, Western digits in <bdi>. */
@font-face { font-family: "Effra CC Arabic"; src: url("../fonts/EffraCCArabic-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Effra CC Arabic"; src: url("../fonts/EffraCCArabic-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Effra CC Arabic"; src: url("../fonts/EffraCCArabic-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Effra CC Arabic"; src: url("../fonts/EffraCCArabic-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F2F2F8; --surface: #FDFDFF; --surface-2: #E9E9F3; --line: #E0E0EC; --line-strong: #8C8CA6;
  --ink: #16162C; --ink-2: #44445E; --ink-3: #5C5C76;
  --brand: #4B4F9A; --brand-h: #3F4386; --brand-text: #4B4F9A; --brand-tint: #E8E7F8;
  --accent: #FCD11A; --on-accent: #16162C; --accent-text: #7A5600; --accent-tint: #FFF5CC;
  --gold-btn: linear-gradient(180deg, #FFDC45 0%, #F9C011 100%);
  --ok: #13703A; --ok-tint: #DDF2E4; --bad: #B3261E; --bad-tint: #FDECEC;
  --stage: linear-gradient(155deg, #30347F 0%, #181A4A 100%);
  --stage-ink: #FFFFFF; --stage-ink-2: #D7D7F2;
  --e1: 0 1px 2px rgba(40, 42, 100, .06), 0 2px 8px rgba(40, 42, 100, .05);
  --e2: 0 2px 4px rgba(40, 42, 100, .06), 0 12px 28px rgba(40, 42, 100, .10);
  --e3: 0 8px 24px rgba(28, 29, 70, .16), 0 24px 64px rgba(28, 29, 70, .18);
  --ring: 0 0 0 3px rgba(75, 79, 154, .4);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Effra CC Arabic", -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --gutter: 14px; --wrap: 1120px;
  --r-story: 28px; --r-panel: 20px; --r-pill: 999px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121218; --surface: #1B1B24; --surface-2: #23232E; --line: #2D2D3A; --line-strong: #6E6E88;
  --ink: #EDEDF4; --ink-2: #BDBDCC; --ink-3: #A3A3B6;
  --brand: #5654AE; --brand-h: #5F5DBA; --brand-text: #B3B1F4; --brand-tint: #25253D;
  --accent-text: #F3D35A; --accent-tint: #2E2915;
  --ok: #82D69D; --ok-tint: #17301F; --bad: #FF9B9B; --bad-tint: #2D1A1C;
  --e1: 0 1px 2px rgba(0, 0, 0, .4); --e2: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 30px rgba(0, 0, 0, .35);
  --e3: 0 10px 40px rgba(0, 0, 0, .6); --ring: 0 0 0 3px rgba(179, 177, 244, .5);
}
@media (min-width: 900px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: env(safe-area-inset-bottom); }
h1, h2, h3, p, ol, ul, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
img, video, canvas { display: block; max-width: 100%; }
bdi { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--ring); }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 99; padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent); font-weight: 700; transform: translateY(-200%); }
.skip:focus { transform: none; }
.noscript { padding: 16px; text-align: center; background: var(--accent); color: var(--on-accent); }

/* ---------------- buttons, pills ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: var(--r-pill); font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: transform 120ms var(--ease), background-color 200ms, filter 200ms, opacity 200ms; }
.btn:active { transform: scale(.96); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn--xl { min-height: 64px; padding: 0 36px; font-size: clamp(18px, 4.6vw, 22px); font-weight: 900; }
.btn--block { display: flex; width: 100%; }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-h); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { filter: brightness(.96); }
.btn--gold { background: var(--gold-btn); color: var(--on-accent); box-shadow: 0 10px 34px rgba(252, 209, 26, .45), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn--ghost { background: var(--surface-2); color: var(--ink); }
.btn--stage { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }
.btn .hgi { font-size: 1.25em; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 22px;
  color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.iconbtn--plain { color: var(--ink); background: var(--surface-2); border: 0; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.pill bdi { font-weight: 900; font-size: 15px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #5BE38A; box-shadow: 0 0 0 0 rgba(91, 227, 138, .7); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(91, 227, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 227, 138, 0); } }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700;
  color: #fff; background: var(--tc, var(--brand)); }
.note { font-size: 13px; color: var(--ink-3); }
.note--c { text-align: center; }

/* ---------------- stage ---------------- */
.stage { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  color: var(--stage-ink); background: #181A4A; overflow: hidden; }
.stage__bg { position: absolute; inset: 0; z-index: -1; }
.stage__img, .stage__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.stage__video { opacity: 0; transition: opacity 1.2s; }
.stage__video.is-on { opacity: 1; }
.stage__shade { position: absolute; inset: 0; background:
  radial-gradient(120% 60% at 50% 108%, rgba(252, 209, 26, calc(.10 + var(--heat, 0) * .28)) 0%, transparent 60%),
  linear-gradient(180deg, rgba(20, 22, 66, .82) 0%, rgba(20, 22, 66, .45) 46%, rgba(20, 22, 66, .12) 78%, rgba(18, 18, 24, .0) 100%); }
.stage__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; height: 56px; z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg)); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding: max(12px, env(safe-area-inset-top)) var(--gutter) 0; }
.top__logo { height: 34px; width: auto; }
.top__actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 420px) { .pill__t { display: none; } .top__logo { height: 28px; } .iconbtn { width: 40px; height: 40px; font-size: 20px; } }

.hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: clamp(6px, 1.4vh, 14px); width: 100%; max-width: var(--wrap); margin-inline: auto; padding: 8px var(--gutter) 96px; }
.hero > :first-child { margin-block-start: auto; }
@media (min-width: 900px) { .hero { padding-block-end: 22px; } }
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 700;
  color: var(--stage-ink-2); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.kicker .hgi { color: var(--accent); font-size: 18px; }
.kicker--gold { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.kicker--gold .hgi { color: var(--on-accent); }
.title { font-weight: 900; font-size: clamp(44px, 10.5vw, 104px); line-height: 1.05; letter-spacing: -.01em;
  text-shadow: 0 6px 40px rgba(10, 10, 50, .55); }
.title__y { color: var(--accent); text-shadow: 0 0 44px rgba(252, 209, 26, .5); }
.sub { font-size: clamp(16px, 2.4vw, 22px); font-weight: 600; color: var(--stage-ink-2); }

.cd { direction: ltr; display: flex; align-items: flex-start; justify-content: center; gap: clamp(6px, 1.6vw, 16px); margin-block-start: clamp(6px, 1.5vh, 16px); }
.cd__u, .cd__l { direction: rtl; }   /* owner 2026-11-19: units read left to right (يوم ساعة دقيقة ثانية), labels stay Arabic */
.cd__u { display: grid; gap: 4px; min-width: clamp(64px, 19vw, 150px); }
.cd__n { position: relative; display: grid; place-items: center; height: clamp(70px, 19vw, 148px); border-radius: clamp(16px, 3vw, 28px);
  font-weight: 900; font-size: clamp(42px, 12.5vw, 104px); line-height: 1; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 40px rgba(8, 8, 40, .45); }
.cd__n::after { content: ""; position: absolute; inset-inline: 0; inset-block-start: 50%; height: 1px; background: rgba(8, 8, 40, .35); }
.cd__n bdi { display: block; padding-block-start: .08em; }
.cd__n.is-tick bdi { animation: tick 420ms var(--ease); }
@keyframes tick { 0% { transform: translateY(-38%); opacity: 0; filter: blur(3px); } 100% { transform: none; opacity: 1; filter: none; } }
.cd__u--s .cd__n { color: var(--accent); border-color: rgba(252, 209, 26, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 46px rgba(252, 209, 26, .18); }
.cd__l { font-size: clamp(13px, 2vw, 16px); font-weight: 700; color: var(--stage-ink-2); }
.cd__sep { align-self: flex-start; height: clamp(70px, 19vw, 148px); display: grid; place-items: center; font-weight: 900;
  font-size: clamp(22px, 5vw, 48px); color: rgba(255, 255, 255, .45); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (max-width: 480px) { .cd__sep { display: none; } }
.when { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; font-size: clamp(14px, 2vw, 17px); font-weight: 600; color: #fff; }
.when__h { color: var(--accent); }
.live-cta { display: grid; justify-items: center; gap: 12px; margin-block: 8px; }
.live-cta__t { font-size: clamp(24px, 5vw, 40px); font-weight: 900; }
.is-final .cd__n { animation: finalpulse 1s var(--ease) infinite; }
@keyframes finalpulse { 0% { transform: scale(1.04); border-color: rgba(252, 209, 26, .9); } 100% { transform: none; } }

/* the energy core */
.corewrap { position: relative; display: grid; justify-items: center; gap: 6px; margin-block-start: clamp(4px, 1.4vh, 16px); width: 100%; }
.core { position: relative; width: clamp(128px, 34vw, 176px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.core__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.core__track { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 7; }
.core__prog { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 578; stroke-dashoffset: 578;
  transition: stroke-dashoffset 900ms var(--ease); filter: drop-shadow(0 0 6px rgba(252, 209, 26, .8)); }
.core__sun { width: 74%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(44px, 12vw, 64px); color: #3B2A00;
  background: radial-gradient(circle at 35% 28%, #FFF6C2 0%, #FFE264 30%, #FCD11A 62%, #F0A800 100%);
  box-shadow: 0 0 0 6px rgba(252, 209, 26, .16), 0 0 calc(34px + var(--heat, 0) * 60px) rgba(252, 209, 26, calc(.5 + var(--heat, 0) * .4)), inset 0 -8px 18px rgba(190, 120, 0, .35);
  transition: transform 140ms var(--ease); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.045); } }
.core:active .core__sun, .core.is-hit .core__sun { transform: scale(.93); animation: none; }
.core__wave { position: absolute; inset: 13%; border-radius: 50%; border: 2px solid rgba(252, 209, 26, .8); pointer-events: none; animation: wave 700ms var(--ease) forwards; }
@keyframes wave { to { transform: scale(1.75); opacity: 0; } }
.core__plus { position: absolute; inset-block-start: 8%; inset-inline-start: 50%; font-weight: 900; font-size: 20px; color: var(--accent); pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5); animation: plus 800ms var(--ease) forwards; }
@keyframes plus { from { transform: translate(var(--dx, 0), 0) scale(.7); opacity: 1; } to { transform: translate(var(--dx, 0), -70px) scale(1.15); opacity: 0; } }
.core__hint { font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }

/* cheers: under the core on phones (newest two), beside it on wide screens (three) */
.ticker { display: grid; justify-items: center; align-content: start; gap: 6px; min-height: 78px; pointer-events: none; }
.ticker .cheer:nth-last-child(n+3) { display: none; }
@media (min-width: 900px) {
  .ticker { position: absolute; inset-block: 0; inset-inline-end: calc(50% + 120px); min-height: 0; align-content: center; justify-items: end; }
  .ticker .cheer:nth-last-child(n+3) { display: inline-flex; }
}
.cheer { display: inline-flex; align-items: center; gap: 8px; max-width: min(92vw, 420px); padding: 5px 14px 5px 6px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: #fff; background: rgba(18, 18, 50, .78); border: 1px solid var(--tc, rgba(255, 255, 255, .2));
  animation: cheerin 4.2s var(--ease) forwards; }
.cheer b { font-weight: 900; color: var(--accent); }
.cheer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes cheerin { 0% { transform: translateY(14px) scale(.9); opacity: 0; } 8% { transform: none; opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }

.emotes { display: flex; justify-content: center; gap: clamp(4px, 1.4vw, 10px); margin-block-start: auto; padding-block-start: 6px; }
.emote { width: clamp(38px, 10.6vw, 50px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(20px, 5.6vw, 26px);
  background: rgba(18, 18, 50, .62); border: 1px solid rgba(255, 255, 255, .2); transition: transform 140ms var(--ease); }
.emote:active { transform: scale(1.3) translateY(-6px); }
.emote.is-cool { opacity: .55; }

/* ---------------- page ---------------- */
.page { display: grid; gap: 16px; width: 100%; max-width: var(--wrap); margin-inline: auto; padding: 8px var(--gutter) 96px; }
@media (min-width: 900px) { .page { gap: 24px; padding-block-end: 48px; } }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1.2fr 1fr; gap: 24px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; box-shadow: var(--e1); display: grid; gap: 14px; align-content: start; }
.card--story { border-radius: var(--r-story); padding: 20px; }
@media (min-width: 900px) { .card { padding: 24px; } .card--story { padding: 32px; } }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 2.6vw, 28px); font-weight: 900; line-height: 1.25; }
h2 .hgi { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 24%; font-size: 22px; color: var(--brand-text); background: var(--brand-tint); }
h3 { font-size: 17px; font-weight: 900; }
.stat { display: grid; justify-items: center; line-height: 1.2; }
.stat bdi { font-size: clamp(22px, 4vw, 32px); font-weight: 900; color: var(--brand-text); }
.stat span { font-size: 13px; color: var(--ink-3); }
.stat--row { justify-items: start; }
.bar { height: 12px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width 900ms var(--ease); }
.bar--goal { height: 22px; }
.bar--goal span { background: linear-gradient(90deg, #FFE264, #FCD11A 60%, #F5B400); box-shadow: 0 0 18px rgba(252, 209, 26, .6); }
[dir="rtl"] .bar--goal span { background: linear-gradient(270deg, #FFE264, #FCD11A 60%, #F5B400); }
.goal__t { color: var(--ink-2); }
.goal__n { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.slot { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 700; text-align: center; }
.slot .hgi { font-size: 22px; }
.slot.is-open { background: var(--accent-tint); color: var(--accent-text); }
.slot.is-next { outline: 2px dashed var(--accent); outline-offset: -2px; }
@media (max-width: 520px) { .slot span { display: none; } }

.race { display: grid; gap: 10px; }
.lane { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; position: relative; }
.lane.is-mine { background: var(--brand-tint); }
.lane.is-pulse { animation: lanepulse 700ms var(--ease); }
@keyframes lanepulse { 0% { box-shadow: 0 0 0 0 var(--tc); } 100% { box-shadow: 0 0 0 14px transparent; } }
.lane__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 24%; font-size: 22px; color: #fff; background: var(--tc); }
.lane__mid { display: grid; gap: 4px; min-width: 0; }
.lane__name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.lane__name small { font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: var(--r-pill); background: var(--brand); color: #fff; }
.lane__name em { font-style: normal; font-size: 12px; font-weight: 900; padding: 0 8px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); }
.lane .bar span { background: var(--tc); }
.lane__score { font-weight: 900; font-size: 17px; min-width: 56px; text-align: end; }
.lane__rank { position: absolute; inset-block-start: -6px; inset-inline-start: -4px; font-size: 18px; }

.cheers { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 700; background: var(--surface-2); color: var(--ink);
  transition: transform 120ms var(--ease), opacity 200ms; }
.chip:active { transform: scale(.94); }
.cheers.is-cool .chip { opacity: .45; }

.card--game { border-radius: var(--r-story); color: #fff; background: var(--stage); border: 0; box-shadow: var(--e2); gap: 20px; }
.card--game h2 .hgi { color: var(--on-accent); background: var(--accent); }
.card--game p { color: var(--stage-ink-2); }
.card--game .stat bdi { color: var(--accent); }
.card--game .stat span { color: var(--stage-ink-2); }
.game__intro { display: grid; gap: 12px; }
.game__row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.game__top { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-panel); background: rgba(255, 255, 255, .08); }
.top10 { display: grid; gap: 4px; counter-reset: r; }
.top10 li { display: grid; grid-template-columns: 26px 30px 1fr auto; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; counter-increment: r; }
.top10 li::before { content: counter(r); font-weight: 900; color: var(--accent); text-align: center; }
.top10 li span:last-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top10 .empty { display: block; color: var(--stage-ink-2); }
.top10 .empty::before { content: none; }
@media (min-width: 900px) { .card--game { grid-template-columns: 1.1fr 1fr; align-items: center; padding: 32px; } }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 17px; color: #fff; background: var(--ab, var(--brand)); flex: none; }
.avatar--lg { width: 64px; height: 64px; font-size: 34px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--tc, var(--brand)); }
.me { display: grid; gap: 16px; }
.me__id { display: flex; align-items: center; gap: 16px; }
.me__id div { display: grid; gap: 4px; justify-items: start; }
.me__id strong { font-size: 20px; font-weight: 900; }
.me__lvl { display: grid; gap: 6px; }
.me__lvlrow { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }
.me__lvlrow bdi { color: var(--ink-3); }
.me__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.me__stats .stat { padding: 10px 4px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.badge { display: grid; justify-items: center; gap: 2px; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--ink-2); }
.badge img { width: 64px; height: 64px; }
.badge.is-off img { filter: grayscale(1) opacity(.35); }
.badge.is-off { color: var(--ink-3); font-weight: 400; }

.surprises { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.sur { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: var(--r-panel); background: var(--surface-2); min-height: 150px; }
.sur.is-open { background: var(--stage); color: #fff; }
.sur__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 24%; font-size: 26px; background: var(--line); color: var(--ink-3); }
.sur.is-open .sur__ico { background: var(--accent); color: var(--on-accent); }
.sur h3 { font-size: 18px; }
.sur p { font-size: 15px; color: var(--ink-3); }
.sur.is-open p { color: var(--stage-ink-2); }
.sur__books { display: flex; gap: 6px; margin-block-start: 4px; }
.sur__books img { width: 23%; border-radius: 4px; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.sur__teams { display: flex; gap: 6px; flex-wrap: wrap; }

.foot { position: relative; display: grid; justify-items: center; gap: 14px; padding: 32px 16px; border-radius: var(--r-story); color: #fff; background: #4B4F9A; overflow: hidden; text-align: center; }
.foot__motto { font-size: clamp(34px, 9vw, 84px); font-weight: 900; line-height: 1; color: rgba(255, 255, 255, .12); }
.foot__motto span { color: rgba(252, 209, 26, .34); }
.foot__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.foot__link { color: #fff; font-weight: 700; }

.offline { position: sticky; inset-block-start: 8px; z-index: 30; justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-radius: var(--r-pill); font-size: 14px; font-weight: 700; background: var(--bad-tint); color: var(--bad); box-shadow: var(--e2); }

.dock { position: fixed; inset-inline: 10px; inset-block-end: calc(10px + env(safe-area-inset-bottom)); z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e3); }
.dock button { display: grid; justify-items: center; gap: 0; min-height: 48px; border-radius: 16px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.dock button .hgi { font-size: 22px; }
.dock button:active { background: var(--brand-tint); color: var(--brand-text); }
@media (min-width: 900px) { .dock { display: none; } }

/* ---------------- sheets ---------------- */
dialog.sheet { width: min(100%, 520px); max-width: 100%; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; color: var(--ink);
  background: var(--surface); border-radius: var(--r-story) var(--r-story) 0 0; box-shadow: var(--e3); overflow: auto; overscroll-behavior: contain; }
dialog.sheet::backdrop { background: rgba(12, 12, 40, .66); }
dialog.sheet[open] { animation: sheetin 320ms var(--ease); }
@keyframes sheetin { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: var(--r-story); } }
.sheet__in { display: grid; gap: 16px; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.fs { display: grid; gap: 10px; }
.fs legend { font-size: 15px; font-weight: 900; margin-block-end: 8px; }
.fs__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick { min-height: 48px; padding: 8px 10px; border-radius: 16px; font-weight: 700; font-size: 15px; text-align: center; background: var(--surface-2);
  border: 2px solid transparent; transition: border-color 200ms, background-color 200ms; }
.pick[aria-checked="true"] { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-text); }
.teams { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.teams .pick { display: grid; justify-items: center; gap: 4px; padding: 10px 2px; font-size: 13px; }
.teams .pick i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 24%; font-size: 22px; color: #fff; background: var(--tc); }
.teams .pick[aria-checked="true"] { border-color: var(--tc); }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; justify-items: center; }
.avatars .pick { min-height: 0; width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: #fff; background: var(--ab); }
.avatars .pick[aria-checked="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--brand); border-color: transparent; color: #fff; background: var(--ab); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); }
.seg button { min-height: 36px; padding: 0 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--brand-text); box-shadow: var(--e1); }
.form-err { padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 700; background: var(--bad-tint); color: var(--bad); }

dialog.sheet--full { width: 100%; max-width: 640px; height: 100dvh; max-height: 100dvh; margin: 0 auto; border-radius: 0; color: #fff; background: var(--stage); }
@media (min-width: 640px) { dialog.sheet--full { height: min(760px, 94dvh); margin: auto; border-radius: var(--r-story); } }
.quiz { display: grid; grid-template-rows: auto auto 1fr; gap: 12px; height: 100%; padding: max(14px, env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.quiz__top { display: flex; align-items: center; gap: 8px; }
.quiz__stat { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 900; font-size: 18px; background: rgba(255, 255, 255, .1); }
.quiz__stat .hgi { font-size: 20px; color: var(--accent); }
.quiz__stat--score { margin-inline-start: auto; color: var(--accent); }
.quiz__stat--score span { font-size: 13px; font-weight: 600; color: var(--stage-ink-2); }
.quiz__top .iconbtn { color: #fff; background: rgba(255, 255, 255, .1); }
#q-streakbox.is-hot { background: var(--accent); color: var(--on-accent); }
#q-streakbox.is-hot .hgi { color: var(--on-accent); }
.quiz__bar { height: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .14); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--accent); transform-origin: right center; }
[dir="rtl"] .quiz__bar span { transform-origin: right center; }
.quiz__body { display: grid; align-content: center; gap: 14px; min-height: 0; overflow: auto; }
.q__subj { justify-self: center; }
.q__text { font-size: clamp(19px, 5vw, 26px); font-weight: 700; line-height: 1.55; text-align: center; padding: 8px 4px; }
.q__opts { display: grid; gap: 10px; }
@media (min-width: 640px) { .q__opts { grid-template-columns: 1fr 1fr; } }
.q__opt { min-height: 58px; padding: 10px 16px; border-radius: 18px; font-size: 18px; font-weight: 700; text-align: center; color: #fff;
  background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .18); transition: transform 120ms var(--ease), background-color 160ms; }
.q__opt:active { transform: scale(.97); }
.q__opt.is-right { background: #1C844C; border-color: #82D69D; }
.q__opt.is-wrong { background: #9E2A24; border-color: #FF9B9B; animation: shake 320ms; }
.q__opt[disabled] { cursor: default; }
@keyframes shake { 25% { transform: translateX(6px); } 75% { transform: translateX(-6px); } }
.q__gain { justify-self: center; font-weight: 900; font-size: 22px; color: var(--accent); min-height: 34px; }
.q__end { display: grid; justify-items: center; gap: 12px; text-align: center; }
.q__end .big { font-size: clamp(56px, 18vw, 96px); font-weight: 900; line-height: 1; color: var(--accent); }
.q__end p { color: var(--stage-ink-2); }
.q__end .rowb { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.q__ready { display: grid; justify-items: center; gap: 14px; text-align: center; }
.q__ready .hgi { font-size: 64px; color: var(--accent); }

dialog.sheet--pop { text-align: center; }
.pop { display: grid; justify-items: center; gap: 10px; padding: 28px 20px calc(20px + env(safe-area-inset-bottom)); }
.pop__art { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 24%; font-size: 52px; background: var(--accent); color: var(--on-accent); animation: popin 600ms var(--ease); }
.pop__art img { width: 100%; height: 100%; object-fit: contain; }
.pop__art--img { background: none; }
@keyframes popin { from { transform: scale(.3) rotate(-18deg); opacity: 0; } }
.pop__k { font-size: 14px; font-weight: 900; color: var(--accent-text); }
.pop h2 { justify-content: center; }
.pop p { color: var(--ink-2); }

.toasts { position: fixed; inset-inline: 0; inset-block-start: max(12px, env(safe-area-inset-top)); z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 12px; }
.toast { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 10px 18px; border-radius: var(--r-pill); font-size: 15px; font-weight: 700;
  color: #fff; background: #23244A; border: 1px solid rgba(255, 255, 255, .16); box-shadow: var(--e3); animation: toast 3.6s var(--ease) forwards; }
.toast img { width: 36px; height: 36px; margin-block: -4px; }
.toast .hgi { font-size: 22px; color: var(--accent); }
@keyframes toast { 0% { transform: translateY(-20px); opacity: 0; } 8% { transform: none; opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }

/* ---------------- the final seconds + launch ---------------- */
.final { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, rgba(24, 26, 74, .25), rgba(12, 12, 40, .82)); }
.final bdi { font-size: min(62vw, 62vh); font-weight: 900; line-height: 1; color: var(--accent); text-shadow: 0 0 80px rgba(252, 209, 26, .7); }
.final bdi.is-tick { animation: finaltick 950ms var(--ease); }
@keyframes finaltick { 0% { transform: scale(1.7); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(.9); opacity: .9; } }
.launch { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; color: #fff; background: #181A4A; overflow: hidden; animation: flash 1.1s ease-out; }
@keyframes flash { 0% { filter: brightness(6); } 100% { filter: none; } }
.launch__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: zoomout 9s var(--ease) forwards; }
@keyframes zoomout { from { transform: scale(1.25); } }
.launch::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(90% 70% at 50% 62%, rgba(18, 18, 60, .5), rgba(12, 12, 40, .88)); }
.launch__fx { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.launch__in { position: relative; z-index: 3; display: grid; justify-items: center; gap: 14px; padding: 24px 18px; text-align: center; max-width: 720px; }
.launch__in > * { animation: rise 900ms var(--ease) backwards; }
.launch__in > :nth-child(2) { animation-delay: 250ms; } .launch__in > :nth-child(3) { animation-delay: 450ms; }
.launch__in > :nth-child(4) { animation-delay: 600ms; } .launch__in > :nth-child(5) { animation-delay: 800ms; } .launch__in > :nth-child(6) { animation-delay: 1000ms; }
@keyframes rise { from { transform: translateY(36px) scale(.94); opacity: 0; } }
.launch h2 { display: block; font-size: clamp(44px, 12vw, 104px); line-height: 1.08; text-shadow: 0 8px 50px rgba(8, 8, 40, .8); }
.launch h2 bdi, .launch h2 span { color: var(--accent); }
.launch__sub { font-size: clamp(17px, 3.4vw, 24px); font-weight: 600; }
.launch__win { font-size: 16px; font-weight: 700; color: var(--accent); min-height: 26px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .stage__video, .stage__fx, .launch__fx { display: none; }
  .toast, .cheer { animation: none; }
}
@media (max-height: 700px) { .kicker { display: none; } .core { width: 112px; } .ticker { min-height: 40px; } .ticker .cheer:nth-last-child(n+2) { display: none; } }

.me > .btn { justify-self: start; }
