:root {
  color-scheme: dark;
  --bg: #030303;
  --ink: #f8f7f3;
  --muted: rgba(248, 247, 243, 0.62);
  --dim: rgba(248, 247, 243, 0.38);
  --gold: #a99263;
  --gold-2: #d6c08a;
  --line: rgba(255, 255, 255, 0.13);
  --glass: rgba(23, 21, 18, 0.68);
  --glass-2: rgba(255, 255, 255, 0.08);
  --white: #ffffff;
  --black: #000000;
  --shadow-white: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 0 28px rgba(255, 255, 255, 0.32);
  --shadow-dark: 0 28px 80px rgba(0, 0, 0, 0.62);
  --radius: 8px;
  --soft-radius: 34px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 70% 4%, rgba(255, 255, 255, 0.1), transparent 26%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 22%, transparent 74%, rgba(255, 255, 255, 0.04)),
    var(--bg);
}

button,
input {
  font: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 45% at calc(25% + var(--app-flow-a, 0) * 9%) calc(38% + var(--app-flow-b, 0) * 8%), rgba(255, 216, 119, calc(.19 + var(--app-beat, 0) * .25)), transparent 78%),
    radial-gradient(ellipse 54% 50% at calc(78% - var(--app-flow-c, 0) * 10%) calc(25% + var(--app-flow-a, 0) * 9%), rgba(34, 192, 229, calc(.14 + var(--app-treble, 0) * .2)), transparent 76%),
    radial-gradient(ellipse 56% 48% at calc(64% + var(--app-flow-b, 0) * 8%) calc(77% - var(--app-flow-c, 0) * 10%), rgba(236, 84, 159, calc(.12 + var(--app-bass, 0) * .2)), transparent 78%);
  filter: blur(26px);
  transform: translateZ(0);
}

button {
  color: inherit;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 180px minmax(620px, 1fr) minmax(170px, 210px);
  gap: 10px;
  min-height: 100vh;
  padding: 0 8px 12px;
  transition: grid-template-columns 0.22s ease;
}

.stats-rail {
  position: sticky;
  top: 0;
  display: grid;
  grid-auto-rows: max-content;
  justify-items: center;
  align-content: start;
  align-self: start;
  gap: 12px;
  height: 100vh;
  min-height: 0;
  padding: 0 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.26);
}

.brand-tile {
  width: 116px;
  height: 94px;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  padding: 4px;
  background: rgba(0, 0, 0, 0.08);
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.74));
}

.heart-copy {
  margin: -4px 0 0;
  color: #ffffff;
  font-family: "Brush Script MT", "Snell Roundhand", "Apple Chancery", cursive;
  font-size: 21px;
  font-weight: 700;
  line-height: 0.94;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.84), 0 0 18px rgba(255, 255, 255, 0.28);
}

.mood-rail {
  --heart-y: 62%;
  --pulse: 0.08;
  --heart-light: 0;
  --bass: 0;
  --beat: 0;
  --treble: 0;
  --flow-a: 0;
  --flow-b: 0;
  --flow-c: 0;
  position: relative;
  display: grid;
  grid-template-rows: repeat(12, minmax(22px, 1fr));
  align-items: center;
  justify-items: center;
  width: 136px;
  height: min(680px, calc(100vh - 156px));
  min-height: 470px;
  margin-top: 4px;
  overflow: hidden;
  padding: 18px 10px 20px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at calc(48% + var(--flow-a) * 18%) calc(54% + var(--beat) * 8% - var(--flow-b) * 10%), rgba(255, 223, 126, calc(0.035 + var(--beat) * 0.34)), transparent 42%),
    radial-gradient(circle at calc(30% + var(--flow-b) * 22%) calc(24% + var(--treble) * 14% + var(--flow-c) * 12%), rgba(26, 218, 255, calc(0.025 + var(--treble) * 0.34)), transparent 34%),
    radial-gradient(circle at calc(70% - var(--flow-c) * 20%) calc(42% + var(--bass) * 14% - var(--flow-a) * 12%), rgba(255, 62, 176, calc(0.02 + var(--treble) * 0.26)), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, calc(0.04 + var(--beat) * 0.08)), rgba(0, 0, 0, 0.2) 45%, rgba(255, 255, 255, 0.04)),
    rgba(2, 2, 2, 0.92);
  box-shadow:
    inset 0 18px 38px rgba(255, 255, 255, calc(0.11 + var(--beat) * 0.16)),
    inset 0 -22px 42px rgba(0, 0, 0, 0.9),
    0 0 calc(18px + var(--beat) * 26px) rgba(255, 230, 150, calc(0.06 + var(--beat) * 0.14)),
    0 24px 70px rgba(0, 0, 0, 0.72);
}

/* Keep the glass heart control while its moving light continues across the app. */
.mood-rail {
  width: 108px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .2);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}
.mood-rail::before,
.mood-rail::after { opacity: .26; }

.mood-rail::before,
.mood-rail::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.mood-rail::before {
  inset: 0;
  background:
    radial-gradient(ellipse at calc(50% - var(--flow-b) * 18%) calc(65% - var(--bass) * 12% + var(--flow-a) * 10%), rgba(255, 218, 112, calc(0.045 + var(--bass) * 0.34)), transparent 44%),
    radial-gradient(circle at calc(28% + var(--flow-c) * 24%) calc(24% + var(--flow-b) * 16%), rgba(0, 224, 255, calc(0.04 + var(--treble) * 0.24)), transparent 30%),
    radial-gradient(circle at calc(72% - var(--flow-a) * 24%) calc(38% - var(--flow-c) * 16%), rgba(255, 55, 184, calc(0.035 + var(--treble) * 0.22)), transparent 32%);
  mix-blend-mode: screen;
  opacity: calc(0.52 + var(--heart-light) * 0.2 + var(--beat) * 0.26);
}

.mood-rail.has-album-aura::before {
  inset: -12px;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.36) 54%, rgba(0, 0, 0, 0.5)),
    var(--mood-cover-url),
    radial-gradient(ellipse at calc(50% - var(--flow-b) * 12%) calc(65% - var(--bass) * 8% + var(--flow-a) * 6%), rgba(255, 228, 147, calc(0.08 + var(--bass) * 0.2)), transparent 48%),
    radial-gradient(circle at calc(28% + var(--flow-c) * 14%) calc(24% + var(--flow-b) * 10%), rgba(0, 224, 255, calc(0.04 + var(--treble) * 0.14)), transparent 32%),
    radial-gradient(circle at calc(72% - var(--flow-a) * 14%) calc(38% - var(--flow-c) * 10%), rgba(255, 55, 184, calc(0.04 + var(--treble) * 0.14)), transparent 36%);
  background-position:
    center,
    calc(50% + var(--flow-a) * 3%) calc(50% + var(--flow-b) * 4%),
    center,
    center,
    center;
  background-size:
    auto,
    172% 172%,
    auto,
    auto,
    auto;
  background-blend-mode: normal, soft-light, screen, screen, screen;
  filter: blur(calc(10px - var(--beat) * 1.8px)) saturate(calc(1.18 + var(--beat) * 0.32)) brightness(calc(0.62 + var(--beat) * 0.22)) contrast(0.78);
  mix-blend-mode: screen;
  opacity: calc(0.42 + var(--heart-light) * 0.1 + var(--beat) * 0.12);
  transform: scale(calc(1.08 + var(--beat) * 0.018));
}

.mood-album-ghost {
  position: absolute;
  z-index: 1;
  inset: 10px;
  border-radius: 999px;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at calc(48% + var(--flow-a) * 6%) calc(52% + var(--flow-b) * 6%), rgba(255, 225, 158, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.34) 52%, rgba(0, 0, 0, 0.48)),
    var(--mood-cover-url);
  background-position:
    center,
    center,
    calc(50% + var(--flow-a) * 2.2%) calc(50% + var(--flow-b) * 2.8%);
  background-size:
    auto,
    auto,
    190% 190%;
  background-blend-mode: screen, normal, soft-light;
  filter: blur(calc(7.5px - var(--beat) * 1.2px)) saturate(calc(1.14 + var(--beat) * 0.28)) brightness(calc(0.58 + var(--beat) * 0.18)) contrast(0.72);
  opacity: 0;
  transform: scale(calc(1.08 + var(--beat) * 0.012));
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.mood-rail.has-album-aura .mood-album-ghost {
  opacity: calc(0.18 + var(--heart-light) * 0.05 + var(--beat) * 0.08);
}

.mood-rail.has-album-aura::after {
  opacity: calc(0.2 + var(--heart-light) * 0.1 + var(--beat) * 0.13);
}

.mood-rail.has-album-aura #moodWaveCanvas {
  opacity: calc(0.88 + var(--beat) * 0.12);
  mix-blend-mode: screen;
}

.mood-rail::after {
  left: 14px;
  right: 14px;
  top: 40px;
  bottom: 44px;
  border-radius: 999px;
  background:
    radial-gradient(circle at calc(32% + var(--flow-a) * 26%) calc(22% + var(--flow-c) * 18%), rgba(35, 224, 255, calc(0.08 + var(--treble) * 0.32)), transparent 26%),
    radial-gradient(circle at calc(70% - var(--flow-b) * 28%) calc(44% - var(--flow-a) * 18%), rgba(255, 59, 188, calc(0.065 + var(--treble) * 0.32)), transparent 28%),
    radial-gradient(circle at calc(48% + var(--flow-c) * 18%) calc(78% - var(--flow-b) * 18%), rgba(255, 226, 74, calc(0.085 + var(--bass) * 0.34)), transparent 30%);
  filter: blur(calc(15px - var(--heart-light) * 3px - var(--beat) * 3px)) saturate(calc(1.08 + var(--beat) * 0.7));
  opacity: calc(0.78 + var(--heart-light) * 0.18 + var(--beat) * 0.18);
}

#moodWaveCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0.94;
}

.mood-choice {
  position: relative;
  z-index: 4;
  width: 100%;
  border: 0;
  color: rgba(214, 192, 138, 0.92);
  background: transparent;
  font-size: 10.8px;
  font-weight: 900;
  line-height: 1.04;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.74), 0 0 12px rgba(214, 192, 138, 0.22);
  cursor: pointer;
  transition: color 0.36s ease, opacity 0.36s ease, transform 0.36s ease, text-shadow 0.36s ease;
}

.mood-choice::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(246, 222, 162, 0.78), transparent);
  box-shadow: 0 0 10px rgba(246, 222, 162, 0.22);
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(0.24);
  transition: opacity 0.34s ease, transform 0.34s ease;
  pointer-events: none;
}

.mood-choice:focus {
  outline: 0;
}

.mood-choice:focus-visible {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(0, 0, 0, 0.86);
}

.mood-choice.is-question {
  align-self: center;
  margin-bottom: 0;
  color: #ffffff;
  font-size: 10.2px;
  letter-spacing: 0;
}

.mood-choice.is-active {
  z-index: 6;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.96), 0 0 9px rgba(255, 218, 128, 0.58), 0 2px 6px rgba(0, 0, 0, 0.86);
}

.mood-rail.is-track-active .mood-choice:not(.is-active):not(:hover):not(:focus-visible) {
  color: transparent;
  opacity: 0.42;
  text-shadow: none;
  transform: scale(0.88);
}

.mood-rail.is-track-active .mood-choice:not(.is-active):not(:hover):not(:focus-visible)::after {
  opacity: 1;
  transform: translate(-50%, -50%) scaleX(1);
}

.mood-rail.is-track-active .mood-choice.is-active {
  transform: scale(1.04);
}

.mood-heart {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: var(--heart-y);
  width: 58px;
  height: 52px;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%) scale(calc(1 + var(--pulse)));
  transform-origin: center;
  cursor: grab;
  touch-action: none;
  filter:
    drop-shadow(0 9px 14px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 calc(7px + var(--heart-light) * 3px + var(--beat) * 4px) rgba(236, 209, 150, calc(0.16 + var(--heart-light) * 0.05 + var(--beat) * 0.08)));
  transition: top 0.45s cubic-bezier(0.2, 0.85, 0.2, 1), transform 0.08s linear;
}

.mood-rail.is-dragging .mood-heart {
  cursor: grabbing;
  transition: top 0.1s ease-out, transform 0.08s linear;
}

.mood-rail.is-playing,
.mood-rail.is-starting {
  --heart-light: 1;
}

.mood-heart:focus {
  outline: 0;
}

.mood-heart:focus-visible {
  filter:
    drop-shadow(0 10px 16px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 24px rgba(255, 226, 134, 0.72));
}

.mood-heart::before {
  content: "\2665";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: transparent;
  background:
    radial-gradient(circle at 35% 24%, #fffdf0 0 8%, transparent 10%),
    radial-gradient(circle at 58% 34%, rgba(255, 246, 214, calc(0.14 + var(--heart-light) * 0.08)) 0 8%, transparent 22%),
    linear-gradient(145deg, #fff6d8 0%, #ead69e 24%, #c7a260 49%, #9a6b2f 70%, #f4e2af 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 66px;
  line-height: 0.78;
  text-shadow:
    0 1px 0 rgba(255, 252, 236, 0.78),
    0 3px 0 rgba(118, 79, 31, 0.26),
    0 9px 18px rgba(54, 31, 8, 0.68),
    0 0 calc(var(--heart-light) * 3px) rgba(255, 246, 214, 0.18);
}

.mood-heart::after {
  content: "";
  position: absolute;
  inset: 11px 8px 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 39% 22%, rgba(255, 255, 246, calc(0.28 + var(--heart-light) * 0.06)), transparent 21%),
    radial-gradient(circle at 55% 58%, rgba(232, 203, 139, calc(0.14 + var(--heart-light) * 0.06)), transparent 55%),
    radial-gradient(circle at 50% 78%, rgba(122, 79, 25, 0.24), transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: scale(calc(1 + var(--heart-light) * 0.03));
}

.rail-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 132px;
  min-height: 540px;
  gap: 30px;
  padding: 52px 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f6f6f3);
  box-shadow:
    inset 0 12px 18px rgba(255, 255, 255, 0.96),
    inset 0 -18px 30px rgba(0, 0, 0, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.42);
}

.rail-card::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 50%;
  width: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 235, 230, 0.72));
  transform: translateX(-50%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.08);
}

.stat-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  width: 112px;
  min-height: 42px;
  gap: 6px;
  margin-left: 0;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  color: var(--gold);
  background: #ffffff;
  box-shadow:
    inset 0 4px 8px rgba(255, 255, 255, 0.98),
    inset 0 -8px 12px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: 0;
}

.stat-pill.is-hours,
.stat-pill.is-recent {
  margin-left: 0;
}

.stat-pill.is-songs {
  transform: none;
}

.stat-pill.is-hours {
  transform: none;
}

.stat-pill.is-liked {
  transform: none;
}

.stat-pill.is-recent {
  transform: none;
}

.stat-pill small {
  font-size: 15px;
}

.stat-pill b {
  font-weight: 500;
}

.stat-button {
  cursor: pointer;
  text-align: center;
}

.stat-button.is-active {
  color: #2b2112;
  box-shadow: var(--shadow-white);
}

.library-stage {
  position: relative;
  min-width: 0;
  padding: 0 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 36px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.06)),
    rgba(0, 0, 0, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 22px 44px rgba(255, 255, 255, 0.05),
    0 0 34px rgba(255, 255, 255, 0.28),
    var(--shadow-dark);
}

.library-stage::before,
.library-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 8%;
  right: 8%;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  filter: blur(14px);
}

.library-stage::before {
  top: -9px;
}

.library-stage::after {
  bottom: -9px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-bottom: 10px;
}

.wordmark {
  width: 100%;
  min-width: 0;
  height: 104px;
  object-fit: contain;
  object-position: center;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: #000000;
  box-shadow:
    inset 0 8px 18px rgba(255, 255, 255, 0.08),
    inset 0 -12px 18px rgba(0, 0, 0, 0.58),
    0 0 22px rgba(255, 255, 255, 0.18);
}

.desktop-command-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(300px, 1fr);
  gap: 14px;
  align-items: stretch;
  margin: 0 0 12px;
}

.library-tools {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-width: 0;
  padding: 8px 0 0;
}

.library-action-row {
  display: grid;
  grid-template-columns: repeat(3, 48px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.search-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 54px;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
  box-shadow:
    inset 0 8px 18px rgba(255, 255, 255, 0.16),
    inset 0 -12px 18px rgba(0, 0, 0, 0.62),
    0 7px 16px rgba(0, 0, 0, 0.36);
}

.search-inline {
  justify-self: stretch;
  width: 100%;
}

.search-wrap svg {
  color: rgba(255, 255, 255, 0.58);
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  font-weight: 650;
}

.search-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.glass-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius);
  color: #000000;
  background:
    radial-gradient(circle at 32% 22%, #ffffff 0 27%, #eeeeee 43%, #8f8f8f 72%, #111111 100%);
  box-shadow:
    inset 5px 7px 12px rgba(255, 255, 255, 0.72),
    inset -9px -10px 16px rgba(0, 0, 0, 0.58),
    0 10px 22px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.glass-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.25;
}

.library-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.library-head h1 {
  margin: 0;
  font-size: clamp(38px, 4.1vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.library-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.stat-cluster {
  display: grid;
  grid-template-columns: repeat(2, minmax(68px, 1fr));
  justify-content: end;
  justify-self: stretch;
  gap: 6px;
  align-self: center;
}

.view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
}

.view-tab {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.view-tab.is-active {
  color: var(--gold-2);
  border-color: rgba(214, 192, 138, 0.42);
  background: rgba(214, 192, 138, 0.1);
}

.track-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 292px);
  min-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.track-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto minmax(178px, auto) 42px;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 14px 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(32, 28, 22, 0.78);
  box-shadow: inset 0 8px 14px rgba(255, 255, 255, 0.035), inset 0 -10px 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: auto 60px;
}

.track-row:hover,
.track-row.is-playing {
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow-white);
}

.track-row.is-unavailable {
  opacity: 0.62;
}

.track-row.is-unavailable:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 8px 14px rgba(255, 255, 255, 0.03), inset 0 -10px 18px rgba(0, 0, 0, 0.45);
}

.track-art {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--gold-2);
  background: rgba(214, 192, 138, 0.12);
}

.track-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.track-art-import { border: 1px solid rgba(255,255,255,.28); padding: 0; cursor: pointer; }
.track-art-import:hover, .track-art-import:focus-visible { border-color: rgba(255,255,255,.75); box-shadow: 0 0 0 2px rgba(255,255,255,.14); }

.playback-atmosphere { position: fixed; inset: 0; z-index: 20; overflow: hidden; opacity: 0; visibility: hidden; pointer-events: none; cursor: pointer; background: rgba(7,10,20,.45); backdrop-filter: blur(13px) saturate(1.45); -webkit-backdrop-filter: blur(13px) saturate(1.45); transition: opacity .7s, visibility .7s; --atmosphere-color: #bd75a9; }
.playback-atmosphere.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.atmosphere-glow { position: absolute; inset: -25%; background: radial-gradient(ellipse at 26% 28%, var(--atmosphere-color), transparent 30%), radial-gradient(ellipse at 74% 66%, var(--atmosphere-color), transparent 33%); opacity: .35; filter: blur(62px); animation: atmosphereDrift 9s ease-in-out infinite alternate; }
.atmosphere-wave { position: absolute; left: -15%; right: -15%; top: 40%; height: 32%; border: 2px solid color-mix(in srgb, var(--atmosphere-color), white 36%); border-radius: 50%; box-shadow: 0 0 35px var(--atmosphere-color), inset 0 0 45px var(--atmosphere-color); opacity: .48; transform: rotate(-14deg); animation: atmospherePulse 4s ease-in-out infinite; }
.atmosphere-wave::after { content: ""; position: absolute; inset: 22% -5%; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; filter: blur(2px); }
.atmosphere-grain { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 2px); background-size: 41px 59px; opacity: .24; mask-image: linear-gradient(120deg, transparent, black 30%, black 75%, transparent); animation: atmosphereParticles 12s linear infinite; }
.atmosphere-hint { position: absolute; left: 50%; bottom: 23%; transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: 10px; font-weight: 700; letter-spacing: .24em; white-space: nowrap; text-shadow: 0 1px 12px #000; }
@keyframes atmosphereDrift { to { transform: translate(9%, -8%) scale(1.1); } }
@keyframes atmospherePulse { 50% { transform: rotate(-9deg) scale(1.18); opacity: .68; } }
@keyframes atmosphereParticles { to { transform: translateY(-118px); } }
@media (prefers-reduced-motion: reduce) { .atmosphere-glow, .atmosphere-wave, .atmosphere-grain { animation: none; } }
.playback-atmosphere { background: rgba(4, 5, 8, .66); display: grid; place-items: center; }
.atmosphere-glow { inset: -35%; opacity: .43; background: radial-gradient(ellipse at 24% 50%, rgba(255,214,136,.7), transparent 24%), radial-gradient(ellipse at 70% 33%, color-mix(in srgb, var(--atmosphere-color), transparent 35%), transparent 28%), radial-gradient(ellipse at 62% 76%, rgba(255,236,181,.3), transparent 25%); filter: blur(85px); animation: atmosphereDrift 16s ease-in-out infinite alternate; }
.atmosphere-wave { inset: 10% -20%; height: auto; border: 0; border-radius: 45%; opacity: .2; background: radial-gradient(ellipse at 50% 50%, rgba(255,229,167,.42), transparent 56%); filter: blur(70px); animation: atmosphereDrift 21s ease-in-out infinite alternate-reverse; }
.atmosphere-wave::after { border: 0; }
.atmosphere-grain { display: none; }
.heart-journal { position: relative; z-index: 1; width: min(88vw, 400px); max-height: 76vh; overflow-y: auto; padding: 23px; border: 1px solid rgba(255,239,202,.24); border-radius: 30px; background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.035)); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); box-shadow: inset 0 1px 0 rgba(255,255,255,.36), 0 24px 70px rgba(0,0,0,.35); color: #fffaf2; cursor: default; }
.heart-journal__prompt { margin: 0 0 18px; font-family: "Chalkduster", "Chalkboard SE", "Chalkboard", cursive; font-style: normal; font-size: clamp(24px, 6.5vw, 33px); line-height: 1.25; text-shadow: 0 3px 18px rgba(0,0,0,.4); }
.heart-journal__sub { margin: 6px 0 18px; font-size: 12px; color: rgba(255,249,235,.72); }
.heart-journal__tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.heart-journal button { cursor: pointer; color: #fff9ec; }
.heart-journal__tabs button, .heart-journal__actions button, .heart-journal__explore { border: 1px solid rgba(255,236,196,.3); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.06); font-size: 10px; letter-spacing: .1em; }
.heart-journal__tabs button.is-selected { background: rgba(255,235,183,.18); border-color: rgba(255,235,183,.75); }
.heart-journal__tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 8px 4px; font-size: 9px; letter-spacing: .04em; white-space: nowrap; }
.heart-journal__tabs .heart-journal__mic { margin-left: 0; }
.journal-tab-icon { font-size: 16px; line-height: 1; font-weight: 700; }
.heart-journal__mic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.heart-journal__mic.is-listening { border-color: rgba(255,220,153,.92); background: rgba(255,205,123,.24); box-shadow: 0 0 18px rgba(255,210,136,.3); }
.heart-journal__mic-status { margin: -2px 0 10px; color: #ffe4ad; font-size: 11px; }
.heart-journal__voice { padding: 12px; border: 1px solid rgba(255,245,224,.27); border-radius: 17px; background: rgba(12,12,16,.27); }
.heart-journal__voice[hidden] { display: none; }
.heart-journal__voice audio { width: 100%; height: 38px; margin-top: 10px; }
.heart-journal__voice audio[hidden] { display: none; }
.heart-journal__voice p { margin: 9px 0 0; color: rgba(255,249,235,.72); font-size: 11px; }
#journalRecordButton { border: 1px solid rgba(255,220,153,.7); border-radius: 999px; padding: 9px 13px; background: rgba(255,205,123,.13); font-size: 11px; letter-spacing: .08em; }
#journalRecordButton.is-recording { background: rgba(255,95,95,.24); border-color: rgba(255,130,130,.9); box-shadow: 0 0 18px rgba(255,95,95,.24); }
.heart-journal__entry audio { display: block; width: 100%; height: 36px; margin-top: 5px; }
#journalText, #journalCanvas { box-sizing: border-box; width: 100%; min-height: 190px; border: 1px solid rgba(255,245,224,.27); border-radius: 17px; background: rgba(12,12,16,.27); color: white; padding: 12px; font-family: inherit; font-size: 14px; line-height: 1.4; outline: none; }
#journalText:focus { border-color: rgba(255,228,170,.85); }
#journalCanvas { height: 190px; padding: 0; touch-action: none; }
.heart-journal__actions { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; }
.heart-journal__actions button { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; font-size: 26px; line-height: 1; }
.heart-journal__actions button[hidden] { display: none; }
.heart-journal__history { margin-top: 16px; max-height: 106px; overflow-y: auto; font-size: 11px; color: rgba(255,250,240,.76); }
.heart-journal__history > span { display: block; font-size: 9px; letter-spacing: .14em; margin-bottom: 6px; }
.heart-journal__entry { padding: 7px 0; border-top: 1px solid rgba(255,255,255,.12); }
.heart-journal__entry img { display: block; max-width: 100%; height: 45px; object-fit: contain; }
.heart-journal__explore { margin: 0; }

.track-main {
  min-width: 0;
}

.track-main strong,
.queue-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-main span,
.queue-item span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-meta {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.cloud-pending {
  color: rgba(232, 211, 159, 0.82);
  font-size: 0.72rem;
  white-space: nowrap;
}

.track-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 7px;
  min-width: 0;
}

.queue-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(214, 192, 138, 0.24);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.74);
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035));
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255,255,255,.2);
}

.queue-action svg { width: 15px; height: 15px; flex: none; fill: currentColor; }

.queue-action:hover {
  color: var(--black);
  border-color: rgba(255, 255, 255, 0.7);
  background: var(--gold-2);
}

.queue-action:disabled,
.queue-action:disabled:hover {
  color: rgba(255, 255, 255, 0.46);
  border-color: rgba(214, 192, 138, 0.16);
  background: rgba(214, 192, 138, 0.04);
  cursor: not-allowed;
}

.like-control {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
}

.like-control.is-active,
#likeButton.is-active {
  color: var(--white);
}

.like-control.is-active svg,
#likeButton.is-active svg {
  fill: currentColor;
}

.now-stage {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-self: start;
  height: 100vh;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.now-stage > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.art-panel {
  position: relative;
  min-height: 112px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.66);
}

.cover-image {
  position: relative;
  display: grid;
  align-items: end;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: min(100%, 106px);
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 1;
  padding: 18px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(214, 192, 138, 0.16), rgba(0, 0, 0, 0.74)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 20px),
    #111;
}

.cover-effect {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.62;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.2), transparent 18%),
    linear-gradient(135deg, transparent 12%, rgba(214, 192, 138, 0.16), transparent 48%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 18px);
}

.art-panel[data-tone="mono"] .cover-effect {
  opacity: 0.78;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.24), transparent 20%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 9px);
}

.art-panel[data-tone="art"] .cover-effect {
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 67, 170, 0.24), transparent 24%),
    radial-gradient(circle at 28% 70%, rgba(35, 204, 255, 0.24), transparent 26%),
    linear-gradient(135deg, rgba(255, 211, 70, 0.14), transparent 48%);
}

.art-panel[data-draw-style="champagne"] .cover-effect {
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 249, 225, 0.34), transparent 18%),
    linear-gradient(145deg, rgba(255, 246, 216, 0.18), rgba(154, 107, 47, 0.1) 54%, transparent 72%);
}

.art-panel[data-draw-style="ink"] .cover-effect {
  mix-blend-mode: multiply;
  opacity: 0.34;
  background:
    radial-gradient(ellipse at 40% 32%, rgba(0, 0, 0, 0.42), transparent 30%),
    radial-gradient(ellipse at 68% 70%, rgba(255, 255, 255, 0.2), transparent 36%);
}

.art-panel[data-draw-style="pencil"] .cover-effect {
  opacity: 0.46;
  background:
    repeating-linear-gradient(110deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 6px),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.12), transparent 44%);
}

.art-panel[data-draw-style="poster"] .cover-effect {
  opacity: 0.58;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 18%, transparent 18% 62%, rgba(214, 192, 138, 0.12) 62% 100%);
}

.art-panel[data-draw-style="glass"] .cover-effect {
  opacity: 0.76;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.32) 20%, transparent 28%),
    radial-gradient(circle at 66% 30%, rgba(35, 204, 255, 0.22), transparent 28%),
    radial-gradient(circle at 32% 76%, rgba(255, 67, 170, 0.16), transparent 30%);
}

.art-panel.is-generating .cover-effect {
  animation: coverEffectSweep 1.15s ease-in-out infinite alternate;
  opacity: 0.95;
}

@keyframes coverEffectSweep {
  from {
    filter: saturate(0.9) brightness(0.85);
    transform: translateX(-4%) scale(1.02);
  }
  to {
    filter: saturate(1.2) brightness(1.18);
    transform: translateX(4%) scale(1.04);
  }
}

.art-panel.has-cover .cover-image {
  background-image: var(--cover-url);
  background-position: center;
  background-size: cover;
}

.art-panel.has-cover .cover-image span {
  display: none;
}

.cover-image span {
  display: block;
  border-radius: 999px;
  background: #f3f1ea;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.cover-image span:nth-child(1) { height: 40%; }
.cover-image span:nth-child(2) { height: 78%; }
.cover-image span:nth-child(3) { height: 56%; }
.cover-image span:nth-child(4) { height: 34%; }

.now-meta p,
.now-meta h2 {
  margin: 0;
}

.now-meta p {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.now-meta h2 {
  overflow: hidden;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cover-lab,
.queue-list-wrap,
.status-panel,
.install-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 8px 16px rgba(255, 255, 255, 0.04);
}

.cover-lab {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.section-title h2 {
  margin: 0;
  font-size: 12px;
}

.section-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tone-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.draw-style-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.draw-style-field select {
  min-width: 0;
  height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.tone-button,
.generate-button,
.text-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.tone-button {
  height: 24px;
  font-size: 9px;
  font-weight: 800;
}

.tone-button.is-active {
  color: var(--black);
  background: var(--white);
}

.generate-button {
  min-height: 30px;
  padding: 6px 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
  white-space: normal;
}

.generate-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.control-deck {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

.progress-row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(31, 28, 24, 0.86);
  font-size: 12px;
  box-shadow: inset 0 8px 16px rgba(255, 255, 255, 0.04);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--white);
}

.deck-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  overflow: visible;
}

.big-pad {
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  min-height: 116px;
  padding: 10px 8px 8px;
  border-radius: 18px;
  background: radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.3), transparent 28%), #161512;
  box-shadow:
    inset 14px 16px 24px rgba(255, 255, 255, 0.18),
    inset -18px -18px 28px rgba(0, 0, 0, 0.82),
    0 12px 20px rgba(255, 255, 255, 0.14);
}

.play-button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}

.play-button svg {
  width: 52px;
  height: 52px;
  fill: currentColor;
  stroke: none;
}

.transport-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.transport-row {
  width: 100%;
  justify-content: space-around;
  padding: 0 12px;
}

.utility-pad {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  place-content: center;
  place-items: center;
  gap: 8px 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 34%, rgba(0, 0, 0, 0.92)),
    #050505;
}

.transport-button,
.mode-button {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}

.transport-button {
  width: 34px;
  height: 34px;
}

.transport-button svg,
.mode-button svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.4;
}

.mode-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  color: #000000;
  background:
    radial-gradient(circle at 32% 22%, #ffffff 0 28%, #efefef 44%, #9e9e9e 72%, #111111 100%);
  box-shadow:
    inset 4px 6px 10px rgba(255, 255, 255, 0.78),
    inset -8px -8px 14px rgba(0, 0, 0, 0.56),
    0 8px 16px rgba(0, 0, 0, 0.48);
}

.mode-button svg {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.72));
}

.mode-button span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 16px;
  height: 16px;
  border-radius: 5px;
  color: var(--black);
  background: var(--white);
  font-size: 10px;
  font-weight: 900;
  line-height: 16px;
}

.mode-button.is-muted {
  opacity: 0.42;
}

.volume-button {
  color: #000000;
}

.volume-button span {
  right: 0;
  bottom: 0;
  min-width: 20px;
}

.volume-stack {
  display: none;
  position: relative;
  align-content: end;
  gap: 7px;
  width: 28px;
  min-height: 118px;
}

.volume-stack::before {
  content: "";
  position: absolute;
  top: 0;
  left: 9px;
  width: 10px;
  height: 34px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 5px);
}

.volume-stack span {
  display: block;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a2925, #ffffff, #111);
  box-shadow: inset 0 5px 10px rgba(255, 255, 255, 0.24), 0 4px 12px rgba(0, 0, 0, 0.34);
}

.queue-list-wrap {
  min-height: 0;
  padding: 14px;
}

.text-button {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.queue-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  margin-top: 12px;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.queue-item.is-more {
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
}

.queue-item button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.status-panel {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.status-panel > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-2);
}

.status-dot.is-good {
  background: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.74);
}

.status-dot.is-bad {
  background: #ff7f66;
}

.install-panel {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.install-panel strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.install-panel span {
  display: block;
  line-height: 1.35;
}

.mobile-sheet[hidden] {
  display: none;
}

.mobile-sheet {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
}

.has-mobile-sheet {
  overflow: hidden;
}

.mobile-sheet__panel {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 390px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(31, 29, 25, 0.98), rgba(3, 3, 3, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.78);
}

.mobile-sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-sheet__logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 2px rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.68));
}

.mobile-sheet__copy {
  display: grid;
  gap: 6px;
  max-width: 300px;
  text-align: center;
}

.mobile-sheet__copy h2,
.mobile-sheet__copy p,
.mobile-sheet__hint {
  margin: 0;
}

.mobile-sheet__copy h2 {
  font-size: 24px;
  line-height: 1.08;
}

.mobile-sheet__copy p,
.mobile-sheet__hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mobile-sheet__qr {
  width: min(70vw, 220px);
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
}

.mobile-sheet__url {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  text-align: center;
  text-decoration-color: rgba(255, 255, 255, 0.38);
}

.mobile-sheet__alternates {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mobile-sheet__alternates:empty {
  display: none;
}

.mobile-sheet__alternates a {
  overflow-wrap: anywhere;
  color: var(--ink);
}

.mobile-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.sheet-action {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.sheet-action.is-primary {
  color: #000000;
  background: #ffffff;
}

@media (display-mode: standalone) {
  .install-panel {
    display: none;
  }
}


/* Mobile listening view: keep discovery visible and playback within thumb reach. */
@media (max-width: 860px) {
  body { padding-bottom: calc(145px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(174px + env(safe-area-inset-bottom)); }
  .app-shell { padding: calc(env(safe-area-inset-top) + 10px) 12px 16px; }
  .stats-rail { border-radius: 20px; padding: 5px 5px 10px; background: rgba(9, 9, 11, .94); }
  .library-stage { margin-top: 8px; padding: 12px 12px 28px; background: linear-gradient(160deg, rgba(20,18,24,.97), rgba(7,7,9,.98) 34%); }
  .topbar { position: relative; min-height: 70px; margin-bottom: 12px; }
  .topbar .wordmark {
    display: block;
    width: 100%;
    height: 58px;
    object-fit: cover;
    object-position: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .topbar::after { content: 'Give your heart a little hug'; display: block; padding: 4px 3px 0; color: #f5f1e9; font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 18px; font-weight: 700; letter-spacing: 0; text-align: center; }
  .search-wrap { border-radius: 15px; }
  .view-tabs { gap: 7px; padding-bottom: 3px; }
  .library-head { margin-bottom: 14px; }
  .library-head h1 { font-size: 29px; letter-spacing: -.035em; }
  .track-list { padding-bottom: 14px; }
  .track-row { border-radius: 17px; min-height: 85px; margin-bottom: 7px; }
  .now-stage { bottom: calc(77px + env(safe-area-inset-bottom)); min-height: 0; padding: 8px 12px; border-top: 1px solid rgba(240,220,177,.28); background: rgba(10,9,11,.96); }
  .art-panel { top: 8px; left: 12px; width: 54px; min-height: 54px; border-radius: 12px; }
  .cover-image { width: 54px; height: 54px; padding: 8px; border-radius: 10px; }
  .now-meta { min-height: 58px; padding: 5px 0 5px 68px; }
  .now-meta h2 { font-size: 16px; }
  .now-stage .install-panel { display: none; }
  .floating-player { bottom: calc(10px + env(safe-area-inset-bottom)); padding: 5px 12px; border-radius: 22px; }
}

.floating-sound-controls{display:flex;align-items:center;gap:10px;width:100%;padding:3px 5px 0;color:rgba(255,255,255,.82)}
.floating-extra-controls{display:flex;gap:8px;width:100%;padding:5px 5px 0}
.floating-extra-controls button{flex:1;min-width:0;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(255,255,255,.06);color:#fff;padding:5px 8px;font-size:17px;cursor:pointer}
.floating-extra-controls button span{font-size:10px;font-weight:750;letter-spacing:.08em}
.floating-extra-controls button output{display:inline-block;min-width:20px;margin-left:3px;border-radius:9px;background:rgba(255,255,255,.16);font-size:11px;line-height:20px}
.floating-extra-controls button:disabled{opacity:.45;cursor:default}
.floating-like{flex:none;width:34px;height:34px;border:0;border-radius:0;background:transparent;color:#fff;font-size:26px;line-height:1;cursor:pointer;box-shadow:none;outline:none}
.floating-like.is-active{color:#fff;text-shadow:0 0 10px rgba(255,255,255,.6)}
.floating-like:focus-visible{text-shadow:0 0 12px #fff}
.floating-like:disabled{opacity:.5;cursor:default}
.floating-sound-slider{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:5px;min-width:0;flex:1;font-size:9px;font-weight:800;letter-spacing:.08em}
.floating-sound-slider input{width:100%;min-width:0;accent-color:#e9d9b5;cursor:pointer}
.floating-sound-slider output{min-width:20px;text-align:right;font-variant-numeric:tabular-nums}

.wordmark {
  filter: brightness(calc(.78 + var(--logo-beat, 0) * .62))
    drop-shadow(0 0 calc(2px + var(--logo-beat, 0) * 14px) rgba(255, 194, 224, .58));
  transition: filter 140ms ease-out;
}

.brand-tile {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .wordmark,
  .brand-tile { transform: none; transition: none; }
  .wordmark { filter: none; }
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
}

.empty-state p {
  max-width: 480px;
  margin: 0;
  line-height: 1.55;
}

.is-visual-mode {
  grid-template-columns: 110px minmax(0, 1fr) minmax(280px, 0.58fr);
}

.is-visual-mode .mood-rail,
.is-visual-mode .view-tabs,
.is-visual-mode .queue-list-wrap,
.is-visual-mode .status-panel {
  display: none;
}

.is-visual-mode .brand-tile {
  width: 92px;
  height: 92px;
  border-radius: 22px;
}

.is-visual-mode .art-panel {
  min-height: 440px;
}

.floating-player {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: none;
  grid-template-columns: auto;
  align-items: center;
  justify-items: center;
  width: auto;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 12%, rgba(255, 255, 255, 0.22), transparent 30%),
    rgba(20, 18, 15, 0.94);
  box-shadow:
    inset 0 10px 18px rgba(255, 255, 255, 0.08),
    inset 0 -18px 24px rgba(0, 0, 0, 0.55),
    0 24px 70px rgba(0, 0, 0, 0.68);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.floating-player.is-playing {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 10px 18px rgba(255, 255, 255, 0.12),
    inset 0 -18px 24px rgba(0, 0, 0, 0.55),
    0 0 34px rgba(255, 255, 255, 0.18),
    0 24px 70px rgba(0, 0, 0, 0.68);
}

.floating-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.floating-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 8px 14px rgba(255, 255, 255, 0.1),
    inset 0 -12px 16px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.floating-button.is-primary {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: #ffffff;
  color: #000000;
}

.floating-button svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

.floating-button.is-primary svg {
  fill: currentColor;
  stroke: none;
}

.floating-track,
.floating-button span { display: none; }

@media (min-width: 861px) {
  .library-head {
    display: none;
  }

  .library-action-row .glass-icon {
    width: 48px;
    height: 40px;
  }

  .library-action-row .glass-icon svg {
    width: 22px;
    height: 22px;
  }

  .library-action-row .stat-pill {
    width: auto;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .library-action-row .stat-pill small {
    font-size: 11px;
  }

  .library-action-row .stat-cluster {
    grid-template-columns: repeat(2, minmax(68px, 1fr));
  }

  .track-list {
    max-height: calc(100vh - 306px);
  }

  .now-stage .queue-list-wrap {
    max-height: 168px;
    overflow: hidden;
  }

  .now-stage .queue-list {
    max-height: 126px;
    overflow: auto;
  }

  .now-stage .status-panel,
  .now-stage .install-panel {
    padding: 7px;
    font-size: 10px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 150px minmax(560px, 1fr) 190px;
    gap: 8px;
    padding: 0 8px 12px;
  }

  .stats-rail {
    min-height: 0;
    padding-left: 4px;
  }

  .brand-tile {
    width: 104px;
    height: 82px;
    border-radius: 24px;
  }

  .mood-rail {
    width: 124px;
    height: min(560px, calc(100vh - 148px));
    min-height: 420px;
  }

  .mood-choice {
    font-size: 10.2px;
  }

  .mood-choice.is-question {
    font-size: 9.8px;
  }

  .heart-copy {
    font-size: 19px;
  }

  .wordmark {
    height: 64px;
  }

  .library-stage {
    padding: 0 14px 14px;
  }

  .desktop-command-board {
    grid-template-columns: minmax(250px, 0.9fr) minmax(280px, 1fr);
    gap: 10px;
  }

  .library-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
  }

  .library-head h1 {
    font-size: clamp(36px, 4vw, 46px);
  }

  .library-head p {
    font-size: 14px;
  }

  .search-inline {
    width: 100%;
  }

  .track-row {
    grid-template-columns: 50px minmax(0, 1fr) auto minmax(142px, auto) 42px;
    min-height: 56px;
  }

  .track-actions {
    grid-template-columns: repeat(2, minmax(64px, 1fr));
  }

  .queue-action {
    padding: 0 7px;
    font-size: 10.5px;
  }

  .now-stage {
    gap: 7px;
  }

  .art-panel {
    min-height: 104px;
  }

  .cover-image {
    width: min(100%, 96px);
  }

  .stat-pill {
    width: 92px;
    min-height: 38px;
    margin-left: 0;
    font-size: 15px;
  }

  .stat-pill small {
    font-size: 13px;
  }

  .stat-pill.is-hours,
  .stat-pill.is-recent {
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(230px + env(safe-area-inset-bottom));
  }

  .app-shell,
  .is-visual-mode {
    display: block;
    min-height: 100vh;
    padding: calc(env(safe-area-inset-top) + 8px) 12px 12px;
  }

  .stats-rail {
    position: sticky;
    z-index: 5;
    top: 0;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
      "brand mood";
    align-items: center;
    gap: 8px;
    height: auto;
    min-height: 0;
    padding: 2px 0 10px;
    background: rgba(3, 3, 3, 0.86);
    backdrop-filter: blur(18px);
    overflow: visible;
  }

  .brand-tile,
  .is-visual-mode .brand-tile {
    grid-area: brand;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    padding: 0;
  }

  .heart-copy {
    display: none;
  }

  .mood-rail {
    grid-area: mood;
    display: flex;
    width: 100%;
    height: 66px;
    min-height: 66px;
    gap: 8px;
    padding: 8px 56px 8px 10px;
    border-radius: 999px;
    overflow-x: auto;
    overflow-y: hidden;
    background:
      radial-gradient(ellipse at 40% 60%, rgba(255, 218, 112, calc(0.08 + var(--beat) * 0.26)), transparent 46%),
      radial-gradient(circle at 18% 34%, rgba(0, 224, 255, calc(0.07 + var(--treble) * 0.22)), transparent 34%),
      radial-gradient(circle at 76% 42%, rgba(255, 55, 184, calc(0.06 + var(--treble) * 0.2)), transparent 34%),
      rgba(2, 2, 2, 0.9);
    box-shadow:
      inset 0 10px 20px rgba(255, 255, 255, calc(0.08 + var(--beat) * 0.1)),
      inset 0 -18px 28px rgba(0, 0, 0, 0.76),
      0 0 calc(14px + var(--beat) * 18px) rgba(255, 230, 150, calc(0.08 + var(--beat) * 0.12));
  }

  .mood-rail::before,
  .mood-rail::after {
    display: block;
  }

  .mood-rail::before {
    inset: -8px;
    opacity: calc(0.28 + var(--beat) * 0.16);
    filter: blur(12px) saturate(calc(1.05 + var(--beat) * 0.35));
  }

  .mood-rail::after {
    inset: 10px 44px 10px 10px;
    left: 10px;
    right: 44px;
    top: 10px;
    bottom: 10px;
    opacity: calc(0.34 + var(--beat) * 0.16);
    filter: blur(10px) saturate(calc(1.05 + var(--beat) * 0.42));
  }

  #moodWaveCanvas {
    display: block;
    opacity: 0.62;
  }

  .mood-choice {
    width: auto;
    min-width: max-content;
    font-size: 10.8px;
    line-height: 1;
    white-space: nowrap;
  }

  .mood-rail.is-track-active .mood-choice:not(.is-active):not(:hover):not(:focus-visible) {
    width: auto;
    min-width: max-content;
    overflow: visible;
    color: rgba(255,255,255,.72);
    opacity: 1;
    transform: none;
  }

  .mood-rail.is-track-active .mood-choice:not(.is-active):not(:hover):not(:focus-visible)::after {
    width: 22px;
  }

  .mood-choice.is-question {
    margin: 0;
    font-size: 9.8px;
    line-height: 1;
  }

  .mood-heart {
    left: var(--heart-x, 50%);
    right: auto;
    top: 50%;
    width: 44px;
    height: 40px;
    transition: left .28s ease-out, transform .08s linear;
  }

  .mood-rail.is-dragging .mood-heart { transition: none; }

  .mood-heart::before {
    inset: 0;
    font-size: 52px;
  }

  .mood-heart::after {
    inset: 10px 7px 6px;
  }

  .stat-pill,
  .stat-pill.is-hours,
  .stat-pill.is-liked,
  .stat-pill.is-recent {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    margin-left: 0;
    transform: none;
    gap: 3px;
    padding: 4px 6px;
    font-size: 12.5px;
    box-shadow:
      inset 0 3px 6px rgba(255, 255, 255, 0.98),
      inset 0 -5px 8px rgba(0, 0, 0, 0.08),
      0 2px 10px rgba(0, 0, 0, 0.12);
  }

  .stat-pill small {
    font-size: 10.5px;
  }

  .library-stage {
    padding: 10px 12px 22px;
    border-radius: 24px;
  }

  .desktop-command-board {
    display: block;
    margin-bottom: 10px;
  }

  .library-tools {
    display: grid;
    gap: 8px;
    padding-top: 0;
  }

  .library-action-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  #shuffleButton,
  #fullscreenButton {
    display: none;
  }

  #mobileShortcutButton {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }

  .wordmark {
    grid-column: 1 / 4;
    width: 100%;
    height: 54px;
    object-position: center;
  }

  .search-wrap,
  .glass-icon {
    height: 40px;
  }

  .library-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  .search-inline {
    grid-column: auto;
    width: 100%;
  }

  .stat-cluster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: start;
    grid-column: 2;
    width: 100%;
    gap: 5px;
  }

  .library-head h1 {
    margin-top: 6px;
    font-size: 27px;
    line-height: 1.05;
  }

  .library-head p {
    margin-top: 5px;
    font-size: 12px;
  }

  .view-tabs {
    overflow-x: auto;
  }

  .track-list {
    max-height: none;
    min-height: 360px;
    padding-bottom: 18px;
  }

  .track-row {
    grid-template-columns: 42px minmax(0, 1fr) 38px;
    min-height: 92px;
    align-items: start;
    contain-intrinsic-size: auto 92px;
  }

  .track-meta {
    display: none;
  }

  .track-art {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .track-main {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding-top: 2px;
  }

  .track-actions {
    grid-column: 2 / 4;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .queue-action {
    min-height: 30px;
    padding: 0 8px;
  }

  .like-control {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .now-stage {
    position: fixed;
    z-index: 6;
    right: 0;
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: 0;
    top: auto;
    display: block;
    height: auto;
    min-height: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(3, 3, 3, 0.94);
    backdrop-filter: blur(18px);
  }

  .floating-player {
    display: grid;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 50%;
    grid-template-columns: auto;
    justify-items: center;
    width: auto;
    min-height: 68px;
    padding: 8px 10px;
    gap: 0;
    transform: translateX(-50%);
  }

  .floating-controls {
    justify-content: center;
    gap: 10px;
    width: auto;
  }

  .glass-icon {
    width: 44px;
  }

  .floating-button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .floating-button.is-primary {
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }

  .floating-button.is-primary {
    width: 52px;
    height: 52px;
    border-radius: 18px;
  }

  .art-panel {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 66px;
    min-height: 66px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
  }

  .cover-image {
    width: 66px;
    height: 66px;
    padding: 12px;
    border-radius: 10px;
  }

  .now-meta {
    min-height: 74px;
    padding: 8px 0 8px 82px;
  }

  .now-meta h2 {
    font-size: 18px;
  }

  .cover-lab,
  .queue-list-wrap,
  .status-panel,
  .control-deck {
    display: none;
  }

  .install-panel {
    display: grid;
  }

  .mobile-sheet {
    align-items: end;
    padding: 10px;
  }

  .mobile-sheet__panel {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 18px 18px 10px 10px;
  }

  .volume-stack {
    display: none;
  }
}

@media (min-width: 861px) and (max-height: 760px) {
  .app-shell {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .stats-rail,
  .now-stage {
    top: 24px;
    height: calc(100vh - 48px);
    min-height: 0;
  }

  .brand-tile {
    width: 92px;
    height: 72px;
  }

  .heart-copy {
    font-size: 17px;
  }

  .mood-rail {
    width: 116px;
    height: min(520px, calc(100vh - 132px));
    min-height: 392px;
    padding: 16px 8px;
  }

  .mood-choice {
    font-size: 9.4px;
  }

  .mood-choice.is-question {
    font-size: 9px;
  }

  .mood-heart {
    width: 48px;
    height: 42px;
  }

  .mood-heart::before {
    font-size: 56px;
  }

  .art-panel {
    min-height: 112px;
    padding: 8px;
  }

  .cover-image {
    width: min(100%, 106px);
    padding: 18px;
  }

  .now-meta h2 {
    font-size: 13px;
  }

  .control-deck {
    padding: 8px;
    gap: 8px;
  }

  .big-pad {
    min-height: 80px;
    border-radius: 18px;
  }

  .play-button,
  .play-button svg {
    width: 46px;
    height: 46px;
  }

  .transport-button,
  .mode-button {
    width: 30px;
    height: 30px;
  }

  .utility-pad {
    grid-template-columns: repeat(2, 30px);
    gap: 6px;
  }

  .transport-button svg,
  .mode-button svg {
    width: 23px;
    height: 23px;
  }

  .install-panel,
  .status-panel {
    display: none;
  }

  .cover-lab {
    display: grid;
  }

  .queue-list-wrap {
    padding: 10px;
  }

  .queue-list {
    max-height: 108px;
    gap: 6px;
    margin-top: 8px;
  }

  .queue-item {
    min-height: 36px;
    padding: 7px 8px;
  }
}

@media (display-mode: standalone) {
  .install-panel {
    display: none;
  }
}

.track-actions { grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; }
.download-action { display: grid; place-items: center; min-width: 0; min-height: 32px; padding: 0; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; color: #fff; background: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.05)); box-shadow: inset 0 1px rgba(255,255,255,.28); cursor: pointer; }
.download-action svg { width: 16px; height: 16px; }
.download-action:hover { border-color: rgba(255,255,255,.8); background: rgba(255,255,255,.26); }
.download-action:disabled { opacity: .45; cursor: not-allowed; }
.play-now-action { color: #ffe6aa; border-color: rgba(255,220,145,.72); background: rgba(255,220,145,.045); box-shadow: inset 0 1px rgba(255,240,200,.12), 0 0 10px rgba(255,211,116,.13); }
.play-now-action:hover { color: #fff0c8; border-color: rgba(255,224,158,.95); background: rgba(255,220,145,.11); }

@media (max-width: 860px) {
  .stats-rail { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mood"; }
  .brand-tile { display: none; }
  .mood-rail { grid-area: mood; height: 56px; min-height: 56px; background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.14); box-shadow: inset 0 1px rgba(255,255,255,.16); }
  .mood-heart { background: url('/assets/muspiration-heart-logo.png') center / contain no-repeat; }
  .mood-heart::before, .mood-heart::after { content: none; }
  .track-actions { grid-template-columns: repeat(3, minmax(0, 1fr)) 32px; }
  .queue-action { padding-inline: 3px; font-size: 10px; }

  /* Keep the song and transport together in one legible glass dock. */
  .now-stage { display: none; }
  .floating-player { bottom: calc(10px + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 440px); min-height: 112px; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 25px; background: linear-gradient(145deg, rgba(100,119,149,.38), rgba(19,24,36,.82) 48%, rgba(46,32,54,.72)); box-shadow: inset 0 1px rgba(255,255,255,.38), inset 0 -1px rgba(255,255,255,.1), 0 18px 45px rgba(0,0,0,.52); backdrop-filter: blur(30px) saturate(1.55); -webkit-backdrop-filter: blur(30px) saturate(1.55); }
  .floating-track { display: grid; gap: 2px; min-width: 0; width: 100%; text-align: center; }
  .floating-track__eyebrow { color: rgba(255,255,255,.64); font-size: 9px; font-weight: 700; letter-spacing: .2em; }
  .floating-track strong { overflow: hidden; color: #fff; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .floating-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 9px; }
  .floating-button, .floating-button.is-primary { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 47px; border-radius: 14px; color: #fff; background: rgba(255,255,255,.1); box-shadow: inset 0 1px rgba(255,255,255,.3), 0 5px 12px rgba(0,0,0,.18); }
  .floating-button.is-primary { background: rgba(255,255,255,.88); color: #171b26; }
  .floating-button svg { width: 20px; height: 20px; flex: none; }
  .floating-button span { display: inline; font-size: 11px; font-weight: 700; white-space: nowrap; }
}

@media (max-width: 860px) {
  .track-row { grid-template-columns: 38px minmax(0, 1fr) 32px; column-gap: 7px; min-height: 83px; }
  .track-art { width: 38px; height: 38px; grid-row: 1; }
  .track-main strong { font-size: 13px; letter-spacing: -.015em; }
  .track-actions { grid-column: 1 / 4; grid-row: 2; gap: 6px; }
  .queue-action { min-height: 29px; gap: 4px; border-radius: 11px; font-size: 10px; }
  .queue-action svg { width: 13px; height: 13px; }

  .lyrics-preview { width: 100%; min-height: 61px; padding: 7px 12px 5px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.2); }
  .lyrics-preview[hidden] { display: none; }
  .lyrics-preview__label { color: rgba(255,255,255,.57); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
  .lyrics-preview p { margin: 5px 0 0; color: #fff; font-size: 14px; font-weight: 650; line-height: 1.25; text-shadow: 0 2px 8px rgba(0,0,0,.8); }

  .floating-player {
    isolation: isolate;
    min-height: 118px;
    padding: 7px 10px 10px;
    gap: 5px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 25px;
    background: linear-gradient(155deg, rgba(255,255,255,.05), rgba(119,139,178,.033) 24%, rgba(28,33,49,.108) 55%, rgba(92,73,101,.075));
    box-shadow: inset 0 2px 1px rgba(255,255,255,.50), inset 0 -2px 4px rgba(2,5,18,.38), inset 2px 0 2px rgba(255,255,255,.18), 0 12px 34px rgba(0,0,0,.46), 0 2px 7px rgba(0,0,0,.35);
    backdrop-filter: blur(28px) saturate(1.6);
    -webkit-backdrop-filter: blur(28px) saturate(1.6);
  }
  .floating-player::before {
    content: "";
    position: absolute;
    inset: 2px 3px auto;
    height: 48%;
    border-radius: 22px 22px 50% 50%;
    background: linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.006) 82%, transparent);
    pointer-events: none;
    z-index: -1;
  }
  .floating-player.is-dragging { box-shadow: inset 0 2px 1px rgba(255,255,255,.6), 0 22px 50px rgba(0,0,0,.6); }
  .floating-track { position: relative; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
  .is-dragging .floating-track { cursor: grabbing; }
  .floating-grip { display: block; width: 35px; height: 4px; margin: 0 auto 1px; border-radius: 9px; background: rgba(255,255,255,.53); box-shadow: 0 1px 2px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.7); }
  .floating-track strong { font-size: 12px; }
  .floating-controls { gap: 6px; }
  .floating-button, .floating-button.is-primary {
    min-width: 0;
    height: 52px;
    padding: 4px 5px;
    gap: 3px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 17px;
    background: radial-gradient(ellipse at 50% -20%, rgba(255,255,255,.37), transparent 66%), linear-gradient(145deg, rgba(255,255,255,.21), rgba(255,255,255,.05) 42%, rgba(9,14,31,.17));
    box-shadow: inset 0 2px 1px rgba(255,255,255,.42), inset 0 -2px 3px rgba(0,0,0,.23), 0 3px 7px rgba(0,0,0,.20);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.55);
  }
  .floating-button.is-primary { background: radial-gradient(ellipse at 50% -20%, rgba(255,255,255,.62), transparent 65%), linear-gradient(150deg, rgba(229,242,255,.44), rgba(144,177,216,.19) 48%, rgba(88,107,157,.23)); border-color: rgba(255,255,255,.62); }
  .floating-player.is-playing { box-shadow: inset 0 2px 1px rgba(255,255,255,.50), inset 0 -2px 4px rgba(2,5,18,.38), inset 2px 0 2px rgba(255,255,255,.18), 0 12px 34px rgba(0,0,0,.46), 0 2px 7px rgba(0,0,0,.35); }
  .floating-player.is-playing .floating-button.is-primary { background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,255,255,.15)); border-color: rgba(255,255,255,.88); box-shadow: inset 0 2px 2px rgba(255,255,255,.68), 0 0 15px rgba(255,255,255,.4), 0 3px 7px rgba(0,0,0,.16); }
  .floating-button svg { width: 17px; height: 17px; }
  .floating-button .transport-copy { display: grid; min-width: 0; gap: 2px; text-align: center; }
  .floating-button .transport-copy small { font-size: 8px; font-weight: 800; letter-spacing: .1em; color: rgba(255,255,255,.68); }
  .floating-button .transport-copy span { display: block; overflow: hidden; max-width: 100%; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 860px) {
  .stats-rail {
    padding: 2px 0 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .mood-rail { margin-top: 0; }
  .floating-player {
    background: linear-gradient(155deg, rgba(255,255,255,.014), rgba(119,139,178,.009) 24%, rgba(28,33,49,.028) 55%, rgba(92,73,101,.02));
    backdrop-filter: blur(9px) saturate(1.2);
    -webkit-backdrop-filter: blur(9px) saturate(1.2);
  }
  .floating-button, .floating-button.is-primary {
    background: radial-gradient(ellipse at 50% -20%, rgba(255,255,255,.19), transparent 66%), linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.025) 42%, rgba(9,14,31,.085));
  }
  .library-stage { overflow: visible; background: linear-gradient(160deg, rgba(20,18,24,.55), rgba(7,7,9,.64) 34%); }
  body:has(.playback-atmosphere.is-active) .floating-player { top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
  .playback-atmosphere.is-active { align-items: start; }
  .playback-atmosphere.is-active .heart-journal { max-height: calc(100dvh - 225px); margin-top: max(82px, env(safe-area-inset-top)); }
  .desktop-command-board { display: contents; }
  .topbar {
    position: sticky;
    top: calc(env(safe-area-inset-top) + 76px);
    z-index: 14;
    min-height: 0;
    margin-bottom: 0;
    padding: 5px 8px 4px;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    background: rgba(8, 9, 13, .76);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }
  .topbar .wordmark {
    height: 52px;
    object-fit: contain;
    mix-blend-mode: screen;
  }
  .topbar::after { padding-top: 0; line-height: 21px; }
  .library-tools {
    position: sticky;
    top: calc(env(safe-area-inset-top) + 156px);
    z-index: 13;
    gap: 5px;
    padding: 7px 8px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 0 0 18px 18px;
    background: rgba(9, 10, 15, .91);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
  .view-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; overflow: visible; }
  .view-tab { width: 100%; min-width: 0; height: 31px; padding: 0 4px; font-size: 11px; white-space: nowrap; }
}

.orb-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 104px;
  overflow: hidden;
}

.orb-brand__mark {
  display: block;
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex: none;
  transform: scale(calc(1 + var(--logo-beat, 0) * .035));
  filter: brightness(calc(.82 + var(--logo-beat, 0) * .48));
  transition: transform 180ms ease-out, filter 180ms ease-out;
}

.orb-brand__name {
  color: #f5f1f7;
  font-size: clamp(29px, 3.2vw, 49px);
  font-weight: 650;
  letter-spacing: .015em;
  line-height: 1;
  text-shadow: 0 0 16px rgba(184, 129, 234, .28);
}

@media (max-width: 860px) {
  .topbar .orb-brand { min-height: 70px; gap: 6px; }
  .topbar .orb-brand__mark { width: 76px; height: 70px; }
  .topbar .orb-brand__name { font-size: clamp(23px, 6vw, 29px); }
}

@media (prefers-reduced-motion: reduce) {
  .orb-brand__mark { transform: none; transition: none; }
}
