/* =============================================================================================
   Cyber Breach – gemeinsame Oberflächengrundlage (ui.css)
   Einbinden:  <link rel="stylesheet" href="/app/shared/ui.css">   (bringt das Stilsystem stil/stil.css mit)
   Doku:       docs/STIL.md (verbindlich, Stil „Telefon-OS“ nach Smartphone_UI.html) · docs/DESIGN.md (api/uhr/qr)
   Galerie:    /app/shared/demo.html
   Aufbau:     1 Schriften (lokal, OFL) · 2 Alt-Tokens → neue Tokens · 3 Farbwelten · 4 Grundlage
               5 Alt-Bausteine im neuen Stil (Klassennamen bleiben, damit nichts bricht)
   Regeln:     Markenverlauf ist Füllung für alles, was an/ausgewählt/primär ist. Überschriften ohne Versalien,
               Versalien nur in Kicker und Gruppentiteln. Chakra Petch nur für Kicker/Marke. Fingerziele ≥ 44 px
               (Alt-Bausteine 48 px). Animiert werden nur transform/opacity.
   ============================================================================================= */
@import url('stil/stil.css');

/* ---------- 1 Schriften (lokal, OFL 1.1 – Lizenztexte in schriften/; kein Internet am Spielort) ---------- */
/* Inter, variabel 100–900 (Achse wght 100–900 geprüft; 200/250 für große Ziffern) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(schriften/v20_UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7SUc.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(schriften/v20_UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Chakra Petch 500 / 600 / 700 (es gibt KEIN 400 und KEIN 800) – nur Kicker, Marke, Bühnentitel der Box */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(schriften/v13_cIflMapbsEk7TDLdtEz1BwkebIl1SZ_F7AY.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(schriften/v13_cIflMapbsEk7TDLdtEz1BwkebIl1R5_F.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(schriften/v13_cIflMapbsEk7TDLdtEz1BwkeQI51SZ_F7AY.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(schriften/v13_cIflMapbsEk7TDLdtEz1BwkeQI51R5_F.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(schriften/v13_cIflMapbsEk7TDLdtEz1BwkeJI91SZ_F7AY.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(schriften/v13_cIflMapbsEk7TDLdtEz1BwkeJI91R5_F.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* JetBrains Mono, variabel 400–800 (Achse geprüft) */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(schriften/v24_tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(schriften/v24_tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 2 Tokens ----------
   Neue Tokens (--ma/--mb/--mc, --f0…--f2, --t1…--t4, --rand, --glas…) stehen in stil/stil.css.
   Die alten Namen bleiben erhalten und zeigen auf die neuen. Sie werden an jeder Themenwurzel neu berechnet,
   damit .hell/.dunkel auch für Alt-Bausteine wirken. */
:root {
  --firma: #C8102E;                /* Hausfarbe der Kundenfirma (White-Label, nur Bildinhalt – STIL §5, R1) */
  --firma-auf: #FFFFFF;            /* Textfarbe auf --firma; bei hellen Firmenfarben auf #000 setzen */
}
:root { --f2v: #1d1d27; --f0v: #111118; }
.dunkel { --f2v: #1d1d27; --f0v: #111118; }
.hell { --f2v: #ffffff; --f0v: #f7f7fb; }
@media (prefers-color-scheme: light) { .thema-auto:not(.dunkel) { --f2v: #ffffff; --f0v: #f7f7fb; } }

:root, .dunkel, .hell, .thema-auto, .os, .welt-marke, .welt-firma {
  --bg: var(--f0);
  --surface: var(--f1v);
  --raised: var(--f2v);
  --muted: var(--f0v);
  --border: var(--rand);
  --fg: var(--t1);
  --fg-dim: var(--t2);
  --fg-faint: var(--t3);

  --marke-a: var(--ma);
  --marke-b: var(--mb);
  --kante: var(--verlauf-kante);
  --haarlinie: linear-gradient(90deg, var(--ma), var(--mb));
  --schimmer: radial-gradient(1100px 620px at 20% -12%, rgba(123,67,151,.28), transparent 62%),
              radial-gradient(900px 540px at 85% 110%, rgba(220,36,48,.2), transparent 60%);

  --ok-bg: var(--ok-flaeche);
  --warn-bg: var(--warn-flaeche);
  --bad-bg: var(--bad-flaeche);
  --info-bg: var(--info-flaeche);

  --akzent: var(--ma-text);        /* Fokusring, aktive Elemente */
  --primaer-bg: var(--verlauf);
  --primaer-fg: #FFFFFF;
  --primaer-schatten: var(--glut-pille);

  --anzeige: var(--anz);

  --s1: 8px; --s2: 12px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px;
  --r1: 10px; --r2: 16px; --r3: 22px;
  --ziel: 48px;
  --schatten: var(--schatten-karte);
  --dauer: 200ms;
  --kurve: var(--weich);
}

/* ---------- 3 Farbwelten ----------
   .welt-marke  Unity-Xcape-Welt (Vorgabe).
   .welt-firma  Geräte der Kundenfirma (Case-Tablet, Organizer): gleicher Glasstil, Firma nur als Bildinhalt
                (STIL §5: Systemakzent bleibt der Markenverlauf). Die frühere blaugraue Firmenwelt ist aufgehoben.
   .welt-fremd  Fremdoptik für die Köderseite „RestartKey“ (STIL §4.4, R2): hell, neutral, ohne Marke. */
.welt-fremd {
  --f0: #FFFFFF; --f1: rgba(0,0,0,.04); --f1v: #FFFFFF; --f2: #F3F4F6; --karte: #FFFFFF; --rand: #D1D5DB;
  --t1: #111827; --t2: #4B5563; --t3: #6B7280; --t4: #9CA3AF;
  --bg: #FFFFFF; --surface: #FFFFFF; --raised: #F3F4F6; --muted: #F9FAFB; --border: #D1D5DB;
  --fg: #111827; --fg-dim: #4B5563; --fg-faint: #6B7280;
  --akzent: #2563EB; --ma-text: #2563EB;
  --kante: linear-gradient(180deg, var(--border), var(--border));
  --haarlinie: linear-gradient(90deg, var(--border), var(--border));
  --primaer-bg: #2563EB; --primaer-fg: #FFFFFF; --primaer-schatten: none;
  --schimmer: none;
  --anzeige: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ok: #15803D; --warn: #B45309; --bad: #B91C1C; --info: #1D4ED8;
  --ok-text: #15803D; --warn-text: #B45309; --bad-text: #B91C1C; --info-text: #1D4ED8;
  --ok-bg: #DCFCE7; --warn-bg: #FEF3C7; --bad-bg: #FEE2E2; --info-bg: #DBEAFE;
  color-scheme: light;
}

/* ---------- 4 Grundlage ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
.welt-marke, .welt-firma, .welt-fremd { background-color: var(--bg); color: var(--fg); font-family: var(--ui); }
.mit-schimmer { background: var(--schimmer), var(--bg); background-attachment: fixed; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- 5 Alt-Bausteine im neuen Stil ---------- */
/* Typografie */
.titel, h1.titel, h2.titel {
  font-family: var(--ui); font-weight: 700; text-transform: none;
  letter-spacing: -.02em; line-height: 1.15; margin: 0 0 var(--s2);
}
.titel-gross { font-size: clamp(30px, 4.2vw, 48px); letter-spacing: -.03em; }
.titel-verlauf { background: var(--verlauf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker {
  display: inline-flex; align-items: center; gap: var(--s1);
  font: 600 12px/1.2 var(--anz); letter-spacing: .22em; text-transform: uppercase; color: var(--t3);
}
.cb-wortmarke {
  font-family: 'Chakra Petch', sans-serif; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; line-height: 1.15;
  background: var(--ux-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  /* Textfüllung eigens transparent: Kontextregeln wie „.hy .kicker { color }“ dürfen den Verlauf nicht überdecken */
  -webkit-text-fill-color: transparent;
}
.kicker svg { width: 13px; height: 13px; }
.kicker.linie::before { content: ""; width: 28px; height: 2px; background: var(--haarlinie); border-radius: 2px; }
.haarlinie { height: 1px; border: 0; background: var(--rand); margin: var(--s3) 0; }
.text-dim { color: var(--t2); }
.text-faint { color: var(--t3); }
.mono { font-family: var(--mono); }
.zahl { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.klein { font-size: 13px; }

/* Layout-Helfer */
.spalte { display: flex; flex-direction: column; gap: var(--s3); }
.reihe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.raster { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.handyspalte { /* Spielerhandy: eine Spalte, safe-area */
  max-width: 430px; margin: 0 auto;
  padding: max(var(--s3), env(safe-area-inset-top)) max(var(--s3), env(safe-area-inset-right))
           max(var(--s4), env(safe-area-inset-bottom)) max(var(--s3), env(safe-area-inset-left));
}
/* Kiosk-Bühne: skaliert in em an der Bühnenhöhe (Case 1280×800, Box 16:9). 1 em = 16 px bei 800 px Höhe. */
.buehne { container-type: size; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; position: relative; }
.buehne > .buehne-inhalt { font-size: 2cqh; width: 100%; height: 100%; }

/* Knöpfe: Pillenform, Druck federt */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: var(--ziel); min-width: var(--ziel); padding: 0 22px;
  border: 1px solid var(--rand); border-radius: var(--r-pille);
  background: var(--f1); color: var(--t1);
  font: 600 15px/1.15 var(--ui); letter-spacing: 0; text-decoration: none; text-transform: none;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: transform .18s var(--feder), background .2s, opacity .2s, box-shadow .2s;
}
.knopf:active:not(:disabled) { transform: scale(.96); }
.knopf:disabled, .knopf[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.knopf.primaer {
  min-height: 52px; padding: 0 24px;
  background: var(--primaer-bg); color: var(--primaer-fg); border-color: transparent;
  box-shadow: var(--glut-knopf); font-weight: 620; font-family: var(--ui);
}
.knopf.primaer:disabled { box-shadow: none; }
.knopf.gefahr { background: var(--bad-flaeche); border-color: transparent; color: var(--bad-text); }
/* ABWEICHUNG STIL §3.8 (.knopf.ok = --ok-verlauf): Weiß auf #3ddc84 hat nur 1,9:1 – darum Fläche + grüne Schrift */
.knopf.ok { background: var(--ok-flaeche); border-color: transparent; color: var(--ok-text); }
.knopf.leise { background: var(--f1); border-color: transparent; color: var(--t2); font-weight: 560; }
.knopf.geist { background: transparent; border-color: var(--rand); }
.knopf.gross { min-height: 64px; font-size: 18px; padding: 0 var(--s5); }
.knopf.klein { min-height: 44px; font-size: 14px; padding: 0 var(--s3); } /* dichte Listen (Leitung) */
.knopf.voll { width: 100%; }
/* Zwei-Tipp-Sicherung für Eingriffe: erster Tipp setzt .scharf, zweiter löst aus (Logik in der Oberfläche) */
.knopf.scharf { background: var(--bad-voll); border-color: transparent; color: #fff; box-shadow: 0 10px 26px -10px rgba(220,36,48,.7); animation: cb-puls 1s ease-in-out infinite; }
.knopf .zeichen, .knopf svg { width: 20px; height: 20px; flex: none; }

/* Karten: undurchsichtige Glasfarbe (sicher über Inhalt). Auf Tapeten .karte.glas (mit Blur) verwenden. */
.karte {
  position: relative; background: var(--f1v);
  border: 1px solid var(--rand); border-radius: var(--r-xl); padding: 20px;
}
.karte.glas { background: var(--glas1); border-color: var(--glas1-rand);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--schatten-karte); }
.karte.kante { overflow: hidden; padding-left: 24px; }
.karte.kante::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--verlauf-kante); }
.karte.gefahr { border-color: rgba(255,95,82,.35); background: radial-gradient(120% 90% at 0% 0%, rgba(220,36,48,.22), transparent 60%), var(--f1v); }
.karte.flach { background: var(--f1); }
.karte > .titel:first-child, .karte > .kicker:first-child { margin-top: 0; }

/* Pillen (Status), LEDs */
.pille {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pille);
  font: 600 12px/1.3 var(--ui); letter-spacing: .01em; background: var(--f1); color: var(--t2);
  border: 1px solid var(--rand); white-space: nowrap;
}
.pille svg { width: 13px; height: 13px; }
.pille.ok { background: var(--ok-flaeche); color: var(--ok-text); border-color: transparent; }
.pille.warn { background: var(--warn-flaeche); color: var(--warn-text); border-color: transparent; }
.pille.bad { background: var(--bad-flaeche); color: var(--bad-text); border-color: transparent; }
.pille.info { background: var(--info-flaeche); color: var(--info-text); border-color: transparent; }
.pille.an { background: var(--verlauf); color: #fff; border-color: transparent; }
.led { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--t4); flex: none; }
.led.gruen { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.led.rot { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.led.gelb { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.led.orange { background: var(--mc); box-shadow: 0 0 8px var(--mc); }

/* Plaketten: Kennzeichnung nicht bestätigter/simulierter Inhalte (nur Entwicklungsmodus und Leitung)
   .plakette-vorgabe     Wert ist eine VORGABE (vorgaben.php), nicht vom Nutzer bestätigt
   .plakette-simulation  Hardware/Adapter simuliert – nie als hardwaregeprüft ausgeben
   .plakette-platzhalter Medium/Text ist Platzhalter bzw. nicht freigegeben */
.plakette-vorgabe, .plakette-simulation, .plakette-platzhalter {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 9px;
  font: 600 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  border: 1px dashed currentColor; vertical-align: middle;
}
.plakette-vorgabe { color: #FFC857; background: rgba(255,176,32,.12); }
.plakette-simulation { color: var(--info); background: var(--info-flaeche); border-style: solid; }
.plakette-platzhalter { color: #F9A8D4; background: rgba(236,72,153,.12); }
.hell .plakette-vorgabe { color: #92400E; } .hell .plakette-platzhalter { color: #9D174D; }
.plakette-vorgabe::before { content: "◆"; font-size: 9px; }
.plakette-simulation::before { content: "▶"; font-size: 9px; }
.plakette-platzhalter::before { content: "○"; font-size: 10px; }
/* Dauerhaftes Simulationsband am oberen Rand (Hardware-Simulator aktiv) */
.band-simulation {
  position: fixed; inset: 0 0 auto 0; z-index: 90; min-height: 28px; padding: 5px var(--s2); text-align: center;
  font: 600 11px/1.6 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--info);
  background: repeating-linear-gradient(135deg, rgba(90,185,255,.18) 0 12px, transparent 12px 24px), var(--glas2);
  border-bottom: 1px solid rgba(90,185,255,.3);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}

/* Formularfelder */
.feld { display: flex; flex-direction: column; gap: 7px; }
.feld > label, .feld > .beschriftung { font: 600 12.5px/1.3 var(--ui); color: var(--t2); letter-spacing: .01em; }
.eingabe, .feld input:not([type=checkbox]):not([type=radio]), .feld select, .feld textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-m);
  border: 1px solid var(--eingabe-rand); background: var(--f1); color: var(--t1);
  font: 400 17px/1.3 var(--ui); /* ≥ 16 px verhindert Zoom auf iOS */
  transition: border-color .2s, box-shadow .2s;
}
.feld select { appearance: none; -webkit-appearance: none; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.feld select option { background: var(--f1v); color: var(--t1); }
.feld textarea { min-height: 96px; resize: vertical; }
.eingabe::placeholder, .feld input::placeholder, .feld textarea::placeholder { color: var(--t3); }
.eingabe:focus, .feld input:focus, .feld select:focus, .feld textarea:focus {
  outline: none; border-color: var(--ma-text); box-shadow: 0 0 0 4px rgba(185,138,224,.22); }
.eingabe.code { font: 300 30px/1 var(--ui); letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.feld .hilfe { font-size: 12.5px; color: var(--t3); }
.feld .fehlertext, .fehlertext { font-size: 12.5px; color: var(--bad-text); }
.feld.fehler input, .feld.fehler select, .feld.fehler textarea, .eingabe.fehler { border-color: var(--bad); }
.wahl { display: flex; align-items: flex-start; gap: var(--s2); min-height: var(--ziel); padding: 12px 0; cursor: pointer; }
.wahl input[type=checkbox], .wahl input[type=radio] {
  appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; flex: none; border-radius: 8px;
  border: 1.6px solid var(--t3); background: transparent; display: inline-grid; place-items: center; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s var(--feder);
}
.wahl input[type=radio] { border-radius: 50%; }
.wahl input[type=checkbox]::after { content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.2px 2.2px;
  transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .2s var(--feder); }
.wahl input[type=radio]::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .2s var(--feder); }
.wahl input:checked { background: var(--verlauf); border-color: transparent; }
.wahl input[type=checkbox]:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.wahl input[type=radio]:checked::after { transform: scale(1); }
.wahl input:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }
.welt-fremd .wahl input:checked { background: var(--primaer-bg); }

/* Code-Anzeige + Ziffernblock (Organizer-PIN, Finale-Code, Wiedereinstieg) */
.code-anzeige { display: flex; justify-content: center; gap: var(--s1); margin-bottom: var(--s3); }
.code-anzeige > span {
  width: 48px; height: 56px; display: grid; place-items: center; border-radius: 14px;
  border: 1px solid var(--rand); background: var(--f1); font: 300 28px/1 var(--ui); font-variant-numeric: tabular-nums;
  transition: border-color .2s, transform .2s var(--feder);
}
.code-anzeige > span.voll { border-color: var(--ma-text); transform: scale(1.04); }
.code-anzeige.fehler > span { border-color: var(--bad); color: var(--bad-text); animation: ruetteln .4s; }
.ziffernblock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 320px; margin: 0 auto; }
.ziffernblock button {
  min-height: 64px; display: grid; place-items: center; padding: 0; border-radius: var(--r-pille); border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.13); color: var(--t1);
  font: 340 28px/1 var(--ui); font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation;
  transition: transform .15s var(--feder), background .15s, opacity .15s;
}
.hell .ziffernblock button { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.06); }
.ziffernblock button:active:not(:disabled) { transform: scale(.9); background: rgba(255,255,255,.3); }
.ziffernblock button:disabled { opacity: .35; cursor: not-allowed; }
.ziffernblock button.leise { background: transparent; border-color: transparent; font: 600 13.5px/1 var(--ui); color: var(--t2); }
.ziffernblock button.ok { background: var(--verlauf); color: #fff; border-color: transparent; font: 620 16px/1 var(--ui); box-shadow: var(--glut-pille); }

/* Countdown */
.countdown {
  font: 200 60px/1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: -.03em;
  display: inline-flex; align-items: baseline; gap: var(--s1);
}
.countdown.klein { font-size: 30px; font-weight: 300; }
.countdown.knapp { color: var(--warn-text); }
.countdown.abgelaufen { color: var(--bad-text); }
.countdown .einheit { font: 600 12px/1 var(--anz); color: var(--t3); letter-spacing: .22em; text-transform: uppercase; }

/* Verbindungsanzeige */
.verbindung { display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px/1 var(--ui); color: var(--t2); }
.verbindung::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.verbindung.offline { color: var(--bad-text); }
.verbindung.offline::before { background: var(--bad); box-shadow: 0 0 8px var(--bad); animation: cb-puls 1.2s ease-in-out infinite; }

/* Toasts (Alt-Baustein; neu: stil.js toast() = ein Toast zur Zeit)
   <div class="toasts" aria-live="polite"><div class="toast erfolg">…</div></div>
   Arten: info | erfolg | warnung | fehler (= meldung.art aus SCHNITTSTELLEN §0.2) */
.toasts {
  position: fixed; z-index: 80; left: 50%; bottom: max(var(--s4), env(safe-area-inset-bottom));
  transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: var(--s1);
  width: min(520px, calc(100vw - 2 * var(--s3))); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s2); max-width: 100%;
  padding: 12px 20px 12px 16px; border-radius: var(--r-xl); border: 1px solid rgba(255,255,255,.12);
  background: var(--glas-toast); color: var(--t1); box-shadow: var(--schatten-toast); font: 540 14px/1.4 var(--ui);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: cb-hoch .35s var(--weich);
}
.hell .toast { border-color: rgba(0,0,0,.08); }
.toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--info); box-shadow: 0 0 10px var(--info); }
.toast.erfolg::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.toast.warnung::before { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.toast.fehler::before { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.toast.weg { opacity: 0; transform: translateY(12px); transition: opacity .3s var(--weich), transform .3s var(--weich); }

/* Overlay / Meldungsfenster (Alt-Baustein = Dialog im neuen Stil)
   <div class="overlay"><div class="fenster" role="dialog" aria-modal="true">…</div></div> */
.overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--s3);
  background: rgba(5,5,10,.7); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  animation: cb-ein .28s ease;
}
.hell .overlay { background: rgba(240,240,246,.6); }
.fenster {
  width: min(560px, 100%); max-height: calc(100dvh - 2 * var(--s3)); overflow: auto;
  background: var(--glas-dialog); border: 1px solid var(--rand); border-radius: var(--r-3xl);
  box-shadow: var(--schatten-dialog); padding: 24px; position: relative; color: var(--t1);
  animation: pop .35s var(--feder);
}
.fenster .fenster-kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.fenster .fenster-fuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }
.fenster .schliessen { /* Schließen-X, Fingerziel 48 px */
  width: var(--ziel); height: var(--ziel); border-radius: 50%; border: 1px solid var(--rand);
  background: var(--f1); color: var(--t2); font-size: 24px; line-height: 1; cursor: pointer; flex: none;
  transition: transform .18s var(--feder);
}
.fenster .schliessen:active { transform: scale(.88); }

/* Warteschleier (Laden, „bitte warten“, gemeinsamer Übergang) */
.warteschleier {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s3); padding: var(--s4); text-align: center; background: var(--schleier); color: var(--t1);
  -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px);
}
.warteschleier.dezent { position: static; inset: auto; background: transparent; padding: var(--s3); -webkit-backdrop-filter: none; backdrop-filter: none; }
.kreisel {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid var(--f2); border-top-color: var(--mb); border-right-color: var(--ma);
  animation: cb-drehen .9s linear infinite;
}
.fortschritt { width: 100%; height: 6px; border-radius: 3px; background: var(--f2); overflow: hidden; }
.fortschritt > i { display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(var(--anteil, 0));
  background: var(--verlauf); transition: transform var(--dauer) linear; }

/* Kopfleiste / Marke */
.kopfleiste {
  display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: 0 var(--s3);
  border-bottom: 1px solid var(--rand); background: var(--glas1); position: relative;
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
}
.marke-zeichen { height: 32px; width: auto; }
.marke-voll { height: 40px; width: auto; }
.hell .marke-voll.invertierbar, .hell .marke-zeichen.invertierbar { filter: invert(1); }

/* Tabelle (Spielleitung) */
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tabelle th { text-align: left; font: 660 11.5px/1.2 var(--ui); color: var(--t3); text-transform: uppercase; letter-spacing: .1em; padding: 10px 8px; border-bottom: 1px solid var(--rand); }
.tabelle td { padding: 12px 8px; height: 44px; border-bottom: 1px solid var(--rand); }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; }

/* QR-Rahmen (QR selbst ohne Glanz, Ruhezone) */
.qr-rahmen { display: inline-block; padding: 14px; background: #fff; border-radius: var(--r-xl); line-height: 0; box-shadow: var(--schatten-karte); }
.qr-rahmen svg { display: block; }

/* Bewegung (Alt-Namen) */
@keyframes cb-ein { from { opacity: 0; } to { opacity: 1; } }
@keyframes cb-hoch { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cb-drehen { to { transform: rotate(360deg); } }
@keyframes cb-puls { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes cb-wackeln { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  .kreisel { animation: cb-puls 1.6s ease-in-out infinite !important; animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}

/* Spiel-WLAN-QR mit Anleitung (BETRIEB-08, /app/shared/wlanhilfe.js) */
.wlanhilfe { display: flex; flex-direction: column; gap: 12px; color: var(--t1); text-align: left; }
.wlanhilfe-kopf { font: 700 20px/1.25 var(--ui); letter-spacing: -.01em; }
.wlanhilfe-inhalt { display: flex; gap: 20px; align-items: flex-start; }
.wlanhilfe-qr { flex: none; }
.wlanhilfe-schritte { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.4; }
.wlanhilfe-pw { margin-top: 4px; color: var(--t2); font-size: 14px; }
.wlanhilfe-fuss { color: var(--t3); font-size: 13px; }
.wlanhilfe.kompakt .wlanhilfe-kopf { font-size: 16px; }
.wlanhilfe.kompakt .wlanhilfe-schritte { font-size: 14px; }
@media (max-width: 520px) { .wlanhilfe-inhalt { flex-direction: column; align-items: center; } }
