/* WANTED - Mobile UI v2 (Umsetzung des Designs "WANTED - Mobile UI").
 * Wird NACH style.css geladen und ueberschreibt Tokens/Komponenten, ohne dass Spiellogik oder IDs
 * angefasst werden. Reihenfolge: 1 Tokens/Basis, 2 Formulare/Buttons, 3 Karten/Listen,
 * 4 Start/Lobby/Host-Setup, 5 Spiel-HUD/Sheets, 6 Overlays, 7 Auswertung. */

/* ---------------------------------------------------------------
 * 1 Tokens / Basis (nur dunkel - das Design kennt keinen hellen Modus)
 * --------------------------------------------------------------- */
:root, :root:root {
    color-scheme: dark;
    --bg: #0A0C0F;
    --bg-elevated: #1C222A;
    --bg-card: #14181D;
    --bg-card-2: #14181D;
    --border: rgba(244,241,234,.16);
    --border-soft: rgba(244,241,234,.08);
    --text: #F4F1EA;
    --text-dim: rgba(244,241,234,.66);
    --accent: #F3A93A;
    --accent-2: #F3A93A;
    --accent-dim: #C98A25;
    --mrx: #FF6A4D;
    --detective: #3CA7FF;
    --success: #3FD1C9;
    --danger: #FF6A4D;
    --radius: 20px;
    --radius-sm: 14px;
    --ui-surface: #14181D;
    --ui-raised: #1F262F;
    --ui-panel: #262D37;
    --ui-ground: #0A0C0F;
    --ui-map-bg: #0E1218;
    --ui-line: rgba(244,241,234,.1);
    --ui-line-strong: rgba(244,241,234,.18);
    --ui-font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ui-font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-card: none;
    --shadow-pop: 0 14px 34px -10px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: light) {
    :root, :root:root {
        --bg: #0A0C0F; --bg-elevated: #1C222A; --bg-card: #14181D; --bg-card-2: #14181D;
        --border: rgba(244,241,234,.16); --border-soft: rgba(244,241,234,.08);
        --text: #F4F1EA; --text-dim: rgba(244,241,234,.66);
        --shadow-card: none; --shadow-pop: 0 14px 34px -10px rgba(0,0,0,.6);
    }
    body { background: var(--bg); }
    .nav { background: rgba(10,12,15,.78); }
}

html, body { background: var(--ui-ground); font-family: var(--ui-font); }
body { background: var(--ui-ground); }
h1, h2, h3, h4, .brand, .join-code, .case-header__number { font-family: var(--ui-font-display); }

/* Mindest-Tippflaeche 44 px fuer alles Klickbare */
button, .btn, a.btn, [role="button"] { min-height: 44px; }
.btn--sm { min-height: 44px; }

/* ---------------------------------------------------------------
 * 2 Formulare / Buttons
 * --------------------------------------------------------------- */
label {
    font-size: .8125rem; font-weight: 700; text-transform: none; letter-spacing: 0;
    color: var(--text-dim); margin: 14px 0 6px;
}
input[type="text"], input[type="number"], select {
    height: 56px; padding: 0 16px; border-radius: 14px;
    border: 1px solid rgba(244,241,234,.14); background: var(--ui-ground);
    font-family: var(--ui-font); font-size: 1.0625rem; font-weight: 700; color: var(--text);
}
input[type="text"]::placeholder, input[type="number"]::placeholder { color: rgba(244,241,234,.45); font-weight: 500; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(243,169,58,.2); }
input[type="checkbox"] { border: 1.5px solid var(--ui-line-strong); background: var(--ui-ground); border-radius: 8px; }
input[type="checkbox"]:checked::after { border-color: #14181D; }
input[type="range"] { background: var(--ui-ground); height: 8px; }
input[type="range"]::-webkit-slider-thumb { border-color: var(--ui-surface); width: 24px; height: 24px; }
input[type="range"]::-moz-range-thumb { border-color: var(--ui-surface); width: 24px; height: 24px; }

.btn {
    min-height: 52px; padding: 0 18px; border-radius: 16px;
    background: transparent; border: 1px solid var(--ui-line-strong);
    font-family: var(--ui-font); font-weight: 800; font-size: 1rem; color: var(--text);
}
.btn--primary {
    min-height: 58px; font-size: 1.0625rem; border-radius: 16px;
    background: var(--accent); color: #14181D; border-color: var(--accent); box-shadow: none;
}
.btn--success { background: var(--success); color: #0A0C0F; border-color: var(--success); min-height: 58px; font-size: 1.0625rem; }
.btn--danger { background: transparent; color: #FF8A80; border-color: var(--ui-line-strong); }
.btn--danger.btn--primary, .btn--danger:not(.btn--ghost) { background: transparent; }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: .875rem; }
@media (hover: hover) { .btn--primary:hover { box-shadow: none; filter: brightness(1.06); } }
.btn .mrx-icon { margin-right: 0; }

/* Segmentierte Umschalter (Case erstellen | Beitreten, Gebiet zeichnen | Radius) */
.tabs, .segmented {
    display: flex; gap: 4px; padding: 4px; background: var(--ui-ground); border: none; border-radius: 14px;
}
.tabs button, .segmented button {
    flex: 1; min-height: 46px; border-radius: 11px; border: none; background: transparent;
    font-family: var(--ui-font); font-weight: 700; font-size: .9375rem; color: var(--text-dim);
}
.tabs button.active, .segmented button.active { background: #2A323D; color: var(--text); font-weight: 800; }

/* ---------------------------------------------------------------
 * 3 Karten / Listen
 * --------------------------------------------------------------- */
.card {
    background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 22px;
    box-shadow: none; animation: none;
}
.card h3 { font-family: var(--ui-font-display); font-weight: 800; font-size: 1.375rem; letter-spacing: 0; }
.card h3 .mrx-icon { color: var(--accent); }
.card--accent::before { display: none; }
.pill { border-radius: 999px; font-weight: 800; }
.pill--ready { background: transparent; color: var(--success); border-color: transparent; }

.player-row {
    min-height: 60px; padding: 0 14px 0 10px; margin-bottom: 8px; border-radius: 16px;
    background: var(--ui-surface); border: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.player-row:last-child { border-bottom: 1px solid var(--ui-line); margin-bottom: 0; }
.player-row__name { font-weight: 800; font-size: 1rem; }
.player-avatar {
    width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; color: #0A0C0F;
}
.player-avatar--host { background: var(--accent); }

.settings-list { background: transparent; border: none; border-radius: 0; }
.settings-row {
    min-height: 56px; padding: 0 8px 0 14px; margin-bottom: 6px; border-radius: 14px;
    background: var(--ui-surface); border: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line);
}
.settings-row:last-child { border-bottom: 1px solid var(--ui-line); }
.settings-row__label { font-weight: 700; font-size: .9375rem; color: var(--text); }
.stepper { gap: 8px; }
.stepper__btn {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--ui-line-strong);
    background: #1C222A; color: var(--text); font-size: 1.375rem; font-weight: 800;
}
.stepper__value { min-width: 64px; text-align: center; font-family: var(--ui-font-display); font-weight: 800; font-size: 1.125rem; }
.option-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option-row {
    min-height: 56px; border-radius: 14px; border: 2px solid var(--ui-line); background: var(--ui-surface);
    padding: 6px; flex-direction: column; justify-content: center; text-align: center; gap: 2px;
}
.option-row__icon, .option-row__check, .option-row__subtitle { display: none; }
.option-row__title { font-weight: 800; font-size: .875rem; line-height: 1.15; }
.option-row.active { border-color: var(--accent); background: rgba(243,169,58,.14); }
.chip-toggle {
    min-height: 44px; border-radius: 12px; border: 1px solid var(--ui-line-strong); background: var(--ui-surface);
    font-family: var(--ui-font); font-weight: 800;
}
.chip-toggle.active { border-color: var(--accent); background: rgba(243,169,58,.14); color: var(--text); }
.card-toggle__title { font-family: var(--ui-font-display); font-weight: 800; font-size: 1.25rem; }
input.switch { background: #262D37; border-color: transparent; }
input.switch:checked { background: var(--success); border-color: var(--success); }
input[type="checkbox"].switch:checked::after { background: #0A0C0F; }

/* ---------------------------------------------------------------
 * 4a Startseite (Screens 01/02): Hero + Bottom-Sheet mit Tabs/Formular
 * --------------------------------------------------------------- */
.nav { background: rgba(10,12,15,.78); border-bottom-color: var(--ui-line); }
.nav__help {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(20,24,29,.85); border: 1px solid rgba(244,241,234,.12); color: var(--text);
    font-family: var(--ui-font); font-weight: 800; font-size: 1.125rem; text-decoration: none;
}
@media (min-width: 760px) { .nav__help { display: none; } }

.hero-kicker { font-size: .75rem; letter-spacing: .14em; margin-bottom: 12px; }
.hero-h1 {
    font-size: 2.5rem; line-height: 1.02; letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance;
}
.hero-tagline { font-size: .9375rem; line-height: 1.45; color: rgba(244,241,234,.7); margin: 0 0 24px; max-width: 320px; }
.hero-facts { display: none; }
.hero-section { padding-top: 8px; }

.start-sheet {
    background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 28px;
    padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 14px;
}
.start-sheet label { margin: 0 0 6px; }
.start-panel { display: flex; flex-direction: column; gap: 6px; }
.start-panel .btn--primary { margin-top: 10px; }
.start-hint { margin: 8px 0 0; font-size: .75rem; color: rgba(244,241,234,.6); }
.start-spectator { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: .875rem; color: var(--text-dim); }
.start-join-row { display: flex; gap: 10px; margin-top: 10px; }
.start-join-row .btn--primary { margin-top: 0; flex: 1; }
.btn--icon-square { width: 58px; min-width: 58px; height: 58px; padding: 0; flex: 0 0 58px; }
input.code-input {
    height: 72px; text-align: center; border: 2px solid var(--accent); border-radius: 16px;
    font-family: var(--ui-font-display); font-size: 2.375rem; font-weight: 800; letter-spacing: .32em; padding-left: .32em;
}
input.code-input::placeholder { letter-spacing: .32em; }

/* Hintergrund: Verlauf nach unten ins Schwarz wie im Design */
.hero-bgnet { opacity: .55; }
.hero-bgnet .net { background: linear-gradient(180deg, rgba(10,12,15,.55), rgba(10,12,15,.15) 30%, #0A0C0F 95%), url('/assets/img/city-bg.jpg') center/cover no-repeat; }
@media (min-width: 640px) { .hero-h1 { font-size: 3rem; } .hero-tagline { max-width: 420px; } }
.tabs button.active, .segmented button.active { box-shadow: none; }

/* ---------------------------------------------------------------
 * 4b Lobby
 * --------------------------------------------------------------- */
.lobby-shell { padding-bottom: calc(150px + env(safe-area-inset-bottom)); max-width: 520px; }
.lobby-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 10px; }
.lobby-top__spacer { width: 44px; }
.icon-circle {
    width: 44px; height: 44px; min-height: 44px; border-radius: 50%; border: 1px solid var(--ui-line-strong);
    background: var(--ui-surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.case-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
    background: var(--ui-surface); border: 1px solid var(--ui-line); font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
}
.case-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(243,169,58,.18); }
.case-chip__sep { opacity: .4; }
.code-card {
    display: grid; grid-template-columns: 1fr auto; gap: 14px 16px; align-items: center;
    background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 26px; padding: 20px; margin-top: 6px;
}
.code-card__label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.code-card .join-code { background: none; border: 0; padding: 0; text-shadow: none; font-size: 2.6rem; letter-spacing: .14em; color: var(--accent); margin: 4px 0 10px; text-align: left; line-height: 1.1; }
.code-card__qr .qr-wrap { margin: 0; }
.code-card__qr .qr-wrap img, .code-card__qr .qr-wrap canvas { width: 104px !important; height: 104px !important; border-radius: 12px; padding: 6px; }
.code-card__link { grid-column: 1 / -1; font-size: .75rem; word-break: break-all; }
.lobby-section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 2px 10px; }
.lobby-section-head h2 { font-size: 1.15rem; margin: 0; }
.lobby-count { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--ui-raised); font-size: .8rem; color: var(--text-dim); }
.lobby-ready { font-size: .8rem; font-weight: 800; color: var(--success); }
.setup-list { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 22px; overflow: hidden; }
.setup-row {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 16px; text-align: left;
    background: transparent; color: var(--text); border: 0; border-bottom: 1px solid var(--ui-line); cursor: pointer; font: inherit;
}
.setup-row:last-child { border-bottom: 0; }
.setup-row__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--ui-raised); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.setup-row__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.setup-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setup-row__title { font-weight: 800; font-size: 1rem; }
.setup-row__sub { font-size: .8rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-footer { display: flex; gap: 14px; justify-content: center; margin: 28px 0 0; font-size: .75rem; }

.lobby-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--ui-ground) 70%, rgba(10,12,15,0)); max-width: 520px; margin: 0 auto;
}
.lobby-bar__host, .lobby-bar__player { display: none; }
body.is-host .lobby-bar__host { display: block; }
body:not(.is-host) .lobby-bar__player { display: block; }
.lobby-bar__row { display: flex; gap: 10px; }
.lobby-bar__row .btn--primary { flex: 1; }
.lobby-bar__hint { text-align: center; font-size: .75rem; color: var(--text-dim); margin: 8px 0; }
.lobby-bar__row + .lobby-bar__hint { margin-bottom: 0; }
.lobby-bar .btn { min-height: 56px; border-radius: 18px; font-weight: 800; }
.lobby-bar .btn--icon-square { width: 56px; padding: 0; flex: none; }
.lobby-bar .btn--success[data-ready="1"] { background: var(--ui-raised); color: var(--success); border: 1px solid var(--success); }

/* Host-Unteransichten: Vollbild-Sheets. Per Transform ausserhalb statt display:none,
 * damit die Leaflet-Karte (#areaMap) ihre echte Groesse behaelt. */
.lobby-view {
    position: fixed; inset: 0; z-index: 100; background: var(--ui-ground); display: flex; flex-direction: column;
    transform: translateY(100%); visibility: hidden; transition: transform .26s ease, visibility 0s linear .26s;
    max-width: 520px; margin: 0 auto;
}
.lobby-view.open { transform: none; visibility: visible; transition: transform .26s ease; }
.lobby-view__head { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; }
.lobby-view__title { margin: 0; font-size: 1.25rem; }
.lobby-view__body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; -webkit-overflow-scrolling: touch; }
.lobby-view__bar { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ui-line); background: var(--ui-ground); }
.lobby-view__bar .btn { min-height: 56px; border-radius: 18px; font-weight: 800; }
.lobby-view .area-card { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 22px; padding: 14px; }
.lobby-view .card { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 22px; margin-bottom: 14px; }
.lobby-view .card--accent::before { display: none; }
.lobby-view .area-map { height: 46vh; min-height: 260px; border-radius: 16px; margin-bottom: 10px; background: var(--ui-map-bg); }
.lobby-view .btn-row { display: flex; gap: 8px; margin-top: 8px; }
.lobby-view .btn-row > .btn { flex: 1; }

/* ---------------------------------------------------------------
 * 5 Spiel-HUD / Bottom-Sheet / Ticket-Grid / Navigation
 * --------------------------------------------------------------- */
.game-screen { --sheet-max-h: 58vh; }
.gps-permission-slot { top: calc(112px + env(safe-area-inset-top, 0px)); }
#map, .leaflet-container { background: var(--ui-map-bg); }
.hud-top { flex-direction: column; align-items: stretch; gap: 8px; left: 12px; right: 12px; }
.hud-card {
    position: relative; display: flex; align-items: stretch; height: 60px; border-radius: 18px; overflow: hidden; pointer-events: auto;
    background: rgba(20,24,29,.94); border: 1px solid rgba(244,241,234,.12);
}
.hud-card__cell { flex: 1; min-width: 0; padding: 0 12px; display: flex; flex-direction: column; justify-content: center; gap: 1px; border-right: 1px solid rgba(244,241,234,.1); }
.hud-card__cell:last-child { border-right: 0; }
.hud-card__cell--role { flex: 0 0 122px; padding-left: 14px; }
.hud-card__label { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--text-dim); }
.hud-card__value { font-family: var(--ui-font-display); font-weight: 800; font-size: 21px; line-height: 1.1; color: var(--text); white-space: nowrap; }
.hud-card__value--accent { color: var(--accent); }
.hud-card__sub { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.hud-card .hud-chip, #hudRole { background: none; border: 0; box-shadow: none; backdrop-filter: none; padding: 0; border-radius: 0; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.hud-pills { display: flex; gap: 8px; pointer-events: none; }
.hud-pills .hud-chip { background: rgba(20,24,29,.94); border: 1px solid rgba(244,241,234,.12); border-radius: 999px; padding: 0 10px; min-height: 32px; display: inline-flex; align-items: center; font-size: 12px; backdrop-filter: none; box-shadow: none; }
.hud-pills #btnSound { min-height: 32px; min-width: 32px; justify-content: center; }
.hud-shrink { top: calc(112px + env(safe-area-inset-top, 0px)); }
.map-pick-hint { top: calc(112px + env(safe-area-inset-top, 0px)); background: rgba(20,24,29,.96); border-radius: 16px; }

.floating-btn { background: var(--ui-surface); border: 1px solid var(--ui-line-strong); width: 48px; height: 48px; backdrop-filter: none; }

.bottom-sheet {
    background: var(--ui-surface); border-top: 1px solid rgba(244,241,234,.12); border-radius: 26px 26px 0 0;
    padding: 6px 12px 0; box-shadow: 0 -16px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 10px;
}
.sheet-grip { display: flex; justify-content: center; min-height: 20px; margin: 0 -12px; }
.sheet-grip .btn--icon-only { min-height: 24px; width: 100%; padding: 0; }
.sheet-grip .btn--icon-only .mrx-icon { width: 18px; height: 18px; opacity: .5; }
.bottom-sheet #turnBanner { margin: 0; }
.bottom-sheet .ticket-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 0; max-height: none; overflow: visible; }
.ticket-btn {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "icon count" "label label"; align-items: center; row-gap: 6px;
    height: 84px; padding: 10px 12px; border-radius: 16px; background: var(--ui-raised); border: 1px solid var(--ui-line-strong);
    font-size: 14px; font-weight: 800; text-align: left; color: var(--text);
}
.ticket-btn__icon { grid-area: icon; width: 32px; height: 32px; border-radius: 9px; background: var(--text); color: #14181D; justify-self: start; }
.ticket-btn > span:nth-child(2) { grid-area: label; }
.ticket-btn > span.text-dim { grid-area: count; font-family: var(--ui-font-display); font-size: 24px; line-height: 1; color: var(--text); }
.ticket-btn:disabled { background: var(--ui-surface); border: 1px dashed rgba(244,241,234,.14); opacity: .45; }
.ticket-btn:disabled .ticket-btn__icon { background: #3A424D; color: var(--text); }
.turn-banner { margin: 0; padding: 0 16px; min-height: 48px; border-radius: 14px; font-size: 15px; font-weight: 800; border: 0; }
.turn-banner--active { background: var(--accent); color: #14181D; animation: none; justify-content: space-between; }
.turn-banner--active .turn-banner__badge { background: #14181D; color: var(--accent); }
.turn-banner--waiting { background: var(--ui-raised); color: var(--text-dim); }
.turn-banner--moving { padding: 10px 14px; background: rgba(60,167,255,.14); color: var(--detective); border: 1px solid rgba(60,167,255,.5); }

/* Tab-Ansichten des Sheets: Ziehen = Tickets, Werkzeuge = Hunter-/Target-Aktionen */
.bottom-sheet:not(.show-tools) .tool-card, .bottom-sheet:not(.show-tools) .tools-head { display: none !important; }
.bottom-sheet.show-tools .ticket-grid, .bottom-sheet.show-tools #turnBanner, .bottom-sheet.show-tools .ticket-mini { display: none !important; }

.play-nav { margin: 0 -12px; padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); background: #0F1318; border-top: 1px solid rgba(244,241,234,.08); display: flex; gap: 4px; }
.play-nav__tab { flex: 1; height: 56px; border-radius: 14px; border: 0; background: transparent; color: rgba(244,241,234,.72); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.play-nav__tab.active { background: rgba(243,169,58,.14); color: var(--accent); }

/* Menü / Verlauf als Bottom-Sheets */
.sheet-overlay { background: rgba(6,8,14,.6); backdrop-filter: none; }
.sheet-overlay__panel { background: var(--ui-surface); border: 1px solid var(--ui-line); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-overlay__panel .btn { min-height: 56px; border-radius: 18px; font-weight: 800; }
.sheet-overlay__panel .btn--danger { background: transparent; color: var(--mrx); border: 1px solid rgba(255,106,77,.5); }

/* ---------------------------------------------------------------
 * 6 Overlays: Countdown, Case-Intro, Ende
 * --------------------------------------------------------------- */
.win-overlay { background: var(--ui-ground); color: var(--text); }
.win-overlay .text-dim { color: var(--text-dim); }
.win-overlay .eyebrow { display: flex; justify-content: center; letter-spacing: .2em; }
.win-overlay__content { width: 100%; max-width: 420px; }
.win-overlay__icon { display: flex; width: 96px; height: 96px; padding: 0; align-items: center; justify-content: center; margin: 0 auto 14px; border-radius: 28px; box-shadow: none; }
.win-overlay h1 { font-family: var(--ui-font-display); }
.win-overlay .btn { min-height: 58px; border-radius: 16px; font-weight: 800; }
.count-ring { position: relative; width: 188px; height: 188px; margin: 6px auto 18px; }
.count-ring__arc { stroke-dashoffset: 0; animation: mrx-ring 15s linear forwards; }
@keyframes mrx-ring { to { stroke-dashoffset: 528; } }
.count-ring__text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.count-ring__text span { font-family: var(--ui-font-display); font-weight: 800; font-size: 76px; line-height: 1; }
.count-ring__text small { max-width: 120px; text-align: center; line-height: 1.2; font-size: 12px; font-weight: 700; color: var(--text-dim); }
.safety-brief__row { align-items: stretch; }
.safety-brief__icon { display: none; }
.safety-brief__row::before { content: ''; width: 6px; border-radius: 3px; background: var(--row-color, var(--accent)); flex-shrink: 0; }
.safety-brief { gap: 8px; }
.safety-brief__row { color: rgba(244,241,234,.9); font-size: 14px; }

/* ---------------------------------------------------------------
 * 7 Auswertung (Stats / Replay / Spieler)
 * --------------------------------------------------------------- */
.stats-tabs { position: sticky; top: 0; z-index: 20; margin: 8px 0 14px; background: var(--ui-ground); }
.stats-pane { display: none; }
.stats-pane.active { display: block; }
/* Replay-Pane bleibt layoutet (Karte braucht echte Groesse), nur unsichtbar */
.stats-pane[data-stats-pane="replay"]:not(.active) { display: block; position: absolute; left: -9999px; width: 100%; max-width: 520px; visibility: hidden; }
#winnerCard { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 26px; padding: 24px 18px; }
#winnerTitle { font-family: var(--ui-font-display); font-size: 1.9rem; margin-bottom: 6px; }
.stats-pane .card, #rematchCard { background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: 22px; box-shadow: none; }
.stats-pane .card--accent::before { display: none; }
#replayMap { border-radius: 18px; overflow: hidden; background: var(--ui-map-bg); }
.container .btn { min-height: 56px; border-radius: 18px; font-weight: 800; }
.replay-controls .btn, .btn-row .btn--sm { min-height: 44px; border-radius: 14px; }
.stats-pane .stat-tile { background: var(--ui-raised); border: 1px solid var(--ui-line); border-radius: 16px; }
.stats-pane .stat-tile__value { font-family: var(--ui-font-display); }

/* ---------------------------------------------------------------
 * 8 Feinschliff: kompakter Ticket-Picker, Toasts unter dem HUD
 * --------------------------------------------------------------- */
body:has(.game-screen) .toast-container { top: calc(128px + env(safe-area-inset-top, 0px)); }
body:has(.game-screen) .toast { padding: 9px 14px; font-size: .82rem; border-radius: 14px; }
.game-screen { --sheet-max-h: 40vh; }
.bottom-sheet { gap: 6px; }
.sheet-grip { min-height: 14px; }
.sheet-grip .btn--icon-only { min-height: 14px; height: 14px; }
.bottom-sheet .ticket-grid { gap: 6px; }
.ticket-btn {
    height: 44px; padding: 0 10px; border-radius: 12px; gap: 8px;
    grid-template-columns: auto 1fr auto; grid-template-areas: "icon label count"; row-gap: 0;
}
.ticket-btn__icon { width: 26px; height: 26px; border-radius: 8px; }
.ticket-btn__icon .mrx-icon { width: 15px; height: 15px; }
.ticket-btn > span:nth-child(2) { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-btn > span.text-dim { font-size: 17px; }
.turn-banner { min-height: 40px; font-size: 14px; }
.play-nav { padding-top: 4px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
.play-nav__tab { height: 46px; gap: 1px; }
.play-nav__tab svg { width: 20px; height: 20px; }
.ticket-btn { padding: 0 8px; gap: 6px; }
.ticket-btn__icon { width: 24px; height: 24px; }
.ticket-btn > span:nth-child(2) { font-size: 11px; letter-spacing: -.01em; }
.ticket-btn > span.text-dim { font-size: 16px; }

/* ---------------------------------------------------------------
 * 9 Spielgebiet (Karte vollflaechig) - 1:1 nach Design "Host Area"
 * --------------------------------------------------------------- */
.lobby-view--map { background: var(--ui-map-bg); }
.lobby-view--map .area-map { position: absolute; inset: 0; height: auto; min-height: 0; margin: 0; border: 0; border-radius: 0; }
.lobby-view--map .leaflet-container { background: var(--ui-map-bg); }
.area-top { position: absolute; left: 20px; right: 20px; top: calc(24px + env(safe-area-inset-top)); display: flex; justify-content: space-between; align-items: center; z-index: 500; pointer-events: none; }
.area-top > * { pointer-events: auto; }
.icon-circle--lg { width: 48px; height: 48px; min-height: 48px; background: rgba(20,24,29,.92); border-color: rgba(244,241,234,.14); }
.area-top__title { height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(20,24,29,.92); border: 1px solid rgba(244,241,234,.14); display: flex; align-items: center; font-weight: 800; font-size: 15px; }
.area-top__spacer { width: 48px; }
.area-hint { position: absolute; left: 20px; top: calc(84px + env(safe-area-inset-top)); z-index: 500; max-width: calc(100% - 40px); min-height: 34px; padding: 7px 12px; border-radius: 999px; background: rgba(20,24,29,.92); border: 1px solid rgba(244,241,234,.14); font-size: 13px; font-weight: 700; color: rgba(244,241,234,.8); display: flex; align-items: center; pointer-events: none; }
.area-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; display: flex; flex-direction: column; gap: 12px;
    background: #14181D; border-top: 1px solid rgba(244,241,234,.1); border-radius: 28px 28px 0 0;
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -16px 40px rgba(0,0,0,.45);
}
.area-tabs { display: flex; gap: 4px; padding: 4px; background: #0A0C0F; border-radius: 14px; }
.area-tabs button { flex: 1; height: 46px; border-radius: 11px; border: 0; background: transparent; color: rgba(244,241,234,.7); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.area-tabs button.active { background: #2A323D; color: var(--text); font-weight: 800; }
.area-radius { align-items: center; gap: 14px; }
.area-radius__label { font-size: 14px; font-weight: 700; white-space: nowrap; }
.area-radius input[type=range] { flex: 1; }
.area-size { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.area-size__label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.area-size__value { font-family: var(--ui-font-display); font-weight: 800; font-size: 34px; line-height: 1; }
.area-size__value small { font-size: 18px; color: var(--text-dim); font-weight: 800; }
.area-size__max { font-size: 13px; color: var(--text-dim); padding-bottom: 4px; text-align: right; }
.area-size__max.over { color: #FF8A80; font-weight: 800; }
.area-bar { height: 8px; border-radius: 999px; background: #0A0C0F; overflow: hidden; }
.area-bar > div { height: 8px; width: 0; border-radius: 999px; background: var(--accent); transition: width .2s ease; }
.area-bar > div.over { background: #FF6A4D; }
.area-actions { display: flex; gap: 10px; }
.btn--outline { background: transparent; border: 1px solid rgba(244,241,234,.18); color: var(--text); }
.btn--outline:disabled { opacity: .4; }
.btn--outline-danger { color: #FF8A80; }
.area-actions .btn { flex: 1; min-height: 48px; border-radius: 14px; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.area-sheet > .btn--primary, .area-sheet > .btn--outline { min-height: 58px; border-radius: 16px; font-size: 17px; font-weight: 800; }
.area-status { margin: -4px 0 0; font-size: 12px; min-height: 0; }
.area-status:empty { display: none; }
/* Eckpunkte: kleine runde Punkte (22 px), keine Ovale */
.area-vertex { width: 22px !important; height: 22px !important; margin: -11px 0 0 -11px !important; box-sizing: border-box; border-radius: 50%; background: #F4F1EA; border: 3px solid #F3A93A; box-shadow: 0 2px 8px rgba(0,0,0,.5); cursor: grab; }
.leaflet-editing-icon, .leaflet-div-icon { border-radius: 50%; }

/* ---------------------------------------------------------------
 * 10 Modus & Regeln - 1:1 nach Design "Host Rules"
 * --------------------------------------------------------------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-btn { height: 56px; border-radius: 14px; border: 2px solid rgba(244,241,234,.1); background: #14181D; color: var(--text); font: inherit; font-size: 14px; font-weight: 800; padding: 0 6px; line-height: 1.15; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.mode-btn__icon { display: none; }
.mode-btn.active { border-color: var(--accent); background: rgba(243,169,58,.14); color: var(--accent); }
.mode-desc { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: #14181D; border: 1px solid rgba(244,241,234,.08); font-size: 14px; line-height: 1.4; color: rgba(244,241,234,.85); min-height: 40px; }
.mode-playbook-btn { width: 100%; margin-top: 10px; min-height: 48px; border-radius: 14px; font-weight: 800; font-size: 14px; }
.lobby-view .settings-list__title { font-family: var(--ui-font-display); font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: 0; text-transform: none; margin: 18px 0 8px; }
.lobby-view .settings-row { min-height: 56px; padding: 0 8px 0 14px; border-radius: 14px; background: #14181D; border: 1px solid rgba(244,241,234,.08); margin-bottom: 6px; }
.lobby-view .settings-row__label { font-weight: 700; font-size: 15px; }
.lobby-view .stepper { background: transparent; border: 0; padding: 0; gap: 8px; }
.lobby-view .stepper__btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(244,241,234,.18); background: #1C222A; color: var(--text); font-size: 22px; font-weight: 800; }
.lobby-view .stepper__value { min-width: 64px; text-align: center; font-family: var(--ui-font-display); font-weight: 800; font-size: 18px; }
.lobby-view .area-card { padding: 0; background: transparent; border: 0; }

/* Playbook-Sheet */
.playbook__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.playbook h3 { font-family: var(--ui-font-display); font-size: 1.6rem; margin-bottom: 10px; }
.playbook__goals { display: grid; gap: 8px; margin-bottom: 12px; }
.playbook__goal { padding: 10px 12px; border-radius: 14px; background: #1C222A; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; border-left: 5px solid var(--mrx); }
.playbook__goal--det { border-left-color: var(--detective); }
.playbook__goal b { font-family: var(--ui-font-display); font-size: 16px; }
.playbook__goal--mrx b { color: var(--mrx); }
.playbook__goal--det b { color: var(--detective); }
.playbook__steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; color: rgba(244,241,234,.9); }
.sheet-overlay__panel.playbook { max-height: 86vh; overflow-y: auto; }
.lobby-view--map .leaflet-bottom.leaflet-left { top: calc(124px + env(safe-area-inset-top)); bottom: auto; }

/* ---------------------------------------------------------------
 * 11 Spielscreens: Pick-Bestaetigung, Unterwegs, Werkzeuge/Faehigkeiten, Target-HUD
 * --------------------------------------------------------------- */
.hud-card { position: relative; }
.hud-card__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--ui-ground); }
.hud-card__progress span { display: block; height: 3px; width: 0; background: var(--accent); transition: width 1s linear; }
.hud-pills { flex-wrap: wrap; }
.hud-pills #hudGps { color: var(--text); gap: 7px; font-weight: 800; }
.hud-pills #hudGps i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal, #3FD1C9); display: inline-block; }
.hud-pills #hudGps.hud-chip--warn { color: var(--mrx); }
.hud-pills #hudGps.hud-chip--warn i { background: var(--mrx); }
.hud-pills .hud-chip--hidden { color: var(--teal, #3FD1C9); border-color: rgba(63,209,201,.5); font-weight: 800; font-size: 13px; min-height: 30px; }

.map-pick-hint { top: calc(88px + env(safe-area-inset-top, 0px)); height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--accent); color: #14181D; font-size: 14px; font-weight: 800; }
.map-pick-hint .btn--icon-only { color: #14181D; background: rgba(20,24,29,.12); border-radius: 10px; }
body:has(.game-screen) .map-pick-hint:not(.hidden) ~ .hud-pills { display: none; }
body.is-confirming-pick .bottom-sheet { visibility: hidden; }

.pick-confirm { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400; background: var(--ui-surface); border-top: 1px solid rgba(244,241,234,.12); border-radius: 26px 26px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -16px 40px rgba(0,0,0,.45); }
.pick-confirm.hidden { display: none; }
.pick-confirm__head { display: flex; align-items: center; gap: 14px; }
.pick-confirm__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--text); color: #14181D; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pick-confirm__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-confirm__kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--text-dim); }
.pick-confirm__name { font-family: var(--ui-font-display); font-weight: 800; font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.pick-confirm__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 700; color: rgba(244,241,234,.8); }
.pick-confirm__meta .dot { color: rgba(244,241,234,.4); }
.pick-confirm__line { height: 24px; padding: 0 9px; border-radius: 7px; background: var(--ui-panel, #262D37); display: inline-flex; align-items: center; font-weight: 800; }
.pick-confirm__actions { display: flex; gap: 10px; }
.pick-confirm__actions .btn { min-height: 58px; border-radius: 16px; font-size: 17px; font-weight: 800; }
.pick-confirm__actions .btn--outline { flex: 0 0 112px; font-size: 16px; }
.pick-confirm__actions .btn--primary { flex: 1; }

/* Unterwegs */
.bottom-sheet.is-moving .ticket-grid, .bottom-sheet.is-moving .ticket-mini, .bottom-sheet.is-moving .sheet-grip { display: none !important; }
.bottom-sheet.is-moving:not(.show-tools) { padding-top: 14px; gap: 12px; }
.move-panel { display: flex; flex-direction: column; gap: 12px; }
.move-panel__bar { height: 40px; border-radius: 12px; background: var(--ui-panel, #262D37); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.move-panel__state { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; letter-spacing: .04em; color: var(--accent); }
.move-panel__state i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.move-panel__meta { font-weight: 700; font-size: 14px; color: rgba(244,241,234,.8); }
.move-panel__row { padding: 0 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.move-panel__to { font-size: 14px; font-weight: 700; color: rgba(244,241,234,.7); }
.move-panel__dist { font-family: var(--ui-font-display); font-weight: 800; font-size: 60px; line-height: 1; }
.move-panel__dist small { font-size: 26px; color: rgba(244,241,234,.7); }
.move-panel__hint { text-align: right; font-size: 13px; line-height: 1.4; color: rgba(244,241,234,.7); padding-bottom: 6px; }
.move-panel__track { height: 8px; border-radius: 999px; background: var(--ui-ground); margin: 0 6px; }
.move-panel__track span { display: block; height: 8px; border-radius: 999px; background: var(--accent); transition: width .6s ease; }
.move-panel .btn { min-height: 56px; border-radius: 16px; font-size: 17px; font-weight: 800; }

/* Werkzeuge / Faehigkeiten */
.tools-head { display: none; padding: 0 4px; align-items: baseline; justify-content: space-between; }
.tools-head__title { font-family: var(--ui-font-display); font-weight: 800; font-size: 22px; }
.tools-head__sub { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.bottom-sheet.show-tools .tools-head { display: flex; }
.tool-card { display: none; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--ui-raised); border: 1px solid rgba(244,241,234,.16); }
.bottom-sheet.show-tools .tool-card:not(.hidden) { display: flex; }
.tool-card__head { display: flex; align-items: flex-start; gap: 12px; }
.tool-card__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #14181D; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tool-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-card__title { font-weight: 800; font-size: 17px; }
.tool-card__desc { font-size: 13px; line-height: 1.35; color: rgba(244,241,234,.75); }
.tool-card__badge { height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ui-ground); border: 1px solid rgba(244,241,234,.18); display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tool-card__cta { height: 50px; border-radius: 14px; border: 0; background: var(--accent); color: #14181D; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.tool-card__cta:disabled { background: var(--ui-panel, #262D37); color: rgba(244,241,234,.55); cursor: default; }
.tool-card__cta.is-cancel { background: transparent; color: var(--text); border: 1px solid rgba(244,241,234,.3); }
.tool-card__cta.is-active { background: transparent; color: var(--teal, #3FD1C9); border: 1px solid var(--teal, #3FD1C9); }
.bottom-sheet.show-tools { gap: 10px; padding-top: 16px; max-height: 70vh; overflow-y: auto; }
.bottom-sheet.show-tools .sheet-grip { display: none; }
.hud-pills .hud-chip--hidden { order: -1; }
.gps-permission-slot { top: calc(160px + env(safe-area-inset-top, 0px)); }
.play-nav { position: sticky; bottom: 0; z-index: 2; }
.bottom-sheet.show-tools { gap: 8px; }
/* Faehigkeiten (Target): kompakte Zeile mit CTA rechts */
#signalJamRow, #ghostRow, #decoyRow { flex-direction: row; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; min-height: 76px; border-radius: 16px; }
#signalJamRow .tool-card__head, #ghostRow .tool-card__head, #decoyRow .tool-card__head { flex: 1; min-width: 0; align-items: center; }
#signalJamRow .tool-card__icon, #ghostRow .tool-card__icon, #decoyRow .tool-card__icon { background: var(--ui-panel, #262D37); color: var(--text); }
#signalJamRow .tool-card__title, #ghostRow .tool-card__title, #decoyRow .tool-card__title { font-size: 16px; }
#signalJamRow .tool-card__badge, #ghostRow .tool-card__badge, #decoyRow .tool-card__badge { display: none; }
#signalJamRow .tool-card__title::after { content: ' · ' attr(data-left); }
#signalJamRow .tool-card__cta, #ghostRow .tool-card__cta, #decoyRow .tool-card__cta { height: 44px; min-width: 92px; padding: 0 12px; border-radius: 12px; font-size: 14px; }
/* Hunter: aufgebrauchte/gesperrte Werkzeuge gestrichelt */
.tool-card:has(.tool-card__cta:disabled):not(#signalJamRow):not(#ghostRow):not(#decoyRow) { background: var(--ui-surface); border-style: dashed; border-color: rgba(244,241,234,.18); }

/* ---------------------------------------------------------------
 * 12 Menue, Verlauf, Ende - nach Design 13/14/15
 * --------------------------------------------------------------- */
.sheet-overlay { background: rgba(10,12,15,.6); }
.sheet-overlay__panel { padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
.menu-sheet, .history-sheet { display: flex; flex-direction: column; gap: 12px; background: var(--ui-surface); }
.history-sheet { height: calc(100% - 96px); width: 100%; }
.sheet-overlay:has(.history-sheet) { align-items: flex-end; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head__title { font-family: var(--ui-font-display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.sheet-head__case { margin-top: 2px; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.sheet-head__sub { margin-top: 4px; font-size: 13px; line-height: 1.35; color: rgba(244,241,234,.7); max-width: 260px; }
.sheet-head .icon-circle { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; background: var(--ui-raised); border: 1px solid rgba(244,241,234,.14); color: var(--text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; cursor: pointer; }
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-item { height: 58px; padding: 0 14px; border-radius: 14px; background: #1C222A; border: 0; color: var(--text); display: flex; align-items: center; gap: 12px; font: inherit; cursor: pointer; text-align: left; }
.menu-item__label { flex: 1; font-weight: 800; font-size: 16px; }
.menu-item svg { color: rgba(244,241,234,.6); }
.menu-switch { width: 48px; height: 28px; border-radius: 999px; background: #3A424D; position: relative; flex-shrink: 0; transition: background .15s; }
.menu-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.menu-switch.on { background: var(--accent); }
.menu-switch.on i { transform: translateX(20px); background: #14181D; }
.host-head { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--text-dim); }
.host-head b { height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); font-size: 11px; display: inline-flex; align-items: center; letter-spacing: 0; }
#hostControls .btn-row { display: flex; gap: 8px; }
#hostControls .btn-row .btn { flex: 1; min-height: 52px; border-radius: 14px; font-size: 15px; }
.btn--outline-danger, .btn--leave { color: #FF8A80 !important; border: 1px solid rgba(229,86,79,.6) !important; background: transparent !important; }
.btn--leave { min-height: 56px; border-radius: 16px; margin-top: 4px; font-size: 16px; }
.menu-links { display: flex; justify-content: center; gap: 18px; font-size: 12px; color: var(--text-dim); padding: 4px 0; }
.menu-links a { color: inherit; }
.history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.history-group { margin-top: 6px; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--text-dim); }
.history-row { min-height: 60px; padding: 0 12px 0 10px; border-radius: 14px; background: #1C222A; border: 1px solid transparent; display: flex; align-items: center; gap: 12px; }
.history-row--target { border-color: rgba(255,106,77,.4); }
.history-row__badge { width: 36px; height: 36px; border-radius: 10px; background: var(--text); color: #14181D; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.history-row--target .history-row__badge { background: var(--mrx); color: #0A0C0F; }
.history-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.history-row__who { font-weight: 800; font-size: 15px; }
.history-row--target .history-row__who { color: var(--mrx); }
.history-row__what { font-size: 13px; color: rgba(244,241,234,.72); }
.history-row__time { font-size: 12px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.history-sheet > .btn { min-height: 56px; border-radius: 16px; flex-shrink: 0; }

.win-overlay { background: #0A0C0F; flex-direction: column; justify-content: flex-start; padding: 0 20px 24px; }
.win-overlay__content { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; max-width: 420px; width: 100%; min-height: 100%; padding-top: 72px; }
.win-overlay__icon { background: var(--accent); color: #14181D; width: 96px; height: 96px; border-radius: 50%; margin: 0; box-shadow: 0 0 0 10px rgba(243,169,58,.18); }
.win-case { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.win-overlay h1 { font-size: 42px; line-height: 1.02; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.win-overlay #winSubtitle { margin: 0; font-size: 16px; line-height: 1.4; color: rgba(244,241,234,.78); max-width: 300px; }
.win-stats { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.win-stat { padding: 14px 8px; border-radius: 16px; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.1); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.win-stat__v { font-family: var(--ui-font-display); font-weight: 800; font-size: 28px; line-height: 1.1; }
.win-stat__l { font-size: 12px; font-weight: 700; color: rgba(244,241,234,.7); }
.win-actions { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }
.win-actions .btn { min-height: 56px; }
.win-actions .btn--primary { min-height: 58px; font-size: 17px; }
.win-actions #btnBackHome { border: 0; min-height: 44px; font-size: 14px; color: rgba(244,241,234,.7); }
.win-overlay .eyebrow::before { display: none; }
.win-actions a.btn { text-decoration: none; }
.history-sheet > .btn { text-align: center; justify-content: center; }

/* ---------------------------------------------------------------
 * 13 Auswertung: Statistik / Replay / Heatmap / Spieler - Design 16-19
 * --------------------------------------------------------------- */
.stats-body { background: #0A0C0F; }
.stats-pane { display: none; }
.stats-pane.active { display: block; }
.stats-page { max-width: 520px; padding: 24px 20px 24px; display: flex; flex-direction: column; min-height: 100vh; }
.stats-top { display: flex; align-items: center; gap: 12px; }
.stats-top__title { flex: 1; font-family: var(--ui-font-display); font-weight: 800; font-size: 24px; }
.stats-top__case { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.icon-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.12); color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; text-decoration: none; flex-shrink: 0; }
.winner-card { margin-top: 18px; padding: 18px; border-radius: 22px; background: var(--ui-surface); border: 1px solid rgba(243,169,58,.45); display: flex; align-items: center; gap: 14px; }
.winner-card__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #14181D; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.winner-card__title { font-family: var(--ui-font-display); font-weight: 800; font-size: 24px; line-height: 1.1; }
.winner-card__sub { font-size: 13px; color: rgba(244,241,234,.72); margin-top: 2px; }
#winnerCard { padding: 18px; text-align: left; }
.rematch-card { margin-top: 12px; padding: 12px 12px 12px 16px; border-radius: 18px; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.08); display: flex; align-items: center; gap: 12px; }
.rematch-card__text { flex: 1; }
.rematch-card__title { font-weight: 800; font-size: 15px; }
.rematch-card__sub { font-size: 13px; color: rgba(244,241,234,.72); margin: 0 !important; }
.rematch-card .btn { width: auto !important; min-height: 48px; padding: 0 18px; border-radius: 14px; font-size: 15px; }
.stats-h { margin: 22px 0 10px; font-family: var(--ui-font-display); font-weight: 800; font-size: 20px; }
.stats-h--split { display: flex; align-items: baseline; justify-content: space-between; margin-top: 26px; font-size: 22px; }
.stats-h--split small { font-family: var(--ui-font-body, inherit); font-size: 13px; font-weight: 700; color: var(--text-dim); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.stat-tile { padding: 14px; border-radius: 16px; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.08); text-align: left; display: flex; flex-direction: column; gap: 2px; }
.stat-tile__value { font-family: var(--ui-font-display); font-weight: 800; font-size: 28px; line-height: 1.1; }
.stat-tile__label { font-size: 13px; font-weight: 700; color: rgba(244,241,234,.72); }
.award-list { display: flex; flex-direction: column; gap: 6px; }
.award-item { min-height: 60px; padding: 0 14px 0 10px; border-radius: 14px; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.08); display: flex; align-items: center; gap: 12px; }
.award-item__icon { width: 38px; height: 38px; border-radius: 50%; background: rgba(243,169,58,.16); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.award-item__text { display: flex; flex-direction: column; }
.award-item__text b { font-weight: 800; font-size: 15px; }
.award-item__text span { font-size: 13px; color: rgba(244,241,234,.72); }
.mole-card { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--ui-surface); border: 1px solid rgba(255,106,77,.4); }
.mole-card__title { font-weight: 800; }
.usage-card { padding: 14px; border-radius: 16px; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.08); display: flex; flex-direction: column; gap: 10px; }
.usage-row { display: flex; align-items: center; gap: 10px; }
.usage-row__label { width: 76px; font-size: 14px; font-weight: 700; }
.usage-row__track { flex: 1; height: 12px; border-radius: 999px; background: #0A0C0F; }
.usage-row__track span { display: block; height: 12px; border-radius: 999px; background: var(--accent); }
.usage-row__n { width: 28px; text-align: right; font-weight: 800; font-size: 14px; }
.replay-teaser { margin-top: 22px; width: 100%; height: 132px; border-radius: 20px; border: 1px solid rgba(244,241,234,.12); background: linear-gradient(90deg, rgba(10,12,15,.9), rgba(14,18,24,.6)), var(--ui-map-bg); color: var(--text); display: flex; align-items: center; gap: 12px; padding: 0 18px; text-align: left; font: inherit; cursor: pointer; }
.replay-teaser__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.replay-teaser__text b { font-family: var(--ui-font-display); font-weight: 800; font-size: 22px; }
.replay-teaser__text small { font-size: 13px; color: rgba(244,241,234,.8); }
.replay-teaser__play { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #14181D; display: flex; align-items: center; justify-content: center; }
.stats-foot { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.stats-foot__link { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.stats-foot__home { background: transparent; border: 0; min-height: 44px !important; font-size: 14px; color: rgba(244,241,234,.7); }
.stats-legal { display: flex; gap: 14px; justify-content: center; font-size: 12px; padding-bottom: 8px; }
.stats-legal a { color: inherit; }
.player-cards { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.player-card { padding: 12px; border-radius: 16px; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.08); display: flex; align-items: center; gap: 12px; }
.player-card__avatar { width: 44px; height: 44px; border-radius: 50%; color: #0A0C0F; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.player-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.player-card__text b { font-size: 16px; font-weight: 800; margin-right: 6px; }
.player-card__text span { font-size: 12px; font-weight: 800; }
.player-card__text small { font-size: 13px; color: rgba(244,241,234,.75); }
.player-card__note { font-size: 13px; font-weight: 700; color: rgba(244,241,234,.75); text-align: right; }
.case-timeline { margin-top: 12px; display: flex; flex-direction: column; }
.case-timeline .timeline-item { cursor: pointer; min-height: 56px; display: flex; align-items: stretch; gap: 14px; padding: 0; position: relative; }
.case-timeline .timeline-item::before { display: none; }
.timeline-item__time { width: 56px; padding-top: 14px; font-family: var(--ui-font-display); font-weight: 800; font-size: 15px; color: rgba(244,241,234,.75); margin: 0; }
.timeline-item__rail { width: 14px; display: flex; flex-direction: column; align-items: center; }
.timeline-item__rail i { width: 2px; flex: 1; background: rgba(244,241,234,.1); }
.timeline-item__rail b { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.timeline-item__text { flex: 1; padding: 10px 0; display: flex; flex-direction: column; justify-content: center; }
.timeline-item__text strong { font-weight: 800; font-size: 15px; }
.timeline-item__text span { font-size: 13px; color: rgba(244,241,234,.72); }

/* Replay + Heatmap (Vollbild-Karte) */
.stats-pane--map { display: block; position: fixed; left: -200vw; top: 0; width: 100%; height: 100%; visibility: hidden; background: var(--ui-map-bg); z-index: 50; }
.stats-pane--map.active { left: 0; visibility: visible; }
.stats-pane--map #replayMap { position: absolute; inset: 0; height: auto; margin: 0; border-radius: 0; }
.map-top { position: absolute; left: 12px; right: 12px; top: calc(20px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; z-index: 500; }
.map-top .icon-circle--lg { width: 48px; height: 48px; background: rgba(20,24,29,.94); border-color: rgba(244,241,234,.14); }
.map-top__title { flex: 1; height: 48px; border-radius: 24px; background: rgba(20,24,29,.94); border: 1px solid rgba(244,241,234,.14); display: flex; align-items: center; padding: 0 18px; font-family: var(--ui-font-display); font-weight: 800; font-size: 20px; }
.map-legend { position: absolute; left: 12px; top: calc(78px + env(safe-area-inset-top)); display: flex; gap: 6px; z-index: 500; }
.map-legend span { height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(20,24,29,.94); border: 1px solid rgba(244,241,234,.14); display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.is-heat .map-legend { display: none; }
.map-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 600; background: var(--ui-surface); border-top: 1px solid rgba(244,241,234,.12); border-radius: 26px 26px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -16px 40px rgba(0,0,0,.45); }
.map-sheet.hidden { display: none; }
.replay-row { display: flex; align-items: center; gap: 14px; }
.replay-play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #14181D; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.replay-scrub { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.replay-scrub input[type=range] { width: 100%; height: 32px; margin: 0; accent-color: var(--accent); }
.replay-time { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; margin: 0; font-family: inherit; color: var(--text); }
.speed-seg { display: flex; gap: 4px; padding: 4px; background: #0A0C0F; border-radius: 14px; }
.speed-seg button { flex: 1; height: 40px; border-radius: 11px; border: 0; background: transparent; color: rgba(244,241,234,.75); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.speed-seg button.active { background: #2A323D; color: var(--text); }
#heatWho button { height: 44px; font-size: 15px; }
.event-card { padding: 12px 14px; border-radius: 16px; background: var(--ui-raised); border: 1px solid rgba(243,169,58,.5); display: flex; align-items: center; gap: 12px; }
.event-card__badge { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #14181D; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.event-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.event-card__text b { font-weight: 800; font-size: 15px; }
.event-card__text span { font-size: 13px; color: rgba(244,241,234,.72); }
.event-card__time { font-size: 13px; font-weight: 800; }
.event-card.is-empty { border-color: rgba(244,241,234,.12); }
.event-card.is-empty .event-card__badge { background: var(--ui-panel, #262D37); color: var(--text-dim); }
.map-sheet__actions { display: flex; gap: 8px; }
.map-sheet__actions .btn { flex: 1; min-height: 50px; border-radius: 14px; font-size: 15px; }
.heat-legend { display: flex; flex-direction: column; gap: 6px; }
.heat-legend__bar { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #1C222A 0%, #F3A93A 55%, #FF6A4D 100%); }
.heat-legend__labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: rgba(244,241,234,.75); }
.heat-caption { font-size: 14px; line-height: 1.4; color: rgba(244,241,234,.85); }
#heatSheet .btn { min-height: 56px; border-radius: 16px; }
.replay-scrub input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 28px; }
.replay-scrub input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: #0A0C0F; }
.replay-scrub input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: var(--accent); border: 3px solid #14181D; box-shadow: 0 0 0 1px rgba(243,169,58,.6); }
.replay-scrub input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: #0A0C0F; }
.replay-scrub input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #14181D; }
.stats-pane--map #replayMap { z-index: 0; }

/* ---------------------------------------------------------------
 * 14 Lobby: Host-/Spieler-Variante exakt nach Design 03/04
 * --------------------------------------------------------------- */
.lobby-top { justify-content: flex-start; gap: 12px; }
.lobby-top__spacer { display: none; }
.case-chip { font-size: 15px; letter-spacing: .04em; padding: 0 18px; height: 46px; }
.code-card__actions { display: flex; gap: 10px; }
.code-card__share { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px; font-weight: 800; font-size: 16px; width: 100%; }
.code-card__qrbtn { display: none; }
/* Spieler: Code links, QR rechts, Teilen-Button breit */
body:not(.is-host) .code-card__link { display: none; }
body:not(.is-host) .code-card .join-code { font-size: 3rem; margin-bottom: 14px; }
/* Host: kompakte Karte, QR + Teilen als Icon-Buttons */
body.is-host .code-card { grid-template-columns: 1fr auto; padding: 18px 18px 18px 22px; }
body.is-host .code-card .join-code { margin-bottom: 0; font-size: 2.6rem; }
body.is-host .code-card__main { display: contents; }
body.is-host .code-card__main > .code-card__label, body.is-host .code-card__main > .join-code { grid-column: 1; }
body.is-host .code-card__actions { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
body.is-host .code-card__qrbtn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 14px; background: transparent; border: 1px solid rgba(244,241,234,.2); color: var(--text); }
body.is-host .code-card__share { width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 14px; background: var(--accent); color: #14181D; border: 0; }
body.is-host .code-card__share span { display: none; }
body.is-host .code-card__qr, body.is-host .code-card__link { display: none; grid-column: 1 / -1; }
body.is-host .code-card.show-qr .code-card__qr { display: flex; justify-content: center; }
body.is-host .code-card.show-qr .code-card__link { display: block; text-align: center; }
body.is-host #playersHead { display: none; }
.host-summary { display: none; margin-top: 12px; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-radius: 18px; background: var(--ui-surface); border: 1px solid rgba(244,241,234,.08); }
body.is-host .host-summary { display: flex; }
.host-summary__text { flex: 1; font-weight: 800; font-size: 17px; }
.host-summary .btn { width: auto; min-height: 44px; padding: 0 16px; border-radius: 14px; font-size: 15px; }
body.is-host #playerList { display: none; margin-top: 8px; }
body.is-host #playerList.open { display: block; }
.lobby-ready { color: rgba(244,241,234,.75); font-size: 15px; font-weight: 800; }
.lobby-section-head h2 { font-family: var(--ui-font-display); font-size: 1.5rem; }
body.is-host #hostPanel .lobby-section-head { margin-top: 26px; }
/* Setup als einzelne Karten */
.setup-list { background: transparent; border: 0; border-radius: 0; overflow: visible; display: flex; flex-direction: column; gap: 8px; }
.setup-row { border: 1px solid rgba(244,241,234,.1); border-radius: 18px; background: var(--ui-surface); min-height: 64px; }
.setup-row:last-child { border-bottom: 1px solid rgba(244,241,234,.1); }
.setup-row__icon.is-done { background: rgba(63,209,201,.14); color: var(--teal, #3FD1C9); }
.setup-row__dot--idle { background: rgba(244,241,234,.6); }
.setup-row__sub { white-space: normal; }
.setup-row__title { font-family: var(--ui-font-display); font-size: 1.05rem; }
/* Untere Leiste als Sheet */
.lobby-bar { background: var(--ui-surface); border-top: 1px solid rgba(244,241,234,.12); border-radius: 26px 26px 0 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -16px 40px rgba(0,0,0,.35); }
.lobby-bar .btn--icon-square { width: 60px; border: 1px solid rgba(244,241,234,.22); background: transparent; }
.lobby-bar .btn--primary { min-height: 58px; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.lobby-bar__player .btn--success { background: var(--teal, #3FD1C9); color: #14181D; min-height: 58px; font-size: 17px; }
body:not(.is-host) .code-card .join-code { font-size: 2.5rem; letter-spacing: .12em; }
.code-card__main { min-width: 0; }
.code-card { overflow: hidden; }
.hero-section.is-join .hero-kicker, .hero-section.is-join .hero-facts { display: none; }
.dashed-row { width: 100%; margin-top: 12px; min-height: 52px; padding: 0 16px; border-radius: 16px; background: transparent; border: 1px dashed rgba(244,241,234,.22); color: rgba(244,241,234,.8); display: flex; align-items: center; justify-content: space-between; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; text-align: left; }
#viewTransport .settings-row__label { white-space: nowrap; }
#viewTransport .settings-row__label .mrx-icon { flex-shrink: 0; }
#viewTransport .stepper__btn { width: 40px; height: 40px; }
.win-stat__v { white-space: nowrap; font-size: 24px; }
.win-stat { justify-content: center; }

/* Linien-Auswahl (Alternative zur Kartenwahl) */
.line-picker { z-index: 1450; gap: 12px; max-height: 78vh; overflow-y: auto; padding-top: 16px; }
.line-picker__head { display: flex; align-items: center; gap: 12px; }
.line-picker__title { font-family: var(--ui-font-display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.line-picker__head .icon-circle { width: 40px; height: 40px; min-height: 40px; }
.line-picker__chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.line-chip { height: 46px; border-radius: 12px; border: 1px solid rgba(244,241,234,.14); background: var(--ui-raised); color: var(--text); font: inherit; font-weight: 800; font-size: 17px; cursor: pointer; }
.line-chip.active { background: var(--accent); color: #14181D; border-color: var(--accent); }
.line-picker__dir { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line-picker__headsign { background: none; border: 0; padding: 0; color: rgba(244,241,234,.8); font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
.line-picker__headsign b { color: var(--text); font-weight: 800; }
.line-picker__headsign:disabled { cursor: default; }
.line-picker__limit { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(244,241,234,.18); display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; white-space: nowrap; }
.line-picker__stops { display: flex; flex-direction: column; gap: 6px; }
.line-stop { min-height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(244,241,234,.1); background: var(--ui-raised); color: var(--text); display: flex; align-items: center; gap: 12px; font: inherit; cursor: pointer; text-align: left; }
.line-stop.active { background: rgba(243,169,58,.14); border-color: var(--accent); }
.line-stop:disabled { opacity: .45; background: var(--ui-surface); border-style: dashed; cursor: default; }
.line-stop__n { width: 24px; height: 24px; border-radius: 50%; background: var(--ui-panel, #262D37); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.line-stop.active .line-stop__n { background: var(--accent); color: #14181D; }
.line-stop__name { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-stop__d { font-size: 13px; font-weight: 700; color: rgba(244,241,234,.7); white-space: nowrap; }
.line-picker__go { min-height: 56px; border-radius: 16px; font-size: 17px; font-weight: 800; }
.line-picker__alt { background: none; border: 0; color: rgba(244,241,234,.8); font: inherit; font-size: 13px; font-weight: 700; padding: 4px; cursor: pointer; }
.map-pick-hint__switch { margin-left: auto; height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(20,24,29,.9); color: var(--accent); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.map-pick-hint { z-index: 1100; min-height: 44px; height: auto; padding-top: 6px; padding-bottom: 6px; }
body:has(.map-pick-hint:not(.hidden)) .hud-pills { visibility: hidden; }
.map-pick-hint__switch { flex: none; }
.area-vertex-wrap { background: none !important; border: 0 !important; width: 0 !important; height: 0 !important; margin: 0 !important; overflow: visible; }

/* ---- Verbindungs-Banner (Offline / Wiederverbinden) ---- */
.conn-banner { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 8px); z-index: 1600; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 16px; background: #14181D; border: 1px solid #FF6A4D; color: #F4F1EA; font-size: 13px; font-weight: 700; line-height: 1.3; }
.conn-banner svg { flex-shrink: 0; color: #FF6A4D; }
.conn-banner small { display: block; font-weight: 500; color: rgba(244,241,234,.7); font-size: 12px; margin-top: 2px; }
.conn-banner--ok { border-color: #3FD1C9; }
.conn-banner--ok svg { color: #3FD1C9; }

/* ===== Team-Modus ===== */
:root { --team-a: #ffb020; --team-b: #19c4b4; }
.team-variants { display: grid; gap: 8px; margin: 10px 0 0; }
.team-variant { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ui-line, rgba(255,255,255,.14)); background: transparent; color: inherit; display: grid; gap: 2px; cursor: pointer; font: inherit; }
.team-variant b { font-size: .9rem; }
.team-variant span { font-size: .75rem; opacity: .7; }
.team-variant.active { border-color: var(--team-a); background: rgba(255,176,32,.1); }
.team-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: .78rem; }
.team-bar__info { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; opacity: .9; }
.team-bar .btn--small { padding: 6px 10px; font-size: .75rem; min-height: 0; width: auto; }
.team-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; background: rgba(255,255,255,.1); margin-left: 6px; }
.team-bar .team-chip { margin-left: 0; }
.team-chip--A { background: rgba(255,176,32,.2); color: var(--team-a); }
.team-chip--B { background: rgba(25,196,180,.2); color: var(--team-b); }
.team-toggle { border: 1px solid var(--ui-line, rgba(255,255,255,.2)); background: transparent; color: inherit; border-radius: 8px; padding: 4px 8px; font-size: .7rem; font-weight: 800; cursor: pointer; }
.team-bar { margin-top: 10px; }
