/* Stations-Awards – Preisverleihung: Warten, Enthüllung, Medaille, Ruhmeshalle.
   Zeitliche Animationen der Enthüllung bekommen ihre Verzögerung aus show.js (data-bei),
   deshalb stehen hier nur Name, Dauer, Verlauf und Füllmodus. */

:root {
  --kerze: #ffd98a;
  --praeg: #6e4c13;
  --praeg-tief: #4b3108;
  --relief: #8d6420;
  --praeg-lesbar: #3d2705; /* kleine Schrift auf Gold: mindestens 4,5:1 */
}

/* ---------- Medaille ---------- */

.medaille {
  --d: min(80vw, 330px);
  --band-h: calc(var(--d) * .25);
  --band-dunkel: #7d1f2c;
  --band-hell: #b3313e;
  --band-akzent: #f2d58a;
  position: relative;
  width: var(--d);
  padding-top: var(--band-h);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* Band: zwei Riemen, die sich in der Öse kreuzen und nach oben ins Dunkel laufen. */
.band {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 50%;
  width: calc(var(--d) * .64);
  height: calc(var(--band-h) + var(--d) * .07);
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 48%);
}
.riemen {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: calc(var(--d) * .19);
  height: 115%;
  transform-origin: 50% 100%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .12) 36%, rgba(255, 255, 255, 0) 56%, rgba(0, 0, 0, .25)),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .1) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, var(--band-dunkel) 0 15%, var(--band-akzent) 15% 21%, var(--band-hell) 21% 79%, var(--band-akzent) 79% 85%, var(--band-dunkel) 85%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.riemen.links { margin-left: calc(var(--d) * -.155); transform: skewX(27deg); }
.riemen.rechts { margin-left: calc(var(--d) * -.035); transform: skewX(-27deg); }

/* Öse am oberen Rand der Medaille */
.oese {
  position: absolute;
  z-index: 3;
  top: calc(var(--band-h) - var(--d) * .06);
  left: 50%;
  width: calc(var(--d) * .11);
  height: calc(var(--d) * .11);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, transparent 50%, #7a5418 53%, #f6dc8f 62%, #c99a3c 78%, #7a5418 100%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45));
  pointer-events: none;
}

.medaille-huelle {
  position: relative;
  z-index: 2;
  width: var(--d);
  height: var(--d);
  perspective: calc(var(--d) * 4);
}
.medaille-koerper {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(.35, .1, .15, 1);
}
.medaille.hinten-oben .medaille-koerper { transform: rotateY(180deg); }
.medaille-koerper[data-ruhe="hinten"] > .vorne,
.medaille-koerper[data-ruhe="vorne"] > .hinten { visibility: hidden; }

/* Eine Seite: gegossener Rand (Kegelverlauf), darin das vertiefte Feld (::before). */
.seite {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background:
    radial-gradient(circle closest-side, transparent 88%, rgba(70, 44, 6, .45) 100%),
    conic-gradient(from 200deg, #8c6420, #e2bd62 9%, #fff1c2 15%, #d0a344 23%, #7d5a1c 36%, #b5872f 47%, #f3d27e 57%, #fff5d2 61%, #b0832c 71%, #7a5418 83%, #cfa246 93%, #8c6420);
  box-shadow:
    0 calc(var(--d) * .05) calc(var(--d) * .12) rgba(0, 0, 0, .55),
    0 0 calc(var(--d) * .25) rgba(242, 213, 138, .16);
}
.seite.hinten { transform: rotateY(180deg); }
.seite::before {
  content: "";
  position: absolute;
  inset: 7.5%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 250, 235, .06) 0 1px, rgba(80, 50, 8, .035) 1px 2.5px),
    radial-gradient(circle at 36% 28%, #fdeab0 0%, #efcf7c 20%, #dab055 48%, #c0913a 76%, #a37829 100%);
  box-shadow:
    inset 0 calc(var(--d) * .012) calc(var(--d) * .02) rgba(70, 44, 6, .6),
    inset 0 calc(var(--d) * -.006) calc(var(--d) * .004) rgba(255, 243, 205, .7),
    0 0 0 calc(var(--d) * .003) rgba(255, 240, 195, .5);
}
.seite.hinten::before {
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 250, 235, .06) 0 1px, rgba(80, 50, 8, .035) 1px 2.5px),
    radial-gradient(circle at 62% 30%, #fbe5a6 0%, #ecca76 22%, #d6ab50 50%, #bd8e37 78%, #a07627 100%);
}

/* Geprägter Schmuck: Perlkranz, Umschrift, Lorbeer */
.praegung {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(255, 243, 205, .55));
}
.perlen, .perlen-schatten { fill: none; stroke-linecap: round; stroke-dasharray: 0 4.6338; }
.perlen-schatten { stroke: #6e4c13; stroke-width: 2.6; opacity: .7; }
.perlen { stroke: #f4d98f; stroke-width: 2.1; }
.lorbeer-stiel { fill: none; stroke: var(--relief); stroke-width: 1.3; stroke-linecap: round; }
.lorbeer-blatt { fill: var(--relief); }
.umschrift {
  font-family: var(--serif);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .8px;
  fill: var(--praeg);
}
.umschrift.unten { font-size: 8.6px; letter-spacing: 1.1px; }

/* Vorderseite */
.feld {
  position: absolute;
  inset: 19% 17% 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--d) * .016);
  text-align: center;
}
.medaille-emblem {
  flex: none;
  display: block;
  width: calc(var(--d) * .18);
  height: calc(var(--d) * .18);
  color: var(--relief);
  filter: drop-shadow(-.6px -.6px 0 rgba(255, 246, 214, .85)) drop-shadow(.8px 1px 0 rgba(80, 52, 8, .5));
}
.medaille-emblem svg { display: block; width: 100%; height: 100%; }
.medaille-name {
  margin: 0;
  width: 100%;
  font-family: var(--serif);
  font-size: calc(var(--d) * .12);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: .01em;
  color: var(--praeg-tief);
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 242, 200, .8), 0 -1px 0 rgba(80, 50, 8, .3);
}
.medaille-name .wort { display: inline-block; white-space: nowrap; }
.zusammen { white-space: nowrap; }
.medaille-name .z { display: inline-block; }
.medaille-name.leer { font-weight: 600; font-style: italic; }
.medaille-spruch {
  margin: 0;
  max-width: 94%;
  font-family: var(--serif);
  font-style: italic;
  font-size: calc(var(--d) * .046);
  line-height: 1.25;
  color: var(--praeg-lesbar);
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 242, 200, .65);
}

/* Glanzlicht, das über die Vorderseite streicht */
.glanz {
  position: absolute;
  inset: -10%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 251, 235, .6) 50%, transparent 62%);
  transform: translateX(-125%);
  pointer-events: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
@keyframes medaille-glanz {
  from { transform: translateX(-125%); }
  to { transform: translateX(125%); }
}

/* Rückseite: Gravur in Kreisform */
.gravur-feld { position: absolute; inset: 12.5%; }
.gravur-feld .rund {
  float: left;
  width: 50%;
  height: 100%;
  shape-outside: radial-gradient(ellipse 100% 50% at 100% 50%, transparent 98%, #000 100%);
  shape-margin: calc(var(--d) * .012);
}
.gravur-feld .rund.rechts {
  float: right;
  shape-outside: radial-gradient(ellipse 100% 50% at 0% 50%, transparent 98%, #000 100%);
}
.gravur-luft { display: block; height: 0; }
.medaille.gravur-eng .hinten .umschrift.unten { display: none; }
.medaille.gravur-eng .gravur-feld { inset: 9.5%; }
.medaille.gravur-voll .gravur-feld { overflow: hidden; }
.medaille-gravur {
  margin: 0;
  font-family: var(--serif);
  font-size: calc(var(--d) * .045);
  line-height: 1.3;
  text-align: center;
  color: var(--praeg-lesbar);
  -webkit-hyphens: auto;
  hyphens: auto;
  text-shadow: 0 1px 0 rgba(255, 242, 200, .7);
}

/* ---------- Mulde mit Countdown (nur Enthüllung) ---------- */

.platz {
  position: absolute;
  z-index: 1;
  top: var(--band-h);
  left: 0;
  width: var(--d);
  height: var(--d);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #1c2f5a, #0a1428 72%);
  box-shadow:
    inset 0 0 0 1px rgba(242, 213, 138, .2),
    inset 0 calc(var(--d) * .03) calc(var(--d) * .08) rgba(0, 0, 0, .55),
    0 0 calc(var(--d) * .1) rgba(0, 0, 0, .3);
  pointer-events: none;
  animation: weg .45s ease-in both;
}
.platz > * { grid-area: 1 / 1; }
.platz-glut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 138, .55), rgba(242, 180, 80, .16) 55%, transparent 72%);
  opacity: 0;
  animation: glut 1s linear 3 both;
}
.platz-emblem {
  width: calc(var(--d) * .32);
  height: calc(var(--d) * .32);
  color: rgba(242, 213, 138, .3);
  animation: weg .6s ease both;
}
.platz-emblem svg { display: block; width: 100%; height: 100%; }
.platz-ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-spur { fill: none; stroke: rgba(242, 213, 138, .16); stroke-width: 1.5; }
.ring-fuellung {
  fill: none;
  stroke: var(--gold-hell);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 609.5;
  stroke-dashoffset: 609.5;
  animation: ring-fuellen 3s linear both;
}
.zahl {
  font-family: var(--serif);
  font-size: calc(var(--d) * .5);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  line-height: 1;
  color: var(--gold-hell);
  text-shadow: 0 0 calc(var(--d) * .08) rgba(255, 217, 138, .55);
  opacity: 0;
  animation: zahl 1s cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes weg { from { opacity: 1; } to { opacity: 0; } }
@keyframes ring-fuellen { from { stroke-dashoffset: 609.5; } to { stroke-dashoffset: 0; } }
@keyframes glut {
  0% { opacity: 0; animation-timing-function: cubic-bezier(.3, 0, .4, 1); }
  12% { opacity: 1; animation-timing-function: cubic-bezier(.2, .5, .3, 1); }
  100% { opacity: 0; }
}
@keyframes zahl {
  0% { opacity: 0; transform: scale(1.45); }
  12% { opacity: 1; transform: scale(1); }
  78% { opacity: 1; transform: scale(.97); }
  100% { opacity: 0; transform: scale(.9); }
}

/* ---------- Enthüllung ---------- */

.show { align-items: center; gap: 0; text-align: center; }
.show-kopf { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 36ch; }
.show-zaehler { margin: 0; color: var(--nebel); font-size: .9375rem; letter-spacing: .01em; }
.show-titel {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 7.8vw, 2.375rem);
  line-height: 1.06;
  color: var(--gold-hell);
  text-wrap: balance;
}
.show-frage {
  margin: 6px 0 0;
  font-size: 1.0625rem;
  line-height: 1.42;
  text-wrap: pretty;
  animation: zuruecktreten .9s ease both;
}
@keyframes zuruecktreten { from { opacity: 1; } to { opacity: .5; } }

.show-buehne { display: grid; place-items: center; width: 100%; padding: 18px 0 8px; }

/* Medaille erscheint mit leichtem Nachfedern */
.show .medaille-huelle { animation: erscheinen 1.1s linear both; }
@keyframes erscheinen {
  0% { opacity: 0; transform: scale(.55); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  45% { opacity: 1; transform: scale(1.06); animation-timing-function: cubic-bezier(.4, 0, .4, 1); }
  72% { transform: scale(.985); }
  100% { opacity: 1; transform: none; }
}
/* Der Name wird Buchstabe für Buchstabe geprägt: hell glühend, dann eingesunken. */
.show .medaille-name .z {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  animation: praegen .5s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes praegen {
  0% { opacity: 0; transform: scale(2.3); color: #fffaf0; }
  40% { opacity: 1; transform: scale(.93); color: #fff0c4; }
  70% { transform: scale(1.03); }
  100% { opacity: 1; transform: none; color: var(--praeg-tief); }
}
.show .medaille-spruch { animation: auftauchen-hoch .8s ease both; }
@keyframes auftauchen-hoch {
  from { opacity: 0; transform: translateY(.4em); }
  to { opacity: 1; transform: none; }
}
.show .glanz { animation: medaille-glanz 1.3s cubic-bezier(.4, 0, .2, 1) none, medaille-glanz 1.1s cubic-bezier(.4, 0, .2, 1) none; }

/* Die Gravur noch einmal gut lesbar: klappt ab dem Gravur-Schritt auf, die Medaille macht Platz. */
.show-gravur {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  visibility: hidden;
}
.show-gravur-text {
  min-height: 0;
  overflow: hidden;
  margin: 0 auto;
  padding-top: 12px;
  max-width: 34ch;
  font-size: 1.125rem;
  line-height: 1.45;
  text-align: left;
  color: var(--schnee);
  text-wrap: pretty;
}
.show[data-schritt="gravur"] .show-gravur {
  grid-template-rows: 1fr;
  visibility: visible;
  animation: gravur-auf .9s cubic-bezier(.3, .7, .2, 1) both;
}
@keyframes gravur-auf {
  from { grid-template-rows: 0fr; opacity: 0; }
  35% { opacity: 0; }
  to { grid-template-rows: 1fr; opacity: 1; }
}

.show-fuss { display: grid; place-items: center; width: 100%; min-height: 56px; }
.show-fuss > * { grid-area: 1 / 1; }
.show-hoch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--kerze);
  opacity: 0;
  animation: kurz-zeigen 3s linear both;
}
@keyframes kurz-zeigen {
  0% { opacity: 0; transform: translateY(6px); }
  10%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
.hoch-symbol { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.show-wenden { animation: auftauchen .6s ease both; }
@keyframes auftauchen {
  from { opacity: 0; visibility: hidden; }
  to { opacity: 1; visibility: visible; }
}
.show-ton { margin-top: 8px; min-height: 48px; font-size: .9375rem; }

/* Ganzes Handy als Lichtquelle: drei Pulse im Sekundentakt, dann ein warmer Blitz. */
.show-licht { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.show-licht > span { position: absolute; inset: 0; opacity: 0; }
.licht-puls {
  background: radial-gradient(ellipse 120% 85% at 50% 60%, rgba(255, 232, 178, .95) 0%, rgba(255, 196, 104, .78) 45%, rgba(226, 142, 58, .62) 100%);
  animation: licht-puls 1s linear 3 both;
}
.licht-blitz {
  background: radial-gradient(ellipse 130% 95% at 50% 60%, #fff6dc 0%, #ffe2a0 30%, #f2b860 66%, #b8742c 100%);
  animation: licht-blitz 1.8s linear both;
}
@keyframes licht-puls {
  0% { opacity: 0; animation-timing-function: cubic-bezier(.3, 0, .4, 1); }
  12% { opacity: .72; animation-timing-function: cubic-bezier(.2, .5, .3, 1); }
  100% { opacity: 0; }
}
@keyframes licht-blitz {
  0% { opacity: 0; animation-timing-function: ease-out; }
  6% { opacity: .95; animation-timing-function: linear; }
  16% { opacity: .85; animation-timing-function: cubic-bezier(.25, .6, .35, 1); }
  100% { opacity: 0; }
}

/* Handy: Bühne füllt den Bildschirm, die Medaille passt sich der freien Höhe an. */
.show.vollbild { min-height: calc(100vh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
@supports (height: 1svh) {
  .show.vollbild { min-height: calc(100svh - max(24px, env(safe-area-inset-top)) - 24px - env(safe-area-inset-bottom)); }
}
.show.vollbild .show-buehne { flex: 1 0 auto; }
@supports (container-type: size) {
  .show.vollbild .show-buehne { container-type: size; flex: 1 1 0; min-height: 260px; padding: 0; }
  .show.vollbild .medaille { --d: min(94cqw, 350px, calc(100cqh / 1.34)); }
  .show.vollbild[data-schritt="gravur"] .show-buehne { min-height: 120px; }
}
/* Kurze Bildschirme (die meisten Handys mit Browserleisten): Nach der Enthüllung ist die Frage
   beantwortet und macht Platz für Medaille und Gravur. */
@media (max-height: 760px) {
  .show.vollbild[data-schritt="medaille"] .show-frage,
  .show.vollbild[data-schritt="gravur"] .show-frage { display: none; }
}
@media (max-height: 640px) {
  .show.vollbild .show-buehne { min-height: 200px; }
  .show.vollbild[data-schritt="gravur"] .show-buehne { min-height: 110px; }
  .show-frage { font-size: 1rem; line-height: 1.38; }
  .show-gravur-text { padding-top: 8px; font-size: 1.0625rem; line-height: 1.42; }
}

/* Eigener Auftritt, wenn das Handy die Kategorie gerade bekommen hat (nicht synchron, nur Kosmetik) */
.show.einzug .show-kopf { animation: einzug-kopf .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.show.einzug .medaille { animation: einzug-medaille 1s cubic-bezier(.2, .7, .2, 1) .15s backwards; }
@keyframes einzug-kopf { from { opacity: 0; transform: translateY(10px); } }
@keyframes einzug-medaille { from { opacity: 0; transform: translateY(-24px); } }

/* Unsichtbare Uhr für den Gleichlauf (show.js vergleicht ihre Laufzeit mit der Serverzeit). */
.show-uhr {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  animation: show-uhr 600s linear both;
}
@keyframes show-uhr { from { opacity: 0; } to { opacity: 0; } }

/* ---------- Stichwahl entschieden: Zeile statt der Frage, Losrad statt 3·2·1 ---------- */

.show-frage.show-entscheidung {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.3;
  color: var(--kerze);
}
.los-name {
  max-width: 78%;
  font-family: var(--serif);
  font-size: calc(var(--d) * .13);
  font-weight: 600;
  line-height: 1.08;
  text-align: center;
  color: var(--gold-hell);
  overflow-wrap: anywhere;
  text-shadow: 0 0 calc(var(--d) * .05) rgba(255, 217, 138, .45);
  opacity: 0;
  animation: los-wechsel .1s linear none;
}
@keyframes los-wechsel {
  0% { opacity: 1; transform: translateY(-.32em); }
  35% { transform: none; }
  100% { opacity: 1; transform: none; }
}
.los-name.sieger { animation: los-sieger .6s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes los-sieger {
  0% { opacity: 0; transform: translateY(-.32em); }
  20% { opacity: 1; transform: scale(1.12); }
  55% { transform: scale(.97); }
  100% { opacity: 1; transform: none; color: #fff3cf; text-shadow: 0 0 calc(var(--d) * .08) rgba(255, 217, 138, .85); }
}
/* Beim Los schwillt das Licht langsam an, statt dreimal zu pulsieren. */
.licht-los {
  background: radial-gradient(ellipse 120% 85% at 50% 60%, rgba(255, 232, 178, .95) 0%, rgba(255, 196, 104, .78) 45%, rgba(226, 142, 58, .62) 100%);
  animation: licht-los 3s cubic-bezier(.5, 0, .9, .6) backwards; /* danach übernimmt der Blitz */
}
@keyframes licht-los { from { opacity: 0; } to { opacity: .55; } }

/* ---------- Stichwahl läuft: „Gleichstand!“ und Stimmzettel ---------- */

.medaille.nur-platz { cursor: default; }
.stichwahl-block { display: none; }
.show.stichwahl[data-schritt="stimmzettel"] .show-buehne,
.show.stichwahl[data-schritt="stimmzettel"] .show-frage { display: none; }
.show.stichwahl[data-schritt="stimmzettel"] .stichwahl-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 0 4px;
}
.show.stichwahl.vollbild[data-schritt="stimmzettel"] .stichwahl-block { flex: 1 0 auto; justify-content: center; }
.gleichstand-titel {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 12vw, 3.25rem);
  font-weight: 600;
  line-height: 1;
  color: var(--gold-hell);
  text-shadow: 0 0 24px rgba(242, 213, 138, .35);
  animation: gleichstand-auf .8s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes gleichstand-auf {
  0% { opacity: 0; transform: scale(1.6); letter-spacing: .08em; }
  45% { opacity: 1; transform: scale(.96); }
  100% { opacity: 1; transform: none; letter-spacing: 0; }
}
.gleichstand-text { margin: -4px 0 0; max-width: 28ch; font-size: 1.1875rem; line-height: 1.4; text-wrap: balance; }
.stichwahl-inhalt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  animation: einblenden-hoch .6s ease .35s both;
}
@keyframes einblenden-hoch { from { opacity: 0; transform: translateY(10px); } }
.show.stichwahl.spaet .gleichstand-titel,
.show.stichwahl.spaet .stichwahl-inhalt { animation: none; }

.stimmzettel {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 24rem;
}
.stimmzettel.viele { grid-template-columns: 1fr 1fr; max-width: none; gap: 8px; }
.kandidat {
  appearance: none;
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 0;
  border-radius: 16px;
  background: rgba(244, 246, 251, .07);
  box-shadow: inset 0 0 0 1.5px rgba(242, 213, 138, .4);
  color: var(--schnee);
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .1s ease;
}
.kandidat:active { transform: scale(.98); }
.kandidat-haken {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(242, 213, 138, .55);
  color: transparent;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
}
.kandidat-name { min-width: 0; overflow-wrap: anywhere; }
.kandidat.gewaehlt {
  background: linear-gradient(180deg, var(--gold-hell), var(--gold));
  color: var(--nacht-tief);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 6px 18px rgba(212, 168, 75, .3);
}
.kandidat.gewaehlt .kandidat-haken { background: var(--nacht-tief); color: var(--gold-hell); box-shadow: none; }
.stimmzettel.viele .kandidat { min-height: 56px; gap: 8px; padding: 8px 12px; font-size: 1.125rem; border-radius: 14px; }
.stimmzettel.viele .kandidat-haken { width: 24px; height: 24px; font-size: .875rem; }

.stimmzettel-fehler { margin: 0; color: var(--fehler); font-weight: 600; text-align: center; }
.stimmzettel-fehler[hidden] { display: none; }
/* Die eigene Wahl bleibt sichtbar, auch wenn eine lange Liste gescrollt wird. */
.stimmzettel-status {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 24rem;
  min-height: 64px;
  padding: 8px 8px 8px 16px;
  border-radius: 18px;
  background: rgba(9, 18, 37, .92);
  box-shadow: inset 0 0 0 1px rgba(242, 213, 138, .25), 0 8px 24px rgba(0, 0, 0, .35);
  text-align: left;
}
.stimmzettel.viele ~ .stimmzettel-status { max-width: none; }
.stimmzettel-text { min-width: 0; }
.stimmzettel-wahl { margin: 0; font-size: 1.1875rem; line-height: 1.3; }
.stimmzettel-wahl strong { font-family: var(--serif); font-size: 1.3125rem; color: var(--gold-hell); }
.stimmzettel-gespeichert { margin: 2px 0 0; color: var(--nebel); font-size: .9375rem; }
.stimmzettel-gespeichert:empty { display: none; }
.knopf.stimmzettel-aufheben { flex: none; min-height: 48px; padding: 0 18px; }
.knopf.stimmzettel-aufheben[hidden] { display: none; }

.stichwahl-namen {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  max-width: 30rem;
}
.stichwahl-namen li {
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(242, 213, 138, .4);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-hell);
}
.stichwahl-info { margin: 0; max-width: 30ch; font-size: 1.125rem; line-height: 1.4; text-wrap: balance; }
.stichwahl-zahl {
  margin: 0;
  color: var(--nebel);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

/* Kurze Bildschirme: Stimmzettel enger, damit drei Namen ohne Scrollen passen. */
@media (max-height: 640px) {
  .show.stichwahl[data-schritt="stimmzettel"] .stichwahl-block { gap: 10px; padding-top: 8px; }
  .gleichstand-titel { font-size: clamp(2.125rem, 10vw, 2.75rem); }
  .gleichstand-text { font-size: 1.0625rem; line-height: 1.35; }
  .stichwahl-inhalt, .stimmzettel { gap: 8px; }
  .kandidat { min-height: 56px; padding: 8px 16px; font-size: 1.25rem; }
  .stimmzettel-status { min-height: 60px; padding: 6px 6px 6px 14px; }
}

/* „Gleichstand!“ im Licht: zwei gleich helle Flecken, zweimal kurz (zu den beiden Stößen im Klang). */
.licht-gleich {
  background:
    radial-gradient(ellipse 75% 55% at 22% 55%, rgba(255, 228, 168, .95), rgba(255, 228, 168, 0) 72%),
    radial-gradient(ellipse 75% 55% at 78% 55%, rgba(255, 228, 168, .95), rgba(255, 228, 168, 0) 72%),
    rgba(150, 92, 38, .45);
  animation: licht-gleich 1.6s linear none;
}
@keyframes licht-gleich {
  0% { opacity: 0; }
  5% { opacity: .62; }
  13% { opacity: .18; }
  17% { opacity: .62; }
  32% { opacity: .3; }
  100% { opacity: 0; }
}

/* ---------- Warten ---------- */

.warten { align-items: center; gap: 18px; text-align: center; }
.warten .einleitung { max-width: 26ch; }
.warten-buehne { position: relative; display: grid; place-items: center; padding-top: 8px; }
.warten-buehne::before {
  content: "";
  position: absolute;
  inset: 10% -20% -10%;
  background: radial-gradient(closest-side, rgba(242, 213, 138, .2), transparent);
  animation: atmen 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes atmen { from { opacity: .35; } to { opacity: 1; } }
.medaille.mini.schmuck { --d: min(54vw, 220px); cursor: default; }
.medaille.mini.schmuck .medaille-emblem { width: calc(var(--d) * .3); height: calc(var(--d) * .3); }
.medaille.mini.schmuck .umschrift { display: inline; }
.medaille.mini.schmuck .umschrift.unten { font-size: 10.5px; letter-spacing: .8px; }
.medaille.mini.schmuck .glanz { animation: glanz-ruhig 9s ease-in-out 2s infinite; }
@keyframes glanz-ruhig {
  0% { transform: translateX(-125%); }
  20%, 100% { transform: translateX(125%); }
}
.warten-titel { margin-top: 4px; }
.warten-bereit { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; margin-top: 4px; }
.knopf.bereit-knopf { width: 100%; max-width: 22rem; min-height: 64px; font-size: 1.25rem; }
.warten-bereit .klein { text-align: center; }
.bereit-ok { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bereit-ok p { margin: 0; }
.bereit-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-hell);
}
.bereit-haken {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 1.1rem;
  color: var(--nacht-tief);
  background: linear-gradient(180deg, var(--gold-hell), var(--gold));
}
.bereit-hoch {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 30ch;
  font-size: 1.1875rem;
  line-height: 1.35;
  text-align: left;
}
.bereit-hoch .hoch-symbol { flex: none; color: var(--kerze); }

/* ---------- Ruhmeshalle ---------- */

.ruhm { gap: 26px; }
.ruhm-kopf { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ruhm-kopf .einleitung { max-width: 28ch; text-wrap: balance; }
.ruhm-wand {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 10px;
}
.ruhm-wand > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ruhm-eintrag {
  appearance: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 2px 4px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ruhm-eintrag .medaille { transition: transform .2s ease; }
.ruhm-eintrag:active .medaille { transform: scale(.96); }
.medaille.mini { --d: min(38vw, 160px); }
.medaille.mini .umschrift { display: none; }
.medaille.mini .feld { inset: 17% 15% 18%; }
.medaille.mini .medaille-emblem { width: calc(var(--d) * .17); height: calc(var(--d) * .17); }
.ruhm .glanz { animation: medaille-glanz 1.4s cubic-bezier(.4, 0, .2, 1); }
.ruhm-titel {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--gold-hell);
  text-wrap: balance;
  max-width: 100%;
}
.ruhm-art {
  margin: 0;
  color: var(--kerze);
  font-size: .875rem;
  font-style: italic;
}
.ruhm-spruch {
  font-family: var(--serif);
  font-size: .9375rem;
  font-style: italic;
  line-height: 1.3;
  color: var(--nebel);
  text-wrap: balance;
}

.ruhm-dialog {
  width: min(calc(100vw - 20px), 30rem);
  max-width: none;
  max-height: calc(100vh - 20px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(242, 213, 138, .22);
  border-radius: 22px;
  background: radial-gradient(120% 80% at 50% 0%, var(--flaeche-hell), var(--nacht) 60%, var(--nacht-tief));
  color: var(--schnee);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  overflow: auto;
}
.ruhm-dialog::backdrop { background: rgba(6, 12, 28, .8); }
.ruhm-dialog-inhalt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
}
.ruhm-dialog-titel { margin: 0; font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--gold-hell); text-wrap: balance; }
.ruhm-dialog-name { margin: 0; font-family: var(--serif); font-size: 1.75rem; font-weight: 700; line-height: 1.1; text-wrap: balance; }
.ruhm-dialog-buehne { padding: 10px 0 6px; }
.ruhm-dialog .medaille { --d: min(70vw, 290px); }
@supports (height: 1svh) {
  .ruhm-dialog { max-height: calc(100svh - 20px); }
  .ruhm-dialog .medaille { --d: min(70vw, 290px, 38svh); }
}
.ruhm-dialog[open] .medaille-huelle { animation: erscheinen .9s linear both; }
.ruhm-dialog-gravur {
  margin: 4px 0 0;
  max-width: 34ch;
  font-size: 1.125rem;
  line-height: 1.45;
  text-align: left;
  color: var(--schnee);
  text-wrap: pretty;
}
/* Knöpfe in einer Reihe und immer sichtbar, auch wenn der Inhalt gescrollt wird. */
.ruhm-dialog-knoepfe {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  gap: 10px;
  width: calc(100% + 32px);
  margin: 4px -16px calc(-18px - env(safe-area-inset-bottom));
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(9, 18, 37, 0), var(--nacht-tief) 14px);
}
.ruhm-dialog-knoepfe .knopf { flex: 1 1 0; min-width: 0; padding: 0 12px; white-space: nowrap; }

/* ---------- Ruhige Variante ---------- */

@media (prefers-reduced-motion: reduce) {
  .licht-puls { animation-name: licht-ruhig; animation-duration: 3s; animation-iteration-count: 1; animation-fill-mode: backwards; }
  .licht-blitz {
    background: radial-gradient(ellipse 120% 85% at 50% 60%, rgba(255, 222, 150, .9) 0%, rgba(245, 178, 82, .62) 45%, rgba(150, 80, 24, .5) 100%);
    animation-name: licht-ausklang;
    animation-duration: 2.4s;
    animation-fill-mode: forwards; /* vor 8 s nichts tönen */
  }
  .platz-glut, .show .glanz, .ruhm .glanz, .medaille.schmuck .glanz, .warten-buehne::before { animation: none; }
  .zahl { animation-name: einblenden-aus; }
  .show .medaille-huelle, .ruhm-dialog[open] .medaille-huelle { animation-name: einblenden; animation-duration: 1.2s; }
  .show .medaille-name .z { animation-name: einblenden; animation-duration: .4s; }
  .show .medaille-spruch { animation-name: einblenden; }
  .show-hoch { animation-name: einblenden-aus; }
  .show[data-schritt="gravur"] .show-gravur { animation: einblenden .6s ease both; }
  .licht-los { animation-name: licht-ruhig; animation-timing-function: ease; animation-fill-mode: backwards; }
  .licht-gleich { animation-name: licht-ruhig-kurz; }
  .los-name { animation-name: los-ruhig; }
  .los-name.sieger { animation-name: einblenden; animation-duration: .3s; }
  .gleichstand-titel, .stichwahl-inhalt { animation-name: einblenden; }
  .kandidat { transition: none; }
  .medaille-koerper, .ruhm-eintrag .medaille { transition: none; }
  .show.einzug .show-kopf, .show.einzug .medaille { animation: none; }
}
@keyframes licht-ruhig { from { opacity: 0; } to { opacity: .3; } }
@keyframes licht-ruhig-kurz { 0%, 100% { opacity: 0; } 30% { opacity: .3; } }
@keyframes los-ruhig { from, to { opacity: 1; } }
@keyframes licht-ausklang { from { opacity: .3; } to { opacity: 0; } }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes einblenden-aus {
  0% { opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { opacity: 0; }
}
