/* SongRewind – Oberfläche. Dunkler Party-Look, Vinyl-Motiv. Alles Wichtige passt ohne Scrollen auf den Bildschirm. */
:root {
  --bg: #14121C; --s1: #1E1B29; --s2: #282437; --s3: #2E2A3D; --line: #3A3550;
  --ink: #F4F1EA; --muted: #B3ADC4; --faint: #8F89A3;
  --acc: #FF8A3D; --acc-ink: #1A1208; --acc-soft: #3A2A1F; --acc-light: #FFB07A;
  --ok: #4FD1C5; --ok-soft: #173532; --ok-light: #8EEDE3;
  --bad: #FF8A80; --gold: #F5C542; --gold-soft: #3A3014; --purple: #A78BFA;
  --r: 16px; --head: 'Space Grotesk', Inter, system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
@font-face { font-family: 'Space Grotesk'; src: url(fonts/space-grotesk-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url(fonts/space-grotesk-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 16px/1.4 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acc); }
h1, h2, h3 { font-family: var(--head); margin: 0; line-height: 1.1; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.err { color: var(--bad); margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; } .row { display: flex; gap: 10px; align-items: center; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; } .hidden { display: none !important; }

/* Bildschirm-Gerüst: volle Höhe, Inhalt scrollt nur innen */
.screen { height: 100dvh; display: flex; flex-direction: column; padding: calc(12px + var(--safe-t)) 16px calc(12px + var(--safe-b)); gap: 12px; overflow: hidden; max-width: 1440px; margin: 0 auto; }
.screen > .scroll, #g-body > .scroll { flex: 1; min-height: 0; overflow: auto; }
.scroll { min-height: 0; overflow: auto; }
#g-body { overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 44px; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 20px var(--head); }
.brand .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--acc); display: grid; place-items: center; flex: none; }
/* Logo und Schriftzug */
.logo-big { width: min(42vw, 180px); height: auto; aspect-ratio: 1; filter: drop-shadow(0 10px 30px rgba(255, 122, 46, .18)); animation: logo-in .7s cubic-bezier(.2,.8,.2,1) both; }
.logo-sm { width: 34px; height: 34px; flex: none; }
.wm { font-family: var(--head); font-weight: 700; letter-spacing: -.02em; }
.wm b { font-weight: 700; background: linear-gradient(100deg, #FFB07A, #FF8A3D 45%, #E86A8F); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes logo-in { from { opacity: 0; transform: rotate(40deg) scale(.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .logo-big { animation: none; } }
.actions { display: flex; gap: 10px; flex: none; flex-wrap: wrap; }
.actions .btn { flex: 1; }

/* Knöpfe & Felder (mind. 44 px Tippfläche) */
.btn { min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--acc); color: var(--acc-ink); border: none; font: 700 17px var(--head); }
.btn.ok { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.btn.big { min-height: 60px; font-size: 19px; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.icon { width: 44px; padding: 0; flex: none; }
.btn:focus-visible, .gap:focus-visible, .chip:focus-visible, input:focus-visible { outline: 3px solid var(--acc-light); outline-offset: 2px; }
input, select, textarea { min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--s1); padding: 0 14px; width: 100%; }
textarea { padding: 12px 14px; min-height: 90px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.card { background: var(--s1); border-radius: 20px; padding: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--s2); font-size: 14px; }
.pill.acc { background: var(--acc-soft); color: var(--acc-light); font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* Vinyl */
.disc { border-radius: 50%; background: repeating-radial-gradient(circle, #1B1924 0 2px, #262331 2px 4px); display: grid; place-items: center; flex: none; width: 120px; height: 120px; }
.disc .label { width: 40%; height: 40%; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font: 700 18px var(--head); text-align: center; }
.disc.big { width: min(42vw, 180px); height: min(42vw, 180px); }
.disc.gold { background: repeating-radial-gradient(circle, #C9971F 0 2px, #E2B23A 2px 4px); }
.disc.gold .label { background: var(--bg); color: var(--gold); }
.disc.spin { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .disc.spin { animation: none; } }

/* Avatare */
.av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #14121C; font-weight: 700; flex: none; font-size: 15px; }
.av.lg { width: 56px; height: 56px; font: 700 22px var(--head); }
.av.xl { width: 88px; height: 88px; font: 700 36px var(--head); }
.needles { display: inline-flex; gap: 3px; vertical-align: middle; }
.needles i { width: 7px; height: 20px; border-radius: 4px; background: var(--acc); display: block; }
.needles i.off { background: var(--line); }

/* Login & Start */
.login, .home { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; max-width: 420px; margin: 0 auto; }
.login form, .home .stack { width: 100%; }
.home h1 { font-size: 40px; }

/* Plattenregal (Zeitstrahl) */
.shelf { display: flex; gap: 6px; }
.shelf.v { flex-direction: column; }
.shelf.h { flex-direction: row; align-items: stretch; overflow-x: auto; padding-bottom: 4px; }
.single { background: var(--s2); border-radius: 12px; padding: 8px 12px; display: flex; gap: 12px; align-items: center; min-height: 52px; }
.single .y { font: 700 22px var(--head); color: var(--acc); min-width: 58px; }
.single .t { font-weight: 600; font-size: 14px; line-height: 1.25; }
.single .a { color: var(--muted); font-size: 12.5px; }
.single.new { background: var(--ok-soft); outline: 2px solid var(--ok); }
.single.new .y { color: var(--ok-light); }
.shelf.h .single { flex: 1 1 0; min-width: 0; max-width: 190px; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 84px; padding: 10px 10px; overflow: hidden; }
.shelf.h .single > span:last-child { min-width: 0; width: 100%; }
.shelf.h .single .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf.h .single .a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf.h .single .y { min-width: 0; font-size: 20px; }
.gap { min-height: 44px; border-radius: 12px; border: 2px dashed var(--line); background: transparent; color: var(--faint); font-weight: 600; font-size: 13px; cursor: default; display: flex; align-items: center; justify-content: center; padding: 4px 8px; text-align: center; }
.shelf.h .gap { min-width: 30px; flex: none; }
.gap.pick { cursor: pointer; }
.gap.pick:hover { border-color: var(--muted); color: var(--ink); }
.gap.sel { border-style: solid; border-color: var(--acc); background: var(--acc-soft); color: var(--acc-light); }
.shelf.h .gap.sel, .shelf.h .gap.mark { min-width: 80px; flex: 0 1 110px; }
.gap.mark { border-style: solid; }
.gap.taken { opacity: .9; }
.shelf.v .gap.idle { min-height: 0; height: 2px; border: 0; padding: 0; }
.shelf.h .gap.idle { min-width: 4px; border: 0; padding: 0; }

/* Abgedeckter Spotify-Player */
.player { position: relative; height: 152px; border-radius: 16px; overflow: hidden; background: var(--s2); flex: none; }
.player.compact { height: 80px; }
.player .embed, .player iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.player .cover { position: absolute; top: 0; left: 0; bottom: 0; right: var(--free, 84px); background: var(--s3); border-right: 2px dashed var(--acc); display: flex; align-items: center; gap: 16px; padding: 0 18px; z-index: 2; }
.player .cover .disc { width: 96px; height: 96px; }
.player.compact .cover .disc { width: 56px; height: 56px; }
.player .cover .prog { height: 6px; border-radius: 3px; background: var(--s2); width: 100%; overflow: hidden; }
.player .cover .prog b { display: block; height: 100%; width: 0; background: var(--acc); transition: width .4s linear; }
.player.revealed .cover { display: none; }
.player .free-hint { position: absolute; right: 4px; bottom: 4px; z-index: 1; font-size: 10px; color: var(--muted); pointer-events: none; }

/* Countdown-Ring */
.ring { --p: 1; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--acc) calc(var(--p) * 360deg), var(--line) 0); display: grid; place-items: center; flex: none; }
.ring > span { width: calc(100% - 20px); height: calc(100% - 20px); border-radius: 50%; background: var(--bg); display: grid; place-items: center; font: 700 40px var(--head); }
.ring.sm { width: 64px; height: 64px; } .ring.sm > span { width: calc(100% - 12px); height: calc(100% - 12px); font-size: 20px; background: var(--s1); }
.banner { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 16px; background: var(--acc-soft); }
.banner.ok { background: var(--ok-soft); border: 2px solid var(--ok); }
.banner.bad { background: #3A1F22; border: 2px solid var(--bad); }
.banner h2 { font-size: 22px; }

/* Spielbrett-Layout für große Bildschirme */
.board { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.board .main { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow: auto; }
.board .side { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
.standing { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--s2); }
.standing.active { outline: 2px solid var(--acc); }
.bar { height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; } .bar b { display: block; height: 100%; }
.lobby { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.lobby > * { min-height: 0; overflow: auto; }
.qr { background: #fff; border-radius: 16px; padding: 10px; width: min(100%, 240px); aspect-ratio: 1; }
.qr svg { width: 100%; height: 100%; display: block; }
.code { font: 700 44px var(--head); letter-spacing: 6px; color: var(--acc); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; align-content: start; }
.choice { min-height: 120px; border-radius: 20px; border: 2px solid var(--line); background: var(--s2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 600; }
.choice.first { border-color: var(--acc); background: var(--acc-soft); }
.list { display: flex; flex-direction: column; gap: 8px; }
.li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--s2); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg button { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--s1); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); font-weight: 600; }
/* Playlist-Karte: Haken · Cover · Name/Zahlen · Knöpfe (Knöpfe rutschen auf schmalen Bildschirmen in eine eigene Zeile) */
.pl { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 12px; border-radius: 16px; background: var(--s1); border: 2px solid transparent; cursor: pointer; text-align: left; width: 100%; min-width: 0; }
.pl[aria-checked="true"], .pl[aria-pressed="true"] { border-color: var(--acc); background: linear-gradient(90deg, var(--acc-soft), var(--s1) 60%); }
.pl:focus-visible { outline: 3px solid var(--acc-light); outline-offset: 2px; }
.pl-check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--acc-ink); flex: none; }
.pl[aria-checked="true"] .pl-check { background: var(--acc); border-color: var(--acc); }
.pl-info { min-width: 0; overflow-wrap: anywhere; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pl-actions:empty { display: none; }
@media (max-width: 699px) {
  .pl { grid-template-columns: auto auto minmax(0, 1fr); }
  .pl-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--s1); color: var(--ink); cursor: pointer; font: 500 14px Inter, system-ui, sans-serif; }
.chip.sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.chip[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 600; }
.pl .disc { width: 48px; height: 48px; } .pl .disc .label { font-size: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.podium .col { display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(28vw, 180px); }
.podium .step { width: 100%; border-radius: 14px 14px 0 0; background: var(--s2); display: grid; place-items: center; font: 700 40px var(--head); color: var(--muted); }
.podium .step.g { background: var(--gold-soft); color: var(--gold); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t td, table.t th { padding: 10px 8px; border-top: 1px solid var(--s3); text-align: left; vertical-align: top; }
.cand { display: inline-block; margin: 2px; }

#toast { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b) + var(--bugbar, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: 90vw; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 70; }
#toast.on { opacity: 1; }
dialog { background: var(--s1); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; max-width: 520px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }

/* Kleine Bildschirme */
@media (max-width: 899px) {
  .board { grid-template-columns: 1fr; }
  .board .side { display: none; }
  .lobby { grid-template-columns: 1fr; overflow: auto; }
  .player { height: 80px; }
  .player .cover .disc { width: 56px; height: 56px; }
  .player .cover .small { display: none; }
  .code { font-size: 34px; }
}
@media (max-height: 700px) {
  .disc.big { width: 120px; height: 120px; }
  .ring { width: 96px; height: 96px; }
}

/* Coverbilder und Listen (1.3) */
.cover-img { border-radius: 10px; object-fit: cover; flex: none; background: var(--s2); }
ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; max-height: 40vh; overflow: auto; }
section.stack h2 .pill { font-size: 13px; padding: 2px 10px; vertical-align: middle; }

/* Aktionsleiste im Spiel: Knöpfe nicht über die ganze Breite ziehen */
#g-foot { width: 100%; max-width: 560px; margin-inline: auto; justify-content: center; }
#g-foot .btn.big { min-height: 54px; font-size: 18px; }
@media (min-width: 700px) { #g-foot .btn { flex: 0 1 auto; min-width: 220px; padding: 0 32px; } }

/* Zeitstrahl kompakt, damit er ohne Scrollen ganz zu sehen ist */
.shelf.h { overflow-x: hidden; }
.shelf.v .single { min-height: 40px; padding: 6px 12px; gap: 10px; }
.shelf.v .single .y { font-size: 18px; min-width: 48px; }
.shelf.v .single > span:last-child { min-width: 0; display: flex; gap: 6px; align-items: baseline; overflow: hidden; }
.shelf.v .single .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.shelf.v .single .a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.shelf.v .single .a::before { content: '· '; }
.shelf.v .gap { min-height: 34px; }
.shelf.v { gap: 4px; }
/* Aufdecken: Player schrumpft, Platz für den Zeitstrahl */
.player.revealed { height: 80px; }
@media (max-height: 900px) { .player { height: 80px; } .player .cover .disc { width: 56px; height: 56px; } .player .cover .small { display: none; } }
.reveal-head { display: flex; align-items: center; gap: 16px; flex: none; }
.reveal-head .disc { width: 84px; height: 84px; flex: none; }
.reveal-head .disc .label { font-size: 14px; width: 62%; height: 62%; }
.reveal-head h1 { font-size: clamp(22px, 3.2vw, 34px); line-height: 1.1; }
.reveal-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 10px 16px; flex: none; }
@media (max-width: 899px) {
  .reveal-head .disc { width: 60px; height: 60px; } .reveal-head .disc .label { font-size: 11px; width: 70%; height: 70%; }
}
@media (max-width: 699px) {
  /* Schmal: Zeitstrahl bricht in Zeilen um, kompakte Karten */
  .shelf.h { flex-wrap: wrap; row-gap: 8px; gap: 4px; }
  .shelf.h .single { flex: 0 0 auto; width: 84px; min-height: 62px; padding: 6px 8px; gap: 1px; }
  .shelf.h .single .y { font-size: 17px; }
  .shelf.h .single .t { font-size: 11.5px; line-height: 1.2; }
  .shelf.h .single .a { display: none; }
  .shelf.h .gap { min-width: 26px; min-height: 62px; padding: 2px; }
  .shelf.h .gap.idle { min-width: 2px; }
  .shelf.h .gap.sel, .shelf.h .gap.mark { min-width: 84px; flex: 0 0 84px; font-size: 12px; }
  #g-foot .btn:not(.primary) { flex: 1 1 40%; min-height: 44px; font-size: 14px; padding: 0 12px; white-space: normal; }
}

/* Zeitstrahl-Legende */
.tl { display: flex; flex-direction: column; gap: 6px; }
.tl-legend { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.tl-line { flex: 1; height: 2px; border-radius: 1px; background: linear-gradient(90deg, var(--line), var(--acc) 50%, var(--line)); opacity: .6; }
/* Spotify-Anmeldung */
.sp-card { background: var(--s2); }
.sp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.sp-card.ok .sp-dot { background: var(--ok); }
.sp-card.bad { border: 1px solid var(--bad); }
.sp-card.bad .sp-dot { background: var(--bad); }
main.home .sp-card { max-width: 420px; width: 100%; }

/* Info-Knöpfe mit Erklärung */
.info { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; min-height: 0; padding: 0; margin-left: 4px; border-radius: 50%; border: 1px solid var(--muted); background: transparent; color: var(--muted); font: 700 12px/1 var(--head); cursor: help; vertical-align: middle; flex: none; }
.info:hover, .info.open { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.info::after { content: attr(data-tip); position: absolute; z-index: 50; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: min(300px, 80vw); padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--bg, #14121C); font: 500 13px/1.4 var(--body, system-ui); text-align: left; white-space: normal; box-shadow: 0 8px 30px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .15s; }
.info:hover::after, .info.open::after { opacity: 1; }
dialog .info::after { left: auto; right: -10px; transform: none; }

/* Spielregeln */
.rule-step { display: flex; gap: 14px; align-items: flex-start; }
.rule-no { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font: 700 16px var(--head); }
.shot-btn { position: relative; display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--muted); border-radius: 999px; background: transparent; color: var(--acc-light, #FFB07A); padding: 4px 10px; font-size: 13px; cursor: zoom-in; }
.shot-pop { position: absolute; z-index: 60; left: 0; bottom: calc(100% + 8px); width: min(280px, 70vw); border-radius: 16px; overflow: hidden; border: 2px solid var(--acc); box-shadow: 0 12px 40px rgba(0,0,0,.6); background: var(--bg); opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .15s, transform .15s; }
.shot-pop img { display: block; width: 100%; height: auto; }
.shot-btn:hover .shot-pop, .shot-btn.open .shot-pop { opacity: 1; transform: none; }
.shot-btn.wide .shot-pop { width: min(520px, 86vw); }
/* Tutorial */
.coach { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, rgba(255,138,61,.16), rgba(232,106,143,.12)); border: 1px solid rgba(255,138,61,.45); line-height: 1.45; flex: none; }
.coach-av { font-size: 26px; line-height: 1; }
.player.compact iframe.embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Vergebene Farben */
.swatch.taken { opacity: .35; cursor: not-allowed; position: relative; }
.swatch.taken::after { content: ''; position: absolute; left: 10%; right: 10%; top: 50%; height: 3px; background: var(--bg); transform: rotate(-45deg); border-radius: 2px; }
/* QR-Scanner */
.qr-video { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 1; }
.qr-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-frame { position: absolute; inset: 18%; border: 3px solid var(--acc); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
/* Info-Erklärung in Formularen: unter dem ganzen Feld statt seitlich (wird nicht abgeschnitten) */
.f > span:has(.info), label.row:has(.info) { position: relative; }
.f > span .info, label.row .info { position: static; }
.f > span .info::after, label.row .info::after, dialog .f > span .info::after, dialog label.row .info::after { left: 0; right: 0; top: calc(100% + 4px); transform: none; width: auto; max-width: none; }

/* Abstand, damit die Umrandung der neuen Single nicht abgeschnitten wird */
.shelf.h { padding: 4px 3px 6px; }
.tl { gap: 8px; }
/* Nadel-Anzeige oben beschriftet */
.needle-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.needle-tag b { color: var(--ink); }
/* Klartext zur gewählten Lücke */
.gap-ctx { flex: none; padding: 10px 14px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.gap-ctx b { color: var(--acc-light); }
/* Handy hochkant: gewählte Lücke bleibt schmal (kein Umbruch), Markierung per Stern */
@media (max-width: 699px) {
  .shelf.h .single { width: 78px; }
  .shelf.h .gap { min-width: 22px; }
  .shelf.h .gap.pick.sel { min-width: 22px; flex: 0 0 22px; font-size: 0; background: var(--acc); border-color: var(--acc); }
  .shelf.h .gap.pick.sel::after { content: '★'; font-size: 16px; color: var(--acc-ink); }
  .shelf.h { row-gap: 10px; }
  .needle-tag .needles { display: none; }
}
/* Querformat auf Handys und kleinen Tablets: alles kompakter, damit es ohne Scrollen passt */
@media (orientation: landscape) and (max-height: 560px) {
  .screen { padding-top: calc(6px + var(--safe-t)); padding-bottom: calc(6px + var(--safe-b)); gap: 6px; }
  .topbar { min-height: 36px; }
  .brand { font-size: 17px; } .logo-sm { width: 26px; height: 26px; }
  .btn.icon { width: 38px; height: 38px; min-height: 38px; }
  .player, .player.compact, .player.revealed { height: 56px; }
  .player .cover .disc { width: 40px; height: 40px; }
  .player .cover b { font-size: 16px !important; }
  .player + .row { margin-top: 0 !important; }
  h1 { font-size: 22px; } h2 { font-size: 18px; }
  .av.lg { width: 38px; height: 38px; font-size: 18px; }
  .reveal-head .disc { width: 52px; height: 52px; } .reveal-head h1 { font-size: 22px; }
  .reveal-sum { padding: 6px 12px; } .banner { padding: 8px 12px; }
  .guess-ask { padding: 6px 12px !important; }
  .shelf.h .single { min-height: 56px; padding: 5px 8px; gap: 1px; }
  .shelf.h .single .t { -webkit-line-clamp: 1; }
  .shelf.h .single .a { display: none; }
  .shelf.h .gap { min-height: 56px; }
  .shelf.h .single .y { font-size: 17px; }
  .gap-ctx { padding: 6px 12px; font-size: 14px; }
  #g-foot { max-width: none; flex-wrap: nowrap; }
  #g-foot .btn { min-height: 42px; min-width: 0 !important; padding: 0 12px !important; flex: 1 1 auto !important; white-space: nowrap; }
  #g-foot .btn.primary { flex: 2 1 auto !important; }
  #g-player .row.small, .turn-hint { display: none; }
  .gap-ctx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gap-ctx .muted { display: none; }
  .row > .av.lg + .grow h2 { font-size: 17px; }
  .scroll { min-height: 70px; }
  #g-foot .btn.big { min-height: 44px; font-size: 16px; }
  .ring { width: 64px; height: 64px; }
  .disc.big { width: 110px; height: 110px; }
  main.home { gap: 8px; } .logo-big { width: 90px; }
}

/* ---------- Nutzerkonto & Statistik ---------- */
.acct-chip { background: var(--s2); border: 1px solid var(--s3); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 14px var(--body, inherit); cursor: pointer; }
.acct-chip:hover { border-color: var(--acc); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--s2); border: 1px solid var(--s3); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font: 700 26px var(--head); color: var(--acc); line-height: 1.1; }
.stat span { font-size: 14px; font-weight: 600; }
.stat small { font-size: 12px; color: var(--muted); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.acct-page > * { flex: none; }
.disc .label.rw { background: linear-gradient(135deg, #FFC08A, #FF7A2E); }
.disc .label.rw svg { width: 62%; height: 62%; display: block; }

/* ---------- Beta-Leiste & Fehlermeldung ---------- */
:root { --bugbar: 0px; }
html.has-bugbar { --bugbar: 32px; }
html.has-bugbar .screen { height: calc(100dvh - var(--bugbar)); }
html.has-bugbar .login, html.has-bugbar .home { min-height: calc(100dvh - var(--bugbar)); }
#bugbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bugbar) + var(--safe-b)); padding: 0 12px calc(var(--safe-b) + 6px); display: flex; align-items: center; justify-content: flex-end; gap: 8px; z-index: 50; pointer-events: none; }
#bugbar > * { pointer-events: auto; }
#bugbar .beta { font: 700 10px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--s3); border-radius: 999px; padding: 2px 8px; opacity: .8; }
#bug-btn { background: transparent; border: 1px solid var(--s3); color: var(--faint); border-radius: 999px; padding: 2px 10px; font: 600 11px var(--body, inherit); cursor: pointer; min-height: 0; line-height: 1.5; opacity: .85; }
#bug-btn:hover, #bug-btn:focus-visible { color: var(--ink); border-color: var(--acc); opacity: 1; }
.bug-dlg { width: min(560px, calc(100vw - 24px)); }
.bug-dlg textarea { min-height: 110px; }
.bug-shot { display: block; margin-top: 6px; max-width: 100%; max-height: 180px; border-radius: 10px; border: 1px solid var(--s3); }
@media (max-width: 520px) { .bug-dlg .grid2 { grid-template-columns: 1fr; } }


/* ---------- Startseite: zwei Spalten, alles ohne Scrollen ---------- */
.home.home2 { max-width: 1040px; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; text-align: left; padding: 24px 28px; }
.home2 .home-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.home2 .home-actions { width: 100%; max-width: 440px; justify-self: center; }
.home2 .home-links { justify-content: center; gap: 8px 16px; }
.home2 .logo-big { width: min(30vw, 200px); }
@media (max-width: 760px) {
  .home.home2 { grid-template-columns: 1fr; gap: 14px; padding: 14px 16px; align-content: center; }
  .home2 .home-brand { gap: 6px; }
  .home2 .logo-big { width: min(22vh, 96px); }
  .home2 h1 { font-size: 30px; }
  .home2 .home-actions { gap: 8px; max-width: 520px; }
  .home2 .btn.big { min-height: 50px; font-size: 17px; }
  .home2 .btn { min-height: 44px; }
  .home2 .home-brand > p { font-size: 14px; }
}
@media (max-width: 760px) and (max-height: 700px) { .home2 .home-brand > p, .home2 .logo-big { display: none; } }

/* ---------- Nie quer scrollen auf dem Handy ---------- */
html, body { overflow-x: hidden; }
#app, .screen, .scroll, .card, .stack, main { min-width: 0; max-width: 100%; }
.screen { width: 100%; }
img, video, iframe, table { max-width: 100%; }
input, select, textarea { max-width: 100%; }
@media (max-width: 699px) {
  .btn { white-space: normal; text-align: center; line-height: 1.2; padding-top: 6px; padding-bottom: 6px; }
  .btn.icon { padding: 0; }
  #g-foot .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: inline-flex; }
  .seg button { padding: 4px 6px; line-height: 1.2; font-size: 14px; }
  .topbar h1 { overflow-wrap: anywhere; }
  .lb-wrap { padding: 8px; }
}
.acct-page { padding: 4px; }
.card > table.t, .lb-wrap { overflow-x: auto; }

/* ---------- Einstellungen-Übersicht vor dem Start ---------- */
.rules-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 6px 14px; margin: 0; }
.rules-sum > div { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--s3); min-width: 0; }
.rules-sum dt { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rules-sum dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.pill.ok-pill { background: var(--ok-soft); color: var(--ok-light); font-weight: 600; font-size: 13px; padding: 4px 10px; }
details.card > summary { cursor: pointer; list-style: revert; margin-bottom: 8px; }

/* ---------- Schwebende Import-Anzeige ---------- */
#imp-float { position: fixed; right: 12px; bottom: calc(var(--bugbar) + var(--safe-b) + 10px); width: min(340px, calc(100vw - 24px)); z-index: 60; background: var(--s2); border: 1px solid var(--ok); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.45); animation: imp-in .3s ease both; }
#imp-float.done { border-color: var(--acc); }
@keyframes imp-in { from { transform: translateY(16px); opacity: 0; } }
.imp-disc { width: 22px; height: 22px; border-radius: 50%; flex: none; background: repeating-radial-gradient(circle, #111 0 2px, #2a2a2a 2px 3px); box-shadow: inset 0 0 0 7px transparent; position: relative; }
.imp-disc::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--ok); }
.imp-disc.spin { animation: spin 1.6s linear infinite; }
.bar.indet b { width: 35%; background: var(--ok); animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ---------- Bestenliste ---------- */
table.lb { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lb th, table.lb td { padding: 8px 6px; text-align: right; white-space: nowrap; }
table.lb th:nth-child(-n+2), table.lb td:nth-child(-n+2) { text-align: left; }
table.lb tr.me td { background: var(--acc-soft); }
table.lb td.on { font-weight: 700; color: var(--acc-light); }
.lb-sort { background: none; border: 0; color: var(--muted); font: 600 12px Inter, system-ui, sans-serif; cursor: pointer; padding: 4px 2px; }
.lb-sort.on { color: var(--acc-light); }
.sp-help { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
#imp-float.min > :not(:first-child) { display: none; }
#imp-float.min { padding: 8px 12px; width: auto; max-width: min(340px, calc(100vw - 24px)); }
.imp-pct { font-size: 13px; color: var(--ok-light); }
#imp-float .btn.icon.sm { width: 32px; min-height: 32px; height: 32px; }
@media (max-width: 699px) { #imp-float { padding: 10px 12px; gap: 6px; } }

/* Fehlermeldungen direkt am Eingabefeld */
.field-err { color: var(--bad); font-size: 13px; font-weight: 600; line-height: 1.35; }
.form-err { background: rgba(255, 90, 90, .12); border: 1px solid var(--bad); color: var(--bad); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad) !important; box-shadow: 0 0 0 2px rgba(255, 90, 90, .25); }

/* ---------- Wartebereich des Hosts: alles auf einer Seite ---------- */
.lobby2 { flex: 1; min-height: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: minmax(0, 1fr); }
.lobby2 > .card { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.lb-join { align-items: center; justify-content: center; text-align: center; }
.lb-join .qr { width: min(100%, 42vh, 320px); flex: none; }
.lb-code { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.lb-code h2 { margin: 0; }
.lb-url { overflow-wrap: anywhere; }
.lb-players .list { gap: 6px; }
.lb-players .li { padding: 8px 10px; gap: 8px; }
.lb-players h2, .lb-rules h2 { margin: 0; font-size: 18px; }
.lb-rules > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.lb-rules > summary::-webkit-details-marker { display: none; }
.lb-rules > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.lb-rules[open] > summary::after { content: '▴'; }
.lb-rules .rules-sum { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.lb-rules .rules-sum > div { padding: 4px 0; }
/* Tablet hochkant und Handy: QR-Code neben dem Code, Spieler füllen den Rest, Einstellungen aufklappbar */
@media (max-width: 899px) {
  .lobby2 { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; overflow: visible; }
  .lobby2 > .lb-join { flex-direction: row; justify-content: center; gap: 14px; text-align: left; padding: 10px 12px; }
  .lb-join .qr { width: min(36vw, 24vh, 190px); padding: 6px; border-radius: 12px; }
  .lb-code { align-items: flex-start; }
  .lb-code h2 { font-size: 18px; }
  .lb-join .code { font-size: clamp(24px, 8vw, 40px); letter-spacing: 4px; }
  .lb-rules { max-height: 42vh; }
}
/* Handy quer: drei schmale Spalten */
@media (orientation: landscape) and (max-height: 560px) {
  .lobby2 { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: minmax(0, 1fr); }
  .lobby2 > .lb-join { flex-direction: column; gap: 4px; padding: 8px; }
  .lb-join .qr { width: min(34vh, 170px); }
  .lb-code h2, .lb-code > .small:not(.btn) { display: none; }
  .lb-join .code { font-size: 24px; letter-spacing: 3px; }
  .lb-rules { max-height: none; }
}
/* Zweizeiliger Knopf (z. B. „Vorschlägen vertrauen“) */
.btn.btn-2line { flex-direction: column; white-space: normal; height: auto; min-height: 56px; padding: 10px 16px; gap: 2px; line-height: 1.25; text-align: center; }
.btn.btn-2line small { font-size: 12px; font-weight: 400; opacity: .9; }
.btn.btn-2line { border-radius: 18px; }
/* Wartebereich der Mitspieler */
.plobby { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.plobby > * { flex: none; }
.plobby .disc { width: 64px; height: 64px; flex: none; }
.plobby .lb-rules { display: block; }
.plobby .lb-rules[open] > summary { margin-bottom: 8px; }
.plobby .rules-sum { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 2px 12px; }
.plobby .rules-sum dd { font-size: 13px; }
#g-foot .btn.grow { flex: 1 1 auto; }
.plobby .lb-rules { max-height: none; overflow: visible; }
.chip-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.chip[aria-pressed="true"] .muted { color: inherit; opacity: .7; }

/* Song startet nicht */
.dead-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 138, 128, .12); border: 1px solid var(--bad); font-size: 14px; }
.dead-banner.hidden { display: none; }
.dead-banner { flex-wrap: nowrap; }
.dead-banner > .grow { flex: 1 1 55%; min-width: 0; line-height: 1.35; }
.dead-banner .btn { flex: 0 1 42%; white-space: normal; text-align: center; line-height: 1.2; height: auto; min-height: 48px; padding-top: 8px; padding-bottom: 8px; }
.wake-banner { background: rgba(29, 185, 84, .12); border-color: #1DB954; }
.dead-link { align-self: center; margin-top: 6px; }
/* Spiel nutzt die volle Bildschirmbreite (Desktop/Tablet quer) */
#gscreen.wide-game { max-width: none; padding-left: clamp(16px, 3vw, 48px); padding-right: clamp(16px, 3vw, 48px); }
@media (min-width: 900px) {
  #gscreen.wide-game .shelf.h { gap: 10px; }
  #gscreen.wide-game .shelf.h .single { max-width: 380px; min-height: clamp(96px, 15vh, 150px); padding: 14px 16px; gap: 5px; border-radius: 16px; }
  #gscreen.wide-game .shelf.h .single .y { font-size: clamp(22px, 2.2vw, 34px); }
  #gscreen.wide-game .shelf.h .single .t { font-size: clamp(15px, 1.2vw, 19px); }
  #gscreen.wide-game .shelf.h .single .a { font-size: clamp(13px, 1vw, 16px); }
  #gscreen.wide-game .shelf.h .gap { min-width: 44px; }
  #gscreen.wide-game .shelf.h .gap.sel, #gscreen.wide-game .shelf.h .gap.mark { flex: 0 1 140px; }
}

/* Handy: Hauptknopf (Einordnen, Weiter …) bekommt eine eigene volle Zeile, Nebenknöpfe teilen sich die Zeile darüber */
@media (max-width: 699px) {
  #g-foot { flex-wrap: wrap !important; }
  #g-foot .btn.primary { flex: 1 1 100% !important; order: 2; white-space: nowrap; }
  #g-foot .btn:not(.primary) { flex: 1 1 40% !important; order: 1; white-space: normal; text-overflow: clip; overflow: visible; line-height: 1.15; }
}
/* Play-Knopf am Handy: einzeilig, Hinweis darunter */
.play-row .btn { flex: 1 1 auto; white-space: nowrap; min-height: 44px; }
.play-row > .small { flex: 1 1 100%; }
@media (min-width: 700px) { .play-row > .small { flex: 1 1 200px; } }
/* Kopfzeile im Spiel: nichts umbrechen, auf schmalen Handys „Single N“ ausblenden */
#g-top > .small.muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { #g-top > .grow.small.muted { visibility: hidden; } }

/* Master: einmal in den Spotify-Player tippen, damit ganze Songs auch bei Start per Handy laufen */
.unlock-hint { margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: var(--s2); border: 1px dashed var(--acc); font-size: 14px; line-height: 1.4; }
.unlock-hint.urgent { border-style: solid; background: rgba(255, 138, 61, .14); }
.player.unlock::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: var(--free, 84px); border-radius: 0 16px 16px 0; box-shadow: inset 0 0 0 3px var(--acc); animation: unlock-pulse 1.2s ease-in-out infinite; pointer-events: none; z-index: 3; }
@keyframes unlock-pulse { 50% { box-shadow: inset 0 0 0 3px transparent; } }

/* Spotify Connect: eigener Play-Knopf statt eingebettetem Player */
.sc-box { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: calc((var(--free, 84px) - 56px) / 2); background: var(--s2); }
.sc-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #1DB954; color: #fff; font-size: 24px; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.sc-btn:focus-visible { outline: 3px solid var(--acc-light); outline-offset: 3px; }
code.copy { user-select: all; background: var(--s2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* Tipp auf eine Single: Titel und Interpret als Sprechblase */
.single[data-pop] { cursor: pointer; }
.single[data-pop]:focus-visible { outline: 3px solid var(--acc-light); outline-offset: 2px; }
.single-pop { position: fixed; z-index: 60; max-width: min(320px, calc(100vw - 16px)); padding: 10px 14px; border-radius: 14px; background: var(--s1, #1c1a24); border: 1px solid var(--acc); box-shadow: 0 10px 30px rgba(0,0,0,.5); pointer-events: none; }
.single-pop .y { font: 700 20px var(--head); color: var(--acc); }
.single-pop .t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.single-pop .a { color: var(--muted); font-size: 14px; margin-top: 2px; }

.gap-ctx .gap-x { min-height: 32px; width: 32px; height: 32px; padding: 0; flex: none; font-size: 14px; }
