:root {
  color-scheme: dark;
  --bg: #0b0908;
  --bg-soft: #14100d;
  --text: #f4eadc;
  --muted: #b9a794;
  --muted-strong: #d7c5b0;
  --accent: #e3a45f;
  --accent-strong: #f3c88d;
  --accent-soft: rgba(227, 164, 95, 0.14);
  --line: rgba(255, 246, 235, 0.11);
  --line-strong: rgba(255, 246, 235, 0.2);
  --glass: rgba(18, 14, 11, 0.68);
  --glass-strong: rgba(16, 12, 9, 0.9);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  --radius: 18px;
  --radius-sm: 12px;
  --player-h: 104px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom) + 30px);
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

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

button:disabled {
  cursor: default;
}

a {
  color: var(--accent);
}

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

[hidden] {
  display: none !important;
}

::selection {
  color: #1a120b;
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
}

.backdrop__layer {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  filter: blur(42px) saturate(1.28) brightness(0.72);
  transform: scale(1.04);
  transition: opacity 900ms var(--ease);
}

.backdrop__layer.is-active {
  opacity: 1;
}

.backdrop__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(227, 164, 95, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(8, 6, 5, 0.5), rgba(8, 6, 5, 0.79) 52%, var(--bg) 100%);
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: clamp(30px, 6vw, 72px) clamp(18px, 5vw, 54px) clamp(24px, 4vw, 42px);
}

.brand__eyebrow,
.queue__eyebrow,
.status__eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brand__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6.5vw, 5.2rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.brand__subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(0.82rem, 1.4vw, 0.98rem);
  letter-spacing: 0.13em;
}

.library-meta {
  flex: 0 0 auto;
  max-width: 100%;
  margin: 0 0 4px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 10, 8, 0.5);
  color: var(--muted-strong);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
}

.site-main {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 42px);
}

.status {
  margin: 14px 0 40px;
}

.status__card {
  width: min(620px, 100%);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.status__card--error {
  border-color: rgba(255, 156, 128, 0.28);
}

.status__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.status__text {
  max-width: 48ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.status__action {
  margin-top: 22px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  transition: transform 220ms var(--ease), background 220ms var(--ease);
}

.status__action:hover {
  background: rgba(227, 164, 95, 0.24);
  transform: translateY(-1px);
}

.toast {
  position: fixed;
  z-index: 80;
  bottom: calc(var(--player-h) + env(safe-area-inset-bottom) + 18px);
  left: 50%;
  max-width: min(92vw, 480px);
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-size: 0.82rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  backdrop-filter: blur(18px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  z-index: 100;
  inset: auto 16px 16px;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
  color: var(--muted-strong);
  text-align: center;
}

.skeleton-block,
.skeleton-line {
  display: block;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  background-size: 240% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
}

.skeleton-line--title {
  width: 72%;
  margin-top: 14px;
}

.skeleton-line--meta {
  width: 38%;
  margin-top: 9px;
  opacity: 0.6;
}

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

@supports not (backdrop-filter: blur(1px)) {
  .library-meta,
  .status__card,
  .toast {
    background: var(--glass-strong);
  }
}

@media (max-width: 720px) {
  :root {
    --player-h: 166px;
  }

  body {
    padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom) + 22px);
  }

  .site-header {
    display: block;
    padding-top: 28px;
    padding-bottom: 22px;
  }

  .library-meta {
    display: inline-block;
    margin-top: 18px;
  }

  .brand__subtitle {
    margin-top: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .backdrop__layer {
    transition: none;
  }
}
