:root {
  --paper: #f2f0eb;
  --ink: #252d2a;
  --muted: #757b73;
  --accent: #62745e;
  --line: #d6d8ce;
}
#decompositionView, .standalone-story {
  color-scheme: light;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scrollbar-color: #bdc5b5 var(--paper); }
#decompositionView { background: var(--paper); color: var(--ink); }
.standalone-story { margin: 0; background: var(--paper); color: var(--ink); }
[hidden] { display: none !important; }
#story { position: relative; height: 660svh; }
#experience { position: sticky; top: 0; height: 100dvh; overflow: clip; isolation: isolate; }
#scene { position: absolute; inset: 102px 0 76px; background: radial-gradient(ellipse at 50% 44%, #faf9f4 0, transparent 70%); }
#scene canvas { display: block; width: 100%; height: 100%; outline: none; }
.room-annotations { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.room-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.room-leader { fill: none; stroke: #71877a; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0; }
.room-leader-halo { stroke: #fafbf4; stroke-width: 5; }
.room-leader-glow { stroke: #536f5c; stroke-width: 3.4; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 2px 5px #627d6a44); }
.room-pin { opacity: 0; }
.room-pin-pulse { fill: none; stroke: #71877a; stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.room-pin-ring { fill: #fcfdf5d9; stroke: #ffffff; stroke-width: 1.2; }
.room-pin-core { fill: #71877a; transition: r .35s ease, fill .35s ease; }
.room-pin.is-live .room-pin-pulse { animation: roomPulse 2.8s ease-in-out infinite; }
@keyframes roomPulse { 0%, 100% { opacity: 0; transform: scale(.72); } 45% { opacity: .48; transform: scale(1.2); } 70% { opacity: .08; transform: scale(1.5); } }
.room-card { position: absolute; top: 0; left: 0; box-sizing: border-box; padding: 6px 7px 6px 15px; background: linear-gradient(145deg, #ffffffb8, #fbfcf38c); border: 1px solid #ffffffd9; border-radius: 24px; box-shadow: 0 8px 28px #273f3010, 0 2px 5px #233c2b04, inset 0 -1px 0 #79927c0d; -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2); opacity: 0; visibility: hidden; will-change: transform, opacity; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
.room-card-heading { display: flex; height: 100%; align-items: center; justify-content: space-between; gap: 10px; }
.room-card h2 { margin: 0; font-size: 12px; line-height: 1; font-weight: 500; letter-spacing: -.025em; color: #2c3831; white-space: nowrap; }
.room-area { display: flex; align-items: baseline; justify-content: center; gap: 3px; padding: 7px 9px; background: #dbe4dba6; border: 1px solid #bdcebe40; border-radius: 16px; white-space: nowrap; color: #47624d; }
.room-area strong { font-size: 13px; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.room-area span { font-size: 9px; color: #70826e; }
.room-area-note { position: absolute; bottom: 7px; right: 28px; margin: 0; color: #89917f; font-size: 8px; letter-spacing: .025em; opacity: 0; }
.room-annotations[data-compact="true"] .room-card { padding: 4px 5px 4px 11px; border-radius: 20px; }
.room-annotations[data-compact="true"] .room-card-heading { gap: 6px; }
.room-annotations[data-compact="true"] .room-card h2 { font-size: 10px; }
.room-annotations[data-compact="true"] .room-area { gap: 2px; padding: 6px 7px; }
.room-annotations[data-compact="true"] .room-area strong { font-size: 11px; }
.room-annotations[data-compact="true"] .room-area span { font-size: 7px; }
.room-annotations[data-compact="true"] .room-area-note { bottom: 1px; left: 0; right: 0; text-align: center; font-size: 7px; }
.masthead { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 28px 42px; z-index: 3; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand > svg { height: 40px; width: 36px; stroke: var(--ink); stroke-width: 1.3; }
.brand > div { display: flex; flex-direction: column; gap: 7px; }
.project { font-size: 13px; font-weight: 650; letter-spacing: .27em; }
.edition { font-size: 12px; color: var(--muted); letter-spacing: .035em; }
.film-label { display: flex; align-items: center; gap: 9px; font-size: 9px; letter-spacing: .19em; color: var(--muted); }
.film-label i { height: 5px; width: 5px; border-radius: 50%; background: var(--accent); }
.chapter { position: absolute; left: 42px; top: 146px; width: 245px; pointer-events: none; z-index: 2; }
.chapter-meta { display: flex; align-items: center; gap: 11px; color: var(--accent); font-size: 9px; letter-spacing: .17em; font-weight: 600; }
#chapterNumber { font-variant-numeric: tabular-nums; }
.hairline { width: 30px; height: 1px; background: #b8c1b0; }
.chapter h1 { font: 400 clamp(28px, 2.7vw, 42px)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.045em; margin: 18px 0 14px; max-width: 260px; }
.chapter p { font-size: 12px; line-height: 1.8; color: var(--muted); max-width: 218px; margin: 0; }
.scroll-footer { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); left: 42px; right: 42px; display: flex; align-items: center; justify-content: space-between; gap: 18px; pointer-events: none; z-index: 3; }
.scroll-cue { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .035em; color: var(--accent); }
#scrollArrow { font-size: 24px; line-height: 1; font-weight: 300; }
.gesture-hint { font-size: 10px; color: var(--muted); }
.touch-hint { display: none; }
.story-loading { position: absolute; inset: 0; z-index: 10; background: var(--paper); display: flex; align-items: center; justify-content: center; flex-direction: column; }
.story-loading b { font: normal 28px Georgia, serif; margin-top: 28px; letter-spacing: -.025em; }
.story-loading p { font-size: 12px; color: var(--muted); max-width: 340px; line-height: 1.6; text-align: center; margin: 13px 25px; }
.story-loading button { font: inherit; color: var(--ink); cursor: pointer; border: 1px solid var(--line); padding: 10px 18px; background: transparent; border-radius: 4px; font-size: 12px; margin-top: 10px; }
.story-loading button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.story-loading-symbol { height: 40px; position: relative; width: 56px; }
.story-loading-symbol span { position: absolute; left: 8px; width: 40px; height: 24px; border: 1px solid var(--accent); transform: rotate(-30deg) skewX(30deg); animation: breathe 2s ease-in-out infinite; }
.story-loading-symbol span:nth-child(1) { top: 0; }
.story-loading-symbol span:nth-child(2) { top: 12px; animation-delay: .15s; }
.story-loading-symbol span:nth-child(3) { top: 24px; animation-delay: .3s; }
@keyframes breathe { 50% { translate: 0 -6px; opacity: .4; } }
noscript { position: absolute; inset: 45% 10%; z-index: 20; text-align: center; }
@media (min-width: 1500px) {
  .chapter { top: 165px; width: 285px; }
  .chapter p { max-width: 250px; font-size: 13px; }
}
@media (max-width: 1000px) {
  .masthead { padding: 22px 26px; }
  .chapter { left: 26px; top: 120px; width: 190px; }
  .chapter h1 { font-size: 30px; }
  .chapter p { font-size: 11px; max-width: 180px; }
  .scroll-footer { left: 26px; right: 26px; }
  .film-label { font-size: 8px; }
}
@media (max-width: 700px) {
  .masthead { padding: 18px 22px; }
  .brand { gap: 10px; }
  .brand > svg { height: 33px; width: 30px; }
  .project { font-size: 11px; }
  .edition { font-size: 10px; }
  .film-label { display: none; }
  .chapter { top: 98px; left: 22px; right: 22px; width: auto; }
  .chapter-meta { font-size: 8px; gap: 8px; }
  .chapter h1 { font-size: 28px; max-width: none; margin: 10px 0 7px; }
  .chapter p { font-size: 11px; max-width: 340px; line-height: 1.6; }
  #scene { inset: 207px 0 80px; }
  .scroll-footer { left: 22px; right: 22px; bottom: max(24px, env(safe-area-inset-bottom)); gap: 12px; }
  .scroll-cue { font-size: 10px; gap: 8px; max-width: 195px; line-height: 1.5; }
  .gesture-hint { font-size: 9px; text-align: right; max-width: 115px; line-height: 1.5; }
}
@media (pointer: coarse) { .mouse-hint { display: none; } .touch-hint { display: inline; } }
@media (max-height: 640px) and (min-width: 701px) {
  .masthead { padding-top: 14px; }
  .chapter { top: 98px; }
  .chapter h1 { font-size: 28px; }
  .chapter p { font-size: 10px; }
  #scene { top: 70px; bottom: 55px; }
  .scroll-footer { bottom: 18px; }
}
@media (max-height: 700px) and (max-width: 700px) {
  .chapter { top: 82px; }
  .chapter h1 { font-size: 24px; margin: 8px 0 5px; }
  .chapter p { font-size: 10px; max-width: 300px; }
  #scene { top: 180px; bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) { .story-loading-symbol span { animation: none; } }
