/* =============================================================
   Marco Casario — Area Formazione · Telegram Mini App v2
   Dark navy + gold + red accents · premium look
   ============================================================= */

:root {
  color-scheme: dark;
  --bg-0: #0a0e1a;
  --bg-1: #121829;
  --bg-2: #1a2238;
  --bg-3: #242e4a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --text-dim: #a8b0c7;
  --text-mute: #6b7693;

  --gold: #e8c158;
  --gold-bright: #f5d47a;
  --gold-dim: #b8902f;
  --gold-glow: rgba(232, 193, 88, 0.25);

  --green: #4ade80;
  --red: #ef4444;
  --red-bright: #f87171;
  --red-glow: rgba(239, 68, 68, 0.25);
  --blue: #60a5fa;
  --orange: #fb923c;
  --purple: #a78bfa;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 8px 24px rgba(232, 193, 88, 0.3);
  --shadow-red: 0 8px 24px rgba(239, 68, 68, 0.3);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  overflow-x: hidden;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(ellipse at top, rgba(232, 193, 88, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at bottom left, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 100%);
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 24px 20px 40px;
  max-width: 480px;
  margin: 0 auto;
  animation: fadeIn 0.35s ease-out;
}

.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@supports (padding-top: env(safe-area-inset-top)) {
  .screen {
    padding-top: calc(24px + env(safe-area-inset-top));
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}

/* =============================================================
   HOME SCREEN
   ============================================================= */

.hero { text-align: center; margin-bottom: 20px; padding-top: 12px; }

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(232, 193, 88, 0.4);
  border-radius: 100px;
  margin-bottom: 18px;
}

.hero-title { margin: 0; display: flex; flex-direction: column; gap: 4px; align-items: center; }

.hero-title .serif {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900; font-size: 40px; line-height: 1;
  background: linear-gradient(135deg, #fff 0%, var(--gold-bright) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em;
  color: var(--text-dim); margin-top: 4px;
}

.hero-tag {
  font-size: 14px; line-height: 1.5; color: var(--text-dim);
  margin: 14px auto 0; max-width: 320px;
}

.hero-tag b { color: var(--gold); font-weight: 700; }

/* --- Rank card --- */
.rank-card {
  padding: 16px;
  background: linear-gradient(135deg, rgba(232,193,88,0.08), rgba(232,193,88,0.02));
  border: 1px solid rgba(232,193,88,0.25);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.rank-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.rank-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mute); font-weight: 600; }
.rank-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px; font-weight: 900; color: var(--gold);
  margin-top: 2px;
}
.rank-xp { font-size: 14px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.rank-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.rank-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  border-radius: 3px;
  transition: width 0.6s ease;
  box-shadow: 0 0 10px var(--gold-glow);
}
.rank-next { font-size: 11px; color: var(--text-mute); margin-top: 6px; }

/* --- Stat grid --- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat-card {
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
}
.stat-label {
  font-size: 10px; font-weight: 600; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}
.stat-value { font-size: 22px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

/* --- Achievements showcase --- */
.ach-showcase {
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.ach-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.ach-counter { color: var(--gold); font-weight: 800; }
.ach-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ach-chip {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  opacity: 0.25;
  transition: all 0.3s;
}
.ach-chip.unlocked {
  opacity: 1;
  background: rgba(232,193,88,0.12);
  border-color: rgba(232,193,88,0.4);
  box-shadow: 0 0 12px rgba(232,193,88,0.2);
}

/* --- Primary buttons --- */
.btn-primary {
  width: 100%; padding: 18px 20px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: #1a1407; border: none; border-radius: var(--radius-md);
  font-family: inherit; font-size: 16px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: var(--shadow-gold);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%);
  opacity: 0; transition: opacity 0.2s;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary > * { position: relative; z-index: 1; }
.btn-arrow { font-size: 18px; }

.btn-ghost {
  width: 100%; margin-top: 10px; padding: 14px;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-ghost:active { background: var(--surface-hover); }

.credits {
  text-align: center; font-size: 11px; color: var(--text-mute);
  margin-top: 20px; letter-spacing: 0.04em;
}

/* =============================================================
   GAME HUD
   ============================================================= */

.hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.hud-lives { display: flex; gap: 2px; font-size: 18px; }
.hud-lives .heart { filter: drop-shadow(0 0 4px rgba(239,68,68,0.4)); transition: all 0.3s; }
.hud-lives .heart.lost {
  filter: grayscale(1);
  opacity: 0.25;
  transform: scale(0.85);
}

.hud-timer {
  position: relative; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}
.timer-ring { transform: rotate(-90deg); display: block; }
.timer-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 4; }
.timer-progress {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
  filter: drop-shadow(0 0 4px var(--gold-glow));
}
.timer-progress.warn { stroke: var(--orange); filter: drop-shadow(0 0 4px rgba(251,146,60,0.5)); }
.timer-progress.danger { stroke: var(--red); filter: drop-shadow(0 0 6px var(--red-glow)); animation: pulseRed 0.5s ease infinite alternate; }
@keyframes pulseRed {
  from { opacity: 1; }
  to { opacity: 0.55; }
}

.timer-num {
  position: absolute;
  font-size: 15px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.hud-streak {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: rgba(251, 146, 60, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.4);
  border-radius: 100px;
  font-size: 12px; font-weight: 800;
  color: var(--orange);
  transition: all 0.2s;
}
.hud-streak.hot {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
  color: var(--red-bright);
  animation: flamePulse 1s ease infinite;
}
@keyframes flamePulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--red-glow); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px transparent; transform: scale(1.04); }
}
.flame { font-size: 12px; }

.hud-score {
  font-size: 15px; font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* Level row */
.level-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.level-pill {
  padding: 6px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 100px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-dim);
}
.mult-pill {
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 100px;
  font-size: 13px; font-weight: 800;
  color: #fff;
  box-shadow: var(--shadow-red);
  animation: multPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes multPop {
  from { transform: scale(0) rotate(-10deg); }
  to { transform: scale(1) rotate(0); }
}

.progress-bar { height: 4px; background: var(--surface); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  border-radius: 2px; transition: width 0.5s ease;
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Question card */
.question-card {
  padding: 22px 20px;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  margin-bottom: 18px; box-shadow: var(--shadow-soft);
  position: relative; overflow: hidden;
  animation: slideIn 0.4s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.question-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.question-number {
  font-size: 11px; font-weight: 700; color: var(--gold);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px;
}
.question-text { font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--text); text-wrap: balance; }

/* Answers */
.answers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.answer {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 500;
  text-align: left; cursor: pointer; transition: all 0.2s; width: 100%; min-width: 0;
  animation: ansIn 0.4s ease backwards;
}
.answer:nth-child(1) { animation-delay: 0.05s; }
.answer:nth-child(2) { animation-delay: 0.1s; }
.answer:nth-child(3) { animation-delay: 0.15s; }
.answer:nth-child(4) { animation-delay: 0.2s; }
@keyframes ansIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.answer:not(:disabled):active { transform: scale(0.98); }
.answer:not(:disabled):hover { background: var(--surface-hover); border-color: var(--gold-dim); }
.answer-letter {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px;
  background: rgba(232, 193, 88, 0.15);
  border: 1px solid rgba(232, 193, 88, 0.3);
  color: var(--gold); font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.answer-text { flex: 1; line-height: 1.3; min-width: 0; }
.answer.correct {
  background: rgba(74, 222, 128, 0.15);
  border-color: var(--green);
  color: var(--green);
  animation: pulseGreen 0.6s ease;
}
.answer.correct .answer-letter { background: var(--green); border-color: var(--green); color: #052e16; }
.answer.wrong {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--red);
  color: var(--red);
  animation: shake 0.4s ease;
}
.answer.wrong .answer-letter { background: var(--red); border-color: var(--red); color: #fff; }
.answer.hidden-5050 { opacity: 0.25; pointer-events: none; }
.answer:disabled { cursor: default; }

@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Lifelines (4) */
.lifelines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.lifeline {
  padding: 10px 4px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  font-family: inherit; color: var(--text); cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.lifeline:not(:disabled):active { transform: scale(0.96); }
.lifeline:not(:disabled):hover { border-color: var(--gold); background: var(--gold-glow); }
.ll-icon { font-size: 15px; font-weight: 800; color: var(--gold); }
.ll-label { font-size: 9px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.lifeline.used { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.lifeline.used .ll-icon { color: var(--text-mute); text-decoration: line-through; }

.btn-quit {
  width: 100%; padding: 10px; background: transparent;
  color: var(--text-mute);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-quit:hover { color: var(--gold); border-color: var(--gold-dim); }

/* =============================================================
   RESULT SCREEN
   ============================================================= */

#screen-result {
  text-align: center;
  display: none; flex-direction: column; justify-content: center;
  min-height: 100vh;
  padding-top: calc(40px + env(safe-area-inset-top));
  position: relative;
}
#screen-result.active { display: flex; }

.confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
}

.result-icon { font-size: 76px; margin-bottom: 8px; animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.result-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px; font-weight: 900; margin: 8px 0 4px;
  background: linear-gradient(135deg, #fff, var(--gold-bright));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-wrap: balance;
}
.result-sub { font-size: 14px; color: var(--text-dim); margin: 0 0 12px; }
.result-prize {
  font-size: 52px; font-weight: 900; color: var(--gold);
  margin-bottom: 14px; letter-spacing: -0.02em;
  text-shadow: 0 0 40px var(--gold-glow);
  font-variant-numeric: tabular-nums;
  animation: scoreCount 0.8s ease;
}
@keyframes scoreCount {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.rank-badge {
  display: inline-block;
  margin: 0 auto 20px;
  padding: 6px 16px;
  background: var(--gold-glow);
  border: 1px solid rgba(232,193,88,0.4);
  border-radius: 100px;
  font-size: 12px; font-weight: 700; color: var(--gold);
  letter-spacing: 0.08em; text-transform: uppercase;
}

.result-stats {
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 14px; text-align: left;
  position: relative; z-index: 2;
}
.rs-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.rs-row-last { border-bottom: none; }
.rs-label { font-size: 13px; color: var(--text-dim); }
.rs-value { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.result-ach {
  padding: 14px 16px; background: rgba(232,193,88,0.08);
  border: 1px solid rgba(232,193,88,0.3);
  border-radius: var(--radius-md); margin-bottom: 14px; text-align: left;
  position: relative; z-index: 2;
}
.result-ach-title {
  font-size: 11px; font-weight: 800; color: var(--gold);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
}
.result-ach-list { display: flex; flex-direction: column; gap: 6px; }
.result-ach-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text);
}
.result-ach-item .ach-ic { font-size: 18px; }

.disclaimer {
  font-size: 10px; color: var(--text-mute);
  margin-top: 16px; line-height: 1.4; max-width: 300px; margin-left: auto; margin-right: auto;
}

/* =============================================================
   MODAL
   ============================================================= */

.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.78); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  animation: fadeIn 0.2s;
}
.modal-box {
  max-width: 440px; width: 100%; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 22px; position: relative;
  box-shadow: var(--shadow-soft);
  -webkit-overflow-scrolling: touch;
}
.modal-close {
  position: sticky; top: 0; float: right;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-3); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 18px; font-weight: 700;
  cursor: pointer; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  margin-top: -6px; margin-right: -6px;
}
.modal-close:active { transform: scale(0.92); }
.modal-box h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px; margin: 0 0 16px; color: var(--gold);
}
.modal-section { margin-bottom: 14px; }
.modal-h { font-size: 13px; font-weight: 800; color: var(--gold-bright); margin-bottom: 4px; }
.modal-section p { font-size: 14px; line-height: 1.5; color: var(--text-dim); margin: 0; }
.modal-section b { color: var(--text); }

/* =============================================================
   ACHIEVEMENT POPUP + TOAST + SCORE POP
   ============================================================= */

.ach-popup {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  left: 50%; transform: translateX(-50%) translateY(-120%);
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 100px;
  display: flex; align-items: center; gap: 12px;
  color: #1a1407;
  box-shadow: 0 10px 30px rgba(232,193,88,0.4);
  z-index: 300; opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 320px;
}
.ach-popup.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.ach-pop-icon { font-size: 28px; line-height: 1; }
.ach-pop-sub { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; opacity: 0.7; }
.ach-pop-title { font-size: 14px; font-weight: 800; }

.score-pop {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 48px; font-weight: 900;
  color: var(--green);
  text-shadow: 0 0 20px rgba(74,222,128,0.6);
  opacity: 0; pointer-events: none;
  z-index: 250;
}
.score-pop.show {
  animation: scoreFloat 1.2s ease forwards;
}
@keyframes scoreFloat {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(0.9); }
}

.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%) translateY(100px);
  padding: 12px 20px; background: var(--bg-3);
  border: 1px solid var(--gold-dim); border-radius: 100px;
  font-size: 13px; font-weight: 600; color: var(--gold);
  box-shadow: var(--shadow-soft); opacity: 0;
  transition: all 0.3s ease; z-index: 100; pointer-events: none;
  max-width: 280px; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Confetti particles */
.confetti-piece {
  position: absolute;
  width: 8px; height: 14px;
  opacity: 0;
  animation: confettiFall 2.5s linear forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(-20vh) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
