/* 手机工作台：画布保持完整宽度，功能与属性按需展开。 */
#mobile-controls, #mobile-workspace-status, #mobile-library-close, #mobile-panel-backdrop { display:none; }
.mobile-workspace #app { height:100%; height:100dvh; }
.mobile-workspace #app-bar { height:54px!important; min-height:54px!important; flex-wrap:nowrap!important; overflow-x:auto; overflow-y:hidden; padding:3px 8px!important; gap:4px; scrollbar-width:none; }
.mobile-workspace #app-bar>* { flex-shrink:0; }
.mobile-workspace #app-bar .brand { display:none; }
.mobile-workspace #app-bar .brand { margin:0 6px 0 0; gap:4px; }
.mobile-workspace #app-bar .brand-name { font-size:13px; }
.mobile-workspace #app-bar .brand-name em, .mobile-workspace #app-version, .mobile-workspace #tb-release-notes, .mobile-workspace #app-bar .bar-flex, .mobile-workspace .mode-switch { display:none; }
.mobile-workspace #app-bar .bar-btn { min-width:44px; padding:4px 6px; }
.mobile-workspace #param-bar { height:40px; padding:0 9px; overflow-x:auto; scrollbar-width:none; white-space:nowrap; }
.mobile-workspace #param-bar>* { flex-shrink:0; }
.mobile-workspace #mid { min-height:0; flex:1; }
.mobile-workspace #viewport { width:100%; height:100%!important; align-self:stretch!important; touch-action:none; }
.mobile-workspace #mobile-controls { display:flex; flex:none; padding:5px 4px calc(5px + env(safe-area-inset-bottom,0px)); background:#fff; border-top:1px solid var(--line); z-index:80; gap:3px; }
.mobile-workspace #mobile-controls button { flex:1; min-width:0; min-height:42px; border:0; background:#f3f7f4; border-radius:6px; font-size:12px; padding:4px 1px; color:#315d50; }
.mobile-workspace #mobile-controls button[aria-pressed=true] { background:#dcefe6; font-weight:700; color:#0b715a; }
.mobile-workspace #mobile-workspace-status { display:block; flex:none; padding:6px 10px; line-height:1.4; font-size:11px; color:#5f7970; background:#f6faf7; }
.mobile-workspace #element-dock, .mobile-workspace #intersection-panel, .mobile-workspace #road-network-panel, .mobile-workspace .plan-card-library { position:absolute; left:0; top:0; bottom:0; width:min(87vw,340px)!important; max-width:calc(100vw - 40px); flex:none; z-index:65; box-shadow:5px 0 22px #23453722; }
.mobile-workspace:not([data-mobile-library=true]) #element-dock, .mobile-workspace:not([data-mobile-library=true]) #intersection-panel, .mobile-workspace:not([data-mobile-library=true]) #road-network-panel, .mobile-workspace:not([data-mobile-library=true]) .plan-card-library { display:none!important; }
.mobile-workspace[data-mobile-library=true] #mobile-panel-backdrop { display:block; position:absolute; inset:0; z-index:60; border:0; background:#203b342b; }
.mobile-workspace[data-mobile-library=true] #mobile-library-close { display:block; position:absolute; right:4px; top:6px; width:36px; height:36px; z-index:70; border:1px solid #d9e5dc; border-radius:50%; background:white; font-size:23px; color:#37634e; }
.mobile-workspace #section-inspector, .mobile-workspace #plan-object-editor { position:absolute!important; left:0!important; right:0!important; top:auto!important; bottom:0!important; width:100%!important; height:51%; max-height:430px; min-height:min(150px,45%); flex:none; z-index:50; border:1px solid #d4e1d8; border-radius:12px 12px 0 0; box-shadow:0 -4px 18px #1f3e2c18; }
.mobile-workspace #section-inspector .prop-box { display:block; }
.mobile-workspace #section-inspector .prop-main { border-right:0; }
.mobile-workspace #section-inspector-close, .mobile-workspace #plan-object-editor header button { min-width:40px; min-height:36px; }
.mobile-workspace #dialog-host .dialog { left:8px!important; right:8px!important; top:8px!important; width:auto!important; min-width:0!important; max-width:none!important; max-height:calc(100% - 16px)!important; display:flex; flex-direction:column; }
.mobile-workspace .dialog-title, .mobile-workspace .dialog-actions { flex:none; }
.mobile-workspace .dialog-body { min-height:0; overflow:auto; padding:12px; overscroll-behavior:contain; }
.mobile-workspace .dialog-close { padding:6px 9px; }
.mobile-workspace .dialog-row { flex-wrap:wrap; }
.mobile-workspace .dialog-row input, .mobile-workspace .dialog-row select { min-width:0; max-width:100%; }
.mobile-workspace .dialog-actions { flex-wrap:wrap; padding:10px 12px; }
.mobile-workspace .dialog-actions button { min-height:38px; }
.mobile-workspace input, .mobile-workspace select, .mobile-workspace textarea { font-size:16px!important; }
.mobile-workspace button { touch-action:manipulation; }
.mobile-workspace .empty-start { max-width:100%; padding:16px; }
.mobile-workspace .empty-start p { font-size:20px; }
.mobile-workspace .empty-start small { font-size:12px; margin-bottom:18px; }
.mobile-workspace .dim-toolbar { max-height:calc(100vh - 160px); overflow:auto; }
.mobile-workspace .plan-card-notices { width:calc(100vw - 20px); right:10px; bottom:72px; }
.mobile-workspace .net-tools button { min-height:38px; }
.mobile-workspace .plan-card { touch-action:pan-y; }
.mobile-workspace:not([data-mobile-legend=true]) [data-plan-feature="graphical-legend"] { display:none; }
.mobile-workspace[data-mobile-legend=true] #mobile-legend { background:#dcefe6; color:#0b715a; }

.mobile-workspace #island-placement-panel { left:8px; right:8px; top:auto; bottom:64px; width:auto; max-height:45dvh; padding:10px; }
@media(max-height:500px) {
  .mobile-workspace .plan-card-head { padding:6px 12px; }
  .mobile-workspace .plan-card-search { min-height:32px; padding:5px 8px; margin-bottom:5px; }
  .mobile-workspace .plan-card-tabs { flex-wrap:nowrap; overflow-x:auto; padding-bottom:5px; flex-shrink:0; }
  .mobile-workspace .plan-card-tabs button { flex-shrink:0; white-space:nowrap; }
  .mobile-workspace .plan-card-info, .mobile-workspace .plan-card-status { display:none; }
  .mobile-workspace .plan-card-list { flex:1; }
}
