:root {
  color-scheme: dark;
  --bg: #0b0d0f;
  --panel: #15181b;
  --panel-strong: #1d2328;
  --line: #293037;
  --text: #f1f5f7;
  --muted: #98a5ad;
  --green: #38d16f;
  --green-deep: #167a42;
  --blue: #5aa7ff;
  --amber: #f1b84b;
  --red: #d94b5f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 209, 111, 0.16), transparent 32%),
    linear-gradient(140deg, #0b0d0f 0%, #11171a 48%, #101216 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.login-view,
.console-view,
.public-info-view {
  display: none;
}

.app-shell[data-state="login"] .login-view,
.app-shell[data-state="app"] .console-view,
.app-shell[data-state="loading"] .login-view {
  display: flex;
}

.app-shell[data-state="public"] .public-info-view {
  display: block;
}

.login-view {
  width: min(620px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.public-footer-links {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 0 18px;
}

.public-footer-links a,
.public-info-nav a,
.public-back-link {
  color: #c8d0d5;
  text-decoration: none;
}

.public-footer-links a {
  padding: 8px 0;
  font-size: 0.9rem;
}

.public-footer-links a:hover,
.public-info-nav a:hover,
.public-back-link:hover,
.credit-card:hover strong {
  color: var(--green);
}

.public-info-view {
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 80% 10%, rgba(90, 167, 255, 0.16), transparent 28%),
    radial-gradient(circle at 18% 0%, rgba(56, 209, 111, 0.18), transparent 30%),
    linear-gradient(140deg, #0b0d0f 0%, #11171a 52%, #101216 100%);
}

.public-info-header {
  width: min(1180px, 100%);
  min-height: 46px;
  margin: 0 auto 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.public-back-link {
  font-weight: 900;
  letter-spacing: 0;
}

.public-info-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.public-page {
  width: min(980px, 100%);
  margin: 0 auto;
}

.public-page[hidden] {
  display: none;
}

.public-page h1 {
  max-width: 12ch;
  margin-top: 8px;
  font-size: clamp(3rem, 9vw, 5.6rem);
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.public-page > p,
.credits-intro {
  max-width: 760px;
  color: #d6dee3;
  font-size: 1.08rem;
  line-height: 1.65;
}

.public-home-action {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.credits-page {
  width: min(1120px, 100%);
}

.credits-page h1 {
  max-width: 13ch;
}

.credits-band {
  margin-top: 34px;
}

.credits-band h2 {
  margin-bottom: 14px;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.credit-card {
  min-width: 0;
  min-height: 148px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(21, 24, 27, 0.9);
  color: var(--text);
  text-decoration: none;
}

.credit-card:hover,
.credit-card:focus-visible {
  border-color: rgba(56, 209, 111, 0.62);
  outline: 0;
}

.credit-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.credit-card span {
  min-width: 0;
  color: #bac5cb;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.credit-card small {
  max-width: 100%;
  min-width: 0;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(56, 209, 111, 0.14);
  color: #9af0b8;
  font-size: 0.74rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  white-space: normal;
}

.credits-note {
  margin-top: 28px;
  padding: 16px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(90, 167, 255, 0.36);
  border-radius: 8px;
  background: rgba(90, 167, 255, 0.1);
}

.credits-note span {
  color: #c8d0d5;
  line-height: 1.55;
}

.brand-lockup,
.brand-row,
.topbar,
.surface-header,
.room-strip,
.user-chip,
.transport-row,
.tile-row,
.library-player-inline,
.app-player-track,
.app-player-controls,
.player-progress-row,
.app-player-volume,
.mini-player-controls {
  display: flex;
  align-items: center;
}

.brand-lockup {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.brand-logo {
  width: min(320px, 72vw);
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-logo.compact {
  width: 168px;
  max-width: 100%;
}

.eyebrow,
.muted-label,
.status-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 10vw, 5.8rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1;
}

h3 {
  font-size: 1rem;
}

.login-copy {
  max-width: 42rem;
  margin: 0;
  color: #c8d0d5;
  font-size: 1.08rem;
  line-height: 1.55;
}

.primary-action,
.ghost-action,
.nav-item,
.room-pill,
.icon-action {
  min-height: 42px;
  border-radius: 8px;
}

.primary-action {
  width: fit-content;
  padding: 0 22px;
  background: var(--green);
  color: #07110b;
  font-weight: 800;
}

.ghost-action {
  padding: 0 13px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.icon-action {
  width: 42px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #07110b;
  font-size: 1.5rem;
  font-weight: 800;
}

.icon-action.subtle {
  background: var(--panel-strong);
  color: var(--text);
}

.console-view {
  min-height: 100vh;
  width: 100%;
}

.app-route[hidden] {
  display: none !important;
}

.console-route {
  width: 100%;
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 280px;
  min-height: 100vh;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(12, 14, 16, 0.86);
  border-right: 1px solid var(--line);
}

.brand-row {
  gap: 12px;
  min-height: 44px;
}

.section-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  padding: 0 14px;
  text-align: left;
  color: var(--muted);
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  color: var(--text);
  background: var(--panel-strong);
}

.sidebar-footer {
  margin-top: auto;
}

.pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(56, 209, 111, 0.14);
  color: #9af0b8;
  font-size: 0.82rem;
}

.workspace {
  flex: 1;
  min-width: 0;
  padding: 20px;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.search-shell {
  width: min(620px, 100%);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.search-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.account-menu {
  position: relative;
}

.user-chip {
  min-width: 310px;
  min-height: 52px;
  gap: 11px;
  padding: 7px 7px 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.user-chip strong {
  display: block;
  white-space: nowrap;
  line-height: 1.1;
}

.user-copy {
  min-width: 0;
  flex: 1;
}

.chevron {
  width: 26px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.account-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11161a;
  box-shadow: var(--shadow);
}

.account-dropdown button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.account-dropdown button:hover {
  background: var(--panel-strong);
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #081018;
  font-weight: 900;
}

.hero-panel {
  min-height: 190px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(56, 209, 111, 0.24), transparent 48%),
    linear-gradient(145deg, #20282b, #15171b 70%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.room-strip {
  gap: 8px;
  flex-wrap: wrap;
}

.room-pill {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.room-pill.active {
  background: var(--green);
  color: #07110b;
  font-weight: 800;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas:
    "player queue"
    "playlist queue";
  gap: 14px;
  margin-top: 14px;
}

.library-page {
  display: grid;
  gap: 14px;
}

.library-page-header {
  min-height: 140px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(90, 167, 255, 0.18), transparent 42%),
    linear-gradient(145deg, #20282b, #15171b 70%);
}

.segmented-control {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 13, 15, 0.48);
}

.segmented-control button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.segmented-control button.active {
  background: var(--green);
  color: #07110b;
  font-weight: 800;
}

.segmented-control button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.track-library-surface {
  min-height: calc(100vh - 242px);
}

.folder-flow-layout {
  min-height: calc(100vh - 242px);
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 14px;
}

.folder-flow-roots,
.folder-flow-browser {
  min-width: 0;
}

.folder-root-list {
  display: grid;
  gap: 14px;
}

.folder-worker-group {
  display: grid;
  gap: 8px;
}

.folder-worker-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.folder-root-button {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
}

.folder-root-button.active,
.folder-root-button:hover,
.folder-root-button:focus-visible {
  border-color: rgba(49, 213, 117, 0.45);
  background: rgba(49, 213, 117, 0.12);
}

.folder-root-button strong,
.folder-root-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-root-button span {
  color: var(--muted);
  font-size: 0.82rem;
}

.folder-breadcrumbs {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
}

.folder-breadcrumbs button {
  max-width: 260px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-breadcrumbs button[aria-current="page"] {
  color: var(--green);
  border-color: rgba(49, 213, 117, 0.4);
}

.folder-flow-table {
  table-layout: fixed;
}

.folder-flow-table th:nth-child(1) {
  width: 42%;
}

.folder-flow-table th:nth-child(2) {
  width: 28%;
}

.folder-flow-table th:nth-child(3) {
  width: 10%;
}

.folder-flow-table th:nth-child(4) {
  width: 20%;
}

.folder-entry-button,
.folder-entry-file {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.library-table td .folder-entry-file {
  display: flex;
  align-items: center;
  gap: 12px;
}

.library-table td .folder-entry-file .track-lines {
  display: grid;
}

.folder-entry-button {
  width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
}

.folder-entry-button:hover .track-line-main,
.folder-entry-button:focus-visible .track-line-main {
  color: var(--green);
}

.folder-entry-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--green);
  font-weight: 800;
}

.track-title-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-title-cell > span {
  min-width: 0;
}

.track-lines {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.library-table td .track-lines,
.library-table td .track-line-main,
.library-table td .track-line-sub {
  margin-top: 0;
}

.track-lines.align-end {
  justify-items: end;
}

.track-line-main,
.track-line-sub {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-line-main {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
}

.track-line-sub {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.15;
}

.track-play-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #07110b;
  font-size: 0.82rem;
  font-weight: 900;
}

.track-play-button:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.track-cover-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel-strong);
}

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

.track-cover-button:hover,
.track-cover-button:focus-visible,
.track-artist-button:hover,
.track-artist-button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.track-artist-album-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-artist-album-cell > span {
  min-width: 0;
}

.track-artist-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-strong);
}

.track-artist-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-player,
.app-mini-player {
  display: none;
}

.app-shell[data-state="app"][data-route="app"][data-player-mode="full"] .console-route:not([hidden]) {
  padding-bottom: 100px;
}

.app-shell[data-state="app"][data-route="app"][data-player-mode="full"] .app-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.4fr) minmax(220px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  background: rgba(5, 6, 7, 0.98);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.42);
}

.app-player audio {
  display: none;
}

.app-player-track {
  min-width: 0;
  gap: 12px;
}

.app-player-cover {
  width: 58px;
  height: 58px;
}

.app-player-center {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.app-player-controls {
  justify-content: center;
  gap: 14px;
}

.player-icon-button,
.player-play-button {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.player-icon-button {
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 0.95rem;
}

.player-icon-button:hover,
.player-icon-button:focus-visible {
  color: var(--text);
  background: var(--panel-strong);
}

.player-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.player-play-button {
  width: 38px;
  height: 38px;
  background: var(--text);
  color: #050607;
  font-size: 0.86rem;
  font-weight: 900;
}

.player-play-button.mini {
  width: 34px;
  height: 34px;
}

.player-progress-row {
  min-width: 0;
  gap: 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.player-progress-row span {
  width: 44px;
  flex: 0 0 44px;
  text-align: center;
}

.player-range {
  width: 100%;
  min-width: 0;
  accent-color: var(--green);
}

.app-player-volume {
  position: relative;
  min-width: 0;
  justify-content: flex-end;
  gap: 10px;
}

.volume-range {
  max-width: 150px;
}

.app-output-target {
  position: relative;
}

.output-target-button {
  min-height: 42px;
  width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.output-target-button:hover,
.output-target-button:focus-visible {
  border-color: rgba(56, 209, 111, 0.7);
}

.lucide-icon {
  flex: 0 0 auto;
  display: block;
}

.output-target-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(420px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 140px));
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 18, 20, 0.98);
  box-shadow: var(--shadow);
}

.output-target-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.output-target-section {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.output-target-section:first-of-type {
  border-top: 0;
}

.output-target-empty {
  min-width: 0;
  margin: 6px 8px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.output-target-empty.error {
  color: var(--danger);
}

.output-target-option {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  color: var(--text);
}

.output-target-option:hover {
  background: var(--panel-strong);
}

.output-target-option.disabled {
  opacity: 0.45;
}

.output-target-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--green);
}

.output-target-option span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.output-target-option strong,
.output-target-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-target-option small {
  color: var(--muted);
  font-size: 0.78rem;
}

.output-target-nested {
  display: grid;
  gap: 2px;
  margin-left: 24px;
}

.output-target-option.nested {
  padding-block: 7px;
}

.app-shell[data-state="app"][data-route="app"][data-player-mode="mini"] .app-mini-player {
  position: fixed;
  left: 20px;
  bottom: 18px;
  z-index: 62;
  width: 232px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 18, 20, 0.98);
  box-shadow: var(--shadow);
}

.app-shell[data-state="app"][data-route="app"][data-player-mode="mini"] .sidebar-footer {
  margin-bottom: 150px;
}

.mini-player-main {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.mini-player-main strong,
.mini-player-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-player-main span {
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-player-controls {
  min-width: 0;
  gap: 8px;
}

.mini-player-controls .player-range {
  flex: 1 1 auto;
}

.mini-volume {
  max-width: 58px;
}

.library-player-inline {
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.library-pagination-controls {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
}

.library-pagination-controls label {
  min-width: 120px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.library-pagination-controls select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--panel);
  color: var(--text);
}

.compact-action {
  min-height: 36px;
  padding: 0 11px;
}

.table-sort-button {
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-sort-button.active {
  color: var(--green);
}

.track-sort-group {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: stretch;
  gap: 8px;
}

.track-sort-group.align-end {
  text-align: right;
}

.track-sort-labels {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
}

.track-sort-labels.single-line {
  min-height: 34px;
}

.sort-direction-indicator {
  width: 12px;
  min-height: 34px;
  display: grid;
  place-items: center;
  opacity: 0;
}

.sort-direction-indicator::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.track-sort-group.active .sort-direction-indicator {
  opacity: 1;
}

.track-sort-group.sort-asc .sort-direction-indicator::before {
  border-bottom: 8px solid var(--green);
}

.track-sort-group.sort-desc .sort-direction-indicator::before {
  border-top: 8px solid var(--green);
}

.library-table.track-table {
  table-layout: fixed;
  min-width: 0;
}

.track-table th,
.track-table td {
  min-width: 0;
  overflow: hidden;
}

.track-table th:nth-child(1),
.track-table td:nth-child(1) {
  width: 43%;
}

.track-table th:nth-child(2),
.track-table td:nth-child(2) {
  width: 26%;
}

.track-table th:nth-child(3),
.track-table td:nth-child(3) {
  width: 92px;
  text-align: right;
  white-space: nowrap;
}

.track-duration-cell {
  text-align: right;
}

.track-table th:nth-child(4),
.track-table td:nth-child(4) {
  width: calc(31% - 92px);
}

.settings-section[hidden],
.account-dropdown[hidden] {
  display: none;
}

.surface {
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 24, 27, 0.92);
}

.player-surface {
  grid-area: player;
}

.queue-surface {
  grid-area: queue;
}

.playlist-surface {
  grid-area: playlist;
}

.surface-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.empty-art {
  width: 120px;
  aspect-ratio: 1;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(241, 184, 75, 0.8), rgba(217, 75, 95, 0.78)),
    var(--panel-strong);
}

.placeholder-lines,
.skeleton-list {
  display: grid;
  gap: 10px;
}

.placeholder-lines {
  margin: 16px 0 20px;
}

.placeholder-lines span,
.skeleton-list span,
.tile-row span {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, #252c31, #303941, #252c31);
}

.placeholder-lines span {
  width: min(360px, 100%);
  height: 18px;
}

.placeholder-lines span:nth-child(2) {
  width: min(220px, 72%);
}

.transport-row {
  gap: 10px;
}

.transport-row button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
}

.transport-row .play-control {
  background: var(--green);
  color: #07110b;
}

.skeleton-list span {
  height: 54px;
}

.tile-row {
  gap: 12px;
}

.tile-row span {
  flex: 1;
  min-height: 96px;
}

.settings-route {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(56, 209, 111, 0.08), transparent 34%),
    rgba(11, 13, 15, 0.72);
}

.settings-sidebar {
  min-height: 100vh;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(12, 14, 16, 0.92);
  border-right: 1px solid var(--line);
}

.settings-nav-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.settings-nav-item.active,
.settings-nav-item:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.settings-content {
  min-width: 0;
}

.settings-workspace {
  min-width: 0;
  padding: 20px;
}

.page-title {
  max-width: none;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1;
}

.settings-copy {
  margin: 0;
  color: var(--muted);
}

.settings-page {
  min-height: calc(100vh - 114px);
}

.worker-grid {
  display: grid;
  gap: 18px;
}

.worker-panel {
  min-width: 0;
}

.compact-header {
  margin-bottom: 12px;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.track-library-surface .table-wrap {
  overflow-x: hidden;
}

.table-status {
  margin: 0 0 10px;
}

.header-actions,
.action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.header-actions {
  flex-wrap: wrap;
}

.library-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.library-table th,
.library-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.library-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.library-table tr:last-child td {
  border-bottom: 0;
}

.library-table td strong,
.library-table td span {
  display: block;
}

.library-table td span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.action-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right !important;
}

.action-cell .ghost-action {
  min-height: 38px;
}

.status-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(152, 165, 173, 0.14);
  color: #cbd5da;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-online,
.status-offen {
  background: rgba(56, 209, 111, 0.16);
  color: #9af0b8;
}

.status-degraded,
.status-abgelaufen {
  background: rgba(241, 184, 75, 0.16);
  color: #f6d391;
}

.status-disabled,
.status-widerrufen {
  background: rgba(217, 75, 95, 0.16);
  color: #f0a1ad;
}

.danger-action {
  color: #f0a1ad;
}

.danger-primary {
  background: #d94b5f;
  color: #fff;
}

.danger-primary:hover {
  background: #ef6074;
}

.ghost-action:disabled,
.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.empty-cell {
  height: 120px;
  color: var(--muted);
  text-align: center !important;
}

.library-dialog {
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11161a;
  color: var(--text);
  box-shadow: var(--shadow);
}

.cover-dialog {
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11161a;
  color: var(--text);
  box-shadow: var(--shadow);
}

.cover-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.cover-dialog form {
  min-height: min(760px, calc(100vh - 40px));
  padding: 34px;
  display: grid;
  place-items: center;
  position: relative;
}

.cover-dialog-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.cover-dialog img {
  width: min(640px, 72vmin, calc(100vw - 96px));
  max-height: calc(100vh - 108px);
  aspect-ratio: 1;
  display: block;
  margin: 0;
  border-radius: 8px;
  object-fit: cover;
}

.library-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.library-dialog form {
  padding: 18px;
}

.confirm-dialog {
  width: min(560px, calc(100vw - 28px));
}

.confirm-content {
  margin: 18px 0 12px;
  display: grid;
  gap: 14px;
}

.confirm-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-content code {
  display: block;
  max-width: 100%;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 35, 40, 0.72);
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.browser-panel {
  margin: 18px 0;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.field-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field-grid input,
.field-grid select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--panel);
  color: var(--text);
}

.worker-token-fields {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.45fr) auto;
}

.token-help {
  margin-top: 12px;
}

.token-result {
  margin-top: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 35, 40, 0.58);
}

.token-result[hidden] {
  display: none;
}

.token-result code {
  min-height: 42px;
  display: block;
  padding: 11px 12px;
  overflow: auto;
  border-radius: 8px;
  background: #0b0d0f;
  color: #d8eefb;
  font-size: 0.88rem;
  white-space: nowrap;
}

.browser-result {
  min-height: 280px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 35, 40, 0.46);
  overflow: hidden;
}

.browser-current-path {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.browser-current-path span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-list {
  max-height: 360px;
  overflow: auto;
}

.browser-empty {
  padding: 26px;
  color: var(--muted);
  text-align: center;
}

.browser-entry {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(41, 48, 55, 0.72);
}

.browser-entry:last-child {
  border-bottom: 0;
}

.browser-entry-main {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

button.browser-entry-main:hover strong {
  color: var(--green);
}

.browser-entry-main span:last-child {
  min-width: 0;
}

.browser-entry-main strong,
.browser-entry-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-entry-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.browser-entry-icon {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: var(--panel-strong);
  color: var(--green);
}

.browser-entry.file .browser-entry-icon {
  color: var(--muted);
}

.browser-entry-meta {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.dialog-actions {
  justify-content: flex-end;
}

.dialog-actions .primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 920px) {
  .public-info-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .console-view {
    flex-direction: column;
  }

  .console-route,
  .settings-route {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .sidebar,
  .settings-sidebar {
    width: 100%;
    min-height: auto;
    padding: 14px;
  }

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

  .layout-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "player"
      "queue"
      "playlist";
  }

  .folder-flow-layout {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero-panel,
  .library-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .user-chip {
    width: 100%;
    min-width: 0;
  }

  .account-menu {
    width: 100%;
  }

  .settings-workspace {
    padding: 14px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .worker-token-fields {
    grid-template-columns: 1fr;
  }

  .app-shell[data-state="app"][data-route="app"][data-player-mode="full"] .console-route:not([hidden]) {
    padding-bottom: 188px;
  }

  .app-shell[data-state="app"][data-route="app"][data-player-mode="full"] .app-player {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 176px;
    padding: 12px 14px;
  }

  .app-player-volume {
    justify-content: center;
    flex-wrap: wrap;
  }

  .output-target-button {
    width: 56px;
    justify-content: center;
  }

  .output-target-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 112px;
    width: auto;
    max-height: calc(100vh - 140px);
    transform: none;
  }

  .app-shell[data-state="app"][data-route="app"][data-player-mode="mini"] .app-mini-player {
    left: 14px;
    bottom: 14px;
    width: min(280px, calc(100vw - 28px));
  }
}

@media (max-width: 560px) {
  .public-info-view {
    padding: 18px 14px 28px;
  }

  .public-page,
  .credits-page {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .public-page > p,
  .credits-intro {
    max-width: 100%;
  }

  .public-footer-links {
    bottom: 16px;
    gap: 16px;
  }

  .public-page h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 9vw, 2.9rem);
  }

  .credits-grid {
    grid-template-columns: 1fr;
  }

  .section-nav {
    grid-template-columns: 1fr 1fr;
  }

  .workspace {
    padding: 12px;
  }

  .hero-panel {
    min-height: 220px;
    padding: 20px;
  }

  .user-chip {
    flex-wrap: wrap;
  }

  .ghost-action {
    margin-left: auto;
  }
}
