/* Mobile shell */
.mobile-bar{
  display:none;
  position: fixed; left:0; right:0; bottom:0;
  height: var(--mobile-bar-h);
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 40;
}
.mobile-sheet{
  position: fixed; left:0; right:0; bottom: var(--mobile-bar-h);
  background: var(--c-surface);
  border-radius: var(--r-5) var(--r-5) 0 0;
  box-shadow: 0 -6px 24px rgba(0,0,0,.15);
  z-index: 45;
  max-height: 70vh;
  padding-bottom: env(safe-area-inset-bottom, 0);
  display:flex; flex-direction:column;
}
.sheet-handle{
  width: 36px; height: 4px; background: var(--c-border-strong);
  border-radius: 2px; margin: 8px auto 4px;
}
.sheet-body{ padding: var(--sp-4) var(--sp-5); overflow-y:auto; }

@media (max-width: 900px){
  .editor-body{ grid-template-rows: var(--toolbar-h) 1fr; }
  .editor-shell{ grid-template-columns: 1fr; grid-template-rows: 1fr; padding-bottom: var(--mobile-bar-h); }
  .editor-sidebar{ display:none; }
  .editor-properties{ display:none; }
  .mobile-bar{ display:flex; align-items:center; justify-content:space-around; }
  .mb-tool{
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:2px; padding: 6px 8px;
    background:transparent; border:0; color: var(--c-text-muted);
    font-size: 10px; font-weight: var(--fw-medium); cursor:pointer;
    border-radius: var(--r-2); min-width:56px; min-height:48px;
  }
  .mb-tool[aria-pressed="true"], .mb-tool:active{ color: var(--c-primary); background: var(--c-primary-soft); }
  .mb-tool span{ line-height:1; }
  .canvas-scroll{ padding: var(--sp-4) var(--sp-2); }
  .pdf-page{ box-shadow: 0 1px 4px rgba(0,0,0,.18); }
  .thumbs-panel{ left:0; width: 180px; }
}

/* Small phones */
@media (max-width: 420px){
  .editor-header{ padding: 0 var(--sp-2); gap: var(--sp-2); }
  .eh-filename{ max-width: 120px; }
  .eh-center{ gap:0; }
  .tool{ min-height:48px; font-size: 10px; }
}