/* StringSong landing: app palette (flutter_app/lib/app.dart Pal) + record room accents, dark-first. */
@font-face {
  font-family: "StringSerif";
  src: url("/assets/serif.aab9fecab1.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #12100e;
  --paper: #1a1714;
  --surface: #1e1a16;
  --raise: #29241f;
  --ink: #f2eadf;
  --muted: #b3aa9d;
  --line: #3a332c;
  --lamp: #e8b66c;
  --lamp-ink: #12100e;
  /* record room (storage/music_library/site/room) */
  --night: #1a1928;
  --amber: #f2c58a;
  --walnut: #5b3f31;
  --radius: 14px;
  --max: 1120px;
  --head: 3.75rem;
  --serif: "StringSerif", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.7 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lamp); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.25; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.serif { font-family: var(--serif); font-weight: 700; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
.after { margin-top: 24px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html:not(.js) .js-only { display: none !important; }
[id] { scroll-margin-top: 76px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--lamp); color: var(--lamp-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; height: var(--head); background: rgba(18, 16, 14, .9); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .top { background: rgba(18, 16, 14, .72); backdrop-filter: blur(10px); } }
.top .wrap { display: flex; align-items: center; gap: 8px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.12rem; white-space: nowrap; margin: 0; min-width: 0; flex: 0 1 auto; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand .word { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.top .spacer { flex: 1 1 0; min-width: 0; }
.lang { color: var(--muted); text-decoration: none; font-size: .9rem; padding: 0 .75rem; min-height: 2.5rem; min-width: 2.75rem; justify-content: center; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; flex: none; }
.short { display: none; }
/* em breakpoints follow the reader's text size: bigger text switches to the compact header sooner */
@media (max-width: 40em) { .top .open .long { display: none; } .top .open .short { display: inline; } }
@media (max-width: 30em) { .lang .long { display: none; } .lang .short { display: inline; } }
@media (max-width: 21em) { .top .brand .word { display: none; } }
.lang:hover { color: var(--ink); border-color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px;
  background: var(--lamp); color: var(--lamp-ink); font-weight: 650; text-decoration: none; white-space: nowrap; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.big { min-height: 54px; padding: 14px 30px; font-size: 1.08rem; }
.top .btn { min-height: 2.5rem; padding: 0 1rem; font-size: .9rem; flex: none; }

/* ---------------------------------------------------------------- home: the record story
   Static by default (no JS, or prefers-reduced-motion): the record sits on the turntable, song shown below.
   html.motion: a tall section with a sticky stage; home.js drives transforms from scroll progress. */
.story {
  position: relative;
  background: radial-gradient(110% 70% at 75% 0%, rgba(242, 197, 138, .16), rgba(242, 197, 138, 0) 60%),
              linear-gradient(180deg, var(--night) 0%, #16141c 55%, var(--bg) 100%);
}
.stage { display: grid; gap: 20px; justify-items: center; align-items: center; max-width: var(--max); margin: 0 auto; padding: 28px 16px 48px; }
@media (min-width: 820px) and (min-aspect-ratio: 5/4) { .stage { grid-template-columns: auto minmax(0, 1fr); gap: 56px; padding: 48px 32px 64px; } }
.scene-box, .song { touch-action: pan-y; }
.scene-box { position: relative; width: min(84vw, 420px); aspect-ratio: 1; flex: none; user-select: none; -webkit-user-select: none; }
.scene { position: absolute; inset: 0; transform-origin: 50% 50%; }
.plinth {
  position: absolute; inset: 0; border-radius: 7%;
  background: linear-gradient(150deg, #7a5644 0%, var(--walnut) 38%, #3e2a20 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -10px 30px rgba(0, 0, 0, .35);
}
.platter { position: absolute; inset: 5%; border-radius: 50%; background: radial-gradient(circle, #2a2a2e 0 58%, #45454b 59%, #1d1d20 64%, #2c2c31 100%); box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
.rec { position: absolute; inset: 7%; }
.swap { position: absolute; inset: 0; transition: transform .26s cubic-bezier(.3, .7, .3, 1), opacity .26s ease; }
.swap.no-tr { transition: none; }
.swap.out-l, .swap.in-l { transform: translateX(-75%) rotate(-60deg); opacity: 0; }
.swap.out-r, .swap.in-r { transform: translateX(75%) rotate(60deg); opacity: 0; }
html:not(.motion) .swap.out-l, html:not(.motion) .swap.in-l, html:not(.motion) .swap.out-r, html:not(.motion) .swap.in-r { transform: none; }
.disc {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 0 34%, rgba(255, 255, 255, .05) 34.5%, rgba(0, 0, 0, 0) 35.5% 95%, rgba(255, 255, 255, .07) 96%, #0d0d0f 97%),
              repeating-radial-gradient(circle, #141417 0 1.4px, #1f1f24 2px, #141417 2.8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .6);
}
.label { position: absolute; left: 32%; top: 32%; width: 36%; height: 36%; border-radius: 50%; object-fit: cover; pointer-events: none; }
.disc::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3%; height: 3%; margin: -1.5% 0 0 -1.5%; border-radius: 50%; background: #0b0b0c; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.sheen { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 20deg, rgba(255, 255, 255, 0) 0 8%, rgba(255, 255, 255, .09) 13%, rgba(255, 255, 255, 0) 20% 52%, rgba(255, 255, 255, .07) 59%, rgba(255, 255, 255, 0) 66%); }
.ring { position: absolute; inset: 4.5%; width: 91%; height: 91%; transform: rotate(-90deg); opacity: 0; transition: opacity .4s; pointer-events: none; }
.ring circle { fill: none; stroke-width: .9; }
.ring-bg { stroke: rgba(242, 197, 138, .18); }
.ring-fg { stroke: var(--amber); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
.story.playing .ring { opacity: 1; }
.arm { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.arm-g { transform-box: view-box; transform-origin: 88px 12px; }
.sleeve { display: none; position: absolute; inset: 11%; }
.sleeve img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.play {
  position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--amber); background: rgba(18, 16, 14, .72); border: 1px solid rgba(242, 197, 138, .55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5); transition: transform .2s, background .2s, opacity .3s;
}
.play:hover { background: rgba(18, 16, 14, .86); transform: scale(1.05); }
.play svg { width: 30px; height: 30px; }
.play .i-pause, .play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-pause { display: block; }

.panel { width: 100%; max-width: 560px; text-align: center; }
@media (min-width: 820px) and (min-aspect-ratio: 5/4) { .panel { text-align: left; } }
.panel h1 { margin-bottom: .35em; }
.sub { color: var(--muted); }
.layer.cap, .hint { display: none; }
.song { margin-top: 18px; }
.kicker { display: flex; gap: 10px; align-items: center; justify-content: inherit; margin-bottom: 6px; font-size: .85rem; color: var(--muted); }
@media (max-width: 819px), (max-aspect-ratio: 5/4) { .kicker { justify-content: center; } }
.badge { display: inline-block; background: rgba(242, 197, 138, .12); color: var(--amber); border: 1px solid rgba(242, 197, 138, .35); font-size: .75rem; border-radius: 999px; padding: 1px 10px; font-weight: 600; }
.title { font-size: clamp(1.5rem, 5vw, 2.3rem); margin: 0 0 .15em; }
.who { color: var(--ink); opacity: .85; margin-bottom: .4em; }
.blurb { color: var(--muted); font-size: .95rem; max-width: 34em; margin-left: auto; margin-right: auto; }
@media (min-width: 820px) and (min-aspect-ratio: 5/4) { .blurb { margin-left: 0; } }
.song .title, .song .who, .song .blurb { transition: opacity .2s; }
.song.swapping .title, .song.swapping .who, .song.swapping .blurb { opacity: 0; }
.ctrls { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
@media (min-width: 820px) and (min-aspect-ratio: 5/4) { .ctrls { justify-content: flex-start; } }
.nav-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.nav-btn:hover { border-color: var(--muted); }
.nav-btn svg { width: 20px; height: 20px; }
.dots { display: flex; }
.dot { width: 30px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(242, 234, 223, .3); transition: background .2s, transform .2s; }
.dot[aria-current="true"]::before { background: var(--amber); transform: scale(1.3); }
.swipe-hint { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }

/* the scroll story (only with motion; home.js writes the per-frame transforms) */
html.motion .story { height: 440vh; height: 440svh; }
html.motion .stage {
  position: sticky; top: var(--head); height: calc(100vh - var(--head)); height: calc(100svh - var(--head)); max-width: none; overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr); align-content: center; padding: 16px 16px 20px; gap: 12px;
}
html.motion .scene-box { width: min(84vw, 50svh, 520px); }
html.motion .sleeve { display: block; }
html.motion .plinth, html.motion .platter { opacity: 0; }
html.motion .rec { transform: scale(.84); }
html.motion .arm { opacity: 0; }
html.motion .arm-g { transform: rotate(-25deg); }
html.motion .scene, html.motion .rec, html.motion .sleeve, html.motion .disc { will-change: transform; }
html.motion .plinth, html.motion .platter, html.motion .arm { will-change: opacity, transform; }
html.motion .panel { position: relative; height: 100%; min-height: 220px; max-width: 600px; }
html.motion .layer { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
html.motion .layer.on { opacity: 1; transform: none; pointer-events: auto; }
html.motion .layer.cap { display: flex; }
html.motion .cap p { font-size: clamp(1.4rem, 5vw, 2.2rem); line-height: 1.35; margin: 0; }
html.motion .song { margin: 0; }
html.motion .hint { display: inline-flex; align-items: center; gap: 8px; justify-content: center; color: var(--muted); font-size: .9rem; margin-top: 8px; }
html.motion .play { opacity: 0; pointer-events: none; }
html.motion .story.live .play { opacity: 1; pointer-events: auto; }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber); transform: rotate(45deg); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(-2px) rotate(45deg); } 50% { transform: translateY(3px) rotate(45deg); } }
@media (min-width: 820px) and (min-aspect-ratio: 5/4) {
  html.motion .stage { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr; gap: 56px; padding: 24px 48px; max-width: 1240px; }
  html.motion .scene-box { width: min(70svh, 46vw, 600px); }
  html.motion .panel { height: 60%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  html.motion .stage { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr; gap: 24px; padding: 8px 24px; }
  html.motion .scene-box { width: min(78svh, 46vw); }
  .panel { text-align: left; }
  .kicker, .ctrls { justify-content: flex-start; }
  .blurb { display: none; }
  .title { font-size: 1.4rem; }
  html.motion .cap p { font-size: 1.4rem; }
  .panel h1 { font-size: 1.6rem; }
}

/* below the story */
.about { padding: 72px 0 80px; border-top: 1px solid var(--line); }
.narrow { max-width: 720px; text-align: center; }
.about .lead { font-size: 1.1rem; }
.ai-line, .plans-line { color: var(--muted); }
.about .cta { margin-top: 28px; }

/* legal pages */
.doc { padding: 48px 0 64px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.doc h2 { font-size: 1.35rem; margin-top: 2em; padding-top: .4em; }
.doc h3 { margin-top: 1.4em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .4em; }
.doc .meta { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.doc .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 28px; }
.doc .toc ol { margin: 0; }
.doc .tw { overflow-x: auto; margin: 1em 0 1.4em; }
.doc table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--ink); background: var(--paper); }
.doc .box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 1em 0; }
.doc .langs { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.doc .langs a[aria-current] { color: var(--ink); text-decoration: none; font-weight: 600; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p:last-child { margin-bottom: 0; }
code { background: var(--raise); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }

/* footer */
footer { border-top: 1px solid var(--line); background: var(--paper); padding: 40px 0 28px; font-size: .92rem; color: var(--muted); }
footer .cols { display: grid; gap: 24px; }
@media (min-width: 720px) { footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
footer h2 { font-size: 1rem; color: var(--ink); margin-bottom: 10px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 6px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }
footer .fine { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; }

.nf { text-align: center; padding: 96px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .15s !important; animation: none !important; scroll-behavior: auto !important; }
  .swap { transition-property: opacity !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* "中文版" hint for Chinese-language browsers on English pages (site.js); dismissible, never a redirect */
.langhint { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.langhint a { color: var(--amber); font-weight: 600; text-decoration: none; }
.langhint button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }

/* our stance (home) and its opening paragraph on the AI notice */
/* an even card with a warm wash from the top and a short amber rule under the heading (no side stripe) */
.stance { margin: 40px auto 8px; padding: 28px 26px; max-width: 640px; text-align: left; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 9%, transparent), transparent 70%), var(--surface); }
.stance h2 { font-size: 1.3rem; }
.stance h2::after { content: ""; display: block; width: 32px; height: 2px; margin-top: 12px; border-radius: 2px; background: var(--amber); }
.stance p { margin: 0; color: var(--ink); }
.doc .stance-lead { font-size: 1.05rem; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--amber) 8%, transparent), transparent 80%), var(--surface); }

/* catalog pages: /songs/, /albums/, /singers/, /genres/, /moods/, /music/, /new/ */
.cat { padding: 24px 0 56px; }
.cat .wrap { max-width: 860px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 20px; padding: 0; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); }
.ph { display: grid; gap: 20px; margin-bottom: 36px; }
.ph .pic { width: min(100%, 260px); aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
@media (min-width: 640px) { .ph:not(.one) { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; } }
.ph h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: .15em; overflow-wrap: anywhere; }
.ph .alt { color: var(--muted); font-size: 1.1rem; margin-bottom: .6em; }
.ph .pr { color: var(--muted); font-size: .95rem; letter-spacing: .02em; margin: -.3em 0 .5em; overflow-wrap: anywhere; }
.ph .by { margin-bottom: .8em; }
.ph .kicker { flex-wrap: wrap; justify-content: flex-start; }
.blurb-p { color: var(--muted); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1em; padding: 0; }
.chips a, .chips span:not(.n) { display: inline-block; padding: 2px 12px; min-height: 30px; line-height: 26px; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--muted); }
.chips .n { color: var(--muted); margin-left: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 1em; }
.facts div { min-width: 0; }
.facts dt { font-size: .78rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.pv audio { width: 100%; max-width: 420px; display: block; margin-bottom: 4px; }
.small { font-size: .85rem; }
.lyrics p { margin: 0 0 1.2em; }
.lyrics { max-width: 36em; overflow-wrap: anywhere; }
.cat section { margin-bottom: 32px; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; min-height: 56px; color: var(--ink); text-decoration: none; }
.row:hover { background: var(--surface); }
.row .th { width: 56px; height: 56px; flex: none; border-radius: 8px; object-fit: cover; }
.row .rt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.row .t { font-weight: 600; overflow-wrap: anywhere; }
.row .s { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.row .d { color: var(--muted); font-size: .88rem; flex: none; font-variant-numeric: tabular-nums; }
.cat .ai-line { margin-top: 36px; }

/* home: browse the music */
.browse { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.browse .links { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.chips a { min-height: 40px; line-height: 36px; padding: 2px 14px; }
