/* One shared set of controls on desktop and mobile. Existing DOM/handlers are reused. */

.mobile-sheet{inset:auto 0 var(--keyboard-inset,0);margin:0 auto;width:min(640px,100%);max-width:100%;max-height:min(88dvh,var(--sheet-height,88dvh));padding:0;border:1px solid #71838b;border-bottom:0;border-radius:20px 20px 0 0;background:#12242dfc;color:#edf1ed;box-shadow:0 -18px 70px #0006;overflow:hidden}
.mobile-sheet[open]{display:flex;flex-direction:column}.mobile-sheet::backdrop{background:#06101988;backdrop-filter:blur(2px)}
.mobile-sheet-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #d8dfdc25}
.mobile-sheet h2{font-size:1.125rem;line-height:1.4;margin:0;font-weight:600}.mobile-sheet-header button{width:44px;min-height:44px;padding:0;font-size:1.6rem;border-radius:10px}
.mobile-sheet-body{padding:18px 16px max(22px,env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0;font-size:1rem;line-height:1.6}
.mobile-sheet input,.mobile-sheet select,.mobile-sheet textarea{font:inherit;color:#eff0eb;background:#20343f;border:1px solid #62747d;border-radius:8px;padding:10px;max-width:100%;min-width:0;min-height:44px;scroll-margin:20px}
.mobile-sheet button,.mobile-sheet summary{min-height:44px;font-size:.875rem}.mobile-sheet button{border-radius:8px}.mobile-sheet :focus-visible{outline:2px solid #e1c797;outline-offset:3px}
.mobile-sheet .brand-controls{display:block!important;position:static;width:100%;max-height:none;padding:0;border:0;background:none;overflow:visible}.mobile-sheet .brand-controls>summary{display:none}.mobile-sheet .brand-controls select{margin-top:0}.mobile-sheet .brand-controls p{font-size:.875rem}.mobile-sheet .brand-controls .six-model-options p{font-size:.875rem}
.mobile-sheet .bottom-workspace,.mobile-sheet .inside-controls{position:static!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;margin:0;padding:0;background:none!important;border:0!important;box-shadow:none;backdrop-filter:none;text-shadow:none}
.mobile-sheet .controls-topline{display:block;padding:0;margin:0 0 16px}.mobile-sheet .camera-presets{display:flex;flex-wrap:wrap;gap:6px}.mobile-sheet .camera-presets button{padding:8px 12px}.mobile-sheet #gesture-hint{display:none}.mobile-sheet .control-bar{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:18px;padding:0;background:none;border:0;border-radius:0;backdrop-filter:none}.mobile-sheet .control-group{flex-wrap:wrap;gap:8px;max-width:100%}.mobile-sheet .control-label{font-size:.75rem}.mobile-sheet .control-divider{display:none}.mobile-sheet .zone-group{width:100%;display:grid;grid-template-columns:1fr 1fr}.mobile-sheet .zone-group .control-label{grid-column:1/-1}.mobile-sheet .zone-group select{width:100%}
.mobile-sheet .inside-controls:not([hidden]){display:block!important}.mobile-sheet .inside-panel-bar,.mobile-sheet .inside-panel-appearance{display:none}.mobile-sheet #inside-panel-body{display:block!important;max-height:none;overflow:visible}.mobile-sheet .inside-row{display:flex;flex-wrap:wrap;gap:12px}.mobile-sheet .inside-row label{flex:1 1 120px;font-size:.875rem}.mobile-sheet .inside-row select{width:100%;max-width:none}.mobile-sheet .floor-row{display:flex;flex-wrap:wrap;gap:8px}.mobile-sheet #inside-floor{flex:1 1 100px;min-width:80px;padding:0}.mobile-sheet .floor-row>button{width:44px;height:44px}.mobile-sheet .floor-number input{width:64px}.mobile-sheet .inside-footnote{display:flex;flex-direction:column;gap:10px;font-size:.8125rem}.mobile-sheet .riverside-row{font-size:.875rem}.mobile-sheet[data-view-mode=inside] .bottom-workspace{display:none!important}
.mobile-extra-tools{display:flex;gap:8px;margin-top:20px;flex-wrap:wrap}.mobile-extra-tools button{width:48px;height:44px}.mobile-help{color:#c5d0d2;font-size:.875rem;margin:22px 0 0;line-height:1.7}.mobile-help summary{cursor:pointer}.mobile-sheet .six-model-notice,.mobile-sheet .regional-note{display:block;position:static!important;inset:auto;max-width:none;margin:12px 0;padding:0;border:0;background:none;font-size:.875rem;pointer-events:auto}
.comments-toolbar{display:flex;gap:8px;align-items:center;justify-content:space-between}.comments-toolbar p{margin:0;font-size:.9375rem}.comments-toolbar button{flex-shrink:0}.comments-connection{font-size:.875rem;line-height:1.7;color:#dfcda9;background:#d1b8890d;padding:12px;border:1px solid #cbb58d38;border-radius:10px}.comments-list:empty{display:none}.comments-list article{padding:15px 0;border-bottom:1px solid #ffffff22}.comments-list article>div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}.comments-list strong{font-size:.875rem;overflow-wrap:anywhere}.comments-list time{font-size:.75rem;color:#b0bdc3}.comments-list article>p{font-size:1rem;white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0}.comments-form label{display:block;font-size:.875rem;margin:16px 0}.comments-form input,.comments-form textarea{display:block;width:100%;margin-top:7px}.comments-form textarea{resize:vertical;min-height:110px}.comments-public,.comments-form [data-result]{font-size:.8125rem;color:#bbc7cd;line-height:1.6}.comments-submit{display:flex;justify-content:space-between;gap:12px;align-items:center}.comments-submit span{font-size:.75rem;color:#bec7cc}.comments-submit button{padding:10px 25px;background:#d5be94;color:#16252b;font-weight:600}.comments-submit button:disabled{background:#3e4b51;color:#b4bdc0;opacity:1}
@media all{
 .mobile-only{display:flex!important}.gallery{height:100dvh;min-height:0}
 .gallery>header{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));padding:0;gap:8px;z-index:31;align-items:center}
 .gallery .wordmark{gap:0;flex:none}.gallery .wordmark i,.gallery .wordmark b{display:none}.gallery .wordmark span{font-size:1.6rem;letter-spacing:0;padding:0;white-space:nowrap}.gallery .wordmark span::after{content:'단지';font: .8125rem Arial,sans-serif;margin-left:4px;color:#e4e9e9}
 .gallery .header-right{display:flex;gap:5px;align-items:stretch}.gallery .header-right>span,.gallery #reference-open,.gallery #about-open{display:none!important}
 .gallery .header-right #view-open{min-width:76px;min-height:44px;padding:8px;font-size:.875rem;border-radius:10px;background:#132731e8;white-space:normal;max-width:110px}
 .mobile-home,.mobile-entry{display:flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;padding:7px 9px;border:1px solid #889b9c75;border-radius:11px;background:#132731e8;color:#ece7da;text-decoration:none;font-size:.8125rem;backdrop-filter:blur(12px)}
 .gallery .header-right .mobile-entry{padding:5px 7px;font-size:.75rem}.gallery .header-right .mobile-home,.gallery .header-right .mobile-entry{flex-direction:column;gap:0;min-width:44px}.gallery .header-right .mobile-entry span{display:block!important;margin:0}.mobile-entry svg,.mobile-home svg{flex:none}.mobile-home span{font-size:.75rem}
 .gallery>.complex-nav,.gallery>#environment,.gallery>.editorial,.gallery>.brand-controls,.gallery>.bottom-workspace,.gallery>#inside-controls,.gallery>.six-model-notice,.gallery>.regional-note,.gallery>.keyboard-note,.gallery>.selection{display:none!important}
 #mobile-comments{position:absolute;top:var(--mobile-header-end,69px);left:max(12px,env(safe-area-inset-left));z-index:24}
 #mobile-settings{position:absolute;right:max(14px,env(safe-area-inset-right));bottom:calc(var(--mobile-footer-space,58px) + env(safe-area-inset-bottom));z-index:24}
 .mobile-pan{display:grid!important;position:absolute;left:max(12px,env(safe-area-inset-left));bottom:calc(var(--mobile-footer-space,54px) + env(safe-area-inset-bottom));grid-template:repeat(3,44px)/repeat(3,44px);gap:2px;z-index:24;touch-action:none;user-select:none;-webkit-user-select:none}
 .mobile-pan[hidden]{display:none!important}.mobile-pan button{padding:0;display:grid;place-items:center;border-radius:12px;background:#132731d9;border:1px solid #acbbb85e;touch-action:none;min-width:44px;min-height:44px}.mobile-pan [data-pan=up]{grid-area:1/2}.mobile-pan [data-pan=left]{grid-area:2/1}.mobile-pan [data-pan=right]{grid-area:2/3}.mobile-pan [data-pan=down]{grid-area:3/2}.mobile-pan .is-held{background:#bca982;color:#0e222d}
 .gallery .right-tools,body[data-view-mode=inside] .gallery .right-tools{top:auto;right:max(14px,env(safe-area-inset-right));bottom:calc(var(--mobile-footer-space,58px) + 60px + env(safe-area-inset-bottom));gap:4px;transform:none;z-index:23}.gallery .right-tools button{width:44px;height:44px}.gallery .right-tools #auto-orbit,.gallery .right-tools #label-toggle,.gallery .right-tools #fullscreen{display:none!important}
 .gallery>footer{bottom:env(safe-area-inset-bottom);left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));display:flex;align-items:flex-start;flex-direction:column;gap:1px;z-index:22;pointer-events:none;height:auto;padding:4px 0;background:none}.gallery>footer span,.gallery>footer button{font-size:.75rem;line-height:1.4;pointer-events:auto}.gallery>footer button{border:0;padding:2px 0;text-align:left;max-width:100%}
 .gallery .inside-heading,body[data-view-mode=inside] .gallery .inside-heading{top:calc(var(--mobile-header-end,69px) + 54px);left:14px;right:70px;max-width:calc(100% - 90px);width:auto}.gallery .inside-heading .eyebrow,.gallery .inside-heading .inside-hint{display:none}.gallery .inside-heading h2{font-size:1rem}.gallery .inside-heading p{font-size:.75rem;max-width:100%!important;line-height:1.5}.gallery .inside-heading .room-toggle{min-height:44px;font-size:.875rem}
 body[data-view-mode=inside] .gallery .inside-locator{top:auto;bottom:calc(var(--mobile-footer-space,58px) + 6px + env(safe-area-inset-bottom));left:12px;right:auto;width:110px;max-width:calc(100% - 130px)}
 .mobile-panel-open{overflow:hidden}.mobile-panel-open .gallery{pointer-events:none}.mobile-panel-open #architecture{pointer-events:none}.mobile-sheet{pointer-events:auto}
 .gallery>.error{inset:130px 14px auto;max-width:calc(100% - 28px);width:auto;transform:none;padding:14px;z-index:20;background:#13232fed;border:1px solid #bd957b66;border-radius:12px}.gallery>.error h2{font-size:1rem}.gallery>.error p{font-size:.875rem;line-height:1.6}.gallery>.error button,.gallery>.error a{font-size:.875rem}
}
@media(max-height:500px) and (max-width:1000px){
 .mobile-sheet{max-height:var(--sheet-height,96dvh)}.mobile-sheet-header{padding:4px 14px}.mobile-sheet-body{padding-top:12px}.mobile-pan{grid-template:repeat(3,44px)/repeat(3,44px);bottom:42px}.gallery .right-tools,body[data-view-mode=inside] .gallery .right-tools{bottom:100px;flex-direction:row}#mobile-settings{bottom:44px}.gallery>footer{max-width:70%}#mobile-comments{top:70px}.gallery .inside-heading,body[data-view-mode=inside] .gallery .inside-heading{top:65px;left:110px;right:160px}.gallery .inside-locator{display:none!important}
}

@media(max-width:700px){.gallery .wordmark span{font-size:clamp(1.6rem,5vw,1.9rem)}.gallery .wordmark span::after{font-size:.75rem}.gallery .header-right{min-width:0}.gallery .header-right #view-open{min-width:62px;max-width:100px}.gallery .header-right .mobile-entry{padding-inline:5px}}
@media all{.gallery>header{flex-wrap:wrap}.gallery .header-right{margin-left:auto}}

/* Desktop gets the same controls with roomier placement and a centered dialog. */
@media(min-width:1001px),(min-width:701px) and (min-height:501px){
 .gallery>header{left:28px;right:28px;top:22px;flex-wrap:nowrap}
 .gallery .wordmark span{font-size:2rem}
 .gallery .header-right{gap:10px}
 .gallery .header-right .mobile-home,.gallery .header-right .mobile-entry{flex-direction:row;gap:8px;padding:10px 16px;min-height:46px;font-size:.875rem}
 .gallery .header-right .mobile-home span{font-size:.875rem}
 .gallery .header-right #view-open{max-width:none;padding:10px 18px;min-height:46px}
 #mobile-comments{left:28px;top:calc(var(--mobile-header-end,80px) + 8px);font-size:.875rem}
 #mobile-settings{right:28px;padding:10px 18px;font-size:.875rem}
 .mobile-pan{left:28px;gap:5px;grid-template:repeat(3,46px)/repeat(3,46px)}
 .gallery .right-tools,body[data-view-mode=inside] .gallery .right-tools{right:28px;bottom:calc(var(--mobile-footer-space,58px) + 66px)}
 .gallery>footer{left:28px;right:28px}
 .mobile-sheet{inset:0;margin:auto;width:min(640px,calc(100vw - 64px));height:fit-content;max-height:min(84dvh,var(--sheet-height,84dvh));border:1px solid #71838b;border-radius:18px;box-shadow:0 24px 90px #0008}
 .mobile-sheet-header{padding:16px 22px}.mobile-sheet-body{padding:22px}
 .gallery .inside-heading,body[data-view-mode=inside] .gallery .inside-heading{left:28px;max-width:520px}
 body[data-view-mode=inside] .gallery .inside-locator{left:28px;width:150px}
}
body[data-screen=viewer] .usage-meta{display:none!important}

.render-quality{display:grid;gap:8px;margin:12px 0;padding:12px;border:1px solid #c6d5db33;border-radius:10px;font-size:14px}.render-quality select{width:100%;min-height:44px;color:#edf1ed;background:#172d38;border:1px solid #c6d5db55;border-radius:6px;padding:8px;font-size:16px}.render-quality p{margin:0;line-height:1.5;font-size:14px}.render-quality-status{position:absolute;top:calc(var(--mobile-header-end,80px) + 6px);left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);margin:0;padding:7px 12px;border-radius:16px;background:#10212ee8;color:#edf1ed;font-size:13px;line-height:1.4;text-align:center;pointer-events:none;z-index:5}.render-quality-status[hidden]{display:none}

body[data-yoonseul] .wordmark span::after{content:'윤슬자이'}
body[data-yoonseul] #mobile-brand,body[data-yoonseul] #mobile-comments{display:none!important}

body[data-yoonseul] #usage-share,body[data-yoonseul] #usage-feedback{display:none!important}
