/* Aussehen wie der Flyer zum Glühweinstand: Nachtblau, Rot, Creme und Gold,
   Tannenzweige mit goldenen Kugeln, kräftige Blockschrift und eine Schreibschrift. */

@font-face { font-family: "Besley"; src: url("fonts/Besley-VF.ttf"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Playball"; src: url("fonts/Playball-Regular.ttf"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --f-nacht: #1D2A5C;
  --f-nacht-tief: #10184A;
  --f-rot: #B8191F;
  --f-rot-tief: #97131A;
  --f-creme: #F3EFE6;
  --f-creme-hell: #FBF3DC;
  --f-papier: #FBF8F0;
  --f-gold: #E6BE5A;
  --f-gold-hell: #F6DC8C;
  --f-tanne: #1F7A3D;
  --f-tanne-tief: #14592C;
  --f-matt: #59628A;
  --f-linie: rgba(29, 42, 92, 0.16);
  --f-fokus: #00A2E8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--f-creme);
  color: var(--f-nacht);
  font-family: "Besley", Georgia, serif;
  font-size: 18px;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  min-height: 100vh;
  min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.block { font-family: "Besley", Georgia, serif; font-weight: 800; line-height: 1.05; }
.schwung { font-family: "Playball", Georgia, serif; font-weight: 400; }
.matt { color: var(--f-matt); }
.ziffern { font-variant-numeric: lining-nums; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0.45em 1.2em;
  border: 2px solid var(--f-nacht); border-radius: 12px;
  background: var(--f-papier); color: var(--f-nacht);
  font-weight: 700; font-size: 1em;
  cursor: pointer; touch-action: manipulation; transition: transform 0.12s, filter 0.12s;
  transition: transform 0.06s, filter 0.06s;
}
.knopf:active:not(:disabled) { transform: translateY(2px); filter: brightness(0.92); }
.knopf:disabled { opacity: 0.45; cursor: default; }
/* Wer mit Tastatur bedient, sieht an jedem Knopf, Link und Feld, wo er gerade steht. */
button:focus-visible, a:focus-visible, input:focus-visible, canvas:focus-visible { outline: 3px solid var(--f-fokus); outline-offset: 3px; }
.knopf.gefahr { border-color: var(--f-rot); color: var(--f-rot); }
/* Mit Maus oder Trackpad antwortet jeder Knopf auf den Zeiger. */
@media (hover: hover) {
  .knopf:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(0.96); }
  .reiter button:hover:not([aria-selected="true"]) { background: rgba(251, 243, 220, 0.16); }
  .verkauf-knopf:hover { filter: brightness(1.06); }
  .liste .eintrag:hover { background: rgba(29, 42, 92, 0.05); }
}
.knopf.rot { background: var(--f-rot); border-color: var(--f-rot); color: var(--f-creme-hell); }
.knopf.leise { min-height: 44px; border-width: 1.5px; border-color: rgba(29, 42, 92, 0.4); background: transparent; font-weight: 600; }

/* ============================================================ STAND */

/* Kopf: Nachthimmel mit Schnee, oben eine Girlande aus Tannenzweigen, unten eine Schneekante */
.stand .kopf {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px;
  padding: calc(64px + env(safe-area-inset-top)) max(clamp(16px, 3vw, 32px), env(safe-area-inset-right)) 34px max(clamp(16px, 3vw, 32px), env(safe-area-inset-left));
  color: var(--f-creme-hell);
  background:
    url("motive/girlande.svg") top center / max(100%, 900px) auto no-repeat,
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 1.3px, transparent 1.9px) 12px 20px / 130px 110px,
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1.6px) 44px 64px / 90px 70px,
    radial-gradient(circle, rgba(255, 255, 255, 0.6) 1.7px, transparent 2.3px) 96px 8px / 170px 90px,
    linear-gradient(180deg, #10184A 0%, #1F2A68 65%, #353577 100%);
}
.stand .kopf::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 20' preserveAspectRatio='none'%3E%3Cpath fill='%23F3EFE6' d='M0,20V11C140,1 300,17 480,9S820,2 1000,10s150,4 200,1V20Z'/%3E%3C/svg%3E") bottom center / 100% 100% no-repeat;
}
.marke { display: flex; align-items: center; gap: 14px; }
.marke .logo { display: block; height: 44px; width: auto; }
.marke .schwung { font-size: 23px; line-height: 1; color: var(--f-gold-hell); }
.marke h1 { font-size: clamp(24px, 3.3vw, 36px); letter-spacing: -0.02em; white-space: nowrap; margin-top: 4px; }

.reiter { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.13); }
.reiter button {
  min-height: 46px; padding: 0 1em; border: 0; border-radius: 999px; background: transparent; color: var(--f-creme-hell);
  font-weight: 700; font-size: 0.94em; cursor: pointer; touch-action: manipulation;
}
.reiter button[aria-selected="true"] { background: var(--f-creme-hell); color: var(--f-nacht); }
/* Am Handy: Titel und Reiter verkleinern, damit beides in die Breite passt */
@media (max-width: 560px) {
  .marke .logo { height: 32px; }
  .marke .schwung { font-size: 19px; }
  .marke h1 { font-size: calc((100vw - 150px) / 10.6); }
  .reiter { width: 100%; }
  .reiter button { flex: 1; padding: 0 0.3em; font-size: 0.8em; }
}

.hinweis {
  margin: 16px max(clamp(16px, 3vw, 32px), env(safe-area-inset-right)) 0 max(clamp(16px, 3vw, 32px), env(safe-area-inset-left)); padding: 12px 16px;
  border: 1.5px solid var(--f-linie); border-left: 8px solid var(--f-gold); border-radius: 14px; background: var(--f-papier);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
}
.hinweis.warn { border-left-color: var(--f-rot); }

.stand main {
  padding: clamp(16px, 3vw, 32px) max(clamp(16px, 3vw, 32px), env(safe-area-inset-right)) calc(clamp(16px, 3vw, 32px) + env(safe-area-inset-bottom)) max(clamp(16px, 3vw, 32px), env(safe-area-inset-left));
  max-width: 1100px; margin: 0 auto;
}
.stand h2 { font-size: 0.95em; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--f-rot); margin: 30px 0 10px; }
.stand p.text { max-width: 62ch; margin: 8px 0; }

/* Verkauf: der große Knopf ist ein rotes Ticket wie am Flyer */
.verkauf-knopf {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: clamp(180px, 32vh, 300px);
  border: 0; border-radius: 24px;
  background: linear-gradient(180deg, #C4222A, var(--f-rot) 55%, var(--f-rot-tief)); color: var(--f-creme-hell);
  cursor: pointer; touch-action: manipulation;
  transition: transform 0.06s, filter 0.06s;
  -webkit-mask: radial-gradient(circle 20px at 0 50%, transparent 19px, #000 19.6px), radial-gradient(circle 20px at 100% 50%, transparent 19px, #000 19.6px);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 20px at 0 50%, transparent 19px, #000 19.6px), radial-gradient(circle 20px at 100% 50%, transparent 19px, #000 19.6px);
  mask-composite: intersect;
}
.verkauf-knopf::before { content: ""; position: absolute; inset: 14px 34px; border: 3px dashed rgba(251, 243, 220, 0.5); border-radius: 14px; pointer-events: none; }
.verkauf-knopf:active { transform: scale(0.99); filter: brightness(0.9); }
.verkauf-knopf:focus-visible { outline: 4px solid var(--f-gold-hell); outline-offset: -10px; }
.verkauf-knopf .block { font-size: clamp(34px, 9.2vw, 96px); }
.verkauf-knopf .preis { font-family: "Playball", Georgia, serif; font-size: clamp(24px, 3.6vw, 38px); line-height: 1; color: var(--f-gold-hell); }

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 14px; margin-top: 28px; }
.zahl { border: 1.5px solid var(--f-linie); border-radius: 16px; padding: 12px 16px; background: var(--f-papier); }
.zahl b { display: block; font-weight: 800; font-size: 40px; line-height: 1.05; }
.zahl span { font-size: 0.82em; color: var(--f-matt); }

.liste { list-style: none; border: 1.5px solid var(--f-linie); border-radius: 16px; background: var(--f-papier); overflow: hidden; }
.liste li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.liste li + li { border-top: 1px solid var(--f-linie); }
.liste .leer { color: var(--f-matt); }
.liste li:has(> .eintrag) { padding: 0; }
.liste .eintrag {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 10px 16px;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
}
.liste .eintrag::after { content: "›"; font-size: 1.3em; line-height: 1; color: var(--f-matt); }
.liste .eintrag:focus-visible { outline-offset: -4px; }
.liste .storno { text-decoration: line-through; color: var(--f-matt); }
.liste .nr { font-weight: 800; min-width: 5.2em; }
.liste .zeit { color: var(--f-matt); min-width: 3.6em; }
.liste .erg { flex: 1; }
.marke-g { color: var(--f-rot); font-weight: 700; }

/* Ziehung */
.toepfe { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.topf { border: 1.5px solid var(--f-linie); border-top: 8px solid var(--f-nacht); border-radius: 18px; background: var(--f-papier); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.topf h3 { font-size: 1.2em; font-weight: 800; line-height: 1.2; }
.topf .gezogen { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.topf .gezogen li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; border-top: 2px dashed rgba(29, 42, 92, 0.3); padding-top: 8px; }
.topf .gezogen .nummer { font-weight: 800; font-size: 32px; line-height: 1.05; white-space: nowrap; color: var(--f-rot); }
.topf .gezogen .knopf { white-space: nowrap; padding: 0.3em 0.9em; font-size: 0.9em; }
.topf .knopf { margin-top: auto; }

.zeile { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 10px 0; }
.feld { display: flex; flex-direction: column; gap: 4px; font-size: 0.86em; font-weight: 700; }
.feld input {
  min-height: 48px; padding: 0 12px; font-size: 1.15em; font-weight: 500;
  border: 2px solid rgba(29, 42, 92, 0.35); border-radius: 10px; background: #fff; width: 9em;
}
.feld input.breit { width: min(32em, 80vw); }
.feld input.kurz { width: 6em; }
.ergebnis-zeile { margin-top: 8px; padding: 12px 16px; border: 1.5px solid var(--f-linie); border-left: 10px solid var(--f-matt); border-radius: 14px; background: var(--f-papier); font-weight: 700; }
.ergebnis-zeile.gut { border-left-color: var(--f-tanne); }
.ergebnis-zeile.schlecht { border-left-color: var(--f-rot); }

.tabelle { width: 100%; max-width: 640px; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: 6px 10px 6px 0; }
.tabelle th { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.06em; color: var(--f-matt); }
.tabelle td.r, .tabelle th.r { text-align: right; }
.tabelle input { min-height: 44px; width: 5em; padding: 0 10px; border: 2px solid rgba(29, 42, 92, 0.35); border-radius: 10px; background: #fff; }

/* Dialoge */
dialog {
  margin: auto; border: 0; border-radius: 24px;
  background: var(--f-creme); color: var(--f-nacht);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  max-width: min(94vw, 900px); max-height: 94vh; overflow: auto;
}
dialog::backdrop { background: rgba(16, 24, 74, 0.93); }
.frage { padding: 26px; width: min(88vw, 480px); }
.frage p { font-size: 1.08em; margin-bottom: 22px; }
.frage .zeile { justify-content: flex-end; margin: 0; }

.los-dialog { padding: clamp(16px, 3vw, 28px); display: grid; grid-template-columns: minmax(240px, 1.1fr) minmax(240px, 1fr); gap: clamp(16px, 3vw, 32px); align-items: stretch; }
@media (max-width: 640px) { .los-dialog { grid-template-columns: 1fr; } }
.qr-seite { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.qr-seite .block { font-size: clamp(28px, 4.2vw, 42px); color: var(--f-rot); }
.qr { width: min(100%, 52vh, 420px); aspect-ratio: 1; padding: 10px; border: 1.5px solid var(--f-linie); border-radius: 16px; background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.link-zeile { font-size: 0.76em; color: var(--f-matt); word-break: break-all; max-width: 34em; }
.seller-seite { display: flex; flex-direction: column; gap: 14px; }
.losnummer { font-size: 1.05em; }
.losnummer b { font-weight: 800; font-size: 50px; line-height: 1.05; display: block; }
/* Das Ergebnis am Tablet liegt wie am Handy unter Goldfolie und zeigt danach dieselben Farben. */
.verdeckt {
  flex: 1; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 16px; text-align: center; padding: 16px; color: var(--f-nacht);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 9px, transparent 9px 34px), linear-gradient(135deg, #F3D98C, #D7AC4A 50%, #EDCF7C);
  outline: 2.5px dashed rgba(29, 42, 92, 0.5); outline-offset: -10px;
  cursor: pointer; touch-action: manipulation; font-weight: 800; font-size: 1.15em;
}
.verdeckt small { font-weight: 600; font-size: 0.8em; }
.verdeckt .block { font-size: clamp(26px, 3.6vw, 40px); }
.verdeckt.offen { outline: 0; cursor: default; font-size: 1em; background: #E6E0D1; box-shadow: inset 0 0 0 3px rgba(29, 42, 92, 0.14); }
.verdeckt.offen .block { color: var(--f-rot); }
.verdeckt.offen.gewinn { box-shadow: none; color: var(--f-creme-hell); background: linear-gradient(180deg, #131B50, #2B3076); }
.verdeckt.offen.gewinn .block { color: var(--f-gold-hell); }
.verdeckt.offen[data-art="gluehwein"] { background: linear-gradient(180deg, #C4222A, var(--f-rot-tief)); }
.verdeckt.offen[data-art="bier"] { background: linear-gradient(180deg, #22843F, var(--f-tanne-tief)); }
.seller-seite .zeile { margin: 0; }
.seller-seite .zeile .knopf.rot { flex: 1; }

/* ============================================================== LOS */
/* Die Los-Seite fürs Kundenhandy folgt dem Flyer zum Glühweinstand:
   Nachthimmel mit Schnee, Tannenzweige mit goldenen Kugeln, rotes Ticket, cremefarbenes Papier. */

body.los {
  position: relative; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center;
  padding: env(safe-area-inset-top) max(14px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: none; color: var(--f-creme-hell);
  font-size: 17px;
}
html:has(body.los) { background: #10184A; }
body.los::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #10184A 0%, #1B2562 42%, #3A3776 80%, #5C4E85 100%);
}
/* Schnee: drei Lagen Punkte, die langsam nach unten wandern */
body.los::after {
  content: ""; position: fixed; inset: -220px 0 0 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.3px, transparent 1.9px),
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 1.9px, transparent 2.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.6) 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.4) 1.5px, transparent 2.1px);
  /* Die Höhen teilen alle 220px – so läuft der Schneefall ohne Sprung durch. */
  background-size: 130px 110px, 90px 220px, 170px 220px, 210px 110px, 70px 220px;
  background-position: 12px 20px, 44px 64px, 96px 8px, 150px 86px, 30px 150px;
  animation: schneien 16s linear infinite;
}
@keyframes schneien { to { transform: translateY(220px); } }

.los .zweige { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 520px); pointer-events: none; }

.los-kopf { position: relative; width: min(100%, 430px); padding: 104px 6px 20px; }
.los-kopf .schwung { color: var(--f-gold-hell); font-size: 27px; line-height: 1; }
/* Der Titel soll in eine Zeile passen: Die Schrift ist rund 10,4-mal so breit wie hoch. */
.los-kopf h1 { font-size: min(38px, calc((100vw - 44px) / 10.4)); letter-spacing: -0.02em; white-space: nowrap; color: var(--f-creme-hell); margin-top: 6px; }
.los-kopf .verein { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-top: 10px; font-weight: 600; font-size: 14px; color: var(--f-creme-hell); }
.los-kopf .logo { display: block; height: 32px; width: auto; }

.los .karte { width: min(100%, 430px); border-radius: 20px; background: var(--f-creme); color: var(--f-nacht); overflow: hidden; }
/* Kerben links und rechts an der Abrisslinie, wie beim Ticket am Flyer */
.los .ticket {
  --kerbe: 80px;
  -webkit-mask: radial-gradient(circle 13px at 0 var(--kerbe), transparent 12px, #000 12.6px), radial-gradient(circle 13px at 100% var(--kerbe), transparent 12px, #000 12.6px);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 13px at 0 var(--kerbe), transparent 12px, #000 12.6px), radial-gradient(circle 13px at 100% var(--kerbe), transparent 12px, #000 12.6px);
  mask-composite: intersect;
}
.abriss {
  position: relative; height: 80px; padding: 0 clamp(16px, 6vw, 24px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--f-rot); color: var(--f-creme-hell);
}
.abriss::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; border-bottom: 3px dashed rgba(251, 243, 220, 0.7); }
.abriss .wort { display: flex; align-items: center; gap: 8px; font-size: clamp(20px, 6.4vw, 26px); white-space: nowrap; color: var(--f-gold-hell); }
.abriss .wort::before { content: "★"; font-style: normal; font-size: 0.75em; color: var(--f-gold); }
.abriss .block { font-size: clamp(28px, 9vw, 36px); white-space: nowrap; }
.los .ziffern { font-variant-numeric: lining-nums; }

.rubbelfeld { position: relative; margin: 20px 18px 18px; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--f-nacht); }
/* Wer nach dem Aufdecken weiterrubbelt, soll weder Text markieren noch das Flaschenbild "anfassen". */
.rubbelfeld, .rubbelfeld * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rubbelfeld img { pointer-events: none; -webkit-user-drag: none; }
.rubbelfeld canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity 0.45s, transform 0.45s; }
.rubbelfeld canvas.weg { opacity: 0; transform: scale(1.18); pointer-events: none; }

/* Das Ergebnis unter der Rubbelschicht. data-art: imTopf · gewonnen · gluehwein · bier · niete · nichtGezogen */
.ergebnis {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; text-align: center;
  background: linear-gradient(180deg, #131B50, #2B3076); color: var(--f-creme-hell);
}
.ergebnis .motiv { width: 40%; height: 40%; }
.ergebnis .bild { display: block; width: 100%; height: 100%; overflow: visible; }
.ergebnis .worte { display: flex; flex-direction: column; align-items: inherit; gap: 6px; }
.ergebnis .dach { font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8em; }
.ergebnis .gross { font-size: clamp(30px, 10vw, 44px); color: var(--f-gold-hell); text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
.ergebnis .gross.lang { font-size: clamp(19px, 6.2vw, 27px); }
.ergebnis .klein { font-weight: 600; font-size: 0.95em; }

.ergebnis[data-art="gluehwein"] { background: linear-gradient(180deg, #C4222A, var(--f-rot-tief)); }
.ergebnis[data-art="gluehwein"] .motiv { width: 44%; height: 44%; }

.ergebnis[data-art="bier"] { flex-direction: row; gap: 14px; padding: 16px 18px; text-align: left; background: linear-gradient(180deg, #22843F, var(--f-tanne-tief)); }
.ergebnis[data-art="bier"] .motiv { flex: none; width: 34%; height: 90%; padding: 12px 8px 8px; border-radius: 999px 999px 16px 16px; background: #F8F3E7; }
.ergebnis[data-art="bier"] .motiv img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ergebnis[data-art="bier"] .worte { align-items: flex-start; min-width: 0; }
.ergebnis[data-art="bier"] .gross { font-size: clamp(22px, 7.4vw, 32px); }

.ergebnis[data-stufe="still"] { background: #E6E0D1; color: var(--f-nacht); box-shadow: inset 0 0 0 3px rgba(29, 42, 92, 0.14); border-radius: 16px; }
.ergebnis[data-stufe="still"] .motiv { width: 62%; height: 36%; }
.ergebnis[data-stufe="still"] .gross { color: var(--f-rot); }

.antippen { display: block; margin: -4px auto 12px; min-height: 44px; padding: 0 14px; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; color: rgba(29, 42, 92, 0.75); cursor: pointer; }
.details { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.details .merken { border-left: 6px solid var(--f-gold); border-radius: 10px; padding: 10px 14px; background: #FBF8F0; font-size: 0.95em; }
.details a:not(.knopf) { color: var(--f-rot); font-weight: 700; overflow-wrap: anywhere; }
.klein-text { font-size: 0.86em; color: var(--f-matt); }
/* Kasten "Nicht bei der Ziehung dabei?": Los per E-Mail oder WhatsApp an den Verein schicken */
.kontakt { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; border: 1.5px solid var(--f-linie); border-radius: 14px; background: var(--f-papier); }
.kontakt h2 { font-size: 1.02em; font-weight: 800; line-height: 1.25; }
.kontakt .knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.kontakt .knopf { flex: 1 1 auto; min-height: 48px; text-decoration: none; font-size: 0.94em; }
.kontakt small { font-size: 0.84em; line-height: 1.35; color: var(--f-matt); }

.fuss { border-top: 3px dashed rgba(29, 42, 92, 0.3); padding: 12px 22px 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 0.9em; }
.fuss b { letter-spacing: 0.14em; }
.fehler { padding: 30px 22px; text-align: center; }
.fehler .block { font-size: 36px; color: var(--f-rot); margin-bottom: 10px; }

#konfetti { position: fixed; inset: 0; z-index: 5; width: 100%; height: 100%; pointer-events: none; }
/* Folienkrümel, die beim Rubbeln wegfliegen – über dem Los, damit sie auch über den Rand des Feldes fallen können. */
#spaene { position: fixed; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; }

/* ---------------------------------------------- Auftritt nach dem Rubbeln */
/* .offen     = Ergebnis ist aufgedeckt (auch beim späteren Wiederöffnen): ruhige Dauerbewegung.
   .auftritt  = gerade eben aufgerubbelt: einmaliger Auftritt. Ausgelöst in los.js.
   data-stufe = still (Niete) · klein (Glühwein) · gross (im Lostopf) · haupt (gezogen). */

.ergebnis > * { position: relative; z-index: 1; }
.ergebnis .gross, .ergebnis .motiv { will-change: transform; }

/* Strahlen hinter dem Stern */
.ergebnis[data-stufe="gross"]::before, .ergebnis[data-stufe="haupt"]::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1 / 1; margin: -80% 0 0 -80%;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.075) 0 9deg, transparent 9deg 18deg);
  opacity: 0; transition: opacity 0.7s;
}
.ergebnis.offen[data-stufe="gross"]::before, .ergebnis.offen[data-stufe="haupt"]::before {
  opacity: 1; animation: drehen 50s linear infinite;
}

/* Funkelnde Sternchen rund um den Preis */
.ergebnis .funken { position: absolute; inset: 0; display: none; }
.ergebnis.offen[data-stufe="gross"] .funken, .ergebnis.offen[data-stufe="haupt"] .funken { display: block; }
.funken i {
  position: absolute; width: 20px; height: 20px; background: var(--f-gold-hell); transform: scale(0);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: funkeln 2.2s ease-in-out infinite;
}
.funken i:nth-child(1) { left: 9%;  top: 12%; animation-delay: 0s; }
.funken i:nth-child(2) { left: 80%; top: 9%;  animation-delay: 0.5s; width: 26px; height: 26px; }
.funken i:nth-child(3) { left: 87%; top: 44%; animation-delay: 1.1s; width: 14px; height: 14px; }
.funken i:nth-child(4) { left: 6%;  top: 50%; animation-delay: 1.6s; width: 14px; height: 14px; }
.funken i:nth-child(5) { left: 14%; top: 84%; animation-delay: 0.8s; width: 24px; height: 24px; }
.funken i:nth-child(6) { left: 78%; top: 82%; animation-delay: 0.2s; }
.funken i:nth-child(7) { left: 26%; top: 24%; animation-delay: 1.3s; width: 12px; height: 12px; background: #fff; }
.funken i:nth-child(8) { left: 68%; top: 27%; animation-delay: 1.9s; width: 12px; height: 12px; background: #fff; }

/* Lostopf und Hauptgewinn: Stern wirbelt, Preis wird aufgestempelt, die Karte bebt kurz */
.ergebnis.offen[data-stufe="gross"] .motiv, .ergebnis.offen[data-stufe="haupt"] .motiv { animation: pulsieren 2.4s ease-in-out infinite; }
.ergebnis.auftritt[data-stufe="gross"] .motiv, .ergebnis.auftritt[data-stufe="haupt"] .motiv {
  animation: wirbeln 1s cubic-bezier(0.3, 0.7, 0.3, 1), pulsieren 2.4s ease-in-out 1s infinite;
}
.ergebnis.auftritt[data-stufe="gross"] .gross { animation: stempeln 0.75s cubic-bezier(0.3, 0.7, 0.3, 1) 0.15s; }
.ergebnis.auftritt[data-stufe="haupt"] .gross { animation: stempeln 0.75s cubic-bezier(0.3, 0.7, 0.3, 1) 0.15s, pulsieren 1.6s ease-in-out 0.9s infinite; }
.ergebnis.offen[data-stufe="haupt"]:not(.auftritt) .gross { animation: pulsieren 1.6s ease-in-out infinite; }
.karte.wumms { animation: beben 0.55s 0.2s; }

/* Glühwein und Schnaitl: Häferl oder Flasche prosten zu; Dampf steigt, Bläschen perlen */
.dampf { transform-box: fill-box; transform-origin: 50% 100%; }
.dampf:nth-child(2) { animation-delay: -0.9s; }
.dampf:nth-child(3) { animation-delay: -1.8s; }
.ergebnis.offen .dampf { animation-name: dampfen; animation-duration: 2.7s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.ergebnis[data-stufe="klein"] .motiv { transform-origin: 50% 85%; }
.ergebnis .blasen { position: absolute; inset: 0; z-index: 0; display: none; }
.ergebnis.offen[data-art="bier"] .blasen { display: block; }
.blasen i { position: absolute; bottom: -14px; width: 10px; height: 10px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 50%; opacity: 0; animation: perlen 3.4s ease-in infinite; }
.blasen i:nth-child(1) { left: 50%; animation-delay: 0s; }
.blasen i:nth-child(2) { left: 62%; animation-delay: -1.2s; width: 7px; height: 7px; }
.blasen i:nth-child(3) { left: 74%; animation-delay: -2.3s; width: 13px; height: 13px; }
.blasen i:nth-child(4) { left: 86%; animation-delay: -0.6s; width: 6px; height: 6px; }
.blasen i:nth-child(5) { left: 93%; animation-delay: -1.8s; }
.blasen i:nth-child(6) { left: 56%; animation-delay: -2.9s; width: 6px; height: 6px; }
.ergebnis.auftritt[data-stufe="klein"] .motiv { animation: prosten 1.3s ease-in-out; }
.ergebnis.auftritt[data-stufe="klein"] .gross { animation: stempeln-leicht 0.6s ease-out 0.2s; }

/* Niete: der Zweig wiegt sich, das Wort setzt sich mit einem kleinen Ruck */
.ergebnis[data-stufe="still"] .motiv { transform-origin: 8% 80%; }
.ergebnis.offen[data-stufe="still"] .motiv { animation: wiegen-leise 5s ease-in-out infinite; }
.ergebnis.auftritt[data-stufe="still"] .motiv { animation: wiegen 1.8s ease-in-out, wiegen-leise 5s ease-in-out 1.8s infinite; }
.ergebnis.auftritt[data-stufe="still"] .gross { animation: stempeln-leicht 0.5s ease-out 0.1s; }

/* Der Text unter dem Los rückt nach */
.details.auftritt > * { animation: nachruecken 0.5s ease-out both; }
.details.auftritt > :nth-child(1) { animation-delay: 0.35s; }
.details.auftritt > :nth-child(2) { animation-delay: 0.5s; }
.details.auftritt > :nth-child(3) { animation-delay: 0.65s; }
.details.auftritt > :nth-child(n+4) { animation-delay: 0.8s; }

@keyframes drehen { to { transform: rotate(360deg); } }
@keyframes funkeln {
  0%, 100% { transform: scale(0) rotate(0deg); }
  50% { transform: scale(1) rotate(45deg); }
}
@keyframes pulsieren {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@keyframes wirbeln {
  0% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.9) rotate(140deg); }
  70% { transform: scale(0.9) rotate(340deg); }
  100% { transform: scale(1) rotate(360deg); }
}
@keyframes stempeln {
  0% { transform: scale(1); }
  25% { transform: scale(1.5) rotate(-5deg); }
  55% { transform: scale(0.92) rotate(1.5deg); }
  78% { transform: scale(1.05) rotate(-0.5deg); }
  100% { transform: scale(1); }
}
@keyframes stempeln-leicht {
  0% { transform: scale(1); }
  35% { transform: scale(1.16) rotate(-3deg); }
  70% { transform: scale(0.98) rotate(0.5deg); }
  100% { transform: scale(1); }
}
@keyframes beben {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-6px, 3px) rotate(-0.7deg); }
  30% { transform: translate(6px, -3px) rotate(0.7deg); }
  45% { transform: translate(-4px, 2px) rotate(-0.4deg); }
  60% { transform: translate(3px, -1px) rotate(0.3deg); }
  80% { transform: translate(-1px, 1px); }
}
@keyframes dampfen {
  0%, 100% { transform: skewX(0deg) scaleY(1); }
  25% { transform: skewX(6deg) scaleY(1.07); }
  75% { transform: skewX(-6deg) scaleY(0.95); }
}
@keyframes perlen {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate(6px, -180px); }
  100% { transform: translate(-4px, -360px); opacity: 0; }
}
@keyframes prosten {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  18% { transform: translateY(-12%) rotate(-11deg); }
  40% { transform: translateY(-4%) rotate(9deg); }
  60% { transform: translateY(0) rotate(-5deg); }
  80% { transform: rotate(2deg); }
}
@keyframes wiegen {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-10deg); }
  38% { transform: rotate(7deg); }
  60% { transform: rotate(-4deg); }
  80% { transform: rotate(2deg); }
}
@keyframes wiegen-leise {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.5deg); }
}
@keyframes nachruecken {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

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

.nur-hier { margin: 0.8rem 0.2rem 0; }

/* ---------- Mehrere Geräte: Zustand der gemeinsamen Liste ---------- */
.hinweis.status { font-size: 0.86em; padding-top: 8px; padding-bottom: 8px; border-left-color: var(--f-tanne); }
.hinweis.status.warn { border-left-color: var(--f-rot); }
.liste .spaet { color: var(--f-rot); font-weight: 700; }
.liste .geraet { font-weight: 800; flex: 1; }
.frage .feld { margin-bottom: 18px; }
.frage .feld input.breit { width: 100%; }
.team-dialog { padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 30em; }
.team-dialog .block { font-size: clamp(24px, 4vw, 34px); color: var(--f-rot); }
.team-dialog .qr { width: min(100%, 46vh, 320px); }
.team-code { font-weight: 800; font-size: clamp(18px, 4.6vw, 28px); letter-spacing: 0.06em; white-space: nowrap; }
@media (max-width: 560px) {
  #geraeteListe li { flex-wrap: wrap; gap: 2px 12px; }
  #geraeteListe .geraet { flex-basis: 100%; }
}

/* ---------- Ziehung als Auftritt ---------- */
#ziehDialog {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0;
  background: radial-gradient(ellipse at 50% 40%, #2B3A8C 0%, var(--f-nacht) 45%, var(--f-nacht-tief) 100%); color: var(--f-creme-hell);
}
.zieh-buehne { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 2.2vh, 26px); padding: 24px; text-align: center; }
.zieh-buehne .schwung { font-size: clamp(26px, 5vw, 50px); color: var(--f-gold-hell); line-height: 1; }
.zieh-preis { font-size: clamp(28px, 6vw, 66px); line-height: 1.1; max-width: 18ch; }
.zieh-nr { font-size: clamp(16px, 2.6vw, 28px); letter-spacing: 0.18em; text-transform: uppercase; color: var(--f-gold-hell); margin-top: clamp(6px, 2vh, 22px); }
.zieh-zahl {
  font-weight: 800; font-size: clamp(88px, 25vw, 300px); line-height: 1; color: var(--f-gold);
  font-variant-numeric: lining-nums; text-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);   /* ohne "tabular": sonst wirken die Nullen dünn */
}
.zieh-zahl.rollt { opacity: 0.82; filter: blur(1.2px); animation: ziehZittern 0.11s linear infinite; }
.zieh-zahl.steht { color: #FFF4CC; text-shadow: 0 0 46px rgba(246, 220, 140, 0.85), 0 6px 0 rgba(0, 0, 0, 0.28); animation: ziehKnall 0.75s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.zieh-unter { font-size: clamp(17px, 3vw, 30px); min-height: 1.4em; }
.zieh-buehne .zeile { justify-content: center; margin-top: clamp(8px, 2.5vh, 30px); }
.knopf.gross { min-height: 64px; padding: 0.5em 1.8em; font-size: clamp(20px, 3vw, 28px); }
#ziehDialog .knopf:not(.rot) { background: transparent; color: var(--f-creme-hell); border-color: rgba(251, 243, 220, 0.7); }
@keyframes ziehZittern { 0% { transform: translateY(-2px); } 50% { transform: translateY(2px); } 100% { transform: translateY(-2px); } }
@keyframes ziehKnall { 0% { transform: scale(0.55); opacity: 0.3; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Am Handy: Knöpfe und breite Felder über die ganze Breite ---------- */
@media (max-width: 560px) {
  .stand main .zeile > .knopf { flex: 1 1 100%; }
  .stand main .zeile > .feld:has(input.breit) { flex: 1 1 100%; }
  .stand main .feld input.breit { width: 100%; }
  .frage .zeile > .knopf { flex: 1 1 0; }
  .seller-seite .zeile > .knopf { flex: 1 1 0; }
}
