/* Weinclub – mobile-first, hell/dunkel nach Systemeinstellung */

:root {
  --bg: #f7f1e8;
  --bg-schimmer: rgba(123, 30, 58, .10);
  --bg-schimmer2: rgba(201, 162, 74, .08);
  --flaeche: #ffffff;
  --text: #1f1a1c;
  --gedaempft: #6b6164;
  --rand: #e7ddd2;
  --akzent: #7b1e3a;
  --akzent-hover: #631630;
  --akzent-text: #ffffff;
  --akzent-weich: #f5e6ea;
  --akzent-schrift: #7b1e3a;
  --stern: #c99a10;
  --stern-leer: #ddd3d5;
  --gefahr: #b3261e;
  --ok: #2e7d32;
  --schatten: 0 1px 3px rgba(40, 20, 25, .08), 0 1px 2px rgba(40, 20, 25, .05);
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b0c;
    --bg-schimmer: rgba(123, 30, 58, .28);
    --bg-schimmer2: rgba(201, 162, 74, .10);
    --flaeche: #1f191b;
    --text: #f3eef0;
    --gedaempft: #ab9fa3;
    --rand: #3b3035;
    --akzent: #7b1e3a;
    --akzent-hover: #8f2747;
    --akzent-text: #ffffff;
    --akzent-weich: #3a2029;
    --akzent-schrift: #d0587c;
    --stern: #e8b93a;
    --stern-leer: #4a3e43;
    --gefahr: #f2867d;
    --ok: #7cc47f;
    --schatten: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 45% at 15% -5%, var(--bg-schimmer), transparent 70%),
    radial-gradient(ellipse 80% 40% at 95% 0%, var(--bg-schimmer2), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: var(--akzent-schrift); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; margin-top: 1.4em; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile & Menü ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20;
  background: var(--akzent); color: var(--akzent-text);
  padding-top: env(safe-area-inset-top);
}
.kopf-innen {
  max-width: 1100px; margin: 0 auto; padding: 6px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  min-height: 56px;
}
.kopf-titel {
  display: flex; align-items: center; gap: 6px;
  color: inherit; text-decoration: none; font-weight: 700; font-size: 1.15rem; min-height: 44px;
}
.kopf-titel img { width: 36px; height: 36px; border-radius: 8px; }
.kopf .knopf-klein { background: rgba(255,255,255,.15); color: inherit; border-color: transparent; }

.menue-knopf {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px;
  font: inherit; font-weight: 600; color: inherit; background: rgba(255,255,255,.15);
  border: 0; border-radius: 10px; cursor: pointer;
}
.menue-knopf svg { width: 22px; height: 22px; }

/* Handy: Menü klappt als Liste unter der Kopfzeile auf */
.menue { display: none; width: 100%; padding: 4px 0 10px; }
.menue.offen { display: block; }
.menue ul { list-style: none; margin: 0; padding: 0; }
.menue li a {
  display: flex; align-items: center; min-height: 50px; padding: 0 12px; border-radius: 10px;
  color: inherit; text-decoration: none; font-weight: 600; font-size: 1.05rem;
}
.menue li a[aria-current="page"] { background: rgba(255,255,255,.2); }
.menue-konto {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid rgba(255,255,255,.25); margin-top: 6px; padding: 10px 12px 0;
}
.menue-name { color: inherit; font-weight: 600; text-decoration: none; min-height: 44px; display: flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* PC/Tablet: Menü als Leiste */
@media (min-width: 900px) {
  .kopf-innen { flex-wrap: nowrap; }
  .menue-knopf { display: none; }
  .menue, .menue.offen { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: auto; flex: 1; padding: 0; }
  .menue ul { display: flex; gap: 2px; }
  .menue li a { min-height: 40px; font-size: .95rem; padding: 0 10px; }
  .menue-konto { border: 0; margin: 0; padding: 0; }
  .menue-name { font-size: .9rem; opacity: .95; max-width: 180px; }
}

.inhalt { max-width: 720px; margin: 0 auto; padding: 16px; min-height: 60vh; }
.inhalt.breit { max-width: 1100px; }
.fuss { text-align: center; color: var(--gedaempft); font-size: .85rem; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rand); margin-top: 32px; }

/* ---------- Home ---------- */
.gruss { margin-bottom: 4px; }
.mitteilung { border-left: 4px solid var(--akzent); }
.mitteilung + .mitteilung { margin-top: 10px; }
.mitteilung h3 { margin: 0 0 4px; font-size: 1.1rem; }
.mitteilung .hinweis { font-size: .85rem; margin: 0 0 8px; }
.event-datum { font-weight: 700; color: var(--akzent-schrift); margin: 0 0 4px; }
.event-titel { margin: 0 0 6px; font-size: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips a { text-decoration: none; }
.zusage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.zusage button {
  min-height: 52px; font: inherit; font-weight: 600; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--rand); background: var(--bg); color: var(--text); padding: 4px;
}
.zusage button[aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }

/* ---------- Mitglieder ---------- */
.mitglied { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rand); }
.mitglied:first-child { border-top: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--akzent-weich); color: var(--akzent-schrift); font-weight: 700; }
.laden { color: var(--gedaempft); text-align: center; padding: 40px 0; }

/* ---------- Formulare & Knöpfe ---------- */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--flaeche); border: 1.5px solid var(--rand); border-radius: 10px;
  padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 1px;
}

.knopf, .knopf-zweit, .knopf-klein, .knopf-gefahr {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border-radius: 12px; border: 1.5px solid transparent; min-height: 52px; padding: 12px 18px;
}
.knopf { background: var(--akzent); color: var(--akzent-text); width: 100%; }
.knopf:hover { background: var(--akzent-hover); }
.knopf:disabled { opacity: .6; cursor: wait; }
.knopf-zweit { background: transparent; color: var(--akzent-schrift); border-color: var(--akzent); width: 100%; }
.knopf-gefahr { background: transparent; color: var(--gefahr); border-color: var(--gefahr); width: 100%; }
.knopf-klein { min-height: 40px; padding: 6px 12px; font-size: .9rem; background: var(--flaeche); color: var(--text); border-color: var(--rand); }
.knopf-link { background: none; border: 0; color: var(--akzent-schrift); font: inherit; text-decoration: underline; cursor: pointer; padding: 12px 0; min-height: 44px; }
.knopf-reihe { display: grid; gap: 10px; margin-top: 18px; }

.hinweis { color: var(--gedaempft); font-size: .95rem; }
.fehler { color: var(--gefahr); font-weight: 600; margin: 10px 0 0; }

/* ---------- Login ---------- */
.login { max-width: 420px; margin: 6vh auto 0; }
.login-logo { text-align: center; color: var(--akzent-schrift); margin-bottom: 8px; }
.login-logo img { width: 160px; height: 160px; border-radius: 20px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.login h1 { text-align: center; }
.login .hinweis { text-align: center; }
.umschalter { display: grid; grid-template-columns: 1fr 1fr; background: var(--flaeche); border: 1.5px solid var(--rand); border-radius: 12px; padding: 4px; margin: 20px 0 4px; }
.umschalter button { font: inherit; font-weight: 600; border: 0; background: none; color: var(--gedaempft); border-radius: 9px; min-height: 44px; cursor: pointer; }
.umschalter button[aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); }
.code-feld { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- Sterne ---------- */
.sterne { position: relative; display: inline-block; line-height: 1; font-size: 1.05rem; letter-spacing: 1px; white-space: nowrap; vertical-align: middle; }
.sterne-leer { color: var(--stern-leer); }
.sterne-voll { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--stern); }
.sterne.gross { font-size: 1.6rem; }

/* ---------- Weinliste ---------- */
.suche { position: relative; }
.filter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.filter select { min-height: 44px; padding: 8px 10px; font-size: .95rem; }
.anzahl { color: var(--gedaempft); font-size: .9rem; margin: 12px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.liste { display: grid; gap: 10px; }

.karte {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center;
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 10px; color: inherit; text-decoration: none;
}
.karte:active { transform: scale(.99); }
.karte-bild { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: var(--akzent-weich); display: grid; place-items: center; color: var(--akzent-schrift); overflow: hidden; }
.karte-bild svg { width: 34px; height: 34px; }
.karte-titel { font-weight: 700; font-size: 1.05rem; margin: 0; }
.karte-meta { color: var(--gedaempft); font-size: .9rem; margin: 2px 0 6px; }
.karte-noten { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .92rem; }
.karte-noten strong { font-variant-numeric: tabular-nums; }

.chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--akzent-weich); color: var(--akzent-schrift); }
.chip.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }

.leer { text-align: center; color: var(--gedaempft); padding: 40px 16px; }

/* ---------- Weindetail ---------- */
.zurueck { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; margin-bottom: 6px; }
.detail-bild { width: 100%; max-height: 380px; object-fit: contain; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--rand); }
.detail-bild.platzhalter { height: 160px; display: grid; place-items: center; color: var(--akzent-schrift); background: var(--akzent-weich); }
.detail-bild.platzhalter svg { width: 64px; height: 64px; }
.detail-kopf { margin: 14px 0 4px; }
.detail-kopf .hinweis { margin: 0; }

.fakten { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 14px 0; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 14px; }
.fakten dt { color: var(--gedaempft); }
.fakten dd { margin: 0; font-weight: 600; }

.box { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 14px; box-shadow: var(--schatten); }

.noten { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.noten th { text-align: left; font-size: .8rem; color: var(--gedaempft); font-weight: 600; padding: 0 0 6px; }
.noten th.zahl, .noten td.zahl { text-align: right; }
.noten td { padding: 8px 0; border-top: 1px solid var(--rand); }
.noten tr.gesamt td { border-top: 0; font-size: 1.15rem; font-weight: 700; padding-bottom: 12px; }
.noten td.sterne-zelle { padding-left: 8px; padding-right: 8px; }
.noten .gesamt .sterne { font-size: 1.3rem; }

.bewertung { border-top: 1px solid var(--rand); padding: 12px 0; }
.bewertung:first-child { border-top: 0; padding-top: 0; }
.bewertung-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bewertung-kopf strong { font-size: 1.02rem; }
.kat-werte { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; font-size: .9rem; }
.kat-werte li { background: var(--bg); border: 1px solid var(--rand); border-radius: 8px; padding: 2px 8px; }
.kat-notiz { margin: 6px 0 0; font-size: .92rem; }
.kat-notiz b { color: var(--gedaempft); font-weight: 600; }

.gesperrt { display: flex; gap: 10px; align-items: flex-start; color: var(--gedaempft); }
.gesperrt svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }

.notiz-text :first-child { margin-top: 0; }
.notiz-text :last-child { margin-bottom: 0; }

/* ---------- Bewerten ---------- */
.kategorie { margin-top: 12px; }
.kategorie-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.kategorie-kopf h3 { margin: 0; font-size: 1.15rem; }
.kategorie-wert { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.kategorie-wert.leer-wert { color: var(--gedaempft); padding: 0; }
.regler { display: grid; grid-template-columns: 52px 1fr 52px; gap: 10px; align-items: center; margin: 8px 0; }
.regler button { min-height: 52px; font-size: 1.5rem; font-weight: 700; border-radius: 12px; border: 1.5px solid var(--rand); background: var(--bg); color: var(--text); cursor: pointer; }
input[type="range"] { padding: 0; border: 0; background: transparent; min-height: 44px; accent-color: var(--akzent); }
.unberuehrt input[type="range"] { opacity: .45; }
.notiz-feld { margin-top: 6px; }

.zusammenfassung { position: sticky; bottom: 0; z-index: 5; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--flaeche); border-top: 1px solid var(--rand); }
.zusammenfassung-zeile { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); z-index: 50;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.toast.fehler-toast { background: var(--gefahr); color: #fff; }

@media (min-width: 560px) {
  .filter { grid-template-columns: repeat(4, 1fr); }
  .knopf-reihe.zwei { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .karte:active { transform: none; }
}

/* ---------- Phase 4: allgemeine Bausteine ---------- */
.titel-zeile { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.titel-zeile h1 { margin-bottom: 0; }
.titel-zeile + * { margin-top: 10px; }
.knopf-zeile { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip.warn { background: color-mix(in srgb, #c77700 18%, transparent); color: #9a5c00; }
.chip.grau { background: var(--bg); color: var(--gedaempft); border: 1px solid var(--rand); }
@media (prefers-color-scheme: dark) { .chip.warn { color: #f0b356; } }

.listen-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--rand); color: inherit; text-decoration: none; }
.listen-link:first-child { border-top: 0; }
.karte-ohne-bild { grid-template-columns: 1fr; }
.event-platz + .event-platz { margin-top: 10px; }
.event-titel a { color: inherit; }

.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.schalter { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 16px 0 4px; cursor: pointer; }
.schalter input { width: 24px; height: 24px; min-height: 0; accent-color: var(--akzent); flex: none; }

.auswahl-liste { max-height: 320px; overflow-y: auto; border: 1.5px solid var(--rand); border-radius: 10px; padding: 4px 10px; margin-top: 6px; background: var(--bg); }
.auswahl { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0; padding: 8px 0; min-height: 44px; cursor: pointer; border-top: 1px solid var(--rand); }
.auswahl:first-child { border-top: 0; }
.auswahl input { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--akzent); }
.auswahl.gross { align-items: flex-start; border: 1.5px solid var(--rand); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.auswahl.gross input { margin-top: 3px; }
#e-weinsuche { margin-top: 0; }

.datei-knopf { cursor: pointer; margin: 0; font-weight: 600; }
.foto-feld { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foto-vorschau { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--akzent-weich); color: var(--akzent-schrift); display: grid; place-items: center; flex: none; }
.foto-vorschau img { width: 100%; height: 100%; object-fit: cover; }
.foto-vorschau svg { width: 40px; height: 40px; }
.avatar-zeile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-zeile .avatar { width: 72px; height: 72px; font-size: 1.4rem; }

.variante { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.variante input { min-height: 44px; padding: 8px 10px; }

details.box > summary { list-style: none; cursor: pointer; }
details.box > summary::-webkit-details-marker { display: none; }
details[open].box > summary { margin-bottom: 8px; }

/* Kacheln (Verwaltung) */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kachel { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); color: inherit; text-decoration: none; min-height: 110px; }
.kachel-icon { font-size: 1.6rem; }
.kachel .hinweis { font-size: .85rem; }

/* Bestellungen */
.artikel + .artikel { margin-top: 10px; }
.artikel-kopf { display: flex; gap: 12px; align-items: flex-start; }
.artikel-kopf .karte-bild { width: 64px; height: 64px; flex: none; }
.artikel-wahl { display: grid; gap: 8px; margin-top: 12px; }
.menge { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; }
.menge button { min-height: 48px; font-size: 1.4rem; font-weight: 700; border-radius: 12px; border: 1.5px solid var(--rand); background: var(--bg); color: var(--text); cursor: pointer; }
.menge input { text-align: center; font-weight: 700; }
.zahl-zeile { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rand); font-variant-numeric: tabular-nums; }
.zahl-zeile:first-child { border-top: 0; padding-top: 0; }
.zahl-zeile.summe { font-size: 1.1rem; font-weight: 700; }
.knopf-klein.bezahlt { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); border-color: var(--ok); }
.tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tabelle th { text-align: left; font-size: .8rem; color: var(--gedaempft); padding: 0 0 6px; }
.tabelle td { padding: 8px 0; border-top: 1px solid var(--rand); vertical-align: top; }
.tabelle .zahl { text-align: right; padding-left: 10px; white-space: nowrap; }
.tabelle tr.summe td { font-weight: 700; }

@media (min-width: 560px) {
  .artikel-wahl { grid-template-columns: 1fr 180px auto; align-items: center; }
  .artikel-wahl .knopf { width: auto; }
}

/* ---------- Phase 5: Hinweise, Export, Druck ---------- */
.hinweis-box { margin-bottom: 10px; border-left: 4px solid var(--stern); }
.hinweis-box .knopf { margin-top: 10px; }
button.kachel { font: inherit; text-align: left; cursor: pointer; }
.druck-tabelle { font-size: .9rem; }
.druck-tabelle th, .druck-tabelle td { padding-right: 6px; }

/* ---------- Login-Hintergrund (dunkel + Gold) ---------- */
body:has(.login) {
  color-scheme: dark;
  --bg: #0b0909;
  --flaeche: #1c1618;
  --text: #f3eef0;
  --gedaempft: #b5a9a0;
  --rand: #4a3c33;
  --akzent-weich: #3a2029;
  --akzent-schrift: #d9b45a;
  --gefahr: #f2867d;
  --ok: #7cc47f;
  --schatten: none;
  background:
    radial-gradient(ellipse 70% 45% at 50% 18%, rgba(201, 162, 74, .16), transparent 70%),
    radial-gradient(ellipse 100% 60% at 50% 110%, rgba(123, 30, 58, .35), transparent 70%),
    var(--bg);
  color: var(--text);
}
body:has(.login) .login h1 { color: #d9b45a; letter-spacing: .06em; }
body:has(.login) .login-logo img { box-shadow: 0 0 0 1px rgba(217, 180, 90, .35), 0 8px 30px rgba(0, 0, 0, .6); }

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body, body:has(.login) { background: #fff; color: #000; font-size: 10pt; }
  .kopf, .fuss, .nicht-drucken, .toast { display: none !important; }
  .inhalt, .inhalt.breit { max-width: none; padding: 0; }
  .hinweis { color: #444; }
  .druck-tabelle { font-size: 9pt; }
  .druck-tabelle tr { break-inside: avoid; }
  .druck-tabelle td, .druck-tabelle th { border-color: #bbb; }
}

/* ---------- Live-Degustation ---------- */
.degu-banner { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--akzent-text); background: var(--akzent); border: 0; margin: 14px 0; animation: puls 2s ease-in-out infinite; }
.degu-banner-icon { font-size: 2rem; }
@keyframes puls { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--akzent) 30%, transparent); } }
.code-box { text-align: center; border: 2px solid var(--akzent); }
.raum-code { font-size: clamp(3.5rem, 18vw, 6rem); font-weight: 800; letter-spacing: .25em; margin: 4px 0 0; padding-left: .25em; font-variant-numeric: tabular-nums; color: var(--akzent-schrift); line-height: 1.1; }
.code-eingabe .code-feld { font-size: 2.4rem; letter-spacing: .5em; padding-left: calc(14px + .5em); }
.fortschritt-text { margin-bottom: 6px; }
.fortschritt { height: 12px; border-radius: 99px; background: var(--bg); border: 1px solid var(--rand); overflow: hidden; }
.fortschritt span { display: block; height: 100%; background: var(--ok); transition: width .4s; }
.tn-liste { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px; }
.knopf.gross { min-height: 60px; font-size: 1.15rem; }
.enthuellung { text-align: center; }
.enthuellung .fakten { text-align: left; }
.enthuellung-titel { font-size: 1.6rem; font-weight: 800; color: var(--akzent-schrift); margin: 6px 0 12px; }
.tabelle-rollen { overflow-x: auto; }
.rate-tabelle td, .rate-tabelle th { white-space: nowrap; padding-right: 10px; }
.rate-tabelle td.treffer { color: var(--ok); font-weight: 700; }
.rate-tabelle td.fast { color: #b07800; font-weight: 600; }
.rate-tabelle tr.loesung td { background: var(--akzent-weich); }
.raten .zwei-spalten label { margin-top: 8px; }
.gesperrt span { flex: 1; }

/* Typ-Auswahl als Knöpfe */
.typ-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.typ-knopf { display: inline-flex; position: relative; margin: 0; font-weight: 600; cursor: pointer; }
.typ-knopf input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.typ-knopf span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--rand); background: var(--bg); }
.typ-knopf input:checked + span { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.typ-knopf input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { .degu-banner { animation: none; } }
