/* AM Concepts Adventskalender: Kalender als Wand, Türchen öffnen als Blatt von unten. Bewusst nur dunkel.
   Winter-Elemente aus Entwurf „Winternacht“ (Andreas, 24.11.2026), aber in den bisherigen Farben:
   fallender Schnee im Hintergrund (schnee.mjs), Schneehauben auf den Türchen, Schneewehe unten. */
:root {
  --bg: #0d1614; --flaeche: #15211e; --flaeche-2: #1c2b27; --linie: #2a3b36;
  --text: #eef4f1; --leise: #9cb0aa; --mint: #63d2bf; --mint-dunkel: #1f5d52; --gold: #e8b44a; --rot: #ff8a80;
  --serif: "Playfair Display", Georgia, serif; --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "IBM Plex Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.45; padding: 16px 16px 48px; }
button { font: inherit; color: inherit; cursor: pointer; }
p, h1, h2, h3, ul, ol { margin: 0; }
a { color: var(--mint); }
.seite { position: relative; z-index: 1; max-width: 860px; margin-inline: auto; display: flex; flex-direction: column; gap: 22px; }

/* Schnee: Canvas hinter allem, Kästen und Türchen decken ihn ab */
#schnee { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body::after {
  content: ""; position: relative; z-index: 1; display: block; height: 90px; margin: 40px -16px -48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 90' preserveAspectRatio='none'%3E%3Cpath d='M0 36C60 6 120 18 180 32S300 46 390 16V90H0Z' fill='%23e9f1fb'/%3E%3Cpath d='M0 58C80 42 170 52 240 62S340 72 390 54V90H0Z' fill='%23fff'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}

.kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.marke { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.marke b { background: var(--text); color: var(--bg); padding: 3px 5px; }
.lose { display: flex; align-items: center; gap: 8px; background: var(--flaeche); border: 1.5px solid var(--gold); border-radius: 999px; padding: 6px 14px 6px 10px; font-weight: 700; }
.lose svg { flex: none; }
.lose strong { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; color: var(--gold); }
.lose.plus { animation: plus .6s; }
@keyframes plus { 40% { transform: scale(1.12); } }

.hinweis { border: 1.5px dashed var(--gold); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--gold); }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(38px, 9vw, 64px); line-height: 1.02; text-wrap: balance; }
h1 em { color: var(--mint); }
.zielgruppe { font-weight: 700; max-width: 46ch; margin-top: -10px; }
.zielgruppe + .unterzeile { margin-top: -12px; }
.unterzeile { color: var(--leise); max-width: 46ch; }

/* Gutschein-Karte: Hauptpreis groß oben (Andreas, 25.11.2026). Eigene Zeichnung, kein Europa-Park-Logo. */
.gutschein {
  position: relative; display: flex; align-items: center; gap: 14px; max-width: 560px;
  padding: 18px 16px 18px 20px; border-radius: 18px; border: 2px solid var(--gold);
  background: linear-gradient(135deg, #2d2410 0%, #1c2b27 55%, #15211e 100%);
  box-shadow: 0 0 0 4px rgba(232, 180, 74, .12), 0 10px 34px rgba(232, 180, 74, .18); overflow: hidden;
}
.gutschein::after {   /* Glanz, der alle paar Sekunden drüberläuft */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 240, 200, .16) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 150% 0; animation: glanz 5s ease-in-out 1s infinite;
}
@keyframes glanz { 0%, 55% { background-position: 150% 0; } 100% { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .gutschein::after { animation: none; display: none; } }
.gs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.gs-betrag { font-family: var(--mono); font-weight: 600; font-size: clamp(54px, 15vw, 76px); line-height: 1; color: var(--gold); letter-spacing: -.02em; text-shadow: 0 0 24px rgba(232, 180, 74, .35); }
.gs-was { font-weight: 700; font-size: clamp(15px, 4.4vw, 21px); white-space: nowrap; }
.gs-klein { font-size: 13px; color: var(--leise); margin-top: 4px; }
.gs-bild { flex: none; width: clamp(78px, 22vw, 140px); height: auto; padding-left: 14px; border-left: 2px dashed rgba(232, 180, 74, .45); }
.gs-schleife { position: absolute; top: -2px; right: 10px; width: 48px; height: auto; }

/* Türchen */
.wand { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; padding-top: 4px; }
@media (min-width: 640px) { .wand { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 10px; } }
.wand > p { grid-column: 1 / -1; }
.tuer {
  position: relative; aspect-ratio: 1 / 1.08; border-radius: 12px; border: 1.5px solid var(--linie);
  background: linear-gradient(160deg, var(--flaeche-2), var(--flaeche)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0;
}
.tuer .nr { font-family: var(--serif); font-size: clamp(28px, 8vw, 40px); line-height: 1; }
.tuer .info { font-size: 11px; color: var(--leise); font-family: var(--mono); letter-spacing: .04em; }
.tuer::before {   /* Schneehaube */
  content: ""; position: absolute; left: -1px; right: -1px; top: -7px; height: 17px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 16' preserveAspectRatio='none'%3E%3Cpath d='M2 12C2 4 10 3 18 6C26 0 36 2 44 6C52 1 64 2 70 6C78 3 84 6 82 12Z' fill='%23f4f8fd'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.tuer.zu { opacity: .65; cursor: default; }
.tuer.offen { border-color: var(--gold); box-shadow: 0 0 18px rgba(232, 180, 74, .3); }
.tuer.offen .info { color: var(--gold); }
.tuer.geloest { background: var(--mint-dunkel); border-color: var(--mint); }
.tuer.geloest .info { color: var(--mint); }
.tuer.sonntag::after { content: ""; position: absolute; top: 15px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.tuer:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.label { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mint); }
.kasten { background: var(--flaeche); border: 1.5px solid var(--linie); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.preise { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.preis { background: var(--flaeche-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.preis b { font-family: var(--mono); color: var(--gold); }
.preis span { font-size: 14px; color: var(--leise); }
.klein { font-size: 13px; color: var(--leise); }
.code { font-family: var(--mono); font-weight: 600; color: var(--gold); }

/* Blatt */
.blatt-hg { position: fixed; inset: 0; background: rgba(5, 10, 9, .72); z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.blatt {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--flaeche); border-top: 3px solid var(--gold); border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px;
}
@media (min-width: 640px) { .blatt-hg { align-items: center; } .blatt { border-radius: 20px; border: 1.5px solid var(--linie); border-top: 3px solid var(--gold); } }
.blatt > * { flex-shrink: 0; }
.blatt-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.blatt-kopf h2 { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1; }
.zu-knopf { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--linie); background: var(--flaeche-2); font-size: 20px; line-height: 1; }
.sorte { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.frage { font-size: 18px; }
.haupt { display: inline-block; background: var(--mint); color: #06211c; border: 0; border-radius: 999px; padding: 13px 24px; font-weight: 700; align-self: flex-start; text-decoration: none; }
.haupt:disabled { opacity: .45; cursor: default; }
.neben { display: inline-block; background: transparent; color: var(--mint); border: 2px solid var(--mint); border-radius: 999px; padding: 11px 20px; font-weight: 700; text-decoration: none; align-self: flex-start; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.ergebnis { border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--flaeche-2); }
.ergebnis.gut { border: 1.5px solid var(--mint); }
.ergebnis.mittel { border: 1.5px solid var(--gold); }
.ergebnis strong { font-size: 17px; }
.gewinn { font-family: var(--mono); font-weight: 600; color: var(--gold); }
.fehler { color: var(--rot); font-size: 14px; }

/* Messschieber */
.messschieber { overflow-x: auto; border-radius: 10px; background: #8fa4ae; -webkit-overflow-scrolling: touch; }
.messschieber svg { display: block; }
.eingabe-zeile { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.eingabe-zeile input { font: inherit; font-family: var(--mono); font-size: 22px; font-weight: 600; width: 9ch; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--linie); background: var(--bg); color: var(--text); }
.eingabe-zeile span { align-self: center; color: var(--leise); }

/* Schätzfrage */
.regler { display: flex; flex-direction: column; gap: 8px; }
.regler output { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.regler input { width: 100%; accent-color: var(--gold); height: 32px; }
.skala { display: flex; justify-content: space-between; font-size: 12px; color: var(--leise); font-family: var(--mono); }
.balken-spanne { position: relative; height: 34px; background: var(--flaeche-2); border-radius: 8px; }
.balken-spanne i { position: absolute; top: 0; bottom: 0; border-radius: 8px; }
.balken-spanne .weit { background: rgba(99, 210, 191, .22); }
.balken-spanne .meist { background: rgba(99, 210, 191, .6); }
.balken-spanne .du { width: 3px; background: var(--gold); border-radius: 0; }

/* Auswahl (Quiz, Abstimmung) */
.wahl { display: flex; flex-direction: column; gap: 6px; }
.wahl button { text-align: left; background: var(--flaeche-2); border: 2px solid transparent; border-radius: 12px; padding: 12px 14px; font-weight: 500; position: relative; overflow: hidden; }
.wahl button:disabled { cursor: default; }
.wahl button.gewaehlt { border-color: var(--gold); }
.wahl button.richtig { border-color: var(--mint); }
.wahl button.vorgemerkt { border-color: var(--text); }
.wahl button .anteil { position: absolute; inset: 0 auto 0 0; background: rgba(99, 210, 191, .18); z-index: 0; }
.wahl button span { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 10px; }
.wahl button em { font-style: normal; font-family: var(--mono); color: var(--mint); }
.finale-frage { display: flex; flex-direction: column; gap: 8px; }

/* Wortfelder */
.feld { position: relative; display: grid; aspect-ratio: 1; width: 100%; max-width: 420px; align-self: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.feld svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.feld svg line { stroke-linecap: round; stroke-width: .76; }
.feld .f { stroke: var(--mint-dunkel); }
.feld .s { stroke: #6b5a1c; }
.feld.daneben { animation: wackeln .25s; }
@keyframes wackeln { 30% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }
.zelle { position: relative; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; font-size: clamp(15px, 4.6vw, 22px); }
.woerter { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--mono); font-weight: 600; }
.woerter li.ja { color: var(--mint); text-decoration: line-through; }
.zeitzeile { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 14px; color: var(--leise); }
.zeitzeile strong { color: var(--text); font-size: 18px; }
.zeitbalken { height: 6px; border-radius: 3px; background: var(--flaeche-2); overflow: hidden; }
.zeitbalken i { display: block; height: 100%; background: var(--mint); transform-origin: left; }
.zeitbalken.knapp i { background: var(--rot); }

/* Maßarbeit */
.bank { background: var(--flaeche-2); border-radius: 16px; padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 16px; touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
.ablesung { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ablesung span { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--leise); }
.ablesung strong { font-family: var(--mono); font-weight: 600; font-size: clamp(24px, 7vw, 34px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ablesung .soll strong { color: var(--mint); }
.strecke { position: relative; height: 76px; margin-top: 20px; }
.schiene { position: absolute; inset: 0; border: 2px solid var(--linie); border-radius: 6px; overflow: hidden; background: var(--bg);
  background-image: repeating-linear-gradient(to right, var(--linie) 0 1px, transparent 1px 10%); }
.stueck { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: #7d8c8e; }
.stueck.rueck { left: auto; right: 0; }
.stueck.gut { background: var(--mint); }
.stueck.schlecht { background: var(--rot); }
.sollmarke { position: absolute; top: -20px; bottom: -6px; width: 0; border-left: 3px solid var(--gold); }
.sollmarke::before { content: "Soll"; position: absolute; top: -2px; left: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.sollmarke.links::before { left: auto; right: 9px; }
.urteil { min-height: 48px; display: flex; flex-direction: column; gap: 2px; }
.urteil strong { font-size: 18px; }
.urteil.gut strong { color: var(--mint); }
.urteil.schlecht strong { color: var(--rot); }
.urteil span { font-family: var(--mono); font-size: 13px; color: var(--leise); font-variant-numeric: tabular-nums; }

/* Ausschuss-Band */
.band { position: relative; width: 100%; max-width: 380px; align-self: center; aspect-ratio: 3 / 4; max-height: 58dvh; border-radius: 16px; overflow: hidden; background: var(--flaeche-2);
  background-image: linear-gradient(to right, transparent calc(33.33% - 1px), var(--linie) calc(33.33% - 1px) 33.33%, transparent 33.33% calc(66.66% - 1px), var(--linie) calc(66.66% - 1px) 66.66%, transparent 66.66%);
  touch-action: none; user-select: none; -webkit-user-select: none; }
.band.blitz { animation: blitz .3s; }
@keyframes blitz { 0%, 60% { box-shadow: inset 0 0 0 6px var(--rot); } 100% { box-shadow: inset 0 0 0 0 var(--rot); } }
.teil { position: absolute; top: 0; width: 22%; aspect-ratio: 1; cursor: pointer; will-change: transform; }
.teil svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.teil.treffer { opacity: .3; }
.teil.treffer .k { fill: var(--mint); }
.teil.falsch .k { fill: var(--rot); }
.k { fill: #a9b6b8; }
.l { fill: var(--flaeche-2); }
.r { stroke: var(--flaeche-2); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.legende { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 340px; }
.legende figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.legende svg { width: 100%; max-width: 52px; height: auto; }
.legende .l { fill: var(--flaeche); }
.legende .r { stroke: var(--flaeche); }
.legende figcaption { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--leise); text-align: center; }
.legende figure:first-child figcaption { color: var(--mint); }
.rot { color: var(--rot) !important; letter-spacing: .1em; }

/* Anmeldung */
#anmeldung input[type="text"] { font: inherit; width: 100%; padding: 12px 14px; border-radius: 999px; border: 2px solid var(--linie); background: var(--bg); color: var(--text); }
.haken { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.haken input { width: 22px; height: 22px; accent-color: var(--mint); margin: 0; flex: none; }
