/* DJ BazBot (deedz.org/DjBazBot). Builds on /deedzlabs/styles.css (colours, nav, h1, .lede). */
.dj { margin-top: 22px; }
[hidden] { display: none !important; }
.dj-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.dj-intro .lede { color: var(--muted); }
.install-button { flex: none; padding: 9px 14px; }

button { font: inherit; color: inherit; cursor: pointer; }
input, textarea {
  font: inherit; color: var(--text); background: rgba(127, 140, 200, .1);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
code { font-size: .9em; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px;
  border: 0; border-radius: 999px; font-weight: 800; color: #08101f;
  background: linear-gradient(135deg, var(--cyan), #7aa8ff);
}
.button.ghost { color: var(--text); background: transparent; border: 1px solid var(--line); }
.button.danger { color: #ff7d9a; }
.chip {
  border: 1px solid var(--line); background: rgba(127, 140, 200, .08); border-radius: 999px;
  padding: 6px 12px; font-size: .88rem; font-weight: 700; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #fff; border-color: transparent; }
.hint { color: var(--muted); font-size: .88rem; margin: 8px 0; }
.empty { color: var(--muted); font-size: .9rem; margin: 6px 0 14px; }

/* ON AIR banner (scheduled shows) */
.on-air {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 16px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 60, 90, .2), rgba(255, 203, 61, .14)); border: 1px solid rgba(255, 90, 110, .45);
  color: var(--text); text-decoration: none;
}
.on-air[hidden] { display: none; }
.on-air-dot { width: 12px; height: 12px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 0 rgba(255, 59, 92, .6); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(255, 59, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); } }

/* The deck */
.deck {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: center;
  padding: clamp(16px, 3vw, 26px); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(0, 226, 255, .09), rgba(139, 61, 255, .14)), #0d1022; color: #f4f7ff;
  box-shadow: var(--shadow);
}
.deck-face { position: relative; }
.bazbot { width: 100%; height: auto; display: block; }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 34px; margin-top: 6px; }
.bars i { width: 8px; height: 4px; border-radius: 3px; background: linear-gradient(0deg, var(--cyan), var(--violet)); }
.deck[data-state="playing"] .bars i { animation: bar .9s ease-in-out infinite alternate; }
.deck[data-state="playing"] .bars i:nth-child(3n) { animation-duration: .7s; }
.deck[data-state="playing"] .bars i:nth-child(4n+1) { animation-duration: 1.1s; animation-delay: -.3s; }
.deck[data-state="playing"] .bars i:nth-child(5n+2) { animation-duration: .6s; animation-delay: -.5s; }
@keyframes bar { from { height: 4px; } to { height: 34px; } }
.deck[data-state="playing"] .bazbot { animation: bob .55s ease-in-out infinite alternate; }
.deck[data-state="playing"] .antenna { animation: blink 1.1s steps(2) infinite; }
.deck[data-state="loading"] .eyes { animation: blink .5s steps(2) infinite; }
.deck[data-state="error"] .eyes rect { fill: #ff5d7a; }
@keyframes bob { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-5px) rotate(2deg); } }
@keyframes blink { 50% { opacity: .3; } }

.deck-source { margin: 0; font-size: .78rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; color: #7fefff; }
.deck-title { margin: 4px 0 2px; font-size: clamp(1.3rem, 3.4vw, 2rem); line-height: 1.15; overflow-wrap: anywhere; }
.deck-sub { margin: 0; color: #b6bfd8; overflow-wrap: anywhere; }
.deck-note { margin: 8px 0 0; color: #ffcb3d; font-size: .9rem; }
.deck-note a { color: #ffcb3d; }
.deck-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.round {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06); color: #f4f7ff; font-size: 1.1rem;
}
.round.big { width: 60px; height: 60px; font-size: 1.5rem; border: 0; color: #08101f; background: linear-gradient(135deg, #00e2ff, #8b3dff); }
.volume { display: flex; align-items: center; gap: 6px; }
.volume input { width: 110px; padding: 0; background: none; border: 0; accent-color: #00e2ff; }
.sound-button.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 203, 61, .35); }
.sound-button.blocked { position: relative; opacity: .75; }
.sound-button.blocked::after { content: ""; position: absolute; left: 9px; right: 9px; top: 50%; height: 2px; background: #ff5d7a; transform: rotate(-35deg); }
.deck.live-bars .bars i { animation: none !important; transition: height .06s linear; }
.deck-handle { display: none; }
.embed-stage { margin-top: 14px; }

/* Seek bar ("scrubber") and LIVE tag */
.seek { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.seek .time { flex: none; min-width: 3.2em; font-size: .8rem; font-variant-numeric: tabular-nums; color: #b6bfd8; text-align: center; }
.seek input {
  --fill: 0%;
  flex: 1; height: 6px; padding: 0; border: 0; border-radius: 999px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: linear-gradient(90deg, #00e2ff, #8b3dff) 0 0 / var(--fill) 100% no-repeat, rgba(255, 255, 255, .16);
}
.seek input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.seek input::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; }
.live-tag { margin: 10px 0 0; font-size: .78rem; font-weight: 900; letter-spacing: .14em; color: #ff5d7a; }
.live-tag span { animation: blink 1.4s steps(2) infinite; }
.embed-stage iframe { display: block; width: 100%; border: 0; border-radius: 14px; background: #000; }
.yt-frame { aspect-ratio: 16 / 9; max-height: 60vh; border-radius: 14px; overflow: hidden; background: #000; }
.yt-frame iframe { width: 100%; height: 100%; border-radius: 0; }

/* One search box */
.omni { display: flex; gap: 8px; }
.omni input { flex: 1; min-height: 48px; font-size: 1.05rem; border-radius: 999px; padding: 0 18px; }
.omni .button { min-height: 48px; padding: 0 22px; }
.omni-hint { margin: 8px 4px 12px; }
.linkish { border: 0; background: none; padding: 0; color: var(--cyan); font-weight: 700; text-decoration: underline; }

/* Home: radio channels (big, simple tiles) */
.home-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 20px 0 10px; font-size: 1.05rem; }
.home-head .hint { margin: 0; font-weight: 500; }
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.channel-wrap { position: relative; }
.channel {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 10px; align-items: center;
  width: 100%; min-height: 72px; padding: 12px 50px 12px 14px; border-radius: 16px; border: 1px solid var(--line); text-align: left;
  background: linear-gradient(160deg, rgba(0, 226, 255, .1), rgba(139, 61, 255, .12));
}
.channel:hover { border-color: rgba(0, 226, 255, .5); }
.channel.now { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(0, 226, 255, .3); }
.channel.now .channel-name::after { content: " ♪"; color: var(--cyan); }
.channel-emoji { grid-row: 1 / span 2; font-size: 1.8rem; line-height: 1; }
.channel-name { font-weight: 850; font-size: 1rem; }
.channel-blurb { grid-column: 2; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.channel-list-button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; font-size: .8rem; }
.more-picks { margin-top: 20px; }
.more-picks summary { cursor: pointer; font-weight: 800; padding: 8px 0; }
.more-picks .picks { margin-top: 8px; }

/* Picks */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.pick {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(0, 226, 255, .08), rgba(139, 61, 255, .1));
}
.pick-emoji { font-size: 1.8rem; line-height: 1; }
.pick h3 { margin: 0; font-size: 1.02rem; }
.pick p { margin: 0; flex: 1; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.pick-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pick-actions .button { min-height: 36px; padding: 0 14px; }
.pick-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.pick-list-head h3 { margin: 0; }
[data-pick-list]:empty { display: none; }

/* Search results */
.result-section h3 { margin: 16px 0 4px; font-size: 1rem; }
.more-archive { margin-top: 8px; }

details.help { margin-top: 16px; color: var(--muted); font-size: .9rem; }
details.help summary { cursor: pointer; font-weight: 700; color: var(--text); }

/* Layout: sources + mix */
.dj-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.panel { padding: clamp(14px, 2.6vw, 22px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.panel h2 { margin: 0; font-size: 1.25rem; }
.panel h3 { margin: 18px 0 6px; font-size: 1rem; }
.mix { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.tabs button {
  flex: none; border: 0; border-radius: 12px; padding: 9px 14px; font-weight: 800; background: transparent; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: rgba(0, 226, 255, .14); color: var(--text); }
.tab-count:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--gold); color: #1b1003; font-size: .72rem; }
.phone-only { display: none; }
.search-row { display: flex; gap: 8px; align-items: center; }
.search-row input { flex: 1; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: thin; }
.chips.wrap, .chips.groups { flex-wrap: wrap; overflow: visible; }
/* Genres: two rows, then "All genres" (people didn't know the row scrolled sideways). */
.chips.groups:not(.open) { max-height: 92px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.more-groups { display: block; margin: 2px 0 4px; font-size: .9rem; }
.tab-panel.slide-left, .mix.slide-left { animation: slide-left .22s ease-out; }
.tab-panel.slide-right, .mix.slide-right { animation: slide-right .22s ease-out; }
@keyframes slide-left { from { transform: translateX(36px); opacity: .3; } }
@keyframes slide-right { from { transform: translateX(-36px); opacity: .3; } }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.list li.now { background: rgba(0, 226, 255, .1); border-radius: 10px; }
.item-main { flex: 1; min-width: 0; }
.item-title { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { display: block; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(127, 140, 200, .08); font-size: .95rem; line-height: 1;
}
.icon.play { background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #fff; border: 0; }
.icon.on { color: var(--gold); }
.icon[disabled] { opacity: .35; cursor: default; }
.tracks { width: 100%; margin: 6px 0 0 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.list li.has-tracks { flex-wrap: wrap; }
.more { display: block; margin: 10px auto 0; }

.queue li .num { flex: none; width: 22px; color: var(--muted); font-size: .8rem; text-align: right; }
.mix-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mix-name { margin: 10px 0 6px; }
.mix-name input { font-weight: 800; }
.mix-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mix-actions .button { min-height: 38px; padding: 0 12px; font-size: .9rem; }

.help ul { padding-left: 18px; }
.help li { margin: 6px 0; }
.fineprint { color: var(--muted); font-size: .82rem; margin: 22px 4px 0; }

:root[data-theme="light"] .deck-sub { color: #b6bfd8; }
:root[data-theme="light"] .on-air { color: #111633; }

/* Sheets (Sound, Install): a centred card on computers, a bottom sheet on phones */
.sheet {
  width: min(460px, calc(100% - 24px)); max-height: min(86vh, 760px); overflow: auto; padding: 18px 20px 22px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); color: var(--text);
}
.sheet::backdrop { background: rgba(0, 0, 0, .55); }
.sheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; touch-action: none; user-select: none; }
.sheet-head .grip { color: var(--muted); font-size: 1rem; margin-right: 2px; }
/* Computers: the Sound panel floats (no dimmed page) and drags by its title bar. */
.sheet.floating { position: fixed; inset: auto; margin: 0; z-index: 45; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); max-height: calc(100vh - 24px); }
.sheet.floating .sheet-head { cursor: grab; margin: -18px -20px 8px; padding: 14px 20px 8px; }
.sheet.dragging .sheet-head { cursor: grabbing; }
.eq-meter { display: block; width: 100%; height: 56px; margin: 10px 0 2px; border-radius: 10px; background: rgba(127, 140, 200, .08); color: var(--muted); }
.eq-blocked { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 203, 61, .4);
  background: rgba(255, 203, 61, .1); font-size: .88rem; line-height: 1.4; }
.sheet-head h2 { margin: 0; font-size: 1.3rem; }
.round.small { width: 38px; height: 38px; font-size: .95rem; color: var(--text); border-color: var(--line); background: transparent; }
.switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: rgba(127, 140, 200, .08); cursor: pointer; }
.switch-row input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: #ffcb3d; }
.switch-row small { color: var(--muted); }
.presets { flex-wrap: wrap; overflow: visible; }
.band { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 4em; align-items: center; gap: 10px; margin: 10px 0; font-weight: 700; font-size: .9rem; }
.band small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.band input { padding: 0; border: 0; background: none; accent-color: #00e2ff; }
.band input:disabled { opacity: .4; }
.band output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
[data-install-guide] ol { padding-left: 20px; }
[data-install-guide] li { margin: 8px 0; }

/* Icons: one line-icon set (the sprite at the top of index.html), sized by the button they sit in */
.i { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.22em; }
.round, button.icon { display: inline-grid; place-items: center; padding: 0; }
.round .i { width: 22px; height: 22px; }
.round.big .i { width: 28px; height: 28px; }
.round.small .i { width: 18px; height: 18px; }
button.icon .i { width: 18px; height: 18px; }
.button .i, .chip .i { margin-right: 4px; }
.tabs .tab-icon .i { width: 20px; height: 20px; vertical-align: -.3em; }
.mix h3 .i { color: var(--gold); }
.sheet-head h2 .i { vertical-align: -.18em; }
.volume .i { width: 20px; height: 20px; opacity: .8; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; max-width: calc(100% - 32px);
  margin: 0; padding: 10px 16px; border-radius: 16px; background: #f4f7ff; color: #0b0d1a; font-weight: 800; font-size: .9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); text-align: center;
}

/* Visualizer: covers the whole window */
.viz { position: fixed; inset: 0; z-index: 60; background: #05060f; color: #f4f7ff; }
.viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viz-top, .viz-bottom { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px; transition: opacity .4s; }
.viz-top { top: 0; justify-content: space-between; padding-top: calc(14px + env(safe-area-inset-top)); background: linear-gradient(rgba(5, 6, 15, .7), transparent); }
.viz-bottom { bottom: 0; justify-content: space-between; flex-wrap: wrap; padding-bottom: calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(5, 6, 15, .8)); }
.viz.idle .viz-top, .viz.idle .viz-bottom { opacity: 0; }
.viz.idle { cursor: none; }
.viz-modes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.viz-modes .chip { color: #f4f7ff; border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); }
.viz-modes .chip[aria-pressed="true"] { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; }
.viz-tools { display: flex; gap: 8px; flex: none; }
.viz .round.small { color: #f4f7ff; border-color: rgba(255, 255, 255, .25); background: rgba(5, 6, 15, .4); }
.viz-now { min-width: 0; flex: 1 1 240px; }
.viz-now p { margin: 0; }
.viz-title { font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 850; overflow-wrap: anywhere; }
.viz-note { color: #b6bfd8; font-size: .86rem; margin-top: 4px !important; }
.viz-controls { display: flex; align-items: center; gap: 12px; }
.viz-back { flex: none; min-height: 46px; padding: 0 18px; font-size: 1rem; }
.add-now { font-size: 1.35rem; font-weight: 800; }
.viz .mic-button[aria-pressed="true"] { background: linear-gradient(135deg, var(--cyan), var(--violet)); border-color: transparent; }
.viz .mic-button.suggest { border-color: var(--gold); animation: pulse 1.6s infinite; }
/* While the visualizer is open, YouTube and the other players float in a corner instead of being covered. */
.embed-stage.viz-float {
  position: fixed; z-index: 61; right: 16px; top: calc(70px + env(safe-area-inset-top)); width: min(356px, calc(100% - 32px));
  margin: 0; border-radius: 14px; box-shadow: 0 16px 50px rgba(0, 0, 0, .6);
}
.embed-stage.viz-float .yt-frame { min-height: 200px; max-height: none; }
:root.viz-on, :root.viz-on body { overflow: hidden; }

@media (max-width: 860px) {
  .dj-layout { grid-template-columns: minmax(0, 1fr); }
  .mix { position: static; max-height: none; }
}

/* Phones: a simple app. The player is a bar pinned to the bottom; My mix is a tab; extras sit behind 🎛️ and ⋯. */
@media (max-width: 700px) {
  .dj { margin-top: 12px; padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .dj-intro { margin-bottom: 10px; align-items: center; }
  .dj-intro .eyebrow, .dj-intro .lede { display: none; }
  .dj-intro h1 { font-size: 2rem; }
  .phone-only { display: inline-block; }

  .deck {
    position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 30;
    grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 20px;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, .45);
  }
  .deck-face { grid-row: 2 / span 3; align-self: start; }
  .bars { display: none; }
  .deck-source { font-size: .66rem; letter-spacing: .12em; }
  .deck-title { margin: 1px 0 0; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .deck-sub { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .deck-note { font-size: .78rem; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .seek { margin-top: 6px; gap: 8px; grid-column: 1 / -1; }
  .live-tag { margin-top: 4px; }
  .deck-info { display: contents; }
  .deck-info > .deck-source, .deck-info > .deck-title, .deck-info > .deck-sub { grid-column: 2; }
  .deck-info > .deck-source { grid-row: 2; }
  .deck-info > .deck-title { grid-row: 3; }
  .deck-info > .deck-sub { grid-row: 4; }
  .deck-info > .deck-note, .deck-info > .live-tag { grid-column: 1 / -1; }
  .deck-controls { grid-column: 1 / -1; justify-content: center; gap: 14px; margin-top: 4px; flex-wrap: nowrap; }
  .deck-controls .volume { display: none; }
  .deck-controls { gap: 10px; }
  .round { width: 44px; height: 44px; }

  /* Grab bar on top of the player: drag up for the big player, down to shrink it (or tap). */
  .deck-handle {
    display: block; grid-column: 1 / -1; grid-row: 1; justify-self: center; width: 90px; height: 22px; margin: -8px 0 -4px;
    border: 0; background: none; touch-action: none; cursor: grab;
  }
  .deck-handle span { display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 999px; background: rgba(255, 255, 255, .35); }
  .deck { transition: top .25s ease, transform .2s ease; }
  .deck.dragging { transition: none; }
  .deck.expanded {
    top: calc(8px + env(safe-area-inset-top)); grid-template-columns: minmax(0, 1fr); align-content: center;
    gap: 10px; padding: 14px 18px 18px; overflow-y: auto; text-align: center;
  }
  .deck.expanded .deck-face { grid-row: auto; grid-column: 1; width: min(190px, 48vw); justify-self: center; }
  .deck.expanded .bars { display: flex; }
  .deck.expanded .deck-info > .deck-source, .deck.expanded .deck-info > .deck-title, .deck.expanded .deck-info > .deck-sub { grid-column: 1; grid-row: auto; }
  .deck.expanded .deck-title { white-space: normal; font-size: 1.45rem; }
  .deck.expanded .deck-sub { white-space: normal; }
  .deck.expanded .deck-controls { flex-wrap: wrap; gap: 10px; margin-top: 10px; }
  .deck.expanded .deck-controls .volume { display: flex; order: 9; flex-basis: 100%; justify-content: center; }
  .deck.expanded .deck-controls .volume input { width: min(260px, 70vw); }
  .deck.expanded .round { width: 46px; height: 46px; }
  .deck.expanded .round.big { width: 64px; height: 64px; font-size: 1.7rem; }
  :root.player-open, :root.player-open body { overflow: hidden; }

  /* Tucked away: a slim strip with the song and play/pause; drag it back up for the player. */
  :root.player-tucked .dj { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .deck.tucked { grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 6px 12px 8px; }
  .deck.tucked .deck-face, .deck.tucked .deck-source, .deck.tucked .deck-sub, .deck.tucked .deck-note,
  .deck.tucked .seek, .deck.tucked .live-tag, .deck.tucked .deck-controls > :not([data-toggle]) { display: none !important; }
  .deck.tucked .deck-handle { margin: -4px 0 -2px; height: 18px; }
  .deck.tucked .deck-info > .deck-title { grid-column: 1; grid-row: 2; align-self: center; font-size: .95rem; }
  .deck.tucked .deck-controls { grid-column: 2; grid-row: 2; margin: 0; }
  .deck.tucked .round.big { width: 42px; height: 42px; font-size: 1.1rem; }

  .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .channel { min-height: 56px; padding: 8px 34px 8px 10px; gap: 2px 8px; }
  .channel-blurb { display: none; }
  .channel-emoji { font-size: 1.3rem; }
  .channel-name { grid-row: 1 / span 2; font-size: .86rem; line-height: 1.2; }
  .channel-list-button { right: 4px; width: 28px; height: 28px; border: 0; background: none; color: var(--muted); }
  .viz-back { min-height: 42px; padding: 0 14px; }

  /* Tabs fit the screen: icon on top, short label underneath. */
  .tabs { gap: 2px; margin: 0 -4px 10px; }
  .tabs button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; font-size: .74rem; position: relative; white-space: nowrap; }
  .tabs .tab-icon { font-size: 1.15rem; }
  .tabs .tab-count:not(:empty) { position: absolute; top: 2px; right: calc(50% - 26px); margin: 0; }
  .round.big { width: 54px; height: 54px; }

  .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
  /* The everyday phone bar stays small: song + ⏮ ▶ ⏭ ＋. Sound and the visualizer are in the big player. */
  .deck:not(.expanded):not(.tucked) .deck-sub, .deck:not(.expanded):not(.tucked) .sound-button,
  .deck:not(.expanded):not(.tucked) .viz-button { display: none !important; }
  .deck:not(.expanded) .deck-title { cursor: pointer; }
  .sheet { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }

  /* My mix tab: on phones the mix panel replaces the lists instead of sitting below everything. */
  .dj:not([data-view="mix"]) .mix { display: none; }
  .dj[data-view="mix"] .sources details.help { display: none; }
  .dj[data-view="mix"] .sources { padding-bottom: 6px; }
  .dj-layout { margin-top: 12px; gap: 12px; }
  .panel { padding: 12px; }
  .omni-hint { font-size: .82rem; }
  /* Picks: compact tiles (emoji + name + play); the blurb is for bigger screens. */
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pick { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 8px; padding: 10px; border-radius: 14px; }
  .pick-emoji { font-size: 1.4rem; }
  .pick h3 { font-size: .92rem; line-height: 1.2; }
  .pick p { display: none; }
  .pick-actions { grid-column: 1 / -1; margin-top: 2px; }
  .pick-actions .button { flex: 1; min-height: 34px; }
  .pick-actions .chip { display: none; }
  .omni-hint { display: none; }
  .sheet-head { padding-top: 10px; }
  .sheet-head .grip { display: none; }
  .sheet-head::before { content: ""; position: absolute; left: 50%; top: -6px; width: 40px; height: 5px; margin-left: -20px; border-radius: 999px; background: var(--line); }
  .viz-top { flex-wrap: wrap; }
  .viz-modes { order: 2; flex-basis: 100%; }
  .embed-stage.viz-float { top: calc(116px + env(safe-area-inset-top)); left: 16px; right: 16px; width: auto; }
  .viz-tools { margin-left: auto; }
  .omni .button { padding: 0 16px; }
  .list li { gap: 6px; padding: 8px 2px; }
  .fineprint { font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  .deck[data-state] .bars i, .deck[data-state] .bazbot, .deck[data-state] .antenna, .on-air-dot, .live-tag span,
  .tab-panel, .mix, .viz .mic-button.suggest { animation: none !important; }
  .deck[data-state="playing"] .bars i { height: 18px; }
}

/* DJ BazBot's Halloween Special */
.spooky {
  display: flex; gap: 16px; align-items: flex-start; margin: 0 0 14px; padding: 16px 18px; border-radius: 18px;
  background: radial-gradient(circle at 12% 20%, rgba(255, 140, 30, .28), transparent 55%),
    linear-gradient(135deg, rgba(139, 61, 255, .22), rgba(20, 10, 30, .5)), #140d22;
  border: 1px solid rgba(255, 140, 30, .5); color: #fdf3ff;
}
.spooky-pumpkin { font-size: 52px; line-height: 1; flex: none; animation: spooky-bob 2.4s ease-in-out infinite alternate; }
@keyframes spooky-bob { from { transform: rotate(-6deg); } to { transform: rotate(6deg) translateY(-3px); } }
.spooky-text { min-width: 0; flex: 1; }
.spooky h2 { margin: 0 0 4px; font-size: 1.25rem; }
.spooky h2 span { color: #ff9a2e; }
.spooky p { margin: 0 0 10px; color: #d9cdea; }
.spooky-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spooky .button { background: linear-gradient(135deg, #ff9a2e, #ff5e3a); color: #1a0d05; }
.spooky .chip { color: #fdf3ff; }
.spooky-talk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.spooky-talk input { width: auto; margin: 0; accent-color: #ff9a2e; }
.spooky-songs { margin-top: 10px; }
.spooky-songs summary { cursor: pointer; color: #ffb766; font-weight: 700; }
.spooky-songs ol { max-height: 320px; overflow: auto; margin: 8px 0 0; padding-left: 2.4em; }
.spooky-songs li { margin: 3px 0; }
.spooky-songs .linkish { color: #fdf3ff; text-align: left; }
.spooky-songs .hint { color: #b9a9cf; }
.spooky-live {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px;
  background: rgba(255, 59, 92, .16); border: 1px solid rgba(255, 90, 110, .5);
}
.spooky-live > span:nth-child(2) { flex: 1 1 200px; min-width: 0; }
.voice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-weight: 700; }
.voice-row label { display: inline-flex; flex: 1 1 220px; align-items: center; gap: 8px; min-width: 0; }
.voice-row select {
  flex: 1; min-width: 0; font: inherit; font-weight: 600; color: var(--text); background: rgba(127, 140, 200, .1);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px;
}
/* BazBot on the mic: his mouth moves */
.deck[data-state="talking"] .mouth { transform-box: fill-box; transform-origin: center; animation: talk .18s ease-in-out infinite alternate; }
.deck[data-state="talking"] .eyes rect { fill: #ff9a2e; }
@keyframes talk { from { transform: scaleY(.4); } to { transform: scaleY(1.6); } }
@media (max-width: 700px) { .spooky { padding: 14px; gap: 10px; } .spooky-pumpkin { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) { .spooky-pumpkin, .deck[data-state="talking"] .mouth { animation: none; } }
