/* =============================================================================
   BuzzBoard – Design-System der App (Editor, Lobby, Fernbedienung, Profil).
   Die Bühne für den Fernseher steht in tv.css.

   Richtung: klassische TV-Gameshow. Studio-Nacht als Grund, Board-Blau für
   Flächen, Gold für Punktwerte und die eine Hauptaktion je Ansicht.
   Nur dunkel – die App läuft meist im abgedunkelten Wohnzimmer neben dem
   Fernseher.

   Kontraste (WCAG, gegen --bg #060a24):
     --text  #f4f6ff  ≈ 18:1     --muted #a9b6f0 ≈ 9:1
     --gold  #ffc83d  ≈ 12:1     auf Gold nur dunkle Schrift (--on-gold, ≈ 12:1)
     Gold auf Board-Blau #0b1e9e ≈ 9:1, Weiß auf Board-Blau ≈ 14:1
   ============================================================================= */

@import url('../fonts/inter.css');
@import url('../fonts/barlow.css');

:root {
    color-scheme: dark;

    /* Farben */
    --bg:          #060a24;
    --bg-2:        #0a1035;
    --surface:     #0f1748;
    --surface-2:   #16205c;
    --surface-3:   #1d2a72;
    --line:        rgba(169, 182, 240, 0.16);
    --line-strong: rgba(169, 182, 240, 0.32);
    --text:        #f4f6ff;
    --muted:       #a9b6f0;
    --faint:       #7d8bc9;

    --board:       #0b1e9e;
    --board-hell:  #1631c9;
    --board-kante: #2a47e6;
    --gold:        #ffc83d;
    --gold-hell:   #ffd977;
    --gold-tief:   #e0a21a;
    --on-gold:     #1a1300;

    --ok:          #22c55e;
    --ok-weich:    rgba(34, 197, 94, 0.16);
    --bad:         #ef4444;
    --bad-weich:   rgba(239, 68, 68, 0.16);
    --warn:        #f59e0b;

    /* Schrift */
    --font:        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-show:   'Barlow Condensed', 'Arial Narrow', 'Inter', sans-serif;

    /* Abstände (4er-Raster) */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

    --schatten:    0 10px 30px rgba(0, 0, 0, 0.35);
    --schatten-gold: 0 0 0 1px rgba(255, 200, 61, 0.35), 0 8px 24px rgba(255, 200, 61, 0.18);
    --fokus:       0 0 0 3px rgba(255, 200, 61, 0.55);

    --top-h: 56px;
    --dock-h: 0px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --dauer: 180ms;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
    :root { --dauer: 0ms; }
    *, *::before, *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; }
}

/* ----------------------------------------------------------------------------
   Grundlage
   ---------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
/* Das hidden-Attribut gewinnt immer – sonst überstimmt etwa .badge (inline-flex) es. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    background-image: radial-gradient(120% 60% at 50% -10%, rgba(22, 49, 201, 0.35), transparent 60%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font: 800 clamp(28px, 6vw, 40px)/1.05 var(--font-show); letter-spacing: 0.01em; text-transform: uppercase; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: var(--r-sm); }

.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: var(--sp-3); top: -60px; z-index: 50;
    background: var(--gold); color: var(--on-gold); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--sp-3); }

.row { display: flex; align-items: center; gap: var(--sp-2); }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack-lg { gap: var(--sp-5); }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.zahl { font-variant-numeric: tabular-nums; }
.show-schrift { font-family: var(--font-show); letter-spacing: 0.02em; }
.mittig { text-align: center; }

/* Strich und Füllung MÜSSEN hier stehen: Bei <use> auf eine externe Sprite
   erbt das Symbol nichts von deren Wurzel-<svg>, sondern nur vom <use>. */
.icon {
    width: 20px; height: 20px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ----------------------------------------------------------------------------
   Knöpfe
   ---------------------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    min-height: 44px; padding: 0 var(--sp-4);
    border: 1px solid transparent; border-radius: var(--r-md);
    font-weight: 650; font-size: 15px; line-height: 1;
    cursor: pointer; text-decoration: none !important; white-space: nowrap;
    transition: transform var(--dauer) var(--ease), background var(--dauer), border-color var(--dauer), opacity var(--dauer);
    user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: var(--on-gold); box-shadow: 0 6px 18px rgba(255, 200, 61, 0.2); }
.btn-primary:hover:not(:disabled) { background: var(--gold-hell); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }
.btn-board { background: var(--board-hell); color: #fff; border-color: var(--board-kante); }
.btn-board:hover:not(:disabled) { background: var(--board-kante); }
.btn-danger { background: var(--bad-weich); color: #ffb4b4; border-color: rgba(239, 68, 68, 0.4); }
.btn-ok { background: var(--ok); color: #04170b; }
.btn-bad { background: var(--bad); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 var(--sp-3); font-size: 14px; border-radius: var(--r-sm); }
.btn-lg { min-height: 52px; font-size: 17px; padding: 0 var(--sp-6); }
.btn-block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; flex: none;
    border: 0; border-radius: var(--r-md); background: transparent; color: var(--text);
    cursor: pointer; transition: background var(--dauer);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ----------------------------------------------------------------------------
   Formulare
   ---------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--muted); }
.hint { font-size: 13px; color: var(--faint); }
.field-error { color: #ffb4b4; font-size: 13px; }

input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="search"],
input:not([type]), textarea, select {
    width: 100%; min-height: 46px;
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--line-strong); border-radius: var(--r-md);
    font: inherit; font-size: 16px; /* 16px: iOS zoomt sonst beim Fokus */
    transition: border-color var(--dauer), box-shadow var(--dauer);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: var(--fokus); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.zaehler { font-size: 12px; color: var(--faint); text-align: right; }

/* Schalter */
.schalter { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer; min-height: 44px; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter .bahn {
    width: 46px; height: 28px; flex: none; border-radius: var(--r-pill);
    background: var(--surface-3); border: 1px solid var(--line-strong); position: relative;
    transition: background var(--dauer);
}
.schalter .bahn::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; transition: transform var(--dauer) var(--ease);
}
.schalter input:checked + .bahn { background: var(--gold); border-color: var(--gold); }
.schalter input:checked + .bahn::after { transform: translateX(18px); background: var(--on-gold); }
.schalter input:focus-visible + .bahn { box-shadow: var(--fokus); }

/* Segmente (zwei bis vier Möglichkeiten) */
.segment { display: inline-flex; padding: 3px; gap: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.segment button {
    min-height: 38px; padding: 0 var(--sp-3); border: 0; border-radius: 9px; background: transparent;
    color: var(--muted); font-weight: 600; cursor: pointer;
}
.segment button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.segment.segment-block { display: flex; }
.segment.segment-block button { flex: 1; }

/* ----------------------------------------------------------------------------
   Karten, Listen, Kleinteile
   ---------------------------------------------------------------------------- */

.card {
    background: linear-gradient(180deg, var(--surface), rgba(15, 23, 72, 0.85));
    border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4);
}
.card-gold { border-color: rgba(255, 200, 61, 0.45); box-shadow: var(--schatten-gold); }

.list { display: flex; flex-direction: column; }
.list-row {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 56px; padding: var(--sp-3) var(--sp-2);
    color: var(--text); text-decoration: none !important;
    border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0;
    width: 100%; text-align: left; cursor: pointer;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: rgba(255, 255, 255, 0.03); }
.list-title { font-weight: 600; display: block; }
.list-sub { font-size: 13px; color: var(--muted); display: block; }
.row-icon {
    display: grid; place-items: center; width: 40px; height: 40px; flex: none;
    border-radius: var(--r-md); background: var(--surface-2); color: var(--muted);
}
.row-icon.is-gold { background: rgba(255, 200, 61, 0.14); color: var(--gold); }

.badge {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
    border-radius: var(--r-pill); font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
    background: var(--surface-3); color: var(--muted);
}
.badge-gold { background: var(--gold); color: var(--on-gold); }
.badge-ok { background: var(--ok-weich); color: #8ff0b5; }
.badge-bad { background: var(--bad-weich); color: #ffb4b4; }
.badge-warn { background: rgba(245, 158, 11, 0.16); color: #ffd28a; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }

.avatar {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%;
    background: var(--surface-3); color: var(--text); font-size: 13px; font-weight: 700; object-fit: cover;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

.trenner { height: 1px; background: var(--line); margin: var(--sp-4) 0; border: 0; }
.abschnitt-titel { font-size: 13px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin: var(--sp-6) 0 var(--sp-2); }

.error-box {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
    background: var(--bad-weich); border: 1px solid rgba(239, 68, 68, 0.4); color: #ffd0d0;
}
.info-box {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
    background: rgba(22, 49, 201, 0.25); border: 1px solid rgba(42, 71, 230, 0.5); color: var(--text);
    display: flex; gap: var(--sp-3); align-items: flex-start;
}
.warn-box {
    padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
    background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.45); color: #ffe2a8;
    display: flex; gap: var(--sp-3); align-items: flex-start;
}

.spinner {
    width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid var(--line-strong); border-top-color: var(--gold);
    animation: drehen 0.8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4); padding: var(--sp-10) var(--sp-4); }
.empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: var(--surface-2); color: var(--gold); }
.empty-icon .icon { width: 34px; height: 34px; }
.empty h3 { font-size: 20px; }
.empty p { color: var(--muted); max-width: 42ch; margin-top: var(--sp-1); }

.skelett { display: flex; flex-direction: column; gap: var(--sp-3); }
.sk { border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: schimmer 1.4s linear infinite; }
.sk-titel { height: 34px; width: 60%; }
.sk-zeile { height: 16px; width: 40%; }
.sk-karte { height: 88px; }
.sk-karte.hoch { height: 200px; }
@keyframes schimmer { to { background-position: -200% 0; } }

/* Fortschritt */
.fortschritt { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.fortschritt > span { display: block; height: 100%; background: var(--gold); width: 0; transition: width 200ms linear; }

/* ----------------------------------------------------------------------------
   Toast und Blätter (ui.js)
   ---------------------------------------------------------------------------- */

.toast {
    position: fixed; left: 50%; bottom: calc(var(--dock-h) + var(--safe-b) + 20px); z-index: 900;
    transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
    max-width: min(92vw, 460px); padding: var(--sp-3) var(--sp-4);
    background: #e9ecff; color: #0b1035; border-radius: var(--r-md);
    font-weight: 600; box-shadow: var(--schatten);
    transition: transform 220ms var(--ease), opacity 220ms;
    display: flex; align-items: center; gap: var(--sp-3);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast.error { background: #ffe1e1; color: #4a0b0b; }
.toast-aktion { border: 0; background: none; color: #1631c9; font-weight: 800; cursor: pointer; padding: var(--sp-1) var(--sp-2); }

/* Neue Version bereit (sw-update.js) */
.action-banner {
    position: fixed; left: 0; right: 0; z-index: 800;
    bottom: calc(var(--dock-h) + var(--safe-b) + 20px);
    display: flex; align-items: center; gap: var(--sp-2);
    width: min(100% - 2 * var(--sp-4), 460px); margin-inline: auto;
    padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
    border-radius: var(--r-lg); border: 1px solid rgba(255, 200, 61, 0.45);
    background: var(--surface-2); box-shadow: var(--schatten);
    font-size: 14px; font-weight: 650;
}

.sheet-scrim {
    position: fixed; inset: 0; background: rgba(2, 4, 18, 0.66); backdrop-filter: blur(3px);
    animation: einblenden 200ms ease both;
}
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    max-height: min(92dvh, 900px); display: flex; flex-direction: column;
    background: var(--bg-2); border: 1px solid var(--line-strong); border-bottom: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
    animation: hochfahren 260ms var(--ease) both; padding-bottom: var(--safe-b);
}
.sheet.is-closing, .sheet-scrim.is-closing { animation: ausblenden 180ms ease both; }
.sheet.is-dragging { transition: none; }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: var(--sp-2) auto 0; }
.sheet-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-5); }
.sheet-head .title { font-weight: 700; font-size: 18px; }
.sheet-body { padding: var(--sp-2) var(--sp-5) var(--sp-5); overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { padding: var(--sp-3) var(--sp-5) var(--sp-4); border-top: 1px solid var(--line); }
@media (min-width: 768px) {
    .sheet {
        left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw);
        transform: translate(-50%, -50%); border-radius: var(--r-xl); border-bottom: 1px solid var(--line-strong);
        animation: aufzoomen 220ms var(--ease) both;
    }
    .sheet-grab { display: none; }
}
@keyframes einblenden { from { opacity: 0; } }
@keyframes ausblenden { to { opacity: 0; } }
@keyframes hochfahren { from { transform: translateY(100%); } }
@keyframes aufzoomen { from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); } }

.patchnotes { white-space: pre-line; color: var(--muted); }
.install-benefits, .install-steps {
    list-style: none; margin: 0; padding: 0; color: var(--muted);
    display: flex; flex-direction: column; gap: var(--sp-3); counter-reset: schritt;
}
.install-benefits li, .install-steps li { display: flex; align-items: flex-start; gap: var(--sp-3); line-height: 1.45; }
.install-benefits > li > .icon, .install-steps > li > .icon { flex: none; margin-top: 2px; color: var(--gold); }
.install-steps > li::before {
    counter-increment: schritt; content: counter(schritt);
    flex: none; width: 24px; height: 24px; display: grid; place-items: center;
    border-radius: 50%; background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 700;
}

/* ----------------------------------------------------------------------------
   Anmeldung (modules/auth.js)
   ---------------------------------------------------------------------------- */

.auth { min-height: 100dvh; }
.auth-shell {
    min-height: 100dvh; display: grid; align-content: center; gap: var(--sp-8);
    padding: var(--sp-8) var(--sp-4) calc(var(--sp-8) + var(--safe-b));
    max-width: 1080px; margin: 0 auto;
}
.auth-pitch { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.auth-pitch h1 { font-size: clamp(34px, 8vw, 56px); }
.auth-pitch .unterzeile { color: var(--muted); max-width: 40ch; }
.auth-steps { display: none; list-style: none; padding: 0; margin: var(--sp-4) 0 0; gap: var(--sp-4); }
.auth-steps li { display: flex; gap: var(--sp-3); align-items: flex-start; text-align: left; }
.auth-steps b { display: block; }
.auth-steps span:not(.row-icon) { color: var(--muted); font-size: 14px; }
.auth-card {
    width: 100%; max-width: 420px; margin: 0 auto; padding: var(--sp-6);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--schatten);
    display: flex; flex-direction: column; gap: var(--sp-3);
}
.auth-card.is-status { text-align: center; }
.auth-lead { color: var(--muted); }
.auth-note { padding: var(--sp-2) var(--sp-3); background: rgba(255, 200, 61, 0.12); border-radius: var(--r-sm); color: var(--gold-hell); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-2); }
.auth-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.auth-field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.auth-input-group { position: relative; }
.auth-input-group input { padding-right: 52px; }
.auth-reveal { position: absolute; right: 2px; top: 1px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); }
.auth-retry { margin-top: var(--sp-4); }
@media (min-width: 900px) {
    .auth-shell { grid-template-columns: 1.1fr 1fr; align-items: center; }
    .auth-pitch { text-align: left; align-items: flex-start; }
    .auth-steps { display: flex; flex-direction: column; }
}

.wortmarke { display: inline-flex; align-items: center; gap: var(--sp-2); font: 800 26px/1 var(--font-show); letter-spacing: 0.03em; text-transform: uppercase; color: var(--text); text-decoration: none !important; }
.wortmarke img { width: 34px; height: 34px; border-radius: 9px; }
.wortmarke b { color: var(--gold); font-weight: 800; }

/* ----------------------------------------------------------------------------
   App-Hülle: Kopf, Inhalt, Seitenleiste (ab 1024 px)
   ---------------------------------------------------------------------------- */

.app { display: flex; min-height: 100dvh; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: var(--sp-1);
    min-height: 56px; padding: 6px var(--sp-2); padding-top: max(6px, env(safe-area-inset-top));
    background: rgba(6, 10, 36, 0.82); backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color var(--dauer);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar .title { font-weight: 700; font-size: 17px; padding: 0 var(--sp-2); }
.topbar-me { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.topbar-lead { display: flex; align-items: center; }
.kopf-marke { display: inline-flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-2); font: 800 22px/1 var(--font-show); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); text-decoration: none !important; }
.kopf-marke img { width: 30px; height: 30px; border-radius: 8px; }
.kopf-marke b { color: var(--gold); }

.content { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: var(--sp-4); }
/* Der Router fokussiert den Inhalt nach jedem Wechsel (für Screenreader) – ein
   Ring um die ganze Fläche wäre dabei nur Rauschen. */
.content:focus, .content:focus-visible { outline: none; box-shadow: none; border-radius: 0; }
.seite { width: 100%; max-width: 860px; margin: 0 auto; padding: var(--sp-4) var(--sp-4) calc(var(--sp-12) + var(--dock-h) + var(--safe-b)); }
.seite-breit { max-width: 1280px; }
.seite-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-2) 0 var(--sp-5); flex-wrap: wrap; }
.seite-kopf p { color: var(--muted); margin-top: var(--sp-1); }

.dock { position: sticky; bottom: 0; z-index: 15; }
.actionbar:empty { display: none; }
.actionbar {
    display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-b));
    background: rgba(6, 10, 36, 0.9); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}

.sidebar { display: none; }
@media (min-width: 1024px) {
    .sidebar {
        display: flex; flex-direction: column; gap: var(--sp-1);
        width: 260px; flex: none; height: 100dvh; position: sticky; top: 0;
        padding: var(--sp-4) var(--sp-3); border-right: 1px solid var(--line);
        background: rgba(10, 16, 53, 0.65);
    }
    .sb-marke { margin: 0 var(--sp-2) var(--sp-4); }
    .sb-link {
        display: flex; align-items: center; gap: var(--sp-3); min-height: 44px; padding: 0 var(--sp-3);
        border-radius: var(--r-md); color: var(--muted); text-decoration: none !important; font-weight: 600;
        border: 0; background: none; width: 100%; cursor: pointer; text-align: left;
    }
    .sb-link:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
    .sb-link[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
    .sb-label { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin: var(--sp-4) var(--sp-3) var(--sp-1); }
    .sb-fuss { margin-top: auto; }
    .sb-neu { margin: 0 0 var(--sp-3); }
    .topbar .nur-mobil { display: none; }
}

/* ----------------------------------------------------------------------------
   Spiele (Liste)
   ---------------------------------------------------------------------------- */

.spiele-raster { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .spiele-raster { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .spiele-raster { grid-template-columns: repeat(3, 1fr); } }

.spiel-karte {
    position: relative; display: flex; flex-direction: column; gap: var(--sp-3);
    padding: var(--sp-4); border-radius: var(--r-lg); color: var(--text); text-decoration: none !important;
    background: linear-gradient(160deg, #13208a 0%, #0b1563 55%, #0a1040 100%);
    border: 1px solid rgba(42, 71, 230, 0.55); overflow: hidden;
    transition: transform var(--dauer) var(--ease), border-color var(--dauer);
}
.spiel-karte:hover { transform: translateY(-2px); border-color: var(--gold); }
.spiel-karte h3 { font: 800 24px/1.05 var(--font-show); text-transform: uppercase; letter-spacing: 0.02em; }
.spiel-karte .mini-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; opacity: 0.9; }
.spiel-karte .mini-board i { height: 10px; border-radius: 3px; background: var(--board-hell); }
.spiel-karte .mini-board i.g { background: var(--gold); }
.spiel-karte .meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); font-size: 13px; color: var(--muted); }
.spiel-karte .meta span { display: inline-flex; align-items: center; gap: 4px; }
.spiel-karte .ecke { position: absolute; top: var(--sp-3); right: var(--sp-3); display: flex; gap: var(--sp-1); }

/* ----------------------------------------------------------------------------
   Editor: Runden-Reiter, Board-Raster
   ---------------------------------------------------------------------------- */

.reiter { display: flex; gap: var(--sp-1); overflow-x: auto; padding-bottom: var(--sp-1); margin-bottom: var(--sp-4); scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter button {
    flex: none; min-height: 40px; padding: 0 var(--sp-4); border-radius: var(--r-pill);
    border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 650; cursor: pointer;
}
.reiter button[aria-selected="true"] { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.reiter .neu { border-style: dashed; }

.board-editor { overflow-x: auto; padding-bottom: var(--sp-2); }
.eb-raster {
    display: grid; gap: 6px;
    grid-template-columns: 64px repeat(var(--spalten), minmax(120px, 1fr)) 48px;
    min-width: max-content;
}
.eb-kopf, .eb-feld, .eb-wert, .eb-plus {
    border-radius: 10px; min-height: 64px; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: var(--sp-2);
}
.eb-kopf {
    min-height: 72px; background: var(--board); border: 1px solid var(--board-kante); color: #fff;
    font: 700 17px/1.1 var(--font-show); text-transform: uppercase; letter-spacing: 0.03em;
    cursor: pointer; flex-direction: column; gap: 4px; position: relative;
}
.eb-kopf .fortgesetzt { font: 600 11px/1 var(--font); text-transform: none; letter-spacing: 0; color: var(--gold-hell); display: inline-flex; gap: 3px; align-items: center; }
.eb-kopf:hover { border-color: var(--gold); }
.eb-wert {
    background: transparent; color: var(--gold); font: 800 20px/1 var(--font-show); cursor: pointer;
    border: 1px dashed var(--line-strong);
}
.eb-wert:hover { border-color: var(--gold); }
.eb-feld {
    background: var(--board-hell); border: 1px solid var(--board-kante); color: #fff; cursor: pointer;
    flex-direction: column; gap: 4px; position: relative; font-size: 13px; line-height: 1.25;
    transition: transform var(--dauer) var(--ease), border-color var(--dauer);
}
.eb-feld:hover { border-color: var(--gold); transform: translateY(-1px); }
.eb-feld.is-leer { background: rgba(22, 49, 201, 0.18); border-style: dashed; color: var(--muted); }
.eb-feld .vorschau { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eb-feld .marken { position: absolute; top: 4px; right: 5px; display: flex; gap: 3px; color: var(--gold); }
.eb-feld .marken .icon { width: 14px; height: 14px; }
.eb-feld.is-joker { box-shadow: inset 0 0 0 2px var(--gold); }
.eb-plus { border: 1px dashed var(--line-strong); color: var(--muted); cursor: pointer; background: none; }
.eb-plus:hover { color: var(--gold); border-color: var(--gold); }
.eb-ecke { min-height: 72px; }

/* Mobil: Kategorien untereinander */
.eb-liste { display: flex; flex-direction: column; gap: var(--sp-4); }
.eb-kategorie { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.eb-kategorie > header { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-2) var(--sp-3) var(--sp-4); background: var(--board); }
.eb-kategorie > header b { font: 700 19px/1.1 var(--font-show); text-transform: uppercase; letter-spacing: 0.03em; }
.eb-kategorie .eb-zeile { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; color: var(--text); text-align: left; }
.eb-kategorie .eb-zeile:hover { background: rgba(255, 255, 255, 0.03); }
.eb-zeile .wert { font: 800 20px/1 var(--font-show); color: var(--gold); width: 56px; flex: none; }
.eb-zeile.is-leer .text { color: var(--faint); font-style: italic; }
@media (min-width: 900px) { .nur-schmal { display: none !important; } }
@media (max-width: 899px) { .nur-breit { display: none !important; } }

/* ----------------------------------------------------------------------------
   Fragen-Editor
   ---------------------------------------------------------------------------- */

.frage-kopf { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.frage-kopf .wert-chip { font: 800 26px/1 var(--font-show); color: var(--on-gold); background: var(--gold); padding: 6px 12px; border-radius: 10px; }
.frage-kopf .kat { font: 700 22px/1.1 var(--font-show); text-transform: uppercase; letter-spacing: 0.03em; }
.teil { display: flex; flex-direction: column; gap: var(--sp-3); }
.teil + .teil { margin-top: var(--sp-6); }
.teil-titel { display: flex; align-items: center; gap: var(--sp-2); font-weight: 700; font-size: 15px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }

.medium-platz { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); }
.medium-platz.is-belegt { border-style: solid; background: var(--bg-2); }
/* Kopfzeile eines belegten Platzes: Angaben links, Knöpfe rechts – am Handy
   rutschen die Knöpfe in eine eigene Zeile, statt die Angaben zu quetschen. */
.medium-kopf { flex-wrap: wrap; }
.medium-kopf .medium-angaben { flex: 1 1 180px; min-width: 0; }
.medium-kopf .medium-knoepfe { display: flex; gap: var(--sp-1); margin-left: auto; }
.medium-wahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.medium-wahl label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); }
.medium-wahl label:hover { color: var(--text); border-color: var(--gold); }
.medium-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.medium-vorschau { width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--r-sm); background: #000; }
audio.medium-vorschau { background: none; }
.clip { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.clip .field input { min-height: 40px; }
.clip-knoepfe { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ----------------------------------------------------------------------------
   Einstellungen und Mitautoren
   ---------------------------------------------------------------------------- */

.seite-titel { margin: var(--sp-2) 0 var(--sp-5); }
.schalter b { display: block; font-weight: 600; }

/* Bühnenstil: zwei Karten mit einem Stück Board als Vorschau. Die Muster
   nehmen die Tokens der Bühne vorweg (tv.css), ohne sie zu laden. */
.stil-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.stil-karte {
    position: relative; display: flex; flex-direction: column; gap: var(--sp-1);
    padding: var(--sp-3); border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface);
    cursor: pointer; transition: border-color var(--dauer);
}
.stil-karte:hover { border-color: var(--line-strong); }
.stil-karte:has(input:checked) { border-color: var(--gold); box-shadow: var(--schatten-gold); }
.stil-karte:has(input:focus-visible) { box-shadow: var(--fokus); }
.stil-karte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stil-muster { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 8px; margin-bottom: var(--sp-2); }
.stil-muster i {
    display: grid; place-items: center; height: 34px; border-radius: 5px;
    font: 800 17px/1 var(--font-show); font-style: normal; font-variant-numeric: tabular-nums;
}
.stil-glanz .stil-muster { background: radial-gradient(120% 90% at 50% 0%, #1f3bd6, #060a24 75%); }
.stil-glanz .stil-muster i {
    background: linear-gradient(180deg, var(--board-hell), var(--board)); color: var(--gold);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); text-shadow: 0 0 10px rgba(255, 200, 61, 0.55);
}
.stil-flach .stil-muster { background: #030616; }
.stil-flach .stil-muster i { background: #0b1e9e; color: #ffc83d; border-radius: 0; }
.stil-muster i.leer { color: transparent; opacity: 0.45; }
@media (max-width: 420px) { .stil-wahl { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------------------
   Lobby (Partie vorbereiten)
   ---------------------------------------------------------------------------- */

.spieler-liste { display: flex; flex-direction: column; gap: var(--sp-2); }
.spieler-zeile { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.spieler-zeile .farbe { width: 10px; align-self: stretch; border-radius: 5px; flex: none; }
.spieler-zeile input { min-height: 40px; background: transparent; border-color: transparent; padding-left: var(--sp-2); }
.spieler-zeile input:focus { background: var(--bg-2); }

/* ----------------------------------------------------------------------------
   Fernbedienung
   ---------------------------------------------------------------------------- */

.fern { display: flex; flex-direction: column; gap: var(--sp-4); }
.fern-status { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.fern-status .phase { font: 700 15px/1 var(--font-show); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }

.fern-board { display: grid; gap: 4px; grid-template-columns: repeat(var(--spalten), minmax(0, 1fr)); }
.fern-board .kat { font: 700 12px/1.1 var(--font-show); text-transform: uppercase; text-align: center; color: #fff; background: var(--board); border-radius: 6px; padding: 6px 2px; min-height: 40px; display: grid; place-items: center; overflow: hidden; word-break: break-word; }
.fern-board button {
    min-height: 56px; border-radius: 8px; border: 1px solid var(--board-kante);
    background: var(--board-hell); color: var(--gold); font: 800 18px/1 var(--font-show); cursor: pointer; position: relative;
    font-variant-numeric: tabular-nums;
}
.fern-board button:disabled { cursor: default; }
.fern-board button.x { background: rgba(22, 49, 201, 0.12); border-color: transparent; color: transparent; }
.fern-board button.x .gew { color: var(--muted); font: 600 11px/1 var(--font); position: absolute; inset: auto 2px 4px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fern-board button.leer { background: transparent; border: 1px dashed var(--line); }
.fern-board button.a { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.fern-board button .j { position: absolute; top: 2px; right: 3px; color: var(--gold); }
.fern-board button .j .icon { width: 12px; height: 12px; }
.fern-board button.a .j { color: var(--on-gold); }
.fern-board button .m { position: absolute; left: 3px; top: 3px; color: rgba(255, 255, 255, 0.6); }
.fern-board button .m .icon { width: 11px; height: 11px; }

.fern-feld { display: flex; flex-direction: column; gap: var(--sp-3); }
.fern-feld .kopfzeile { display: flex; align-items: center; gap: var(--sp-2); }
.fern-feld .wert-chip { font: 800 22px/1 var(--font-show); color: var(--on-gold); background: var(--gold); padding: 4px 10px; border-radius: 8px; }
.fern-text { font-size: 18px; line-height: 1.4; }
.fern-loesung { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--ok-weich); border: 1px solid rgba(34, 197, 94, 0.45); }
.fern-loesung .label { color: #8ff0b5; }
.fern-loesung .fern-text { font-weight: 700; }
.fern-notiz { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: rgba(255, 200, 61, 0.1); border: 1px solid rgba(255, 200, 61, 0.35); color: var(--gold-hell); font-size: 15px; }
.fern-medium-bild { max-height: 140px; border-radius: var(--r-sm); object-fit: contain; align-self: flex-start; }

.wertung { display: grid; gap: var(--sp-2); }
.wertung-zeile { display: grid; grid-template-columns: 1fr 64px 64px; gap: var(--sp-2); align-items: stretch; }
.wertung-name {
    display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3); min-height: 60px;
    border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--farbe, var(--muted));
}
.wertung-name b { font-weight: 700; }
.wertung-name .pkt { margin-left: auto; font: 800 22px/1 var(--font-show); font-variant-numeric: tabular-nums; }
.wertung-name.is-gesperrt { opacity: 0.45; }
.wertung-name.am-zug { box-shadow: inset 0 0 0 2px var(--gold); }
.wertung-zeile .btn { min-height: 60px; padding: 0; border-radius: var(--r-md); }
.wertung-zeile .btn .icon { width: 28px; height: 28px; }

.punkte-leiste { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-2); }
.punkte-chip { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--farbe, var(--muted)); cursor: pointer; color: var(--text); text-align: left; }
.punkte-chip.am-zug { box-shadow: inset 0 0 0 2px var(--gold); }
.punkte-chip b { font: 800 20px/1 var(--font-show); font-variant-numeric: tabular-nums; margin-left: auto; }

.steuer { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-2); }
.steuer .btn { min-height: 56px; }
.countdown-anzeige { font: 800 34px/1 var(--font-show); font-variant-numeric: tabular-nums; color: var(--gold); min-width: 72px; text-align: center; }
.countdown-anzeige.is-ende { color: var(--bad); }

.fern-dock { position: sticky; bottom: 0; z-index: 10; margin: 0 calc(-1 * var(--sp-4)); padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-b)); background: rgba(6, 10, 36, 0.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; gap: var(--sp-2); }
.fern-dock .btn { flex: 1; min-height: 56px; min-width: 0; }

/* Während ein Befehl unterwegs ist, nimmt die Fernbedienung keinen zweiten an –
   ein Doppeltipp würde sonst mit veralteter Version ankommen. */
.fern-seite.is-busy .fern, .fern-seite.is-busy .fern-dock { pointer-events: none; opacity: 0.75; transition: opacity 120ms 150ms; }
.fern-ergebnis { margin: 0; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; }
.farbe-punkt { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.fern-dock .btn span { min-width: 0; }

.bildschirm-zeile { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.bildschirm-zeile .badge { align-self: flex-start; }
.tv-adresse { word-break: break-all; color: var(--text); }
/* Fernseher in der Statuszeile der Fernbedienung – Zustand nie nur als Farbe */
.bildschirm-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface-2);
    color: var(--muted); font: 700 13px/1 var(--font); cursor: pointer;
}
.bildschirm-chip:active { opacity: 0.8; }
.bildschirm-chip.is-ok { color: #8ff0b5; border-color: rgba(34, 197, 94, 0.45); }
.bildschirm-chip.is-laedt { color: var(--gold); border-color: rgba(255, 200, 61, 0.45); }
.bildschirm-chip.is-blockiert, .bildschirm-chip.is-still { color: #ffb4b4; border-color: rgba(239, 68, 68, 0.55); background: var(--bad-weich); }
.code-eingabe { font: 800 34px/1 var(--font-show) !important; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }

/* Finale */
.finale-zeile { display: grid; grid-template-columns: 1fr 120px; gap: var(--sp-2); align-items: center; }
.finale-wertung { display: grid; grid-template-columns: 1fr 56px 56px; gap: var(--sp-2); align-items: center; }

/* Rangliste / Ergebnisse */
.rang { display: flex; flex-direction: column; gap: var(--sp-2); }
.rang-zeile { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--surface); border-left: 5px solid var(--farbe, var(--muted)); }
.rang-zeile .platz { font: 800 22px/1 var(--font-show); color: var(--gold); width: 28px; text-align: center; }
.rang-zeile .pkt { margin-left: auto; font: 800 22px/1 var(--font-show); font-variant-numeric: tabular-nums; }

/* Ein-Bildschirm-Modus (#/partie/{id}/buehne): Bühne oben, Steuerleiste unten.
   Die Bühne passt sich per ResizeObserver in die Fläche ein (einbildschirm.js). */
.tv.ein-bildschirm { display: flex; flex-direction: column; }
.eb-flaeche { position: relative; flex: 1 1 auto; min-height: 0; }
.eb-leiste { flex: none; }
.tv.is-busy .leiste { pointer-events: none; opacity: 0.75; transition: opacity 120ms 150ms; }
.leiste {
    display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
    padding: var(--sp-2) var(--sp-4) calc(var(--sp-2) + var(--safe-b)); min-height: 64px;
    background: rgba(10, 16, 53, 0.96); border-top: 1px solid var(--line-strong);
    color: var(--text); font-family: var(--font);
}
.leiste-phase { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.leiste-phase .phase { font: 700 15px/1 var(--font-show); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }
.leiste kbd {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
    border: 1px solid var(--line-strong); border-radius: 6px; font: 700 12px/1 var(--font); color: var(--muted);
}
.leiste-mitte { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.leiste-rechts { display: flex; align-items: center; gap: var(--sp-1); flex: none; margin-left: auto; }
.leiste-hinweis { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--muted); font-size: 14px; }
.leiste-gruppe { display: inline-flex; align-items: center; padding: 0 var(--sp-1); border-left: 1px solid var(--line); }
.leiste-spieler {
    display: inline-flex; align-items: center; gap: var(--sp-1);
    padding: 3px 3px 3px var(--sp-3); border-radius: var(--r-md);
    background: var(--surface); border-left: 4px solid var(--farbe, var(--muted)); max-width: 260px;
}
.leiste-spieler b { font-size: 14px; min-width: 0; margin-right: var(--sp-1); }
.leiste-spieler .btn { min-height: 44px; min-width: 44px; padding: 0 var(--sp-2); }
.leiste-spieler.is-gesperrt { opacity: 0.5; }
.leiste-feld { display: inline-flex; flex-direction: column; gap: 2px; }
.leiste-feld input { width: 120px; min-height: 44px; }
.leiste-einsatz { padding-left: var(--sp-2); border-left: 4px solid var(--farbe, var(--muted)); }
.leiste-einsatz .ok { color: #8ff0b5; }
.eb-zeigen {
    position: absolute; right: 16px; bottom: 16px; z-index: 5;
    display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-4);
    border: 1px solid var(--line-strong); border-radius: var(--r-pill);
    background: rgba(10, 16, 53, 0.88); color: var(--muted); font: 600 13px/1 var(--font); cursor: pointer;
    opacity: 0.85; transition: opacity var(--dauer);
}
.eb-zeigen:hover, .eb-zeigen:focus-visible { opacity: 1; }
.eb-zeigen kbd { border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 5px; font: 700 11px/1 var(--font); }

/* Koppeln */
.koppel-karte { text-align: center; display: flex; flex-direction: column; gap: var(--sp-4); align-items: center; padding: var(--sp-8) var(--sp-4); }
.koppel-karte .gross { font: 800 54px/1 var(--font-show); letter-spacing: 0.2em; color: var(--gold); font-variant-numeric: tabular-nums; }

/* Hilfe & Feedback (#/support) – die Meldungen liegen im Hub */
.seite > .support-liste, .seite > .support-kopf, .seite > .thread, .seite > .support-form,
.seite > #antwort-form, .seite > .info-box { max-width: 720px; margin-inline: auto; }
.support-zeile { gap: var(--sp-3); }
.support-zeile.is-neu .list-title { color: var(--gold); }
.support-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-1); flex: none; }
.support-kopf { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; margin-bottom: var(--sp-4); }
.support-kopf h1 { font-size: 22px; line-height: 1.25; }
.thread { list-style: none; margin: var(--sp-4) auto; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.thread-msg { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); max-width: 92%; }
.thread-msg.is-ich { align-self: flex-end; background: var(--surface-2); }
.thread-msg.is-team { align-self: flex-start; border-left: 4px solid var(--gold); }
.thread-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-1); }
.thread-body { line-height: 1.5; overflow-wrap: anywhere; }
.thread-system { display: flex; align-items: center; gap: var(--sp-2); justify-content: center; font-size: 13px; color: var(--faint); }
.thread-bilder { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.thread-bild { display: grid; place-items: center; width: 88px; height: 88px; border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); color: var(--faint); }
.thread-bild img { width: 100%; height: 100%; object-fit: cover; }
.typ-wahl { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.typ-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.typ-karte {
    position: relative; display: flex; flex-direction: column; gap: var(--sp-1); min-height: 44px;
    padding: var(--sp-3); border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface);
    cursor: pointer; transition: border-color var(--dauer);
}
.typ-karte:hover { border-color: var(--line-strong); }
.typ-karte:has(input:checked) { border-color: var(--gold); box-shadow: var(--schatten-gold); }
.typ-karte:has(input:focus-visible) { box-shadow: var(--fokus); }
.typ-karte input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.typ-karte > .icon { color: var(--gold); }
@media (max-width: 480px) { .typ-raster { grid-template-columns: 1fr; } }
.ablage {
    display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: var(--sp-3) var(--sp-4);
    border: 2px dashed var(--line-strong); border-radius: var(--r-lg); cursor: pointer; color: var(--muted);
    transition: border-color var(--dauer), background var(--dauer);
}
.ablage:hover, .ablage.is-ueber, .ablage:focus-within { border-color: var(--gold); background: rgba(255, 200, 61, 0.05); }
.ablage > span { display: flex; flex-direction: column; gap: 2px; }
.ablage b { color: var(--text); }
.vorschau { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.vorschau li { position: relative; width: 88px; height: 88px; border-radius: var(--r-md); overflow: hidden; }
.vorschau img { width: 100%; height: 100%; object-fit: cover; }
.vorschau .icon-btn { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; background: rgba(6, 10, 36, 0.75); }
.feld-fehler { font-size: 13px; color: #ffb4b4; }
.feld-fehler:empty { display: none; }
.diag-box summary { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; cursor: pointer; color: var(--muted); font-size: 14px; }
.diag { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-1) var(--sp-3); margin: var(--sp-2) 0; font-size: 13px; }
.diag dt { color: var(--faint); }
.diag dd { margin: 0; overflow-wrap: anywhere; }

/* Profil */
.seite > .profil-hero, .seite > .settings-label, .seite > .settings-group,
.seite > .seg, .seite > .profil-version { max-width: 560px; margin-inline: auto; }
.profil-hero {
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
    padding: var(--sp-8) var(--sp-5) var(--sp-6);
    border: 1px solid var(--line); border-radius: var(--r-xl);
    background: radial-gradient(90% 80% at 50% 0%, rgba(255, 200, 61, 0.14), transparent 70%), var(--surface);
    text-align: center;
}
.profil-hero h1 { font-size: 28px; }
.avatar-xl { width: 88px; height: 88px; font-size: 28px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(255, 200, 61, 0.45); }
.profil-version { margin-top: var(--sp-6); text-align: center; font-size: 13px; color: var(--faint); }

.settings-label {
    margin-top: var(--sp-6); margin-bottom: var(--sp-2); padding-inline: var(--sp-1);
    font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.settings-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.settings-row {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 56px; padding: var(--sp-3) var(--sp-4); width: 100%;
    background: none; border: 0; text-align: left; font: inherit;
    color: var(--text); text-decoration: none !important; cursor: pointer;
}
.settings-row + .settings-row { box-shadow: 0 -1px 0 var(--line); }
.settings-row:hover { background: rgba(255, 255, 255, 0.03); }
.settings-row:focus-visible { outline: none; box-shadow: inset var(--fokus); }
.chev { color: var(--faint); width: 18px; height: 18px; flex: none; }

/* Segmente (Sprache) */
.seg { display: flex; gap: 2px; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.seg button {
    flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 var(--sp-3);
    border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted);
    font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
    transition: background-color var(--dauer) var(--ease), color var(--dauer) var(--ease);
}
.seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.seg button:focus-visible { outline: none; box-shadow: var(--fokus); }

/* Support (Fenster zum Hub) */
.support-liste .list-row { align-items: flex-start; }
.support-verlauf { display: flex; flex-direction: column; gap: var(--sp-3); }
.support-nachricht { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); max-width: 92%; }
.support-nachricht.ist-team { align-self: flex-start; background: var(--surface-2); }
.support-nachricht.ist-eigen { align-self: flex-end; background: rgba(22, 49, 201, 0.35); border-color: rgba(42, 71, 230, 0.6); }
.support-nachricht .kopf { font-size: 12px; color: var(--faint); margin-bottom: var(--sp-1); }
.support-nachricht p { white-space: pre-wrap; word-break: break-word; }
.support-bilder { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.support-bilder img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-sm); cursor: zoom-in; }
.support-diagnose { font-size: 12px; color: var(--faint); white-space: pre-wrap; background: var(--bg-2); padding: var(--sp-3); border-radius: var(--r-sm); }

/* Bühne im Ein-Bildschirm-Modus liegt über der Hülle (tv.css) */
body.buehne-offen { overflow: hidden; }

/* Aktionsmenü (ui.js openMenu) */
.row-icon.is-neg { background: var(--bad-weich); color: #ffb4b4; }
.text-danger { color: #ffb4b4; }
