/* The castle opens into a choice of rooms, with no prescribed route inside. */
.site-header > .brand-art { width:auto; height:auto; min-height:44px; display:flex; align-items:center; background:none; }
.brand-wordmark { font-family:var(--serif); font-size:29px; font-weight:400; letter-spacing:-.025em; line-height:1.2; color:#ead6ae; text-shadow:0 1px 18px #e6b66b20; }
.brand-wordmark > span { font-style:italic; }
.brand-spark { color:inherit; }
.site-header { background:linear-gradient(#080c14a3,#080c1408); backdrop-filter:none; border-bottom-color:#ead6ae14; }
.hero.story.story-enhanced { height:390svh; }
.story-index { display:none; }
.story[data-inside="true"] .story-scene { transition:opacity .65s ease; }
.story[data-inside="true"] .story-copy { top:auto; bottom:160px; width:min(33%,440px); }
.story[data-inside="true"] h1 { font-size:clamp(29px,3.1vw,52px); }
.story[data-inside="true"] .story-subtitle { margin-top:13px; }
.story[data-inside="true"] .story-actions { bottom:160px; }
.story-footer { align-items:center; }
.story-chapters { gap:20px; }
.story-chapters button { color:#ddd0b9; white-space:nowrap; }
.story-chapters button[aria-current="location"] { color:#ffe2aa; border-color:#f1c478; }
.story-chapters button:hover { color:#ffe2aa; }
.story-chapters button[data-chapter="2"] { margin-left:14px; }
.story-about-link { min-height:44px; display:flex; align-items:center; color:#cfbea1; font-size:.875rem; white-space:nowrap; }
.story-about-link:hover { color:#ffe2aa; }
.story-roam { border-color:#e3c28a!important; }
.room-entry,.object-entry { position:absolute; padding:0; z-index:3; min-width:28px; min-height:28px; border:0; border-radius:8px; touch-action:manipulation; cursor:pointer; }
.room-entry > span,.object-entry > span { position:absolute; left:50%; top:75%; transform:translate(-50%,-50%); white-space:nowrap; color:#f4dfbb; background:#0d120ed6; padding:7px 11px; border:1px solid #e3be7955; border-radius:20px; font-size:.875rem; line-height:1.35; box-shadow:0 3px 15px #0005; opacity:.82; transition:opacity .2s,border-color .2s; pointer-events:none; }
.object-entry > span { top:100%; opacity:0; }
.room-entry:hover > span,.room-entry:focus-visible > span,.object-entry:hover > span,.object-entry:focus-visible > span { opacity:1; border-color:#e5c281; }
.room-entry:hover,.object-entry:hover { box-shadow:inset 0 0 24px #ffd08912; }
.room-entry:focus-visible,.object-entry:focus-visible { outline:2px solid #e8c587; outline-offset:2px; }
.hall-lounge-entry { left:2%; top:28%; width:27%; height:27%; }
.hall-lounge-entry > span { top:65%; }
.hall-attic-entry { left:34%; top:30%; width:17%; height:48%; }
.hall-attic-entry > span { top:34%; }
.hall-game-entry > span { top:29%; }
.story-enter { left:54.8%; top:32.4%; width:11.3%; height:35.7%; }
.story-enter > span { top:72%; }
/* Hotspots follow the painted objects in each room. */
.lounge-fire { left:2.8%; top:44%; width:11%; height:23%; }
.lounge-photos { left:40%; top:8.4%; width:32%; height:39%; }
.lounge-radio { left:70.2%; top:40%; width:13.2%; height:23.3%; }
.lounge-lamp { left:33.3%; top:37.6%; width:6.4%; height:17.3%; }
.lounge-hall { left:84%; top:25%; width:14%; height:46%; }
.lounge-fire-unlit { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; clip-path:polygon(3% 48%,5% 45.5%,8% 44.5%,10.5% 46.5%,13.1% 49%,13.4% 64%,10% 67%,3.5% 65.5%); filter:brightness(.19) saturate(.5); transition:opacity 1s; pointer-events:none; }
.fire-burning .lounge-fire-unlit { opacity:0; }
.attic-telescope { left:70.3%; top:24.8%; width:13.2%; height:29.8%; }
.attic-book { left:77.3%; top:51%; width:14%; height:9.2%; }
.attic-trunk { left:23.7%; top:50.7%; width:17.1%; height:16.7%; }
.attic-lamp { left:89.1%; top:39.1%; width:8.7%; height:11%; }
.attic-hall { left:0%; top:66%; width:22%; height:28%; }
.attic-hall > span { top:22%; }
.attic-stars { position:absolute; left:53.5%; top:9.5%; width:20%; height:32.5%; border-radius:50% 50% 30% 30%; opacity:0; pointer-events:none; background:radial-gradient(ellipse,#bfd9e31c,transparent 72%); transition:opacity .6s; }
.attic-stars i { position:absolute; width:3px; height:3px; border-radius:50%; background:#f0e6c9; box-shadow:0 0 5px 1px #e5e9d866; animation:star-wink 3s ease-in-out infinite alternate; }
.stargazing .attic-stars { opacity:1; }
.story[data-current="5"].stargazing .story-background { filter:brightness(.8); transition:filter .6s; }
@keyframes star-wink { to { opacity:.15; transform:scale(.7); } }
@media(max-width:1100px) { .story-chapters { gap:15px; } .story-about-link { display:none; } }
@media(max-width:760px),(max-aspect-ratio:4/5) {
  .site-header > .brand-art { width:auto; height:auto; background:none; }
  .brand-wordmark { font-size:24px; }
  .hero.story.story-enhanced { height:360svh; }
  .story[data-inside="true"] .story-copy { top:calc(134px + var(--story-image-height) + 12px); bottom:auto; left:24px; width:calc(100% - 48px); }
  .story[data-inside="true"] h1,html[data-language="zh"] .story[data-inside="true"] h1 { font-size:clamp(27px,6.9vw,39px); line-height:1.18; }
  .story[data-inside="true"] .story-actions { bottom:126px; }
  .story-chapters { overflow-x:auto; scrollbar-width:thin; gap:17px; justify-content:flex-start; padding-bottom:4px; }
  .story-chapters button { flex:0 0 auto; }
  .story-chapters button[data-chapter="2"] { margin-left:0; }
  .room-entry > span { font-size:.75rem; padding:4px 7px; }
  .object-entry > span { font-size:.75rem; padding:4px 7px; opacity:.82; }
  .story[data-current="4"] .story-actions,.story[data-current="5"] .story-actions { flex-wrap:nowrap; }
}
@media(prefers-reduced-motion:reduce) { .story[data-inside="true"] .story-scene,.lounge-fire-unlit,.attic-stars,.room-entry > span,.object-entry > span { transition:none; } .attic-stars i { animation:none; } }

.story:not([data-current="5"]) .attic-stars i,.page-hidden .attic-stars i,.story-offscreen .attic-stars i { animation-play-state:paused; }
