/* Spielrunden, Auflösung, Spielende — Referenz: design/round-*.html, design/reveal-host.html, design/gameend-host.html */

.game { min-height: 100vh; padding: 20px 32px; }
.game:not(.mobile) { height: 100vh; overflow: hidden; }
.game header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.game .logo { font-size: 14px; }
.round-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 700; }
.round-chip b { color: var(--magenta); }
.timer-pill { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 18px; font-weight: 900; font-size: 20px; color: var(--lime); white-space: nowrap; }
.timer-pill i { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.timer-pill.low { color: var(--red); border-color: var(--red); animation: urgent .5s infinite; }
.timer-pill.low i { background: var(--red); box-shadow: 0 0 10px var(--red); }
@keyframes urgent { 50% { transform: scale(1.06); } }

.round-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px;
  align-items: start; min-height: 0; }
.round-grid > aside { max-height: calc(100vh - 120px); overflow-y: auto; }
.stage h1 { font-size: 20px; margin-bottom: 10px; }
.stage h1 em { color: var(--cyan); font-style: normal; }
/* Höhe an den Viewport koppeln: Header, Headline, Timerbar und Hinweis müssen
   mit auf den Schirm — sonst muss der Host scrollen. */
/* Breite explizit, sonst schrumpft der Rahmen im Verpixelt-Modus zusammen: Das
   einzige In-Flow-Kind (das <img>) ist dort visibility:hidden, das Canvas liegt
   absolut darüber — ohne definierte Breite fällt der Grid-Slot auf fit-content
   und der Screenshot wird winzig. */
.shot-frame { position: relative; aspect-ratio: 16/9; width: 100%; max-height: calc(100vh - 190px);
  margin: 0 auto; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 0 48px rgba(34, 211, 238, .18); background: var(--surface); }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Retro-Screenshots (320×200 & Co.) pixelgenau hochskalieren statt weichzeichnen —
   sieht nach Pixel-Art aus statt nach Unschärfe. Klasse setzt reveal_controller.js
   anhand der echten Bildbreite. */
.shot-frame.pixel-art img,
.shot-frame.pixel-art canvas { image-rendering: pixelated; }
/* Klassiker sind nie 16:9 — im Auflösungsband ganz zeigen statt beschneiden. */
.reveal-banner.pixel-art .shot { background: #05070d; }
.reveal-banner.pixel-art .shot img { image-rendering: pixelated; object-fit: contain; }

/* Spielhallen-Automaten standen hochkant (Galaga 224×288), Konsolen lieferten
   4:3. Auf 16:9 zugeschnitten fehlt davon das halbe Spielfeld — also ganz
   zeigen und seitlich abdunkeln, wie ein Bildschirm im Gehäuse.
   Klasse setzt reveal_controller.js anhand des echten Seitenverhältnisses. */
.shot-frame.letterbox { background: #05070d; }
.shot-frame.letterbox img { object-fit: contain; }

/* Verpixelt: Das Original liefert nur die Pixel für das Canvas darüber. */
.shot-frame.mode-pixelate img { visibility: hidden; }
.shot-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.timerbar { height: 12px; border-radius: 999px; background: var(--surface); overflow: hidden; margin-top: 16px; }
.timerbar i { display: block; height: 100%; border-radius: 999px; width: 100%;
  background: linear-gradient(90deg, var(--lime), var(--cyan)); box-shadow: 0 0 14px rgba(163, 230, 53, .6);
  transition: width .25s linear; }
.timerbar i.low { background: linear-gradient(90deg, var(--red), var(--amber)); }
.stage .subline { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* Scoreboard (Host) */
.score-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.score-row:last-child { border-bottom: 0; }
.score-row .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); }
.score-row .name { font-weight: 700; }
.score-row .state { font-size: 11px; color: var(--muted); font-weight: 400; }
.score-row .state.done { color: var(--lime); }
.score-row .state.locked { color: var(--magenta); font-weight: 700; }
.score-row .lead-bar { height: 8px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); overflow: hidden; margin-top: 6px; }
.score-row .lead-bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta)); transition: width .4s ease; }
.score-row .score { font-weight: 900; font-size: 22px; color: var(--lime); }

/* Spieler-Rundenansicht (Handy) */
.game.mobile { padding: 16px 18px 32px; }
/* Name darf kürzen statt umbrechen — der Timer rechts braucht seinen Platz. */
.game.mobile header { margin-bottom: 12px; gap: 10px; }
.game.mobile .me { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.game.mobile .me .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  color: var(--bg); flex: none; }
.game.mobile .me .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game.mobile .me .pts { color: var(--muted); font-weight: 400; font-size: 13px; white-space: nowrap; flex: none; }
.game.mobile .timer-pill { flex: none; }
.game.mobile .timer-pill { font-size: 16px; padding: 6px 14px; }
.tl-label { margin: 20px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); text-align: center; }

/* Achsenbeschriftung an der Zeitleiste: „früher" oben, „später" unten. Als
   Diagramm-Achse gelesen, nicht als Anweisung — die Richtung war vorher
   nirgends ablesbar und wurde zweimal falsch verstanden. */
/* Sitzt auf der Zeitachse — der Seitenhintergrund maskiert die Linie, damit
   der Farbverlauf nicht durch die Beschriftung läuft. */
.tl-axis { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin-left: -22px; padding: 3px 8px 3px 0; width: fit-content; background: var(--bg); }
.tl-axis.top { margin-bottom: 8px; }
.tl-axis.top .icon { color: var(--cyan); }
.tl-axis.bottom { margin-top: 8px; }
.tl-axis.bottom .icon { color: var(--magenta); }

.timeline { position: relative; display: flex; flex-direction: column; padding-left: 26px; max-width: 560px; margin: 0 auto; }
.timeline:before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--magenta)); box-shadow: 0 0 8px rgba(34, 211, 238, .5); }
.tcard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tcard:before { content: ""; position: absolute; left: -21px; top: 50%; width: 10px; height: 10px; border-radius: 50%;
  transform: translateY(-50%); background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, .7); }
.tcard .y { font-weight: 900; font-size: 19px; color: var(--cyan); font-style: italic; }
.tcard .n { font-weight: 700; font-size: 14px; }
.tcard .d { font-size: 12px; color: var(--muted); }
/* In der Rundenansicht liegen die Ablagezonen zwischen den Karten und halten
   sie auseinander. In der Auflösung gibt es die nicht — dort stehen zwei
   Karten direkt nebeneinander und klebten ohne diesen Abstand aneinander. */
.tcard + .tcard { margin-top: 8px; }
.tcard.anchor { border-color: var(--amber); background: linear-gradient(90deg, rgba(251, 191, 36, .12), transparent); }
.tcard.anchor:before { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, .8); }
.tcard.anchor .y { color: var(--amber); }

.drop { min-height: 18px; position: relative; }
.drop .zone { display: none; }
/* Während des Ziehens klappen alle Lücken sichtbar auf — große Drop-Ziele. */
.drag-active .drop { min-height: 56px; padding: 4px 0; }
/* Die Beschriftung nennt den Zeitraum der Lücke („vor 1991", „1991 – 2004") —
   deshalb etwas größer und ohne Versalien, das sind Zahlen zum Lesen. */
.drag-active .drop .zone { display: grid; place-items: center; min-height: 48px;
  border: 2px dashed var(--line); border-radius: 12px; font-size: 14px; font-weight: 700;
  color: var(--muted); letter-spacing: .04em; }
.drag-active .drop.hover .zone { border-color: var(--lime); background: rgba(163, 230, 53, .08); color: var(--lime); }
.drop.hover, .drop.active { min-height: 64px; padding: 4px 0; }
.drop.hover .zone, .drop.active .zone { display: grid; place-items: center; min-height: 56px;
  border: 2px dashed var(--lime); border-radius: 12px; background: rgba(163, 230, 53, .08);
  font-size: 14px; font-weight: 700; color: var(--lime); letter-spacing: .04em; }
.drop.active .zone span { display: none; }
.drop.active .zone:has(.dragcard) { border-style: solid; }

.dragcard { position: fixed; right: 14px; bottom: 96px; width: 150px; background: linear-gradient(135deg, #242c52, #1b2340);
  border: 2px solid var(--magenta); border-radius: 14px; padding: 12px 16px; transform: rotate(-4deg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 24px rgba(232, 121, 249, .45); touch-action: none; cursor: grab; z-index: 20;
  animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-10px); } }
.dragcard .y { font-weight: 900; font-size: 24px; color: var(--magenta); font-style: italic; }
.dragcard .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.dragcard.placed { position: static; transform: none; width: auto; margin: 4px 10px; animation: none; }
/* Beim Ziehen: fixe Position nur über left/top steuern — right/bottom lösen,
   sonst spannt sich die Karte zwischen beiden Ankern auf und "wächst". */
.dragcard.dragging { position: fixed; right: auto; bottom: auto; margin: 0; width: 150px;
  transform: scale(1.08); animation: none; transition: none; cursor: grabbing; z-index: 40; }
.drop .dragcard { box-shadow: 0 0 18px rgba(232, 121, 249, .35); }

.dragcard-hint { position: fixed; right: 20px; bottom: 180px; z-index: 20; max-width: 220px; text-align: center;
  background: var(--card); border: 1px solid var(--magenta); border-radius: 12px; padding: 8px 14px;
  font-size: 13px; font-weight: 700; box-shadow: 0 0 16px rgba(232, 121, 249, .3); animation: hint-bob 1.6s ease-in-out infinite; }
.dragcard-hint:after { content: ""; position: absolute; right: 28px; bottom: -7px; width: 12px; height: 12px;
  background: var(--card); border-right: 1px solid var(--magenta); border-bottom: 1px solid var(--magenta);
  transform: rotate(45deg); }
@keyframes hint-bob { 50% { transform: translateY(-6px); } }

/* Einloggen (GeoGuessr-Prinzip): früh sichern bringt mehr Punkte.
   Eigene Zeile unter dem Kopf — in der Kopfzeile brach er zusammen mit einem
   langen Namen und zweistelligen Sekunden um. Fester Slot, damit der Wechsel
   Knopf → Statuszeile die Zeitleiste nicht hochruckt. */
.lock-slot { margin-bottom: 12px; }
.lock-slot.spent .lock-form { display: none; }
.lock-slot:not(.spent) .lock-spent { display: none; }
.lock-spent { justify-content: center; padding: 12px 16px; border: 1px dashed var(--line);
  border-radius: 12px; font-size: 13px; color: var(--muted); }
.lock-form { margin: 0; }
.lock-btn { display: flex; width: 100%; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; font: 700 15px/1 ui-sans-serif, system-ui; color: var(--text); }
.lock-btn b { font-size: 17px; font-style: italic; color: var(--muted); }
.lock-btn.hot { border-color: var(--magenta); box-shadow: 0 0 14px rgba(232, 121, 249, .35); }
.lock-btn.hot b { color: var(--magenta); }
.lock-btn:disabled { opacity: .4; cursor: default; box-shadow: none; }
.lock-badge { display: flex; justify-content: center; margin-bottom: 12px;
  background: rgba(232, 121, 249, .12); border: 1px solid var(--magenta);
  border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 14px; color: var(--magenta); }

/* Eingeloggte Karte: nicht mehr greifbar. */
.dragcard.fixed { cursor: default; animation: none; border-color: var(--magenta); }
.game.locked .drop .zone { border-style: solid; border-color: var(--magenta); background: rgba(232, 121, 249, .06); }

/* Auflösung */
/* Auflösung — Variante C: Rangliste im Fokus, Antwort als schmales Band.
   Zeilen schrumpfen mit, damit auch 9+ Spieler auf einen Screen passen. */
/* Nur der Host-Auflösungsscreen ist eine Flex-Spalte — die Rangliste muss die
   Resthöhe füllen. Auf dem Handy richtet dieselbe Regel Schaden an: Antwortkarte
   und Zeitleiste zentrieren sich dort über `margin: 0 auto`, und als Flex-
   Elemente schrumpfen sie damit auf Inhaltsbreite, statt die Breite zu nutzen. */
.game.reveal:not(.mobile) { display: flex; flex-direction: column; gap: 14px; }
.game.reveal:not(.mobile) header { margin-bottom: 0; }

.reveal-banner { flex: none; display: grid; grid-template-columns: 180px auto minmax(0, 1fr);
  gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px 22px; }
.reveal-banner .shot { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.reveal-banner .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reveal-banner .year { font-size: 64px; line-height: 1; color: var(--lime);
  text-shadow: 0 0 28px rgba(163, 230, 53, .5); animation: reveal-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes reveal-pop { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.reveal-banner h1 { font-size: clamp(20px, 2.4vw, 30px); }
.reveal-banner .dev { color: var(--muted); font-size: 15px; }

/* Auf einem kurzen Fenster (Laptop statt Fernseher) reicht der Platz für neun
   Zeilen nicht. Dann lieber scrollen als die Zeilen unlesbar zusammenquetschen. */
.board { flex: 1; display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; }
.board-cols { display: grid; grid-template-columns: 44px 40px minmax(0, 1fr) 92px 78px 92px; gap: 14px; }
.legend { display: grid; grid-template-columns: 44px 40px minmax(0, 1fr) 92px 78px 92px; gap: 14px;
  padding: 0 22px; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.legend span:nth-child(4), .legend span:nth-child(5), .legend span:nth-child(6) { text-align: right; }

/* min-height hält die Zeile lesbar (der Avatar allein ist 40 px hoch) — knapp
   genug, dass neun Zeilen auf einem 800-px-Fenster noch ohne Scrollbalken
   passen und per flex-grow den Platz füllen. Erst darunter wird gescrollt.
   max-height verhindert, dass wenige Spieler die Zeilen aufblähen. */
.board-row { flex: 1 1 0; min-height: 48px; max-height: 82px; overflow: hidden;
  display: grid; grid-template-columns: 44px 40px minmax(0, 1fr) 92px 78px 92px; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 22px; }
.board-row .pos { font-weight: 900; font-size: 22px; font-style: italic; color: var(--muted); text-align: center; }
.board-row .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); }
.board-row .who { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.board-row .name { font-weight: 700; font-size: 20px; flex: none; }
.board-row .verdict { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row.hit .verdict { color: var(--lime); }
.board-row.miss .verdict { color: var(--red); }
.board-row .move { font-weight: 900; font-size: 14px; text-align: right; color: var(--muted); white-space: nowrap; }
.board-row .move.up { color: var(--lime); }
.board-row .move.down { color: var(--red); }
.board-row .delta { font-weight: 900; font-size: 24px; text-align: right; color: var(--muted); }
.board-row.hit .delta { color: var(--lime); text-shadow: 0 0 14px rgba(163, 230, 53, .45); }
.board-row .total { font-weight: 900; font-size: 36px; text-align: right; line-height: 1; color: var(--text); }
.board-row.hit .total { color: var(--lime); }
.board-row.lead { border-color: var(--amber); box-shadow: 0 0 26px rgba(251, 191, 36, .2); }
.board-row.lead .pos { color: var(--amber); }
.board-row.lead .total { color: var(--amber); text-shadow: 0 0 16px rgba(251, 191, 36, .45); }

@media (max-width: 1100px) {
  .reveal-banner { grid-template-columns: 130px auto minmax(0, 1fr); gap: 16px; }
  .reveal-banner .year { font-size: 46px; }
  .board-row, .legend { grid-template-columns: 34px 32px minmax(0, 1fr) 70px 62px 72px; gap: 10px; padding-left: 14px; padding-right: 14px; }
  .board-row .name { font-size: 16px; }
  .board-row .total { font-size: 28px; }
  .board-row .delta { font-size: 19px; }
  .board-row .verdict { display: none; }
}
.next { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700;
  flex: none; white-space: nowrap; }
/* Auf dem Handy ist für „Nächste Runde in" kein Platz — nur der Countdown. */
.game.mobile .next { font-size: 0; gap: 0; }
.game.mobile .next b { font-size: 22px; width: 44px; height: 44px; }
.next b { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; color: var(--magenta);
  border: 3px solid var(--magenta); box-shadow: 0 0 20px rgba(232, 121, 249, .5); animation: tick 1s infinite; }
@keyframes tick { 50% { transform: scale(1.12); } }
.verdict { font-size: 13px; font-weight: 700; }
.verdict.ok { color: var(--lime); }
.verdict.no { color: var(--red); }
.verdict.none { color: var(--muted); }
.delta { font-weight: 900; font-size: 20px; }
.delta.ok { color: var(--lime); text-shadow: 0 0 12px rgba(163, 230, 53, .5); }
.delta.no { color: var(--muted); }

.verdict-hero { text-align: center; margin: 24px 0; }
.verdict-hero .big { font-size: 56px; display: inline-block; animation: reveal-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.verdict-hero .txt { font-weight: 900; font-size: 22px; font-style: italic; text-transform: uppercase; letter-spacing: .06em; }
.verdict-hero.ok .txt { color: var(--lime); text-shadow: 0 0 18px rgba(163, 230, 53, .5); }
.verdict-hero.no .txt { color: var(--red); }
.verdict-hero.none .txt { color: var(--muted); }
.verdict-hero .bonus { margin-top: 8px; display: inline-block; background: rgba(232, 121, 249, .12);
  border: 1px solid var(--magenta); border-radius: 999px; padding: 6px 16px;
  font-weight: 700; font-size: 14px; color: var(--magenta); }
.verdict-hero .bonus.miss { background: rgba(139, 148, 179, .1); border-color: var(--line); color: var(--muted); }
.reveal-answer { display: flex; align-items: center; gap: 16px; justify-content: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; max-width: 420px; margin: 0 auto; }
.reveal-answer .y { font-size: 34px; color: var(--lime); }
.reveal-answer .n { font-weight: 700; }
.reveal-answer .d { font-size: 13px; color: var(--muted); }

/* Konfetti + Spielende */
.confetti { pointer-events: none; }
.confetti i { position: fixed; top: -60px; width: 10px; height: 16px; border-radius: 2px; opacity: .85; animation: fall 3s linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
.confetti i:nth-child(1) { left: 8%; background: var(--cyan); animation-delay: .1s; }
.confetti i:nth-child(2) { left: 22%; background: var(--magenta); animation-delay: .9s; }
.confetti i:nth-child(3) { left: 36%; background: var(--lime); animation-delay: .4s; }
.confetti i:nth-child(4) { left: 52%; background: var(--amber); animation-delay: 1.4s; }
.confetti i:nth-child(5) { left: 66%; background: var(--pink); animation-delay: .7s; }
.confetti i:nth-child(6) { left: 80%; background: var(--cyan); animation-delay: 1.8s; }
.confetti i:nth-child(7) { left: 92%; background: var(--lime); animation-delay: .2s; }

.finished { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; text-align: center; padding: 32px; }
.finished h1 { font-size: 44px; color: var(--lime); text-shadow: 0 0 28px rgba(163, 230, 53, .5); }
.finished .sub { color: var(--muted); }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 20px; }
.step { width: 170px; border-radius: 16px 16px 0 0; background: var(--card); border: 1px solid var(--line);
  border-bottom: 0; padding-top: 16px; position: relative; }
.step .av { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--bg); margin-bottom: 8px; }
.step .n { font-weight: 900; font-size: 18px; }
.step .s { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.step .base { display: grid; place-items: center; font-size: 34px; font-weight: 900; font-style: italic; color: rgba(255, 255, 255, .25); }
.step.first { border-color: var(--amber); box-shadow: 0 0 40px rgba(251, 191, 36, .25); }
.step.first .crown { position: absolute; top: -38px; left: 50%; transform: translateX(-50%); font-size: 34px;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, .8)); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-6px); } }
.step.first .base { height: 150px; background: linear-gradient(180deg, rgba(251, 191, 36, .25), transparent); color: var(--amber); }
.step.second .base { height: 105px; background: linear-gradient(180deg, rgba(34, 211, 238, .18), transparent); }
.step.third .base { height: 72px; background: linear-gradient(180deg, rgba(232, 121, 249, .15), transparent); }
@media (max-width: 640px) { .step { width: 108px; } .step .n { font-size: 14px; } }
.finished .table { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 8px 20px; text-align: left; }
.finished .r { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.finished .r:last-child { border-bottom: 0; }
.finished .r .pos { width: 24px; color: var(--muted); font-weight: 900; }
.finished .r .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); }
.finished .r .score { margin-left: auto; font-weight: 900; color: var(--lime); }

@media (max-width: 900px) {
  .round-grid { grid-template-columns: 1fr; }
  .game { padding: 20px; }
  .reveal-panel .year { font-size: 64px; }
  .reveal-panel h1 { font-size: 28px; }
}

/* Host kann jederzeit abbrechen — dezent, damit es kein Fehlgriff wird. */
.end-game { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font: 700 12px/1 ui-sans-serif, system-ui; }
.end-game:hover { border-color: var(--red); color: var(--red); }

/* Endstand: vollständige Tabelle statt nur Top 3 */
.standings { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
.rank { display: grid; grid-template-columns: 34px 34px minmax(0, 1fr) 90px auto; align-items: center;
  gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; }
.rank .pos { font-weight: 900; font-size: 18px; color: var(--muted); text-align: center; }
.rank .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); }
.rank .name { font-weight: 700; font-size: 18px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .bar { height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.rank .bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta)); }
.rank .score { font-weight: 900; font-size: 26px; color: var(--lime); min-width: 42px; text-align: right; }
.rank.leader { border-color: var(--amber); box-shadow: 0 0 26px rgba(251, 191, 36, .22); }
.rank.leader .pos { color: var(--amber); }
.rank.leader .score { color: var(--amber); text-shadow: 0 0 14px rgba(251, 191, 36, .5); }
.rank.leader .bar i { background: linear-gradient(90deg, var(--amber), var(--lime)); }
@media (max-width: 560px) {
  .rank { grid-template-columns: 28px 28px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .rank .bar { display: none; }
  .rank .name { font-size: 15px; }
  .rank .score { font-size: 20px; }
}

/* Gezeichnete Avatare (app/assets/images/avatars/<name>.png) füllen den Kreis.
   Eingepasst statt formatfüllend wären sie deutlich kleiner — der leichte
   Beschnitt an den Rändern kostet weniger, als die Verkleinerung bringt.
   Die Spielerfarbe bleibt als Ring sichtbar: Bei neun Spielern unterscheidet
   sie schneller als die Figur. */
/* overflow: hidden ist Pflicht, nicht Kosmetik: iOS-Safari clippt border-radius
   auf einem <img> mit object-fit NICHT — ohne den Container-Clip ragen z. B.
   Hasenohren aus dem Kreis. Das Bild sitzt zentriert und leicht kleiner, seine
   Ecken werden so vom runden Container beschnitten. */
.av { background: var(--player); overflow: hidden; }
.av .avatar-art {
  width: calc(100% - 5px); height: calc(100% - 5px);
  border-radius: 50%; object-fit: cover; display: block;
}
