/* ============================================================
   留声点歌台 · shared visual language
   ============================================================ */

:root {
  color-scheme: dark;
  --ink: #161119;
  --ink-2: #1f1823;
  --ink-3: #2a2130;
  --ink-4: #352a3b;
  --paper: #f4ecdc;
  --paper-2: #eadfcb;
  --paper-3: #ddcfb6;
  --paper-ink: #2b2124;
  --paper-muted: #786a6a;
  --text: #f4ecdc;
  --muted: #a89caf;
  --muted-2: #7f7386;
  --amber: #e9a94a;
  --amber-2: #f7cb7c;
  --amber-deep: #b97a24;
  --accent-text: #f7cb7c;
  --on-accent: #241708;
  --rose: #d86f80;
  --sage: #96b59c;
  --success-text: #cfe3d3;
  --success-text-strong: #d5ead9;
  --danger-text: #f3bcc4;
  --danger-text-soft: #f0a4b0;
  --danger-text-dim: #d89aa4;
  --line: rgba(244, 236, 220, 0.12);
  --line-strong: rgba(244, 236, 220, 0.24);
  --tint-1: rgba(244, 236, 220, 0.022);
  --tint-2: rgba(244, 236, 220, 0.035);
  --tint-3: rgba(244, 236, 220, 0.05);
  --tint-4: rgba(244, 236, 220, 0.06);
  --tint-5: rgba(244, 236, 220, 0.09);
  --tint-6: rgba(244, 236, 220, 0.12);
  --tint-7: rgba(244, 236, 220, 0.15);
  --tint-8: rgba(244, 236, 220, 0.24);
  --header-bg: rgba(22, 17, 25, 0.78);
  --overlay: rgba(8, 5, 10, 0.72);
  --toast-bg: rgba(31, 24, 35, 0.94);
  --field: rgba(10, 7, 12, 0.34);
  --field-soft: rgba(10, 7, 12, 0.24);
  --field-soft-2: rgba(10, 7, 12, 0.2);
  --side-bg: #120e16;
  --metric-bg: #1a141e;
  --dock-bg: rgba(16, 12, 20, 0.97);
  --grain: rgba(255, 255, 255, 0.9);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #f4ecdc;
  --ink-2: #fbf5e9;
  --ink-3: #e6dac6;
  --ink-4: #d8c9b0;
  --text: #2b2124;
  --muted: #5f5560;
  --muted-2: #7a6e76;
  --accent-text: #8a5a12;
  --line: rgba(43, 33, 36, 0.14);
  --line-strong: rgba(43, 33, 36, 0.26);
  --tint-1: rgba(43, 33, 36, 0.035);
  --tint-2: rgba(43, 33, 36, 0.055);
  --tint-3: rgba(43, 33, 36, 0.07);
  --tint-4: rgba(43, 33, 36, 0.08);
  --tint-5: rgba(43, 33, 36, 0.11);
  --tint-6: rgba(43, 33, 36, 0.14);
  --tint-7: rgba(43, 33, 36, 0.18);
  --tint-8: rgba(43, 33, 36, 0.28);
  --header-bg: rgba(244, 236, 220, 0.82);
  --overlay: rgba(43, 33, 36, 0.45);
  --toast-bg: rgba(251, 245, 233, 0.96);
  --field: rgba(43, 33, 36, 0.06);
  --field-soft: rgba(43, 33, 36, 0.045);
  --field-soft-2: rgba(43, 33, 36, 0.03);
  --side-bg: #efe4d1;
  --metric-bg: #fbf5e9;
  --dock-bg: rgba(247, 241, 230, 0.97);
  --grain: rgba(43, 33, 36, 0.55);
  --success-text: #3d6747;
  --success-text-strong: #2f5638;
  --danger-text: #9c3f4e;
  --danger-text-soft: #a54957;
  --danger-text-dim: #8f4c57;
  --shadow: 0 30px 80px rgba(43, 33, 36, 0.2);
}

html[data-theme="light"] body {
  background:
    radial-gradient(1100px 760px at 8% -12%, rgba(233, 169, 74, 0.18), transparent 58%),
    radial-gradient(1000px 720px at 102% -4%, rgba(130, 86, 126, 0.12), transparent 60%),
    var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(1100px 760px at 8% -12%, rgba(233, 169, 74, 0.1), transparent 58%),
    radial-gradient(1000px 720px at 102% -4%, rgba(130, 86, 126, 0.24), transparent 60%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: repeating-linear-gradient(
    0deg,
    var(--grain) 0,
    var(--grain) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 20;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--amber);
  color: var(--on-accent);
}

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

.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;
}

/* ---------- decorative checkbox ---------- */

input[type="checkbox"].ui-check {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background-color: var(--field);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease,
    transform 0.12s ease;
}

input[type="checkbox"].ui-check:hover {
  border-color: rgba(233, 169, 74, 0.55);
}

input[type="checkbox"].ui-check:active {
  transform: scale(0.92);
}

input[type="checkbox"].ui-check:checked {
  border-color: transparent;
  background-color: var(--amber);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.7 6.4 4.6 9.2 10.3 2.9' fill='none' stroke='%23241708' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 3px rgba(233, 169, 74, 0.12);
}

input[type="checkbox"].ui-check:indeterminate {
  border-color: rgba(233, 169, 74, 0.6);
  background-color: rgba(233, 169, 74, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6h8' fill='none' stroke='%23f7cb7c' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E");
}

input[type="checkbox"].ui-check:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

input[type="checkbox"].ui-check:focus-visible {
  outline: 2px solid rgba(233, 169, 74, 0.65);
  outline-offset: 2px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--amber);
  color: #241708;
  box-shadow: 0 10px 30px rgba(233, 169, 74, 0.16);
}

.btn-primary:not(:disabled):hover {
  background: var(--amber-2);
  box-shadow: 0 12px 34px rgba(233, 169, 74, 0.26);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:not(:disabled):hover {
  border-color: var(--amber);
  color: var(--accent-text);
}

.btn-quiet {
  border-color: transparent;
  background: var(--tint-4);
  color: var(--muted);
}

.btn-quiet:not(:disabled):hover {
  background: var(--tint-5);
  color: var(--text);
}

.btn-danger {
  border-color: rgba(216, 111, 128, 0.4);
  background: rgba(216, 111, 128, 0.09);
  color: var(--danger-text-soft);
}

.btn-danger:not(:disabled):hover {
  background: rgba(216, 111, 128, 0.18);
  border-color: rgba(216, 111, 128, 0.65);
}

.btn-sm {
  min-height: 32px;
  padding: 7px 13px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
}

/* ---------- toasts ---------- */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(88vw, 460px);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--toast-bg);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: rgba(150, 181, 156, 0.5);
  color: var(--success-text-strong);
}

.toast-error {
  border-color: rgba(216, 111, 128, 0.55);
  color: var(--danger-text);
}

/* ---------- generic modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.is-open {
  opacity: 1;
}

.modal {
  width: min(560px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  border-radius: 22px;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(0.99);
  transition: transform 0.22s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 0;
}

.modal-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
}

.modal-body {
  padding: 18px 24px 24px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
}

.modal-close {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

/* ============================================================
   登录 / 注册
   ============================================================ */

.auth-page {
  overflow-x: hidden;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(20px, 4vw, 56px);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-panel {
  position: relative;
  width: min(100%, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(30px, 5vw, 72px) clamp(26px, 5vw, 68px);
  background:
    radial-gradient(700px 500px at 110% 0%, rgba(233, 169, 74, 0.14), transparent 55%),
    linear-gradient(155deg, var(--paper) 0%, #efe4d1 100%);
  color: var(--paper-ink);
  border-radius: 30px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
}

.auth-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 27px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(43, 33, 36, 0.2) 0 6px,
    transparent 6px 14px
  );
}

.auth-panel::after {
  content: "";
  position: absolute;
  left: -9px;
  top: 0;
  bottom: 0;
  width: 18px;
  background-image: radial-gradient(circle at 9px 9px, var(--ink) 8px, transparent 8.5px);
  background-size: 18px 28px;
  background-repeat: repeat-y;
  pointer-events: none;
}

.auth-panel-inner {
  width: min(100%, 440px);
  padding-left: 20px;
  position: relative;
  z-index: 2;
}

.ticket-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--paper-muted);
}

.ticket-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--amber-deep);
}

.auth-tabs {
  display: flex;
  gap: 28px;
  margin: 2px 0 34px;
  border-bottom: 1px solid rgba(43, 33, 36, 0.16);
}

.auth-tabs button {
  position: relative;
  padding: 0 0 13px;
  border: 0;
  background: transparent;
  color: var(--paper-muted);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.auth-tabs button.active {
  color: var(--paper-ink);
}

.auth-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--amber-deep);
}

.auth-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-heading p {
  margin: 10px 0 0;
  color: var(--paper-muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 34px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > span {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper-muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(43, 33, 36, 0.26);
  border-radius: 0;
  background: transparent;
  padding: 6px 1px 10px;
  color: var(--paper-ink);
  font-size: 16.5px;
  font-weight: 500;
  transition: border-color 0.18s ease;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  border: 1px solid rgba(43, 33, 36, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.7;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(120, 106, 106, 0.55);
  font-weight: 400;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--amber-deep);
}

.form-error {
  margin: -4px 0 0;
  padding: 10px 13px;
  border-left: 2px solid #a63f4f;
  background: rgba(166, 63, 79, 0.07);
  color: #8f3443;
  font-size: 12.5px;
  line-height: 1.6;
}

.form-hint {
  margin: -6px 0 0;
  color: var(--paper-muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.auth-form .btn {
  margin-top: 4px;
  min-height: 50px;
  background: var(--paper-ink);
  color: var(--paper);
  box-shadow: none;
}

.auth-form .btn:hover:not(:disabled) {
  background: #3b2e33;
  box-shadow: none;
}

body.auth-page[data-auth-view="register"] .auth-note {
  display: none;
}

.auth-note {
  display: flex;
  gap: 12px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px dashed rgba(43, 33, 36, 0.2);
  color: var(--paper-muted);
  font-size: 11.5px;
  line-height: 1.75;
}

.auth-note-mark {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(43, 33, 36, 0.25);
  border-radius: 50%;
  color: var(--amber-deep);
  font-size: 12px;
}

.auth-note p {
  margin: 0;
}

.auth-note code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(43, 33, 36, 0.08);
  font-family: var(--sans);
  font-size: 11px;
}

.auth-stamp {
  position: absolute;
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(18px, 3vw, 38px);
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(166, 63, 79, 0.62);
  border-radius: 50%;
  color: rgba(166, 63, 79, 0.72);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0.1em;
  transform: rotate(-11deg);
  mix-blend-mode: multiply;
  opacity: 0.8;
  pointer-events: none;
}

/* ============================================================
   点歌主界面
   ============================================================ */

.app-head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(233, 169, 74, 0.55);
  color: var(--accent-text);
  font-size: 15px;
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px rgba(233, 169, 74, 0.18);
}

.head-now {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.head-now-cover {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
  background: var(--ink-3);
}

.head-now-copy {
  min-width: 0;
}

.head-now-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent-text);
  margin-bottom: 2px;
}

.head-now-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.head-now-title span {
  color: var(--muted-2);
  font-weight: 400;
}

.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}

.eq i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: var(--amber);
  transform-origin: bottom;
  animation: eq-bounce 0.9s ease-in-out infinite;
}

.eq i:nth-child(2) {
  animation-delay: 0.18s;
  height: 70%;
}

.eq i:nth-child(3) {
  animation-delay: 0.36s;
  height: 85%;
}

.eq i:nth-child(4) {
  animation-delay: 0.54s;
  height: 55%;
}

@keyframes eq-bounce {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

.head-right {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
}

.user-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-4);
  color: var(--accent-text);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
}

.user-chip strong {
  color: var(--text);
  font-weight: 600;
}

.head-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.head-link:hover {
  color: var(--accent-text);
  border-color: rgba(233, 169, 74, 0.5);
  background: rgba(233, 169, 74, 0.07);
}

/* ---------- theme toggle ---------- */

[data-theme-toggle] svg {
  width: 17px;
  height: 17px;
}

html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
  display: none;
}

.auth-theme-toggle {
  position: fixed;
  top: clamp(14px, 3vw, 26px);
  right: clamp(14px, 3vw, 30px);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--tint-1);
  color: var(--muted);
  backdrop-filter: blur(12px);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.auth-theme-toggle:hover {
  color: var(--accent-text);
  border-color: rgba(233, 169, 74, 0.5);
  background: rgba(233, 169, 74, 0.08);
}

.stage {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) clamp(18px, 4vw, 44px) 90px;
}

.search-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(34px, 4vw, 50px);
}

.search-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.search-hero h1 small {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.search-hero-stats {
  display: flex;
  gap: 26px;
  flex: none;
  padding-bottom: 7px;
}

.hero-stat {
  text-align: right;
}

.hero-stat b {
  display: block;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.hero-stat span {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
}

.search-wrap {
  margin-bottom: clamp(34px, 4vw, 52px);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 8px 7px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--tint-2);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-bar:focus-within {
  border-color: rgba(233, 169, 74, 0.65);
  background: rgba(233, 169, 74, 0.045);
  box-shadow: 0 0 0 4px rgba(233, 169, 74, 0.07);
}

.search-icon {
  flex: none;
  color: var(--accent-text);
  display: grid;
  place-items: center;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--muted-2);
}

.search-bar .btn {
  min-height: 46px;
  padding-left: 27px;
  padding-right: 27px;
}

.suggestions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
  padding-left: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.suggestion {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.suggestion:hover {
  color: var(--accent-text);
  border-color: rgba(233, 169, 74, 0.4);
}

.request-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tint-1);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.request-hint::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--sage);
}

.request-hint.is-warn {
  border-color: rgba(233, 169, 74, 0.28);
  background: rgba(233, 169, 74, 0.055);
  color: var(--accent-text);
}

.request-hint.is-warn::before {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(233, 169, 74, 0.14);
}

.request-hint b {
  color: var(--text);
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.78fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.section-head span {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
}

.song-panel {
  border-top: 1px solid var(--line-strong);
}

.song-row {
  display: grid;
  grid-template-columns: 32px 50px minmax(0, 1fr) auto 142px;
  align-items: center;
  gap: 15px;
  padding: 13px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.song-row:hover {
  background: var(--tint-2);
}

.song-num {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.song-cover {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--ink-3);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
}

.song-cover-fallback {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink-3);
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 18px;
}

.song-copy {
  min-width: 0;
}

.song-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.song-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 600;
}

.song-meta {
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-2);
  font-size: 11.5px;
}

.song-duration {
  color: var(--muted-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.song-action {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.song-action .btn {
  min-width: 60px;
}

.btn-preview {
  min-width: 52px;
  border-color: rgba(233, 169, 74, 0.18);
  background: transparent;
  color: var(--muted-2);
}

.btn-preview:not(:disabled):hover,
.btn-preview.is-playing {
  border-color: var(--amber);
  color: var(--accent-text);
  background: rgba(233, 169, 74, 0.08);
}

.btn-song {
  border-color: rgba(233, 169, 74, 0.32);
  background: transparent;
  color: var(--accent-text);
}

.btn-song:not(:disabled):hover {
  border-color: var(--amber);
  background: var(--amber);
  color: #241708;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.tag-banned {
  color: var(--danger-text-soft);
  background: rgba(216, 111, 128, 0.13);
  border: 1px solid rgba(216, 111, 128, 0.28);
}

.tag-queued {
  color: var(--sage);
  background: rgba(150, 181, 156, 0.1);
  border: 1px solid rgba(150, 181, 156, 0.25);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 40px 24px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.empty-disc {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent-text);
  font-family: var(--serif);
  font-size: 27px;
  background: repeating-radial-gradient(circle, transparent 0 7px, var(--tint-1) 7px 8px);
}

.empty-state h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.empty-state p {
  max-width: 26em;
  margin: 10px 0 0;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.8;
}

.loading-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 26px 10px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 94px;
}

/* queue as a paper ticket */

.queue-paper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(233, 169, 74, 0.13), transparent 60%),
    var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.queue-paper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(43, 33, 36, 0.18) 0 5px,
    transparent 5px 12px
  );
  pointer-events: none;
}

.queue-head {
  padding: 24px 24px 17px 32px;
  border-bottom: 1px dashed rgba(43, 33, 36, 0.24);
}

.queue-head-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.queue-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.queue-count {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--paper-muted);
}

.queue-sub {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--paper-muted);
  letter-spacing: 0.03em;
}

.queue-list {
  max-height: 440px;
  overflow: auto;
  padding: 6px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(43, 33, 36, 0.22) transparent;
}

.queue-item {
  display: grid;
  grid-template-columns: 30px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 32px;
  position: relative;
}

.queue-item + .queue-item {
  border-top: 1px dashed rgba(43, 33, 36, 0.13);
}

.queue-item.is-current {
  background: rgba(233, 169, 74, 0.2);
}

.queue-item.is-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--amber-deep);
}

.queue-index {
  font-family: var(--serif);
  font-size: 12px;
  color: rgba(43, 33, 36, 0.44);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.queue-cover {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 5px;
  background: rgba(43, 33, 36, 0.1);
}

.queue-copy {
  min-width: 0;
}

.queue-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
}

.queue-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--paper-muted);
}

.queue-side {
  text-align: right;
}

.queue-requester {
  display: block;
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--paper-muted);
}

.now-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7b4c12;
}

.queue-empty {
  padding: 38px 26px 42px 34px;
  text-align: center;
  color: var(--paper-muted);
  font-size: 12px;
  line-height: 1.8;
}

.queue-foot {
  padding: 12px 24px 15px 32px;
  border-top: 1px dashed rgba(43, 33, 36, 0.24);
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(43, 33, 36, 0.48);
}

/* my requests */

.mine-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--tint-1);
  overflow: hidden;
}

.mine-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.mine-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.mine-head span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.mine-list {
  max-height: 300px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.mine-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.mine-item:last-child {
  border-bottom: 0;
}

.mine-copy {
  min-width: 0;
}

.mine-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
}

.mine-meta {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: var(--muted-2);
}

.mine-side {
  display: flex;
  align-items: center;
  gap: 9px;
}

.stamp {
  flex: none;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  transform: rotate(-2deg);
  opacity: 0.88;
}

.stamp.pending {
  color: var(--accent-text);
}

.stamp.approved {
  color: var(--sage);
}

.stamp.rejected {
  color: var(--rose);
}

.stamp.played {
  color: var(--muted-2);
}

.cancel-btn {
  border: 0;
  background: transparent;
  padding: 2px 0;
  color: var(--muted-2);
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cancel-btn:hover {
  color: var(--rose);
}

.mine-empty {
  padding: 26px 20px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}

/* skeleton */

.skeleton-row {
  display: grid;
  grid-template-columns: 32px 50px minmax(0, 1fr) 72px;
  gap: 15px;
  align-items: center;
  padding: 13px 8px;
  border-bottom: 1px solid var(--line);
}

.sk {
  border-radius: 5px;
  background: linear-gradient(90deg, var(--tint-3), var(--tint-5), var(--tint-3));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

.sk-cover {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

.sk-line {
  height: 10px;
  width: 62%;
}

.sk-line.short {
  width: 38%;
  margin-top: 8px;
  height: 8px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- light theme fine tuning ---------- */

html[data-theme="light"] body::before {
  opacity: 0.05;
}

html[data-theme="light"] .app-head {
  box-shadow: 0 1px 0 rgba(43, 33, 36, 0.05);
}

html[data-theme="light"] .auth-panel {
  box-shadow: 0 40px 100px rgba(43, 33, 36, 0.22);
}

html[data-theme="light"] .queue-paper {
  border: 1px solid rgba(43, 33, 36, 0.08);
  box-shadow: 0 26px 60px rgba(43, 33, 36, 0.18);
}

html[data-theme="light"] .song-cover,
html[data-theme="light"] .review-cover {
  box-shadow: 0 5px 14px rgba(43, 33, 36, 0.16);
}

html[data-theme="light"] .tag-queued,
html[data-theme="light"] .stamp.approved {
  color: var(--success-text);
}

html[data-theme="light"] .stamp.rejected {
  color: var(--danger-text);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .content-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
  }
}

@media (max-width: 880px) {
  .auth-shell {
    padding: 16px;
  }
  .auth-panel {
    border-radius: 24px;
    padding: 40px 22px 48px;
  }
  .auth-panel::before {
    left: 18px;
  }
  .auth-panel-inner {
    padding-left: 10px;
  }
  .auth-panel::after {
    display: none;
  }
  .auth-stamp {
    display: none;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    position: static;
  }
}

@media (max-width: 720px) {
  .auth-panel {
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .auth-tabs {
    margin-bottom: 24px;
  }
  .auth-form {
    gap: 17px;
    margin-top: 24px;
  }
  .field input {
    padding-bottom: 8px;
  }
  .auth-note {
    margin-top: 24px;
    padding-top: 16px;
  }
  .app-head {
    gap: 14px;
    min-height: 66px;
    padding: 10px 16px;
  }
  .brand {
    font-size: 15px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .head-now {
    display: none;
  }
  .head-right {
    margin-left: auto;
  }
  .user-chip {
    padding-right: 5px;
  }
  .user-chip .user-name {
    display: none;
  }
  .stage {
    padding-top: 30px;
  }
  .search-hero {
    display: block;
  }
  .search-hero-stats {
    margin-top: 24px;
    padding: 0;
    justify-content: flex-start;
  }
  .hero-stat {
    text-align: left;
  }
  .search-bar {
    padding-left: 17px;
  }
  .search-bar input {
    height: 44px;
    font-size: 15px;
  }
  .search-bar .btn {
    min-height: 42px;
    padding-left: 19px;
    padding-right: 19px;
  }
  .song-row {
    grid-template-columns: 24px 44px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 11px 4px;
  }
  .song-cover,
  .song-cover-fallback {
    width: 44px;
    height: 44px;
  }
  .song-duration {
    display: none;
  }
  .song-action {
    gap: 5px;
  }
  .song-action .btn {
    min-width: 46px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .btn-preview {
    min-width: 44px;
  }
  .side-stack {
    display: flex;
    position: static;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .auth-form {
    gap: 20px;
  }
  .toast-host {
    bottom: 18px;
  }
}

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