/* Live 3D timelapse over a house-free landscape. Controls stay in HTML. */
#app.home{height:100svh;min-height:100svh}
#game-menu[data-page=title]{background:#d1dfb8;isolation:isolate}
#game-menu[data-page=title]>.menu-cloud,#game-menu[data-page=title]>.menu-hills{display:none}
.title-scene{position:absolute;inset:0;z-index:-1;background:url('./backgrounds/hills.webp') center/cover no-repeat;pointer-events:none}
#game-menu[data-page=title] .game-top{inset:max(16px,env(safe-area-inset-top)) 1.2% auto}
#game-menu[data-page=title] .wood-round{width:clamp(48px,5.1vw,84px);height:clamp(48px,5.1vw,84px);border-width:5px;border-radius:26%;background:linear-gradient(#ffdaa3,#dcaa67);box-shadow:0 7px #956b3f,0 12px 16px #5a61352b,inset 0 3px #fff4d1}
#game-menu[data-page=title] .wood-round .ui-icon{width:48%;height:48%;stroke-width:2.5}
#game-menu [hidden]{display:none!important}
#game-menu[data-page=title] .title-art{inset:11% .5% 7% 35%;z-index:1;pointer-events:none}
#game-menu[data-page=title] .intro-canvas{width:100%;height:100%;filter:drop-shadow(0 20px 15px #78844824)}
#game-menu[data-page=title] .title-content{position:absolute;inset:0;width:auto;transform:none;text-align:center;pointer-events:none}
#game-menu .title-content .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:-1px;padding:0;border:0;white-space:nowrap}
.nook-logo{position:absolute;left:5.2%;top:29.5%;width:35.7%;height:auto;filter:drop-shadow(0 6px 5px #68743d26)}
#game-menu[data-page=title] .title-spark{position:absolute;left:15.4%;top:18.5%;font-size:clamp(25px,2.6vw,44px);letter-spacing:.14em;color:#b7893c;-webkit-text-stroke:3px #fff2c5;paint-order:stroke fill;text-shadow:0 2px #cca75f}
.title-actions{position:absolute;left:8.4%;top:56.4%;width:26.6%;display:grid;gap:clamp(18px,2.6vh,27px);pointer-events:auto}
#game-menu .title-actions .play-button,#game-menu .title-actions .wood-button{position:static;inset:auto;transform:none;width:100%;margin:0;min-height:0;height:10.8vh;border:5px solid #fff4cd;border-radius:30px;font-size:clamp(24px,3.25vw,54px);font-weight:700;white-space:nowrap;gap:.5em;padding:.2em .4em;box-shadow:0 8px #a48250,0 15px 18px #5a613538,inset 0 4px #f9ffd26b}
#game-menu .title-actions .play-button{background:linear-gradient(#b8d17e,#7e9f43);text-shadow:0 3px #5c7838}
#game-menu .title-actions .wood-button{height:9.8vh;font-size:clamp(19px,2vw,34px);background:linear-gradient(#ffdda7,#eab87b);color:#6f441b;box-shadow:0 8px #a87844,0 15px 18px #5a613538,inset 0 4px #fff1c5}
#game-menu .title-actions .ui-icon{width:1em;height:1em;stroke-width:2.3}
#game-menu .title-actions .play-button .ui-icon{fill:currentColor;stroke-width:1}
/* A fixed two-row grid avoids a long list pushing the miniature out of view. */
.house-grid-nav{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;align-items:center;gap:8px;width:min(440px,100%);flex:none;padding:5px 0 6px}
.house-grid-nav .house-dots{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,40px);grid-auto-flow:row;gap:9px 7px;width:100%;max-width:none;padding:0;overflow:visible}
.house-grid-nav .house-dots button{width:100%;min-width:0;height:40px;transform:none;font-size:14px}
.house-grid-nav .level-page-arrow{width:34px;height:44px;border-radius:13px;min-width:0;border-width:2px;padding:0}
.house-grid-nav .level-page-arrow .ui-icon{width:19px;height:19px}
.house-grid-nav .level-page-arrow:disabled{visibility:hidden}
@media(max-width:700px) and (orientation:portrait){
 #game-menu[data-page=title] .game-top{inset:max(12px,env(safe-area-inset-top)) 14px auto}
 #game-menu[data-page=title] .wood-round{width:46px;height:46px;border-width:3px;border-radius:15px;box-shadow:0 5px #956b3f}
 .title-scene{inset:0;background:url('./backgrounds/hills.webp') center/auto 100% no-repeat}
 #game-menu[data-page=title] .title-art{inset:30% -2% 23%;z-index:1}
 .nook-logo{left:5%;top:18%;width:90%}
 #game-menu[data-page=title] .title-spark{display:block;left:0;right:0;top:12%;font-size:25px;letter-spacing:.2em;-webkit-text-stroke:2px #fff2c5}
 .title-actions{left:50%;top:auto;bottom:max(35px,calc(env(safe-area-inset-bottom) + 22px));width:min(310px,82%);transform:translateX(-50%);gap:18px}
 #game-menu .title-actions .play-button{height:63px;font-size:31px;border-radius:23px;border-width:4px}
 #game-menu .title-actions .wood-button{height:56px;font-size:21px;border-radius:22px;border-width:4px}
 .house-grid-nav{grid-template-columns:27px minmax(0,1fr) 27px;gap:6px;max-width:390px}
 .house-grid-nav .house-dots{grid-template-rows:repeat(2,36px);gap:8px 5px}
 .house-grid-nav .house-dots button{height:36px;font-size:13px;border-radius:11px}
 .house-grid-nav .level-page-arrow{width:27px;height:40px;border-radius:11px}
}
@media(max-height:550px) and (orientation:landscape){
 #game-menu[data-page=title] .title-spark{display:block;top:18%;font-size:24px}
 #game-menu .title-actions .play-button{height:12vh;font-size:26px;border-radius:22px;border-width:3px}
 #game-menu .title-actions .wood-button{height:11vh;font-size:20px;border-radius:20px;border-width:3px}
 #game-menu[data-page=title] .game-top{inset:10px 14px auto}
 #game-menu[data-page=title] .wood-round{width:44px;height:44px;border-width:3px}

}

/* Mobile title content uses display:contents, so the action group owns its layer. */
@media(max-width:700px){
 #game-menu[data-page=title] .title-actions{z-index:10;isolation:isolate}
}

/* The control block has the same footprint for every refuge ownership state. */
#game-menu .house-picker{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--scroll-thumb) transparent}
#game-menu .house-picker .house-stage{flex:1 1 0;min-height:110px}
#game-menu .house-stage img{inset:0;width:100%;max-width:100%;height:100%;max-height:none}
#game-menu .house-stage .house-lock{top:50%}
.house-controls{position:relative;display:flex;flex-direction:column;align-items:center;gap:14px;flex:none;width:min(480px,100%);padding:4px 0 7px}
.house-nav{display:flex;align-items:center;justify-content:center;gap:18px;height:48px;flex:none}
.house-controls .level-page-arrow{height:48px}
.house-nav .wood-round{position:static;width:48px;height:48px;margin:0;flex:none}
.house-nav .wood-round:hover,.house-grid-nav .level-page-arrow:hover{transform:none}
#game-menu .house-controls .house-actions{display:grid;justify-items:center;gap:10px;width:100%}
#game-menu .house-controls .house-meta{display:flex;align-items:center;justify-content:center;height:3em;line-height:1.35;margin:0;max-width:100%;padding:0 4px}
#game-menu .house-controls .house-actions .play-button{width:min(340px,100%);min-width:0;height:3.6em;min-height:3.6em;margin:0;padding:.4em .7em;line-height:1.2}
#game-menu .house-controls .house-feedback{position:absolute;bottom:calc(100% + 10px);left:50%;transform:translateX(-50%);width:min(380px,100%);margin:0;z-index:4;line-height:1.4}
.house-controls .house-grid-nav{padding:5px 0 8px;margin-top:3px}
.house-controls .house-dots{grid-template-rows:repeat(2,44px);gap:9px 7px}
.house-controls .house-dots button{position:relative;display:grid;place-items:center;height:44px;padding:0 0 7px;line-height:1}
.house-number{display:block;line-height:1}
.level-lock{position:absolute;bottom:4px;left:50%;transform:translateX(-50%);display:block;width:10px;height:10px;line-height:0;color:#73572f;pointer-events:none}
.level-lock .ui-icon{width:100%;height:100%;stroke-width:2.2}
.house-dots .active .level-lock{color:#67431e}
@media(max-width:700px){
 .house-controls{gap:12px}
 .house-nav{height:44px;gap:18px}
 .house-nav .wood-round,.house-controls .level-page-arrow{height:44px}
 .house-nav .wood-round{width:44px}
 .house-controls .house-dots{gap:8px 5px}
}

/* The title language picker clears the larger wooden header buttons. */
#game-menu[data-page=title] .language-picker{top:calc(clamp(48px,5.1vw,84px) + 14px)}
@media(max-width:700px) and (orientation:portrait){
 #game-menu[data-page=title] .language-picker{top:60px}
}
@media(max-height:550px) and (orientation:landscape){
 #game-menu[data-page=title] .language-picker{top:58px}
}

/* White studio artwork keeps its original colors on a warm, high-contrast plate. */
.cozy-dialog .studio-credit{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:28px;padding:20px 24px;background:#916233;border-radius:18px;color:#fff6e5;text-align:center}
.cozy-dialog .studio-credit span{font-size:12px;line-height:1.5}
.cozy-dialog .studio-credit img{display:block;width:min(220px,100%);height:auto}
