/* Phone layout only; the desktop controls and all artwork geometry stay shared. */
.mobile-editor-dock,.mobile-editor-sheet:not([open]){display:none}
@media(max-width:700px){
  .apparel-editor.mobile-editor-ready{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
  .apparel-editor main{padding:0 8px;gap:10px}
  .apparel-editor header{min-height:50px;padding:8px 12px;gap:10px}
  .apparel-editor header .brand img{width:125px}
  .apparel-editor header .header-title{font-size:10px;line-height:1.3;padding-left:10px}
  .apparel-editor .status{font-size:11px;margin:6px 8px;padding:7px 10px;min-height:0}
  .apparel-editor .panel.middle{width:100%;padding:10px 8px}
  .apparel-editor .preview-heading{margin-bottom:6px}
  .apparel-editor .preview-heading .eyebrow{display:none}
  .apparel-editor #title{font-size:13px;line-height:1.4}
  .apparel-editor.mobile-editor-ready .mobile-editor-shortcuts{display:none}
  .apparel-editor.mobile-editor-ready main>.left,.apparel-editor.mobile-editor-ready main>.right{display:none}
  .apparel-editor .editor-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:8px 0;padding:6px}
  .apparel-editor .editor-mode,.apparel-editor .editor-toolbar .history-tools{display:flex;gap:4px;flex-wrap:nowrap;margin:0;min-width:0}
  .apparel-editor .editor-toolbar button{flex:1;min-width:0;min-height:44px;padding:7px 3px;font-size:11px;justify-content:center}
  .apparel-editor .editor-toolbar .hint{display:none}
  .apparel-editor .editor-toolbar .ui-icon{width:13px;height:13px;margin-right:3px}
  .apparel-editor #cleanPreview{font-size:11px}
  .apparel-editor .view-switcher{margin:8px 0 0}
  .apparel-editor .view-switcher-label{font-size:11px;margin-bottom:5px}
  .apparel-editor #views button{min-height:52px;font-size:10px}
  .apparel-editor .preview-zoom-controls{margin:6px 0;gap:4px;justify-content:center}
  .apparel-editor .preview-zoom-controls button{font-size:10px;min-height:44px;padding:6px}
  .apparel-editor .preview-zoom-controls #previewZoomIn,.apparel-editor .preview-zoom-controls #previewZoomOut{width:36px;font-size:21px}
  .apparel-editor .preview-zoom-controls output{min-width:34px;font-size:11px}
  .apparel-editor .stage{height:clamp(310px,47svh,440px)}
  .apparel-editor .marking-dimensions{font-size:12px;margin:5px 0}
  .apparel-editor .preview-note{font-size:10px;margin:4px 0}
  .apparel-editor.mobile-editor-ready .mobile-editor-dock{display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:7px;position:fixed;z-index:50;bottom:0;left:0;right:0;padding:8px 10px calc(8px + env(safe-area-inset-bottom,0px));border-top:1px solid #e4ded8;background:#fff;box-shadow:0 -4px 18px #2b1b0710}
  .mobile-editor-dock button{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px 6px;min-width:0;min-height:52px;padding:6px;background:#fff8f1;border:1px solid #efd5bd;border-radius:10px;color:#7f3900;font-size:13px;font-weight:650;line-height:1.25}
  .mobile-editor-dock [data-mobile-panel=save]{background:#f58220;border-color:#f58220;color:#fff}
  .mobile-dock-icon{font-size:24px;line-height:1;font-weight:400}
  .mobile-dock-icon svg{display:block;width:23px;height:23px}
  .mobile-dock-label{max-width:100%;overflow-wrap:normal}.mobile-editor-dock [data-mobile-panel=product] .mobile-dock-label,.mobile-editor-dock [data-mobile-panel=save] .mobile-dock-label{font-size:12px}
  .mobile-editor-dock small{flex-basis:100%;font-size:11px;font-weight:600}
  .mobile-editor-dock button:focus-visible,.mobile-sheet-close:focus-visible{outline:2px solid #713800;outline-offset:2px}
  .mobile-sheet-open{overflow:hidden}
  .mobile-editor-sheet[open]{display:flex;flex-direction:column;position:fixed;inset:auto 0 0;width:100%;max-width:700px;margin:0 auto;max-height:85dvh;height:auto;padding:0;border:0;border-radius:18px 18px 0 0;background:#fff;color:#262626;box-shadow:0 -8px 40px #0003;overflow:hidden}
  .mobile-editor-sheet::backdrop{background:#1c202777}
  .mobile-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid #ece5df;flex-shrink:0;background:#fff}
  .mobile-sheet-header h2{font-size:16px;line-height:1.25;margin:0}
  .mobile-sheet-status{flex-shrink:0;margin:0;padding:10px 14px;background:#fff4e9;color:#663c1d;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
  .mobile-sheet-status[hidden]{display:none}
  .mobile-sheet-status[data-kind=error]{background:#fff0ed;color:#8f2219}
  .mobile-sheet-close{min-height:44px;max-width:50%;padding:8px 12px;border-color:#f58220;background:#fff4e9;color:#924100;font-size:12px;line-height:1.3;flex-shrink:0}
  .apparel-editor .mobile-editor-sheet>.panel{position:static;display:block;flex:0 1 auto;width:100%;margin:0;padding:14px 14px calc(20px + env(safe-area-inset-bottom,0px));border:0;border-radius:0;box-shadow:none;max-height:none;height:auto;overflow:auto;overscroll-behavior:contain;min-height:0;scrollbar-width:thin}
  .apparel-editor .mobile-editor-sheet>.right{display:flex}
  .mobile-editor-sheet #projectHeading,.mobile-editor-sheet #editorProductOptions>h2{display:none}
  .apparel-editor .mobile-editor-sheet .editor-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 14px}
  .apparel-editor .mobile-editor-sheet .editor-tabs button{min-height:54px;font-size:11px;line-height:1.35;padding:8px 3px}
  .apparel-editor .mobile-editor-sheet .upload-label{min-height:48px;margin:0 0 10px;padding:14px 8px}
  .apparel-editor .mobile-editor-sheet input:not([type=range]):not([type=checkbox]):not([type=file]),.mobile-editor-sheet select,.mobile-editor-sheet textarea{font-size:16px;min-height:44px}
  .mobile-editor-sheet input[type=range],.mobile-editor-sheet .range-track,.mobile-editor-sheet .range-track input{min-height:44px}
  .mobile-editor-sheet button{touch-action:manipulation}
  .mobile-editor-sheet .tool-actions button,.mobile-editor-sheet .wide,.mobile-editor-sheet .range-buttons>button{min-height:44px}
  .apparel-editor .mobile-editor-sheet .color-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .apparel-editor .mobile-editor-sheet .color-choice{min-height:58px;font-size:10px;padding:6px 2px}
  .apparel-editor .mobile-editor-sheet .color-chip{width:24px;height:24px}
  .apparel-editor .mobile-editor-sheet .print-choices button{min-height:60px;padding:12px}
  .mobile-editor-sheet [data-mobile-section=product] .delivery-tools{display:none}
  .mobile-editor-sheet [data-mobile-section=save] #editorProductOptions{display:none}
  .apparel-editor .mobile-editor-sheet .price-summary{flex-shrink:0;order:1;margin:12px 0 8px}
  .apparel-editor .mobile-editor-sheet .delivery-tools{order:2;display:flex;flex-direction:column;gap:8px}
  .apparel-editor .mobile-editor-sheet [data-mobile-section=product] .delivery-tools{display:none}
  .apparel-editor .mobile-editor-sheet .delivery-tools button{margin:0;min-height:48px;font-size:13px;padding:12px}
  .mobile-editor-sheet #finishOrder{order:0}
  .mobile-editor-sheet #checkoutStatus{order:3}.mobile-editor-sheet #projectReceipt{order:4}
  .mobile-editor-sheet #editorAdvanced{margin-top:16px}
  .mobile-editor-sheet summary{min-height:44px;padding:12px 0}
  .mobile-editor-sheet #editorGestureHint{margin:6px 0;font-size:11px}
}
