/*
 * Daylit styles.
 * Direction: calm and grown-up. Neutral greys, one warm accent (ember), grouped cards
 * in the style of native iOS apps, activity rings as the signature visual.
 * Type: Geist, one family, set tight for headings.
 * Layout: one phone column (max 480px). At 980px+ the app sits in a phone frame beside a short intro.
 */
:root {
  --bg: #F2F2F4;
  --card: #FFFFFF;
  --card-2: #F4F4F6;
  --ink: #111113;
  --ink-2: #3C3C43;
  --muted: #86868B;
  --faint: #C7C7CC;
  --line: rgba(60, 60, 67, .12);
  --accent: #FF6B2C;        /* ember: today, streaks, the main action */
  --accent-soft: #FFF0E8;
  --week: #2FB872;          /* ring 2: days this week */
  --level: #5B7CFA;         /* ring 3: level progress */
  --good: #1E9E5A;
  --good-soft: #E8F6EE;
  --bad: #E5484D;
  --bad-soft: #FDEDED;
  --on-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px -8px rgba(0, 0, 0, .08);

  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  --r: 20px;
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.3, .5, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E; --ink: #F5F5F7; --ink-2: #D1D1D6; --muted: #8E8E93; --faint: #48484A;
    --line: rgba(84, 84, 88, .5); --accent: #FF7A3D; --accent-soft: #3A1F12; --week: #34C77B; --level: #6E8BFF;
    --good: #34C77B; --good-soft: #0F2A1C; --bad: #FF5A5F; --bad-soft: #3A1517; --on-ink: #000000; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1C1C1E; --card-2: #2C2C2E; --ink: #F5F5F7; --ink-2: #D1D1D6; --muted: #8E8E93; --faint: #48484A;
  --line: rgba(84, 84, 88, .5); --accent: #FF7A3D; --accent-soft: #3A1F12; --week: #34C77B; --level: #6E8BFF;
  --good: #34C77B; --good-soft: #0F2A1C; --bad: #FF5A5F; --bad-soft: #3A1517; --on-ink: #000000; --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.45 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }

.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.25em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.stage { min-height: 100vh; }
.pitch { display: none; }
.shell { max-width: 480px; margin: 0 auto; position: relative; }
.screen { display: flex; flex-direction: column; gap: 14px; padding: 8px 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px)); }
.large-title { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); }
.section { margin: 10px 4px -6px; font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
:lang(hi) .section { letter-spacing: 0; text-transform: none; }

/* ── Brand ─────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.logo { width: 30px; height: 30px; flex: none; }
.wordmark { font-weight: 650; font-size: 19px; letter-spacing: -.03em; color: var(--ink); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 54px; padding: 0 20px; border-radius: 16px;
  background: var(--ink); color: var(--on-ink); font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  transition: transform .15s var(--ease), opacity .15s, background-color .2s;
}
.btn:active:not(:disabled) { transform: scale(.98); opacity: .85; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.secondary { background: var(--card-2); color: var(--ink); }
.btn.plain { background: transparent; color: var(--accent); min-height: 44px; }
.btn.good { background: var(--good); color: #fff; }
.btn.bad { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .3; cursor: default; }
.btn .i { width: 19px; height: 19px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink-2); box-shadow: var(--shadow); flex: none; }
.icon-btn .i { width: 18px; height: 18px; }

.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card-title { font-size: 17px; font-weight: 600; }
.card-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }

.bar { height: 6px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .9s var(--ease); }

/* Grouped list (iOS settings style) */
.list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 16px; position: relative; }
.list > * + *::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); transform: scaleY(.6); }
.list .grow { flex: 1; min-width: 0; }
.list .val { color: var(--muted); font-variant-numeric: tabular-nums; }
.list strong { font-weight: 500; }
.list small { display: block; color: var(--muted); font-size: 13px; }
.row-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.row-ic .i { width: 17px; height: 17px; stroke-width: 2.1; }
.ic-accent { background: var(--accent); } .ic-week { background: var(--week); } .ic-level { background: var(--level); }
.ic-grey { background: #8E8E93; } .ic-good { background: var(--good); } .ic-red { background: var(--bad); }

/* ── Rings ─────────────────────────────────────────────────────────────── */
.rings { position: relative; flex: none; }
.rings svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.rings .track { opacity: .16; }
.rings .arc { animation: arcin 1.1s var(--ease) both; }
.rings .arc.d1 { animation-delay: .1s; } .rings .arc.d2 { animation-delay: .2s; }
@keyframes arcin { from { stroke-dashoffset: var(--c); } }
.rings .center { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }

/* ── Home ──────────────────────────────────────────────────────────────── */
.home-head { display: grid; gap: 2px; padding: 4px 2px 2px; }
.head-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.home-head > div:first-child { min-width: 0; }
.home-head .large-title { overflow-wrap: anywhere; }
.head-r { display: flex; gap: 8px; align-items: center; padding-bottom: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.pill .i { width: 17px; height: 17px; color: var(--accent); }
.pill.off .i { color: var(--faint); }
.av-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 600; font-size: 15px; flex: none; }

.today { display: grid; gap: 18px; }
.today-top { display: flex; align-items: center; gap: 20px; }
.today-top .rings { width: 128px; height: 128px; }
.legend { display: grid; gap: 12px; flex: 1; min-width: 0; }
.lg { display: grid; gap: 1px; }
.lg span { font-size: 13px; color: var(--muted); font-weight: 500; }
.lg strong { font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.lg strong small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.lg.a strong { color: var(--accent); } .lg.w strong { color: var(--week); } .lg.l strong { color: var(--level); }
.today-msg { display: grid; gap: 2px; }
.today-msg h2 { font-size: 21px; font-weight: 650; }
.today-msg p { margin: 0; color: var(--muted); font-size: 15px; }
.bonus { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; }
.countdown { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--card-2); color: var(--muted); font-size: 15px; }
.countdown strong { color: var(--ink); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.notice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); font-size: 15px; }
.notice p { margin: 0; }
.notice .i { color: var(--accent); }

.week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.week li { display: grid; justify-items: center; gap: 8px; }
.wd { font-size: 12px; color: var(--muted); font-weight: 500; }
.wdot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: #fff; }
.week .did .wdot { background: var(--accent); }
.week .did .i { width: 15px; height: 15px; stroke-width: 2.6; }
.week .now .wd { color: var(--ink); font-weight: 600; }
.week .now:not(.did) .wdot { box-shadow: inset 0 0 0 2px var(--accent); background: transparent; }
.streak-line { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.streak-line strong { font-size: 17px; font-weight: 600; }
.streak-line span { color: var(--muted); font-size: 14px; margin-left: auto; }
.streak-line .i { color: var(--accent); width: 20px; height: 20px; }

.goals { display: grid; gap: 16px; margin-top: 16px; }
.goal { display: grid; gap: 8px; }
.goal-top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.goal-top span { color: var(--muted); font-variant-numeric: tabular-nums; }
.goal.done .goal-top span { color: var(--good); font-weight: 600; }
.goal.done .bar > span { background: var(--good); }

/* ── Quiz ──────────────────────────────────────────────────────────────── */
.play { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 12px 16px 0; background: var(--bg); }
.play-top { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.segs { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.segs span { height: 4px; border-radius: 99px; background: var(--faint); opacity: .5; transition: background-color .3s, opacity .3s; }
.segs .cur { background: var(--ink); opacity: 1; }
.segs .ok { background: var(--good); opacity: 1; }
.segs .no { background: var(--bad); opacity: 1; }
.timer { width: 36px; height: 36px; position: relative; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .t-track { stroke: var(--faint); opacity: .4; }
.timer .t-fill { stroke: var(--ink); animation: drain linear forwards; }
.timer.low .t-fill { stroke: var(--bad); }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer.low b { color: var(--bad); }
@keyframes drain { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 94.25; } }
.q-wrap { display: grid; gap: 12px; padding: 28px 0 240px; animation: slide .35s var(--ease) both; }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }
.q-cat { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.q-cat .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.q-cat .combo { margin-left: auto; color: var(--accent); font-weight: 600; animation: fadeup .3s var(--ease); }
.question { margin: 0 0 14px; font-size: clamp(26px, 7vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.question b { font-weight: 600; color: var(--accent); }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  min-height: 60px; padding: 12px 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1.5px transparent;
  font-size: 17px; font-weight: 500; color: var(--ink);
  transition: transform .15s var(--ease), box-shadow .2s, background-color .2s, opacity .2s;
  animation: fadeup .35s var(--ease) both;
}
.opt:nth-child(2) { animation-delay: .04s; } .opt:nth-child(3) { animation-delay: .08s; } .opt:nth-child(4) { animation-delay: .12s; }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--faint); display: grid; place-items: center; flex: none; transition: box-shadow .2s, background-color .2s; color: #fff; }
.opt .radio .i { width: 13px; height: 13px; stroke-width: 3; opacity: 0; }
.opt.sel { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--ink); }
.opt.sel .radio { box-shadow: inset 0 0 0 6px var(--ink); }
.opt.is-correct { background: var(--good-soft); box-shadow: inset 0 0 0 1.5px var(--good); }
.opt.is-correct .radio { background: var(--good); box-shadow: none; }
.opt.is-correct .radio .i { opacity: 1; }
.opt.is-wrong { background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); animation: shake .35s; }
.opt.is-wrong .radio { background: var(--bad); box-shadow: none; }
.opt.is-wrong .radio .i { opacity: 1; }
.opt.is-dim { opacity: .4; }
.opt:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } }

.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; }
.foot-in { max-width: 480px; margin: 0 auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; background: var(--bg); }
.foot.answered .foot-in { background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px -12px rgba(0,0,0,.25); padding-top: 20px; animation: sheet .4s var(--spring); }
@keyframes sheet { from { transform: translateY(100%); } }
.verdict { display: flex; align-items: center; gap: 10px; }
.verdict .vi { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.verdict .vi .i { width: 16px; height: 16px; stroke-width: 3; }
.good .vi { background: var(--good); } .bad .vi { background: var(--bad); }
.verdict h3 { font-size: 20px; font-weight: 650; }
.good .verdict h3 { color: var(--good); } .bad .verdict h3 { color: var(--bad); }
.verdict .pts { margin-left: auto; font-weight: 600; color: var(--good); font-variant-numeric: tabular-nums; }
.answer-line { margin: 0; font-size: 15px; }
.answer-line b { font-weight: 600; }
.explain { margin: 0 0 6px; color: var(--muted); font-size: 15px; }

/* ── Finish (results + streak) ─────────────────────────────────────────── */
.finish { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 28px 16px 20px; gap: 16px; }
.finish-hero { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 12px 0 4px; }
.finish-hero .rings { width: 168px; height: 168px; margin-bottom: 10px; }
.finish-hero .rings .center strong { font-size: 40px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.finish-hero .rings .center strong small { font-size: 20px; color: var(--muted); letter-spacing: 0; }
.finish-hero h1 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; animation: fadeup .5s var(--ease) .2s both; }
.finish-hero p { margin: 0; color: var(--muted); animation: fadeup .5s var(--ease) .3s both; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); animation: fadeup .5s var(--ease) .4s both; }
.metric { padding: 16px 10px; display: grid; gap: 2px; text-align: center; min-width: 0; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric span { font-size: 12px; color: var(--muted); font-weight: 500; }
.metric strong { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric.a strong { color: var(--accent); }
.finish .list { animation: fadeup .5s var(--ease) .5s both; }
.finish-actions { margin-top: auto; display: grid; gap: 4px; padding-top: 8px; }

.streak-hero { display: grid; justify-items: center; text-align: center; gap: 4px; padding-top: 48px; }
.flame-big { width: 72px; height: 72px; color: var(--accent); animation: rise .8s var(--spring) both; }
.flame-big path { fill: var(--accent-soft); }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.8); } }
.streak-num { font-size: 104px; font-weight: 600; line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.streak-hero h1 { font-size: 20px; font-weight: 500; color: var(--muted); letter-spacing: -.01em; }
.streak-hero p { margin: 14px 0 0; color: var(--muted); max-width: 30ch; }

/* ── League ────────────────────────────────────────────────────────────── */
.league-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: -6px; }
.ends { font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.board > * { animation: fadeup .35s var(--ease) both; animation-delay: calc(var(--i, 0) * .03s); }
.rank { width: 22px; text-align: center; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.board .top .rank { color: var(--accent); }
.av { --h: 200; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; flex: none;
  background: hsl(var(--h) 30% 92%); color: hsl(var(--h) 35% 32%); }
.board .me { background: var(--accent-soft); }
.board .me strong { font-weight: 600; }
.list > .zone { min-height: 30px; padding: 6px 16px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--card-2); }
:lang(hi) .list > .zone { text-transform: none; letter-spacing: 0; }

/* ── Achievements ──────────────────────────────────────────────────────── */
.ach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.medal-card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 8px 14px; display: grid; justify-items: center; align-content: start; text-align: center; gap: 6px; min-width: 0; animation: fadeup .4s var(--ease) both; animation-delay: calc(var(--i) * .04s); }
.medal { width: 60px; height: 60px; position: relative; display: grid; place-items: center; margin-bottom: 4px; }
.medal svg.mring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.medal .m-core { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--muted); }
.medal .m-core .i { width: 21px; height: 21px; }
.medal-card.got .m-core { background: var(--accent); color: #fff; }
.medal-card strong { font-size: 13px; font-weight: 600; line-height: 1.25; }
.medal-card small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.medal-card.got small { color: var(--accent); font-weight: 500; }
.ach-detail { font-size: 14px; color: var(--muted); }

/* ── Profile ───────────────────────────────────────────────────────────── */
.p-head { display: flex; align-items: center; gap: 16px; padding: 10px 2px 4px; }
.p-head > div { min-width: 0; }
.p-head .av { width: 64px; height: 64px; font-size: 26px; background: var(--ink); color: var(--on-ink); }
.p-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; }
.p-head p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 2px; min-width: 0; }
.stat span { font-size: 13px; color: var(--muted); }
.stat strong { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat strong small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.heat .hd { font-size: 11px; color: var(--muted); text-align: center; font-weight: 500; }
.heat .c { aspect-ratio: 1; max-width: 100%; border-radius: 6px; background: var(--card-2); }
.heat .c.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--card-2)); }
.heat .c.l2 { background: color-mix(in srgb, var(--accent) 60%, var(--card-2)); }
.heat .c.l3 { background: var(--accent); }
.heat .c.t { box-shadow: inset 0 0 0 2px var(--ink); }
.heat .c.f { opacity: .45; }
.list input.inline { flex: 1; min-width: 0; border: 0; background: transparent; text-align: right; color: var(--muted); font-size: 16px; padding: 0; }
.list input.inline:focus { outline: none; color: var(--ink); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 10px; background: var(--card-2); width: 168px; flex: none; }
.seg button { height: 32px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background-color .2s; }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 99px; background: var(--faint); position: relative; cursor: pointer; transition: background-color .25s; flex: none; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .3s var(--spring); }
.switch:checked { background: var(--good); }
.switch:checked::after { transform: translateX(20px); }
.danger-row { color: var(--bad); justify-content: center; font-weight: 500; width: 100%; }
.danger-row.armed { background: var(--bad); color: #fff; }
.rules p { margin: 0; font-size: 15px; }
.app-ver { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 6px 0; }
.app-ver .logo { width: 20px; height: 20px; }
.app-ver .wordmark { font-size: 14px; color: var(--muted); }

/* ── Onboarding ────────────────────────────────────────────────────────── */
.onboard { padding-bottom: 0; }
.ob-body { display: grid; gap: 22px; padding: 18px 0 160px; animation: slide .35s var(--ease) both; }
.ob-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding-top: 10vh; }
.ob-hero .logo { width: 84px; height: 84px; filter: drop-shadow(0 18px 30px rgba(255, 107, 44, .28)); animation: rise .8s var(--spring) both; }
.ob-hero h1 { font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1.08; margin-top: 10px; text-wrap: balance; animation: fadeup .6s var(--ease) .15s both; }
.ob-hero p { margin: 0; color: var(--muted); font-size: 17px; max-width: 30ch; animation: fadeup .6s var(--ease) .25s both; }
.ob-q { display: grid; gap: 6px; }
.ob-q h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.ob-q p { margin: 0; color: var(--muted); }
.choice { width: 100%; text-align: left; }
.choice .check { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--faint); display: grid; place-items: center; color: #fff; flex: none; }
.choice .check .i { width: 13px; height: 13px; stroke-width: 3; opacity: 0; }
.choice.sel .check { background: var(--accent); box-shadow: none; }
.choice.sel .check .i { opacity: 1; }
.glyph { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); font-weight: 600; font-size: 18px; flex: none; }
.big-input { height: 60px; border-radius: 16px; border: 0; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1.5px transparent; padding: 0 18px; font-size: 20px; font-weight: 500; width: 100%; transition: box-shadow .2s; }
.big-input:focus { outline: none; box-shadow: var(--shadow), inset 0 0 0 1.5px var(--ink); }
.field-err { margin: 0; color: var(--bad); font-size: 14px; }
.back-btn { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 17px; margin-left: -6px; }
.back-btn .i { width: 22px; height: 22px; }

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  border-top: 1px solid var(--line);
}
.nav-btn { height: 52px; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 500; transition: color .2s; }
.nav-btn .i { width: 24px; height: 24px; stroke-width: 1.8; transition: transform .3s var(--spring); }
.nav-btn.on { color: var(--accent); }
.nav-btn.on .i { stroke-width: 2.2; transform: translateY(-1px); }

/* ── Dialog, toast, splash ─────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); display: grid; place-items: end center; z-index: 50; padding: 10px; animation: fade .2s ease; }
.dialog { width: 100%; max-width: 460px; background: var(--card); border-radius: 26px; padding: 24px 18px 12px; display: grid; gap: 6px; text-align: center; animation: sheet .35s var(--spring); margin-bottom: env(safe-area-inset-bottom, 0px); }
.dialog h3 { font-size: 20px; font-weight: 650; }
.dialog p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
@keyframes fade { from { opacity: 0; } }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px);
  max-width: min(420px, calc(100% - 32px)); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--on-ink);
  font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .35s var(--spring); z-index: 60; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.splash { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; align-content: center; gap: 14px; background: #0B0B0C; }
.splash.play { display: grid; }
.splash-logo { width: 88px; height: 88px; }
.sp-arc { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .3s var(--ease) forwards; }
.sp-arc:nth-child(1) { animation-delay: .25s; } .sp-arc:nth-child(2) { animation-delay: .32s; } .sp-arc:nth-child(3) { animation-delay: .39s; } .sp-arc:nth-child(4) { animation-delay: .46s; } .sp-arc:nth-child(5) { animation-delay: .53s; }
.sp-sun { transform-origin: 32px 38px; animation: sunrise .6s var(--spring) .1s both; }
.sp-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .45s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sunrise { from { transform: translateY(8px) scale(.4); opacity: 0; } }
.splash-word { font: 600 28px/1 var(--font); color: #F5F5F7; letter-spacing: -.03em; animation: fadeup .5s var(--ease) .5s both; }
.splash.out { animation: splashout .45s ease forwards; }
@keyframes splashout { to { opacity: 0; visibility: hidden; } }

/* Screen entry */
.screen > * { animation: fadeup .4s var(--ease) both; }
.screen > :nth-child(2) { animation-delay: .03s; } .screen > :nth-child(3) { animation-delay: .06s; } .screen > :nth-child(4) { animation-delay: .09s; } .screen > :nth-child(n+5) { animation-delay: .12s; }


/* ── Listen buttons ────────────────────────────────────────────────────── */
.listen { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); transition: transform .15s var(--ease); }
.listen .i { width: 19px; height: 19px; stroke-width: 2.1; }
.listen:active { transform: scale(.92); }
.listen.speaking { animation: speak 1s ease-in-out infinite; }
@keyframes speak { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 18%, transparent); } }
.listen.inline { width: 28px; height: 28px; vertical-align: middle; margin-left: 4px; }
.listen.inline .i { width: 15px; height: 15px; }
.q-row { display: flex; align-items: flex-start; gap: 12px; }
.q-row .question { flex: 1; min-width: 0; }
.q-listen { margin-top: 2px; }

/* ── Word of the day ───────────────────────────────────────────────────── */
.wotd { display: grid; gap: 6px; }
.wotd-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.wotd-word { font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.wotd-meta { margin: 0; color: var(--muted); font-size: 14px; }
.wotd-meta i { font-style: italic; }
.wotd-m { margin: 6px 0 0; font-size: 16px; }
.wotd-hi { margin: 0; font-size: 15px; }
.wotd-hi span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.wotd-ex { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); color: var(--ink-2); font-size: 15px; }
.btn.sm { min-height: 44px; font-size: 15px; border-radius: 12px; }
.btn.secondary:disabled { opacity: 1; color: var(--good); }

/* ── Wallet ────────────────────────────────────────────────────────────── */
.wallet-hero { display: grid; gap: 4px; }
.bal { display: flex; align-items: center; gap: 8px; font-size: 44px; font-weight: 650; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bal .i { width: 30px; height: 30px; color: var(--accent); stroke-width: 2; }
.wh-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.wh-row span { display: block; font-size: 13px; color: var(--muted); }
.wh-row b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.buy { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; white-space: nowrap; transition: transform .15s var(--ease), background-color .2s; }
.buy .i { width: 14px; height: 14px; stroke-width: 2.4; }
.buy:active:not(:disabled) { transform: scale(.95); }
.buy.armed { background: var(--ink); color: var(--on-ink); }
.buy:disabled { background: var(--card-2); color: var(--muted); cursor: default; }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.amt.plus { color: var(--good); }
.amt.minus { color: var(--muted); }
.list > button { width: 100%; text-align: left; color: inherit; }
.list .chev { width: 16px; height: 16px; color: var(--faint); stroke-width: 2.4; margin-left: -6px; }
button.stat { font: inherit; color: inherit; }


/* ── Difficulty + tasks ────────────────────────────────────────────────── */
:root { --d-e: #2FB872; --d-m: #3D7BF7; --d-h: #E5484D; }
.diff { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; vertical-align: 2px; margin-left: 4px; letter-spacing: .01em; }
.q-cat .diff { margin-left: 0; vertical-align: 0; }
.diff.d-e { color: var(--d-e); background: color-mix(in srgb, var(--d-e) 14%, transparent); }
.diff.d-m { color: var(--d-m); background: color-mix(in srgb, var(--d-m) 14%, transparent); }
.diff.d-h { color: var(--d-h); background: color-mix(in srgb, var(--d-h) 14%, transparent); }
.row-ic.d-e { background: var(--d-e); } .row-ic.d-m { background: var(--d-m); } .row-ic.d-h { background: var(--d-h); }
.tasks .task strong { font-weight: 600; }
.task.off { opacity: .55; }
.task.done strong { color: var(--muted); }
.t-go { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.t-done { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--good); white-space: nowrap; }
.t-done .i { width: 15px; height: 15px; stroke-width: 2.6; }
.t-lock .i { width: 17px; height: 17px; color: var(--faint); }

/* Listening question */
.hear { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 120px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 16px; transition: transform .15s var(--ease); }
.hear .i { width: 34px; height: 34px; stroke-width: 2; }
.hear:active { transform: scale(.98); }
.hear.speaking .i { animation: speakicon .8s ease-in-out infinite; }
@keyframes speakicon { 50% { transform: scale(1.15); } }
.question.small-q { font-size: 20px; font-weight: 600; color: var(--ink-2); }

/* ── Payout ────────────────────────────────────────────────────────────── */
.demo-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--d-m) 12%, var(--card)); color: var(--ink); font-size: 14px; }
.demo-banner .i { color: var(--d-m); margin-top: 1px; }
.demo-banner p { margin: 0; }
.payform label { cursor: text; }
.payform .seg { width: auto; }
.payform .seg button { padding: 0 10px; white-space: nowrap; }
.payform .lbl { flex: none; width: 46%; color: var(--ink); }
.payform input.inline { color: var(--ink); }
.payform input.inline::placeholder { color: var(--faint); }
.link-btn { color: var(--accent); font-weight: 500; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 14px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1.5px transparent; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; transition: box-shadow .2s; }
.chip.on { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--ink); }
.status { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.status.paid { color: var(--good); background: var(--good-soft); }
.status.processing { color: var(--muted); background: var(--card-2); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.amt { display: grid; justify-items: end; line-height: 1.2; }
.amt small { font-size: 12px; font-weight: 500; color: var(--muted); }
.good-t { color: var(--good); }
.btn.armed { background: var(--ink) !important; color: var(--on-ink) !important; }

/* ── Desktop: phone frame + intro ──────────────────────────────────────── */
@media (min-width: 980px) {
  .stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 96px; max-width: 1120px; margin: 0 auto; padding: 32px 56px; }
  .pitch { display: grid; gap: 24px; max-width: 480px; animation: fadeup .7s var(--ease) both; }
  .pitch .logo { width: 40px; height: 40px; }
  .pitch .wordmark { font-size: 24px; }
  .pitch-title { font-size: 60px; line-height: 1.02; font-weight: 700; letter-spacing: -.045em; margin-top: 18px; }
  .pitch-lede { margin: 0; font-size: 19px; color: var(--muted); max-width: 40ch; }
  .pitch-points { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 18px; }
  .pitch-points li { display: flex; gap: 14px; align-items: center; }
  .pitch-points strong { display: block; font-weight: 600; }
  .pitch-points li span:not(.pp-ic) { color: var(--muted); font-size: 15px; }
  .pp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); color: var(--accent); flex: none; font-weight: 600; font-size: 17px; }
  .pp-ic .i { width: 19px; height: 19px; }
  .pitch-foot { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
  .phone {
    position: relative; width: 390px; height: min(844px, calc(100vh - 64px)); min-height: 640px;
    border-radius: 56px; border: 11px solid #0B0B0C; background: var(--bg); overflow: hidden;
    box-shadow: 0 0 0 1.5px #2A2A2C, 0 40px 80px -30px rgba(0,0,0,.45);
    transform: translateZ(0); animation: fadeup .8s var(--ease) .1s both;
  }
  .phone::before { content: ""; position: absolute; top: 11px; left: 50%; width: 110px; height: 32px; margin-left: -55px; border-radius: 99px; background: #0B0B0C; z-index: 100; }
  .shell { height: 100%; overflow-y: auto; scrollbar-width: none; max-width: none; }
  .shell::-webkit-scrollbar { display: none; }
  .screen { padding-top: 54px; }
  .play, .finish { min-height: 100%; padding-top: 54px; }
  .nav { left: 0; transform: none; max-width: none; padding-bottom: 18px; }
  .foot-in { max-width: none; padding-bottom: 24px; }
  .overlay { position: absolute; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .timer .t-fill { animation-duration: 20s !important; }
}
