@font-face { font-family: 'UglyHandwriting'; src: url('assets/fonts/uglyhandwriting.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
:root { color-scheme: light; background: #7298c6; color: #19324c; font-family: Arial, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #ffda85; outline-offset: 5px; }
[hidden] { display: none !important; }
#scene { position: fixed; inset: 0; overflow: hidden; isolation: isolate; touch-action: none; background: #7298c6; }
#facade, #poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#facade { opacity: 0; transition: opacity .5s; }
#poster { object-fit: contain; opacity: .65; }
body[data-ready="true"] #facade { opacity: 1; }
body[data-ready="true"] #poster { visibility: hidden; }
#loading, #load-error { position: absolute; z-index: 10; left: 50%; top: 47%; transform: translate(-50%,-50%); padding: 1.2rem 1.6rem; background: #f9f3e8ed; border: 1px solid #ffffffa6; border-radius: 3px; min-width: 14rem; text-align: center; font-size: 1rem; }
#loading span { display: block; margin-bottom: .8rem; }
progress { width: 100%; height: 4px; accent-color: #245eb0; }
#load-error button { background: none; border: 0; border-bottom: 1px solid; color: inherit; padding: .4rem; }
#intro { position: absolute; z-index: 2; left: max(2rem,5vw); bottom: 7vh; pointer-events: none; color: #fff8e7; text-shadow: 0 2px 14px #24364780; transition: opacity .25s; }
#intro { font-family: 'UglyHandwriting', cursive; }
#intro p { font-size: clamp(1.2rem,1.6vw,1.65rem); line-height: 1.2; margin: 0 0 .5rem; }
#intro h1 { font-weight: 400; font-size: clamp(2.6rem,4.8vw,5rem); letter-spacing: 0; line-height: 1.08; margin: 0; }
#floor-caption { position: absolute; top: max(1.25rem,env(safe-area-inset-top)); left: 1.5rem; font: 500 .9rem/1.4 Arial,"Microsoft Yahei",sans-serif; letter-spacing: .12em; color: #fff7e8; background: #183453b8; padding: .5rem .85rem; border-radius: 2px; }
.stair-arrow { position: absolute; z-index: 5; transform: translate(-50%,-50%); width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid #fcf3d9cf; border-radius: 50%; background: #203c5ced; color: #fff7e5; box-shadow: 0 3px 14px #142c4b40; font: 400 29px/1 Georgia,serif; }
.stair-arrow span { transition: transform .2s; }
.stair-arrow:hover:not(:disabled) span { transform: translateY(-3px); }
.stair-arrow:disabled { opacity: .45; }
.stair-arrow[data-climbing="true"] { border-style: dashed; }
#climb-hint { position: absolute; z-index: 4; transform: translate(-50%,0); white-space: nowrap; pointer-events: none; font-size: .88rem; color: #fff7e8; text-shadow: 0 1px 7px #12263e; }
#scene-tools { position: absolute; z-index: 4; right: 1.4rem; top: max(1.25rem,env(safe-area-inset-top)); display: flex; gap: .5rem; }
#scene-tools button, #restart { border: 1px solid #f8efd07a; background: #183453bd; color: #fff7e8; padding: .5rem .8rem; font-size: .88rem; border-radius: 2px; }
#scene-tools button[aria-pressed="true"] { background: #f5eadb; color: #183453; }
#restart { position: absolute; bottom: 5vh; right: 1.5rem; z-index: 5; }
.project-window { position: absolute; z-index: 2; border: 1px solid transparent; transition: border-color .2s,background .2s; color: #fff3d3; text-decoration: none; }
.project-window span { position: absolute; right: .7rem; bottom: .6rem; opacity: 0; padding: .3rem .5rem; background: #183453d0; font: .9rem/1.3 Georgia,serif; transition: opacity .2s; }
.project-window:hover, .project-window:focus-visible { border-color: #fff0c873; background: #e6ebf409; }
.project-window:hover span, .project-window:focus-visible span { opacity: 1; }
.project-window.is-current span { opacity: .85; }
.project-window.is-current span::after { content: ' · Enter ↗'; }
.floor-access { position: absolute; bottom: max(1rem,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: .15rem; background: #183453ad; padding: .3rem; border: 1px solid #f8efd04d; border-radius: 3px; }
.floor-access button { color: #fff7e5; background: transparent; border: 0; padding: .35rem .6rem; min-height: 34px; font: .88rem/1.4 Arial,"Microsoft Yahei",sans-serif; white-space: nowrap; }
.floor-access button[aria-current="true"] { background: #f8efd0; color: #173451; }
#project { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; background: #f4efdf; color: #263d55; padding: clamp(1.5rem,6vw,6rem); }
#project::backdrop { background: #263d55; }
.project-sheet { max-width: 76rem; margin: auto; }
.project-sheet header { text-align: right; }
#return { color: inherit; background: none; border: 0; border-bottom: 1px solid; padding: .5rem 0; font-size: 1rem; }
.project-sheet h2 { font-size: clamp(3rem,8vw,7rem); font-weight: 400; letter-spacing: -.05em; margin-top: 12vh; padding-bottom: .3em; border-bottom: 1px solid #718088; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fallback { position: fixed; bottom: 1rem; left: 1rem; padding: 1rem; background: #fff8e9; }
@media (max-width: 600px) {
 #intro { left: 1.3rem; bottom: 6rem; }
 #intro h1 { font-size: 2.6rem; }
 #floor-caption { left: .8rem; }
 #scene-tools { right: .8rem; max-width: calc(100% - 6.5rem); flex-wrap: wrap; justify-content: flex-end; }
 #scene-tools button { padding: .5rem .6rem; }
 .floor-access button { padding: .35rem .5rem; }
 #restart { bottom: 5rem; right: 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; } }
