/* ==========================================================================
   bildschirme10.css · Design 10 «Galerie mit Auktionssaal» fuer Erstellen, Konto und Bannrunde (04.10.2026, c4)
   Gleiche Sprache wie die Spielbildschirme (raum.css) und die Startseite (start.css): Kopf als raumkopf, Saal nur aus
   CSS (raum.css .buehne__saal mit den Look-Tokens --saal-* aus raum_tokens.css), Texte auf einer Tafel (Flaeche
   --c-surface) statt direkt auf der Wand, die Hauptaktion in einer Konsole.
     < 960 px (und Hochformat)  eine Spalte; die Konsole klebt unten (komponenten.css .handlung)
     ab 960 px bzw. Querformat  zwei Zonen: Buehne links, Konsole rechts (klebt oben unter dem Kopf)
   Bannrunde: Raum aus lib/raum.js (Phase 'bann'): Saal-Szene in der Leisten-Zone, Kategorie-Raster auf der Buehne,
   Konsole mit Stand, Uhr und Aktion (schmal unten klebend).
   Regeln wie raum.css (THEMING.md §3): nur --c-*, --g-*, --saal-*, --figur-* und Struktur-Tokens; kein Theme-Name,
   keine Rohfarben. Kleinste Schrift 14 px, Tippziele >= 48 px. CSP: keine Inline-Stile im Markup.
   ========================================================================== */

/* ---------------------------------------------------------------- Gemeinsam */
.b10 { background: var(--c-bg); }
.b10__kopf .losleiste__titel { min-width: 0; }
.b10__raum { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; flex: 1 1 auto; min-width: 0; }
.b10__buehne { display: grid; align-content: start; min-width: 0; }
.b10__buehne > .inhalt { padding-top: var(--space-4); }

/* Saal-Band: Kulisse (Wand, Licht, Boden) hinter einer Tafel */
.b10__saal {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  min-height: 112px;
  padding: var(--space-5) var(--gutter) var(--space-3);
  overflow: hidden;
  background: var(--saal-wand);
  color: var(--saal-text);
}
.b10__tafel {
  position: relative;
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--border-w) solid var(--g-rand);
  border-radius: var(--radius-card);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--g-bild-schatten);
}
.b10__kicker {
  margin: 0;
  font: var(--fw-strong) var(--fs-hint)/var(--lh-ui) var(--font-ui);
  letter-spacing: var(--label-tracking);
  text-transform: var(--g-kicker-case);
  color: var(--c-muted);
}
.b10__titel { font-family: var(--g-titel-font); font-weight: var(--g-titel-gewicht); overflow-wrap: break-word; hyphens: auto; }
.b10__titel::after {
  content: "";
  display: block;
  width: min(var(--deco-rule-w, 132px), 40%);
  height: 0;
  margin-top: var(--space-2);
  border-top: var(--border-w-strong) solid var(--c-accent-line);
}
.b10__tafel > .lead { color: var(--c-text); }

/* Konsole: schmal die Handlungszone (unten klebend), breit eine Karte rechts */
.b10__konsole { align-content: start; }
.b10__konsole-titel { margin: 0; }
.b10__konsole > .knopf { min-height: var(--touch-main); }

/* ---------------------------------------------------------------- Zwei Zonen (breit und Querformat) */
@media (min-width: 960px), (orientation: landscape) and (max-height: 540px) and (min-width: 640px) {
  .app:has(> .app__haupt > .b10) { max-width: min(1240px, 100%); }
  .b10:not(.b10--formular) > .b10__raum {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    column-gap: var(--space-5);
    align-items: start;
    padding: var(--space-4) var(--space-5) var(--space-5);
  }
  .b10:not(.b10--formular) .b10__konsole {
    position: sticky;
    top: calc(var(--k-kopf-h) + var(--space-4));
    bottom: auto;
    max-height: calc(100vh - var(--k-kopf-h) - var(--space-6));
    max-height: calc(100dvh - var(--k-kopf-h) - var(--space-6));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-4);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card), inset 0 0 0 var(--border-w) var(--c-edge);
  }
  .b10:not(.b10--formular) .b10__konsole::before { left: var(--space-4); right: var(--space-4); top: 0; height: var(--border-w-strong); }
  .b10__saal { border-radius: var(--radius-card); padding-inline: var(--space-5); }
  .b10__buehne > .inhalt { padding-inline: 0; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .b10__saal { min-height: 88px; padding-top: var(--space-3); }
  .b10:not(.b10--formular) > .b10__raum { padding: var(--space-2) var(--space-3) var(--space-3); column-gap: var(--space-3); }
  .b10:not(.b10--formular) .b10__konsole { top: calc(var(--k-kopf-h) + var(--space-2)); max-height: calc(100dvh - var(--k-kopf-h) - var(--space-4)); padding: var(--space-3); }
}

/* ==========================================================================
   Erstellen (screens/erstellen.js)
   ========================================================================== */
.b10-schritte { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: 0; padding: 0; list-style: none; }
.b10-schritte__schritt { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; font-size: var(--fs-small); line-height: var(--lh-ui); color: var(--c-muted); }
.b10-schritte__nr {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 var(--border-w) var(--c-muted);
  font: var(--fw-heavy) var(--fs-hint)/1 var(--font-num);
}
.b10-schritte__nr .sym { width: 16px; height: 16px; }
.b10-schritte__schritt[data-stand="jetzt"] { color: var(--c-text); font-weight: var(--fw-strong); }
.b10-schritte__schritt[data-stand="jetzt"] .b10-schritte__nr { background: var(--c-primary); color: var(--c-on-primary); box-shadow: none; }
.b10-schritte__schritt[data-stand="fertig"] .b10-schritte__nr { color: var(--c-primary); box-shadow: inset 0 0 0 var(--border-w-strong) var(--c-primary); }
.b10--erstellen .b10__konsole .zusammenfassung { font-size: var(--fs-hint); }
/* Testbereich (nur Entwicklerschalter): gestrichelt wie «Versuchswertung», nie wie ein normales Angebot */
.b10--erstellen details.aufklapp[data-offen="testbereich"] { background: var(--c-bg); outline-style: dashed; outline-color: var(--c-muted); }
.b10--erstellen details.aufklapp[data-offen="testbereich"] > summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 var(--border-w-strong) var(--c-muted);
}
/* Auswahl in der Kachel: Randstrich wie der eigene Platz im Spiel (nur Identitaet, Rand bleibt aus komponenten.css) */
.b10--erstellen .kachel:has(> .kachel__input:checked) { background: var(--c-surface); box-shadow: var(--shadow-card), inset var(--spot-bar-w) 0 0 var(--c-primary); }
@media (max-width: 959.98px) {
  .b10--erstellen .b10__konsole-titel { display: none; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .b10--erstellen .b10-schritte__name { display: none; }
  .b10--erstellen .b10-schritte__schritt[data-stand="jetzt"] .b10-schritte__name { display: inline; }
}
@media (min-width: 960px) {
  .b10--erstellen .b10__saal { min-height: 132px; }
  .b10--erstellen .b10__tafel { min-width: min(100%, 26rem); }
}
@media (min-width: 1100px) {
  .b10--erstellen .kacheln { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .b10--erstellen .kacheln > :not(.kachel) { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- Kategorie-Raster als Galerie (Erstellen und Bannrunde)
   Jede Kategorie hat ihr Symbol im Bilderrahmen des Looks (--g-bild-*: Passepartout mit Messing-Haarlinie bzw.
   Show-Bildschirm mit Sticker-Kontur) vor der Saalwand. Auswahl, Bann und Fokus bleiben wie in komponenten.css. */
.b10 .bann,
.bannraum .bann { --k-bann-img: 88px; }
.b10 .bann__bild--sym,
.bannraum .bann__bild--sym {
  align-items: center;
  justify-content: center;
  background: linear-gradient(var(--saal-paneel), var(--saal-wand));
  color: var(--c-text);
  box-shadow: inset 0 calc(var(--border-w) * -1) 0 var(--c-line);
}
.b10 .bann__bild--sym .sym,
.bannraum .bann__bild--sym .sym {
  box-sizing: content-box;
  width: 32px;
  height: 32px;
  padding: 10px;
  border: var(--g-bild-rand-w) solid var(--g-bild-rand);
  border-radius: var(--g-bild-radius);
  background: var(--c-surface);
  box-shadow: var(--g-bild-schatten);
}
.bannraum .bann--gebannt .bann__bild--sym .sym { color: var(--c-muted); border-style: dashed; box-shadow: none; }
.bannraum .bann--gezogen .bann__bild--sym .sym { border-color: var(--c-primary); box-shadow: 0 0 0 var(--border-w-strong) var(--c-primary); }
@media (min-width: 960px) {
  .b10 .bann-raster,
  .bannraum .bann-raster { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--space-3); }
}
@media (orientation: landscape) and (max-height: 540px) {
  .b10 .bann,
  .bannraum .bann { --k-bann-img: 64px; }
  .b10 .bann-raster,
  .bannraum .bann-raster { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ==========================================================================
   Konto (screens/konto.js): Wahl, Formulare, Profil-Blatt
   ========================================================================== */
.b10__kopf .b10__marke { flex: 1 1 auto; }
.b10__meldung { padding: var(--space-3) var(--gutter) 0; }
.b10--wahl .b10__saal--gross { min-height: 208px; }
.b10--wahl .b10__tafel { width: 100%; }
.b10--wahl .b10__konsole .handlung__reihe { height: auto; }
.b10--wahl .b10__konsole .handlung__reihe > .knopf--neben { min-height: var(--touch-min); }
@media (min-width: 960px), (orientation: landscape) and (max-height: 540px) and (min-width: 640px) {
  .b10__meldung { padding: 0 0 var(--space-3); }
  .b10--wahl .b10__konsole { gap: var(--space-3); }
  .b10--wahl .b10__konsole .handlung__reihe > .knopf--neben { min-height: var(--touch-main); }
}
@media (min-width: 960px) {
  .b10--wahl .b10__saal--gross { min-height: clamp(300px, calc(100vh - 360px), 520px); padding: var(--space-6); }
  .b10--wahl .b10__tafel { width: auto; max-width: 34rem; padding: var(--space-5) var(--space-6); }
  .b10--wahl .b10__titel { font-size: clamp(30px, 3vw, 42px); }
}
@media (orientation: landscape) and (max-height: 540px) {
  .b10--wahl .b10__saal--gross { min-height: 0; }
  .b10--wahl .b10__titel { font-size: var(--fs-title); }
}

/* Formulare: Karte vor der Saalwand. Schmal: Wand als Band oben, die Karte liegt davor; Hauptaktion klebt unten. */
.b10--formular > .b10__raum { position: relative; isolation: isolate; padding-top: 56px; }
.b10--formular > .b10__raum > .buehne__saal { inset: 0 0 auto 0; height: 128px; }
.b10__karte {
  display: grid;
  min-width: 0;
  width: 100%;
  margin-inline: auto;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--c-bg);
  box-shadow: inset 0 var(--border-w) 0 var(--c-line), 0 -12px 24px -20px var(--c-shadow);
}
.b10__karte > .inhalt { padding-top: var(--space-5); }
.b10__wechsel { justify-items: start; }
.b10--formular .codeanzeige { background: var(--c-surface); }
@media (orientation: landscape) and (max-height: 540px) {
  .app:has(> .app__haupt > .b10--formular) { max-width: none; }
  .b10--formular > .b10__raum { padding-top: 36px; }
  .b10--formular > .b10__raum > .buehne__saal { height: 100%; }
  .b10__karte { width: min(100%, 560px); }
}
@media (min-width: 960px) and (min-height: 541px) {
  .app:has(> .app__haupt > .b10--formular) { max-width: none; }
  .b10--formular > .b10__raum {
    min-height: calc(100vh - var(--k-kopf-h));
    min-height: calc(100dvh - var(--k-kopf-h));
    padding: var(--space-6) var(--space-5);
    justify-items: center;
  }
  .b10--formular > .b10__raum > .buehne__saal { inset: 0; height: auto; }
  .b10--formular .b10__karte {
    width: min(100%, 520px);
    border: var(--border-w) solid var(--g-rand);
    border-radius: var(--radius-card);
    background: var(--c-surface);
    box-shadow: var(--g-bild-schatten);
  }
  .b10--formular .b10__karte > .inhalt { padding: var(--space-5) var(--space-5) var(--space-3); }
  .b10--formular .b10__konsole { position: static; padding: var(--space-2) var(--space-5) var(--space-5); background: none; box-shadow: none; }
  .b10--formular .b10__konsole::before { display: none; }
  .b10--formular .codeanzeige { background: var(--c-bg); }
}

/* Profil-Blatt (Konto-Seite): Ausweis-Karte mit Name, Altersgruppe und Lorbeeren, Aktionen gestapelt */
.b10-profil .b10-ausweis {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  background: var(--c-surface);
  box-shadow: inset 0 0 0 var(--border-w) var(--c-edge), inset var(--spot-bar-w) 0 0 var(--c-accent-line);
}
.b10-profil .b10-ausweis > div { display: contents; }
.b10-profil .b10-ausweis dt { font-weight: 400; color: var(--c-muted); }
.b10-profil .b10-ausweis dd { margin: 0; min-width: 0; font-weight: var(--fw-strong); overflow-wrap: anywhere; font-variant-numeric: tabular-nums lining-nums; }
.b10-profil .b10-aktionen > .knopf--neben { justify-content: flex-start; }

/* ==========================================================================
   Bannrunde (screens/bann.js) im Raum: .spielraum[data-phase="bann"]
   ========================================================================== */
.spielraum[data-phase="bann"] { --g-uhr-farbe: var(--c-primary); }
.spielraum[data-phase="bann"] .raum { grid-template-areas: "leiste" "buehne" "konsole"; }
.spielraum[data-phase="bann"] .raum__leiste { padding: var(--space-3) var(--gutter) 0; }
.spielraum[data-phase="bann"] .raum__buehne { background: var(--c-bg); color: var(--c-text); }
.bann__buehne.inhalt { padding-top: var(--space-3); }
.spielraum[data-phase="bann"] .konsole {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "stand uhr" "ergebnis ergebnis" "haupt haupt" "reihe reihe";
  column-gap: var(--space-3);
  row-gap: var(--space-2);
  align-items: start;
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: inset 0 var(--border-w-strong) 0 var(--c-edge), 0 -14px 28px -18px var(--c-shadow);
}
.spielraum[data-phase="bann"] .konsole__stand { grid-area: stand; align-self: center; flex-direction: column; align-items: flex-start; gap: 2px; }
.spielraum[data-phase="bann"] .konsole__stand .ticker { font-size: var(--fs-small); }
.spielraum[data-phase="bann"] .bann__uhr { grid-area: uhr; }
.spielraum[data-phase="bann"] .konsole__ergebnis { grid-area: ergebnis; }
.spielraum[data-phase="bann"] .konsole__ergebnis:empty { display: none; }
.spielraum[data-phase="bann"] .konsole__haupt { grid-area: haupt; display: grid; gap: var(--space-2); }
.spielraum[data-phase="bann"] .konsole__haupt > .feldfehler:empty { display: none; }
.spielraum[data-phase="bann"] .konsole__reihe { grid-area: reihe; height: auto; }
.spielraum[data-phase="bann"] .konsole__haupt > .knopf { min-height: var(--touch-main); }
@media (max-width: 767.98px) {
  .spielraum[data-phase="bann"] .konsole__ergebnis .hinweis__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
}
@media (min-width: 768px), (orientation: landscape) and (max-height: 540px) {
  .spielraum[data-phase="bann"] .raum {
    grid-template-columns: minmax(0, 1fr) var(--konsole-w);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "leiste konsole" "buehne konsole";
  }
  .spielraum[data-phase="bann"] .raum__leiste { overflow: visible; padding: var(--space-4) var(--space-5) 0; box-shadow: none; }
  .spielraum[data-phase="bann"] .raum__buehne { overflow-y: auto; overscroll-behavior: contain; }
  .spielraum[data-phase="bann"] .bann__buehne.inhalt { padding: var(--space-4) var(--space-5) var(--space-5); }
  .spielraum[data-phase="bann"] .konsole {
    position: relative;
    bottom: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "stand" "uhr" "ergebnis" "." "haupt" "reihe";
    row-gap: var(--space-3);
    padding: var(--space-5) var(--space-5) var(--space-4);
    border-radius: 0;
    box-shadow: inset var(--border-w) 0 0 var(--c-line);
  }
  /* Uhr ueber die ganze Konsole: Zahl rechts, Balken (bzw. Ring links) wie im Spiel */
  .spielraum[data-phase="bann"] .bann__uhr { justify-self: stretch; grid-template-columns: auto minmax(0, 1fr); justify-content: stretch; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .spielraum[data-phase="bann"] .raum__leiste { padding: var(--space-2) var(--space-3) 0; }
  .spielraum[data-phase="bann"] .bann__buehne.inhalt { padding: var(--space-2) var(--space-3) var(--space-3); }
  .spielraum[data-phase="bann"] .konsole { padding: var(--space-3); row-gap: var(--space-2); }
  .spielraum[data-phase="bann"] .lead { font-size: var(--fs-small); }
}
