/* Kpele text in a font of its own, so that every letter and tone shows on every phone, the tones in their
   place: a subset of Noto Sans (SIL Open Font License, fonts/OFL.txt), ɛ ɔ ə ŋ ɓ ɠ ɉ ɲ and the other
   letters of Guinea's languages, the tones and ◌. scripts/contrib_font.sh makes it. */
@font-face { font-family: "Noto Sans Kpele"; src: url("fonts/noto-sans-kpele-600.woff2") format("woff2"); font-weight: 100 600;
  font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Kpele"; src: url("fonts/noto-sans-kpele-700.woff2") format("woff2"); font-weight: 601 900;
  font-style: normal; font-display: swap; }
/* Kpɛlɛɛwoo: a calm, airy look for phones. A pale sky-to-mint background, frosted round buttons,
   a glass orb above one big question, answers as white rows in a soft tray, green pill buttons. */
:root {
  --bg-1: #dcebee; --bg-2: #e8f2ec; --bg-3: #f6faf7;
  --glass: rgba(255, 255, 255, .6); --glass-line: rgba(255, 255, 255, .9); --dock: rgba(255, 255, 255, .78);
  --card: #ffffff; --tray: #f3f5f5; --tile: #f1f4f5; --box: #f4f6f6;
  --ink: #16191d; --ink-2: #3b4148; --muted: #6e757d; --line: rgba(22, 28, 36, .08);
  --green: #66b654; --green-2: #8bcf7a; --green-3: #4b9a3c; --green-ink: #ffffff; --green-soft: #e3f3de; --green-text: #3a8a2c;
  --blue: #5b8def; --purple: #9b7ae8; --teal: #2fb09f; --amber: #e79d24; --sky: #46a3e4; --rose: #e5647d; --red: #e0533e;
  --amber-soft: #fdf2de; --amber-text: #955a00;
  --tick-line: rgba(22, 28, 36, .2);
  --halo-1: rgba(255, 255, 255, .5); --halo-2: rgba(255, 255, 255, .24);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .06);
  --menu-shadow: 0 18px 48px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06), inset 0 0 0 1px var(--line);
  --locked-tier: linear-gradient(145deg, #eef1f3, #cfd6dc); --locked-ink: #9aa4ad;
  --fire-ink: #c2410c; --fire-bg: rgba(255, 237, 213, .85); --fire-line: rgba(255, 237, 213, .9);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  /* Kpele: our own font first (above); then fonts that put the tone marks on ɛ ɔ ə Ə (Apple's system font
     leaves them beside the letter) */
  --kp-font: "Noto Sans Kpele", "Helvetica Neue", Arial, Roboto, "Noto Sans", "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* motion: unhurried, easing out softly, never a snap; a light overshoot only for what arrives */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.25, .64, 1);
  color-scheme: light;
}
/* dark: as the phone is set, unless the profile chose light (html[data-theme]); or chosen in the profile */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-1: #10201f; --bg-2: #0f1a15; --bg-3: #0b110e;
    --glass: rgba(36, 48, 50, .55); --glass-line: rgba(255, 255, 255, .08); --dock: rgba(20, 28, 30, .88);
    --card: #182225; --tray: #111a1c; --tile: #212d30; --box: #1d282b;
    --ink: #eef3f1; --ink-2: #cdd6d4; --muted: #97a3a1; --line: rgba(255, 255, 255, .08);
    --green: #5fae4d; --green-2: #78c166; --green-3: #7cc46a; --green-ink: #06120a; --green-soft: #1c3320; --green-text: #8fd47f;
    --amber-soft: #3a2b13; --amber-text: #f2b865;
    --tick-line: rgba(255, 255, 255, .22);
    --halo-1: rgba(255, 255, 255, .06); --halo-2: rgba(255, 255, 255, .03);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --menu-shadow: 0 18px 48px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line);
    --locked-tier: linear-gradient(145deg, #3b474b, #2a3437); --locked-ink: #7f8b8f;
    --fire-ink: #fdba74; --fire-bg: rgba(124, 45, 18, .45); --fire-line: rgba(124, 45, 18, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg-1: #10201f; --bg-2: #0f1a15; --bg-3: #0b110e;
  --glass: rgba(36, 48, 50, .55); --glass-line: rgba(255, 255, 255, .08); --dock: rgba(20, 28, 30, .88);
  --card: #182225; --tray: #111a1c; --tile: #212d30; --box: #1d282b;
  --ink: #eef3f1; --ink-2: #cdd6d4; --muted: #97a3a1; --line: rgba(255, 255, 255, .08);
  --green: #5fae4d; --green-2: #78c166; --green-3: #7cc46a; --green-ink: #06120a; --green-soft: #1c3320; --green-text: #8fd47f;
  --amber-soft: #3a2b13; --amber-text: #f2b865;
  --tick-line: rgba(255, 255, 255, .22);
  --halo-1: rgba(255, 255, 255, .06); --halo-2: rgba(255, 255, 255, .03);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --menu-shadow: 0 18px 48px rgba(0, 0, 0, .5), inset 0 0 0 1px var(--line);
  --locked-tier: linear-gradient(145deg, #3b474b, #2a3437); --locked-ink: #7f8b8f;
  --fire-ink: #fdba74; --fire-bg: rgba(124, 45, 18, .45); --fire-line: rgba(124, 45, 18, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { position: relative; min-height: 100vh; min-height: 100dvh; background: var(--bg-3); color: var(--ink);
  font: 17px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 42%, var(--bg-3) 78%); }
a { color: var(--green-text); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.loading { text-align: center; margin-top: 40vh; color: var(--muted); font-size: 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
svg { display: block; }

/* ---- top bar: frosted round buttons around a centered title ---- */
.top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; max-width: 600px;
  margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 16px 4px; }
.circle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink); text-decoration: none; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 2px 10px rgba(16, 24, 40, .05); }
.circle svg { width: 21px; height: 21px; }
.circle:active { transform: scale(.94); }
.ttl { min-width: 0; text-align: center; }
.title { display: block; overflow: hidden; font-size: 17px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  text-overflow: ellipsis; }
.brand { display: block; font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: .01em; line-height: 1.15; }
.company { display: block; overflow: hidden; font-size: 11px; font-weight: 700; letter-spacing: .1em; line-height: 1.2;
  text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
  color: var(--green-text); }
@media (max-width: 370px) { .company { font-size: 9.5px; letter-spacing: .04em; } } /* the project's name on one line */
.sync { display: block; font-size: 12.5px; color: var(--muted); }
.sync:empty { display: none; }
.sync.wait { color: var(--amber-text); }
.sync.off { color: var(--red); }

main { max-width: 600px; margin: 0 auto; padding: 6px 16px calc(28px + var(--safe-b)); }
main.dockpad { padding-bottom: calc(250px + var(--safe-b)); }
main.dockpad-sm { padding-bottom: calc(96px + var(--safe-b)); }

/* ---- the glass orb ---- */
.orb { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin: 26px auto 34px;
  border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .95) 0 7%, rgba(255, 255, 255, 0) 27%),
    radial-gradient(circle at 72% 80%, rgba(255, 255, 255, .45) 0 5%, rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 50% 55%, #cde9c6 0%, #9fd294 52%, #72b764 100%);
  box-shadow: inset -8px -12px 20px rgba(46, 104, 40, .3), inset 8px 10px 16px rgba(255, 255, 255, .55),
    0 0 0 16px var(--halo-1), 0 0 0 36px var(--halo-2), 0 14px 34px rgba(64, 128, 58, .22); }
.orb svg { width: 34px; height: 34px; filter: drop-shadow(0 1px 1px rgba(40, 90, 36, .35)); }
.orb.sm { width: 58px; height: 58px; margin: 18px auto 26px;
  box-shadow: inset -6px -9px 14px rgba(46, 104, 40, .3), inset 6px 8px 12px rgba(255, 255, 255, .55),
    0 0 0 11px var(--halo-1), 0 0 0 24px var(--halo-2), 0 10px 24px rgba(64, 128, 58, .2); }
.orb.sm svg { width: 26px; height: 26px; }

/* ---- text ---- */
.eyebrow { margin: 18px 0 4px; text-align: center; font-size: 15px; font-weight: 500; color: var(--muted); }
.headline { margin: 0 auto 12px; max-width: 17em; text-align: center; font-family: var(--display); font-weight: 700;
  font-size: clamp(23px, 6.2vw, 29px); line-height: 1.18; letter-spacing: -.012em; overflow-wrap: anywhere;
  animation: rise .75s var(--ease-out) .08s both; }
.headline.sm { font-size: clamp(21px, 5.4vw, 25px); }
.headline.kp { font-size: clamp(27px, 7.6vw, 35px); }
.kp, .kp-input, .kpline, .letters button { font-family: var(--kp-font); }
.lead { margin: -6px auto 18px; max-width: 30em; text-align: center; font-size: 17px; color: var(--muted); }
.hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.hint.center { margin: 0 0 12px; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 0; font-size: 14px;
  color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--glass-line);
  background: var(--glass); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

/* ---- answers: white rows in a soft tray ---- */
.tray { display: grid; gap: 6px; margin: 0 0 10px; padding: 6px; border-radius: 24px; background: var(--tray);
  box-shadow: inset 0 0 0 1px var(--line); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 7px 12px 7px 8px; border: 0;
  border-radius: 18px; background: var(--card); color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04); touch-action: manipulation;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease), background-color .4s var(--ease); }
.opt:active, .opt.chosen { box-shadow: 0 0 0 2px var(--green); }
.opt:active { transform: scale(.99); }
.opt.chosen .tile { background: var(--green-soft); }
.pick { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; min-height: 50px; padding: 0; border: 0;
  background: none; text-align: left; cursor: pointer; touch-action: manipulation; }
.pick:focus-visible, .opt:focus-visible, .tick:focus-visible, .circle:focus-visible, .pill:focus-visible {
  outline: 3px solid var(--green-2); outline-offset: 2px; }
.tile { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tile); }
.tile svg { width: 21px; height: 21px; }
.t-blue { color: var(--blue); } .t-purple { color: var(--purple); } .t-teal { color: var(--teal); }
.t-green { color: var(--green-3); } .t-amber { color: var(--amber); } .t-sky { color: var(--sky); } .t-rose { color: var(--rose); }
.otext { display: block; flex: 1; min-width: 0; }
.otext b { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.otext b.kp { font-size: 18.5px; }
.otext small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; color: var(--muted); }
.otext small.unsure { color: var(--amber-text); }
/* choosing: tick every right version, correct a ticked one where it is */
.tick { display: grid; flex: none; place-items: center; width: 30px; height: 30px; margin: 0 2px 0 4px; padding: 0;
  border: 2px solid var(--tick-line); border-radius: 50%; background: var(--card); color: #fff; cursor: pointer;
  touch-action: manipulation; }
.tick svg { width: 17px; height: 17px; stroke-width: 3; }
.tick:active { transform: scale(.92); }
.tick.on { border-color: var(--green); background: var(--green); }
.tick.del { border: 0; background: var(--box); color: var(--muted); }
.choice { min-height: 54px; padding: 8px 10px 8px 16px; }
.choice .pick b.kp { flex: 1; font-size: 18.5px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.choice.on { align-items: flex-start; padding-left: 10px; box-shadow: 0 0 0 2px var(--green); animation: ring .6s var(--ease); }
.choice.on:active { transform: none; }
.choice.on .tick { margin-top: 8px; }
.obody { flex: 1; min-width: 0; }
.kp-input.line { min-height: 0; padding: 8px 10px; border-radius: 12px; font-size: 18.5px; resize: none; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line); }
.kp-input.line:focus { box-shadow: inset 0 0 0 2px var(--green); }
.choice .fixed { display: none; margin: 6px 2px 0; font-size: 13px; color: var(--amber-text); }
.choice.edited .fixed { display: block; }
.undo { padding: 0 2px; border: 0; background: none; color: var(--green-text); font: 600 13px var(--font); cursor: pointer; }
.choice .letters { display: none; margin-top: 8px; }
.choice.editing .letters { display: grid; }
.choice .letters button { min-height: 40px; font-size: 19px; }
.choice .letters .tone { font-size: 30px; line-height: 1; } /* ◌ and its tone, big enough to read */
.choice .letters .fn { font-size: 14px; }
.stagger > .still { animation: none; }
.chev { flex: none; width: 20px; height: 20px; color: var(--muted); }
.chev svg { width: 20px; height: 20px; }
/* one after the other (--i: the rank, set by the app), each easing into place */
.stagger > * { animation: rise .75s var(--ease-out) both; animation-delay: min(calc(var(--i, 0) * 90ms + 120ms), 900ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---- cards ---- */
.sheet { margin: 0 0 12px; padding: 16px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.glass { position: relative; margin: 0 0 12px; padding: 16px; border-radius: 24px; border: 1px solid var(--glass-line);
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 6px 24px rgba(16, 24, 40, .05); }
.glass p { margin: 0 0 10px; }
.glass p:last-child { margin-bottom: 0; }
.status { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.status i { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green);
  color: #fff; }
.status i svg { width: 14px; height: 14px; stroke-width: 3; }
.status small { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.box { padding: 14px 16px; border-radius: 18px; background: var(--box); color: var(--ink-2); font-size: 15.5px; }
.box p { margin: 0 0 8px; }
.box p:last-child, .box ol:last-child { margin-bottom: 0; }
.box ol { margin: 0 0 8px; padding-left: 20px; }
.box li { margin-bottom: 4px; }
.kpline { font-size: 21px; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }

/* ---- buttons ---- */
.pill { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 20px;
  border: 0; border-radius: 999px; background: linear-gradient(180deg, var(--green-2), var(--green)); color: var(--green-ink);
  font: 600 17px/1.2 var(--font); text-decoration: none; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 8px 20px rgba(102, 182, 84, .3), inset 0 1px 0 rgba(255, 255, 255, .35); }
.pill:active { transform: scale(.98); }
.pill svg { width: 20px; height: 20px; }
.pill.soft { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(16, 24, 40, .04); }
.pill.warn { background: var(--card); color: var(--amber-text); box-shadow: inset 0 0 0 1px var(--line); }
.pill[disabled] { opacity: .5; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.row.one { grid-template-columns: 1fr; }
.link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 8px 0 0; padding: 10px;
  border: 0; background: none; color: var(--muted); font: 500 15px var(--font); text-decoration: none; cursor: pointer; }
.link svg { width: 16px; height: 16px; }

/* ---- the dock: the recorder, at the thumb ---- */
.actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px 16px calc(10px + var(--safe-b));
  border-top: 1px solid var(--glass-line); border-radius: 28px 28px 0 0; background: var(--dock);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 -10px 30px rgba(16, 24, 40, .07); }
.actions > * { max-width: 568px; margin-left: auto; margin-right: auto; }
.actions .hint.center { margin-bottom: 10px; }

/* ---- welcome ---- */
.welcome { text-align: center; }
.welcome .orb { margin-top: 30px; }
.welcome .glass { margin-top: 6px; text-align: left; font-size: 16.5px; }
.thanks { margin: 4px 0 16px; font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--green-text); }

/* ---- forms: controls that feel like the phone's own ---- */
.field { display: block; margin: 0 0 14px; }
.field > span:first-child { display: block; margin: 0 0 6px 4px; font-weight: 600; }
.field small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.field input[type=text] { width: 100%; min-height: 50px; padding: 12px 16px; border: 0; border-radius: 16px; background: var(--box);
  color: var(--ink); font-size: 17px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .35s var(--ease); }
.field input::placeholder { color: var(--muted); }
.field input:focus, .kp-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--green); }

/* the dropdown: a field like the others; it opens a card of options that glides in, the chosen one ticked */
.dropdown { position: relative; }
.dd-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 50px; padding: 12px 16px;
  border: 0; border-radius: 16px; background: var(--box); color: var(--ink); font: 500 17px var(--font); text-align: left; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); touch-action: manipulation; transition: box-shadow .35s var(--ease); }
.dd-field.empty { color: var(--muted); font-weight: 400; }
.dd-field svg { flex: none; width: 20px; height: 20px; color: var(--muted); transform: rotate(90deg);
  transition: transform .45s var(--ease), color .45s var(--ease); }
.dd-field:focus-visible, .dropdown.open .dd-field { outline: none; box-shadow: inset 0 0 0 2px var(--green); }
.dropdown.open .dd-field svg { color: var(--green); transform: rotate(-90deg); }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20; display: grid; gap: 2px; max-height: min(60vh, 360px);
  overflow-y: auto; padding: 6px; border-radius: 20px; background: var(--card); opacity: 0; transform: translateY(-8px) scale(.98);
  transform-origin: top center; box-shadow: var(--menu-shadow);
  transition: opacity .3s var(--ease), transform .5s var(--ease-out); overscroll-behavior: contain; }
.dropdown.up .dd-menu { top: auto; bottom: calc(100% + 8px); transform: translateY(8px) scale(.98); transform-origin: bottom center; }
.dropdown.open .dd-menu { opacity: 1; transform: none; }
.dd-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 10px 10px 14px;
  border: 0; border-radius: 14px; background: none; color: var(--ink); font: 400 16.5px var(--font); text-align: left; cursor: pointer;
  touch-action: manipulation; transition: background-color .3s var(--ease); }
.dropdown.open .dd-option { animation: drop .45s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms + 60ms); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.dd-option:hover, .dd-option:focus-visible { outline: none; background: var(--box); }
.dd-option[aria-selected="true"] { font-weight: 600; background: var(--green-soft); }
.dd-check { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff;
  opacity: 0; transform: scale(.5); transition: opacity .3s var(--ease), transform .5s var(--spring); }
.dd-check svg { width: 14px; height: 14px; stroke-width: 3; }
.dd-option[aria-selected="true"] .dd-check { opacity: 1; transform: none; }

/* a box to tick: rounded, and its check pops in */
.check { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 12px; padding: 12px 14px 12px 12px; border-radius: 18px;
  background: var(--box); font-size: 16px; cursor: pointer; transition: box-shadow .4s var(--ease); }
.check:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--green); }
.check input { position: relative; flex: none; width: 26px; height: 26px; margin: 0; border: 2px solid var(--tick-line); border-radius: 8px;
  background: var(--card); cursor: pointer; appearance: none; -webkit-appearance: none;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease); }
.check input::after { content: ""; position: absolute; top: 3px; left: 7px; width: 6px; height: 12px; border: solid #fff;
  border-width: 0 2.5px 2.5px 0; border-radius: 1px; transform: rotate(45deg) scale(0); transition: transform .45s var(--spring); }
.check input:checked { border-color: var(--green); background: var(--green); }
.check input:checked::after { transform: rotate(45deg) scale(1); }
.check input:active { transform: scale(.9); }
.check input:focus-visible, .switch:focus-visible { outline: 3px solid var(--green-2); outline-offset: 2px; }

/* a preference: a switch on the right */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 12px; padding: 12px 14px 12px 16px;
  border-radius: 18px; background: var(--box); font-size: 16px; cursor: pointer; }
.switch { position: relative; flex: none; width: 51px; height: 31px; margin: 0; border-radius: 99px; background: var(--tick-line);
  cursor: pointer; appearance: none; -webkit-appearance: none; transition: background-color .4s var(--ease); }
.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .16), 0 1px 1px rgba(0, 0, 0, .1); transition: transform .5s var(--spring); }
.switch:checked { background: var(--green); }
.switch:checked::before { transform: translateX(20px); }

/* one choice among a few: a segmented control, its highlight slides to the choice */
.segmented { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 14px;
  background: var(--tray); box-shadow: inset 0 0 0 1px var(--line); }
.segmented::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 11px;
  background: var(--card); box-shadow: 0 3px 8px rgba(16, 24, 40, .1), 0 1px 1px rgba(16, 24, 40, .06); transition: transform .55s var(--ease-out); }
.segmented:has(label:nth-child(2) input:checked)::before { transform: translateX(100%); }
.segmented:has(label:nth-child(3) input:checked)::before { transform: translateX(200%); }
.segmented label { position: relative; z-index: 1; display: grid; place-items: center; min-height: 44px; padding: 0 6px; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--muted);
  text-align: center; transition: color .4s var(--ease); }
.segmented span svg { flex: none; width: 17px; height: 17px; }
.segmented label:has(input:checked) span { color: var(--ink); font-weight: 600; }
.segmented label:has(input:focus-visible) { border-radius: 11px; outline: 3px solid var(--green-2); outline-offset: -2px; }
.sheet h2 { margin: 6px 0 12px; font-family: var(--display); font-size: 19px; }

/* ---- writing Kpele ---- */
.kp-input { display: block; width: 100%; min-height: 116px; padding: 14px 16px; border: 0; border-radius: 20px; background: var(--box);
  color: var(--ink); font: 600 21px/1.35 var(--kp-font); resize: vertical; box-shadow: inset 0 0 0 2px var(--green); }
.kp-input::placeholder { color: var(--muted); font-weight: 400; }
.letters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.letters button { min-height: 46px; padding: 0; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); font-size: 21px;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(16, 24, 40, .05); cursor: pointer; touch-action: manipulation; }
.letters button:active { background: var(--green-soft); }
.letters .fn { font-size: 14px; font-weight: 700; }
.letters .fn[aria-pressed="true"] { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green); }

/* ---- home ---- */
.meter { height: 10px; overflow: hidden; border-radius: 99px; background: var(--box); }
.meter i { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green-2), var(--green));
  transition: width 1.3s var(--ease-out) .2s; }
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 0; padding: 10px 6px; border-radius: 18px;
  background: var(--box); text-align: center; }
.numbers b { display: block; font-family: var(--display); font-size: 22px; }
.numbers span { font-size: 13px; color: var(--muted); }
.install { margin: 0 0 12px; }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 4px 12px; }
.hello h1 { min-width: 0; margin: 0; font: 700 24px/1.2 var(--display); overflow-wrap: anywhere; }
.hello .chip { flex: none; }
.sheet > .pill + .pill { margin-top: 10px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duo .opt { box-shadow: var(--shadow); }
.duo .opt b { font-size: 16px; font-weight: 600; }

/* ---- a phrase: adding a version, the other answers ---- */
.addrow { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin: 0; padding: 10px;
  border: 1.5px dashed var(--tick-line); border-radius: 18px; background: none; color: var(--ink-2); font: 600 16px var(--font);
  cursor: pointer; touch-action: manipulation; }
.addrow svg { width: 19px; height: 19px; color: var(--green-text); }
.addrow:active { transform: scale(.99); }
.aside { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; } /* the other answers: report, pass */
.aside .pill { min-height: 48px; padding: 10px 14px; font-size: 16px; }
.aside .pill svg { flex: none; width: 18px; height: 18px; }
.aside .flag { color: var(--amber-text); }
.saved-line { display: flex; align-items: center; gap: 8px; margin: 14px 4px 10px; font-weight: 600; color: var(--green-text); }
.saved-line svg { flex: none; width: 18px; height: 18px; stroke-width: 2.6; }

/* ---- reading aloud: the microphone (a tap, or held), the voice, and the player ---- */
.rec-live { display: grid; justify-items: center; }
.rec-stage { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; }
.rec-clock, .rec-max { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .6s var(--ease-out); }
.rec-live.on .rec-clock, .rec-live.on .rec-max { opacity: 1; transform: none; }
.rec-clock { display: flex; align-items: center; gap: 8px; justify-self: end; margin-right: 14px; font: 700 20px var(--display);
  font-variant-numeric: tabular-nums; }
.rec-clock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 1.4s var(--ease) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.rec-max { justify-self: start; margin-left: 14px; font-size: 13px; color: var(--muted); }
.rec-button { position: relative; display: grid; place-items: center; width: 112px; height: 112px; --level: 0; }
.rec-button .halo { position: absolute; inset: 14px; border-radius: 50%; background: var(--green); opacity: 0; pointer-events: none;
  transform: scale(calc(1 + var(--level) * .42)); transition: opacity .6s var(--ease), background-color .6s var(--ease); }
.rec-button .halo.far { transform: scale(calc(1 + var(--level) * .78)); }
.rec-live:not(.on) .halo { animation: breathe 3.6s var(--ease) infinite; } /* at rest: an invitation */
.rec-live:not(.on) .halo.far { animation-delay: .5s; }
@keyframes breathe { 0%, 100% { opacity: 0; transform: scale(1); } 50% { opacity: .16; transform: scale(1.22); } }
.rec-live.on .halo { background: var(--red); opacity: .18; }
.rec-live.on .halo.far { opacity: .09; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke: var(--line); stroke-width: 3; opacity: 0; transition: opacity .45s var(--ease), stroke .45s var(--ease); }
.ring .gone { stroke: var(--red); stroke-linecap: round; }
.rec-live.on .ring circle { opacity: 1; }
.rec-button.late .ring .gone { stroke: var(--amber); } /* the last seconds */
.mic { position: relative; display: grid; flex: none; place-items: center; width: 84px; height: 84px; padding: 0; border: 0; border-radius: 50%;
  color: #fff; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .5) 0 6%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, var(--green-2), var(--green));
  box-shadow: 0 10px 24px rgba(102, 182, 84, .35); transition: transform .5s var(--spring), box-shadow .6s var(--ease); }
.mic .glow { position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .45) 0 6%, rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #f28a74, var(--red)); }
.mic svg { position: relative; width: 36px; height: 36px; transition: transform .5s var(--spring), opacity .3s var(--ease); }
.mic .stop { position: absolute; width: 26px; height: 26px; border-radius: 7px; background: #fff; opacity: 0;
  transform: scale(.3) rotate(-45deg); transition: transform .55s var(--spring), opacity .3s var(--ease); }
.mic.pressed { transform: scale(.92); }
.mic:focus-visible { outline: 3px solid var(--green-2); outline-offset: 4px; }
.rec-live.on .mic { box-shadow: 0 10px 26px rgba(224, 83, 62, .4); }
.rec-live.on .mic .glow { opacity: 1; }
.rec-live.on .mic svg { opacity: 0; transform: scale(.4); }
.rec-live.on .mic .stop { opacity: 1; transform: none; }
.rec-live.on .mic.pressed { transform: scale(1.06); } /* held: it swells a little while you read */
.rec-wave { display: block; width: 100%; height: 34px; margin: 8px 0 0; color: var(--muted); }
.rec-hint.center { min-height: 20px; margin: 6px 0 0; }
.recwarn { margin: 0 0 10px; padding: 10px 14px; border-radius: 16px; background: var(--amber-soft); color: var(--amber-text);
  font-size: 15px; text-align: center; }
/* the player: its background fills up as the take plays (--p, 0 to 1), the played bars turn green */
.rec-done { animation: rise .6s var(--ease-out) both; }
.player { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 18px 8px 8px;
  overflow: hidden; border: 0; border-radius: 999px; background: var(--card); color: var(--ink); text-align: left; cursor: pointer;
  touch-action: manipulation; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(16, 24, 40, .04); --p: 0; }
.player-fill { position: absolute; inset: 0; background: var(--green-soft); transform: scaleX(var(--p)); transform-origin: left center; }
.player-icon { position: relative; display: grid; flex: none; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(180deg, var(--green-2), var(--green)); color: #fff; box-shadow: 0 4px 12px rgba(102, 182, 84, .3);
  transition: transform .4s var(--spring); }
.player-icon svg { grid-area: 1 / 1; width: 18px; height: 18px; transition: transform .45s var(--spring), opacity .25s var(--ease); }
.player-icon svg:first-child { margin-left: 2px; } /* the triangle looks centred */
.player-icon svg:last-child, .player.playing .player-icon svg:first-child { opacity: 0; transform: scale(.4); }
.player.playing .player-icon svg:last-child { opacity: 1; transform: none; }
.player:active .player-icon { transform: scale(.92); }
.player-wave { position: relative; flex: 1; min-width: 0; height: 32px; color: var(--muted); }
.player-wave svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.player-wave .played { position: absolute; inset: 0; display: block; color: var(--green-3); clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); }
.player.rewind .player-fill, .player.rewind .played { transition: transform .8s var(--ease-out), clip-path .8s var(--ease-out); }
.player-time { position: relative; flex: none; min-width: 38px; font: 600 15px var(--font); font-variant-numeric: tabular-nums;
  text-align: right; color: var(--ink-2); }
.rec-done .row { margin-top: 10px; }
.tips { margin-top: 10px; font-size: 15px; }
.tips b { color: var(--green-text); }
.tips .link { justify-content: flex-start; margin: 4px 0 0; padding: 4px 0; font-weight: 600; color: var(--green-text); }

/* ---- help: rows that open ---- */
details.opt { display: block; padding: 0; }
details.opt summary { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 9px 12px 9px 9px; list-style: none;
  cursor: pointer; }
details.opt summary::-webkit-details-marker { display: none; }
details.opt .chev { transform: rotate(90deg); transition: transform .45s var(--ease); }
details.opt[open] > .box { animation: rise .6s var(--ease-out); }
details.opt[open] .chev { transform: rotate(-90deg); }
details.opt .box { margin: 0 10px 10px; }
details.opt:active { transform: none; }

/* ---- thanks ---- */
.names { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.names span { padding: 7px 14px; border-radius: 99px; background: var(--box); font-weight: 600; }
.code { padding: 2px 8px; border-radius: 8px; background: var(--box); font: 15px ui-monospace, Menlo, monospace; }
.done { text-align: center; }
.done .orb { margin-top: 44px; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(236px + var(--safe-b)); z-index: 30; max-width: calc(100vw - 32px);
  padding: 11px 18px; border-radius: 99px; background: var(--ink); color: var(--bg-3); font-size: 15.5px; font-weight: 600;
  transform: translateX(-50%); box-shadow: var(--shadow); animation: pop .5s var(--ease-out);
  transition: opacity .45s var(--ease), transform .45s var(--ease); }
.toast.out { opacity: 0; transform: translate(-50%, 8px); }
.toast.low { bottom: calc(24px + var(--safe-b)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (min-width: 700px) {
  .headline { font-size: 34px; }
  .headline.kp { font-size: 38px; }
}

/* ---- life: screens slide in, the orb floats, a tick draws itself, the send button wakes up ---- */
main { animation: page .65s var(--ease-out) both; }
@keyframes page { from { opacity: 0; transform: translateY(18px); } }
.orb { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
.pill { transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .45s var(--ease), background-color .35s var(--ease); }
.circle { transition: transform .35s var(--ease), background-color .35s var(--ease); }
.tick { transition: transform .35s var(--ease), background-color .45s var(--ease), border-color .45s var(--ease); }
.tick.on { animation: tickin .6s var(--spring) both; }
.tick.on svg path { stroke-dasharray: 24; animation: draw .65s .18s var(--ease) both; }
@keyframes tickin { from { opacity: .4; transform: scale(.6); } }
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } } /* without motion: drawn at once */
@keyframes ring { from { box-shadow: 0 0 0 0 var(--green); } }
.pill.ready { animation: ready 1s var(--ease) both; }
@keyframes ready { 35% { transform: scale(1.03); } }
@keyframes shimmer { 50% { opacity: .5; } }
.confetti { position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; pointer-events: none; }

/* ---- the next badge ---- */
.goal { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 18px; background: var(--box); }
.goal > div { flex: 1; min-width: 0; }
.goal b { display: block; font-size: 15px; }
.goal small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.meter.thin { height: 7px; margin-top: 7px; background: var(--card); }
.minigoal { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mbar { width: 56px; height: 6px; overflow: hidden; border-radius: 99px; background: var(--tick-line); }
.mbar i { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green-2), var(--green));
  transition: width 1.2s var(--ease-out) .3s; }
.chip.fire { color: var(--fire-ink); background: var(--fire-bg); border-color: var(--fire-line); }
.chip svg { width: 15px; height: 15px; }
.fire svg { color: #f97316; }

/* ---- medals ---- */
.medal { position: relative; display: grid; flex: none; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #fff;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 42%), var(--tier);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55), 0 6px 14px var(--tier-shadow); }
.medal svg { width: 24px; height: 24px; stroke-width: 2.3; }
.medal b { position: absolute; bottom: -9px; left: 50%; padding: 1px 7px; border-radius: 99px; background: var(--card); color: var(--ink);
  font: 700 11.5px var(--display); transform: translateX(-50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); white-space: nowrap; }
.medal.mini { width: 40px; height: 40px; }
.medal.mini svg { width: 19px; height: 19px; }
.medal.big { width: 112px; height: 112px; }
.medal.big svg { width: 46px; height: 46px; }
.medal.big b { bottom: -11px; padding: 2px 10px; font-size: 15px; }
.medal.bronze { --tier: linear-gradient(145deg, #e8ab7a, #b86f3a); --tier-shadow: rgba(184, 111, 58, .35); }
.medal.silver { --tier: linear-gradient(145deg, #e3e8ec, #97a3ae); --tier-shadow: rgba(120, 135, 150, .35); }
.medal.gold { --tier: linear-gradient(145deg, #ffdb7d, #dea22a); --tier-shadow: rgba(222, 162, 42, .42); }
.medal.emerald { --tier: linear-gradient(145deg, #86e3ba, #1f9d6b); --tier-shadow: rgba(31, 157, 107, .4); }
.badge.locked .medal { --tier: var(--locked-tier); --tier-shadow: transparent; color: var(--locked-ink); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 18px 8px; }
.badge { display: grid; justify-items: center; gap: 14px; text-align: center; animation: rise .75s var(--ease-out) both;
  animation-delay: min(calc(var(--i, 0) * 80ms + 150ms), 1.2s); }
.badge small { font-size: 12px; line-height: 1.25; color: var(--muted); }
.badge.locked small { opacity: .7; }
.medal .shine { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; }
.medal .shine::after { content: ""; position: absolute; top: -20%; left: -60%; width: 40%; height: 140%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); transform: rotate(20deg);
  animation: shine 3.6s ease-in-out 1.4s infinite; }
@keyframes shine { 0% { left: -60%; } 50%, 100% { left: 130%; } }

/* ---- the classement ---- */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 6px; padding: 4px; border-radius: 99px;
  background: var(--tray); box-shadow: inset 0 0 0 1px var(--line); }
.seg::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); border-radius: 99px;
  background: var(--card); box-shadow: 0 2px 8px rgba(16, 24, 40, .08); transition: transform .55s var(--ease-out); }
.seg[data-on="all"]::before { transform: translateX(calc(100% + 4px)); }
.seg button { position: relative; z-index: 1; min-height: 40px; border: 0; border-radius: 99px; background: none; color: var(--muted);
  font: 600 15px var(--font); cursor: pointer; transition: color .45s var(--ease); }
.seg button[aria-selected="true"] { color: var(--ink); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 34px 0 14px; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center;
  animation: rise .85s var(--ease-out) both; }
.step.first { animation-delay: .1s; }
.step.second { animation-delay: .3s; }
.step.third { animation-delay: .5s; }
.step > b { max-width: 100%; overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.step .pts { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.step .block { display: grid; place-items: start center; width: 100%; margin-top: 6px; padding-top: 10px; border-radius: 16px 16px 6px 6px;
  color: #fff; font: 800 22px var(--display); transform-origin: bottom; animation: grow 1.2s var(--ease-out) both; }
.step.first .block { height: 96px; background: linear-gradient(180deg, #ffdb7d, #dea22a); animation-delay: .25s; }
.step.second .block { height: 70px; background: linear-gradient(180deg, #e7ecef, #a4afb9); animation-delay: .45s; }
.step.third .block { height: 54px; background: linear-gradient(180deg, #edb68b, #c07d47); animation-delay: .65s; }
.step .crown { position: absolute; top: -26px; color: #dea22a; animation: bob 3.4s ease-in-out infinite; }
.crown svg { width: 26px; height: 26px; }
.step.you .avatar { box-shadow: 0 0 0 3px var(--green), 0 6px 14px rgba(16, 24, 40, .12); }
.podium.loading .block { height: 70px; background: var(--tray); animation: shimmer 1.6s ease-in-out infinite; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-6deg); } }
.avatar { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font: 700 17px var(--display);
  background: linear-gradient(145deg, hsl(var(--h, 140) 68% 62%), hsl(calc(var(--h, 140) + 30) 58% 44%)); }
.avatar.big { width: 58px; height: 58px; font-size: 24px; box-shadow: 0 6px 14px rgba(16, 24, 40, .12); }
.avatar.anon { background: var(--tile); color: var(--muted); }
.avatar.anon svg { width: 20px; height: 20px; }
.rankrow { gap: 12px; min-height: 64px; padding: 10px 14px 10px 10px; cursor: default; }
.rankrow:active { transform: none; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.rankrow .rk { flex: none; width: 26px; text-align: center; font: 700 15px var(--display); color: var(--muted); }
.rankrow .pts { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.rankrow .pts b { font: 700 17px var(--display); }
.rankrow .pts small { font-size: 11.5px; color: var(--muted); }
.rankrow.you, .rankrow.you:active { box-shadow: 0 0 0 2px var(--green); }
.rankrow em, .step em { font-style: normal; font-weight: 600; color: var(--green-text); }
.tray.list.loading .rankrow { animation: shimmer 1.6s ease-in-out infinite; }
.numbers b sup { font-size: .55em; }
.numbers b small { font-size: 12px; font-weight: 500; color: var(--muted); }
.numbers b.fire { display: flex; align-items: center; justify-content: center; gap: 2px; }
.numbers b.fire svg { width: 19px; height: 19px; }
.numbers.four { grid-template-columns: repeat(2, 1fr); gap: 14px 6px; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); align-items: stretch; gap: 4px; height: 100px; margin-top: 8px; }
.bar { display: grid; grid-template-rows: 1fr auto; gap: 4px; text-align: center; }
.bar .col { display: flex; align-items: flex-end; overflow: hidden; border-radius: 6px; background: var(--box); }
.bar .col i { display: block; width: 100%; height: 0; border-radius: 6px; background: linear-gradient(180deg, var(--green-2), var(--green));
  transition: height 1.3s var(--ease-out); transition-delay: calc(var(--i, 0) * 55ms + 200ms); }
.bar.today .col i { background: linear-gradient(180deg, #ffdb7d, #e79d24); }
.bar small { font-size: 10.5px; color: var(--muted); }

/* ---- a milestone: the party ---- */
.party { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(12, 20, 16, .38);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .5s var(--ease); }
.party.on { opacity: 1; }
.party-card { width: min(100%, 360px); padding: 36px 22px 14px; border-radius: 30px; background: var(--card); text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25); transform: scale(.9) translateY(28px); transition: transform .85s var(--spring); }
.party.on .party-card { transform: none; }
.party-card .medal.big { margin: 0 auto 28px; animation: medal 1.2s var(--spring) .3s both; }
.party-card .kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-text); }
.party-card h2 { margin: 4px 0 8px; font: 700 26px/1.2 var(--display); }
.party-card > p:not(.kicker) { margin: 0 0 20px; color: var(--muted); }
@keyframes medal { from { opacity: 0; transform: scale(.55) rotate(-12deg); } }

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