:root {
  --accent: #ff375f;
  --accent-rgb: 255, 55, 95;
  --accent-2: #ff9f0a;
  --accent-2-rgb: 255, 159, 10;
  --ink: #151517;
  --muted: rgba(21, 21, 23, .55);
  --hairline: rgba(21, 21, 23, .085);
  --volume: 78%;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; }
body {
  overflow: hidden;
  color: var(--ink);
  background: #f6f5f1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.quartz-scene {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
}

.quartz-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% -15%, rgba(255,255,255,.99) 0 24%, transparent 53%),
    linear-gradient(135deg, #fbfaf7 0%, #f0efea 46%, #faf8f3 100%);
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.quartz-vein,
.quartz-glint {
  position: absolute;
  pointer-events: none;
}

.quartz-vein {
  width: 84vw;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(112,105,96,.11), rgba(255,255,255,.95), rgba(112,105,96,.08), transparent);
  filter: blur(.2px);
  transform-origin: center;
}
.quartz-vein-a { left: -18vw; top: 28%; transform: rotate(-17deg); }
.quartz-vein-b { right: -20vw; bottom: 22%; transform: rotate(21deg); opacity: .72; }
.quartz-glint {
  inset: -35%;
  background: linear-gradient(113deg, transparent 42%, rgba(255,255,255,.5) 48%, rgba(255,255,255,.86) 50%, transparent 56%);
  opacity: .58;
}
.quartz-grain {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  pointer-events: none;
}

.glass-pane,
.player-shell {
  position: fixed;
  inset: 0;
  width: min(1080px, calc(100vw - 56px));
  height: min(650px, calc(100svh - 54px));
  min-height: 0;
  margin: auto;
  border-radius: 52px;
}

.glass-pane {
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.72);
  box-shadow:
    0 42px 110px rgba(68,61,51,.18),
    0 10px 28px rgba(68,61,51,.08),
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(80,72,62,.06);
}

/* Only visible while WebGL initializes or when it is unavailable. */
.glass-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,.38);
  backdrop-filter: blur(32px) saturate(165%);
  -webkit-backdrop-filter: blur(32px) saturate(165%);
  transition: opacity .45s ease;
}
.liquidgl-ready .glass-pane::before { opacity: 0; }

.player-shell {
  z-index: 22;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}
.player-content {
  position: relative;
  z-index: 3;
  height: 100%;
  min-height: 0;
  padding: 24px 28px 30px;
  pointer-events: auto;
}

.topbar {
  height: 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.station-brand,
.top-actions,
.listeners,
.broadcast-state,
.meta-kicker,
.artwork-topline,
.live-rail,
.control-dock,
.bottom-row,
.volume-control,
.quality-badge {
  display: flex;
  align-items: center;
}
.station-brand { gap: 11px; min-width: 0; }
.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 9px 22px rgba(var(--accent-rgb), .24), inset 0 1px 0 rgba(255,255,255,.45);
}
.brand-icon img { width: 27px; height: 27px; object-fit: contain; display: block; }
.station-copy { min-width: 0; display: grid; gap: 2px; }
.station-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.01em;
}
.station-caption { color: rgba(21,21,23,.43); font-size: 10px; font-weight: 650; }
.broadcast-state {
  gap: 8px;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  color: rgba(21,21,23,.68);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}
.live-dot,
.artwork-live i,
.live-time i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 5px rgba(255,59,48,.1);
  animation: livePulse 1.8s ease-in-out infinite;
}
@keyframes livePulse { 50% { box-shadow: 0 0 0 10px rgba(255,59,48,0); } }
.top-actions { justify-content: flex-end; gap: 9px; }
.listeners {
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  color: rgba(21,21,23,.58);
  font-size: 11px;
  font-weight: 680;
}
.listeners img,
.top-button img,
.round-button img,
.volume-control img {
  display: block;
  object-fit: contain;
}
img[data-icon] {
  min-width: 15px;
  min-height: 15px;
}
.listeners img { width: 19px; height: 19px; }
.top-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 50%;
  color: rgba(21,21,23,.56);
  background: rgba(255,255,255,.24);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.top-button:hover { background: rgba(255,255,255,.62); transform: scale(1.04); }
.top-button img { width: 23px; height: 23px; }

.player-grid {
  height: calc(100% - 67px);
  display: grid;
  grid-template-columns: minmax(380px, .92fr) minmax(440px, 1.08fr);
  gap: 56px;
  align-items: center;
  margin-top: 15px;
}

.artwork-card {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  color: white;
  background:
    radial-gradient(circle at 24% 16%, rgba(255,255,255,.5), transparent 25%),
    radial-gradient(circle at 76% 78%, rgba(255,255,255,.12), transparent 33%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 86%, white), color-mix(in srgb, var(--accent-2) 68%, #5531dd));
  box-shadow:
    0 36px 70px rgba(var(--accent-rgb), .22),
    0 12px 30px rgba(50,30,50,.13),
    inset 0 1px 0 rgba(255,255,255,.48),
    inset 0 -1px 0 rgba(0,0,0,.08);
  transition: background .65s ease, box-shadow .65s ease;
}
.artwork-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(1.04) contrast(1.02);
  transition: opacity .45s ease, transform 1.2s cubic-bezier(.2,.8,.2,1);
}
.artwork-image-scrim {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5,5,8,.26), transparent 30%, transparent 60%, rgba(5,5,8,.54)),
    radial-gradient(circle at 50% 44%, transparent 35%, rgba(5,5,8,.14) 100%);
  transition: opacity .45s ease;
}
.artwork-card.has-artwork .artwork-image { opacity: 1; transform: scale(1); }
.artwork-card.has-artwork .artwork-image-scrim { opacity: 1; }
.artwork-card.has-artwork .cover-symbol { opacity: 0; transform: translateY(-6px) scale(.86); }
.artwork-card.has-artwork .artwork-ambient { opacity: .18; }
.artwork-card.has-artwork .artwork-orbit { opacity: .2; }
.artwork-card.artwork-loading .cover-symbol { opacity: .72; }
.artwork-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -40%;
  background: conic-gradient(from 205deg, transparent 0 10%, rgba(255,255,255,.25) 17%, transparent 28% 62%, rgba(255,255,255,.12) 70%, transparent 82%);
  animation: artworkSheen 17s linear infinite;
}
.artwork-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  pointer-events: none;
}
@keyframes artworkSheen { to { transform: rotate(360deg); } }
.artwork-ambient {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  left: 14%;
  top: 12%;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  filter: blur(58px);
}
.artwork-orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  transform: rotate(-18deg);
}
.orbit-one { width: 116%; height: 48%; left: -8%; top: 26%; }
.orbit-two { width: 88%; height: 88%; right: -34%; top: -18%; border-color: rgba(255,255,255,.16); }
#coverParticles { position: absolute; inset: 0; width: 100%; height: 100%; }
.artwork-topline {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 24px;
  right: 24px;
  justify-content: space-between;
}
.artwork-live,
.artwork-type {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: .12em;
}
.artwork-live {
  gap: 8px;
  padding: 0 11px;
  background: rgba(14,14,18,.24);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(16px);
}
.artwork-live i { width: 6px; height: 6px; box-shadow: none; }
.artwork-type { padding: 0 4px; color: rgba(255,255,255,.72); }
.cover-symbol {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  transform: translateY(-6px);
  transition: opacity .4s ease, transform .55s ease;
}
.cover-symbol img {
  width: min(44%, 198px);
  height: min(44%, 198px);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 24px 34px rgba(30,13,45,.2));
}
.artwork-footer {
  position: absolute;
  z-index: 3;
  left: 25px;
  right: 25px;
  bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.artwork-footer > div:first-child { display: grid; gap: 4px; }
.artwork-footer span { font-size: 9px; font-weight: 780; letter-spacing: .12em; opacity: .68; }
.artwork-footer strong { font-size: 16px; font-weight: 760; letter-spacing: -.02em; }
.mini-equalizer {
  width: 74px;
  height: 28px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.mini-equalizer i {
  flex: 1;
  min-width: 2px;
  height: 12%;
  border-radius: 99px;
  background: rgba(255,255,255,.84);
  transform-origin: bottom;
  transition: height 65ms linear;
}

.now-playing { min-width: 0; padding: 5px 8px 2px 0; }
.meta-kicker { gap: 11px; }
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .105);
  color: var(--accent);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .035em;
}
.now-label { color: rgba(21,21,23,.38); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
h1 {
  max-width: 540px;
  margin: 17px 0 9px;
  font-size: clamp(44px, 4.25vw, 64px);
  line-height: .96;
  letter-spacing: -.06em;
  font-weight: 760;
  text-wrap: balance;
}
.subtitle { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.45; }
.host { min-height: 20px; margin: 7px 0 0; color: rgba(21,21,23,.78); font-size: 13px; font-weight: 680; }

.signal-panel { margin-top: 33px; }
.spectrum {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}
.spectrum i {
  flex: 1;
  min-width: 2px;
  height: 8%;
  border-radius: 99px;
  background: linear-gradient(to top, rgba(var(--accent-rgb), .48), var(--accent));
  box-shadow: 0 0 9px rgba(var(--accent-rgb), .12);
  transform-origin: center;
  transition: height 62ms linear;
}
.live-rail { gap: 11px; margin-top: 3px; }
.live-time,
.infinity { color: rgba(21,21,23,.4); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.live-time { display: flex; align-items: center; gap: 7px; color: #ff3b30; }
.live-time i { width: 5px; height: 5px; box-shadow: none; }
.live-line { flex: 1; height: 3px; overflow: hidden; border-radius: 999px; background: rgba(21,21,23,.08); }
.live-line span {
  display: block;
  width: 28%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 13px rgba(var(--accent-rgb), .4);
  animation: liveTravel 2.65s ease-in-out infinite alternate;
}
@keyframes liveTravel { to { transform: translateX(260%); } }

.control-dock { justify-content: center; gap: 26px; margin-top: 25px; }
.round-button,
.play-button {
  position: relative;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.round-button {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 50%;
  color: rgba(21,21,23,.7);
  background: rgba(255,255,255,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 9px 24px rgba(55,48,40,.07);
}
.round-button:hover { background: rgba(255,255,255,.7); transform: translateY(-1px) scale(1.035); }
.round-button img { width: 25px; height: 25px; }
.play-button {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 90%, white), var(--accent));
  box-shadow: 0 20px 38px rgba(var(--accent-rgb), .3), inset 0 1px 0 rgba(255,255,255,.42);
}
.play-glow {
  position: absolute;
  inset: -13px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), .14);
  opacity: .8;
  transition: transform .4s ease, opacity .4s ease;
}
.is-playing .play-glow { animation: playPulse 1.8s ease-out infinite; }
@keyframes playPulse { to { transform: scale(1.25); opacity: 0; } }
.play-button:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 24px 44px rgba(var(--accent-rgb), .34), inset 0 1px 0 rgba(255,255,255,.48); }
.play-button:active,
.round-button:active,
.top-button:active { transform: scale(.96); }
.play-button img { width: 36px; height: 36px; object-fit: contain; margin-left: 3px; position: relative; z-index: 1; }

.bottom-row { justify-content: space-between; gap: 24px; margin-top: 27px; }
.volume-control { flex: 1; max-width: 250px; grid-template-columns: 22px 1fr 22px; gap: 10px; color: rgba(21,21,23,.38); }
.volume-control img { width: 21px; height: 21px; opacity: .62; }
.volume-control input {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  background: linear-gradient(90deg, var(--accent) 0 var(--volume), rgba(21,21,23,.1) var(--volume) 100%);
}
.volume-control input::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(21,21,23,.24);
}
.volume-control input::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 0;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(21,21,23,.24);
}
.quality-badge {
  min-height: 48px;
  gap: 9px;
  padding: 7px 13px 7px 9px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  color: rgba(21,21,23,.52);
  background: rgba(255,255,255,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px rgba(55,48,40,.06);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: .085em;
  white-space: nowrap;
}
.quality-badge i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; }
.quality-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(var(--accent-rgb), .15));
}
#qualityCodec { color: rgba(21,21,23,.72); }
#qualityDetail { letter-spacing: .045em; }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 28px;
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 999px;
  color: rgba(255,255,255,.92);
  background: rgba(20,20,23,.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
  font-size: 11px;
  font-weight: 700;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }


.mobile-control-surface { display: contents; }
.mobile-dock-handle { display: none; }

/* Mobile app mode: a dedicated composition, not a shrunken desktop card. */
@media (max-width: 960px) {
  :root { --mobile-dock-height: 206px; }

  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: #f8f7f3;
  }

  body {
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
  }

  .quartz-scene {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .quartz-background {
    background:
      radial-gradient(circle at 18% 8%, rgba(var(--accent-rgb), .16), transparent 31%),
      radial-gradient(circle at 92% 82%, rgba(var(--accent-2-rgb), .13), transparent 34%),
      linear-gradient(150deg, #fff 0%, #f4f2ec 48%, #fbfaf6 100%);
  }

  .quartz-vein-a { width: 145vw; left: -45vw; top: 23%; }
  .quartz-vein-b { width: 130vw; right: -42vw; bottom: 26%; }
  .quartz-grain { opacity: .095; }

  /* On phones LiquidGL becomes the floating control tray, like a native app sheet. */
  .glass-pane {
    position: fixed;
    inset: auto 10px calc(env(safe-area-inset-bottom, 0px) + 9px);
    width: auto;
    height: var(--mobile-dock-height);
    margin: 0;
    border-radius: 34px;
    border-color: rgba(255,255,255,.82);
    box-shadow:
      0 28px 70px rgba(54,47,40,.22),
      0 8px 24px rgba(54,47,40,.1),
      inset 0 1px 0 rgba(255,255,255,1),
      inset 0 -1px 0 rgba(80,72,62,.07);
  }

  .glass-pane::before {
    background: rgba(255,255,255,.44);
    backdrop-filter: blur(36px) saturate(190%);
    -webkit-backdrop-filter: blur(36px) saturate(190%);
  }

  .player-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .player-shell::-webkit-scrollbar { display: none; }

  .player-content {
    width: 100%;
    min-height: 100%;
    height: auto;
    padding:
      calc(env(safe-area-inset-top, 0px) + 7px)
      16px
      calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px) + 35px);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 35;
    height: 64px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: 0 -4px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255,255,255,.35);
    background: linear-gradient(180deg, rgba(248,247,243,.86), rgba(248,247,243,.56) 70%, transparent);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }

  .station-brand { gap: 11px; }
  .brand-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(var(--accent-rgb), .22), inset 0 1px 0 rgba(255,255,255,.55);
  }
  .brand-icon img { width: 30px; height: 30px; }
  .station-name { font-size: 14px; }
  .station-caption { font-size: 11px; }

  .broadcast-state { display: none; }
  .top-actions { gap: 8px; }
  .listeners {
    min-height: 44px;
    padding: 0 13px;
    border-color: rgba(255,255,255,.82);
    background: rgba(255,255,255,.46);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 7px 18px rgba(45,40,35,.06);
    font-size: 12px;
  }
  .listeners img { width: 21px; height: 21px; }
  .top-button {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,.46);
    border-color: rgba(255,255,255,.84);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 7px 18px rgba(45,40,35,.06);
  }
  .top-button img { width: 25px; height: 25px; }

  .player-grid {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
  }

  .artwork-card {
    width: min(calc(100vw - 32px), 42dvh, 420px);
    min-width: min(248px, calc(100vw - 32px));
    max-width: none;
    flex: 0 0 auto;
    margin: 0 auto;
    border-radius: 32px;
    box-shadow:
      0 30px 64px rgba(var(--accent-rgb), .24),
      0 12px 30px rgba(50,30,50,.14),
      inset 0 1px 0 rgba(255,255,255,.5);
  }
  .artwork-topline { top: 18px; left: 18px; right: 18px; }
  .artwork-live,
  .artwork-type { min-height: 31px; font-size: 9px; }
  .artwork-footer { left: 20px; right: 20px; bottom: 18px; }
  .artwork-footer strong { font-size: 15px; }
  .mini-equalizer { width: 68px; }

  .now-playing {
    width: min(100%, 620px);
    min-width: 0;
    padding: 0 8px;
    text-align: center;
  }
  .meta-kicker { justify-content: center; }
  .type-pill {
    min-height: 30px;
    padding: 0 13px;
    background: rgba(var(--accent-rgb), .12);
    font-size: 11px;
  }
  .now-label { font-size: 9px; }

  h1 {
    max-width: 100%;
    margin: 13px auto 7px;
    font-size: clamp(28px, 7.8vw, 40px);
    line-height: 1.04;
    letter-spacing: -.047em;
    text-wrap: balance;
  }
  .subtitle {
    max-width: 520px;
    margin-inline: auto;
    font-size: 15px;
    line-height: 1.38;
  }
  .host { min-height: 18px; margin-top: 5px; font-size: 12px; }

  .signal-panel { margin-top: 17px; }
  .spectrum { height: 47px; gap: 2.5px; padding-block: 6px; }
  .live-rail { max-width: 560px; margin: 1px auto 0; }

  .mobile-control-surface {
    position: fixed;
    z-index: 42;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 9px);
    height: var(--mobile-dock-height);
    display: block;
    padding: 18px 18px 15px;
    border-radius: 34px;
    pointer-events: auto;
  }

  .mobile-dock-handle {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 42px;
    height: 4px;
    display: block;
    border-radius: 999px;
    background: rgba(21,21,23,.16);
    transform: translateX(-50%);
  }

  .control-dock {
    height: 92px;
    justify-content: center;
    gap: clamp(28px, 10vw, 52px);
    margin-top: 16px;
  }
  .round-button {
    width: 58px;
    height: 58px;
    background: rgba(255,255,255,.34);
    border-color: rgba(255,255,255,.86);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 10px 24px rgba(55,48,40,.08);
  }
  .round-button img { width: 27px; height: 27px; }
  .play-button {
    width: 82px;
    height: 82px;
    box-shadow: 0 18px 38px rgba(var(--accent-rgb), .34), inset 0 1px 0 rgba(255,255,255,.5);
  }
  .play-button img { width: 37px; height: 37px; }

  .bottom-row {
    position: relative;
    height: 70px;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
    padding-top: 4px;
  }
  .volume-control {
    width: 100%;
    max-width: 330px;
    flex: 0 1 330px;
    gap: 12px;
  }
  .volume-control img { width: 23px; height: 23px; }
  .volume-control input { height: 5px; }
  .volume-control input::-webkit-slider-thumb { width: 20px; height: 20px; }
  .volume-control input::-moz-range-thumb { width: 20px; height: 20px; }

  .quality-badge {
    position: absolute;
    top: -114px;
    left: 50%;
    min-height: 35px;
    padding: 4px 12px 4px 7px;
    gap: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.42);
    border-color: rgba(255,255,255,.88);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 8px 18px rgba(55,48,40,.06);
    font-size: 9px;
    transform: translateX(-50%);
  }
  .quality-mark {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .toast {
    bottom: calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px) + 24px);
    min-height: 44px;
    max-width: calc(100vw - 32px);
    font-size: 12px;
  }

  button:focus-visible,
  input:focus-visible {
    outline: 3px solid rgba(var(--accent-rgb), .32);
    outline-offset: 3px;
  }
}

@media (max-width: 430px) {
  :root { --mobile-dock-height: 202px; }
  .player-content { padding-inline: 13px; }
  .topbar { margin-inline: 0; }
  .station-caption { display: none; }
  .station-name { max-width: 122px; }
  .listeners { min-width: 52px; justify-content: center; padding-inline: 10px; }
  .listeners img { width: 20px; height: 20px; }
  .artwork-card { width: min(calc(100vw - 26px), 41dvh, 370px); min-width: min(235px, calc(100vw - 26px)); }
  .artwork-footer > div:first-child span { display: none; }
  h1 { font-size: clamp(27px, 8.3vw, 35px); }
  .subtitle { font-size: 14px; }
  .control-dock { gap: clamp(25px, 9vw, 39px); }
  .quality-badge { max-width: calc(100vw - 90px); }
  #qualityDetail { overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 350px) {
  .station-name { max-width: 94px; }
  .listeners { padding-inline: 8px; }
  .top-button { width: 43px; height: 43px; }
  .artwork-card { min-width: 218px; }
  .now-label { display: none; }
  .round-button { width: 54px; height: 54px; }
  .play-button { width: 76px; height: 76px; }
  .control-dock { gap: 22px; }
}

/* Mobile landscape keeps the artwork and metadata side by side while preserving the app dock. */
@media (max-width: 960px) and (orientation: landscape) and (max-height: 560px) {
  :root { --mobile-dock-height: 154px; }
  .player-content {
    padding-top: calc(env(safe-area-inset-top, 0px) + 5px);
    padding-left: calc(env(safe-area-inset-left, 0px) + 16px);
    padding-right: calc(env(safe-area-inset-right, 0px) + 16px);
  }
  .topbar { height: 55px; }
  .brand-icon { width: 39px; height: 39px; flex-basis: 39px; }
  .brand-icon img { width: 27px; height: 27px; }
  .player-grid {
    display: grid;
    grid-template-columns: minmax(210px, .82fr) minmax(290px, 1.18fr);
    gap: 26px;
    align-items: center;
    margin-top: 7px;
  }
  .artwork-card {
    width: min(52dvh, 34vw, 310px);
    min-width: 205px;
  }
  .now-playing { text-align: left; padding-right: 4px; }
  .meta-kicker { justify-content: flex-start; }
  h1 { margin-top: 9px; font-size: clamp(25px, 4.8vw, 39px); }
  .subtitle { margin-inline: 0; }
  .host { display: none; }
  .signal-panel { margin-top: 10px; }
  .spectrum { height: 38px; }
  .mobile-control-surface { height: var(--mobile-dock-height); }
  .control-dock { height: 81px; margin-top: 10px; }
  .round-button { width: 52px; height: 52px; }
  .play-button { width: 72px; height: 72px; }
  .bottom-row { height: 48px; padding: 0; }
  .quality-badge { top: -96px; }
  .volume-control { max-width: 310px; }
}

@media (display-mode: standalone) and (max-width: 960px) {
  .topbar { padding-top: 6px; }
  .player-content {
    padding-top: calc(env(safe-area-inset-top, 0px) + 2px);
  }
}

@media (max-height: 720px) and (min-width: 961px) {
  .glass-pane,
  .player-shell { height: calc(100svh - 26px); width: min(1010px, calc(100vw - 34px)); }
  .player-content { padding-top: 18px; padding-bottom: 18px; }
  .player-grid { grid-template-columns: minmax(350px, .9fr) minmax(410px, 1.1fr); gap: 44px; }
  .artwork-card { max-width: 420px; }
  h1 { font-size: clamp(40px, 4.1vw, 56px); }
  .signal-panel { margin-top: 22px; }
  .control-dock { margin-top: 18px; }
  .bottom-row { margin-top: 20px; }
}

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

/* --------------------------------------------------------------------------
   Quartz Mobile v13 — native-app interaction layer
   -------------------------------------------------------------------------- */

:root {
  --audio-energy: .02;
  --realtime-phase: 0;
  --gesture-x: 0px;
  --gesture-y: 0px;
  --gesture-rotate: 0deg;
}

.app-boot {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 17px;
  color: rgba(21,21,23,.72);
  background:
    radial-gradient(circle at 50% 38%, rgba(var(--accent-rgb), .16), transparent 28%),
    #f7f6f2;
  transition: opacity .55s cubic-bezier(.16,1,.3,1), visibility .55s;
}
.app-ready .app-boot { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 55px rgba(var(--accent-rgb), .28), inset 0 1px 0 rgba(255,255,255,.52);
  animation: bootBreathe 1.25s ease-in-out infinite alternate;
}
.boot-mark span {
  width: 28px;
  height: 36px;
  border: 4px solid rgba(255,255,255,.94);
  border-top-width: 9px;
  border-bottom-width: 9px;
  border-radius: 999px;
}
.app-boot p { margin: 0; font-size: 10px; font-weight: 850; letter-spacing: .2em; }
@keyframes bootBreathe { to { transform: translateY(-4px) scale(1.035); } }

.quartz-aura {
  position: absolute;
  width: 58vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: calc(.2 + var(--audio-energy) * .4);
  pointer-events: none;
  will-change: transform, opacity;
}
.quartz-aura-a {
  left: -24vmax;
  top: -15vmax;
  background: rgba(var(--accent-rgb), .22);
  animation: auraFloatA 12s ease-in-out infinite alternate;
}
.quartz-aura-b {
  right: -28vmax;
  bottom: -22vmax;
  background: rgba(var(--accent-2-rgb), .18);
  animation: auraFloatB 15s ease-in-out infinite alternate;
}
@keyframes auraFloatA { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.08); } }
@keyframes auraFloatB { to { transform: translate3d(-10vmax, -7vmax, 0) scale(1.1); } }

.listeners,
.quality-badge { border: 0; font: inherit; cursor: pointer; }
.listeners.pressed,
.quality-badge.pressed,
button.pressed { transform: translate3d(0, 1px, 0) scale(.955) !important; }

.spectrum i,
.mini-equalizer i,
.visualizer-bars i {
  height: 100%;
  transform: scaleY(.08);
  transform-origin: center;
  transition: transform 72ms linear, opacity 90ms linear;
  will-change: transform, opacity;
}

.artwork-stage { min-width: 0; }
.mobile-view-indicator,
.gesture-hint,
.mobile-visualizer-layer,
.gesture-reaction,
.tap-ripple,
.details-backdrop,
.details-sheet { display: none; }

.mobile-visualizer-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity .4s ease, transform .55s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
.visualizer-halo {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.34), rgba(255,255,255,.02) 52%, transparent 70%);
  filter: blur(8px);
  transform: scale(calc(.82 + var(--audio-energy) * .8));
  transition: transform 90ms linear;
}
.visualizer-bars {
  position: relative;
  z-index: 1;
  width: 66%;
  height: 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.visualizer-bars i {
  flex: 1;
  max-width: 9px;
  min-width: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 16px rgba(255,255,255,.22);
}
.mobile-visualizer-layer > span {
  position: absolute;
  bottom: 20%;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .19em;
  color: rgba(255,255,255,.68);
}
.artwork-card.show-visualizer .mobile-visualizer-layer { opacity: 1; transform: scale(1); }
.artwork-card.show-visualizer .artwork-image,
.artwork-card.show-visualizer .cover-symbol { opacity: .1; transform: scale(1.08); }
.artwork-card.show-visualizer .artwork-image-scrim { opacity: .6; }

.gesture-reaction {
  position: absolute;
  z-index: 8;
  inset: 0;
  place-items: center;
  color: white;
  font-size: clamp(82px, 26vw, 128px);
  text-shadow: 0 20px 45px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
}
.gesture-reaction.visible {
  display: grid;
  animation: heartPop .76s cubic-bezier(.16,1,.3,1) both;
}
@keyframes heartPop {
  0% { opacity: 0; transform: scale(.28) rotate(-12deg); }
  42% { opacity: 1; transform: scale(1.12) rotate(4deg); }
  100% { opacity: 0; transform: scale(.9) rotate(0); }
}
.tap-ripple {
  position: absolute;
  z-index: 7;
  width: 22px;
  height: 22px;
  margin: -11px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.72);
  opacity: 0;
  pointer-events: none;
}
.tap-ripple.visible { display: block; animation: tapRipple .58s ease-out both; }
@keyframes tapRipple { to { opacity: 0; transform: scale(7); border-width: .5px; } }

.details-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(23,20,18,.24);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .32s ease;
}
.details-sheet {
  --sheet-drag: 0px;
  position: fixed;
  z-index: 71;
  left: 8px;
  right: 8px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  max-height: min(78dvh, 690px);
  padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 34px;
  color: var(--ink);
  background: rgba(250,249,246,.88);
  backdrop-filter: blur(40px) saturate(185%);
  -webkit-backdrop-filter: blur(40px) saturate(185%);
  box-shadow: 0 35px 90px rgba(43,36,31,.27), inset 0 1px 0 white;
  transform: translate3d(0, calc(110% + var(--sheet-drag)), 0);
  transition: transform .48s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
  will-change: transform;
}
.details-open .details-backdrop { opacity: 1; pointer-events: auto; }
.details-open .details-sheet { transform: translate3d(0, var(--sheet-drag), 0); pointer-events: auto; }
.details-sheet.dragging { transition: none; }
.details-handle {
  width: 100%;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}
.details-handle span,
.mobile-dock-handle span {
  width: 43px;
  height: 5px;
  border-radius: 999px;
  background: rgba(21,21,23,.16);
}
.details-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 2px 0 18px; }
.details-head span:first-child { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.details-head h2 { margin: 5px 0 0; font-size: 27px; letter-spacing: -.045em; }
.details-live { display: inline-flex; align-items: center; gap: 7px; color: rgba(21,21,23,.48); font-size: 10px; font-weight: 700; }
.details-live i { width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 5px rgba(52,199,89,.12); }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.details-grid article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 21px;
  background: rgba(255,255,255,.43);
  box-shadow: inset 0 1px 0 white;
}
.details-grid small { color: rgba(21,21,23,.44); font-size: 10px; font-weight: 720; }
.details-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.details-track { margin-top: 12px; padding: 17px; border-radius: 22px; background: rgba(var(--accent-rgb), .085); }
.details-track span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.details-track strong { display: block; margin-top: 7px; font-size: 20px; letter-spacing: -.025em; }
.details-track p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.details-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.details-actions button {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  font-weight: 760;
  color: white;
  background: var(--accent);
  box-shadow: 0 11px 24px rgba(var(--accent-rgb), .24);
}
.details-actions button:last-child { color: var(--ink); background: rgba(255,255,255,.7); box-shadow: inset 0 1px 0 white; }
.details-tip { margin: 12px 0 0; text-align: center; color: rgba(21,21,23,.35); font-size: 10px; }

.realtime-disconnected .realtime-rate { color: #ff3b30; }
.realtime-rate { color: rgba(21,21,23,.4); font-size: 9px; font-weight: 820; letter-spacing: .06em; white-space: nowrap; }

@media (max-width: 960px) {
  :root {
    --mobile-dock-height: 174px;
    --mobile-top-height: 66px;
  }

  html, body, .quartz-scene { width: 100%; height: 100%; min-height: 100%; }
  body { position: fixed; inset: 0; overflow: hidden; touch-action: none; }

  .app-ready .player-shell { animation: appShellIn .72s cubic-bezier(.16,1,.3,1) both; }
  @keyframes appShellIn { from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); } }

  .quartz-background {
    background:
      radial-gradient(circle at 12% 5%, rgba(var(--accent-rgb), .18), transparent 30%),
      radial-gradient(circle at 92% 82%, rgba(var(--accent-2-rgb), .16), transparent 34%),
      linear-gradient(165deg, #fff 0%, #f4f2ed 55%, #faf9f5 100%);
  }
  .quartz-glint { opacity: .32; animation: mobileGlint 9s ease-in-out infinite alternate; }
  @keyframes mobileGlint { to { transform: translate3d(14%, 0, 0); } }

  .glass-pane {
    inset: auto 9px calc(env(safe-area-inset-bottom, 0px) + 8px);
    width: auto;
    height: var(--mobile-dock-height);
    border-radius: 32px;
    box-shadow:
      0 28px 72px rgba(54,47,40,.24),
      0 7px 22px rgba(54,47,40,.11),
      inset 0 1px 0 rgba(255,255,255,1),
      inset 0 -1px 0 rgba(80,72,62,.08);
  }
  .glass-pane::before {
    background: rgba(255,255,255,.5);
    backdrop-filter: blur(34px) saturate(185%);
    -webkit-backdrop-filter: blur(34px) saturate(185%);
  }

  .player-shell { overflow: hidden; overscroll-behavior: none; }
  .player-content {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: var(--mobile-top-height) minmax(0, 1fr);
    padding:
      calc(env(safe-area-inset-top, 0px) + 4px)
      13px
      calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px) + 19px);
    overflow: hidden;
  }

  .topbar {
    position: relative;
    top: auto;
    z-index: 35;
    height: var(--mobile-top-height);
    margin: 0;
    padding: 7px 1px 8px;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .station-brand { min-width: 0; }
  .brand-icon { width: 43px; height: 43px; flex-basis: 43px; border-radius: 14px; }
  .brand-icon img { width: 29px; height: 29px; }
  .station-name { max-width: 43vw; font-size: 14px; }
  .station-caption { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .top-actions { gap: 7px; }
  .listeners { min-width: 54px; min-height: 43px; justify-content: center; padding: 0 10px; }
  .listeners img { width: 20px; height: 20px; }
  .top-button { width: 43px; height: 43px; }
  .top-button img { width: 24px; height: 24px; }

  .player-grid {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    overflow: visible;
  }
  .artwork-stage {
    min-height: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 9px;
  }
  .artwork-card {
    width: min(calc(100vw - 30px), 43dvh, 414px);
    min-width: 0;
    max-width: none;
    border-radius: clamp(28px, 7vw, 36px);
    touch-action: none;
    transform: translate3d(var(--gesture-x), var(--gesture-y), 0) rotate(var(--gesture-rotate));
    transition:
      transform .52s cubic-bezier(.16,1,.3,1),
      background .65s ease,
      box-shadow .65s ease;
    will-change: transform;
    contain: layout paint style;
  }
  .artwork-card.gesture-active { transition: background .65s ease, box-shadow .65s ease; }
  .artwork-card:active { cursor: grabbing; }
  .artwork-card::before { animation-duration: 22s; }
  .mobile-visualizer-layer { display: grid; }
  .gesture-reaction { display: grid; }
  .tap-ripple { display: block; }

  .mobile-view-indicator { display: flex; align-items: center; justify-content: center; gap: 6px; height: 7px; }
  .mobile-view-indicator i { width: 6px; height: 6px; border-radius: 50%; background: rgba(21,21,23,.16); transition: width .3s ease, background .3s ease; }
  .mobile-view-indicator i.active { width: 19px; border-radius: 999px; background: var(--accent); }
  .gesture-hint {
    display: block;
    max-width: calc(100vw - 46px);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(21,21,23,.36);
    font-size: 10px;
    font-weight: 680;
    text-align: center;
  }

  .now-playing {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    text-align: center;
  }
  .metadata { min-height: 94px; display: grid; align-content: end; }
  .meta-kicker { justify-content: center; }
  .type-pill { min-height: 27px; padding-inline: 11px; font-size: 10px; }
  .now-label { font-size: 8px; }
  h1 {
    max-width: 100%;
    margin: 9px auto 5px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: clamp(24px, 7.5vw, 36px);
    line-height: 1.02;
    letter-spacing: -.052em;
  }
  .subtitle {
    max-width: 92vw;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }
  .host { display: none; }
  .signal-panel { margin-top: 8px; }
  .spectrum { height: 34px; gap: 2px; padding: 4px 0; }
  .live-rail { max-width: 520px; margin: 0 auto; }

  .mobile-control-surface {
    inset: auto 9px calc(env(safe-area-inset-bottom, 0px) + 8px);
    height: var(--mobile-dock-height);
    padding: 15px 16px 12px;
    border-radius: 32px;
    transform: translate3d(0,0,0);
    animation: dockIn .75s .08s cubic-bezier(.16,1,.3,1) both;
  }
  @keyframes dockIn { from { transform: translate3d(0, 42px, 0); opacity: 0; } }
  .mobile-dock-handle {
    position: absolute;
    top: 3px;
    left: 50%;
    width: 86px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translateX(-50%);
  }
  .control-dock { height: 88px; gap: clamp(31px, 11vw, 52px); margin: 12px 0 0; }
  .round-button { width: 56px; height: 56px; }
  .round-button img { width: 27px; height: 27px; }
  .play-button { width: 78px; height: 78px; }
  .play-button img { width: 35px; height: 35px; }
  .play-progress {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.14);
    border-top-color: rgba(255,255,255,.85);
    opacity: 0;
  }
  .is-playing .play-progress { opacity: .88; animation: playSpin 3s linear infinite; }
  @keyframes playSpin { to { transform: rotate(360deg); } }
  .bottom-row { height: 55px; margin: 0; padding: 0; gap: 10px; }
  .volume-control { max-width: none; flex: 1; gap: 10px; }
  .volume-control img { width: 22px; height: 22px; }
  .quality-badge {
    position: static;
    min-width: 118px;
    max-width: 42vw;
    min-height: 42px;
    padding: 5px 10px 5px 6px;
    gap: 6px;
    transform: none;
    text-align: left;
  }
  .quality-mark { width: 31px; height: 31px; flex-basis: 31px; }
  #qualityDetail { display: none; }

  .details-backdrop,
  .details-sheet { display: block; }
  .toast { bottom: calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px) + 22px); }
}

@media (max-width: 430px) and (min-height: 760px) {
  .artwork-card { width: min(calc(100vw - 28px), 42dvh, 380px); }
}

@media (max-width: 430px) and (max-height: 759px) {
  :root { --mobile-dock-height: 160px; --mobile-top-height: 58px; }
  .player-content { padding-inline: 11px; padding-bottom: calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px) + 13px); }
  .topbar { padding-top: 3px; }
  .brand-icon { width: 39px; height: 39px; flex-basis: 39px; }
  .brand-icon img { width: 27px; height: 27px; }
  .listeners, .top-button { min-height: 39px; height: 39px; }
  .artwork-card { width: min(calc(100vw - 36px), 35dvh, 300px); }
  .gesture-hint { display: none; }
  .artwork-stage { gap: 5px; }
  .metadata { min-height: 75px; }
  h1 { font-size: clamp(22px, 6.8vw, 30px); margin-top: 6px; }
  .subtitle { font-size: 12px; }
  .signal-panel { margin-top: 4px; }
  .spectrum { height: 27px; }
  .control-dock { height: 78px; margin-top: 8px; }
  .round-button { width: 51px; height: 51px; }
  .play-button { width: 70px; height: 70px; }
  .bottom-row { height: 48px; }
}

@media (max-width: 350px) {
  .station-caption { display: none; }
  .station-name { max-width: 38vw; }
  .quality-badge { min-width: 92px; }
  .quality-badge i { display: none; }
  .details-sheet { padding-inline: 14px; }
}

@media (max-width: 960px) and (orientation: landscape) and (max-height: 560px) {
  :root { --mobile-dock-height: 128px; --mobile-top-height: 52px; }
  .player-content {
    padding: calc(env(safe-area-inset-top, 0px) + 3px) calc(env(safe-area-inset-right, 0px) + 13px)
      calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px) + 10px)
      calc(env(safe-area-inset-left, 0px) + 13px);
  }
  .player-grid { grid-template-columns: .82fr 1.18fr; grid-template-rows: minmax(0,1fr); gap: 24px; }
  .artwork-card { width: min(55dvh, 32vw, 280px); }
  .gesture-hint { display: none; }
  .now-playing { text-align: left; align-self: center; }
  .meta-kicker { justify-content: flex-start; }
  .metadata { min-height: 0; align-content: center; }
  h1 { margin-inline: 0; font-size: clamp(24px, 4.5vw, 36px); }
  .subtitle { margin-inline: 0; }
  .signal-panel { margin-top: 7px; }
  .mobile-control-surface { height: var(--mobile-dock-height); }
  .control-dock { height: 72px; margin: 4px 0 0; }
  .round-button { width: 46px; height: 46px; }
  .play-button { width: 64px; height: 64px; }
  .bottom-row { height: 42px; }
  .quality-badge { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .quartz-aura,
  .quartz-glint,
  .app-boot,
  .mobile-control-surface,
  .player-shell { animation: none !important; }
}

/* ========================================================================== 
   XPlayer 2.2 — mobile interaction, splash branding and settings
   ========================================================================== */

.app-boot {
  gap: 22px;
  background:
    radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), .18), transparent 28%),
    linear-gradient(155deg, #ffffff 0%, #f3f1eb 58%, #faf9f5 100%);
}
.boot-brand {
  min-width: min(82vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 22px);
  perspective: 900px;
}
.boot-logo {
  width: clamp(74px, 22vw, 112px);
  height: clamp(74px, 22vw, 112px);
  object-fit: contain;
  filter: drop-shadow(0 24px 42px rgba(var(--accent-rgb), .24));
  animation: xplayerLogoIn 1.05s cubic-bezier(.16,1,.3,1) both;
}
.boot-textlogo {
  width: min(48vw, 230px);
  color: #161619;
  font: 900 clamp(42px, 12vw, 72px)/.9 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.075em;
  text-align: left;
  filter: drop-shadow(0 12px 26px rgba(31,28,25,.1));
  animation: xplayerWordIn .95s .18s cubic-bezier(.16,1,.3,1) both;
}
.boot-loader {
  width: min(210px, 52vw);
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21,21,23,.08);
}
.boot-loader span {
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  animation: xplayerLoad 1.15s ease-in-out infinite;
}
.app-boot p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(21,21,23,.48);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .19em;
}
.app-boot p span {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), .09);
  letter-spacing: .06em;
}
.app-ready .boot-logo { animation: xplayerLogoOut .55s cubic-bezier(.4,0,1,1) both; }
.app-ready .boot-textlogo { animation: xplayerWordOut .48s .04s cubic-bezier(.4,0,1,1) both; }
@keyframes xplayerLogoIn {
  0% { opacity: 0; transform: translate3d(-30px, 14px, 0) rotateY(-48deg) scale(.58); filter: blur(12px); }
  62% { opacity: 1; transform: translate3d(4px, -2px, 0) rotateY(8deg) scale(1.06); filter: blur(0); }
  100% { transform: translate3d(0,0,0) rotateY(0) scale(1); }
}
@keyframes xplayerWordIn {
  0% { opacity: 0; transform: translate3d(38px, 0, 0); filter: blur(15px); clip-path: inset(0 100% 0 0); }
  100% { opacity: 1; transform: translate3d(0,0,0); filter: blur(0); clip-path: inset(0 0 0 0); }
}
@keyframes xplayerLogoOut { to { opacity: 0; transform: translate3d(-22px, 0, 0) scale(.82); filter: blur(8px); } }
@keyframes xplayerWordOut { to { opacity: 0; transform: translate3d(28px, 0, 0); filter: blur(8px); } }
@keyframes xplayerLoad { from { transform: translateX(-120%); } to { transform: translateX(330%); } }

.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 76;
  display: block;
  opacity: 0;
  pointer-events: none;
  background: rgba(21,18,16,.26);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: opacity .32s ease;
}
.settings-sheet {
  --sheet-drag: 0px;
  position: fixed;
  z-index: 77;
  left: 50%;
  bottom: 16px;
  width: min(520px, calc(100vw - 24px));
  max-height: min(82dvh, 720px);
  overflow: auto;
  padding: 10px 20px 20px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 34px;
  color: var(--ink);
  background: rgba(250,249,246,.9);
  backdrop-filter: blur(42px) saturate(190%);
  -webkit-backdrop-filter: blur(42px) saturate(190%);
  box-shadow: 0 36px 100px rgba(43,36,31,.3), inset 0 1px 0 #fff;
  transform: translate3d(-50%, calc(115% + var(--sheet-drag)), 0);
  transition: transform .5s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
  scrollbar-width: none;
  will-change: transform;
}
.settings-sheet::-webkit-scrollbar { display: none; }
.settings-open .settings-backdrop { opacity: 1; pointer-events: auto; }
.settings-open .settings-sheet { transform: translate3d(-50%, var(--sheet-drag), 0); pointer-events: auto; }
.settings-sheet.dragging { transition: none; }
.settings-handle {
  width: 100%;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}
.settings-handle span {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(21,21,23,.16);
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 3px 0 18px;
}
.settings-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.settings-brand > img {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 10px 18px rgba(var(--accent-rgb), .2));
}
.settings-brand > div { min-width: 0; }
.settings-brand span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.settings-brand h2 { margin: 3px 0 0; font-size: 28px; letter-spacing: -.05em; }
.settings-brand h2 small { color: rgba(21,21,23,.38); font-size: 12px; letter-spacing: 0; }
.settings-live { display: inline-flex; align-items: center; gap: 7px; color: rgba(21,21,23,.46); font-size: 10px; font-weight: 720; }
.settings-live i { width: 7px; height: 7px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 5px rgba(52,199,89,.12); }
.settings-list {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 23px;
  background: rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 #fff;
}
.setting-row {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 12px 15px;
  border: 0;
  border-bottom: 1px solid rgba(21,21,23,.06);
  color: inherit;
  background: transparent;
  text-align: left;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row > span { min-width: 0; display: grid; gap: 3px; }
.setting-row strong { font-size: 14px; font-weight: 760; letter-spacing: -.015em; }
.setting-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(21,21,23,.43); font-size: 10px; font-weight: 590; }
.setting-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  width: 47px;
  height: 28px;
  flex: 0 0 47px;
  border-radius: 999px;
  background: rgba(21,21,23,.13);
  transition: background .22s ease;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(21,21,23,.2);
  transition: transform .24s cubic-bezier(.16,1,.3,1);
}
.setting-row input:checked + .switch { background: var(--accent); }
.setting-row input:checked + .switch::after { transform: translateX(19px); }
.setting-action { cursor: pointer; font: inherit; }
.setting-action:active { background: rgba(var(--accent-rgb), .06); }
.setting-action b { color: rgba(21,21,23,.28); font-size: 28px; font-weight: 350; }
.setting-action:disabled { opacity: .6; }
.settings-about {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 17px 0 7px;
  color: rgba(21,21,23,.42);
  text-align: center;
}
.settings-about strong { color: rgba(21,21,23,.63); font-size: 12px; }
.settings-about span { font-size: 9px; }
.settings-tip { margin: 8px 0 0; color: rgba(21,21,23,.3); font-size: 9px; text-align: center; }

/* Make every control genuinely touchable and stop the global mobile touch rule
   from swallowing sliders and buttons. */
button,
input[type='range'],
.setting-row { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
.volume-control,
.volume-control input { touch-action: pan-x; pointer-events: auto; }
.volume-control input {
  min-height: 34px;
  background-clip: content-box;
  padding-block: 14px;
}
.volume-control input::-webkit-slider-thumb { width: 22px; height: 22px; }
.volume-control input::-moz-range-thumb { width: 22px; height: 22px; }
.mobile-control-surface,
.control-dock,
.bottom-row,
.round-button,
.play-button,
.quality-badge { pointer-events: auto; }
.particles-off #particles,
.particles-off #coverParticles { opacity: 0; }

/* The old spectrum CSS animated height; XPlayer uses GPU transforms instead. */
.spectrum i,
.mini-equalizer i,
.visualizer-bars i {
  height: 100% !important;
  transform: scaleY(.08);
  transform-origin: center;
  transition: transform 70ms linear, opacity 80ms linear !important;
  will-change: transform, opacity;
}

@media (max-width: 960px) {
  body { touch-action: manipulation !important; }
  .artwork-card { touch-action: none !important; }
  .details-sheet,
  .settings-sheet { touch-action: pan-y; }
  .details-handle,
  .details-head,
  .settings-handle,
  .settings-head { touch-action: none; }

  .settings-sheet {
    left: 8px;
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    width: auto;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    transform: translate3d(0, calc(115% + var(--sheet-drag)), 0);
  }
  .settings-open .settings-sheet { transform: translate3d(0, var(--sheet-drag), 0); }

  .top-button,
  .listeners,
  .round-button,
  .play-button,
  .quality-badge { min-width: 44px; min-height: 44px; }
  img[data-icon] { min-width: 18px !important; min-height: 18px !important; }
  .visualizer-bars { gap: 3px; }
  .mobile-visualizer-layer > span { bottom: 18%; }

  .is-playing .artwork-card {
    box-shadow:
      0 38px 78px rgba(var(--accent-rgb), calc(.24 + var(--audio-energy) * .32)),
      0 12px 30px rgba(50,30,50,.14),
      inset 0 1px 0 rgba(255,255,255,.5);
  }
  .is-playing .artwork-ambient {
    transform: scale(calc(1 + var(--audio-energy) * .65));
    opacity: calc(.18 + var(--audio-energy) * .45);
    transition: transform 80ms linear, opacity 80ms linear;
  }
}

@media (max-width: 420px) {
  .boot-brand { min-width: 88vw; gap: 11px; }
  .boot-logo { width: 82px; height: 82px; }
  .boot-textlogo { width: min(48vw, 190px); }
  .settings-sheet { padding-inline: 14px; border-radius: 30px; }
  .settings-brand > img { width: 47px; height: 47px; flex-basis: 47px; }
  .settings-brand h2 { font-size: 25px; }
  .settings-live { display: none; }
  .setting-row { min-height: 64px; padding-inline: 13px; }
}

/* ================================================================
   XPlayer 2.2 — embedded soft-wave visualizer + audio screen frame
   ================================================================ */
:root {
  --edge-rise: 16%;
  --edge-opacity: .12;
  --bass-energy: .04;
}

.audio-screen-frame {
  display: none;
  pointer-events: none;
}

.control-wave-canvas,
.control-wave-bloom {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.control-wave-canvas {
  z-index: 0;
  opacity: calc(.48 + var(--audio-energy, .04) * .72);
  filter: blur(.45px) saturate(145%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  transition: opacity 160ms ease, filter 260ms ease;
}

.control-wave-bloom {
  z-index: 0;
  inset: auto -6% -38% -6%;
  height: 88%;
  border-radius: 50%;
  opacity: calc(.16 + var(--audio-energy, .04) * .6);
  background:
    radial-gradient(ellipse at 30% 55%, rgba(var(--accent-rgb), .42), transparent 56%),
    radial-gradient(ellipse at 72% 48%, rgba(var(--accent-2-rgb), .34), transparent 58%);
  filter: blur(calc(18px + var(--audio-energy, .04) * 26px));
  transform: scaleX(calc(1 + var(--bass-energy, .04) * .22));
  transform-origin: center bottom;
  transition: opacity 140ms linear, transform 90ms linear;
}

.mobile-control-surface {
  isolation: isolate;
}

.mobile-control-surface > :not(.control-wave-canvas):not(.control-wave-bloom) {
  position: relative;
  z-index: 2;
}

.wave-focus .control-wave-canvas {
  opacity: 1;
  filter: blur(.25px) saturate(175%);
}

.wave-focus .control-wave-bloom {
  opacity: calc(.38 + var(--audio-energy, .04) * .62);
}

/* The visualizer now lives inside the controls card, not as detached bars. */
.spectrum {
  display: none !important;
}
.signal-panel {
  margin-top: 18px;
}
.mobile-visualizer-layer,
.mobile-view-indicator {
  display: none !important;
}

@media (min-width: 961px) {
  .mobile-control-surface {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 196px;
    margin-top: 22px;
    padding: 17px 20px 15px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 31px;
    background: linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,255,255,.1));
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.92),
      inset 0 -1px 0 rgba(55,48,40,.04),
      0 17px 42px rgba(55,48,40,.075);
  }
  .mobile-control-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255,255,255,.52), transparent 31%, transparent 70%, rgba(255,255,255,.21));
    opacity: .42;
  }
  .control-wave-canvas { opacity: calc(.46 + var(--audio-energy, .04) * .68); }
  .control-dock {
    height: 96px;
    margin-top: 0;
  }
  .bottom-row {
    margin-top: 4px;
  }
  .live-rail {
    margin-bottom: 3px;
  }
}

@media (max-width: 960px) {
  .audio-screen-frame {
    position: fixed;
    z-index: 18;
    display: block;
    left: max(2px, env(safe-area-inset-left, 0px));
    right: max(2px, env(safe-area-inset-right, 0px));
    bottom: max(2px, env(safe-area-inset-bottom, 0px));
    height: var(--edge-rise);
    opacity: var(--edge-opacity);
    background:
      linear-gradient(to top, rgba(var(--accent-rgb), .98), rgba(var(--accent-2-rgb), .62), transparent) left bottom / 2px 100% no-repeat,
      linear-gradient(to top, rgba(var(--accent-rgb), .98), rgba(var(--accent-2-rgb), .62), transparent) right bottom / 2px 100% no-repeat,
      linear-gradient(90deg, transparent 2%, rgba(var(--accent-rgb), .75) 18%, rgba(var(--accent-2-rgb), .96) 50%, rgba(var(--accent-rgb), .75) 82%, transparent 98%) center bottom / 100% 2px no-repeat;
    border-radius: 0 0 29px 29px;
    filter:
      drop-shadow(0 0 calc(9px + var(--bass-energy) * 28px) rgba(var(--accent-rgb), .85))
      drop-shadow(0 0 calc(20px + var(--audio-energy) * 38px) rgba(var(--accent-2-rgb), .48));
    mix-blend-mode: plus-lighter;
    transition: height 75ms linear, opacity 85ms linear;
    will-change: height, opacity, filter;
  }
  .audio-screen-frame::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -18px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(var(--accent-rgb), calc(.3 + var(--bass-energy) * .45)), transparent 68%);
    filter: blur(12px);
  }

  .mobile-control-surface {
    overflow: hidden !important;
    background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.015));
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
  }
  .mobile-control-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(110deg, rgba(255,255,255,.24), transparent 30%, transparent 72%, rgba(255,255,255,.1));
    opacity: .38;
  }
  .control-wave-canvas {
    inset: 0 -4%;
    width: 108%;
    opacity: calc(.58 + var(--audio-energy, .04) * .72);
    filter: blur(.65px) saturate(160%);
  }
  .control-wave-bloom {
    inset: auto -10% -34% -10%;
    height: 94%;
  }
  .control-dock,
  .bottom-row,
  .mobile-dock-handle {
    z-index: 3 !important;
  }
  .signal-panel {
    margin-top: 7px !important;
  }
  .is-playing .audio-screen-frame {
    opacity: var(--edge-opacity);
  }
}

@media (prefers-reduced-motion: reduce) {
  .audio-screen-frame,
  .control-wave-canvas,
  .control-wave-bloom {
    transition: none !important;
  }
}


/* ========================================================================== 
   XPlayer 2.3 — mobile app layout rebuilt from scratch
   ========================================================================== */
.brand-fallback .boot-logo { display: none !important; }
.brand-fallback .boot-brand::before {
  content: "C";
  width: 82px; height: 82px; display: grid; place-items: center;
  border-radius: 24px; color: white; font: 900 42px/1 system-ui;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: 0 24px 60px rgba(var(--accent-rgb), .28);
}
@media (max-width: 960px) {
  html, body { width: 100%; min-height: 100%; overflow-x: hidden; }
  body { background: #f8f7f3; overscroll-behavior: none; }
  .quartz-scene {
    min-height: 100svh;
    height: auto;
    padding: max(12px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    display: block;
    overflow: hidden;
  }
  .glass-pane { display: none !important; }
  .audio-screen-frame { position: fixed; inset: 0; pointer-events: none; z-index: 8; }
  .player-shell {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-width: 560px;
    margin: 0 auto;
    border-radius: 0;
    overflow: visible;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 10;
  }
  .player-content { padding: 0 !important; min-height: 0; }
  .topbar {
    position: relative; z-index: 30;
    min-height: 58px;
    padding: 4px 2px 12px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
  }
  .broadcast-state { display: none !important; }
  .station-brand { min-width: 0; gap: 10px; }
  .brand-icon { width: 46px !important; height: 46px !important; border-radius: 15px !important; }
  .station-name { font-size: 16px !important; letter-spacing: -.02em !important; text-transform: none !important; }
  .station-caption { font-size: 11px !important; color: rgba(20,20,22,.46) !important; }
  .top-actions { gap: 8px; }
  .listeners, .top-button { min-width: 44px !important; height: 44px !important; border-radius: 15px !important; }
  .listeners img, .top-button img { width: 20px !important; height: 20px !important; }

  .player-grid { display: flex !important; flex-direction: column; gap: 14px !important; }
  .artwork-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; }
  .artwork-card {
    width: min(78vw, 360px) !important;
    aspect-ratio: 1 / 1;
    height: auto !important;
    max-height: none !important;
    border-radius: 28px !important;
    touch-action: manipulation !important;
    transform: none !important;
    box-shadow: 0 22px 54px rgba(53,38,55,.18), 0 4px 16px rgba(53,38,55,.08) !important;
  }
  .artwork-card::after { border-radius: inherit; }
  .mobile-visualizer-layer,
  .mobile-view-indicator,
  .gesture-hint,
  .gesture-reaction,
  .tap-ripple { display: none !important; }
  .artwork-topline { padding: 18px 18px 0 !important; }
  .artwork-footer { padding: 0 18px 18px !important; }
  .cover-symbol img { width: 30% !important; height: 30% !important; }

  .now-playing { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  .metadata { text-align: center; padding: 0 14px; }
  .meta-kicker { justify-content: center; }
  .metadata h1 { font-size: clamp(24px, 7vw, 34px) !important; line-height: 1.04 !important; margin: 8px 0 3px !important; }
  .subtitle { font-size: 14px !important; }
  .host { font-size: 12px !important; }
  .signal-panel { display: none !important; }

  .mobile-control-surface {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 178px !important;
    max-height: none !important;
    margin: 2px 0 0;
    padding: 18px 18px 16px !important;
    border-radius: 30px !important;
    overflow: hidden !important;
    z-index: 40;
    background: rgba(255,255,255,.62) !important;
    border: 1px solid rgba(255,255,255,.88) !important;
    box-shadow: 0 18px 52px rgba(58,42,60,.15), inset 0 1px 0 rgba(255,255,255,.95) !important;
    backdrop-filter: blur(28px) saturate(1.35) !important;
    -webkit-backdrop-filter: blur(28px) saturate(1.35) !important;
    pointer-events: auto !important;
  }
  .mobile-dock-handle { display: none !important; }
  .control-wave-canvas {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: .92 !important;
    filter: blur(.25px) saturate(1.35);
    pointer-events: none !important;
    z-index: 0 !important;
  }
  .control-wave-bloom { opacity: .5 !important; z-index: 0 !important; }
  .control-dock, .bottom-row { position: relative; z-index: 3; pointer-events: auto !important; }
  .control-dock { margin: 0 0 16px !important; display: grid !important; grid-template-columns: 58px 82px 58px; justify-content: center; align-items: center; gap: 22px !important; }
  .round-button { width: 58px !important; height: 58px !important; border-radius: 50% !important; }
  .round-button img { width: 25px !important; height: 25px !important; }
  .play-button { width: 82px !important; height: 82px !important; }
  .play-button img { width: 34px !important; height: 34px !important; }
  .bottom-row { display: grid !important; grid-template-columns: minmax(0,1fr) auto; gap: 12px !important; align-items: center; }
  .volume-control { min-width: 0; height: 44px; padding: 0 9px !important; border-radius: 15px !important; }
  .volume-control img { width: 18px !important; height: 18px !important; }
  #volume { min-width: 0; height: 30px; touch-action: pan-x !important; pointer-events: auto !important; }
  .quality-badge { min-height: 44px !important; padding: 6px 10px !important; border-radius: 15px !important; }
  .quality-mark { width: 28px !important; height: 28px !important; }
  #qualityDetail { display: none; }

  .details-sheet, .settings-sheet {
    width: calc(100% - 20px) !important;
    left: 10px !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    max-height: 82svh !important;
    border-radius: 28px !important;
  }
}

@media (max-width: 430px) and (max-height: 760px) {
  .quartz-scene { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .topbar { min-height: 50px; padding-bottom: 8px; }
  .brand-icon { width: 40px !important; height: 40px !important; }
  .artwork-card { width: min(58vw, 250px) !important; border-radius: 24px !important; }
  .metadata h1 { font-size: 22px !important; margin-top: 4px !important; }
  .meta-kicker, .host { display: none !important; }
  .mobile-control-surface { min-height: 152px !important; padding: 12px 14px !important; border-radius: 26px !important; }
  .control-dock { grid-template-columns: 50px 70px 50px; gap: 18px !important; margin-bottom: 10px !important; }
  .round-button { width: 50px !important; height: 50px !important; }
  .play-button { width: 70px !important; height: 70px !important; }
}

/* XPlayer 2.4 — mobile-first music player layout */
.control-equalizer {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 13px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: .82;
  filter: blur(.15px) drop-shadow(0 0 10px rgba(var(--accent-rgb), .24));
  pointer-events: none;
  z-index: 1;
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.control-equalizer i {
  width: 3px;
  height: 30px;
  border-radius: 999px;
  transform-origin: center;
  transform: scaleY(.12);
  background: linear-gradient(180deg, rgba(var(--accent-2-rgb), .82), rgba(var(--accent-rgb), .94));
  transition: transform 80ms linear, opacity 80ms linear;
}

@media (max-width: 960px) {
  html, body { min-height: 100%; background: #f7f7f7; }
  body { overflow-y: auto !important; overflow-x: hidden; }
  .quartz-scene {
    min-height: 100svh;
    padding: max(10px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
    overflow: visible !important;
  }
  .quartz-background { background: #f7f7f7 !important; }
  .quartz-vein, .quartz-glint, .quartz-grain { opacity: .18 !important; }
  .audio-screen-frame { display: none !important; }
  .glass-pane {
    width: calc(100% - 36px) !important;
    height: 210px !important;
    left: 18px !important;
    right: 18px !important;
    top: auto !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
    border-radius: 28px !important;
  }
  .player-shell {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 30px);
    display: block !important;
    padding: 0 !important;
  }
  .player-content { width: 100%; height: auto !important; display: flex; flex-direction: column; }
  .topbar {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 58px;
    padding: 0 0 12px !important;
    border: 0 !important;
  }
  .station-brand { min-width: 0; }
  .brand-icon { width: 46px !important; height: 46px !important; border-radius: 12px !important; }
  .station-name { font-size: 17px !important; font-weight: 700 !important; letter-spacing: -.25px; text-transform: none !important; }
  .station-caption { font-size: 12px !important; color: rgba(0,0,0,.45) !important; }
  .broadcast-state { display: none !important; }
  .top-actions { gap: 8px !important; }
  .listeners, .top-button {
    min-width: 44px !important; height: 44px !important; border-radius: 22px !important;
    background: rgba(255,255,255,.76) !important;
    border: 1px solid rgba(0,0,0,.055) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.05) !important;
  }
  .listeners img, .top-button img { width: 20px !important; height: 20px !important; }
  .player-grid { display: flex !important; flex-direction: column; gap: 0 !important; }
  .artwork-stage { display: flex; flex-direction: column; align-items: center; }
  .artwork-card {
    width: min(82vw, 380px) !important;
    aspect-ratio: 1 !important;
    border-radius: 18px !important;
    box-shadow: 0 22px 46px rgba(26,18,30,.22), 0 4px 14px rgba(26,18,30,.12) !important;
  }
  .artwork-topline, .artwork-footer, .cover-symbol, #coverParticles, .mobile-visualizer-layer { display: none !important; }
  .gesture-hint, .mobile-view-indicator { display: none !important; }
  .now-playing { width: 100%; gap: 0 !important; }
  .metadata {
    text-align: left !important;
    padding: 22px 4px 14px !important;
  }
  .meta-kicker { display: none !important; }
  .metadata h1 {
    margin: 0 !important;
    font-size: clamp(25px, 7vw, 33px) !important;
    line-height: 1.08 !important;
    letter-spacing: -.8px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .subtitle {
    margin: 5px 0 0 !important;
    font-size: 17px !important;
    line-height: 1.2 !important;
    color: rgba(0,0,0,.52) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .host { display: none !important; }
  .signal-panel { display: none !important; }
  .mobile-control-surface {
    position: relative !important;
    width: 100% !important;
    min-height: 214px !important;
    margin: 0 !important;
    padding: 56px 14px 14px !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    background: rgba(255,255,255,.72) !important;
    border: 1px solid rgba(255,255,255,.9) !important;
    box-shadow: 0 14px 36px rgba(0,0,0,.09), inset 0 1px 0 rgba(255,255,255,.95) !important;
    backdrop-filter: blur(34px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(34px) saturate(1.4) !important;
  }
  .control-wave-canvas { opacity: .3 !important; filter: blur(8px) saturate(1.25) !important; }
  .control-wave-bloom { opacity: .18 !important; }
  .control-equalizer { display: flex !important; }
  .mobile-dock-handle { display: none !important; }
  .control-dock {
    display: grid !important;
    grid-template-columns: 54px 78px 54px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 25px !important;
    margin: 0 0 18px !important;
  }
  .round-button {
    width: 54px !important; height: 54px !important;
    background: transparent !important; border: 0 !important; box-shadow: none !important;
  }
  .round-button img { width: 27px !important; height: 27px !important; filter: none !important; }
  .play-button {
    width: 78px !important; height: 78px !important;
    border-radius: 50% !important;
    background: #111 !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.2) !important;
  }
  .play-button img { width: 31px !important; height: 31px !important; filter: brightness(0) invert(1) !important; }
  .play-glow, .play-progress { display: none !important; }
  .bottom-row { display: flex !important; flex-direction: column !important; gap: 12px !important; }
  .volume-control {
    width: 100% !important; height: 34px !important; padding: 0 2px !important;
    background: transparent !important; border: 0 !important;
  }
  .volume-control img { width: 17px !important; height: 17px !important; opacity: .62; }
  #volume { width: 100% !important; accent-color: #111; }
  .quality-badge {
    align-self: center;
    min-height: 32px !important;
    padding: 4px 10px !important;
    border-radius: 16px !important;
    background: rgba(0,0,0,.045) !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .quality-mark { width: 22px !important; height: 22px !important; }
  #qualityDetail { display: inline !important; }
  .details-sheet, .settings-sheet { border-radius: 28px 28px 0 0 !important; }
}

@media (max-width: 430px) and (max-height: 760px) {
  .quartz-scene { padding-top: max(6px, env(safe-area-inset-top)); }
  .topbar { min-height: 50px; padding-bottom: 8px !important; }
  .brand-icon { width: 40px !important; height: 40px !important; }
  .artwork-card { width: min(62vw, 250px) !important; }
  .metadata { padding-top: 13px !important; padding-bottom: 9px !important; }
  .metadata h1 { font-size: 23px !important; }
  .subtitle { font-size: 15px !important; }
  .mobile-control-surface { min-height: 174px !important; padding-top: 44px !important; }
  .control-equalizer { top: 9px; height: 34px; }
  .control-dock { grid-template-columns: 48px 68px 48px !important; gap: 20px !important; margin-bottom: 10px !important; }
  .round-button { width: 48px !important; height: 48px !important; }
  .play-button { width: 68px !important; height: 68px !important; }
  .quality-badge { display: none !important; }
}

/* XPlayer 2.5 — Apple-inspired native mobile composition (393 × 852 CSS px target) */
@media (max-width: 600px) {
  :root {
    --xp-side: 20px;
    --xp-radius-xl: 32px;
    --xp-radius-lg: 24px;
    --xp-glass: rgba(255,255,255,.54);
    --xp-stroke: rgba(255,255,255,.82);
    --xp-text: #111113;
    --xp-muted: rgba(17,17,19,.52);
  }

  html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    background: #f5f3f2 !important;
    color: var(--xp-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, sans-serif;
    overscroll-behavior: none;
  }

  body { overflow: hidden !important; }

  .quartz-scene {
    box-sizing: border-box;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    padding: max(12px, env(safe-area-inset-top)) var(--xp-side) max(14px, env(safe-area-inset-bottom));
    overflow: hidden !important;
    display: block;
  }

  .quartz-background {
    background:
      radial-gradient(circle at 15% 4%, rgba(255,65,108,.18), transparent 35%),
      radial-gradient(circle at 92% 76%, rgba(255,159,10,.14), transparent 38%),
      radial-gradient(circle at 78% 18%, rgba(175,82,222,.13), transparent 38%),
      linear-gradient(180deg, #faf8f8 0%, #f3f0f1 100%) !important;
  }
  .quartz-aura { filter: blur(44px) !important; opacity: .38 !important; }
  .quartz-vein, .quartz-glint, .quartz-grain { opacity: .10 !important; }
  #particles { opacity: .28; }

  .audio-screen-frame { display: none !important; }

  .player-shell {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    z-index: 30;
  }

  .player-content {
    height: 100%;
    display: grid !important;
    grid-template-rows: 52px minmax(0, 1fr);
    gap: 8px;
    padding: 0 !important;
  }

  .topbar {
    min-height: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr auto;
    align-items: center;
    border: 0 !important;
    background: transparent !important;
  }

  .station-brand { min-width: 0; gap: 10px !important; }
  .brand-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    background: linear-gradient(145deg, #ff375f, #bf5af2) !important;
    box-shadow: 0 8px 18px rgba(255,55,95,.22), inset 0 1px 0 rgba(255,255,255,.38);
  }
  .brand-icon img { width: 21px !important; height: 21px !important; }
  .station-name {
    font-size: 16px !important;
    font-weight: 720 !important;
    letter-spacing: -.02em !important;
    text-transform: none !important;
  }
  .station-caption {
    font-size: 11px !important;
    color: var(--xp-muted) !important;
    letter-spacing: .01em !important;
    text-transform: none !important;
  }
  .broadcast-state { display: none !important; }
  .top-actions { gap: 8px !important; }
  .listeners, .top-button {
    height: 38px !important;
    min-width: 38px !important;
    border: 1px solid rgba(255,255,255,.7) !important;
    border-radius: 19px !important;
    background: rgba(255,255,255,.48) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 8px 22px rgba(45,32,38,.07), inset 0 1px 0 rgba(255,255,255,.72);
  }
  .listeners img { width: 17px !important; height: 17px !important; }
  .top-button img { width: 20px !important; height: 20px !important; }

  .player-grid {
    min-height: 0;
    height: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(280px, 42svh) auto minmax(196px, 1fr);
    align-content: stretch;
    gap: 12px !important;
  }

  .artwork-stage {
    min-height: 0;
    display: grid !important;
    place-items: center;
    padding: 0 !important;
  }

  .artwork-card {
    width: min(82vw, 326px) !important;
    aspect-ratio: 1 !important;
    max-height: 100% !important;
    border-radius: 28px !important;
    box-shadow:
      0 30px 56px rgba(44,24,35,.18),
      0 8px 18px rgba(44,24,35,.10),
      inset 0 1px 0 rgba(255,255,255,.25) !important;
    overflow: hidden !important;
    transform: translateZ(0);
  }
  .artwork-card:active { transform: scale(.985) translateZ(0); transition: transform 110ms ease; }
  .artwork-topline, .artwork-footer, .gesture-hint, .mobile-view-indicator,
  .mobile-visualizer-layer, .artwork-orbit { display: none !important; }
  .cover-symbol img { width: 76px !important; height: 76px !important; }
  .artwork-image { object-fit: cover !important; }

  .now-playing {
    display: contents !important;
  }

  .metadata {
    padding: 0 2px !important;
    min-height: 68px;
    text-align: left !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .meta-kicker { display: none !important; }
  .metadata h1 {
    margin: 0 !important;
    font-size: clamp(22px, 6vw, 27px) !important;
    line-height: 1.08 !important;
    font-weight: 760 !important;
    letter-spacing: -.035em !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .metadata .subtitle {
    margin: 5px 0 0 !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    color: rgba(var(--accent-rgb), .95) !important;
    font-weight: 600 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .metadata .host { display: none !important; }
  .signal-panel { display: none !important; }

  .glass-pane {
    position: fixed !important;
    width: calc(100vw - 40px) !important;
    height: 204px !important;
    left: 20px !important;
    right: 20px !important;
    top: auto !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    border-radius: 31px !important;
    z-index: 18 !important;
  }

  .mobile-control-surface {
    position: relative !important;
    z-index: 25 !important;
    align-self: end;
    min-height: 196px !important;
    height: 100% !important;
    max-height: 214px !important;
    box-sizing: border-box;
    padding: 42px 18px 16px !important;
    border-radius: 31px !important;
    border: 1px solid var(--xp-stroke) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,.30)) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    box-shadow:
      0 24px 50px rgba(47,32,40,.14),
      inset 0 1px 0 rgba(255,255,255,.92),
      inset 0 -1px 0 rgba(255,255,255,.24) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
  }
  .mobile-control-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,.72), transparent 28%, transparent 70%, rgba(255,255,255,.28));
    opacity: .65;
    z-index: 0;
  }

  .control-wave-canvas {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: .34 !important;
    filter: blur(7px) saturate(1.2) !important;
    z-index: 0 !important;
  }
  .control-wave-bloom { opacity: .5 !important; z-index: 0 !important; }

  .control-equalizer {
    display: flex !important;
    position: absolute !important;
    top: 12px !important;
    left: 24px !important;
    right: 24px !important;
    height: 30px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2.5px !important;
    opacity: .95 !important;
    filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .28)) !important;
    z-index: 6 !important;
    pointer-events: none;
  }
  .control-equalizer i {
    display: block !important;
    flex: 1 1 auto !important;
    max-width: 4px !important;
    min-width: 2px !important;
    height: 26px !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(var(--accent-2-rgb), .95), rgba(var(--accent-rgb), .98)) !important;
    transform-origin: center !important;
    will-change: transform;
  }

  .mobile-dock-handle { display: none !important; }
  .mobile-control-surface > :not(.control-wave-canvas):not(.control-wave-bloom):not(.control-equalizer) {
    position: relative;
    z-index: 5;
  }

  .control-dock {
    margin: 0 0 13px !important;
    display: grid !important;
    grid-template-columns: 54px 76px 54px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 22px !important;
  }
  .round-button {
    width: 54px !important;
    height: 54px !important;
    border: 0 !important;
    border-radius: 27px !important;
    background: rgba(255,255,255,.48) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 8px 18px rgba(40,24,34,.08) !important;
  }
  .round-button img { width: 23px !important; height: 23px !important; }
  .play-button {
    width: 76px !important;
    height: 76px !important;
    border-radius: 38px !important;
    border: 0 !important;
    background: #111113 !important;
    box-shadow: 0 12px 28px rgba(17,17,19,.26), inset 0 1px 0 rgba(255,255,255,.16) !important;
  }
  .play-button:active { transform: scale(.94) !important; }
  .play-button img { width: 31px !important; height: 31px !important; filter: brightness(0) invert(1) !important; }
  .play-glow, .play-progress { display: none !important; }

  .bottom-row {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
  }
  .volume-control {
    height: 36px !important;
    min-width: 0;
    padding: 0 !important;
    gap: 8px !important;
    background: transparent !important;
  }
  .volume-control img { width: 16px !important; height: 16px !important; opacity: .56; }
  #volume {
    height: 28px !important;
    touch-action: pan-x !important;
  }
  .quality-badge {
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 11px !important;
    border: 1px solid rgba(255,255,255,.72) !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.42) !important;
    gap: 6px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8) !important;
  }
  .quality-mark { width: 20px !important; height: 20px !important; }
  #qualityCodec { font-size: 11px !important; font-weight: 750 !important; }
  #qualityDetail, .quality-badge i { display: none !important; }

  .app-boot {
    background:
      radial-gradient(circle at 50% 45%, rgba(255,55,95,.12), transparent 34%),
      #f8f7f6 !important;
  }
  .boot-brand { gap: 15px !important; }
  .boot-logo { width: 82px !important; height: 82px !important; object-fit: contain !important; }
  .boot-textlogo { width: min(210px, 54vw) !important; max-height: 58px !important; object-fit: contain !important; }
  .boot-loader { width: 96px !important; opacity: .45; }
  .app-boot p { font-size: 10px !important; letter-spacing: .18em !important; }

  .details-sheet, .settings-sheet {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 34px 34px 0 0 !important;
    background: rgba(248,248,248,.78) !important;
    backdrop-filter: blur(34px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(34px) saturate(180%) !important;
  }
}

@media (max-width: 600px) and (max-height: 760px) {
  .player-grid { grid-template-rows: minmax(236px, 37svh) auto minmax(178px, 1fr); gap: 8px !important; }
  .artwork-card { width: min(68vw, 260px) !important; }
  .mobile-control-surface { min-height: 178px !important; padding-top: 36px !important; }
  .control-equalizer { top: 9px !important; height: 25px !important; }
  .control-dock { grid-template-columns: 48px 68px 48px !important; gap: 18px !important; margin-bottom: 9px !important; }
  .round-button { width: 48px !important; height: 48px !important; }
  .play-button { width: 68px !important; height: 68px !important; }
  .metadata h1 { font-size: 21px !important; }
}
