/* ── Reset / Tokens ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #050505;
  --surface: #121212;
  --surface-2: #181818;
  --surface-3: #222222;
  --text: #ffffff;
  --text-2: #a7a7a7;
  --text-3: #666666;
  --accent: #4a9eff;
  --accent-dim: #2a6abf;
  --danger: #e55;
  --border: #232323;
  --radius: 12px;
  --radius-sm: 8px;
  --row-h: 60px;
  --nav-h: 56px;
  --mini-h: 60px;
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

svg { display: block; }

.hidden { display: none !important; }

/* ── Type scale ── */
.t-title  { font-size: 22px; font-weight: 700; }
.t-head   { font-size: 17px; font-weight: 700; }
.t-body   { font-size: 15px; font-weight: 400; }
.t-sub    { font-size: 13px; font-weight: 400; color: var(--text-2); }
.t-micro  { font-size: 11px; font-weight: 400; color: var(--text-2); }

/* ── App shell ── */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

#views {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--sat) + 12px) max(16px, var(--sar)) 0 max(16px, var(--sal));
  /* clear mini player + nav */
  padding-bottom: calc(var(--nav-h) + var(--mini-h) + var(--sab) + 24px);
  display: none;
}

.view.active { display: block; }

.view-title {
  font-size: 28px;
  font-weight: 700;
  padding: 8px 0 16px;
}

/* Detail header w/ back button */
.detail-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 8px;
  min-height: 44px;
}

.icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
}

.icon-btn:active { background: var(--surface-2); }

.detail-bar-title {
  font-size: 17px;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.detail-bar-spacer { min-width: 44px; }

/* ── Bottom nav ── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--sab));
  padding-bottom: var(--sab);
  padding-left: var(--sal);
  padding-right: var(--sar);
  background: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
}

.nav-item.active { color: var(--text); }
.nav-item svg { width: 24px; height: 24px; }

/* ── Mini player ── */
#mini-player {
  position: fixed;
  left: calc(6px + var(--sal));
  right: calc(6px + var(--sar));
  bottom: calc(var(--nav-h) + var(--sab) + 4px);
  height: var(--mini-h);
  background: var(--surface-2);
  border-radius: var(--radius);
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 4px 0 8px;
  z-index: 101;
  overflow: hidden;
  transition: background 0.4s;
}

#mini-player.active { display: flex; }

#mini-art {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-3);
}

#mini-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#mini-title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#mini-artist {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#mini-play {
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

#mini-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
}

#mini-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--text);
}

/* ── Cards / grids ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 14px 12px;
}

.card { cursor: pointer; }

.card-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-2);
  display: block;
}

.card-art.round { border-radius: 50%; }

.card-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.card-sub {
  font-size: 11px;
  color: var(--text-2);
  text-align: center;
  margin-top: 2px;
}

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ── Quick actions ── */
#quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.quick-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 64px;
  text-align: left;
}

.quick-btn:active { background: var(--surface-2); }

.quick-btn svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}

.quick-btn-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.quick-btn-title { font-size: 14px; font-weight: 700; }
.quick-btn-sub { font-size: 11px; color: var(--text-2); }

.section-head {
  font-size: 17px;
  font-weight: 700;
  margin: 4px 0 12px;
}

/* ── Track rows ── */
.row-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.row-behind {
  position: absolute;
  inset: 0;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: #fff;
  border-radius: var(--radius-sm);
}

.row-behind svg { width: 22px; height: 22px; }

.track-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--row-h);
  padding: 0 4px 0 8px;
  cursor: pointer;
  background: var(--bg);
  transition: transform 0.2s ease-out;
  border-radius: var(--radius-sm);
}

.track-row.swiping { transition: none; }
.track-row:active { background: var(--surface); }

.track-row.flash { animation: rowFlash 0.5s ease-out; }

@keyframes rowFlash {
  0% { background: var(--accent-dim); }
  100% { background: var(--bg); }
}

.row-art {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}

.row-num {
  width: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  flex-shrink: 0;
}

.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-title {
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row.playing .row-title { color: var(--accent); font-weight: 700; }
.track-row.playing .row-num { color: var(--accent); }

.row-sub {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-sub .badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.row-sub .badge svg { width: 13px; height: 13px; }

.row-menu-btn {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
  border-radius: 50%;
}

.row-menu-btn:active { background: var(--surface-2); color: var(--text); }

/* Generic list row (artists/albums in library & search) */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--row-h);
  padding: 0 4px 0 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.list-row:active { background: var(--surface); }
.list-row .row-art.round { border-radius: 50%; }

.chev {
  color: var(--text-3);
  flex-shrink: 0;
  padding-right: 8px;
}

/* ── Album / artist detail ── */
.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 20px;
  gap: 14px;
}

.detail-hero-art {
  width: min(55vw, 240px);
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.detail-hero-art.round { border-radius: 50%; }

.detail-hero-info { text-align: center; }
.detail-hero-info h2 { font-size: 22px; font-weight: 700; }
.detail-hero-info p { font-size: 13px; color: var(--text-2); margin-top: 4px; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
}

.pill-btn:active { background: var(--accent-dim); }
.pill-btn.secondary { background: var(--surface-2); color: var(--text); }
.pill-btn svg { width: 16px; height: 16px; }

.hero-actions { display: flex; gap: 10px; }

/* ── Search ── */
#search-box {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 4px 0 12px;
}

#search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 44px;
}

#search-input-wrap svg { width: 18px; height: 18px; color: var(--text-2); flex-shrink: 0; }

#search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  min-width: 0;
}

#search-clear { color: var(--text-2); min-width: 32px; min-height: 44px; display: none; align-items: center; justify-content: center; }
#search-clear.visible { display: flex; }

.search-section-head {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
  margin: 18px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.empty-note {
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
  padding: 40px 20px;
}

/* ── Library chips ── */
#library-controls {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 4px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip {
  padding: 8px 16px;
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 36px;
}

.chip.active { background: var(--accent); color: #fff; font-weight: 700; }

.sort-row {
  display: flex;
  justify-content: flex-end;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 13px;
  padding: 6px 8px;
  min-height: 36px;
}

.sort-btn svg { width: 15px; height: 15px; }

.lib-season-group { margin-left: 18px; }

/* ── Skeletons ── */
@keyframes shimmer {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.skel { animation: shimmer 1.4s ease-in-out infinite; }

.skel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--row-h);
  padding: 0 8px;
}

.skel-art { width: 44px; height: 44px; border-radius: 4px; background: var(--surface-2); flex-shrink: 0; }
.skel-line { height: 12px; border-radius: 6px; background: var(--surface-2); }
.skel-card-art { width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--surface-2); }

/* ── Expanded player ── */
#full-player {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: calc(var(--sat) + 8px) max(20px, var(--sar)) calc(var(--sab) + 16px) max(20px, var(--sal));
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  visibility: hidden;
}

#full-player.open { transform: none; visibility: visible; }
#full-player.dragging { transition: none; }

#fp-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #303030 0%, var(--bg) 62%);
  transition: background 0.6s;
  pointer-events: none;
}

#full-player > * { position: relative; }

#fp-top {
  display: flex;
  align-items: center;
  min-height: 44px;
}

#fp-context {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

#fp-art-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  min-height: 0;
}

#fp-art {
  width: min(82vw, 46vh, 380px);
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7);
}

#fp-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
}

#fp-meta-text { flex: 1; min-width: 0; }

#fp-title {
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fp-artist {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scrubber */
#fp-scrub { padding: 10px 0 0; }

#fp-scrub-track {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

#fp-scrub-rail {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#fp-scrub-fill {
  height: 100%;
  width: 0%;
  background: var(--text);
  border-radius: 2px;
}

#fp-scrub-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  left: 0%;
  transform: translateX(-50%);
  pointer-events: none;
}

#fp-scrub.scrubbing #fp-scrub-thumb { width: 20px; height: 20px; }

#fp-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
  padding-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* Transport */
#fp-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px;
}

.fp-btn {
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 50%;
  position: relative;
}

.fp-btn:active { opacity: 0.6; }
.fp-btn.toggled { color: var(--accent); }
.fp-btn svg { width: 26px; height: 26px; }
.fp-btn.small svg { width: 22px; height: 22px; }

.fp-btn .mode-dot {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
}

.fp-btn.toggled .mode-dot { display: block; }

#fp-play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#fp-play:active { transform: scale(0.94); }
#fp-play svg { width: 30px; height: 30px; }

/* Utility row */
#fp-utility {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 2px 6px 0;
}

.fp-util-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
}

.fp-util-btn svg { width: 18px; height: 18px; }
.fp-util-btn.toggled { color: var(--accent); }
.fp-util-btn:active { background: rgba(255, 255, 255, 0.08); }

/* ── Sheets (queue, action sheet) ── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s;
  visibility: hidden;
}

.sheet-backdrop.open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 301;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: calc(var(--sab) + 8px);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}

.sheet.open { transform: translateY(0); visibility: visible; }

.sheet-grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.sheet-head {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  flex-shrink: 0;
}

.sheet-title { font-size: 17px; font-weight: 700; flex: 1; }

.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px 12px;
}

/* Action sheet options */
.action-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--text);
  border-radius: var(--radius-sm);
  text-align: left;
}

.action-opt:active { background: var(--surface-2); }
.action-opt svg { width: 20px; height: 20px; color: var(--text-2); flex-shrink: 0; }
.action-opt.selected { color: var(--accent); }
.action-opt.selected svg { color: var(--accent); }
.action-opt.danger { color: var(--danger); }
.action-opt.danger svg { color: var(--danger); }

/* Queue sheet */
.q-section-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 16px 4px 6px;
}

.q-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--row-h);
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  position: relative;
  cursor: pointer;
}

.q-row:active { background: var(--surface-2); }

.q-row.dragging {
  background: var(--surface-3);
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.q-row .row-main { pointer-events: none; }

.q-remove {
  min-width: 40px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}

.q-drag {
  min-width: 40px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  touch-action: none;
  cursor: grab;
}

/* ── Video overlay ── */
#video-player {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
}

#video-player.open { display: flex; }

#video-el {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#video-controls {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 25%, transparent 70%, rgba(0,0,0,0.7) 100%);
  opacity: 1;
  transition: opacity 0.25s;
}

#video-controls.faded { opacity: 0; pointer-events: none; }

.vc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--sat) + 8px) max(12px, var(--sar)) 0 max(12px, var(--sal));
}

.vc-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.vc-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.vc-btn {
  min-width: 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
}

.vc-btn:active { background: rgba(255, 255, 255, 0.15); }
.vc-btn svg { width: 28px; height: 28px; }

#vc-play {
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.45);
}

#vc-play svg { width: 36px; height: 36px; }

.vc-bottom {
  padding: 0 max(16px, var(--sar)) calc(var(--sab) + 12px) max(16px, var(--sal));
}

#vc-scrub-track {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

#vc-scrub-rail {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

#vc-scrub-fill { height: 100%; width: 0%; background: var(--accent); }

#vc-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--mini-h) + var(--sab) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-3);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Login gate ── */
#login-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  gap: 24px;
}

#login-gate h1 {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

#login-gate h1 svg { width: 26px; height: 26px; color: var(--accent); }

#login-gate form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 300px;
}

#login-gate input[type="password"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  padding: 12px 16px;
  outline: none;
  width: 100%;
  font-family: inherit;
}

#login-gate input[type="password"]:focus { border-color: var(--accent); }

#login-gate button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  padding: 12px;
  min-height: 44px;
}

#login-error { color: var(--danger); font-size: 13px; text-align: center; min-height: 20px; }

/* Desktop niceties */
@media (hover: hover) {
  .track-row:hover, .list-row:hover { background: var(--surface); }
  .card:hover .card-name { color: var(--accent); }
  .nav-item:hover { color: var(--text); }
}

@media (min-width: 700px) {
  .view { max-width: 860px; margin: 0 auto; left: 50%; transform: translateX(-50%); width: 100%; }
  #mini-player { max-width: 848px; margin: 0 auto; }
}
