/* Schätzspiel — Oberfläche
 * Teil von Schätzspiel. © vis-software.at, alle Rechte vorbehalten.
 *
 * Keine externen Schriften, keine externen Bilder — die
 * Content-Security-Policy blockiert das. Systemschriften genügen.
 *
 * ------------------------------------------------------------------
 * ZWEI CONTAINER-BREITEN — das sind zwei verschiedene Produkte
 * ------------------------------------------------------------------
 *
 *   .wrap        schmal (640 px). Für den Daumen: Verkaufsmaske,
 *                Teilnehmen, Ergebnis, Startseite. Wird im Stehen,
 *                einhändig und bei schlechtem Licht bedient. Am großen
 *                Bildschirm bleibt es zentriert und begrenzt — eine
 *                Erfassungsmaske über 1400 px wäre schlechter, nicht besser.
 *
 *   .wrap--app   breit (1240 px). Für Maus und Schreibtisch: Meine Spiele,
 *                Anlegen, Verwalten, Konto. Hier sitzt der Betreiber vor
 *                einem großen Bildschirm und will Übersicht statt einer
 *                schmalen Spalte in der Mitte.
 *
 * Die breiten Seiten bleiben am Handy voll bedienbar: Alle Mehrspaltigkeit
 * hängt an min-width-Abfragen und fällt darunter auf eine Spalte zurück.
 * Nicht kaputt, nur nicht optimiert.
 */

/* ------------------------------------------------------------------ *
 * Farben
 * ------------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  --bg: #f4f6fb;
  --bg-accent: radial-gradient(1200px 500px at 50% -200px, #dfe6ff 0%, rgba(223, 230, 255, 0) 70%);
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --surface-3: #e8ebf4;
  --text: #14161d;
  --text-muted: #5a6076;
  --border: #dfe3ee;
  --border-strong: #c6cddf;

  --accent: #3a53d8;
  --accent-hover: #2f45bb;
  --accent-soft: #e7eaff;
  --accent-text: #2b3bb0;
  --on-accent: #ffffff;

  --ok: #0f7a4d;
  --ok-soft: #dff5e9;
  --warn: #8a5a00;
  --warn-soft: #fdf0d5;
  --danger: #bc2c2c;
  --danger-hover: #a02525;
  --danger-soft: #fbe4e4;

  --gold: #c8940b;
  --gold-soft: #fdf1cf;
  --silver: #7c8496;
  --silver-soft: #eef0f5;
  --bronze: #a2653a;
  --bronze-soft: #f7e7da;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(18, 24, 48, .06), 0 8px 24px rgba(18, 24, 48, .07);
  --shadow-sm: 0 1px 2px rgba(18, 24, 48, .07);
  --tap: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1015;
    --bg-accent: radial-gradient(1200px 500px at 50% -200px, #1b2140 0%, rgba(27, 33, 64, 0) 70%);
    --surface: #171a22;
    --surface-2: #1e222c;
    --surface-3: #262b37;
    --text: #eceef5;
    --text-muted: #9aa2b6;
    --border: #2a2f3c;
    --border-strong: #3a4152;

    --accent: #8296ff;
    --accent-hover: #9dadff;
    --accent-soft: #22284a;
    --accent-text: #a9b6ff;
    --on-accent: #10131c;

    --ok: #5ed6a0;
    --ok-soft: #12301f;
    --warn: #e8b866;
    --warn-soft: #33280f;
    --danger: #ff8177;
    --danger-hover: #ff9a92;
    --danger-soft: #351a19;

    --gold: #e8c25a;
    --gold-soft: #332a10;
    --silver: #b3bccd;
    --silver-soft: #262a33;
    --bronze: #d0966a;
    --bronze-soft: #33231a;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

/* ------------------------------------------------------------------ *
 * Grundlagen
 * ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-accent);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 16px 56px;
  flex: 1 0 auto;
}
.wrap--wide { max-width: 760px; }

/* Schreibtischbreite — siehe Kopf der Datei */
.wrap--app { max-width: 1240px; }
@media (min-width: 1000px) {
  .wrap--app { padding-left: 24px; padding-right: 24px; }
}

/* ------------------------------------------------------------------ *
 * Raster für die Verwaltungsseiten
 * ------------------------------------------------------------------ *
 * Alles hängt an min-width: Unterhalb der Schwelle bleibt es eine
 * Spalte, also genau das bisherige Verhalten am Handy. */

/* Kartenraster, z. B. „Meine Spiele" */
.app-cards { display: grid; gap: 14px; }
@media (min-width: 760px) {
  .app-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* Zwei Spalten nebeneinander */
.app-cols { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1000px) {
  .app-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  /* Rechte Spalte breiter — dort stehen Tabellen */
  .app-cols--weit-rechts { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.app-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
/* Im Flex-Fluss macht der gap die Abstände — der Kartenrand stört dort. */
.app-col > .card + .card { margin-top: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 50;
}
.skip-link:focus { left: 0; }

.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.tiny { font-size: .8125rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 24px; }
.hidden { display: none !important; }
/* Nur für Angemeldete: standardmäßig weg, wird per body-Klasse eingeblendet */
[data-when-auth] { display: none; }
.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
}

/* Kleine Abstands- und Layouthelfer.
 * Absichtlich Klassen statt style="…": eine Content-Security-Policy ohne
 * 'unsafe-inline' in style-src blockiert sonst jedes style-Attribut — auch
 * das per setAttribute gesetzte. */
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-tight { margin-top: -6px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.bold { font-weight: 700; }
.break-word { overflow-wrap: anywhere; }
.grow { flex: 1 1 auto; min-width: 0; }
.center-note { width: 100%; margin: 6px 0 0; text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * Kopfzeile
 * ------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  text-decoration: none;
  padding: 6px 6px 6px 2px;
  letter-spacing: -.01em;
}
.brand img, .brand svg { display: block; width: 26px; height: 26px; flex: none; }

.topnav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }

.site-footer {
  flex: none;
  padding: 22px 16px 30px;
  text-align: center;
  font-size: .8125rem;
  color: var(--text-muted);
}
.site-footer a { color: inherit; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin-bottom: 6px; }

/* ------------------------------------------------------------------ *
 * Karten
 * ------------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 14px; }
.card--flat { box-shadow: none; background: var(--surface-2); }
.card--danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.card--accent { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.card-head h2, .card-head h1 { margin: 0; }
.card-head .chip { margin-left: auto; flex: none; }

.section-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
}

hr.rule { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* ------------------------------------------------------------------ *
 * Schaltflächen
 * ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--text);
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--outline:hover { background: var(--surface-2); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: var(--danger-hover); }
@media (prefers-color-scheme: dark) { .btn--danger { color: #2a0f0d; } }

.btn--quiet { background: transparent; color: var(--text-muted); }
.btn--quiet:hover { background: var(--surface-2); color: var(--text); }

.btn--block { display: flex; width: 100%; }
.btn--big { font-size: 1.05rem; min-height: 52px; padding: 12px 22px; }
/* Kleiner in Schrift und Polsterung, aber nie unter dem 44-px-Touchziel */
.btn--small { min-height: var(--tap); font-size: .875rem; padding: 6px 14px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row > .btn { flex: 1 1 auto; }

.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  color: var(--on-accent);
  animation: spin .7s linear infinite;
}
.btn--outline.is-busy::after, .btn--quiet.is-busy::after, .btn:not([class*="--"]).is-busy::after { color: var(--text); }

@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Google-Knopf: eigenes Logo als Inline-SVG, kein externes Bild */
.btn--google {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--google:hover { background: var(--surface-2); }
.btn--google svg { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------------ *
 * Formulare
 * ------------------------------------------------------------------ */

.field { display: block; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > .label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.field .hint { display: block; font-size: .8125rem; color: var(--text-muted); margin-top: 5px; }
.req { color: var(--danger); font-weight: 700; }

/* Merkzeichen an Feldern, deren Inhalt öffentlich sichtbar wird. Steht
   direkt in der Beschriftung, nicht erst im Hilfetext darunter — wer nur
   die Beschriftung liest, soll es trotzdem sehen. */
.label-public {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
  vertical-align: 1px;
}

/* Jeder Feldtyp, den die Anwendung benutzt, muss hier stehen — sonst fällt
   er auf die Browser-Standardbreite zurück und steht schmal neben den
   anderen. Genau das war beim Passwortfeld passiert. */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="datetime-local"],
textarea,
select {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem; /* verhindert Auto-Zoom auf iOS */
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  appearance: none;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 0;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .75; }
input[aria-invalid="true"] { border-color: var(--danger); }

.input-big {
  font-size: 1.5rem !important;
  font-weight: 700;
  text-align: center;
  min-height: 58px;
  letter-spacing: .01em;
}
.input-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.7rem !important;
  letter-spacing: .35em;
  text-indent: .35em;
  text-align: center;
  min-height: 60px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: var(--tap);
  padding: 8px 0;
  cursor: pointer;
}
.check input[type="checkbox"] {
  flex: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.check .label { font-weight: 600; font-size: .95rem; }

.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 420px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2 .field { margin-bottom: 0; }

details.more {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 0 14px;
}
details.more > summary {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  list-style: none;
  padding: 10px 0;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before {
  content: "▸";
  color: var(--text-muted);
  transition: transform .15s ease;
}
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > .more-body { padding: 4px 0 16px; }

/* ------------------------------------------------------------------ *
 * Meldungen
 * ------------------------------------------------------------------ */

.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: .925rem;
  margin: 0 0 14px;
}
.alert:last-child { margin-bottom: 0; }
.alert strong { display: block; }
.alert--error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.alert--ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.alert--info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent-text); }
.alert--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); }
.alert__icon { flex: none; font-size: 1.05rem; line-height: 1.35; }
.alert__text { min-width: 0; }

.note {
  display: flex;
  gap: 9px;
  font-size: .85rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.note__icon { flex: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(8px);
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: .9rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------------ *
 * Ladezustände und leere Zustände
 * ------------------------------------------------------------------ */

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 34px 16px;
  color: var(--text-muted);
  font-size: .925rem;
}
.loading::before {
  content: "";
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.empty {
  text-align: center;
  padding: 34px 18px;
}
.empty__art { font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--text-muted); margin-bottom: 18px; }

/* ------------------------------------------------------------------ *
 * Status-Chips
 * ------------------------------------------------------------------ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip--draft { background: var(--surface-3); color: var(--text-muted); }
.chip--open { background: var(--ok-soft); color: var(--ok); }
.chip--closed { background: var(--accent-soft); color: var(--accent-text); }

/* ------------------------------------------------------------------ *
 * Spielliste (Dashboard)
 * ------------------------------------------------------------------ */

.game-list { list-style: none; margin: 0; padding: 0; }
.game-list li + li { margin-top: 12px; }

/* Am Schreibtisch als Raster statt als lange Spalte */
@media (min-width: 760px) {
  .game-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  .game-list li + li { margin-top: 0; }
  .game-list li { display: flex; }
  .game-list .game-card { flex: 1 1 auto; }
}

.game-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .05s ease;
}
.game-card:hover { border-color: var(--border-strong); color: inherit; }
.game-card:active { transform: translateY(1px); }
.game-card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.game-card__title { font-weight: 700; font-size: 1.05rem; min-width: 0; overflow-wrap: anywhere; }
.game-card__top .chip { margin-left: auto; flex: none; }
.game-card__question {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: .85rem;
  color: var(--text-muted);
}
.game-card__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text);
}

/* ------------------------------------------------------------------ *
 * Beitrittslink + QR (wichtigstes Element der Verwaltungsseite)
 * ------------------------------------------------------------------ */

.share { text-align: center; }

.share__url {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}
.share__url:hover { border-color: var(--accent); background: var(--accent-soft); }
.share__url-text {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.02rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.share__url-hint { display: block; font-family: inherit; font-size: .75rem; font-weight: 600; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 3px; }
.share__url-icon { flex: none; color: var(--accent-text); font-size: 1.2rem; }

.qr-frame {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  line-height: 0;
}
.qr-frame canvas {
  display: block;
  width: 240px;
  height: 240px;
  max-width: min(72vw, 300px);
  max-height: min(72vw, 300px);
  image-rendering: pixelated;
}

.share__code {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
  font-size: .85rem;
  color: var(--text-muted);
}
.share__code b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.35rem;
  letter-spacing: .18em;
  color: var(--text);
}

/* Vollbild-QR zum Abscannen */
dialog.qr-full::backdrop { background: rgba(8, 10, 18, .8); }
dialog.qr-full {
  border: 0;
  background: transparent;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
}
dialog.qr-full .qr-full__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px;
}
dialog.qr-full canvas {
  display: block;
  width: min(86vw, 86vh, 620px);
  height: min(86vw, 86vh, 620px);
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  image-rendering: pixelated;
}
dialog.qr-full .qr-full__caption { color: #fff; font-weight: 700; text-align: center; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ *
 * Kennzahlen
 * ------------------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.stat__value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat__label { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* ------------------------------------------------------------------ *
 * Teilnehmerseite: die Frage steht im Mittelpunkt
 * ------------------------------------------------------------------ */

.question-hero {
  text-align: center;
  padding: 26px 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.question-hero__kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 10px;
}
.question-hero__q {
  font-size: clamp(1.45rem, 6.2vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.question-hero__meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  font-size: .85rem;
  color: var(--text-muted);
}

.guess-fields { display: grid; gap: 10px; }
.guess-input-row { display: flex; align-items: center; gap: 10px; }
.guess-input-row .idx {
  flex: none;
  width: 26px;
  text-align: right;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
}
.guess-unit {
  flex: none;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 0;
  max-width: 32%;
  overflow-wrap: anywhere;
}

.done-hero { text-align: center; padding: 26px 16px; }
.done-hero__mark {
  width: 66px; height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.done-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.done-values li {
  background: var(--surface-2);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ *
 * Ergebnis: Zielwert, Podium, Rangliste
 * ------------------------------------------------------------------ */

.result-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.target-hero {
  text-align: center;
  padding: 24px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--border));
  box-shadow: var(--shadow);
}
.target-hero__label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.target-hero__value {
  font-size: clamp(2.6rem, 13vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 2px;
  color: var(--gold);
}
.target-hero__unit { font-size: .95rem; font-weight: 700; color: var(--text-muted); }
.target-hero__q { margin-top: 12px; font-size: .95rem; color: var(--text-muted); overflow-wrap: anywhere; }

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Weniger als drei Platzierte: Spalten zusammenrücken */
.podium--2 { grid-template-columns: repeat(2, 1fr); }
.podium--1 { grid-template-columns: minmax(0, 1fr); }
.podium__place { text-align: center; min-width: 0; }
.podium__medal { font-size: 1.5rem; line-height: 1; }
.podium__name {
  font-weight: 700;
  font-size: .9rem;
  margin: 6px 0 2px;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.podium__value { font-size: .85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.podium__bar {
  margin-top: 8px;
  border-radius: 12px 12px 0 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}
.podium__place--1 .podium__bar { height: 92px; background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 85%, #fff) 0%, var(--gold) 100%); }
.podium__place--2 .podium__bar { height: 68px; background: linear-gradient(180deg, color-mix(in srgb, var(--silver) 82%, #fff) 0%, var(--silver) 100%); }
.podium__place--3 .podium__bar { height: 52px; background: linear-gradient(180deg, color-mix(in srgb, var(--bronze) 82%, #fff) 0%, var(--bronze) 100%); }
.podium__place--you .podium__name { color: var(--accent-text); }
.podium__place--you .podium__bar { outline: 3px solid var(--accent); outline-offset: 2px; }

.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.rank-row + .rank-row { margin-top: 2px; }
.rank-row:nth-child(odd) { background: var(--surface-2); }
.rank-row--you {
  background: var(--accent-soft) !important;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}
.rank-row__rank {
  flex: none;
  min-width: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  text-align: right;
}
.rank-row--you .rank-row__rank { color: var(--accent-text); }
.rank-row__name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rank-row__you-tag {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .03em;
  vertical-align: 1px;
}
.rank-row__value { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-row__diff { flex: none; min-width: 62px; text-align: right; font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.you-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.you-banner__rank { font-size: 1.9rem; font-weight: 800; color: var(--accent-text); line-height: 1; }
.you-banner__text { font-size: .92rem; }

/* Tippliste des Erstellers */
.guess-admin-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.guess-admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 8px 10px;
  border-bottom: 1px solid var(--border);
}
.guess-admin-row:last-child { border-bottom: 0; }
.guess-admin-row__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.guess-admin-row__via { display: block; font-size: .72rem; font-weight: 600; color: var(--text-muted); }
.guess-admin-row__value { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.guess-admin-row__time { flex: none; font-size: .78rem; color: var(--text-muted); }
.icon-btn {
  flex: none;
  width: var(--tap); height: var(--tap);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.05rem;
  cursor: pointer;
}
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.tag-guest {
  flex: none;
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ *
 * Dialoge
 * ------------------------------------------------------------------ */

dialog.sheet {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: auto;
}
dialog.sheet::backdrop { background: rgba(8, 10, 18, .55); backdrop-filter: blur(2px); }
dialog.sheet .sheet__body { padding: 20px; }
dialog.sheet h2 { margin-bottom: 4px; }

/* ------------------------------------------------------------------ *
 * Angemeldet oder nicht — ohne Flackern
 * ------------------------------------------------------------------ *
 * Der Erklärteil steht im HTML und ist standardmäßig sichtbar: so sehen
 * ihn auch Suchmaschinen ohne JavaScript. Erst wenn feststeht, dass
 * jemand angemeldet ist, setzt index.js die Klasse auf <body> — das
 * passiert im defer-Skript vor dem ersten Zeichnen, es blitzt also nichts
 * auf. Umgekehrt ist [data-when-auth] von Haus aus versteckt. */

body.is-signed-in [data-when-anon] { display: none !important; }
body.is-signed-in [data-when-auth] { display: block; }

/* Ausnahme: das Konto-Zeichen in der Kopfleiste.
 *
 * Der gemerkte Hinweis aus dem localStorage ist eine Vermutung, keine
 * Auskunft — ist die Sitzung abgelaufen oder wurden die Cookies gelöscht,
 * behauptet er weiterhin „angemeldet". Für den Erklärteil ist das
 * verschmerzbar: er verschwindet kurz und kommt wieder. Beim Konto-Zeichen
 * wäre es falsch — es würde einem Ausgeloggten einen Zugang anbieten, den
 * er nicht hat. Deshalb erscheint es erst, wenn /api/me geantwortet hat
 * (Klasse `is-auth-known`, gesetzt in index.js).
 *
 * Achtung Spezifität: `[data-when-auth]` weiter oben hat den Wert (0,1,0)
 * und damit denselben wie `.topnav` — das später notierte `display: flex`
 * der Kopfleiste hat den Grundzustand deshalb überstimmt, und das Konto
 * stand auch Abgemeldeten in der Leiste. Die Regeln hier tragen mit
 * `nav.topnav[…]` den Wert (0,2,1) und gewinnen in beide Richtungen. */
nav.topnav[data-when-auth] { display: none; }
body.is-signed-in.is-auth-known nav.topnav[data-when-auth] { display: flex; }

/* ================================================================== *
 * STARTSEITE
 * ================================================================== *
 * Nur index.html benutzt diesen Abschnitt. Alles hier ist mit `lp-`
 * benannt, damit die Landing niemals in die Anwendungsseiten hineinwirkt.
 *
 * Reihenfolge der Entscheidungen:
 *  - Am Handy ist alles eine Spalte. Mehrspaltigkeit hängt ausnahmslos an
 *    min-width, es gibt keine Regel, die schmale Geräte reparieren muss.
 *  - Grosse Flächen statt Linien: Karten mit weichem Rand, viel Luft,
 *    ein einziger Farbakzent. Kein zweites Farbsystem neben der App.
 *  - Keine externen Schriften und keine externen Bilder — die Vorschauen
 *    unten sind aus Kästchen gebaut, damit die CSP nichts blocken muss.
 */

/* Die Landing darf breiter werden als die Erfassungsmasken, bleibt aber
   unter der Schreibtischbreite der Verwaltung: 1120 px lesen sich noch
   in einem Rutsch. */
.wrap--lp {
  max-width: 1120px;
  padding: 0 20px 40px;
}
/* Der Farbschleier im Kopfbereich ragt bewusst über den Textbereich
   hinaus. `clip` schneidet das ab, ohne — anders als `hidden` — die
   klebende Kopfleiste zu ihrem Scrollbehälter zu machen. */
.lp-body { overflow-x: clip; }
@media (min-width: 720px) {
  .wrap--lp { padding-left: 28px; padding-right: 28px; }
}

/* Begrüßung für Angemeldete — die Landing entfällt dann komplett */
.lp-welcome { max-width: 560px; margin: 40px auto 0; }

/* ---- Kopfleiste der Startseite ---------------------------------- */

.topnav--landing { gap: 4px; }
.topnav__link {
  display: none;              /* am Handy trägt der CTA allein */
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.topnav__link:hover { color: var(--text); background: var(--surface-2); }
@media (min-width: 860px) {
  .topnav__link { display: inline-flex; }
  .topbar__cta { margin-left: 10px; }
}

/* Konto-Zeichen rechts oben. Nur für Angemeldete — der Träger trägt
   [data-when-auth] und ist ohne die body-Klasse `is-signed-in` verborgen.
   Am Handy bleibt der runde Knopf allein, ab 560 px steht der Name daneben. */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: var(--tap);
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.user-chip:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}
.user-chip__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.user-chip__avatar svg { width: 21px; height: 21px; display: block; }
/* Der Name ist Beiwerk: am Handy zählt der Platz mehr als die Anrede. */
.user-chip__name { display: none; }
@media (min-width: 560px) {
  .user-chip { padding-right: 14px; }
  .user-chip__name {
    display: block;
    max-width: 18ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---- Kopfbereich ------------------------------------------------- */

.lp-hero {
  position: relative;
  padding: 32px 0 8px;
}
@media (min-width: 900px) { .lp-hero { padding: 56px 0 16px; } }

/* Farbschleier hinter dem Kopfbereich. Rein dekorativ, deshalb absolut
   positioniert und ohne eigenen Platzbedarf. */
.lp-hero__glow {
  position: absolute;
  inset: -160px 0 auto 0;
  height: 620px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(680px 320px at 22% 12%, color-mix(in srgb, var(--accent) 24%, transparent) 0%, transparent 70%),
    radial-gradient(520px 300px at 82% 0%, color-mix(in srgb, var(--gold) 18%, transparent) 0%, transparent 72%);
  filter: blur(10px);
}

.lp-hero__grid {
  display: grid;
  gap: 30px;
  align-items: start;
}
@media (min-width: 960px) {
  .lp-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 48px;
    align-items: center;
  }
}

.lp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(6px);
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent-text);
}
.lp-pill__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.lp-hero__title {
  font-size: clamp(2.1rem, 8.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.035em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.lp-hero__accent {
  display: block;
  background-image: linear-gradient(96deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 45%, var(--gold)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Rückfallebene: Browser ohne background-clip:text bekämen sonst nichts
   zu sehen. @supports schaltet die Transparenz erst dann frei. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .lp-hero__accent { color: var(--accent-text); background-image: none; }
}

.lp-hero__lead {
  font-size: clamp(1rem, 2.6vw, 1.12rem);
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 26px;
}

.lp-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-hero__cta .btn { flex: 1 1 220px; }
@media (min-width: 560px) { .lp-hero__cta .btn { flex: 0 0 auto; } }

.lp-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--text-muted);
}
.lp-proof li { display: flex; align-items: center; gap: 8px; }
.lp-proof li::before {
  content: "✓";
  font-weight: 800;
  color: var(--ok);
}

/* Anmeldekarte im Kopfbereich: sie ist der Einstieg, also darf sie
   deutlicher wirken als eine gewöhnliche Karte. */
.lp-hero__form { scroll-margin-top: 84px; }
.lp-authcard {
  padding: 22px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@media (min-width: 560px) { .lp-authcard { padding: 26px; } }
.lp-authcard__note {
  margin: 12px 4px 0;
  text-align: center;
  font-size: .8125rem;
  color: var(--text-muted);
}

/* ---- Vorschau: drei Stationen eines Festes ----------------------- *
 * Am Handy eine Wischleiste mit Einrasten, am Schreibtisch drei
 * gleich breite Spalten. Die Inhalte sind Attrappen und für
 * Screenreader ausgeblendet — die Bildunterschrift trägt die Aussage. */

.lp-shots { margin: 44px 0 8px; }
.lp-shots__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 18px;
  /* Die Leiste soll bis an den Bildschirmrand laufen, der Text nicht. */
  margin-inline: -20px;
  padding-inline: 20px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.lp-shots__track > * { scroll-snap-align: center; }
@media (min-width: 780px) {
  .lp-shots__track {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}

.lp-shot { margin: 0; min-width: 0; }
.lp-shot__cap {
  margin-top: 12px;
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}
.lp-shot__cap b { display: block; color: var(--text); font-size: .95rem; }

.lp-mock {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  user-select: none;
}
.lp-mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.lp-mock__dots { display: flex; gap: 4px; flex: none; }
.lp-mock__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.lp-mock__title { font-size: .78rem; font-weight: 700; color: var(--text-muted); }

.lp-mock__body { padding: 16px; display: grid; gap: 9px; }

.lp-mock__photo {
  display: grid;
  place-items: center;
  height: 92px;
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, var(--accent-soft), var(--surface-2));
  font-size: 2.2rem;
}
.lp-mock__q { margin: 0; font-weight: 700; font-size: .98rem; line-height: 1.3; }
.lp-mock__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: .85rem;
}
.lp-mock__row b { font-variant-numeric: tabular-nums; }

.lp-mock__amount {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
}
.lp-mock__amount span { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.lp-mock__amount b { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

.lp-mock__field {
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: .95rem;
  color: var(--text-muted);
}
.lp-mock__field--num {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.lp-mock__btn {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-align: center;
}
.lp-mock__hint { margin: 0; text-align: center; font-size: .78rem; color: var(--text-muted); }

.lp-mock__target {
  text-align: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--border));
  background: var(--gold-soft);
}
.lp-mock__target span { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.lp-mock__target b { font-size: 1.7rem; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }

.lp-mock__podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 6px; }
.lp-mock__col { text-align: center; }
.lp-mock__col span { font-size: 1.1rem; }
.lp-mock__col i { display: block; margin-top: 5px; border-radius: 8px 8px 0 0; }
.lp-mock__col--1 i { height: 46px; background: var(--gold); }
.lp-mock__col--2 i { height: 32px; background: var(--silver); }
.lp-mock__col--3 i { height: 24px; background: var(--bronze); }

.lp-mock__rank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: .85rem;
}
.lp-mock__rank em { font-style: normal; font-weight: 800; color: var(--text-muted); }
.lp-mock__rank span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-mock__rank b { font-variant-numeric: tabular-nums; }

/* ---- Abschnitte -------------------------------------------------- */

.lp-section {
  padding: 56px 0 0;
  scroll-margin-top: 76px;
}
@media (min-width: 900px) { .lp-section { padding-top: 88px; } }

.lp-section__head { max-width: 60ch; margin-bottom: 28px; }
.lp-kicker {
  margin: 0 0 8px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.lp-h2 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -.03em;
  margin: 0 0 10px;
  text-wrap: balance;
}
.lp-lead { color: var(--text-muted); margin: 0; }

/* ---- Ablauf ------------------------------------------------------ */

.lp-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 620px) { .lp-steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .lp-steps { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.lp-step {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.lp-step__num {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 12px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 800;
  font-size: .95rem;
}
.lp-step b { display: block; margin-bottom: 5px; }
.lp-step > span:not(.lp-step__num) {
  display: block;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
}

/* ---- Funktionen als Bento --------------------------------------- */

.lp-bento {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .lp-bento { grid-template-columns: 1fr 1fr; }
  .lp-tile--wide { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .lp-bento { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.lp-tile {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, transform .15s ease;
}
.lp-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }
.lp-tile b { display: block; margin-bottom: 5px; }
.lp-tile > span:not(.lp-tile__icon) {
  display: block;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.55;
}
.lp-tile__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: var(--accent-soft);
  font-size: 1.25rem;
}
/* Die grosse Kachel führt den Blick in das Raster hinein */
.lp-tile--wide {
  background: linear-gradient(150deg, var(--accent-soft) 0%, var(--surface) 62%);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.lp-tile--wide .lp-tile__icon { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
@media (min-width: 640px) {
  .lp-tile--wide b { font-size: 1.2rem; }
  .lp-tile--wide > span:not(.lp-tile__icon) { max-width: 52ch; font-size: .95rem; }
}

/* ---- Anlässe ----------------------------------------------------- */

.lp-cases {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) { .lp-cases { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .lp-cases { grid-template-columns: repeat(3, 1fr); } }

.lp-cases li {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid transparent;
}
.lp-cases li > span:first-child { font-size: 1.35rem; line-height: 1.2; }
.lp-cases b { display: block; margin: 8px 0 2px; }
.lp-cases li > span:last-child { display: block; font-size: .85rem; color: var(--text-muted); }

/* ---- Warum kostenlos, mit Kennzahlen ----------------------------- */

.lp-split { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .lp-split { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 48px; } }

.lp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lp-stats li {
  padding: 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.lp-stats b {
  display: block;
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--accent-text);
}
.lp-stats span { display: block; margin-top: 4px; font-size: .8rem; color: var(--text-muted); }

/* ---- Häufige Fragen ---------------------------------------------- */

.lp-faq { display: grid; gap: 10px; }
.lp-faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0 18px;
}
.lp-faq__item[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.lp-faq__item > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.lp-faq__item > summary::-webkit-details-marker { display: none; }
.lp-faq__item > summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--accent-text);
  transition: transform .18s ease;
}
.lp-faq__item[open] > summary::after { transform: rotate(45deg); }
.lp-faq__item > p {
  margin: 0;
  padding: 0 0 18px;
  color: var(--text-muted);
  font-size: .93rem;
  max-width: 68ch;
}

/* ---- Abschluss --------------------------------------------------- */

.lp-cta {
  margin: 72px 0 0;
  padding: 52px 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: #fff;
  /* Feste Farben statt --accent: der Akzent hellt im dunklen Modus auf,
     weisse Schrift darauf wäre dann nicht mehr lesbar. */
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(255, 255, 255, .22) 0%, transparent 70%),
    linear-gradient(135deg, #3a53d8 0%, #6b3fd0 55%, #8f3bbd 100%);
  box-shadow: var(--shadow);
}
@media (min-width: 720px) { .lp-cta { padding: 68px 32px; } }
.lp-cta h2 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  letter-spacing: -.03em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.lp-cta p { margin: 0 0 26px; opacity: .92; }
.lp-cta__btn {
  background: #fff;
  color: #1c2333;
  border-color: transparent;
}
.lp-cta__btn:hover { background: #eef1fb; }

/* Sanftes Einblenden beim Scrollen — rein additiv. Browser ohne
   scroll-gebundene Animationen zeigen die Abschnitte schlicht sofort. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .lp-section, .lp-shots, .lp-cta {
      animation: lpRise linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }
  }
}
@keyframes lpRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.sep {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  margin: 16px 0;
}
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Fußzeile der Anmeldekarte: „Noch kein Konto? Registrieren" */
.login-foot {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .9rem;
  color: var(--text-muted);
}
.login-foot button {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 10px 6px;
  min-height: var(--tap);
}
.login-foot button:hover { color: var(--accent-hover); }

/* Fortschritt in der Registrierung: „Schritt 2 von 3" */
.flow-head { margin-bottom: 16px; }
.flow-head__step {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.flow-head h2 { margin: 2px 0 4px; font-size: 1.15rem; }
.flow-head__lead { font-size: .9rem; color: var(--text-muted); margin: 0; }

.flow-dots {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}
.flow-dots span {
  height: 4px;
  flex: 1 1 auto;
  border-radius: 999px;
  background: var(--surface-3);
}
.flow-dots span.is-done { background: var(--accent); }

/* ------------------------------------------------------------------ *
 * Markenzeile und Spendenlink im Footer
 * ------------------------------------------------------------------ */

.site-footer__brand { margin: 0 0 10px; }
.site-footer__donate { margin: 0 0 12px; }

.donate-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--tap);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}
.donate-link:hover {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
}
.donate-link__heart { width: 16px; height: 16px; flex: none; }

/* ------------------------------------------------------------------ *
 * Sammler-Links (Verwaltung beim Besitzer)
 * ------------------------------------------------------------------ */

/* Hält die beiden Linkarten auseinander — Verwechslung wäre fatal */
.link-kinds {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.link-kinds li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .875rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.link-kinds__icon { flex: none; font-size: 1.05rem; line-height: 1.35; }
.link-kinds b { display: block; }
.link-kinds--public { border-left: 3px solid var(--ok); }
.link-kinds--private { border-left: 3px solid var(--warn); }

.collector-list { list-style: none; margin: 0; padding: 0; }
.collector-list li + li { margin-top: 10px; }

.collector-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.collector-row--revoked { background: var(--surface-2); }
.collector-row--revoked .collector-row__label { text-decoration: line-through; color: var(--text-muted); }
.collector-row__main { flex: 1 1 150px; min-width: 0; }
.collector-row__label { font-weight: 700; overflow-wrap: anywhere; }
.collector-row__meta { font-size: .8rem; color: var(--text-muted); }
.collector-row__count {
  flex: none;
  text-align: center;
  min-width: 46px;
}
.collector-row__count b { display: block; font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.collector-row__count span { font-size: .68rem; color: var(--text-muted); }
.collector-row__actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; }

/* Der Link steht dauerhaft in der Zeile — der Besitzer muss den QR-Code
   eines Losverkäufers auch morgen noch herzeigen können. */
.collector-row__link {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.collector-url {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.collector-url:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Altbestand ohne berechenbaren Token */
.collector-legacy {
  flex: 1 1 100%;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ------------------------------------------------------------------ *
 * Erfassungsmaske (/s/:token) — auf Tempo gebaut
 * ------------------------------------------------------------------ */

.collect-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.collect-bar__text { flex: 1 1 auto; min-width: 0; }
.collect-bar__question {
  margin: 0;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.collect-bar__who { font-size: .78rem; color: var(--text-muted); }
.collect-bar__count {
  flex: none;
  text-align: center;
  min-width: 64px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.collect-bar__count b { display: block; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.collect-bar__count span { font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Grosse Felder: wird im Stehen, einhändig und bei schlechtem Licht bedient */
.collect-form .field { margin-bottom: 12px; }
.collect-form .label { font-size: .95rem; }

#collect-name,
#collect-value {
  min-height: 64px;
  font-size: 1.7rem !important;
  font-weight: 700;
  padding: 10px 14px;
}
#collect-value {
  text-align: center;
  font-size: 2.1rem !important;
  font-variant-numeric: tabular-nums;
}
.collect-value-row { display: flex; align-items: center; gap: 10px; }
.collect-value-row .collect-unit {
  flex: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  max-width: 34%;
  overflow-wrap: anywhere;
}

#collect-save { min-height: 62px; font-size: 1.15rem; }

/* Kurze Rückmeldung, die den Ablauf nicht aufhält */
.collect-flash {
  min-height: 24px;
  margin: 8px 0 0;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ok);
  opacity: 0;
  transition: opacity .15s ease;
}
.collect-flash.is-visible { opacity: 1; }

.collect-recent { list-style: none; margin: 0; padding: 0; }
.collect-recent li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 8px 12px;
  border-bottom: 1px solid var(--border);
}
.collect-recent li:last-child { border-bottom: 0; }
.collect-recent li.is-new { animation: flashRow 1s ease; }
@keyframes flashRow {
  from { background: var(--ok-soft); }
  to { background: transparent; }
}
.collect-recent__name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.collect-recent__value { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.1rem; }

/* ------------------------------------------------------------------ *
 * Verkaufsbetrieb: Staffelauswahl am Stand
 * ------------------------------------------------------------------ *
 * Diese Schaltflächen werden im Stehen, einhändig und bei schlechtem
 * Licht getroffen — deshalb gross, kontrastreich und weit auseinander. */

.tier-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 380px) { .tier-grid { grid-template-columns: 1fr 1fr; } }

.tier-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 84px;
  padding: 12px 10px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: center;
}
.tier-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.tier-btn__count { font-size: 1rem; font-weight: 700; }
.tier-btn__price {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
}
.tier-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.tier-btn--free { border-style: dashed; }
.tier-btn--free .tier-btn__price { font-size: 1.05rem; color: var(--text-muted); }

/* Der zu kassierende Betrag — die Zahl, die der Helfer laut ausspricht */
.amount-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  margin-bottom: 14px;
}
.amount-banner__label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .85;
}
.amount-banner__value {
  font-size: clamp(2.1rem, 11vw, 3rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.amount-banner__note { font-size: .82rem; opacity: .9; }
.amount-banner__main { flex: 1 1 auto; min-width: 0; }
.amount-banner__change {
  flex: none;
  min-height: var(--tap);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--on-accent) 45%, transparent);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}
.amount-banner__change:hover { background: color-mix(in srgb, var(--on-accent) 15%, transparent); }

/* Laufende Summe in der Kopfleiste.
   Der Losverkäufer hält dem Gast das Handy hin — was er heute eingenommen
   hat, geht den Gast nichts an. Deshalb der Umschalter direkt daneben. */
.collect-bar__totals {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
  font-size: .74rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.collect-bar__zahlen { min-width: 0; }
.collect-bar__totals b {
  display: block;
  font-size: 1.15rem;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
  /* Verborgen wird derselbe Platz eingenommen — die Zeile darf nicht
     springen, wenn mitten im Verkauf umgeschaltet wird. */
  min-width: 4.5ch;
}

.geld-toggle {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.geld-toggle:hover { background: var(--surface-2); color: var(--text); }

/* Auf schmalen Geräten wird es in der Leiste sonst zu eng: Bild, Frage,
   Summe und Umschalter nebeneinander lassen der Frage kaum Platz. Dort
   bekommt die Frage eine eigene Zeile über den Zahlen. */
@media (max-width: 400px) {
  .collect-bar { flex-wrap: wrap; }
  .collect-bar__text { flex: 1 1 100%; order: -1; }
}
.geld-toggle svg { width: 22px; height: 22px; display: block; }
.geld-toggle .geld-toggle__zu { display: none; }
.geld-toggle[aria-pressed="true"] .geld-toggle__auf { display: none; }
.geld-toggle[aria-pressed="true"] .geld-toggle__zu { display: block; }

/* Mehrere Tippfelder einer Staffel */
.sale-values { display: grid; gap: 8px; }
.sale-value-row { display: flex; align-items: center; gap: 8px; }
.sale-value-row__idx {
  flex: none;
  width: 24px;
  text-align: right;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-muted);
}
.sale-value-row input {
  min-height: 56px;
  font-size: 1.5rem !important;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Liste der letzten Verkäufe */
.sale-list { list-style: none; margin: 0; padding: 0; }
.sale-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px 9px 12px;
  border-bottom: 1px solid var(--border);
}
.sale-row:last-child { border-bottom: 0; }
.sale-row.is-new { animation: flashRow 1s ease; }
.sale-row__main { flex: 1 1 auto; min-width: 0; }
.sale-row__name { font-weight: 600; overflow-wrap: anywhere; }
.sale-row__meta { font-size: .76rem; color: var(--text-muted); }
.sale-row__price { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; }
.sale-row--voided { background: var(--surface-2); }
.sale-row--voided .sale-row__name,
.sale-row--voided .sale-row__price { text-decoration: line-through; color: var(--text-muted); }
.tag-voided {
  flex: none;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
}

/* ------------------------------------------------------------------ *
 * Betriebsart: zwei benannte Möglichkeiten statt eines Ankreuzfelds
 * ------------------------------------------------------------------ */

.mode-choice {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.mode-choice legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.mode-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.mode-option:hover { border-color: var(--border-strong); }
.mode-option input[type="radio"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.mode-option__text { min-width: 0; }
.mode-option__name { display: block; font-weight: 700; margin-bottom: 3px; }
.mode-option__desc {
  display: block;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.45;
}
/* Ausgewähltes Feld hervorheben; .is-chosen ist die Rückfallebene für
   Browser ohne :has() und wird von den Seitenskripten gesetzt. */
.mode-option.is-chosen {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ------------------------------------------------------------------ *
 * Preisstaffel bearbeiten (Anlegen und Verwalten)
 * ------------------------------------------------------------------ */

.tier-editor { list-style: none; margin: 0 0 10px; padding: 0; }
.tier-editor li { margin-bottom: 8px; }
.tier-edit-row { display: flex; align-items: center; gap: 8px; }
.tier-edit-row input { min-height: var(--tap); }
.tier-edit-row__count { flex: 0 1 84px; }
.tier-edit-row__price { flex: 1 1 92px; }
.tier-edit-row__sep { flex: none; font-size: .85rem; color: var(--text-muted); white-space: nowrap; }

/* ------------------------------------------------------------------ *
 * Abrechnung — wird am Abend gelesen und ausgedruckt
 * ------------------------------------------------------------------ */

.reckon-scroll { overflow-x: auto; }
table.reckon {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}
table.reckon th, table.reckon td {
  padding: 9px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.reckon th:first-child, table.reckon td:first-child {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
table.reckon thead th {
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom-width: 2px;
}
table.reckon tfoot td {
  font-weight: 800;
  border-top: 2px solid var(--border-strong);
  border-bottom: 0;
  padding-top: 12px;
}
table.reckon .num-void { color: var(--danger); }
table.reckon tbody tr:hover { background: var(--surface-2); }

/* Gratis erfasste Tipps gehören zum Spiel, aber nicht in die Kasse.
   Senkrechte Linie und gedämpfte Farbe setzen sie vom Geld ab. */
table.reckon .col-free {
  border-left: 2px solid var(--border-strong);
  color: var(--text-muted);
}

/* Gesperrte Helfer bleiben in der Abrechnung — das Geld wurde ja kassiert */
table.reckon tr.is-revoked { background: var(--surface-2); }
table.reckon tr.is-revoked:hover { background: var(--surface-3); }
.reckon-name--revoked { text-decoration: line-through; color: var(--text-muted); }
.reckon-revoked {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--warn);
  white-space: nowrap;
}

.reckon-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.reckon-total {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
}
.reckon-total__value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.reckon-total__label { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }
.reckon-total--void { background: var(--danger-soft); }
.reckon-total--void .reckon-total__value { color: var(--danger); }
/* Kein Geld: neutrale Kachel, damit sie nicht als Einnahme gelesen wird */
.reckon-total--free { background: var(--surface-2); }
.reckon-total--free .reckon-total__value { color: var(--text-muted); }

/* ------------------------------------------------------------------ *
 * Schaufenster (öffentliche Seite ohne Tippformular)
 * ------------------------------------------------------------------ */

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.price-table th, .price-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}
.price-table th {
  text-align: left;
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.price-table td:last-child, .price-table th:last-child { text-align: right; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table__count { font-weight: 700; }
.price-table__price { font-weight: 800; font-size: 1.15rem; color: var(--accent-text); }

.buy-hint {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.buy-hint__icon { flex: none; font-size: 1.4rem; line-height: 1.2; }
.buy-hint__text { font-size: 1rem; font-weight: 600; }
.buy-hint__sub { font-size: .875rem; font-weight: 400; color: var(--text-muted); margin-top: 3px; }

/* ------------------------------------------------------------------ *
 * Zusatztext zur Schätzfrage
 * ------------------------------------------------------------------ *
 * Freier Text vom Ersteller. Zeilenumbrüche bleiben erhalten, HTML wird
 * nie ausgewertet — der Text kommt per textContent in die Seite. */

.info-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.question-hero .info-text {
  margin-top: 14px;
  font-size: .95rem;
  color: var(--text-muted);
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/* In der Verkaufsmaske: die Losverkäufer werden danach gefragt */
.collect-info {
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: .875rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0 0 14px;
}

.target-hero .info-text {
  margin-top: 12px;
  font-size: .9rem;
  color: var(--text-muted);
  text-align: left;
}

/* ------------------------------------------------------------------ *
 * Live-Verlauf auf der Schaufensterseite
 * ------------------------------------------------------------------ *
 * Beiwerk: Er zeigt, dass etwas läuft, darf die Seite aber nie stören.
 * Deshalb keine Fehlermeldungen und keine springenden Zeilen. */

.feed-total {
  text-align: center;
  padding: 4px 0 14px;
}
.feed-total__value {
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.feed-total__label { font-size: .9rem; color: var(--text-muted); margin-top: 2px; }

.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
  font-size: .925rem;
}
.feed-list li:last-child { border-bottom: 0; }
.feed-list__name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.feed-list__count { color: var(--text-muted); }
.feed-list__time { margin-left: auto; flex: none; font-size: .8rem; color: var(--text-muted); }

/* Neue Zeilen blenden sich ruhig ein, statt hereinzuspringen */
.feed-list li.is-new { animation: feedIn .45s ease both; }
@keyframes feedIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .feed-list li.is-new { animation: none; }
}

.feed-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: .925rem;
  padding: 18px 8px;
}

/* ------------------------------------------------------------------ *
 * Bild zur Schätzfrage
 * ------------------------------------------------------------------ */

/* Gross und prominent: Teilnehmer- und Ergebnisseite. Die Leute sollen
   das Glas sehen, bevor sie schätzen. */
.question-image {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface-2);
  margin: 0 auto 16px;
}
.question-hero .question-image {
  max-height: 46vh;
  margin-bottom: 18px;
}

/* Vorschau in der Verwaltung */
.image-preview {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* Klein und dezent: der Helfer am Stand kennt das Glas längst */
.collect-thumb {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* Das native Datei-Feld ist auf dem Handy zu klein — wir lösen es über
   einen richtigen Knopf aus und verstecken das Feld barrierefrei. */
.file-input {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.image-meta {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.image-meta b { color: var(--text); }

/* Fortschritt: über Mobilfunk dauert das, also zeigen wir echte Prozente.
   Natives <progress> — das meldet den Stand auch an Screenreader, und es
   braucht kein style-Attribut, das eine strenge CSP blockieren würde. */
.upload-progress { margin-top: 12px; }
progress.upload-bar {
  display: block;
  width: 100%;
  height: 10px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  color: var(--accent);
}
progress.upload-bar::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
progress.upload-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.upload-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.upload-progress__text {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.upload-progress__text b { color: var(--text); font-variant-numeric: tabular-nums; }
.collect-recent__time { flex: none; font-size: .75rem; color: var(--text-muted); }

/* ------------------------------------------------------------------ *
 * Mock-Hinweis (Entwicklung)
 * ------------------------------------------------------------------ */

.mock-badge {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  font-size: .78rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.mock-badge button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 6px;
  min-height: 32px;
}

.print-only { display: none; }

@media print {
  .topbar, .site-footer, .btn, .mock-badge, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }

  /* Auf der Verwaltungsseite wird genau eine Sache gedruckt: die Abrechnung.
     Alles andere wäre Papierverschwendung und lenkt beim Kassensturz ab. */
  body.printing-reckon .wrap > *:not(#reckon-box) { display: none !important; }
  body.printing-reckon #reckon-box {
    border: 0;
    padding: 0;
    margin: 0;
  }
  body.printing-reckon .print-only { display: block; }
  body.printing-reckon .reckon-scroll { overflow: visible; }
  body.printing-reckon table.reckon { font-size: 11pt; }
  body.printing-reckon table.reckon th,
  body.printing-reckon table.reckon td { border-color: #999; }
  body.printing-reckon .reckon-total { background: #f2f2f2 !important; border: 1px solid #ccc; }
  body.printing-reckon .reckon-total__value { color: #000 !important; }
  body.printing-reckon tr { break-inside: avoid; }

  /* Auf Papier fehlt die Farbe: Trennlinie und Sperrvermerk müssen
     trotzdem erkennbar bleiben. */
  body.printing-reckon table.reckon .col-free {
    border-left: 2px solid #666;
    color: #444 !important;
  }
  body.printing-reckon table.reckon tr.is-revoked { background: #f2f2f2 !important; }
  body.printing-reckon .reckon-revoked { color: #000 !important; }
  body.printing-reckon .reckon-name--revoked { color: #444 !important; }
}
