/* A reading room and a stage, sharing one story. */
.landing-shell { width: min(100%, 1600px); min-height: 720px; padding: 24px clamp(24px, 4vw, 64px) 20px; gap: 32px; }
.site-name { font: 500 28px/1.2 var(--serif); letter-spacing: -.02em; }
.landing-header nav { font-size: .9375rem; }
.landing-art { display: grid; grid-template-columns: minmax(320px, .95fr) minmax(0, 1.8fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; justify-items: stretch; gap: clamp(40px, 5vw, 80px); }
.story-reader { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.story-intro { padding-top: 16px; }
.story-intro h1 { font-size: clamp(48px, 4.8vw, 72px); line-height: 1.05; margin: 0 0 20px; }
.story-intro > p { max-width: 37ch; font-size: 1rem; line-height: 1.7; }
.reader-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 32px 0 16px; font-size: .875rem; color: var(--muted); }
.reading-mode { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.reading-mode input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; cursor: pointer; }
.story-transcript { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #59564d transparent; padding: 8px 16px 40px 8px; margin-left: -8px; scroll-padding-block: 24px; }
.story-verse + .story-verse { margin-top: 32px; }
.story-verse h2 { margin: 0 0 12px; font: 500 26px/1.2 var(--serif); color: var(--ink); letter-spacing: -.015em; }
.story-verse.is-current h2 { color: var(--accent); font-weight: 600; }
.story-line { display: block; position: relative; padding: 9px 0; font-size: 1rem; line-height: 1.55; text-decoration: none; color: var(--muted); border-radius: 0; }
.story-line[aria-current="true"] { color: var(--accent); font-weight: 700; }
.story-line:focus-visible { outline-offset: 2px; }
.story-line:active { color: var(--ink); }
.reader-footer { min-height: 48px; flex-shrink: 0; }
.return-to-story { min-height: 44px; margin-top: 4px; color: var(--accent); font-size: .875rem; text-decoration: underline; text-underline-offset: .3em; }
.performance { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding-block: 12px; }
.performance-intro { font: 400 clamp(26px, 2.5vw, 36px)/1.2 var(--serif); text-align: center; }
.performance .eyes-scene canvas, .performance .eyes-scene .eye-poster { width: min(100%, max(360px, calc((100dvh - 480px) * 2.5))); max-width: 940px; height: auto; aspect-ratio: 5 / 2; }
.story-companion { width: min(100%, 600px); text-align: center; }
.story-vignette { display: block; width: 300px; max-width: 80%; height: 72px; margin: 0 auto 16px; color: var(--accent); overflow: visible; }
.vignette-ground { stroke: var(--accent); stroke-width: 1; opacity: .18; }
.vignette-lamp { opacity: .85; }
#story-door { opacity: .28; }
#story-flame { transform-box: fill-box; transform-origin: 50% 100%; }
#story-footsteps, #story-rain, #story-flower { opacity: 0; }
.story-copy { min-height: 100px; }
.story-copy h2 { margin: 0; font: 500 32px/1.15 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.story-copy p { max-width: 42ch; margin: 12px auto 0; color: var(--ink); font: 400 20px/1.45 var(--serif); text-wrap: pretty; }
.performance-note, .story-fallback { max-width: 47ch; color: var(--muted); font-size: .875rem; line-height: 1.7; text-align: center; }
.landing-footer { font-size: .875rem; min-height: 28px; }
@media (hover: hover) and (pointer: fine) {
  .story-line:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--muted); }
  .story-line[aria-current="true"]:hover { color: var(--accent); }
}
@media (min-width: 901px) and (max-height: 780px) {
  .landing-shell { min-height: 640px; gap: 16px; padding-block: 16px; }
  .story-intro { padding-top: 8px; }
  .story-intro h1 { font-size: 56px; margin-bottom: 16px; }
  .reader-heading { margin-top: 20px; margin-bottom: 8px; }
  .performance { gap: 20px; padding-block: 8px; }
  .performance-intro { display: none; }
  .story-vignette { height: 64px; margin-bottom: 12px; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .landing-art { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.5fr); gap: 32px; }
  .story-intro h1 { font-size: 56px; }
}
@media (max-width: 900px) {
  .landing-shell { height: auto; min-height: 100svh; gap: 32px; padding: 20px 24px max(20px, env(safe-area-inset-bottom)); }
  .landing-art { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 0; }
  .story-reader { display: contents; }
  .story-intro { grid-row: 1; padding-top: 8px; }
  .story-intro h1 { font-size: clamp(48px, 7vw, 64px); margin-bottom: 16px; }
  .story-intro > p { max-width: 48ch; }
  .performance { display: contents; }
  .performance-intro { display: none; }
  .performance .eyes-scene { grid-row: 2; position: sticky; top: 0; z-index: 1; padding-block: 24px 12px; background: var(--ground); }
  .performance .eyes-scene canvas, .performance .eyes-scene .eye-poster { width: min(100%, 620px); }
  .story-companion { grid-row: 3; justify-self: center; margin-top: 8px; }
  .story-vignette { height: 60px; margin-bottom: 12px; }
  .story-copy { min-height: 82px; }
  .story-copy h2 { font-size: 28px; }
  .performance-note { grid-row: 4; justify-self: center; font-size: .875rem; margin-block: 16px; }
  .reader-heading { grid-row: 5; margin: 16px 0; justify-content: space-between; scroll-margin-top: 300px; }
  .story-transcript { grid-row: 6; max-height: 380px; max-height: min(48svh, 420px); }
  .reader-footer { grid-row: 7; }
  .story-line, .reading-mode { scroll-margin-top: 300px; }
  .landing-footer { flex-direction: row; font-size: .8125rem; gap: 12px; }
}
@media (max-width: 480px) {
  .landing-shell { padding-inline: 20px; gap: 24px; }
  .landing-header { flex-direction: row; align-items: center; gap: 16px; }
  .site-name { font-size: 23px; max-width: 7ch; }
  .landing-header nav { font-size: .875rem; flex-direction: column; align-items: flex-end; gap: 0; }
  .landing-header nav a { padding-block: 5px; }
  .story-intro h1 { font-size: 48px; }
  .story-intro > p { font-size: 1rem; }
  .performance { gap: 12px; padding-block: 28px 20px; }
  .performance-intro { display: none; }
  .story-vignette { height: 52px; margin-bottom: 12px; }
  .story-copy { min-height: 90px; }
  .story-copy p { font-size: 20px; max-width: 31ch; }
  .performance-note { max-width: 34ch; }
  .reader-heading { align-items: flex-start; gap: 4px 16px; margin-top: 8px; }
  .story-verse h2 { font-size: 26px; }
  .landing-footer { flex-wrap: wrap; justify-content: flex-start; gap: 4px 20px; }
}
@media (max-width: 900px) and (max-height: 600px) {
  .performance .eyes-scene { position: static; }
}
