/* ════════════════════════════════════════════════════════════
   SHADOW SALOON – Haupt-Stylesheet
   Western-Noir Theme
════════════════════════════════════════════════════════════ */

:root {
  --ink:        #0d0a07;
  --dark-wood:  #1a1208;
  --mid-wood:   #2e1f0e;
  --warm-wood:  #4a2f14;
  --gold:       #c8922a;
  --gold-light: #e8b84b;
  --amber:      #d4620a;
  /* --smoke: warmer Sand-Beige für Sekundärtexte (Labels, Hints, Counter).
     Aufgehellt von #8a7a6a → #a89784, damit der Kontrast auf dunklem
     Saloon-Background komfortabel AA-konform ist (~6:1 statt 4.5:1).
     Atmosphäre bleibt warm/gedämpft. */
  --smoke:      #a89784;
  --parchment:  #e8d5b0;
  --old-paper:  #c9b48a;
  --blood-red:  #8b1a1a;
  --red-light:  #c0352a;
  --green-felt: #1a3d2b;
  --green-ok:   #2d7a4a;
  --shadow:     #0a0806;
}

/* ── Reset & Base ── */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }
html,
body { height: 100%; }

/* Background liegt auf html, damit body transparent bleiben kann.
   Das ist nötig, weil .saloon-bg mit z-index: -1 unter dem Body-Background
   verschwinden würde, wenn der Body einen eigenen Hintergrund hätte. */
html {
  background: var(--ink);
}

body {
  color: var(--parchment);
  font-family: 'Special Elite', cursive;
  /* Explizite Größe + großzügige Zeilenhöhe für gute Lesbarkeit.
     Browser-Default ist 16px — wir setzen 15px, weil Special Elite
     visuell etwas größer wirkt als z.B. Arial. */
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 998; opacity: .35; mix-blend-mode: overlay;
}

/* ── Saloon-Hintergrund-Silhouette ──────────────────────────────────────────
   Schemenhafte Saloon-Szene (Theke, Schwingtüren, Hängelampen, Regale mit
   Flaschen). Fixed-positioniert, hinter dem gesamten App-Inhalt. Sehr niedrige
   Opacity, damit der Text gut lesbar bleibt – die Szene wirkt eher wie eine
   Erinnerung oder ein Schatten als wie ein konkretes Bild. */
.saloon-bg {
  position: fixed;
  inset: 0;
  background-image: url("/img/saloon-bg.svg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  pointer-events: none;
  /* Negativer z-index legt das Element hinter den normalen Document-Flow.
     body hat keine background-color die das überlagern könnte (nur das
     Wood-Gradient aus html-Hintergrund), also bleibt der Saloon sichtbar. */
  z-index: -1;
  opacity: 0.22;
  /* Sanftes Ausblenden nach oben, damit der Hintergrund nicht überall
     gleichstark präsent ist sondern atmosphärisch nach unten "anhaftet". */
  mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 100%);
}

/* ── Screens ── */
.screen-home,
.screen-lobby,
.screen-game,
.screen-break,
.screen-voting,
.screen-result {
  flex: 1 0 auto; /* füllen den verfügbaren Platz in app-main */
  padding: 40px 20px 48px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}

.btn-copy {
    font-family: 'Special Elite', cursive;
    font-size: 13px;
    color: var(--gold);
    background: transparent;
    border: 1px solid rgba(200,146,42,.4);
    padding: 6px 14px;
    border-radius: 1px;
    cursor: pointer;
    transition: all .2s;
}

.btn-copy:hover {
    border-color: var(--gold);
    background: rgba(200,146,42,.08);
}

.btn-copy.copied {
    color: var(--green-ok);
    border-color: rgba(45,122,74,.5);
}

.bg-saloon {
  /* Nur sanfter Glow unten – KEIN linear-gradient mehr, damit die globale
     Saloon-Silhouette aus .saloon-bg durchscheint. Wird auf Screens wie
     Home, Admin, Game-Break, Lobby-Break verwendet, also dort wo die
     Atmosphäre sichtbar bleiben soll. Wenn der Screen Stimmung umfärben
     will (Impostor-Mode etc.), nutzt er bg-red/bg-amber/bg-green – die
     setzen weiterhin einen vollen Hintergrund. */
  background:
    radial-gradient(ellipse 90% 55% at 50% 100%, rgba(74,47,20,.35) 0%, transparent 65%);
}
.bg-red {
  background:
    radial-gradient(ellipse 80% 45% at 50% 55%, rgba(100,14,14,.18) 0%, transparent 70%),
    linear-gradient(to bottom, #060302, #0e0705);
}
.bg-green {
  background:
    radial-gradient(ellipse 80% 45% at 50% 100%, rgba(26,61,43,.28) 0%, transparent 60%),
    linear-gradient(to bottom, #0a0806, #111a0f);
}
.bg-amber {
  background:
    radial-gradient(ellipse 80% 45% at 50% 55%, rgba(100,60,5,.2) 0%, transparent 70%),
    linear-gradient(to bottom, #060402, #0e0905);
}

/* ── Typography ── */
.rye { font-family: 'Rye', cursive; }
.pf { font-family: 'Playfair Display', serif; }
.gold { color: var(--gold); }

.eyebrow {
  font-size: 14px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--smoke); text-align: center; margin-bottom: 14px;
}
.section-label {
  font-size: 14px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--smoke); margin-bottom: 10px;
}
.inline-note {
  font-size: 14px; color: var(--smoke); text-align: center;
  margin-top: 8px; letter-spacing: .08em;
}

/* ── Cards ── */
.card {
  background: linear-gradient(135deg, rgba(22,14,6,.96), rgba(14,9,3,.98));
  border: 1px solid rgba(200,146,42,.28); border-radius: 2px;
  padding: 24px 28px; position: relative;
  box-shadow: 0 18px 55px rgba(0,0,0,.65), inset 0 1px 0 rgba(200,146,42,.09);
}
.card::before,
.card::after {
  content: '✦'; position: absolute; top: 13px;
  color: rgba(200,146,42,.25); font-size: 9px;
}
.card::before { left: 18px; }
.card::after { right: 18px; }

.card-red { border-color: rgba(139,26,26,.35); box-shadow: 0 18px 55px rgba(0,0,0,.65), 0 0 40px rgba(100,14,14,.08); }
.card-red::before,
.card-red::after { color: rgba(139,26,26,.35); }

.card-title {
  font-family: 'Rye', cursive; font-size: 17px; color: var(--gold-light);
  text-align: center; margin-bottom: 20px; letter-spacing: .09em;
}

/* ── Forms ── */
.lbl {
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--smoke); display: block; margin-bottom: 7px;
}
.inp {
  width: 100%; background: rgba(8,5,2,.85);
  border: 1px solid rgba(200,146,42,.22); border-radius: 1px;
  color: var(--parchment); font-family: 'Special Elite', cursive;
  font-size: 16px; padding: 11px 13px; outline: none; transition: border-color .2s;
}
.inp:focus { border-color: var(--gold); box-shadow: 0 0 14px rgba(200,146,42,.14); }
.inp::placeholder { color: rgba(168, 151, 132,.38); }
.inp-lg { font-family: 'Playfair Display', serif; font-size: 22px; font-style: italic; padding: 13px 15px; }
.inp-red { border-color: rgba(139,26,26,.4) !important; }
.fgrp { margin-bottom: 16px; }
select.inp {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%23c8922a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
textarea.inp { resize: vertical; min-height: 100px; font-size: 14px; line-height: 1.6; }

.char-count {
  position: absolute; bottom: 10px; right: 12px;
  font-size: 10px; color: var(--smoke); pointer-events: none;
}
.char-count.warn { color: var(--amber); }
.char-count.over { color: var(--blood-red); }

/* ── Slider ── */

.slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,
    var(--gold) 0%,
    var(--gold) var(--val, 50%),
    rgba(200,146,42,.15) var(--val, 50%),
    rgba(200,146,42,.15) 100%);
  outline: none; cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold-light); border: 2px solid var(--amber);
  box-shadow: 0 0 10px rgba(200,146,42,.4); cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold-light); border: 2px solid var(--amber);
  box-shadow: 0 0 10px rgba(200,146,42,.4); cursor: pointer;
}

/* ── Buttons ── */
.btn {
  display: block; width: 100%; padding: 12px; border-radius: 1px;
  font-family: 'Rye', cursive; font-size: 15px; letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; transition: all .2s;
  border: none; position: relative; overflow: hidden;
  text-decoration: none;
}
a.btn { text-align: center; }
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,.09) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .45s;
  pointer-events: none;  /* dekorativer Shimmer darf keine Klicks abfangen */
}
.btn:hover::after { transform: translateX(100%); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }

.btn-gold { background: linear-gradient(135deg, var(--amber), var(--gold)); color: var(--shadow); box-shadow: 0 4px 22px rgba(212,98,10,.38); }
.btn-gold:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 7px 30px rgba(212,98,10,.55); }

/* Amber-Variante für „achtsame Aktion" (Wartung aktivieren, destruktive Confirms). */
.btn-amber { background: linear-gradient(135deg, var(--blood-red), var(--amber)); color: #fff; font-weight: bold; box-shadow: 0 4px 22px rgba(139,26,26,.32); }
.btn-amber:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-amber:disabled { opacity: .55; cursor: not-allowed; }
.btn-red { background: linear-gradient(135deg, #5a0f0f, var(--blood-red)); color: var(--parchment); box-shadow: 0 4px 22px rgba(139,26,26,.38); }
.btn-red:not(:disabled):hover { transform: translateY(-1px); }
.btn-green { background: linear-gradient(135deg, var(--green-felt), var(--green-ok)); color: var(--parchment); }
.btn-green:not(:disabled):hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid rgba(200,146,42,.32); color: var(--old-paper); font-family: 'Special Elite', cursive; font-size: 15px; letter-spacing: .08em; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(200,146,42,.05); }
.btn-ghost-red { background: transparent; border: 1px solid rgba(139,26,26,.4); color: rgba(192,53,42,.7); font-family: 'Special Elite', cursive; font-size: 15px; }
.btn-ghost-red:hover { border-color: var(--blood-red); color: var(--red-light); }
.abort-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 9px; background: transparent;
  border: 1px solid rgba(139,26,26,.3); border-radius: 1px;
  color: rgba(192,53,42,.55); font-family: 'Special Elite', cursive;
  font-size: 15px; letter-spacing: .06em; cursor: pointer; transition: all .25s;
}
.abort-btn:hover { border-color: var(--blood-red); color: var(--red-light); background: rgba(139,26,26,.07); }

/* ── Dividers ── */
.div-line { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.div-line::before,
.div-line::after { content: ''; flex: 1; height: 1px; background: rgba(200,146,42,.18); }
.div-line span { font-size: 9px; letter-spacing: .22em; color: var(--smoke); }
.h-line { height: 1px; background: linear-gradient(to right, transparent, rgba(200,146,42,.35), transparent); margin: 10px 0 18px; }

/* ── Badges ── */
.badge { display: inline-block; padding: 2px 10px; border: 1px solid rgba(200,146,42,.28); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); }

/* ── Lobby code ── */
.lobby-code { font-family: 'Rye', cursive; font-size: 28px; letter-spacing: .35em; color: var(--gold-light); display: inline-block; background: rgba(8,5,2,.9); border: 1px solid var(--gold); padding: 8px 24px; box-shadow: 0 0 26px rgba(200,146,42,.18); }
.code-hint { font-size: 13px; letter-spacing: .2em; color: var(--smoke); text-transform: uppercase; display: block; margin-top: 5px; }

/* ── Streamer-Modus-Toggle (Auge neben Lobby-Code) ─────────────────────────
   Klein, dezent, sitzt direkt rechts neben dem Code. Wenn aktiv (Code wird
   maskiert), bekommt der Button einen golden gefüllten Hintergrund + der
   Augen-Strich-Effekt deutet "versteckt" an. */
.streamer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 6px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(200,146,42,.35);
  border-radius: 50%;
  color: var(--gold);
  font-size: 14px;
  cursor: pointer;
  vertical-align: middle;
  transition: background .15s, border-color .15s;
  position: relative;
}
.streamer-toggle:hover {
  background: rgba(200,146,42,.12);
  border-color: var(--gold);
}
.streamer-toggle.is-on {
  background: rgba(200,146,42,.18);
  border-color: var(--gold);
}
/* Diagonaler Strich durch das Auge, wenn aktiv (Code versteckt).
   Pseudo-Element, damit das Emoji selbst nicht verändert werden muss. */
.streamer-toggle.is-on::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-top: 2px solid var(--gold);
  transform: rotate(-45deg);
  transform-origin: center;
  pointer-events: none;
}

.btn-eye.visible {
    border-color: rgba(200,146,42,.5);
}

/* ── Player slots ── */

.player-slot.filled { border-color: rgba(200,146,42,.32); }
.player-slot.empty { opacity: .35; }
.player-slot.disconnected { opacity: .45; border-color: rgba(139,26,26,.25); background: rgba(30,5,5,.4); }
.player-slot.reconnecting { border-color: rgba(180,100,10,.5); animation: reconnPulse 1.5s ease-in-out infinite; }
@keyframes reconnPulse { 0%,100% { border-color: rgba(180,100,10,.3); } 50% { border-color: rgba(200,146,42,.7); } }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--warm-wood), var(--mid-wood));
  border: 1px solid rgba(200,146,42,.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-family: 'Rye', cursive; color: var(--gold-light);
  flex-shrink: 0;
}

.p-name { font-size: 17px; color: var(--parchment); }

/* ── Player progress bar ── */
.player-progress { width: 100%; margin: 10px 0 14px; }
.pp-bar { width: 100%; height: 5px; background: rgba(200,146,42,.1); border-radius: 2px; overflow: hidden; }
.pp-fill { height: 100%; border-radius: 2px; transition: width .4s; }
.pp-fill.ok { background: linear-gradient(to right, var(--green-felt), var(--green-ok)); }
.pp-fill.warn { background: linear-gradient(to right, var(--blood-red), var(--amber)); }
.pp-labels { display: flex; justify-content: space-between; margin-top: 5px; font-size: 14px; color: var(--smoke); }

/* ── Turn list ── */
.turn-list { display: flex; flex-direction: column; gap: 7px; }
.turn-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 1px; border: 1px solid transparent; }
.turn-row.done { opacity: .52; }
.turn-row.active { background: rgba(200,146,42,.07); border-color: rgba(200,146,42,.28); }
.turn-row.pending { opacity: .28; }
.turn-row.reconnecting { background: rgba(180,100,10,.07); border-color: rgba(180,100,10,.35); animation: reconnPulse 1.5s ease-in-out infinite; }
.t-num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(200,146,42,.28); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--smoke); flex-shrink: 0; }
.turn-row.active .t-num { border-color: var(--gold); color: var(--gold-light); }
.t-name { font-size: 16px; color: var(--old-paper); flex: 1; }
.t-clue { font-size: 15px; color: var(--smoke); font-style: italic; }
.turn-row.done .t-clue { color: var(--gold); font-style: normal; }

/* ── Timer bars ── */
.timer-bar { width: 100%; height: 4px; background: rgba(200,146,42,.1); border-radius: 2px; overflow: hidden; }
.timer-fill { height: 100%; background: linear-gradient(to right, var(--green-felt), var(--gold), var(--amber)); border-radius: 2px; }
.timer-fill-red { background: linear-gradient(to right, #7a0f0f, var(--blood-red)); }

/* ── Countdown ring ── */
.countdown-ring { position: relative; width: 88px; height: 88px; }
.countdown-ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(200,146,42,.12); stroke-width: 6; }
.ring-prog { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 213.6; transition: stroke-dashoffset 1s linear; }
.ring-prog.danger { stroke: var(--blood-red); }
.ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num span:first-child { font-family: 'Rye', cursive; font-size: 21px; color: var(--gold-light); line-height: 1; }
.ring-num span:last-child { font-size: 9px; letter-spacing: .12em; color: var(--smoke); }

/* ── Voting cards ── */
.vote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 11px; width: 100%; max-width: 660px; }
.vote-card { background: rgba(12,8,3,.9); border: 1px solid rgba(200,146,42,.18); border-radius: 2px; padding: 16px 12px; text-align: center; cursor: pointer; transition: all .25s; position: relative; }
.vote-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.vote-card.selected { border-color: var(--blood-red); background: rgba(100,14,14,.12); }
.vote-card.selected::after { content: '✓'; position: absolute; top: 8px; right: 10px; color: var(--blood-red); font-size: 14px; }
.vote-avatar { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 9px; background: linear-gradient(135deg, var(--warm-wood), var(--mid-wood)); border: 2px solid rgba(200,146,42,.28); display: flex; align-items: center; justify-content: center; font-size: 22px; font-family: 'Rye', cursive; color: var(--gold-light); }
.vote-name { font-size: 15px; color: var(--parchment); margin-bottom: 3px; }
.vote-hints { font-size: 14px; color: var(--smoke); font-style: italic; line-height: 1.5; }
.vpip { width: 9px; height: 9px; border-radius: 50%; background: rgba(200,146,42,.18); border: 1px solid rgba(200,146,42,.28); transition: all .3s; }
.vpip.done { background: var(--gold); box-shadow: 0 0 7px rgba(200,146,42,.5); }

/* ── Result ── */
.r-title { font-family: 'Rye', cursive; font-size: clamp(24px, 5vw, 40px); text-align: center; margin-bottom: 6px; }
.r-gold { color: var(--gold); text-shadow: 0 0 38px rgba(200,146,42,.45); }
.r-red { color: var(--blood-red); text-shadow: 0 0 38px rgba(139,26,26,.45); }
.r-amber { color: var(--amber); text-shadow: 0 0 38px rgba(212,98,10,.45); }
.reveal-box { background: rgba(12,8,3,.9); border: 1px solid rgba(200,146,42,.28); padding: 16px 24px; width: 100%; text-align: center; border-radius: 2px; }
.reveal-box.red { border-color: rgba(139,26,26,.35); }
.rl { font-size: 9px; letter-spacing: .28em; text-transform: uppercase; color: var(--smoke); margin-bottom: 7px; }
.rv { font-family: 'Rye', cursive; font-size: 24px; color: var(--gold-light); }
.rv.red { color: var(--blood-red); }
.rsub { font-size: 15px; color: var(--smoke); margin-top: 4px; }

.sb-rank.first { color: var(--gold-light); }

/* ── Toasts / Alerts ── */
.toast { padding: 10px 14px; border-radius: 1px; font-size: 15px; border-left: 3px solid; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.toast-info { background: rgba(10,15,10,.7); border-color: var(--green-ok); color: #5aaa7a; }

.toast-abort { background: rgba(30,8,8,.8);  border-color: var(--red-light); color: var(--red-light); }

.notifications-overlay { position: fixed; top: 16px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.alert-error { background: rgba(30,8,8,.7); border: 1px solid rgba(139,26,26,.4); border-left: 3px solid var(--blood-red); color: var(--red-light); padding: 9px 12px; border-radius: 1px; font-size: 15px; margin-bottom: 10px; }
.alert-success { background: rgba(10,20,10,.7); border: 1px solid rgba(45,122,74,.3); border-left: 3px solid var(--green-ok); color: #5aaa7a; padding: 9px 12px; border-radius: 1px; font-size: 15px; }

/* ── Banners ── */
.waiting-banner { font-size: 16px; letter-spacing: .07em; color: var(--smoke); text-align: center; padding: 12px; border: 1px dashed rgba(200,146,42,.18); border-radius: 1px; margin-bottom: 14px; animation: waitBlink 2s ease-in-out infinite; }
@keyframes waitBlink { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* ── Dots ── */
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-idle { background: var(--smoke); }
.dot-active { background: var(--gold); box-shadow: 0 0 8px rgba(200,146,42,.6); animation: dotPulse 1.4s ease-in-out infinite; }
.dot-done { background: var(--green-ok); }

.dot-reconnect { background: var(--amber); animation: dotPulse 1s ease-in-out infinite; }
@keyframes dotPulse { 0%,80%,100% { transform: scale(1); opacity: .5; } 40% { transform: scale(1.4); opacity: 1; } }

/* ── Shadow figure (Impostor) ── */
.impostor-figure { position: relative; width: 110px; height: 170px; margin: 0 auto; }
.f-hat-crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 36px; height: 28px; background: #050202; border-radius: 3px 3px 0 0; }
.f-hat-brim { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 62px; height: 9px; background: #050202; border-radius: 2px; }
.f-head { position: absolute; top: 19px; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; border-radius: 50%; background: #060302; }
.f-head::before,
.f-head::after { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--blood-red); top: 36%; box-shadow: 0 0 10px var(--blood-red), 0 0 22px rgba(139,26,26,.7); animation: eyeGlow 2.4s ease-in-out infinite; }
.f-head::before { left: 22%; }
.f-head::after { right: 22%; }
@keyframes eyeGlow { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.f-body { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 52px; height: 86px; background: #060302; border-radius: 26px 26px 8px 8px; }
.f-arm-l { position: absolute; width: 13px; height: 55px; background: #060302; border-radius: 7px; bottom: 36px; left: 13px; transform: rotate(14deg); }
.f-arm-r { position: absolute; width: 13px; height: 55px; background: #060302; border-radius: 7px; bottom: 36px; right: 13px; transform: rotate(-14deg); }
.f-glow { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 68px; height: 16px; border-radius: 50%; background: radial-gradient(ellipse, rgba(139,26,26,.35) 0%, transparent 70%); }
.fig-pulse { animation: figPulse 3s ease-in-out infinite; }
@keyframes figPulse { 0%,100% { filter: drop-shadow(0 0 8px rgba(139,26,26,.3)); } 50% { filter: drop-shadow(0 0 22px rgba(139,26,26,.6)); } }

/* ── Secret word card ── */
.secret-word-card { border-color: rgba(200,146,42,.45); text-align: center; padding: 20px 24px; }
.secret-word-label { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--dark-wood); padding: 0 12px; font-size: 9px; letter-spacing: .25em; color: var(--smoke); white-space: nowrap; }

/* ── Layouts ── */
.lobby-header {
  text-align: center;
  margin-bottom: 14px;
  width: 100%;
  max-width: 880px;
}
.lobby-header-card {
  padding: 14px 22px;
  background: rgba(8,5,2,.55);
  border: 1px solid rgba(200,146,42,.18);
  border-radius: 4px;
}
.lobby-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}
/* In der Header-Row hat .code-hint mehr Platz nach links/rechts und
   verliert das block-display, damit es inline neben Code und Button steht. */
.lobby-header-row .code-hint {
  display: inline;
  margin-top: 0;
  max-width: 260px;
  text-align: left;
}
/* Lobby-Layout: vertikal gestapelt.
   Oben (volle Breite): Spieler-Chips-Bar
   Darunter: lobby-main-row mit Chat links groß + Sidebar rechts schmal */
.lobby-layout { display: flex; flex-direction: column; gap: 16px;
                    width: 100%; max-width: 880px; }

/* Hauptbereich unter den Spieler-Chips: Chat links groß, Sidebar rechts schmal.
   DOM-Reihenfolge ist 'chat-col → sidebar-col', also bekommt jede ihre Spalte
   automatisch via Grid – kein expliziter grid-column nötig. */
.lobby-main-row {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 16px;
  align-items: start;
}
.lobby-chat-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0; /* erlaubt der Spalte zu schrumpfen, sonst pusht Chat-Inhalt das Grid auf */
}
.lobby-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

/* Beibehalten für eventuelle Stellen die noch .lobby-sidebar referenzieren
   (z.B. die alte Responsive-Regel). Nicht mehr aktiv genutzt. */
.lobby-sidebar { display: flex; flex-direction: column; gap: 13px; }
.lobby-players-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.game-layout { display: grid; grid-template-columns: 1fr 240px; gap: 20px; width: 100%; max-width: 820px; align-items: start; }
.game-sidebar { display: flex; flex-direction: column; gap: 12px; }

/* ── Loading & misc ── */
.loading-screen { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; }
.not-found { text-align: center; padding: 60px 20px; }
.not-found h2 { font-size: 28px; color: var(--gold); margin-bottom: 16px; }
.not-found a { color: var(--old-paper); text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .lobby-main-row,
.game-layout { grid-template-columns: 1fr; }
  .lobby-sidebar,
.game-sidebar { display: contents; }
}

/* ── Lobby Page ─────────────────────────────────────────────────────────── */
.lobby-loading-text { font-size: 22px; }
.lobby-title { font-family: 'Rye', cursive; font-size: 22px; color: var(--gold); }

.card-players { padding: 20px 22px; }
.card-sidebar { padding: 16px 18px; }

.lobby-section-title { font-family: 'Rye', cursive; font-size: 15px; color: var(--gold); }
.lobby-player-count { font-size: 15px; color: var(--smoke); }
.card-title-sm { font-family: 'Rye', cursive; font-size: 15px; color: var(--gold-light);
                        letter-spacing: .09em; margin-bottom: 10px; }

.text-danger { color: var(--blood-red); }
.text-success { color: var(--green-ok); }

.settings-info { font-size: 15px; color: var(--smoke); line-height: 2.2; }
.settings-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.settings-value { color: var(--gold-light); text-align: right;
                        min-width: 0; overflow-wrap: anywhere; }
.settings-fixed-note { font-size: 14px; color: rgba(168, 151, 132,.5);
                        margin-top: 8px; font-style: italic; }
.btn-edit { margin-top: 10px; padding: 7px; font-size: 14px; width: 100%; }

/* ── Player-Chips (Warteraum) ────────────────────────────────────────────── */
/* Spieler-Übersicht oben als kompakte Chip-Reihe statt großer Slot-Liste.
   Avatar + Name + Badges (Host-Stern, Admin-Krone, Mod-Schwert, Gast-Raute,
   eigener „Du"-Marker). Klick öffnet das Profil-Modal. */
.player-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(8,5,2,.5);
  border: 1px solid rgba(200,146,42,.18);
  color: var(--parchment);
  padding: 5px 12px 5px 5px;
  border-radius: 22px;
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
}
.player-chip:hover {
  border-color: var(--gold);
  background: rgba(8,5,2,.7);
}
.player-chip:active {
  transform: scale(.98);
}
.player-chip.is-host {
  border-color: rgba(200,146,42,.55);
  background: rgba(200,146,42,.08);
}
.player-chip.is-me {
  outline: 1px solid var(--gold-light);
  outline-offset: -1px;
}
.player-chip.is-guest .player-chip-name {
  color: var(--smoke);
  font-style: italic;
}
.player-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--warm-wood);
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}
.player-chip.is-host .player-chip-avatar {
  background: rgba(200,146,42,.2);
}
.player-chip-name {
  font-size: 13px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-chip-badge {
  font-size: 14px;
  line-height: 1;
  margin-left: -2px;
}
.player-chip-you {
  background: rgba(45,122,74,.2);
  color: var(--green-ok);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 2px;
}
.player-chip-empty {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 1px dashed rgba(168, 151, 132,.3);
  color: var(--smoke);
  font-size: 12px;
  border-radius: 22px;
  font-style: italic;
}

/* Abwesender Spieler – Chip ausgegraut, durchgestrichener Hintergrund,
   bleibt aber anklickbar (Profil-Modal lässt sich weiterhin öffnen). */
.player-chip.is-away {
  opacity: 0.5;
  filter: grayscale(0.6);
}
.player-chip.is-away .player-chip-name {
  text-decoration: line-through;
  text-decoration-color: rgba(168, 151, 132,.4);
  text-decoration-thickness: 1px;
}

/* ── Home Page ───────────────────────────────────────────────────────────── */
.card-home { width: 100%; max-width: 440px; }
.inp-code { letter-spacing: .2em; text-transform: uppercase; }

/* ── Game Page – Playing ─────────────────────────────────────────────────── */
.impostor-title { font-family: 'Rye', cursive; font-size: 28px; color: var(--blood-red); margin-bottom: 6px; }
.impostor-subtitle { font-size: 15px; color: var(--smoke); margin-bottom: 20px; }
.secret-word-card-wrap { margin-bottom: 14px; text-align: center; }
.secret-word-text { font-family: 'Rye', cursive; font-size: 38px; color: var(--gold-light); }
.secret-word-hint { font-size: 15px; color: var(--smoke); margin-top: 5px; }
.progress-wrap { margin-bottom: 14px; }
.progress-header { display: flex; justify-content: space-between; font-size: 15px; color: var(--smoke); margin-bottom: 5px; }
.card-turn-list { padding: 18px 20px; margin-bottom: 12px; }
.turn-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.turn-list-title { font-family: 'Rye', cursive; font-size: 15px; color: var(--gold); }
.text-amber { color: var(--amber); }
.text-smoke { color: var(--smoke); }
.text-gold { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }
.text-blood-red { color: var(--blood-red); }

.typing-anim { animation: waitBlink 1s ease-in-out infinite; }
.card-clue-input { padding: 22px 24px; border-color: rgba(200,146,42,.5); }
.clue-title { font-family: 'Rye', cursive; font-size: 16px; color: var(--gold); margin-bottom: 5px; }
.clue-title-red { font-family: 'Rye', cursive; font-size: 16px; color: var(--blood-red); margin-bottom: 5px; }
.clue-hint { font-size: 15px; color: var(--smoke); margin-bottom: 12px; }
.clue-input-wrap { position: relative; margin-bottom: 12px; }

.sidebar-player-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.sidebar-player-name { font-size: 15px; color: var(--old-paper); flex: 1; }
.sidebar-player-name-me { font-size: 15px; color: var(--gold-light); flex: 1; }
.sidebar-player-status { font-size: 15px; color: var(--smoke); }
.round-label { font-size: 15px; color: var(--smoke); margin-bottom: 2px; }
.round-number { font-family: 'Rye', cursive; font-size: 30px; color: var(--gold-light); }
.round-total { font-size: 16px; color: var(--smoke); }
.host-section { border-top: 1px solid rgba(200,146,42,.1); padding-top: 10px; }
.host-only-label { font-size: 13px; color: rgba(200,146,42,.25); text-align: center;
                      text-transform: uppercase; margin-bottom: 7px; }

/* ── Game Page – Break ───────────────────────────────────────────────────── */
.screen-break-center { text-align: center; }
.impostor-figure-sm { width: 90px; height: 138px; margin-bottom: 16px; }
.showdown-title { font-family: 'Rye', cursive; font-size: 30px; color: var(--blood-red);
                        text-shadow: 0 0 28px rgba(139,26,26,.5); margin-bottom: 8px; }
.break-subtitle { font-size: 15px; color: var(--smoke); margin-bottom: 20px; }
.break-emoji { font-size: 46px; margin-bottom: 14px; }
.break-title { font-family: 'Rye', cursive; font-size: 26px; color: var(--gold); margin-bottom: 8px; }
.card-break { max-width: 400px; width: 100%; margin: 0 auto; }
.section-label-mb { margin-bottom: 8px; }
.break-clue-row { display: flex; justify-content: space-between; padding: 6px 0;
                        border-bottom: 1px solid rgba(200,146,42,.07); font-size: 15px; }
.countdown-label { text-align: center; font-size: 15px; color: var(--smoke); margin-top: 14px; }
.countdown-number { font-family: 'Rye', cursive; font-size: 36px; color: var(--gold-light);
                        text-align: center; margin-top: 4px; }
.countdown-number-red { font-family: 'Rye', cursive; font-size: 36px; color: var(--red-light);
                        text-align: center; margin-top: 4px; }
.timer-bar-mt10 { margin-top: 10px; }

/* ── Game Page – Voting ──────────────────────────────────────────────────── */
.voting-header { text-align: center; margin-bottom: 18px; }
.voting-title { font-family: 'Rye', cursive; font-size: 24px; color: var(--blood-red); }
.voting-subtitle { font-size: 15px; color: var(--smoke); margin-top: 5px; }
.timer-ring-wrap { display: flex; align-items: center; justify-content: center;
                          gap: 28px; margin-bottom: 18px; flex-wrap: wrap; }
.vpip-row { display: flex; gap: 7px; align-items: center; margin-bottom: 8px; }
.impostor-guess-panel { display: flex; align-items: flex-start; justify-content: center;
                          gap: 20px; width: 100%; max-width: 700px; flex-wrap: wrap; }
.card-clues-sidebar { padding: 14px 18px; max-width: 220px; }
.clue-item { font-size: 15px; margin-bottom: 5px; }
.guess-panel-right { flex: 1; max-width: 370px; }
.card-guess { padding: 22px 26px; }
.guess-title { font-family: 'Rye', cursive; font-size: 16px; color: var(--blood-red); margin-bottom: 5px; }
.guess-hint { font-size: 15px; color: var(--smoke); margin-bottom: 14px; }
.btn-vote { max-width: 260px; margin-top: 14px; }
.host-abort-section { margin-top: 20px; border-top: 1px solid rgba(139,26,26,.15);
                          padding-top: 12px; text-align: center; }
.abort-btn-centered { max-width: 260px; margin: 0 auto; }

/* ── Game Page – Result ──────────────────────────────────────────────────── */
.impostor-figure-result { width: 110px; height: 168px; position: relative; margin-bottom: 14px; }
.result-header { text-align: center; margin-bottom: 8px; }
.h-line-result { width: 100%; max-width: 480px; margin: 12px auto; }
.reveal-stack { display: flex; flex-direction: column; gap: 10px; align-items: center;
                          width: 100%; max-width: 460px; margin-bottom: 14px; }

.result-actions { display: flex; gap: 10px; max-width: 460px; width: 100%; }
.btn-flex1 { flex: 1; }
.btn-flex2 { flex: 2; }

/* ── Draw / Unentschieden ────────────────────────────────────────────────── */

/* ── Voting: Eigene Karte ────────────────────────────────────────────────── */
.vote-card-self {
  opacity: .55;
  cursor: not-allowed;
  border-style: dashed;
}
.vote-card-self:hover {
  border-color: rgba(200,146,42,.18);
  transform: none;
}

/* ── Impostor Mission Box ────────────────────────────────────────────────── */
.impostor-mission {
  width: 100%;
  max-width: 460px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.impostor-mission-title {
  font-family: 'Rye', cursive;
  font-size: 15px;
  color: var(--blood-red);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: .08em;
}
.impostor-mission-text {
  font-size: 14px;
  color: var(--smoke);
  line-height: 1.7;
  border-left: 2px solid rgba(139,26,26,.4);
  padding-left: 13px;
}
.impostor-mission-text strong { color: var(--parchment); }

/* ── Endscreen Spielhistorie ─────────────────────────────────────────────── */
.history-card {
  width: 100%;
  max-width: 480px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.history-title {
  font-family: 'Rye', cursive;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: .08em;
  margin-bottom: 12px;
  text-align: center;
}
.history-clue-row,
.history-vote-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(200,146,42,.07);
  font-size: 14px;
}
.history-clue-row:last-child,
.history-vote-row:last-child {
  border-bottom: none;
}
.history-name { color: var(--old-paper); flex: 0 0 130px; }
.history-name-impostor { color: var(--blood-red); flex: 0 0 130px; font-weight: bold; }
.history-clues { color: var(--gold); flex: 1; text-align: right; }
.history-arrow { color: var(--smoke); }
.history-vote-hit { color: var(--green-ok); flex: 1; text-align: right; }
.history-vote-miss { color: var(--smoke);   flex: 1; text-align: right; }

/* ── Reconnect Wartescreen ───────────────────────────────────────────────── */
.reconnect-card {
  width: 100%;
  max-width: 460px;
  padding: 28px 24px;
  text-align: center;
  border-color: rgba(200,146,42,.4);
}
.reconnect-icon { font-size: 38px; margin-bottom: 12px; }
.reconnect-title {
  font-family: 'Rye', cursive;
  font-size: 22px;
  color: var(--amber);
  margin-bottom: 8px;
}
.reconnect-subtitle { font-size: 14px; color: var(--smoke); margin-bottom: 22px; line-height: 1.5; }
.reconnect-subtitle strong { color: var(--parchment); }
.reconnect-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 14px;
}
.reconnect-ring-wrap svg .ring-bg {
  fill: none; stroke: rgba(200,146,42,.12); stroke-width: 6;
}
.reconnect-ring-wrap svg .ring-prog {
  fill: none; stroke: var(--amber); stroke-width: 6; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 60px 60px;
  stroke-dasharray: 301.6;
  transition: stroke-dashoffset 1s linear;
}
.reconnect-ring-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Rye', cursive; font-size: 32px; color: var(--gold-light);
}
.reconnect-info { font-size: 13px; color: var(--smoke); margin-bottom: 16px; }
.btn-reconnect-action { max-width: 240px; margin: 0 auto; }

/* ── Zu wenige Spieler Screen ────────────────────────────────────────────── */
.toofew-card { max-width: 420px; width: 100%; text-align: center; padding: 28px 32px; }
.toofew-text { font-size: 14px; color: var(--smoke); }

/* ── Abbruch-Bestätigung Modal ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,5,2,.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-card {
  max-width: 420px; width: 100%;
  padding: 28px 26px;
  text-align: center;
}
.modal-emoji { font-size: 42px; margin-bottom: 14px; }
.modal-title {
  font-family: 'Rye', cursive;
  font-size: 22px; color: var(--blood-red);
  margin-bottom: 10px;
}
.modal-text { font-size: 14px; color: var(--smoke); line-height: 1.6; margin-bottom: 22px; }
.modal-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 14px;
}

/* ── Clue-Timer im Eingabefeld ───────────────────────────────────────────── */
.clue-timer-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; margin-bottom: 6px;
  font-size: 13px;
}
.clue-timer-label { color: var(--smoke); letter-spacing: .08em; text-transform: uppercase; }
.clue-timer-num { color: var(--gold-light); font-family: 'Rye', cursive; font-size: 16px; }
.clue-timer-num.danger { color: var(--blood-red); }

/* ── Home-Logo ───────────────────────────────────────────────────────────── */
/* ── Home-Page: Hero / Mode-Karten / Aktionen ────────────────────────────── */
/* Kopfbereich der Modus-Sektion: Überschrift + Pitch als Untertitel.
   Ersetzt den früheren separaten Hero-Banner (Variante D). */
.home-modes-head {
  text-align: center;
  margin-bottom: 22px;
}
.home-pitch {
  color: var(--smoke);
  font-size: 14px;
  line-height: 1.6;
  margin: 6px auto 0;
  max-width: 520px;
}
.home-alert {
  max-width: 540px;
  width: 100%;
  margin: 0 auto 24px;
}
.home-modes-section {
  max-width: 940px;
  width: 100%;
  margin-bottom: 36px;
}
.home-section-title {
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 20px;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.home-mode-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.home-mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 20px 16px 16px;
  background: rgba(8,5,2,.65);
  border: 1px solid rgba(200,146,42,.22);
  border-radius: 5px;
  color: var(--parchment);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  font-family: 'Special Elite', cursive;
}
.home-mode-card:hover {
  background: rgba(200,146,42,.08);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.home-mode-card-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 4px;
}
.home-mode-card-name {
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 16px;
  margin: 0;
}
.home-mode-card-desc {
  color: var(--parchment);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.home-mode-card-more {
  color: var(--gold-light);
  font-size: 12px;
  margin-top: 6px;
  letter-spacing: 0.04em;
}
@media (max-width: 860px) {
  .home-mode-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .home-mode-cards { grid-template-columns: 1fr; }
}

.home-actions-section {
  max-width: 720px;
  width: 100%;
  /* Wir nutzen jetzt immer die Zwei-Spalten-Variante (.home-actions-row),
     daher reicht eine zentrierte Section mit max-width. Keine spezielle
     Single-Card-Variante mehr nötig. */
  margin: 0 auto;
}
.home-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}
@media (max-width: 760px) {
  .home-actions-row { grid-template-columns: 1fr; }
}
.home-actions-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-actions-card-title {
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 17px;
  margin: 0 0 4px 0;
}
/* Kompakte User-Info in der "Eigene Lobby starten"-Karte (eingeloggt) –
   ähnlich der alten zentrierten Variante, aber linksbündig in der Karte. */
.home-user-info-compact {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 12px;
  background: rgba(8,5,2,.55);
  border: 1px solid rgba(200,146,42,.18);
  border-radius: 3px;
  font-size: 13px;
}
.home-user-info-compact .home-user-name {
  color: var(--gold-light);
  font-family: 'Rye', cursive;
  font-size: 14px;
}
.home-user-info-compact .home-user-edit {
  margin-left: auto;
  font-size: 12px;
}

/* ── JoinLobbyDialog (Modal-Spezifika) ───────────────────────────────────── */
.join-dialog {
  max-width: 540px;
}
.join-dialog-loading {
  text-align: center;
  padding: 30px;
  color: var(--smoke);
  font-style: italic;
}
.join-dialog-info {
  margin-bottom: 18px;
}
.join-dialog-mode {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: rgba(200,146,42,.06);
  border: 1px solid rgba(200,146,42,.22);
  border-radius: 4px;
  margin-bottom: 12px;
}
.join-dialog-mode-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.join-dialog-mode-name {
  font-family: 'Rye', cursive;
  font-size: 17px;
  color: var(--gold);
  margin: 0 0 6px 0;
}
.join-dialog-mode-desc {
  color: var(--parchment);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}
.join-dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  color: var(--smoke);
  margin-bottom: 12px;
}
.join-dialog-meta strong {
  color: var(--gold-light);
}
/* "Du trittst der Lobby als X bei." – etwas Atmungs-Margin nach unten,
   damit der Beitritts-Button nicht direkt am Text klebt. */
.join-dialog-as-user {
  color: var(--smoke);
  font-size: 14px;
  margin: 0 0 14px 0;
}
.join-dialog-as-user strong {
  color: var(--gold-light);
}
.join-dialog-section {
  padding: 14px 0;
}
.join-dialog-section-title {
  font-family: 'Special Elite', cursive;
  font-size: 14px;
  color: var(--gold-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px 0;
}
.join-dialog-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.join-dialog-account-required {
  margin-bottom: 14px;
}

/* ── App-Shell: Header + Main + Footer Layout ────────────────────────────── */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  /* KEIN padding-bottom hier! Sonst entsteht ein Streifen ohne Screen-Background.
     Footer-Reserve liegt in jedem .screen-* selbst (siehe oben). */
}

/* ── App-Header (fix oben) ───────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(8, 5, 2, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(200, 146, 42, 0.15);
}
.app-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold);
  font-family: 'Rye', cursive;
  font-size: 16px;
  letter-spacing: 0.06em;
  transition: opacity 0.15s;
}
.app-header-brand:hover { opacity: 0.85; }
.app-header-logo {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px rgba(200, 146, 42, 0.4));
}
.app-header-title {
  display: inline-block;
}
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Header-Auth-Buttons (Gäste) ─────────────────────────────────────────
   Ersetzen für nicht angemeldete Besucher das frühere ☰-Menü. „Anmelden"
   und „Registrieren" sind so direkt sichtbar statt im Dropdown versteckt. */
.header-auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.auth-btn-ghost {
  background: transparent;
  border: 1px solid rgba(200, 146, 42, 0.4);
  color: var(--parchment);
}
.auth-btn-ghost:hover { border-color: var(--gold); }
.auth-btn-solid {
  background: linear-gradient(180deg, #3a2710, #26190a);
  border: 1px solid var(--gold);
  color: var(--gold-light);
}
.auth-btn-solid:hover { background: linear-gradient(180deg, #4a3214, #2e1f0c); }

/* ── Nav-Lobby-Pill ──────────────────────────────────────────────────────
   Wird im Header neben dem Logo angezeigt, wenn der User in einer Lobby
   ist aber gerade nicht auf der Lobby-/Game-Seite. Klick navigiert zurück. */
.nav-lobby-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  margin-right: auto;     /* pusht den Header-Actions-Block weiter nach rechts */
  padding: 5px 12px 5px 8px;
  background: rgba(200,146,42,.08);
  border: 1px solid rgba(200,146,42,.4);
  border-radius: 18px;
  color: var(--gold-light);
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  /* sanftes Pulsieren, damit der User die Pille bemerkt */
  animation: navLobbyPulse 2.4s ease-in-out infinite;
}
.nav-lobby-pill:hover {
  background: rgba(200,146,42,.18);
  border-color: var(--gold);
  animation-play-state: paused;
}
.nav-lobby-pill-icon {
  font-size: 16px;
  line-height: 1;
}
.nav-lobby-pill-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.nav-lobby-pill-count {
  color: var(--smoke);
  font-size: 12px;
}
@keyframes navLobbyPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(200,146,42,0); }
  50%      { box-shadow: 0 0 14px rgba(200,146,42,.18); }
}

/* Innerhalb der Lobby: kein Pulsieren (User ist ja schon da),
   etwas dezenter und mit "Mitglied"-Cursor statt Pointer. */
.nav-lobby-pill.is-current {
  animation: none;
  cursor: default;
  background: rgba(200,146,42,.04);
  border-color: rgba(200,146,42,.25);
}
.nav-lobby-pill.is-current:hover {
  background: rgba(200,146,42,.04);
  border-color: rgba(200,146,42,.25);
}

/* ── Kick-Toast (vom MainLayout angezeigt, wenn User außerhalb der
   Lobby aus dieser entfernt wurde) ──────────────────────────────────────── */
.kick-toast-wrap {
  /* Mittig zentriert direkt unter dem Header, schiebt aber nichts.
     Container ist nur Platzhalter für das Toast-Element, das sticky bleibt. */
  position: sticky;
  top: 60px;
  z-index: 850;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.kick-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 16px;
  margin: 14px 16px 0 16px;
  background: rgba(30,10,5,.92);
  border: 1px solid rgba(192,53,42,.7);
  border-left: 3px solid var(--blood-red);
  border-radius: 3px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  color: var(--old-paper);
  font-family: 'Special Elite', cursive;
  font-size: 14px;
  max-width: 480px;
  pointer-events: auto;
  animation: kickToastSlideIn .25s ease-out;
}
.kick-toast-icon {
  font-size: 18px;
  color: var(--red-light);
  flex-shrink: 0;
}
.kick-toast-text {
  flex: 1;
}
.kick-toast-close {
  background: transparent;
  border: none;
  color: var(--smoke);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  margin: -2px -4px -2px 0;
  border-radius: 2px;
  transition: color .15s, background .15s;
}
.kick-toast-close:hover {
  color: var(--old-paper);
  background: rgba(255,255,255,.08);
}
@keyframes kickToastSlideIn {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
/* Mobile: kompakter, ohne Mode-Name */
@media (max-width: 600px) {
  .nav-lobby-pill-text { gap: 4px; }
  .nav-lobby-pill { font-size: 12px; padding: 4px 10px 4px 6px; }
}

/* ── Lautstärke (Slider nur bei Hover sichtbar, öffnet nach LINKS) ──────── */
.volume-control {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  position: relative;
}
.mute-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(8, 5, 2, 0.85);
  border: 1px solid rgba(200, 146, 42, 0.35);
  color: var(--gold);
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mute-btn:hover {
  border-color: var(--gold);
  background: rgba(20, 12, 3, 0.95);
  transform: scale(1.05);
}
.mute-btn.muted {
  color: rgba(168, 151, 132, 0.55);
  border-color: rgba(168, 151, 132, 0.25);
}
.mute-btn.muted:hover {
  color: var(--smoke);
  border-color: rgba(200, 146, 42, 0.4);
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  max-width: 0;
  margin-right: 0;
  height: 4px;
  background: rgba(8, 5, 2, 0.85);
  border: 1px solid rgba(200, 146, 42, 0.35);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: width 0.25s ease, max-width 0.25s ease, margin-right 0.25s ease, opacity 0.2s ease;
}
.volume-control:hover .volume-slider,
.volume-control:focus-within .volume-slider {
  width: 80px;
  max-width: 80px;
  margin-right: 8px;
  opacity: 1;
  pointer-events: auto;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid rgba(8, 5, 2, 0.8);
  cursor: pointer;
}
.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid rgba(8, 5, 2, 0.8);
  cursor: pointer;
}

/* Header-Help-Button (Spielregeln) — sitzt in den header-actions, kein fixed mehr */
.header-help-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(8, 5, 2, 0.85);
  border: 1px solid rgba(200, 146, 42, 0.35);
  color: var(--gold);
  font-family: 'Rye', cursive;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-help-btn:hover {
  border-color: var(--gold);
  background: rgba(20, 12, 3, 0.95);
  transform: scale(1.05);
}

@media (max-width: 540px) {
  .app-header { padding: 8px 12px; }
  .app-header-title { display: none; } /* nur Logo auf Mobile */
  .mute-btn,
.header-help-btn { width: 34px; height: 34px; font-size: 14px; }
  .volume-control:hover .volume-slider { width: 60px; max-width: 60px; }
  /* Schmaler Header: nur „Anmelden" zeigen, „Registrieren" ist von der
     Login-Seite aus erreichbar. Spart Breite neben Logo + Lautstärke. */
  .auth-btn-solid { display: none; }
  .auth-btn { height: 34px; padding: 0 12px; }
}

/* ── Spielstart-Countdown (Lobby + Game) ─────────────────────────────────── */
.start-countdown-wrap {
  text-align: center;
  margin-bottom: 14px;
}
.start-countdown-label {
  font-size: 13px; color: var(--smoke);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 6px;
}
.start-countdown-num {
  font-family: 'Rye', cursive;
  font-size: 52px;
  color: var(--gold-light);
  text-shadow: 0 0 28px rgba(200,146,42,.5);
  line-height: 1;
  margin-bottom: 10px;
}
.timer-fill-gold {
  background: var(--gold) !important;
  box-shadow: 0 0 10px rgba(200,146,42,.5);
}

/* ── Chat ────────────────────────────────────────────────────────────────── */
.chat-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-title {
  font-family: 'Rye', cursive;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: .08em;
}
.chat-messages {
  /* War vorher 180px – mit der neuen Lobby-Layout (Spielerliste oben kompakt)
     haben wir mehr Höhe übrig, also nutzen wir den Platz für den Chat. */
  height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,146,42,.2) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(200,146,42,.2); border-radius: 2px; }

/* Status-Zeile */
.chat-status {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 1px 0;
}
.chat-status-text {
  font-size: 13px;
  color: rgba(168, 151, 132,.6);
  font-style: italic;
}

/* Chat-Nachricht */
.chat-msg {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 2px 0;
  flex-wrap: wrap;
}
.chat-msg-own .chat-sender { color: var(--gold-light); }
.chat-time {
  font-size: 12px;
  color: rgba(168, 151, 132,.5);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.chat-sender {
  font-size: 13px;
  color: var(--amber);
  font-weight: bold;
  flex-shrink: 0;
}
.chat-sender::after { content: ':'; }
.chat-text {
  font-size: 14px;
  color: var(--old-paper);
  word-break: break-word;
  flex: 1;
}

/* Eingabezeile */
.chat-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.chat-inp {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.chat-send-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(8,5,2,.6);
  border: 1px solid rgba(200,146,42,.35);
  border-radius: 1px;
  font-size: 20px;
  font-family: 'Special Elite', cursive;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  line-height: 1;
}
.chat-send-btn:hover:not(:disabled) { background: rgba(200,146,42,.12); border-color: var(--gold); }
.chat-send-btn:disabled { opacity: .35; cursor: default; }

/* Emoji Picker entfernt */

/* ── Spielverlauf Modal ──────────────────────────────────────────────────── */

.history-modal {
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.history-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(200,146,42,.15);
  position: sticky;
  top: 0;
  background: var(--dark-wood);
  z-index: 1;
}
.history-modal-title {
  font-family: 'Rye', cursive;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: .07em;
}
.history-modal-close {
  background: none;
  border: 1px solid rgba(200,146,42,.25);
  color: var(--smoke);
  font-size: 14px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 1px;
  transition: all .2s;
}
.history-modal-close:hover { color: var(--gold); border-color: var(--gold); }
.history-loading,
.history-empty {
  padding: 32px;
  text-align: center;
  color: var(--smoke);
  font-size: 14px;
}
.history-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Game Card ── */
.history-game-card {
  background: rgba(200,146,42,.04);
  border: 1px solid rgba(200,146,42,.12);
  border-radius: 2px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-game-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}
.history-game-date {
  font-size: 13px;
  color: var(--smoke);
}
.history-game-duration {
  font-size: 12px;
  color: rgba(168, 151, 132,.55);
  background: rgba(200,146,42,.07);
  padding: 1px 7px;
  border-radius: 10px;
}
.history-winner-badge {
  font-size: 13px;
  font-family: 'Special Elite', cursive;
  padding: 3px 10px;
  border-radius: 2px;
  letter-spacing: .05em;
}
.history-winner-crewmates { background: rgba(34,139,34,.2);   color: #5c5; }
.history-winner-impostor { background: rgba(139,26,26,.25);  color: #e66; }
.history-winner-draw { background: rgba(168, 151, 132,.2); color: var(--smoke); }

.history-label {
  font-size: 11px;
  color: var(--smoke);
  letter-spacing: .1em;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 68px;
}
.history-word-row,
.history-impostor-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.history-word {
  font-family: 'Rye', cursive;
  font-size: 16px;
  color: var(--gold-light);
  letter-spacing: .08em;
}
.history-impostor { font-size: 14px; color: var(--blood-red); }
.history-guess {
  font-size: 12px;
  margin-left: 4px;
}
.history-guess.correct { color: var(--green-ok); }
.history-guess.wrong { color: rgba(200,60,60,.7); }

.history-clues-section { display: flex; flex-direction: column; gap: 6px; }
.history-clues-grid { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.history-player-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(200,146,42,.05);
}
.history-player-row:last-child { border-bottom: none; }
.history-player-row.is-impostor .history-pname { color: var(--blood-red); }
.history-pname { flex: 0 0 110px; color: var(--old-paper); }
.history-pclues { flex: 1; color: var(--gold); }
.history-pvotes { flex: 0 0 80px; text-align: right; color: rgba(168, 151, 132,.6); font-size: 12px; }

/* ── Impostor: Kategorie-Anzeige ─────────────────────────────────────────── */
.impostor-category {
  width: 100%;
  max-width: 320px;
  padding: 14px 22px;
  text-align: center;
  margin-top: 4px;
}
.impostor-category-value {
  font-family: 'Rye', cursive;
  font-size: 22px;
  color: var(--gold-light);
  letter-spacing: .08em;
  margin-top: 6px;
}

/* ── Settings: Toggle-Zeile ─────────────────────────────────────────────── */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
/* .lbl bringt display:block + margin-bottom mit — in der Flex-Zeile
   zurücksetzen, damit das Label vertikal mittig sitzt, und auf die
   kompakte 13px-Größe der übrigen Konfig-Zeilen angleichen. Gilt für das
   direkte Label und die Inline-Label-mit-Hilfe-Variante. */
.settings-toggle-row > .lbl,
.settings-toggle-row > .lbl-with-help-inline {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}
.settings-toggle-row > .lbl,
.settings-toggle-row .lbl-with-help-inline .lbl {
  font-size: 13px;
  margin-bottom: 0;
}

/* ── Settings Toggle Button ──────────────────────────────────────────────── */
.settings-toggle-btn {
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid rgba(168, 151, 132,.3);
  background: rgba(8,5,2,.5);
  color: var(--smoke);
  transition: all .2s;
  flex-shrink: 0;
}
.settings-toggle-btn.on {
  border-color: rgba(74,138,74,.4);
  background: rgba(74,138,74,.15);
  color: #5c5;
}
.settings-toggle-btn:hover { border-color: rgba(200,146,42,.4); color: var(--gold); }

/* ── Lobby Sidebar: Schnellzugriff-Buttons oben ──────────────────────────── */
.lobby-sidebar-top-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.btn-sm-action {
  flex: 1;
  font-size: 12px !important;
  padding: 6px 10px !important;
  white-space: nowrap;
}

/* ── Stat-Box (Game-Sidebar) ─────────────────────────────────────────────── */
.stat-box { background: rgba(8,5,2,.8); border: 1px solid rgba(200,146,42,.18); padding: 14px 16px; border-radius: 1px; }
.stat-box h4 { font-family: 'Rye', cursive; font-size: 16px; color: var(--gold); margin-bottom: 10px; letter-spacing: .08em; }
.stat-box-center { text-align: center; }

/* ── Hangman ─────────────────────────────────────────────────────────────── */

.hangman-placeholder {
  font-family: 'Rye', cursive;
  font-size: clamp(20px, 5vw, 36px);
  color: var(--gold-light);
  letter-spacing: .25em;
  margin: 8px 0 12px;
  word-break: break-all;
}
.hangman-letter-count {
  font-size: 12px;
  color: rgba(168, 151, 132,.5);
  letter-spacing: .08em;
}

/* ── Tabu ────────────────────────────────────────────────────────────────── */
.tabu-clues-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.tabu-clue-item {
  font-size: 14px;
  color: var(--old-paper);
  padding: 6px 10px;
  background: rgba(200,146,42,.06);
  border-left: 2px solid rgba(200,146,42,.25);
  border-radius: 1px;
}

/* Gold background for Erklärer role reveal */
.bg-gold {
  background: radial-gradient(ellipse at 50% 30%, rgba(200,146,42,.12) 0%, transparent 70%),
              var(--dark);
}

/* ── History: Session-Header als ausklappbarer Button ───────────────────── */
.history-session-header {
  /* Button-Reset weil wir <button> statt <div> verwenden */
  background: rgba(0,0,0,.15);
  border: 1px solid rgba(200,146,42,.15);
  color: var(--gold);
  font-family: 'Rye', cursive;
  font-size: 13px;
  letter-spacing: .08em;
  padding: 10px 14px;
  margin-top: 10px;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 2px;
  transition: background .15s ease, border-color .15s ease;
}
.history-session-header:hover {
  background: rgba(200,146,42,.08);
  border-color: rgba(200,146,42,.3);
}
.history-session-header:first-of-type {
  margin-top: 0;
}
.history-session-header.expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.history-session-toggle {
  color: var(--smoke, #a89784);
  font-size: 11px;
  width: 12px;
  flex-shrink: 0;
}
.history-session-title {
  flex-shrink: 0;
}
.history-session-summary {
  font-family: 'Special Elite', cursive;
  font-size: 12px;
  color: var(--smoke, #a89784);
  letter-spacing: .03em;
  margin-left: auto;
  text-transform: none;
  text-align: right;
}
.history-session-my-result strong {
  color: var(--amber, #e8a040);
}

/* ── Hangman: kompaktes Layout ───────────────────────────────────────────── */
.hangman-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  width: 100%;
  max-width: 820px;
  padding: 24px 20px;
  align-items: start;
}
.hangman-main { display: flex; flex-direction: column; gap: 14px; }
.hangman-word-card {
  padding: 20px 24px 18px;
  text-align: center;
}
.hangman-word-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: .07em;
}
.hangman-word-progress {
  font-family: 'Special Elite', cursive;
  color: var(--smoke);
}
.hangman-word-category {
  font-family: 'Special Elite', cursive;
  color: var(--amber);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hangman-letter-count { color: rgba(168, 151, 132,.5); }
.hangman-input-area { margin-top: 18px; }
.hangman-correct-msg {
  color: var(--green-ok);
  font-size: 14px;
  padding: 12px 0;
}

/* ── Podest Layout ───────────────────────────────────────────────────────── */
.podium-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  padding: 28px 24px;
  gap: 16px;
}
.podium-title-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.podium-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  width: 100%;
  align-items: start;
}
.podium-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.podium-scores { width: 100%; padding: 16px 20px; }
.podium-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(200,146,42,.06);
}
.podium-score-row:last-child { border-bottom: none; }
.podium-medal { font-size: 20px; width: 30px; flex-shrink: 0; }

/* Klickbarer Spielername im End-Podium — öffnet das PlayerProfileModal.
   Hover hebt heller + unterstrichen ab; das Unterstreichen ist bewusst
   ein deutlicheres Signal als bei den Track-Zeilen, weil eine Namens-
   zeile weniger offensichtlich interaktiv wirkt. */
.podium-name-clickable { cursor: pointer; transition: color .12s; }
.podium-name-clickable:hover { color: var(--gold-light); text-decoration: underline; }

/* Hinweis-Pille für Spieler, die die Lobby vor Spielende verlassen haben —
   ihr Name bleibt im Endstand, ist aber nicht klickbar. */
.podium-name-left-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .08em;
  padding: 1px 7px;
  margin-left: 6px;
  border-radius: 3px;
  background: rgba(168, 151, 132, .2);
  color: var(--smoke);
  vertical-align: middle;
}

.podium-pts { color: var(--gold); font-family: 'Rye', cursive; font-size: 20px; }
.podium-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.podium-btn { width: 100% !important; }

/* ── Podest Statistik ────────────────────────────────────────────────────── */
.podium-stats {
  background: rgba(8,5,2,.4);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px 18px;
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,146,42,.2) transparent;
}
.podium-word-block {
  padding: 10px 0;
  border-bottom: 1px solid rgba(200,146,42,.08);
}
.podium-word-block:last-child { border-bottom: none; }
.podium-word-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.podium-word-num { color: var(--smoke); font-size: 12px; flex-shrink: 0; }
.podium-word-text { font-family: 'Rye', cursive; font-size: 15px; color: var(--gold-light); }
.podium-word-cat { font-size: 12px; color: var(--smoke); padding: 1px 6px; background: rgba(200,146,42,.08); border-radius: 2px; }
.podium-word-erklaerer { font-size: 12px; color: var(--amber); }
.podium-stat-row {
  display: grid;
  grid-template-columns: 1fr 50px 55px;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
  color: var(--old-paper);
}
.podium-stat-name { }
.podium-stat-time { color: var(--smoke); text-align: right; }
.podium-stat-pts { color: var(--gold); text-align: right; font-family: 'Special Elite', cursive; }

@media (max-width: 700px) {
  .hangman-layout { grid-template-columns: 1fr; }
  .podium-layout { grid-template-columns: 1fr; }
}

/* ── Hangman Role Reveal ─────────────────────────────────────────────────── */
.hangman-reveal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 400px;
}
.hangman-reveal-letters {
  font-family: 'Rye', cursive;
  font-size: clamp(28px, 6vw, 48px);
  color: var(--gold-light);
  letter-spacing: .35em;
  text-shadow: 0 0 30px rgba(200,146,42,.3);
}
.hangman-reveal-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.hangman-rule-item {
  font-size: 14px;
  color: var(--old-paper);
  background: rgba(200,146,42,.06);
  border: 1px solid rgba(200,146,42,.12);
  border-radius: 2px;
  padding: 8px 16px;
  text-align: center;
}

/* ── Hangman Timer ───────────────────────────────────────────────────────── */
.hangman-timer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
}
.hangman-timer-num {
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  color: var(--smoke);
  flex-shrink: 0;
  min-width: 34px;
  text-align: right;
}
.hangman-timer-num.danger { color: var(--blood-red); }

/* ── Tabu Role Reveal ─────────────────────────────────────────────────────── */
.tabu-reveal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 400px;
}
.tabu-reveal-badge {
  font-family: 'Rye', cursive;
  font-size: 22px;
  color: var(--gold-light);
  letter-spacing: .2em;
  padding: 8px 24px;
  border: 1px solid rgba(200,146,42,.3);
  border-radius: 2px;
  background: rgba(200,146,42,.08);
}
.tabu-reveal-word-card { width: 100%; text-align: center; }
.tabu-reveal-erklaerer {
  font-size: 16px;
  color: var(--old-paper);
}
.tabu-reveal-erklaerer strong { color: var(--gold-light); }

/* ── Tabu Spielscreen ────────────────────────────────────────────────────── */
.tabu-word-display {
  text-align: center;
  padding: 8px 0 12px;
  border-bottom: 1px solid rgba(200,146,42,.1);
  margin-bottom: 12px;
}
.tabu-clues-area {
  min-height: 60px;
  margin-bottom: 10px;
}
.tabu-waiting {
  font-size: 14px;
  color: var(--smoke);
  text-align: center;
  padding: 12px 0;
  font-style: italic;
}
.tabu-sent-clues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tabu-sent-clue {
  font-size: 12px;
  color: var(--smoke);
  background: rgba(200,146,42,.07);
  border: 1px solid rgba(200,146,42,.12);
  border-radius: 2px;
  padding: 2px 8px;
}

/* ── Tabu Role Reveal: kompakte Regeln ───────────────────────────────────── */
.tabu-reveal-compact-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.tabu-reveal-compact-rules span {
  font-size: 13px;
  color: var(--old-paper);
  background: rgba(200,146,42,.06);
  border: 1px solid rgba(200,146,42,.1);
  border-radius: 2px;
  padding: 5px 12px;
  text-align: center;
}

/* ── Tabu Erklärer Skip ──────────────────────────────────────────────────── */
.tabu-erklaerer-actions {
  margin-top: 8px;
}
.tabu-skip-btn {
  font-size: 12px !important;
  padding: 5px 14px !important;
  color: var(--smoke) !important;
  border-color: rgba(168, 151, 132,.3) !important;
}
.tabu-skip-btn:hover { color: var(--old-paper) !important; }

/* ── Tabu Flash-Nachricht ────────────────────────────────────────────────── */
.tabu-flash {
  font-size: 13px;
  text-align: center;
  padding: 7px 14px;
  border-radius: 2px;
  margin-bottom: 10px;
  font-family: 'Special Elite', cursive;
  letter-spacing: .04em;
  animation: tabu-flash-in .2s ease;
}
.tabu-flash-ok { background: rgba(80,180,80,.12);  color: var(--green-ok);  border: 1px solid rgba(80,180,80,.25); }
.tabu-flash-skip { background: rgba(200,146,42,.08); color: var(--smoke);     border: 1px solid rgba(200,146,42,.15); }
@keyframes tabu-flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ── Tabu Break-Screen ───────────────────────────────────────────────────── */
.tabu-break-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin: 12px 0;
}
.tabu-break-card { padding: 14px 16px; }
.tabu-break-word-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(200,146,42,.06);
  gap: 8px;
}
.tabu-break-word-row:last-child { border-bottom: none; }
.tabu-break-word {
  font-family: 'Special Elite', cursive;
  color: var(--gold-light);
  font-size: 13px;
}
.tabu-break-guesser {
  font-size: 12px;
  color: var(--smoke);
  flex-shrink: 0;
}
@media (max-width: 500px) {
  .tabu-break-layout { grid-template-columns: 1fr; }
}

/* ── Spielregeln-Modal (Inhalts-Styles) ──────────────────────────────────── */
.rules-modal {
  max-width: 480px !important;
  width: 100% !important;
  padding: 24px 28px !important;
}
.rules-content {
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  color: var(--old-paper);
}
.rules-content p { margin: 0 0 10px 0; }
.rules-content ul { margin: 4px 0 10px 24px; padding: 0; }
.rules-content li { margin: 4px 0; }
.rules-content strong { color: var(--gold-light); }

/* ── Auth-Pages (Setup, Login, Register, Profile) ─────────────────────── */
.auth-screen,
.setup-screen {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.card-auth,
.card-setup {
  background: rgba(8,5,2,.92);
  border: 1px solid rgba(200,146,42,.4);
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 32px rgba(0,0,0,.6);
}
.card-setup { max-width: 480px; }

.auth-emoji,
.setup-emoji {
  text-align: center;
  font-size: 48px;
  margin-bottom: 12px;
}
.auth-title,
.setup-title {
  text-align: center;
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 26px;
  margin: 0 0 6px 0;
}
.setup-subtitle {
  text-align: center;
  color: var(--smoke);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-form,
.setup-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  color: var(--gold-light);
  font-family: 'Special Elite', cursive;
}
.form-group small { color: var(--smoke); font-size: 12px; }
.form-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--smoke); }
.check-row input[type="checkbox"] { cursor: pointer; }

.text-warning { color: #d97706; }

.btn-block { width: 100%; }

.auth-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 13px;
}
.auth-link:hover { color: var(--gold-light); text-decoration: underline; }
/* Inaktive Variante (z.B. "Passwort vergessen?" wenn SMTP nicht konfiguriert) –
   bleibt sichtbar aber visuell ausgegraut und nicht klickbar. */
.auth-link-disabled {
  color: var(--smoke, #a89784);
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: line-through;
}
.auth-link-disabled:hover {
  color: var(--smoke, #a89784);
  text-decoration: line-through;
}

.auth-divider {
  text-align: center;
  margin: 24px 0 18px 0;
  position: relative;
  color: var(--smoke);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(200,146,42,.2);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-divider span { background: rgba(8,5,2,.92); padding: 0 12px; position: relative; }

.oauth-buttons { display: flex; flex-direction: column; gap: 8px; }
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px;
  background: rgba(40,28,12,.6);
  border: 1px solid rgba(200,146,42,.25);
  color: var(--old-paper);
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: all .2s;
}
.btn-oauth:hover { border-color: var(--gold); background: rgba(60,42,18,.8); }
.oauth-icon { font-weight: bold; width: 20px; text-align: center; }

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--smoke);
}

/* ── Profile Info ─────────────────────────────────────────────────────── */
.profile-info { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.profile-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.profile-label { color: var(--smoke); }
.profile-section-title { color: var(--gold-light); font-size: 15px; margin: 0 0 10px 0; }
.profile-divider { border: none; border-top: 1px solid rgba(200,146,42,.15); margin: 22px 0; }

/* ── Profile Page Layout (responsive 2-Spalter) ────────────────────────── */
/* Eigener Screen-Container statt .auth-screen, weil das Profile nicht in
   einer schmalen Auth-Card sitzen soll, sondern die Breite ausnutzen darf. */
.profile-screen {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 60px;
}
.profile-page {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.profile-page-header {
  text-align: center;
  margin-bottom: 6px;
}

/* Zwei-Spalten-Layout: links (380px, Account-Verwaltung) und rechts (1fr, Statistik
   + Verlauf). Jede Spalte ist ein eigener Flex-Container, damit die linken Sektionen
   eng untereinander gestapelt bleiben — unabhängig davon, wie hoch die rechte Spalte
   wird. Mit dem alten Grid-Layout (grid-auto-flow: dense + explizit zugewiesene
   grid-column) zogen sehr hohe Sektionen rechts die ganze Grid-Zeile mit und ließen
   die linken Karten optisch "auseinandergerissen" wirken. */
.profile-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 18px;
  align-items: start;
}
.profile-column-left,
.profile-column-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;  /* damit lange Inhalte (z.B. lange E-Mail-Adresse) nicht die Spalte sprengen */
}
.profile-section {
  background: rgba(8,5,2,.6);
  border: 1px solid rgba(200,146,42,.18);
  border-radius: 4px;
  padding: 18px 20px 22px;
}
/* Buttons und Button-Links innerhalb einer Profile-Section bekommen Abstand
   zum vorausgehenden Inhalt (typisch ein Erklärungstext). Standard p-Margin
   alleine reicht nicht; der "klebt zu nah"-Eindruck kommt vor allem von
   .btn-block-Buttons die volle Breite einnehmen und dadurch optisch sehr
   schwer wirken. */
.profile-section > .btn,
.profile-section > a.btn {
  margin-top: 10px;
}
.profile-section > p + .btn,
.profile-section > p + a.btn {
  margin-top: 14px;
}
.profile-section .profile-delete-confirm {
  margin-top: 14px;
}
/* Legacy-Modifier: profile-section-left / profile-section-right wurden früher
   für CSS-Grid-Spalten-Zuweisung gebraucht. Mit dem Flex-Spalten-Layout sind
   sie semantisch nicht mehr nötig, bleiben aber an den Razor-Sections, damit
   man den Logik-Zweck im Markup sieht. Hier kein zusätzliches Styling. */
.profile-section-danger {
  border-color: rgba(139,26,26,.35);
}
.profile-section .profile-section-title {
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 16px;
  letter-spacing: .04em;
  margin: 0 0 14px 0;
}
.profile-section .profile-danger-title { color: var(--blood-red); }

/* Auf Tablet / Smartphone in eine Spalte zusammenklappen, Sektionen folgen
   dann der DOM-Reihenfolge: alle linken Sektionen zuerst (Konto, Anzeigename,
   Verknüpfte, Daten, Gefahrenzone), dann die rechten (Statistik, Letzte Spiele).
   Beide Flex-Spalten bleiben aktiv, das Grid stellt nur seinen Spalten-Modus
   um — Stack-Layout funktioniert automatisch. */
@media (max-width: 860px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Profile Dropdown in MainLayout ───────────────────────────────────── */
.profile-menu { position: relative; }
.profile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 998;       /* knapp unter Dropdown (1000) */
  background: transparent;
}
.profile-btn {
  position: relative;
  z-index: 1001;      /* muss über dem Backdrop bleiben */
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(8,5,2,.85);
  border: 1px solid rgba(200,146,42,.35);
  color: var(--gold);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.profile-btn:hover {
  border-color: var(--gold);
  background: rgba(20, 12, 3, 0.95);
  transform: scale(1.05);
}
.profile-initial {
  font-family: 'Special Elite', cursive;
  font-size: 16px;
  /* line-height: 1 unterdrückt den Default-Zeilenabstand der Font, der das
     Zeichen sonst nach oben verschiebt. Special Elite (Typewriter-Font) hat
     zusätzlich etwas Whitespace oben in der Glyphe – ein leichter translateY
     gleicht das optisch im Kreis aus. */
  line-height: 1;
  display: inline-block;
  transform: translateY(1px);
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(8,5,2,.95);
  border: 1px solid rgba(200,146,42,.35);
  border-radius: 8px;
  min-width: 180px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}
.profile-dropdown-header { padding: 10px 14px; border-bottom: 1px solid rgba(200,146,42,.15); font-size: 13px; color: var(--gold-light); }
.profile-dropdown-item {
  display: block; padding: 8px 14px;
  color: var(--old-paper);
  text-decoration: none;
  font-size: 13px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.profile-dropdown-item:hover { background: rgba(200,146,42,.1); color: var(--gold); }
.profile-dropdown-divider { height: 1px; background: rgba(200,146,42,.15); margin: 4px 0; }
/* Verhindert doppelte Linien wenn der Divider direkt nach Header oder
   Ingame-Banner käme (z.B. im Gast-Menü ohne Profil/Admin-Items davor) –
   beide Vorgänger haben schon eine border-bottom. */
.profile-dropdown-header + .profile-dropdown-divider,
.profile-dropdown-ingame + .profile-dropdown-divider {
  display: none;
}
/* Icons in Dropdown-Items haben unterschiedliche Glyphen-Breiten (👤 vs ⚙).
   Feste Spalte sorgt für linksbündig ausgerichteten Text. */
.dropdown-icon {
  display: inline-block;
  width: 20px;
  text-align: center;
  margin-right: 6px;
  font-size: 13px;
}

/* Warn-Banner im Profil-Menü wenn der Spieler in einem laufenden Spiel ist */
.profile-dropdown-ingame {
  padding: 9px 14px;
  background: rgba(212, 98, 10, 0.14);
  border-bottom: 1px solid rgba(212, 146, 42, 0.3);
  border-left: 3px solid var(--gold);
  font-size: 12px;
  color: var(--bone, #ddd);
  line-height: 1.4;
}
.profile-dropdown-logout { color: #b85a4a; }

.alert-success {
  background: rgba(30,100,30,.2);
  border: 1px solid #4ade80;
  color: #4ade80;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 8px;
}

.toofew-text { color: var(--smoke); font-size: 14px; text-align: center; }

/* ── Gast-Markierung ────────────────────────────────────────────────────── */

.guest-mini {
  display: inline-block;
  color: #9ca3af;
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.85;
}

/* ── Spielmodus-Kacheln (im Lobby-Create-Modal) ─────────────────────────── */
.mode-tiles {
  display: grid;
  /* 4 Kacheln nebeneinander, auf schmalen Bildschirmen 2x2 (Media-Query unten). */
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.mode-tile {
  aspect-ratio: 1;
  background: var(--mid-wood);
  border: 1px solid rgba(200,146,42,.18);
  border-radius: 4px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  overflow: hidden;
  font-family: 'Special Elite', cursive;
}
.mode-tile:hover {
  border-color: var(--gold);
  background: var(--warm-wood);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200,146,42,.18);
}
.mode-tile.selected {
  border-color: var(--gold-light);
  background: rgba(200,146,42,.08);
  box-shadow: inset 0 0 14px rgba(200,146,42,.12);
}
.mode-tile.selected::after {
  content: "✓";
  position: absolute;
  top: 4px; right: 7px;
  color: var(--gold-light);
  font-size: 15px;
  line-height: 1;
}
.mode-tile-icon {
  font-size: 32px;
  line-height: 1;
}
.mode-tile-name {
  font-family: 'Rye', cursive;
  color: var(--gold-light);
  font-size: 12px;
  letter-spacing: .04em;
  text-align: center;
  line-height: 1.15;
}
@media (max-width: 520px) {
  .mode-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ── Label + ?-Help-Button-Layout ──────────────────────────────────────────
   Form-Label mit kleinem ?-Button rechts daneben. Klick auf ? öffnet ein
   Modal mit Kurzbeschreibungen (z.B. die Spielmodi-Übersicht). Hält die
   Form schlank, erlaubt aber kontextuelles Nachschlagen. */
.lbl-with-help {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.lbl-with-help .lbl {
  margin: 0;
}
.help-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(200,146,42,.4);
  border-radius: 50%;
  color: var(--gold);
  font-family: 'Special Elite', cursive;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.help-icon-btn:hover {
  background: rgba(200,146,42,.15);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ── Mode-Info-Modal ────────────────────────────────────────────────────── */
.mode-info-modal {
  max-width: 580px;
}
.mode-info-intro {
  font-size: 13px;
  margin: 0 0 18px 0;
}
.mode-info-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mode-info-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: rgba(8,5,2,.5);
  border: 1px solid rgba(200,146,42,.18);
  border-radius: 4px;
}
.mode-info-card.is-highlighted {
  border-color: var(--gold);
  background: rgba(200,146,42,.06);
}
.mode-info-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.mode-info-text {
  flex: 1;
}
.mode-info-name {
  font-family: 'Rye', cursive;
  font-size: 16px;
  color: var(--gold);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mode-info-current {
  font-family: 'Special Elite', cursive;
  font-size: 11px;
  color: var(--gold-light);
  background: rgba(200,146,42,.18);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: normal;
  letter-spacing: 0.02em;
}
.mode-info-desc {
  font-size: 13px;
  color: var(--parchment);
  margin: 0 0 6px 0;
  line-height: 1.5;
}
.mode-info-meta {
  font-size: 12px;
  color: var(--smoke);
}

/* ── Quiz-Modus-Pills (nur sichtbar wenn Musikquiz gewählt) ──────────────── */
.quiz-mode-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quiz-pill {
  padding: 8px 16px;
  background: var(--mid-wood);
  border: 1px solid rgba(200,146,42,.18);
  color: var(--old-paper);
  border-radius: 20px;
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.quiz-pill:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}
.quiz-pill.selected {
  background: rgba(200,146,42,.15);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* ── Profile: Statistik-Anzeige ────────────────────────────────────────── */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.stats-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(8, 5, 2, 0.6);
  border: 1px solid rgba(200, 146, 42, 0.18);
  border-radius: 5px;
  padding: 10px 8px;
  text-align: center;
}
.stats-summary-value {
  font-family: 'Rye', cursive;
  color: var(--gold-light);
  font-size: 18px;
  margin-bottom: 2px;
}
.stats-summary-label {
  font-family: 'Special Elite', cursive;
  color: var(--smoke);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.stats-mode-card {
  background: rgba(8, 5, 2, 0.5);
  border: 1px solid rgba(200, 146, 42, 0.12);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.stats-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(200, 146, 42, 0.12);
}
.stats-mode-name {
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 15px;
}
.stats-mode-played {
  font-size: 12px;
  color: var(--smoke);
  font-family: 'Special Elite', cursive;
}
.stats-mode-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.stats-row-label {
  color: var(--smoke);
}
.stats-row-value {
  color: var(--old-paper);
  font-family: 'Special Elite', cursive;
}
.stats-pct {
  color: var(--smoke);
  font-size: 12px;
  margin-left: 4px;
}

@media (max-width: 540px) {
  .stats-summary { grid-template-columns: repeat(2, 1fr); }
}

/* ── Footer (Datenschutz/Impressum-Links) ───────────────────────────────── */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  text-align: center;
  padding: 12px 16px;
  font-size: 12px;
  font-family: 'Special Elite', cursive;
  color: var(--smoke);
  border-top: 1px solid rgba(200, 146, 42, 0.15);
  background: rgba(8, 5, 2, 0.85);
  backdrop-filter: blur(6px);
}
.footer-link {
  color: var(--smoke);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover {
  color: var(--gold);
}
.footer-sep {
  margin: 0 8px;
  opacity: 0.4;
}

/* ── Legal Pages (Datenschutz, Impressum) ───────────────────────────────── */
.legal-page {
  max-width: 760px;
  margin: 40px auto;
  padding: 30px;
  background: rgba(8, 5, 2, 0.6);
  border: 1px solid rgba(200, 146, 42, 0.18);
  border-radius: 4px;
  color: var(--old-paper);
  font-family: 'Special Elite', cursive;
  line-height: 1.6;
}
.legal-page h1 {
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 28px;
  margin-top: 0;
}
.legal-page h2 {
  font-family: 'Rye', cursive;
  color: var(--gold-light);
  font-size: 18px;
  margin-top: 26px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(200, 146, 42, 0.15);
}
.legal-page h3 {
  font-family: 'Rye', cursive;
  color: var(--gold-light);
  font-size: 14px;
  margin-top: 18px;
}
.legal-page p { font-size: 14px; }
.legal-page ul { padding-left: 22px; font-size: 14px; }
.legal-page li { margin-bottom: 5px; }
.legal-page a {
  color: var(--gold);
  text-decoration: underline;
}
.legal-block {
  background: rgba(0, 0, 0, 0.3);
  border-left: 2px solid var(--gold);
  padding: 12px 16px;
  margin: 12px 0;
}
.legal-footer {
  margin-top: 30px;
  color: var(--smoke);
  font-size: 12px;
  text-align: right;
}

/* ── Profile: Gefahrenzone ─────────────────────────────────────────────── */
.profile-danger-title {
  color: var(--blood-red) !important;
}
.profile-delete-confirm {
  background: rgba(139, 26, 26, 0.08);
  border: 1px solid rgba(139, 26, 26, 0.3);
  border-radius: 4px;
  padding: 16px;
  margin-top: 10px;
}
.profile-delete-confirm p { margin-top: 0; }
.profile-delete-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.btn-flex1 { flex: 1; }

/* ── Modal (generisch, für Home + Admin) ──────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  background: linear-gradient(135deg, #1a0f08, #0d0703);
  border: 1px solid rgba(200, 146, 42, 0.4);
  border-radius: 6px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
}
.modal-content-lg { max-width: 640px; }
/* Kompakter Modal-Container für einfache Confirm-/Mini-Dialoge mit wenig Inhalt. */
.modal-content-sm { max-width: 440px; }
/* Variante von .modal-actions: Buttons nebeneinander statt untereinander.
   Wird vor allem in kleinen Confirm-/Mini-Dialogen genutzt (Abbrechen + OK). */
.modal-actions-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 6px;
}
.modal-actions-row .btn { flex: 1; }
/* Mini-Dialog-Layout: ausreichend Luft zwischen Frage-Text, Eingabefeld und
   Aktions-Buttons. Wird durch eine .mini-dialog-Klasse auf modal-content
   aktiviert, damit andere Modals nicht beeinflusst werden. */
.mini-dialog .modal-body > p { margin-bottom: 16px; line-height: 1.5; }
.mini-dialog .modal-body > .form-group { margin-bottom: 18px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(200, 146, 42, 0.2);
}
.modal-header h2 {
  margin: 0;
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 18px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--smoke);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover { color: var(--gold); }
.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(200, 146, 42, 0.2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.modal-footer .btn { width: auto; }

/* ── Create-Lobby Modal Sub-Styles ────────────────────────────────────── */
.create-lobby-modal .fgrp { margin-bottom: 14px; }
.create-lobby-modal .settings-toggle-row { margin-top: 10px; }
.create-lobby-modal small.text-smoke {
  display: block;
  font-size: 12px;
  margin-top: 2px;
  font-weight: normal;
}

/* ── Player-Name klickbar ───────────────────────────────────────────────── */
.p-name-clickable {
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: underline;
  text-decoration-color: rgba(200, 146, 42, 0.25);
  text-underline-offset: 3px;
}
.p-name-clickable:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* ── Player Profile Modal ───────────────────────────────────────────────── */
.player-profile-modal { max-width: 460px; }
.player-profile-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.player-profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(200, 146, 42, 0.08);
}
.player-profile-row:last-child { border-bottom: none; }
.player-profile-label {
  color: var(--smoke);
  font-family: 'Special Elite', cursive;
}
.player-profile-value {
  color: var(--old-paper);
  font-family: 'Special Elite', cursive;
  text-align: right;
}
.player-profile-banned { color: var(--blood-red); }
.player-profile-banned small { color: rgba(200, 100, 100, 0.7); margin-left: 4px; }
.player-profile-role {
  display: inline-block;
  background: rgba(200, 146, 42, 0.12);
  border: 1px solid rgba(200, 146, 42, 0.3);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 11px;
  color: var(--gold-light);
}
.player-profile-divider {
  border: none;
  border-top: 1px solid rgba(200, 146, 42, 0.15);
  margin: 16px 0 12px;
}
.player-profile-mod {
  background: rgba(139, 26, 26, 0.08);
  border: 1px solid rgba(139, 26, 26, 0.25);
  border-radius: 4px;
  padding: 12px;
}
.player-profile-mod .lbl {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--smoke);
}
.player-profile-mod .inp { margin-bottom: 10px; }
.player-profile-mod-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* btn-ghost-red - rote Variante des Ghost-Buttons */
.btn-ghost-red {
  background: rgba(139, 26, 26, 0.08);
  border: 1px solid rgba(139, 26, 26, 0.4);
  color: rgba(220, 100, 100, 0.9);
  padding: 10px 18px;
  border-radius: 3px;
  cursor: pointer;
  font-family: 'Special Elite', cursive;
  transition: all 0.15s;
}
.btn-ghost-red:hover {
  background: rgba(139, 26, 26, 0.18);
  border-color: rgba(220, 100, 100, 0.6);
}
.btn-ghost-red:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-red {
  background: linear-gradient(135deg, #8b1a1a, #5a0e0e);
  color: #fff;
  border: 1px solid rgba(220, 100, 100, 0.5);
  padding: 10px 18px;
  border-radius: 3px;
  cursor: pointer;
  font-family: 'Rye', cursive;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.btn-red:hover { background: linear-gradient(135deg, #a02020, #6a1010); }
.btn-red:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Letzte-Spiele-Verlauf im Profil ────────────────────────────────────── */
.history-list-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.history-card-compact {
  background: rgba(8, 5, 2, 0.4);
  border: 1px solid rgba(200, 146, 42, 0.15);
  border-left-width: 4px;
  border-radius: 3px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-card-compact.history-outcome-won { border-left-color: rgba(80, 180, 80, 0.7); }
.history-card-compact.history-outcome-lost { border-left-color: rgba(180, 60, 60, 0.7); }
.history-card-compact.history-outcome-draw { border-left-color: rgba(180, 160, 80, 0.55); }

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.history-card-mode {
  font-family: 'Rye', cursive;
  color: var(--gold-light);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.history-card-outcome {
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 2px;
}
.history-outcome-won  .history-card-outcome { background: rgba(80,180,80,.12);  color: #88d088; }
.history-outcome-lost .history-card-outcome { background: rgba(180,60,60,.12);  color: #e88080; }
.history-outcome-draw .history-card-outcome { background: rgba(180,160,80,.12); color: #d8c878; }

.history-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--smoke);
  font-size: 12px;
  font-family: 'Special Elite', cursive;
}
.history-card-meta > span { white-space: nowrap; }
.history-role-impostor { color: #e88080; }
.history-role-crewmate { color: #88d088; }
.history-word-inline {
  font-family: 'Rye', cursive;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.history-card-coplayers {
  font-size: 12px;
  color: rgba(220, 200, 170, 0.65);
  font-family: 'Special Elite', cursive;
}
.history-card-label {
  color: var(--smoke);
  margin-right: 4px;
}

/* Discord-Brand-Akzent für den OAuth-Button */
.btn-discord:hover {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.12);
}
.btn-discord .oauth-icon { color: #5865f2; }

/* ── Verknüpfte Accounts im Profil ──────────────────────────────────────── */
.linked-accounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.linked-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(8, 5, 2, 0.4);
  border: 1px solid rgba(200, 146, 42, 0.15);
  border-radius: 3px;
}
.linked-account-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.linked-account-name {
  font-family: 'Special Elite', cursive;
  color: var(--old-paper);
  font-size: 14px;
}
.linked-account-status {
  font-size: 12px;
  color: #88d088;
  font-family: 'Special Elite', cursive;
}
.linked-account-status-off {
  color: var(--smoke);
}
.linked-account-username {
  color: rgba(220, 200, 170, 0.6);
  font-style: italic;
  margin-left: 4px;
  font-size: 12px;
}

/* Steam-Brand-Akzent für den OAuth-Button (Steam-Blau) */
.btn-steam:hover {
  border-color: #66c0f4;
  background: rgba(102, 192, 244, 0.12);
}
.btn-steam .oauth-icon { color: #66c0f4; }

/* ── E-Mail-Verifikation: Banner im Profil ─────────────────────────────── */
.verify-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.verify-banner-text { line-height: 1.5; }
.verify-banner code {
  background: rgba(0,0,0,.3);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.9em;
}
.alert-warning {
  background: rgba(180, 140, 30, 0.12);
  border: 1px solid rgba(220, 180, 80, 0.4);
  color: #e8c878;
  padding: 12px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 13px;
}
.email-verified {
  color: #88d088;
  margin-left: 6px;
  font-weight: bold;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 3px;
}

/* Genre-Chips (Lobby Musikquiz-Settings) */
.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
  max-height: 140px;
  overflow-y: auto;
}
.genre-chip {
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--bone, #ddd);
  cursor: pointer;
  transition: all 0.12s ease;
  font-family: inherit;
}
.genre-chip:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.32);
}
.genre-chip.selected {
  background: linear-gradient(135deg, #d4620a, #f0a020);
  border-color: #f0a020;
  color: #1a0e05;
  font-weight: 600;
}
.genre-chip-count {
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 400;
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  vertical-align: middle;
}
.genre-chip.selected .genre-chip-count {
  background: rgba(0,0,0,0.18);
}

/* ════════════════════════════════════════════════════════════════════
   MUSIKQUIZ – Spielbildschirm
   ════════════════════════════════════════════════════════════════════ */

.mq-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mq-question {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 14px;
}

/* Mystery-Cover (großes Fragezeichen-Quadrat) */
.mq-cover-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.mq-mystery-cover {
  position: relative;
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, #2a1d0e 0%, #3a2614 50%, #2a1d0e 100%);
  border: 2px solid rgba(212, 146, 42, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5),
              inset 0 0 30px rgba(0,0,0,0.4);
}

.mq-mystery-cover.playing {
  animation: mq-cover-pulse 2.4s ease-in-out infinite;
}

@keyframes mq-cover-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,0,0,0.4), 0 0 0 0 rgba(212, 146, 42, 0); }
  50%      { box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,0,0,0.4), 0 0 24px 6px rgba(212, 146, 42, 0.25); }
}

.mq-question-mark {
  font-size: 78px;
  font-weight: 900;
  color: rgba(212, 146, 42, 0.85);
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  font-family: Georgia, serif;
  user-select: none;
}

/* Equalizer-Bars: 5 vertikale Bars die hoch/runter pulsieren */
.mq-equalizer {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 22px;
}
.mq-equalizer span {
  display: block;
  width: 4px;
  background: linear-gradient(180deg, #f0a020 0%, #d4620a 100%);
  border-radius: 2px;
  animation: mq-eq 0.9s ease-in-out infinite;
}
.mq-equalizer span:nth-child(1) { animation-delay: 0.0s;  height: 8px; }
.mq-equalizer span:nth-child(2) { animation-delay: 0.15s; height: 14px; }
.mq-equalizer span:nth-child(3) { animation-delay: 0.3s;  height: 18px; }
.mq-equalizer span:nth-child(4) { animation-delay: 0.45s; height: 14px; }
.mq-equalizer span:nth-child(5) { animation-delay: 0.6s;  height: 8px; }

@keyframes mq-eq {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1.0); }
}

.mq-play-btn {
  font-size: 14px;
  padding: 10px 22px;
}
.mq-blocked-hint {
  font-size: 12px;
  color: var(--smoke);
  text-align: center;
}

/* 4 Antwort-Optionen im 2x2 Grid */
.mq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.mq-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: var(--bone, #ddd);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  transition: all 0.15s ease;
  min-height: 56px;
}
.mq-option:hover:not(:disabled) {
  background: rgba(212, 146, 42, 0.10);
  border-color: rgba(212, 146, 42, 0.4);
  transform: translateY(-1px);
}
.mq-option:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.mq-option.selected {
  background: linear-gradient(135deg, rgba(212, 98, 10, 0.25), rgba(240, 160, 32, 0.18));
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 146, 42, 0.25);
}
.mq-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(212, 146, 42, 0.25);
  border: 1px solid rgba(212, 146, 42, 0.5);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.mq-option.selected .mq-option-letter {
  background: var(--gold);
  color: #1a0e05;
}
.mq-option-text {
  flex: 1;
  word-break: break-word;
}

.mq-answered-msg {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(76, 175, 80, 0.12);
  border-left: 3px solid #4caf50;
  border-radius: 4px;
  color: #a8d8aa;
  font-size: 13px;
  text-align: center;
}

/* Mobile: Antwort-Optionen einspaltig stapeln */
@media (max-width: 540px) {
  .mq-options { grid-template-columns: 1fr; }
  .mq-mystery-cover { width: 130px; height: 130px; }
  .mq-question-mark { font-size: 62px; }
}

/* Musikquiz-Lautstärkeregler (in der Spieloberfläche) */
.mq-volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin-top: 4px;
}
.mq-volume-icon {
  font-size: 14px;
  user-select: none;
  width: 18px;
  text-align: center;
}
.mq-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.mq-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid rgba(8, 5, 2, 0.8);
  cursor: pointer;
}
.mq-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 1px solid rgba(8, 5, 2, 0.8);
  cursor: pointer;
  border: 0;
}
.mq-volume-value {
  font-size: 12px;
  color: var(--smoke);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
  text-align: right;
}

/* Apple-Music-Deep-Link im Musikquiz-Break + Podium */
.apple-music-link {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--smoke);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  transition: all 0.15s ease;
}
.apple-music-link:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(212,98,10,0.08);
}
.apple-music-link-inline {
  margin-left: 6px;
  font-size: 12px;
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.12s ease;
}
.apple-music-link-inline:hover {
  opacity: 1;
}

/* Klickbare Settings-Werte (z.B. "13 Kategorien ›") */
.settings-value-link {
  color: var(--gold-light);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: right;
  text-decoration: underline dotted rgba(212,98,10,0.4);
  text-underline-offset: 3px;
  transition: color 0.12s ease;
}
.settings-value-link:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* Modal für Kategorie-Filter-Übersicht (kleines Popup) */
.category-filter-modal {
  max-width: 420px;
  width: 90%;
  margin: 0 auto;
  padding: 0;
}
.category-filter-modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 18px 20px;
}

/* ── Ausklappbare Filter-Gruppen (details/summary) ───────────────────────── */
/* Wird im CreateModal (Home) und EditModal (LobbyPage) für Kategorie- und
   Sprach-Filter verwendet. Open-Zustand wird in Razor per `open="@..."` gesetzt:
   gibt es bereits Auswahl → aufgeklappt, sonst eingeklappt. */
.filter-collapsible {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 4px;
  background: rgba(0,0,0,.12);
  padding: 0;
}
.filter-collapsible > .filter-collapsible-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  transition: background 0.15s ease;
  border-radius: 4px;
}
.filter-collapsible > .filter-collapsible-summary::-webkit-details-marker {
  display: none;  /* Default-Dreieck unterdrücken */
}
.filter-collapsible > .filter-collapsible-summary:hover {
  background: rgba(255,255,255,.03);
}
/* Eigenes Dreieck per Pseudoelement – rotiert im open-Zustand */
.filter-collapsible > .filter-collapsible-summary::before {
  content: '▸';
  font-size: 10px;
  color: var(--smoke, #a89784);
  transition: transform 0.2s ease;
  display: inline-block;
  margin-right: 4px;
}
.filter-collapsible[open] > .filter-collapsible-summary::before {
  transform: rotate(90deg);
}
.filter-collapsible-label {
  flex: 1;
  margin: 0;
}
.filter-collapsible-hint {
  font-size: 11px;
  color: var(--smoke, #a89784);
  font-style: italic;
  letter-spacing: .04em;
  white-space: nowrap;
}
/* Innenraum wenn aufgeklappt — etwas Abstand nach unten + Padding wie ein normales fgrp */
.filter-collapsible[open] > .genre-chips,
.filter-collapsible[open] > small {
  margin-left: 14px;
  margin-right: 14px;
}
.filter-collapsible[open] > small {
  display: block;
  margin-top: 6px;
  margin-bottom: 12px;
}

/* ── Musikquiz: Abstimmungsverzögerung ───────────────────────────────────── */
/* Antwort-Buttons werden in den ersten N Sekunden disabled (siehe MusicQuizPlaying).
   Wir zeigen die gewohnte „disabled"-Optik plus einen subtilen Hinweis darunter. */
.mq-options-locked {
  position: relative;
}
.mq-options-locked .mq-option {
  filter: blur(0.3px);
}
.mq-lock-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--smoke, #a89784);
  font-family: 'Special Elite', cursive;
  letter-spacing: .04em;
  padding: 6px;
  background: rgba(0,0,0,.2);
  border-radius: 2px;
}
.mq-lock-hint strong {
  color: var(--gold, #d4920a);
}

/* ── Filter-Chips: Stale-Zustand für Cross-Filter-Counts ─────────────────── */
/* Wenn eine Kategorie/Sprache durch die andere Achse aktuell auf 0 Tracks
   geschrumpft ist (z.B. „Schlager" + „🇬🇧 Englisch"), bleibt der Chip
   sichtbar – grau und disabled, damit der User die Konstellation versteht
   statt verwirrt zu sein wo die Option hin ist. */
.genre-chip.stale {
  opacity: 0.4;
  color: var(--smoke, #a89784);
  border-color: rgba(168,151,132,.15);
  pointer-events: auto;  /* Klick erlaubt, damit man die Auswahl wieder aufheben kann */
}
.genre-chip.stale .genre-chip-count {
  color: rgba(168,151,132,.5);
}
/* Stale UND selected: durchgestrichener Text – der gewählte Filter trägt aktuell nichts bei */
.genre-chip.stale.selected {
  text-decoration: line-through;
  text-decoration-color: rgba(212,98,10,.5);
  text-decoration-thickness: 1px;
}

/* Gesamt-Total-Hinweis unter den Filter-Sektionen */
.filter-total-hint {
  margin: 12px 0 4px;
  padding: 8px 12px;
  font-size: 13px;
  text-align: center;
  font-family: 'Special Elite', cursive;
  letter-spacing: .04em;
  color: var(--smoke, #a89784);
  background: rgba(0,0,0,.15);
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,.04);
}
.filter-total-hint strong {
  color: var(--gold, #d4920a);
}
.filter-total-hint-empty {
  color: #d97a5a;
  background: rgba(217,122,90,.08);
  border-color: rgba(217,122,90,.25);
}

/* ── Read-only Ja/Nein-Symbole in der Lobby-Settings-Box ─────────────────── */
/* Vorher als Text "Ja"/"Nein" - bricht bei knappem Platz um. Jetzt kompakte
   Symbole, die in jede Zeile passen. */
.settings-value-icon-yes {
  color: #5c5;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
}
.settings-value-icon-no {
  color: #d97a5a;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
}

/* Filter-Total-Hinweis: dritte Stufe für "Filter ergibt > 0 Tracks, aber weniger
   als die WordCount-Setting verlangt". Orange als Warnung zwischen "alles ok"
   (smoke) und "0 Tracks" (rot). */
.filter-total-hint-warn {
  color: var(--amber, #e8a040);
  background: rgba(232,160,64,.08);
  border-color: rgba(232,160,64,.25);
}

/* Klickbarer Spielmodus-Text in der Read-only-Settings-Box: öffnet das
   Spielregeln-Modal mit GameRulesContent. Sieht wie ein normales settings-value
   aus, hat aber Button-Reset + dezentes ⓘ-Icon damit klar wird dass es klickbar ist. */
.settings-value-link-mode {
  color: var(--gold-light);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: right;
  transition: color 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.settings-value-link-mode:hover {
  color: var(--gold);
}
.settings-value-info-icon {
  font-size: 11px;
  color: var(--smoke, #a89784);
  opacity: 0.7;
  transition: opacity 0.12s ease;
}
.settings-value-link-mode:hover .settings-value-info-icon {
  opacity: 1;
  color: var(--gold);
}

/* Spielmodus-Pill im Spielverlauf-Session-Header */
.history-session-mode-pill {
  font-family: 'Special Elite', cursive;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--amber, #e8a040);
  background: rgba(232,160,64,.10);
  border: 1px solid rgba(232,160,64,.25);
  padding: 2px 8px;
  border-radius: 2px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Apple-Music-Link inline in der Track-Zeile (Spielverlauf, Musikquiz) */
.history-apple-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  font-size: 13px;
  text-decoration: none;
  color: var(--gold, #d4920a);
  background: rgba(200,146,42,.10);
  border: 1px solid rgba(200,146,42,.25);
  border-radius: 2px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  vertical-align: middle;
}
.history-apple-link:hover {
  background: rgba(200,146,42,.25);
  border-color: rgba(200,146,42,.55);
  color: var(--gold-light);
  text-decoration: none;
}

/* ── History: Session-Scoreboard (oberhalb der Track-/Wort-Liste) ────────── */
/* Wird im Verlaufs-Modal angezeigt wenn eine Session aufgeklappt ist – zeigt
   den Endstand wie am Spielende, kompakter und im Verlaufs-Stil. */
.history-scoreboard {
  margin: 8px 0 14px;
  padding: 10px 14px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(200,146,42,.18);
  border-radius: 2px;
}
.history-scoreboard-label {
  font-family: 'Rye', cursive;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--gold, #d4920a);
  margin-bottom: 8px;
}
.history-scoreboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  border-bottom: 1px dotted rgba(200,146,42,.08);
}
.history-scoreboard-row:last-child {
  border-bottom: none;
}
.history-scoreboard-medal {
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  color: var(--smoke, #a89784);
}
.history-scoreboard-name {
  flex: 1;
  color: var(--old-paper, #d6c6a8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-scoreboard-pts {
  font-weight: bold;
  color: var(--gold, #d4920a);
  flex-shrink: 0;
}
.history-scoreboard-row.is-me {
  background: rgba(200,146,42,.06);
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 2px;
}
.history-scoreboard-row.is-me .history-scoreboard-name {
  color: var(--gold-light, #f0a020);
}

/* ══ Inhalts-Meldungen (Mod-Sprint Schritt 1) ═════════════════════════════
   Styles für ReportContentModal (Shared/ReportContentModal.razor) und den
   🚩-Button in den Spielmodi. Wiederverwendete generische Modal-Klassen
   (modal-backdrop, modal-content, fgrp, lbl, inp). */

/* 🚩-Button im Spiel — nur Symbol, sehr klein und dezent.
   Bewusst kein Label, damit der Button in engen Kopfzeilen nicht umbricht.
   Hover zeigt einen leichten roten Schimmer, damit der Zweck klar wird. */
.report-flag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(168, 151, 132, 0.35);
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
  flex-shrink: 0;
}
.report-flag-btn:hover {
  border-color: rgba(192, 53, 42, 0.35);
  color: rgba(192, 53, 42, 0.7);
  background: rgba(139, 26, 26, 0.08);
}
.report-flag-btn.reported {
  color: var(--green-ok);
  border-color: transparent;
  cursor: default;
  background: transparent;
}
.report-flag-btn:disabled {
  cursor: default;
}

/* Ziel-Anzeige oben im Melde-Modal — kompakte Info-Box mit dem was gemeldet wird */
.report-target-box {
  background: rgba(8, 5, 2, 0.5);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 2px;
  margin-bottom: 14px;
}
.report-target-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 4px;
}
.report-target-name {
  font-family: 'Rye', cursive;
  font-size: 16px;
  color: var(--gold-light);
}
.report-target-meta {
  font-size: 12px;
  color: var(--smoke);
  margin-top: 3px;
}

/* Reason-Auswahl als Liste statt klassischer Radio-Buttons.
   Klick auf die ganze Zeile selektiert — größere Trefferfläche, besser auf Touch. */
.report-reason-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.report-reason-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(8, 5, 2, 0.4);
  border: 1px solid rgba(200, 146, 42, 0.18);
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  color: var(--old-paper);
  transition: all .12s;
}
.report-reason-row:hover {
  border-color: rgba(200, 146, 42, 0.4);
  background: rgba(200, 146, 42, 0.04);
}
.report-reason-row.checked {
  border-color: rgba(200, 146, 42, 0.55);
  background: rgba(200, 146, 42, 0.1);
  color: var(--gold-light);
}
.report-reason-row input[type="radio"] {
  accent-color: var(--gold);
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════════════
   MATCHMAKING — Startseiten-Aktions-Buttons + „Lobby beitreten"-Modal
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Startseite: zwei Aktions-Buttons statt der bisherigen zwei Karten ───── */
.home-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: 'Rye', cursive;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 18px 14px;
  border-radius: 5px;
  transition: all .2s;
}
.home-action-btn .ha-icon { font-size: 30px; line-height: 1; }
.home-action-btn .ha-label { font-size: 15px; }
.home-action-btn .ha-sub {
  font-family: 'Special Elite', cursive;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  opacity: .8;
}
.home-action-btn.primary {
  background: linear-gradient(135deg, var(--amber), var(--gold));
  color: var(--shadow);
  border: none;
  box-shadow: 0 4px 22px rgba(212, 98, 10, .38);
}
.home-action-btn.primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 30px rgba(212, 98, 10, .55);
}
.home-action-btn.secondary {
  background: transparent;
  border: 1px solid rgba(200, 146, 42, .32);
  color: var(--old-paper);
}
.home-action-btn.secondary:not(:disabled):hover {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(200, 146, 42, .05);
}
.home-action-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Matchmaking-Modal: Code-Feld im Header ─────────────────────────────── */
.matchmaking-modal { max-width: 560px; }
.mm-header-code {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mm-header-code .inp-code {
  width: 108px;
  background: rgba(8, 5, 2, .9);
  border: 1px solid rgba(200, 146, 42, .4);
  color: var(--gold-light);
  font-family: 'Rye', cursive;
  letter-spacing: .18em;
  text-align: center;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 3px;
  text-transform: uppercase;
}
.mm-header-code .inp-code::placeholder {
  color: var(--smoke);
  letter-spacing: .1em;
  font-size: 12px;
}
.mm-header-code .mm-code-go {
  font-family: 'Rye', cursive;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  color: var(--shadow);
  border: none;
  padding: 7px 12px;
  border-radius: 3px;
}
.mm-header-code .mm-code-go:disabled { opacity: .4; cursor: not-allowed; }
/* Auf schmalen Screens bricht das Code-Feld unter den Titel um. */
@media (max-width: 520px) {
  .matchmaking-modal .modal-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .mm-header-code { width: 100%; }
  .mm-header-code .inp-code { flex: 1; width: auto; }
}

.mm-subhead {
  font-size: 11px;
  color: var(--smoke);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

/* ── Filter-Chips ───────────────────────────────────────────────────────── */
.mm-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.mm-chip {
  font-family: 'Special Elite', cursive;
  font-size: 12px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid rgba(168, 151, 132, .3);
  background: rgba(8, 5, 2, .5);
  color: var(--smoke);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mm-chip:hover { border-color: rgba(200, 146, 42, .4); color: var(--gold-light); }
.mm-chip.active {
  border-color: var(--gold);
  background: rgba(200, 146, 42, .12);
  color: var(--gold-light);
}
.mm-chip .mm-chip-count { font-size: 10px; opacity: .7; }

/* ── Toolbar (Trefferzahl + Refresh) ────────────────────────────────────── */
.mm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.mm-count { font-size: 12px; color: var(--smoke); }
.mm-refresh {
  font-family: 'Special Elite', cursive;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid rgba(200, 146, 42, .32);
  background: rgba(8, 5, 2, .5);
  color: var(--old-paper);
}
.mm-refresh:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-light); }
.mm-refresh:disabled { opacity: .4; cursor: not-allowed; }

/* ── Lobby-Eintrag (flache Liste) ───────────────────────────────────────── */
.mm-lobby {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--mid-wood);
  border: 1px solid rgba(200, 146, 42, .16);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.mm-lobby:last-child { margin-bottom: 0; }
.mm-lobby-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.mm-lobby-main { flex: 1; min-width: 0; }
.mm-lobby-host { color: var(--parchment); font-size: 14px; }
.mm-lobby-host .mm-host-name { color: var(--gold-light); }
.mm-lobby-meta {
  font-size: 11px;
  color: var(--smoke);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.mm-mode-tag { color: var(--gold-light); letter-spacing: .04em; }
.mm-players { color: var(--old-paper); }
.mm-join-btn {
  font-family: 'Rye', cursive;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  color: var(--shadow);
  border: none;
  padding: 8px 16px;
  border-radius: 3px;
}
.mm-join-btn:hover { transform: translateY(-1px); }

/* ── Leerzustand ────────────────────────────────────────────────────────── */
.mm-empty {
  text-align: center;
  color: var(--smoke);
  font-size: 13px;
  padding: 34px 12px;
  line-height: 1.6;
}
.mm-empty .mm-empty-icon {
  font-size: 34px;
  display: block;
  margin-bottom: 8px;
  opacity: .6;
}

/* ── Paging ─────────────────────────────────────────────────────────────── */
.mm-paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(200, 146, 42, .14);
}
.mm-page-btn {
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 2px;
  border: 1px solid rgba(200, 146, 42, .32);
  background: rgba(8, 5, 2, .5);
  color: var(--old-paper);
}
.mm-page-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-light); }
.mm-page-btn:disabled { opacity: .3; cursor: not-allowed; }
.mm-page-info { font-size: 12px; color: var(--smoke); }

/* ══════════════════════════════════════════════════════════════════════════
   MODUS-PILL MIT DROPDOWN — im Header von MatchmakingDialog und Create-Modal
   ══════════════════════════════════════════════════════════════════════════ */
.mode-pill-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(200, 146, 42, .15);
  border: 1px solid rgba(200, 146, 42, .4);
  border-radius: 14px;
  font-family: 'Special Elite', cursive;
  font-size: 13px;
  color: var(--gold-light);
  position: relative;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  user-select: none;
  margin-left: 8px;
}
.mode-pill-header:hover {
  background: rgba(200, 146, 42, .25);
  border-color: var(--gold);
}
.mode-pill-header.open {
  background: rgba(200, 146, 42, .3);
  border-color: var(--gold);
}
.mode-pill-header .caret {
  color: var(--smoke);
  font-size: 10px;
  margin-left: 2px;
}
.mode-switch-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--mid-wood);
  border: 1px solid rgba(200, 146, 42, .5);
  border-radius: 6px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  z-index: 100;
  min-width: 180px;
  text-transform: none;
  letter-spacing: 0;
}
.mode-switch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--parchment);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Special Elite', cursive;
}
.mode-switch-item:hover {
  background: rgba(200, 146, 42, .15);
  color: var(--gold-light);
}
.mode-switch-icon { font-size: 18px; line-height: 1; }

/* ══════════════════════════════════════════════════════════════════════════
   MATCHMAKING — ACTION-CARDS (Schnellstart + Neue Lobby) und Live-Liste
   ══════════════════════════════════════════════════════════════════════════ */
.mm-action-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.mm-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(200, 146, 42, .3);
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  font-family: 'Special Elite', cursive;
  color: var(--parchment);
  transition: all .15s;
}
.mm-action-card:not(:disabled):hover {
  border-color: var(--gold);
  background: rgba(200, 146, 42, .08);
  transform: translateY(-1px);
}
.mm-action-card:disabled { opacity: .5; cursor: not-allowed; }
.mm-action-quickstart {
  background: linear-gradient(135deg, rgba(212, 98, 10, .22), rgba(212, 98, 10, .05));
  border-color: rgba(212, 98, 10, .55);
}
.mm-action-quickstart:not(:disabled):hover {
  background: linear-gradient(135deg, rgba(212, 98, 10, .32), rgba(212, 98, 10, .1));
  border-color: var(--amber);
}
.mm-action-create {
  background: linear-gradient(135deg, rgba(200, 146, 42, .18), rgba(200, 146, 42, .05));
  border-color: rgba(200, 146, 42, .5);
}
.mm-action-create:not(:disabled):hover {
  background: linear-gradient(135deg, rgba(200, 146, 42, .28), rgba(200, 146, 42, .1));
  border-color: var(--gold);
}
.mm-action-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.mm-action-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-action-title {
  color: var(--gold-light);
  font-family: 'Rye', cursive;
  font-size: 15px;
}
.mm-action-sub { color: var(--smoke); font-size: 12px; }
@media (max-width: 540px) {
  .mm-action-cards { grid-template-columns: 1fr; }
}

.mm-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mm-subhead {
  font-family: 'Rye', cursive;
  color: var(--gold);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0;
}
.mm-live-hint {
  font-size: 11px;
  color: var(--smoke);
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════════════
   HEADER — Code-Direktbeitritt im Slot rechts vom Brand
   (sichtbar wenn nicht in Lobby + nicht im Spiel; sonst steht dort die
   .nav-lobby-pill bzw. nichts). Visuell als kompakte Pill gestaltet —
   gleiche Höhe und Stil-Sprache wie .nav-lobby-pill, damit der Slot
   konsistent wirkt egal welcher Inhalt drin steht.
   ══════════════════════════════════════════════════════════════════════════ */
.header-code-form {
  display: inline-flex;
  align-items: stretch;            /* Icon/Input/Button alle gleich hoch */
  gap: 0;
  margin-left: 14px;               /* analog .nav-lobby-pill */
  margin-right: auto;              /* drückt .app-header-actions ans rechte Ende */
  background: rgba(8, 5, 2, .55);
  border: 1px solid rgba(200, 146, 42, .35);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.header-code-form:hover { border-color: rgba(200, 146, 42, .55); }
.header-code-form:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(200, 146, 42, .18);
  background: rgba(8, 5, 2, .75);
}
.header-code-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px 0 10px;
  font-size: 14px;
  line-height: 1;
  color: var(--smoke);
  user-select: none;
}
.header-code-input {
  background: transparent;
  border: none;
  color: var(--parchment);
  padding: 6px 10px 6px 4px;
  width: 92px;
  text-align: center;
  text-transform: uppercase;
  font-family: 'Special Elite', cursive;
  letter-spacing: 2px;
  font-size: 13px;
  line-height: 1;
}
.header-code-input::placeholder {
  color: rgba(168, 151, 132, .55);
  letter-spacing: 1px;
  text-transform: none;
}
.header-code-input:focus { outline: none; }
.header-code-go {
  background: linear-gradient(135deg, var(--amber), var(--gold));
  color: var(--ink);
  border: none;
  padding: 0 12px;
  cursor: pointer;
  font-family: 'Special Elite', cursive;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  transition: filter .15s;
}
.header-code-go:hover:not(:disabled) { filter: brightness(1.12); }
.header-code-go:disabled {
  background: rgba(200, 146, 42, .12);
  color: rgba(168, 151, 132, .5);
  cursor: not-allowed;
}

/* Mobile: Icon-Padding kompakter, Input schmaler. Brand-Titel ist über
   .app-header-title Media-Query bereits ausgeblendet. */
@media (max-width: 540px) {
  .header-code-form { margin-left: 10px; }
  .header-code-icon { padding: 0 4px 0 8px; font-size: 13px; }
  .header-code-input { width: 78px; padding: 6px 8px 6px 4px; }
  .header-code-go { padding: 0 10px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   KONFIG-MODAL KOMPAKT — einzeilige Slider-Zeilen
   ══════════════════════════════════════════════════════════════════════════ */

/* Ersetzt die zweizeilige .fgrp für Slider-Einstellungen: Label fix links,
   Slider füllt die Mitte, aktueller Wert rechts — alles in einer Zeile. */
.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}
.slider-row .sr-label {
  flex: 0 0 128px;
  color: var(--smoke);
  font-size: 13px;
  /* gleiche Typografie wie .lbl in den übrigen Konfig-Zeilen */
  letter-spacing: .16em;
  text-transform: uppercase;
}
.slider-row .slider { flex: 1; }
.slider-row .sr-value {
  flex: 0 0 auto;
  min-width: 48px;
  text-align: right;
  color: var(--gold);
  font-size: 14px;
  font-weight: bold;
}
/* Auf sehr schmalen Screens bricht die Zeile um: Label oben, Slider+Wert darunter. */
@media (max-width: 420px) {
  .slider-row {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .slider-row .sr-label { flex-basis: 100%; }
  .slider-row .sr-value { min-width: 40px; }
}

/* ── Hilfe-Modal (Lobby-Sichtbarkeit) ───────────────────────────────────── */
.help-modal { max-width: 420px; }
.help-modal-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--old-paper);
}
.help-modal-body p { margin: 0 0 10px; }
.help-modal-body p:last-child { margin-bottom: 0; }
.help-modal-body strong { color: var(--gold-light); }

/* Variante für eine Toggle-Zeile: Label + Help-Icon nebeneinander, ohne den
   margin-bottom der Block-Variante .lbl-with-help. */
.lbl-with-help-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
/* line-height:1 sorgt dafür, dass das „?"-Glyph in seiner eigenen Box mittig
   sitzt; align-items:center des Containers zentriert die Box zur Textzeile.
   Kein padding-Hack nötig, sobald das Label korrekt normalisiert ist. */
.lbl-with-help-inline .help-icon-btn {
  line-height: 1;
}

/* ── Sichtbarkeits-Badge in der Lobby-Kopfzeile ─────────────────────────── */
.visibility-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(200, 146, 42, .3);
  background: rgba(8, 5, 2, .5);
  color: var(--smoke);
  cursor: default;
  flex-shrink: 0;
}
.visibility-badge.is-public {
  color: var(--green-ok);
  border-color: rgba(45, 122, 74, .45);
}

/* ── Sichtbarkeits-Icon in der Nav-Lobby-Pill ───────────────────────────── */
.nav-lobby-pill-vis {
  font-size: 12px;
  opacity: .85;
  flex-shrink: 0;
}

/* ── Einstellungs-Zeile mit Pill-Gruppe (Label links, Pills rechts) ──────────
   Analog zu .settings-toggle-row, aber statt eines einzelnen Toggle-Buttons
   steht rechts eine Pill-Gruppe (z.B. Antwortverzögerung: Aus / 2 s / 3 s).
   Auf schmalen Screens bricht die Pill-Gruppe unter das Label um. */
.settings-pills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
}
.settings-pills-row > .lbl {
  flex: 1;
  min-width: 0;
  /* .lbl bringt display:block + margin-bottom:7px mit — beides würde das
     Label in der Flex-Zeile aus der vertikalen Mitte schieben. Hier
     zurücksetzen und auf die kompakte 13px-Größe der Slider-Zeilen angleichen. */
  display: flex;
  align-items: center;
  margin-bottom: 0;
  font-size: 13px;
}
.settings-pills-row .quiz-mode-pills {
  flex-shrink: 0;
  margin: 0;
  /* Pills bleiben einzeilig — der Umbruch auf schmalen Screens passiert
     auf Zeilenebene (.settings-pills-row), nicht innerhalb der Pill-Gruppe. */
  flex-wrap: nowrap;
}
@media (max-width: 460px) {
  .settings-pills-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .settings-pills-row > .lbl { flex-basis: 100%; }
}

/* ── TrackDetailModal (Shared, readonly) ─────────────────────────────────────
   Eigene tdm-Klassen statt der track-detail-* aus admin.css, weil admin.css
   außerhalb des Admin-Bereichs (Game/Lobby/Profil) nicht geladen wird. */
.tdm-modal {
  max-width: 480px;
  width: 92%;
  margin: 0 auto;
  background: var(--dark-wood);
  border: 1px solid rgba(200, 146, 42, .35);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
.tdm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--mid-wood);
  border-bottom: 1px solid rgba(200, 146, 42, .2);
}
.tdm-head-title { font-size: 15px; color: var(--gold-light); }
.tdm-close {
  background: none; border: none; cursor: pointer;
  color: var(--smoke); font-size: 16px; line-height: 1;
}
.tdm-body { padding: 18px 16px; }
.tdm-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(200, 146, 42, .15);
}
.tdm-cover {
  width: 104px; height: 104px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(200, 146, 42, .25);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .5);
}
.tdm-cover-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: radial-gradient(circle at 35% 30%, var(--warm-wood), var(--ink));
}
.tdm-hero-text { flex: 1; min-width: 0; }
.tdm-artist {
  font-size: 18px; color: var(--gold-light);
  overflow-wrap: anywhere;
}
.tdm-title {
  font-size: 15px; color: var(--parchment);
  margin-top: 2px; overflow-wrap: anywhere;
}
.tdm-album {
  font-size: 12px; color: var(--smoke); font-style: italic;
  margin-top: 6px; overflow-wrap: anywhere;
}
.tdm-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 13px;
}
.tdm-label {
  color: var(--smoke);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 11px;
  align-self: center;
}
.tdm-value { color: var(--parchment); }
.tdm-pill {
  display: inline-block;
  background: var(--mid-wood);
  border: 1px solid rgba(200, 146, 42, .3);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--gold-light);
}
.tdm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tdm-btn {
  flex: 1;
  min-width: 150px;
  text-align: center;
  text-decoration: none;
}
.tdm-btn-star-on {
  background: rgba(200, 146, 42, .16);
  border-color: var(--gold);
  color: var(--gold-light);
}
.tdm-btn-flag { border-color: rgba(192, 53, 42, .5); color: #e0998f; }

/* „Bereits gemeldet"-Zustand — gilt für Track- und Spieler-Melde-Buttons.
   Der Button ist ohnehin disabled (.btn:disabled dimmt bereits); diese Klasse
   gibt ihm zusätzlich einen ruhigen grünen Erledigt-Akzent, damit er nach
   „bestätigt erledigt" aussieht statt nach „kaputt/deaktiviert".
   !important, weil .btn:disabled-Dimmung sonst die Randfarbe schluckt. */
.tdm-btn-reported,
.btn-reported {
  border-color: rgba(45, 122, 74, .55) !important;
  color: var(--green-ok) !important;
}

/* Klickbare Track-Zeilen (Podium, Lobby-Verlauf, Profil) — öffnen das TrackDetailModal. */
.track-clickable { cursor: pointer; }
.track-clickable:hover { color: var(--gold-light); }

/* ── Profil: Favoriten-Section ───────────────────────────────────────────── */
.profile-fav-count { font-size: 12px; color: var(--smoke); font-weight: normal; }
.profile-fav-list { display: flex; flex-direction: column; }
.profile-fav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(200, 146, 42, .12);
}
.profile-fav-row:last-child { border-bottom: none; }
.profile-fav-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.profile-fav-cover {
  width: 38px; height: 38px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}
.profile-fav-cover-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: radial-gradient(circle at 35% 30%, var(--warm-wood), var(--ink));
}
.profile-fav-text { flex: 1; min-width: 0; }
.profile-fav-artist {
  font-size: 13px; color: var(--gold-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-fav-title {
  font-size: 12px; color: var(--smoke);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-fav-remove {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1px solid rgba(192, 53, 42, .4);
  background: var(--mid-wood);
  color: var(--parchment);
  cursor: pointer;
  font-size: 13px;
}
.profile-fav-paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(200, 146, 42, .12);
}
.profile-fav-page-info { font-size: 12px; color: var(--smoke); letter-spacing: .04em; }

/* ── Profil: „Letzte Spiele"-Button (öffnet das History-Modal) ───────────── */
.profile-history-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.profile-history-btn-count { font-size: 12px; color: var(--smoke); }
