:root {
  color-scheme: light;
  --ink: #253246;
  --muted: #718096;
  --line: #dfe5ec;
  --paper: #f3f6fa;
  --red: #c53b43;
  --red-dark: #ad2c34;
  --success: #247158;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.65; }
body.has-player { padding-bottom: 112px; }
button, input { font: inherit; }
button, a, audio { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }
button, a, input { outline-offset: 4px; }
:focus-visible { outline: 2px solid #657d9c; }
.topbar { max-width: 1280px; margin: auto; padding: 28px 44px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: .03em; }
.brand-note { display: block; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; margin-top: 1px; }
.brand-mark { display: flex; align-items: center; justify-content: center; gap: 3px; width: 38px; height: 38px; background: var(--red); border-radius: 11px; }
.brand-mark i { width: 3px; height: 14px; border-radius: 4px; background: white; }
.brand-mark i:nth-child(2) { height: 23px; }
.brand-mark i:nth-child(3) { height: 18px; }
.brand-mark i:nth-child(4) { height: 11px; }
.quiet-link { color: #5a6b80; text-decoration: none; font-size: 13px; }
.quiet-link:hover, .inline-button:hover, .text-button:hover { color: var(--red); }
.workspace { max-width: 1192px; margin: 20px auto 0; display: grid; grid-template-columns: 308px minmax(0, 1fr); align-items: start; gap: 54px; padding: 0 20px; }
.login-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px 22px; }
.section-number { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.login-panel h2 { margin: 10px 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -.04em; }
.muted { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.qr-frame { width: 234px; height: 234px; margin: 24px auto 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.qr-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #8b9ab0; background: #f7f9fc; font-size: 11px; }
.status { font-weight: 600; text-align: center; min-height: 24px; }
.status[data-tone="success"] { color: var(--success); }
.status[data-tone="error"], .search-message[data-tone="error"] { color: #b0313a; }
.detail { margin: 6px 0 18px; color: var(--muted); text-align: center; font-size: 11px; min-height: 18px; }
.button { border: 0; border-radius: 7px; min-height: 44px; padding: 10px 22px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s; }
.button.primary { color: #fff; background: var(--red); }
.button.primary:hover:not(:disabled) { background: var(--red-dark); }
.button.subtle { background: #eef2f7; color: var(--ink); margin-top: 8px; }
.wide { width: 100%; }
.text-button { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted); font-size: 12px; }
.cookie-import { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }
.cookie-import h3 { margin: 0 0 7px; font-size: 14px; font-weight: 600; }
.cookie-import > p { margin: 0 0 13px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.cookie-import textarea { display: block; width: 100%; min-height: 98px; padding: 10px; resize: vertical; border: 1px solid #cbd5e1; border-radius: 7px; background: #f9fbfd; color: var(--ink); font: 12px/1.7 monospace; overflow-wrap: anywhere; }
.cookie-import textarea:focus { border-color: #8095b0; }
.cookie-import textarea::placeholder { color: #9aa6b5; }
.cookie-import .cookie-feedback { margin: 10px 0 0; }
.cookie-feedback[data-tone="error"] { color: #b0313a; }
.cookie-feedback[data-tone="success"] { color: var(--success); }
.privacy-note { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; color: #8894a5; font-size: 11px; line-height: 1.85; }
.account { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 14px; background: #f3f8f6; border-radius: 8px; }
.account img { border-radius: 50%; object-fit: cover; }
.account strong, .account span { display: block; }
.account span { color: var(--success); font-size: 11px; }
.discovery { padding-top: 8px; min-width: 0; }
h1 { margin: 14px 0 6px; font-size: clamp(30px, 3.8vw, 42px); line-height: 1.4; font-weight: 600; letter-spacing: -.055em; }
.intro { margin: 8px 0 30px; color: var(--muted); font-size: 14px; }
.field-label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 600; }
.search-field { background: #fff; display: flex; gap: 12px; align-items: center; border: 1px solid #cbd5e1; border-radius: 10px; padding: 6px 6px 6px 16px; }
.search-field > svg { flex-shrink: 0; color: #8b9ab0; }
.search-field input { border: 0; background: transparent; width: 100%; min-width: 0; padding: 10px 0; color: var(--ink); font-size: 13px; }
.search-field input:focus { outline: none; }
.search-field:focus-within { border-color: #8095b0; box-shadow: 0 0 0 2px #dfe7f0; }
.search-field input::placeholder { color: #9aa6b5; }
.input-footer { display: flex; justify-content: space-between; gap: 12px; color: #8793a4; font-size: 11px; margin-top: 9px; }
.inline-button { border: 0; padding: 0; background: transparent; color: #5a6b80; white-space: nowrap; font-size: 11px; }
.search-message { margin: 14px 0 0; min-height: 22px; color: var(--muted); font-size: 12px; }
.source-song { display: flex; align-items: center; gap: 18px; margin: 20px 0 26px; padding: 20px 0; border-block: 1px solid var(--line); }
.source-song > img { border-radius: 7px; object-fit: cover; background: #dfe5ec; }
.source-copy { min-width: 0; flex: 1; }
.source-copy > a { display: block; font-size: 20px; font-weight: 600; text-decoration: none; margin-top: 4px; overflow-wrap: anywhere; }
.source-copy > a:hover { color: var(--red); }
.source-copy > p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.source-id { color: #8b97a7; font-size: 11px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 14px; }
.results-heading h2 { margin: 0; font-weight: 600; font-size: 17px; }
.results-heading > span { font-size: 11px; color: var(--muted); }
#result-count { color: #8d9aab; font-weight: 400; font-size: 12px; margin-left: 7px; }
.empty-state { border-top: 1px solid var(--line); padding: 48px 15px; text-align: center; }
.record { width: 102px; height: 102px; border-radius: 50%; margin: 0 auto 24px; background: repeating-radial-gradient(circle at center, #dbe2ec 0 2px, #e7ecf3 3px 5px); display: grid; place-items: center; border: 1px solid #d2dce8; }
.record span { width: 32px; height: 32px; background: #b9c8db; border: 11px solid #eff3f8; border-radius: 50%; }
.empty-state h3 { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 0; }
.song-list { list-style: none; padding: 0; margin: 0; }
.song-row { display: grid; grid-template-columns: 24px 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 8px; border-bottom: 1px solid var(--line); }
.song-row:first-child { border-top: 1px solid var(--line); }
.song-row.is-playing { background: #e9eef5; }
.song-number { font-size: 12px; color: #8f9aab; }
.song-cover { width: 48px; height: 48px; object-fit: cover; border-radius: 5px; background: #e3e9f1; }
.song-title { font-size: 14px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.song-title:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.song-meta { color: var(--muted); font-size: 11px; margin-top: 3px; overflow-wrap: anywhere; }
.song-actions { display: flex; gap: 10px; align-items: center; }
.play-button { background: #fff; border: 1px solid #ced8e4; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink); }
.play-button:hover { color: var(--red); border-color: #d79ca1; }
.original-link { font-size: 11px; color: #6c7c90; text-decoration: none; }
.original-link:hover { color: var(--red); }
.rights-note { margin: 18px 0; color: #8b97a7; font-size: 11px; }
.page-footer { max-width: 1192px; margin: 48px auto 24px; padding: 0 20px; display: flex; justify-content: space-between; color: #8b97a7; font-size: 11px; }
.player-bar { position: fixed; bottom: 0; inset-inline: 0; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) minmax(160px, 1fr); align-items: center; gap: 28px; padding: 15px max(24px, calc((100vw - 1152px) / 2)); background: #fff; border-top: 1px solid #d5deea; z-index: 5; }
.player-track { display: flex; gap: 12px; align-items: center; min-width: 0; }
.player-track img { border-radius: 5px; object-fit: cover; }
.player-track > div { min-width: 0; }
.player-track strong, .player-track span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-track strong { font-size: 12px; }
.player-track span { color: var(--muted); font-size: 11px; }
audio { width: 100%; height: 36px; }
.player-actions { text-align: right; font-size: 11px; }
.player-actions span { display: block; color: var(--muted); }
.player-actions a { color: var(--red); text-decoration: none; }
@media (max-width: 900px) {
  .workspace { gap: 28px; grid-template-columns: 280px minmax(0, 1fr); }
  .login-panel { padding-inline: 18px; }
  .topbar { padding-inline: 24px; }
  .source-id, .original-link { display: none; }
  .player-bar { gap: 16px; grid-template-columns: 1fr 1.5fr; padding: 12px 20px; }
  .player-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; }
}
@media (max-width: 660px) {
  .topbar { padding: 20px; }
  .brand { font-size: 18px; }
  .workspace { display: flex; flex-direction: column; gap: 32px; margin-top: 10px; }
  .login-panel, .discovery { width: 100%; }
  .login-panel { padding: 22px; }
  .login-panel h2 { font-size: 21px; }
  .qr-frame { margin-block: 18px 14px; }
  .privacy-note { margin-top: 18px; }
  .intro { margin-bottom: 24px; }
  .search-field { gap: 8px; padding-left: 12px; }
  .search-field > svg { display: none; }
  .button { padding-inline: 14px; }
  .input-footer { flex-wrap: wrap; }
  .results-heading > span { font-size: 10px; }
  .song-row { gap: 10px; grid-template-columns: 18px 42px minmax(0, 1fr) 34px; padding-inline: 0; }
  .song-cover { width: 42px; height: 42px; }
  .page-footer { flex-direction: column; gap: 5px; margin-top: 30px; }
  .player-bar { gap: 9px; grid-template-columns: 1fr; padding: 12px 20px; }
  .player-track { display: none; }
  .source-song > img { width: 68px; height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
