/* =====================================================================
   LineBattle – Spiel, Start, Lobby, Einstellungen (nach Entwurf v0.1)
   Nutzt die Tokens aus assets/css/app.css. Mobil zuerst, 320 px Worst Case.
   ===================================================================== */

body.lb-body { font-size: var(--fs-md); }
.lb-text-mag { color: var(--lb-mag); }
.lb-text-grn { color: var(--lb-grn); }
.lb-text-blu { color: var(--lb-blu); }
.lb-text-org { color: var(--lb-org); }
.lb-text-ink { color: var(--lb-text); }
.lb-center { text-align: center; }
.lb-klein { font-size: var(--fs-sm); }
.lb-stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.lb-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.lb-h2 { font-size: var(--fs-xl); }

/* ---------- Kopfzeile ---------- */
.lb-top { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; margin: 0 0 var(--sp-3); }
.lb-top__titel { font-size: clamp(1.8rem, 8vw, 2.2rem); flex: 1; min-width: 0; line-height: 1; }
.lb-top__titel--klein { font-size: 1.5rem; }
.lb-top__wer { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-top__klein { font-size: var(--fs-sm); color: var(--lb-text-muted); line-height: 1.1; }
.lb-icon-btn {
  width: 48px; height: 48px; flex: 0 0 48px; display: inline-grid; place-items: center;
  border: 2px solid var(--lb-ink); border-radius: 50%; background: var(--lb-surface); color: var(--lb-text);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-press) var(--ease-out);
}
.lb-icon-btn:active { transform: scale(0.94); }
.lb-icon-btn .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.lb-icon-btn--klein { width: 44px; height: 44px; flex-basis: 44px; }
.lb-icon-only { padding: 0; width: var(--touch); flex: 0 0 var(--touch); }

.lb-roomcode {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0; padding: 2px 10px; min-height: 48px;
  border: 2px dashed var(--lb-ink); border-radius: 12px; background: var(--lb-surface); color: var(--lb-text); cursor: pointer;
}
.lb-roomcode__lab { font-size: 0.8rem; color: var(--lb-text-muted); line-height: 1; }
.lb-roomcode__code { font-family: var(--font-marker); font-size: 1.5rem; letter-spacing: 2px; line-height: 1.1; }

.lb-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; padding: 6px;
  background: var(--lb-surface); border: 2.3px solid var(--lb-ink); border-radius: 14px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
}
.lb-menu__item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 4px 12px;
  border: 0; background: transparent; border-radius: 10px; font-size: 1.2rem; text-align: left; cursor: pointer; color: var(--lb-text);
}
.lb-menu__item:focus-visible { outline-offset: -2px; }
.lb-menu__item--gefahr { color: var(--lb-danger); }
@media (hover: hover) and (pointer: fine) { .lb-menu__item:hover { background: var(--lb-surface-2); } }

/* ---------- Bausteine ---------- */
.lb-card {
  background: var(--lb-surface); border: 2.3px solid var(--lb-ink); border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4); box-shadow: var(--shadow-1);
}
.lb-card--hinweis { border-style: dashed; background: var(--lb-amber-soft); }
.lb-section-label { font-family: var(--font-btn); font-weight: 700; font-size: 1.15rem; margin: var(--sp-3) 0 var(--sp-1); display: flex; align-items: center; gap: 6px; }
.lb-card > .lb-section-label:first-child { margin-top: 0; }

.lb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.lb-chip {
  min-height: 44px; padding: 4px 14px; border: 2px solid var(--lb-ink); border-radius: 999px;
  background: var(--lb-surface); color: var(--lb-text); font-size: 1.1rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-press) ease;
}
.lb-chip:active:not(:disabled) { transform: scale(0.96); }
.lb-chip.is-an { background: var(--lb-ink); color: var(--lb-bg); }
.lb-chip:disabled:not(.is-an) { opacity: 0.55; cursor: default; }
.lb-chip:disabled.is-an { cursor: default; }
.lb-chip--klein { min-height: 36px; padding: 2px 10px; font-size: 1rem; }
.lb-chip--mag { border-color: var(--lb-mag); color: var(--lb-mag); background: var(--lb-mag-soft); }
.lb-chip--grn { border-color: var(--lb-grn); color: var(--lb-grn); background: var(--lb-grn-soft); }
.lb-chip--blu { border-color: var(--lb-blu); color: var(--lb-blu); background: var(--lb-blu-soft); }
.lb-chip--org { border-color: var(--lb-org); color: var(--lb-org); background: var(--lb-org-soft); }
.lb-order .lb-chip { cursor: default; min-width: 40px; }
.lb-order .lb-chip.is-dran { box-shadow: 0 0 0 2px var(--lb-bg), 0 0 0 4.5px var(--lb-amber); }

/* Schalter-Zeile */
.lb-srow { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; cursor: pointer; }
.lb-srow__lab { flex: 1; min-width: 0; font-size: 1.2rem; line-height: 1.15; display: flex; flex-direction: column; }
.lb-srow__hilfe { font-size: var(--fs-sm); color: var(--lb-text-muted); }
.lb-switch { position: relative; flex: 0 0 52px; width: 52px; height: 30px; }
.lb-switch__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.lb-switch__track {
  position: absolute; inset: 0; border: 2px solid var(--lb-ink); border-radius: 999px; background: var(--lb-surface-2);
  transition: background-color var(--dur-ui) ease;
}
.lb-switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1.7px solid var(--lb-ink); transition: transform var(--dur-ui) var(--ease-out);
}
.lb-switch__input:checked + .lb-switch__track { background: #3DA35A; }
.lb-switch__input:checked + .lb-switch__track::after { transform: translateX(22px); }
.lb-switch__input:focus-visible + .lb-switch__track { outline: 2.5px solid var(--lb-focus); outline-offset: 2px; }
.lb-switch__input:disabled { cursor: default; }
.lb-switch__input:disabled + .lb-switch__track { opacity: 0.5; }
.lb-unter { padding-left: var(--sp-3); border-left: 2px dashed var(--lb-line); margin-left: 4px; }
.lb-unter.is-aus { opacity: 0.55; }

/* Avatare (Seiten & Initialen) */
.lb-ava--lg { width: 64px; height: 64px; font-size: 1.7rem; }
.lb-ava--seite, .lb-ava--initialen { font-family: var(--font-marker); line-height: 1; }
.lb-ava--initialen { font-size: 0.95rem; }
.lb-ava--mag { background: var(--lb-mag-soft); color: var(--lb-mag); border-color: var(--lb-mag); }
.lb-ava--grn { background: var(--lb-grn-soft); color: var(--lb-grn); border-color: var(--lb-grn); }
.lb-ava--blu { background: var(--lb-blu-soft); color: var(--lb-blu); border-color: var(--lb-blu); }
.lb-ava--org { background: var(--lb-org-soft); color: var(--lb-org); border-color: var(--lb-org); }
.lb-ava--blau { background: var(--lb-blau-soft); color: var(--lb-blau); }
.lb-ava--gruen { background: var(--lb-gruen-soft); color: var(--lb-gruen); }
.lb-ava--lila { background: var(--lb-lila-soft); color: var(--lb-lila); }
.lb-ava--orange { background: var(--lb-orange-soft); color: var(--lb-orange); }
.lb-ava--leer { border-style: dashed; color: var(--lb-text-muted); background: transparent; }
.lb-ava--ring-blau.lb-ava--initialen { background: var(--lb-blau-soft); color: var(--lb-blau); }
.lb-ava--ring-gruen.lb-ava--initialen { background: var(--lb-gruen-soft); color: var(--lb-gruen); }
.lb-ava--ring-lila.lb-ava--initialen { background: var(--lb-lila-soft); color: var(--lb-lila); }
.lb-ava--ring-orange.lb-ava--initialen { background: var(--lb-orange-soft); color: var(--lb-orange); }

.lb-pill { display: inline-flex; align-self: center; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--lb-ink); font-size: var(--fs-sm); }
.lb-pill--warn { background: var(--lb-amber-soft); border-color: var(--lb-amber); }
.lb-netz { text-align: center; color: var(--lb-warn); font-size: var(--fs-sm); }
.lb-badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--lb-mag); color: #fff;
  font-size: 0.85rem; display: inline-grid; place-items: center; line-height: 1;
}

/* ---------- Spiel-Layout ---------- */
.lb-main--spiel { max-width: 560px; padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); }
.lb-spiel { display: flex; flex-direction: column; min-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); gap: var(--sp-2); }
.lb-top--spiel { margin-bottom: var(--sp-1); }

.lb-scores { display: flex; gap: 8px; }
.lb-score {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  border: 2.3px solid var(--lb-ink); border-radius: 16px; padding: 6px 8px; background: var(--lb-surface);
  transition: box-shadow var(--dur-ui) ease, background-color var(--dur-ui) ease;
}
.lb-score.is-dran { box-shadow: 0 0 0 3px var(--lb-bg), 0 0 0 5.5px var(--lb-amber); background: var(--lb-amber-soft); }
.lb-score.is-raus { opacity: 0.55; }
.lb-score__wer { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-score__name { font-size: 1.05rem; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score__sub { font-size: 0.85rem; color: var(--lb-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score__punkte { font-family: var(--font-marker); font-size: 1.8rem; line-height: 1; }
.lb-scores--drei .lb-score { padding: 5px 6px; gap: 5px; }
.lb-scores--drei .lb-score__punkte { font-size: 1.4rem; }
.lb-scores--drei .lb-ava--sm { width: 30px; height: 30px; font-size: 0.85rem; }
.lb-order { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }

.lb-turnrow { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); min-height: 30px; }
.lb-turn { font-family: var(--font-btn); font-weight: 700; font-size: 1.2rem; text-align: center; }
.lb-turn.is-ich { text-decoration: underline wavy; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.lb-uhr { font-family: var(--font-marker); font-size: 1.15rem; padding: 0 10px; border: 2px solid var(--lb-ink); border-radius: 999px; }
.lb-uhr.is-knapp { color: var(--lb-danger); border-color: var(--lb-danger); }

.lb-banner-slot { min-height: 0; display: flex; justify-content: center; pointer-events: none; position: relative; z-index: 5; }
.lb-banner {
  position: absolute; top: 4px; padding: 6px 16px; text-align: center;
  font-family: var(--font-marker); font-size: 2rem; line-height: 1.05; color: var(--lb-mag);
  background: var(--lb-gelb); border: 2.4px solid var(--lb-ink); border-radius: 14px 18px 12px 16px;
  transform: rotate(-1.5deg); animation: lb-banner-in 260ms var(--ease-out) both;
}
:root[data-theme="dark"] .lb-banner, :root[data-theme="tafel"] .lb-banner { color: #8E0F4C; border-color: #1A1A18; }
.lb-banner--warn { font-family: var(--font-btn); font-weight: 700; font-size: 1.15rem; color: #1A1A18; background: var(--lb-amber-soft); transform: none; }
:root[data-theme="dark"] .lb-banner--warn, :root[data-theme="tafel"] .lb-banner--warn { color: var(--lb-text); border-color: var(--lb-ink); }
@keyframes lb-banner-in { from { opacity: 0; transform: rotate(-1.5deg) scale(0.85); } to { opacity: 1; transform: rotate(-1.5deg) scale(1); } }

.lb-hinweise:empty { display: none; }

/* ---------- Brett ---------- */
.lb-board-wrap { flex: 1 1 auto; min-height: 240px; display: flex; align-items: center; justify-content: center; padding: 4px 0; }
.lb-board-wrap--klein { min-height: 0; height: 170px; flex: 0 0 auto; margin: 0 auto var(--sp-3); width: min(100%, 260px); }
.lb-brett { width: 100%; height: 100%; max-height: 62dvh; display: block; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; border-radius: 12px; }
.lb-brett:focus { outline: none; }
.lb-brett.is-tastatur:focus-visible { outline: 2.5px dashed var(--lb-focus); outline-offset: 4px; }
.lb-brett.is-aktiv { cursor: pointer; }
.lb-hilfe { stroke: var(--lb-hilfe); stroke-width: 2.2; stroke-dasharray: 2 9; stroke-linecap: round; opacity: 0.8; }
.lb-brett.is-aktiv .lb-hilfe { opacity: 1; }
.lb-punkt { fill: var(--lb-ink); }
.lb-linie { fill: none; stroke-width: 7; stroke-linecap: round; }
.lb-linie--mag { stroke: var(--lb-mag); }
.lb-linie--grn { stroke: var(--lb-grn); }
.lb-linie--blu { stroke: var(--lb-blu); }
.lb-linie--org { stroke: var(--lb-org); }
.lb-linie--rand { stroke: var(--lb-rand); stroke-width: 5; }
.lb-linie.is-letzte { stroke-width: 9; }
.lb-linie.is-neu { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lb-strich 240ms var(--ease-out) forwards; }
@keyframes lb-strich { to { stroke-dashoffset: 0; } }
.lb-flaeche { stroke: none; opacity: 0.85; }
.lb-flaeche--mag { fill: var(--lb-mag-soft); }
.lb-flaeche--grn { fill: var(--lb-grn-soft); }
.lb-flaeche--blu { fill: var(--lb-blu-soft); }
.lb-flaeche--org { fill: var(--lb-org-soft); }
.lb-flaeche.is-neu { animation: lb-fuell 300ms ease-out both; }
@keyframes lb-fuell { from { opacity: 0; } to { opacity: 0.85; } }
.lb-mark { fill: none; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.lb-mark--mag { stroke: var(--lb-mag); }
.lb-mark--grn { stroke: var(--lb-grn); }
.lb-mark--blu { stroke: var(--lb-blu); }
.lb-mark--org { stroke: var(--lb-org); }
.lb-mark.is-neu { transform-box: fill-box; transform-origin: center; animation: lb-plopp 320ms var(--ease-out) both; }
@keyframes lb-plopp { 0% { transform: scale(0.2); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
.lb-vorschau { fill: none; stroke-width: 7; stroke-linecap: round; pointer-events: none; }
.lb-vorschau.is-zeiger { opacity: 0.35; }
.lb-vorschau.is-cursor { opacity: 0.5; stroke-dasharray: 8 8; }
.lb-vorschau.is-auswahl { opacity: 0.75; stroke-width: 10; stroke-dasharray: 14 8; }
.lb-board--vorschau { max-height: 180px; }

/* ---------- Dock ---------- */
.lb-dock { display: flex; align-items: center; gap: 10px; padding: 6px 0 2px; min-height: 60px; }
.lb-dock > :empty { display: none; }
.lb-dock__chat { flex: 1 1 auto; min-width: 0; display: flex; }
.lb-dock__mitte { flex: 1 1 auto; display: flex; }
.lb-dock__haupt { flex: 1 1 auto; }
.lb-dock--pp .btn:first-child { flex: 0 0 auto; }
.lb-dock--pp .lb-dock__haupt { flex: 1 1 auto; }
.lb-chat-pill {
  flex: 1; min-width: 0; min-height: 52px; border: 2.2px solid var(--lb-ink); border-radius: 16px;
  background: var(--lb-surface); color: var(--lb-text-muted); display: flex; align-items: center; gap: 8px; padding: 0 14px;
  font-size: 1.15rem; cursor: pointer;
}
.lb-chat-pill[aria-expanded="true"] { color: var(--lb-text); background: var(--lb-surface-2); }
.lb-funk { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lb-funk-info { font-size: 0.8rem; color: var(--lb-text-muted); max-width: 120px; text-align: center; line-height: 1.1; }
.lb-funk.is-hoert .lb-funk-info { color: var(--lb-grn); font-weight: 700; }
.lb-ptt {
  width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--lb-btn-edge); color: #fff;
  background: repeating-linear-gradient(118deg, var(--lb-btn-a) 0 3px, var(--lb-btn-b) 3px 6px, var(--lb-btn-c) 6px 8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 3px 0 var(--lb-btn-shadow); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) ease;
}
:root[data-theme="tafel"] .lb-ptt { color: #1E3826; }
.lb-ptt .icon { width: 28px; height: 28px; stroke-width: 2.2; }
.lb-ptt__lab { font-family: var(--font-btn); font-size: 0.8rem; line-height: 1; }
.lb-ptt.is-sendet { transform: scale(0.94) translateY(2px); box-shadow: 0 0 0 5px var(--lb-mag-soft), 0 0 0 8px var(--lb-mag); }
.lb-ptt:disabled { opacity: 0.45; cursor: not-allowed; }

/* Chat-Blatt */
.lb-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100vw); z-index: 80;
  max-height: 70dvh; display: flex; flex-direction: column; gap: var(--sp-2);
  background: var(--lb-surface); border: 2.4px solid var(--lb-ink); border-bottom: 0; border-radius: 20px 20px 0 0;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow-2);
  animation: lb-sheet-in 220ms var(--ease-out) both;
}
@keyframes lb-sheet-in { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.lb-sheet__kopf { display: flex; align-items: center; gap: var(--sp-2); }
.lb-sheet__titel { flex: 1; font-size: 1.6rem; }
.lb-chat__liste { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 auto; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.lb-chat__msg { display: flex; flex-direction: column; max-width: 85%; align-self: flex-start; background: var(--lb-surface-2); border-radius: 14px; padding: 4px 10px; }
.lb-chat__msg.is-ich { align-self: flex-end; background: var(--lb-blau-soft); }
.lb-chat__wer { font-size: 0.85rem; font-weight: 700; }
.lb-chat__text { font-size: 1.1rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.lb-chat__leer { align-self: center; }
.lb-chat__form { display: flex; gap: var(--sp-2); }
.lb-chat__form .input { flex: 1; }

/* Vorhang (Pass & Play) und Ende */
.lb-vorhang, .lb-ende {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--sp-4);
  background: var(--lb-overlay); animation: lb-fade 200ms ease-out both;
}
.lb-vorhang { background: var(--lb-bg); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lb-vorhang__karte, .lb-ende__karte {
  width: min(440px, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto;
  background: var(--lb-surface); border: 2.5px solid var(--lb-ink); border-radius: 20px 22px 18px 21px;
  padding: var(--sp-5) var(--sp-4); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: var(--sp-3); align-items: stretch; text-align: center;
}
.lb-vorhang__karte .lb-ava { align-self: center; }
.lb-vorhang__karte h2 { font-size: 1.9rem; }
.lb-ende__klein { color: var(--lb-text-muted); }
.lb-ende__titel { font-size: clamp(2rem, 10vw, 2.8rem); line-height: 0.98; text-transform: uppercase; }
.lb-ende__brett { align-self: center; }

.lb-stat-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.lb-stat-table th, .lb-stat-table td { border: 2px solid var(--lb-ink); padding: 6px 8px; text-align: center; }
.lb-stat-table thead th { background: var(--lb-surface-2); font-family: var(--font-btn); font-weight: 700; font-size: 0.95rem; }
.lb-stat-table th[scope="row"], .lb-stat-table td:first-child { text-align: left; }
.lb-stat-table tr.is-raus { opacity: 0.6; }
.lb-stat-table tr.is-ich { background: var(--lb-amber-soft); }
.lb-table-scroll { overflow-x: auto; }

/* ---------- Pass & Play Einstellungen ---------- */
.lb-pp-setup { padding-bottom: var(--sp-4); }
.lb-pp-namen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-2); }
.lb-pp-name .field__label { font-family: var(--font-btn); font-weight: 400; }

/* ---------- Lobby ---------- */
.lb-pending { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; border-color: var(--lb-amber); background: var(--lb-amber-soft); }
.lb-pending__text { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.lb-seite { display: flex; flex-direction: column; gap: 4px; padding-left: var(--sp-2); border-left: 4px solid var(--lb-line); }
.lb-seite--mag { border-left-color: var(--lb-mag); }
.lb-seite--grn { border-left-color: var(--lb-grn); }
.lb-seite--blu { border-left-color: var(--lb-blu); }
.lb-seite__kopf { font-family: var(--font-btn); font-weight: 700; }
.lb-platz { display: flex; align-items: center; gap: var(--sp-2); min-height: 52px; border-radius: 12px; padding: 2px 4px; }
.lb-platz.is-frei .lb-platz__name { font-style: italic; }
.lb-platz.is-gewaehlt { background: var(--lb-amber-soft); }
.lb-platz.is-ziel { outline: 2px dashed var(--lb-amber); }
.lb-platz__name { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 1.15rem; overflow-wrap: anywhere; }
.lb-hinweis-klein { font-size: var(--fs-sm); color: var(--lb-warn); }
.lb-zuschauer:empty { display: none; }
.lb-warte { text-align: center; font-family: var(--font-btn); font-size: 1.15rem; color: var(--lb-text-muted); }
.lb-leer-karte { margin-top: 20vh; display: flex; flex-direction: column; gap: var(--sp-3); align-items: center; text-align: center; }

/* ---------- Startseite ---------- */
.lb-main--start { max-width: 460px; }
.lb-start { display: flex; flex-direction: column; gap: var(--sp-3); }
.lb-start__head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.lb-logo-btn {
  align-self: center; position: relative; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 6px 40px 6px 6px;
  border-radius: 16px; -webkit-tap-highlight-color: transparent;
}
.lb-logo-btn__mund { position: absolute; right: 2px; top: 8px; width: 32px; height: 40px; }
.lb-mund__kopf { fill: var(--lb-mag-soft); stroke: var(--lb-ink); stroke-width: 2; }
.lb-mund__mund { fill: var(--lb-ink); transform-box: fill-box; transform-origin: center; }
.lb-mund__welle { fill: none; stroke: var(--lb-ink); stroke-width: 2; stroke-linecap: round; opacity: 0.35; }
.lb-logo-btn.is-spricht .lb-mund__mund { animation: lb-sprechen 200ms ease-in-out 5 alternate; }
.lb-logo-btn.is-spricht .lb-mund__welle { animation: lb-welle 400ms ease-in-out 3; }
.lb-logo-btn.is-spricht .lb-mund__welle--2 { animation-delay: 120ms; }
@keyframes lb-sprechen { from { transform: scaleY(1); } to { transform: scaleY(0.35); } }
@keyframes lb-welle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.lb-start__brett { height: 160px; margin: 0 auto; width: min(100%, 260px); }
.lb-start__brett svg { width: 100%; height: 100%; }
.lb-start__rejoin { justify-content: space-between; }
.lb-code-pill { font-family: var(--font-marker); font-size: 1rem; padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.25); }
.lb-join { display: flex; align-items: stretch; gap: 6px; border: 2.3px solid var(--lb-ink); border-radius: 16px; background: var(--lb-surface); padding: 4px; }
.lb-join__code { border: 0; min-height: 48px; font-family: var(--font-marker); letter-spacing: 3px; text-transform: uppercase; font-size: 1.4rem; flex: 1; background: transparent; }
.lb-join__code:focus-visible { outline: none; }
.lb-join:focus-within { outline: 2.5px solid var(--lb-focus); outline-offset: 2px; }
.lb-join__go { box-shadow: none; border-width: 2px; background: var(--lb-surface-2); }
.lb-join__optionen { display: flex; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.lb-join__hilfe { font-size: var(--fs-sm); flex: 1 1 200px; }
.lb-warte-karte { text-align: center; display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; border-color: var(--lb-amber); background: var(--lb-amber-soft); }
.lb-warte-karte__titel { font-family: var(--font-btn); font-weight: 700; font-size: 1.2rem; }
.is-offline { opacity: 0.55; }
.lb-start__fuss { display: flex; justify-content: center; gap: var(--sp-4); flex-wrap: wrap; }
.lb-start__fuss a { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; color: var(--lb-text); text-decoration: none; font-size: 1.15rem; }

/* ---------- Unterseiten (Einstellungen, Regeln, Statistik) ---------- */
.lb-seite-schmal { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--sp-2); }
.lb-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lb-theme {
  min-width: 0; border: 2.2px solid var(--lb-ink); border-radius: 14px; padding: 8px 6px; text-align: center; font-size: 1rem; line-height: 1.15;
  background: var(--lb-surface); color: var(--lb-text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: stretch;
}
.lb-theme small { color: var(--lb-text-muted); }
.lb-theme.is-an { box-shadow: 0 0 0 3px var(--lb-bg), 0 0 0 5.5px var(--lb-ink); }
.lb-theme__sw { height: 36px; border-radius: 8px; border: 1.6px solid var(--lb-ink); position: relative; overflow: hidden; }
.lb-theme__sw::after { content: ""; position: absolute; left: 8px; right: 8px; top: 16px; height: 3px; border-radius: 2px; transform: rotate(-8deg); }
.lb-theme__sw--hell { background: #F4F0E6; } .lb-theme__sw--hell::after { background: #C2186A; }
.lb-theme__sw--dunkel { background: #1C1B19; } .lb-theme__sw--dunkel::after { background: #E8E2D2; }
.lb-theme__sw--tafel { background: #2A4A32; } .lb-theme__sw--tafel::after { background: #F1E9C8; }

.lb-schritte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.lb-schritte li { display: flex; gap: 10px; align-items: flex-start; }
.lb-schritt__nr { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; border: 2px solid var(--lb-ink); display: grid; place-items: center; font-family: var(--font-marker); background: var(--lb-surface); }
.lb-schritte p { font-size: 1.2rem; line-height: 1.3; }
.lb-liste { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }

.lb-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.lb-kacheln > div { border: 2px solid var(--lb-ink); border-radius: 12px; padding: 6px; text-align: center; }
.lb-kacheln dt { font-size: 0.85rem; color: var(--lb-text-muted); }
.lb-kacheln dd { margin: 0; font-family: var(--font-marker); font-size: 1.6rem; }
.lb-rang-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.lb-partien { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.lb-partie { border-left: 4px solid var(--lb-line); padding-left: var(--sp-2); }
.lb-partie--sieg { border-left-color: var(--lb-grn); }
.lb-partie--niederlage { border-left-color: var(--lb-mag); }
.lb-partie__kopf { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lb-partie__kopf time { margin-left: auto; font-size: var(--fs-sm); }

/* Spiel aktiv: Banner nicht ueber das Brett legen */
body.lb-game-active .lb-install, body.lb-game-active .lb-cookie { display: none; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  .lb-linie.is-neu { stroke-dasharray: none; animation: none; }
  .lb-banner { animation: none; }
}
:root[data-reduced-motion="1"] .lb-linie.is-neu { stroke-dasharray: none; }

/* ---------- Worst Case: 320 px / grosse Schrift ---------- */
@media (max-width: 22em) {
  .lb-scores { flex-wrap: wrap; }
  .lb-score { flex: 1 1 130px; }
  .lb-ptt { width: 64px; height: 64px; }
  .lb-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-themes { grid-template-columns: 1fr; }
  .lb-roomcode__code { font-size: 1.2rem; }
}
@media (min-height: 760px) {
  .lb-start { gap: var(--sp-4); }
  .lb-start__brett { height: 190px; }
}
