:root {
  color-scheme: dark;
  --ink: #f4f2e9;
  --muted: #999c91;
  --surface: #191b17;
  --surface-2: #20231e;
  --line: #30332c;
  --acid: #c7ff5e;
  --orange: #ff6b35;
  --danger: #ff7770;
  --radius: 20px;
  --font-small: 13px;
  --font-base: 16px;
  --font-title: 26px;
  font-family: 'DM Sans', system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background: #11130f;
  color: var(--ink);
  font-size: var(--font-base);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: #151713;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 8px 38px;
  font-family: 'Space Grotesk';
  font-size: var(--font-title);
  font-weight: 700;
}
.brandmark {
  width: 32px;
  height: 32px;
  border: 7px solid var(--acid);
  border-radius: 50%;
  position: relative;
}
.brandmark::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acid);
  right: -11px;
  top: 5px;
}
.nav-label {
  margin: 20px 12px 9px;
  color: #686b62;
  font-size: var(--font-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-item {
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 11px 12px;
  border-radius: 11px;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
}
.nav-item:hover,
.nav-item.active {
  background: var(--surface-2);
  color: var(--ink);
}
.nav-item.active::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
}
.network-health {
  margin-top: auto;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: var(--font-small);
}
.health-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  margin-bottom: 5px;
  font-weight: 600;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--acid);
  box-shadow: 0 0 12px color-mix(in srgb, var(--acid) 70%, transparent);
}
.status-dot.warning,
.status-dot.pending,
.status-dot.pairing,
.status-dot.unassigned {
  background: #ffcf56;
}
.status-dot.blocked {
  background: var(--danger);
  box-shadow: 0 0 12px color-mix(in srgb, var(--danger) 70%, transparent);
}
.status-dot.offline {
  background: var(--danger);
}
.main {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 34px 42px 64px;
}
.topbar,
.heading-row,
.section-head,
.station-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.heading-row.actions-only {
  justify-content: flex-end;
}
.topbar {
  margin-bottom: 54px;
  color: var(--muted);
  font-size: var(--font-small);
}
.eyebrow {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--font-small);
  font-weight: 600;
}
.station-head .eyebrow,
.device-list-section .eyebrow,
.modal-inner .eyebrow {
  display: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: 'Space Grotesk', sans-serif;
}
h1 {
  margin-bottom: 9px;
  font-size: var(--font-title);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
h2,
h3 {
  font-size: var(--font-title);
  letter-spacing: -0.025em;
}
.subhead {
  color: var(--muted);
  max-width: 630px;
  font-size: var(--font-base);
}
.button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 11px 17px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.button:hover {
  border-color: #555a4d;
  transform: translateY(-1px);
}
.button.primary {
  background: var(--acid);
  color: #11130f;
  border-color: var(--acid);
}
.button.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.button.ghost {
  background: transparent;
}
.button.small {
  padding: 7px 12px;
  font-size: var(--font-small);
}
.button.icon {
  width: 39px;
  height: 39px;
  padding: 0;
}
.station-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 48px;
}
.station-card {
  min-height: 246px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: 0.2s ease;
}
.station-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--station-color) 55%, var(--line));
}
.station-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.station-number {
  color: var(--station-color);
  font-family: 'Space Grotesk';
  font-size: var(--font-small);
}
.station-card h3 {
  margin: 24px 0 2px;
  font-size: var(--font-title);
}
.place {
  color: var(--muted);
  font-size: var(--font-small);
}
.playing {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
}
.album {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: radial-gradient(circle at 30% 25%, var(--station-color), #272b24 60%);
}
.track {
  min-width: 0;
}
.track strong,
.track span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track strong {
  font-size: var(--font-base);
}
.track span {
  color: var(--muted);
  font-size: var(--font-small);
  margin-top: 2px;
}
.bars {
  display: flex;
  gap: 2px;
  align-items: end;
  height: 16px;
}
.bars i {
  width: 2px;
  background: var(--station-color);
  animation: bounce 0.8s infinite alternate;
}
.bars i:nth-child(2) {
  height: 14px;
  animation-delay: -0.4s;
}
.bars i:nth-child(3) {
  height: 9px;
  animation-delay: -0.2s;
}
@keyframes bounce {
  from {
    height: 4px;
  }
  to {
    height: 16px;
  }
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 22px;
}
.stat {
  padding: 20px 22px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat span {
  color: var(--muted);
  font-size: var(--font-small);
}
.stat strong {
  display: block;
  font-family: 'Space Grotesk';
  font-size: var(--font-title);
  margin-top: 5px;
}
.crumb {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0;
}
.crumb:hover {
  color: var(--ink);
}
.station-head {
  align-items: flex-end;
  margin-bottom: 30px;
}
.station-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.station-title .swatch {
  width: 14px;
  height: 50px;
  border-radius: 20px;
  background: var(--station-color);
}
.station-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.station-title h1 {
  font-size: var(--font-title);
  margin: 0;
}
.station-title p {
  color: var(--muted);
  margin: 4px 0 0;
}
.now-card {
  border-radius: var(--radius);
  padding: 26px;
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--station-color) 25%, var(--surface)),
    var(--surface) 48%
  );
  border: 1px solid color-mix(in srgb, var(--station-color) 34%, var(--line));
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 24px;
  align-items: center;
}
.now-art {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  background: radial-gradient(circle at 65% 30%, var(--station-color), #111 65%);
  position: relative;
}
.now-art::after {
  content: '';
  position: absolute;
  inset: 33%;
  background: #151713;
  border-radius: 50%;
  border: 4px solid #ffffff20;
}
.now-copy h2 {
  font-size: var(--font-title);
  margin: 6px 0 3px;
}
.now-copy p {
  color: var(--muted);
  margin: 0;
}
.equalizer {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 48px;
}
.equalizer i {
  width: 5px;
  height: 30%;
  border-radius: 4px;
  background: var(--station-color);
  animation: bounce 1s infinite alternate;
}
.equalizer i:nth-child(2n) {
  animation-delay: -0.5s;
}
.equalizer i:nth-child(3n) {
  animation-delay: -0.25s;
}
.content-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}
.stack {
  display: grid;
  gap: 18px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}
.section-head {
  margin-bottom: 17px;
}
.section-head h2 {
  margin: 0;
}
.count {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-family: 'DM Sans';
  font-size: var(--font-small);
}
.device,
.song,
.jingle {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.device {
  grid-template-columns: 1fr 160px 70px;
}
.song {
  grid-template-columns: 28px 1fr auto;
}
.song .count {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
  font-family: ui-monospace, 'DejaVu Sans Mono', monospace;
  font-variant-numeric: lining-nums tabular-nums;
  text-align: center;
  letter-spacing: 0;
}
.jingle {
  grid-template-columns: 1fr auto;
}
.device:first-of-type,
.song:first-of-type,
.jingle:first-of-type {
  border-top: 0;
}
.device-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.device-name small,
.song small,
.jingle small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--acid);
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}
.pill {
  border: 1px solid color-mix(in srgb, var(--station-color) 40%, var(--line));
  background: color-mix(in srgb, var(--station-color) 10%, transparent);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: var(--font-small);
}
.pill:hover {
  border-color: var(--station-color);
}
.pill .x {
  opacity: 0.5;
  margin-left: 6px;
}
.interest-form {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}
.input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #121410;
  border-radius: 12px;
  padding: 11px 13px;
  outline: none;
}
.input:focus {
  border-color: var(--acid);
}
.suggestions {
  margin-top: 14px;
}
.suggestions p {
  color: var(--muted);
  font-size: var(--font-small);
  text-transform: none;
  letter-spacing: 0;
}
.job {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 8px;
}
.job-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--font-small);
}
.progress {
  height: 4px;
  background: #0d0f0c;
  border-radius: 4px;
  margin-top: 9px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--acid);
}
.empty {
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
  font-size: var(--font-small);
}
.device-list-section {
  margin-top: 22px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.device-list-section.depot-list {
  border-color: color-mix(in srgb, #8f9488 50%, var(--line));
}
.enrollment-section {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--acid) 35%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--acid) 4%, var(--surface));
}
.enrollment-tabs {
  display: flex;
  gap: 7px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #11130f;
}
.enrollment-tab {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
}
.enrollment-tab.active {
  color: #11130f;
  background: var(--acid);
}
.enrollment-tab span {
  margin-left: 5px;
  opacity: 0.7;
}
.enrollment-list {
  display: grid;
  gap: 10px;
}
.enrollment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.enrollment-card:first-child {
  border-top: 0;
}
.enrollment-card h3 {
  margin: 4px 0;
}
.enrollment-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-small);
}
.enrollment-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.device-table {
  overflow-x: auto;
}
.device-table-head,
.device-table-row {
  min-width: 1190px;
  display: grid;
  grid-template-columns:
    minmax(190px, 1.35fr) minmax(125px, 0.85fr) minmax(145px, 1fr) minmax(110px, 0.75fr)
    minmax(130px, 0.9fr) minmax(145px, 1fr) 250px;
  gap: 14px;
  align-items: center;
}
.device-table-head {
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: var(--font-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.device-table-row {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
}
.device-table-row:hover {
  background: #ffffff05;
}
.device-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.device-identity strong,
.device-identity small,
.device-cell strong,
.device-cell small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-identity small,
.device-cell small {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--font-small);
}
.device-cell {
  min-width: 0;
  font-size: var(--font-small);
}
.table-volume {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: var(--font-small);
}
.device-list-empty {
  border-top: 1px solid var(--line);
}
.device-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.station-link {
  margin: 0;
  padding: 7px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  font-size: var(--font-small);
  white-space: nowrap;
}
.station-link.static {
  display: inline-block;
  color: var(--muted);
  cursor: default;
}
.station-link i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--station-color);
}
.pairing-code {
  margin: 24px 0;
  padding: 20px;
  border: 1px dashed var(--acid);
  border-radius: 16px;
  color: var(--acid);
  background: #0e100c;
  text-align: center;
  font-family: 'Space Grotesk';
  font-size: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.18em;
}
.split-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}
.update-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
  margin-top: 24px;
}
.update-upload,
.update-deploy {
  display: grid;
  gap: 14px;
  align-content: start;
}
.update-upload label,
.update-deploy > label {
  color: var(--muted);
  font-size: var(--font-small);
}
.update-upload label .input,
.update-deploy > label .input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.file-input {
  padding: 8px;
}
.update-device-picker {
  max-height: 250px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.update-device-picker > label {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-top: 1px solid var(--line);
}
.update-device-picker > label:first-child {
  border-top: 0;
}
.update-device-picker strong,
.update-device-picker small {
  display: block;
}
.update-device-picker small,
.release-row small {
  color: var(--muted);
  font-size: var(--font-small);
  margin-top: 2px;
}
.update-table,
.release-list {
  display: grid;
}
.update-row {
  display: grid;
  grid-template-columns: 100px 100px minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.update-row:first-child,
.release-row:first-child {
  border-top: 0;
}
.update-row small {
  color: var(--muted);
}
.release-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.update-auth {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.update-auth label {
  flex: 1;
  color: var(--muted);
  font-size: var(--font-small);
}
.update-auth .input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.update-auth small {
  color: var(--muted);
  padding-bottom: 11px;
}
.toast {
  pointer-events: none;
  position: fixed;
  z-index: 10;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  background: var(--ink);
  color: #11130f;
  border-radius: 12px;
  transform: translateY(90px);
  opacity: 0;
  transition: 0.25s ease;
  font-weight: 600;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
dialog {
  width: min(500px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 100px #000b;
}
dialog::backdrop {
  background: #050605b8;
  backdrop-filter: blur(5px);
}
.modal-inner {
  padding: 27px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.modal-form {
  display: grid;
  gap: 12px;
}
.modal-form label {
  color: var(--muted);
  font-size: var(--font-small);
}
.modal-form label .input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
@media (max-width: 980px) {
  .station-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid,
  .update-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .update-row {
    grid-template-columns: 90px 90px 1fr;
  }
  .update-row small {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 17px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .brand {
    margin: 0 0 10px;
  }
  .sidebar nav {
    display: flex;
    width: 100%;
    gap: 6px;
  }
  .sidebar .nav-label,
  .sidebar .network-health {
    display: none;
  }
  .sidebar .nav-item {
    width: auto;
  }
  .main {
    padding: 25px 18px 50px;
  }
  .topbar {
    margin-bottom: 38px;
  }
  .station-grid {
    grid-template-columns: 1fr;
  }
  .heading-row,
  .station-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .now-card {
    grid-template-columns: 72px 1fr;
  }
  .now-art {
    width: 72px;
    height: 72px;
  }
  .equalizer {
    display: none;
  }
  .device {
    grid-template-columns: 1fr 110px;
  }
  .device > :last-child {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .device-meta {
    grid-template-columns: 1fr;
  }
  .split-actions {
    display: flex;
    flex-wrap: wrap;
  }
  .split-actions span {
    display: none;
  }
  .enrollment-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .enrollment-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .update-row {
    grid-template-columns: 80px 1fr;
  }
  .update-row span:nth-of-type(2),
  .update-row small {
    grid-column: 1 / -1;
  }
}

.library-folders,
.library-music {
  margin-top: 24px;
}
.library-directory {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.library-directory > div:first-child {
  min-width: 0;
}
.library-directory small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: var(--font-small);
}
.library-path {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: var(--font-small);
}
.library-actions,
.library-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.library-add {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 12px;
  align-items: end;
  margin: 22px 0 14px;
}
.library-add label {
  color: var(--muted);
  font-size: var(--font-small);
}
.library-add .input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.library-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.library-table {
  overflow-x: auto;
}
.library-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.library-table th {
  color: var(--muted);
  font-size: var(--font-small);
  font-weight: 400;
}
.library-table th,
.library-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.library-table small {
  display: block;
  margin-top: 4px;
}
.library-table td {
  max-width: 420px;
}
.library-pagination {
  justify-content: flex-end;
  margin-top: 18px;
}
.button:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}
@media (max-width: 720px) {
  .library-add {
    grid-template-columns: 1fr;
  }
  .library-directory {
    flex-direction: column;
    align-items: flex-start;
  }
  .library-filter {
    flex-direction: column;
  }
  .sidebar nav {
    flex-wrap: wrap;
  }
}
.library-source {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.library-source small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-small);
}
.library-source-fields,
.library-add-source {
  display: grid;
  grid-template-columns: 1fr 2fr auto auto;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}
.library-source-fields label,
.library-add-source label {
  color: var(--muted);
  font-size: var(--font-small);
}
.library-source-fields .input,
.library-add-source .input {
  display: block;
  width: 100%;
  margin-top: 6px;
}
.library-source-fields .library-enabled {
  padding-bottom: 12px;
  white-space: nowrap;
}
.library-source .subhead {
  margin-top: 12px;
}
@media (max-width: 980px) {
  .library-source-fields,
  .library-add-source {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .library-source-fields,
  .library-add-source {
    grid-template-columns: 1fr;
  }
  .library-source .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}
.library-tabs {
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  margin: 24px 0 0;
}
.library-tab:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: -3px;
}
.library-source {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}
.library-local-paths {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.library-source-title {
  max-width: 100%;
  font-weight: 600;
}
.library-source-fields {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
@media (max-width: 720px) {
  .library-source-fields {
    grid-template-columns: 1fr;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.music-player {
  position: fixed;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px #0004;
}
.music-player-seek {
  display: block;
  width: 100%;
  height: 5px;
  margin: 0;
  cursor: pointer;
}
.music-player-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}
.music-player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.music-player-track > div {
  min-width: 0;
}
.music-player-track strong,
.music-player-track small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-player-track small {
  color: var(--muted);
  font-size: var(--font-small);
  margin-top: 4px;
}
.music-player-art {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--acid);
  font-size: var(--font-title);
}
.music-player-controls,
.music-player-volume {
  display: flex;
  align-items: center;
  gap: 10px;
}
.music-player-volume {
  justify-content: flex-end;
}
.music-player-volume input {
  max-width: 110px;
}
.music-player-time {
  color: var(--muted);
  font-size: var(--font-small);
  min-width: 95px;
  font-variant-numeric: tabular-nums;
}
.has-music-player {
  padding-bottom: 100px;
}
.has-music-player .sidebar {
  bottom: 100px;
  height: calc(100vh - 100px);
}
.has-music-player .toast {
  bottom: 115px;
}
@media (max-width: 980px) {
  .music-player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .music-player-volume {
    grid-column: 1 / -1;
  }
  .has-music-player {
    padding-bottom: 145px;
  }
  .has-music-player .sidebar {
    bottom: 145px;
    height: calc(100vh - 145px);
  }
  .has-music-player .toast {
    bottom: 160px;
  }
}
@media (max-width: 720px) {
  .music-player-inner {
    padding: 10px 14px;
  }
  .music-player-art {
    display: none;
  }
  .music-player-controls {
    gap: 4px;
  }
  .music-player-time {
    display: none;
  }
  .has-music-player .sidebar {
    height: auto;
  }
}
dialog:has(.library-picker) {
  width: min(850px, calc(100% - 32px));
}
.library-picker {
  max-height: 48vh;
  overflow-y: auto;
}
.library-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.library-picker-row strong,
.library-picker-row small {
  display: block;
}
.library-picker-row small {
  color: var(--muted);
  margin-top: 3px;
}
.library-filter {
  flex-wrap: wrap;
}
.genre-pills {
  margin: 8px 0 14px;
}
.genre-pill {
  --station-color: var(--acid);
  padding: 5px 10px;
}
.genre-pill.active {
  background: var(--acid);
  border-color: var(--acid);
  color: #11130f;
}
.library-track-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.library-cover {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}
.music-player-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.library-cover-placeholder {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
}

/* SvelteKit navigation uses links with the existing button and tab vocabulary. */
a {
  color: inherit;
  text-decoration: none;
}
a.button,
a.nav-item,
a.enrollment-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
a.nav-item {
  justify-content: flex-start;
}
.modal-form > form {
  width: 100%;
}
.now-card {
  grid-template-columns: 112px minmax(0, 1fr) auto auto;
}
@media (max-width: 720px) {
  .now-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .now-card > .button {
    grid-column: 1/-1;
  }
}
@media (max-width: 720px) {
  .music-player-time {
    display: none;
  }
}
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-panel {
  width: 100%;
  max-width: 460px;
}
.auth-panel .brand {
  margin: 0 0 32px;
}
.auth-panel h1 {
  font-size: var(--font-title);
}
.auth-panel .modal-form .button {
  width: 100%;
}
.auth-panel label,
.admin-user-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: var(--font-small);
}
.form-error {
  color: var(--danger);
}
.admin-identity {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 12px;
  margin-top: auto;
}
.admin-identity small,
.admin-user-form small {
  display: block;
  color: var(--muted);
}
.admin-identity + .network-health {
  margin-top: 12px;
}
.admin-section {
  margin-top: 22px;
}
.admin-user-form {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.admin-user-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
  gap: 14px;
}
.admin-user-fields .library-enabled {
  flex-direction: row;
  align-items: center;
  padding-bottom: 12px;
}
@media (max-width: 720px) {
  .sidebar .admin-identity {
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 6px 0;
  }
  .sidebar .admin-identity strong {
    margin-right: auto;
  }
  .admin-user-fields {
    grid-template-columns: 1fr;
  }
}
