/* Layout concept: a phone-width trainer, one column. The Italian phrase sits on a green road-sign plate
   (autostrada green, white inner border): the single bold element. Around it: warm plaster cream, basil green,
   tomato red and lemon, with the tricolore as a thin edge. */
:root {
  --bg: #FFF7EC;
  --surface: #FFFFFF;
  --surface2: #FFF0DF;
  --ink: #221A14;
  --ink2: #6E5B4B;
  --line: #F1DCC4;
  color-scheme: light;
  --accent: #00924A;
  --accent-ink: #FFFFFF;
  --accent-soft: #D5F4E2;
  --accent-deep: #006534;
  --plate: #00824A;
  --plate-ink: #FFFFFF;
  --hint: #E8A100;
  --hint-soft: #FFF0C2;
  --hint-ink: #5A3D00;
  --good: #138A4B;
  --good-soft: #D6F2E1;
  --bad: #CE2B37;
  --bad-soft: #FDDFE1;
  --shadow: 0 1px 0 rgba(46, 30, 14, .05), 0 8px 22px rgba(46, 30, 14, .08);
  /* illustration colours: azzurro, sea, tomato, lemon, basil, rose, lavender; pizza crust and cheese */
  --c-blue: #1F6FE0; --c-sky: #22B5E8; --c-red: #E5303F; --c-sun: #FFCE2E; --c-green: #11A352; --c-rose: #FF6F9E; --c-lav: #9A72EA;
  --c-crust: #E9A04A; --c-crust2: #B4651C; --c-dough: #FFD66A; --c-ink: #2B2019; --c-face: #2B2019; --c-white: #FFFFFF;
  --p-sky: #D6F1FC; --p-mint: #D5F5E3; --p-sun: #FFF0BC; --p-rose: #FFE0EA; --p-lav: #ECE3FF; --p-red: #FFE0DD;
  --glass: rgba(255, 250, 243, .7); --glass-line: rgba(255, 255, 255, .75);
  --hero-a: #008C45; --hero-b: #16B862;
  --pass-a: #6E1A2D; --pass-b: #A3283F;
  --f-ui: 'Rubik', 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Barlow Semi Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-ipa: 'Source Sans 3', 'Noto Sans', 'Charis SIL', 'Lucida Grande', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C140F; --surface: #15211A; --surface2: #1B2B22; --ink: #F3EFE8; --ink2: #B3BEB5; --line: #2B3D32;
    --accent: #3BD681; --accent-ink: #04210F; --accent-soft: #173B27; --accent-deep: #1E9A55;
    --plate: #0E7A44; --plate-ink: #FFFFFF;
    --hint: #F2C94C; --hint-soft: #3A3115; --hint-ink: #F6E3A0;
    --good: #46C48C; --good-soft: #12392B; --bad: #FF7C84; --bad-soft: #45191E;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .35);
    --c-blue: #5C9BF5; --c-ink: #DDF5E6; --c-white: #F4FFF8; --c-sun: #FFD85A;
    --p-sky: rgba(34, 181, 232, .18); --p-mint: rgba(17, 163, 82, .2); --p-sun: rgba(255, 206, 46, .16); --p-rose: rgba(255, 111, 158, .17); --p-lav: rgba(154, 114, 234, .2); --p-red: rgba(229, 48, 63, .2);
    --glass: rgba(21, 33, 26, .64); --glass-line: rgba(255, 255, 255, .12);
    --hero-a: #0A6B37; --hero-b: #13924D;
    --pass-a: #4E1220; --pass-b: #7C1E31;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C140F; --surface: #15211A; --surface2: #1B2B22; --ink: #F3EFE8; --ink2: #B3BEB5; --line: #2B3D32;
  --accent: #3BD681; --accent-ink: #04210F; --accent-soft: #173B27; --accent-deep: #1E9A55;
  --plate: #0E7A44; --plate-ink: #FFFFFF;
  --hint: #F2C94C; --hint-soft: #3A3115; --hint-ink: #F6E3A0;
  --good: #46C48C; --good-soft: #12392B; --bad: #FF7C84; --bad-soft: #45191E;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .35);
  --c-blue: #5C9BF5; --c-ink: #DDF5E6; --c-white: #F4FFF8; --c-sun: #FFD85A;
  --p-sky: rgba(34, 181, 232, .18); --p-mint: rgba(17, 163, 82, .2); --p-sun: rgba(255, 206, 46, .16); --p-rose: rgba(255, 111, 158, .17); --p-lav: rgba(154, 114, 234, .2); --p-red: rgba(229, 48, 63, .2);
  --glass: rgba(21, 33, 26, .64); --glass-line: rgba(255, 255, 255, .12);
  --hero-a: #0A6B37; --hero-b: #13924D;
  --pass-a: #4E1220; --pass-b: #7C1E31;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.4;
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- shell ---- */
#app { min-height: 100vh; }
.wrap { max-width: 560px; margin: 0 auto; padding-inline: 16px; }
.main { padding-block: 8px 112px; display: flex; flex-direction: column; gap: 16px; }
.top {
  position: sticky; top: 0; z-index: 20; background: var(--bg); padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: .01em; }
.brand .mark {
  background: var(--plate); color: var(--plate-ink); border-radius: 5px; padding: 1px 8px 2px; font-size: 15px;
  box-shadow: inset 0 0 0 2px var(--plate), inset 0 0 0 3px rgba(255, 255, 255, .9); letter-spacing: .04em;
}
.tools { display: flex; align-items: center; gap: 10px; }
.sync { width: 10px; height: 10px; border-radius: 50%; background: var(--ink2); opacity: .55; }
.sync[data-s="synced"] { background: var(--good); opacity: 1; }
.sync[data-s="syncing"] { background: var(--hint); opacity: 1; }
.sync[data-s="offline"], .sync[data-s="error"] { background: var(--bad); opacity: 1; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.nav .wrap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding-block: 6px; }
.nav button {
  background: none; border: 0; border-radius: 12px; padding: 6px 2px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--ink2); font-size: 12px; font-weight: 600;
}
.nav button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav button[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* ---- type ---- */
.h1 { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: .005em; }
.h2 { font-family: var(--f-display); font-weight: 700; font-size: 21px; line-height: 1.15; }
.eyebrow { font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink2); }
.muted { color: var(--ink2); }
.small { font-size: 14px; }
.ipa { font-family: var(--f-ipa); font-size: 17px; letter-spacing: .01em; }
.cy { font-size: 17px; font-style: italic; }
.num { font-variant-numeric: tabular-nums; }

/* ---- surfaces ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row > .grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }
.wrapr { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ---- buttons ---- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 12px 16px;
  font-weight: 600; font-size: 16px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 18px; }
.btn.ghost { background: none; border-color: transparent; color: var(--accent); }
.btn.danger { color: var(--bad); border-color: var(--bad); background: none; }
.btn.small { min-height: 40px; padding: 8px 12px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: default; }
.icon-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; flex: none; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; background: var(--surface2); border: 1px solid var(--line); color: var(--ink2); }
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.chip.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.chip.hint { background: var(--hint-soft); border-color: transparent; color: var(--hint-ink); }
.seg { display: inline-flex; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--ink2); min-height: 34px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(46, 30, 14, .18); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }

/* ---- the plate (the one bold element) ---- */
.plate {
  background: var(--plate); color: var(--plate-ink); border-radius: 10px; padding: 20px 22px;
  box-shadow: inset 0 0 0 4px var(--plate), inset 0 0 0 6px rgba(255, 255, 255, .92), var(--shadow);
  font-family: var(--f-display); font-weight: 600; font-size: 29px; line-height: 1.15; letter-spacing: .005em; overflow-wrap: anywhere;
}
.plate.sm { font-size: 22px; padding: 14px 16px; }
.plate.num-plate { font-size: 40px; text-align: center; }

/* ---- progress ---- */
.bar { height: 10px; background: var(--surface2); border-radius: 999px; overflow: hidden; display: flex; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; }
.seg-new { background: var(--line); } .seg-learning { background: var(--hint); } .seg-review { background: var(--c-blue); } .seg-strong { background: var(--good); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dots { display: flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.dots i.learning { background: var(--hint); } .dots i.review { background: var(--c-blue); } .dots i.strong { background: var(--good); }
.dots i.hard { box-shadow: 0 0 0 2px var(--bad); }

/* ---- course ---- */
.bullet {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 700; font-size: 20px; background: var(--surface2); border: 2px solid var(--line); color: var(--ink2);
}
.bullet.now { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bullet.done { background: var(--good); border-color: var(--good); color: #fff; }
.day { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.day .t { font-weight: 700; }
.phrase-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); width: 100%; background: none; border-inline: 0; border-bottom: 0; text-align: left; }
.phrase-row:first-child { border-top: 0; }
.phrase-row .fr { font-family: var(--f-display); font-weight: 600; font-size: 19px; line-height: 1.2; }

/* ---- tiles (play) ---- */
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 124px; box-shadow: var(--shadow); }
.tile .e { font-size: 28px; line-height: 1; }
.tile .t { font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.1; }
.tile[disabled] { opacity: .55; box-shadow: none; }

/* ---- session ---- */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: env(safe-area-inset-top, 0px); }
.overlay > .wrap { min-height: 100%; display: flex; flex-direction: column; }
.s-top { position: sticky; top: 0; background: var(--bg); z-index: 2; padding-block: 10px; }
.s-top .row { gap: 10px; }
.meter { flex: 1; height: 8px; background: var(--surface2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.s-body { flex: 1; padding-block: 8px 24px; display: flex; flex-direction: column; gap: 14px; }
.prompt { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.12; }
.scene { font-size: 44px; line-height: 1.1; letter-spacing: .1em; text-align: center; padding: 8px 0; }
.hintbox { background: var(--hint-soft); color: var(--hint-ink); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.hintbox .lab { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; }
.mask { font-family: var(--f-display); font-weight: 600; font-size: 24px; line-height: 1.8; color: var(--hint-ink); overflow-wrap: anywhere; }
.mask b { font-weight: 700; }
.bl { display: inline-block; width: .55em; height: .9em; border-bottom: 2.5px solid currentColor; margin: 0 .07em; vertical-align: baseline; opacity: .7; }
.field { width: 100%; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 20px; min-height: 52px; }
.field:focus { border-color: var(--accent); outline: none; }
.accents { display: flex; gap: 6px; flex-wrap: wrap; }
.accents button { min-width: 40px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 19px; font-weight: 600; }
.opt { width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 18px; font-weight: 600; min-height: 56px; }
.opt.right { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.opt.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); opacity: .85; }
.opt[disabled] { cursor: default; }
.verdict { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.verdict.g3 { background: var(--good-soft); color: var(--good); }
.verdict.g2 { background: var(--hint-soft); color: var(--hint-ink); }
.verdict.g1, .verdict.g0 { background: var(--bad-soft); color: var(--bad); }
.verdict .sub { font-weight: 400; color: var(--ink); font-size: 15px; }
.listen { display: flex; gap: 10px; }
.listen .btn { flex: 1; min-height: 72px; font-size: 18px; }
.listen svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rate .btn { flex-direction: column; gap: 2px; padding: 10px 6px; font-size: 15px; }
.sticky-bottom { position: sticky; bottom: 0; z-index: 3; background: var(--bg); box-shadow: 0 -1px 0 var(--line); padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); }

/* ---- sheet ---- */
.sheet-back { position: fixed; inset: 0; background: rgba(12, 8, 4, .5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- games ---- */
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tilew { background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 19px; font-weight: 600; font-family: var(--f-display); min-height: 48px; }
.tilew[disabled] { opacity: .3; }
.answerline { min-height: 64px; border-bottom: 2px solid var(--line); border-top: 2px solid var(--line); padding: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard { min-height: 84px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); padding: 10px; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 600; font-size: 15px; line-height: 1.2; }
.pcard.down { background: var(--accent-soft); color: var(--accent); font-size: 26px; border-color: transparent; }
.pcard.up { border-color: var(--accent); }
.pcard.fr { font-family: var(--f-display); font-size: 17px; }
.pcard.ok { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.pcard .e { font-size: 24px; display: block; }
.bubble { border-radius: 16px; padding: 12px 14px; max-width: 92%; display: flex; flex-direction: column; gap: 6px; }
.bubble.them { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: var(--accent-soft); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble .who { font-family: var(--f-display); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink2); font-weight: 700; }
.bubble .frl { font-family: var(--f-display); font-weight: 600; font-size: 20px; line-height: 1.2; }
.bubble.blur .frl { filter: blur(6px); user-select: none; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.cell { min-width: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.numgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.numgrid button { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 60px; }
.numgrid b { font-family: var(--f-display); font-size: 22px; }
.numgrid span { font-size: 12px; color: var(--ink2); }
.cal { display: flex; gap: 5px; }
.cal i { flex: 1; height: 28px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--line); display: block; }
.cal i.on { background: var(--good); border-color: var(--good); }
.cal i.part { background: var(--good-soft); border-color: var(--good); }
.cal-lab { display: flex; gap: 5px; font-size: 11px; color: var(--ink2); }
.cal-lab span { flex: 1; text-align: center; }
textarea.field { font-size: 16px; min-height: 90px; font-family: ui-monospace, Menlo, monospace; }
.note { font-size: 15px; color: var(--ink2); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.kv:first-child { border-top: 0; }
@media (min-width: 700px) { .main { padding-block-start: 20px; } }

/* ---- search, grammar ---- */
.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--ink2); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.searchbox .field { padding-left: 44px; font-size: 17px; }
.lesson-p { font-size: 17px; line-height: 1.5; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.gtable { border-collapse: collapse; width: 100%; font-size: 16px; }
.gtable th, .gtable td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gtable thead th { background: var(--surface2); font-family: var(--f-display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.gtable tbody th { font-weight: 600; color: var(--ink2); }
.gtable tr:last-child th, .gtable tr:last-child td { border-bottom: 0; }
.sentence { font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1.3; overflow-wrap: anywhere; }
.gap { display: inline-block; min-width: 3.2em; text-align: center; border-bottom: 3px solid var(--accent); margin: 0 .15em; padding: 0 .2em; color: var(--accent); }
.gap.ok { color: var(--good); border-color: var(--good); }
.gap.no { color: var(--bad); border-color: var(--bad); }

/* ---- crossword ---- */
.cw-wrap { display: flex; justify-content: center; }
.cw-grid { display: grid; gap: 3px; width: 100%; }
.cw-cell, .cw-empty { aspect-ratio: 1; min-width: 0; }
.cw-cell { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: clamp(14px, 4.4vw, 22px); text-transform: uppercase; }
.cw-cell.act { border-color: var(--accent); background: var(--accent-soft); }
.cw-cell.ok { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.cw-n { position: absolute; top: 1px; left: 3px; font-size: 10px; font-weight: 600; color: var(--ink2); line-height: 1; }
.phrase-row.cw-active { background: var(--accent-soft); border-radius: 10px; }

/* ---- wordle ---- */
.wd-board { display: grid; gap: 6px; justify-content: center; }
.wd-row { display: grid; grid-template-columns: repeat(5, 54px); gap: 6px; }
.wd-tile { height: 54px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); font-family: var(--f-display); font-weight: 700; font-size: 28px; }
.wd-tile.typed { border-color: var(--ink2); }
.wd-tile.ghost { color: var(--ink2); opacity: .5; }
.wd-tile.correct { background: var(--good); border-color: var(--good); color: #fff; }
.wd-tile.present { background: var(--hint); border-color: var(--hint); color: #2A1E00; }
.wd-tile.absent { background: var(--ink2); border-color: var(--ink2); color: var(--surface); opacity: .75; }
.wd-kb { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.wd-krow { display: flex; gap: 5px; justify-content: center; width: 100%; }
.wd-key { flex: 1; max-width: 38px; min-width: 0; height: 48px; border-radius: 8px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 16px; padding: 0; }
.wd-key.wide { max-width: 56px; flex: 1.5; }
.wd-key.correct { background: var(--good); color: #fff; box-shadow: none; }
.wd-key.present { background: var(--hint); color: #2A1E00; box-shadow: none; }
.wd-key.absent { background: var(--ink2); color: var(--surface); opacity: .6; box-shadow: none; }
@media (max-width: 380px) { .wd-row { grid-template-columns: repeat(5, 48px); } .wd-tile { height: 48px; } }

/* ---- year grammar course ---- */
.subnav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 15px; color: var(--ink2); min-height: 40px; }
.subnav button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ======================================================================
   Design v2: a language app with a face. Rounded UI type (Rubik), Italian on road-sign plates (Barlow),
   a pizza-slice mascot, passport stamps, glass bars, 3D buttons, small celebrations.
   ====================================================================== */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 360px at 95% -4%, rgba(255, 200, 61, .26), transparent 62%),
    radial-gradient(520px 420px at -12% 28%, rgba(0, 166, 81, .2), transparent 62%),
    radial-gradient(560px 460px at 112% 86%, rgba(229, 48, 63, .14), transparent 62%);
}
.h1, .h2, .brand, .prompt, .bullet, .tile .t, .eyebrow { font-family: var(--f-ui); }
.h1 { font-weight: 700; letter-spacing: -.015em; font-size: 31px; }
.h2 { font-weight: 600; letter-spacing: -.01em; font-size: 20px; }
.eyebrow { font-weight: 500; font-size: 12px; letter-spacing: .11em; }
.prompt { font-weight: 600; letter-spacing: -.01em; }

/* glass bars */
.top { background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border-bottom: 1px solid var(--glass-line); }
.brand { font-weight: 700; font-size: 19px; letter-spacing: -.01em; gap: 8px; }
.brand .art { width: 32px; height: 32px; margin-top: -2px; filter: drop-shadow(0 2px 0 rgba(60, 38, 16, .15)); }
.nav { left: 12px; right: 12px; max-width: 536px; margin-inline: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-bottom: 0; border: 1px solid var(--glass-line); border-radius: 26px;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7); box-shadow: 0 12px 32px rgba(46, 30, 14, .18); }
.nav .wrap { padding-inline: 6px; }
.nav button { font-family: var(--f-ui); font-weight: 500; font-size: 11.5px; border-radius: 20px; transition: background .2s, color .2s, transform .15s; }
.nav button:active { transform: scale(.94); }
.nav button[aria-current="page"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--accent-deep); animation: pop .35s both; }
.nav button[aria-current="page"] svg { stroke-width: 2.2; }
.main { padding-block: 10px 124px; }
.toast { background: rgba(46, 30, 14, .86); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.sheet-back { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet { border-radius: 26px 26px 0 0; }

/* surfaces and 3D buttons */
.card { border-radius: 22px; border-color: transparent; box-shadow: 0 1px 0 rgba(46, 30, 14, .04), 0 10px 28px rgba(46, 30, 14, .08); }
.card.flat { border: 1px solid var(--line); box-shadow: none; }
.btn { font-family: var(--f-ui); font-weight: 500; border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 3px 0 var(--line); transition: transform .08s, box-shadow .08s, background .15s; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.btn.primary { box-shadow: 0 4px 0 var(--accent-deep); }
.btn.primary:active { box-shadow: 0 1px 0 var(--accent-deep); transform: translateY(3px); }
.btn.light { background: #fff; color: #006534; border-color: #fff; box-shadow: 0 4px 0 rgba(10, 30, 90, .38); }
.btn.ghost, .btn.small.ghost { box-shadow: none; border-color: transparent; }
.btn.ghost:active { transform: none; }
.btn.danger { box-shadow: 0 3px 0 var(--bad-soft); }
.btn.small { box-shadow: 0 2px 0 var(--line); }
.btn.small.primary { box-shadow: 0 3px 0 var(--accent-deep); }
.btn[disabled] { box-shadow: none; }
.icon-btn { box-shadow: 0 2px 0 var(--line); }
.chip { font-family: var(--f-ui); font-weight: 500; }
.seg { border-radius: 16px; background: var(--surface2); border-color: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { font-family: var(--f-ui); font-weight: 500; border-radius: 12px; }
.seg button[aria-pressed="true"] { box-shadow: 0 2px 6px rgba(46, 30, 14, .16); }
.field { border-radius: 16px; }
.opt { font-family: var(--f-ui); font-weight: 500; border-radius: 18px; box-shadow: 0 3px 0 var(--line); transition: transform .08s, box-shadow .08s; }
.opt:not([disabled]):active { transform: translateY(3px); box-shadow: none; }
.opt.right { box-shadow: 0 3px 0 var(--good); animation: pop .4s both; }
.opt.wrong { box-shadow: 0 3px 0 var(--bad); animation: shake .4s both; }
.tilew { border-radius: 14px; box-shadow: 0 3px 0 var(--line); }

/* the plate lands like a freshly screwed enamel sign */
.plate.enter { animation: plateIn .45s cubic-bezier(.2, 1.3, .4, 1) both; }

/* ---- Today ---- */
.hello { align-items: flex-end; }
.hello .h1 { font-size: 34px; }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px; background: var(--p-red); color: var(--c-red); font-family: var(--f-ui); font-weight: 600; font-size: 14px; }
.streak .art { width: 22px; height: 22px; animation: wiggle 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.streak.off { background: var(--surface2); color: var(--ink2); }
.streak.off .art { filter: grayscale(1) opacity(.5); animation: none; }
.hero { position: relative; overflow: hidden; border-radius: 28px; color: #fff; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); box-shadow: 0 16px 36px rgba(0, 120, 60, .34); }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(200px 150px at 88% 8%, rgba(255, 255, 255, .24), transparent 70%), radial-gradient(180px 180px at 4% 112%, rgba(255, 200, 61, .32), transparent 70%); }
.hero::after { content: ''; position: absolute; right: -40px; bottom: -46px; width: 170px; height: 170px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .28); pointer-events: none; }
.airmail { height: 9px; background: linear-gradient(90deg, #009246 0 33.3%, #F4F5F0 33.3% 66.6%, #CE2B37 66.6% 100%); }
.hero-body { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; padding: 18px 16px 18px 20px; align-items: end; }
.hero-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hero .eyebrow { color: rgba(255, 255, 255, .82); }
.hero .h1 { color: #fff; font-size: 36px; }
.hero .muted { color: rgba(255, 255, 255, .8); }
.hero .chip { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .38); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-art { position: relative; align-self: end; padding-top: 22px; }
.hero-art .mascot { display: block; width: 112px; height: auto; animation: floaty 3.4s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0, 45, 22, .3)); }
.say { position: absolute; right: 6px; top: -4px; background: #fff; color: var(--c-face); font-family: var(--f-ui); font-weight: 600; font-size: 13px; padding: 6px 11px; border-radius: 14px 14px 4px 14px; box-shadow: 0 6px 14px rgba(0, 45, 22, .25); animation: floaty 3.4s ease-in-out -1s infinite; white-space: nowrap; }
.hero-cta { grid-column: 1 / -1; }
.pool-bar { height: 14px; border-radius: 999px; border: 0; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); }
.pool-bar > i { transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* colourful tiles with a small illustration */
.tile { position: relative; overflow: hidden; border: 0; border-radius: 24px; background: var(--p-sky); box-shadow: 0 4px 0 rgba(46, 30, 14, .09), 0 10px 24px rgba(46, 30, 14, .07); transition: transform .12s, box-shadow .12s; padding: 14px; min-height: 140px; }
.tile:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(46, 30, 14, .09); }
.tile .art { position: absolute; right: -6px; bottom: -8px; width: 74px; height: 74px; transition: transform .3s cubic-bezier(.2, 1.4, .4, 1); transform-origin: 60% 60%; }
.tile:hover .art { transform: rotate(-7deg) scale(1.08); }
.tile .t { font-weight: 600; font-size: 18px; letter-spacing: -.01em; max-width: 78%; }
.tile .muted { max-width: 62%; color: color-mix(in srgb, var(--ink) 62%, transparent); }
.tile.c-mint { background: var(--p-mint); } .tile.c-sun { background: var(--p-sun); } .tile.c-rose { background: var(--p-rose); } .tile.c-lav { background: var(--p-lav); } .tile.c-red { background: var(--p-red); }
.tile.sm { min-height: 96px; padding: 12px; } .tile.sm .art { width: 62px; height: 62px; }
.tile.sm .t { font-size: 16px; }

/* ---- Course: the journey line ---- */
.trip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 24px; background: linear-gradient(120deg, var(--p-sun), var(--p-rose)); position: relative; overflow: hidden; }
.trip .art { width: 70px; height: 70px; flex: none; transform: rotate(-6deg); }
.trip::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 22px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 14px); pointer-events: none; }
.journey { position: relative; display: flex; flex-direction: column; gap: 12px; }
.journey::before { content: ''; position: absolute; left: 24px; top: 26px; bottom: 26px; width: 6px; border-radius: 3px; background: repeating-linear-gradient(to bottom, var(--line) 0 9px, transparent 9px 15px); }
.journey .fill { position: absolute; left: 24px; top: 26px; width: 6px; border-radius: 3px; background: linear-gradient(var(--c-green), var(--c-sky)); height: var(--prog, 0%); max-height: calc(100% - 52px); transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.station { position: relative; display: flex; align-items: center; gap: 12px; }
.station .bullet { width: 54px; height: 54px; font-size: 22px; z-index: 1; border: 3px solid var(--surface); background: var(--surface); box-shadow: 0 0 0 3px var(--line), 0 4px 10px rgba(46, 30, 14, .12); color: var(--ink2); }
.station .bullet.now { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent), 0 4px 10px rgba(0, 120, 60, .35); animation: ring 2.2s ease-out infinite; }
.station .bullet.done { background: var(--c-green); color: #fff; box-shadow: 0 0 0 3px var(--c-green), 0 4px 10px rgba(45, 179, 122, .35); }
.station .day { flex: 1; min-width: 0; border: 0; border-radius: 22px; box-shadow: 0 1px 0 rgba(46, 30, 14, .04), 0 8px 22px rgba(46, 30, 14, .07); transition: transform .12s; }
.station .day:active { transform: scale(.985); }
.day .ico { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 25px; flex: none; background: var(--p-sky); }
.station:nth-child(4n+2) .ico { background: var(--p-mint); } .station:nth-child(4n+3) .ico { background: var(--p-sun); } .station:nth-child(4n+4) .ico { background: var(--p-rose); }
.day .t { font-family: var(--f-ui); font-weight: 600; font-size: 16px; letter-spacing: -.005em; }
.bullet { font-weight: 700; }

/* ---- Words: topic tiles ---- */
.ttiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ttile { border: 0; border-radius: 22px; padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 6px; min-height: 118px; background: var(--p-sky); box-shadow: 0 4px 0 rgba(46, 30, 14, .08); transition: transform .12s; }
.ttile:active { transform: translateY(3px); box-shadow: none; }
.ttile:nth-child(5n+2) { background: var(--p-mint); } .ttile:nth-child(5n+3) { background: var(--p-sun); } .ttile:nth-child(5n+4) { background: var(--p-rose); } .ttile:nth-child(5n+5) { background: var(--p-lav); }
.ttile .em { font-size: 30px; line-height: 1; }
.ttile .nm { font-family: var(--f-ui); font-weight: 600; font-size: 14.5px; line-height: 1.2; letter-spacing: -.005em; }
.ttile .bar { height: 7px; background: rgba(255, 255, 255, .6); box-shadow: none; margin-top: auto; }

/* ---- Me: passport ---- */
.passport { border-radius: 26px; padding: 16px; color: #fff; background: linear-gradient(160deg, var(--pass-a), var(--pass-b)); box-shadow: 0 14px 30px rgba(110, 26, 45, .32); position: relative; overflow: hidden; }
.passport::before { content: ''; position: absolute; inset: 8px; border-radius: 20px; border: 1.5px solid rgba(255, 255, 255, .28); pointer-events: none; }
.passport .cover { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 12px; }
.passport .cover b { font-family: var(--f-ui); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.passport .count { font-family: var(--f-ui); font-weight: 700; font-size: 26px; }
.stamps { background: var(--surface); border-radius: 18px; padding: 12px 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; justify-items: center; color: var(--ink); position: relative; }
.stamp { width: 72px; height: 72px; }
.stamp.on { animation: stampIn .55s cubic-bezier(.2, 1.3, .4, 1) both; mix-blend-mode: multiply; }
:root[data-theme="dark"] .stamp.on { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp.on { mix-blend-mode: normal; } }
.stamp-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; text-align: center; color: var(--ink2); line-height: 1.15; }

/* ---- sessions: the mascot asks ---- */
.s-top { background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); margin-inline: -16px; padding-inline: 16px; }
.meter { height: 12px; background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); border: 0; }
.meter i { background: linear-gradient(90deg, var(--c-green), var(--c-sky)); border-radius: 999px; position: relative; overflow: hidden; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.meter i::after { content: ''; position: absolute; inset: 2px 6px auto 6px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .5); }
.combo { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--p-red); color: var(--c-red); font-family: var(--f-ui); font-weight: 600; font-size: 13px; animation: pop .35s both; }
.combo .art { width: 18px; height: 18px; animation: wiggle 1.2s ease-in-out infinite; }
.ask { display: flex; gap: 8px; align-items: flex-end; }
.ask .mascot { flex: none; width: 78px; height: auto; animation: floaty 3.2s ease-in-out infinite; }
.ask.cheer .mascot { animation: hop .6s ease-out; }
.ask.think .mascot { animation: tilt .5s ease-out; }
.ask .speech { position: relative; flex: 1; min-width: 0; background: var(--surface); border-radius: 24px 24px 24px 6px; padding: 14px 16px; box-shadow: 0 3px 0 var(--line), 0 10px 24px rgba(46, 30, 14, .07); }
.speech .prompt { font-size: 25px; line-height: 1.18; }
.verdict { border-radius: 18px; }
.verdict.g3 { animation: pop .45s both; }
.verdict.g0, .verdict.g1 { animation: shake .45s both; }
.bigstamp { display: grid; place-items: center; padding: 6px 0; }
.bigstamp svg { width: 168px; height: 168px; animation: stampDown .7s cubic-bezier(.2, 1.2, .4, 1) both; filter: drop-shadow(0 6px 8px rgba(46, 30, 14, .15)); }
.summary-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.summary-head .mascot { width: 88px; height: auto; animation: hop .8s ease-out; }

/* ---- games and grammar ---- */
.pcard { border-radius: 16px; box-shadow: 0 3px 0 var(--line); }
.pcard.flip { animation: flipin .38s ease-out both; }
.pcard.ok { box-shadow: 0 3px 0 var(--good); }
.pcard.pop { animation: pop .45s both; }
.pcard.down { background: linear-gradient(135deg, var(--accent-soft), var(--p-lav)); }
.wd-tile { border-radius: 10px; }
.wd-tile.rev { animation: flipin .5s both; }
.cw-cell.ok { animation: pop .35s both; }
.gap { border-radius: 4px; }
.subnav button { font-family: var(--f-ui); font-weight: 500; box-shadow: 0 2px 0 var(--line); }
.subnav button[aria-selected="true"] { box-shadow: 0 3px 0 var(--accent-deep); }
.gstage { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--f-ui); font-weight: 700; font-size: 15px; flex: none; }
.gstage.A1 { background: var(--p-mint); color: var(--c-green); } .gstage.A2 { background: var(--p-sky); color: #1478A8; }
.gstage.B1 { background: var(--p-lav); color: var(--c-lav); } .gstage.B2 { background: var(--p-rose); color: #D2467F; }

/* ---- confetti ---- */
.confetti { position: fixed; left: 50%; top: 40%; width: 0; height: 0; z-index: 300; pointer-events: none; }
.confetti i { position: absolute; width: 8px; height: 13px; border-radius: 2px; animation: confetti 1.05s cubic-bezier(.15, .75, .3, 1) forwards; }

/* ---- motion ---- */
.main.enter > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.main.enter > *:nth-child(2) { animation-delay: .04s; } .main.enter > *:nth-child(3) { animation-delay: .08s; } .main.enter > *:nth-child(4) { animation-delay: .12s; }
.main.enter > *:nth-child(5) { animation-delay: .16s; } .main.enter > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.86); opacity: .4; } 55% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 25% { transform: translateY(-16px) scale(.96, 1.06); } 50% { transform: translateY(0) scale(1.06, .94); } 70% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
@keyframes tilt { 0% { transform: rotate(0); } 40% { transform: rotate(-9deg); } 100% { transform: rotate(-3deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.1); } }
@keyframes ring { 0% { box-shadow: 0 0 0 3px var(--accent), 0 0 0 3px rgba(0, 120, 60, .5); } 70% { box-shadow: 0 0 0 3px var(--accent), 0 0 0 14px rgba(0, 120, 60, 0); } 100% { box-shadow: 0 0 0 3px var(--accent), 0 0 0 14px rgba(0, 120, 60, 0); } }
@keyframes plateIn { 0% { transform: scale(1.12) rotate(-2deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes stampIn { 0% { transform: scale(1.7) rotate(-14deg); opacity: 0; } 60% { transform: scale(.94) rotate(2deg); opacity: 1; } 100% { transform: scale(1); } }
@keyframes stampDown { 0% { transform: scale(2.6) rotate(-24deg); opacity: 0; } 55% { transform: scale(.92) rotate(-6deg); opacity: 1; } 75% { transform: scale(1.04) rotate(-9deg); } 100% { transform: scale(1) rotate(-8deg); } }
@keyframes flipin { 0% { transform: rotateX(90deg); opacity: .2; } 100% { transform: rotateX(0); opacity: 1; } }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0) scale(.5); opacity: 1; } 65% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 170px)) rotate(var(--r)) scale(1); opacity: 0; } }
