/* ==========================================================
   Hitster – Mobile-first CSS (Etappe 5)
   ========================================================== */

:root {
  --bg: #0f172a;
  --bg-raised: #1e293b;
  --bg-input: #0b1222;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --accent: #a5a8ff;
  --accent-strong: #6366f1;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  overflow: hidden;           /* ingame soll nicht scrollen */
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
body {
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.app-header-left {
  display: flex; align-items: center; gap: 0.55rem;
  flex: 1;
  min-width: 0;
}
.app-header-right {
  display: flex; align-items: center; gap: 0.4rem;
  flex: none;
}
.app-header .logo { font-size: 1.3rem; }
.app-header h1 {
  font-size: 1.1rem; margin: 0; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.role-pill {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 999px;
  background: rgba(148, 163, 184, 0.15); color: var(--text-dim);
  letter-spacing: 0.04em;
}
.role-pill.host { background: rgba(99, 102, 241, 0.2); color: var(--accent); }

/* ---------- Ingame-Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.topbar-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}
.topbar-pill:active { transform: scale(0.97); }
.topbar-title {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-icon {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  color: var(--text); font-size: 1.25rem; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  flex: none;
}

/* ---------- Container / Screens ---------- */
.container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* Dezente Scrollbar, dark-theme-tauglich */
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
.container::-webkit-scrollbar { width: 8px; }
.container::-webkit-scrollbar-track { background: transparent; }
.container::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.container::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
  background-clip: content-box;
}

/* Gleiche Scrollbar-Optik in Sheets */
.sheet {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
.sheet::-webkit-scrollbar { width: 8px; }
.sheet::-webkit-scrollbar-track { background: transparent; }
.sheet::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.screen {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.screen.hidden { display: none; }

/* Prepare-Screen für Nicht-Host: Inhalte sichtbar aber sichtbar inaktiv,
 * damit Mitspieler erkennen "der Host bereitet vor, ich kann hier nichts tun".
 * Die Spielstart-/Back-Buttons werden in der JS-Logik ohnehin schon ausgeblendet,
 * Settings/Playlist-Auswahl werden hier zusätzlich entsättigt.
 */
.screen#prepare-screen.prepare-readonly {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.4);
}
.screen#prepare-screen.prepare-readonly .screen-header-row,
.screen#prepare-screen.prepare-readonly .prepare-readonly-banner {
  /* Header und ein optionales Hinweis-Banner sollen normal sichtbar bleiben */
  opacity: 1;
  filter: none;
}
.prepare-readonly-banner {
  background: var(--card-bg, rgba(255,255,255,0.05));
  border: 1px solid var(--border, rgba(255,255,255,0.15));
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-dim, rgba(255,255,255,0.7));
}

/* Ingame füllt den Hauptbereich und scrollt NICHT */
.screen.ingame {
  justify-content: center;
}

.screen-header { text-align: center; margin-bottom: 0.25rem; }
.screen-header h2 { margin: 0 0 0.25rem 0; font-size: 1.2rem; }
.screen-header-row {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.screen-header-row h2 { margin: 0; font-size: 1.1rem; flex: 1; }

/* ---------- Status & Alerts ---------- */
.status-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-dim);
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-dim); flex: none; }
.status-dot.ok  { background: var(--ok); }
.status-dot.warn{ background: var(--warn); }
.status-dot.err { background: var(--err); }

.alert { padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.9rem; }
.alert-err  { background: rgba(239, 68, 68, 0.12); color: var(--err); border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-info { background: rgba(99, 102, 241, 0.1); color: var(--accent); border: 1px solid rgba(99, 102, 241, 0.3); }
.lock-hint {
  background: rgba(245, 158, 11, 0.1); color: var(--warn);
  border: 1px solid rgba(245, 158, 11, 0.3); border-radius: 8px;
  padding: 0.6rem 0.8rem; font-size: 0.85rem; margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.lock-hint .icon { font-size: 1rem; }

/* ---------- Card ---------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.card h2 { margin: 0 0 0.75rem 0; font-size: 1.1rem; }
.card h3 { margin: 0 0 0.6rem 0; font-size: 0.95rem; font-weight: 600; color: var(--accent); }
.card h4 { margin: 0 0 0.5rem 0; font-size: 0.9rem; font-weight: 600; color: var(--accent); }

/* ---------- Forms ---------- */
.form-row { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.8rem; }
.form-row label { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
input[type="text"], input[type="password"], textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent-strong); }
::placeholder { color: #555; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
  line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), #8b5cf6);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); }
.btn-small  { font-size: 0.85rem; padding: 0.45rem 0.8rem; min-height: 34px; }
.btn-large  { font-size: 1.1rem; padding: 1rem 1.25rem; min-height: 54px; }
.btn-block  { width: 100%; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.15rem; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  flex: none;
}
.icon-btn.small { width: 30px; height: 30px; font-size: 1rem; }

.leave-row { display: flex; justify-content: center; margin-top: 1rem; }

/* ---------- Menu-Screen: Modus-Karten ---------- */
.mode-grid { display: grid; gap: 0.6rem; }
.mode-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "icon title"
    "icon desc";
  column-gap: 0.9rem;
  row-gap: 0.2rem;
  align-items: center;
}
.mode-card:hover { border-color: var(--accent-strong); }
.mode-card:active { transform: scale(0.985); }
.mode-card.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.mode-card.disabled:hover { border-color: var(--border); }
.mode-icon { grid-area: icon; font-size: 2rem; }
.mode-title { grid-area: title; font-weight: 700; font-size: 1.05rem; }
.mode-desc { grid-area: desc; font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Prepare: Pill-Group (Gewinnpunkte) ---------- */
.pill-group { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pill {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  min-height: 40px; min-width: 52px;
  display: inline-flex; align-items: center; justify-content: center;
}
.pill.active {
  background: linear-gradient(135deg, var(--accent-strong), #8b5cf6);
  border-color: transparent;
  color: #fff;
}
.pill[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ---------- Playlists ---------- */
.pool-info {
  font-size: 0.9rem;
  color: var(--text-dim);
  padding: 0.5rem 0.7rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}
.pool-info strong { color: var(--text); font-size: 1rem; }

.playlist-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.playlist-card {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  cursor: pointer;
}
.playlist-card.selected { border-color: var(--accent-strong); background: rgba(99, 102, 241, 0.1); }
.playlist-checkbox {
  width: 22px; height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem;
  color: #fff;
  flex: none;
}
.playlist-checkbox.checked { background: var(--accent-strong); border-color: var(--accent-strong); }
.playlist-cover {
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--bg);
  display: grid; place-items: center;
  font-size: 1.2rem;
  flex: none;
}
.playlist-body { min-width: 0; }
.playlist-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.playlist-sub { font-size: 0.78rem; }
.playlist-actions { flex: none; }
.btn-icon {
  background: transparent; border: none; padding: 0.4rem;
  color: var(--text-dim); font-size: 1rem; cursor: pointer;
  border-radius: 6px;
}
.btn-icon:hover { background: var(--bg); color: var(--text); }
.btn-icon.danger:hover { color: var(--err); }

.create-dialog {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.75rem;
}

/* ---------- Ingame: Round Panels ---------- */
.round-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}
.round-countdown {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.5rem, 15vw, 5rem);
  font-weight: 800;
  text-align: center;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 1.5rem 0 0.75rem 0;
}

/* Buzzer-Button – riesig und prominent */
.btn-buzzer {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  width: 100%;
  min-height: min(35vh, 180px);
  font-family: inherit;
}
.btn-buzzer:active { transform: translateY(3px); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35); }
/* Party-Events 01/03: transform-Transitions für Glitch/Shrink sanfter machen */
.btn-buzzer {
  transition: transform 0.18s ease-out;
}
/* Party-Events 02/04: buzzer-group + giveup-group wrappen echten + dummy Button */
.buzzer-group, .giveup-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  align-items: stretch;
}
.buzzer-group > .btn-buzzer,
.giveup-group > .btn-giveup {
  flex: 1 1 0;
  min-width: 0;
}
/* Dummy-Buttons (Events 02/04) sehen wie die echten aus, machen aber nichts.
   Damit das Troll-Element wirkt, kein visueller Hinweis — sie sehen identisch aus. */
.btn-dummy { cursor: pointer; }

.buzzer-locked {
  background: rgba(148, 163, 184, 0.1);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  color: var(--text-dim);
  font-weight: 600;
}

/* Buzzed-State */
.buzzed-who {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0.5rem 0;
}
.say-answer-title { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.say-answer-sub { margin-bottom: 1.25rem; font-size: 0.9rem; }

/* Verdict-Buttons */
.verdict-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 1rem; }
.btn-verdict-correct, .btn-verdict-wrong {
  font-size: 1rem; font-weight: 700;
  padding: 0.9rem 0.5rem;
  border-radius: 12px;
  border: none; color: #fff;
  cursor: pointer;
  min-height: 54px;
  font-family: inherit;
}
.btn-verdict-correct { background: linear-gradient(135deg, var(--ok), #16a34a); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35); }
.btn-verdict-wrong   { background: linear-gradient(135deg, var(--err), #dc2626); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35); }

/* Reveal-Karte: Titel groß, Interpret mittel, Jahr klein unten */
.reveal-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 14px;
  padding: 1.25rem 1rem 1rem 1rem;
  text-align: center;
}
.reveal-title {
  font-size: clamp(1.3rem, 5.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.reveal-artist {
  font-size: clamp(1rem, 4vw, 1.15rem);
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
  overflow-wrap: anywhere;
}
.reveal-year {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Reveal-Scoreboard + Win-Scoreboard */
.reveal-scoreboard {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem;
  max-height: 30vh;
  overflow-y: auto;
}
.reveal-score-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.95rem;
}
.reveal-score-row.self { background: rgba(99, 102, 241, 0.15); }
.reveal-score-row.winner { background: rgba(34, 197, 94, 0.15); font-weight: 700; }
.reveal-score-name { font-weight: 500; }
.reveal-score-val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 2rem; text-align: right;
}
.reveal-score-val.positive { color: var(--ok); }
.reveal-score-val.negative { color: var(--err); }

/* Win-Screen */
.win-card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.06));
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 16px;
  padding: 2rem 1rem 1.5rem 1rem;
  text-align: center;
}
.win-trophy { font-size: 4rem; line-height: 1; margin-bottom: 0.4rem; }
.win-headline { font-size: 1.2rem; font-weight: 700; color: var(--ok); letter-spacing: 0.03em; }
.win-name { font-size: 2rem; font-weight: 800; color: var(--text); margin-top: 0.4rem; overflow-wrap: anywhere; }
.win-score { font-size: 1rem; color: var(--text-dim); margin-top: 0.25rem; }

/* ---------- Sheet-Overlay ---------- */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: overlay-in 0.15s ease-out;
}
.sheet-overlay.hidden { display: none; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 560px;
  background: var(--bg-raised);
  border-radius: 16px 16px 0 0;
  padding: 0.5rem 1rem 1.25rem 1rem;
  max-height: 80vh;
  overflow-y: auto;
  animation: sheet-in 0.2s ease-out;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0.4rem auto 0.75rem auto;
}
.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem;
}
.sheet-header h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.host-menu-body { display: grid; gap: 0.5rem; }
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}

/* ---------- Player-List (in Sheet) ---------- */
.player-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.player-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg-input);
  border-radius: 8px;
  border: 1px solid transparent;
}
.player-row.self      { border-color: var(--accent-strong); }
.player-row.disconnected { opacity: 0.4; }
.player-row.locked    { opacity: 0.6; }

.player-avatar {
  width: 30px; height: 30px;
  background: var(--bg);
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem;
  flex: none;
}
.player-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.95rem;
}
.player-score-group { display: flex; align-items: center; gap: 0.3rem; flex: none; }
.player-score {
  min-width: 2.1rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.player-score.positive { background: rgba(34, 197, 94, 0.15); color: var(--ok); border-color: rgba(34, 197, 94, 0.3); }
.player-score.negative { background: rgba(239, 68, 68, 0.15); color: var(--err); border-color: rgba(239, 68, 68, 0.3); }
.score-adjust {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1rem; line-height: 1; font-weight: 700;
  cursor: pointer;
  padding: 0;
  display: grid; place-items: center;
}
.score-adjust.minus:hover { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.5); }
.score-adjust.plus:hover  { background: rgba(34, 197, 94, 0.2); border-color: rgba(34, 197, 94, 0.5); }

.player-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; flex: none; }
.player-badge {
  font-size: 0.65rem; font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.player-badge.host    { background: rgba(99, 102, 241, 0.22); color: var(--accent); }
.player-badge.you     { background: rgba(34, 197, 94, 0.18); color: var(--ok); }
.player-badge.offline { background: rgba(245, 158, 11, 0.18); color: var(--warn); }
.player-badge.locked  { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

/* ---------- Small helpers ---------- */
.muted    { color: var(--text-dim); }
.centered { text-align: center; }
.hidden   { display: none !important; }

/* ---------- Ingame-Modus: spezifische Anpassungen ---------- */
body.ingame-mode { /* Optional: später nutzen */ }

/* ---------- Etappe 5a: Checkbox-Reihe ---------- */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  text-transform: none !important;   /* override .form-row label */
  letter-spacing: 0 !important;
  color: var(--text) !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--accent-strong);
  margin: 0;
  flex: none;
  cursor: pointer;
}
.checkbox-text { flex: 1; }

/* ---------- Etappe 5a: Give-up-Button + Status ---------- */
.btn-giveup {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  min-height: 48px;
  font-family: inherit;
  margin-top: 0.3rem;
}
.btn-giveup:hover { background: rgba(255, 255, 255, 0.12); }
.btn-giveup:disabled, .btn-giveup.voted {
  opacity: 0.7;
  cursor: default;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--warn);
}
.giveup-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* ---------- Etappe 5a: Pending-Winner Hinweis ---------- */
.pending-winner {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ok);
  padding: 0.6rem 1rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 10px;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* ---------- Etappe 5a: Player-Pills im Join-Screen ---------- */
.join-player-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.8rem;
}
.join-player-box-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.join-player-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.join-player-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
}
.join-player-pill.host { border-color: rgba(99, 102, 241, 0.5); color: var(--accent); }
.join-player-pill.disconnected { opacity: 0.5; }
.join-player-pill .host-mark { font-size: 0.68rem; color: var(--accent); font-weight: 700; }

/* ---------- Regeln-Sheet ---------- */
.rules-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.2rem 0;
}

/* Phase 7d: QR-Code Sheet — großer QR auf weißem Hintergrund */
.qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem 1.5rem 0.5rem;
}
#qr-canvas-container {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  /* Inline-block lässt den Container nur so groß werden wie das innere SVG */
  display: inline-block;
  line-height: 0; /* keine zusätzliche Baseline-Höhe unterm SVG */
  max-width: 100%;
}
#qr-canvas-container svg {
  display: block;
  /* Falls der natürlich-große QR breiter ist als der Sheet, runter-skalieren */
  max-width: min(360px, 80vw);
  width: auto;
  height: auto;
}
.rule-section h4 {
  margin: 0 0 0.4rem 0;
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.rule-section ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.rule-section li {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.rule-section li strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- Etappe 5c: Stress-Timer im buzzed-State ---------- */
.buzz-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
}
.buzz-timer-label {
  font-size: 0.85rem;
  color: var(--warn);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.buzz-timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
  font-weight: 800;
  color: var(--warn);
  line-height: 1;
  min-width: 2.2rem;
  text-align: right;
}
.buzz-timer.zero {
  color: var(--err);
  animation: buzz-pulse 0.6s ease-in-out infinite;
}
@keyframes buzz-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

/* ---------- Etappe 5c: Peek-Indicator (Anti-Schummel-Signal) ---------- */
.peek-indicator {
  text-align: center;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--err);
  font-weight: 600;
  font-size: 0.92rem;
  animation: pulse 1.2s ease-in-out infinite;
}

/* ---------- Etappe 5d: Volume-Regler (nur Host) ---------- */
.volume-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  margin: 0.5rem 0;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.volume-icon { font-size: 1.05rem; flex: none; }
.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), #8b5cf6);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  transition: transform 0.1s;
}
.volume-slider::-webkit-slider-thumb:active { transform: scale(1.15); }
.volume-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), #8b5cf6);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}
.volume-slider::-moz-range-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  border: none;
}
.volume-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-dim);
  font-size: 0.85rem;
  min-width: 2.8rem;
  text-align: right;
  flex: none;
}

/* ==========================================================
   Hitster-Modus (Zeitleiste)
   ========================================================== */

/* Icons: CSS-gerenderte Symbole — robuster als Emojis */
.icon-token {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b 65%, #b45309);
  box-shadow: 0 0 0 1px rgba(146, 64, 14, 0.5) inset;
  flex: none;
  position: relative;
  top: 1px;
}
.icon-card {
  display: inline-block;
  width: 14px; height: 14px;
  background:
    linear-gradient(135deg, rgba(165,168,255,0.85), rgba(99,102,241,0.85));
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 2px;
  box-shadow: 2px -2px 0 -1px rgba(165,168,255,0.5), 2px -2px 0 0 rgba(99,102,241,0.6);
  flex: none;
  position: relative;
  top: 1px;
}

/* Disabled-Buttons universell visuell ausgrauen */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.btn:disabled:active { transform: none; }

/* Topbar-Mitte: Aktiver-Name oben, zwei Pills unten (Karten + Tokens) */
.topbar-hitster-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.topbar-hitster-info.hidden { display: none; }
.topbar-active-name {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.topbar-active-name.is-me { color: var(--accent); font-weight: 700; }
.topbar-hitster-pills {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.topbar-hitster-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  min-height: 26px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.topbar-hitster-pill.static { cursor: default; }
.topbar-hitster-pill:active:not(.static) { transform: scale(0.96); }
.topbar-hitster-pill .icon-token,
.topbar-hitster-pill .icon-card { top: 0; }

/* Ingame-Hitster-Layout: vertikales Panorama oben, Round-Panel unten */
#ingame-hitster {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}
.hitster-timeline-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.25rem 0.2rem 0.5rem 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
.hitster-timeline-wrap::-webkit-scrollbar { width: 8px; }
.hitster-timeline-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.hitster-timeline-title {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}
.hitster-timeline-title .is-self { color: var(--accent); }
.hitster-timeline-back-link {
  display: inline-block;
  margin-left: 0.4rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

/* Zeitleiste-Richtungs-Labels */
.hitster-axis-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.2rem 0;
  opacity: 0.7;
}
.hitster-axis-label.top    { border-bottom: 1px dashed var(--border); margin-bottom: 0.35rem; }
.hitster-axis-label.bottom { border-top:    1px dashed var(--border); margin-top:    0.35rem; }

.hitster-timeline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 0.3rem;
}

/* Slot-Streifen zwischen Karten (auch vor erster und nach letzter) */
.hitster-slot {
  min-height: 26px;
  border-radius: 8px;
  border: 1.5px dashed rgba(148, 163, 184, 0.25);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  margin: 0.25rem 0;
  transition: border-color 0.12s, background 0.12s, color 0.12s, transform 0.05s;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.hitster-slot.tappable {
  cursor: pointer;
  color: var(--accent);
  border-color: rgba(165, 168, 255, 0.4);
  background: rgba(99, 102, 241, 0.05);
}
.hitster-slot.tappable:hover,
.hitster-slot.tappable:active { border-color: var(--accent-strong); background: rgba(99, 102, 241, 0.15); }
.hitster-slot.selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.25));
  border: 1.5px solid var(--accent-strong);
  color: #fff;
}
.hitster-slot.challenged {
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.12);
  color: var(--warn);
  font-weight: 700;
}
.hitster-slot.locked { opacity: 0.5; }
.hitster-slot.correct-highlight {
  border: 2px solid var(--ok);
  background: rgba(34, 197, 94, 0.18);
  color: var(--ok);
  animation: pulse 1.4s ease-in-out infinite;
}

/* Karten auf der Timeline */
.hitster-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.8rem;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.hitster-card .hitster-card-year {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-width: 4.4rem;
  text-align: center;
}
.hitster-card .hitster-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.hitster-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hitster-card-artist {
  font-size: 0.78rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Round-Panel */
.hitster-round-panel {
  flex: none;
  padding: 0.6rem 0.1rem 0.2rem 0.1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.hitster-action-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.hitster-action-row .btn { flex: 1; }

/* Challenge-Phase */
.hitster-challenge-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.8rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--warn);
}
.hitster-challenge-timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  font-weight: 800;
}

.btn-hitster-challenge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  width: 100%;
  min-height: 80px;
  font-family: inherit;
  animation: hitster-btn-pulse 1s ease-in-out infinite;
}
.btn-hitster-challenge:active { transform: translateY(2px); }
@keyframes hitster-btn-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.025); box-shadow: 0 6px 22px rgba(239, 68, 68, 0.6); }
}

/* Reveal-Ergebnis */
.hitster-reveal-result {
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  text-align: center;
}
.hitster-reveal-result.win  { background: rgba(34, 197, 94, 0.15); color: var(--ok);   border: 1px solid rgba(34, 197, 94, 0.35); }
.hitster-reveal-result.lose { background: rgba(239, 68, 68, 0.12); color: var(--err);  border: 1px solid rgba(239, 68, 68, 0.3); }
.hitster-reveal-result.info { background: rgba(148, 163, 184, 0.1); color: var(--text-dim); border: 1px solid var(--border); }

/* Phase 7d: Host-only Track-Karte mit „falsch datiert"-Knopf */
.host-track-card {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.host-track-card.hidden { display: none; }
.host-track-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.host-track-card-info {
  line-height: 1.3;
}
.host-track-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}
.host-track-card-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  word-break: break-word;
}
.host-track-card .btn {
  align-self: stretch;
}

/* Meine-Zeitleiste-Sheet */
.hitster-mytl-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

/* Nummern-Input für Gewinnkarten */
#target-cards-input {
  width: 6rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
#target-cards-input:focus { outline: none; border-color: var(--accent-strong); }
#target-cards-input:disabled { opacity: 0.5; }

/* Song-Progress-Bar im Picking */
.hitster-song-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.3rem 0 0.15rem 0;
}
.hitster-song-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-strong), #8b5cf6);
  transition: width 0.2s linear;
}
.hitster-song-progress.done .hitster-song-progress-fill {
  background: var(--text-dim);
}
.hitster-song-progress-label {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

/* ==========================================================
   Party-Modus (Etappe 6, Phase 1)
   ========================================================== */

/* Topbar-Party-Info (parallel zu topbar-hitster-info) */
.topbar-party-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}
.topbar-party-info.hidden { display: none; }

.topbar-party-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--warn);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
}
.topbar-party-pill:active { transform: scale(0.96); }
.topbar-party-pill.shot-pill .icon-shot {
  font-size: 1rem;
  line-height: 1;
}
.topbar-party-pill.shot-pill.is-zero {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border-color: var(--border);
  cursor: default;
}
.topbar-party-pill.shot-pill.is-zero:active { transform: none; }

/* Player-Sheet: Shot-Anzeige neben Score */
.player-shots {
  margin-left: 0.35rem;
}

/* Scoreboard: Shot-Anzeige neben Punkt-Anzeige */
.reveal-score-pts.positive { color: var(--ok); }
.reveal-score-pts.negative { color: var(--err); }
.reveal-score-shots {
  margin-left: 0.5rem;
  color: var(--warn);
  font-weight: 600;
}

/* Log-Sheet (Party-Protokoll) */
.log-filter-row {
  display: flex;
  gap: 0.4rem;
  padding: 0 0.9rem 0.5rem 0.9rem;
  flex-wrap: wrap;
}
.log-filter-row .pill {
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}
.log-list {
  list-style: none;
  margin: 0;
  padding: 0 0.9rem 0.9rem 0.9rem;
  max-height: 60vh;
  overflow-y: auto;
}
.log-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "time who delta"
    ".    reason reason";
  gap: 0.15rem 0.55rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.log-entry:last-child { border-bottom: none; }
.log-time {
  grid-area: time;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  font-size: 0.82rem;
  min-width: 2.8rem;
}
.log-who {
  grid-area: who;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-delta {
  grid-area: delta;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  white-space: nowrap;
}
.log-delta.positive { color: var(--ok); }
.log-delta.negative { color: var(--err); }
.log-entry.log-shots .log-delta.positive { color: var(--warn); }
.log-entry.log-shots .log-delta.negative { color: var(--accent); }
.log-reason {
  grid-area: reason;
  font-size: 0.8rem;
}

/* ==========================================================
   Party-Modus (Etappe 6, Phase 2: Events, UI-Komponenten, Debug)
   ========================================================== */

/* Toast-Container: fixed oben mittig, stackt mehrere Toasts */
.party-toast-container {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}
.party-toast {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.96), rgba(139, 92, 246, 0.96));
  color: white;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
  text-align: center;
}
.party-toast.in {
  opacity: 1;
  transform: translateY(0);
}
.party-toast.out {
  opacity: 0;
  transform: translateY(-8px);
}

/* Overlay-Container: persistente Mehrrunden-Indikatoren direkt unter Topbar */
.party-overlay-container {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.6rem;
  pointer-events: none;
}
.party-overlay-item {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: var(--warn);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  pointer-events: auto;
  animation: partyOverlayIn 0.25s ease-out;
}
.party-overlay-item.out { opacity: 0; transition: opacity 0.3s; }
@keyframes partyOverlayIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal: Fullscreen Overlay mit Center-Card */
.party-modal-container {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.party-modal-container.hidden { display: none; }
.party-modal {
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  max-width: 360px;
  width: 100%;
  padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: partyModalIn 0.2s ease-out;
}
@keyframes partyModalIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.party-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.party-modal-body {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.party-modal-input-wrap {
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.party-modal-input-wrap.hidden { display: none; }
.party-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.7rem;
  background: var(--input-bg, rgba(0,0,0,0.25));
  color: var(--text);
  border: 1px solid var(--border, rgba(255,255,255,0.15));
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 3.2em;
  max-height: 12em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.party-modal-input:focus {
  outline: none;
  border-color: var(--accent, #6ea8ff);
  box-shadow: 0 0 0 2px rgba(110, 168, 255, 0.25);
}
.party-modal-input.shake {
  animation: party-modal-input-shake 0.35s ease;
  border-color: #e27272;
}
@keyframes party-modal-input-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.party-modal-input-counter {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
}
.party-modal-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.party-modal-buttons .btn {
  flex: 1;
  min-width: 100px;
}

/* Grid-Layout für Event 28 Scratch Ticket (3×3) */
.party-modal-buttons.layout-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.party-modal-buttons.layout-grid3 .btn {
  flex: none;
  min-width: 0;
  aspect-ratio: 1;
  font-size: 1.8rem;
  padding: 0.2rem;
  min-height: 3.5rem;
}
.party-modal-buttons.layout-grid3 .btn.scratch-unrevealed {
  background: linear-gradient(135deg, rgba(148, 148, 148, 0.55), rgba(90, 90, 90, 0.55));
  border: 1px solid rgba(200, 200, 200, 0.35);
  color: rgba(255, 255, 255, 0.85);
}
.party-modal-buttons.layout-grid3 .btn.scratch-win {
  background: rgba(34, 197, 94, 0.3);
  border: 1px solid rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
  /* disabled-default-opacity überschreiben — Gewinn soll leuchten */
  opacity: 1 !important;
  cursor: default;
}
.party-modal-buttons.layout-grid3 .btn.scratch-lose {
  background: rgba(120, 113, 108, 0.2);
  border: 1px solid rgba(120, 113, 108, 0.5);
  color: rgba(255, 255, 255, 0.55);
  opacity: 0.8;
  cursor: default;
}

/* Events-Konfig-Sheet */
.party-events-body {
  padding: 0 0.9rem 0.9rem 0.9rem;
  max-height: 70vh;
  overflow-y: auto;
}
.party-events-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.party-events-actions .btn { flex: 1; }
.party-events-group-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0 0.3rem 0;
  border-bottom: 1px solid var(--border);
  margin-top: 0.5rem;
}
.party-events-group-header:first-child { margin-top: 0; }
.party-events-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  cursor: pointer;
}
.party-events-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.party-events-item-label {
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.party-events-item-rarity {
  font-size: 0.72rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.party-events-item-rarity.rarity-häufig { color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.1); }
.party-events-item-rarity.rarity-selten { color: #60a5fa; border-color: rgba(96, 165, 250, 0.3); background: rgba(96, 165, 250, 0.1); }
.party-events-item-rarity.rarity-normal,
.party-events-item-rarity.rarity-mittel { color: var(--text-dim); }

/* Host-Debug-Panel */
.party-debug-body {
  padding: 0 0.9rem 0.9rem 0.9rem;
}
.select-full {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.button-row-compact {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.button-row-compact .btn { flex: 1; min-width: 80px; }

/* ==========================================================
   Party-Modus (Etappe 6, Phase 3: Prompt-Komponente + Modal-Countdown)
   ========================================================== */

/* Prompt-Container: oben rechts, non-blocking, stackt mehrere */
.party-prompt-container {
  position: fixed;
  top: 4.5rem;
  right: 0.8rem;
  z-index: 1800;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: min(320px, 80vw);
  pointer-events: none;
}
.party-prompt {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.9rem 0.55rem 0.9rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.96), rgba(79, 70, 229, 0.96));
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: partyPromptIn 0.28s ease-out;
  transition: transform 0.1s, opacity 0.3s;
}
.party-prompt:active { transform: scale(0.97); }
.party-prompt.prompt-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.96), rgba(22, 163, 74, 0.96));
}
.party-prompt.party-prompt-consumed {
  pointer-events: none;
  opacity: 0.7;
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.96), rgba(71, 85, 105, 0.96));
}
.party-prompt.party-prompt-out {
  opacity: 0;
  transform: translateX(20px);
}
@keyframes partyPromptIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.party-prompt-text {
  display: block;
  line-height: 1.2;
}
.party-prompt-bar {
  display: block;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}
.party-prompt-bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  transition: width 0.12s linear;
}

/* Modal-Countdown-Balken unterhalb der Buttons */
.party-modal-countdown-track {
  height: 3px;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.party-modal-countdown {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-strong), #8b5cf6);
  transition: width 0.12s linear;
}
.party-modal-countdown.hidden { display: none; }

/* Status-Badges im Events-Konfig-Sheet (0.7.0) */
.party-events-item-badges {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.party-events-item-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.party-events-item-status.status-implemented {
  color: var(--ok);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.party-events-item-status.status-wip {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

/* Debug-Panel: Status-Badge unter dem Event-Dropdown */
.party-debug-event-status {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.35;
}
.party-debug-status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-right: 0.3rem;
}
.party-debug-status-badge.status-implemented {
  color: var(--ok);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.party-debug-status-badge.status-wip {
  color: var(--warn);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Party-Debug-Panel: Live-Status-Anzeige (0.7.2) */
.party-debug-live-status {
  margin-top: 0.8rem;
  padding: 0.6rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.party-debug-live-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.party-debug-live-row {
  color: var(--text);
}
.party-debug-live-row.muted {
  color: var(--text-dim);
  font-style: italic;
}
.party-debug-live-row strong {
  color: var(--accent-strong);
  font-weight: 600;
}

/* Host-Strafen-Panel (Phase 6 — für Events 22/23) */
.party-debug-host-penalty {
  margin-top: 0.6rem;
}
.party-debug-host-penalty:empty {
  margin-top: 0;
}
.party-debug-penalty-section {
  padding: 0.6rem 0.7rem;
  background: rgba(234, 88, 12, 0.08);
  border: 1px solid rgba(234, 88, 12, 0.35);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.party-debug-penalty-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fb923c;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.party-debug-penalty-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.party-debug-penalty-btn {
  flex: 1 1 auto;
  min-width: 90px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  background: rgba(234, 88, 12, 0.15);
  border: 1px solid rgba(234, 88, 12, 0.5);
  color: #fed7aa;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.1s ease, transform 0.08s ease;
}
.party-debug-penalty-btn:hover {
  background: rgba(234, 88, 12, 0.3);
}
.party-debug-penalty-btn:active {
  transform: scale(0.97);
}

/* Joker-Pill (Event 25 Gefängnis-Frei-Karte) — 0.8.0 */
.topbar-party-pill.joker-pill {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(245, 158, 11, 0.22));
  border: 1px solid rgba(234, 179, 8, 0.5);
  color: #fbbf24;
  cursor: default; /* nicht klickbar, nur Anzeige */
  pointer-events: none;
}
.icon-joker {
  font-size: 1rem;
  line-height: 1;
}
