:root {
  color-scheme: dark;
  font-family: Georgia, 'Times New Roman', serif;
  color: #f3eed9;
  background: #000;
  font-synthesis: none;
  --gold: #ffcf70;
  --gutter: 48px;
  --greeting-font: 'Songti SC', SimSun, 'Noto Serif CJK SC', serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; color: inherit; }
button:focus-visible { outline: 1px solid #fff0b2; outline-offset: 5px; }
.night { position: relative; isolation: isolate; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: #000; }
.sky, .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.title { position: absolute; z-index: 1; top: 47.5%; left: max(var(--gutter), 9.3%); transform: translateY(-50%); }
.title h1 { margin: 0; color: var(--gold); font: 400 clamp(42px, 6vw, 88px)/1.2 var(--greeting-font); }
.foot { position: absolute; z-index: 2; bottom: 22px; right: var(--gutter); }
.controls { display: flex; gap: 9px; }
.control { position: relative; display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #b6be9d42; border-radius: 50%; background: #171717a3; color: #e1d8ac; cursor: pointer; transition: background .2s, border-color .2s; }
.control:hover, .control:focus-visible { background: #292929; border-color: #cebb79; }
.control:disabled { opacity: .45; cursor: default; }
.control svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.control .play-icon, .control[data-paused="true"] .pause-icon { display: none; }
.control[data-paused="true"] .play-icon { display: block; }
.music-panel, .volume-panel { color: #f3eed9; border: 1px solid #a995604d; border-radius: 16px; background: #1c1b19; box-shadow: 0 16px 56px #0009; font: 14px/1.5 'Microsoft YaHei', sans-serif; }
.music-panel { width: min(360px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 20px; }
.music-panel::backdrop { background: #0008; }
.music-header, .music-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.music-header h2 { margin: 0; font-size: 19px; font-weight: 600; }
.close-panel { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #ffffff0d; cursor: pointer; font: 23px/1 sans-serif; }
.music-tracks { display: grid; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.music-tracks:empty, .music-status:empty { display: none; }
.track { position: relative; width: 100%; padding: 10px 32px 10px 12px; border: 1px solid #ffffff15; border-radius: 8px; background: #ffffff08; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.track:hover, .close-panel:hover { background: #ffffff16; }
.track[aria-pressed="true"] { color: var(--gold); border-color: #a9956080; }
.track[aria-pressed="true"]::after { content: ''; position: absolute; top: 50%; right: 14px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; transform: translateY(-50%); }
.music-status { color: #ebbd8d; }
.music-footer { padding-top: 12px; border-top: 1px solid #ffffff20; }
.music-state { color: #d6cdbb; }
.music-switch { width: 46px; height: 26px; padding: 3px; border: 1px solid #ffffff29; border-radius: 18px; background: #45423c; cursor: pointer; }
.music-switch::before { content: ''; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff3da; }
.music-switch[aria-checked="true"] { background: #826b3a; }
.music-switch[aria-checked="true"]::before { margin-left: auto; }
.music-switch:disabled { opacity: .5; cursor: default; }
.volume-panel { position: fixed; inset: auto var(--gutter) 76px auto; margin: 0; width: 190px; padding: 12px 14px; }
.volume-panel label { display: flex; justify-content: space-between; }
.volume-panel output { color: var(--gold); font-variant-numeric: tabular-nums; }
.volume-panel input { display: block; width: 100%; margin: 8px 0 0; accent-color: var(--gold); }
.control::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 11px); right: 0; padding: 6px 9px; border: 1px solid #b6be9d45; border-radius: 4px; background: #1c1c1c; color: #f2e9d1; font: 12px/1.3 'Microsoft YaHei', sans-serif; white-space: nowrap; pointer-events: none; opacity: 0; }
.control:not(:disabled):is(:hover, :focus-visible)::after { opacity: 1; }
.notice { position: absolute; z-index: 2; bottom: 21%; right: var(--gutter); left: var(--gutter); text-align: center; font: 14px 'Microsoft YaHei', sans-serif; }
@media (max-width: 840px) {
  :root { --gutter: 25px; }
  .title { top: 64px; left: var(--gutter); right: var(--gutter); transform: none; text-align: center; }
  .title h1 { font-size: 40px; }
}
@media (max-width: 580px) {
  :root { --gutter: 20px; }
  .title h1 { font-size: clamp(34px, 11vw, 48px); }
  .foot { bottom: 16px; }
  .volume-panel { bottom: 70px; }
}
@media (max-height: 700px) and (max-width: 840px) {
  .title { top: 44px; }
  .title h1 { font-size: 34px; }
}
@media (max-height: 700px) and (max-width: 580px) {
  .title h1 { font-size: clamp(32px, 10vw, 40px); }
}
@media (max-height: 550px) and (min-width: 600px) and (max-width: 840px) {
  .title { top: 49%; right: auto; transform: translateY(-50%); text-align: left; }
  .title h1 { font-size: clamp(26px, 4vw, 34px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
