/* ============================================================
   Fiszko — design tokens & components (FRONTEND_DESIGN §1)
   ============================================================ */
:root {
  --bg: #faf6ee;
  --surface: #ffffff;
  --surface-2: #f2ede2;
  --fg: #22252c;
  --muted: #6b7280;
  --border: #e4ddcd;
  --accent: #4f46e5;
  --teal: #0d9488;
  --violet: #7c4dff;
  --success: #16a34a;
  --error: #dc2626;
  --warning: #f59e0b;
  --radius: 20px;
  --shadow: 0 2px 10px rgba(40, 30, 10, 0.07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.dark {
  --bg: #16181d;
  --surface: #1f2229;
  --surface-2: #262a33;
  --fg: #e8e9ed;
  --muted: #9aa1ad;
  --border: #343a46;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  color: var(--fg);
  background: var(--bg);
  padding: 0.6rem 0.8rem 4rem;
  max-width: 760px;
  margin-inline: auto;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0.7rem 0 0.4rem; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.08rem; }
h4 { font-size: 0.95rem; }
p { margin: 0.35rem 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- chrome ---------- */
.chrome {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 0.45rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  padding: 0.45rem 0.1rem; margin-bottom: 0.4rem;
}
.home-btn {
  font-size: 1.5rem; background: none; border: none; cursor: pointer;
  padding: 0.15rem 0.35rem; border-radius: 12px;
}
.app-name { font-weight: 900; letter-spacing: 0.5px; font-size: 1.15rem; }
.grow { flex: 1; }
.chip-btn {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 0.25rem 0.6rem; cursor: pointer;
  box-shadow: var(--shadow); font-size: 0.92rem;
}
.version-tag {
  position: fixed; bottom: 4px; right: 8px; font-size: 10px;
  color: var(--muted); opacity: 0.6;
}

/* ---------- generic ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.btn {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 14px; padding: 0.6rem 1rem; cursor: pointer;
  font-weight: 600; box-shadow: var(--shadow); min-height: 44px;
  transition: transform 0.06s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: var(--error); border-color: var(--error); color: #fff; }
.btn.ghost { box-shadow: none; }
.btn.big { font-size: 1.1rem; padding: 0.8rem 1.3rem; }
.btn.round { border-radius: 999px; }
.btn-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; justify-content: center; }
.btn-row .btn { flex: 1; max-width: 260px; }
.linklike { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.note {
  background: var(--surface-2); border-radius: 14px; padding: 0.6rem 0.8rem;
  font-size: 0.9rem; margin: 0.5rem 0;
}
.note.warn { border: 1px solid var(--warning); }
.crumbs { display: flex; gap: 0.45rem; align-items: baseline; font-size: 0.92rem; flex-wrap: wrap; }

/* ---------- home ---------- */
.hello { margin-top: 0.4rem; }
.home-grid { display: grid; gap: 0.7rem; margin-top: 0.8rem; }
.continue-card, .today-card, .review-pool {
  display: flex; align-items: center; gap: 0.7rem; width: 100%;
  text-align: left; cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius);
  padding: 0.85rem 1rem; box-shadow: var(--shadow);
}
.continue-card { border-left: 6px solid var(--warning); }
.today-card { border-left: 6px solid var(--teal); }
.today-num {
  font-size: 1.6rem; font-weight: 900; min-width: 2.4rem; text-align: center;
  background: var(--surface-2); border-radius: 12px; padding: 0.1rem 0.4rem;
}
.cc-go { margin-left: auto; color: var(--muted); font-size: 1.3rem; }
.course-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
@media (max-width: 520px) { .course-row { grid-template-columns: 1fr; } }
.course-card {
  display: flex; align-items: center; gap: 0.6rem; text-align: left; cursor: pointer;
  border: 2px solid transparent; border-radius: var(--radius); padding: 0.9rem;
  box-shadow: var(--shadow); color: var(--fg);
}
.course-card[data-accent="teal"] { background: color-mix(in srgb, var(--teal) 12%, var(--surface)); border-color: color-mix(in srgb, var(--teal) 40%, var(--border)); }
.course-card[data-accent="violet"] { background: color-mix(in srgb, var(--violet) 12%, var(--surface)); border-color: color-mix(in srgb, var(--violet) 40%, var(--border)); }
.cc-letter {
  font-size: 1.5rem; font-weight: 900; background: var(--surface);
  border-radius: 14px; padding: 0.3rem 0.55rem; box-shadow: var(--shadow);
}
.course-card[data-accent="teal"] .cc-letter { color: var(--teal); }
.course-card[data-accent="violet"] .cc-letter { color: var(--violet); }
.cc-body { flex: 1; }
.cc-name { font-weight: 800; }
.quick-links { display: flex; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }
.ring text { font-weight: 800; fill: var(--fg); }
.ring { display: block; }

/* ---------- course screen ---------- */
.unit-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.5rem 0.4rem 0.2rem; margin: 0.55rem 0;
}
.unit-main {
  display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0;
  background: none; border: none; cursor: pointer; text-align: left; padding: 0.45rem;
}
.unit-badge {
  font-weight: 900; background: var(--surface-2); min-width: 2.1rem; height: 2.1rem;
  border-radius: 12px; display: grid; place-items: center; font-size: 1.05rem; flex: none;
}
.unit-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.grammar-chips { display: flex; gap: 4px; flex-wrap: wrap; max-height: 2.5em; overflow: hidden; }
.gchip {
  font-size: 0.72rem; background: var(--surface-2); border-radius: 999px;
  padding: 1px 8px; color: var(--muted); white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.unit-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; flex: none; }
.mini {
  border: 1px solid var(--border); background: var(--surface); border-radius: 12px;
  width: 44px; height: 36px; cursor: pointer; font-size: 1.05rem; box-shadow: var(--shadow);
}

/* ---------- unit / lesson ---------- */
.grammar-topics { display: flex; gap: 5px; flex-wrap: wrap; align-items: baseline; margin: 0.4rem 0; }
.grammar-topics .gchip { font-size: 0.8rem; padding: 3px 10px; }
.mode-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem; margin: 0.7rem 0;
}
.mode-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 0.8rem 0.9rem; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
  text-align: left; color: var(--fg);
}
.mode-btn.disabled { opacity: 0.45; }
.m-ico { font-size: 1.4rem; }
.lesson-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; margin: 0.5rem 0; cursor: pointer; text-align: left; width: 100%; }
.lesson-id {
  font-weight: 900; color: var(--accent); background: var(--surface-2);
  border-radius: 10px; padding: 0.2rem 0.5rem;
}
.lesson-info { display: flex; flex-direction: column; min-width: 0; }
.term-preview { display: flex; gap: 4px; flex-wrap: wrap; }
.tchip { font-size: 0.75rem; background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.term-list { display: flex; gap: 6px; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; }
.term-chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 0.35rem 0.8rem; cursor: pointer; box-shadow: var(--shadow);
}
.term-chip:active { background: var(--surface-2); }
.task-list { display: flex; flex-direction: column; gap: 6px; }
.task-row {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.45rem 0.7rem; font-size: 0.92rem;
}
.task-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-none { background: var(--border); }
.dot-seen { background: var(--warning); }
.dot-clean { background: var(--success); }

/* ---------- today ---------- */
.due-list { padding: 0.3rem 0.7rem; margin: 0.6rem 0; }
.due-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.2rem; border-bottom: 1px solid var(--border); }
.due-row:last-child { border-bottom: none; }
.course-tag { font-size: 0.72rem; font-weight: 800; background: var(--surface-2); padding: 1px 7px; border-radius: 999px; }
.due-en { font-weight: 700; }
.due-pl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.box { font-size: 0.72rem; font-weight: 800; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); }
.box.b4 { color: var(--success); } .box.b5 { color: var(--accent); }
.today-empty, .summary { text-align: center; padding-top: 1.2rem; }
.summary-owl { font-size: 3rem; }
.big-stat { font-size: 2.2rem; font-weight: 900; }

/* ---------- player ---------- */
.player { display: flex; flex-direction: column; min-height: 70vh; }
.player-top { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.roundbtn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 1.1rem; box-shadow: var(--shadow);
}
.roundbtn.pulse { animation: pulse 0.6s ease; }
@keyframes pulse { 40% { transform: scale(1.15); } }
.xp-chip { margin-left: auto; font-weight: 800; color: var(--warning); }
.combo { font-weight: 900; color: var(--warning); }
.combo.hot { animation: pulse 0.5s infinite; }
.timer { font-weight: 900; font-variant-numeric: tabular-nums; }
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0.8rem 0.2rem; }
.player-bottom { padding-bottom: 1.2rem; }
.ask { color: var(--muted); text-align: center; margin: 0.2rem 0 0.6rem; }

/* flashcard */
.flashcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow); padding: 1.2rem; text-align: center; max-width: 480px;
  margin: 0 auto; width: 100%;
}
.flashcard.clickable { cursor: pointer; }
.flashcard.flipped { border-color: var(--accent); }
.card-img { max-height: 36vh; border-radius: 16px; margin-bottom: 0.5rem; background: var(--surface-2); }
.card-en { font-size: 1.7rem; font-weight: 800; }
.card-pl { font-size: 1.25rem; color: var(--muted); margin-top: 0.2rem; }
.card-hint { font-size: 0.85rem; font-style: italic; color: var(--muted); margin-top: 0.25rem; }
.card-audio { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.6rem; }

/* options / pills */
.options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem;
  max-width: 520px; margin: 0.9rem auto 0;
}
.pill {
  border: 2px solid var(--border); background: var(--surface); border-radius: 16px;
  padding: 0.65rem 0.8rem; cursor: pointer; font-weight: 600; box-shadow: var(--shadow);
  min-height: 48px; transition: transform 0.05s ease;
}
.pill:active { transform: scale(0.98); }
.pill.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pill.ok, .pill.correct-answer { border-color: var(--success); background: color-mix(in srgb, var(--success) 14%, var(--surface)); }
.pill.bad { border-color: var(--error); background: color-mix(in srgb, var(--error) 10%, var(--surface)); animation: shake 0.35s ease; }
.pill.correct-answer { animation: none; }
.pill:disabled { cursor: default; opacity: 0.85; }
.pill.letter { min-width: 44px; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* typing */
.type-input, .gap-input {
  font: inherit; padding: 0.55rem 0.75rem; border-radius: 12px;
  border: 2px solid var(--border); background: var(--surface); color: var(--fg);
  min-width: 0; max-width: 100%;
}
.type-input { width: min(340px, 90%); text-align: center; font-size: 1.15rem; }
.gap-input { width: 9ch; }
.prompt-pl { display: flex; gap: 0.5rem; align-items: center; justify-content: center; margin-bottom: 0.7rem; font-size: 1.35rem; font-weight: 700; }
.feedback { min-height: 1.4rem; text-align: center; font-weight: 700; }
.feedback.show.good { color: var(--success); }
.feedback.show.warn { color: var(--warning); }
.feedback.reveal { color: var(--accent); }

/* pairs */
.pair-board { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; max-width: 560px; margin: 0 auto; width: 100%; }
.pair-col { display: flex; flex-direction: column; gap: 0.45rem; }
.pair {
  border: 2px solid var(--border); background: var(--surface); border-radius: 14px;
  padding: 0.55rem 0.7rem; cursor: pointer; box-shadow: var(--shadow); text-align: left;
}
.pair.sel { border-color: var(--accent); }
.pair.matched { border-color: var(--success); opacity: 0.5; cursor: default; }
.pair.bad { border-color: var(--error); animation: shake 0.35s ease; }

/* V5 image options */
.img-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; max-width: 520px; margin: 0.8rem auto 0; }
.img-option {
  padding: 0.35rem; border-radius: 18px; border: 3px solid var(--border);
  background: var(--surface); cursor: pointer;
}
.img-option img { border-radius: 12px; display: block; aspect-ratio: 1; object-fit: contain; background: var(--surface-2); }
.img-option.ok { border-color: var(--success); }
.img-option.bad { border-color: var(--error); animation: shake 0.35s ease; }
.img-option.correct-answer { border-color: var(--success); }
.prompt-audio { display: flex; gap: 0.6rem; align-items: center; justify-content: center; }
.blitz-card {
  font-size: 1.6rem; font-weight: 800; text-align: center; background: var(--surface);
  border-radius: 18px; padding: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow);
}

/* ---------- task player ---------- */
.taskplayer .stage { justify-content: flex-start; }
.task-head { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.5rem 0; }
.task-ico { font-size: 1.6rem; }
.task-title { font-weight: 800; }
.instruction { color: var(--muted); font-size: 0.95rem; }
.badge {
  font-size: 0.75rem; background: var(--surface-2); padding: 2px 9px; border-radius: 999px;
  color: var(--muted); white-space: nowrap;
}
.badge.okb { color: var(--success); }
.taskview { width: 100%; }
.rows { display: flex; flex-direction: column; gap: 0.5rem; }
.item-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem;
  background: var(--surface); border: 2px solid var(--border); border-radius: 14px;
  padding: 0.55rem 0.7rem;
}
.item-row.plain { border-style: dashed; }
.item-row.example { opacity: 0.65; }
.item-row.ok { border-color: var(--success); background: color-mix(in srgb, var(--success) 7%, var(--surface)); }
.item-row.bad { border-color: var(--error); background: color-mix(in srgb, var(--error) 7%, var(--surface)); }
.item-n { font-weight: 800; color: var(--muted); min-width: 1.4rem; }
.sentence[lang] { hyphens: none; }
.answer-chip {
  background: var(--surface-2); border: 1px dashed var(--accent); color: var(--accent);
  padding: 1px 9px; border-radius: 999px; font-weight: 700;
}
.pill-row { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; width: 100%; }
.pill-row .sentence { width: 100%; }
.bank {
  display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0.55rem;
  background: var(--surface-2); border-radius: 16px; margin: 0.5rem 0;
  border: 1px dashed var(--border);
}
.chip {
  border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 0.3rem 0.75rem; cursor: pointer; box-shadow: var(--shadow); font-weight: 600;
}
.chip.gone { opacity: 0.25; text-decoration: line-through; }
.chip.chip-word.placed { border-color: var(--accent); }
.chip-pool, .build-zone { display: flex; gap: 0.35rem; flex-wrap: wrap; width: 100%; }
.build-zone {
  min-height: 46px; border: 2px dashed var(--border); border-radius: 12px; padding: 4px 6px;
  align-items: center;
}
.match-box { display: flex; flex-direction: column; gap: 0.25rem; }
.match-box-item { display: flex; gap: 0.5rem; align-items: center; }
.grid-img { max-height: 84px; border-radius: 10px; cursor: zoom-in; }
.img-strip { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.4rem 0; }
.task-img { max-height: 190px; border-radius: 12px; border: 1px solid var(--border); cursor: zoom-in; background: #fff; }
.item-img { max-height: 64px; border-radius: 8px; cursor: zoom-in; background: #fff; }
.zoom {
  position: fixed; inset: 0; background: rgba(10, 10, 14, 0.88); z-index: 80;
  display: grid; place-items: center; padding: 1rem; cursor: zoom-out;
}
.zoom img { max-height: 95vh; max-width: 95vw; border-radius: 10px; background: #fff; }
.fold { margin: 0.45rem 0; }
.fold summary { cursor: pointer; color: var(--muted); font-size: 0.92rem; }
.passage {
  background: var(--surface-2); border-radius: 14px; padding: 0.6rem 0.8rem; margin-top: 0.3rem;
  font-size: 0.98rem;
}
.pline { margin-bottom: 0.25rem; white-space: pre-line; }
.audiobar { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.4rem 0 0.6rem; }
.key-block {
  border: 2px dashed var(--accent); border-radius: 16px; padding: 0.5rem 0.9rem; margin-top: 0.7rem;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}
.key-block ul { margin: 0.3rem 0; padding-left: 1.2rem; }
.recap-list { text-align: left; max-width: 460px; margin: 0.8rem auto; display: flex; flex-direction: column; gap: 4px; }
.recap-row { display: flex; gap: 0.5rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.3rem 0.6rem; }
.recap-name { flex: 1; font-size: 0.92rem; }
.chipres { font-weight: 800; font-size: 0.85rem; border-radius: 999px; padding: 1px 9px; background: var(--surface-2); }
.chipres.ok { color: var(--success); } .chipres.warn { color: var(--warning); } .chipres.self { color: var(--muted); }

/* ---------- profile ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.55rem; margin: 0.6rem 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0.6rem 0.8rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat b { font-size: 1.35rem; }
.stat span { color: var(--muted); font-size: 0.85rem; }
.heat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 320px; margin: 0.4rem 0 0.7rem; }
.heat { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }
.heat.on { background: var(--success); border-color: var(--success); }
.heat.today { outline: 2px solid var(--accent); }
.boxes { max-width: 420px; display: flex; flex-direction: column; gap: 5px; margin: 0.4rem 0; }
.boxbar { display: flex; align-items: center; gap: 0.5rem; }
.boxbar-n { min-width: 2rem; font-weight: 800; }
.boxbar-track { flex: 1; height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.boxbar-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--violet)); }
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; margin: 0.5rem 0; }
.badge-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 0.6rem; text-align: center; opacity: 0.45; filter: grayscale(1);
}
.badge-card.earned { opacity: 1; filter: none; border-color: var(--warning); box-shadow: var(--shadow); }
.badge-ico { font-size: 1.6rem; display: block; }
.badge-name { font-size: 0.8rem; }
.settings { display: flex; flex-direction: column; gap: 0.5rem; max-width: 420px; }
.switch-row { display: flex; gap: 0.55rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0.55rem 0.8rem; }
.switch-row input { width: 20px; height: 20px; }
.import-area { width: 100%; font: 12px monospace; border-radius: 10px; border: 1px solid var(--border); padding: 6px; }

/* ---------- modal / toast / confetti ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 12, 8, 0.45); z-index: 60;
  display: grid; place-items: center; padding: 1rem;
}
.modal {
  background: var(--surface); border-radius: 20px; padding: 1rem 1.1rem;
  max-width: 440px; width: 100%; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.8rem; }
.toast {
  position: fixed; bottom: 16px; left: 50%; transform: translate(-50%, 20px);
  background: var(--fg); color: var(--bg); border-radius: 14px; padding: 0.6rem 1rem;
  opacity: 0; transition: all 0.3s ease; z-index: 70; max-width: 92vw; font-weight: 600;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti span {
  position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px;
  animation: fall 1.6s ease-in forwards;
}
@keyframes fall {
  to { transform: translate(var(--dx, 0), 105vh) rotate(540deg); opacity: 0.7; }
}

/* ---------- motion / small screens ---------- */
@media (prefers-reduced-motion: reduce) {
  *, .confetti span { animation: none !important; transition: none !important; }
}
.reduce-motion *, .reduce-motion .confetti span { animation: none !important; transition: none !important; }

@media (max-width: 430px) {
  body { font-size: 16px; padding-inline: 0.55rem; }
  .options { grid-template-columns: 1fr; }
  .img-options { grid-template-columns: 1fr 1fr; }
  .card-en { font-size: 1.45rem; }
}
