/* portal.css — Kundenportal und Verwaltung (event-server Lauf 9), Richtung „Bühne" der Eventsuite.
   Farben, Schriftfamilien, Kanten und Schatten kommen aus tokens.css des Launchers (unverändert übernommen mit
   werkzeug/stil-uebernehmen.py, eine Quelle); hier stehen nur die Web-Maße (die Kiosk-Maße der Tokens sind für
   1920 × 1080 aus 3 m Abstand gedacht) — wie server/intern/vorlage/stil.css. Keine externen Quellen: Schriften unter
   schrift/ (SIL OFL 1.1, Lizenztexte daneben). */

@font-face { font-family: "Big Shoulders Display"; src: url("schrift/BigShouldersDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("schrift/BigShouldersDisplay-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("schrift/InstrumentSans-Variable.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--molton); color: var(--spot); font-family: var(--font-ui); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh;
  /* das eine Licht der Bühne: ein warmer Kegel von links oben, sonst Molton */
  background:
    radial-gradient(circle at 12% -8%, color-mix(in srgb, var(--accent) 16%, transparent) 0, color-mix(in srgb, var(--accent) 5%, transparent) 30%, transparent 58%) no-repeat,
    var(--molton); }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
code, .hash { font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace; font-size: .92em; overflow-wrap: anywhere; }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.seite { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); min-height: 100vh; display: flex; flex-direction: column; }

/* --- Kopf ---------------------------------------------------------------------------------------------------------- */
.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 20px 0 16px; border-bottom: 1px solid var(--spot-ghost); }
.kopf__marke { display: flex; flex-direction: column; gap: 2px; }
.kennzeile { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: var(--track-kind); text-transform: uppercase; color: var(--spot-dim); }
.kopf__bereich { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 28px; line-height: 1; letter-spacing: .01em; }
.kopf__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 15px; }
.kopf__nav > a { font-weight: 600; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.kopf__nav > a:hover { border-bottom-color: var(--accent); }
.sprachwahl { color: var(--spot-dim); letter-spacing: var(--track-caps); font-size: 13px; }
.sprachwahl b { color: var(--accent); }
.abmelden { margin: 0; }

/* --- Inhalt ------------------------------------------------------------------------------------------------------- */
.inhalt { flex: 1; padding: clamp(24px, 5vw, 56px) 0; }
/* Zeilenhöhe 1 statt --lh-title (.86, für einzeilige Kiosk-Titel): mehrzeilige Web-Titel mit Umlauten (Ü, Ä) brauchen
   Platz für die Punkte; padding-top hält sie von der Kennzeile darüber fern (Sichtbeleg Lauf 9) */
.titel { margin: 4px 0 16px; padding-top: .1em; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(38px, 7vw, 72px); line-height: 1; overflow-wrap: break-word; hyphens: manual; }
.lead { font-size: 19px; max-width: 60ch; }
.karte { background: var(--molton-lift); box-shadow: var(--shadow-drop), var(--shadow-inset); padding: clamp(20px, 4vw, 40px); max-width: 1000px; }
.karte--schmal { max-width: 560px; margin: 0 auto; }
.abschnitt { padding: 8px 0 32px; }
.abschnitt__kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.abschnitt h2 { margin: 0; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(28px, 4vw, 44px); line-height: var(--lh-display); }
.klein { font-size: 14px; color: var(--spot-dim); }
p { max-width: 70ch; }

/* --- Hinweise ----------------------------------------------------------------------------------------------------- */
.hinweis { margin: 12px 0; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--molton-lift-2); font-size: 15px; }
.warnung { margin: 12px 0; padding: 12px 14px; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--molton-lift)); font-size: 15px; }
ul.warnung { padding-left: 32px; }
.meldung { margin: 10px 0 0; font-size: 15px; color: var(--spot); }

/* --- Formulare und Knöpfe ---------------------------------------------------------------------------------------- */
.formular { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
label { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--spot-dim); margin-top: 8px; }
input[type="text"], input[type="email"], input[type="password"], select {
  font: inherit; font-size: 17px; color: var(--spot); background: var(--molton); border: 1px solid var(--spot-frame);
  padding: 12px 14px; min-height: 48px; width: 100%; border-radius: 0; box-shadow: var(--shadow-well); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.haken { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; color: var(--spot); font-weight: 500; }
.haken input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }   /* flex: none — bei langem Text schrumpfte das Kästchen (Sichtbeleg Lauf 10) */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px;
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: var(--track-btn); text-transform: uppercase; text-decoration: none;
  color: var(--spot); background: var(--molton-lift-2); border: 2px solid var(--spot-frame); cursor: pointer; box-shadow: var(--shadow-lift); }
.knopf:hover { border-color: var(--accent); }
.knopf--haupt { background: var(--accent); color: var(--on-accent); border-color: var(--accent); margin-top: 8px; }
.knopf--haupt:hover { filter: brightness(1.06); }
.knopf--leise { min-height: 40px; padding: 6px 12px; font-size: 13px; box-shadow: none; background: transparent; }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.passkey { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.trenner { display: flex; align-items: center; gap: 12px; margin: 20px 0 8px; color: var(--spot-faint); font-size: 13px; text-transform: uppercase; letter-spacing: var(--track-caps); }
.trenner::before, .trenner::after { content: ""; flex: 1; border-top: 1px solid var(--spot-ghost); }
.link-feld { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px !important; }
p.link-feld { overflow-wrap: anywhere; }

/* --- Schritte, Codes -------------------------------------------------------------------------------------------- */
.schritte { padding-left: 24px; margin: 12px 0 8px; }
.schritte li { margin: 6px 0; }
.codes { list-style: none; counter-reset: code; margin: 16px 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.codes li { counter-increment: code; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--molton); box-shadow: var(--shadow-well); }
.codes li::before { content: counter(code); min-width: 20px; color: var(--accent); font-family: var(--font-display); font-weight: 900; font-size: 22px; }
.codes code { font-size: 17px; letter-spacing: .06em; }

/* --- Status, Tabellen ------------------------------------------------------------------------------------------- */
.status { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.status li { padding: 14px 16px; background: var(--molton-lift); box-shadow: var(--shadow-inset); border-left: 4px solid var(--spot-frame); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.status li b { flex-basis: 100%; font-size: 13px; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--spot-dim); }
.status--ok { border-left-color: var(--spot-edge) !important; }
.status--warn { border-left-color: var(--accent) !important; }
.status--hinweis { border-left-color: var(--spot-frame); }
.marke { display: inline-block; white-space: nowrap; padding: 1px 8px; border: 1px solid var(--accent); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; }
.marke--ok { border-color: var(--spot-frame); color: var(--spot); }
.marke--warn { background: var(--accent); color: var(--on-accent); }
.tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabelle th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--spot-faint); padding: 0 12px 8px 0; border-bottom: 1px solid var(--spot-frame); }
.tabelle td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--spot-ghost); vertical-align: top; overflow-wrap: anywhere; }
.tabelle form { display: inline; margin: 0; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.ereignisse { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; font-size: 15px; }

.fuss { padding: 24px 0 36px; border-top: 1px solid var(--spot-ghost); color: var(--spot-faint); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.fuss a { color: var(--spot-dim); }

/* --- Spiele (Lauf 10): Kacheln im Stil des internen Bereichs (server/intern/vorlage/stil.css), Spielseite ---------- */
.kacheln { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.kachel-form { margin: 0; height: 100%; }
.kachel { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; text-align: left; font: inherit; color: var(--spot);
  background: var(--molton-lift); border: 0; cursor: pointer; box-shadow: var(--shadow-drop), var(--shadow-inset); transition: transform var(--dur-mark) var(--ease-out); }
.kachel::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: var(--tile-frame) solid var(--accent); opacity: 0; transition: opacity var(--dur-mark) var(--ease-out); }
.kachel:hover::after, .kachel:focus-visible::after { opacity: 1; }
.kachel:focus-visible { outline: none; }
.kachel:active { transform: scale(.985); }
.kachel__bild { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--molton); box-shadow: var(--shadow-well); }
.kachel__bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel__bild::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, transparent, var(--veil)); }
.kachel__name { position: absolute; left: 20px; right: 20px; bottom: 14px; z-index: 1; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: clamp(28px, 3vw, 36px); line-height: 1; }
.kachel__text { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 16px 20px 20px; }
.kachel__kennung { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--spot-dim); }
.kachel__kennung b { color: var(--spot); font-weight: 700; }
.kachel__beschreibung { color: var(--spot-dim); font-size: 15px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 3px 10px; border: 1px solid var(--spot-frame); font-size: 12px; font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--spot); }
.chip.aus { border-style: dashed; border-color: var(--spot-ghost); color: var(--spot-faint); text-decoration: line-through; }
.hinweis--kachel { margin: 0; font-size: 14px; }
.hinweis--kachel b, .hinweis b { color: var(--accent); }
.kachel__los { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; letter-spacing: var(--track-btn); text-transform: uppercase; color: var(--accent); }
.kachel__los::after { content: "→"; font-size: 18px; letter-spacing: 0; transition: transform var(--dur-mark) var(--ease-out); }
.kachel:hover .kachel__los::after { transform: translateX(4px); }
.spiel { display: flex; flex-direction: column; gap: 12px; }
.spiel__kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.spiel__titel { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(28px, 4vw, 44px); line-height: 1; }
.spiel__kopf .klein { margin: 0; }
/* die Hülle rechnet selbst (Zoom = min(Breite/1920, Höhe/1080)); der Rahmen gibt ihr 16:9, höchstens die Fensterhöhe */
.spiel__rahmen { display: block; width: 100%; height: min(56.25vw, 100vh); height: min(56.25vw, 100dvh); border: 0; background: #000; box-shadow: var(--shadow-drop); scroll-margin-top: 0; }
/* Handy quer (niedrige Fenster): der Rahmen nimmt die ganze Höhe, spiel.js rollt ihn nach dem Laden in den Blick (Sichtbeleg Lauf 10:
   vorher sah man im Querformat nur einen Streifen des Spiels) */
@media (max-height: 560px) { .spiel__rahmen { width: calc(100% + 2 * clamp(16px, 4vw, 48px)); margin: 0 calc(-1 * clamp(16px, 4vw, 48px)); height: 100vh; height: 100dvh; } }
.spiel__start { margin: 0; }
.js .spiel__start [data-ohne-skript] { display: none; }
.abschnitt > h2 + .tabelle, .abschnitt > h2 + .liste-spiele, .abschnitt > h2 + p { margin-top: 16px; }   /* Tabellenkopf klebte an der Überschrift */
.liste-spiele { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.auswahl { border: 1px solid var(--spot-ghost); padding: 8px 14px 12px; margin: 8px 0; display: grid; gap: 2px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.auswahl legend { font-size: 14px; font-weight: 600; color: var(--spot-dim); padding: 0 6px; }
input[type="number"], input[type="datetime-local"] { font: inherit; font-size: 17px; color: var(--spot); background: var(--molton); border: 1px solid var(--spot-frame);
  padding: 10px 12px; min-height: 48px; border-radius: 0; box-shadow: var(--shadow-well); color-scheme: dark; }
input.zahl { width: 7em; }
.inline-form { display: inline-flex !important; align-items: center; gap: 6px; }
.inline-form input.zahl { min-height: 40px; padding: 4px 8px; width: 5em; font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .kachel, .kachel::after, .kachel__los::after { transition: none; } .kachel:active { transform: none; } }

/* --- schmal: Tabellen werden zu Karten, nichts scrollt waagerecht -------------------------------------------------- */
@media (max-width: 720px) {
  html { font-size: 16px; }
  .kopf__bereich { font-size: 24px; }
  /* „Wiederherstellungs-" (19 Zeichen) passt bei 32 px in 326 px Inhaltsbreite — bei 38 px brach es mitten im Wort */
  .titel { font-size: 32px; }
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
  .tabelle tr { padding: 12px 0; border-bottom: 1px solid var(--spot-ghost); }
  .tabelle td { padding: 3px 0; border: 0; }
  .tabelle td[data-titel]::before { content: attr(data-titel) " "; display: block; font-size: 11px; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--spot-faint); }
  .karte { padding: 20px 16px; }
}

/* --- Schaufenster demo.… (Lauf 11): Kacheln als Links, Spielseite mit Bestenliste und Namensdialog, eingebettete Ansicht ---- */
a.kachel { text-decoration: none; }
.demo-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.demo-leiste .klein { margin: 0; }
.demo-leiste .knopf--haupt, .anfrage .knopf--haupt { margin-top: 0; }
.anfrage { max-width: 70ch; }
.bestenliste h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--spot-dim); }
.bestenliste__spalten { display: grid; gap: 16px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin: 16px 0 8px; }
.rangliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rangliste li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto 3.6em; gap: 10px; align-items: baseline; padding: 8px 12px;
  background: var(--molton-lift); box-shadow: var(--shadow-inset); font-size: 15px; font-variant-numeric: tabular-nums; }
.rangliste li.neu { outline: 2px solid var(--accent); outline-offset: -2px; }
.rangliste li.anonym .rangliste__name { color: var(--spot-dim); font-style: italic; }
.rangliste__platz { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--accent); line-height: 1; }
.rangliste__name { overflow-wrap: anywhere; font-weight: 600; }
.rangliste__wert { font-weight: 700; text-align: right; }
.rangliste__dauer { color: var(--spot-dim); text-align: right; font-size: 13px; }
.rangliste li.rangliste__leer { display: block; color: var(--spot-dim); font-style: italic; }
.meldung--ok { padding: 8px 12px; border-left: 4px solid var(--accent); background: var(--molton-lift-2); }
/* Namensdialog nach einer Runde: über dem Spiel, Tastatur und Bildschirmleser bleiben darin (role=dialog, aria-modal) */
.eintrag { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: color-mix(in srgb, var(--molton) 78%, transparent); }
.eintrag[hidden] { display: none; }
.eintrag__karte { width: min(100%, 460px); max-height: calc(100dvh - 32px); overflow: auto; margin: 0; padding: 24px;
  background: var(--molton-lift); box-shadow: var(--shadow-drop), var(--shadow-inset); border-top: 4px solid var(--accent); }
.eintrag__karte h2 { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 32px; line-height: 1; }
.eintrag__ergebnis { margin: 4px 0 4px; font-size: 17px; }
.eintrag__ergebnis b { font-family: var(--font-display); font-size: 30px; color: var(--accent); }
.eintrag__karte .klein { margin: 0; }
.eintrag__karte .aktionen { margin-top: 8px; gap: 10px; }
.eintrag__karte .aktionen .knopf--haupt { margin-top: 0; }
/* eingebettet auf oppermann-events.de: ohne Kopf, das Spiel füllt die Rahmenhöhe (Leiste darunter bleibt sichtbar) */
.eingebettet .inhalt { padding: 8px 0 0; }
.eingebettet .spiel__rahmen { height: min(56.25vw, calc(100vh - 72px)); height: min(56.25vw, calc(100dvh - 72px)); }
.eingebettet .fuss { padding: 12px 0 16px; }
@media (max-width: 720px) {
  .rangliste li { grid-template-columns: 2em minmax(0, 1fr) auto; }
  .rangliste__dauer { display: none; }
  .eintrag__karte h2 { font-size: 26px; }
}
/* Admin „Demo" (Lauf 11): Einbett-Code zum Kopieren */
textarea.einbett { display: block; width: 100%; min-width: 16em; margin: 0 0 6px; padding: 8px 10px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12px; line-height: 1.45; color: var(--spot); background: var(--molton); border: 1px solid var(--spot-frame); border-radius: 0; box-shadow: var(--shadow-well); resize: vertical; }
.tabelle--demo select { min-height: 40px; padding: 4px 8px; font-size: 15px; width: auto; }
.tabelle--demo code { display: block; margin-bottom: 6px; }
.rangliste--admin { margin-bottom: 16px; max-width: 640px; }
.abschnitt h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--spot-dim); }
/* Lauf 11, beim Ansehen der Sichtbelege gefunden: Knopf „Speichern" brach als „SPEICH/ERN" um, der Hinweis „Lange Ladezeit"
   überlappte die Namenszeile, „Bestenliste" klebte am Anfrage-Knopf (Handy) */
.tabelle--demo .inline-form .knopf, .tabelle--demo .knopf { white-space: nowrap; }
.tabelle--demo .hinweis { display: block; margin: 8px 0 0; }
.bestenliste { margin-top: 24px; }
