@font-face {
  font-family: LinlinBrush;
  src: url('fonts/LinlinBrush.woff2') format('woff2');
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: LinlinSerif;
  src: url('fonts/LinlinSerif.woff2') format('woff2');
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: LinlinScript;
  src: url('fonts/LinlinScript.woff2') format('woff2');
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: LinlinSans;
  src: url('fonts/LinlinSans.woff2') format('woff2');
  font-weight: 100 900;
  font-display: block;
}
:root {
  --scene-bg: #151815;
  --scene-fg: #f0e9d8;
  --scene-accent: #d2ab67;
  --lyric-size: 1;
  --background-strength: 0.65;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: var(--scene-bg);
  color: var(--scene-fg);
  font:
    12px/1.6 'Microsoft YaHei',
    sans-serif;
  transition:
    background 0.35s,
    color 0.35s;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  color: inherit;
}
button {
  background: none;
  border: 0;
  cursor: pointer;
}
a {
  text-decoration: none;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 1px solid var(--scene-accent);
  outline-offset: 5px;
}
#pv-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
#pv-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
.accessible-lyrics {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.neighbor {
  display: none;
  position: fixed;
  z-index: 3;
  left: 35px;
  font:
    13px LinlinSerif,
    serif;
  opacity: 0.5;
}
.show-neighbors .neighbor {
  display: block;
}
#previous {
  top: 85px;
}
#next {
  bottom: 150px;
}
.chrome {
  position: fixed;
  z-index: 5;
  transition:
    opacity 0.6s,
    transform 0.6s,
    filter 0.6s;
}
.topbar {
  top: 0;
  left: 0;
  right: 0;
  padding: 25px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 2px;
}
.topbar a {
  font:
    21px LinlinSerif,
    serif;
  letter-spacing: 5px;
}
.topbar a span {
  font:
    10px 'Microsoft YaHei',
    sans-serif;
  letter-spacing: 3px;
  margin-left: 14px;
  opacity: 0.5;
}
.topbar button {
  font-size: 11px;
  opacity: 0.6;
}
.dock {
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  width: min(710px, calc(100% - 48px));
}
.directions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.directions button {
  border: 1px solid #c8c0a326;
  border-radius: 30px;
  background: #121611a8;
  backdrop-filter: blur(18px);
  color: #eae4d4;
  padding: 7px 16px;
  font-size: 10px;
  letter-spacing: 2px;
}
.directions button[aria-pressed='true'] {
  border-color: #cdb77e99;
  color: #d6bd84;
}
.directions #settings-toggle {
  color: #b6b6a4;
  font-size: 10px;
  letter-spacing: 1px;
}
.console {
  border: 1px solid #c8c0a32c;
  border-radius: 40px;
  background: #111610b8;
  backdrop-filter: blur(24px);
  color: #eae4d4;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 15px 23px;
}
.console > span {
  font: 10px monospace;
  color: #9c9d8c;
}
#play {
  min-width: 64px;
  letter-spacing: 3px;
  font-size: 12px;
  white-space: nowrap;
}
#play span {
  font-size: 10px;
  color: #cdb77e;
  margin-left: 5px;
}
input[type='range'] {
  height: 3px;
  accent-color: #cdb77e;
  cursor: pointer;
  min-width: 0;
}
#seek {
  flex: 1;
  width: 100%;
}
.secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 13px 0;
  font-size: 10px;
  opacity: 0.75;
}
.secondary button {
  font-size: 10px;
  white-space: nowrap;
}
#status {
  text-align: center;
  font-size: 10px;
}
.idle .chrome {
  opacity: 0;
  pointer-events: none;
  filter: blur(6px);
}
.idle .topbar {
  transform: translateY(-9px);
}
.idle .dock {
  transform: translate(-50%, 12px);
}
#settings[hidden] {
  display: none;
}
#settings {
  position: fixed;
  z-index: 12;
  right: 32px;
  bottom: 160px;
  width: 330px;
  max-height: calc(100vh - 195px);
  overflow: auto;
  background: #121813f2;
  backdrop-filter: blur(30px);
  border: 1px solid #d3ceb92e;
  border-radius: 18px;
  padding: 22px;
  color: #e9e5d8;
  box-shadow: 0 20px 90px #0005;
}
.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.settings-heading h2 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  margin: 0;
}
.settings-heading button {
  font-size: 24px;
  line-height: 1;
}
.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  font-size: 11px;
  color: #b9beaf;
}
.setting input[type='range'] {
  width: 135px;
}
.setting input[type='checkbox'] {
  accent-color: #bcad78;
}
.setting select {
  max-width: 175px;
  border: 1px solid #c7cab331;
  background: #1d251e;
  color: #dedfd4;
  border-radius: 6px;
  padding: 5px;
  font-size: 10px;
}
.replay {
  width: 100%;
  padding: 9px;
  border: 1px solid #c6b68c39;
  border-radius: 6px;
  color: #cbbd95;
  font-size: 11px;
}
.settings-hint {
  font-size: 10px;
  color: #8c9787;
  line-height: 1.8;
}
.credits {
  font-size: 10px;
  color: #b5ad8f;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .grain {
    display: none;
  }
}

/* Edition 07: an editorial frame around the kinetic type. */
.topbar {
  padding: 30px 40px;
}
.topbar a {
  display: flex;
  align-items: center;
  font-size: 25px;
  gap: 20px;
}
.topbar a span {
  margin: 0;
  font:
    10px LinlinSerif,
    serif;
  letter-spacing: 5px;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 32px;
}
.edition {
  font-size: 9px;
  letter-spacing: 4px;
  opacity: 0.38;
}
.topbar button {
  padding: 10px 0 10px 12px;
  letter-spacing: 2px;
}
.chapter-rail {
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 90px;
}
.rail-label {
  display: block;
  font:
    10px LinlinSerif,
    serif;
  letter-spacing: 4px;
  opacity: 0.4;
  margin-bottom: 22px;
}
.chapter-rail nav {
  position: relative;
  display: grid;
  gap: 1px;
}
.chapter-rail nav::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: var(--scene-fg);
  opacity: 0.12;
}
.chapter-rail button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 38px;
  padding: 0;
  text-align: left;
  font:
    11px LinlinSerif,
    serif;
  letter-spacing: 3px;
  opacity: 0.38;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.chapter-rail button span:first-child {
  display: grid;
  place-items: center;
  width: 21px;
  height: 23px;
  background: var(--scene-bg);
  font-size: 9px;
  letter-spacing: 0;
}
.chapter-rail button[aria-current] {
  opacity: 1;
  color: var(--scene-accent);
  transform: translateX(3px);
}
.chapter-rail button[aria-current] span:first-child {
  border: 1px solid var(--scene-accent);
}
.chapter-rail button:hover {
  opacity: 1;
}
.folio {
  left: 40px;
  bottom: 38px;
  display: flex;
  gap: 14px;
  align-items: center;
  font:
    10px LinlinSerif,
    serif;
  letter-spacing: 3px;
  opacity: 0.6;
}
.folio i {
  width: 30px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}
.folio-count {
  font: 9px monospace;
  letter-spacing: 1px;
  border-left: 1px solid #ada58c40;
  padding-left: 14px;
}
.folio b {
  font-weight: 400;
  color: var(--scene-accent);
}
.dock {
  bottom: 28px;
  width: min(650px, calc(100% - 56px));
}
.directions {
  gap: 4px;
  margin-bottom: 15px;
}
.directions button {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
  border-radius: 3px;
  padding: 8px 14px;
  color: var(--scene-fg);
  opacity: 0.5;
  letter-spacing: 3px;
}
.directions button[aria-pressed='true'] {
  opacity: 1;
  color: var(--scene-accent);
  border-color: transparent;
  background: color-mix(in srgb, var(--scene-accent) 9%, transparent);
}
.directions button[aria-pressed='true']::before {
  content: '·';
  margin-right: 6px;
}
.directions #settings-toggle {
  color: var(--scene-fg);
  border-left: 1px solid color-mix(in srgb, var(--scene-fg) 18%, transparent);
  margin-left: 12px;
  padding-left: 20px;
  letter-spacing: 2px;
}
.directions button:hover {
  opacity: 1;
}
.console {
  border-radius: 8px;
  padding: 18px 24px;
  border-color: color-mix(in srgb, var(--scene-fg) 17%, transparent);
  background: color-mix(in srgb, var(--scene-bg) 85%, transparent);
  color: var(--scene-fg);
  box-shadow: 0 10px 45px #00000015;
  gap: 18px;
}
.console > span {
  color: var(--scene-fg);
  opacity: 0.5;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
#play {
  padding: 4px 0;
  min-width: 69px;
  text-align: left;
}
#play span {
  color: var(--scene-accent);
}
#seek {
  --progress: 0%;
  appearance: none;
  -webkit-appearance: none;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--scene-accent) var(--progress),
    color-mix(in srgb, var(--scene-fg) 20%, transparent) var(--progress)
  );
  outline-offset: 8px;
}
#seek::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 8px;
  border: 1px solid var(--scene-accent);
  background: var(--scene-bg);
  border-radius: 0;
  transform: rotate(45deg);
}
#seek::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 1px solid var(--scene-accent);
  background: var(--scene-bg);
  border-radius: 0;
  transform: rotate(45deg);
}
.secondary {
  padding: 12px 2px 0;
  letter-spacing: 1px;
  opacity: 0.5;
}
.secondary button {
  padding: 4px 0;
}
.secondary button:hover {
  color: var(--scene-accent);
}
#status {
  letter-spacing: 1px;
}
#settings {
  border-radius: 10px;
  right: 40px;
  bottom: 170px;
}
.idle .chapter-rail {
  transform: translate(-8px, -50%);
}
.idle .folio {
  transform: translateY(8px);
}
@media (min-width: 1800px) {
  .chapter-rail {
    left: 54px;
  }
  .topbar {
    padding-left: 54px;
    padding-right: 54px;
  }
  .folio {
    left: 54px;
  }
}
@media (max-width: 1100px) {
  .folio {
    bottom: 195px;
  }
  .chapter-rail {
    left: 24px;
    width: 65px;
  }
  .chapter-rail button {
    gap: 10px;
  }
  .rail-label {
    letter-spacing: 2px;
  }
  .topbar {
    padding: 22px 26px;
  }
  .folio {
    left: 26px;
  }
  .edition {
    display: none;
  }
}
@media (max-width: 680px) {
  .chapter-rail {
    display: none;
  }
  .topbar {
    padding: 16px 20px;
  }
  .topbar a {
    font-size: 22px;
    gap: 12px;
  }
  .topbar a span {
    letter-spacing: 3px;
    font-size: 9px;
  }
  .topbar button {
    font-size: 10px;
  }
  .folio {
    left: 22px;
    bottom: auto;
    top: 76px;
    font-size: 9px;
  }
  .folio > span:first-child,
  .folio i {
    display: none;
  }
  .dock {
    width: calc(100% - 32px);
    bottom: max(18px, env(safe-area-inset-bottom));
  }
  .console {
    padding: 14px 16px;
    gap: 12px;
  }
  #play {
    min-width: 51px;
    font-size: 11px;
    letter-spacing: 2px;
  }
  .directions {
    gap: 0;
    margin-bottom: 10px;
  }
  .directions button {
    padding: 9px;
    font-size: 9px;
    letter-spacing: 1px;
  }
  .directions #settings-toggle {
    padding-left: 12px;
    margin-left: 4px;
    font-size: 9px;
  }
  .secondary {
    gap: 8px;
    font-size: 9px;
  }
  #status,
  .secondary button {
    font-size: 9px;
    letter-spacing: 0;
  }
  #settings {
    right: 16px;
    bottom: 155px;
    width: min(330px, calc(100% - 32px));
    max-height: calc(100dvh - 175px);
  }
  .show-neighbors .neighbor {
    left: 20px;
    font-size: 11px;
  }
  #previous {
    top: 112px;
  }
  #next {
    bottom: 155px;
  }
}

/* Paper and vermilion: a composed leaf, including the player furniture. */
#album-art {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  color: var(--scene-fg);
}
body[data-mode='type'] #album-art {
  display: block;
}
body[data-mode='type'] {
  background: #e8dfca;
  color: #2d302a;
}
body[data-mode='type'] #pv-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 38% 30%, #fff9e53b, transparent 70%),
    linear-gradient(
      90deg,
      #78684a0d,
      transparent 12%,
      transparent 59.7%,
      #78684a08 60%,
      #fff9ea14 60.3%,
      transparent 60.8%,
      transparent 90%,
      #78684a0d
    );
  pointer-events: none;
}
body[data-mode='type'] .grain {
  opacity: 0.045;
  mix-blend-mode: multiply;
}
.album-label {
  position: absolute;
  right: 7%;
  top: 17%;
  display: flex;
  align-items: center;
  gap: 22px;
  writing-mode: vertical-rl;
  font-family: LinlinSerif, serif;
}
.album-small {
  font-size: 10px;
  letter-spacing: 4px;
  opacity: 0.48;
}
.album-title {
  font-size: 16px;
  letter-spacing: 9px;
}
.album-label i {
  height: 40px;
  width: 1px;
  background: currentColor;
  opacity: 0.2;
}
.album-label #album-chapter {
  font-size: 11px;
  letter-spacing: 5px;
  opacity: 0.6;
}
.album-seal {
  position: absolute;
  right: 7%;
  bottom: 23%;
  width: 45px;
  height: 57px;
  border: 1px solid #a23e30bb;
  color: #a23e30;
  transform: rotate(-3deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  outline: 1px solid #a23e303d;
  outline-offset: -4px;
}
.album-seal span {
  font:
    19px LinlinSerif,
    serif;
  letter-spacing: 2px;
}
.album-seal small {
  font:
    9px LinlinSerif,
    serif;
  letter-spacing: 5px;
  padding-left: 5px;
  opacity: 0.8;
}
.album-page {
  position: absolute;
  right: 7%;
  bottom: 17%;
  font:
    9px LinlinSerif,
    serif;
  letter-spacing: 4px;
  opacity: 0.45;
}
body[data-mode='type'] .console {
  background: #e8dfcac9;
  border-color: #746b5142;
  box-shadow: 0 8px 30px #78684a08;
  border-radius: 2px;
}
body[data-mode='type'] .directions button[aria-pressed='true'] {
  background: #a23e300b;
  border-radius: 0;
  border-bottom: 1px solid #a23e304d;
}
body[data-mode='type'] #settings {
  background: #eee5d1f5;
  color: #2d302a;
  border-color: #746b5142;
  box-shadow: 0 20px 70px #78684a21;
  border-radius: 3px;
}
body[data-mode='type'] .setting {
  color: #565747;
}
body[data-mode='type'] .setting select {
  background: #e5dcc5;
  border-color: #a39a7b65;
  color: #383a30;
}
body[data-mode='type'] .setting input,
body[data-mode='type'] input[type='range'] {
  accent-color: #a23e30;
}
body[data-mode='type'] .replay {
  color: #9a392e;
  border-color: #a23e3040;
  border-radius: 2px;
}
body[data-mode='type'] .settings-hint {
  color: #676959;
}
body[data-mode='type'] .credits {
  color: #904237;
}
body[data-mode='type'] .chapter-rail button[aria-current] span:first-child {
  background: #a23e30;
  color: #f5ead4;
  border-color: #a23e30;
}
@media (max-width: 1100px) {
  .album-label,
  .album-seal,
  .album-page {
    right: 5%;
  }
  .album-label {
    font-size: 12px;
  }
  .album-seal {
    width: 37px;
    height: 48px;
  }
}
@media (max-width: 680px) {
  .album-label {
    right: 21px;
    top: 115px;
    gap: 13px;
  }
  .album-title {
    font-size: 11px;
    letter-spacing: 5px;
  }
  .album-small {
    display: none;
  }
  .album-label i {
    height: 20px;
  }
  .album-label #album-chapter {
    font-size: 9px;
    letter-spacing: 3px;
  }
  .album-seal {
    right: 23px;
    bottom: 25%;
    width: 30px;
    height: 39px;
  }
  .album-seal span {
    font-size: 13px;
  }
  .album-seal small {
    font-size: 7px;
  }
  .album-page {
    display: none;
  }
}

/* A separate landscape edition, reusing the site's own mountain painting. */
body[data-mode='landscape'] #pv-stage {
  background: #e8eadc;
}
.poem-scenery {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: center;
}
body[data-mode='landscape'] .poem-scenery {
  display: block;
}
.poem-painting {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}
body[data-mode='landscape'] #pv-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: calc(1 - var(--poem-night, 0));
  background: linear-gradient(90deg, #f6f0db45 0%, #f6f0db18 25%, transparent 48%);
}
body[data-mode='landscape'] #pv-stage canvas {
  z-index: 3;
}
body[data-mode='landscape'] .grain {
  opacity: 0.022;
  mix-blend-mode: multiply;
}
#landscape-art {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  color: var(--scene-fg);
}
body[data-mode='landscape'] #landscape-art {
  display: block;
}
.landscape-title {
  position: absolute;
  right: 5%;
  top: 17%;
  font:
    14px LinlinSerif,
    serif;
  writing-mode: vertical-rl;
  letter-spacing: 9px;
  opacity: 0.65;
}
#landscape-mood {
  position: absolute;
  right: 5%;
  bottom: 22%;
  font:
    11px LinlinSerif,
    serif;
  letter-spacing: 5px;
  opacity: 0.65;
  border-top: 1px solid #476c6633;
  padding-top: 15px;
}
body[data-mode='landscape'] .console {
  background: #e8eadbc7;
  border-color: #4a6e5d40;
  border-radius: 6px;
  box-shadow: 0 8px 40px #36514a0b;
}
body[data-mode='landscape'] .directions button[aria-pressed='true'] {
  background: #476c6610;
  color: #375448;
}
body[data-mode='landscape'] #settings {
  background: #e9ecdef5;
  color: #243e37;
  border-color: #4a6e5d40;
  box-shadow: 0 20px 70px #36514a20;
}
body[data-mode='landscape'] .setting {
  color: #415b4d;
}
body[data-mode='landscape'] .setting select {
  background: #dee5d6;
  color: #243e37;
  border-color: #637d6659;
}
body[data-mode='landscape'] .setting input {
  accent-color: #566e4d;
}
body[data-mode='landscape'] .replay {
  color: #375448;
  border-color: #476c6640;
}
body[data-mode='landscape'] .settings-hint {
  color: #536953;
}
body[data-mode='landscape'] .credits {
  color: #496b4d;
}
@media (max-width: 680px) {
  .directions {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .directions button {
    padding: 8px 7px;
  }
  .directions #settings-toggle {
    padding-left: 9px;
    margin-left: 2px;
  }
  body[data-mode='landscape'] .poem-painting {
    object-position: 65% center;
  }
  body[data-mode='landscape'] #pv-stage::before {
    background: linear-gradient(90deg, #f6f0db50, transparent 65%);
  }
  .landscape-title {
    top: 112px;
    right: 22px;
    font-size: 11px;
    letter-spacing: 6px;
  }
  #landscape-mood {
    bottom: 25%;
    right: 22px;
    font-size: 9px;
    letter-spacing: 3px;
  }
}

body[data-mode='landscape'] #landscape-art {
  color: color-mix(in srgb, #243e37, #f0eedc var(--poem-night-ink, 0%));
}

body[data-mode='landscape'] .chrome {
  color: var(--scene-fg);
  text-shadow: 0 1px 4px color-mix(in srgb, var(--scene-bg) 70%, transparent);
}
body[data-mode='landscape'] .directions {
  border-radius: 8px;
  background: color-mix(in srgb, var(--scene-bg) 75%, transparent);
  backdrop-filter: blur(12px);
  padding: 3px;
}
body[data-mode='landscape'] .directions button {
  opacity: 0.8;
}
body[data-mode='landscape'] .console {
  background: color-mix(in srgb, var(--scene-bg) 85%, transparent);
  color: var(--scene-fg);
}
body[data-mode='landscape'] .directions button[aria-pressed='true'] {
  color: var(--scene-fg);
  background: color-mix(in srgb, var(--scene-fg) 14%, transparent);
}
body[data-mode='landscape'] .chapter-rail button,
body[data-mode='landscape'] .folio,
body[data-mode='landscape'] .secondary {
  opacity: 0.8;
}

/* Shared furniture follows the active scene in every edition. */
body[data-mode] {
  --ui-ink: var(--scene-fg);
  --ui-surface: color-mix(in srgb, var(--scene-bg) 95%, var(--scene-fg) 5%);
  --ui-muted: color-mix(in srgb, var(--scene-fg) 90%, var(--scene-bg) 10%);
  --ui-border: color-mix(in srgb, var(--scene-fg) 24%, var(--scene-bg) 76%);
  --ui-control: color-mix(in srgb, var(--scene-bg) 88%, var(--scene-fg) 12%);
  --ui-active: color-mix(in srgb, var(--scene-accent) 17%, var(--ui-surface) 83%);
}
body[data-mode] .directions {
  align-items: center;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ui-surface) 96%, transparent);
  backdrop-filter: blur(16px);
  padding: 5px;
  gap: 4px;
}
body[data-mode] .directions button {
  color: var(--ui-muted);
  opacity: 1;
  border: 1px solid transparent;
  border-radius: 4px;
  min-height: 36px;
  padding: 8px 12px;
  transition: box-shadow 0.2s;
}
body[data-mode] .directions button:hover {
  color: var(--ui-ink);
  background: var(--ui-control);
}
body[data-mode] .directions button[aria-pressed='true'] {
  color: var(--ui-ink);
  background: var(--ui-active);
  border-color: var(--ui-border);
  box-shadow: inset 0 -2px var(--scene-accent);
}
body[data-mode] .directions #settings-toggle {
  color: var(--ui-muted);
  border-left: 1px solid var(--ui-border);
  margin-left: 5px;
  padding-left: 14px;
}
body[data-mode] .console {
  background: color-mix(in srgb, var(--ui-surface) 95%, transparent);
  border-color: var(--ui-border);
  color: var(--ui-ink);
  border-radius: 8px;
}
body[data-mode] .console > span {
  color: var(--ui-muted);
  opacity: 1;
}
body[data-mode] #play span {
  color: var(--scene-accent);
}
body[data-mode] .secondary {
  color: var(--ui-muted);
  opacity: 1;
}
body[data-mode] .chapter-rail button {
  color: var(--ui-muted);
  opacity: 1;
}
body[data-mode] .chapter-rail button[aria-current] {
  color: var(--ui-ink);
}
body[data-mode] .chapter-rail button[aria-current] span:first-child {
  color: var(--ui-ink);
  background: var(--ui-active);
  border-color: var(--scene-accent);
}
body[data-mode] .folio {
  color: var(--ui-muted);
  opacity: 1;
}
body[data-mode] .folio b {
  color: var(--ui-ink);
}
body[data-mode] .topbar a span,
body[data-mode] .topbar .edition,
body[data-mode] .topbar button,
body[data-mode] .rail-label {
  color: var(--ui-muted);
  opacity: 1;
}
body[data-mode] #settings {
  background: color-mix(in srgb, var(--ui-surface) 98%, transparent);
  color: var(--ui-ink);
  border-color: var(--ui-border);
  box-shadow: 0 20px 70px #0002;
}
body[data-mode] .setting,
body[data-mode] .settings-hint {
  color: var(--ui-muted);
}
body[data-mode] .setting select {
  background: var(--ui-control);
  border-color: var(--ui-border);
  color: var(--ui-ink);
  color-scheme: inherit;
}
body[data-mode] .setting input,
body[data-mode] input[type='range'] {
  accent-color: var(--scene-accent);
}
body[data-mode] .replay {
  color: var(--ui-ink);
  background: var(--ui-active);
  border-color: var(--ui-border);
}
body[data-mode] .credits {
  color: var(--ui-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
body[data-mode] .settings-heading button {
  color: var(--ui-ink);
}
body[data-mode='type'] .directions,
body[data-mode='type'] .directions button,
body[data-mode='type'] .console {
  border-radius: 2px;
}
body[data-mode='stars'] .directions,
body[data-mode='stars'] .console {
  border-color: color-mix(in srgb, var(--scene-accent) 35%, var(--scene-bg) 65%);
}
body[data-mode].idle .chrome {
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 680px) {
  body[data-mode] .directions {
    gap: 2px;
    padding: 3px;
    row-gap: 2px;
  }
  body[data-mode] .directions button {
    padding: 8px 6px;
    letter-spacing: 2px;
    min-height: 36px;
  }
  body[data-mode] .directions #settings-toggle {
    margin-left: 0;
    padding-left: 8px;
  }
}

/* Three companion editions share timing, but keep distinct visual materials. */
.edition-scenery {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: center;
  z-index: 0;
}
.edition-painting {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}
body[data-mode='ink'] .edition-scenery {
  display: block;
  opacity: 0.28;
  filter: grayscale(0.35) contrast(1.15);
  mix-blend-mode: luminosity;
  mask-image: linear-gradient(90deg, transparent 20%, #0005 48%, #000 82%);
}
body[data-mode='ink'] #pv-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--scene-bg) 0%,
    color-mix(in srgb, var(--scene-bg) 70%, transparent) 45%,
    transparent 100%
  );
}
body[data-mode='ink'] #pv-stage canvas,
body[data-mode='type'] #pv-stage canvas,
body[data-mode='stars'] #pv-stage canvas {
  z-index: 2;
}
body[data-mode='type'] .edition-scenery {
  display: block;
  filter: grayscale(1) sepia(0.38) brightness(1.12);
  mix-blend-mode: multiply;
  opacity: 0.48;
  mask-image: linear-gradient(180deg, #0002, transparent 20%, #0008 55%, #000 90%);
}
body[data-mode='type'] #pv-stage::before {
  z-index: 1;
  background:
    linear-gradient(90deg, #eee4ce80, transparent 38%, #eee4ce60 90%),
    radial-gradient(ellipse at 50% 40%, #eee4ce60, transparent 80%);
}
body[data-mode='type'] {
  background: var(--scene-bg);
}
body[data-mode='stars'] #pv-stage {
  background: linear-gradient(165deg, #06121e, #102b3a 60%, #101d28);
}
body[data-mode='stars'] .edition-scenery {
  display: block;
  filter: grayscale(0.8) brightness(0.45) saturate(0.55);
  opacity: 0.7;
  mask-image: linear-gradient(180deg, transparent 42%, #0006 64%, #000 94%);
}
body[data-mode='stars'] #pv-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 75% 25%, #a78e4429, transparent 37%),
    radial-gradient(ellipse at 40% 40%, #4c809229, transparent 55%);
}
body[data-mode='stars'] .grain {
  opacity: 0.025;
}
@media (max-width: 680px) {
  .edition-painting {
    object-position: 65% center;
  }
  body[data-mode='type'] .edition-scenery {
    opacity: 0.35;
  }
  body[data-mode='ink'] .edition-scenery {
    opacity: 0.25;
    mask-image: linear-gradient(180deg, transparent 15%, #0009 75%, #000);
  }
  body[data-mode='ink'] #pv-stage::before {
    background: linear-gradient(180deg, var(--scene-bg), transparent 70%);
  }
}

body[data-mode] .chrome {
  color: var(--ui-ink);
}

/* Homepage noise-cloud adaptation stays below the lyric renderer. */
body[data-mode] #pv-stage canvas.music-clouds {
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}
body[data-mode] #pv-stage canvas.music-clouds[hidden] {
  display: none !important;
}
