/* ==========================================================================
   Daily Digits — Revision 2 stylesheet
   Mobile-first. One file, no frameworks. Colours are CSS variables with an
   automatic dark theme.
   ========================================================================== */

:root {
  --bg: #f3f5fb;
  --surface: #ffffff;
  --surface-2: #f1f4fa;
  --ink: #0f172a;
  --muted: #5b6780;
  --line: #e1e6f0;
  --brand: #16a34a;
  --brand-2: #22c55e;
  --brand-ink: #ffffff;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --gold: #f59e0b;
  --gold-soft: #fff6dd;
  --bad: #e11d48;
  --bad-soft: #ffe9ee;
  --good-soft: #e3f9ea;
  --key: #ffffff;
  --key-digit: #1e293b;
  --key-digit-ink: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .22);
  --radius: 18px;
  --header-h: 58px;
  --tabbar-h: 62px;
  /* Room for the phone's status bar / notch and bottom gesture bar. Uses the browser's
     safe-area values, Capacitor's own variables, or the fallback app.js sets (--dd-safe-*). */
  --safe-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px), var(--dd-safe-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px), var(--dd-safe-bottom, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1020;
    --surface: #121a2c;
    --surface-2: #19233a;
    --ink: #e9eefb;
    --muted: #98a6c2;
    --line: #25314d;
    --brand: #22c55e;
    --brand-2: #4ade80;
    --brand-ink: #04220f;
    --accent: #8b93ff;
    --accent-soft: #1d2447;
    --gold: #fbbf24;
    --gold-soft: #3a2f10;
    --bad: #fb7185;
    --bad-soft: #3d1420;
    --good-soft: #10331f;
    --key: #1c2740;
    --key-digit: #e9eefb;
    --key-digit-ink: #0a1020;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.15em; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: var(--brand-ink); box-shadow: 0 6px 16px rgba(22, 163, 74, .32); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(22, 163, 74, .42); }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { background: var(--surface-2); }
.btn-sm { padding: .45em .9em; font-size: .9rem; }
.btn-lg { padding: .9em 1.6em; font-size: 1.05rem; }
.pill { display: inline-block; min-width: 1.6em; padding: 0 .45em; border-radius: 999px; background: var(--gold); color: #1f1300; font-size: .82em; text-align: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card > h2 { font-size: 1.1rem; display: flex; align-items: center; gap: .4em; }
.notice { background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; margin: 14px 0 0; font-size: .95rem; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 30; height: calc(var(--header-h) + var(--safe-top));
  display: flex; align-items: center; gap: 12px; padding: var(--safe-top) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
/* No backdrop-filter on phones: it would trap the fixed bottom tab bar inside the header. */
@media (min-width: 820px) {
  .site-header { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 1.15rem; }
.brand-name b { font-weight: 800; color: var(--brand); }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 34px; height: 34px; }
.brand-mark i { display: grid; place-items: center; border-radius: 6px; font: 800 11px/1 system-ui, sans-serif; color: #fff; background: #1e293b; }
.brand-mark i:nth-child(3) { background: var(--brand); }
.brand-mark i:nth-child(2) { background: var(--accent); }
.brand-mark i:nth-child(4) { background: var(--gold); color: #1f1300; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 38px; min-width: 38px; padding: 0 9px; justify-content: center;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.tool-btn b { font-size: .9rem; }
#hintChip { color: #b45309; }
@media (prefers-color-scheme: dark) { #hintChip { color: var(--gold); } }
#soundBtn .icon-mute, #soundBtn.is-muted .icon-sound { display: none; }
#soundBtn.is-muted .icon-mute { display: inline; }
#soundBtn.is-muted { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #9333ea); color: #fff; font-weight: 800; text-decoration: none; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }

/* Navigation: bottom tab bar on phones, inline in the header on wider screens */
.main-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
}
.main-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none;
}
.main-nav a .icon { width: 22px; height: 22px; }
.main-nav a[aria-current="page"] { color: var(--brand); }
@media (min-width: 820px) {
  body { padding-bottom: 0; }
  .main-nav { position: static; height: auto; padding: 0; border: 0; background: none; gap: 4px; margin-left: 18px; }
  .main-nav a { flex: none; flex-direction: row; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
  .main-nav a .icon { width: 18px; height: 18px; }
  .main-nav a:hover { background: var(--surface-2); color: var(--ink); }
  .main-nav a[aria-current="page"] { background: var(--good-soft); }
}

main { max-width: 1120px; margin: 0 auto; padding: 16px 14px 28px; }

/* ------------------------------------------------------------- play layout */
.play-layout { display: grid; gap: 18px; }
.play-main { min-width: 0; max-width: 540px; width: 100%; margin: 0 auto; }
.play-side { display: grid; gap: 18px; align-content: start; max-width: 540px; width: 100%; margin: 0 auto; }
@media (min-width: 940px) {
  .play-layout { grid-template-columns: minmax(0, 540px) minmax(300px, 380px); justify-content: center; gap: 26px; align-items: start; }
  .play-layout.play-single { grid-template-columns: minmax(0, 540px); }
  .play-main, .play-side { margin: 0; }
  /* Only the daily leaderboard sticks; the Yearly side column is taller than the screen. */
  .page-daily .play-side { position: sticky; top: calc(var(--header-h) + var(--safe-top) + 16px); }
}

.status-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.status-bar h1 { font-size: 1.35rem; margin: 0; font-weight: 800; }
.status-date { margin: 0; color: var(--muted); font-size: .9rem; }
.status-bar > div:first-child { margin-right: auto; min-width: 0; }
.stars { display: flex; gap: 4px; }
.star { font-size: 1.9rem; line-height: 1; color: var(--line); transition: color .2s; }
.star.on { color: var(--gold); text-shadow: 0 2px 10px rgba(245, 158, 11, .5); }
.star.current { color: color-mix(in srgb, var(--gold) 35%, var(--line)); animation: pulse 1.6s ease-in-out infinite; }
.star.pop { animation: star-pop .7s cubic-bezier(.2, 1.6, .4, 1); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); min-width: 64px; text-align: center; }
.run-stats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.stat-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; }
.stat-pill .icon { color: #f97316; }
.year-title { color: var(--brand); white-space: nowrap; }
.year-star { color: var(--gold); margin-left: 4px; }

/* -------------------------------------------------------------------- game */
.game-wrap { position: relative; }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 16px; }
.game-top { display: flex; align-items: stretch; gap: 12px; margin-bottom: 12px; }
.target-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px;
  border-radius: 18px; color: #fff; text-align: center; min-height: 104px;
  background: radial-gradient(120% 140% at 0% 0%, #6366f1 0%, #4338ca 45%, #1e1b4b 100%);
}
.page-random .target-card { background: radial-gradient(120% 140% at 0% 0%, #f97316 0%, #db2777 60%, #701a75 100%); }
.page-yearly .target-card { background: radial-gradient(120% 140% at 0% 0%, #14b8a6 0%, #0f766e 50%, #134e4a 100%); }
.target-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; opacity: .85; font-weight: 700; }
.target-value { font-size: clamp(2.6rem, 13vw, 3.6rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.target-card.deal .target-value { animation: deal .45s cubic-bezier(.2, 1.4, .4, 1); }

.display {
  position: relative; min-height: 76px; padding: 12px 14px 22px; border-radius: 16px;
  background: var(--surface-2); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; transition: border-color .2s, background .2s;
}
.display-expr { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 3px; font-size: clamp(1.5rem, 7vw, 2.1rem); font-weight: 700; font-variant-numeric: tabular-nums; min-height: 1.3em; }
.display-expr.empty::before { content: "Tap the digits in order"; font-size: 1rem; font-weight: 500; color: var(--muted); align-self: center; }
.is-locked .display-expr.empty::before { content: ""; }
.tok { animation: tok-in .16s ease-out; }
.tok.o { color: var(--accent); }
.display-total { position: absolute; right: 12px; bottom: 4px; font-size: .9rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.display.good { border-color: var(--brand-2); background: var(--good-soft); animation: good .7s ease; }
.display.bad { border-color: var(--bad); background: var(--bad-soft); animation: shake .45s ease; }
.display.nudge { animation: shake .3s ease; }

.hint-box {
  margin-top: 10px; padding: 10px 12px; border-radius: 14px; border: 2px dashed var(--gold); background: var(--gold-soft);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
}
.hint-box.pop { animation: deal .4s cubic-bezier(.2, 1.4, .4, 1); }
.hint-tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; background: var(--gold); color: #1f1300; padding: 2px 8px; border-radius: 999px; }
.hint-text { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.hint-more { flex-basis: 100%; font-size: .82rem; color: var(--muted); }

.game-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.game-actions .btn { flex: 1; padding: .55em .8em; font-size: .92rem; }
#hintBtn { color: #92400e; border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: var(--gold-soft); }
@media (prefers-color-scheme: dark) { #hintBtn { color: var(--gold); } }

.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.key {
  height: clamp(52px, 14vw, 66px); border-radius: 16px; border: 1px solid var(--line); background: var(--key);
  font-size: 1.45rem; font-weight: 700; cursor: pointer; user-select: none; -webkit-user-select: none;
  box-shadow: 0 3px 0 var(--line); transition: transform .08s ease, box-shadow .08s ease, opacity .2s, background .2s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; display: grid; place-items: center;
}
.key sup { font-size: .6em; }
.key:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.key.tap { animation: key-tap .16s ease; }
.key:disabled { cursor: default; }
.key-digit { background: var(--key-digit); color: var(--key-digit-ink); border-color: transparent; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); font-size: 1.7rem; font-weight: 800; }
.key-digit:disabled { opacity: .38; }
.key-digit.used { opacity: .18; }
.key-digit.next { opacity: 1; box-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); animation: next-pulse 1.4s ease-in-out infinite; }
.key-op { color: var(--accent); }
.key-fn { background: var(--surface-2); font-size: 1.05rem; color: var(--muted); }
.key-eq { background: var(--surface-2); color: var(--muted); }
.key-eq.ready { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: var(--brand-ink); border-color: transparent; box-shadow: 0 3px 0 #15803d; }
.keypad:not(.keypad-yearly) .key-eq { grid-column: span 2; }
.is-locked .key { opacity: .5; }

.start-panel {
  position: absolute; inset: 0; z-index: 5; border-radius: 24px; padding: 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
}
.start-panel h2 { font-size: 1.5rem; }
.start-panel p { max-width: 32ch; color: var(--muted); }

.below-game { margin-top: 14px; display: grid; gap: 10px; justify-items: start; }
.nudge { margin: 0; background: var(--good-soft); padding: 10px 14px; border-radius: 14px; }

/* ------------------------------------------------------------ done / share */
.done-panel { margin-top: 16px; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, var(--good-soft), var(--surface) 60%); border: 2px solid var(--brand-2); box-shadow: var(--shadow); animation: deal .5s cubic-bezier(.2, 1.3, .4, 1); }
.done-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.done-title { font-size: 1.3rem; font-weight: 800; }
.done-points { font-size: 1rem; color: var(--muted); }
.done-score { font-size: 2.2rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.done-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.done-bonus { font-weight: 700; color: #b45309; }
.share-card { display: grid; gap: 10px; }
.share-preview { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font: 500 .95rem/1.5 system-ui, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.share-buttons { display: flex; gap: 8px; }
.share-buttons .btn { flex: 1; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.cta-row p { margin: 0; flex: 1 1 220px; font-size: .95rem; }

/* ------------------------------------------------------------- leaderboard */
.leaderboard h2 { margin-bottom: 12px; }
.leaderboard h2 .icon { color: var(--gold); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; margin-bottom: 12px; }
.tabs button, .tabs a { flex: 1; border: 0; background: none; padding: 7px 4px; border-radius: 999px; font-weight: 700; font-size: .86rem; color: var(--muted); cursor: pointer; text-align: center; text-decoration: none; }
.tabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(15, 23, 42, .14); }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); animation: row-in .3s ease both; }
.lb-row.top1 { background: linear-gradient(90deg, #fff3c4, var(--surface-2) 80%); }
.lb-row.top2 { background: linear-gradient(90deg, #e9edf5, var(--surface-2) 80%); }
.lb-row.top3 { background: linear-gradient(90deg, #ffe4cf, var(--surface-2) 80%); }
@media (prefers-color-scheme: dark) {
  .lb-row.top1 { background: linear-gradient(90deg, #4a3b0b, var(--surface-2) 80%); }
  .lb-row.top2 { background: linear-gradient(90deg, #333d52, var(--surface-2) 80%); }
  .lb-row.top3 { background: linear-gradient(90deg, #4a2c14, var(--surface-2) 80%); }
}
.lb-row.me { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.lb-rank { width: 30px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.lb-row.top1 .lb-rank, .lb-row.top2 .lb-rank, .lb-row.top3 .lb-rank { font-size: 1.25rem; }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-name i { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--brand); text-transform: uppercase; margin-left: 4px; }
.lb-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-year { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.lb-hint { font-size: .85rem; }
.lb-live { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px; }
.lb-gap { text-align: center; color: var(--muted); letter-spacing: .3em; }
.lb-empty { text-align: center; color: var(--muted); padding: 18px 8px; }
.lb-foot { margin: 12px 0 0; font-size: .82rem; color: var(--muted); text-align: center; }
.thumb { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .85rem; flex: none; transition: transform .12s, background .15s; }
.thumb b { font-variant-numeric: tabular-nums; min-width: .8em; }
.thumb .thumb-icon { filter: grayscale(1); opacity: .6; transition: filter .15s, opacity .15s; }
.thumb:hover:not(:disabled) { transform: scale(1.06); }
.thumb.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.thumb.on .thumb-icon { filter: none; opacity: 1; }
.thumb:disabled { cursor: default; opacity: .8; }
.thumb.bump .thumb-icon { animation: thumb-bump .45s cubic-bezier(.2, 1.8, .4, 1); display: inline-block; }

/* ------------------------------------------------------------------ yearly */
.year-list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.year-chip { flex: none; display: inline-flex; flex-direction: column; align-items: center; min-width: 68px; padding: 6px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 800; font-variant-numeric: tabular-nums; position: relative; }
.year-chip small { font-weight: 600; font-size: .7rem; color: var(--muted); }
.year-chip.on { border-color: var(--brand-2); background: var(--good-soft); }
.year-chip.starred { border-color: var(--gold); }
.year-chip.locked { border-style: dashed; color: var(--muted); cursor: default; font-weight: 700; }
.chip-star { position: absolute; top: -9px; right: -6px; color: var(--gold); font-size: 1.1rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.year-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cell { aspect-ratio: 1; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; display: grid; place-items: center; transition: transform .12s, background .2s; }
.cell:hover:not(:disabled) { transform: scale(1.06); border-color: var(--accent); }
.cell.focus { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.cell.solved { background: linear-gradient(160deg, var(--brand-2), var(--brand)); border-color: transparent; color: #fff; cursor: default; }
.cell.impossible { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 7px); color: var(--muted); opacity: .55; cursor: default; text-decoration: line-through; }
.cell.pop { animation: star-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.prog { margin: 22px 4px 8px; }
.prog-track { position: relative; height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.prog-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.prog-fill.full { background: linear-gradient(90deg, #f59e0b, #fde047); }
.prog-mark { position: absolute; top: -20px; transform: translateX(-50%); font-size: .95rem; filter: grayscale(1); opacity: .5; transition: filter .3s, opacity .3s, transform .3s; }
.prog-mark::after { content: ""; position: absolute; left: 50%; top: 20px; width: 2px; height: 12px; background: var(--muted); opacity: .6; }
.prog-unlock { left: 80%; }
.prog-star { left: 100%; color: var(--gold); font-size: 1.1rem; }
.prog-star::after { display: none; }
.prog-mark.hit { filter: none; opacity: 1; transform: translateX(-50%) scale(1.25); }
.prog-text { margin: 0; font-weight: 700; }
.prog-note { margin: 2px 0 12px; font-size: .9rem; color: var(--muted); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 0 0 14px; font-size: .82rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .cell { width: 16px; border-radius: 5px; border-width: 1px; cursor: default; opacity: 1; }

/* ------------------------------------------------------------------ mascot */
.mascot { position: relative; flex: none; width: 96px; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.digi { width: 96px; height: auto; overflow: visible; }
.digi-all { transform-box: fill-box; transform-origin: 50% 100%; animation: digi-float 3.2s ease-in-out infinite; }
.digi-shadow { fill: rgba(15, 23, 42, .16); transform-box: fill-box; transform-origin: center; animation: digi-shadow 3.2s ease-in-out infinite; }
.digi-shell { fill: #22c55e; stroke: #15803d; stroke-width: 3; }
.digi-screen { fill: #0f172a; }
.digi-eyes ellipse { fill: #7dd3fc; transform-box: fill-box; transform-origin: center; animation: digi-blink 4.6s infinite; }
.digi-eyes-happy { display: none; }
.digi-eyes-happy path, .digi-mouth { fill: none; stroke: #7dd3fc; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.digi-mouth-open { fill: #f472b6; stroke: none; }
.digi-mouth-o { fill: #7dd3fc; stroke: none; }
.digi-mouth-open, .digi-mouth-sad, .digi-mouth-o { display: none; }
.digi-keys rect { fill: rgba(255, 255, 255, .55); }
.digi-cheeks circle { fill: #f472b6; opacity: 0; transition: opacity .2s; }
.digi-arm, .digi-leg, .digi-antenna { fill: none; stroke: #15803d; stroke-width: 5; stroke-linecap: round; }
.digi-arm { transform-box: fill-box; transition: transform .25s cubic-bezier(.2, 1.5, .4, 1); }
.digi-arm-l { transform-origin: 100% 0; }
.digi-arm-r { transform-origin: 0 0; }
.digi-bulb { fill: #cbd5e1; stroke: #15803d; stroke-width: 2; transition: fill .2s; }

.mascot[data-mood="happy"] .digi-eyes, .mascot[data-mood="cheer"] .digi-eyes { display: none; }
.mascot[data-mood="happy"] .digi-eyes-happy, .mascot[data-mood="cheer"] .digi-eyes-happy { display: block; }
.mascot[data-mood="happy"] .digi-mouth-smile, .mascot[data-mood="cheer"] .digi-mouth-smile { display: none; }
.mascot[data-mood="happy"] .digi-mouth-open, .mascot[data-mood="cheer"] .digi-mouth-open { display: block; }
.mascot[data-mood="happy"] .digi-cheeks circle, .mascot[data-mood="cheer"] .digi-cheeks circle { opacity: .8; }
.mascot[data-mood="happy"] .digi-all { animation: digi-hop .5s ease 2; }
.mascot[data-mood="cheer"] .digi-all { animation: digi-jump .55s ease-in-out infinite; }
.mascot[data-mood="cheer"] .digi-arm-l { transform: rotate(115deg); }
.mascot[data-mood="cheer"] .digi-arm-r { transform: rotate(-115deg); }
.mascot[data-mood="cheer"] .digi-bulb, .mascot[data-mood="think"] .digi-bulb { fill: #fde047; filter: drop-shadow(0 0 5px #fde047); }
.mascot[data-mood="sad"] .digi-mouth-smile { display: none; }
.mascot[data-mood="sad"] .digi-mouth-sad { display: block; }
.mascot[data-mood="sad"] .digi-all { animation: digi-sad .5s ease; transform: translateY(3px) rotate(-3deg); }
.mascot[data-mood="sad"] .digi-eyes ellipse { animation: none; transform: scaleY(.55); }
.mascot[data-mood="think"] .digi-mouth-smile { display: none; }
.mascot[data-mood="think"] .digi-mouth-o { display: block; }
.mascot[data-mood="think"] .digi-eyes { transform: translate(3px, -4px); }
.mascot[data-mood="think"] .digi-bulb { animation: pulse 1s ease-in-out infinite; }

.bubble {
  position: absolute; left: 82%; bottom: 62%; z-index: 6; width: max-content; max-width: min(230px, 56vw);
  padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--ink); color: var(--bg);
  font-size: .86rem; font-weight: 600; line-height: 1.35; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px) scale(.9); transform-origin: 0 100%; pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.2, 1.5, .4, 1);
}
.bubble.show { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ dialogs */
.modal-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom)); background: rgba(8, 12, 24, .58); opacity: 0; transition: opacity .18s ease; overflow-y: auto; }
.modal-overlay.show { opacity: 1; }
.modal { position: relative; width: 100%; max-width: 440px; background: var(--surface); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); transform: translateY(18px) scale(.97); transition: transform .22s cubic-bezier(.2, 1.3, .4, 1); }
.modal-overlay.show .modal { transform: none; }
.modal-title { font-size: 1.3rem; padding-right: 34px; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.modal-actions .btn { flex: 1 1 auto; white-space: normal; }
.hint-balance { font-size: 1.1rem; }
.hint-balance b { font-size: 2rem; color: var(--gold); margin-right: 4px; }

.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px); z-index: 80; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 14px; }
@media (min-width: 820px) { .toasts { bottom: 24px; } }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .25s cubic-bezier(.2, 1.4, .4, 1); text-align: center; }
.toast.show { opacity: 1; transform: none; }
.toast.good { background: #15803d; color: #fff; }
.toast.bad { background: #be123c; color: #fff; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }

/* Tutorial */
.tut-stage { height: 168px; border-radius: 18px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; overflow: hidden; }
.tut-target { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.tut-target strong { font-size: 1.3rem; color: var(--accent); margin-left: 4px; }
.tut-digits, .tut-year { display: flex; gap: 6px; }
.tut-digits b, .tut-year b { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--key-digit); color: var(--key-digit-ink); font-weight: 800; transition: opacity .2s, transform .2s; }
.tut-digits b.used { opacity: .25; transform: scale(.9); }
.tut-expr { min-height: 36px; font-size: 1.6rem; font-weight: 800; display: flex; gap: 2px; }
.tut-expr span { animation: tok-in .2s ease-out; }
.tut-expr .o { color: var(--accent); }
.tut-result { height: 24px; font-weight: 800; color: var(--brand); opacity: 0; transform: scale(.8); transition: opacity .2s, transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.tut-result.show { opacity: 1; transform: none; }
.tut-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.tut-grid i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; font: 700 .68rem/1 system-ui, sans-serif; background: var(--surface); border: 1px solid var(--line); transition: background .25s, color .25s, transform .25s; }
.tut-grid i.on { background: var(--brand); color: #fff; border-color: transparent; transform: scale(1.12); }
.tut-hint { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 800; }
.tut-hint-bulb { font-size: 2.4rem; animation: pulse 1.4s ease-in-out infinite; }
.tut-title { font-size: 1.1rem; }
.tut-text { min-height: 5.6em; color: var(--muted); }
.tut-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.tut-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .2s, width .2s; }
.tut-dots i.on { background: var(--brand); width: 22px; border-radius: 999px; }
.tut-nav { display: flex; justify-content: space-between; gap: 8px; }
.tut-nav .btn { flex: 1; }

/* Hint break (built-in rewarded break) */
.ad-break { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom)); background: #070b16; color: #fff; }
.ad-box { text-align: center; max-width: 360px; display: grid; justify-items: center; gap: 12px; }
.ad-label { font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; background: #fde047; color: #1f1300; padding: 3px 10px; border-radius: 999px; }
.ad-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#22c55e calc(var(--p) * 360deg), #1e293b 0); position: relative; }
.ad-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #070b16; }
.ad-count { position: relative; font-size: 2.8rem; font-variant-numeric: tabular-nums; }
.ad-title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.ad-tip { margin: 0; color: #a5b4cf; min-height: 3.2em; }
.ad-break .btn-soft { background: transparent; color: #a5b4cf; border-color: #334155; }

/* -------------------------------------------------------------------- home */
.hero { display: grid; gap: 18px; align-items: center; padding: 12px 0 8px; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.025em; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-art { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 22px 16px; border-radius: 26px; background: radial-gradient(130% 150% at 0% 0%, #6366f1 0%, #4338ca 45%, #1e1b4b 100%); color: #fff; min-height: 190px; }
.hero-art .mascot, .hero-art .digi { width: 118px; }
.hero-art .bubble { background: #fff; color: #0f172a; }
.hero-demo { display: grid; gap: 10px; justify-items: start; }
.hd-target { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.hd-target b { font-size: 1.6rem; margin-left: 6px; letter-spacing: 0; }
.hd-expr { display: flex; gap: 3px; flex-wrap: wrap; }
.hd-expr i { font-style: normal; font-weight: 800; font-size: 1.25rem; min-width: 30px; height: 36px; padding: 0 5px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .16); animation: hero-tok 5s ease-in-out infinite both; }
.hd-expr i.o { background: rgba(255, 255, 255, .92); color: #4338ca; }
.hd-expr i:nth-child(2) { animation-delay: .25s; } .hd-expr i:nth-child(3) { animation-delay: .5s; }
.hd-expr i:nth-child(4) { animation-delay: .75s; } .hd-expr i:nth-child(5) { animation-delay: 1s; }
.hd-expr i:nth-child(6) { animation-delay: 1.25s; } .hd-expr i:nth-child(7) { animation-delay: 1.5s; }
.hd-expr i:nth-child(8) { animation-delay: 1.75s; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; gap: 34px; padding: 30px 0 18px; } }

.modes { display: grid; gap: 14px; margin: 18px 0 8px; }
@media (min-width: 760px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.mode-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.mode-card h2 { font-size: 1.25rem; margin: 6px 0 0; }
.mode-card p { color: var(--muted); margin: 0; flex: 1; }
.mode-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #6366f1, #4338ca); }
.mode-random .mode-icon { background: linear-gradient(135deg, #f97316, #db2777); }
.mode-yearly .mode-icon { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.mode-go { font-weight: 800; color: var(--brand); margin-top: 8px; }

/* -------------------------------------------------------------------- prose */
.prose { max-width: 760px; margin: 34px auto 0; }
.prose-page { margin-top: 10px; }
.prose h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 800; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.05rem; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 54px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 800; }
.example { margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); }
.example p { margin: 0; }
.example-sum { font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; margin-top: 4px !important; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* ------------------------------------------------------------------- forms */
.auth-wrap { display: grid; place-items: start center; padding: 10px 0 30px; }
.auth-card { width: 100%; max-width: 430px; padding: 22px; }
.auth-card h1 { font-size: 1.5rem; margin-top: 4px; }
.form { display: grid; gap: 6px; }
.form label { font-weight: 700; font-size: .9rem; margin-top: 8px; }
.form input[type="text"], .form input[type="email"], .form input[type="password"] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; }
.form input:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.form .btn { margin-top: 16px; width: 100%; }
.form-error, .form-ok { padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.form-error { background: var(--bad-soft); color: var(--bad); }
.form-ok { background: var(--good-soft); }
.auth-foot { text-align: center; margin: 14px 0 0; font-size: .92rem; }
.social-buttons { display: grid; gap: 8px; margin-top: 14px; }
.btn-social { width: 100%; border-radius: 12px; font-weight: 700; }
.btn-google { background: #fff; color: #1f2937; border-color: #dadce0; }
.btn-facebook { background: #1877f2; color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 14px 0 4px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.is-native .social-buttons, .is-native .divider { display: none; }

/* ----------------------------------------------------------------- profile */
.profile { max-width: 860px; margin: 0 auto; display: grid; gap: 18px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head h1 { margin: 0; font-size: 1.5rem; }
.profile-head p { margin: 0; }
.profile-head .btn { margin-left: auto; }
.profile-guest { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 28px 20px; }
.profile-guest .hero-actions { justify-content: center; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.stat b { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }
.stat-hot { background: linear-gradient(160deg, #fff1e6, var(--surface)); border-color: #fdba74; }
.stat-gold { background: linear-gradient(160deg, var(--gold-soft), var(--surface)); border-color: var(--gold); }
@media (prefers-color-scheme: dark) { .stat-hot { background: linear-gradient(160deg, #40210f, var(--surface)); border-color: #9a4a12; } }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 18px; }
.spark-bar { flex: 1; height: var(--h); min-width: 0; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); position: relative; animation: bar-grow .6s cubic-bezier(.2, .9, .3, 1) both; transform-origin: bottom; }
.spark-bar.partial { background: var(--line); }
.spark-bar span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: .62rem; font-weight: 700; color: var(--muted); }
.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: 16px; background: var(--surface-2); opacity: .45; filter: grayscale(1); }
.badge.earned { opacity: 1; filter: none; background: var(--gold-soft); }
.badge-icon { font-size: 1.8rem; }
.badge small { color: var(--muted); font-size: .75rem; }
.profile-extra h2 { margin-top: 1em; }
.profile-extra h2:first-child { margin-top: 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.switch-row input { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ footer */
.site-footer { text-align: center; padding: 26px 14px 22px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 34px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.install-steps { padding-left: 1.3em; margin: 0 0 .5em; display: grid; gap: .6em; }
.install-steps .icon { color: var(--accent); }
.cookie-note { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 10px); z-index: 50; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .88rem; }
.cookie-note p { margin: 0; flex: 1; }
@media (min-width: 820px) { .cookie-note { bottom: 16px; } }

/* --------------------------------------------------------------- animations */
@keyframes tok-in { from { transform: translateY(8px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes key-tap { 50% { transform: translateY(3px) scale(.96); } }
@keyframes next-pulse { 50% { box-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent); } }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .75; } }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes good { 30% { transform: scale(1.035); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-2) 28%, transparent); } }
@keyframes star-pop { 0% { transform: scale(.2) rotate(-40deg); } 60% { transform: scale(1.5) rotate(12deg); } 100% { transform: none; } }
@keyframes deal { from { transform: translateY(10px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes row-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes thumb-bump { 40% { transform: scale(1.7) rotate(-18deg); } }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes hero-tok { 0%, 4% { transform: translateY(10px) scale(.5); opacity: 0; } 10%, 88% { transform: none; opacity: 1; } 96%, 100% { transform: scale(.8); opacity: 0; } }
@keyframes digi-float { 50% { transform: translateY(-4px); } }
@keyframes digi-shadow { 50% { transform: scaleX(.88); opacity: .7; } }
@keyframes digi-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes digi-hop { 40% { transform: translateY(-12px) scale(1.04, .97); } 70% { transform: translateY(0) scale(.97, 1.03); } }
@keyframes digi-jump { 0%, 100% { transform: translateY(0) scale(1.04, .95); } 45% { transform: translateY(-18px) scale(.97, 1.05) rotate(4deg); } }
@keyframes digi-sad { 30% { transform: translateX(-4px) rotate(-5deg); } 60% { transform: translateX(3px) rotate(-1deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
