/* ==========================================================================
   Lumen — Liquid Glass music player
   All colors come from CSS variables written by js/theme.js
   ========================================================================== */

:root {
  /* defaults (overwritten by the theme engine before first paint) */
  --bg: #e4eef8; --bg-deep: #d6e3f0;
  --blob-1: rgba(10,132,255,.3); --blob-2: rgba(100,210,255,.28); --blob-3: rgba(185,230,255,.25);
  --glass: rgba(255,255,255,.55); --glass-strong: rgba(255,255,255,.75); --glass-solid: #f5f8fc; --glass-row: rgba(255,255,255,.35);
  --glass-border: rgba(255,255,255,.75); --glass-edge: rgba(255,255,255,.95);
  --hairline: rgba(0,0,0,.07); --highlight: rgba(255,255,255,.85);
  --text: #1d1d1f; --text-2: rgba(29,29,31,.62); --text-3: rgba(29,29,31,.4);
  --fill: rgba(0,0,0,.05); --fill-2: rgba(0,0,0,.09);
  --accent: #0a84ff; --accent-rgb: 10 132 255; --accent-2: #64d2ff; --accent-3: #b9e6ff; --accent-ink: #0a6fd6; --on-accent: #fff;
  --btn: #0a84ff; --btn-2: #3aa0ff; --on-btn: #fff;
  --glow: rgba(124,196,255,.45); --glow-soft: rgba(124,196,255,.22); --glow-rgb: 124 196 255;
  --shadow: rgba(30,50,80,.16); --shadow-strong: rgba(30,50,80,.26);
  --blur: 24px; --danger: #d70015;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, -apple-system, "SF Pro Rounded", system-ui, sans-serif;
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px;
  --art-r: 12px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --top-h: 60px;
  --tab-h: 0px;
  --bar-h: 0px;
  --gutter: clamp(16px, 4vw, 40px);
  --row-h: 60px;
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .4; }
img { display: block; }
[hidden] { display: none !important; }
a { color: var(--accent-ink); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; display: block; }
::selection { background: rgba(var(--accent-rgb) / .3); }

:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--accent-ink); outline-offset: 2px; border-radius: 10px; }

.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease), fill .4s, box-shadow .4s var(--ease) !important;
}

/* ---------------- backdrop ---------------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: linear-gradient(180deg, var(--bg), var(--bg-deep)); pointer-events: none; }
.blob { position: absolute; border-radius: 50%; will-change: transform; }
.b1 { width: 70vmax; height: 70vmax; left: -22vmax; top: -26vmax; background: radial-gradient(closest-side, var(--blob-1), transparent); }
.b2 { width: 64vmax; height: 64vmax; right: -24vmax; top: 4vmax; background: radial-gradient(closest-side, var(--blob-2), transparent); }
.b3 { width: 60vmax; height: 60vmax; left: 10vmax; bottom: -32vmax; background: radial-gradient(closest-side, var(--blob-3), transparent); }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.reduce-motion) .b1 { animation: drift1 38s ease-in-out infinite alternate; }
  :root:not(.reduce-motion) .b2 { animation: drift2 44s ease-in-out infinite alternate; }
  :root:not(.reduce-motion) .b3 { animation: drift3 50s ease-in-out infinite alternate; }
}
@keyframes drift1 { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(-9vmax, 7vmax, 0) scale(.94); } }
@keyframes drift3 { to { transform: translate3d(6vmax, -8vmax, 0) scale(1.06); } }

/* ---------------- glass primitives ---------------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.7);
  backdrop-filter: blur(var(--blur)) saturate(1.7);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--highlight), 0 12px 32px -14px var(--shadow), 0 2px 6px -3px var(--shadow);
}
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 var(--highlight), 0 14px 34px -18px var(--shadow);
}
.no-blur .glass, .no-blur .bubble-orb, .no-blur .sheet, .no-blur .menu { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--glass-solid) !important; }
.no-blur .card { background: var(--glass-solid); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .bubble-orb, .sheet, .menu { background: var(--glass-solid) !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .bubble-orb, .sheet, .menu { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--glass-solid) !important; }
}

/* ---------------- buttons ---------------- */
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  color: var(--text);
  transition: background-color .2s, transform .35s var(--spring), color .2s, opacity .2s;
  position: relative;
}
.icon-btn:hover { background: var(--fill); }
.icon-btn:active { transform: scale(.88); transition-duration: .08s; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm .ic { width: 19px; height: 19px; }
.icon-btn.on { color: var(--accent-ink); }
.icon-btn.on::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.icon-btn.ghost { color: var(--text-2); }
.icon-btn.ghost:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  background: var(--fill); color: var(--text);
  transition: transform .35s var(--spring), background-color .2s, box-shadow .2s, filter .2s;
  white-space: nowrap;
}
.btn .ic { width: 19px; height: 19px; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.95); transition-duration: .08s; }
.btn.primary {
  background: linear-gradient(160deg, var(--btn-2), var(--btn));
  color: var(--on-btn);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px -8px var(--glow);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.tinted { background: rgba(var(--accent-rgb) / .14); color: var(--accent-ink); }
.btn.tinted:hover { background: rgba(var(--accent-rgb) / .2); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  background: var(--fill); white-space: nowrap;
  transition: background-color .2s, color .2s, transform .3s var(--spring);
}
.chip .ic { width: 17px; height: 17px; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); }
.chip:active { transform: scale(.95); }
.offline-chip { background: rgba(255,159,10,.16); color: #c77700; height: 28px; font-size: 12px; }
[data-scheme="dark"] .offline-chip { color: #ffb340; }

/* tooltips (desktop only) */
@media (hover: hover) and (pointer: fine) {
  [data-tip]::before {
    content: attr(data-tip);
    position: absolute; top: calc(100% + 8px); left: 50%;
    transform: translate(-50%, -4px);
    padding: 5px 9px; border-radius: 8px;
    background: var(--text); color: var(--bg);
    font-size: 12px; font-weight: 500; white-space: pre; line-height: 1.2;
    opacity: 0; pointer-events: none; z-index: 50;
    transition: opacity .15s, transform .2s var(--ease);
  }
  [data-tip]:hover::before { opacity: .92; transform: translate(-50%, 0); transition-delay: .5s; }
  .player-bar [data-tip]::before, .np [data-tip]::before { top: auto; bottom: calc(100% + 8px); }
}

/* ---------------- app shell ---------------- */
.app { position: fixed; inset: 0; z-index: 1; }
.app.booting .views, .app.booting .player-bar { opacity: 0; }
.views { position: absolute; inset: 0; transition: opacity .3s; }

.topbar {
  position: absolute; z-index: 20;
  top: calc(var(--safe-t) + 10px); left: calc(var(--safe-l) + 12px); right: calc(var(--safe-r) + 12px);
  height: 52px; border-radius: 26px;
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
  transition: transform .4s var(--ease), opacity .3s;
}
.back-btn { opacity: 0; transform: scale(.6); pointer-events: none; width: 0; margin-right: -6px; transition: opacity .25s, transform .4s var(--spring), width .3s var(--ease), margin .3s; }
.app:not([data-view="home"]) .back-btn { opacity: 1; transform: none; pointer-events: auto; width: 40px; margin-right: 0; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: -.02em; padding: 4px 8px 4px 4px; border-radius: 20px; }
.brand-mark { position: relative; width: 26px; height: 26px; flex: none; }
.brand-mark i { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(140deg, var(--accent-2), var(--accent)); box-shadow: inset 0 1px 1px rgba(255,255,255,.7), 0 2px 6px -1px var(--glow); }
.brand-mark i:nth-child(1) { left: 6px; top: 1px; }
.brand-mark i:nth-child(2) { left: 0; top: 11px; opacity: .85; }
.brand-mark i:nth-child(3) { left: 12px; top: 11px; opacity: .7; }
.top-nav { display: none; position: relative; margin: 0 auto; padding: 4px; border-radius: 22px; background: var(--fill); gap: 2px; }
.top-nav button { position: relative; z-index: 1; height: 34px; padding: 0 16px; border-radius: 17px; font-size: 14px; font-weight: 600; color: var(--text-2); transition: color .25s; }
.top-nav button:hover { color: var(--text); }
.top-nav button.active { color: var(--text); }
.top-nav-pill { position: absolute; top: 4px; left: 0; height: 34px; width: 0; border-radius: 17px; background: var(--glass-strong); box-shadow: 0 2px 8px -2px var(--shadow), inset 0 1px 0 var(--highlight); transition: transform .5s var(--spring), width .4s var(--ease); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }

.view {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: calc(var(--safe-t) + var(--top-h) + 22px) calc(var(--safe-r) + var(--gutter)) calc(var(--safe-b) + var(--tab-h) + var(--bar-h) + 28px) calc(var(--safe-l) + var(--gutter));
  scrollbar-width: thin;
  scrollbar-color: var(--fill-2) transparent;
}
.view::-webkit-scrollbar { width: 10px; }
.view::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.view.entering { animation: view-in .55s var(--spring) both; }
.view.leaving { animation: view-out .2s var(--ease) both; pointer-events: none; }
@keyframes view-in { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes view-out { to { opacity: 0; transform: scale(.985); } }
.view-inner { max-width: 1180px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-size: clamp(28px, 4.2vw, 38px); letter-spacing: -.03em; line-height: 1.1; }
.page-sub { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 20px; letter-spacing: -.02em; margin: 26px 0 10px; display: flex; align-items: center; gap: 10px; }
.section-title .count { font-size: 14px; font-weight: 500; color: var(--text-3); }
.section-title .spacer { flex: 1; }

/* ---------------- home & bubbles ---------------- */
.view-home { display: flex; flex-direction: column; }
.home-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; gap: clamp(20px, 5vh, 56px); padding: 8px 0 24px; }
.home-greeting { text-align: center; }
.home-greeting h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -.035em; line-height: 1.05; }
.home-greeting p { color: var(--text-2); margin-top: 8px; font-size: clamp(15px, 1.6vw, 17px); }
.bubbles {
  --bubble: clamp(150px, 17vw, 226px);
  display: flex; align-items: center; justify-content: center; gap: clamp(28px, 5vw, 72px);
}
.bubble {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px;
  border-radius: 50%; -webkit-user-select: none; user-select: none;
}
.bubble:focus-visible { outline: none; }
.bubble:focus-visible .bubble-orb { outline: 3px solid var(--accent-ink); outline-offset: 5px; }
.bubble-float { display: block; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.reduce-motion):not(.no-float) .bubble-float { animation: float 6.5s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
}
@keyframes float { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(0, -12px, 0); } }
.bubble-orb {
  position: relative; display: grid; place-items: center;
  width: var(--bubble); height: var(--bubble); border-radius: 50%;
  background:
    radial-gradient(120% 120% at 50% 110%, rgba(var(--accent-rgb) / .34), transparent 55%),
    radial-gradient(90% 90% at 80% 20%, rgba(var(--glow-rgb) / .22), transparent 60%),
    var(--glass);
  -webkit-backdrop-filter: blur(calc(var(--blur) * .8)) saturate(1.8);
  backdrop-filter: blur(calc(var(--blur) * .8)) saturate(1.8);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 2px 1px var(--glass-edge),
    inset 0 -14px 30px -8px rgba(var(--accent-rgb) / .35),
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 26px 60px -22px var(--glow),
    0 14px 30px -18px var(--shadow-strong);
  transition: transform .55s var(--spring), box-shadow .4s var(--ease);
  isolation: isolate;
}
/* glossy specular highlight */
.bubble-orb::before {
  content: ""; position: absolute; left: 14%; top: 6%; width: 72%; height: 44%;
  border-radius: 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.08) 70%, transparent);
  opacity: .75; pointer-events: none; z-index: -1;
}
[data-scheme="dark"] .bubble-orb::before { opacity: .28; }
/* rim light */
.bubble-orb::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 210deg, transparent 0 20%, rgba(255,255,255,.55) 32%, transparent 45% 70%, rgba(var(--glow-rgb) / .6) 82%, transparent 92%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  opacity: .9;
}
.bubble-glow { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--glow-rgb) / .45), transparent); filter: blur(14px); opacity: 0; transition: opacity .4s; z-index: -1; }
.bubble-icon { color: var(--accent-ink); filter: drop-shadow(0 2px 6px rgba(var(--accent-rgb) / .35)); transition: transform .55s var(--spring); }
.bubble-icon .ic { width: calc(var(--bubble) * .3); height: calc(var(--bubble) * .3); stroke-width: 1.35; }
.bubble-badge {
  position: absolute; top: 12%; right: 12%; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: linear-gradient(160deg, var(--btn-2), var(--btn)); color: var(--on-btn);
  box-shadow: 0 4px 12px -3px var(--glow), inset 0 1px 0 rgba(255,255,255,.4);
}
.bubble-label { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.bubble-sub { font-size: 13px; color: var(--text-2); margin-top: -12px; min-height: 18px; }
@media (hover: hover) {
  .bubble:hover .bubble-orb { transform: scale(1.06) translateY(-4px); box-shadow: inset 0 2px 1px var(--glass-edge), inset 0 -14px 30px -8px rgba(var(--accent-rgb) / .45), 0 34px 70px -22px var(--glow), 0 18px 34px -18px var(--shadow-strong); }
  .bubble:hover .bubble-glow { opacity: 1; }
  .bubble:hover .bubble-icon { transform: scale(1.06); }
}
.bubble:active .bubble-orb { transform: scale(.94); transition-duration: .12s; }
.bubble.pressed .bubble-orb { transform: scale(1.12); opacity: .9; transition: transform .45s var(--spring), opacity .4s; }

.home-now {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border-radius: 999px; max-width: min(420px, 100%);
  text-align: left; transition: transform .35s var(--spring);
}
.home-now:active { transform: scale(.97); }
.home-now .art { width: 40px; height: 40px; border-radius: 50%; }
.home-now .meta { min-width: 0; }
.home-now .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.home-now .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* phones: triangular composition */
@media (max-width: 759px) {
  .bubbles { --bubble: min(38vw, 30vh, 172px); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; justify-items: center; width: 100%; max-width: 420px; }
  .bubbles .bubble:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .bubble { gap: 10px; }
  .bubble-label { font-size: 17px; }
  .bubble-sub { margin-top: -8px; font-size: 12px; }
}
@media (max-width: 759px) and (max-height: 640px) {
  .bubbles { --bubble: min(30vw, 26vh, 140px); }
  .home-greeting h1 { font-size: 28px; }
}
/* phone landscape: row */
@media (max-height: 500px) and (orientation: landscape) {
  .bubbles { --bubble: min(22vw, 42vh, 170px); display: flex; max-width: none; gap: 40px; }
  .home-greeting { display: none; }
}

/* ---------------- art ---------------- */
.art {
  position: relative; flex: none; overflow: hidden;
  border-radius: var(--art-r);
  background: var(--fill);
  box-shadow: 0 0 0 .5px var(--hairline), 0 4px 12px -6px var(--shadow);
  aspect-ratio: 1;
}
.art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s var(--ease); }
.art img.loaded { opacity: 1; }
.art.ph {
  background:
    radial-gradient(circle at var(--px, 30%) var(--py, 25%), color-mix(in srgb, var(--accent-2) 85%, white), transparent 58%),
    radial-gradient(circle at calc(100% - var(--px, 30%)) 90%, var(--accent-3), transparent 62%),
    linear-gradient(var(--pa, 135deg), var(--accent), var(--accent-2));
}
.art.ph::after {
  content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V6l10-2v11.5'/%3E%3Ccircle cx='6.6' cy='17.5' r='2.4'/%3E%3Ccircle cx='16.6' cy='15.5' r='2.4'/%3E%3C/svg%3E") center / 38% no-repeat;
  opacity: .55; mix-blend-mode: soft-light;
}
.art.ph.loaded-art::after { display: none; }
.art.round { border-radius: 50%; }
.art.mosaic { display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); }
.art.mosaic > .art { border-radius: 0; box-shadow: none; width: 100%; height: 100%; }

/* ---------------- lists ---------------- */
.list { display: flex; flex-direction: column; }
.row {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: var(--row-h); padding: 8px 8px 8px 8px; border-radius: 14px;
  transition: background-color .15s;
  cursor: default;
  content-visibility: auto; contain-intrinsic-size: auto var(--row-h);
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 64px; right: 10px; height: 1px; background: var(--hairline); }
.row:hover { background: var(--fill); }
.row:hover::before, .row:hover + .row::before { opacity: 0; }
.row.is-current { background: rgba(var(--accent-rgb) / .1); }
.row.is-current .row-title { color: var(--accent-ink); }
.row .art { width: 44px; height: 44px; border-radius: 9px; }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-weight: 560; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.row-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; align-items: center; gap: 2px; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.row-end .dur { min-width: 40px; text-align: right; margin-right: 2px; }
.row .badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: rgba(255,159,10,.16); color: #c77700; margin-right: 4px; }
[data-scheme="dark"] .row .badge { color: #ffb340; }
.row.missing .row-main { opacity: .55; }
.row-hit { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.row > :not(.row-hit) { position: relative; z-index: 1; }
.row-main, .row > .art { pointer-events: none; }
.row-num { width: 22px; text-align: center; color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 14px; }
.row.cols-album { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (min-width: 900px) {
  .row.with-album { grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto; }
  .row .row-album { display: block; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
}
.row-album { display: none; }
.density-compact { --row-h: 50px; }
.density-compact .row .art { width: 36px; height: 36px; border-radius: 7px; }
.density-compact .row + .row::before { left: 56px; }

.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; width: 14px; color: var(--accent-ink); }
.eq i { width: 3px; background: currentColor; border-radius: 1px; height: 40%; }
.playing-now .eq i { animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.35s !important; height: 80%; }
.eq i:nth-child(3) { animation-delay: -.7s !important; height: 60%; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.reduce-motion .eq i { animation: none !important; }

.drag-handle { cursor: grab; touch-action: none; color: var(--text-3); }
.drag-handle:active { cursor: grabbing; }
.row.dragging { z-index: 10; background: var(--glass-strong); box-shadow: 0 16px 36px -12px var(--shadow-strong), inset 0 1px 0 var(--highlight); transition: box-shadow .2s, background-color .2s; }
.row.dragging::before, .is-sorting .row::before { opacity: 0 !important; }
.is-sorting { -webkit-user-select: none; user-select: none; }

/* ---------------- toolbar / inputs ---------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  position: relative; flex: 1 1 260px; min-width: 0; display: flex; align-items: center;
}
.search .ic { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 38px 0 38px; border-radius: 14px;
  background: var(--fill); border: 1px solid transparent; font-size: 16px;
  transition: background-color .2s, border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { background: var(--glass-strong); border-color: rgba(var(--accent-rgb) / .5); box-shadow: 0 0 0 4px rgba(var(--accent-rgb) / .14); outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { position: absolute; right: 4px; }
.select {
  height: 42px; padding: 0 34px 0 14px; border-radius: 14px; border: 1px solid transparent; background: var(--fill);
  font-size: 15px; font-weight: 500;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.select:focus-visible { outline: 2.5px solid var(--accent-ink); }
.text-input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; font-size: 16px;
  background: var(--fill); border: 1px solid var(--hairline);
  -webkit-appearance: none; appearance: none;
}
.text-input:focus { outline: none; border-color: rgba(var(--accent-rgb) / .6); box-shadow: 0 0 0 4px rgba(var(--accent-rgb) / .15); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 13px; background: var(--fill); position: relative; }
.segmented button { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: background-color .25s, color .25s, box-shadow .25s; }
.segmented button .ic { width: 17px; height: 17px; }
.segmented button[aria-pressed="true"] { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 8px -3px var(--shadow), inset 0 1px 0 var(--highlight); }

/* range slider (progress / volume / settings) */
.range {
  --p: 0%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer;
  touch-action: pan-y;
}
.range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) 0, var(--accent-2) var(--p), var(--fill-2) var(--p));
  transition: height .2s var(--ease);
}
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--fill-2); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; border: 0;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3), 0 0 0 .5px rgba(0,0,0,.08);
  transition: transform .25s var(--spring);
  transform: scale(.9);
}
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.range:hover::-webkit-slider-runnable-track, .range.dragging::-webkit-slider-runnable-track { height: 6px; }
.range:hover::-webkit-slider-thumb, .range.dragging::-webkit-slider-thumb { margin-top: -3px; transform: scale(1.25); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(var(--accent-rgb) / .35); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(var(--accent-rgb) / .35); }
@media (pointer: coarse) {
  .range { height: 36px; }
  .range::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7px; }
  .range:hover::-webkit-slider-thumb, .range.dragging::-webkit-slider-thumb { margin-top: -6px; transform: scale(1.2); }
}

.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--fill-2); transition: background-color .25s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .35s var(--spring); }
.switch input:checked + span { background: linear-gradient(160deg, var(--btn-2), var(--btn)); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--accent-ink); outline-offset: 2px; }

/* ---------------- empty states ---------------- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(28px, 7vh, 64px) 20px; gap: 14px; border-radius: var(--r-xl);
}
.empty-art { position: relative; width: 120px; height: 120px; margin-bottom: 6px; }
.empty-art .art { position: absolute; width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 16px 34px -14px var(--shadow-strong); }
.empty-art .art:nth-child(1) { left: 0; top: 18px; transform: rotate(-10deg); --pa: 200deg; --px: 70%; }
.empty-art .art:nth-child(2) { right: 0; top: 8px; transform: rotate(9deg); --pa: 60deg; }
.empty-art .art:nth-child(3) { left: 18px; top: 26px; width: 84px; height: 84px; }
.empty h3 { font-size: 22px; }
.empty p { color: var(--text-2); max-width: 400px; }
.empty .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.empty.small { padding: 28px 16px; }
.empty.small h3 { font-size: 17px; }

/* ---------------- music view ---------------- */
.music-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
.music-side { display: none; }
.music-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 2px var(--gutter); }
.music-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 1000px) {
  .music-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .music-side { display: block; position: sticky; top: 0; align-self: start; }
  .music-tabs { display: none; }
}
.side-group { padding: 10px; border-radius: var(--r-lg); }
.side-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 12px 10px 6px; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border-radius: 11px; font-size: 15px; font-weight: 500; color: var(--text); text-align: left; transition: background-color .15s; }
.side-item .ic { width: 20px; height: 20px; color: var(--accent-ink); }
.side-item:hover { background: var(--fill); }
.side-item.active { background: rgba(var(--accent-rgb) / .14); font-weight: 600; }
.side-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; } }
.tile { display: flex; flex-direction: column; gap: 8px; text-align: left; min-width: 0; border-radius: 16px; content-visibility: auto; contain-intrinsic-size: auto 220px; }
.tile .art { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 0 0 .5px var(--hairline), 0 14px 28px -16px var(--shadow-strong); transition: transform .45s var(--spring), box-shadow .3s; }
.tile:hover .art { transform: translateY(-3px) scale(1.02); box-shadow: 0 0 0 .5px var(--hairline), 0 22px 36px -18px var(--shadow-strong); }
.tile:active .art { transform: scale(.97); }
.tile-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.tile-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -6px; padding: 0 2px; }
.tile.new .art { display: grid; place-items: center; background: var(--fill); color: var(--accent-ink); border: 1.5px dashed var(--fill-2); box-shadow: none; }
.tile.new .art .ic { width: 38px; height: 38px; }
.tile.round .art { border-radius: 50%; }
.tile.round { align-items: center; text-align: center; }

.detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: end; margin-bottom: 22px; }
.detail-head .art { width: clamp(140px, 22vw, 230px); border-radius: 20px; box-shadow: 0 0 0 .5px var(--hairline), 0 26px 50px -24px var(--shadow-strong); }
.detail-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.detail-title { font-size: clamp(24px, 3.6vw, 36px); letter-spacing: -.03em; line-height: 1.12; margin: 4px 0; word-break: break-word; }
.detail-sub { color: var(--text-2); }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .detail-head { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; }
  .detail-head .art { width: min(62vw, 240px); }
  .detail-actions { justify-content: center; }
  .detail-actions .btn.primary, .detail-actions .btn.tinted { flex: 1 1 120px; }
}
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-ink); font-weight: 600; margin: -6px 0 14px -8px; height: 36px; padding: 0 10px 0 4px; border-radius: 18px; }
.back-link:hover { background: var(--fill); }
.back-link .ic { width: 20px; height: 20px; }

/* ---------------- queue ---------------- */
.queue-layout { display: grid; gap: 22px; }
@media (min-width: 1000px) { .queue-layout { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; } .queue-now { position: sticky; top: 0; } }
.queue-now { padding: 18px; border-radius: var(--r-xl); }
.queue-now .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px; }
.queue-now-main { display: grid; grid-template-columns: 1fr; gap: 14px; }
.queue-now .art { width: 100%; border-radius: 18px; }
.queue-now .qn-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.queue-now .qn-sub { color: var(--text-2); }
.queue-now .qn-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }
@media (max-width: 999px) {
  .queue-now-main { grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
  .queue-now .qn-controls { grid-column: 1 / -1; }
  .queue-now .qn-title { font-size: 17px; }
}
.list-card { padding: 6px; border-radius: var(--r-lg); }
.queue-section-head { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; }
.queue-section-head h3 { font-size: 18px; }
.queue-section-head .muted { color: var(--text-3); font-size: 14px; }
.queue-section-head .spacer { flex: 1; }

/* ---------------- settings ---------------- */
.settings-layout { display: grid; gap: 22px; }
.settings-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
.settings-nav::-webkit-scrollbar { display: none; }
@media (min-width: 1000px) {
  .settings-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .settings-nav { flex-direction: column; position: sticky; top: 0; align-self: start; margin: 0; padding: 10px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-border); }
  .settings-nav .chip { justify-content: flex-start; height: 40px; border-radius: 11px; background: transparent; color: var(--text); font-weight: 500; font-size: 15px; }
  .settings-nav .chip .ic { color: var(--accent-ink); width: 20px; height: 20px; }
  .settings-nav .chip:hover { background: var(--fill); }
  .settings-nav .chip.active { background: rgba(var(--accent-rgb) / .14); color: var(--text); font-weight: 600; }
}
.set-section { scroll-margin-top: 12px; }
.set-section + .set-section { margin-top: 30px; }
.set-section > h2 { font-size: 24px; letter-spacing: -.025em; margin: 0 0 4px 4px; display: flex; align-items: center; gap: 10px; }
.set-section > h2 .ic { color: var(--accent-ink); width: 24px; height: 24px; }
.set-section > .desc { color: var(--text-2); margin: 0 0 14px 4px; font-size: 14px; }
.set-card { padding: 4px 18px; border-radius: var(--r-lg); }
.set-card + .set-card { margin-top: 14px; }
.set-card.pad { padding: 18px; }
.set-row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 0; }
.set-row + .set-row { border-top: 1px solid var(--hairline); }
.set-row .lbl { flex: 1; min-width: 0; }
.set-row .lbl strong { display: block; font-weight: 560; }
.set-row .lbl small { display: block; color: var(--text-2); font-size: 13px; margin-top: 1px; }
.set-row .val { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 14px; min-width: 52px; text-align: right; }
.set-row .range { width: min(240px, 42vw); }
.set-row.stack { flex-direction: column; align-items: stretch; gap: 8px; }
.set-row.stack .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-row.stack .range { width: 100%; }
.sub-h { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin: 18px 4px 10px; display: flex; align-items: center; gap: 8px; }
.sub-h:first-child { margin-top: 4px; }
.storage-meter { height: 8px; border-radius: 8px; background: var(--fill-2); overflow: hidden; margin: 10px 0 6px; }
.storage-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width .6s var(--ease); }
.kbd-list { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 700px) { .kbd-list { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
.kbd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
kbd {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; margin-left: 4px; border-radius: 7px;
  font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--hairline); box-shadow: 0 1.5px 0 var(--hairline);
}
.about-hero { display: flex; align-items: center; gap: 16px; }
.about-hero .app-icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 24px -10px var(--shadow-strong); }
.prose { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.prose p + p { margin-top: 10px; }
.prose strong { color: var(--text); }
.prose ul { margin: 8px 0; padding-left: 20px; }

/* ---------------- theme studio ---------------- */
.studio { display: grid; gap: 14px; }
@media (min-width: 1200px) { .studio { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .studio-preview-wrap { position: sticky; top: 0; grid-column: 2; grid-row: 1 / span 4; } }
.mode-row { display: flex; gap: 10px; flex-wrap: wrap; }
.mode-opt {
  flex: 1 1 110px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 16px;
  border: 1.5px solid transparent; background: var(--fill); font-weight: 600; font-size: 14px; transition: border-color .2s, background-color .2s, transform .3s var(--spring);
}
.mode-opt:active { transform: scale(.97); }
.mode-opt[aria-pressed="true"] { border-color: var(--accent-ink); background: rgba(var(--accent-rgb) / .1); }
.mode-thumb { width: 100%; max-width: 120px; aspect-ratio: 16 / 10; border-radius: 10px; position: relative; overflow: hidden; box-shadow: 0 0 0 .5px var(--hairline); }
.mode-thumb.light { background: linear-gradient(135deg, #f4f7fb, #dfe7f1); }
.mode-thumb.dark { background: linear-gradient(135deg, #20232a, #0b0c10); }
.mode-thumb.system { background: linear-gradient(135deg, #f4f7fb 50%, #15171c 50%); }
.mode-thumb::after { content: ""; position: absolute; left: 18%; top: 28%; width: 34%; height: 44%; border-radius: 50%; background: linear-gradient(140deg, var(--accent-2), var(--accent)); box-shadow: 0 4px 10px -3px var(--glow); }

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.preset {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 18px; text-align: left;
  background: var(--fill); border: 1.5px solid transparent; transition: border-color .2s, transform .35s var(--spring), background-color .2s;
}
.preset:hover { background: var(--fill-2); }
.preset:active { transform: scale(.97); }
.preset[aria-pressed="true"] { border-color: var(--accent-ink); }
.preset-swatch { position: relative; height: 74px; border-radius: 12px; overflow: hidden; }
.preset-swatch .o { position: absolute; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(255,255,255,.6), 0 4px 10px -4px rgba(0,0,0,.35); }
.preset-swatch .o1 { width: 34px; height: 34px; left: 12px; top: 20px; }
.preset-swatch .o2 { width: 24px; height: 24px; left: 52px; top: 12px; opacity: .9; }
.preset-swatch .o3 { width: 20px; height: 20px; left: 56px; top: 42px; opacity: .8; }
.preset-name { font-size: 13px; font-weight: 600; padding: 0 4px 2px; display: flex; align-items: center; gap: 4px; }
.preset-name .tag { font-size: 10px; font-weight: 700; color: var(--accent-ink); letter-spacing: .04em; text-transform: uppercase; margin-left: auto; }
.preset .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); color: var(--text-2); opacity: 0; transition: opacity .2s; }
.preset .x .ic { width: 14px; height: 14px; }
.preset:hover .x, .preset:focus-within .x { opacity: 1; }
@media (hover: none) { .preset .x { opacity: .9; } }

.palette { padding: 12px 0; }
.palette + .palette { border-top: 1px solid var(--hairline); }
.palette-name { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%; position: relative; flex: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1), inset 0 2px 2px rgba(255,255,255,.45), 0 4px 10px -4px rgba(0,0,0,.35);
  transition: transform .35s var(--spring);
}
.swatch:hover { transform: scale(1.1); }
.swatch:active { transform: scale(.94); }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2.5px solid var(--accent-ink); }

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.color-field { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 14px; background: var(--fill); }
.color-field .lbl { flex: 1; font-size: 14px; font-weight: 550; min-width: 0; }
.color-well { position: relative; width: 36px; height: 36px; border-radius: 10px; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 3px 8px -3px rgba(0,0,0,.3); }
.color-well input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; opacity: 0; }
.color-well i { position: absolute; inset: 0; pointer-events: none; }
.hex { width: 86px; height: 36px; padding: 0 8px; border-radius: 9px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; text-transform: uppercase; background: var(--glass-strong); border: 1px solid var(--hairline); }
.hex:focus { outline: none; border-color: rgba(var(--accent-rgb) / .6); }
.hex.invalid { border-color: var(--danger); }

.picker { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--fill); margin-top: 12px; }
.picker-sv { position: relative; height: 150px; border-radius: 12px; cursor: crosshair; touch-action: none; background: linear-gradient(transparent, #000), linear-gradient(90deg, #fff, hsl(var(--h, 210) 100% 50%)); }
.picker-sv .knob, .picker-hue .knob { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4); pointer-events: none; }
.picker-hue { position: relative; height: 22px; border-radius: 11px; cursor: pointer; touch-action: none; background: linear-gradient(90deg, red, #ff0, lime, cyan, blue, #f0f, red); }
.picker-hue .knob { top: 50%; }
.picker-head { display: flex; align-items: center; gap: 10px; }
.picker-head .segmented { flex-wrap: wrap; }

.preview {
  position: relative; overflow: hidden; border-radius: 24px; padding: 18px; min-height: 260px;
  background: linear-gradient(180deg, var(--bg), var(--bg-deep));
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 40px -20px var(--shadow-strong);
}
.preview::before { content: ""; position: absolute; width: 220px; height: 220px; left: -60px; top: -80px; border-radius: 50%; background: radial-gradient(closest-side, var(--blob-1), transparent); }
.preview::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; bottom: -70px; border-radius: 50%; background: radial-gradient(closest-side, var(--blob-2), transparent); }
.preview > * { position: relative; z-index: 1; }
.preview-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.preview-bubbles { display: flex; justify-content: center; gap: 14px; margin: 6px 0 16px; --bubble: 64px; }
.preview-bubbles .bubble-orb { animation: none; }
.preview-bubbles .bubble-icon .ic { stroke-width: 1.6; }
.preview-player { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 18px; }
.preview-player .art { width: 42px; height: 42px; border-radius: 10px; }
.preview-player .meta { flex: 1; min-width: 0; }
.preview-player .t { font-size: 14px; font-weight: 600; }
.preview-player .s { font-size: 12px; color: var(--text-2); }
.preview-progress { height: 4px; border-radius: 4px; background: var(--fill-2); margin: 14px 4px 0; overflow: hidden; }
.preview-progress i { display: block; width: 46%; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.preview-actions { display: flex; gap: 8px; margin-top: 14px; }
.contrast-note { font-size: 12px; color: var(--text-2); margin-top: 10px; display: flex; gap: 6px; align-items: center; }
.contrast-note .ic { width: 15px; height: 15px; }

.saved-list { display: grid; gap: 8px; }
.saved-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; background: var(--fill); }
.saved-item .dots { display: flex; }
.saved-item .dots i { width: 18px; height: 18px; border-radius: 50%; margin-right: -5px; box-shadow: 0 0 0 2px var(--glass-solid); }
.saved-item .name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-item .tag { font-size: 11px; font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .04em; }

/* ---------------- signature play button ---------------- */
.play-btn {
  --size: 56px;
  position: relative; flex: none;
  width: var(--size); height: var(--size); border-radius: 50%;
  display: grid; place-items: center;
  color: var(--on-btn);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.42), rgba(255,255,255,0) 52%),
    linear-gradient(165deg, var(--btn-2), var(--btn) 70%);
  box-shadow:
    inset 0 1.5px 1px rgba(255,255,255,.55),
    inset 0 -6px 14px -4px rgba(0,0,0,.22),
    0 0 0 .5px rgba(0,0,0,.08),
    0 12px 28px -10px var(--glow),
    0 5px 12px -6px var(--shadow-strong);
  transition: transform .5s var(--spring), box-shadow .3s var(--ease), filter .2s;
  isolation: isolate;
}
.play-btn::before {
  content: ""; position: absolute; left: 16%; top: 5%; width: 68%; height: 42%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  opacity: .7; pointer-events: none; z-index: -1;
}
.play-btn::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; z-index: -2;
  background: radial-gradient(closest-side, rgba(var(--glow-rgb) / .5), transparent);
  opacity: 0; transform: scale(.8); transition: opacity .4s, transform .5s var(--spring);
}
.play-btn.is-playing::after { opacity: .7; transform: scale(1.05); }
.play-btn:hover { filter: brightness(1.05); }
.play-btn:active, .play-btn.pressing { transform: scale(.88); transition: transform .1s ease-out; box-shadow: inset 0 1.5px 1px rgba(255,255,255,.45), inset 0 -4px 10px -4px rgba(0,0,0,.3), 0 6px 14px -8px var(--glow), 0 2px 6px -4px var(--shadow-strong); }
.pb-icon { position: absolute; display: grid; place-items: center; transition: opacity .25s var(--ease), transform .45s var(--spring); }
.pb-icon .ic { width: calc(var(--size) * .42); height: calc(var(--size) * .42); }
.pb-play { transform: translateX(calc(var(--size) * .03)); }
.pb-pause { opacity: 0; transform: scale(.4) rotate(-45deg); }
.play-btn.is-playing .pb-play { opacity: 0; transform: scale(.4) rotate(45deg); }
.play-btn.is-playing .pb-pause { opacity: 1; transform: none; }
.play-btn.loading .pb-icon { opacity: 0 !important; }
.play-btn .pb-spin { position: absolute; width: 40%; height: 40%; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; opacity: 0; transition: opacity .2s; animation: spin .8s linear infinite; }
.play-btn.loading .pb-spin { opacity: .9; }
@keyframes spin { to { transform: rotate(360deg); } }
.play-btn.lg { --size: 84px; }
.play-btn.sm { --size: 44px; }
.play-btn.xs { --size: 36px; box-shadow: inset 0 1px 1px rgba(255,255,255,.5), 0 6px 14px -6px var(--glow); }

.skip-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--text); transition: transform .45s var(--spring), background-color .2s; }
.skip-btn .ic { width: 28px; height: 28px; }
.skip-btn:hover { background: var(--fill); }
.skip-btn:active { transform: scale(.85); transition-duration: .08s; }
.skip-btn.sm { width: 40px; height: 40px; }
.skip-btn.sm .ic { width: 22px; height: 22px; }

/* ---------------- player bar / mini player ---------------- */
.player-bar {
  position: absolute; z-index: 25;
  left: calc(var(--safe-l) + 10px); right: calc(var(--safe-r) + 10px);
  bottom: calc(var(--safe-b) + var(--tab-h) + 10px);
  height: 66px; border-radius: 22px;
  display: flex; align-items: center; gap: 10px; padding: 0 8px 0 8px;
  animation: bar-in .5s var(--spring) both;
}
@keyframes bar-in { from { transform: translateY(30px) scale(.96); opacity: 0; } }
.pbar-now { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; text-align: left; border-radius: 14px; padding: 4px; margin: -4px; }
.pbar-now .art { width: 48px; height: 48px; border-radius: 10px; }
.pbar-meta { min-width: 0; }
.pbar-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.pbar-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar-center { display: none; }
.pbar-right { display: none; }
.pbar-mini-controls { display: flex; align-items: center; gap: 4px; }
.pbar-line { position: absolute; left: 18px; right: 18px; bottom: 5px; height: 2.5px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.pbar-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }
.time-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.time-row .t0 { min-width: 38px; text-align: right; }
.time-row .t1 { min-width: 38px; }
.vol { display: flex; align-items: center; gap: 4px; }
.vol .range { width: 110px; }
.vol-note { font-size: 12px; color: var(--text-3); }

@media (min-width: 760px) {
  :root { --bar-h: 92px; }
  .top-nav { display: flex; }
  .tabbar { display: none !important; }
  .player-bar { height: 80px; left: calc(var(--safe-l) + 16px); right: calc(var(--safe-r) + 16px); bottom: calc(var(--safe-b) + 14px); padding: 0 14px; gap: 16px; border-radius: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1.3fr) minmax(0, 1fr); }
  .pbar-now .art { width: 56px; height: 56px; border-radius: 12px; }
  .pbar-center { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .pbar-controls { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; }
  .pbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
  .pbar-mini-controls, .pbar-line { display: none; }
  .time-row { margin-top: -2px; }
  .time-row .range { height: 18px; }
}
@media (max-width: 759px) {
  :root { --tab-h: 62px; --bar-h: 76px; }
  .topbar { height: 48px; border-radius: 24px; top: calc(var(--safe-t) + 6px); left: calc(var(--safe-l) + 10px); right: calc(var(--safe-r) + 10px); }
  :root { --top-h: 50px; }
  .view { padding-top: calc(var(--safe-t) + var(--top-h) + 18px); }
}
@media (max-width: 759px) and (max-height: 500px) {
  :root { --tab-h: 52px; }
}
.app:not(.has-track) { --bar-h: 0px; }

/* ---------------- tab bar (phones) ---------------- */
.tabbar {
  position: absolute; z-index: 24;
  left: calc(var(--safe-l) + 10px); right: calc(var(--safe-r) + 10px); bottom: calc(var(--safe-b) + 6px);
  height: calc(var(--tab-h) - 8px); border-radius: 27px;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px;
}
@supports (padding: max(0px)) {
  .tabbar { bottom: max(6px, calc(var(--safe-b) - 6px)); }
  .player-bar { bottom: calc(max(6px, calc(var(--safe-b) - 6px)) + var(--tab-h) + 2px); }
  @media (min-width: 760px) { .player-bar { bottom: calc(var(--safe-b) + 14px); } }
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 22px; font-size: 10.5px; font-weight: 600; color: var(--text-2); transition: color .25s, transform .4s var(--spring); }
.tab .ic { width: 24px; height: 24px; }
.tab.active { color: var(--accent-ink); }
.tab.active::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(var(--accent-rgb) / .13); z-index: -1; animation: tab-pop .45s var(--spring); }
@keyframes tab-pop { from { transform: scale(.7); opacity: 0; } }
.tab:active { transform: scale(.9); }
@media (max-height: 500px) { .tab span { display: none; } }

/* ---------------- now playing (expanded) ---------------- */
.now-playing {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .55s var(--spring), border-radius .4s;
  will-change: transform;
}
.now-playing.open { transform: none; }
.now-playing.closing { transition: transform .38s cubic-bezier(.4, 0, .9, .5); }
.reduce-motion .now-playing { transition: opacity .2s; transform: none; opacity: 0; }
.reduce-motion .now-playing.open { opacity: 1; }
.np-bg { position: absolute; inset: -10%; z-index: 0; pointer-events: none; }
.np-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.5); opacity: .55; transform: scale(1.15); transition: opacity .6s; }
[data-scheme="dark"] .np-bg img { opacity: .45; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 20% 10%, var(--blob-1), transparent 70%), radial-gradient(80% 60% at 90% 90%, var(--blob-2), transparent 70%), linear-gradient(180deg, transparent, var(--bg) 92%); }
.no-blur .np-bg img { display: none; }
.np {
  position: relative; z-index: 1; flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 10px) calc(var(--safe-r) + 24px) calc(var(--safe-b) + 18px) calc(var(--safe-l) + 24px);
  overflow-y: auto;
}
.np-top { width: 100%; max-width: 560px; display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.np-grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--fill-2); position: absolute; left: 50%; top: calc(var(--safe-t) + 8px); margin-left: -20px; }
.np-from { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; text-align: center; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-body { flex: 1; width: 100%; max-width: 560px; display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 3vh, 28px); }
.np-art-wrap { display: grid; place-items: center; touch-action: pan-y; }
.np-art {
  width: min(84vw, 44vh, 440px); border-radius: 24px;
  box-shadow: 0 0 0 .5px var(--hairline), 0 34px 70px -28px var(--shadow-strong), 0 16px 36px -22px var(--glow);
  transition: transform .6s var(--spring), box-shadow .5s;
}
.np:not(.playing) .np-art { transform: scale(.86); box-shadow: 0 0 0 .5px var(--hairline), 0 18px 40px -26px var(--shadow-strong); }
.np-art.swipe-out-l { transform: translateX(-30%) scale(.86) !important; opacity: 0; transition: transform .25s, opacity .25s; }
.np-art.swipe-out-r { transform: translateX(30%) scale(.86) !important; opacity: 0; transition: transform .25s, opacity .25s; }
.np-meta { display: flex; align-items: center; gap: 12px; }
.np-meta > div { flex: 1; min-width: 0; }
.np-title { font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist button { color: inherit; font: inherit; }
.np-artist button:hover { color: var(--accent-ink); }
.np-progress .range { height: 30px; }
.np-progress .times { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: -4px; }
.np-controls { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 7vw, 44px); }
.np-controls .skip-btn { width: 64px; height: 64px; }
.np-controls .skip-btn .ic { width: 34px; height: 34px; }
.np-secondary { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.np-secondary .speed-btn { min-width: 52px; height: 36px; padding: 0 10px; border-radius: 18px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); background: var(--fill); }
.np-secondary .speed-btn.on { color: var(--accent-ink); background: rgba(var(--accent-rgb) / .14); }
.np-volume { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.np-volume .range { flex: 1; }
.np-volume .ic { width: 20px; height: 20px; }
.np-upnext { display: none; }
@media (min-width: 1000px) and (min-height: 620px) {
  .np { flex-direction: row; align-items: stretch; justify-content: center; gap: 56px; padding-top: calc(var(--safe-t) + 70px); }
  .np-top { position: absolute; top: calc(var(--safe-t) + 14px); left: 24px; right: 24px; max-width: none; width: auto; }
  .np-grabber { display: none; }
  .np-body { max-width: 480px; }
  .np-art { width: min(40vw, 52vh, 480px); }
  .np-upnext { display: flex; flex-direction: column; width: 360px; max-height: min(640px, 100%); align-self: center; padding: 14px; border-radius: 26px; }
  .np-upnext .list { overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
  .np-upnext h3 { font-size: 17px; margin: 4px 6px 10px; display: flex; align-items: center; }
  .np-upnext h3 span { flex: 1; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .np { flex-direction: row; align-items: center; gap: 28px; padding-top: calc(var(--safe-t) + 8px); }
  .np-top { position: absolute; top: calc(var(--safe-t) + 4px); left: 16px; right: 16px; width: auto; max-width: none; }
  .np-grabber { display: none; }
  .np-art { width: min(40vw, 70vh); }
  .np-body { flex-direction: row; max-width: none; align-items: center; gap: 28px; }
  .np-body > .np-art-wrap { flex: none; }
  .np-body > .np-panel { flex: 1; display: flex; flex-direction: column; gap: 10px; }
}
.np-panel { display: flex; flex-direction: column; gap: clamp(14px, 3vh, 26px); }

/* ---------------- layer: sheets, menus, dialogs ---------------- */
.layer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,.28); opacity: 0; transition: opacity .3s; pointer-events: auto; }
[data-scheme="dark"] .scrim { background: rgba(0,0,0,.5); }
.scrim.show { opacity: 1; }
.sheet {
  position: absolute; left: 50%; top: 50%; width: min(440px, calc(100vw - 32px)); max-height: min(86vh, 720px);
  display: flex; flex-direction: column;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(calc(var(--blur) + 16px)) saturate(1.8);
  backdrop-filter: blur(calc(var(--blur) + 16px)) saturate(1.8);
  border: 1px solid var(--glass-border); border-radius: 28px;
  box-shadow: inset 0 1px 0 var(--highlight), 0 40px 80px -30px var(--shadow-strong);
  transform: translate(-50%, -46%) scale(.94); opacity: 0;
  transition: transform .5s var(--spring), opacity .25s;
  pointer-events: auto; overflow: hidden;
}
.sheet.wide { width: min(620px, calc(100vw - 32px)); }
.sheet.show { transform: translate(-50%, -50%); opacity: 1; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 8px 22px; }
.sheet-head h2 { font-size: 19px; flex: 1; min-width: 0; }
.sheet-body { padding: 6px 22px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-body > p { color: var(--text-2); }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 18px 18px; flex-wrap: wrap; }
.sheet-foot .btn { min-width: 96px; }
@media (max-width: 759px) {
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: calc(100% - var(--safe-t) - 40px); border-radius: 28px 28px 0 0; transform: translateY(100%); opacity: 1; padding-bottom: var(--safe-b); }
  .sheet.show { transform: none; }
  .sheet::before { content: ""; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--fill-2); }
  .sheet-head { padding-top: 22px; }
  .sheet-foot .btn { flex: 1; }
}
.menu {
  position: absolute; min-width: 230px; max-width: min(300px, calc(100vw - 24px)); padding: 6px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(calc(var(--blur) + 16px)) saturate(1.8);
  backdrop-filter: blur(calc(var(--blur) + 16px)) saturate(1.8);
  border: 1px solid var(--glass-border); border-radius: 18px;
  box-shadow: inset 0 1px 0 var(--highlight), 0 24px 50px -18px var(--shadow-strong), 0 0 0 .5px var(--hairline);
  transform: scale(.9); opacity: 0; transform-origin: var(--ox, top right);
  transition: transform .4s var(--spring), opacity .18s;
  pointer-events: auto; max-height: 70vh; overflow-y: auto;
}
.menu.show { transform: none; opacity: 1; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px; }
.menu-head .art { width: 40px; height: 40px; border-radius: 8px; }
.menu-head .t { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-head .s { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-head > div { min-width: 0; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 12px; border-radius: 11px; text-align: left; font-size: 15px; transition: background-color .12s; }
.menu-item .ic { width: 20px; height: 20px; color: var(--text-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--fill); outline: none; }
.menu-item.danger, .menu-item.danger .ic { color: var(--danger); }
.menu-sep { height: 1px; background: var(--hairline); margin: 4px 8px; }
@media (max-width: 759px) {
  .menu { left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(var(--safe-b) + 8px) !important; max-width: none; border-radius: 24px; padding: 8px; transform: translateY(110%); transition: transform .45s var(--spring), opacity .2s; }
  .menu.show { transform: none; }
  .menu-item { min-height: 50px; font-size: 16px; }
}
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; margin: 0 -8px; }
.pick-list .row { cursor: pointer; }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: calc(var(--safe-b) + var(--tab-h) + var(--bar-h) + 16px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(460px, 100%); padding: 10px 12px 10px 16px; border-radius: 18px;
  font-size: 14px; font-weight: 500; pointer-events: auto;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--highlight), 0 18px 40px -16px var(--shadow-strong);
  animation: toast-in .5s var(--spring) both;
}
.toast.out { animation: toast-out .25s var(--ease) both; }
.toast .ic { width: 20px; height: 20px; color: var(--accent-ink); }
.toast.error .ic { color: var(--danger); }
.toast .msg { flex: 1; }
.toast .btn { min-height: 32px; padding: 0 12px; font-size: 13px; }
.toast .bar { position: absolute; }
@keyframes toast-in { from { transform: translateY(20px) scale(.9); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(10px) scale(.96); opacity: 0; } }
.progress-toast { min-width: 260px; flex-direction: column; align-items: stretch; }
.progress-toast .track { height: 4px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.progress-toast .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }
.progress-toast .file { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- drop overlay ---------------- */
.drop-overlay { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(var(--accent-rgb) / .12); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drop-overlay.show { opacity: 1; }
.drop-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 44px; border-radius: 30px; border: 2px dashed rgba(var(--accent-rgb) / .6) !important; transform: scale(.94); transition: transform .4s var(--spring); }
.drop-overlay.show .drop-card { transform: none; }
.drop-card strong { font-size: 20px; }
.drop-card span { color: var(--text-2); font-size: 14px; }
.drop-icon .ic { width: 44px; height: 44px; color: var(--accent-ink); }

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

/* ---------------- misc ---------------- */
.muted { color: var(--text-2); }
.spacer { flex: 1; }
.flex { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 14px; }
.hint { font-size: 13px; color: var(--text-3); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fill-2); border-top-color: var(--accent-ink); animation: spin .8s linear infinite; }

/* ---------------- small additions ---------------- */
@media (min-width: 900px) { .with-album .hide-wide { display: none; } }
.link { color: var(--accent-ink); font-weight: 600; }
.link:hover { text-decoration: underline; }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .art.ph { background: radial-gradient(circle at var(--px, 30%) var(--py, 25%), var(--accent-2), transparent 58%), linear-gradient(var(--pa, 135deg), var(--accent), var(--accent-3)); }
}
.music-layout, .settings-layout, .queue-layout, .studio { grid-template-columns: minmax(0, 1fr); }
.music-layout > *, .settings-layout > *, .queue-layout > *, .studio > *, .music-main, .settings-main { min-width: 0; }
@media (min-width: 1000px) {
  .music-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .settings-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .queue-layout { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); }
}
@media (min-width: 1200px) { .studio { grid-template-columns: minmax(0, 1fr) 320px; } }
.pbar-mini-controls .play-btn { --size: 44px; }
.pbar-mini-controls .skip-btn { width: 44px; height: 44px; }
@media (max-width: 520px) {
  .page-actions { margin-left: 0; width: 100%; }
  .page-actions .btn { flex: 1 1 auto; padding: 0 14px; }
  .set-row .segmented { flex-wrap: wrap; }
  .set-row:has(.segmented) { flex-wrap: wrap; }
}
