/* LIMA Musikbox – „Lichtorgel“-Optik
   Farben der vier Lampen: Rot (Bass), Bernstein, Grün, Blau (Höhen). */
:root {
  --aubergine: #1d0b33;
  --aubergine-2: #2a1247;
  --aubergine-3: #3a1c5e;
  --lamp-red: #ff3b5c;
  --lamp-amber: #ffb020;
  --lamp-green: #2be38b;
  --lamp-blue: #3d7bff;
  --text: #fff4e6;
  --muted: #c4aee3;
  --line: rgba(196, 174, 227, 0.18);

  --display: Bahnschrift, "DIN Alternate", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;

  --l1: 0; --l2: 0; --l3: 0; --l4: 0; --beat: 0;
  --pad: clamp(16px, 2vw, 32px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--aubergine);
  color: var(--text);
  font: 400 18px/1.4 var(--body);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img { display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--lamp-amber); outline-offset: 3px; }

/* ---------- Lichtorgel im Hintergrund ---------- */
.lights { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.lamp {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.lamp-red   { left: -28vmax; bottom: -34vmax; background: radial-gradient(closest-side, rgba(255,59,92,.55), transparent); opacity: calc(.14 + var(--l1) * .9); }
.lamp-amber { left: 12vw;   top: -40vmax;    background: radial-gradient(closest-side, rgba(255,176,32,.42), transparent); opacity: calc(.10 + var(--l2) * .9); }
.lamp-green { right: 4vw;   bottom: -42vmax; background: radial-gradient(closest-side, rgba(43,227,139,.36), transparent); opacity: calc(.08 + var(--l3) * 1.1); }
.lamp-blue  { right: -30vmax; top: -26vmax;  background: radial-gradient(closest-side, rgba(61,123,255,.55), transparent); opacity: calc(.14 + var(--l4) * 1.2); }

/* ---------- Party-Layout ---------- */
.party {
  position: relative; z-index: 1;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 34%) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "top top" "now lib";
}

.topbar {
  grid-area: top;
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  padding: var(--pad) var(--pad) 12px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  background: none; border: 0; padding: 4px 8px 4px 0;
  border-radius: 10px;
}
.logo-mark {
  width: 40px; height: 40px; flex: none;
  background: url("../icon.svg") center / contain no-repeat;
  transition: transform 2s linear;
}
.logo.holding .logo-mark { transform: rotate(360deg); }
.logo-text {
  font: 500 32px/1 var(--display);
  font-stretch: 75%;
  letter-spacing: .01em;
  white-space: nowrap;
}
.logo-text b, .setup-title b { font-weight: 800; color: var(--lamp-amber); letter-spacing: .04em; }

.host-tools { display: flex; gap: 10px; margin-left: auto; }
body.locked .host-tools { display: none; }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }

.search {
  flex: 1; max-width: 760px;
  position: relative; display: flex; align-items: center;
}
.search svg {
  position: absolute; left: 22px; width: 26px; height: 26px;
  fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round;
}
.search input {
  width: 100%; height: 64px;
  padding: 0 64px 0 62px;
  border: 2px solid var(--line); border-radius: 32px;
  background: rgba(42, 18, 71, .82);
  color: var(--text);
  font: 500 22px var(--body);
  user-select: text;
}
.search input::placeholder { color: var(--muted); opacity: .85; }
.search input:focus { outline: none; border-color: var(--lamp-amber); }
.search-clear {
  position: absolute; right: 10px;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--aubergine-3);
  font-size: 28px; line-height: 1;
}

.scope {
  display: flex; padding: 5px; gap: 4px;
  border-radius: 32px; background: rgba(42, 18, 71, .82);
  border: 2px solid var(--line);
}
.scope button {
  height: 50px; padding: 0 22px;
  border: 0; border-radius: 26px;
  background: transparent; color: var(--muted);
  font-weight: 600; white-space: nowrap;
}
.scope button[aria-checked="true"] { background: var(--text); color: var(--aubergine); }
.scope button.is-closed { opacity: .55; }
.lib-count { font-weight: 400; opacity: .7; margin-left: 4px; }

/* ---------- Läuft gerade ---------- */
.now {
  grid-area: now;
  min-height: 0; overflow: hidden;
  padding: 8px var(--pad) 12px;
  display: flex; flex-direction: column;
}
.now-art {
  position: relative;
  width: min(100%, 26vh);
  aspect-ratio: 1;
  margin-bottom: 16px;
  flex: none;
}
.vinyl {
  position: absolute; top: 4%; left: 22%;
  width: 92%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle, var(--lamp-red) 0 15%, #1a0e24 15.5% 17%, transparent 17.5%),
    repeating-radial-gradient(circle, #120a19 0 2px, #1e1228 2px 4px);
  box-shadow: 0 0 0 2px #0e0714 inset;
}
body.is-playing .vinyl { animation: spin 1.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.now-cover {
  position: relative;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 8px;
  background: var(--aubergine-3);
  box-shadow: 0 18px 50px rgba(10, 2, 20, .55);
  transform: scale(calc(1 + var(--beat) * .025));
}
.now-cover.empty { background: var(--aubergine-2) url("../icon.svg") center / 34% no-repeat; }
.now-label, .now-title, .now-artist, .queue-head, .queue-empty { flex: none; }
.now-label { margin: 0 0 6px; color: var(--lamp-amber); font-weight: 600; font-size: 17px; }
.now-title {
  margin: 0;
  font: 700 clamp(34px, 3.4vw, 64px)/1.02 var(--display);
  font-stretch: 75%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: balance;
}
.now-title.long { font-size: clamp(28px, 2.6vw, 50px); }
.now-artist { margin: 8px 0 14px; font-size: clamp(18px, 1.5vw, 26px); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.progress-bar {
  height: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--lamp-red), var(--lamp-amber), var(--lamp-green), var(--lamp-blue));
}

.queue-head { margin: 20px 0 8px; font: 700 26px/1 var(--display); font-stretch: 75%; display: flex; align-items: center; gap: 10px; }
.queue-count {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px;
  display: inline-grid; place-items: center;
  background: var(--lamp-amber); color: var(--aubergine);
  font: 700 17px/1 var(--body);
}
.queue-count:empty { display: none; }
.queue {
  list-style: none; margin: 0; padding: 0;
  flex: 1; min-height: 0; overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
}
.q-item { display: flex; align-items: center; gap: 14px; padding: 7px 0; border-top: 1px solid var(--line); }
.q-item:first-child { border-top: 0; }
.q-cover { width: 52px; height: 52px; border-radius: 4px; object-fit: cover; background: var(--aubergine-3); flex: none; }
.q-text { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.q-title, .q-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-title { font-weight: 600; }
.q-artist { color: var(--muted); font-size: 16px; }
.q-tag { flex: none; padding: 4px 10px; border-radius: 12px; font-size: 14px; font-weight: 700; background: var(--lamp-green); color: var(--aubergine); }
.q-by { flex: none; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lamp-amber); font-size: 15px; font-weight: 600; }
.q-more { padding: 8px 0 0 66px; color: var(--muted); font-size: 16px; }

/* QR-Code für Handy-Wünsche – rechts oben */
.qr-card {
  flex: none; margin-left: auto;
  display: flex; align-items: center; gap: 16px;
  padding: 8px 8px 8px 18px;
  border-radius: 14px;
  background: rgba(42, 18, 71, .9);
  border: 1px solid var(--line);
  text-align: right;
}
.qr-img { width: clamp(84px, 10vh, 118px); height: auto; border-radius: 6px; flex: none; }
.qr-title { margin: 0 0 4px; font: 700 24px/1.05 var(--display); font-stretch: 75%; }
.qr-url { margin: 0; color: var(--lamp-amber); font-weight: 600; font-size: 18px; }
.qr-guests { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
body:not(.locked) .qr-card { margin-left: 0; }
.lib-status { margin: -6px 0 14px; color: var(--lamp-amber); font-weight: 600; font-size: 18px; }
.lib-head { margin: 4px 0 14px; font: 700 26px/1.1 var(--display); font-stretch: 75%; color: var(--muted); }
.qr-guests:empty { display: none; }
.queue-empty { margin: 0; color: var(--muted); font-size: 16px; max-width: 34ch; }

/* ---------- Song-Raster ---------- */
.library {
  grid-area: lib;
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px var(--pad) 24px 8px;
  scrollbar-width: thin; scrollbar-color: var(--aubergine-3) transparent;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 22px 18px;
}
.tile {
  position: relative;
  display: flex; flex-direction: column; text-align: left;
  padding: 0; border: 0; background: none;
  content-visibility: auto; contain-intrinsic-size: 176px 250px;
}
.tile:active { transform: scale(.96); }
.tile-cover {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 6px; background: var(--aubergine-2);
  margin-bottom: 9px;
}
.tile-title {
  font-weight: 600; font-size: 17px; line-height: 1.22;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-artist { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.is-taken .tile-cover { opacity: .45; }
.tile-tag {
  position: absolute; left: 8px; top: 8px;
  padding: 4px 10px; border-radius: 12px;
  background: var(--lamp-amber); color: var(--aubergine);
  font-size: 14px; font-weight: 700;
}
.tile-e {
  position: absolute; right: 8px; top: 8px;
  width: 22px; height: 22px; border-radius: 4px;
  display: grid; place-items: center;
  background: rgba(29, 11, 51, .8); color: var(--muted);
  font-size: 13px; font-weight: 700;
}
.grid-empty { margin: 40px 0; font-size: 22px; color: var(--muted); max-width: 40ch; }
.grid-more { height: 1px; }
.search-more { display: block; margin: 24px auto 0; }

/* ---------- Wählbare Hintergründe ---------- */
.bg { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; pointer-events: none; }
.fx { position: fixed; inset: 0; z-index: 6; width: 100vw; height: 100vh; pointer-events: none; mix-blend-mode: screen; opacity: .5; }
body[data-bg="lichtorgel"] .bg, body:not([data-bg="diskokugel"]) .fx { display: none; }
body[data-bg="jukebox"] .vinyl { display: none; }
body[data-bg="jukebox"] .now { padding-top: 64px; padding-left: calc(var(--pad) + 34px); }
body[data-bg="jukebox"] .now-art { width: min(100% - 34px, 24vh); }
body:not([data-bg="lichtorgel"]) .tile-title, body:not([data-bg="lichtorgel"]) .tile-artist,
body:not([data-bg="lichtorgel"]) .lib-head, body:not([data-bg="lichtorgel"]) .q-text { text-shadow: 0 1px 6px rgba(10, 2, 20, .9); }
body:not([data-bg="lichtorgel"]) .lights, body:not([data-bg="lichtorgel"]) .eq { display: none; }

/* ---------- LED-Equalizer als Hintergrund hinter allem ---------- */
.eq {
  position: fixed; inset: 0; z-index: 0;
  width: 100vw; height: 100vh;
  opacity: .32;
  pointer-events: none;
  mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.85) 45%, rgba(0,0,0,.35) 100%);
}

/* ---------- Buttons ---------- */
.btn {
  min-height: 52px; padding: 0 24px;
  border: 2px solid var(--line); border-radius: 26px;
  background: var(--aubergine-2);
  font-weight: 600;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn:not(:disabled):active { transform: scale(.97); }
.btn-hot { background: var(--lamp-red); border-color: var(--lamp-red); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(255, 59, 92, .6); color: #ffb3c0; }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 16px; }
.btn-big { min-height: 64px; padding: 0 36px; font-size: 22px; }

/* ---------- Wunsch-Dialog ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 35;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(20, 6, 36, .78);
  backdrop-filter: blur(6px);
}
.sheet-card {
  background: var(--aubergine-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(8, 0, 18, .6);
  animation: pop .22s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.pick-card { display: flex; gap: 32px; padding: 28px; max-width: 980px; width: 100%; align-items: center; }
.pick-cover { width: min(360px, 38vw); aspect-ratio: 1; object-fit: cover; border-radius: 10px; flex: none; background: var(--aubergine-3); }
.pick-info { min-width: 0; }
.pick-info h2 { margin: 0 0 8px; font: 700 clamp(32px, 3.4vw, 56px)/1 var(--display); font-stretch: 75%; }
.pick-info p { margin: 0; font-size: 22px; color: var(--muted); }
.pick-note:not(:empty) { margin-top: 18px; color: var(--lamp-amber); font-weight: 600; font-size: 20px; }
.pick-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.pick-actions .btn { min-height: 68px; padding: 0 34px; font-size: 22px; border-radius: 34px; }

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 45;
  transform: translateX(-50%);
  padding: 16px 28px; border-radius: 30px;
  background: var(--lamp-amber); color: var(--aubergine);
  font-weight: 700; font-size: 21px;
  box-shadow: 0 16px 40px rgba(10, 2, 20, .5);
  max-width: 90vw; text-align: center;
}
.toast.show { animation: toast-in .3s ease-out; }
@keyframes toast-in { from { transform: translate(-50%, 20px); opacity: 0; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }

/* ---------- Bildschirmtastatur ---------- */
.osk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 14px 14px 18px;
  background: rgba(29, 11, 51, .97);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.osk-row { display: flex; gap: 8px; width: min(1100px, 100%); justify-content: center; }
.osk-key {
  flex: 1; max-width: 88px; height: 62px;
  border: 0; border-radius: 10px;
  background: var(--aubergine-3);
  font-size: 24px; font-weight: 600;
}
.osk-key:active { background: var(--lamp-amber); color: var(--aubergine); }
.osk-wide { max-width: 170px; font-size: 19px; }
.osk-space { max-width: 420px; flex: 3; font-size: 19px; }
.osk-done { background: var(--text); color: var(--aubergine); }
body.osk-open .library { padding-bottom: 340px; }

/* ---------- PIN ---------- */
.pin-card { padding: 30px; width: min(420px, 100%); text-align: center; }
.pin-card h2 { margin: 0 0 18px; font: 700 30px/1 var(--display); font-stretch: 75%; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 8px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); }
.pin-dots i.on { background: var(--lamp-amber); border-color: var(--lamp-amber); }
.pin-msg { min-height: 26px; margin: 6px 0 12px; color: var(--lamp-amber); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-key { height: 70px; border: 0; border-radius: 12px; background: var(--aubergine-3); font-size: 28px; font-weight: 600; }
.pin-ok { background: var(--lamp-green); color: var(--aubergine); }
.pin-cancel { margin-top: 16px; width: 100%; }

/* ---------- Verwaltung ---------- */
.admin {
  position: fixed; inset: 0; z-index: 25;
  background: var(--aubergine);
  overflow-y: auto;
  user-select: text;
}
.admin-inner { padding: var(--pad); max-width: 1500px; margin: 0 auto; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.admin-head h2 { margin: 0; font: 700 44px/1 var(--display); font-stretch: 75%; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.panel { background: var(--aubergine-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.panel h3 { margin: 0 0 14px; font: 700 24px/1.1 var(--display); font-stretch: 75%; }
.panel h3:not(:first-child) { margin-top: 22px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 16px; color: var(--muted); }
.field.check { flex-direction: row; align-items: center; gap: 12px; color: var(--text); }
.field input[type="checkbox"] { flex: none; width: 26px; height: 26px; accent-color: var(--lamp-green); }
.field input[type="range"] { accent-color: var(--lamp-amber); height: 36px; }
.admin input[type="number"], .admin input[type="password"], .admin input[type="text"], .admin select, .setup input {
  height: 48px; padding: 0 14px;
  border: 2px solid var(--line); border-radius: 10px;
  background: var(--aubergine); color: var(--text);
  font: 500 18px var(--body);
}
.admin input[type="number"] { width: 130px; }
.hint { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.admin-status:not(:empty) { margin: -8px 0 16px; }
.adm-meta { flex: 1 0 100%; color: var(--muted); font-size: 14px; margin-top: -4px; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 26px; background: var(--aubergine); border: 2px solid var(--line); margin-bottom: 14px; }
.seg button { flex: 1; height: 44px; white-space: nowrap; font-size: 16px; border: 0; border-radius: 22px; background: transparent; color: var(--muted); font-weight: 600; }
.seg button[aria-checked="true"] { background: var(--lamp-green); color: var(--aubergine); }
.seg-stack { flex-direction: column; border-radius: 16px; }
.seg-stack button { border-radius: 12px; text-align: left; padding: 0 16px; }
.time-row .field { margin-bottom: 0; }
.admin input[type="time"] { height: 48px; padding: 0 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--aubergine); color: var(--text); font: 500 18px var(--body); }
.admin input[type="time"]:disabled { opacity: .4; }
.status:not(:empty) { margin: 12px 0 0; color: var(--lamp-amber); font-weight: 600; }
.adm-queue { list-style: none; padding: 0; margin: 0 0 14px; max-height: 360px; overflow-y: auto; }
.adm-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.adm-item:first-child { border-top: 0; }
.adm-name { flex: 1 0 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-empty { color: var(--muted); }

/* ---------- Ersteinrichtung ---------- */
.setup { position: fixed; inset: 0; z-index: 30; overflow-y: auto; display: grid; place-items: center; padding: 24px; user-select: text; }
.setup-card { width: min(760px, 100%); padding: clamp(24px, 4vw, 48px); background: var(--aubergine-2); border: 1px solid var(--line); border-radius: 20px; }
.setup-title { margin: 0 0 24px; font: 700 52px/1 var(--display); font-stretch: 75%; }
.setup-steps { margin: 0; padding-left: 28px; }
.setup-steps li { margin-bottom: 22px; }
.setup-steps li::marker { font: 700 22px var(--display); color: var(--lamp-amber); }
.setup-steps h2 { margin: 0 0 6px; font-size: 21px; }
.setup-steps p { margin: 0 0 8px; color: var(--muted); }
.setup-steps b { color: var(--text); }
.setup input { width: 100%; }
.copy code {
  display: block; padding: 12px 14px; border-radius: 10px;
  background: var(--aubergine); border: 1px dashed var(--lamp-amber);
  color: var(--text); font-size: 18px; word-break: break-all; user-select: all;
}
.setup-msg { min-height: 24px; color: var(--lamp-amber); font-weight: 600; }
.setup-lead { font-size: 21px; margin: 0 0 22px; color: var(--text); }
.setup-small { margin: 0 0 8px; color: var(--muted); }
.setup .copy { margin: 0 0 24px; }

/* ---------- Start-Knopf ---------- */
.gate { position: fixed; inset: 0; z-index: 32; display: grid; place-items: center; padding: 24px; background: rgba(20, 6, 36, .82); backdrop-filter: blur(6px); }
.gate-card { text-align: center; max-width: 620px; }
.gate-go { min-height: 96px; padding: 0 64px; font-size: 34px; border-radius: 48px; margin: 8px 0 22px; }
.gate .setup-small { font-size: 18px; }

/* ---------- Laden ---------- */
.loading { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 20px; background: var(--aubergine); }
.loading p { margin: 0; color: var(--muted); font-size: 20px; }
.loading-bars { display: flex; gap: 8px; align-items: flex-end; height: 70px; }
.loading-bars i { width: 16px; height: 100%; border-radius: 3px; transform-origin: bottom; animation: bounce 0.9s ease-in-out infinite; }
.loading-bars i:nth-child(1) { background: var(--lamp-red); }
.loading-bars i:nth-child(2) { background: var(--lamp-amber); animation-delay: -.2s; }
.loading-bars i:nth-child(3) { background: var(--lamp-green); animation-delay: -.4s; }
.loading-bars i:nth-child(4) { background: var(--lamp-blue); animation-delay: -.6s; }
.loading-bars i:nth-child(5) { background: var(--text); animation-delay: -.8s; }
@keyframes bounce { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ---------- Kleine Bildschirme (Tablet hochkant, Handy) ---------- */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .party {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "top" "now" "lib";
  }
  .topbar { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { height: 54px; font-size: 18px; padding-right: 52px; }
  .logo-text { font-size: 28px; }
  .scope button { height: 42px; padding: 0 14px; }
  .now { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; align-items: center; padding-bottom: 8px; }
  .now-art { width: 96px; margin: 0; grid-row: span 4; }
  .vinyl { display: none; }
  .now-title { font-size: 30px; }
  .now-artist { margin: 4px 0 8px; font-size: 17px; }
  .queue-head, .queue, .queue-empty { display: none; }
  .qr-card .qr-text { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px 12px; }
  .library { padding-left: var(--pad); }
  .pick-card { flex-direction: column; text-align: center; }
  .pick-actions { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  body.is-playing .vinyl, .loading-bars i { animation: none; }
  .sheet-card, .toast.show { animation: none; }
}

/* Unsichtbarer Spotify-Player (Web Playback SDK) */
iframe[src*="sdk.scdn.co"] { position: absolute; width: 0; height: 0; border: 0; opacity: 0; pointer-events: none; }
