:root {
  color-scheme: light;
  background: #e4ebd5;
  color: #142213;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, figure, blockquote, p, h1 { margin: 0; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
button:not(:disabled), select:not(:disabled), summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }

.poster {
  --paper: #e4ebd5;
  --ink: #142213;
  --accent: #a63819;
  --rule: #14221336;
  --mono: "SFMono-Regular", "IBM Plex Mono", Consolas, monospace;
  --edge: clamp(16px, 2.75vw, 44px);
  --inset: calc(var(--edge) + clamp(15px, 2.4vw, 42px));
  display: grid;
  grid-template-areas: "head head" "read art" "page page";
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(24px, 4vw, 78px);
  row-gap: clamp(16px, 3vh, 38px);
  position: relative;
  margin-inline: auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--edge) + 14px) var(--inset) calc(var(--edge) + 12px);
  background: var(--paper);
  color: var(--ink);
  transition: background-color .55s cubic-bezier(.2, .75, .3, 1);
}

.poster[data-plate="1"] { --paper: #ecd0a0; --accent: #305016; }
.poster[data-plate="2"] { --paper: #ead8cb; --accent: #4a4269; }
.poster[data-plate="3"] { --paper: #d9e5db; --accent: #225645; }

.register { position: absolute; inset: var(--edge); pointer-events: none; }
.register i { position: absolute; width: 12px; height: 12px; border: solid var(--ink); border-width: 0; opacity: .42; }
.register i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.register i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.register i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.register i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.masthead {
  grid-area: head;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block-end: clamp(12px, 2vh, 24px);
  border-bottom: 1px solid var(--rule);
}
.identity, .masthead-links { display: flex; align-items: center; gap: clamp(10px, 1.45vw, 22px); }
.brand { display: block; width: clamp(106px, 10.8vw, 164px); line-height: 0; }
.logo-svg { width: 100%; height: auto; fill: var(--accent); }
.glyph-dot { fill: var(--ink); }
.edition-mark { font: 700 clamp(.65rem, 1vw, .78rem)/1 var(--mono); letter-spacing: .13em; }
.archive { display: inline-grid; align-items: center; }
.archive::after {
  content: '';
  grid-area: 1 / 1;
  justify-self: end;
  margin-inline-end: 10px;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  pointer-events: none;
}
.archive select, .home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: .75rem;
  text-decoration: none;
  white-space: nowrap;
}
.archive select { appearance: none; grid-area: 1 / 1; padding: 0 23px 0 5px; font-family: var(--mono); }
.archive:has(select:disabled) { visibility: hidden; }
.home { gap: 4px; }
.home:hover, .archive:hover { color: var(--accent); }

.reading {
  grid-area: read;
  display: grid;
  align-self: center;
  gap: clamp(24px, 5vh, 52px);
  padding-block: clamp(12px, 2.4vw, 39px);
}
.reading-label { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.reading-label h1 { font-size: clamp(.8rem, 1.18vw, 1.02rem); font-weight: 700; letter-spacing: .18em; }
.issue { display: inline-flex; align-items: center; gap: 10px; font: .69rem/1 var(--mono); letter-spacing: .08em; opacity: .88; }
.issue:not(:empty)::before { content: ''; width: 19px; height: 1px; background: currentColor; opacity: .5; }
.reading-copy { container-type: inline-size; }
.passage { overflow-wrap: anywhere; }
.passage > blockquote {
  --reading-size: clamp(2.4rem, 4.9vw, 5.6rem);
  position: relative;
  font-size: var(--reading-size);
  font-weight: 720;
  line-height: 1.23;
  letter-spacing: -.05em;
  line-break: strict;
  text-wrap: pretty;
  white-space: pre-line;
}
.passage[data-length="medium"] > blockquote { --reading-size: clamp(2rem, 3.8vw, 4.5rem); }
.passage[data-length="long"] > blockquote { --reading-size: clamp(1.65rem, 3.1vw, 3.5rem); line-height: 1.42; }
.passage[data-fit-lines] > blockquote { font-size: max(1.42rem, min(var(--reading-size), calc(100cqi / var(--line-length)))); }
.passage figcaption {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4em .8em;
  margin-block-start: clamp(22px, 4vh, 42px);
  font-size: clamp(.79rem, 1.15vw, .96rem);
  line-height: 1.7;
}
.passage figcaption::before { content: ''; width: 22px; height: 1px; align-self: center; background: var(--accent); }
#author { font-weight: 700; }
#source { text-decoration-color: var(--rule); text-underline-offset: 3px; }
#source[href]:hover { color: var(--accent); text-decoration-color: currentColor; }
#source:not([href]) { text-decoration: none; }
#original { margin-block-start: 12px; font-size: .8rem; max-width: 40ch; }
#original summary { width: fit-content; padding-block: 7px; color: var(--accent); }
#original blockquote { white-space: pre-line; line-height: 1.7; }
.status { font-size: .95rem; line-height: 1.8; }
.reading-copy.is-changing .passage { animation: turn-in .42s cubic-bezier(.18, .65, .35, 1) both; }
@keyframes turn-in { from { opacity: .22; transform: translateY(10px); } }

.art { grid-area: art; min-width: 0; align-self: center; position: relative; }
.stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.09;
  border: 0;
  padding: 0;
  background: transparent;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.stage:not(:disabled) { cursor: grab; }
.stage.is-dragging { cursor: grabbing; }
.stage:focus-visible { outline-offset: -4px; }
.stage canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sculpture, .stage.has-webgl .still { visibility: hidden; }
.stage.has-webgl .sculpture { visibility: visible; }
.art-hint { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: .69rem; letter-spacing: .11em; }
.art-hint i { width: 5px; height: 5px; background: var(--accent); }

.pager {
  grid-area: page;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--rule);
  gap: 10px;
  padding-block-start: 8px;
}
.counter { font: .75rem/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .09em; white-space: nowrap; }
.dots, .arrows { display: flex; align-items: center; }
.dots button, .arrows button { display: grid; place-items: center; padding: 0; background: transparent; }
.dots button { width: 34px; height: 44px; border: 0; }
.dots button::after { content: ''; width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); }
.dots button[aria-current="true"]::after, .dots button:hover::after { background: var(--accent); border-color: var(--accent); }
.arrows { margin-inline-start: auto; gap: 8px; }
.arrows button { width: 46px; height: 44px; border: 1px solid var(--rule); font-size: 1.27rem; transition: background-color .18s, color .18s; }
.arrows button:hover { background: var(--ink); color: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 760px) {
  .poster { grid-template-areas: "head" "read" "page" "art"; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(min-content, 1fr) auto auto; row-gap: 18px; padding-top: calc(var(--edge) + 6px); }
  .reading { gap: 19px; padding-block: clamp(8px, 2.3vh, 22px); }
  .passage > blockquote { --reading-size: clamp(2.1rem, 9.8vw, 4.2rem); }
  .passage[data-length="medium"] > blockquote { --reading-size: clamp(1.88rem, 7.8vw, 3.3rem); }
  .passage[data-length="long"] > blockquote { --reading-size: clamp(1.6rem, 6.25vw, 2.85rem); }
  .passage figcaption { margin-block-start: 17px; }
  .pager { padding-block-start: 7px; }
  .art { width: min(100%, 420px); margin-inline: auto; }
  .stage { aspect-ratio: auto; height: clamp(171px, 30svh, 300px); }
  .art-hint { margin-block-start: 2px; }
}

@media (max-width: 370px) {
  .poster { --inset: 26px; }
  .identity, .masthead-links { gap: 7px; }
  .brand { width: 85px; }
  .edition-mark { letter-spacing: .07em; }
  .archive select { padding-inline-end: 16px; }
  .archive::after { margin-inline-end: 4px; }
  .dots button { width: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.music-jump {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 30px;
  font-size: .76rem;
  letter-spacing: .07em;
  text-decoration: none;
  white-space: nowrap;
}
.music-jump:hover { text-decoration: underline; text-underline-offset: 4px; }

.music {
  --paper: #edd0a1;
  --ink: #282918;
  --accent: #8a3a24;
  --edge: clamp(16px, 2.75vw, 44px);
  --inset: calc(var(--edge) + clamp(15px, 2.4vw, 42px));
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(34px, 6vw, 110px);
  min-height: min(76svh, 790px);
  padding: clamp(68px, 9vw, 160px) var(--inset);
  color: var(--ink);
  background: var(--paper);
}
.music h2 { margin: 0 0 clamp(19px, 4vh, 44px); color: var(--accent); font-size: .89rem; font-weight: 730; letter-spacing: .18em; }
.music-lyric {
  font: 500 clamp(2.35rem, 5.55vw, 6.3rem)/1.05 Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  letter-spacing: -.045em;
  white-space: pre-line;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.music-lyric:lang(zh) { font-family: inherit; font-size: clamp(2rem, 4.8vw, 5.4rem); font-weight: 700; line-height: 1.28; }
.track { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35em .75em; margin-top: clamp(20px, 4vh, 38px); font-size: .95rem; line-height: 1.65; }
#track-title { font-weight: 750; }
#track-artist { color: #553d2b; }
.track-album { margin-top: 3px; font-size: .79rem; line-height: 1.55; color: #60442e; }
#album-link { text-underline-offset: 3px; text-decoration-color: #60442e66; }
#album-link[href]:hover { color: var(--accent); text-decoration-color: currentColor; }
.music-listen {
  display: inline-flex;
  align-items: center;
  gap: .8em;
  min-height: 44px;
  margin-block-start: 18px;
  padding: 0 14px;
  border: 1px solid #28291870;
  color: var(--ink);
  font-size: .79rem;
  font-weight: 680;
  text-decoration: none;
}
.music-listen:hover { background: var(--ink); color: var(--paper); }
.record {
  display: block;
  position: relative;
  width: min(100%, 560px);
  margin-inline: auto;
  padding: 0;
  aspect-ratio: 1.36;
  border: 0;
  background: transparent;
  perspective: 1000px;
  -webkit-tap-highlight-color: transparent;
}
.record:not(:disabled) { cursor: pointer; }
.record-assembly {
  position: absolute;
  display: block;
  inset: 0;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .19s ease-out;
}
.record-vinyl {
  position: absolute;
  display: block;
  inset-inline-start: 12%;
  top: 13%;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  transform: translateX(8%) rotate(-10deg);
  transition: transform .88s cubic-bezier(.2, .75, .22, 1);
  box-shadow: 9px 13px 0 #723b2422;
}
.record.is-open .record-vinyl { transform: translateX(54%) rotate(9deg); }
.record-sleeve {
  position: absolute;
  display: grid;
  place-items: center;
  inset-inline-start: 5%;
  top: 6%;
  width: 62%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #3c3926;
  color: #edd0a1;
  box-shadow: 0 0 0 1px #28291829, 8px 12px 0 #613c252a, 16px 25px 38px #693e231c;
  transform: rotate(-5deg);
  transition: transform .88s cubic-bezier(.2, .75, .22, 1);
}
.record.is-open .record-sleeve { transform: translateX(-2%) rotate(-8deg); }
.record-sleeve img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .28s ease-out;
}
.record.has-cover .record-sleeve img { opacity: 1; }
.record-placeholder { font: 700 clamp(1.05rem, 3vw, 2.6rem)/1 Georgia, serif; letter-spacing: .13em; }
.record-disc {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(126deg, #ffffff16, transparent 44%, transparent 72%, #ffffff12),
    repeating-radial-gradient(circle, #292518 0 2px, #40372a 2.6px 3.2px, #30291e 3.8px 5.5px);
  box-shadow: inset 0 0 0 1px #241e14;
  animation: record-spin 10s linear infinite paused;
}
.record.is-open.is-visible .record-disc { animation-play-state: running; }
.record-disc::after { content: ''; position: absolute; top: 12%; left: 56%; width: 2%; aspect-ratio: 1; background: #ebd9ae; opacity: .48; }
@keyframes record-spin { to { transform: rotate(1turn); } }
.record-label {
  width: 37%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid #c16a3e;
  border-radius: 50%;
  background: linear-gradient(150deg, #d47445 0 52%, #ad512f 52%);
  box-shadow: inset 0 0 0 5px #a7462d70;
}
.record-label i { display: block; width: 9%; aspect-ratio: 1; background: var(--paper); box-shadow: 2px 2px 0 #753a24; }
.record-hint { margin-top: 10px; text-align: center; font-size: .72rem; letter-spacing: .1em; color: #60442e; }

@media (max-width: 760px) {
  .music { grid-template-columns: 1fr; gap: 35px; padding-block: clamp(55px, 12vw, 92px); }
  .record { width: min(100%, 365px); }
  .track { font-size: .87rem; }
}

@media (max-width: 370px) { .music { --inset: 26px; } }
