:root {
  --ink: #3b2a1a;
  --ink-soft: #5c4632;
  --clay: #b5651d;
  --clay-dark: #8f4d15;
  --terracotta: #c67b5c;
  --sand: #e4d2ad;
  --cream: #fbf3e3;
  --cream-deep: #f3e6cd;
  --wood: #6b4226;
  --wood-dark: #4a2c17;
  --olive: #5f7645;
  --correct-bg: #e8edd9;
  --correct-border: #6f8f4a;
  --correct-ink: #3c4e26;
  --incorrect-bg: #f3ddd3;
  --incorrect-border: #a6543d;
  --incorrect-ink: #6e3323;
  --focus-ring: #b5651d;
  --blur-stage1: 18px;
  --blur-stage2: 8px;
  --photo-pos-x: 50%;
  --photo-pos-y: 50%;
  --photo-zoom: 1;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

/* Scrollbalken-Platz dauerhaft reservieren: verhindert, dass die verfügbare
   Breite (und damit die background-size:cover-Berechnung) wackelt, sobald der
   Erklärungstext nach einer Antwort die Seite kurz höher als das Sichtfenster
   macht und der vertikale Scrollbalken ein-/ausblendet. */
html {
  overflow-y: scroll;
}

body {
  font-family: "Raleway", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  position: relative;
  min-height: 100vh;
  background-image:
    linear-gradient(180deg, rgba(59, 36, 18, 0.42) 0%, rgba(59, 36, 18, 0.5) 55%, rgba(40, 24, 12, 0.68) 100%),
    url("assets/images/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

/* Feines Korn/Papier-Rauschen über dem gesamten Hintergrund - subtile "handmade" Anmutung. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
}

/* Dunkle Vignette an den Rändern -- lässt den Hintergrund wie ein Bild an der Wand wirken. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 140px rgba(30, 16, 6, 0.55);
}

h1, h2, .quiz-anfang {
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

button {
  font-family: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.screen {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 3;
}

body[data-screen="start"] #screen-start,
body[data-screen="beamer"] #screen-beamer,
body[data-screen="solo"] #screen-solo,
body[data-screen="mp-setup"] #screen-mp-setup {
  display: block;
}

.ornament {
  display: block;
  width: 120px;
  height: 20px;
  margin: 0 auto 22px;
  color: var(--clay);
}

.ornament-sm {
  width: 90px;
  height: 16px;
  margin: 0 auto 24px;
  opacity: 0.85;
}

/* ---------- Startbildschirm ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.hero-inner {
  width: 100%;
  max-width: 620px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 600;
  color: #fff8ec;
  text-shadow: 0 3px 20px rgba(20, 10, 4, 0.7);
}

.hero-sub {
  margin: 0 0 36px;
  font-size: clamp(17px, 2.6vw, 20px);
  color: #f3e8d6;
  text-shadow: 0 2px 10px rgba(20, 10, 4, 0.65);
}

.mode-choices {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  background:
    repeating-linear-gradient(115deg, rgba(107, 66, 38, 0.05) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
  color: var(--ink);
  border: none;
  border-radius: 20px;
  padding: 26px 24px;
  cursor: pointer;
  box-shadow:
    0 0 0 2px var(--clay),
    0 0 0 7px var(--cream),
    0 0 0 8px rgba(107, 66, 38, 0.55),
    0 22px 46px rgba(20, 10, 4, 0.45);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.mode-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 2px var(--clay-dark),
    0 0 0 7px var(--cream),
    0 0 0 8px rgba(107, 66, 38, 0.65),
    0 26px 54px rgba(20, 10, 4, 0.5);
}

.mode-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sand);
  color: var(--wood-dark);
}

.mode-icon svg {
  width: 30px;
  height: 30px;
}

.mode-card-title {
  font-family: "Lora", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--wood-dark);
}

.mode-card-desc {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 42ch;
}

/* ---------- Gemeinsames Spiel-Layout ---------- */

.game-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.icon-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  border: 2px solid var(--wood);
  background: rgba(251, 243, 227, 0.92);
  color: var(--wood-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(20, 10, 4, 0.35);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.icon-btn:hover {
  background: var(--sand);
}

.icon-btn.spacer {
  visibility: hidden;
  pointer-events: none;
}

.game-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auto-reveal {
  position: relative;
}

.auto-btn.is-running {
  background: var(--clay);
  color: #fff8ec;
  border-color: var(--clay-dark);
}

.auto-popover {
  position: absolute;
  top: 58px;
  left: 0;
  z-index: 20;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background:
    repeating-linear-gradient(115deg, rgba(107, 66, 38, 0.045) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
  border-radius: 16px;
  box-shadow:
    0 0 0 2px var(--clay),
    0 0 0 7px var(--cream),
    0 0 0 8px rgba(107, 66, 38, 0.5),
    0 20px 40px rgba(20, 10, 4, 0.45);
}

.auto-popover.hidden {
  display: none;
}

.auto-popover label {
  font-size: 14px;
  font-weight: 700;
  color: var(--wood-dark);
}

.auto-popover input[type="range"] {
  width: 100%;
  accent-color: var(--clay);
}

.auto-slider-value {
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

.auto-advance-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid var(--wood);
  background: rgba(251, 243, 227, 0.92);
  color: var(--wood-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(20, 10, 4, 0.35);
}

.auto-advance-toggle:hover {
  background: var(--sand);
}

.auto-advance-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: var(--clay);
  cursor: pointer;
}

.auto-start-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 0;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--clay);
  color: #fff8ec;
  min-height: 44px;
}

.auto-start-btn:hover {
  background: var(--clay-dark);
}

.auto-popover-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
}

.auto-progress {
  position: relative;
  width: clamp(220px, 42vw, 320px);
  height: 12px;
  margin: 0 auto 16px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--incorrect-border) 0%, #d9a441 50%, var(--correct-border) 100%);
  box-shadow: inset 0 1px 3px rgba(20, 10, 4, 0.35), 0 0 0 2px var(--cream);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.auto-progress:not(.hidden) {
  opacity: 1;
}

.auto-progress.is-paused {
  animation: auto-progress-pulse 1.1s ease-in-out infinite;
}

@keyframes auto-progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.auto-progress-mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: var(--sand);
}

.progress-pill {
  background: rgba(107, 66, 38, 0.85);
  border: 1px solid rgba(251, 243, 227, 0.35);
  color: #fbf3e3;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 18px rgba(20, 10, 4, 0.35);
}

.quiz-stage {
  display: flex;
  justify-content: center;
  padding: 12px 20px 60px;
}

.quiz-card {
  width: 100%;
  max-width: 780px;
  background:
    repeating-linear-gradient(115deg, rgba(107, 66, 38, 0.045) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
  border-radius: 22px;
  padding: 46px 44px;
  box-shadow:
    0 0 0 2px var(--clay),
    0 0 0 8px var(--cream),
    0 0 0 9px rgba(107, 66, 38, 0.55),
    0 26px 60px rgba(20, 10, 4, 0.5);
  text-align: center;
}

/* ---------- Foto-Reveal ---------- */

.photo-frame-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 18px;
}

.photo-frame {
  display: block;
  margin: 0;
  width: clamp(220px, 42vw, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 0;
  border: none;
  cursor: pointer;
  overflow: hidden;
  background: var(--sand);
  box-shadow:
    0 0 0 6px var(--cream),
    0 0 0 8px var(--clay),
    0 16px 34px rgba(20, 10, 4, 0.4);
  transition: box-shadow 180ms ease, transform 120ms ease;
}

.photo-frame:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 6px var(--cream),
    0 0 0 8px var(--clay-dark),
    0 20px 40px rgba(20, 10, 4, 0.45);
}

.photo-frame:active:not(:disabled) {
  transform: translateY(0);
}

.photo-frame:disabled {
  cursor: default;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-pos-x) var(--photo-pos-y);
  transform: scale(var(--photo-zoom));
  transform-origin: var(--photo-pos-x) var(--photo-pos-y);
  filter: blur(var(--blur-stage1));
  transition: filter 450ms ease;
}

.photo-frame img.no-transition {
  transition: none;
}

.photo-frame img.stage-1 {
  filter: blur(var(--blur-stage1));
}

.photo-frame img.stage-2 {
  filter: blur(var(--blur-stage2));
}

.photo-frame img.stage-3 {
  filter: none;
}

.result-banner {
  position: absolute;
  right: -4px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff8ec;
  box-shadow: 0 10px 22px rgba(20, 10, 4, 0.45), 0 0 0 3px var(--cream);
  opacity: 0;
  transform: scale(0.65) translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}

.result-banner.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.result-banner.is-correct {
  background: var(--correct-border);
}

.result-banner.is-incorrect {
  background: var(--incorrect-border);
}

.stage-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stage-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--clay);
  opacity: 0.5;
  transition: background 200ms ease, opacity 200ms ease;
}

.stage-dots .dot.is-active {
  background: var(--clay);
  opacity: 1;
}

.photo-hint {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.2px;
}

.quiz-anfang {
  margin: 0 0 22px;
  font-size: clamp(26px, 4.2vw, 38px);
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  font-style: italic;
  font-weight: 600;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: #fffaf1;
  border: 2px solid var(--sand);
  border-radius: 14px;
  padding: 20px 24px;
  font-size: clamp(18px, 2.4vw, 21px);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  box-shadow: 0 3px 0 rgba(107, 66, 38, 0.18);
  transition: background 180ms ease, border-color 180ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.option-btn span {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff8ec;
  font-family: "Lora", Georgia, serif;
  font-size: 16px;
  font-weight: 700;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--clay);
  background: #fff3de;
  transform: translateY(-1px);
}

.option-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(107, 66, 38, 0.18);
}

.option-btn:disabled {
  cursor: default;
}

.option-btn.is-correct {
  background: var(--correct-bg);
  border-color: var(--correct-border);
  color: var(--correct-ink);
}

.option-btn.is-correct .option-letter {
  background: var(--correct-border);
}

.option-btn.is-incorrect {
  background: var(--incorrect-bg);
  border-color: var(--incorrect-border);
  color: var(--incorrect-ink);
}

.option-btn.is-incorrect .option-letter {
  background: var(--incorrect-border);
}

.option-btn.is-muted:not(.is-correct):not(.is-incorrect) {
  opacity: 0.55;
}

.quiz-explain {
  margin-top: 26px;
  padding: 20px 22px;
  background: rgba(230, 214, 184, 0.55);
  border-left: 5px solid var(--clay);
  border-radius: 4px 10px 10px 4px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-align: left;
}

.quiz-explain.hidden,
.next-btn.hidden,
.session-end.hidden {
  display: none;
}

.next-btn {
  display: block;
  margin: 30px auto 0;
  background: var(--clay);
  color: #fff8ec;
  border: none;
  padding: 16px 36px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  box-shadow: 0 10px 22px rgba(107, 66, 38, 0.4);
}

.next-btn:hover {
  background: var(--clay-dark);
}

/* ---------- Abschluss ---------- */

.session-end {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.session-end-card {
  background:
    repeating-linear-gradient(115deg, rgba(107, 66, 38, 0.045) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 100%);
  border-radius: 22px;
  padding: 44px 40px;
  max-width: 520px;
  text-align: center;
  box-shadow:
    0 0 0 2px var(--clay),
    0 0 0 8px var(--cream),
    0 0 0 9px rgba(107, 66, 38, 0.55),
    0 26px 60px rgba(20, 10, 4, 0.5);
}

.session-end-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
  color: var(--wood-dark);
}

.session-end-card p {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.session-end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.primary-btn,
.ghost-btn {
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}

.primary-btn {
  background: var(--clay);
  color: #fff8ec;
  border: none;
  box-shadow: 0 10px 22px rgba(107, 66, 38, 0.4);
}

.primary-btn:hover {
  background: var(--clay-dark);
}

.ghost-btn {
  background: rgba(255, 250, 241, 0.6);
  color: var(--wood-dark);
  border: 2px solid var(--wood);
}

.ghost-btn:hover {
  background: var(--sand);
}

/* ---------- Mehrspieler-Setup ---------- */

.mp-step.hidden {
  display: none;
}

.mp-setup-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  color: #fff8ec;
  text-shadow: 0 3px 20px rgba(20, 10, 4, 0.7);
}

.mp-number-input {
  display: block;
  width: 140px;
  margin: 0 auto 28px;
  padding: 14px 0;
  text-align: center;
  font-family: "Lora", Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--wood-dark);
  background: var(--cream);
  border: none;
  border-radius: 16px;
  box-shadow:
    0 0 0 2px var(--clay),
    0 0 0 6px var(--cream),
    0 0 0 7px rgba(107, 66, 38, 0.5);
}

.mp-name-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto 28px;
  max-width: 420px;
}

.mp-name-input {
  width: 100%;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  background: var(--cream);
  border: none;
  border-radius: 999px;
  box-shadow:
    0 0 0 2px var(--clay),
    0 0 0 6px var(--cream),
    0 0 0 7px rgba(107, 66, 38, 0.5);
  min-height: 44px;
}

.mp-name-input::placeholder {
  color: var(--ink-soft);
  opacity: 0.7;
}

.mp-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ---------- Scoreboard ---------- */

.scoreboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 14px;
}

.scoreboard.hidden {
  display: none;
}

.score-pill {
  background: rgba(107, 66, 38, 0.85);
  border: 1px solid rgba(251, 243, 227, 0.35);
  color: #fbf3e3;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(20, 10, 4, 0.3);
}

.score-pill .score-pill-points {
  color: var(--sand);
  font-weight: 800;
}

/* ---------- Spieler-Zuordnung ---------- */

.player-attribution {
  margin-top: 26px;
  padding: 22px;
  background: rgba(230, 214, 184, 0.55);
  border: 2px dashed var(--clay);
  border-radius: 14px;
  text-align: center;
}

.player-attribution.hidden {
  display: none;
}

.attribution-question {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--wood-dark);
}

.attribution-players {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.attribution-player-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--clay);
  color: #fff8ec;
  min-height: 44px;
  box-shadow: 0 6px 14px rgba(107, 66, 38, 0.35);
}

.attribution-player-btn:hover {
  background: var(--clay-dark);
}

.attribution-skip-btn {
  font-size: 14px;
  padding: 10px 20px;
  min-height: 40px;
}

/* ---------- Siegerehrung / Podium ---------- */

.leaderboard-card {
  max-width: 640px;
}

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
  margin: 10px 0 24px;
}

.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 140px;
}

.podium-medal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff8ec;
  background: var(--wood);
}

.podium-place-1 .podium-medal {
  width: 64px;
  height: 64px;
}

.podium-place-2 .podium-medal {
  background: #9aa0a6;
}

.podium-place-3 .podium-medal {
  background: #b5772f;
}

.podium-trophy {
  width: 40px;
  height: 40px;
}

.podium-name {
  font-family: "Lora", Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--wood-dark);
  text-align: center;
  word-break: break-word;
}

.podium-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.podium-bar {
  width: 100%;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, var(--sand) 0%, var(--terracotta) 100%);
  box-shadow: 0 0 0 2px var(--clay), inset 0 3px 0 rgba(255, 255, 255, 0.35);
}

.podium-place-1 .podium-bar {
  height: 110px;
  background: linear-gradient(180deg, #ffe9ad 0%, #d4a017 100%);
  box-shadow: 0 0 0 3px #d4a017, 0 0 24px rgba(212, 160, 23, 0.55), inset 0 3px 0 rgba(255, 255, 255, 0.5);
}

.podium-place-2 .podium-bar {
  height: 78px;
  background: linear-gradient(180deg, #e7e9eb 0%, #9aa0a6 100%);
  box-shadow: 0 0 0 2px #9aa0a6, inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

.podium-place-3 .podium-bar {
  height: 58px;
  background: linear-gradient(180deg, #e6b98a 0%, #b5772f 100%);
  box-shadow: 0 0 0 2px #b5772f, inset 0 3px 0 rgba(255, 255, 255, 0.4);
}

.podium-winner .podium-name {
  font-size: 19px;
}

.leaderboard-rest {
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  text-align: left;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.leaderboard-rest li {
  padding: 8px 4px;
  border-bottom: 1px solid var(--sand);
  font-size: 15px;
  color: var(--ink-soft);
}

.leaderboard-rest li:last-child {
  border-bottom: none;
}

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

@media (max-width: 600px) {
  .quiz-stage {
    padding: 10px 8px 40px;
  }

  .quiz-card {
    padding: 22px 12px;
    border-radius: 16px;
  }

  .mode-card {
    padding: 22px 18px;
  }

  .game-bar {
    padding: 14px 14px;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .game-bar-left {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .auto-advance-toggle {
    height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }

  .progress-pill {
    font-size: 14px;
    padding: 8px 16px;
  }

  .quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .option-btn {
    min-width: 0;
    padding: 10px 8px;
    gap: 8px;
    font-size: clamp(13px, 3.6vw, 15px);
  }

  .option-letter {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 13px;
  }

  .podium {
    gap: 8px;
  }

  .podium-col {
    width: 96px;
  }

  .podium-name {
    font-size: 13px;
  }

  .podium-winner .podium-name {
    font-size: 15px;
  }

  .podium-score {
    font-size: 12px;
  }

  .attribution-players {
    gap: 8px;
  }

  .attribution-player-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
}
