/* Instantané Radio — Spotify playlist screen, rebuilt to iPhone 16 Pro metrics (402×874pt).
   1 CSS px == 1 pt. Geometry measured from the reference screenshot (large Dynamic Type). */

:root {
  /* Token kit: "lagoon" — paper-white canvas, slate ink, lagoon hero field, clay accent.
     Type: Fraunces (display) · Schibsted Grotesk (UI) · Geist Mono (metadata). */
  --yellow: #2A8E96;          /* hero field (name kept for layout parity) */
  --hero-ink: #FBFAF4;
  --navy: #D6E9E8;            /* body gradient start, hero tint fading into paper */
  --bg: #FBFAF4;
  --card: #FFFFFF;
  --green: #CC785C;           /* accent for playing / saved states (name kept for layout parity) */
  --accent-ink: #FBFAF4;
  --sea: #1F7C84;
  --primary: #141413;         /* play buttons */
  --primary-ink: #FBFAF4;
  --text: #141413;
  --sub: #6F6D66;
  --sub2: #44423D;
  --chip: #EEECE3;
  --mini: #DCEBEA;
  --topbar: #FBFAF4;
  --status: #FBFAF4;
  --back-rgb: 251, 250, 244;
  --line: rgba(20, 20, 19, .1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 50px;
  --mini-h: 57px;
  --font: "Schibsted Grotesk", -apple-system, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overscroll-behavior: none; }
body {
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  position: fixed; inset: 0; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
img { display: block; }
svg { display: block; }
svg[fill="none"] { fill: none !important; }

/* ---------- Stage / device frame ---------- */
#stage { position: absolute; inset: 0; }
#device { position: absolute; inset: 0; }
#screen { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.statusbar, .home-indicator, .island { display: none; }

/* Desktop or tablet: show a phone frame at exact device size, scaled to fit. */
@media (min-width: 560px) and (min-height: 560px) {
  :root { --sat: 59px; --sab: 34px; }
  #stage {
    background: #E9E7DE radial-gradient(1200px 800px at 50% 30%, #FFFFFA 0%, #E9E7DE 60%, #D8D5C9 100%);
    display: grid; place-items: center;
  }
  #device {
    position: relative; inset: auto;
    width: 402px; height: 874px;
    border-radius: 62px;
    background: #0a0a0a;
    box-shadow: 0 0 0 11px #1b1b1b, 0 0 0 13px #3a3a3a, 0 40px 90px rgba(50,35,20,.35), 0 0 0 14px rgba(255,255,255,.3);
    transform: scale(var(--scale, 1));
    transform-origin: center;
  }
  #screen { border-radius: 50px; }
  .statusbar { display: flex; }
  .home-indicator { display: block; }
  .island { display: block; position: absolute; top: 11px; left: 50%; width: 125px; height: 37px; margin-left: -62.5px; border-radius: 20px; background: #000; z-index: 60; }
}

.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: var(--sat);
  z-index: 40; pointer-events: none;
  align-items: flex-start; justify-content: space-between;
  padding: 22px 36px 0 46px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em; line-height: 21px;
  color: var(--status, #fff);
}
.statusbar-left, .statusbar-right { display: flex; align-items: center; gap: 6px; }
.statusbar-left { gap: 4px; }
.statusbar svg { fill: currentColor; }
.statusbar .bell { margin-top: 1px; opacity: .95; }
.statusbar-right { gap: 7px; }
.battery { display: inline-flex; align-items: center; margin-left: 1px; }
.battery-body { position: relative; width: 25px; height: 13px; border-radius: 4px; background: #F7E569; display: grid; place-items: center; }
.battery-fill { position: absolute; inset: 0; border-radius: 4px; background: #FFD60A; width: 28%; }
.battery-pct { position: relative; font-size: 11px; font-weight: 700; color: #000; letter-spacing: -0.02em; line-height: 1; }
.battery-cap { width: 2px; height: 5px; border-radius: 0 2px 2px 0; background: rgba(30,27,24,.35); margin-left: 1px; }
.hero-mode .statusbar { color: #fff; }

/* ---------- Scroll container ---------- */
.scroll {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  background: var(--bg);
  padding-bottom: calc(var(--sab) + var(--tabbar-h) + 6px + var(--mini-h) + 24px);
}
.scroll::-webkit-scrollbar { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: calc(var(--sat) + 279px);
  background: var(--yellow);
  overflow: hidden;
}
.hero-circles { position: absolute; inset: 0; will-change: transform, opacity; }
.circle { position: absolute; border-radius: 50%; overflow: hidden; background: #6fb5ba; box-shadow: 0 10px 30px rgba(10,60,65,.25); }
.circle img { width: 100%; height: 100%; object-fit: cover; }
.circle-left  { width: 180px; height: 180px; left: -90px; top: calc(var(--sat) + 5px); }
.circle-right { width: 142px; height: 142px; left: 311px; top: calc(var(--sat) + 38px); }
.circle-center { width: 218px; height: 218px; left: 92px; top: calc(var(--sat) - 2px); box-shadow: 0 0 0 5px var(--yellow); }
.circle-center::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.hero-shade {
  position: absolute; left: 0; right: 0; bottom: 0;
  top: calc(var(--sat) + 184px);
  background: linear-gradient(to bottom, rgba(14,70,76,0) 0%, rgba(14,70,76,.35) 100%);
  pointer-events: none;
}
.hero-kicker {
  position: absolute; right: 16px; top: calc(var(--sat) + 17px); margin: 0;
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; line-height: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(251,250,244,.82);
  will-change: opacity;
}
.hero-kicker .mark { width: 14px; height: 14px; }
.hero-kicker .mark svg { width: 14px; height: 14px; fill: currentColor; }
.hero-title {
  position: absolute; left: 15px; right: 12px; bottom: 13px;
  margin: 0;
  font-family: var(--display); font-size: 49px; font-weight: 500; line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  letter-spacing: -0.015em;
  color: var(--hero-ink);
  white-space: nowrap;
  will-change: opacity, transform;
}

/* ---------- Meta block ---------- */
.meta {
  position: relative;
  padding: 16px 16px 0;
  background: linear-gradient(to bottom, var(--navy) 0px, #EEF4F2 120px, var(--bg) 182px);
}
.meta p { margin: 0; }
.meta-with { font-size: 13.3px; line-height: 18px; color: var(--sub2); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-madefor { display: flex; align-items: center; gap: 8px; margin-top: 9px !important; font-size: 13.3px; line-height: 24px; letter-spacing: -0.01em; }
.spotify-mark { width: 24px; height: 24px; flex: none; }
.spotify-mark svg { width: 24px; height: 24px; }
.spotify-mark .mark-paper { fill: var(--sea); }
.meta-madefor b, .meta-about b { font-weight: 700; color: var(--text); }
.meta-dim { color: var(--sub2); }
.meta-about { margin-top: 12px !important; font-size: 13.3px; line-height: 18px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-stats { margin-top: 6px !important; font-family: var(--mono); font-size: 11px; line-height: 16px; color: var(--sub); letter-spacing: .08em; text-transform: uppercase; }

/* Action row */
.actions { display: flex; align-items: center; height: 48px; margin-top: 4px; gap: 0; }
.act { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: var(--sub); transition: transform .12s ease, opacity .12s ease; }
.act:active { transform: scale(.9); opacity: .8; }
.act svg { width: 24px; height: 24px; fill: currentColor; }
.act-thumb { width: 34px; margin-right: 14px; }
.thumb-stack { position: relative; width: 34px; height: 40px; display: block; }
.thumb-card { position: absolute; top: 0; width: 28px; height: 40px; border-radius: 3px; overflow: hidden; }
.thumb-back { left: 6px; background: #E9B59C; opacity: .9; top: 2px; height: 36px; }
.thumb-front { left: 0; border: 2px solid #FFFFFF; background: #DCE9EA; box-shadow: 0 2px 6px rgba(60,40,20,.18); }
.thumb-front img { width: 100%; height: 100%; object-fit: cover; }
.act-save, .act-download, .act-more { margin-right: 3px; }
.act-save svg, .act-download svg { width: 22px; height: 22px; }
.act-save .ic-add, .act-save.is-saved .ic-check { display: block; }
.act-save .ic-check, .act-save.is-saved .ic-add { display: none; }
.act-download .ic-ring, .act-download .ic-dl-done, .act-download .ic-dl-idle { display: none; position: absolute; }
.act-download[data-state="idle"] .ic-dl-idle { display: block; }
.act-download[data-state="downloading"] .ic-ring { display: block; }
.act-download[data-state="done"] .ic-dl-done { display: block; }
.ring-track { opacity: .28; }
.ring-prog { transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .25s linear; }
.act-more svg { width: 24px; }
.actions-spacer { flex: 1; }
.act-filter, .act-shuffle { color: var(--text); width: 36px; }
.act-filter svg { width: 22px; height: 22px; }
.act-shuffle { margin-right: 14px; }
.act-shuffle svg, .nc-shuffle svg, .nc-repeat svg { width: 26px; height: 26px; }
.shuffle-dot { position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--green); opacity: 0; transition: opacity .15s; }
.act-shuffle.is-on, .nc-shuffle.is-on, .nc-repeat.is-on { color: var(--green); }
.act-shuffle.is-on .shuffle-dot, .nc-shuffle.is-on .shuffle-dot, .nc-repeat.is-on .shuffle-dot { opacity: 1; }
.act-fab-slot { width: 48px; height: 48px; flex: none; }

/* Play button (floating; JS positions it) */
.fab {
  position: absolute; z-index: 30;
  left: 338px; top: 0;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: var(--primary-ink);
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(43,33,28,.28);
  transition: transform .12s ease;
  will-change: top;
}
.fab:active { transform: scale(.92); }
.fab svg { width: 24px; height: 24px; fill: var(--primary-ink); }
.fab .ic-play, .mini-play .ic-play, .nc-play .ic-play { display: none; }
.fab.is-paused .ic-play, .mini-play.is-paused .ic-play, .nc-play.is-paused .ic-play { display: block; }
.fab.is-paused .ic-pause, .mini-play.is-paused .ic-pause, .nc-play.is-paused .ic-pause { display: none; }
.fab .ic-play { margin-left: 2px; }

/* Chips */
.chips {
  display: flex; gap: 8px;
  margin: 16px -16px 0; padding: 0 16px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 11px 0 11px; border-radius: 16px;
  background: var(--chip); color: var(--text);
  font-size: 13.3px; font-weight: 500; letter-spacing: -0.01em; line-height: 1;
  white-space: nowrap;
  transition: background .15s, color .15s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip svg { width: 16px; height: 16px; margin-left: -3px; }
.chip:has(svg) { padding-left: 11px; }
.chip.is-on { background: var(--primary); color: var(--primary-ink); }

/* ---------- Track list ---------- */
.tracks { list-style: none; margin: 8px 0 0; padding: 0; }
.track {
  display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center;
  height: 64px; padding: 0 16px 0 16px; column-gap: 12px;
  transition: background .1s;
}
.track:active { background: rgba(30,27,24,.04); }
.track-art { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #E6DED3; box-shadow: 0 2px 6px rgba(60,40,20,.14); }
.track-main { min-width: 0; }
.track-title { display: flex; align-items: center; gap: 5px; font-size: 16px; line-height: 20px; font-weight: 500; letter-spacing: -0.012em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-title span { overflow: hidden; text-overflow: ellipsis; }
.track.is-playing .track-title { color: var(--green); }
.track-sub { display: flex; align-items: center; gap: 5px; margin-top: 0; font-size: 13.5px; line-height: 18px; color: var(--sub); letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; }
.track-sub .dl { width: 13px; height: 13px; flex: none; }
.track-sub .dl circle { fill: var(--green); }
.track-sub .dl path { stroke: var(--accent-ink); }
.track-sub .dur { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--sub); margin-left: 2px; }
.track-sub .explicit { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 2px; background: var(--sub); color: var(--bg); font-size: 10px; font-weight: 700; flex: none; }
.track .row-save, .track .row-more { width: 36px; height: 44px; display: grid; place-items: center; color: var(--sub); }
.track .row-save { margin-right: 8px; }
.track .row-save svg { width: 22px; height: 22px; }
.track .row-save .ic-add { display: none; }
.track .row-save.is-saved .ic-check { display: block; }
.track .row-save:not(.is-saved) .ic-check { display: none; }
.track .row-save:not(.is-saved) .ic-add { display: block; }
.track .row-more { margin-right: -10px; }
.track .row-more svg { width: 24px; height: 24px; fill: currentColor; }
.track.is-hidden { display: none; }

/* Now-playing equalizer bars */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 13px; height: 13px; flex: none; margin-right: 1px; }
.eq i { display: block; width: 3px; background: var(--green); border-radius: 1px; height: 30%; }
.is-playing-audio .track.is-playing .eq i { animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(1) { animation-delay: 0s; } .eq i:nth-child(2) { animation-delay: -.35s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.track.is-playing .eq i:nth-child(1) { height: 45%; } .track.is-playing .eq i:nth-child(2) { height: 100%; } .track.is-playing .eq i:nth-child(3) { height: 60%; }
@keyframes eq { 0%,100% { height: 30%; } 30% { height: 100%; } 60% { height: 55%; } 80% { height: 85%; } }

.list-end { height: 8px; }

/* ---------- Top bar ---------- */
.topbar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 35;
  height: calc(var(--sat) + 44px);
  pointer-events: none;
}
.topbar-bg { position: absolute; inset: 0; background: rgba(246,241,234,.92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); opacity: 0; will-change: opacity; }
.back {
  position: absolute; left: 16px; top: calc(var(--sat) + 3px);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.72); color: var(--text);
  display: grid; place-items: center; pointer-events: auto;
  box-shadow: 0 2px 10px rgba(60,40,20,.12);
  transition: transform .12s;
}
.back:active { transform: scale(.92); }
.back svg { width: 26px; height: 26px; margin-left: -2px; }
.topbar-title {
  position: absolute; left: 72px; right: 72px; top: calc(var(--sat) + 3px); height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 19px; font-weight: 500; font-variation-settings: "opsz" 24, "SOFT" 60, "WONK" 1; letter-spacing: -0.005em; color: var(--text);
  opacity: 0; transform: translateY(8px); will-change: opacity, transform;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Bottom chrome ---------- */
.bottom-fade {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; pointer-events: none;
  height: calc(var(--sab) + var(--tabbar-h) + 6px + var(--mini-h) + 40px);
  background: linear-gradient(to bottom, rgba(246,241,234,0) 0%, rgba(246,241,234,.9) 38px, var(--bg) 60px);
}
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 25;
  height: calc(var(--sab) + var(--tabbar-h));
  padding-bottom: var(--sab);
  background: rgba(246,241,234,.94); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px; gap: 6px; color: var(--sub); transition: color .15s; }
.tab svg { width: 24px; height: 24px; }
.tab span { font-size: 10.7px; font-weight: 500; line-height: 13px; letter-spacing: 0; }
.tab.is-active { color: var(--text); }
.tab:active { opacity: .7; }
.home-indicator { position: absolute; left: 50%; bottom: 8px; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: rgba(30,27,24,.28); z-index: 26; }

.mini {
  position: absolute; left: 8px; right: 8px; z-index: 25;
  bottom: calc(var(--sab) + var(--tabbar-h) + 6px);
  height: var(--mini-h); border-radius: 14px;
  background: var(--mini); color: var(--text);
  display: grid; grid-template-columns: 40px 1fr auto auto auto; align-items: center;
  column-gap: 0; padding: 0 2px 0 8px;
  transition: background .35s ease, transform .15s;
  box-shadow: 0 8px 24px rgba(60,40,20,.18), 0 1px 0 rgba(255,255,255,.6) inset;
  will-change: transform;
}
.mini:active { transform: scale(.99); }
.mini-art { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; margin-top: -1px; }
.mini-text { min-width: 0; padding-left: 10px; padding-right: 8px; }
.mini-title { font-size: 13.3px; line-height: 17px; font-weight: 500; letter-spacing: -0.012em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { font-size: 12.3px; line-height: 16px; color: var(--sub2); letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-btn { width: 42px; height: 44px; display: grid; place-items: center; color: var(--text); transition: transform .12s; }
.mini-btn:active { transform: scale(.9); }
.mini-btn svg { width: 24px; height: 24px; fill: currentColor; }
.mini-save svg { width: 23px; height: 23px; }
.mini-save .ic-add { display: none; }
.mini-save:not(.is-saved) .ic-check { display: none; }
.mini-save:not(.is-saved) .ic-add { display: block; }
.mini-play svg { width: 22px; height: 22px; }
.mini-play { margin-right: 2px; }
.mini-progress { position: absolute; left: 9px; right: 9px; bottom: 2px; height: 2px; border-radius: 1px; background: rgba(30,27,24,.14); overflow: hidden; }
.mini-progress-fill { height: 100%; width: 0%; background: var(--green); border-radius: 1px; }

/* ---------- Tab placeholder pages ---------- */
.tabpage {
  position: absolute; left: 0; right: 0; top: 0; z-index: 22;
  bottom: calc(var(--sab) + var(--tabbar-h));
  background: var(--bg);
  padding: calc(var(--sat) + 28px) 16px 0;
}
.tabpage h2 { margin: 0 0 10px; font-family: var(--display); font-size: 36px; font-weight: 500; font-variation-settings: "opsz" 72, "SOFT" 60, "WONK" 1; letter-spacing: -0.01em; }
.tabpage p { margin: 0; color: var(--sub); font-size: 14px; line-height: 20px; }

/* ---------- Now Playing ---------- */
.now {
  position: absolute; inset: 0; z-index: 50; touch-action: none;
  transform: translateY(100%);
  transition: transform .42s cubic-bezier(.32,.72,0,1);
  will-change: transform;
}
.now.is-open { transform: translateY(0); }
.now.is-dragging { transition: none; }
.now-bg { position: absolute; inset: 0; background: linear-gradient(to bottom, var(--now, #DCE9EA) 0%, var(--bg) 70%); transition: background .4s; }
.now-inner { position: absolute; inset: 0; padding: calc(var(--sat) + 8px) 24px calc(var(--sab) + 16px); display: flex; flex-direction: column; }
.now-top { display: flex; align-items: center; height: 44px; margin: 0 -8px; }
.now-close, .now-more { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); }
.now-close svg { width: 26px; height: 26px; }
.now-more svg { width: 24px; height: 24px; fill: currentColor; }
.now-context { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.now-context-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); }
.now-context-title { font-family: var(--display); font-size: 16px; font-weight: 500; font-variation-settings: "opsz" 24, "SOFT" 60, "WONK" 1; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.now-art-wrap { flex: 1; display: grid; place-items: center; min-height: 0; padding: 18px 0 8px; }
.now-art { width: 100%; max-width: 354px; aspect-ratio: 1; border-radius: 16px; object-fit: cover; box-shadow: 0 24px 50px rgba(60,40,20,.28); }
.now-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.now-text { flex: 1; min-width: 0; }
.now-title { font-family: var(--display); font-size: 30px; font-weight: 500; font-variation-settings: "opsz" 72, "SOFT" 60, "WONK" 1; letter-spacing: -0.01em; line-height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-artist { font-size: 15px; color: var(--sub); letter-spacing: -0.01em; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-save { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); margin-right: -8px; }
.now-save svg { width: 26px; height: 26px; }
.now-save .ic-add { display: none; }
.now-save:not(.is-saved) .ic-check { display: none; }
.now-save:not(.is-saved) .ic-add { display: block; }
.scrub { margin-top: 14px; padding: 10px 0 0; touch-action: none; }
.scrub-track { position: relative; height: 4px; border-radius: 2px; background: rgba(30,27,24,.14); }
.scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: var(--primary); }
.scrub-knob { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--primary); transform: scale(.9); transition: transform .15s; }
.scrub.is-dragging .scrub-knob { transform: scale(1.25); }
.scrub-times { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--sub); font-variant-numeric: tabular-nums; }
.now-controls { display: flex; align-items: center; justify-content: space-between; margin: 14px -6px 0; }
.nc { position: relative; width: 56px; height: 56px; display: grid; place-items: center; color: var(--text); transition: transform .12s; }
.nc:active { transform: scale(.92); }
.nc svg { width: 28px; height: 28px; fill: currentColor; }
.nc-prev svg, .nc-next svg { width: 32px; height: 32px; }
.nc-play { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); box-shadow: 0 14px 30px rgba(43,33,28,.3); }
.nc-play svg { width: 32px; height: 32px; fill: var(--primary-ink); }
.nc-play .ic-play { margin-left: 3px; }
.now-bottom { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; margin: 22px -10px 0; }
.nb { width: 44px; height: 44px; display: grid; place-items: center; color: var(--sub2); }
.nb svg { width: 22px; height: 22px; }

/* ---------- Sheets ---------- */
.sheet-backdrop { position: absolute; inset: 0; z-index: 70; background: rgba(43,33,28,.38); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 71;
  max-height: calc(100% - var(--sat) - 24px);
  background: var(--card); color: var(--text); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(60,40,20,.15);
  padding: 0 0 calc(var(--sab) + 8px);
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32,.72,0,1);
  overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain;
  will-change: transform;
  display: flex; flex-direction: column;
}
.sheet::-webkit-scrollbar { display: none; }
.sheet.is-open { transform: translateY(0); }
.sheet.is-dragging { transition: none; }
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: rgba(30,27,24,.18); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head:empty { display: none; }
.sheet-head img { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; }
.sheet-head .sh-title { font-family: var(--display); font-size: 20px; font-weight: 500; font-variation-settings: "opsz" 24, "SOFT" 60, "WONK" 1; letter-spacing: -0.005em; }
.sheet-head .sh-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sub); margin-top: 4px; }
.sheet-head.is-radio .sh-sub { color: var(--sub); }
.sheet-head.is-plain { display: block; padding-bottom: 6px; border: 0; }
.sheet-head.is-plain .sh-title { font-size: 22px; }
.sheet-list { list-style: none; margin: 0; padding: 6px 0 0; flex: 1; }
.sheet-item { display: flex; align-items: center; gap: 16px; width: 100%; padding: 0 20px; height: 52px; font-size: 15px; letter-spacing: -0.01em; color: var(--text); text-align: left; }
.sheet-item:active { background: rgba(30,27,24,.05); }
.sheet-item svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--sub2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sheet-item.is-selected { color: var(--green); }
.sheet-item .radio { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.8px solid var(--sub); flex: none; display: grid; place-items: center; }
.sheet-item.is-selected .radio { border-color: var(--green); }
.sheet-item.is-selected .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.sheet-item .pill { margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--green); }
.sheet-item.is-device { height: 62px; }
.sheet-item .dev { display: flex; flex-direction: column; }
.sheet-item .dev small { font-size: 13px; color: var(--sub); }
.sheet-close { height: 54px; width: 100%; font-size: 15px; font-weight: 700; color: var(--text); margin-top: 4px; flex: none; }

/* ---------- Toast ---------- */
.toast {
  position: absolute; left: 50%; z-index: 80;
  bottom: calc(var(--sab) + var(--tabbar-h) + 6px + var(--mini-h) + 14px);
  transform: translate(-50%, 12px);
  background: var(--primary); color: var(--primary-ink);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 11px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(43,33,28,.3);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Misc ---------- */
@media (prefers-reduced-motion: reduce) {
  .now, .sheet, .sheet-backdrop, .toast { transition: none; }
  .eq i { animation: none !important; }
}
