/* Preserve full-resolution assets; adapt controls to touch and safe areas. */
html{ -webkit-text-size-adjust:100%; }
.model-stage.immersive,#photo-dialog,#tour-dialog,#knowledge-dialog{height:100vh;height:100dvh}
.gallery-switch{top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
.model-bottom{bottom:max(12px,env(safe-area-inset-bottom))}
.photo-top,.tour-header,.knowledge-top{padding-top:max(12px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
.photo-caption{padding-bottom:max(12px,env(safe-area-inset-bottom))}
.tour-frame-wrap{padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
#knowledge-scroll{padding-bottom:max(24px,env(safe-area-inset-bottom));overscroll-behavior:contain}
#panel-options{overscroll-behavior:contain}
#project-photo{touch-action:pan-y pinch-zoom}
button,a,input,select{ -webkit-tap-highlight-color:transparent; }
@media(pointer:coarse){
 .panel-hotspot,.model-bottom button,.model-bottom>a,.gallery-switch a,.photo-actions button,.tour-actions button{min-height:44px}
 .model-bottom>a{display:inline-flex;align-items:center}
 .panel-hotspot{max-width:70vw;white-space:normal;text-align:center}
}
@media(max-width:700px){
 .gallery-switch{left:12px;right:12px;justify-content:center}
 .gallery-switch a{font-size:14px;padding:11px 12px;text-align:center;white-space:normal;flex:1}
 .model-stage{min-height:360px;min-height:min(520px,calc(100svh - 90px))}
 .model-bottom{width:calc(100% - 24px);padding:10px;gap:8px}
 .model-bottom p{max-width:none;font-size:14px;flex-basis:100%}
 .model-bottom button{padding:10px 12px}
 .photo-top,.tour-header{flex-wrap:wrap;gap:8px;min-height:0;padding-bottom:8px}
 .photo-top>div:first-child,.tour-header>div:first-child{min-width:0;flex:1}
 .photo-top h2,.tour-header h2{font-size:20px;overflow-wrap:anywhere}
 .photo-actions,.tour-actions{width:100%;justify-content:flex-end;gap:6px;flex-wrap:wrap}
 .photo-actions button,.tour-actions button{padding:9px 12px;font-size:14px}
 .photo-step{width:44px;height:52px}.photo-previous{left:max(6px,env(safe-area-inset-left))}.photo-next{right:max(6px,env(safe-area-inset-right))}
 .photo-caption{padding-left:12px;padding-right:12px;gap:8px}.photo-caption p{max-height:3em;overflow:auto}
 .knowledge-top{gap:8px;flex-wrap:wrap}.knowledge-top h2{font-size:22px}
}
@media(max-width:360px){.panel-choices{grid-template-columns:1fr}.panel-choice{min-height:140px}.header nav{flex-wrap:wrap}}
@media(orientation:landscape) and (max-height:550px){
 .model-stage{height:100svh;min-height:300px}
 .model-bottom{padding:6px 10px;flex-wrap:nowrap;width:calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right))}
 .model-bottom p{display:none}.model-bottom button{padding:8px 12px}
 .photo-top,.tour-header{flex-wrap:nowrap;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:6px}
 .photo-actions,.tour-actions{width:auto;flex-wrap:nowrap}
 .photo-top p,.tour-header p{display:none}.photo-top h2,.tour-header h2{font-size:18px}
 .photo-caption{padding-top:6px;padding-bottom:max(6px,env(safe-area-inset-bottom))}
}

/* Gallery navigation stays with the studio wordmark on every screen. */
.header{flex-wrap:wrap;column-gap:24px;row-gap:12px;padding-block:16px}
.header>.gallery-switch{position:static;inset:auto;z-index:auto;flex:0 1 auto;margin-left:auto;box-shadow:none;gap:4px;padding:5px}
.header>.gallery-switch a{padding:10px 14px;min-height:44px;font-size:14px;display:flex;align-items:center;justify-content:center;white-space:nowrap}
.header>nav[aria-label="Ana gezinme"]{margin-left:auto}
@media(max-width:1000px){.header>nav[aria-label="Ana gezinme"]{width:100%;justify-content:flex-end}}
@media(max-width:600px){.header>.gallery-switch{width:100%;order:3;margin-left:0;justify-content:center}.header>.gallery-switch a{flex:1;white-space:normal;text-align:center}.header>nav[aria-label="Ana gezinme"]{width:auto}.header{column-gap:12px}}
.model-bottom{display:none!important}
