/* ==========================================================================
   Songwunsch – im Look von SF Media & Events (sfmediaevents.de)
   Dunkelgrau, Gold, Poppins. Mobil zuerst, optimiert für iPhone, Samsung & Tablets.
   ========================================================================== */

/* Poppins lokal gehostet (keine Verbindung zu Google, DSGVO-freundlich). Lizenz: assets/fonts/LICENSE.txt (SIL OFL) */
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #121212;
  --bg-2: #181818;
  --card: #1e1e1e;          /* SF Dunkelgrau */
  --card-2: #2a2a2a;
  --line: #333333;
  --text: #ffffff;
  --muted: #b6b6b6;
  --accent: #d19441;        /* SF Gold */
  --accent-rgb: 209, 148, 65;
  --accent-2: #d0b186;      /* helles Gold */
  --accent-dark: #7b5726;
  --ok: #3ddc97;
  --warn: #f0b35e;
  --danger: #ff5d5d;
  --spotify: #1ed760;
  --radius: 24px;
  --radius-sm: 14px;
  --font: Poppins, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* Abstände an den Rändern – berücksichtigen Notch & abgerundete Ecken */
  --gutter: 16px;
  --safe-l: max(var(--gutter), env(safe-area-inset-left));
  --safe-r: max(var(--gutter), env(safe-area-inset-right));
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tap: 44px;              /* Mindestgröße für Tippflächen (Apple/Google-Empfehlung) */
  --section-gap: 40px;      /* Abstand zwischen eigenständigen Bereichen */
  color-scheme: dark;
}

/* ---------- Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* sonst überschreiben z. B. display:flex-Regeln das Ausblenden */

html {
  /* Platz für die Scrollleiste immer freihalten: kein Springen, wenn ein Fenster das Scrollen sperrt */
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;       /* berücksichtigt ein- und ausfahrende Browserleisten */
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Hintergrund-Leuchten als eigene, fixierte Ebene (background-attachment: fixed ruckelt auf iOS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 0% -10%, rgba(var(--accent-rgb), .16), transparent 60%),
    radial-gradient(700px 460px at 110% 0%, rgba(var(--accent-rgb), .08), transparent 60%),
    var(--bg);
  transform: translateZ(0);
}

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: clamp(1.6rem, 4.2vw + .8rem, 2.5rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.05rem, .6vw + .95rem, 1.2rem); }
p { margin: 0 0 .75rem; }
code { background: var(--card-2); padding: .1em .4em; border-radius: 6px; word-break: break-all; }
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }  /* kein Doppeltipp-Zoom, keine Verzögerung */
img { max-width: 100%; }

::selection { background: rgba(var(--accent-rgb), .45); }

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

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-t)) var(--safe-r) calc(40px + var(--safe-b)) var(--safe-l);
}
.wrap.wide { max-width: 1180px; }
.wrap.center {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .88rem; margin: .5rem 0; transition: color .2s; }
.hint:empty { display: none; }
.hint.warn { color: var(--warn); }

/* Kleine Zeile über einer Überschrift (z. B. „Gastgeber-Bereich“): bewusst schlicht, normale Schreibweise */
.context, .eyebrow {
  display: block;
  font-size: .95rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 2px;
}

.hero { padding: 4px 0 24px; }
.hero p { color: var(--muted); margin: 0; }

.brand-logo { height: 46px; width: auto; display: block; margin-bottom: 16px; }
.logo img { height: 30px; width: auto; display: block; }
/* Das SF-Logo ist schwarz – auf dunklem Grund weiß darstellen */
.logo img, .brand-logo { filter: invert(1); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  padding: 18px;
  margin-bottom: 20px;
}

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack label { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.stack .btn { margin-top: 10px; align-self: flex-start; }
.stack-lg > .card { margin-bottom: 16px; }

/* ---------- Formulare (16px Schrift verhindert den Auto-Zoom auf iPhones) */
input[type=text], input[type=password], input[type=date], input[type=number], input[type=search], input[type=url], textarea, select {
  width: 100%;
  min-height: 48px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .25); }
input::placeholder, textarea::placeholder { color: #8a8a8a; opacity: 1; }
textarea { font-family: inherit; line-height: 1.5; resize: vertical; }
select {
  font-family: inherit;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6b6b6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  text-overflow: ellipsis;
}
.row input.grow { flex: 1; min-width: 200px; width: auto; }
input[type=date] { color-scheme: dark; }
input[type=search]::-webkit-search-cancel-button,
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

.code-form label { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.code-form .row { flex-wrap: nowrap; }
.code-form .row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .15em; font-weight: 600; }

.switch {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  margin-top: 6px;
  color: var(--text) !important;
  font-size: 1rem !important;
  -webkit-user-select: none;
  user-select: none;
}
.switch input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  transition: transform .25s var(--ease);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch span { display: flex; flex-direction: column; }
.switch small { color: var(--muted); font-size: .82rem; }

/* ---------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 22px;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .12s var(--ease), opacity .2s, filter .2s, background-color .2s, color .2s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-small { min-height: 38px; padding: 7px 16px; font-size: .88rem; }
.btn-block { width: 100%; margin-top: 14px; }
.btn-ghost { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.btn-icon { padding: 7px 12px; min-width: 38px; }
.btn-danger { background: var(--danger); }
.btn-spotify { background: var(--spotify); color: #06180d; }
.btn.is-done:disabled { background: rgba(var(--accent-rgb), .16); color: var(--accent); opacity: 1; }
.btn.is-busy { color: transparent !important; position: relative; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}

@media (hover: hover) {
  .btn:hover { filter: brightness(1.08); }
  .btn-ghost:hover { background: rgba(var(--accent-rgb), .12); filter: none; }
}

.pill {
  display: inline-block;
  min-width: 26px;
  text-align: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill-live { background: rgba(61, 220, 151, .15); color: var(--ok); }

/* ---------- Song-Listen */
.tracks { list-style: none; margin: 0; padding: 0; }
.track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-height: 64px;
}
.track:last-child { border-bottom: 0; }
.queue .track {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  will-change: transform;
}
.queue .track:last-child { border-bottom: 1px solid var(--line); }
.queue .track.is-mine { border-color: rgba(var(--accent-rgb), .6); background: linear-gradient(90deg, rgba(var(--accent-rgb), .08), var(--card) 60%); }
.track.is-busy { opacity: .5; pointer-events: none; transition: opacity .2s; }
.suggest-card.is-busy { opacity: .6; pointer-events: none; }
.search-error { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
  background: var(--card-2);
}
img.cover { opacity: 0; transition: opacity .3s; }
img.cover.loaded { opacity: 1; }
.cover-empty { display: block; }

.track-info { flex: 1; min-width: 0; }
.track-title, .track-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-title { font-weight: 600; }
.track-artist { color: var(--muted); font-size: .88rem; }
.track-meta {
  font-size: .8rem;
  color: var(--accent-2);
  margin-top: 2px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.track-meta .dedication { font-style: italic; }
.track-meta .guest-name { color: var(--muted); }
.history .status-withdrawn .track-info { opacity: .5; }
.badge-e {
  display: inline-block;
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--muted);
  color: var(--bg);
  font-size: .62rem;
  font-weight: 700;
  vertical-align: 2px;
}
.pos {
  width: 1.5em;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.empty-row { color: var(--muted); padding: 18px 0; text-align: center; border: 0 !important; background: none !important; }
.empty-queue { display: flex; flex-direction: column; gap: 2px; padding: 28px 12px; border: 1.5px dashed var(--line) !important; border-radius: var(--radius-sm); }
.empty-queue strong { color: var(--text); font-weight: 600; }
.mine-tag { font-size: .78rem; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* Schon gelaufen */
.played-section { margin-top: var(--section-gap); }
.played .track { opacity: .8; }
.played .track.is-mine { opacity: 1; }
.played-tag { flex: none; font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.played .is-mine .played-tag { color: var(--ok); }
.played-more { display: flex; margin: 10px auto 0; }

/* ---------- Gastgeber-Bereich */
.host-list { margin-top: var(--section-gap); }
.host-list .section-head h2, .host-picks-section h2 { font-size: 1.05rem; }
.host-result { flex-wrap: wrap; }
.host-result .chips { width: 100%; padding-left: 60px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .12s var(--ease);
}
.chip:active { transform: scale(.95); }
.chip.is-active { border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .16); color: var(--accent); }
.chip-nogo.is-active { border-color: rgba(255, 93, 93, .6); background: rgba(255, 93, 93, .12); color: var(--danger); }
.moment-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.moment-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
}
.track.is-played .track-info { opacity: .55; }
.import-card h2 { font-size: 1.05rem; }
.import-row { flex-wrap: nowrap; }
/* Umschalter „Meine Listen | Playlists“ */
.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.tab.is-active { background: var(--accent); color: #fff; }
.tab.is-active .pill { background: rgba(0, 0, 0, .18); color: #fff; }

/* Aufklappbare Info-Box (deutlich als antippbar erkennbar) */
.info-box {
  margin: 4px 0 14px;
  border: 1px solid rgba(var(--accent-rgb), .45);
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), .07);
}
.info-box summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 600;
}
.info-box summary::-webkit-details-marker { display: none; }
.info-box summary span { flex: 1; }
.info-box summary svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.info-box .chevron { transition: transform .2s var(--ease); }
.info-box[open] .chevron { transform: rotate(90deg); }
.info-box-body { padding: 0 14px 12px 44px; color: var(--muted); font-size: .88rem; }
.info-box-body p { margin-bottom: 6px; }
.info-box-body ol { margin: 0; padding-left: 18px; }
.info-box-body li { margin-bottom: 4px; }

/* Playlist-Kacheln */
.playlist-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.playlist-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}
.playlist-tile .cover { width: 56px; height: 56px; }
.playlist-tile:active { border-color: var(--accent); }
@media (hover: hover) { .playlist-tile:hover { border-color: rgba(var(--accent-rgb), .6); } }
.chevron-right { color: var(--muted); font-size: 1.6rem; line-height: 1; padding: 0 4px; }

/* Playlist-Detail mit Auswahl */
.back-link {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .9rem;
  min-height: 40px;
  padding: 0;
  cursor: pointer;
}
.playlist-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.playlist-head h2 { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.select-bar { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; }
.select-bar .muted { font-size: .85rem; }
.selectable-row { cursor: pointer; -webkit-user-select: none; user-select: none; transition: border-color .15s, background-color .15s; }
.selectable-row.is-selected { border-color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  transition: background-color .15s, border-color .15s;
}
.is-selected .check { background: var(--accent); border-color: var(--accent); }
.is-selected .check::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
/* Schlichte Text-Markierung (statt Emojis), z. B. „Muss“, „Moment“, „Nicht“ */
.tags { flex: none; display: flex; gap: 4px; }
.tag {
  flex: none;
  padding: 2px 8px;
  border: 1px solid rgba(var(--accent-rgb), .5);
  border-radius: 6px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.tag-muted { border-color: var(--line); color: var(--muted); }
.tag-solid { background: var(--accent); border-color: var(--accent); color: #1a1206; }

/* Aktionsleiste unten bei ausgewählten Songs */
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  background: #262626;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
  animation: bulk-in .25s var(--ease);
}
.bulk-bar > span { font-weight: 600; font-size: .85rem; padding: 0 4px; white-space: nowrap; }
.bulk-bar .btn { padding: 7px 12px; }
body.has-bulk-bar .wrap { padding-bottom: 120px; }
@keyframes bulk-in { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.import-row input { flex: 1; min-width: 0; }
.import-preview .track { min-height: 0; padding: 6px 0; }
.import-preview .cover { width: 40px; height: 40px; }
.pin-input { text-align: center; font-size: 1.6rem !important; letter-spacing: .5em; font-weight: 700; padding-left: calc(14px + .5em) !important; }
.host-access { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0 12px; }
.host-access .share-link { margin-bottom: 0; font-size: .9rem; }
.pin-display { color: var(--muted); font-size: .85rem; letter-spacing: .08em; }
.pin-display strong { color: var(--text); font-size: 1.3rem; letter-spacing: .3em; margin-left: 6px; }
.host-access-card .row { justify-content: center; margin-bottom: 4px; }
.host-access-card .switch { margin-top: 12px; }
.host-admin-card .settings-group { display: flex; align-items: center; gap: 8px; }
@media (max-width: 480px) {
  .host-result .chips { padding-left: 0; flex-wrap: nowrap; }
  .host-result .chip { flex: 1; justify-content: center; padding: 6px 8px; }
}

/* Admin: Musikgeschmack des Gastgebers */
.taste-box summary { color: var(--text); }
.taste-list { padding: 0 14px; max-height: 420px; overflow-y: auto; }
.taste-link { padding: 0 14px 10px; margin: 0; }

/* Gäste: „Keine Idee?“-Box mit Playlists des Gastgebers */
.suggestions { display: flex; flex-direction: column; gap: 10px; margin-top: var(--section-gap); }
.suggest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(var(--accent-rgb), .45);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .14), var(--card) 70%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.suggest-card .cover { width: 56px; height: 56px; }
.suggest-card .track-title { white-space: normal; }
.suggest-eyebrow { font-size: .82rem; font-weight: 600; color: var(--accent); }
.suggest-card:active { transform: scale(.99); }
.sheet-tall { max-height: 92vh; max-height: 92dvh; }
.suggest-list .btn { min-width: 104px; }

/* Admin: Abhaken ist die Hauptaktion */
.btn-check { min-width: 112px; }

.like {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  min-width: 64px;
  min-height: var(--tap);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
  padding: 6px 14px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color .2s, border-color .2s, background-color .2s, transform .12s var(--ease);
}
.like .heart { display: block; line-height: 0; }
.like .heart svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round; /* runde Ecken – keine spitzen Überstände am Herz */
  stroke-linecap: round;
  transition: fill .2s;
}
.like.liked { color: var(--accent); border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .14); }
.like.liked .heart svg { fill: currentColor; }
.like:disabled, .like.is-own { opacity: .65; }
.like.is-own { cursor: help; border-style: dashed; }
.like.static { cursor: default; min-height: 34px; min-width: 0; padding: 4px 10px; }
.like:not(:disabled):not(.static):not(.is-own):active { transform: scale(.92); }

/* Lade-Platzhalter */
.skeleton .cover, .sk-line {
  background: linear-gradient(90deg, var(--card-2) 0%, #353535 50%, var(--card-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.sk-line { height: 12px; border-radius: 6px; margin: 6px 0; width: 70%; }
.sk-line.short { width: 40%; }

/* ---------- Gäste-Seite */
.search-card {
  position: sticky;
  top: calc(8px + var(--safe-t));
  z-index: 5;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.search-field { position: relative; display: block; }
.search-field > svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.search-field input { padding-left: 46px; padding-right: 50px; min-height: 52px; font-size: 17px; border-radius: 999px; }
.search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity .2s, color .2s;
}
.search-clear svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.search-field input:placeholder-shown ~ .search-clear { opacity: 0; pointer-events: none; }
.search-clear:active { color: var(--text); }

.results:not(:empty) {
  margin-top: 8px;
  max-height: 52vh;
  max-height: 52svh;           /* „kleine“ Viewport-Höhe: passt auch mit eingeblendeter Tastatur */
  overflow-y: auto;
  overscroll-behavior: contain; /* Scrollen in der Liste schiebt nicht die ganze Seite */
  -webkit-overflow-scrolling: touch;
  margin-right: -8px;
  padding-right: 8px;
}
.results.loading .track:not(.skeleton) { opacity: .55; transition: opacity .2s; }
.results .btn { min-width: 112px; }

.section-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.section-head + .hint { margin-top: -2px; }
/* Suche und Warteschlange sind eigene Bereiche */
.search-card { margin-bottom: 0; }
.search-card + .host-list, .guest-side > .queue-section { margin-top: var(--section-gap); }
.section-head h2 { margin: 0; }

.now-playing {
  display: flex;
  align-items: center;
  gap: 14px;
  border-color: rgba(var(--accent-rgb), .5);
  position: relative;
  overflow: hidden;
}
.now-playing .cover, .now-playing-admin .cover { width: 60px; height: 60px; }
.now-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
}
.np-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .06);
}
.np-bar {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}
.np-bar.paused { background: var(--muted); }

.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.eq i { width: 3px; background: currentColor; border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }

.site-footer { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 56px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { font-weight: 600; text-decoration: none; }
.legal-links { display: flex; justify-content: center; gap: 4px; }
.legal-links a { color: var(--muted); font-weight: 500; padding: 8px 10px; min-height: 36px; display: inline-flex; align-items: center; }
@media (hover: hover) { .legal-links a:hover { color: var(--text); } }

/* Logo links, Admin-Zugang rechts */
.guest-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.guest-topline .brand-logo { margin-bottom: 16px; }
.brand-home { display: block; line-height: 0; border-radius: 8px; }

/* Dezenter Weg zurück zur Code-Eingabe */
.switch-event {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: -10px 0 0 -4px;
  padding: 8px 6px 8px 4px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
}
.switch-event svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .switch-event:hover { color: var(--text); } }
.wrap.center > .switch-event { align-self: flex-start; margin-bottom: 8px; }
.wrap.center > .guest-topline { margin-bottom: 4px; }
.admin-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.admin-shortcut svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-shortcut.is-admin { color: var(--accent); border-color: rgba(var(--accent-rgb), .6); }
@media (hover: hover) { .admin-shortcut:hover { color: var(--text); border-color: var(--muted); } }
.login-back { text-align: center; margin-top: 14px; }
.login-back a { color: var(--muted); text-decoration: none; }
@media (max-width: 480px) { .hide-narrow { display: none !important; } }

.legal h3 { font-size: 1rem; margin: 16px 0 4px; }
.legal ul { padding-left: 20px; margin: 0 0 .75rem; }
.legal li { margin-bottom: 6px; }
.legal p, .legal li { color: #dcdcdc; }

.empty-state { text-align: center; }
.empty-state .brand-logo { margin: 0 auto 16px; }
.empty-state .btn { margin-top: 8px; }

/* Tablet & Desktop: weiterhin eine zentrale Spalte (Suche oben, Liste darunter) – nur etwas breiter */
@media (min-width: 900px) {
  .wrap.guest { max-width: 760px; padding-top: calc(32px + var(--safe-t)); }
  .results:not(:empty) { max-height: 46vh; }
}

/* Kleine Handys (z. B. iPhone SE, Galaxy A-Serie im Zoom-Modus) */
@media (max-width: 374px) {
  :root { --gutter: 12px; --section-gap: 32px; }
  .card { padding: 14px; border-radius: 20px; }
  .track { gap: 10px; }
  .cover { width: 42px; height: 42px; }
  .results .btn { min-width: 0; padding: 7px 12px; }
  .like { min-width: 56px; padding: 6px 10px; }
  .pos { width: 1.2em; }
}

/* Handy quer: Kopfbereich kompakt, damit mehr Liste sichtbar ist */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { padding-bottom: 10px; }
  .hero .brand-logo { height: 32px; margin-bottom: 8px; }
  .hero h1 { font-size: 1.4rem; }
  .hero p { display: none; }
  .results:not(:empty) { max-height: 60svh; }
}

/* ---------- Menü von unten (Bottom Sheet) */
html.sheet-open { overflow: hidden; }
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .3s;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 71;
  max-width: 460px;
  max-height: 88vh;
  max-height: 88dvh;
  margin: 0 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 10px max(22px, var(--safe-r)) calc(22px + var(--safe-b)) max(22px, var(--safe-l));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .5);
  transform: translateY(105%);
  transition: transform .32s var(--ease);
}
.sheet:focus { outline: none; }
.sheet.open { transform: none; }
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 16px; }
.sheet-title { font-size: 1.1rem; margin-bottom: 16px; }
.sheet-track { border: 0; padding: 0 0 8px; min-height: 0; }
.sheet-label { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-weight: 600; font-size: .9rem; }
.sheet-label small { color: var(--muted); font-weight: 400; }
.sheet-label input { font-weight: 400; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.sheet-actions .btn-block { margin-top: 0; min-height: var(--tap); padding: 10px 18px; font-size: .95rem; }
.sheet-actions .btn > span { display: inline-flex; align-items: center; gap: 8px; }
.btn-svg { line-height: 0; }
.btn-svg svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-plain { border-color: transparent; color: var(--muted); }
@media (min-width: 600px) {
  /* Tablet/Desktop: als schwebendes Fenster in der Mitte */
  /* Rundum gleiche Abstände, da hier kein Zieh-Griff oben ist */
  .sheet { bottom: 50%; border-radius: 22px; border-bottom: 1px solid var(--line); padding: 24px; transform: translateY(calc(50% + 40px)); opacity: 0; transition: transform .32s var(--ease), opacity .25s; }
  .sheet.open { transform: translateY(50%); opacity: 1; }
  .sheet-handle { display: none; }
}

/* „⋯“ beim eigenen Wunsch */
.more-btn {
  flex: none;
  width: 40px;
  height: var(--tap);
  margin-right: -8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.more-btn:active { background: var(--card-2); color: var(--text); }

/* „Dein Song läuft!“ */
.celebrate { text-align: center; padding: 6px 0 0; }
.celebrate .cover { width: 140px; height: 140px; border-radius: 18px; margin: 0 auto 16px; display: block; box-shadow: 0 16px 40px rgba(var(--accent-rgb), .35); }
.celebrate h2 { font-size: 1.8rem; margin-bottom: 6px; }
.celebrate-track { margin-bottom: 4px; }
.sheet-celebrate { border-color: rgba(var(--accent-rgb), .6); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; }

/* Kurzanleitung */
.onboard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.onboard-step { display: flex; gap: 12px; align-items: flex-start; }
.onboard-step div { display: flex; flex-direction: column; gap: 1px; }
.onboard-step strong { font-size: .95rem; font-weight: 600; }
.onboard-step span:not(.onboard-num) { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.onboard-num {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Meldungen */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-b));
  z-index: 90;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #1e1e1e;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  transition: transform .3s var(--ease), opacity .3s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.has-action { display: flex; align-items: center; gap: 14px; text-align: left; }
.toast.has-action.show { pointer-events: auto; }
.toast-action {
  flex: none;
  border: 0;
  background: rgba(0, 0, 0, .18);
  color: inherit;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 38px;
  cursor: pointer;
}
.toast.error { background: var(--danger); color: #fff; }

.net-status {
  position: fixed;
  left: 50%;
  top: calc(10px + var(--safe-t));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #2a2a2a;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .85rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  transform: translate(-50%, -150%);
  transition: transform .3s var(--ease);
  white-space: nowrap;
}
.net-status.show { transform: translate(-50%, 0); }
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}

/* ---------- Admin */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-t)) var(--safe-r) 12px var(--safe-l);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 18, 18, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; white-space: nowrap; }
.logo small { color: var(--muted); font-weight: 600; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav form { display: contents; }
.topbar nav button { border: 0; background: none; font-family: inherit; cursor: pointer; }
.topbar nav a, .topbar nav button {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  padding: 10px 12px;
  border-radius: 999px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.topbar nav a:active, .topbar nav button:active { background: var(--card-2); }
@media (hover: hover) { .topbar nav a:hover, .topbar nav button:hover { color: var(--text); } }
.topbar nav small { display: none; }
.nav-toggle { display: none; }

/* Desktop: etwas höhere Leiste, größeres Logo, Menüpunkte größer, fett und weiß */
@media (min-width: 721px) {
  /* Logo und Menü bündig mit dem Inhalt darunter (gleiche Breite wie .wrap der jeweiligen Seite) */
  body.admin { --page-w: 1180px; }
  body.admin:has(.wrap.admin-event) { --page-w: 860px; }
  .topbar {
    padding-top: calc(18px + var(--safe-t));
    padding-bottom: 18px;
    padding-left: max(var(--safe-l), calc((100% - var(--page-w, 1180px)) / 2 + var(--safe-l)));
    padding-right: max(var(--safe-r), calc((100% - var(--page-w, 1180px)) / 2 + var(--safe-r)));
  }
  .topbar .logo img { height: 38px; }
  .topbar nav { gap: 8px; margin-right: -14px; }
  .topbar nav a, .topbar nav button { color: var(--text); font-size: 1.05rem; font-weight: 700; padding: 10px 14px; }
}

/* Desktop: goldener Textmarker-Strich, der beim Drüberfahren von links unter das Wort gleitet */
@media (min-width: 721px) and (hover: hover) {
  .topbar nav a, .topbar nav button { position: relative; isolation: isolate; }
  .topbar nav a::after, .topbar nav button::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 9px;
    right: 9px;
    top: 50%;
    height: .55em;
    margin-top: -.1em;
    border-radius: 2px;
    background: var(--accent);
    opacity: .9;
    transform: scaleX(0) skewX(-12deg);
    transform-origin: left center;
    transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  }
  .topbar nav a:hover::after, .topbar nav button:hover::after,
  .topbar nav a:focus-visible::after, .topbar nav button:focus-visible::after { transform: scaleX(1) skewX(-12deg); }
  .topbar nav a:hover, .topbar nav button:hover { color: var(--text); background: none; }
}
@media (min-width: 721px) and (hover: hover) and (prefers-reduced-motion: reduce) {
  .topbar nav a::after, .topbar nav button::after { transition: none; }
}

/* Handy und kleine Tablets: Burger-Menü, die Punkte klappen als Liste unter der Leiste auf */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    margin-right: -8px;
    border: 0;
    border-radius: 999px;
    background: none;
    cursor: pointer;
  }
  .nav-toggle:active { background: var(--card-2); }
  /* Zwei kräftige, abgerundete Striche: oben lang in Weiß, unten kurz in Gold, rechtsbündig. Geöffnet werden sie zum ✕. */
  .nav-toggle span { position: relative; display: block; width: 24px; height: 14px; }
  .nav-toggle span::before, .nav-toggle span::after {
    content: '';
    position: absolute;
    right: 0;
    height: 3px;
    border-radius: 3px;
    transition: transform .3s var(--ease, ease), width .3s var(--ease, ease), background-color .3s;
  }
  .nav-toggle span::before { top: 0; width: 24px; background: var(--text); }
  .nav-toggle span::after { bottom: 0; width: 14px; background: var(--accent); }
  @media (hover: hover) { .nav-toggle:hover span::after { width: 24px; } }
  .topbar.is-open .nav-toggle span::before { width: 22px; transform: translate(-1px, 5.5px) rotate(45deg); }
  .topbar.is-open .nav-toggle span::after { width: 22px; transform: translate(-1px, -5.5px) rotate(-45deg); }

  .topbar nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 8px calc(8px + var(--safe-r)) 12px calc(8px + var(--safe-l));
    background: rgb(18, 18, 18);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility 0s .18s;
  }
  .topbar.is-open nav { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }
  .topbar nav a, .topbar nav button {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text);
    text-align: left;
  }
  .topbar nav small { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; }
  .topbar nav button { color: var(--muted); }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .topbar nav, .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { transition: none; }
}

.admin .wrap { padding-top: 20px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0 0; font-weight: 600; }
.flash-ok { background: rgba(61, 220, 151, .12); color: var(--ok); border: 1px solid rgba(61, 220, 151, .3); }
.flash-error { background: rgba(255, 93, 93, .12); color: var(--danger); border: 1px solid rgba(255, 93, 93, .3); }
.login-card { max-width: 400px; width: 100%; margin: 0 auto; }
.login-card label.remember, .remember { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: var(--muted); font-size: .9rem; cursor: pointer; }
.remember input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.login-card label { display: block; color: var(--muted); font-size: .9rem; margin: 12px 0 6px; }

.grid-2 { display: grid; gap: 20px; margin-bottom: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid-2.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); }
}
.grid-2 > .card { margin-bottom: 0; }

/* Admin-Eventseite: eine Spalte, zwei klar getrennte Bereiche (Songs / Einstellungen) */
.wrap.admin-event { max-width: 860px; }
/* Sprungziel unterhalb der festen Kopfleiste, damit die Überschrift sichtbar bleibt (Höhe misst admin.js) */
.admin-area { margin-top: 56px; scroll-margin-top: calc(var(--topbar-h, 72px) + 16px); }
.page-head + .admin-area { margin-top: 28px; }
.admin-event .card[id] { scroll-margin-top: calc(var(--topbar-h, 72px) + 16px); }
.area-head { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.area-head h2 { font-size: 1.6rem; margin: 0 0 4px; }
.area-head p { margin: 0; font-size: .92rem; }
.area-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.area-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
@media (hover: hover) { .area-nav a:hover { color: var(--text); border-color: var(--muted); } }

.spotify-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.spotify-card h2 { margin: 0; }
.spotify-card p { margin: 0; color: var(--muted); }
.spotify-status { display: flex; align-items: center; gap: 14px; min-width: 0; }
.spotify-card .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(240, 179, 94, .15); flex: none; }
.spotify-card.is-connected .dot { background: var(--spotify); box-shadow: 0 0 0 4px rgba(30, 215, 96, .15); }

.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* Jedes Event als antippbare Karte (Rahmen + Pfeil rechts), auch ohne Hover auf dem Handy erkennbar */
.event-list a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 40px 12px 14px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.event-list a::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.event-list a:active { background: var(--card-2); }
@media (hover: hover) { .event-list a:hover { background: var(--card-2); border-color: rgba(var(--accent-rgb), .6); } }
.event-list a > div { min-width: 0; }
.event-list strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-list .muted { font-size: .84rem; }
.event-list .pill { flex-shrink: 0; }
/* Schmale Handys: Status unter die Event-Infos statt daneben */
@media (max-width: 520px) {
  .event-list a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; }
  .event-list a > div { width: 100%; }
}

.past-events { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.past-events summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  list-style: none;
}
.past-events summary::-webkit-details-marker { display: none; }
.past-events summary::before { content: "▸"; margin-right: 8px; transition: transform .2s; }
.past-events[open] summary::before { transform: rotate(90deg); }
.event-list .is-past a { opacity: .6; }
.pill-past { background: rgba(255, 93, 93, .14); color: var(--danger); }

.page-head { margin: 4px 0 18px; }
.page-head .back { color: var(--muted); text-decoration: none; font-size: .9rem; display: inline-flex; min-height: 36px; align-items: center; }
.page-head h1 { margin-top: 2px; }

.now-playing-admin { position: relative; }
.now-playing-admin .track { border: 0; padding: 0 0 12px; min-height: 0; }
.now-playing-admin .np-progress { border-radius: 2px; }

.actions { display: flex; gap: 6px; flex: none; }
.history .status-label { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.history .status-removed .track-info { opacity: .5; text-decoration: line-through; }

/* Admin auf Handy & kleinem Tablet: Aktionen in eigene Zeile, volle Breite, große Tippflächen */
@media (max-width: 700px) {
  .admin .queue .track,
  .admin .history .track { flex-wrap: wrap; }
  .admin .queue .actions,
  .admin .history .actions { width: 100%; }
  .admin .queue .actions .btn,
  .admin .history .actions .btn { flex: 1; min-height: var(--tap); }
  .admin .queue .actions .btn-icon { flex: 0 0 var(--tap); }
  .admin .history .status-label { width: 100%; order: 3; padding-left: 60px; margin-top: -6px; }
  .admin .history .actions { order: 4; }
  .logo small { display: none; }
}

.share-card .qr { background: #fff; padding: 14px; border-radius: var(--radius-sm); width: fit-content; margin: 4px auto 12px; }
.share-card .qr canvas { width: min(220px, 60vw) !important; height: auto !important; display: block !important; }
.share-card .qr img { display: none !important; } /* qrcodejs legt zusätzlich ein (leeres) Bild an */
/* Umbruch nur an den <wbr>-Stellen nach „/“ (siehe pretty_link), nicht mitten in Wörtern */
.share-link { display: block; text-align: center; font-size: .9rem; overflow-wrap: normal; word-break: normal; text-wrap: balance; margin-bottom: 12px; font-weight: 600; }
.share-card .row { justify-content: center; }

.danger-card { border-color: rgba(255, 93, 93, .3); }

.settings-card .switch { margin-top: 8px; }
.settings-group {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.share-card .row + .row { margin-top: 8px; }

/* ---------- Admin: Songs des Gastgebers (Uhrzeit, Gespielt, Entfernen in einer Zeile) */
.tag-ok { border-color: rgba(61, 220, 151, .5); color: var(--ok); }
.host-actions { align-items: center; }
.host-actions .time-chip { flex: none; }
.track.host-song.is-played .track-info .track-title,
.track.host-song.is-played .track-info .track-artist,
.track.host-song.is-played .track-info .moment-label { opacity: .55; }
.track.host-song.is-played .track-info { opacity: 1; }
@media (max-width: 700px) {
  .admin .host-song { flex-wrap: wrap; }
  .admin .host-song .host-actions { width: 100%; }
  .admin .host-song .host-actions .btn { flex: 1; min-height: var(--tap); }
  .admin .host-song .host-actions .btn-icon { flex: 0 0 var(--tap); }
  .admin .host-song .host-actions .time-chip { min-height: var(--tap); }
  /* „Bitte nicht spielen“: nur ✕ – bleibt rechts in derselben Zeile */
  .admin .host-song.only-remove { flex-wrap: nowrap; }
  .admin .host-song.only-remove .host-actions { width: auto; }
}

/* ---------- Vorlagen */
.template-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.template-box h3 { margin: 0 0 8px; font-size: 1rem; }
.template-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.template-list li { display: flex; align-items: center; gap: 8px; }
.template-list form { flex: none; }
.template-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
.template-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .template-item:hover { border-color: rgba(var(--accent-rgb), .6); } }
.template-item .chevron-right { color: var(--accent); font-size: 1.3rem; }
.new-event-actions { margin-top: 4px; }

/* ---------- DJ: Song hinzufügen (Wunschliste oder Gastgeber-Listen) */
.dj-add-card .search-field { margin-top: 10px; }
.dj-results:not(:empty) { margin-right: 0; padding-right: 0; overflow-x: hidden; }
@media (max-width: 480px) {
  .dj-results .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-left: 0; }
  .dj-results .chip { justify-content: center; }
}

/* ---------- „Alle anzeigen“ unter langen Listen: sieht aus wie der letzte Eintrag der Liste */
.list-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: var(--tap);
  margin-top: 0;
  padding: 10px 14px;
  border: 1px dashed rgba(var(--accent-rgb), .55);
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), .06);
  color: var(--accent);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.list-more > span:first-child { text-wrap: balance; }
.list-more:active { background: rgba(var(--accent-rgb), .14); }
@media (hover: hover) { .list-more:hover { background: rgba(var(--accent-rgb), .12); border-color: var(--accent); } }
.played .track + .list-more, .played + .list-more { margin-top: 10px; }
.list-more-arrow {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s;
}
.list-more-arrow.is-open { transform: translateY(2px) rotate(-135deg); }

/* ---------- Event-Bild (z. B. Foto des Brautpaars) */
.event-avatar {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  flex: none;
}
.event-title { display: flex; align-items: center; gap: 14px; }
.event-title h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.event-title + p { margin-top: 8px; }
.hero > .event-avatar { margin-bottom: 12px; }
.empty-state .event-avatar { margin: 0 auto 12px; }
.page-title { display: flex; align-items: center; gap: 12px; }
.page-title h1 { margin: 2px 0; min-width: 0; overflow-wrap: anywhere; }
.event-avatar-sm { width: 48px; height: 48px; }
.tv-avatar { width: clamp(80px, 14vh, 160px); height: clamp(80px, 14vh, 160px); margin-bottom: 2vh; border-width: 3px; }

/* Bild hochladen (Admin & Gastgeber) */
.image-edit { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.image-preview {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--card-2);
  border: 2px dashed var(--line);
  color: var(--muted);
  font-size: 1.8rem;
  font-weight: 700;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-preview:has(img) { border: 2px solid var(--accent); }
.image-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Startseite: zuletzt geöffnete Events */
.recent { width: 100%; margin-top: 28px; }
.recent h2 { font-size: 1rem; color: var(--muted); margin: 0 0 10px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.recent-list li { position: relative; }
.recent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 44px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.recent-card:active { background: var(--card-2); }
@media (hover: hover) { .recent-card:hover { border-color: rgba(var(--accent-rgb), .6); } }
.recent-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--accent); }
.recent-avatar.is-initial { display: grid; place-items: center; background: rgba(var(--accent-rgb), .12); color: var(--accent); font-weight: 700; font-size: 1.2rem; }
.recent-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent-text strong, .recent-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-text small { color: var(--muted); font-size: .82rem; }
.recent-text .today { color: var(--ok); font-weight: 600; }
.recent-remove {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

/* ---------- Durchsage vom DJ (Gäste-Seite) */
.announcement {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 14px 14px 16px;
  border: 1px solid rgba(var(--accent-rgb), .6);
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), .12);
}
.announcement p { margin: 0; flex: 1; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.announcement-icon { line-height: 0; color: var(--accent); margin-top: 1px; }
.announcement-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.announcement-close {
  flex: none;
  width: 36px;
  height: 36px;
  margin: -8px -8px -8px 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}
.wrap.center > .announcement { margin-bottom: 12px; }

/* ---------- Song-Battle */
/* Eigener Bereich mit Abstand nach oben (zur Suche) und nach unten (zur Warteschlange) */
.battle-card { border-color: rgba(var(--accent-rgb), .55); margin: var(--section-gap) 0 0; }
.battle-card .section-head { justify-content: space-between; }
.battle-options { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.battle-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .1s;
}
button.battle-option:active { transform: scale(.98); }
.battle-option.is-voted { border-color: var(--accent); background: rgba(var(--accent-rgb), .12); }
.battle-option.is-winner { border-color: var(--ok); background: rgba(61, 220, 151, .1); }
.battle-option:disabled { cursor: default; opacity: 1; }
.battle-vs { align-self: center; color: var(--muted); font-size: .8rem; font-weight: 600; }
/* Ab Tablet-Breite: beide Songs nebeneinander, „oder“ in der Mitte */
@media (min-width: 600px) {
  .battle-options { flex-direction: row; align-items: stretch; }
  .battle-options .battle-option { flex: 1 1 0; min-width: 0; }
}
.battle-bar { height: 6px; margin-top: 8px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.battle-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .5s var(--ease); }
.battle-votes { margin-top: 4px; font-size: .78rem; color: var(--muted); }
.battle-time { white-space: nowrap; }
.battle-admin #battle-live { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.battle-admin #battle-live h3 { margin: 0; font-size: 1rem; }
.battle-admin .battle-options + .btn { margin-top: 10px; }

/* ---------- Wunschkönig */
.leaderboard { list-style: none; margin: 0; padding: 0; }
.leader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.leader.is-first { border-color: rgba(var(--accent-rgb), .6); }
.leader.is-mine { background: rgba(var(--accent-rgb), .1); }
.leader.has-gap { margin-top: 14px; }
.leader-rank {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 700;
}
.leader.is-first .leader-rank { border-color: var(--accent); color: var(--accent); }
.leader-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-likes { flex: none; color: var(--muted); font-size: .85rem; }

/* ---------- Gäste: Link teilen, Bewertung, Wünsche mit Markierung */
.share-row { display: flex; justify-content: center; margin-top: var(--section-gap); }
.share-row .btn { display: inline-flex; align-items: center; gap: 8px; }
.share-row svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.review-card { text-align: center; margin-top: 8px; }
.review-card p { color: var(--muted); }
.track-info .tags { margin-bottom: 4px; flex-wrap: wrap; }
.queue .track.is-pending { opacity: .7; border-style: dashed; }
.queue .track.is-pinned { border-color: rgba(var(--accent-rgb), .6); }
.admin .queue .track.is-parked .track-info { opacity: .6; }

/* ---------- Uhrzeit-Auswahl (große Knöpfe) */
.tp-display { text-align: center; font-size: 2rem; font-weight: 700; letter-spacing: .03em; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.tp-label { margin: 12px 0 6px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tp-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .12s, border-color .12s;
}
.tp-btn.is-active { background: var(--accent); border-color: var(--accent); color: #1a1206; }
.tp-btn:active { transform: scale(.96); }
.tp-note { min-height: 1.2em; margin: 10px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }

/* Uhrzeit-Knopf an Momenten und im Zeitplan */
.time-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid rgba(var(--accent-rgb), .6);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .1);
  color: var(--accent);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
}
.time-chip.is-empty { border-color: var(--line); background: none; color: var(--muted); }
.time-chip .btn-svg svg { width: 16px; height: 16px; }
.time-btn { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.time-btn.is-set { border-color: var(--accent); color: var(--accent); }
/* Handy: Uhrzeit in eine eigene Zeile unter den Titel, Titel bleibt lesbar */
@media (max-width: 480px) {
  .track.has-time { flex-wrap: wrap; row-gap: 8px; }
  .track.has-time .track-info { flex: 1 1 calc(100% - 130px); }
  .track.has-time .played-tag { order: 4; }
  .track.has-time .time-chip { order: 5; margin-left: 60px; }
}

/* ---------- Gastgeber: Notiz & „fertig“ */
.note-input { min-height: 96px; }
.note-status { min-height: 1.2em; }
.done-card { margin-top: var(--section-gap); text-align: center; }
.done-card.is-done { border-color: rgba(61, 220, 151, .4); }

/* ---------- Admin: Ablauf */
.section-head .section-action { margin-left: auto; }
.pill-warn { background: rgba(240, 179, 94, .18); color: var(--warn); }
.pending-card { border-color: rgba(240, 179, 94, .45); }
.host-note-text { margin: 0; white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.announce-current { margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(var(--accent-rgb), .1); }
.announce-current p { margin: 2px 0 0; font-weight: 600; }

.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline-day { margin: 16px 0 6px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.timeline-day:first-child { margin-top: 0; }
.timeline-item { display: grid; grid-template-columns: 52px 14px 1fr; gap: 10px; align-items: start; padding: 8px 0; position: relative; }
.timeline-item::before { content: ""; position: absolute; left: 68px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline-time { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 1px; }
.timeline-dot { width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 2px solid var(--muted); background: var(--card); position: relative; z-index: 1; }
.timeline-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.timeline-body span:not(.tag):not(.played-tag) { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.timeline-body .tag { align-self: flex-start; }
.timeline-item.type-open .timeline-dot { border-color: var(--ok); }
.timeline-item.type-close .timeline-dot { border-color: var(--danger); }
.timeline-item.is-past { opacity: .5; }
.timeline-item.is-next .timeline-dot { border-color: var(--accent); background: var(--accent); }
.timeline-item.is-next .timeline-time { color: var(--accent); }

.schedule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.schedule-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; }
.schedule-text small { color: var(--muted); font-size: .85rem; }
.schedule-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Admin: Statistik */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.stat strong { font-size: 1.7rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.bars { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bars li { display: grid; grid-template-columns: 64px 1fr 36px; gap: 10px; align-items: center; font-size: .88rem; }
.bar { height: 10px; border-radius: 5px; background: var(--card-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bar-label { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank-list { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: rank; }
.rank-list li { counter-increment: rank; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li::before { content: counter(rank); flex: none; width: 20px; color: var(--muted); font-weight: 700; }
.rank-list li > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rank-list strong, .rank-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list small { color: var(--muted); }
.souvenir-card .row { margin-top: 6px; }

/* ---------- Beamer-/TV-Ansicht */
.tv-body { background: #0d0d0d; overflow: hidden; }
html:has(.tv-body) { scrollbar-gutter: auto; } /* Beamer: kein reservierter Streifen für die Scrollleiste am rechten Rand */
.tv {
  display: grid;
  grid-template-columns: minmax(280px, 28vw) minmax(0, 1fr);
  gap: 3vw;
  height: 100vh;
  height: 100dvh;
  padding: 3vw;
}
.tv-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5vw;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--line);
}
.tv-logo { height: clamp(40px, 6vh, 80px); width: auto; margin-bottom: 2vh; filter: invert(1); }
.tv-title { margin: 0; font-size: clamp(1.5rem, 2.6vw, 3rem); line-height: 1.15; overflow-wrap: anywhere; }
.tv-lead { margin: 1vh 0 3vh; color: var(--accent); font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.6rem); }
.tv-qr { background: #fff; padding: 14px; border-radius: 18px; width: min(22vw, 40vh); }
.tv-qr canvas { width: 100% !important; height: auto !important; display: block !important; }
.tv-qr img { display: none !important; }
.tv-url { margin: 2vh 0 0; font-weight: 600; font-size: clamp(.9rem, 1.2vw, 1.3rem); text-wrap: balance; }
.tv-steps { margin: 1vh 0 0; color: var(--muted); font-size: clamp(.85rem, 1vw, 1.1rem); }
.tv-main { display: flex; flex-direction: column; gap: 2.2vh; min-height: 0; overflow: hidden; }
.tv-announcement, .tv-closed {
  padding: 2vh 2vw;
  border-radius: 20px;
  font-size: clamp(1.2rem, 2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
}
.tv-announcement { background: rgba(var(--accent-rgb), .16); border: 2px solid var(--accent); }
.tv-closed { background: var(--card); border: 1px solid var(--line); color: var(--muted); }
/* minmax(0, …): Spalten dürfen schmaler werden als ihr Inhalt, lange Titel werden dann mit „…“ gekürzt statt abgeschnitten */
.tv-columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3vw; min-height: 0; flex: 1; }
.tv-columns > div { min-width: 0; min-height: 0; overflow: hidden; }
/* Reicht der Platz nicht (z. B. Durchsage + Battle gleichzeitig), läuft die Liste unten weich aus statt hart abgeschnitten */
.tv-columns { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent); }
.tv-time, .tv-likes, .tv-tag, .tv-pos { flex: none; }
.tv-h { margin: 0 0 1.5vh; font-size: clamp(1rem, 1.4vw, 1.6rem); color: var(--muted); font-weight: 600; }
.tv-list { list-style: none; margin: 0 0 3vh; padding: 0; display: flex; flex-direction: column; gap: 1.2vh; }
.tv-item {
  display: flex;
  align-items: center;
  gap: 1.2vw;
  padding: 1.2vh 1.2vw;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}
.tv-item.is-pinned { border-color: var(--accent); }
.tv-item .cover { width: clamp(40px, 5.4vh, 76px); height: clamp(40px, 5.4vh, 76px); border-radius: 12px; }
.tv-pos { width: 1.6em; text-align: center; font-weight: 700; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.8rem); }
.tv-info { flex: 1; min-width: 0; }
.tv-song { font-weight: 700; font-size: clamp(1rem, 1.6vw, 2rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-artist { color: var(--muted); font-size: clamp(.85rem, 1.2vw, 1.4rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-meta { color: var(--accent-2); font-size: clamp(.8rem, 1vw, 1.2rem); margin-top: .3vh; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-likes { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: clamp(.9rem, 1.3vw, 1.5rem); }
.tv-likes .heart svg { width: 1em; height: 1em; fill: currentColor; stroke: currentColor; }
.tv-tag { padding: 4px 12px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 600; font-size: clamp(.8rem, 1vw, 1.1rem); white-space: nowrap; }
.tv-tags { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tv-tag.is-muted { border-color: var(--line); color: var(--muted); }
.tv-tag.is-solid { background: var(--accent); color: #1a1206; }
.tv-time { color: var(--muted); font-weight: 600; font-size: clamp(.85rem, 1.1vw, 1.3rem); }
.tv-played .tv-item { opacity: .75; }
.tv-empty { color: var(--muted); font-size: clamp(.9rem, 1.2vw, 1.4rem); padding: 2vh 0; }
.tv-leaders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1vh; }
.tv-leaders li { display: flex; align-items: center; gap: 1vw; font-size: clamp(1rem, 1.3vw, 1.5rem); font-weight: 600; }
.tv-leaders li > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-rank { width: 1.8em; height: 1.8em; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-size: .9em; }
.tv-battle { padding: 2vh 2vw; border-radius: 22px; border: 2px solid var(--accent); background: var(--card); }
.tv-battle-head { display: flex; justify-content: space-between; align-items: center; gap: 2vw; font-size: clamp(1.1rem, 1.7vw, 2rem); margin-bottom: 1.5vh; }
.tv-countdown { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.tv-battle-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5vw; align-items: center; }
.tv-battle-side { display: flex; align-items: center; gap: 1vw; padding: 1.2vh 1vw; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.tv-battle-side.is-winner { border-color: var(--ok); }
.tv-battle-side .cover { width: clamp(48px, 7vh, 96px); height: clamp(48px, 7vh, 96px); }
.tv-vs { color: var(--muted); font-weight: 700; font-size: clamp(.9rem, 1.2vw, 1.4rem); }
.tv-bar { height: 10px; margin-top: 1vh; border-radius: 5px; background: var(--card-2); overflow: hidden; }
.tv-bar span { display: block; height: 100%; background: var(--accent); transition: width .6s var(--ease); }
.tv-fullscreen {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 18, 18, .8);
  color: var(--muted);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  opacity: .5;
}
.tv-fullscreen:hover { opacity: 1; }
:fullscreen .tv-fullscreen { display: none; }
/* Hochkant (z. B. Tablet am Eingang): QR oben, Liste darunter */
@media (orientation: portrait) {
  .tv-body { overflow: auto; }
  .tv { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .tv-qr { width: min(50vw, 320px); }
  .tv-columns { grid-template-columns: 1fr; }
}

/* ---------- Animationen */
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .toast, .net-status, .btn, .like, .switch input::after { transition-duration: .01ms !important; }
  .eq i { height: 8px; }
}
