/* Mobile layout editing is a canvas with transient tools, not a compressed desktop toolbar. */
.mobile-editor-tools,.mobile-editor-inspect{display:none}
.mobile-editor-sheet:not([open]){display:none}
body.mobile-editor-sheet-open{overflow:hidden;overscroll-behavior:none}

@media(max-width:767px){
  .shell.view-editor .page{padding:8px 8px 0}
  .shell.view-editor .editor-toolbar,.shell.view-editor .editor-hint,.shell.view-editor .editor-workspace>.right-column,.shell.view-editor .editor-workspace .map-bottom,.shell.view-editor .page-footer{display:none}
  .shell.view-editor .editor-workspace{display:block;margin-top:6px}
  .shell.view-editor .editor-workspace>.floor-panel{border:0;border-radius:18px;overflow:hidden;box-shadow:0 1px 8px #28233e06}
  .shell.view-editor .editor-workspace .panel-heading{min-height:46px;padding:4px 10px;gap:6px;flex-wrap:nowrap}
  .shell.view-editor .editor-workspace .panel-title{gap:5px;min-width:0;flex-wrap:nowrap}
  .shell.view-editor .editor-workspace .panel-title h2{font-size:13px;white-space:nowrap}
  .shell.view-editor .editor-workspace .count-badge{font-size:10px;padding:3px 5px;white-space:nowrap}
  .shell.view-editor .editor-workspace .draft-badge{font-size:10px;white-space:nowrap;margin-left:auto;background:transparent;padding:0;color:var(--muted)}
  .shell.view-editor .editing{max-height:none;overflow:hidden;border-radius:0 0 18px 18px}
  .shell.view-editor .editing .floor-map{max-height:none}
  .shell.view-editor .mobile-editor-tools{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:3px;border-radius:15px;background:var(--surface,#fff);box-shadow:0 1px 7px #28233e06}
  .shell.view-editor .mobile-editor-category{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:44px;border:0;border-radius:12px;padding:8px 3px;font-size:13px;font-weight:550;color:var(--muted);background:transparent;touch-action:manipulation}
  .shell.view-editor .mobile-editor-category .icon{width:15px;height:15px;margin:0}
  .shell.view-editor .mobile-editor-category.is-selected,.shell.view-editor .mobile-editor-category[aria-expanded=true]{background:var(--purple-soft,#eeeafb);color:var(--purple,#7154d9)}
  .shell.view-editor .mobile-editor-category:not(:first-child)::after{content:'';width:4px;height:4px;margin:0 0 3px 3px;border-right:1.3px solid currentColor;border-bottom:1.3px solid currentColor;transform:rotate(45deg);opacity:.65}
  .shell.view-editor .mobile-editor-inspect{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:44px;min-width:44px;font-size:12px;color:var(--muted);padding:6px;border-radius:11px}
  .shell.view-editor .mobile-editor-inspect.has-selection{color:var(--purple);background:var(--purple-soft)}
  .shell.view-editor .mobile-editor-sheet{position:fixed;inset:auto 0 0;margin:0 auto;padding:0 0 max(14px,env(safe-area-inset-bottom));width:100%;max-width:620px;max-height:min(78dvh,680px);overflow:hidden;border:1px solid #ffffffb3;border-bottom:0;border-radius:24px 24px 0 0;background:var(--surface,#fff);color:var(--ink,#292637);box-shadow:0 -10px 50px #211b4022;overscroll-behavior:contain;animation:mobile-editor-enter .18s ease-out}
  .shell.view-editor .mobile-editor-sheet[open]{display:flex;flex-direction:column}
  .shell.view-editor .mobile-editor-sheet{bottom:var(--mobile-keyboard-inset,0px);max-height:min(78dvh,680px,calc(var(--mobile-visual-height,100dvh) - 16px))}
  .mobile-editor-sheet::backdrop{background:#17132d45}
  .mobile-editor-sheet-grip{width:34px;height:4px;flex-shrink:0;border-radius:4px;background:#d8d6df;margin:9px auto 1px}
  .mobile-editor-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 18px 14px;flex-shrink:0}
  .mobile-editor-sheet-heading h2{font-size:18px;line-height:1.4;letter-spacing:-.3px;font-weight:650}
  .mobile-editor-sheet-heading p{font-size:12px;color:var(--muted);line-height:1.5;margin-top:5px}
  .mobile-editor-sheet-close{min-height:44px;min-width:50px;flex-shrink:0;border-radius:12px;color:var(--purple);font-size:14px;font-weight:600;background:var(--purple-soft)}
  .mobile-editor-sheet-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow:auto;overscroll-behavior:contain;padding:0 18px 10px;min-height:0;-webkit-overflow-scrolling:touch}
  .shell.view-editor .mobile-editor-command{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-width:0;min-height:62px;padding:12px;border:1px solid #efedf4;border-radius:15px;background:color-mix(in srgb,var(--surface,#fff),var(--bg,#f6f6f9) 65%);font-size:14px;font-weight:550;text-align:left;white-space:normal;touch-action:manipulation}
  .shell.view-editor .mobile-editor-command .icon{width:19px;height:19px;flex-shrink:0;color:var(--purple)}
  .shell.view-editor .mobile-editor-command.is-selected{color:var(--purple);background:var(--purple-soft);border-color:color-mix(in srgb,var(--purple),transparent 76%)}
  .shell.view-editor .mobile-editor-command.is-destructive{color:#b55a65}
  .shell.view-editor .mobile-editor-sheet-body.is-inspector{display:block;padding:0 18px 12px}
  .shell.view-editor .mobile-editor-sheet .editor-inspector{border:0;border-radius:0;box-shadow:none;max-height:none;overflow:visible;padding:0;background:transparent}
  .shell.view-editor .mobile-editor-sheet .editor-inspector>h2{display:none}
  .shell.view-editor .mobile-editor-sheet .editor-inspector form>label,.shell.view-editor .mobile-editor-sheet .form-two label{margin-bottom:12px}
  .shell.view-editor .mobile-editor-sheet .editor-inspector input,.shell.view-editor .mobile-editor-sheet .editor-inspector select{font-size:16px;min-height:44px;border-radius:12px}
  .shell.view-editor .mobile-editor-sheet .editor-inspector .btn{min-height:44px;font-size:14px}
  .shell.view-editor .mobile-editor-sheet .editor-inspector .field-hint{font-size:11px;line-height:1.6;margin:12px 0}
  .shell.view-editor .mobile-editor-sheet .inspector-empty{padding:8px 0 14px}
  .shell.view-editor .mobile-editor-sheet .inspector-empty>span{width:44px;height:44px;margin-bottom:9px;border-radius:13px}
  .shell.view-editor .mobile-editor-sheet .layout-summary{margin:4px 0 14px}
  .shell.view-editor .mobile-editor-sheet .layout-summary>div{padding:9px}
  .shell.view-editor .mobile-editor-sheet .layout-summary strong{font-size:20px}
}
@media(min-width:481px) and (max-width:767px){
  .shell.view-editor .page{padding-inline:12px}
  .shell.view-editor .mobile-editor-tools{gap:7px}
  .shell.view-editor .mobile-editor-category{font-size:14px}
  .shell.view-editor .editor-workspace .panel-heading{padding-inline:14px}
}
@keyframes mobile-editor-enter{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.shell.view-editor .mobile-editor-sheet{animation:none}}
