/* Four scenes share one scroll-controlled stage. All scene artwork is supplied imagery. */
.hero.story { position: relative; height: 100svh; min-height: 640px; max-height: none; overflow: visible; background: #090e12; --lamp-power: 0; --portal-rgb: 245,166,70; }
.hero.story.story-enhanced { height: 570svh; }
.story-viewport { position: sticky; top: 0; height: 100svh; min-height: 640px; overflow: hidden; isolation: isolate; }
.story-aperture { position: absolute; inset: 0; overflow: hidden; isolation: isolate; }
.story-scene { position: absolute; inset: 0; opacity: 0; pointer-events: none; overflow: hidden; }
.story-scene:first-child { opacity: 1; }
.story-scene.is-current { pointer-events: auto; }
.story-plane { position: absolute; width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.story-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.story-light, .story-transition { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.story-transition { background: radial-gradient(ellipse at 62% 55%, #dca45d50, #0d1017 82%); opacity: 0; }
.story-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 6; background: linear-gradient(180deg,#090d14a6,transparent 24%,transparent 62%,#090d1480 83%,#090d14e8),linear-gradient(90deg,#07101880,transparent 52%); }
.story-copy { position: absolute; z-index: 8; left: var(--gutter); top: 39%; width: min(42%,600px); pointer-events: none; text-shadow: 0 3px 25px #03080bb0; }
.story-eyebrow { display: flex; align-items: center; gap: 17px; font-size: .75rem; letter-spacing: .18em; color: #ded0b8; margin-bottom: 22px; line-height: 1.6; }
.story-index { padding-right: 17px; border-right: 1px solid #cbb99560; font-variant-numeric: tabular-nums; }
.hero.story h1 { font-family: var(--sans); font-size: clamp(38px,4.7vw,82px); line-height: 1.12; letter-spacing: -.045em; font-weight: 400; }
.hero.story h1 em { font-family: var(--serif); color: #e4c59d; font-weight: 400; }
.story-subtitle { margin-top: 25px; color: #d7cbb9; font-size: 1rem; line-height: 1.8; letter-spacing: .05em; }
.story[data-current="2"] .story-copy, .story[data-current="3"] .story-copy { top: auto; bottom: 148px; width: min(41%,470px); }
.story[data-current="2"] h1, .story[data-current="3"] h1 { font-size: clamp(32px,3.5vw,58px); }
.story[data-current="2"] .story-subtitle, .story[data-current="3"] .story-subtitle { margin-top: 14px; }
.story-lamp { position: absolute; top: 110px; left: calc(var(--gutter) - 12px); z-index: 9; display: flex; align-items: center; padding: 4px 12px 4px 0; gap: 5px; min-height: 44px; }
.lamp-object { display: block; position: relative; width: 61px; height: 94px; }
.lamp-object img { width: 100%; height: 100%; object-fit: contain; filter: brightness(calc(.85 + var(--lamp-power) * .3)) drop-shadow(0 5px 12px #0008); }
.lamp-light { position: absolute; inset: 22% 20% 26%; background: radial-gradient(ellipse,#fff1b2b0, #fba84660 28%, transparent 70%); mix-blend-mode: screen; opacity: var(--lamp-power); }
.story-lit .lamp-light { animation: story-wick 2.6s ease-in-out infinite alternate; }
.lamp-label { font-size: .875rem; color: #e6cda6; border-bottom: 1px solid #dfba8255; padding-bottom: 5px; }
.story-actions { position: absolute; z-index: 9; right: var(--gutter); bottom: 148px; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 12px; max-width: 49%; }
.story-actions button, .destination-meet { min-height: 44px; padding: 10px 16px; font-size: .875rem; line-height: 1.5; border: 1px solid #cdb79660; background: #121511b8; border-radius: 3px; color: #eedfc8; backdrop-filter: blur(10px); }
.story-actions button:hover, .destination-meet:hover { border-color: #edc68d; background: #24221de8; }
.story-actions .story-next { display: flex; align-items: center; gap: 18px; }
.story-next > span:last-child { font-size: 22px; }
.story-footer { position: absolute; z-index: 9; left: var(--gutter); right: var(--gutter); bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.story-chapters { display: flex; align-items: stretch; gap: 24px; }
.story-chapters button { display: flex; gap: 9px; align-items: center; min-height: 48px; padding: 12px 0; border-top: 1px solid #cbbd9c40; color: #bbb5a9; font-size: .875rem; }
.story-chapters button span { font-size: .75rem; opacity: .7; font-variant-numeric: tabular-nums; }
.story-chapters button b { font-weight: 400; }
.story-chapters button[aria-current="step"] { color: #ffdfa2; border-color: #e8c185; }
.story .motion-toggle { font-size: .875rem; min-height: 44px; }
.story-portrait, .story-deck, .room-candle, .story-lever { position: absolute; padding: 0; touch-action: manipulation; }
.story-portrait { overflow: hidden; background: #c18b51; filter: brightness(.73) sepia(.18); }
.story-portrait img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.portrait-room { left: 36.45%; top: 25.05%; width: 14.65%; height: 9.4%; transform: skewY(-2deg); }
.portrait-door { left: 16.83%; top: 23.8%; width: 18.6%; height: 12.75%; transform: skewY(-1deg); }
.story-portrait:hover, .story-portrait:focus-visible { filter: brightness(1) sepia(.1); }
.story-portrait:focus-visible { outline-offset: 0; outline: 3px solid #f6d590; }
.story-deck { left: 34%; top: 55.6%; width: 9%; height: 4.7%; transform: rotate(-6deg); filter: brightness(.82) drop-shadow(3px 6px 2px #0008); }
.table-card { position: absolute; display: block; width: 65%; height: 100%; background-image: url('assets/characters.webp'); background-size: 205% 205%; border: 1px solid #a89875; border-radius: 3px; box-shadow: 1px 2px 1px #16120f; }
.table-card:nth-child(1) { left: 0; transform: rotate(-9deg); }
.table-card:nth-child(2) { left: 18%; transform: rotate(2deg); }
.table-card:nth-child(3) { left: 36%; transform: rotate(12deg); }
.story-deck:hover { filter: brightness(1.1) drop-shadow(3px 8px 3px #0009); }
.room-candle { left: 1.1%; top: 46%; width: 6%; height: 35%; border-radius: 45%; }
.room-candle:hover { box-shadow: inset 0 0 35px #efb96130; }
.story-lever { left: 79.1%; top: 38.3%; width: 7.3%; height: 17.2%; min-width: 44px; min-height: 44px; transform-origin: 50% 2%; }
.lever-art { display: block; width: 100%; height: 100%; transform-origin: 65% 8%; transform: rotate(var(--lever-angle,0deg)); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.lever-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(4px 6px 3px #0006); }
.lever-hint { position: absolute; left: 50%; top: 113%; transform: translateX(-50%); white-space: nowrap; font-size: .875rem; color: #f7d49b; padding: 7px 10px; background: #161311c9; border: 1px solid #a98b5760; border-radius: 3px; }
.story-lever:hover .lever-hint { border-color: #f3d49b; }
.portal-spill { position: absolute; left: 48.7%; top: 80.1%; width: 27.3%; height: 14%; pointer-events: none; background: radial-gradient(ellipse at 50% 31%,rgba(var(--portal-rgb),.64),rgba(var(--portal-rgb),.21) 40%,transparent 72%); mix-blend-mode: screen; filter: blur(6px); opacity: .4; transition: background .6s,opacity .6s; }
.story-activated .portal-spill { opacity: 1; }
.story-destination { position: absolute; z-index: 9; right: var(--gutter); bottom: 220px; text-align: right; max-width: 40%; padding: 18px 20px; border-left: 1px solid #d3ac6660; background: linear-gradient(90deg,#17151105,#13130fe8); }
.destination-kicker { display: block; color: #cabd9f; font-size: .75rem; letter-spacing: .1em; margin-bottom: 10px; }
.destination-name { display: block; font-size: clamp(23px,2vw,34px); font-family: var(--serif); font-weight: 400; color: #f2dbb7; margin-bottom: 15px; }
.story-dialog { width: min(1060px,94vw); max-height: 88svh; padding: 52px 44px 36px; border: 1px solid #b7986050; background: #151714; color: #eee4d2; border-radius: 6px; overflow: auto; }
.story-dialog::backdrop { background: #070b10d9; backdrop-filter: blur(9px); }
.story-dialog-close { position: absolute; top: 14px; right: 18px; min-height: 44px; padding: 8px; font-size: 1rem; }
.story-dialog-kicker { font-size: .75rem; letter-spacing: .14em; color: #c0a779; margin-bottom: 14px; }
.story-dialog h2 { font-size: clamp(28px,3.6vw,46px); font-weight: 400; }
.story-dialog-note { font-size: 1rem; color: #bcb5a5; line-height: 1.8; margin-top: 12px; }
.story-cast-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-top: 30px; }
.story-cast-card { padding: 0 0 18px; border: 1px solid #a5906945; background: #22241f; text-align: left; overflow: hidden; border-radius: 4px; }
.story-cast-card[aria-pressed="true"] { border-color: #e7c182; background: #302c23; }
.story-card-photo { display: block; aspect-ratio: 1; background-image: url('assets/characters.webp'); background-size: 205% 205%; }
.story-card-name { display: block; font-size: 1rem; margin: 15px 14px 8px; }
.story-card-note { display: block; margin: 0 14px; font-size: .875rem; color: #d4c7b1; line-height: 1.6; visibility: hidden; }
.story-cast-card[aria-pressed="true"] .story-card-note { visibility: visible; }
.story-family-large { width: min(100%,720px); max-height: 260px; object-fit: contain; margin: 28px auto 0; }
.story-nojs { position: absolute; bottom: 20px; padding: 20px; z-index: 10; background: #111; }
.story-nojs a { text-decoration: underline; }
.story [hidden], .story-dialog [hidden] { display: none!important; }
.site-header { position: fixed; background: linear-gradient(#0a1018dc,#0a101845); backdrop-filter: blur(6px); }
.site-header nav a { font-size: .875rem; }
.music-dock { bottom: 84px; }
html[data-language="zh"] .hero.story h1 { font-size: clamp(36px,4.3vw,74px); line-height: 1.35; }
html[data-language="zh"] .story[data-current="2"] h1,html[data-language="zh"] .story[data-current="3"] h1 { font-size: clamp(28px,3.1vw,48px); }
.story.is-still .story-plane { will-change: auto; }
.story.is-still .lever-art { transition: none; }
@keyframes story-wick { from { filter: brightness(.9); } to { filter: brightness(1.2); } }
@media(max-width:1050px) { .story-chapters { gap: 17px; } .story-actions { max-width: 48%; gap: 8px; } .story-actions button { padding: 8px 12px; } }
@media(max-width:760px), (max-aspect-ratio:4/5) {
  .hero.story { min-height: 620px; }
  .story-viewport { min-height: 620px; }
  .hero.story.story-enhanced { height: 520svh; }
  .story-viewport { --story-image-height: min(calc(100vw * .55957),calc(100svh - 390px)); }
  .story-aperture { inset: 134px 0 auto; height: var(--story-image-height); }
  .story-vignette { background: linear-gradient(180deg,#090e1200 43%,#090e12 76%); }
  .story-copy, .story[data-current="2"] .story-copy, .story[data-current="3"] .story-copy { top: calc(134px + var(--story-image-height) + 12px); left: 24px; bottom: auto; width: calc(100% - 48px); }
  .story-eyebrow { font-size: .75rem; gap: 12px; margin-bottom: 9px; letter-spacing: .12em; }
  .story-index { padding-right: 12px; }
  .hero.story h1, .story[data-current="2"] h1, .story[data-current="3"] h1, html[data-language="zh"] .hero.story h1, html[data-language="zh"] .story[data-current="2"] h1, html[data-language="zh"] .story[data-current="3"] h1 { font-size: clamp(28px,7vw,42px); line-height: 1.17; letter-spacing: -.035em; }
  .story-subtitle, .story[data-current="2"] .story-subtitle, .story[data-current="3"] .story-subtitle { font-size: .875rem; line-height: 1.6; margin-top: 10px; }
  .story-lamp { top: 88px; left: 18px; gap: 3px; padding: 0 10px 0 0; }
  .lamp-object { width: 34px; height: 48px; }
  .lamp-label { font-size: .875rem; }
  .story-actions { bottom: 126px; left: 24px; right: 24px; max-width: none; justify-content: flex-start; gap: 8px; }
  .story-actions button { font-size: .875rem; padding: 8px 10px; min-height: 44px; }
  .story-footer { left: 24px; right: 24px; bottom: 20px; display: block; }
  .story-chapters { width: 100%; justify-content: space-between; gap: 12px; }
  .story-chapters button { font-size: .875rem; gap: 6px; }
  .story .motion-toggle { position: absolute; bottom: 60px; left: 0; padding-left: 0; font-size: .875rem; }
  .music-dock { right: 24px; bottom: max(79px,calc(env(safe-area-inset-bottom) + 64px)); }
  .story-destination { top: 90px; bottom: auto; right: 20px; padding: 0; border: 0; background: none; max-width: 54%; }
  .destination-kicker { display: none; }
  .destination-name { margin: 0; font-size: 1rem; }
  .destination-meet { display: none; }
  .lever-hint { display: none; }
  .story-lever { min-width: 30px; min-height: 40px; }
  .story-portrait { min-height: 22px; }
  .story-dialog { padding: 52px 20px 28px; }
  .story-cast-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 20px; }
  .story-card-note { min-height: 45px; }
}
@media(max-width:760px) and (max-height:740px) {
  .story-subtitle { display: none; }
  .story-eyebrow { margin-bottom: 7px; }
  .hero.story h1, html[data-language="zh"] .hero.story h1 { font-size: 27px; }
  .story-actions { bottom: 126px; }
}
@media(min-width:761px) and (max-height:690px) { .story-copy { top: 35%; } .hero.story h1 { font-size: 45px; } .story-subtitle { margin-top: 12px; } }
@media(prefers-reduced-motion:reduce) { .lamp-light { animation: none; } .story-plane { will-change: auto; } }

@media(max-width:760px) {
  .site-header { gap: 12px; }
  .site-header > .brand-art { width: 130px; height: 30px; background-size: 581px 726px; background-position: -23px -24px; }
  .site-header .menu-toggle { gap: 8px; font-size: .875rem; padding-left: 0; }
  .site-header .language-switch { position: relative; top: auto; right: auto; }
  .language-trigger { width: 44px; padding: 10px; }
  .language-trigger > span, .language-chevron { display: none; }
  .story-actions .story-family-action { display: none; }
}

.story:not(.story-enhanced) .story-actions, .story:not(.story-enhanced) .story-footer { display: none; }
.story-lever { cursor: grab; }
.story-lever:active { cursor: grabbing; }
