/* ═══════════════════════════════════════════════════════════════════════════
   LUITOR XUR — the vellum
   ───────────────────────────────────────────────────────────────────────────
   One page of a notebook: rag paper, iron-gall ink, red chalk, a little gold.
   Nothing on it is a rectangle with a shadow. Everything is drawn.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --vellum: #e9dcc0;
  --vellum-lit: #f2e8d3;
  --vellum-deep: #d9c9a4;
  --vellum-shade: #c9b68d;

  --ink: #241a0f;
  --ink-soft: #4c3a25;
  --ink-thin: rgba(36, 26, 15, 0.72);
  --ink-faint: rgba(36, 26, 15, 0.42);
  --ink-ghost: rgba(36, 26, 15, 0.18);

  --sanguine: #94371c;
  --sanguine-thin: rgba(148, 55, 28, 0.6);
  --gold: #9a7523;
  --gold-thin: rgba(154, 117, 35, 0.55);

  --serif-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --serif-text: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --serif-as: 'Noto Serif Bengali', 'Cormorant Garamond', Georgia, serif;

  --rule: 1px solid var(--ink-faint);

  /* φ. The page is laid out on it, so it may as well be a number here. */
  --phi: 1.618;

  color-scheme: light;
}

/* Candlelight. Not an inversion — the same page, later at night. */
@media (prefers-color-scheme: dark) {
  :root {
    --vellum: #241d15;
    --vellum-lit: #2f261b;
    --vellum-deep: #1b1610;
    --vellum-shade: #14100b;

    --ink: #ecdfc2;
    --ink-soft: #cbba97;
    --ink-thin: rgba(236, 223, 194, 0.7);
    --ink-faint: rgba(236, 223, 194, 0.4);
    --ink-ghost: rgba(236, 223, 194, 0.16);

    --sanguine: #c9704a;
    --sanguine-thin: rgba(201, 112, 74, 0.5);
    --gold: #d3ab54;
    --gold-thin: rgba(211, 171, 84, 0.45);

    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--vellum);
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: clamp(15px, 0.55vw + 12.5px, 17px);
  line-height: 1.62;
  font-feature-settings: 'liga' 1, 'kern' 1, 'onum' 1;
  overflow-x: hidden;
}

::selection {
  background: var(--sanguine-thin);
  color: var(--ink);
}

:focus-visible {
  outline: 1px solid var(--sanguine);
  outline-offset: 3px;
}

/* ── the vellum itself ───────────────────────────────────────────────────── */

.vellum {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.vellum__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  .vellum__grain {
    opacity: 0.3;
    mix-blend-mode: overlay;
  }
}

/* Laid lines — the wire marks left in handmade paper. */
.vellum__fibres {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 26px, var(--ink-ghost) 26px 26.5px),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.014) 3px 3.5px);
}

/* Foxing: the rust-coloured blooms that age brings to rag paper. */
.vellum__foxing {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background:
    radial-gradient(15rem 11rem at 12% 18%, rgba(150, 96, 40, 0.09), transparent 70%),
    radial-gradient(22rem 14rem at 88% 12%, rgba(133, 90, 42, 0.08), transparent 72%),
    radial-gradient(18rem 20rem at 78% 84%, rgba(146, 88, 36, 0.07), transparent 70%),
    radial-gradient(12rem 9rem at 26% 92%, rgba(120, 78, 34, 0.08), transparent 70%),
    radial-gradient(30rem 24rem at 50% 46%, var(--vellum-lit), transparent 78%);
}

/* The falloff of one candle, a little off centre. */
.vellum__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 100% at 46% 38%,
    transparent 46%,
    rgba(60, 40, 18, 0.07) 76%,
    rgba(42, 26, 10, 0.2) 100%
  );
}

/* ── the folio ───────────────────────────────────────────────────────────── */

.folio {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 3.2rem) clamp(1.1rem, 3.4vw, 3.6rem) 3rem;
  display: grid;
  gap: clamp(1.4rem, 2.6vw, 3rem);
  grid-template-columns: 1fr;
  grid-template-areas:
    'head'
    'plate'
    'right'
    'left'
    'colophon';
}

@media (min-width: 1080px) {
  .folio {
    grid-template-columns: minmax(15rem, 0.82fr) minmax(30rem, 1.6fr) minmax(16rem, 0.9fr);
    grid-template-areas:
      'head  head  head'
      'left  plate right'
      'colophon colophon colophon';
    align-items: start;
  }
}

/* ── head ────────────────────────────────────────────────────────────────── */

.folio__head {
  grid-area: head;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
  padding-bottom: 0.6rem;
}

.head__mark {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: min(100%, 30rem);
  justify-content: center;
}

.head__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-faint) 22%, var(--ink-faint) 78%, transparent);
}

.head__folio,
.head__clock {
  margin: 0;
  font-family: var(--serif-display);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-thin);
  white-space: nowrap;
}

.head__clock {
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
}

.head__clock abbr {
  text-decoration: none;
  color: var(--sanguine);
}

.head__title {
  margin: 0.1rem 0 0;
  display: grid;
  gap: 0.1rem;
  line-height: 1;
}

.head__title-as {
  font-family: var(--serif-as);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.head__title-en {
  font-family: var(--serif-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--sanguine);
}

.head__sub {
  margin: 0.35rem 0 0.5rem;
  max-width: 44rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.head__sub em {
  color: var(--ink);
}

/* ── margins ─────────────────────────────────────────────────────────────── */

.margin {
  display: grid;
  gap: clamp(1.3rem, 2.2vw, 2.1rem);
  align-content: start;
}

.margin--left {
  grid-area: left;
}

.margin--right {
  grid-area: right;
}

@media (min-width: 1080px) {
  .margin--left {
    padding-right: 1.2rem;
    border-right: var(--rule);
  }

  .margin--right {
    padding-left: 1.2rem;
    border-left: var(--rule);
  }
}

.note__label,
.entry__eyebrow {
  font-family: var(--serif-display);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sanguine);
  margin: 0 0 0.55rem;
}

.note__body {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  hyphens: auto;
}

/* Written the way he wrote — right to left, to be read in a glass. */
.note--mirror {
  opacity: 0.4;
  transition: opacity 0.9s ease;
}

.note--mirror:hover {
  opacity: 0.72;
}

.mirror-text {
  margin: 0;
  transform: scaleX(-1);
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-thin);
}

.note--source {
  padding-top: 0.9rem;
  border-top: var(--rule);
}

.source__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 0.84rem;
  color: var(--sanguine);
  text-decoration: none;
  border-bottom: 1px solid var(--sanguine-thin);
}

.source__link:hover {
  border-bottom-color: var(--sanguine);
}

/* ── the day's programme ─────────────────────────────────────────────────── */

.schedule {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.05rem;
}

.prog {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  width: 100%;
  padding: 0.42rem 0.35rem 0.42rem 0.5rem;
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  font-size: 0.85rem;
  color: var(--ink-thin);
  transition: color 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.prog:hover {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(148, 55, 28, 0.05), transparent 78%);
}

.prog[data-on='true'] {
  color: var(--ink);
  border-left-color: var(--sanguine);
  background: linear-gradient(90deg, rgba(148, 55, 28, 0.08), transparent 78%);
}

.prog__hours {
  font-variant-numeric: tabular-nums;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.prog[data-on='true'] .prog__hours {
  color: var(--sanguine);
}

.prog__name {
  display: grid;
  gap: 0.05rem;
}

.prog__as {
  font-family: var(--serif-as);
  font-size: 0.95rem;
  line-height: 1.35;
}

.prog__en {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.prog[data-on='true'] .prog__en {
  color: var(--ink-thin);
}

/* ── the index of voices ─────────────────────────────────────────────────── */

.voices {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
}

.voices li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.voices li::after {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  background: var(--ink-ghost);
}

.voices span {
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
  color: var(--ink-faint);
}

.voices li[data-on='true'] {
  color: var(--sanguine);
}

.voices li[data-on='true'] span {
  color: var(--sanguine-thin);
}

/* ── the plate ───────────────────────────────────────────────────────────── */

.plate {
  grid-area: plate;
  display: grid;
  gap: clamp(1rem, 2vw, 1.8rem);
  justify-items: center;
}

.plate__figure,
.study {
  margin: 0;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0.7rem;
}

.machina {
  width: min(100%, 44rem);
  height: auto;
  overflow: visible;
}

.machina text {
  font-family: var(--serif-display);
  fill: var(--ink-thin);
}

.construction {
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 1;
}

.construction--golden {
  stroke: var(--gold-thin);
  stroke-dasharray: 3 5;
}

.spiral {
  fill: none;
  stroke: var(--gold-thin);
  stroke-width: 1;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: draw 9s cubic-bezier(0.33, 0, 0.15, 1) 0.6s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.arcs path {
  fill: none;
  stroke: var(--ink-thin);
  stroke-width: 8;
  stroke-linecap: butt;
  opacity: 0.34;
  transition: opacity 0.8s ease, stroke 0.8s ease, stroke-width 0.8s ease;
}

.arcs path[data-block][data-on='true'] {
  stroke: var(--sanguine);
  stroke-width: 11;
  opacity: 0.95;
}

.arc-labels text {
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  fill: var(--ink-thin);
  transition: fill 0.8s ease;
}

.arc-labels text[data-on='true'] {
  fill: var(--sanguine);
}

.ticks line {
  stroke: var(--ink-faint);
  stroke-width: 0.9;
}

.ticks line[data-major='true'] {
  stroke: var(--ink-thin);
  stroke-width: 1.4;
}

.numerals text {
  font-size: 13px;
  letter-spacing: 0.12em;
  fill: var(--ink-thin);
  text-anchor: middle;
  dominant-baseline: middle;
}

/* the disc */
.disc {
  transform-origin: 360px 360px;
}

.grooves circle {
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 0.75;
}

.disc__seat {
  fill: var(--vellum);
}

.disc__label {
  fill: none;
  stroke: var(--sanguine);
  stroke-width: 1.2;
}

.disc__spindle {
  fill: var(--ink);
}

body[data-playing='true'] .disc {
  animation: revolve 24s linear infinite;
}

@keyframes revolve {
  to {
    transform: rotate(360deg);
  }
}

/* the gear train */
.gears path,
.gears circle {
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 0.85;
}

.gears g {
  transform-box: fill-box;
  transform-origin: center;
}

body[data-playing='true'] .gears g[data-spin='cw'] {
  animation: revolve 11s linear infinite;
}

body[data-playing='true'] .gears g[data-spin='ccw'] {
  animation: revolve 7s linear infinite reverse;
}

/* the hand */
.hand {
  transform-origin: 360px 360px;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.hand line {
  stroke: var(--sanguine);
  stroke-width: 1.4;
}

.hand circle {
  fill: var(--vellum);
  stroke: var(--sanguine);
  stroke-width: 1.2;
}

.hand path {
  fill: var(--sanguine);
}

.annotation line {
  stroke: var(--ink-faint);
  stroke-width: 0.7;
}

.annotation text {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  fill: var(--ink-faint);
}

/* captions, in the voice of a plate in a treatise */
.plate__caption,
.study__caption {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  max-width: 34rem;
  font-size: 0.8rem;
  color: var(--ink-thin);
  font-style: italic;
  text-align: left;
}

.caption__num {
  font-family: var(--serif-display);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sanguine);
  white-space: nowrap;
}

.study__canvas {
  width: 100%;
  max-width: 44rem;
  height: auto;
}

/* ── the entry: what is turning now ──────────────────────────────────────── */

.entry {
  display: grid;
  gap: 0.5rem;
}

.entry__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.entry__eyebrow {
  margin: 0;
  font-family: var(--serif-as);
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 0.95rem;
}

.entry__state {
  font-family: var(--serif-display);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.entry__state::before {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.entry__state[data-state='playing']::before {
  background: var(--sanguine);
  box-shadow: 0 0 0 3px var(--sanguine-thin);
  animation: pulse 3.4s ease-in-out infinite;
}

.entry__state[data-state='seeking']::before {
  background: var(--gold);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.entry__title {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.14;
  text-wrap: balance;
}

.entry__native {
  margin: 0;
  font-family: var(--serif-as);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--sanguine);
}

.entry__native:empty {
  display: none;
}

.entry__facts {
  margin: 0.35rem 0 0;
  display: grid;
  gap: 0.1rem;
}

.fact[hidden] {
  display: none;
}

.fact {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--ink-ghost);
}

.fact dt {
  font-family: var(--serif-display);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.fact dd {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink);
}

/* the progress rule, drawn as a scale bar */
.progress {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.35rem;
}

.progress__source {
  display: none;
}

.progress__rule {
  position: relative;
  height: 9px;
  border-left: 1px solid var(--ink-faint);
  border-right: 1px solid var(--ink-faint);
}

.progress__rule::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--ink-faint);
}

.progress__ink {
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  width: 0%;
  background: var(--sanguine);
  transform: translateY(-50%);
  transition: width 1s linear;
}

.progress__ink::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sanguine);
  transform: translateY(-50%);
}

.progress__times {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ── the keys ────────────────────────────────────────────────────────────── */

.keys {
  margin-top: 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.9rem, 3vw, 1.6rem);
}

.key {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.key svg {
  width: 2.5rem;
  height: 2.5rem;
}

.key--play svg {
  width: 3.2rem;
  height: 3.2rem;
}

.key__ring {
  fill: none;
  stroke: var(--ink-thin);
  stroke-width: 1;
  transition: stroke 0.4s ease;
}

.key__ring--inner {
  stroke: var(--gold-thin);
  stroke-dasharray: 2 4;
}

.key__glyph-fill {
  fill: var(--sanguine);
  transition: fill 0.4s ease;
}

.key:hover .key__ring,
.key:focus-visible .key__ring {
  stroke: var(--sanguine);
}

.key__label {
  font-family: var(--serif-display);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-thin);
}

.offair {
  margin: 0.8rem 0 0;
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  color: var(--ink-faint);
}

.offair button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--sanguine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── to follow ───────────────────────────────────────────────────────────── */

.entry--next {
  padding-top: 0.9rem;
  border-top: var(--rule);
}

.queue {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
  display: grid;
  gap: 0.05rem;
}

.queue li {
  display: grid;
  grid-template-columns: 1.1rem 1fr auto;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--ink-ghost);
  font-size: 0.86rem;
}

.queue li::before {
  counter-increment: q;
  content: counter(q, lower-roman);
  font-family: var(--serif-display);
  font-size: 0.7rem;
  color: var(--gold);
  text-align: right;
}

.queue__title {
  display: grid;
  gap: 0.02rem;
  min-width: 0;
}

.queue__as {
  font-family: var(--serif-as);
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.queue__who {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 0.74rem;
  color: var(--ink-faint);
}

.queue__len {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}

/* ── colophon ────────────────────────────────────────────────────────────── */

.colophon {
  grid-area: colophon;
  margin: 0 auto;
  max-width: 46rem;
  padding-top: 1.2rem;
  border-top: var(--rule);
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--ink-faint);
}

.colophon__sig {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--serif-display);
  font-style: italic;
  letter-spacing: 0.08em;
}

/* ── the seal ────────────────────────────────────────────────────────────── */

.seal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: radial-gradient(120% 100% at 50% 40%, var(--vellum-lit), var(--vellum) 55%, var(--vellum-shade));
  transition: opacity 1.1s ease, visibility 1.1s;
}

.seal[hidden] {
  display: grid;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.seal__inner {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  text-align: center;
  max-width: 26rem;
}

.seal__wax {
  width: clamp(9rem, 26vw, 13rem);
  height: auto;
}

.seal__disc {
  fill: var(--sanguine);
  opacity: 0.12;
}

.seal__ring {
  fill: none;
  stroke: var(--sanguine);
  stroke-width: 0.9;
  opacity: 0.55;
}

.seal__rays line {
  stroke: var(--sanguine);
  stroke-width: 0.7;
  opacity: 0.4;
}

.seal__glyph {
  font-family: var(--serif-as);
  font-size: 38px;
  fill: var(--sanguine);
}

.seal__title {
  margin: 0.5rem 0 0;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.seal__body {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.seal__key {
  margin-top: 0.9rem;
  padding: 0.6rem 2.4rem;
  background: none;
  border: 1px solid var(--sanguine);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--serif-display);
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--sanguine);
  transition: background 0.5s ease, color 0.5s ease;
}

.seal__key:hover,
.seal__key:focus-visible {
  background: var(--sanguine);
  color: var(--vellum-lit);
}

/* the player: heard, never seen */
.stage {
  position: fixed;
  width: 1px;
  height: 1px;
  left: -100vw;
  top: -100vh;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ── first paint ─────────────────────────────────────────────────────────── */

.folio {
  opacity: 0;
  animation: rise 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .spiral {
    stroke-dashoffset: 0;
  }

  .folio {
    opacity: 1;
  }
}

/* ── volume ───────────────────────────────────────────────────────────────── */

/* Red chalk, like every other quantity the scribe marked on the page. The keys
   are 44-unit circles with a caption under each; this sits on their centre
   line rather than on the top edge they are aligned to. */
.vol {
  --vol-track: var(--ink-ghost);
  --vol-fill: var(--sanguine);
  --vol-thumb: var(--sanguine);
  --vol-ink: var(--ink-thin);

  align-self: center;
  margin-left: 0.3rem;
}

.vol__key:hover {
  color: var(--sanguine);
}

.vol__value {
  font-family: var(--serif-text);
  font-style: italic;
  font-size: 0.74rem;
  letter-spacing: 0;
  opacity: 0.8;
}
