/* ============================================================
   AIradio – frontend
   --a1/--a2 are overwritten live by JS from the cover.
   ============================================================ */
:root {
  --night: #0d0a26;
  --night-2: #17123d;
  --night-3: #221b55;
  --mist: #eeebff;
  --dust: #9c96cf;
  --a1: #8b6cff;
  --a2: #22e0c8;
  --flare: #ff4f9a;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --orb: min(520px, 42vw);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--mist);
  font: 400 1rem/1.55 var(--body);
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--a2); }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 3px; border-radius: 6px; }

/* ---------- background ---------- */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.backdrop {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  filter: blur(90px) saturate(1.5);
  opacity: 0; transform: scale(1.1);
  transition: opacity 1.4s var(--ease), background-image .6s;
}
.backdrop.on { opacity: .38; }
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 20% 10%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 70%),
    radial-gradient(900px 600px at 90% 90%, color-mix(in srgb, var(--a2) 14%, transparent), transparent 70%),
    linear-gradient(180deg, transparent 40%, var(--night) 100%);
  transition: background 1.2s;
}
.topbar, main, .foot, .minibar, .toast { position: relative; z-index: 2; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top, 0px)) clamp(18px, 4vw, 56px) 18px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--mist); }
.brand span { font: 800 1.25rem/1 var(--display); letter-spacing: -.02em; }
.topbar-right { display: flex; align-items: center; gap: 22px; font-size: .92rem; color: var(--dust); }
.livecount { display: inline-flex; align-items: center; gap: 8px; }
.livecount b { color: var(--mist); font-weight: 700; }
.livecount i { width: 8px; height: 8px; border-radius: 50%; background: var(--flare); box-shadow: 0 0 0 0 var(--flare); animation: ping 2s infinite; }
.adminlink { color: var(--dust); text-decoration: none; padding: 7px 14px; border: 1px solid rgba(238,235,255,.18); border-radius: 999px; }
.adminlink:hover { color: var(--mist); border-color: var(--mist); }

main { padding: 0 clamp(18px, 4vw, 56px); max-width: 1500px; margin: 0 auto; }

/* ---------- stage ---------- */
.stage {
  display: grid;
  grid-template-columns: var(--orb) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(10px, 3vw, 40px) 0 clamp(40px, 6vw, 80px);
  min-height: min(78vh, 760px);
}

.orb { position: relative; width: var(--orb); aspect-ratio: 1; }
#viz { position: absolute; inset: -14%; width: 128%; height: 128%; }
.disc {
  position: absolute; inset: 21%; scale: var(--pulse, 1);
  border-radius: 50%; overflow: hidden;
  background: var(--night-2);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.12),
    0 30px 80px -20px color-mix(in srgb, var(--a1) 70%, transparent),
    0 0 120px -10px color-mix(in srgb, var(--a2) 45%, transparent);
  transition: box-shadow 1s;
}
.disc img { width: 100%; height: 100%; object-fit: cover; transition: opacity .5s, transform .8s var(--ease); }
.disc img.swap { opacity: 0; transform: scale(1.08); }
.playing .disc { animation: spin 40s linear infinite; }
.disc::after { /* small centre hole like a record */
  content: ""; position: absolute; left: 50%; top: 50%; width: 9%; height: 9%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--night); box-shadow: 0 0 0 4px rgba(255,255,255,.18);
}
.orb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26%; aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--night) 55%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; opacity: 0; transition: opacity .25s;
}
.orb-play svg { width: 42%; fill: var(--mist); }
.orb:hover .orb-play, .orb-play:focus-visible, .idle .orb-play { opacity: 1; }

.i-pause { display: none; }
.playing .i-play { display: none; }
.playing .i-pause { display: block; }

/* meta */
.meta { min-width: 0; }
.onair {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  font-weight: 600; font-size: .95rem;
}
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--dust); }
.playing .pulse { background: var(--flare); animation: ping 1.6s infinite; }
.chlive { color: var(--dust); font-weight: 500; }
.chlive:empty { display: none; }

.title {
  font: 800 clamp(2.3rem, 5.4vw, 5.2rem)/1.02 var(--display);
  letter-spacing: -.035em;
  margin: 0 0 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: balance;
  background: linear-gradient(100deg, var(--mist) 30%, color-mix(in srgb, var(--a2) 70%, var(--mist)) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.artist { font: 600 clamp(1.15rem, 2vw, 1.6rem)/1.3 var(--body); margin: 0 0 6px; }
.album { color: var(--dust); margin: 0 0 30px; font-size: 1.02rem; }

.progress { display: grid; grid-template-columns: 3.4em 1fr 3.4em; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; color: var(--dust); font-size: .9rem; max-width: 640px; }
.progress span:last-child { text-align: right; }
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); cursor: pointer; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--a1), var(--a2)); box-shadow: 0 0 18px color-mix(in srgb, var(--a2) 60%, transparent); }

.controls { display: flex; align-items: center; gap: 14px; margin: 26px 0 34px; flex-wrap: wrap; }
.ctl {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.05); cursor: pointer; display: inline-grid; place-items: center;
  transition: background .2s, border-color .2s, transform .15s;
}
.ctl:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); }
.ctl:active { transform: scale(.94); }
.ctl svg { width: 22px; height: 22px; fill: var(--mist); }
.ctl-main { width: 74px; height: 74px; border: 0; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 14px 40px -10px color-mix(in srgb, var(--a1) 80%, transparent); }
.ctl-main svg { width: 30px; height: 30px; fill: #fff; }
#btnLike { position: relative; }
#btnLike svg { fill: none; stroke: var(--mist); stroke-width: 1.8; }
#btnLike[aria-pressed="true"] svg { fill: var(--flare); stroke: var(--flare); }
#btnLike[aria-pressed="true"] { border-color: var(--flare); }
#btnLike.pop svg { animation: pop .45s var(--ease); }
#likeCount { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--flare); color: #fff; font-size: .72rem; font-weight: 700; line-height: 20px; }
#likeCount:empty { display: none; }
.vol { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; color: var(--dust); }
.vol svg { width: 22px; height: 22px; fill: currentColor; }
.vol input { width: 120px; accent-color: var(--a2); }

/* ID3 data */
.tags {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 1px; margin: 0; max-width: 680px;
  background: rgba(255,255,255,.08); border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.tags:empty { display: none; }
.tags div { background: color-mix(in srgb, var(--night) 82%, transparent); padding: 12px 14px; min-width: 0; }
.tags dt { color: var(--dust); font-size: .78rem; margin-bottom: 2px; }
.tags dd { margin: 0; font-weight: 600; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags .wide { grid-column: 1 / -1; }
.tags .wide dd { white-space: normal; font-weight: 500; color: color-mix(in srgb, var(--mist) 85%, var(--dust)); }

/* ---------- channels ---------- */
.sectionhead { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 22px; flex-wrap: wrap; }
.sectionhead h2 { font: 600 clamp(1.4rem, 2.4vw, 2rem)/1.1 var(--display); letter-spacing: -.02em; margin: 0; }
#chSearch {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--mist);
  border-radius: 999px; padding: 11px 18px; min-width: min(280px, 100%); font: inherit;
}
#chSearch::placeholder { color: var(--dust); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.tile {
  position: relative; aspect-ratio: 4 / 5; border: 0; padding: 0; cursor: pointer; text-align: left;
  border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2));
  isolation: isolate; transition: transform .35s var(--ease), box-shadow .35s;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(8,6,28,.88) 100%); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
.tile:hover { box-shadow: 0 24px 50px -18px var(--c1); }
.tile.active { box-shadow: 0 0 0 3px var(--mist), 0 24px 60px -16px var(--c2); transform: translateY(-4px); }
.tile-featured { grid-column: span 2; aspect-ratio: 8 / 5; }
.tile-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; display: grid; gap: 4px; }
.tile-name { font: 600 1.18rem/1.15 var(--display); letter-spacing: -.02em; }
.tile-featured .tile-name { font-size: 1.6rem; }
.tile-tag { font-size: .9rem; color: rgba(238,235,255,.82); line-height: 1.35; }
.tile-count { font-size: .78rem; color: rgba(238,235,255,.6); margin-top: 6px; }
.tile-eq { position: absolute; top: 16px; right: 16px; display: none; gap: 3px; align-items: end; height: 22px; }
.tile-eq i { width: 4px; background: #fff; border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.tile-eq i:nth-child(2) { animation-delay: -.3s; } .tile-eq i:nth-child(3) { animation-delay: -.6s; } .tile-eq i:nth-child(4) { animation-delay: -.15s; }
.playing .tile.active .tile-eq { display: flex; }
.tile.hide { display: none; }
.empty { color: var(--dust); }

/* ---------- history ---------- */
.history { margin: 64px 0 40px; }
#history { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
#history li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); }
#history img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
#history b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#history span { display: block; color: var(--dust); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#history li > div { min-width: 0; }

.foot { text-align: center; color: var(--dust); font-size: .84rem; padding: 40px 20px 60px; }

/* ---------- mini player (mobile / scrolled) ---------- */
.minibar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  display: grid; grid-template-columns: 48px 1fr auto auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 18px;
  background: color-mix(in srgb, var(--night-2) 82%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.6);
  max-width: 560px; margin: 0 auto;
}
.minibar[hidden] { display: none; }
.minibar img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.mini-text { min-width: 0; }
.mini-text b, .mini-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text span { color: var(--dust); font-size: .85rem; }
.minibar .ctl { width: 42px; height: 42px; }

.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); z-index: 30;
  background: var(--mist); color: var(--night); padding: 12px 20px; border-radius: 12px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--flare) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 22px; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.reveal .title, .reveal .artist, .reveal .album { animation: rise .7s var(--ease) both; }
.reveal .artist { animation-delay: .06s; } .reveal .album { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- submit a track ---------- */
.submitlink { background: linear-gradient(135deg, var(--a1), var(--flare)); border: 0 !important; color: #fff !important; font: inherit; cursor: pointer; }
.cta {
  margin: 72px 0 0; padding: clamp(26px, 4vw, 48px); border-radius: 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
  background:
    radial-gradient(600px 300px at 0% 0%, color-mix(in srgb, var(--a1) 45%, transparent), transparent 70%),
    radial-gradient(500px 300px at 100% 100%, color-mix(in srgb, var(--flare) 35%, transparent), transparent 70%),
    var(--night-2);
  border: 1px solid rgba(255,255,255,.1);
}
.cta h2 { font: 600 clamp(1.4rem, 2.6vw, 2.2rem)/1.12 var(--display); letter-spacing: -.02em; margin: 0 0 10px; }
.cta p { margin: 0; color: color-mix(in srgb, var(--mist) 80%, var(--dust)); max-width: 62ch; }
.btn-cta {
  border: 0; border-radius: 999px; padding: 15px 26px; cursor: pointer; white-space: nowrap;
  font: 600 1rem/1 var(--body); color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--flare));
  box-shadow: 0 14px 40px -12px color-mix(in srgb, var(--flare) 80%, transparent);
}
.btn-cta:hover { filter: brightness(1.08); }
.btn-cta[disabled] { opacity: .7; cursor: progress; }

.sheet {
  width: min(720px, calc(100vw - 24px)); max-height: min(92vh, 980px); padding: 0; border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px; background: var(--night-2); color: var(--mist); overflow: hidden;
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.8);
}
.sheet[open] { display: flex; animation: sheetin .35s var(--ease); }
.sheet::backdrop { background: rgba(8, 6, 28, .72); backdrop-filter: blur(6px); }
.sheet form { display: flex; flex-direction: column; width: 100%; max-height: inherit; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px 6px; }
.sheet-head h2 { margin: 0; font: 600 1.35rem/1.2 var(--display); letter-spacing: -.02em; }
.sheet-close { background: none; border: 0; color: var(--dust); font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.sheet-close:hover { color: var(--mist); }
.sheet-body { overflow-y: auto; padding: 14px 26px 10px; }
.sheet-foot { padding: 16px 26px 22px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 12px; }
.sheet-foot .btn-cta { width: 100%; }
.drop {
  display: grid; justify-items: center; gap: 6px; text-align: center; padding: 26px 18px; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--a1) 60%, transparent); border-radius: 18px;
  background: color-mix(in srgb, var(--a1) 10%, transparent); transition: background .2s, border-color .2s;
}
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop.over, .drop.has-file { border-color: var(--a2); background: color-mix(in srgb, var(--a2) 12%, transparent); }
.drop:focus-within { outline: 2px solid var(--a2); outline-offset: 3px; }
.drop-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--a2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop b { font-weight: 600; word-break: break-word; }
.drop small { color: var(--dust); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 6px; }
.fields .full { grid-column: 1 / -1; }
.fields label, .declaration label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--dust); }
.sheet input:not([type=checkbox]):not([type=file]), .sheet select, .sheet textarea {
  font: inherit; color: var(--mist); background: var(--night); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 11px 13px; width: 100%;
}
.sheet input:focus, .sheet select:focus, .sheet textarea:focus { outline: none; border-color: var(--a2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 25%, transparent); }
.sheet [aria-invalid="true"] { border-color: var(--flare) !important; }
.fielderr { color: #ff8fb8; font-size: .82rem; margin: 2px 0 0; min-height: 0; }
.fielderr:empty { display: none; }
.formerr { background: color-mix(in srgb, var(--flare) 18%, transparent); border: 1px solid var(--flare); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.declaration { margin-top: 14px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.declaration h3 { margin: 0 0 8px; font-size: 1rem; }
.decl-text { max-height: 150px; overflow-y: auto; font-size: .86rem; line-height: 1.55; color: color-mix(in srgb, var(--mist) 80%, var(--dust)); padding-right: 6px; margin-bottom: 12px; }
.declaration label.check { display: flex; align-items: flex-start; gap: 10px; color: var(--mist); font-weight: 600; font-size: .95rem; }
.declaration input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--a2); flex: none; }
.privacy { color: var(--dust); font-size: .82rem; margin: 12px 0 4px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.upbar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.upbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--a1), var(--a2)); transition: width .2s; }
.sheet-done { padding: 30px 26px 34px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.sheet-done h3 { font: 600 1.3rem/1.2 var(--display); margin: 10px 0 0; }
.sheet-done p { color: var(--dust); margin: 0 0 16px; max-width: 44ch; }
.done-mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--a1), var(--a2)); }
.done-mark svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes sheetin { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root { --orb: min(84vw, 460px); }
  .stage { grid-template-columns: 1fr; justify-items: center; text-align: center; min-height: 0; gap: 36px; }
  .meta { width: 100%; }
  .progress, .tags { margin-left: auto; margin-right: auto; }
  .controls { justify-content: center; }
  .tile-featured { grid-column: span 1; aspect-ratio: 4 / 5; }
  .topbar-right { gap: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .tile-body { padding: 14px; }
  .tile-name { font-size: 1rem; }
  .tile-featured .tile-name { font-size: 1rem; }
  .tile-tag { font-size: .82rem; }
  .vol { display: none; }
  .cta { grid-template-columns: 1fr; text-align: left; }
  .fields { grid-template-columns: 1fr; }
  .sheet-head, .sheet-body, .sheet-foot { padding-left: 18px; padding-right: 18px; }
  .topbar .adminlink:not(.submitlink) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================================================
   CHANNEL LAYOUTS  (body[data-layout] is set by JS from the channel)
   ============================================================ */
.orb { transition: width .6s var(--ease); }
.disc { transition: inset .6s var(--ease), border-radius .6s var(--ease), box-shadow 1s; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--a2) 45%, transparent), transparent 62%);
}

/* shared by layouts with a square cover and no ring */
body[data-layout="poster"] #viz, body[data-layout="wave"] #viz,
body[data-layout="retro"] #viz, body[data-layout="focus"] #viz { display: none; }
body:is([data-layout="poster"], [data-layout="wave"], [data-layout="retro"], [data-layout="focus"], [data-layout="snow"]) .disc::after { display: none; }
body:is([data-layout="poster"], [data-layout="wave"], [data-layout="retro"], [data-layout="focus"], [data-layout="snow"]).playing .disc { animation: none; }

/* layouts with scenes at the bottom of the screen must not fade out */
body:not([data-layout="neural"])::after {
  background:
    radial-gradient(1200px 700px at 20% 10%, color-mix(in srgb, var(--a1) 18%, transparent), transparent 70%),
    radial-gradient(900px 600px at 90% 90%, color-mix(in srgb, var(--a2) 10%, transparent), transparent 70%);
}
body[data-layout="retro"]::after { background: none; }

/* --- Club --- */
body[data-layout="club"]::before { opacity: var(--beat, 0); }
body[data-layout="club"] .title { font-weight: 800; letter-spacing: -.05em; transform: skewX(-7deg); transform-origin: left bottom; }
body[data-layout="club"].playing .disc { animation-duration: 12s; }
body[data-layout="club"] .disc { box-shadow: 0 0 0 2px var(--a2), 0 0 90px -10px var(--a1); }

/* --- Poster --- */
body[data-layout="poster"] { --orb: min(600px, 44vw); }
body[data-layout="poster"] .disc { inset: 0; border-radius: 28px; box-shadow: 0 50px 100px -30px color-mix(in srgb, var(--a1) 75%, transparent); }
body[data-layout="poster"] .orb-play { width: 22%; }
body[data-layout="poster"] .title { font-size: clamp(2.8rem, 7.2vw, 7.4rem); line-height: .94; letter-spacing: -.05em; -webkit-line-clamp: 4; }
body[data-layout="poster"] .artist { font-size: clamp(1.3rem, 2.4vw, 2rem); }
body[data-layout="poster"] .stage { padding-bottom: 120px; }

/* --- Wave --- */
body[data-layout="wave"] { --orb: min(300px, 62vw); }
body[data-layout="wave"] .stage { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 30px; }
body[data-layout="wave"] .disc { inset: 0; border-radius: 24px; }
body[data-layout="wave"] .meta { width: 100%; display: grid; justify-items: center; }
body[data-layout="wave"] .controls { justify-content: center; }
body[data-layout="wave"] .progress { width: 100%; }
body[data-layout="wave"] .tags { width: 100%; }

/* --- Retro --- */
body[data-layout="retro"] { background: #13052b; }
body[data-layout="retro"] .disc { inset: 16%; border-radius: 10px; box-shadow: 0 0 0 3px #ffd36e, 0 0 0 7px var(--a1), 0 0 80px 10px color-mix(in srgb, var(--a1) 70%, transparent); }
body[data-layout="retro"] .title {
  font-style: italic; letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff6d6 0%, #ffd36e 45%, var(--a1) 55%, color-mix(in srgb, var(--a1) 60%, #fff) 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--a1) 60%, transparent));
}
body[data-layout="retro"] .onair { border-color: #ffd36e; }

/* --- Snow --- */
body[data-layout="snow"] .disc { box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 0 120px 10px rgba(255, 207, 138, .35); }
body[data-layout="snow"].playing .disc { animation: sway 6s ease-in-out infinite; }
body[data-layout="snow"] .title { background: linear-gradient(180deg, #ffffff, #ffe2b8); -webkit-background-clip: text; background-clip: text; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

/* --- Focus --- */
body[data-layout="focus"] { --orb: min(320px, 30vw); }
body[data-layout="focus"] .stage { grid-template-columns: var(--orb) minmax(0, 1fr); min-height: min(64vh, 620px); }
body[data-layout="focus"] .disc { inset: 0; border-radius: 20px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
body[data-layout="focus"] .title { font-weight: 400; letter-spacing: -.02em; background: none; color: var(--mist); }
body[data-layout="focus"] .ctl-main { background: var(--mist); box-shadow: none; }
body[data-layout="focus"] .ctl-main svg { fill: var(--night); }
body[data-layout="focus"] .bar { height: 3px; }
body[data-layout="focus"] .bar i { box-shadow: none; }
body[data-layout="focus"] .tags { background: transparent; border-color: transparent; gap: 0; }
body[data-layout="focus"] .tags div { background: transparent; padding-left: 0; }

@media (max-width: 900px) {
  body[data-layout="poster"], body[data-layout="focus"] { --orb: min(84vw, 460px); }
  body[data-layout="focus"] .stage { grid-template-columns: 1fr; }
  body[data-layout="club"] .title { transform: none; }
}
