*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000000;
  --surface: rgba(16, 16, 18, 0.72);
  --surface-2: rgba(28, 28, 32, 0.65);
  --surface-3: rgba(40, 40, 46, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --dim: rgba(255, 255, 255, 0.42);
  --accent-color: #ffffff;
  --accent-rgb: 255, 255, 255;
  --accent-soft: rgba(255, 255, 255, 0.12);
  --accent-glow: rgba(255, 255, 255, 0.28);
  --glass-tint: rgba(255, 255, 255, 0.05);
  --glass-bg: rgba(10, 10, 12, 0.52);
  --glass-blur: blur(40px) saturate(1.65);
  --glass-highlight: rgba(255, 255, 255, 0.09);
  --ok: #7dffb8;
  --play: #fff;
  --play-text: #111;
  --font: 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --cover-rx: 0deg;
  --cover-ry: 0deg;
  --cover-ty: 0px;
  --cover-jx: 0px;
  --cover-jostle: 0;
  --bg-px: 0px;
  --bg-py: 0px;
  --motion-bass: 0;
  --vinyl-cover-pct: 70%;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
html.theme-transition {
  transition: --accent-color 1.2s ease, --accent-soft 1.2s ease, --glass-tint 1.2s ease;
}
html.theme-transition * {
  transition: border-color 1s ease, box-shadow 0.8s ease, background-color 0.8s ease, color 0.6s ease;
}

body { padding-bottom: 188px; overflow-x: hidden; }
.hidden { display: none !important; }

/* Ambient playback backdrop */
.ambient-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient-bg {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s ease, transform 1.6s ease, filter 1.2s ease;
  filter: saturate(1.2) brightness(0.78);
}
.ambient-bg.is-visible {
  opacity: 0.72;
  transform: scale(1.01) translate3d(var(--bg-px, 0), var(--bg-py, 0), 0);
  filter: saturate(1.3) brightness(0.88);
  transition: opacity 1.2s ease, transform 0.12s linear, filter 1.2s ease;
}
.ambient-layer.ambient-album .ambient-bg.is-visible {
  opacity: 0.88;
  filter: saturate(1.35) brightness(0.92);
}
.ambient-layer.ambient-playing .ambient-bg.is-visible {
  opacity: 0.94;
  transform: scale(1.04) translate3d(var(--bg-px, 0), var(--bg-py, 0), 0);
  filter: saturate(1.45) brightness(0.98);
}
.ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  mix-blend-mode: screen;
}
.ambient-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.65) 100%);
  backdrop-filter: blur(48px) saturate(1.4);
  -webkit-backdrop-filter: blur(48px) saturate(1.4);
}
.ambient-layer.ambient-library .ambient-glass {
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.75) 100%);
  backdrop-filter: blur(48px) saturate(1.4);
  -webkit-backdrop-filter: blur(48px) saturate(1.4);
}
.ambient-layer.ambient-album .ambient-glass {
  background: linear-gradient(135deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.22) 50%, rgba(0,0,0,0.35) 100%);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
}
.ambient-layer.ambient-playing .ambient-glass {
  background: linear-gradient(135deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.42) 100%);
  backdrop-filter: blur(32px) saturate(1.3);
  -webkit-backdrop-filter: blur(32px) saturate(1.3);
}
.ambient-layer.ambient-library .ambient-canvas { opacity: 0.18; }
.ambient-layer.ambient-album .ambient-canvas { opacity: 0.26; }
.ambient-layer.ambient-playing .ambient-canvas { opacity: 0.42; }

/* Shell sits above ambient */
.shell {
  position: relative;
  z-index: 1;
}

/* View transitions */
.view {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  position: absolute;
  width: 100%;
  left: 0;
  visibility: hidden;
}
.view.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  position: relative;
  visibility: visible;
}
#main { position: relative; min-height: 60vh; }

.text-fade { animation: textFadeIn 0.5s ease both; }
.text-swap { animation: textSwapIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes textFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes textSwapIn {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Gate */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.gate-box { text-align: center; width: 100%; max-width: 320px; }
.logo {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.gate-text { color: var(--muted); font-size: 0.8rem; margin: 0.5rem 0 1.5rem; }
.gate input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-family: inherit;
}
.gate-err { color: #c44; font-size: 0.75rem; min-height: 1.2rem; }
.gate-hint { font-size: 0.7rem; color: var(--dim); margin-top: 1rem; }
.gate-hint code { color: var(--muted); }

/* Shell */
.shell { min-height: 100vh; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; background: transparent; }

.glass-bar,
.glass-panel,
.glass-dock,
.glass-drawer,
.glass-modal,
.glass-inset,
.liquid-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
}
.liquid-glass {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 var(--glass-highlight);
}
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.02) 40%, rgba(255,255,255,0.06));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-panel {
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4), inset 0 1px 0 var(--glass-highlight);
}
.glass-inset {
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.glass-btn { background: rgba(255,255,255,0.06) !important; }

.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  margin: 0 -0.5rem 0.75rem;
  border-radius: 16px;
  border-bottom: none;
  position: sticky;
  top: 0.5rem;
  z-index: 20;
  animation: fadeSlideDown 0.55s var(--ease-out) both;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125, 255, 184, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(125, 255, 184, 0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.logo-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.hdr-actions { display: flex; gap: 0.5rem; }
.icon-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.35rem;
  line-height: 1;
}
.icon-btn:hover { color: var(--text); }
.icon-btn.round {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Library grid */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0 4rem;
}

.lib-card {
  cursor: pointer;
  animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lib-card:nth-child(1) { animation-delay: 0.04s; }
.lib-card:nth-child(2) { animation-delay: 0.08s; }
.lib-card:nth-child(3) { animation-delay: 0.12s; }
.lib-card:nth-child(4) { animation-delay: 0.16s; }
.lib-card:hover .lib-cover { transform: scale(1.02); }

.lib-cover-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--border-strong);
  margin-bottom: 0.75rem;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.lib-card:hover .lib-cover-wrap {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 28px var(--accent-soft);
}
.lib-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.lib-cover-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--dim);
  background: linear-gradient(135deg, #1a1a1a, #252525);
}
.lib-play {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.lib-card:hover .lib-play { opacity: 1; }

.lib-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lib-sub {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-fab {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}
.admin-fab.fab-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.admin-fab:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 20px var(--accent-glow);
  border-color: var(--accent-color);
}

.page-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  margin-bottom: 1rem;
  padding: 0;
}
.back-btn:hover { color: var(--text); }

.version-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.version-panel h4 {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.version-row.active { color: var(--text); }
.version-row .ver-label { font-weight: 500; }
.version-row .ver-meta { font-size: 0.7rem; color: var(--muted); }

.ver-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.ver-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.ver-btn:hover { border-color: var(--muted); }
.ver-btn.on { border-color: var(--text); }

.preview-off { opacity: 0.45; }

/* Album view */
.album-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  padding: 1rem 0 6rem;
}

.vinyl-stage {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  overflow: visible;
}
.album-cover-col {
  perspective: 880px;
  perspective-origin: 50% 46%;
  overflow: visible;
}
.vinyl-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
}
.vinyl-spectrum {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.vinyl-stage.playing .vinyl-spectrum { opacity: 1; }
.vinyl-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  filter: blur(14px);
  background: conic-gradient(from 0deg, var(--accent-color), #ffbb33, #66ffaa, #4488ff, var(--accent-color));
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.vinyl-stage.playing .vinyl-glow {
  visibility: visible;
  opacity: calc(0.48 + var(--motion-bass, 0) * 0.38);
  filter: blur(calc(14px + var(--motion-bass, 0) * 10px));
  animation: vinylGlowSpin 8s linear infinite;
}
@keyframes vinylGlowSpin {
  to { transform: rotate(360deg); }
}
.vinyl-peek {
  position: absolute;
  left: calc(var(--vinyl-cover-pct) / 2);
  top: 50%;
  width: var(--vinyl-cover-pct);
  aspect-ratio: 1;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(-58%);
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease,
    transform 0.65s var(--ease-out);
}
.vinyl-stage.playing .vinyl-peek {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}
.vinyl-wobble {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.vinyl-stage.playing .vinyl-wobble {
  animation: vinylFloat 4.4s ease-in-out infinite;
}
@keyframes vinylFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.vinyl-spin-inner {
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}
.vinyl-stage.playing .vinyl-spin-inner {
  animation: vinylSpin 5.5s linear infinite;
}
@keyframes vinylSpin {
  to { transform: rotate(360deg); }
}
.vinyl-disk {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, #222 0 1px, #111 1px 3px, #0a0a0a 3px 5px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65), inset 0 0 24px rgba(0, 0, 0, 0.85);
  position: relative;
  transform-origin: 50% 50%;
}
.vinyl-disk::before {
  content: '';
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background-image: var(--vinyl-cover, none);
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5);
}
.vinyl-disk::after {
  content: '';
  position: absolute;
  width: 10%;
  height: 10%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #000;
  box-shadow: inset 0 0 4px #333;
}
.vinyl-stage.playing .vinyl-disk {
  animation: none;
}
.album-cover-front {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 5;
  width: var(--vinyl-cover-pct);
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
  background: var(--surface);
  isolation: isolate;
  will-change: transform;
  transform:
    translateY(calc(-50% + var(--cover-ty, 0px)))
    translateX(var(--cover-jx, 0))
    rotateX(var(--cover-rx, 0deg))
    rotateY(var(--cover-ry, 0deg));
  transition: box-shadow 0.45s ease, filter 0.45s ease;
}
.is-album-motion .album-cover-front {
  animation: coverIdleDrift 7s ease-in-out infinite;
}
.vinyl-stage.playing .album-cover-front {
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.65),
    0 0 calc(20px + var(--motion-bass, 0) * 52px) var(--accent-soft);
  animation: coverPulse 2.8s ease-in-out infinite;
}
@keyframes coverIdleDrift {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.04); }
}
@keyframes coverPulse {
  0%, 100% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1.08) saturate(1.12); }
}
.album-cover-img, .album-cover-ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.album-cover-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
  font-size: 4rem;
  color: var(--dim);
  min-height: 100%;
}
.album-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.album-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.album-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.lock-tag { font-size: 0.7rem; }
.album-actions { display: flex; align-items: center; gap: 0.75rem; }
.play-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-color);
  color: var(--play-text);
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding-left: 3px;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.play-circle:hover { transform: scale(1.05); }

.add-track-btn {
  width: 100%;
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 0.75rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}
.add-track-btn:hover { border-color: var(--muted); color: var(--text); }

.track-list {
  margin-top: 0.5rem;
  overflow-x: auto;
}
.track-list-scroll { min-width: 880px; width: 100%; }

.track-list-header,
.track-row {
  display: grid;
  grid-template-columns:
    1.5rem
    minmax(120px, 1.4fr)
    2.6rem
    5.5rem
    4.5rem
    6.5rem
    11rem
    2.6rem
    1.4rem;
  gap: 0.35rem 0.85rem;
  align-items: center;
  padding: 0.5rem 0.35rem;
}

.track-list-header {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dim);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.15rem;
  padding-bottom: 0.45rem;
}
.track-list-header span:nth-child(2) { text-align: left; }
.track-list-header span:nth-child(n+3):not(.codec-h) { text-align: right; }
.track-list-header span.codec-h { text-align: left; }
.track-title-cell { min-width: 0; padding-right: 0.5rem; }

.track-row {
  border-radius: 8px;
  cursor: pointer;
}
.track-row:hover { background: var(--accent-soft); }
.track-row.active {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent-color);
}
.track-row.disabled { opacity: 0.35; cursor: default; }
.track-row.disabled:hover { background: transparent; }

.track-num {
  font-size: 0.8rem;
  color: var(--dim);
  text-align: center;
}
.track-row.active .track-num { color: transparent; }
.track-row.active .track-num::before {
  content: '♪';
  color: var(--text);
  display: block;
  animation: pulse 1s ease infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.track-name { font-weight: 500; font-size: 0.9rem; }
.preview-off-tag {
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #c9a;
  border: 1px solid #664;
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.dock-sub.play-error { color: #e9a8a8; }
.track-date { font-size: 0.72rem; color: var(--muted); margin-top: 0.1rem; }
.track-meta {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.track-meta.codec { text-align: left; }
.track-list-header span.codec-h { text-align: left; }
.track-meta--bitrate,
.track-meta--tech {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 0.7rem;
}
.track-meta.warn { color: #aa8; }
.track-meta.dim { color: var(--dim); }
.fmt-badge {
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  text-transform: uppercase;
}
.fmt-badge.warn { border-color: #664; color: #aa8; }
.track-more {
  background: none; border: none; color: var(--dim);
  cursor: pointer; padding: 0.25rem 0.5rem; font-size: 1rem;
}

/* Corner mini player (now playing on another project) */
.mini-player {
  position: fixed;
  left: 16px;
  bottom: 108px;
  z-index: 99;
  max-width: min(240px, calc(100vw - 32px));
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.mini-player.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
}
.mini-player-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem 0.45rem 0.45rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  text-align: left;
  width: 100%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.mini-player-btn:hover { border-color: var(--muted); }
.mini-art {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.mini-cover, .mini-cover-ph {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.mini-cover-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--dim);
  font-size: 0.85rem;
}
.mini-vinyl-spin {
  position: absolute;
  right: -2px;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  z-index: 1;
  transform-origin: 50% 50%;
}
.mini-vinyl-disk {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #333 0 1px, #1a1a1a 1px 2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.mini-vinyl-disk::before {
  content: '';
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background-image: var(--mini-vinyl-cover, none);
  background-size: cover;
  background-position: center;
}
.mini-vinyl-disk::after {
  content: '';
  position: absolute;
  width: 18%;
  height: 18%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #000;
}
.mini-player.playing .mini-vinyl-spin {
  animation: vinylSpin 5.5s linear infinite;
}
.mini-text { min-width: 0; flex: 1; }
.mini-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-album {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

/* Dock player */
.dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1080px;
  border-radius: 14px;
  padding: 0.65rem 1rem 0.55rem;
  display: grid;
  grid-template-columns: minmax(110px, 170px) 1fr auto;
  gap: 0.65rem 0.85rem;
  align-items: start;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.is-playing-motion .dock {
  animation: dockGlow 3.2s ease-in-out infinite;
}
@keyframes dockGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 12px 42px rgba(0,0,0,0.58), 0 0 28px var(--accent-soft); }
}
.dock-left { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.dock-thumb {
  width: 44px; height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.dock-thumb.ph {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--dim); font-size: 1rem;
}
.dock-info { min-width: 0; }
.dock-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-sub {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-center { min-width: 0; }
.dock-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.35rem;
}
.dock-ctrl {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.dock-ctrl.play { color: var(--text); }
.dock-ctrl:hover { color: var(--text); }
.dock-repeat { opacity: 0.55; }
.dock-repeat.active {
  opacity: 1;
  color: var(--text);
}
.dock-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}
.dock-speed {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  color: var(--muted);
  min-width: 0;
}
.dock-tool-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.58rem;
  color: var(--dim);
}
.dock-speed input[type="range"] {
  width: 72px;
  accent-color: var(--accent-color);
  cursor: pointer;
}
.speed-readout {
  min-width: 2.6rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-size: 0.68rem;
}
.dock-meters {
  display: flex;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}
.meter-block {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem 0.35rem;
  align-items: center;
  min-width: 0;
  flex: 1;
  max-width: 7.5rem;
}
.meter-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dim);
  white-space: nowrap;
}
.meter-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  min-width: 36px;
}
.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width 0.05s linear;
}
.meter-fill.peak { background: linear-gradient(90deg, #7ad49a, #e8c86a, #e87878); }
.meter-fill.rms { background: linear-gradient(90deg, #5a9acc, #8ad4cc); }
.meter-fill.lufs { background: linear-gradient(90deg, #6a8fcc, #aa88dd); }
.meter-val {
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  min-width: 3.2rem;
  text-align: right;
}
.dock-spectrum-wrap {
  width: 100%;
  margin-top: 0.35rem;
}
.dock-spectrum-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.2rem;
}
.dock-spectrum-scale {
  font-size: 0.55rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.dock-spectrum {
  width: 100%;
  height: 52px;
  display: block;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.wave-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wave-stage {
  flex: 1;
  min-width: 0;
  height: 40px;
  touch-action: none;
}
.wave-svg {
  width: 100%;
  height: 40px;
  display: block;
  cursor: pointer;
  overflow: visible;
}
.wave-stage.scrubbing .wave-svg { cursor: grabbing; }
.wave-bar {
  fill: rgba(255, 255, 255, 0.22);
  shape-rendering: geometricPrecision;
}
.wave-bar.played { fill: var(--accent-color); }
.wave-playhead {
  stroke: rgba(255, 215, 185, 0.95);
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.wave-row.scrubbing .dock-time { color: var(--text); }
.dock-time {
  font-size: 0.65rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
}
.dock-time:last-child { text-align: right; }

.dock-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}
.dock-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.vol-icon { font-size: 0.75rem; opacity: 0.7; }
.dock-volume {
  width: 72px;
  height: 4px;
  accent-color: var(--accent-color);
  cursor: pointer;
}
.format-badge {
  font-size: 0.6rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(360px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 1.5rem;
  z-index: 200;
  overflow-y: auto;
}
.drawer-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.drawer h3 { font-size: 1.1rem; margin-bottom: 1rem; padding-right: 2rem; }
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.info-row span:first-child { color: var(--muted); }
.info-block {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Modal — wider + 25% type scale */
.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(680px, 94vw);
  width: calc(100% - 1.5rem);
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  animation: fadeIn 0.25s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-inner {
  border-radius: 22px;
  padding: 1.65rem 1.85rem;
  max-height: min(90vh, 920px);
  overflow-y: auto;
  box-shadow: 0 28px 90px rgba(0,0,0,0.6), inset 0 1px 0 var(--glass-highlight);
  animation: modalIn 0.4s var(--ease-out) both;
}
.modal-inner .field-label { font-size: 0.85rem; margin-bottom: 0.45rem; }
.modal-inner .panel-lead { font-size: 0.975rem; }
.modal-inner .glass-input { font-size: 1.0625rem; padding: 0.75rem 0.9rem; margin-bottom: 0.55rem; }
.modal-inner .btn-accent { font-size: 1.0625rem; padding: 0.8rem 1.4rem; }
.modal-inner .btn-ghost { font-size: 1.025rem; padding: 0.68rem 1.15rem; }
.modal-inner .mtab { font-size: 1rem; padding: 0.62rem 0.95rem; }
.modal-inner .modal-head h2 { font-size: 1.25rem; }
.modal-inner .check-row { font-size: 1rem; }
.modal-inner .status-line { font-size: 0.94rem; }
.modal-inner .admin-hint { font-size: 0.9rem; }
.modal-inner .art-label { font-size: 1rem; }
.modal-inner .art-hint { font-size: 0.85rem; }
.modal-inner .drop-title { font-size: 1.125rem; }
.modal-inner .drop-formats { font-size: 0.875rem; }
.modal-inner .upload-queue-item { font-size: 0.94rem; }
.modal-inner .activity-row { font-size: 0.94rem; }
@media (max-width: 480px) {
  .modal-inner { padding: 1.25rem 1.15rem; max-height: 92vh; }
  .modal-inner .modal-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .modal-inner .mtab { font-size: 0.9rem; padding: 0.55rem 0.7rem; white-space: nowrap; }
}
@media (min-width: 900px) {
  .modal { max-width: min(760px, 88vw); }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.panel-lead {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.field-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 0.35rem;
}
.form-row { margin-bottom: 0.85rem; }
.glass-input,
.glass-input select {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.glass-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.btn-accent {
  background: var(--accent-color);
  color: var(--play-text);
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.btn-accent:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-accent.full, .btn-ghost.full { width: 100%; display: block; text-align: center; }
.btn-accent:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent-color); }
.art-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 520px) { .art-grid { grid-template-columns: 1fr; } }
.art-card {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.art-label { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.art-hint { font-size: 0.68rem; color: var(--dim); margin-top: -0.25rem; }
.art-preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.4);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.art-preview-square { aspect-ratio: 1; }
.art-preview-wide { aspect-ratio: 16/10; min-height: 100px; }
.art-ph { font-size: 0.72rem; color: var(--dim); padding: 1rem; text-align: center; }
.art-fallback-note {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.6rem;
  color: var(--muted);
  background: rgba(0,0,0,0.5);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}
.art-pick { cursor: pointer; margin: 0; }
.drop-icon { font-size: 1.75rem; margin-bottom: 0.35rem; opacity: 0.7; }
.drop-title { font-size: 0.9rem; font-weight: 500; }
.upload-queue {
  margin-bottom: 0.85rem;
  max-height: 140px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.upload-queue-item {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.upload-queue-item:last-child { border-bottom: none; }
.upload-queue-item span { color: var(--muted); font-size: 0.68rem; }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.modal-head h2 { font-size: 1rem; font-weight: 600; }
.modal-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.mtab {
  background: none; border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.mtab.active { color: var(--text); border-bottom-color: var(--text); }
.mtab-panel { display: none; }
.mtab-panel.active { display: block; }

.drop-zone {
  border: 2px dashed var(--border-strong);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone:hover, .drop-zone.drag {
  border-color: var(--accent-color);
  background: var(--accent-soft);
}
.drop-formats { font-size: 0.7rem; color: var(--dim); margin-top: 0.35rem; }

.file-preview {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}
.file-preview strong { display: block; margin-bottom: 0.25rem; }
.file-preview span { color: var(--muted); font-size: 0.75rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
textarea { resize: vertical; }
.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.btn-pill {
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-pill.full { width: 100%; }
.btn-pill:disabled { opacity: 0.4; cursor: not-allowed; }
.status-line { font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem; min-height: 1rem; }
.admin-hint { font-size: 0.72rem; color: var(--dim); margin-bottom: 0.65rem; line-height: 1.5; }
.modal-divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.activity-row {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
}
.activity-row strong { font-weight: 500; }

.sec-block { margin-bottom: 1.1rem; }
.mtab-security { display: flex; flex-direction: column; gap: 1.15rem; }
.sec-span { width: 100%; }
.sec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 560px) {
  .sec-grid { grid-template-columns: 1fr 1fr; gap: 1.35rem; }
}
@media (max-width: 559px) {
  .sec-grid .sec-group + .sec-group {
    padding-top: 0.25rem;
    border-top: 1px solid var(--border);
  }
}
.sec-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.sec-group-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  font-weight: 600;
  margin: 0;
}
.sec-group-title--sub {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.sec-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
}
.sec-account-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.sec-account-role {
  flex-shrink: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}
.sec-health {
  padding: 1.15rem 1.15rem 0.95rem;
  animation: fadeSlideDown 0.45s var(--ease-out) both;
}
.sec-health-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.95rem;
}
.sec-health-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.sec-health-ring.is-strong {
  border-color: rgba(125, 255, 184, 0.55);
  animation: pulseRing 2.8s ease infinite;
}
.sec-health-count {
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.sec-health-title {
  font-size: 1.025rem;
  font-weight: 600;
  color: var(--text);
}
.sec-health-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.sec-factor-list { display: grid; gap: 0.4rem; }
.sec-factor {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.65rem;
  align-items: center;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.sec-factor:last-child { border-bottom: none; }
.sec-factor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.sec-factor.active .sec-factor-dot {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(125, 255, 184, 0.45);
}
.sec-factor-label { color: var(--text); }
.sec-factor.inactive .sec-factor-label { color: var(--dim); }
.sec-factor-meta { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.sec-mark-btn {
  margin-top: 0.75rem;
  width: 100%;
  font-size: 0.85rem;
  opacity: 0.75;
}
.sec-mark-btn:hover { opacity: 1; }
.sec-device-list {
  display: grid;
  gap: 0.55rem;
}
.sec-device-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.sec-device-card.is-key {
  border-color: rgba(255, 180, 80, 0.22);
}
.sec-device-card.is-passkey {
  border-color: rgba(120, 180, 255, 0.22);
}
.sec-device-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sec-device-card.is-key .sec-device-icon {
  background: rgba(255, 180, 80, 0.12);
  color: #ffb84d;
}
.sec-device-card.is-passkey .sec-device-icon {
  background: rgba(120, 180, 255, 0.12);
  color: #78b4ff;
}
.sec-device-svg { width: 22px; height: 22px; display: block; }
.sec-device-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.sec-device-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}
.sec-device-kind {
  font-size: 0.85rem;
  color: var(--muted);
}
.sec-device-meta {
  font-size: 0.78rem;
  color: var(--dim);
  line-height: 1.4;
}
.sec-device-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ok);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(125, 255, 184, 0.12);
  border: 1px solid rgba(125, 255, 184, 0.25);
}
.sec-empty {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: left;
}
.sec-guest-list, .sec-guest-form { padding: 0.75rem 0.9rem; border-radius: 12px; }
.sec-guest-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}
@media (min-width: 480px) {
  .sec-guest-fields { grid-template-columns: 1fr 1fr; }
}
.sec-guest-fields .glass-input { margin-bottom: 0; }
.sec-guest-album-label { margin: 0.35rem 0 0.15rem; }
.sec-guest-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 1rem;
}
.sec-guest-row:last-child { border-bottom: none; }
.sec-guest-row strong { color: var(--text); font-weight: 600; }
.sec-guest-form { margin-top: 0; display: grid; gap: 0.55rem; }
.sec-album-checks {
  display: grid;
  gap: 0.15rem;
  max-height: 160px;
  overflow-y: auto;
  padding: 0.35rem 0;
}
.sec-album-check {
  color: var(--text) !important;
  margin-bottom: 0 !important;
  padding: 0.35rem 0;
  font-size: 0.95rem;
}
.sec-album-check span { flex: 1; }
.sec-audit-details { margin-top: 0.25rem; font-size: 0.975rem; color: var(--muted); }
.sec-audit-details summary { cursor: pointer; color: var(--text); margin-bottom: 0.55rem; font-size: 1rem; }
.key-status {
  margin-top: 0.35rem; padding: 0.75rem 0.9rem; border-radius: 10px;
  font-size: 0.95rem; line-height: 1.55; min-height: 2.4rem;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--muted);
}
.key-status.wait { color: var(--text); border-color: var(--border-strong); }
.key-status.err { color: #ff8a8a; border-color: rgba(255,100,100,0.35); background: rgba(80,20,20,0.25); }
.key-status.ok { color: #8dffb8; border-color: rgba(100,255,180,0.25); background: rgba(20,60,40,0.2); }

.audit-scroll {
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.audit-scroll--short { max-height: 140px; }
.audit-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.audit-row:last-child { border-bottom: none; }
.audit-row.fail { color: #ff8a8a; }
.audit-row .audit-meta { color: var(--muted); margin-top: 0.15rem; }
.audit-row .audit-code { font-family: ui-monospace, monospace; font-size: 0.65rem; color: var(--dim); margin-top: 0.2rem; }
.audit-badge {
  display: inline-block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
  margin-right: 0.35rem;
}
.audit-badge.active { background: rgba(107, 255, 184, 0.15); color: #6bffb8; }
.audit-badge.fail { background: rgba(255, 107, 107, 0.15); color: #ff8a8a; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 4rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto;
}
.empty-warn {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 2rem 1.5rem;
}
.empty-warn strong { color: #fff; display: block; margin-bottom: 0.5rem; font-size: 1rem; }
.empty-warn span { color: var(--muted); font-size: 0.82rem; }

@media (max-width: 768px) {
  .album-layout { grid-template-columns: 1fr; }
  .album-cover-col { max-width: 240px; margin: 0 auto; }
  .dock {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
  }
  .dock-volume { width: 56px; }
  .dock-right .format-badge { display: none; }
  .wave-row { order: 3; }
  .dock-tools {
    order: 4;
    flex-direction: column;
    align-items: stretch;
  }
  .dock-meters {
    width: 100%;
    justify-content: stretch;
  }
  .meter-block { max-width: none; }
  body { padding-bottom: 220px; }
}
