/* v1.0.1 mobile-only corrections; existing desktop layout and 3D materials stay intact. */
.mobile-zoom-readout{display:none}
.preview-dialog:not([open]){display:none}
.preview-dialog[open]{position:fixed;inset:0;top:var(--view-top,0px);bottom:auto;display:flex;flex-direction:column;width:100%;max-width:none;height:var(--app-height,100dvh);max-height:none;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);border:0;border-radius:0;background:#f3f7f7;overflow:hidden}
.preview-dialog::backdrop{background:#18343c}
.preview-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;flex:0 0 52px;padding:4px 12px;border-bottom:1px solid #bfd6d7}
.preview-dialog-head h2{font-size:16px;line-height:1.3;margin:0;letter-spacing:0}
.preview-dialog-head button{min-height:44px;background:#008391;border-color:#008391;color:white;font-size:15px;font-weight:600}
#previewHost{display:flex;flex:1;min-height:0}
.preview-placeholder{flex:0 0 auto;width:100%}
@media(max-width:800px),(max-width:1000px) and (max-height:550px) and (orientation:landscape){
 html,body{height:100%;height:var(--app-height,100dvh);overflow:hidden}
 body{position:fixed;top:var(--view-top,0px);left:0;right:0;display:flex;flex-direction:column}
 .color-strip{height:3px;flex:0 0 3px}
 header{height:52px;min-height:52px;flex:0 0 52px;padding:0 8px;gap:4px}
 .brand{gap:4px}.brand-icon{width:27px;height:27px;flex-basis:27px;font-size:19px;border-radius:7px}.brand-word{font-size:18px}
 .brand-word small,.header-note,.help-label,#projectStatus,.hero,footer{display:none}
 .file-actions{display:flex;gap:4px;margin-left:auto}.file-actions button{font-size:14px;min-height:44px;padding:8px}
 header #help{height:44px;min-width:40px;padding:4px;background:#e6f1f1;color:#1c5b63;border-radius:8px}.help-mark{font-size:19px}
 .project-toast{top:58px;right:8px;max-width:calc(100% - 16px);font-size:14px}
 main#studio{display:flex;flex:1;min-height:0;flex-direction:column;gap:0;width:100%;max-width:none;padding:0;margin:0;overflow:hidden}
 .workspace{position:relative;top:auto;align-self:stretch;flex:0 0 auto;width:100%;padding:0 8px 4px;border-bottom:1px solid #bfd6d7;background:#f3f7f7}
 .workspace-title{height:24px;min-height:24px;margin:0;gap:4px}.workspace-title h2{font-size:13px}.tiny-mark{width:9px;height:9px}.version{font-size:12px}
 .stage-shell{border-radius:8px}
 #stage{height:clamp(48px,calc(var(--app-height,100dvh) - 396px),260px)}
 .stage-top{top:7px;left:8px;right:8px;gap:5px;align-items:start}.mode-badge{font-size:12px;padding:4px 5px;line-height:1.3}
 .stage-top>span:last-child{font-size:12px;padding:4px 5px;white-space:nowrap}
 .stage-bottom{left:8px;right:8px;bottom:7px;gap:5px;font-size:12px}.stage-bottom #gestureLabel{display:none}
 .mobile-zoom-readout{display:block;font-size:12px;order:2;color:#e9f4f5}
 .selection-info{left:8px;right:8px;bottom:28px;max-width:calc(100% - 16px);font-size:12px;padding:3px 5px}
 .workspace>.viewbar,.workspace>.move-toolbar,.workspace>.move-status,.workspace>.footnote,.workspace>.tip-strip{display:none}
 .mobile-preview-tools{display:grid;grid-template-columns:minmax(64px,1fr) 44px 44px 44px 58px;gap:4px;margin:5px 0 0;align-items:center}
 .mobile-preview-tools select{min-width:0;margin:0;min-height:44px;height:44px;padding:6px 7px;font-size:16px;background:white}
 .mobile-preview-tools button{display:block;min-width:0;height:44px;min-height:44px;padding:5px;font-size:14px}
 aside#settings{flex:1;min-height:240px;width:100%;align-self:stretch;margin:0;border:0;border-radius:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding-top:56px;background:white;box-shadow:none;padding-bottom:env(safe-area-inset-bottom)}
 .tabs{position:sticky;top:0;z-index:6;background:#edf4f4}.tabs button{font-size:14px;min-height:50px;gap:2px;padding:4px}.tabs button>span{font-size:11px}
 .control-section{padding:16px;min-height:0}.control-section label{font-size:14px}.control-section select,.control-section input[type=text]{font-size:16px;min-height:46px}
 .hint,.footnote,#status,#optionStatus{font-size:13px;line-height:1.65}.toggle-row small{font-size:13px}.option-card{font-size:15px;min-height:46px}
 .panel-map button{font-size:15px;min-width:44px}.control-section input[type=range]{height:44px}.reset-section{padding:12px 16px}.reset-section button{font-size:14px}.reset-section span{font-size:12px}
 body[data-keyboard=true] .workspace{display:none}body[data-keyboard=true] main#studio{flex-direction:column}body[data-keyboard=true] aside#settings{width:100%;flex:1;min-height:0}
 body[data-short=true] .workspace-title,body[data-short=true] .stage-shell{display:none}
 .preview-dialog #previewHost>.workspace{position:relative;display:flex;flex-direction:column;flex:1;width:100%;min-height:0;height:100%;padding:8px;border:0}
 .preview-dialog .workspace-title{display:none}.preview-dialog .stage-shell{display:block;flex:1;min-height:0}
 .preview-dialog #stage{height:100%;min-height:0}
 .preview-dialog .mobile-preview-tools{flex:0 0 44px;grid-template-columns:minmax(64px,1fr) 44px 44px 44px}
 .preview-dialog #expandPreview{display:none}
}
@media(max-width:1000px) and (max-height:550px) and (orientation:landscape){
 main#studio{flex-direction:row}.workspace{display:flex;flex-direction:column;flex:0 0 58%;width:58%;height:100%;min-height:0;border-bottom:0;border-right:1px solid #bfd6d7;padding-bottom:6px}
 .workspace-title{flex:0 0 24px}.stage-shell{flex:1;min-height:0}#stage{height:100%;min-height:0}.mobile-preview-tools{flex:0 0 44px}
 aside#settings{width:42%;flex:1;min-height:0}.stage-bottom{display:flex}.selection-info{bottom:28px}
 .preview-placeholder{flex:0 0 58%;width:58%;height:100%!important}
}
