:root {
  --background: 220 20% 6%;
  --foreground: 220 10% 94%;
  --card: 220 15% 10%;
  --primary: 35 90% 58%;
  --primary-foreground: 220 20% 6%;
  --secondary: 220 12% 14%;
  --muted: 220 10% 16%;
  --muted-foreground: 220 8% 50%;
  --accent: 35 70% 45%;
  --destructive: 0 72% 51%;
  --border: 220 10% 18%;
  --radius: 1rem;

  --glass-bg: 220 15% 12%;
  --glass-border: 220 10% 22%;
  --glass-highlight: 220 15% 25%;
  --nav-bg: 220 20% 5%;
  --chip-bg: 220 10% 18%;
  --chip-foreground: 220 10% 65%;
  --song-hover: 220 12% 14%;

  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: hsl(var(--border));
}

html {
  height: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body.scrollable {
  overflow: auto;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

::-webkit-scrollbar {
  display: none;
}

.scroll-area {
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

/* ---------------- Glass surfaces ---------------- */

.glass {
  background: hsl(var(--glass-bg) / 0.6);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid hsl(var(--glass-border) / 0.4);
}

.glass-strong {
  background: hsl(var(--glass-bg) / 0.8);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid hsl(var(--glass-border) / 0.5);
}

.glass-subtle {
  background: hsl(var(--glass-bg) / 0.3);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid hsl(var(--glass-border) / 0.2);
}

/* ---------------- Layout ---------------- */

.app {
  position: relative;
  display: flex;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

#bg-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 1s ease;
}

.sidebar {
  display: none;
  flex-direction: column;
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid hsl(var(--border) / 0.2);
  position: relative;
  z-index: 10;
  padding: 20px 20px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.brand .disc {
  width: 28px;
  height: 28px;
  color: hsl(var(--primary));
  animation: spin-slow 6s linear infinite;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.side-link:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.3);
}

.side-link.active {
  color: hsl(var(--primary));
  font-weight: 600;
  background: hsl(var(--glass-bg) / 0.6);
  border: 1px solid hsl(var(--glass-border) / 0.4);
}

.side-now {
  margin-top: auto;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.side-now img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 10;
}

.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 20px 24px;
}

.page {
  display: none;
  animation: fade-in 0.28s var(--ease-out);
}

.page.active {
  display: block;
}

.mobile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section {
  margin-top: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
}

.section-title svg {
  color: hsl(var(--primary));
}

h1.page-title {
  font-size: 18px;
  font-weight: 700;
}

/* ---------------- Search ---------------- */

.searchbar {
  position: relative;
  border-radius: 16px;
  margin-bottom: 16px;
}

.searchbar.focused {
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.35);
}

.searchbar svg.icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  pointer-events: none;
}

.searchbar.focused svg.icon {
  color: hsl(var(--primary));
}

.searchbar input {
  width: 100%;
  padding: 12px 40px 12px 44px;
  background: transparent;
  border: 0;
  border-radius: 16px;
  font-size: 14px;
  outline: none;
}

.searchbar input::placeholder {
  color: hsl(var(--muted-foreground));
}

.searchbar .clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  display: none;
}

.searchbar.has-value .clear {
  display: block;
}

/* ---------------- Chips ---------------- */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -20px 16px;
  padding-inline: 20px;
}

.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: hsl(var(--chip-bg));
  color: hsl(var(--chip-foreground));
  transition: all 0.2s;
}

.chip.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ---------------- Quick picks ---------------- */

.quickpicks {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -20px;
  padding-inline: 20px;
}

.qp-card {
  flex-shrink: 0;
  width: 144px;
  scroll-snap-align: start;
  text-align: left;
  transition: transform 0.15s;
}

.qp-card:active {
  transform: scale(0.97);
}

.qp-art {
  position: relative;
  width: 144px;
  height: 144px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.qp-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qp-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
}

.qp-card:hover .qp-play {
  opacity: 1;
}

.qp-title {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
}

.qp-artist {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- Song list ---------------- */

.song-list {
  display: grid;
  gap: 4px;
}

.song {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: all 0.2s;
  cursor: pointer;
}

.song:hover {
  background: hsl(var(--song-hover) / 0.7);
}

.song.playing {
  background: hsl(var(--glass-bg) / 0.8);
  border: 1px solid hsl(var(--glass-border) / 0.5);
}

.song-art {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
}

.song-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-art .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
}

.song:hover .song-art .overlay,
.song.playing .song-art .overlay {
  opacity: 1;
}

.song-meta {
  flex: 1;
  min-width: 0;
}

.song-title {
  font-size: 14px;
  font-weight: 500;
}

.song.playing .song-title {
  color: hsl(var(--primary));
}

.song-artist {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

.icon-btn {
  padding: 10px;
  color: hsl(var(--muted-foreground));
  flex-shrink: 0;
  display: flex;
  border-radius: 12px;
  transition: color 0.2s, background 0.2s;
}

.icon-btn:hover {
  color: hsl(var(--foreground));
}

.icon-btn.liked svg {
  color: hsl(var(--primary));
  fill: hsl(var(--primary));
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(var(--primary));
  animation: pulse-glow 1.6s ease-in-out infinite;
}

/* ---------------- Empty / error / loader ---------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 0;
  text-align: center;
}

.empty .badge {
  width: 60px;
  height: 60px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
}

.empty p {
  font-size: 14px;
  font-weight: 600;
}

.empty span {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.error-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid hsl(var(--destructive) / 0.3);
  margin-bottom: 16px;
}

.error-banner svg {
  color: hsl(var(--destructive));
  flex-shrink: 0;
}

.error-banner .msg {
  flex: 1;
  min-width: 0;
}

.error-banner .msg strong {
  font-size: 14px;
  display: block;
}

.error-banner .msg span {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

.loader {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 24px;
  justify-content: center;
  padding: 24px 0;
}

.loader i {
  width: 3px;
  height: 100%;
  background: hsl(var(--primary));
  border-radius: 2px;
  animation: bars 1s ease-in-out infinite;
}

.loader i:nth-child(2) { animation-delay: 0.15s; }
.loader i:nth-child(3) { animation-delay: 0.3s; }
.loader i:nth-child(4) { animation-delay: 0.45s; }

.skeleton {
  border-radius: 16px;
  background: linear-gradient(90deg, hsl(var(--muted) / 0.25), hsl(var(--muted) / 0.5), hsl(var(--muted) / 0.25));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-row {
  height: 68px;
  margin-bottom: 4px;
}

.skeleton-card {
  height: 190px;
  width: 144px;
  flex-shrink: 0;
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-ghost {
  color: hsl(var(--foreground));
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.text-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: hsl(var(--muted) / 0.2);
  border: 1px solid hsl(var(--border) / 0.5);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.text-input:focus {
  border-color: hsl(var(--primary) / 0.5);
}

.row-gap {
  display: flex;
  gap: 8px;
}

/* ---------------- Mini player ---------------- */

.mini-player {
  margin: 0 8px 6px;
  display: none;
}

.mini-player.visible {
  display: block;
  animation: slide-up 0.35s var(--ease-out);
}

.mini-shell {
  position: relative;
  height: 60px;
  border-radius: 16px;
  overflow: hidden;
}

.mini-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.4);
  filter: blur(28px) brightness(0.35) saturate(1.8);
}

.mini-tint {
  position: absolute;
  inset: 0;
  background: hsl(var(--background) / 0.4);
}

.mini-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
  padding: 0 10px;
}

.mini-art {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-lg);
}

.mini-meta {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.mini-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.mini-artist {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ctrl {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s, transform 0.12s;
}

.ctrl:active {
  transform: scale(0.85);
}

.ctrl:disabled {
  opacity: 0.25;
}

.ctrl.on {
  color: hsl(var(--primary));
}

.ctrl.play {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  color: hsl(var(--primary-foreground));
}

.ctrl.play.playing {
  background: rgba(255, 255, 255, 0.95);
  color: hsl(var(--background));
}

.mini-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 3;
}

.mini-progress > div {
  height: 100%;
  width: 0;
  background: hsl(var(--primary));
  transition: width 0.25s linear;
}

.desktop-only {
  display: none;
}

/* ---------------- Bottom nav ---------------- */

.bottom-nav {
  padding: 8px 12px max(12px, env(safe-area-inset-bottom));
}

.bottom-nav nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-radius: 999px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-btn {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  color: hsl(var(--muted-foreground));
  transition: all 0.25s var(--ease-out);
}

.nav-btn:active {
  transform: scale(0.9);
}

.nav-btn.active {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.2);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.5);
}

.nav-btn span {
  font-size: 12px;
  font-weight: 600;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.3s var(--ease-out);
}

.nav-btn.active span {
  max-width: 100px;
  opacity: 1;
}

/* ---------------- Full screen player ---------------- */

.fsp {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.fsp.open {
  display: block;
}

.fsp-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.25);
  filter: blur(60px) brightness(0.3) saturate(1.6);
}

.fsp-veil {
  position: absolute;
  inset: 0;
  background: hsl(var(--background) / 0.7);
  backdrop-filter: blur(24px);
}

.fsp-body {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: slide-up 0.32s var(--ease-out);
}

.fsp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 4px;
}

.fsp-head span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--foreground) / 0.7);
}

.fsp-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 24px max(20px, env(safe-area-inset-bottom));
}

.fsp-art {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.fsp-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fsp-art.spinning img {
  animation: none !important;
  transform: none !important;
}

.fsp-info {
  width: 100%;
  max-width: 384px;
  text-align: center;
}

.fsp-info h2 {
  font-size: 16px;
  font-weight: 700;
}

.fsp-info p {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.seek-wrap {
  width: 100%;
  max-width: 384px;
}

.seek {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: hsl(var(--foreground) / 0.15);
  overflow: hidden;
}

.seek > div {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: hsl(var(--primary));
}

.seek input,
.volume input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.fsp-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 384px;
}

.fsp-controls .ctrl {
  color: hsl(var(--muted-foreground));
  width: 44px;
  height: 44px;
}

.fsp-controls .ctrl.main {
  color: hsl(var(--foreground));
}

.fsp-controls .ctrl.on {
  color: hsl(var(--primary));
}

.fsp-controls .big {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-lg);
}

.volume {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 384px;
}

.volume .bar {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: hsl(var(--foreground) / 0.15);
  overflow: hidden;
}

.volume .bar > div {
  height: 100%;
  width: 70%;
  background: hsl(var(--foreground) / 0.75);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.pill-btn.liked {
  color: hsl(var(--primary));
}

.pill-btn.liked svg {
  fill: currentColor;
}

/* ---------------- Queue ---------------- */

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border-radius: 12px;
  text-align: left;
  transition: background 0.2s;
}

.queue-item:hover {
  background: hsl(var(--song-hover) / 0.7);
}

.queue-item img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.queue-index {
  font-size: 12px;
  width: 20px;
  text-align: right;
  color: hsl(var(--muted-foreground));
}

/* ---------------- Profile ---------------- */

.card {
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 16px;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px hsl(var(--background)), 0 0 0 6px hsl(var(--primary) / 0.25);
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--muted-foreground));
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-wrap {
  position: relative;
  margin-bottom: 16px;
}

.avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat {
  border-radius: 16px;
  background: hsl(var(--muted) / 0.15);
  border: 1px solid hsl(var(--border) / 0.4);
  padding: 12px 6px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-top: 6px;
}

.stat small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  transition: background 0.2s;
  width: 100%;
  text-align: left;
}

.list-row:hover {
  background: hsl(var(--muted) / 0.25);
}

.list-row .label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}

.list-row .desc {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.list-row.destructive .label {
  color: hsl(var(--destructive));
}

.section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: hsl(var(--muted-foreground));
  margin: 16px 0 8px;
}

.toggle {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: hsl(var(--muted));
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ease-out);
}

.toggle.on {
  background: hsl(var(--primary));
}

.toggle.on::after {
  transform: translateX(18px);
}

.accent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.accent-dot {
  height: 44px;
  border-radius: 14px;
  border: 2px solid transparent;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.65);
}

.accent-dot.active {
  border-color: #fff;
}

/* ---------------- Modal / sheet ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.modal.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 88dvh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 20px;
  animation: slide-up 0.3s var(--ease-out);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.modal-head h3 {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
}

.toast-host {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
}

.toast {
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--foreground));
  background: hsl(var(--background) / .92);
  border: 1px solid hsl(var(--glass-border) / .6);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  animation: fade-in 0.25s var(--ease-out);
}

.toast.error {
  border-color: hsl(var(--destructive) / 0.5);
  color: hsl(0 85% 75%);
}

/* ---------------- Auth page ---------------- */

.auth-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  padding: 32px;
  animation: fade-in 0.4s var(--ease-out);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.field .control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--muted) / 0.2);
  transition: border-color 0.2s;
}

.field .control:focus-within {
  border-color: hsl(var(--primary) / 0.5);
}

.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 14px;
}

.form-error {
  font-size: 12px;
  color: hsl(var(--destructive));
  margin-bottom: 12px;
}

/* ---------------- Team ---------------- */

.team-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.team-card {
  border-radius: 24px;
  overflow: hidden;
}

.team-banner {
  height: 96px;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.35), hsl(var(--accent) / 0.15), transparent);
}

.team-body {
  padding: 0 20px 20px;
  margin-top: -44px;
  text-align: center;
}

.team-body img {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 4px solid hsl(var(--background));
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  margin: 4px 4px 0 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.feature {
  border-radius: 18px;
  padding: 14px;
}

.feature svg {
  color: hsl(var(--primary));
  margin-bottom: 8px;
}

.feature b {
  font-size: 12px;
  display: block;
}

.feature p {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-top: 4px;
}

/* ---------------- Animations ---------------- */

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes bars {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

.compact .song {
  padding: 6px;
}

.compact .song-art {
  width: 40px;
  height: 40px;
}

/* ---------------- Responsive ---------------- */

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
  }

  .mobile-only {
    display: none !important;
  }

  .desktop-only {
    display: flex;
  }

  .content {
    padding: 32px;
  }

  .content > .page {
    max-width: 1040px;
  }

  .song-list {
    grid-template-columns: 1fr 1fr;
  }

  .quickpicks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding-inline: 0;
    gap: 16px;
  }

  .qp-card,
  .qp-art {
    width: 100%;
  }

  .qp-art {
    height: 170px;
  }

  .chips {
    margin: 0 0 16px;
    padding-inline: 0;
  }

  .mini-shell {
    height: 72px;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    align-items: center;
  }

  .modal-card {
    border-radius: 24px;
  }
}

@media (min-width: 1280px) {
  .now-playing-panel {
    display: flex;
    flex-direction: column;
    width: 320px;
    flex-shrink: 0;
    padding: 20px;
    gap: 20px;
    border-left: 1px solid hsl(var(--border) / 0.3);
    position: relative;
    z-index: 10;
    overflow-y: auto;
  }
}

.now-playing-panel {
  display: none;
}

.np-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
}

.np-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Form controls must always remain interactive on mobile and desktop. */
input, textarea, select, button { -webkit-user-select: text; user-select: text; }
.auth-card, .auth-card input, .auth-card button { touch-action: manipulation; }
.auth-card input { caret-color: hsl(var(--primary)); }


/* ========================================================================
   OuterTune responsive polish
   The original markup uses quick-card/song-row class names; these styles
   normalize those components and make navigation responsive across phones,
   tablets, laptops and large desktop displays.
   ======================================================================== */

.mobile-only {
  display: block;
}

.quick-card {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  display: block;
  width: 156px;
  min-width: 156px;
  padding: 0;
  text-align: left;
  scroll-snap-align: start;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  transition: transform .18s var(--ease-out);
}

.quick-card:active {
  transform: scale(.97);
}

.quick-art {
  position: relative;
  display: block;
  width: 156px;
  height: 156px;
  border-radius: 16px;
  overflow: hidden;
  background: hsl(var(--muted));
  box-shadow: var(--shadow-lg);
}

.quick-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.quick-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.42);
  color: #fff;
  opacity: 0;
  transition: opacity .18s ease;
}

.quick-card:hover .quick-play,
.quick-card:focus-visible .quick-play {
  opacity: 1;
}

.quick-title,
.quick-artist {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-title {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.quick-artist {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.3;
  color: hsl(var(--muted-foreground));
}

.song-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}

.song-row:hover {
  background: hsl(var(--song-hover) / .7);
}

.song-row:focus-visible {
  outline: 2px solid hsl(var(--primary) / .65);
  outline-offset: 2px;
}

.song-row.active {
  background: hsl(var(--glass-bg) / .85);
  border-color: hsl(var(--glass-border) / .5);
}

.song-row .song-art {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.song-row .song-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.song-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
}

.song-actions .icon-btn {
  width: 34px;
  height: 34px;
  padding: 7px;
  justify-content: center;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0,0,0,.42);
  opacity: 0;
  transition: opacity .18s ease;
}

.song-row:hover .play-overlay,
.song-row.active .play-overlay {
  opacity: 1;
}

.playing-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(0,0,0,.4);
}

.playing-badge i {
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: hsl(var(--primary));
  animation: bars 1s ease-in-out infinite;
}

.playing-badge i:nth-child(2) { animation-delay: .15s; }
.playing-badge i:nth-child(3) { animation-delay: .3s; }

.row-meta {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

.empty-state,
.error-card {
  width: 100%;
  border-radius: 18px;
  padding: 28px 18px;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  background: hsl(var(--glass-bg) / .18);
  border: 1px solid hsl(var(--border) / .25);
}

.empty-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 16px;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / .35);
}

.empty-title {
  font-size: 14px;
  font-weight: 700;
}

.empty-sub {
  max-width: 440px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

.error-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid hsl(var(--destructive) / .25);
  background: hsl(var(--destructive) / .07);
  color: hsl(var(--foreground));
}

.error-card > svg {
  flex: 0 0 auto;
  color: hsl(var(--destructive));
}

.error-text {
  font-size: 12px;
  line-height: 1.45;
}

.btn-sm {
  padding: 8px 12px;
  min-height: 36px;
  font-size: 11px;
}

.btn-danger {
  color: hsl(0 80% 72%);
  border: 1px solid hsl(var(--destructive) / .28);
  background: hsl(var(--destructive) / .08);
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 -4px 16px;
  padding: 4px;
}

.tab {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 11px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tab.active {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
}

.page-pad {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.profile-head > div {
  min-width: 0;
}

.avatar-lg {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 0 0 4px hsl(var(--primary) / .12);
}

.avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: hsl(var(--glass-bg) / .42);
  border: 1px solid hsl(var(--border) / .35);
}

.stat-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .1);
}

.stat-label {
  display: block;
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

.stat-value {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  font-weight: 800;
}

.stat-grid {
  min-width: 0;
}

.playlist-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.playlist-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  text-align: left;
  background: hsl(var(--glass-bg) / .3);
  border: 1px solid hsl(var(--border) / .28);
}

.playlist-card:hover {
  background: hsl(var(--song-hover));
}

.playlist-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .1);
}

.playlist-head,
.playlist-songs {
  min-width: 0;
}

.playlist-head {
  flex: 1;
}

.playlist-songs {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
}

.list-row-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .08);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 0;
  border-bottom: 1px solid hsl(var(--border) / .25);
}

.setting-row:last-child {
  border-bottom: 0;
}

.switch {
  width: 44px;
  height: 26px;
  flex: 0 0 44px;
  border-radius: 999px;
  background: hsl(var(--muted));
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--ease-out);
}

.switch.on {
  background: hsl(var(--primary));
}

.switch.on::after {
  transform: translateX(18px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th,
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid hsl(var(--border) / .25);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: hsl(var(--muted-foreground));
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  min-width: 0;
}

.rank {
  width: 22px;
  flex: 0 0 22px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.rank-art {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  object-fit: cover;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .1);
}

.field-hint {
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.4;
  color: hsl(var(--muted-foreground));
}

/* Mobile navigation is a fixed, touch-friendly bottom bar. */
.bottom-nav {
  position: relative;
  z-index: 25;
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 10px max(9px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, hsl(var(--background) / .65), hsl(var(--background) / .96));
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
}

/* The bar renders nav buttons directly (no inner <nav>), so the pill styling
   lives on the container itself. */
.bottom-nav > .nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav .nav-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 7px 5px;
}

.bottom-nav > .nav-btn {
  display: flex;
}

.bottom-nav > .nav-btn span {
  max-width: 0;
}

.bottom-nav > .nav-btn.active span {
  max-width: 80px;
}

.main > .content {
  padding-bottom: 18px;
}

.mini-player {
  flex: 0 0 auto;
}

/* Touch/keyboard accessibility */
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid hsl(var(--primary) / .65);
  outline-offset: 2px;
}

/* iOS Safari zoom prevention and safer compact spacing. */
@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
  }

  .app {
    height: 100dvh;
    min-height: 100svh;
  }

  .content {
    padding: 16px 14px 18px;
  }

  .mobile-header {
    margin-bottom: 16px;
  }

  .searchbar {
    margin-bottom: 13px;
    border-radius: 15px;
  }

  .searchbar input {
    min-height: 50px;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 16px;
  }

  .chips {
    margin-left: -14px;
    margin-right: -14px;
    padding-inline: 14px;
  }

  .quickpicks {
    gap: 11px;
    margin-left: -14px;
    margin-right: -14px;
    padding-inline: 14px;
  }

  .quick-card,
  .quick-art {
    width: 150px;
    min-width: 150px;
  }

  .quick-art {
    height: 150px;
    border-radius: 15px;
  }

  .section {
    margin-top: 20px;
  }

  .section-title {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .song-list {
    gap: 2px;
  }

  .song-row {
    min-height: 64px;
    padding: 7px 5px;
    gap: 9px;
    border-radius: 13px;
  }

  .song-row .song-art {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 11px;
  }

  .song-title {
    font-size: 13px;
  }

  .song-artist {
    font-size: 10.5px;
  }

  .song-actions .icon-btn {
    width: 31px;
    height: 31px;
    padding: 6px;
  }

  .mini-player {
    margin: 0 8px 5px;
  }

  .mini-shell {
    height: 58px;
    border-radius: 15px;
  }

  .mini-art {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .mini-controls {
    gap: 0;
  }

  .ctrl {
    width: 31px;
    height: 31px;
  }

  .ctrl.play {
    width: 38px;
    height: 38px;
  }

  .page-pad {
    max-width: none;
  }

  .card {
    border-radius: 19px;
    padding: 15px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    min-width: 0;
  }

  .profile-head {
    align-items: flex-start;
  }

  .profile-head .avatar-lg {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-radius: 20px;
  }

  .auth-wrap {
    align-items: flex-start;
    padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  }

  .auth-card {
    max-width: 440px;
    margin: auto 0;
    padding: 24px 18px;
    border-radius: 20px;
  }

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

  .field .control {
    min-height: 50px;
    height: 50px;
  }

  .fsp-main {
    gap: 14px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .fsp-art {
    width: min(78vw, 330px);
    max-width: 330px;
    border-radius: 22px;
  }

  .fsp-info,
  .seek-wrap,
  .fsp-controls,
  .volume {
    max-width: 520px;
  }

  .fsp-controls .ctrl {
    width: 42px;
    height: 42px;
  }

  .fsp-controls .big {
    width: 56px;
    height: 56px;
  }

  .modal-card {
    max-height: 92dvh;
    padding: 17px;
  }
}

@media (max-width: 390px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .quickpicks {
    margin-left: -12px;
    margin-right: -12px;
    padding-inline: 12px;
  }

  .quick-card,
  .quick-art {
    width: 138px;
    min-width: 138px;
  }

  .quick-art {
    height: 138px;
  }

  .song-row .song-art {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .song-row {
    gap: 7px;
  }

  .song-actions .icon-btn {
    width: 29px;
    height: 29px;
    padding: 5px;
  }

  .nav-btn {
    min-height: 46px;
  }

  .nav-btn span {
    font-size: 10px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .content {
    padding: 24px 24px 18px;
  }

  .quick-card,
  .quick-art {
    width: 172px;
    min-width: 172px;
  }

  .quick-art {
    height: 172px;
  }

  .song-list {
    grid-template-columns: 1fr;
  }

  .playlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (min-width: 1024px) {
  .mobile-only {
    display: none !important;
  }

  .main > .content {
    padding-bottom: 32px;
  }

  .quick-card,
  .quick-art {
    width: 100%;
    min-width: 0;
  }

  .quick-art {
    height: auto;
    aspect-ratio: 1;
  }

  .quickpicks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .playlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-card {
    padding: 34px;
  }
}

@media (min-width: 1440px) {
  .sidebar {
    width: 240px;
  }

  .content {
    padding-left: 40px;
    padding-right: 40px;
  }

  .content > .page {
    max-width: 1120px;
  }

  .quickpicks {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .now-playing-panel {
    width: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   Auth page stability fix.
   On mobile browsers the on-screen keyboard shrinks the visual viewport.
   Locking the page to 100dvh/height:100% made the sign-in card get clipped
   (it looked like the form "disappeared" when an input was focused).
   The auth pages therefore use normal document flow and always scroll.
   ========================================================================== */

html.auth-page,
html:has(body.auth-page) {
  height: auto;
  min-height: 100%;
}

body.auth-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
}

body.auth-page .auth-wrap {
  min-height: 100svh;
  align-items: flex-start;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

body.auth-page .auth-card {
  margin: auto 0;
  animation: none;
  opacity: 1;
}

body.auth-page .field input {
  font-size: 16px; /* prevents iOS Safari zoom-on-focus */
}

@media (max-height: 620px) {
  body.auth-page .auth-wrap {
    min-height: 0;
    align-items: flex-start;
  }
}

/* ========================================================================
   Full screen player: scrollable body + queue rows
   ======================================================================== */

.fsp-main {
  justify-content: flex-start;
  padding-top: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fsp-main > * {
  flex: 0 0 auto;
}

.fsp-art {
  max-width: min(260px, 62vh);
}

#fsp-queue {
  /* Queue remains available in the normal player/desktop panel,
     but is intentionally hidden in the fullscreen Now Playing view
     to match the compact mobile fullscreen design. */
  display: none !important;
}

#fsp-queue .section-label,
#queue-panel .section-label {
  margin: 6px 0 4px;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease;
}

.queue-row:hover {
  background: hsl(var(--song-hover) / .7);
}

.queue-row.active {
  background: hsl(var(--primary) / .16);
}

.queue-row.active .song-title {
  color: hsl(var(--primary));
}

.queue-row img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  object-fit: cover;
}

.queue-row .song-title,
.queue-row .song-artist {
  display: block;
}

#queue-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* The mini player as a whole opens the full screen player. */
.mini-inner .mini-meta,
.mini-art {
  cursor: pointer;
}


/* Fullscreen Now Playing matches the compact reference player:
   no rotating cover and no volume row; the Like pill remains centered. */
#fsp .volume {
  justify-content: center;
  max-width: 384px;
}
#fsp .volume > .ctrl,
#fsp .volume > .bar {
  display: none !important;
}
#fsp .volume .pill-btn {
  margin: 0 auto;
}

/* Team member avatars: uploaded portraits/logos are always circular and neatly cropped. */
.team-card .avatar-lg,
#member-root .avatar-lg {
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-left: auto;
  margin-right: auto;
}
.team-card .avatar-lg img,
#member-root .avatar-lg img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* -------------------------------------------------------------------------
   Final mobile/music-player polish requested for the current OuterTune build.
   Album artwork is static (never rotated); the small brand disc is the only
   decorative element that may animate.
   ------------------------------------------------------------------------- */
.fsp-main {
  justify-content: center;
  gap: 18px;
  padding-top: 10px;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
}

.fsp-art,
.fsp-art img,
.quick-art img,
.mini-art,
.song-row .song-art,
.song-row .song-art img {
  animation: none !important;
  transform: none !important;
}

.fsp-art {
  width: min(78vw, 340px);
  max-width: 340px;
  border-radius: 24px;
}

.fsp-art img {
  object-fit: cover;
}

.fsp-info {
  max-width: 520px;
  text-align: left;
}

.fsp-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.fsp-info h2 {
  font-size: clamp(17px, 4.7vw, 21px);
  font-weight: 800;
}

.fsp-info p {
  font-size: 13px;
  margin-top: 4px;
}

.fsp-heart {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  color: hsl(var(--foreground) / .78);
  border: 0;
  background: transparent;
}

.fsp-heart.liked {
  color: hsl(var(--primary));
}

.fsp-heart.liked svg {
  fill: currentColor;
}

.fsp-controls {
  max-width: 520px;
}

.fsp-controls .ctrl {
  width: 48px;
  height: 48px;
}

.fsp-controls .big {
  width: 64px;
  height: 64px;
}

#fsp .volume {
  display: none !important;
}

.fsp-actions {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 0;
}

.fsp-action {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: hsl(var(--foreground) / .68);
  border-radius: 50%;
}

.fsp-action:active,
.fsp-heart:active {
  background: hsl(var(--foreground) / .08);
}

#queue-panel {
  display: none !important;
}

/* Team photos are always circular and use the correct uploaded crop. */
.team-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.team-card .avatar-lg,
#member-root .avatar-lg {
  border-radius: 50% !important;
}

@media (max-width: 767px) {
  .fsp-main {
    gap: 16px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .fsp-art {
    width: min(80vw, 340px);
    max-width: 340px;
  }

  .fsp-info,
  .seek-wrap,
  .fsp-controls,
  .fsp-actions {
    max-width: 520px;
  }

  .fsp-controls .ctrl {
    width: 44px;
    height: 44px;
  }

  .fsp-controls .big {
    width: 60px;
    height: 60px;
  }

  .fsp-actions {
    padding-inline: 2px;
  }
}

@media (max-height: 760px) and (max-width: 767px) {
  .fsp-main {
    gap: 10px;
    overflow-y: auto;
  }

  .fsp-art {
    width: min(62vw, 285px);
  }
}

/* Team member cards: circular portraits and complete member details. */
.team-grid { gap: 14px; }
.team-grid .team-card { min-height: 250px; }
.team-card .avatar-lg { margin: 0 auto; }
.team-tags { display:flex; flex-wrap:wrap; justify-content:center; }
@media (min-width: 700px) {
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===================== Final professional player polish ===================== */
.fsp-head .round-btn {
  border: 1px solid hsl(var(--foreground) / .12);
  background: hsl(var(--background) / .48);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.fsp-head .round-btn:hover,
.fsp-head .round-btn:focus-visible {
  background: hsl(var(--foreground) / .10);
  border-color: hsl(var(--foreground) / .22);
  transform: translateY(-1px);
}

.fsp-controls {
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid hsl(var(--foreground) / .08);
  border-radius: 24px;
  background: hsl(var(--background) / .28);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 35px rgba(0,0,0,.16);
}

.fsp-controls .ctrl {
  border: 1px solid transparent;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: hsl(var(--foreground) / .72);
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.fsp-controls .ctrl:hover,
.fsp-controls .ctrl:focus-visible {
  background: hsl(var(--foreground) / .09);
  border-color: hsl(var(--foreground) / .12);
  color: hsl(var(--foreground));
  transform: scale(1.04);
}

.fsp-controls .ctrl.on {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .12);
  border-color: hsl(var(--primary) / .25);
}

.fsp-controls .ctrl.big {
  border: 0;
  box-shadow: 0 10px 28px hsl(var(--primary) / .28);
  transform: scale(1.02);
}

.fsp-controls .ctrl.big:hover,
.fsp-controls .ctrl.big:focus-visible {
  transform: scale(1.07);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.fsp-actions {
  gap: 10px;
  justify-content: center;
  padding: 8px;
  border: 1px solid hsl(var(--foreground) / .08);
  border-radius: 18px;
  background: hsl(var(--background) / .24);
  backdrop-filter: blur(12px);
}

.fsp-action {
  width: 52px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.fsp-action:hover,
.fsp-action:focus-visible {
  color: hsl(var(--foreground));
  background: hsl(var(--foreground) / .08);
  border-color: hsl(var(--foreground) / .11);
  transform: translateY(-1px);
}

.fsp-heart {
  border: 1px solid hsl(var(--foreground) / .09);
  border-radius: 50%;
  background: hsl(var(--background) / .24);
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.fsp-heart:hover,
.fsp-heart:focus-visible {
  background: hsl(var(--foreground) / .09);
  transform: scale(1.05);
}

/* Give the fullscreen player a balanced, non-empty layout on tall phones. */
@media (min-height: 760px) and (max-width: 767px) {
  .fsp-main { gap: 18px; }
  .fsp-art { width: min(78vw, 330px); }
  .fsp-actions { margin-top: 2px; }
}

/* Team page: two polished cards, never a stale empty-state. */
.team-grid .team-card {
  min-height: 330px;
  display: block;
  text-align: center;
  border: 1px solid hsl(var(--foreground) / .08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.team-grid .team-card:hover,
.team-grid .team-card:focus-visible {
  transform: translateY(-3px);
  border-color: hsl(var(--primary) / .28);
  box-shadow: 0 18px 45px rgba(0,0,0,.20);
}
.team-card .avatar-lg {
  width: 112px;
  height: 112px;
  min-width: 112px;
  min-height: 112px;
  border: 3px solid hsl(var(--primary) / .28);
  box-shadow: 0 10px 30px rgba(0,0,0,.24), 0 0 0 6px hsl(var(--background) / .35);
}
.team-card .avatar-lg img { object-fit: cover; }

@media (max-width: 699px) {
  .team-grid { grid-template-columns: 1fr !important; }
  .team-grid .team-card { min-height: 310px; }
}


/* ===================== Reference-style Now Playing controls ===================== */
.fsp-controls {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.fsp-controls .ctrl {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: hsl(var(--foreground) / .72);
  display: grid;
  place-items: center;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.fsp-controls .ctrl:hover,
.fsp-controls .ctrl:focus-visible {
  background: hsl(var(--foreground) / .08);
  color: hsl(var(--foreground));
  transform: scale(1.06);
}
.fsp-controls .ctrl.on {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .12);
}
.fsp-controls .ctrl.big {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
.fsp-controls .ctrl.big:hover,
.fsp-controls .ctrl.big:focus-visible {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  transform: scale(1.05);
}
.fsp-actions {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.fsp-action {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: hsl(var(--foreground) / .66);
  display: grid;
  place-items: center;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.fsp-action:hover,
.fsp-action:focus-visible {
  color: hsl(var(--foreground));
  background: hsl(var(--foreground) / .08);
  transform: scale(1.06);
}
.fsp-heart {
  border: 0;
  background: transparent;
}
@media (max-width: 767px) {
  .fsp-controls { gap: 4px; }
  .fsp-controls .ctrl { width: 46px; height: 46px; flex-basis: 46px; }
  .fsp-controls .ctrl.big { width: 68px; height: 68px; flex-basis: 68px; }
  .fsp-actions { padding-inline: 0; }
}

/* ===================== Now Playing reference redesign (2026-08-15) ===================== */
.fsp {
  background: #08090d;
}
.fsp-bg {
  transform: scale(1.18);
  filter: blur(72px) brightness(.34) saturate(1.35);
}
.fsp-veil {
  background: linear-gradient(180deg, rgba(9,10,14,.66) 0%, rgba(8,9,13,.78) 45%, rgba(6,7,10,.94) 100%);
  backdrop-filter: blur(20px);
}
.fsp-head {
  padding: max(18px, env(safe-area-inset-top)) 22px 8px;
}
.fsp-head .round-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
}
.fsp-head span {
  font-size: 14px;
  letter-spacing: .01em;
  text-transform: none;
  color: #fff;
  font-weight: 700;
}
.fsp-head > div {
  width: 48px !important;
}
.fsp-main {
  gap: 15px;
  padding: 8px 24px max(24px, env(safe-area-inset-bottom));
  justify-content: center;
}
.fsp-art {
  width: min(76vw, 340px);
  max-width: 340px;
  border-radius: 50%;
  aspect-ratio: 1;
  box-shadow: 0 28px 70px rgba(0,0,0,.46), 0 0 0 1px rgba(255,255,255,.08);
}
.fsp-art img {
  border-radius: 50%;
}
.fsp-info {
  max-width: 520px;
  text-align: center;
}
.fsp-title-row {
  align-items: center;
  justify-content: center;
}
.fsp-info h2 {
  font-size: clamp(22px, 5.2vw, 30px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.025em;
  color: #fff;
}
.fsp-info p {
  margin-top: 7px;
  font-size: 14px;
  color: rgba(255,255,255,.64);
}
.fsp-heart {
  position: absolute;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
}
.fsp-caption {
  margin-top: 12px;
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.38);
  text-align: center;
}
.seek-wrap {
  max-width: 560px;
}
.seek {
  height: 4px;
  background: rgba(255,255,255,.18);
}
.seek > div {
  background: hsl(var(--primary));
}
.times {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255,255,255,.58);
}
.fsp-controls {
  max-width: 560px;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.fsp-controls .ctrl {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  color: rgba(255,255,255,.82);
}
.fsp-controls .ctrl.main {
  background: rgba(18,20,29,.82);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.fsp-controls .ctrl.big {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 12px 32px hsl(var(--primary) / .32);
}
.fsp-actions {
  max-width: 560px;
  justify-content: center;
  gap: 28px;
}
.fsp-action {
  width: 46px;
  height: 46px;
  color: rgba(255,255,255,.52);
}
.fsp-action#fsp-repeat.on {
  color: hsl(var(--primary));
}
@media (max-width: 767px) {
  .fsp-main { gap: 13px; padding-inline: 20px; }
  .fsp-art { width: min(68vw, 310px); }
  .fsp-controls { gap: 6px; }
  .fsp-controls .ctrl { width: 48px; height: 48px; flex-basis: 48px; }
  .fsp-controls .ctrl.big { width: 70px; height: 70px; flex-basis: 70px; }
  .fsp-head { padding-inline: 16px; }
  .fsp-heart { right: 10px; }
  .fsp-caption { font-size: 12px; }
}
@media (max-height: 700px) and (max-width: 767px) {
  .fsp-main { gap: 9px; }
  .fsp-art { width: min(53vh, 260px); }
  .fsp-info h2 { font-size: 21px; }
  .fsp-caption { margin-top: 6px; }
}


/* Professional secondary actions for fullscreen player */
.fsp-actions {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
}
.fsp-actions .action-chip {
  width: auto;
  min-width: 92px;
  height: 46px;
  padding: 0 15px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.fsp-actions .action-chip:active { transform: scale(.96); }
.fsp-actions .action-chip:hover {
  color: #fff;
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.13);
}
.fsp-actions .action-chip .action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.fsp-actions .action-chip .action-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}
.fsp-actions .action-chip#fsp-repeat.on {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .10);
  border-color: hsl(var(--primary) / .28);
}
@media (max-width: 767px) {
  .fsp-actions { gap: 8px; }
  .fsp-actions .action-chip { min-width: 86px; height: 44px; padding-inline: 12px; border-radius: 14px; }
  .fsp-actions .action-chip .action-label { font-size: 11px; }
}
@media (max-width: 380px) {
  .fsp-actions .action-chip { min-width: 0; flex: 1; padding-inline: 8px; }
}

/* ===================== Final mobile polish ===================== */
.home-load-sentinel {
  min-height: 54px;
  margin: 8px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 600;
}
.home-load-sentinel .loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(var(--primary));
  box-shadow: 0 0 0 5px hsl(var(--primary) / .10);
  animation: otPulse 1.2s ease-in-out infinite;
}
@keyframes otPulse { 50% { transform: scale(.72); opacity: .55; } }

/* Icon-only secondary controls, closer to a native music player. */
.fsp-actions {
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 2px;
}
.fsp-actions .action-chip {
  min-width: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
  color: rgba(255,255,255,.68);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.fsp-actions .action-chip:hover,
.fsp-actions .action-chip:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.14);
  transform: translateY(-1px) scale(1.04);
}
.fsp-actions .action-chip .action-label {
  display: none;
}
.fsp-actions .action-chip#fsp-repeat.on {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .11);
  border-color: hsl(var(--primary) / .28);
}
@media (max-width: 767px) {
  .fsp-actions { gap: 12px; }
  .fsp-actions .action-chip { width: 46px; height: 46px; }
}

/* Final secondary action icon polish: clean native music-player controls. */
.fsp-actions .action-chip {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.72);
  box-shadow: 0 7px 20px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.035);
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.fsp-actions .action-chip .action-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  line-height: 0;
}
.fsp-actions .action-chip .action-icon svg {
  width: 21px;
  height: 21px;
  display: block;
}
.fsp-actions .action-chip .action-label { display: none; }
.fsp-actions .action-chip:hover,
.fsp-actions .action-chip:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.105);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transform: translateY(-1px);
}
.fsp-actions .action-chip:active { transform: scale(.94); }
.fsp-actions .action-chip#fsp-repeat.on {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .12);
  border-color: hsl(var(--primary) / .30);
}
@media (max-width: 767px) {
  .fsp-actions { gap: 14px; }
  .fsp-actions .action-chip { flex-basis: 46px; width: 46px; height: 46px; }
}


/* ===================== Clean reference Now Playing v2 =====================
   Only the controls shown in the reference are visible on the fullscreen player. */
#fsp .fsp-head {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 18px 8px;
}
#fsp .fsp-head > span {
  justify-self: center;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
  color: #fff;
}
#fsp .fsp-head .round-btn,
#fsp .fsp-head .fsp-head-heart {
  position: static;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
#fsp .fsp-head .round-btn:hover,
#fsp .fsp-head .round-btn:focus-visible,
#fsp .fsp-head .fsp-head-heart:hover,
#fsp .fsp-head .fsp-head-heart:focus-visible {
  background: rgba(255,255,255,.14);
  color: #fff;
  transform: scale(1.04);
}
#fsp .fsp-head .fsp-head-heart.liked {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / .13);
}
#fsp .fsp-head .fsp-head-heart.liked svg { fill: currentColor; }

#fsp .fsp-main {
  gap: 16px;
  padding: 8px 22px max(24px, env(safe-area-inset-bottom));
  justify-content: center;
  overflow: hidden;
}
#fsp .fsp-art {
  width: min(64vw, 460px);
  max-width: 460px;
  border-radius: 50%;
  aspect-ratio: 1;
  box-shadow: 0 28px 70px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.08);
}
#fsp .fsp-art img { border-radius: 50%; }
#fsp .fsp-info {
  width: 100%;
  max-width: 560px;
  text-align: center;
}
#fsp .fsp-title-row {
  width: 100%;
  display: block;
}
#fsp .fsp-info h2 {
  font-size: clamp(22px, 4.6vw, 30px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}
#fsp .fsp-info p {
  margin-top: 7px;
  font-size: clamp(14px, 2.5vw, 17px);
  color: rgba(255,255,255,.62);
}
#fsp .fsp-caption,
#fsp .volume,
#fsp .fsp-actions { display: none !important; }
#fsp .seek-wrap { width: 100%; max-width: 610px; }
#fsp .seek { height: 5px; background: rgba(255,255,255,.18); }
#fsp .seek > div { background: hsl(var(--primary)); }
#fsp .times { margin-top: 8px; font-size: 11px; color: rgba(255,255,255,.58); }
#fsp .fsp-controls {
  width: 100%;
  max-width: 610px;
  padding: 0;
  gap: clamp(2px, 2.2vw, 18px);
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  justify-content: space-between;
}
#fsp .fsp-controls .ctrl {
  width: clamp(46px, 7vw, 56px);
  height: clamp(46px, 7vw, 56px);
  flex: 0 0 clamp(46px, 7vw, 56px);
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.76);
}
#fsp .fsp-controls .ctrl.main {
  background: rgba(18,20,29,.82);
  border: 1px solid rgba(255,255,255,.07);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
#fsp .fsp-controls .ctrl.big {
  width: clamp(68px, 10vw, 78px);
  height: clamp(68px, 10vw, 78px);
  flex-basis: clamp(68px, 10vw, 78px);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 12px 32px hsl(var(--primary) / .30);
}
#fsp .fsp-controls .ctrl:hover,
#fsp .fsp-controls .ctrl:focus-visible {
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: scale(1.04);
}
#fsp .fsp-controls .ctrl.main:hover,
#fsp .fsp-controls .ctrl.main:focus-visible {
  background: rgba(28,30,40,.95);
}
#fsp .fsp-controls .ctrl.big:hover,
#fsp .fsp-controls .ctrl.big:focus-visible {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  transform: scale(1.05);
}
#fsp .fsp-controls .ctrl.on {
  color: hsl(var(--primary));
  background: transparent;
}

@media (max-width: 767px) {
  #fsp .fsp-head { grid-template-columns: 44px 1fr 44px; padding-inline: 14px; }
  #fsp .fsp-head .round-btn,
  #fsp .fsp-head .fsp-head-heart { width: 44px; height: 44px; min-width: 44px; }
  #fsp .fsp-main { gap: 14px; padding-inline: 18px; }
  #fsp .fsp-art { width: min(66vw, 420px); }
  #fsp .fsp-controls { gap: 2px; }
}
@media (max-width: 390px) {
  #fsp .fsp-head { grid-template-columns: 42px 1fr 42px; }
  #fsp .fsp-head .round-btn,
  #fsp .fsp-head .fsp-head-heart { width: 42px; height: 42px; min-width: 42px; }
  #fsp .fsp-main { gap: 11px; padding-inline: 14px; }
  #fsp .fsp-art { width: min(63vw, 300px); }
  #fsp .fsp-info h2 { font-size: 21px; }
  #fsp .fsp-info p { font-size: 13px; }
}
@media (max-height: 700px) and (max-width: 767px) {
  #fsp .fsp-main { gap: 8px; }
  #fsp .fsp-art { width: min(52vh, 280px); }
  #fsp .fsp-info h2 { font-size: 20px; }
}
@media (min-width: 900px) {
  #fsp .fsp-art { width: min(34vw, 460px); }
  #fsp .fsp-main { gap: 18px; }
}
