/* iMusic — iOS Apple Music inspired */
:root {
  --bg: #000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --text: #f5f5f7;
  --secondary: #98989f;
  --tertiary: #636366;
  --separator: rgba(255, 255, 255, 0.12);
  --accent: #fa2d48;
  --accent-bright: #ff4d66;
  --green: #30d158;
  --chrome-h: 54px;
  --mini-h: 56px;
  --tabbar-h: calc(49px + env(safe-area-inset-bottom, 0px));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3c transparent;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #3a3a3c; border-radius: 9px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #48484a; }

body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.is-locked { overflow: hidden; }

button, input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; }

::selection { background: rgba(250, 45, 72, 0.45); color: #fff; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.app { min-height: 100dvh; }

body.is-now-open .chrome,
body.is-now-open .mini,
body.is-now-open .tabbar,
body.is-now-open .autoplay-hint {
  visibility: hidden;
}

.page-enter { animation: pageIn 0.32s var(--ease) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 46px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--tertiary);
  font-size: 11px;
  line-height: 1.6;
}

/* ---------- top chrome ---------- */
.chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 36px;
  height: calc(var(--chrome-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 28px 0;
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand__mark { width: 27px; height: 27px; display: block; }
.brand__mark svg { width: 100%; height: 100%; }
.brand__text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.desktop-tabs { display: flex; align-items: center; gap: 28px; }
.desktop-tab {
  height: 54px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.desktop-tab:hover { color: var(--text); }
.desktop-tab.is-active { color: var(--text); font-weight: 650; }

.chrome__right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.install-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.18s ease, transform 0.18s ease;
}
.install-button[hidden] { display: none; }
.install-button:hover { background: var(--accent-bright); }
.install-button:active { transform: scale(0.96); }
.install-button .icon { width: 14px; height: 14px; }
.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #48484a, #242426);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.offline-banner {
  position: sticky;
  top: calc(var(--chrome-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 39;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  background: rgba(58, 58, 60, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: #e5e5ea;
  font-size: 11px;
  letter-spacing: 0.01em;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.offline-banner[hidden] { display: none; }
.offline-banner__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #ff9f0a;
}

/* ---------- page ---------- */
.view {
  width: 100%;
  max-width: 1040px;
  min-height: calc(100dvh - var(--chrome-h) - env(safe-area-inset-top, 0px));
  margin: 0 auto;
  padding: 32px 28px 118px;
  outline: none;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 28px;
}

.page-head__text { min-width: 0; }
.page-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.page-head h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.page-sub {
  margin: 7px 0 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.5;
}

.page-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  flex: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.page-action:hover { background: rgba(255, 255, 255, 0.16); }
.page-action:active { transform: scale(0.97); }
.page-action .icon { width: 15px; height: 15px; }

/* ---------- sections ---------- */
.section { margin-top: 34px; }
.section:first-of-type { margin-top: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- top picks ---------- */
.picks {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 0 3px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.picks::-webkit-scrollbar { display: none; }

.pick {
  display: block;
  min-width: 0;
  text-align: left;
  scroll-snap-align: start;
  transition: transform 0.25s var(--ease);
}
.pick:active { transform: scale(0.975); }

.pick__art {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 9px 22px rgba(0, 0, 0, 0.3);
}
.pick__art img { width: 100%; height: 100%; object-fit: cover; }

.pick__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pick:hover .pick__art::after { opacity: 1; }

.pick__play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 2;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  color: #fff;
  opacity: 0;
  transform: translateY(3px);
  transition: 0.2s ease;
}
.pick:hover .pick__play, .pick.is-current .pick__play { opacity: 1; transform: none; }
.pick__play .icon { width: 14px; height: 14px; margin-left: 1px; }

.pick__art--random {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  background:
    radial-gradient(120% 120% at 80% 10%, rgba(255, 255, 255, 0.22), transparent 50%),
    linear-gradient(145deg, #ff4762, #e31236 58%, #8c0922);
}
.pick__art--random::after { display: none; }
.pick__art--random .icon { width: 38px; height: 38px; color: #fff; }
.pick__mix-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pick__title {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pick.is-current .pick__title { color: var(--accent-bright); }
.pick__sub {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--secondary);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- song list ---------- */
.song-list { border-top: 1px solid var(--separator); }

.song-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 61px;
  padding: 7px 0;
  border-bottom: 1px solid var(--separator);
  text-align: left;
  transition: background 0.18s ease;
  outline: none;
}
.song-row:hover { background: rgba(255, 255, 255, 0.035); }
.song-row:focus-visible { background: rgba(255, 255, 255, 0.06); }

.song-row__art {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface);
}
.song-row__art img { width: 100%; height: 100%; object-fit: cover; }
.song-row__art .icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.32);
}

.song-row__text { flex: 1; min-width: 0; }
.song-row__title {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.song-row__title > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.song-row__artist {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--secondary);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.song-row.is-current .song-row__title { color: var(--accent-bright); }

.song-row__like {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--tertiary);
  transition: color 0.18s ease, background 0.18s ease;
}
.song-row__like:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.song-row__like.is-liked { color: var(--accent); }
.song-row__like.is-liked .icon { fill: currentColor; }
.song-row__like .icon { width: 17px; height: 17px; }

.bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
  flex: none;
}
.bars[hidden] { display: none; }
.bars i {
  width: 2px;
  border-radius: 2px;
  background: var(--accent-bright);
  transform-origin: bottom;
  animation: barDance 0.9s ease-in-out infinite;
}
.bars i:nth-child(1) { height: 45%; animation-delay: -0.3s; }
.bars i:nth-child(2) { height: 90%; animation-delay: -0.6s; }
.bars i:nth-child(3) { height: 62%; animation-delay: -0.1s; }
@keyframes barDance { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

.bars.is-paused i { animation-play-state: paused; opacity: 0.45; }

/* ---------- search ---------- */
.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--tertiary);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.search-field:focus-within { background: #242426; box-shadow: 0 0 0 1.5px rgba(250, 45, 72, 0.45); }
.search-field .icon { width: 17px; height: 17px; color: var(--secondary); }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 16px;
  letter-spacing: -0.01em;
}
.search-field input::placeholder { color: var(--tertiary); }
.search-field input::-webkit-search-cancel-button { display: none; }

.search-clear {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: #b8b8bd;
  flex: none;
}
.search-clear[hidden] { display: none; }
.search-clear .icon { width: 10px; height: 10px; stroke-width: 2.6; color: currentColor; }

.search-body { margin-top: 26px; }
.search-label {
  margin: 0 0 12px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
}
.search-label:not(:first-child) { margin-top: 26px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  transition: background 0.18s ease;
}
.chip:hover { background: var(--surface-2); }
.chip .icon { width: 13px; height: 13px; color: var(--secondary); }
.chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.search-tip {
  margin: 30px 0 0;
  color: var(--tertiary);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- library ---------- */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
  margin: 0 0 18px;
  border-radius: 9px;
  background: var(--surface);
}
.segmented button {
  height: 30px;
  border-radius: 7px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  transition: 0.18s ease;
}
.segmented button.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); }

.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 10px;
}
.library-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.025em; }
.library-head span { color: var(--tertiary); font-size: 12px; }

.install-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 30px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--surface);
}
.install-tip__icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
}
.install-tip__icon .icon { width: 18px; height: 18px; }
.install-tip__text { min-width: 0; }
.install-tip__text strong { display: block; margin: 1px 0 4px; font-size: 13px; font-weight: 600; }
.install-tip__text span { display: block; color: var(--secondary); font-size: 11px; line-height: 1.55; }

/* ---------- empty / skeleton / error ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 30px 20px;
  text-align: center;
}
.empty__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--tertiary);
}
.empty__icon .icon { width: 25px; height: 25px; }
.empty h2 { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.empty p { max-width: 280px; margin: 0 0 18px; color: var(--secondary); font-size: 13px; line-height: 1.65; }
.empty .page-action { height: 34px; }

.skeleton-list { padding-top: 2px; }
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 61px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.skeleton-art {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 5px;
  background: linear-gradient(100deg, #1c1c1e 20%, #2c2c2e 40%, #1c1c1e 60%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
}
.skeleton-text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(100deg, #1c1c1e 20%, #2c2c2e 40%, #1c1c1e 60%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
}
.skeleton-line--short { width: 38%; }
@keyframes shimmer { to { background-position: -220% 0; } }

.inline-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(250, 45, 72, 0.08);
  color: #ffb3bd;
  font-size: 13px;
}
.inline-error .icon { width: 17px; height: 17px; flex: none; }
.inline-error button { margin-left: auto; color: #fff; font-size: 13px; font-weight: 600; }

/* ---------- mini player ---------- */
.mini {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  height: var(--mini-h);
  background: rgba(28, 28, 30, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}
.mini.is-visible { opacity: 1; visibility: visible; transform: none; }

.mini__inner {
  width: 100%;
  max-width: 1040px;
  height: 100%;
  margin: 0 auto;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini__art {
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
}
.mini__art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.mini__fallback { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; color: var(--tertiary); }
.mini__fallback .icon { width: 17px; height: 17px; }

.mini__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.mini__title {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mini__artist { display: block; width: 100%; overflow: hidden; color: var(--secondary); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }

.mini__actions { display: flex; align-items: center; gap: 1px; flex: none; }
.mini__button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  transition: background 0.18s ease, transform 0.18s ease;
}
.mini__button:hover { background: rgba(255, 255, 255, 0.08); }
.mini__button:active { transform: scale(0.92); }
.mini__button .icon { width: 19px; height: 19px; }

.mini__progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.mini__progress span { display: block; height: 100%; width: 0%; background: var(--accent); }

/* play / pause swapping */
.icon--pause { display: none; }
.is-playing .icon--play { display: none; }
.is-playing .icon--pause { display: block; }

.player-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 1.8px solid rgba(255, 255, 255, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.is-loading .player-spinner { display: block; }
.is-loading .icon { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- bottom tabs ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  height: var(--tabbar-h);
  padding: 6px 8px env(safe-area-inset-bottom, 0px);
  background: rgba(0, 0, 0, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding-top: 2px;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.tab .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.tab.is-active { color: var(--accent-bright); }

/* ---------- autoplay hint ---------- */
.autoplay-hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--mini-h) + 15px);
  z-index: 70;
  transform: translateX(-50%);
  animation: hintIn 0.4s var(--ease) both;
}
.autoplay-hint[hidden] { display: none; }
.autoplay-hint__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px 0 7px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease;
}
.autoplay-hint__button:active { transform: scale(0.97); }
.autoplay-hint__icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; }
.autoplay-hint__icon .icon { width: 12px; height: 12px; margin-left: 1px; }
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- now playing ---------- */
.now {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(3%);
  transition: opacity 0.4s var(--ease), visibility 0.4s, transform 0.45s var(--ease);
  overflow: hidden;
}
.now.is-open { opacity: 1; visibility: visible; transform: none; }

.now__bg {
  position: absolute;
  inset: -12%;
  background-position: center;
  background-size: cover;
  filter: blur(78px) saturate(140%) brightness(0.42);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.now__bg.is-on { opacity: 1; }
.now__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.78) 52%, rgba(0, 0, 0, 0.94)),
    radial-gradient(80% 60% at 50% 10%, rgba(255, 255, 255, 0.05), transparent 65%);
}

.now__bar, .lyrics__bar {
  position: relative;
  z-index: 3;
  height: calc(56px + env(safe-area-inset-top, 0px));
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: env(safe-area-inset-top, 0px) 16px 0;
}
.now__bar {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.now__circle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.18s ease;
}
.now__circle:hover { background: rgba(255, 255, 255, 0.16); }
.now__circle .icon { width: 19px; height: 19px; }
.now__context { color: rgba(255, 255, 255, 0.62); font-size: 11px; font-weight: 600; letter-spacing: 0.09em; }
.now__spacer { width: 32px; height: 32px; }

.now__scroll {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 4px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  scrollbar-width: none;
}
.now__scroll::-webkit-scrollbar { display: none; }

@media (min-height: 780px) {
  .now__scroll { justify-content: center; }
}

.now__art {
  position: relative;
  width: min(78vw, 368px);
  aspect-ratio: 1;
  flex: none;
  margin-top: clamp(4px, 2vh, 18px);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: scale(0.975);
  transition: transform 0.6s var(--ease);
}
.now.is-open .now__art { transform: none; }
.now__art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.now__art-fallback { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; color: var(--tertiary); }
.now__art-fallback .icon { width: 46px; height: 46px; }

.now__meta { width: 100%; display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.now__text { flex: 1; min-width: 0; }
.now__text h2 {
  margin: 0;
  overflow: hidden;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.now__text p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--secondary);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.now__heart {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.55);
  transition: 0.18s ease;
}
.now__heart:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.now__heart.is-liked { color: var(--accent-bright); }
.now__heart.is-liked .icon { fill: currentColor; }
.now__heart .icon { width: 21px; height: 21px; }

.now__timeline { width: 100%; margin-top: 24px; }
.progress {
  position: relative;
  height: 15px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
}
.progress__buffer {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
}
.progress__fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: #f5f5f7;
  pointer-events: none;
}
.progress__fill i {
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%) scale(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}
.progress:hover .progress__fill i, .progress.is-dragging .progress__fill i { transform: translateY(-50%) scale(1); }

.now__times { display: flex; justify-content: space-between; margin-top: 2px; color: var(--secondary); font-size: 11px; font-variant-numeric: tabular-nums; }

.now__controls { display: flex; align-items: center; justify-content: center; gap: 44px; width: 100%; margin-top: 24px; }
.control-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f5f5f7;
  transition: transform 0.16s ease, background 0.16s ease;
}
.control-btn:hover { background: rgba(255, 255, 255, 0.08); }
.control-btn:active { transform: scale(0.92); }
.control-btn .icon { width: 25px; height: 25px; }
.control-btn--play {
  position: relative;
  width: 66px;
  height: 66px;
  background: #f5f5f7;
  color: #000;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}
.control-btn--play:hover { background: #fff; color: #000; transform: scale(1.02); }
.control-btn--play .icon { width: 27px; height: 27px; }
.control-btn--play .icon--play { margin-left: 3px; }
.control-btn--play .player-spinner { border-color: rgba(0, 0, 0, 0.15); border-top-color: #000; width: 21px; height: 21px; }

.now__actions { display: flex; align-items: flex-start; justify-content: center; gap: 44px; margin-top: 30px; }
.now__action { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--secondary); font-size: 11px; }
.now__action-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  transition: background 0.18s ease;
}
.now__action:hover .now__action-icon { background: rgba(255, 255, 255, 0.16); }
.now__action .icon { width: 19px; height: 19px; }

/* ---------- lyrics ---------- */
.lyrics {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: opacity 0.35s var(--ease), visibility 0.35s, transform 0.45s var(--ease);
  overflow: hidden;
}
.lyrics.is-open { opacity: 1; visibility: visible; transform: none; }

.lyrics__bg { position: absolute; inset: -15%; background-position: center; background-size: cover; filter: blur(90px) brightness(0.35); opacity: 0; }
.lyrics__bg.is-on { opacity: 1; }
.lyrics__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.62), rgba(0,0,0,.86) 45%, #000); }

.lyrics__bar { background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.lyrics__header {
  position: relative;
  z-index: 2;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 4px 24px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}
.lyrics__header img { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; background: var(--surface); }
.lyrics__header div { min-width: 0; }
.lyrics__header strong { display: block; overflow: hidden; font-size: 13px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.lyrics__header span { display: block; overflow: hidden; margin-top: 2px; color: var(--secondary); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }

.lyrics__scroll {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px 24px 80px;
  overflow-y: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 92%, transparent 100%);
}
.lyrics__scroll::-webkit-scrollbar { display: none; }

.lyrics__lines { display: flex; flex-direction: column; gap: 23px; }
.lyric-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.34);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -0.025em;
  transition: color 0.3s ease, transform 0.3s ease;
  transform-origin: left center;
}
.lyric-line.is-active { color: #fff; transform: scale(1.015); }
.lyric-line.is-past { color: rgba(255, 255, 255, 0.22); }
.lyric-line.is-plain { color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.lyrics__empty { display: flex; align-items: center; justify-content: center; min-height: 220px; color: var(--secondary); font-size: 14px; text-align: center; }
.lyrics__empty[hidden] { display: none; }
.lyrics__spacer { height: 30vh; }

/* ---------- queue sheet ---------- */
.queue-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  width: 100%;
  max-width: 600px;
  max-height: 78dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 16px env(safe-area-inset-bottom, 0px);
  border-radius: 14px 14px 0 0;
  background: #1c1c1e;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.4s var(--ease), visibility 0.4s;
}
.queue-sheet.is-open { transform: none; visibility: visible; }
.queue-sheet__grabber { width: 36px; height: 5px; border-radius: 3px; background: #48484a; margin: 8px auto 0; flex: none; }
.queue-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px 10px; flex: none; }
.queue-sheet__head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.025em; }
.queue-sheet__head button { color: var(--accent); font-size: 15px; font-weight: 500; }
.queue-sheet__list { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: #3a3a3c transparent; }
.queue-sheet__list::-webkit-scrollbar { width: 4px; }
.queue-sheet__list::-webkit-scrollbar-thumb { background: #3a3a3c; border-radius: 4px; }

.queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}
.queue-row:last-child { border-bottom: 0; }
.queue-row__art { width: 40px; height: 40px; flex: none; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.queue-row__art img { width: 100%; height: 100%; object-fit: cover; }
.queue-row__text { flex: 1; min-width: 0; }
.queue-row__title { display: block; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.queue-row__artist { display: block; overflow: hidden; margin-top: 2px; color: var(--secondary); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.queue-row.is-current .queue-row__title { color: var(--accent-bright); }
.queue-empty { padding: 40px 10px 60px; color: var(--secondary); font-size: 13px; text-align: center; }

/* ---------- scrim / toast ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.25s ease;
}
.scrim[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--mini-h) + 18px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(44, 44, 46, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: 0.3s var(--ease);
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--green); }
.toast.is-error .toast__dot { background: var(--accent-bright); }

/* ---------- Soda-style listening feed ---------- */
body.is-home { overflow: hidden; }
body.is-home .chrome,
body.is-home .mini { display: none; }
body.is-home .view { min-height: 0; max-width: none; padding: 0; animation: none !important; transform: none !important; }

.soda {
  position: fixed;
  inset: 0 0 var(--tabbar-h);
  z-index: 30;
  overflow: hidden;
  background: #000;
}
.soda--state { display: flex; align-items: center; justify-content: center; flex-direction: column; }

.soda-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 11px;
  height: calc(58px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.soda-brand { display: flex; align-items: center; gap: 7px; flex: none; }
.soda-brand__mark { width: 26px; height: 26px; display: block; filter: drop-shadow(0 4px 10px rgba(250,45,72,.25)); }
.soda-brand__mark svg { width: 100%; height: 100%; }
.soda-brand strong { font-size: 15px; font-weight: 700; letter-spacing: -0.03em; }

.soda-search {
  flex: 1;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  text-align: left;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.soda-search:hover { background: rgba(255, 255, 255, 0.19); color: #fff; }
.soda-search .icon { width: 16px; height: 16px; flex: none; }
.soda-search span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.soda-library {
  width: 36px;
  height: 36px;
  flex: none;
  margin-left: auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.8);
}
.soda-library:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.soda-library .icon { width: 18px; height: 18px; }

.soda-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.soda-scroll::-webkit-scrollbar { display: none; }

.soda-slide {
  position: relative;
  width: 100%;
  height: 100%;
  flex: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(70px + env(safe-area-inset-top, 0px)) 24px 150px;
}

.soda-slide__bg {
  position: absolute;
  inset: -12%;
  background-color: #111;
  background-position: center;
  background-size: cover;
  filter: blur(42px) brightness(0.45) saturate(125%);
  transform: scale(1.08);
  opacity: 0.9;
}
.soda-slide__wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.16) 38%, rgba(0,0,0,.8) 82%, #000 100%),
    radial-gradient(75% 60% at 50% 35%, transparent, rgba(0,0,0,.32));
}

.soda-slide__content {
  position: relative;
  z-index: 2;
  width: min(100%, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.soda-cover {
  width: min(72vw, 330px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.45s var(--ease);
}
.soda-slide.is-current .soda-cover { transform: translateY(-3px); }
.soda-cover img { width: 100%; height: 100%; object-fit: cover; }

.soda-meta { width: 100%; margin-top: 28px; text-align: left; }
.soda-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.soda-kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 8px var(--accent); }
.soda-meta h1 {
  margin: 9px 0 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.14;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.soda-artist { margin: 7px 0 0; color: rgba(255, 255, 255, 0.62); font-size: 15px; font-weight: 400; }
.soda-lyric {
  min-height: 20px;
  margin: 16px 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.soda-lyric.is-visible { opacity: 1; transform: none; }

.soda-rail {
  position: absolute;
  right: 13px;
  top: 49%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(-50%);
}
.soda-rail__button {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}
.soda-rail__button .icon {
  width: 43px;
  height: 43px;
  padding: 11px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: 0.2s ease;
}
.soda-rail__button:hover .icon { background: rgba(255, 255, 255, 0.14); color: #fff; }
.soda-rail__button.is-liked { color: var(--accent-bright); }
.soda-rail__button.is-liked .icon { fill: currentColor; }

.soda-player {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  padding: 20px 22px calc(11px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0,0,0,.9), rgba(0,0,0,.46) 58%, transparent);
}
.soda-progress {
  position: relative;
  height: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.soda-progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
}
.soda-progress span {
  position: relative;
  display: block;
  height: 3px;
  width: 0%;
  border-radius: 3px;
  background: var(--accent-bright);
  pointer-events: none;
}
.soda-player__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.soda-time { width: 36px; color: rgba(255, 255, 255, 0.52); font-size: 10px; font-variant-numeric: tabular-nums; }
.soda-time:last-child { text-align: right; }
.soda-controls { display: flex; align-items: center; justify-content: center; gap: 32px; }
.soda-control {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.88);
  transition: transform 0.16s ease, background 0.16s ease;
}
.soda-control:hover { background: rgba(255, 255, 255, 0.1); }
.soda-control:active { transform: scale(0.9); }
.soda-control .icon { width: 24px; height: 24px; }
.soda-control--play {
  width: 58px;
  height: 58px;
  background: #f5f5f7;
  color: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.soda-control--play:hover { background: #fff; color: #000; }
.soda-control--play .icon { width: 25px; height: 25px; }
.soda-control--play .icon--play { margin-left: 3px; }
.soda-control--play .player-spinner { border-color: rgba(0,0,0,.15); border-top-color: #000; }

.soda-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; color: var(--secondary); text-align: center; }
.soda-state .player-spinner { border-color: rgba(255,255,255,.15); border-top-color: #fff; }
.soda-state h2 { margin: 0; color: #fff; font-size: 20px; }
.soda-state p { max-width: 280px; margin: 0; font-size: 13px; line-height: 1.6; }
.soda-state__icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--tertiary); }
.soda-retry { margin-top: 4px; height: 34px; padding: 0 15px; border-radius: 999px; background: #f5f5f7; color: #000; font-size: 12px; font-weight: 650; }

body.is-home .autoplay-hint { bottom: calc(var(--tabbar-h) + 154px); }
body.is-home .toast { bottom: calc(var(--tabbar-h) + 155px); }

@media (min-width: 721px) {
  .soda { bottom: 0; }
  .soda-top { padding-left: 24px; padding-right: 24px; }
  .soda-brand__mark { width: 28px; height: 28px; }
  .soda-brand strong { font-size: 16px; }
  .soda-search { max-width: 420px; }
  .soda-slide { padding-bottom: 160px; }
  .soda-cover { width: min(42vh, 330px); }
  .soda-rail { right: max(24px, calc(50% - 255px)); }
  .soda-progress, .soda-player__row { width: min(100%, 620px); margin-left: auto; margin-right: auto; }
  body.is-home .autoplay-hint { bottom: 158px; }
  body.is-home .toast { bottom: 160px; }
}

@media (max-width: 420px) {
  .soda-brand strong { display: none; }
  .soda-top { gap: 9px; padding-left: 13px; padding-right: 13px; }
  .soda-slide { padding-left: 18px; padding-right: 18px; }
  .soda-rail { right: 8px; }
  .soda-rail__button .icon { width: 41px; height: 41px; }
  .soda-meta { margin-top: 23px; }
  .soda-controls { gap: 24px; }
}

@media (max-height: 700px) {
  .soda-slide { padding-top: 64px; padding-bottom: 130px; }
  .soda-cover { width: min(58vh, 260px); }
  .soda-meta { margin-top: 18px; }
  .soda-meta h1 { font-size: 24px; }
  .soda-lyric { margin-top: 10px; }
  .soda-player { padding-top: 12px; }
}

@media (min-width: 721px) {
  .tabbar { display: none; }
  .mini { bottom: 0; }
  .autoplay-hint { bottom: calc(var(--mini-h) + 15px); }
  .toast { bottom: calc(var(--mini-h) + 18px); }
}

@media (max-width: 720px) {
  :root { --chrome-h: 48px; }

  .chrome { gap: 0; padding: 0 16px; }
  .brand__mark { width: 25px; height: 25px; }
  .brand__text { font-size: 16px; }
  .desktop-tabs { display: none; }
  .chrome__right { margin-left: auto; }
  .install-button { width: 30px; padding: 0; justify-content: center; }
  .install-button span { display: none; }
  .avatar { width: 28px; height: 28px; font-size: 12px; }

  .view {
    min-height: calc(100dvh - var(--chrome-h) - env(safe-area-inset-top, 0px));
    padding: 22px 16px calc(var(--mini-h) + var(--tabbar-h) + 26px);
  }

  .page-head { margin-bottom: 22px; }
  .page-head h1 { font-size: 32px; }
  .page-eyebrow { font-size: 12px; }
  .page-sub { font-size: 12px; }
  .page-action { height: 32px; padding: 0 12px; font-size: 12px; }

  .section { margin-top: 30px; }
  .section-head h2 { font-size: 20px; }

  .picks { grid-auto-columns: 142px; gap: 13px; }
  .pick__title { font-size: 13px; }
  .pick__sub { font-size: 11.5px; }

  .song-row { min-height: 59px; }
  .song-row__art { width: 46px; height: 46px; }

  .tabbar { display: grid; }
  .mini { bottom: var(--tabbar-h); }
  .autoplay-hint { bottom: calc(var(--mini-h) + var(--tabbar-h) + 12px); }
  .toast { bottom: calc(var(--mini-h) + var(--tabbar-h) + 16px); }
  .mini__inner { padding: 0 10px; }
  .mini__art { width: 38px; height: 38px; }

  .now__scroll { padding: 2px 20px 26px; max-width: 100%; }
  .now__art { width: min(79vw, 340px); margin-top: 2px; }
  .now__meta { margin-top: 22px; }
  .now__text h2 { font-size: 22px; }
  .now__text p { font-size: 16px; }
  .now__controls { gap: 36px; margin-top: 21px; }
  .control-btn--play { width: 62px; height: 62px; }
  .now__actions { margin-top: 25px; gap: 38px; }
  .now__timeline { margin-top: 20px; }

  .lyrics__scroll { padding: 16px 20px 80px; }
  .lyric-line { font-size: 23px; }
  .lyrics__header { padding: 4px 20px 10px; }

  .queue-sheet { max-height: 82dvh; border-radius: 14px 14px 0 0; }

  .search-field { height: 36px; }
  .search-field input { font-size: 16px; }
}

@media (max-width: 360px) {
  .brand__text { display: none; }
  .chrome { padding: 0 14px; }
  .page-head h1 { font-size: 29px; }
  .picks { grid-auto-columns: 132px; }
  .now__actions { gap: 28px; }
}

@media (max-height: 710px) and (max-width: 720px) {
  .now__art { width: min(64vw, 270px); }
  .now__meta { margin-top: 18px; }
  .now__controls { margin-top: 16px; }
  .now__actions { margin-top: 18px; }
  .now__timeline { margin-top: 16px; }
}

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

:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
