/* Preserve layout geometry; only the writing panel responds to the keyboard. */
.site-header .header-timeline a .timeline-label{color:var(--brand-white)!important;opacity:var(--timeline-opacity,.5);transform:scale(var(--timeline-scale,1));transform-origin:center;transition:transform 90ms linear,opacity 90ms linear;will-change:transform}
.site-header .header-timeline .timeline-home .timeline-label{opacity:1;transform:none}
.site-header .timeline-home .brand-logo{transform:scale(1.3);transform-origin:center}
#chatbot-panel .chatbot-disclaimer{flex:none;margin:0!important;padding:8px 18px 5px!important;font:400 11px/1.4 var(--brand-font)!important;color:var(--brand-muted)!important;text-align:center!important;text-align-last:center}
.chatbot-disclaimer a{color:inherit;text-decoration:underline;text-underline-offset:2px}
#chatbot-dock[data-mode=compact] .chatbot-disclaimer{display:none!important}
#chatbot-dock[data-mode=compact] #chatbot-panel #chatbot-form button{width:36px;height:36px;min-height:36px;aspect-ratio:1;border-radius:50%!important;display:grid;place-items:center;padding:0!important;font-size:23px;line-height:1}
#earth-autoplay-control{position:fixed;z-index:91;bottom:14px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;min-height:44px;padding:9px 14px;border:var(--brand-border-width) solid var(--brand-border);border-radius:24px;background:var(--brand-glass-plum);color:var(--brand-white);font:400 13px/1.2 var(--brand-font);backdrop-filter:var(--brand-glass-blur)}
#earth-autoplay-control[hidden]{display:none}
html.earth-autoplay-visible #page-scroll-indicator{visibility:hidden}
#earth-autoplay-control[data-state=paused] svg{animation:hud-breathe 2.4s ease-in-out infinite;color:var(--brand-primary)}
@keyframes hud-breathe{0%,100%{opacity:.25}50%{opacity:1}}
@media(min-width:901px) and (hover:hover){.furniture-card{overflow:hidden}.furniture-card:is(:hover,:focus-visible)>img{transform:scale(1.085)!important}}
@media(max-width:900px){
 #inizio .journey-pin{position:relative!important;inset:auto!important;height:var(--scene-height,100svh)!important;min-height:var(--scene-height,100svh)!important}
 #inizio .hero-glass{opacity:1!important;visibility:visible!important;transform:none!important}
 #chatbot-section{height:var(--scene-height,100svh)!important;min-height:var(--scene-height,100svh)!important;overflow-anchor:none}
 #chatbot-section-slot,html.chat-inline-writing #chatbot-section-slot{height:var(--scene-height,100svh)!important;min-height:0!important}
 html.chat-keyboard-open .site-header{visibility:hidden!important;pointer-events:none!important}
 html.chat-keyboard-open #chatbot-section-slot{height:var(--chat-inline-height)!important;top:var(--chat-inline-top,0px)!important;padding-top:8px!important;padding-bottom:8px!important}
 html.chat-keyboard-open #chatbot-panel .chatbot-header{min-height:44px!important;padding:4px 12px!important}
 html.chat-keyboard-open #chatbot-panel .chatbot-disclaimer{font-size:10px!important;padding:4px 12px!important}
 html.chat-keyboard-open #chatbot-panel #chatbot-form{padding-top:6px!important;padding-bottom:6px!important}
 #citta{--panel-bottom:calc(70px + env(safe-area-inset-bottom))!important;--mobile-panel-height:calc(var(--scene-height,100svh) - var(--panel-top) - var(--panel-bottom))!important}
 #citta .board-window{box-sizing:border-box!important;padding-bottom:0!important;overflow-y:hidden!important}
 #citta .board-track{box-sizing:border-box!important}
 #citta .project-board{box-sizing:border-box!important;padding-bottom:0!important}
 #earth-autoplay-control{bottom:max(12px,env(safe-area-inset-bottom));max-width:calc(100vw - 170px);font-size:11px;padding:6px 9px;gap:5px}
}
@media(prefers-reduced-motion:reduce){.site-header .timeline-label{transition:none!important;will-change:auto}#earth-autoplay-control{display:none!important}.furniture-card:is(:hover,:focus-visible)>img{transform:none!important}}
.hud-directions{display:none}
html.modal-open{overscroll-behavior:none}
dialog{overscroll-behavior:contain}
@media(min-width:901px){
 #page-scroll-indicator{width:68px;height:56px!important;min-height:56px!important;position:fixed}
 #page-scroll-indicator .hud-mouse{width:22px!important;height:32px!important;align-self:center}
 #page-scroll-indicator .hud-mouse>path:last-child{display:none}
 #page-scroll-indicator .hud-directions{position:absolute;inset:0;width:56px!important;height:56px!important;margin:auto;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;display:block}
 #page-scroll-indicator[data-input=keyboard] .hud-directions{display:none}
 #page-scroll-indicator .hud-directions path{opacity:0}
 #page-scroll-indicator:not(.is-input-active) .hud-directions [data-direction=down]{opacity:1;stroke:var(--brand-primary);animation:hud-breathe 2.5s ease-in-out infinite}
 #page-scroll-indicator[data-direction=up].is-input-active [data-direction=up],#page-scroll-indicator[data-direction=down].is-input-active [data-direction=down],#page-scroll-indicator[data-direction=left].is-input-active [data-direction=left],#page-scroll-indicator[data-direction=right].is-input-active [data-direction=right]{opacity:1}
 #page-scroll-indicator.is-input-active .hud-keys rect[data-direction]{fill:transparent}
 #page-scroll-indicator[data-direction=up].is-input-active .hud-keys rect[data-direction=up],#page-scroll-indicator[data-direction=down].is-input-active .hud-keys rect[data-direction=down],#page-scroll-indicator[data-direction=left].is-input-active .hud-keys rect[data-direction=left],#page-scroll-indicator[data-direction=right].is-input-active .hud-keys rect[data-direction=right]{fill:var(--brand-primary);fill-opacity:.85}
 #page-scroll-indicator:not(.is-input-active) .hud-keys rect[data-direction=down]{fill:var(--brand-primary);stroke:var(--brand-primary);animation:hud-breathe 2.5s ease-in-out infinite}
}
@media(prefers-reduced-motion:reduce){#page-scroll-indicator *{animation:none!important}}
@media(max-width:900px){#citta .urban-pin{height:var(--scene-height,100svh)!important;min-height:0!important;box-sizing:border-box}}
@media(max-width:900px){#earth-autoplay-control{left:calc(50% - 16px);max-width:calc(100vw - 190px)}#earth-autoplay-control svg{flex:none}}

/* Scene dimensions follow width/orientation changes, never browser chrome or rail labels. */
#chatbot-section-slot{height:var(--scene-height,100svh)}
@media(max-width:900px){
 :root,:is(#citta,#arredi,#palazzo-butera){--panel-top:110px!important;--mobile-panel-height:calc(var(--scene-height,100svh) - var(--panel-top) - var(--panel-bottom))!important}
 #inizio{height:var(--scene-height,100svh)!important;min-height:var(--scene-height,100svh)!important}
 :is(.urban-pin,.furniture-pin,.byat-pin,.journey-pin){height:var(--scene-height,100svh)!important}
 #approccio .approach-pin{min-height:var(--scene-height,100svh)}
 #arredi{--panel-bottom:calc(108px + env(safe-area-inset-bottom))!important}
 #arredi .gallery-window{flex:0 0 var(--mobile-panel-height)!important;scroll-behavior:auto}
 #arredi :is(.gallery-track,.furniture-lead,.furniture-card){min-height:0!important;box-sizing:border-box}
 #arredi .furniture-lead{justify-content:safe center}
 #arredi .furniture-card>img{height:100%!important;min-height:0;object-fit:contain}
 #arredi .mobile-carousel-hint{bottom:calc(62px + env(safe-area-inset-bottom));font-size:12px;gap:8px}
 #arredi .mobile-carousel-hint small{font-size:10px}
 #chatbot-section-slot{padding-top:110px!important}
 #chatbot-panel .chatbot-media-message>img{max-height:min(calc(var(--scene-height,100svh) * .48),440px)}
}
