:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --ink: #1e201e;
  --muted: #5d5e59;
  --line: #ccccc2;
  --blue: #2641b4;
  --sans: "Instrument Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden], .symbols { display: none !important; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
h1, h2, h3, p, dl, dd { margin: 0; }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #3559db; outline-offset: 4px; }
.shell { width: min(1280px, calc(100% - clamp(40px, 10vw, 164px))); margin-inline: auto; }
.skip { position: absolute; top: -100px; left: 10px; padding: 12px; background: white; z-index: 5; }
.skip:focus { top: 10px; }
.mast-inner { height: 82px; display: flex; align-items: center; border-bottom: 1px solid var(--ink); gap: 38px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 850 35px/.92 Arial, sans-serif; letter-spacing: -.075em; }
.brand em, .footer em { font-family: "Instrument Serif", Georgia, serif; font-weight: 500; letter-spacing: -.075em; }
.brand, .mast nav button, .share-station { white-space: nowrap; }
.mast nav { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.mast nav a, .mast nav button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; text-decoration: none; font-size: 14px; }
.mast nav :is(a,button):hover, .text-button:hover, .player-links a:hover { color: var(--blue); text-decoration: underline; }
.share-station, .outline, .primary { display: inline-flex; justify-content: center; gap: 9px; align-items: center; min-height: 46px; padding: 0 20px; font-size: 14px; font-weight: 650; border-radius: 4px; }
.share-station, .outline { border: 1px solid #a7aaa0; }
.share-station { min-height: 41px; padding-inline: 15px; font-size: 13px; }
.primary { background: var(--blue); color: white; border: 1px solid var(--blue); }
.primary:hover { background: #192e92; }
.outline:hover,.share-station:hover { border-color: var(--ink); background: #ebebe2; }
.hero { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(0,.96fr); align-items: center; gap: clamp(34px,6vw,100px); padding: clamp(30px, 3.7vw, 58px) 0; }
.art-field { display: flex; align-items: center; justify-content: center; background: #e8e7db; position: relative; aspect-ratio: 1.18; padding: 7% 10%; }
.artwork { display: flex; width: 100%; padding: 0; background: #ddd9c5; color: white; box-shadow: 0 12px 18px -8px #27260f66, 0 2px 3px #27260f45; cursor: zoom-in; }
.spine { width: 7%; flex-shrink: 0; padding: 4% 0; display: flex; align-items: center; justify-content: space-between; flex-direction: column; background: var(--blue); border-right: 1px solid #939cba; }
.spine span { writing-mode: vertical-rl; font: 700 clamp(9px,.85vw,13px)/1 var(--mono); letter-spacing: .19em; }
.spine svg { width: 58%; height: auto; aspect-ratio: 1; }
.cover-window { flex: 1; position: relative; overflow: hidden; aspect-ratio: 1; }
.cover-window img { display: block; width: 100%; height: 100%; object-fit: cover; }
.expand { position: absolute; bottom: 12px; right: 12px; width: 35px; height: 35px; display: grid; place-items: center; color: white; background: #151812c9; border: 1px solid #ffffff73; border-radius: 50%; }
.expand svg { width: 16px; height: 16px; }
.hero-copy { padding-right: clamp(0px,2vw,30px); max-width: 41rem; min-width: 0; }
.feature-kicker { display: flex; align-items: center; gap: 8px; color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.feature-kicker svg { width: 17px; height: 17px; }
h1 { font-family: var(--display); font-size: clamp(44px,5.5vw,82px); line-height: 1.08; letter-spacing: -.075em; margin: 18px 0; overflow-wrap: anywhere; }
h1 span { display: block; }
.byline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; font-weight: 550; }
.byline strong { font: 700 14px var(--mono); letter-spacing: .08em; }
.byline [aria-hidden] { color: #a4a397; }
#description { max-width: 30em; margin: 13px 0 0; color: var(--muted); line-height: 1.85; font-size: 15px; }
.hero-actions { display: flex; gap: 11px; margin: 24px 0; flex-wrap: wrap; }
.credits { display: flex; gap: clamp(25px,4vw,70px); border-top: 1px solid var(--line); padding-top: 14px; }
.credits dt { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.credits dd, .duration, .track-date, .track-number { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.credits dd { font-size: 13px; }
.library { scroll-margin-top: 14px; min-width: 0; }
.library-head { display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--ink); }
.tabs { display: flex; gap: 28px; }
.tabs button { min-height: 50px; font-size: 21px; padding: 0 0 11px; color: #6c6c65; position: relative; }
.tabs button[aria-selected=true] { color: var(--ink); font-weight: 720; }
.tabs button[aria-selected=true]::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; background: var(--blue); }
.count { font: 12px var(--mono); color: var(--muted); margin-bottom: 14px; }
.track { display: grid; grid-template-columns: minmax(0,1fr) 130px 65px 44px 44px; align-items: center; column-gap: 12px; border-bottom: 1px solid var(--line); padding: 14px 2px; }
.track:hover { background: #eeeee6; }
.track-main { display: flex; align-items: center; gap: 17px; text-align: left; min-width: 0; padding: 0; }
.track-main img { width: 53px; height: 53px; object-fit: cover; }
.track-number, .track-date, .duration { color: var(--muted); font-size: 12px; }
.track-number { width: 24px; }
.track-main span:last-child { min-width: 0; }
.track-main strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.track-main small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.track-main:hover strong { color: var(--blue); }
.icon-button { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; }
.icon-button:hover { color: var(--blue); background: #e1e4f0; }
.play-circle { border: 1px solid #b2b4a9; }
#words-view { padding: 30px 0; }
.words-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 25px; }
.words-heading h2 { font-family: var(--display); font-size: clamp(24px,3vw,37px); letter-spacing: -.04em; }
.words-heading h2,.words-heading label { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.words-heading label { font-size: 13px; color: var(--muted); }
.words-heading select { max-width: min(100%, 26ch); }
select,.share-input { border: 1px solid #afb0a6; background: #fffefa; border-radius: 4px; padding: 10px; color: var(--ink); max-width: 100%; }
#words-content > div { columns: 2; column-gap: 50px; }
.lyrics-part { break-inside: avoid; padding: 0 0 22px; }
.lyrics-part h3 { color: var(--blue); font-size: 12px; margin-bottom: 6px; }
.lyrics-part p { white-space: pre-line; font: 17px/1.9 var(--display); overflow-wrap: anywhere; }
.footer { display: flex; align-items: center; gap: 15px; min-height: 77px; margin-top: 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer span:first-child { color: var(--ink); font: 750 19px Arial,sans-serif; letter-spacing: -.07em; }
.footer a { margin-left: auto; }
#notice,.empty { padding: 16px 0; font-size: 14px; line-height: 1.75; }
#notice { border-bottom: 1px solid var(--line); }
dialog { width: min(540px, calc(100% - 32px)); padding: 0; border: 1px solid #babcb3; border-radius: 8px; background: var(--paper); color: var(--ink); max-height: 85dvh; box-shadow: 0 22px 90px #11151b33; overscroll-behavior: contain; }
dialog::backdrop { background: #141922b8; }
body:has(dialog[open]) { overflow: hidden; }
.panel-head { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px 10px 25px; border-bottom: 1px solid var(--line); background: var(--paper); }
.panel-head h2 { font-size: 20px; overflow-wrap: anywhere; }
.panel-head button { flex: none; }
#panel-body { padding: 22px 25px; }
.panel-description { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 15px; }
.panel-description:last-child { margin-bottom: 0; }
.player-heading { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.player-art { width: 80px; aspect-ratio: 1; object-fit: cover; }
.player-meta { display: grid; gap: 4px; }
.player-meta span, .play-status, .availability { font-size: 13px; color: var(--muted); }
.availability { font-size: 11px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 3px; font-weight: 400; }
audio { width: 100%; display: block; }
.play-status:not(:empty) { margin-top: 10px; }
.admin-home { margin-left: auto; font-size: 14px; }
.owner-main { max-width: 760px; padding: 39px 0 65px; }
.owner-heading,.owner-pair { display: flex; align-items: center; gap: 14px; }
.owner-heading { justify-content: space-between; margin-bottom: 20px; }
.owner-heading h1 { font-size: clamp(34px,5vw,55px); margin: 0; }
.owner-form,.owner-form fieldset,.owner-form label { display: grid; gap: 8px; }
.owner-form,.owner-form fieldset { gap: 18px; }
.owner-form fieldset { margin: 0; padding: 20px; border: 1px solid var(--line); min-width: 0; }
.owner-form legend { padding: 0 6px; font-weight: 650; }
.owner-form small { color: var(--muted); font-weight: 400; }
.owner-form input:not([type=hidden]),.owner-form textarea,.owner-form select { min-width: 0; width: 100%; padding: 11px; border: 1px solid #adb0a6; background: #fffefa; border-radius: 4px; font: inherit; }
.owner-form textarea { resize: vertical; }
.owner-form label { font-size: 14px; font-weight: 600; }
.owner-pair > * { flex: 1; min-width: 0; }
.owner-form button { justify-self: start; }
button:disabled { opacity: .6; cursor: default; }
.login-form { max-width: 360px; }
.owner-notice,.owner-error { padding: 14px; margin: 14px 0; line-height: 1.6; background: #eaede4; border-left: 3px solid var(--blue); }
.owner-error { background: #f8e8df; border-color: #ae4626; }
#upload-status { color: var(--muted); font-size: 14px; }
.player-links, .copy-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.player-links { justify-content: space-between; }
.player-links a,.text-button { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; padding: 0; font-size: 13px; color: var(--blue); }
.share-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 650; }
.share-input { width: 100%; font: 14px var(--mono); }
.copy-bar span { font-size: 13px; }
dialog[data-mode=cover] { width: min(78dvh, 780px, calc(100% - 28px)); }
dialog[data-mode=cover] #panel-body { padding: 0; }
.full-cover { width: 100%; display: block; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  button { transition: background-color .18s, border-color .18s, color .18s, transform .18s; }
  button:active { transform: translateY(1px); }
  .cover-window img { transition: transform .45s ease-out; }
  .artwork:hover img { transform: scale(1.025); }
  .hero-copy { animation: enter .45s ease-out both; }
  dialog[open] { animation: enter .18s ease-out; }
  @keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 840px) {
  .shell { width: calc(100% - 48px); }
  .hero { gap: 30px; }
  .art-field { padding: 6%; aspect-ratio: 1; }
  .hero-copy { padding: 0; }
  h1 { font-size: clamp(40px,6vw,55px); }
  .hero-actions { margin: 16px 0; }
  .track { grid-template-columns: minmax(0,1fr) 103px 48px 44px 44px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .mast-inner { height: 64px; gap: 16px; }
  .brand { font-size: 27px; gap: 7px; }
  .brand img { width: 28px; height: 28px; }
  .mast nav { gap: 0; }
  .mast nav a { display: none; }
  .mast nav button { font-size: 12px; }
  .share-station { min-height: 40px; padding: 0 11px; font-size: 12px; gap: 6px; }
  .share-station svg { width: 15px; height: 15px; }
  .hero { grid-template-columns: minmax(0,1fr); padding: 20px 0 26px; gap: 23px; }
  .art-field { aspect-ratio: auto; padding: 18px; }
  .artwork { width: min(81%, 265px); }
  .feature-kicker { font-size: 12px; }
  h1 { font-size: clamp(34px,9vw,54px); margin: 9px 0; }
  h1 span { display: inline; }
  .byline { font-size: 13px; }
  #description { margin-top: 9px; font-size: 14px; }
  .hero-actions { gap: 9px; margin: 15px 0; }
  .credits { padding-top: 10px; gap: 30px; }
  .credits div { display: flex; align-items: baseline; gap: 7px; }
  .credits dt { margin-bottom: 0; }
  .credits dd { font-size: 12px; }
  .tabs { gap: 24px; }
  .tabs button { font-size: 19px; min-height: 46px; padding-bottom: 6px; }
  .count { margin-bottom: 10px; }
  .track { grid-template-columns: minmax(0,1fr) 38px 44px; gap: 6px; padding-block: 11px; }
  .track-date,.track-number,.track .play-circle { display: none; }
  .track-main { gap: 10px; }
  .track-main strong { font-size: 14px; }
  .track-main img { width: 44px; height: 44px; }
  .footer { min-height: 62px; margin-top: 26px; flex-wrap: wrap; }
  #words-content > div { columns: 1; }
  dialog:not([data-mode=cover]) { width: 100%; max-width: 100%; max-height: 86dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .panel-head { padding-inline: 19px 12px; }
  #panel-body { padding: 17px 19px; }
}
@media (max-width: 355px) {
  .shell { width: calc(100% - 28px); }
  .mast-inner { gap: 10px; }
  .brand { font-size: 22px; gap: 5px; }
  .brand img { width: 24px; height: 24px; }
  .mast nav button { padding-inline: 0; }
  .share-station { padding-inline: 8px; }
}
