/* Net Lights UI kit — the ONE stylesheet for every page (jukebox public, jukebox admin, net designer).
   iOS Human Interface Guidelines vocabulary: system colors, inset-grouped lists, large titles, capsule
   buttons, segmented controls, switches, HUD toasts, action sheets. Light + dark follow the phone. */

:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Inter", system-ui, "Helvetica Neue", sans-serif;
  --bg: #f2f2f7;           /* systemGroupedBackground */
  --bg2: #ffffff;          /* secondarySystemGroupedBackground */
  --bg3: #e5e5ea;
  --label: #000;
  --label2: rgba(60,60,67,.6);
  --label3: rgba(60,60,67,.3);
  --sep: rgba(60,60,67,.29);
  --fill: rgba(118,118,128,.12);
  --fill2: rgba(118,118,128,.2);
  --seg-on: #fff;
  --tint: #ff2d55;         /* systemPink: the Music-app accent, and it reads as Christmas red */
  --red: #ff3b30;
  --green: #34c759;
  --orange: #ff9500;
  --blue: #007aff;
  --thumb-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16), 0 3px 1px rgba(0,0,0,.1);
  --material: rgba(246,246,248,.94);
  --r-group: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --bg2: #1c1c1e; --bg3: #2c2c2e;
    --label: #fff; --label2: rgba(235,235,245,.6); --label3: rgba(235,235,245,.3);
    --sep: rgba(84,84,88,.6); --fill: rgba(118,118,128,.24); --fill2: rgba(118,118,128,.32);
    --seg-on: #636366; --tint: #ff375f; --red: #ff453a; --green: #30d158; --orange: #ff9f0a; --blue: #0a84ff;
    --material: rgba(44,44,46,.94);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--label); }
body {
  font: 17px/1.29 var(--font); letter-spacing: -.41px; -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) calc(env(safe-area-inset-bottom) + 28px) env(safe-area-inset-left);
}
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
a { color: var(--tint); text-decoration: none; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.dim { color: var(--label2); }
.hidden { display: none !important; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 60%, transparent); outline-offset: 2px; border-radius: 10px; }

/* ---------- icons ---------- */
.i { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; flex: none; }

/* ---------- large-title navigation ---------- */
.nav { padding: 10px 0 6px; }
.nav .bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.large-title { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: .37px; margin: 0; }
.nav .sub { color: var(--label2); font-size: 15px; letter-spacing: -.24px; margin-top: 2px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600;
  color: #fff; background: linear-gradient(180deg, #a5abb8, #858994); letter-spacing: 0; flex: none; }

/* ---------- section headers ---------- */
.section { margin-top: 28px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; padding: 0 16px; }
.section-title h2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: .35px; margin: 0; }
.section-title small, .section-title .detail { font-size: 13px; letter-spacing: -.08px !important; color: var(--label2); letter-spacing: -.24px; font-weight: 400; }
.group-header { font-size: 13px; line-height: 18px; text-transform: uppercase; color: var(--label2); letter-spacing: -.08px; margin: 0 0 7px; padding: 0 16px; font-weight: 400; }
.group-footer { font-size: 13px; line-height: 18px; color: var(--label2); letter-spacing: -.08px; margin: 7px 0 0; padding: 0 16px; }

/* ---------- inset grouped list ---------- */
.list { background: var(--bg2); border-radius: var(--r-group); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.list > li, .list > .cell, .cell {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px;
}
.list > li + li::before, .list > .cell + .cell::before, .list > li + .cell::before, .list > .cell + li::before {
  content: ""; position: absolute; top: 0; right: 0; left: var(--sep-inset, 16px); border-top: .5px solid var(--sep);
}
.list.with-art { --sep-inset: 68px; }
.list .grow, .grow { flex: 1; min-width: 0; }
.list .icon-btn + .icon-btn, .list .icon-btn + .switch { margin-left: -6px; }
.cell-title { display: block; font-size: 17px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { display: block; font-size: 15px; line-height: 20px; color: var(--label2); letter-spacing: -.24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .empty { color: var(--label2); justify-content: center; font-size: 15px; min-height: 52px; }
.cell.link { color: var(--label); }
.cell.link .chev { color: var(--label3); font-size: 14px; }
.cell.link:active, .cell.tappable:active { background: var(--fill); }
.cell.tappable { cursor: pointer; }
.sub-tint { color: var(--tint); }
.cell.destructive { color: var(--red); justify-content: center; }
.cell .lead-icon { width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 17px; flex: none; }

/* ---------- artwork tiles ---------- */
.art { width: 44px; height: 44px; border-radius: 8px; flex: none; display: grid; place-items: center; color: rgba(255,255,255,.92);
  font-size: 20px; background: linear-gradient(135deg, var(--a1, #ff375f), var(--a2, #bf1e3c)); position: relative; overflow: hidden;
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.08); }
.art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.28), transparent 60%); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.art:has(img)::after { display: none; }
.art.c1 { --a1: #ff5e62; --a2: #b0123b; } .art.c2 { --a1: #2fd17a; --a2: #0b7a43; } .art.c3 { --a1: #ffcc3d; --a2: #e0791a; }
.art.c4 { --a1: #64b5ff; --a2: #2a4fd6; } .art.c5 { --a1: #c58bff; --a2: #6a2bd1; } .art.c0 { --a1: #ff8a5c; --a2: #d6304a; }

/* ---------- buttons ---------- */
.btn-filled { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border: 0;
  border-radius: 14px; background: var(--tint); color: #fff; font-size: 17px; font-weight: 600; padding: 14px 20px; transition: transform .15s, filter .15s; }
.btn-filled:active { transform: scale(.98); filter: brightness(.9); }
.btn-filled .i { font-size: 19px; }
/* App Store "GET"-style capsule */
.capsule { flex: none; border: 0; border-radius: 999px; background: var(--fill); color: var(--tint); font-size: 15px; font-weight: 600;
  letter-spacing: -.24px; padding: 6px 13px; min-width: 64px; min-height: 30px; text-align: center; transition: opacity .15s, transform .15s; white-space: nowrap; }
.capsule:active { transform: scale(.96); opacity: .7; }
.capsule:disabled { color: var(--label2); background: transparent; cursor: default; font-weight: 400; padding-right: 0; text-align: right; min-width: 84px; }
.capsule.danger { color: var(--red); }
.capsule.filled { background: var(--tint); color: #fff; }
.capsule .i { margin-right: 4px; }
/* round glyph buttons (44 pt hit target, smaller visual) */
.icon-btn { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--tint);
  display: grid; place-items: center; font-size: 22px; padding: 0; position: relative; transition: opacity .15s, transform .15s; }
.icon-btn::before { content: ""; position: absolute; inset: -5px; }
.icon-btn:active { opacity: .5; transform: scale(.92); }
.icon-btn:disabled { color: var(--label3); cursor: default; }
.icon-btn.filled { background: var(--fill); font-size: 15px; }
.icon-btn.on { background: var(--tint); color: #fff; }
.icon-btn.danger { color: var(--red); }
.icon-btn.gray { color: var(--label2); }
.icon-btn.sm { font-size: 17px; }

/* ---------- switch ---------- */
.switch { flex: none; width: 51px; height: 31px; border-radius: 16px; border: 0; padding: 0; background: var(--fill2); position: relative;
  transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); transition: transform .25s cubic-bezier(.3,.7,.4,1); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ---------- segmented control ---------- */
.segmented { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 0; position: relative; }
.segmented button { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 6px 8px; font-size: 13px; font-weight: 500;
  letter-spacing: -.08px; min-height: 28px; position: relative; white-space: nowrap; transition: background .2s; }
.segmented button + button::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; border-left: .5px solid var(--label3); }
.segmented button.on { background: var(--seg-on); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
.segmented button.on::before, .segmented button.on + button::before { display: none; }

/* ---------- slider ---------- */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--fill2) var(--a, 0%), var(--range-fill, var(--tint)) var(--a, 0%), var(--range-fill, var(--tint)) var(--b, var(--p)), var(--fill2) var(--b, var(--p))); }
input[type=range][dir=rtl]::-webkit-slider-runnable-track { background: linear-gradient(to left, var(--fill2) var(--a, 0%), var(--range-fill, var(--tint)) var(--a, 0%), var(--range-fill, var(--tint)) var(--b, var(--p)), var(--fill2) var(--b, var(--p))); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff;
  box-shadow: var(--thumb-shadow); margin-top: -12px; border: 0; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--range-fill, var(--tint)); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: var(--thumb-shadow); border: 0; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row .i { color: var(--label2); font-size: 18px; }

/* ---------- player (Now Playing) ---------- */
.player { position: relative; border-radius: 22px; overflow: hidden; padding: 18px 18px 20px; color: #fff; isolation: isolate;
  background: #1a0b10; margin-top: 4px; }
.player::before { content: ""; position: absolute; inset: -40%; z-index: -2; filter: blur(42px) saturate(140%);
  background: radial-gradient(55% 50% at 30% 25%, #b3264a, transparent 72%), radial-gradient(60% 55% at 80% 85%, #6e1430, transparent 72%), #22080f; animation: drift 18s ease-in-out infinite alternate; }
.player::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.5)); }
@keyframes drift { to { transform: rotate(14deg) scale(1.12) translate(3%, -2%); } }
.player .art-lg { aspect-ratio: 10 / 3; border-radius: 12px; position: relative; overflow: hidden; background: #07080c;
  box-shadow: 0 12px 30px rgba(0,0,0,.45), inset 0 0 0 .5px rgba(255,255,255,.1); }
.player .art-lg::before { content: ""; position: absolute; inset: 0;   /* the 40 x 12 bulb net */
  background: radial-gradient(circle, rgba(255,255,255,.95) 0 1.1px, transparent 1.6px) 0 0 / 2.5% 8.333%;
  -webkit-mask: linear-gradient(#000, #000); mix-blend-mode: overlay; opacity: .55; }
.player .art-lg::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, transparent 0 1.3px, #07080c 2.2px) 0 0 / 2.5% 8.333%; }
.player .art-lg .glow { position: absolute; inset: 0; background: linear-gradient(100deg, #ff375f, #ffcc3d 30%, #30d158 55%, #64b5ff 78%, #ff375f);
  background-size: 200% 100%; animation: sweep 6s linear infinite; }
.player.idle .art-lg .glow { filter: grayscale(1) brightness(.35); animation-play-state: paused; }
@keyframes sweep { to { background-position: -200% 0; } }
.player .meta { margin-top: 16px; min-width: 0; }
.player .kicker { font-size: 12px; font-weight: 600; letter-spacing: 0; color: rgba(255,255,255,.5); text-transform: uppercase; }
.player h1 { font-size: 24px; line-height: 29px; font-weight: 700; letter-spacing: .07px; margin: 3px 0 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .artist { font-size: 17px; color: rgba(255,255,255,.62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 22px; }
.scrubber { margin-top: 16px; }
.scrubber .track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.22); overflow: hidden; }
.scrubber .track > div { height: 100%; width: 0; background: rgba(255,255,255,.92); border-radius: 3px; transition: width .25s linear; }
.scrubber .times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.55);
  font-variant-numeric: tabular-nums; letter-spacing: 0; min-height: 15px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; letter-spacing: -.08px; color: rgba(255,255,255,.7); }
.chip .i { font-size: 15px; }
.player .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.player .live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.8); }
.player .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 3px rgba(48,209,88,.25); }
.player.idle .live::before { background: rgba(255,255,255,.4); box-shadow: none; }

/* listen call-to-action under the player */
.listen-cta { margin-top: 16px; }
.listen-cta .btn-filled.on { background: var(--fill); color: var(--label); }
.listen-cta .btn-filled .i-stop, .listen-cta .btn-filled.on .i-play { display: none; }
.listen-cta .btn-filled.on .i-stop { display: inline-block; }
.listen-cta .foot { text-align: center; font-size: 13px; color: var(--label2); margin-top: 8px; letter-spacing: -.08px; min-height: 18px; }

/* sync / trim group */
.sync-status { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--green); letter-spacing: -.24px; }
.sync-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.sync-status.pending { color: var(--label2); font-weight: 400; }
.sync-status.pending::before { width: 12px; height: 12px; background: none; border: 2px solid var(--fill2); border-top-color: var(--label2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.trim .cell { flex-wrap: wrap; }
.trim .trim-reset { margin-left: 10px; padding: 3px 12px; font-size: 13px; }
.trim .cell-title { font-size: 17px; }
.trim .val { color: var(--label2); font-size: 17px; font-variant-numeric: tabular-nums; }
.trim .slider-row { width: 100%; font-size: 13px; color: var(--label2); }
.trim .slider-row span { flex: none; letter-spacing: -.08px; }
.trim input[type=range] { --range-fill: var(--tint); }

/* badges */
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06px; padding: 2px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--tint) 16%, transparent); color: var(--tint); vertical-align: 1px; text-transform: uppercase; }
.badge.gray { background: var(--fill); color: var(--label2); }

/* ---------- toast (HUD banner) ---------- */
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 52px); z-index: 50; display: flex; align-items: center; gap: 10px;
  width: max-content; max-width: min(92vw, 420px); padding: 12px 18px 12px 14px; border-radius: 26px; line-height: 20px; font-size: 15px; font-weight: 600; letter-spacing: -.24px;
  color: var(--label); background: var(--material); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 8px 30px rgba(0,0,0,.28), 0 0 0 .5px rgba(0,0,0,.08); transform: translate(-50%, -160%); opacity: 0;
  transition: transform .45s cubic-bezier(.2,.9,.3,1.15), opacity .3s; pointer-events: none; }
.toast:empty { display: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast::before { content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--tint) center / 14px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.5 3.2 9.8 5.1c-.6.1-1 .6-1 1.2v9.2a3.4 3.4 0 1 0 2 3.1V9.8l6.8-1.5v5.3a3.4 3.4 0 1 0 2 3.1V4.2c0-.6-.6-1.1-1.1-1z' fill='white'/%3E%3C/svg%3E"); }
.toast.ok::before { background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.toast.err::before { background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v8' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='18.5' r='1.7' fill='white'/%3E%3C/svg%3E"); }

/* ---------- action sheet ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .25s; pointer-events: none; }
.sheet-bg.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 8px); z-index: 41; max-width: 544px; margin: 0 auto;
  transform: translateY(calc(100% + 40px)); visibility: hidden; transition: transform .35s cubic-bezier(.2,.9,.3,1), visibility 0s .35s; }
.sheet.show { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2,.9,.3,1); }
.sheet .grp { background: var(--material); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-radius: 14px; overflow: hidden; }
.sheet .ttl { text-align: center; padding: 14px 16px 12px; font-size: 13px; color: var(--label2); letter-spacing: -.08px; }
.sheet .ttl b { display: block; font-size: 13px; font-weight: 600; color: var(--label2); }
.sheet button { display: block; width: 100%; border: 0; background: transparent; color: var(--tint); font-size: 20px; letter-spacing: 0;
  min-height: 57px; border-top: .5px solid var(--sep); }
.sheet button:active { background: var(--fill); }
.sheet button.destructive { color: var(--red); }
.sheet .cancel { margin-top: 8px; border-top: 0; font-weight: 600; background: var(--bg2); border-radius: 14px; }

@media (prefers-reduced-motion: reduce) {
  .player::before, .player .art-lg .glow { animation: none; }
  * { transition-duration: .01ms !important; }
}
@media (min-width: 700px) { .wrap { padding: 0 24px; } }

/* ---------- info sheet (text card, same motion as the action sheet) ---------- */
.sheet .body { padding: 20px 20px 8px; max-height: 70vh; overflow: auto; }
.sheet .body h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: .38px; }
.sheet .body .meta { color: var(--label2); font-size: 15px; letter-spacing: -.24px; margin-bottom: 14px; }
.sheet .body ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.sheet .body li { counter-increment: s; position: relative; padding: 0 0 14px 38px; font-size: 15px; line-height: 20px; letter-spacing: -.24px; }
.sheet .body li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--tint); color: #fff; font-size: 14px; font-weight: 600; display: grid; place-items: center; letter-spacing: 0; }
.sheet .body li b { font-weight: 600; }
/* iOS pull-down menu button: value + up/down chevron */
.menu-btn { border: 0; background: transparent; color: var(--label2); font-size: 17px; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.menu-btn::after { content: ""; width: 12px; height: 16px; background: currentColor; opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='6 4 12 16'%3E%3Cpath d='M7.5 9.5 12 5l4.5 4.5M7.5 14.5 12 19l4.5-4.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='6 4 12 16'%3E%3Cpath d='M7.5 9.5 12 5l4.5 4.5M7.5 14.5 12 19l4.5-4.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* subtitle that truncates the artist but always keeps the trailing duration */
.cell-sub.split { display: flex; min-width: 0; }
.cell-sub.split > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cell-sub.split > span + span { flex: none; white-space: pre; }
.status-ico { flex: none; min-width: 64px; padding: 6px 0; background: none; text-align: center; font-size: 15px; font-weight: 400; color: var(--label3); }
.status-ico.now { color: var(--tint); }
a.avatar, button.avatar { border: 0; padding: 0; color: #fff; }
.avatar .i { font-size: 22px; margin-top: 6px; }
/* page sheet (grabber + inline title + Done) */
.sheet.page { left: 0; right: 0; bottom: 0; background: var(--bg2); border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); max-width: none; }
.sheet.page .grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--label3); margin: 6px auto 0; }
.sheet.page .head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 6px 20px; }
.sheet.page .head h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .38px; }
.sheet.page .head button { border: 0; background: none; color: var(--tint); font-size: 17px; font-weight: 600; min-height: 44px; border-top: 0; width: auto; padding: 0 4px; }
.sheet.page .body { padding: 6px 20px 24px; max-height: 72vh; overflow: auto; }
.feature { display: flex; gap: 18px; align-items: flex-start; padding: 14px 0; }
.feature .i { font-size: 38px; color: var(--tint); flex: none; width: 44px; }
.feature b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.24px; }
.feature span { display: block; font-size: 15px; line-height: 20px; color: var(--label2); letter-spacing: -.24px; }
.nav .back { display: inline-flex; align-items: center; gap: 2px; color: var(--tint); font-size: 17px; margin-left: -8px; min-height: 44px; }
.nav .back .i { font-size: 22px; }

/* compact navigation bar (shown by ui.js once the large title scrolls off) */
.compact-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; padding-top: env(safe-area-inset-top); height: calc(env(safe-area-inset-top) + 44px);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; letter-spacing: -.41px;
  background: color-mix(in srgb, var(--bg) 97%, transparent); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-bottom: .5px solid var(--sep); opacity: 0; pointer-events: none; transition: opacity .2s; }
.compact-bar.show { opacity: 1; }
/* two-sided sliders get a zero tick behind the track */
input[type=range].bipolar { background: linear-gradient(var(--label3), var(--label3)) center / 2px 14px no-repeat; }
/* skip glyph inside the hero meta row */
.player .meta-row { display: flex; align-items: flex-end; gap: 12px; }
.player .meta-row .meta { flex: 1; }
.player .skip { flex: none; border: 0; background: none; color: #fff; font-size: 26px; width: 36px; height: 44px; align-self: center; display: grid; place-items: center; padding: 0; margin-bottom: -2px; transition: opacity .15s, transform .15s; }
.player .skip:active { opacity: .5; transform: scale(.9); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sync-status .drift { color: var(--label2); font-weight: 400; margin-left: auto; font-variant-numeric: tabular-nums; }
.sync-status { color: var(--label); font-weight: 400; font-size: 17px; letter-spacing: -.41px; width: 100%; }
.sync-status::before { background: var(--green); }
.val { color: var(--label2); font-variant-numeric: tabular-nums; }
.cell .segmented { flex: none; width: 200px; }

.list li.queued .art { opacity: .5; }
.list li.queued .cell-title, .list li.playing .cell-title { color: var(--label2); }
.sync-foot { display: inline; }
.sync-foot:not(:empty)::after { content: " · "; }
.sync-foot.sync-status { font-size: 13px; letter-spacing: -.08px; color: var(--label2); width: auto; }
.sync-foot.sync-status::before { display: none; }
.sync-foot.sync-status .drift { margin-left: 4px; }
.sync-foot.sync-status.pending::before { display: none; }

/* popover menu anchored to a "…" button (iOS pull-down menu) */
.menu-pop { position: fixed; z-index: 41; min-width: 230px; max-width: 280px; border-radius: 13px; overflow: hidden; background: var(--material); border: .5px solid var(--sep);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: 0 12px 40px rgba(0,0,0,.28);
  transform-origin: top right; transform: scale(.6); opacity: 0; visibility: hidden; transition: transform .25s cubic-bezier(.2,.9,.3,1.2), opacity .2s, visibility 0s .25s; }
.menu-pop.show { transform: none; opacity: 1; visibility: visible; transition: transform .25s cubic-bezier(.2,.9,.3,1.2), opacity .2s; }
.menu-pop button { display: flex; width: 100%; justify-content: space-between; align-items: center; border: 0; background: transparent; color: var(--label);
  font-size: 17px; letter-spacing: -.41px; padding: 11px 16px; min-height: 44px; text-align: left; }
.menu-pop button + button { border-top: .5px solid var(--sep); }
.menu-pop button.destructive { color: var(--red); }
.menu-pop button:active { background: var(--fill); }
.menu-pop button .i { font-size: 18px; }
.sheet-bg.clear { background: transparent; }

.cell-sub.split > span + span { margin-left: 4px; }
/* Music-style "now playing" equalizer */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; background: var(--tint); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 70%; animation-duration: .9s; } .eq i:nth-child(2) { height: 100%; animation-duration: 1.13s; animation-delay: -.4s; } .eq i:nth-child(3) { height: 50%; animation-duration: .77s; animation-delay: -.2s; }
@keyframes eq { 50% { transform: scaleY(.35); } }
.eq i { transform-origin: bottom; }
.sheet .grp + .grp:not([hidden]) { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.sheet .grp:has(+ .grp:not([hidden])) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.sheet .grp + .grp button:first-child { border-top: .5px solid var(--sep); }
.thumbs-o .i-f, .on > .thumbs-o .i-o, .on .i-o { display: none; }
.on .i-f { display: inline-block; }

/* cover art in the Now Playing card; its blurred copy becomes the card background */
.player { --art: none; }
.player .art-bg { position: absolute; inset: -30%; z-index: -2; background: var(--art) center / cover; filter: blur(48px) saturate(160%) brightness(.75);
  opacity: 0; transition: opacity .6s; }
.player:not([style*="--art: none"]) .art-bg { opacity: 1; }
.player .meta-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.player .meta-row .meta { margin-top: 0; flex: 1; min-width: 0; }
.player .cover:empty { display: none; }
.player .cover .art { width: 64px; height: 64px; border-radius: 8px; font-size: 26px; box-shadow: 0 6px 16px rgba(0,0,0,.35); }

/* hairline around artwork so white covers keep their edge (Music does this) */
.art { outline: .5px solid rgba(0,0,0,.1); outline-offset: -.5px; }
@media (prefers-color-scheme: dark) { .art { outline-color: rgba(255,255,255,.1); } }
.status-ico .i { font-size: 18px; }

/* ---- round 13 ---- */
/* section headers line up with the large title (Music / App Store), footers stay with cell text */
.section-title { padding: 0 4px; }
/* hero title: wrap to two lines rather than truncate */
.player h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 22px; line-height: 27px; }
/* bordered (tinted) capsule like Apple's .bordered buttons; slimmer so titles keep their room */
.capsule { background: color-mix(in srgb, var(--tint) 14%, transparent); padding: 5px 14px; min-width: 0; }
.capsule:disabled { min-width: 0; }
.status-ico { min-width: 30px; }
/* light-show tiles: system-icon sized glyph and a soft top light */
.art { font-size: 24px; }
.art:not(:has(img)) { background: linear-gradient(180deg, color-mix(in srgb, var(--a1) 85%, #fff), var(--a2)); }
.art:not(:has(img))::after { display: none; }
/* playing state of the listen button: tinted, not a gray slab */
.listen-cta .btn-filled.on { background: color-mix(in srgb, var(--tint) 16%, transparent); color: var(--tint); }
/* real bar material once the title collapses */
.compact-bar { background: color-mix(in srgb, var(--bg) 78%, transparent); }
/* translucent system material for menus, sheets and HUDs (was ~94% opaque) */
:root { --material: rgba(249,249,249,.78); }
@media (prefers-color-scheme: dark) { :root { --material: rgba(37,37,37,.74); } }
.menu-pop, .sheet .grp, .toast { -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); }
.menu-pop { min-width: 250px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.section-title { padding: 0; }
.compact-bar { background: color-mix(in srgb, var(--bg) 90%, transparent); }

/* ---- round 14 ---- */
/* materials: near-opaque so they read right even where blur doesn't render */
:root { --material: rgba(249,249,249,.94); }
@media (prefers-color-scheme: dark) { :root { --material: rgba(40,40,42,.95); } }
.compact-bar { background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: .33px solid var(--sep); }
.sheet-bg { background: rgba(0,0,0,.4); }
.sheet-bg.clear { background: rgba(0,0,0,.18); }
/* banner drops from the top edge like an iOS notification */
.toast { top: calc(env(safe-area-inset-top) + 8px); box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.06); }
/* state lives in the trailing glyph, not in faded rows */
.list li.queued .art { opacity: 1; }
.list li.queued .cell-title, .list li.playing .cell-title { color: var(--label); }
/* Music-proportioned scrubber */
.scrubber .track { height: 4px; border-radius: 2px; }
.player .kicker { font-size: 12px; letter-spacing: .2px; color: rgba(255,255,255,.6); }
.player .skip { font-size: 30px; width: 44px; }
/* dark segmented thumb gets the same lift as light */
@media (prefers-color-scheme: dark) { .segmented button.on { background: #5a5a5e; } }
.avatar { background: linear-gradient(180deg, #8e8e93, #636366); font-size: 15px; }
/* page sheets: modern large corner radius */
.sheet.page { border-radius: 20px 20px 0 0; }

/* ---- round 15 ---- */
.eq { width: 16px; height: 14px; justify-content: center; }
.eq i { border-radius: 1.5px; }
.player .live::before { box-shadow: none; width: 8px; height: 8px; }
@media (prefers-color-scheme: dark) { .listen-cta .btn-filled.on { background: rgba(255,55,95,.2); } .capsule:not(:disabled) { background: rgba(255,55,95,.2); } }
.player .art-lg { border-radius: 14px; }
.feature { align-items: flex-start; gap: 16px; padding: 11px 0; }
.feature .i { font-size: 30px; width: 36px; margin-top: 2px; }
/* scroll-edge bar: solid, like UINavigationBar once content is under it (blur smeared text through) */
.compact-bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---- add-to-queue icon button + inline confirmation ---- */
.capsule.add-btn { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.capsule.add-btn .i { margin: 0; font-size: 20px; }
.capsule .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.list li { position: relative; }
.bubble { position: absolute; top: 50%; z-index: 5; max-width: 62%; padding: 7px 12px; border-radius: 14px;
  background: var(--green); color: #fff; font-size: 14px; font-weight: 600; line-height: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.22); transform: translate(8px, -50%) scale(.9); opacity: 0;
  transition: opacity .2s, transform .25s cubic-bezier(.3,1.4,.6,1); pointer-events: none; }
.bubble.err { background: var(--red); }
.bubble.show { opacity: 1; transform: translate(0, -50%) scale(1); }
.bubble::after { content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 2px; }

/* ---- live stage: Now Playing info over the routine ---- */
.player .art-lg.stage { aspect-ratio: auto; min-height: 176px; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; }
.player .art-lg.stage::before, .player .art-lg.stage::after { z-index: 1; }
.player .art-lg.stage .glow { z-index: 0; }
/* bulbs stay round: the net texture is drawn at the stage's real size, not stretched */
.player .art-lg.stage::before, .player .art-lg.stage::after { background-size: 2.5% 14px; }
.player .art-lg.stage canvas { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); z-index: 1;
  filter: blur(2.5px) saturate(140%) brightness(1.25); opacity: 0; transition: opacity .6s; }
.player .art-lg.stage.live canvas { opacity: 1; }
.player .art-lg.stage.live::before, .player .art-lg.stage.live::after, .player .art-lg.stage.live .glow { display: none; }
.player .art-lg.stage .scrim { position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.78)); }
.player .art-lg.stage > .meta-row { position: relative; z-index: 3; margin-top: 0; }
.player .art-lg.stage .meta-row h1, .player .art-lg.stage .meta-row .artist, .player .art-lg.stage .meta-row .kicker { text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.player .art-lg.stage + .scrubber { margin-top: 16px; }
/* DJ interlude: the talking characters (static/dj.js) above the Now Playing text, not under it */
.player .art-lg.stage.dj { justify-content: space-between; }
.player .art-lg.stage.dj canvas.dj-face { position: relative; inset: auto; z-index: 3; display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; margin: -4px 0 10px; filter: none; opacity: 1; transition: none; }
.player .art-lg.stage.dj::before, .player .art-lg.stage.dj::after, .player .art-lg.stage.dj .glow { display: none; }
