:root {
  --ink: #30263a;
  --ink-soft: #5f5669;
  --muted: #756c80;
  --plum: #30213d;
  --plum-light: #473155;
  --lilac: #9a7cf2;
  --lilac-pale: #eee8ff;
  --coral: #f0897b;
  --coral-deep: #b64e56;
  --cream: #fcfaff;
  --white: #fff;
  --line: #ece6f2;
  --shadow: 0 20px 55px rgba(48, 33, 61, 0.08);
  --radius-lg: 28px;
  --radius-md: 16px;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--plum);
  color: #fff;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 4; border-bottom: 1px solid rgba(48, 38, 58, .07); }
.header-inner { display: flex; min-height: 80px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(154, 124, 242, .4);
  border-radius: 50% 50% 45% 50%;
  background: var(--lilac-pale);
  color: var(--plum);
  font-size: 16px;
  font-weight: 800;
  transform: rotate(-8deg);
}
.brand-name { display: flex; flex-direction: column; gap: 2px; font-size: 16px; font-weight: 800; letter-spacing: .05em; line-height: 1; }
.brand-name small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .22em; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { position: relative; padding: 10px 0; color: var(--ink-soft); font-size: 13px; font-weight: 700; transition: color .2s ease; }
.nav-link:hover, .nav-link:focus-visible, .nav-link.is-active { color: var(--plum); }
.nav-link.is-active::after { position: absolute; right: 0; bottom: 1px; left: 0; height: 2px; border-radius: 4px; background: var(--coral); content: ""; }

.hero { position: relative; display: grid; min-height: 425px; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); align-items: center; gap: 60px; overflow: hidden; margin-top: 40px; padding: 64px 78px; border-radius: var(--radius-lg); background: var(--plum); color: #fff; box-shadow: var(--shadow); }
.hero::before, .hero::after { position: absolute; border-radius: 50%; content: ""; pointer-events: none; }
.hero::before { width: 420px; height: 420px; top: -270px; left: 42%; border: 1px solid rgba(255, 255, 255, .08); }
.hero::after { width: 260px; height: 260px; right: 24%; bottom: -205px; border: 1px solid rgba(255, 255, 255, .08); }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--coral-deep); font-size: 10px; font-weight: 800; letter-spacing: .21em; line-height: 1.3; }
.hero .eyebrow { color: #e6d9ff; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(240, 137, 123, .16); }
h1, h2, p { margin-top: 0; }
h1 { max-width: 550px; margin-bottom: 22px; font-size: clamp(38px, 5vw, 65px); font-weight: 800; letter-spacing: -.055em; line-height: 1.07; }
h1 em { color: #d6c7ff; font-style: normal; }
.hero-description { max-width: 430px; margin-bottom: 31px; color: #c8bdd3; font-size: 14px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 12px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 800; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { background: var(--coral); color: #351f3d; }
.button-primary:hover, .button-primary:focus-visible { background: #ff9b8c; }
.button-quiet { border-color: rgba(255, 255, 255, .19); color: #f5efff; }
.button-quiet:hover, .button-quiet:focus-visible { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08); }

.hero-visual { position: relative; z-index: 1; display: grid; min-width: 0; min-height: 295px; place-items: center; }
.avatar-frame { position: relative; width: 178px; height: 178px; padding: 7px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%; background: linear-gradient(145deg, #f3e8ff, #a98bf3 57%, #f19c8d); box-shadow: 0 13px 40px rgba(4, 0, 15, .25); transform: rotate(7deg); }
.avatar-frame img { display: block; width: 100%; height: 100%; border: 4px solid var(--plum); border-radius: 50%; object-fit: cover; transform: rotate(-7deg); }
.avatar-fallback { position: absolute; inset: 11px; display: grid; place-items: center; border: 4px solid var(--plum); border-radius: 50%; background: linear-gradient(145deg, #d7c6ff, #a785f0); color: var(--plum); font-size: 50px; font-weight: 900; opacity: 0; }
.avatar-fallback.is-visible { opacity: 1; }
.orbit { position: absolute; border: 1px solid rgba(214, 199, 255, .36); border-radius: 50%; transform: rotate(-20deg); }
.orbit-one { width: 280px; height: 105px; }
.orbit-two { width: 245px; height: 245px; border-color: rgba(240, 137, 123, .32); transform: rotate(34deg); }
.spark { position: absolute; color: #d7c8ff; font-size: 25px; line-height: 1; }
.spark-one { top: 20px; right: 8%; }
.spark-two { bottom: 22px; left: 7%; color: var(--coral); font-size: 18px; }
.visual-caption { position: absolute; right: 0; bottom: 10px; display: flex; align-items: center; gap: 10px; color: #c8bdd3; font-size: 11px; line-height: 1.7; }
.caption-line { display: block; width: 31px; height: 1px; background: var(--coral); }

.stats { display: flex; min-height: 104px; align-items: center; gap: 0; padding: 24px 38px; border-bottom: 1px solid var(--line); }
.stat-item { display: flex; min-width: 142px; flex-direction: column; gap: 5px; padding-right: 34px; margin-right: 34px; border-right: 1px solid var(--line); }
.stat-value { color: var(--plum); font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.stats-note { margin: 0 0 0 auto; color: var(--ink-soft); font-size: 11px; line-height: 1.7; text-align: right; }
.stats-note span { color: var(--muted); }

.library { padding-top: 69px; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.library-heading .eyebrow { margin-bottom: 10px; }
h2 { margin-bottom: 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.06em; line-height: 1.15; }
.match-count { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.search-box { display: flex; width: min(100%, 500px); height: 50px; align-items: center; gap: 13px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 5px 20px rgba(48, 33, 61, .035); transition: border-color .2s ease, box-shadow .2s ease; }
.search-box:focus-within { border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(154, 124, 242, .13); }
.search-box svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: var(--muted); }
.clear-search { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: #f1edf5; color: var(--ink-soft); font-size: 17px; line-height: 1; }
.clear-search:hover, .clear-search:focus-visible { background: var(--lilac-pale); color: var(--plum); }
.copy-hint { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 11px; }
.copy-hint-icon { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #d9d0e2; border-radius: 5px; color: var(--ink-soft); font-family: Georgia, serif; font-size: 12px; }
.song-list-wrap { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.song-list-head, .song-row { display: grid; grid-template-columns: 54px minmax(0, 1.35fr) minmax(0, 1fr) 45px; align-items: center; column-gap: 16px; }
.song-list-head { min-height: 43px; padding: 0 18px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.song-row { min-height: 68px; padding: 0 18px; border-top: 1px solid var(--line); transition: background .18s ease; }
.song-row:hover { background: #fff; }
.song-index { color: #776d82; font-family: Georgia, "Times New Roman", serif; font-size: 12px; }
.song-title { display: inline-block; overflow: hidden; max-width: 100%; padding: 7px 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 750; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.song-title:hover, .song-title:focus-visible { color: #7455d2; text-decoration: underline; text-decoration-color: rgba(116, 85, 210, .35); text-underline-offset: 4px; }
.song-artist { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.copy-song { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #776d82; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.copy-song svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.copy-song:hover, .copy-song:focus-visible { border-color: #ded4f3; background: var(--lilac-pale); color: #7655d5; }
.loading-state, .empty-state, .error-state { display: flex; min-height: 190px; align-items: center; justify-content: center; padding: 35px 20px; color: var(--muted); font-size: 13px; text-align: center; }
.loading-spinner { width: 17px; height: 17px; margin-right: 8px; border: 2px solid #e2dbed; border-top-color: var(--lilac); border-radius: 50%; vertical-align: -4px; animation: spin .8s linear infinite; }
.empty-state strong, .error-state strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 16px; }
.error-state code { padding: 2px 5px; border-radius: 4px; background: #f0ebf3; font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.maintainer-note { display: flex; align-items: center; gap: 13px; margin-top: 52px; padding: 17px 20px; border: 1px solid #e9e1f3; border-radius: 12px; background: rgba(239, 233, 255, .47); }
.note-mark { color: var(--lilac); font-size: 17px; }
.maintainer-note p { flex: 1; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.maintainer-note strong { color: var(--ink); }
.maintainer-note code { padding: 2px 5px; border-radius: 4px; background: rgba(255, 255, 255, .75); color: var(--plum); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.maintainer-note a { flex: 0 0 auto; color: #7455d2; font-size: 11px; font-weight: 800; }
.maintainer-note a:hover, .maintainer-note a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

.site-footer { margin-top: 68px; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer p { margin: 0; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--plum); }
.footer-separator { padding: 0 9px; color: #c7bdce; }
.toast { position: fixed; z-index: 10; right: 24px; bottom: 24px; max-width: min(340px, calc(100% - 48px)); padding: 12px 16px; border-radius: 9px; background: var(--plum); color: #fff; font-size: 12px; box-shadow: 0 9px 30px rgba(48, 33, 61, .2); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .22s ease, transform .22s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .shell { width: min(100% - 40px, 640px); }
  .hero { grid-template-columns: 1fr; gap: 15px; margin-top: 25px; padding: 45px 38px 30px; }
  .hero-visual { min-height: 250px; }
  .visual-caption { right: 4%; bottom: 0; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 21px 0; padding: 22px 4px; }
  .stat-item { min-width: 0; padding: 0 17px; margin-right: 0; }
  .stat-item:first-child { padding-left: 0; }
  .stat-item:nth-of-type(3) { padding-right: 0; margin-right: 0; border-right: 0; }
  .stats-note { grid-column: 1 / -1; width: 100%; margin: 0; padding-top: 3px; border-top: 1px solid var(--line); text-align: left; }
  .library { padding-top: 53px; }
}

@media (max-width: 600px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; }
  .site-nav { gap: 17px; }
  .hero { padding: 35px 24px 22px; border-radius: 21px; }
  h1 { font-size: clamp(37px, 12vw, 53px); }
  .hero-description { margin-bottom: 24px; font-size: 13px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .hero-visual { min-height: 227px; transform: scale(.88); }
  .stats { row-gap: 20px; padding-inline: 0; }
  .stat-item { min-width: 0; padding: 0 10px; margin-right: 0; }
  .stat-item:first-child { padding-left: 0; }
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 10px; }
  .library-heading { align-items: start; flex-direction: column; gap: 8px; margin-bottom: 19px; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 11px; }
  .search-box { width: 100%; }
  .copy-hint { justify-content: flex-end; }
  .song-list-head { display: none; }
  .song-list-wrap { border-top: 1px solid var(--line); }
  .song-row { grid-template-columns: 34px minmax(0, 1fr) 35px; grid-template-rows: auto auto; column-gap: 9px; row-gap: 3px; min-height: 64px; padding: 10px 8px; }
  .song-artist { grid-column: 2; grid-row: 2; align-self: start; margin: 0; padding: 0; font-size: 10px; }
  .song-title { grid-column: 2; grid-row: 1; align-self: end; padding: 0; font-size: 13px; }
  .song-index { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .copy-song { grid-column: 3; grid-row: 1 / span 2; }
  .maintainer-note { align-items: flex-start; margin-top: 36px; padding: 14px; }
  .maintainer-note a { display: none; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 9px; }
  .toast { right: 16px; bottom: 16px; max-width: calc(100% - 32px); }
}

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