/* AI DJ – dunkles Vollbild-Interface im Spotify-Look */

:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #141414;
  --text: #fff;
  --muted: rgb(255 255 255 / .64);
  --faint: rgb(255 255 255 / .42);
  --surface: rgb(255 255 255 / .07);
  --surface-hover: rgb(255 255 255 / .13);
  --line: rgb(255 255 255 / .1);
  --green: #1ed760;
  --danger: #ff6b6b;
  --accent: 30 215 96;    /* wird live aus dem Albumcover berechnet */
  --accent-2: 58 123 255;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad-top: max(14px, env(safe-area-inset-top));
  --pad-bottom: max(16px, env(safe-area-inset-bottom));
  --pad-x: max(18px, env(safe-area-inset-left), env(safe-area-inset-right));
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow: hidden;
}

[hidden] { display: none !important; }

button { font: inherit; color: inherit; }

button:focus-visible,
[tabindex="0"]:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 3px;
}

[tabindex="-1"]:focus { outline: none; }

svg { width: 24px; height: 24px; fill: currentColor; flex: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Hintergrund: unscharfes Cover + Farb-Glow ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop-img {
  position: absolute;
  inset: -15%;
  width: 130%;
  height: 130%;
  object-fit: cover;
  filter: blur(48px) saturate(1.5);
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.backdrop-img.on { opacity: .42; }

/* Farb-Glow als weiche Verläufe statt Blur-Filter: sieht gleich aus, kostet die GPU aber fast nichts. */
@property --glow-a { syntax: "<color>"; inherits: false; initial-value: rgb(30 215 96 / .45); }
@property --glow-b { syntax: "<color>"; inherits: false; initial-value: rgb(58 123 255 / .3); }

.glow {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(55% 55% at 15% 10%, var(--glow-a), transparent 72%),
    radial-gradient(50% 50% at 88% 92%, var(--glow-b), transparent 72%);
  transition: --glow-a 1.6s var(--ease), --glow-b 1.6s var(--ease);
  animation: drift 24s ease-in-out infinite alternate;
  will-change: transform;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / .15), rgb(0 0 0 / .55) 50%, rgb(0 0 0 / .92));
}

@keyframes drift { to { transform: translate3d(5%, 4%, 0); } }

/* ---------- Views ---------- */

.view {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
}

.player { display: flex; flex-direction: column; }

/* ---------- DJ-Orb (das animierte "DJ"-Logo) ---------- */

.orb {
  position: relative;
  isolation: isolate;
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 28px rgb(var(--accent) / .55);
  transition: box-shadow 1.2s var(--ease);
}

.orb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 210deg, rgb(var(--accent)), rgb(var(--accent-2)), rgb(var(--accent)));
}

.thinking .orb::before { animation: spin 1.4s linear infinite; }

.orb-xl { width: 112px; height: 112px; box-shadow: 0 0 80px rgb(var(--accent) / .55); }

.bars { display: flex; align-items: center; gap: 3px; height: 16px; }

.bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: #000;
  transform: scaleY(.3);
}

.orb-xl .bars { height: 40px; gap: 6px; }
.orb-xl .bars i { width: 7px; border-radius: 4px; }

.playing .bars i,
.thinking .bars i,
.login .bars i { animation: eq 1.1s ease-in-out infinite; }

.bars i:nth-child(2) { animation-delay: -.45s; }
.bars i:nth-child(3) { animation-delay: -.2s; }
.bars i:nth-child(4) { animation-delay: -.7s; }

@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- Login ---------- */

.login { display: grid; place-items: center; text-align: center; }

.login-card {
  width: min(100%, 440px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: rise .8s var(--ease);
}

.login h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 900;
}

.grad {
  background: linear-gradient(90deg, rgb(var(--accent)), rgb(var(--accent-2)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.login .fine { font-size: 13px; color: var(--faint); min-height: 1.5em; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Kopfzeile ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-text { min-width: 0; }

.brand-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-vibe {
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: background-color .2s, transform .15s var(--ease);
}

.icon-btn:hover { background: var(--surface-hover); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- DJ-Ansage ---------- */

.dj-line {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: calc(var(--pad-top) + 62px);
  width: min(560px, calc(100% - 2 * var(--pad-x)));
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(24 24 24 / .94);
  box-shadow: 0 20px 50px rgb(0 0 0 / .45);
  cursor: pointer;
}

.dj-line.in { animation: drop .55s var(--ease); }

@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px) scale(.97); } }

.dj-badge {
  flex: none;
  margin-top: 1px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgb(var(--accent));
  color: #000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
}

.dj-line p { margin: 0; font-size: 15px; line-height: 1.45; }

/* ---------- Bühne: Cover + Infos ---------- */

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3.2dvh, 34px);
  padding-top: 8px;
}

.cover-wrap {
  position: relative;
  flex: none;
  width: min(84vw, 42dvh, 480px);
  aspect-ratio: 1;
  margin-top: auto;
}

.cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 40px 90px -25px rgb(var(--accent) / .6), 0 18px 40px rgb(0 0 0 / .55);
  transition: box-shadow 1.2s var(--ease);
}

.cover.swap { animation: cover-in .7s var(--ease); }

@keyframes cover-in { from { opacity: 0; transform: scale(.94) translateY(6px); } }

.cover-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(var(--accent) / .3), rgb(var(--accent-2) / .22));
  border: 1px solid var(--line);
}

.meta {
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.2dvh, 22px);
  margin-bottom: auto;
}

.titles { min-width: 0; }

.titles h1 {
  margin: 0;
  font-size: clamp(1.45rem, 4.2vw + .4rem, 2.3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.titles p {
  margin: 6px 0 0;
  font-size: clamp(1rem, 1.6vw + .6rem, 1.2rem);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fortschrittsbalken (antippen oder ziehen zum Spulen) */

.progress { padding: 10px 0 0; cursor: pointer; touch-action: none; }

.progress-track {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgb(255 255 255 / .18);
}

.progress-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  transform-origin: left center;
  transform: scaleX(0);
}

/* Läuft über die volle Breite und wird nur verschoben (transform) – kein Layout pro Frame. */
.progress-head {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.progress-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / .4);
  transform: scale(0);
  transition: transform .15s var(--ease);
}

.progress:hover .progress-fill,
.progress.dragging .progress-fill { background: rgb(var(--accent)); }

.progress:hover .progress-knob,
.progress:focus-visible .progress-knob,
.progress.dragging .progress-knob { transform: scale(1); }

.times {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Steuerung */

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ctl {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .6s var(--ease);
}

.ctl svg { width: 32px; height: 32px; }
.ctl:hover { background: var(--surface); }
.ctl:active { transform: scale(.9); }

.ctl-main {
  width: 78px;
  height: 78px;
  background: #fff;
  color: #000;
  box-shadow: 0 12px 34px rgb(var(--accent) / .4);
}

.ctl-main:hover { background: #fff; transform: scale(1.04); }
.ctl-main:active { transform: scale(.94); }
.ctl-main svg { width: 34px; height: 34px; }

.ctl-side { width: 52px; height: 52px; background: var(--surface); }
.ctl-side svg { width: 24px; height: 24px; }

.ctl-vibe { color: rgb(var(--accent)); box-shadow: inset 0 0 0 1.5px rgb(var(--accent) / .55); }
.thinking .ctl-vibe svg { animation: spin 1.4s linear infinite; }

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 20px;
}

/* Wunsch-Leiste */

.ask {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / .08);
}

.ask-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 8px 0 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.ask-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-main svg { width: 20px; height: 20px; color: rgb(var(--accent)); }

.thinking .ask-main svg { animation: spin 1.2s linear infinite; }

.thinking .ask-main span {
  background: linear-gradient(90deg, var(--muted), #fff, var(--muted));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

.ask-mic {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(var(--accent));
  color: #000;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color 1.2s var(--ease);
}

.ask-mic:active { transform: scale(.92); }
.ask-mic svg { width: 21px; height: 21px; }

.footer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  font-size: 12.5px;
  color: var(--faint);
}

.device-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 50%;
  padding: 4px 0;
  border: 0;
  background: none;
  color: rgb(var(--accent));
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.device-line.idle { color: var(--faint); }
.device-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-line svg { width: 16px; height: 16px; }

.session-line { margin-left: auto; text-align: right; }

/* ---------- Sheets (Dialoge) ---------- */

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 -20px 60px rgb(0 0 0 / .5);
  overflow: hidden;
}

.sheet[open] { animation: sheet-up .35s var(--ease); }
.sheet::backdrop { background: rgb(0 0 0 / .7); }

@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }

.sheet-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 10px 20px var(--pad-bottom);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto;
  border-radius: 2px;
  background: rgb(255 255 255 / .25);
}

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }

.sheet h3 {
  margin: 8px 0 -6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.sheet-sub { margin: -4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.sheet-actions .btn { flex: 1 1 auto; }

@media (min-width: 700px) {
  .sheet { margin: auto; border-radius: 24px; }
  .sheet-handle { display: none; }
  .sheet-inner { padding-top: 22px; padding-bottom: 22px; }
}

/* Prompt-Eingabe */

.prompt-box { position: relative; }

.prompt-box textarea {
  display: block;
  width: 100%;
  min-height: 100px;
  resize: none;
  padding: 14px 60px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 255 255 / .06);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}

.prompt-box textarea::placeholder { color: var(--faint); }
.prompt-box textarea:focus { border-color: rgb(var(--accent) / .6); outline: none; }

.prompt-box .mic { position: absolute; right: 8px; bottom: 8px; }

.mic.listening {
  background: var(--danger);
  color: #fff;
  animation: pulse 1.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(255 107 107 / .55); }
  100% { box-shadow: 0 0 0 14px rgb(255 107 107 / 0); }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}

.chip:hover { background: var(--surface-hover); border-color: rgb(var(--accent) / .5); }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
}

.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

.seg span {
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: background-color .2s, color .2s;
}

.seg input:checked + span { background: #fff; color: #000; }
.seg input:focus-visible + span { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, opacity .2s;
}

.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: rgb(var(--accent)); color: #000; }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-danger { color: var(--danger); }

.btn-spotify { min-height: 56px; padding: 0 30px; background: var(--green); color: #000; font-size: 16px; }
.btn-spotify:hover { background: #3be477; }

/* Session-Ansicht */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.stat { padding: 12px 6px; border-radius: 14px; background: var(--surface); text-align: center; }
.stat b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--muted); }

.hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.hint:empty { display: none; }

.list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.list .empty { padding: 8px 0; font-size: 14px; color: var(--faint); }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child { border-bottom: 0; }

.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.row-text b,
.row-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.row-text b { font-size: 14.5px; font-weight: 600; }
.row-text small { font-size: 12.5px; color: var(--muted); }

.outcome {
  flex: none;
  width: 84px;
  padding: 4px 0;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.outcome.completed { background: rgb(30 215 96 / .16); color: var(--green); }
.outcome.skipped { background: rgb(255 107 107 / .16); color: var(--danger); }
.outcome.partial { background: var(--surface); color: var(--muted); }

.heat-meter {
  flex: none;
  width: 64px;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-hover);
  overflow: hidden;
}

.heat-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb35c, var(--danger));
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 15px; font-weight: 600; }
.field-note { font-size: 12.5px; color: var(--faint); }

.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(255 255 255 / .06);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}

.field textarea::placeholder { color: var(--faint); }
.field textarea:focus { border-color: rgb(var(--accent) / .6); outline: none; }

.import-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface);
}

.import-box .row-text small { white-space: normal; }

.hint a { color: rgb(var(--accent)); }

.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; flex: none; }

.diag summary { cursor: pointer; font-size: 13px; color: var(--muted); }

.diag pre {
  max-height: 220px;
  overflow: auto;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgb(0 0 0 / .4);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.sheet-inner > .btn-small { align-self: flex-start; }

.toggle { position: relative; display: flex; align-items: center; gap: 14px; padding: 8px 0; cursor: pointer; }
.toggle-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.toggle-text b { font-size: 15px; font-weight: 600; }
.toggle-text small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }

.switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgb(255 255 255 / .2);
  transition: background-color .2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--ease);
}

.toggle input:checked + .switch { background: rgb(var(--accent)); }
.toggle input:checked + .switch::after { transform: translateX(18px); }
.toggle input:focus-visible + .switch { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }

/* Geräte */

.device {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s;
}

.device:hover { background: var(--surface); }
.device:disabled { opacity: .45; cursor: not-allowed; }
.device svg { width: 26px; height: 26px; }
.device.active { color: rgb(var(--accent)); }

.pill {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(var(--accent) / .18);
  color: rgb(var(--accent));
  font-size: 11.5px;
  font-weight: 700;
}

/* Toast */

.toast {
  display: none;
  position: fixed;
  inset: auto 0 calc(var(--pad-bottom) + 18px) 0;
  width: max-content;
  max-width: calc(100% - 32px);
  height: auto;
  margin: 0 auto;
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 12px 40px rgb(0 0 0 / .5);
  z-index: 100;
  overflow: visible;
}

.toast.show { display: block; animation: toast-in .3s var(--ease); }

@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

.noscript { position: relative; z-index: 2; padding: 40px; text-align: center; }

/* ---------- Responsiv ---------- */

@media (max-height: 680px) {
  .cover-wrap { width: min(84vw, 36dvh, 480px); }
  .ctl-main { width: 68px; height: 68px; }
  .ctl { width: 52px; height: 52px; }
  .ctl-side { width: 46px; height: 46px; }
}

@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .stage {
    flex-direction: row;
    justify-content: center;
    gap: clamp(40px, 6vw, 96px);
    padding-top: 0;
  }

  .cover-wrap { width: min(40vw, 62dvh, 560px); margin: auto 0; }
  .meta { width: min(38vw, 480px); margin: auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
