:root { color-scheme: light; --paper: #f5f2eb; --ink: #454841; --quiet: #787a70; --gold: #a68b50; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper) url('./paper.png') repeat; color: var(--ink); font-family: Georgia, 'Times New Roman', serif; }
main { width: min(1240px, 100%); margin: auto; padding: 72px 32px 24px; }
.author-block { position: absolute; top: -1px; left: 15px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #d4d5c9; border-radius: 0 0 8px 8px; color: var(--quiet); background: #ffffff0e; text-decoration: none; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 11px; }
.author-wordmark { display: block; width: 100px; height: auto; flex: none; color: var(--ink); }
.author-block:hover { border-color: #888; }
/* Let the controls share the empty sky above the constellation. */
.drawing { position: relative; margin-top: -28px; }
canvas { display: block; width: 100%; height: clamp(430px, 50vw, 580px); }
/* Pull the caption into the canvas's empty bottom margin. Align each new
   sentence to the same top edge instead of centering it in reserved space. */
.chapter { position: relative; display: grid; place-items: start center; max-width: 25ch; min-height: 2.5em; margin: -40px auto 0; font-size: clamp(27px, 3.6vw, 42px); font-weight: 400; font-style: italic; line-height: 1.25; letter-spacing: -.6px; text-align: center; text-wrap: balance; transition: opacity .45s ease, transform .45s ease; }
.chapter.changing { opacity: 0; transform: translateY(5px); }
.age { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 5px; margin: 0; color: var(--quiet); font-size: 11px; line-height: 1.2; white-space: nowrap; text-align: center; pointer-events: none; }
#age { min-width: 2ch; color: var(--gold); font-size: clamp(30px, 3.1vw, 36px); line-height: 1; font-variant-numeric: tabular-nums; }
.player { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 18px; max-width: 650px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button { background: none; color: var(--ink); border: 1px solid #d4d5c94d; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; cursor: pointer; transition: border-color .2s, background .2s; }
button:hover { background: #ecebdf; border-color: #919a86; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #927440; outline-offset: 5px; }
.pause-symbol { width: 8px; height: 11px; border-left: 2px solid; border-right: 2px solid; }
.play-symbol { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid; margin-left: 3px; }
#replay svg { display: block; }
.timeline { flex: 1; min-width: 0; padding-top: 10px; }
input[type=range] { appearance: none; width: 100%; background: transparent; height: 20px; display: block; margin: 0; cursor: pointer; --position: 0%; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--gold) var(--position), #d5d6c9 var(--position)); }
input[type=range]::-moz-range-track { height: 2px; background: #d5d6c9; }
input[type=range]::-moz-range-progress { height: 2px; background: var(--gold); }
input[type=range]::-webkit-slider-thumb { appearance: none; background: var(--paper); border: 2px solid var(--gold); width: 11px; height: 11px; border-radius: 50%; margin-top: -4.5px; }
input[type=range]::-moz-range-thumb { background: var(--paper); border: 2px solid var(--gold); width: 8px; height: 8px; border-radius: 50%; }
footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; color: var(--quiet); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 10px; letter-spacing: .2px; }
footer a { color: inherit; text-decoration-color: #c9cabe; text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.no-script { text-align: center; }
@media (min-width: 601px) and (max-width: 900px) {
  .chapter { margin-top: -16px; }
}
@media (max-width: 600px) {
  main { padding: 64px 14px 20px; }
  canvas { height: 420px; }
  .player { gap: 10px; }
  footer { margin-top: 26px; }
  .chapter { min-height: 3.75em; margin-top: -28px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
