/* Pastegram Mobile V51: layout recovery. This file is intentionally loaded last.
   Desktop styles are not modified. */
@media (max-width:900px) {
  html,body {width:100%!important;max-width:100%!important;overflow:hidden!important;}
  body {display:flex!important;flex-direction:column!important;position:fixed!important;inset:0!important;top:var(--mobile-visible-top,0px)!important;height:var(--mobile-visible-height,100dvh)!important;min-height:0!important;margin:0!important;background:var(--bg,#f3f7ff)!important;}
  body>header {position:relative!important;top:auto!important;display:flex!important;flex:0 0 54px!important;height:54px!important;min-height:54px!important;padding:5px 9px!important;gap:5px!important;overflow:visible!important;z-index:40!important;background:var(--surface,#fff)!important;}
  header .brand {min-width:0!important;flex:0 1 auto!important;gap:5px!important;}
  header .brand img {width:27px!important;height:27px!important;flex-shrink:0!important;}
  header .brand span {font-size:12px!important;white-space:nowrap;max-width:112px!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  header .brand small,header .pill {display:none!important;}
  header .top-actions {display:flex!important;gap:3px!important;min-width:0!important;margin-left:auto!important;justify-content:flex-end!important;flex-wrap:nowrap!important;}
  header .top-actions button,header .top-actions summary {min-height:34px!important;height:34px!important;padding:5px 7px!important;border-radius:10px!important;font-size:11px!important;}
  header .top-actions #save-current-header,header .top-actions #projects-open,header #file-menu,header .editor-faq {display:none!important;}
  header .top-actions .mobile-preview-trigger {display:inline-flex!important;align-items:center!important;gap:4px!important;background:var(--tint,#f1f5fa)!important;}
  header .top-actions .mobile-preview-trigger svg {width:15px;height:15px;}
  header #export-open {background:#147df5!important;color:white!important;min-width:35px!important;}
  header #export-open span {display:inline!important;font-size:10px!important;}
  body>main,body.panel-open>main,body.properties-open>main,body.sheet-expanded>main {position:relative!important;display:block!important;flex:1 1 0!important;width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:7px 7px 89px!important;overflow:hidden!important;box-sizing:border-box!important;}
  #top-tools,#tools {display:none!important;}
  #workspace,body.panel-open #workspace,body.properties-open #workspace {position:relative!important;display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;grid-column:auto!important;grid-row:auto!important;padding:0!important;margin:0!important;border-radius:18px!important;background:var(--surface,#fff)!important;border:1px solid var(--line,#dae2ef)!important;overflow:hidden!important;box-shadow:0 8px 24px #12243b12!important;}
  #workspace .workspace-heading {flex:0 0 34px!important;height:34px!important;min-height:34px!important;padding:5px 9px!important;display:flex!important;align-items:center!important;gap:5px!important;}
  #workspace .workspace-heading #doc-name {font-size:11px!important;max-width:50%!important;}
  #workspace #stage {position:relative!important;display:flex!important;flex:1 1 0!important;min-height:0!important;width:100%!important;align-items:center!important;justify-content:center!important;overflow:auto!important;padding:8px!important;box-sizing:border-box!important;background:repeating-conic-gradient(#f6f9ff 0% 25%,#ecf1f8 0% 50%) 50% / 18px 18px!important;}
  #stage .canvas-container {flex-shrink:0!important;max-width:none!important;box-shadow:0 5px 18px #18243d18!important;}
  #workspace .zoom-bar {display:flex!important;flex:0 0 36px!important;align-self:center!important;height:36px!important;min-height:36px!important;max-height:36px!important;margin:5px auto 7px!important;padding:3px 7px!important;border-radius:999px!important;background:#1e2a43!important;gap:7px!important;}
  .zoom-bar button {min-height:28px!important;height:28px!important;padding:3px 8px!important;color:#fff!important;}
  #photo-strip {display:none!important;}
  #mobile-create-dock,body.panel-open #mobile-create-dock,body.properties-open #mobile-create-dock {position:absolute!important;left:7px!important;right:7px!important;bottom:7px!important;top:auto!important;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:70px!important;width:auto!important;height:74px!important;min-height:74px!important;max-height:74px!important;padding:3px!important;gap:2px!important;margin:0!important;z-index:20!important;background:var(--surface,#fff)!important;border:1px solid var(--line,#dae2ef)!important;border-radius:18px!important;box-shadow:0 7px 22px #16243a20!important;box-sizing:border-box!important;}
  #mobile-create-dock button {position:static!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;min-width:0!important;min-height:0!important;width:100%!important;height:66px!important;padding:5px 2px!important;gap:4px!important;border:0!important;border-radius:13px!important;background:transparent!important;color:var(--ink,#17233d)!important;font-size:9px!important;font-weight:600!important;box-sizing:border-box!important;}
  #mobile-create-dock button svg {display:block!important;width:20px!important;height:20px!important;flex-shrink:0!important;}
  #mobile-create-dock button span {font-size:9px!important;line-height:1.1!important;white-space:nowrap!important;}
  #mobile-create-dock [data-mobile-action=upload] {background:#147df5!important;color:#fff!important;}
  #mobile-create-dock [data-mobile-action=adjust] {background:#e8f2ff!important;color:#126be0!important;}
  #quick-sidebar,#sidebar,body.panel-open #quick-sidebar,body.properties-open #sidebar {position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:8px!important;display:none!important;width:auto!important;height:min(53dvh,490px)!important;min-height:180px!important;max-height:min(53dvh,490px)!important;padding:14px!important;margin:0!important;z-index:60!important;overflow-x:hidden!important;overflow-y:auto!important;border:1px solid var(--line,#dae2ef)!important;border-radius:22px!important;background:var(--surface,#fff)!important;box-shadow:0 -8px 42px #10223c36!important;box-sizing:border-box!important;}
  body.panel-open #quick-sidebar {display:block!important;}
  body.properties-open #sidebar {display:block!important;}
  body.properties-open #quick-sidebar {display:none!important;}
  #quick-sidebar .side-title,#sidebar>.side-title {position:sticky!important;top:-14px!important;display:flex!important;align-items:center!important;padding:9px 1px!important;margin:0 0 8px!important;z-index:5!important;background:var(--surface,#fff)!important;}
  #quick-sidebar .side-title h1,#sidebar>.side-title h2 {margin-right:auto!important;font-size:16px!important;}
  #mobile-tool-picker {width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;height:min(80dvh,620px)!important;max-height:80dvh!important;border-radius:24px!important;}
  .mobile-picker-grid {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;}
  .mobile-picker-grid button {min-height:78px!important;border-radius:14px!important;}
  #object-toolbar {max-width:calc(100% - 12px)!important;overflow-x:auto!important;border-radius:12px!important;}
  input,select,textarea {font-size:16px!important;}
}
@media(max-width:420px){header .top-actions .mobile-preview-trigger span,header #export-open span{display:none!important;}header .top-actions #redo{display:none!important;}header .brand span{max-width:90px!important;}}
@media(max-width:900px) and (max-height:480px){body>main,body.panel-open>main,body.properties-open>main{padding-bottom:65px!important;}#mobile-create-dock{height:55px!important;min-height:55px!important;max-height:55px!important;grid-template-rows:50px!important;}#mobile-create-dock button{height:48px!important;}#mobile-create-dock button svg{height:16px!important;width:16px!important;}#mobile-create-dock button span{font-size:9px!important;}}
