:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #10141b;
  --panel-2: #161b24;
  --line: #222a36;
  --text: #e8edf5;
  --muted: #8490a2;
  --faint: #4b5566;
  --accent: #3d8bff;
  --accent-hi: #69a6ff;
  --accent-soft: rgba(61, 139, 255, 0.14);
  --accent-glow: rgba(61, 139, 255, 0.35);
  --d1: #3d8bff;
  --d2: #f5c542;
  --d3: #ff8a3d;
  --d4: #ff4d5e;
  --d5: #b36bff;
  --ok: #3d8bff;
  --bad: #ff4d5e;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent-hi); }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Lichtkegel im Hintergrund */
.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(61, 139, 255, 0.08), rgba(61, 139, 255, 0.015) 70%);
  clip-path: polygon(30% 0, 70% 0, 82% 100%, 18% 100%);
}

.menu-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0;
  background: var(--panel-2);
  display: none;
  place-items: center;
}
.menu-btn svg { width: 24px; height: 24px; }

/* ---------- Layout ---------- */

.layout {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  min-height: 100vh;
  min-height: 100dvh;
}

.drawer { display: contents; }

.side {
  padding: 32px 22px;
  align-self: center;
}
.side-left { grid-column: 1; grid-row: 1; }
.side-right { grid-column: 3; grid-row: 1; }

.center {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 16px 24px;
  min-width: 0;
}

.side h3 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Kopf ---------- */

.logo {
  margin: 0 0 28px;
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.1;
  padding: 0 0.12em 0.08em;
  text-align: center;
  background: linear-gradient(180deg, #f3f7ff 0%, #9dbef0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eras {
  display: flex;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding: 2px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.eras::-webkit-scrollbar { display: none; }
.eras button {
  flex: none;
  border: 0;
  background: none;
  color: var(--faint);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s;
}
.eras button:hover { color: var(--muted); }
.eras button[aria-pressed="true"] { color: var(--text); }
.eras::before, .eras::after { content: ""; flex: 0 0 18%; }

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}
.pill {
  --c: var(--accent);
  border: 0;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  transition: background .15s, color .15s, box-shadow .15s;
}
.pill:hover { background: color-mix(in srgb, var(--c) 24%, transparent); }
.pill[aria-checked="true"] {
  background: var(--c);
  color: #07090d;
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent);
}
[data-level="1"] { --c: var(--d1); }
[data-level="2"] { --c: var(--d2); }
[data-level="3"] { --c: var(--d3); }
[data-level="4"] { --c: var(--d4); }
[data-level="5"] { --c: var(--d5); }

/* Runde: 5 Punkte */
.round-dots {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
}
.round-dots li {
  width: 34px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  transition: background .2s;
}
.round-dots li.current { background: var(--muted); }
.round-dots li.won { background: var(--ok); }
.round-dots li.lost { background: var(--bad); }

/* ---------- Spielbereich ---------- */

.stage-area, .reveal, .summary {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stagebar { width: 100%; margin-bottom: 30px; }
.stagebar-track {
  position: relative;
  height: 32px;
  border-radius: 10px;
  background: var(--panel-2);
  overflow: hidden;
}
.stagebar-unlocked, .stagebar-played {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
}
.stagebar-unlocked { background: var(--accent-soft); transition: width .35s ease; }
.stagebar-played { background: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }
.stagebar-marks { position: relative; height: 20px; }
.stagebar-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font: 600 12px/1 var(--mono);
  color: var(--faint);
  padding-top: 6px;
  white-space: nowrap;
}
.stagebar-mark.unlocked { color: var(--muted); }
.stagebar-mark.active { color: var(--accent-hi); }
.stagebar-mark.active::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--accent-hi);
  border-top: 0;
}
.stagebar-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--bg);
  opacity: .8;
}

.player {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}
.play-btn {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #07090d;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 0 var(--accent-glow), 0 12px 40px rgba(61, 139, 255, 0.25);
  transition: transform .12s ease, background .15s, box-shadow .3s;
}
.play-btn:hover:not(:disabled) { background: var(--accent-hi); transform: scale(1.03); }
.play-btn:active:not(:disabled) { transform: scale(0.97); }
.play-btn:disabled { background: var(--panel-2); color: var(--faint); box-shadow: none; }
.play-btn svg { width: 56px; height: 56px; fill: currentColor; stroke: none; }
.play-btn .icon-play { margin-left: 8px; }
.play-btn .icon-stop, .play-btn .spinner { display: none; }
.play-btn.playing { box-shadow: 0 0 0 12px var(--accent-soft), 0 12px 40px rgba(61, 139, 255, 0.3); }
.play-btn.playing .icon-play { display: none; }
.play-btn.playing .icon-stop { display: block; }
.play-btn.loading .icon-play { display: none; }
.play-btn.loading .spinner {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stage-label {
  position: absolute;
  left: calc(50% + 94px);
  font: 700 26px/1 var(--mono);
  color: var(--accent-hi);
  white-space: nowrap;
}

.guess-row {
  display: flex;
  gap: 10px;
  width: 100%;
}
.search {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--accent); }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 17px;
  color: var(--text);
}
.search input::placeholder { color: var(--muted); }

.suggestions {
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: calc(100% + 6px);
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
}
.suggestions li {
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  line-height: 1.25;
}
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--accent-soft); }
.suggestions .s-title { display: block; color: var(--text); font-weight: 600; }
.suggestions .s-artist { display: block; color: var(--muted); font-size: 14px; }
.suggestions .s-empty { color: var(--muted); cursor: default; }
.suggestions .s-empty:hover { background: none; }

.skip-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font-weight: 700;
  transition: border-color .15s, background .15s;
}
.skip-btn:hover:not(:disabled) { border-color: var(--muted); }
.skip-btn:disabled { opacity: .4; }
.skip-btn svg path:first-child { fill: currentColor; stroke: none; }

.history {
  list-style: none;
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.history li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--panel);
  font-size: 15px;
  color: var(--muted);
  animation: pop .2s ease;
}
.history li.wrong { color: #ff9aa4; }
.history .h-stage { font: 600 12px var(--mono); color: var(--faint); margin-left: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Auflösung ---------- */

.reveal {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px 20px;
  text-align: left;
  animation: pop .25s ease;
}
.reveal .primary-btn { grid-column: 1 / -1; justify-self: center; min-width: 220px; }
.cover {
  width: 132px;
  height: 132px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--panel-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.reveal-text { min-width: 0; }
.reveal-text h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.reveal-result { margin: 0; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.reveal-result.won { color: var(--accent-hi); }
.reveal-result.lost { color: var(--bad); }
.reveal-artist { margin: 4px 0 0; color: var(--muted); font-size: 18px; }
.reveal-meta { margin: 8px 0 0; color: var(--faint); font-size: 14px; }

.primary-btn, .secondary-btn {
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  font-size: 16px;
  transition: background .15s, transform .12s;
}
.primary-btn { background: var(--accent); color: #07090d; }
.primary-btn:hover { background: var(--accent-hi); }
.secondary-btn { background: var(--panel-2); border: 1px solid var(--line); }
.secondary-btn:hover { border-color: var(--muted); }
.primary-btn:active, .secondary-btn:active { transform: scale(0.97); }

/* ---------- Ergebnis ---------- */

.summary { text-align: center; animation: pop .25s ease; }
.summary-label { margin: 0; color: var(--muted); letter-spacing: .22em; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.summary-score { margin: 6px 0 0; font: 800 72px/1 var(--mono); color: var(--accent-hi); }
.summary-score small { font-size: 28px; color: var(--faint); }
.summary-best { margin: 10px 0 20px; color: var(--muted); min-height: 1.4em; }
.summary-best.record { color: var(--d2); font-weight: 700; }
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.summary-list li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  background: var(--panel);
  border-radius: 12px;
  text-align: left;
}
.summary-list img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--panel-2); }
.summary-list .sl-title { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-list .sl-sub { display: block; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-list .sl-cells { font-size: 13px; letter-spacing: 1px; }
.summary-list .sl-points { font: 700 15px var(--mono); color: var(--accent-hi); text-align: right; }
.summary-list .sl-points.zero { color: var(--faint); }
.summary-list div { min-width: 0; }
.summary-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.status { margin-top: 18px; min-height: 1.4em; color: var(--muted); text-align: center; }
.status.error { color: #ff9aa4; }
.status button { margin-left: 8px; }

.footer {
  margin-top: auto;
  padding-top: 40px;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}
.footer a { color: var(--muted); }

/* ---------- Seitenleisten ---------- */

.diff-list, .option-list { display: flex; flex-direction: column; gap: 10px; }
.diff-item {
  border: 0;
  text-align: left;
  padding: 15px 22px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
  font-size: 17px;
  transition: background .15s, color .15s;
}
.diff-item:hover { color: var(--text); background: var(--panel-2); }
.diff-item[aria-checked="true"] {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, var(--panel));
  font-weight: 700;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 6px 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.link-btn:hover { color: var(--accent-hi); }
.best-line { margin: 14px 18px 0; color: var(--muted); font-size: 14px; }

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  text-align: left;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.option svg { color: var(--muted); }
.option[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--accent-hi); }
.option[aria-pressed="true"] svg { color: var(--accent-hi); }

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--panel);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
}
.toggle svg { color: var(--muted); }
.toggle span:not(.switch) { flex: 1; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--line);
  transition: background .15s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(16px); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.hint { margin: 8px 4px 0; color: var(--faint); font-size: 13px; line-height: 1.4; }

.stage-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stage-options button {
  border: 0;
  height: 42px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font: 700 14px var(--mono);
}
.stage-options button:hover { color: var(--text); }
.stage-options button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, var(--panel)); color: var(--accent-hi); }

.volume {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 70%), var(--line) var(--fill, 70%));
  outline-offset: 6px;
}
.volume::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }
.volume::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 0; }

.help summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.help p { color: var(--muted); font-size: 14px; }
kbd { font: 12px var(--mono); padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; }

/* ---------- Schmale Bildschirme: Seitenleisten als Menü ---------- */

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .center { grid-column: 1; padding-top: 80px; }
  .menu-btn { display: grid; }

  .drawer {
    display: block;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 25;
    width: min(340px, 88vw);
    overflow-y: auto;
    background: var(--bg);
    border-right: 1px solid var(--line);
    padding: 72px 0 24px;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  body.drawer-open .drawer { transform: none; }
  .side { padding: 12px 20px; }
  .side-right { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 24px; }
  .backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.55); }
}

@media (max-width: 560px) {
  .center { padding-top: 76px; }
  .logo { margin-bottom: 20px; }
  .pill { padding: 7px 13px; font-size: 14px; }
  .play-btn { width: 124px; height: 124px; }
  .play-btn svg { width: 46px; height: 46px; }
  .stage-label { left: calc(50% + 76px); font-size: 22px; }
  .guess-row { flex-direction: column; }
  .search { flex: none; }
  .skip-btn { justify-content: center; }
  .summary-score { font-size: 60px; }
  .cover { width: 96px; height: 96px; }
  .reveal-text h2 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Anmeldung ---------- */

.login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(16, 20, 27, 0.85);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.field input {
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-size: 17px;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  place-items: center;
}
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box::after {
  content: "";
  width: 5px;
  height: 10px;
  margin-top: -2px;
  border: solid #07090d;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.login-card .primary-btn { margin-top: 4px; }
.login-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 77, 94, 0.12);
  color: #ff9aa4;
  font-size: 15px;
}
.login-note { margin-top: 18px; color: var(--faint); font-size: 13px; }

.account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 18px 0;
  color: var(--muted);
  font-size: 14px;
}
.account form { margin: 0; }
.account button {
  border: 1px solid var(--line);
  background: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.account button:hover { color: var(--text); border-color: var(--muted); }
.account { flex-wrap: wrap; }
.account-actions { display: flex; align-items: center; gap: 6px; }
.account-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-hi);
  text-decoration: none;
}
.account-link:hover { border-color: var(--accent); }

/* ---------- Verwaltung ---------- */

.admin {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}
.admin-head { text-align: center; margin-bottom: 24px; }
.admin-logo { font-size: clamp(2.2rem, 7vw, 3.4rem); margin: 18px 0 6px; }
.admin-sub { margin: 0; color: var(--muted); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  float: left;
}
.back-link:hover { color: var(--text); }

.panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(16, 20, 27, 0.85);
}
.panel h2 {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel .count { margin-left: 6px; color: var(--faint); }
.panel .hint { margin: 14px 0 0; }

.field small { font-weight: 400; letter-spacing: 0; color: var(--faint); }

.small { height: 36px; padding: 0 14px; font-size: 14px; }
.check.small { font-size: 14px; gap: 8px; }
.check.small .box { width: 18px; height: 18px; }
.check input:disabled + .box { opacity: .5; }
.check:has(input:disabled) { cursor: not-allowed; }
.danger-btn {
  border: 1px solid rgba(255, 77, 94, 0.35);
  background: rgba(255, 77, 94, 0.08);
  color: #ff9aa4;
  border-radius: 999px;
  font-weight: 700;
}
.danger-btn:hover:not(:disabled) { background: rgba(255, 77, 94, 0.18); }
button:disabled.secondary-btn, button:disabled.danger-btn { opacity: .35; cursor: not-allowed; }

.user-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel);
}
.user-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-weight: 800;
  flex: none;
}
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-weight: 700; font-size: 17px; }
.user-meta { color: var(--faint); font-size: 13px; }
.badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: 2px;
}
.badge.muted { background: var(--panel-2); color: var(--muted); }
.user-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.notice {
  margin: 0 0 4px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}
.notice.ok { background: var(--accent-soft); color: var(--accent-hi); }
.notice.error { background: rgba(255, 77, 94, 0.12); color: #ff9aa4; }

@media (max-width: 640px) {
  .back-link { float: none; }
  .panel { padding: 18px; }
}

/* ---------- Bestenliste ---------- */

.board {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: pop .2s ease;
}
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.board-head h2 { margin: 0; font-size: 22px; }
.board-head .link-btn { padding: 6px 0; color: var(--muted); }
.board-head .link-btn:hover { color: var(--text); }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.tabs button {
  border: 0;
  height: 42px;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-weight: 700;
  transition: background .15s, color .15s;
}
.tabs button[aria-selected="true"] { background: var(--accent); color: #07090d; }

.board-filters { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.small-pills { margin: 0; gap: 6px; }
.pill.small { padding: 5px 12px; font-size: 13px; }
.select {
  appearance: none;
  -webkit-appearance: none;
  height: 38px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238490a2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.board-list[aria-busy="true"] { opacity: .5; }
.board-row {
  display: grid;
  grid-template-columns: 36px 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid transparent;
}
.board-row.me { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.board-rank { text-align: center; font: 700 18px var(--mono); color: var(--muted); }
.board-info { display: flex; flex-direction: column; min-width: 0; }
.board-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-meta { color: var(--faint); font-size: 13px; }
.board-points { font: 800 22px var(--mono); color: var(--accent-hi); }
.board-empty { margin: 8px 0; text-align: center; color: var(--muted); }
.board-hint { text-align: center; margin: 0; }

.summary-rank { margin: -12px 0 20px; color: var(--accent-hi); font-weight: 700; min-height: 1.4em; }

/* Punkte-Faktor an den Schwierigkeitsknöpfen */
.mult { margin-left: 6px; font: 700 0.78em var(--mono); opacity: .7; }
.pill[aria-checked="true"] .mult { opacity: .75; }
.diff-item { display: flex; align-items: center; justify-content: space-between; }
.diff-item .mult { font-size: 13px; opacity: .55; }
.diff-item[aria-checked="true"] .mult { opacity: .9; }

/* Einladungen */
.panel-text { margin: -6px 0 18px; color: var(--muted); line-height: 1.5; }
.invite-create { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.link-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  animation: pop .2s ease;
}
.link-title { margin: 0 0 10px; font-weight: 700; }
.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: 13px var(--mono);
}
.link-box .hint { margin: 10px 0 0; }
.invite-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--panel);
}
.invite-text { display: flex; flex-direction: column; min-width: 0; }
.invite-title { font-weight: 700; }
.invite-intro h2 { margin: 0 0 6px; font-size: 20px; }
.invite-intro p { margin: 0; color: var(--muted); }
.invite-user { margin: 0; color: var(--muted); }
.invite-user strong { color: var(--text); }
.link-as-btn { display: grid; place-items: center; text-decoration: none; }
@media (max-width: 640px) {
  .link-row { flex-wrap: wrap; }
  .link-row input { flex-basis: 100%; }
  .invite { flex-wrap: wrap; }
}

/* ---------- Modus-Hinweis, Joker ---------- */

.mode-chip {
  margin: -14px 0 18px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-weight: 700;
  font-size: 14px;
}
.jokers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; width: 100%; }
.joker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.joker-btn small { color: var(--faint); font-weight: 600; }
.joker-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.joker-btn:disabled { opacity: .45; }
.joker-hint {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--d2) 14%, transparent);
  color: var(--d2);
  font-weight: 700;
  font-size: 14px;
}
.link-btn .badge { margin-left: 2px; }
.tabs.three { grid-template-columns: repeat(3, 1fr); }

/* ---------- Statistik ---------- */

.stats { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 16px; animation: pop .2s ease; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  background: var(--panel);
}
.stat-tile.accent { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.stat-value { font: 800 26px var(--mono); color: var(--text); }
.stat-tile.accent .stat-value { color: var(--accent-hi); }
.stat-label { color: var(--muted); font-size: 13px; line-height: 1.3; }
.stat-section { padding: 18px; border-radius: 16px; background: rgba(16, 20, 27, 0.85); border: 1px solid var(--line); }
.stat-section h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.stat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stat-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--panel); }
.stat-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.stat-list li[data-level] span { color: var(--c); font-weight: 700; }
.stat-list strong { font-family: var(--mono); color: var(--accent-hi); white-space: nowrap; }
.stat-bar { display: grid; grid-template-columns: 110px 1fr 52px; align-items: center; gap: 10px; margin: 6px 0; }
.stat-bar-label { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-bar-track { height: 10px; border-radius: 5px; background: var(--panel-2); overflow: hidden; }
.stat-bar-fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.stat-bar-value { font: 700 13px var(--mono); color: var(--text); text-align: right; }

/* ---------- Live ---------- */

.live { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 16px; animation: pop .2s ease; }
.live-lobby { display: grid; gap: 14px; }
.live-card { margin: 0; }
.live-card h3 { margin: 0 0 8px; font-size: 18px; }
.live-card .hint { margin: 0 0 16px; }
.live-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.field-inline { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.live-join { display: flex; gap: 10px; }
.live-join input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font: 800 22px var(--mono);
  letter-spacing: .3em;
  text-transform: uppercase;
  outline: none;
}
.live-join input:focus { border-color: var(--accent); }
.live-room { display: flex; flex-direction: column; gap: 14px; }
.live-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.live-code-label { display: block; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.live-code { font: 800 32px var(--mono); letter-spacing: .25em; color: var(--accent-hi); }
.live-status { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.live-status.error { color: #ff9aa4; }
.live-stage .stagebar { margin-bottom: 18px; }
.live-guess { display: flex; align-items: center; gap: 10px; }
.live-guess .search { flex: 1; }
.play-btn.small-play { width: 54px; height: 54px; flex: none; box-shadow: none; }
.play-btn.small-play svg { width: 22px; height: 22px; }
.play-btn.small-play .icon-play { margin-left: 3px; }
.live-feedback { margin: 10px 0 0; min-height: 1.4em; text-align: center; font-weight: 700; color: var(--muted); }
.live-feedback.ok { color: var(--accent-hi); }
.live-feedback.bad { color: #ff9aa4; }
.live-countdown { text-align: center; font: 700 15px var(--mono); color: var(--d2); }
.live-answer { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.live-answer .cover { width: 110px; height: 110px; }
.live-answer h2 { margin: 0; font-size: 22px; }
.live-answer .reveal-artist, .live-answer .reveal-meta { margin: 4px 0 0; }
.live-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.live-player {
  display: grid;
  grid-template-columns: 36px 1fr auto 70px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 8px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid transparent;
}
.live-player.me { border-color: var(--accent); }
.live-player.offline { opacity: .5; }
.live-player .board-points { text-align: right; font-size: 18px; }
.live-mark { font: 700 13px var(--mono); color: var(--accent-hi); }
.live-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.live-actions:empty { display: none; }

@media (max-width: 560px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .stat-bar { grid-template-columns: 80px 1fr 46px; }
  .live-code { font-size: 26px; }
  .live-answer .cover { width: 80px; height: 80px; }
}

/* ---------- Song-Verwaltung ---------- */

.admin-tabs { margin-bottom: 14px; grid-template-columns: 1fr 1fr; }
.song-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.song-form .field input, .song-form .select.wide { width: 100%; }
.select.wide { height: 50px; border-radius: 12px; font-size: 16px; }
.song-form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; grid-column: 1 / -1; }
.song-lookup { grid-column: 1 / -1; margin: 0; min-height: 1.3em; }
.song-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.song-search {
  flex: 1;
  min-width: 180px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  outline: none;
}
.song-search:focus { border-color: var(--accent); }
.song-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.song-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  grid-template-areas: "play info status" "play actions actions";
  align-items: center;
  gap: 6px 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 12px;
  background: var(--panel);
}
.song-row.disabled { opacity: .55; }
.song-play {
  grid-area: play;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent-hi);
  font-size: 13px;
}
.song-play:disabled { opacity: .3; }
.song-info { grid-area: info; display: flex; flex-direction: column; min-width: 0; }
.song-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-status { grid-area: status; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.song-status.ok { background: var(--accent-soft); color: var(--accent-hi); }
.song-status.bad { background: rgba(255, 77, 94, 0.14); color: #ff9aa4; }
.song-status.muted { background: var(--panel-2); color: var(--muted); }
.song-actions { grid-area: actions; display: flex; gap: 6px; flex-wrap: wrap; }
.small-select { height: 36px; font-size: 13px; }
.small-select[data-level] { color: var(--c); }
.more-btn { display: block; margin: 12px auto 0; }
@media (max-width: 640px) {
  .song-form { grid-template-columns: 1fr; }
}
