/* Designer Core 0.4.396 — Product/Add/Settings mobile navigation, full-width mockup, no side thumbnails. Desktop unchanged. */
.fd-mobile-dock,.fd-mobile-shade,.fd-mobile-sheet-head{display:none}
@media (max-width:880px){
  :root{--fdm-safe:env(safe-area-inset-bottom,0px);--fdm-dock:68px;--fdm-checkout:69px}
  html,body{max-width:100%;overflow-x:clip}
  body{padding-bottom:calc(var(--fdm-dock) + var(--fdm-checkout) + var(--fdm-safe))}
  body.fd-checkout-open{padding-bottom:0}
  body.fd-mobile-drawer-open{overflow:hidden;overscroll-behavior:contain}
  .layout{display:block!important;min-height:0!important}
  /* Preserve the editor canvas, mockup zoom, print-area geometry and side switching. */
  .layout>.workspace{width:100%;padding:9px 8px 10px!important;min-height:0!important}
  .workspace>.stage{height:min(57dvh,540px,calc(100dvh - 400px))!important;min-height:240px!important;width:100%;max-width:100%;margin:0 auto}
  /* Phone canvas is approximately square. The garment itself now fills its width. */
  /* Fit the real garment + its print zone together; no geometry or cm changes. */
  .workspace>.stage>.zoom-scene{
    transform:translate(calc(-50% + var(--fd-mobile-fit-x,0px)),calc(-50% + var(--fd-mobile-fit-y,0px))) scale(var(--fd-mobile-fit-scale,1))!important;
    transform-origin:50% 50%;
  }
  @supports not (zoom: 1.5){
    .workspace>.stage>.zoom-scene{
      transform:translate(calc(-50% + var(--fd-mobile-fit-x,0px)),calc(-50% + var(--fd-mobile-fit-y,0px))) scale(calc(var(--fd-mobile-fit-scale,1) * var(--canvas-zoom,1)))!important;
    }
  }
  /* Product side tabs above the stage handle view switching.
     Only hide the duplicate side thumbnails on mobile; desktop retains them. */
  #fdOtherSidePreview{display:none!important}
  .workspace>.stage-footer{gap:6px;min-height:27px;padding:4px 3px 6px}
  .stage-footer .pill{font-size:10px;padding:5px 8px}
  .stage-footer .hint{font-size:10px}
  .stage-top.fd-toolbar-layout{grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important;align-items:center}
  .fd-toolbar-layout>.tabs,.stage-top>.tabs{box-sizing:border-box;width:100%;max-width:100%;min-width:0;display:flex;flex-wrap:nowrap;gap:3px;justify-self:stretch;padding:4px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
  .fd-toolbar-layout>.tabs{grid-column:1 / -1;grid-row:2}
  .stage-top>.tabs .tab{flex:1 0 auto;min-width:70px;max-width:calc(100% - 8px);overflow:hidden;text-overflow:ellipsis;min-height:39px;padding:8px 10px;font-size:10px;white-space:nowrap;letter-spacing:-.03em}
  .stage-top>.tabs .tab[hidden]{display:none!important}
  .fd-toolbar-layout>.fd-mode-switch{grid-column:1;grid-row:1;min-width:0}
  .stage-top .fd-toolbar-right{grid-column:2;grid-row:1;gap:4px}
  .fd-toolbar-right .stage-actions{display:flex}
  .fd-toolbar-right .stage-actions button{min-width:38px;min-height:38px;padding:5px!important}
  /* The real checkout control remains the single source of truth. */
  .workspace .workspace-checkout{position:fixed!important;z-index:490;left:8px;right:8px;bottom:calc(var(--fdm-dock) + var(--fdm-safe) + 2px);width:auto!important;max-width:560px;margin:0 auto!important;align-self:auto!important;min-height:60px!important;display:grid!important;grid-template-columns:minmax(110px,max-content) minmax(0,1fr)!important;gap:8px!important;padding:7px 9px!important;border:1px solid #e9e6e3!important;border-radius:15px!important;background:rgba(255,255,255,.97)!important;box-shadow:0 5px 22px rgba(0,0,0,.12)!important;backdrop-filter:blur(8px)}
  .workspace .workspace-checkout .price-line{min-height:43px!important;max-width:100%}
  .workspace .workspace-checkout #price{font-size:clamp(21px,5.8vw,31px)!important}
  .workspace .workspace-checkout .order-button{min-height:44px!important;height:auto;width:100%;margin:0!important;padding:8px 7px!important;font-size:clamp(11px,3.1vw,15px)!important;line-height:1.15}
  .workspace .workspace-checkout.catalog-pending{visibility:hidden}
  body.fd-checkout-open .workspace .workspace-checkout,
  body.fd-checkout-open .fd-mobile-dock{display:none!important}
  /* The two existing panels become bottom sheets, not copies of their controls. */
  .layout>.panel.left,.layout>.panel.right{position:fixed!important;left:0!important;right:0!important;top:auto!important;bottom:0!important;z-index:715!important;display:block!important;width:100%!important;max-width:100%!important;height:min(80dvh,730px)!important;max-height:calc(100dvh - 12px)!important;min-height:0!important;margin:0!important;padding:0 14px calc(18px + var(--fdm-safe))!important;border:0!important;border-radius:22px 22px 0 0!important;background:#fff!important;box-shadow:0 -15px 42px #1010193d;overflow-y:auto!important;overscroll-behavior:contain;visibility:hidden;pointer-events:none;transform:translateY(102%);transition:transform .22s ease,visibility .22s;scrollbar-gutter:stable}
  .layout>.panel.left.fd-mobile-sheet-open,.layout>.panel.right.fd-mobile-sheet-open{visibility:visible;pointer-events:auto;transform:translateY(0)}
  .layout>.panel.left .fd-mobile-sheet-head,.layout>.panel.right .fd-mobile-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:12;margin:0 -14px 12px;padding:14px 16px 11px;background:#fff;border-bottom:1px solid #eee;min-height:59px}
  .fd-mobile-sheet-title{color:#1f2227;font-size:16px;font-weight:850}
  .fd-mobile-sheet-close{display:grid;place-items:center;min-width:38px;min-height:38px;padding:0;border:0;background:#f4f4f4;border-radius:10px;font-size:24px;line-height:1;color:#444}
  .layout>.panel.left .left-tab-nav{margin:0 -14px 10px;padding:8px}
  .layout>.panel.left .left-fixed,.layout>.panel.left .left-tab-scroll{padding:0!important;overflow:visible!important;max-height:none!important}
  .layout>.panel.right .right-content{padding:0!important;overflow:visible!important}
  .layout>.panel.right .bottom-total{display:none!important}
  .layout>.panel .field input,.layout>.panel .field select,.layout>.panel .field textarea,
  .layout>.panel .text-tool-field input,.layout>.panel .text-tool-field select{min-height:43px}
  .layout>.panel .tool{min-height:57px}
  .fd-mobile-shade{display:block;position:fixed;inset:0;z-index:699;background:rgba(14,16,22,.58);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s,visibility .2s}
  body.fd-mobile-drawer-open .fd-mobile-shade{opacity:1;visibility:visible;pointer-events:auto}
  .fd-mobile-dock{position:fixed;left:0;right:0;bottom:0;z-index:550;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;align-items:center;min-height:var(--fdm-dock);padding:5px 8px calc(5px + var(--fdm-safe));background:#fff;border-top:1px solid #eceae7;box-shadow:0 -4px 16px rgba(0,0,0,.09)}
  .fd-mobile-dock-btn{min-width:0;min-height:55px;padding:6px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;border-radius:11px;background:transparent;color:#494a4f;font-size:10px;font-weight:800;line-height:1.15;white-space:nowrap}
  .fd-mobile-dock-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}
  .fd-mobile-dock-btn.is-active,.fd-mobile-dock-btn[aria-expanded="true"]{background:#fff0e8;color:#f2531c}
  .fd-mobile-dock-basket{position:relative;border:1px solid #ff653b;background:#fff;color:#292b32}
  .fd-mobile-dock-basket>svg{color:#e64a1b}
  .fd-mobile-dock-count{position:absolute;top:1px;left:calc(50% + 9px);min-width:15px;height:15px;padding:0 3px;border-radius:9px;background:#ff653b;color:white;font-size:9px;font-weight:800;line-height:15px;text-align:center}
  .fd-mobile-dock-count[hidden]{display:none!important}
  .fd-mobile-dock-basket .fd-mobile-dock-count{color:#17181d}
  .fd-mobile-dock-btn:focus-visible,.fd-mobile-sheet-close:focus-visible{outline:2px solid #ff653b;outline-offset:2px}
  body.fd-mobile-keyboard .fd-mobile-dock,body.fd-mobile-keyboard .workspace .workspace-checkout{display:none!important}
  .fd-mobile-sheet-anchor{scroll-margin-top:78px}
}
@media(max-width:700px){
  .top{height:61px!important;min-height:61px!important;padding:7px 10px!important;flex-wrap:nowrap!important;align-content:center!important;gap:4px!important}
  .fd-brand-cluster{width:auto!important;min-width:0;flex:1;gap:7px!important}
  .brand-home{gap:5px!important;min-width:0}
  .brand-home-back{font-size:0}
  .brand-home-back>span:not(.brand-home-arrow){display:none!important}
  .brand-home-arrow{font-size:22px}
  .brand-logo{height:35px!important;max-width:124px!important}
  .fd-top-constructor{font-size:12px!important;padding-left:7px!important}
  .top-actions{width:auto!important;min-width:0;justify-content:flex-end!important;gap:4px!important}
  .top-actions #fdOpenCart{display:none!important}
  .top-actions .fd-account-trigger{min-width:38px;height:38px;padding:7px!important}
  .workspace>.stage{height:min(55dvh,490px,calc(100dvh - 400px))!important;min-height:240px!important}
}
@media(max-width:360px){.fd-top-constructor{display:none!important}.stage-top>.tabs .tab{font-size:9px}.fd-mobile-dock-btn{font-size:9px}}
@media(prefers-reduced-motion:reduce){.fd-mobile-shade,.layout>.panel.left,.layout>.panel.right{transition:none!important}}

@media (max-width:600px){
  /* The main stage tracks the phone width instead of leaving a tall blank canvas. */
  .layout>.workspace>.stage{height:clamp(340px,108vw,590px)!important;min-height:0!important}
}

/* 0.4.391 — compact, live mobile editor for newly-created text layers. */
.fd-mobile-text-quick{display:none}
@media (max-width:880px){
  .fd-mobile-text-quick:not([hidden]){display:block;position:fixed;left:10px;right:10px;bottom:calc(var(--fdm-dock) + var(--fdm-checkout) + var(--fdm-safe) + 8px);z-index:680;max-width:490px;margin:0 auto;padding:11px 12px 12px;border:1px solid #f7c8b5;border-radius:16px;background:#fff;box-shadow:0 9px 26px #10101930}
  .fd-mobile-text-quick-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:13px;color:#292929}
  .fd-mobile-text-close{border:0;border-radius:8px;background:#f5f5f5;color:#444;font-size:20px;line-height:1;width:30px;height:30px}
  .fd-mobile-text-field{display:block;width:100%;min-height:49px;max-height:105px;resize:vertical;border:1px solid #dedede;border-radius:9px;padding:9px;font:inherit;font-size:15px;color:#171717;background:white;outline-color:#ff653b}
  .fd-mobile-text-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
  .fd-mobile-text-quick-actions button{min-height:37px;border-radius:9px;border:1px solid #ff653b;background:#fff;color:#e94f1c;font-weight:800;font-size:12px}
  .fd-mobile-text-quick-actions .fd-mobile-text-done{background:#ff653b;color:white}
  body.fd-mobile-drawer-open .fd-mobile-text-quick{display:none!important}
  body.fd-mobile-keyboard .fd-mobile-text-quick:not([hidden]){bottom:calc(10px + var(--fdm-safe))}
}

/* 0.4.392 — one-tap AI/Templates: a non-blocking after-insert control. */
.fd-mobile-artwork-quick{display:none}
@media(max-width:880px){
  .fd-mobile-artwork-quick:not([hidden]){display:flex;align-items:center;gap:8px;justify-content:space-between;position:fixed;left:10px;right:10px;bottom:calc(var(--fdm-dock) + var(--fdm-checkout) + var(--fdm-safe) + 8px);z-index:680;max-width:490px;margin:0 auto;padding:10px 12px;border:1px solid #f4c9b8;border-radius:14px;background:white;box-shadow:0 9px 24px #1010192b}
  .fd-mobile-artwork-title{min-width:0;flex:1;color:#292b32;font-size:12px;font-weight:800;line-height:1.3}
  .fd-mobile-artwork-actions{display:flex;gap:6px;flex-shrink:0}
  .fd-mobile-artwork-actions button{border:1px solid #ff653b;border-radius:9px;background:white;color:#ed561b;min-height:38px;padding:6px 9px;font-size:11px;font-weight:800}
  .fd-mobile-artwork-actions .fd-mobile-artwork-done{background:#ff653b;color:white}
  body.fd-mobile-drawer-open .fd-mobile-artwork-quick{display:none!important}
}

/* 0.4.406 — truly separate mobile Product and Add content.
   Keep the original mounted elements for their listeners but no duplicate
   “Изделие / Добавить” switch at the top of the sheet. */
.fd-mobile-product-preview{display:none}
@media (max-width:880px){
  /* Keep the bottom navigation accessible while either drawer is open,
     so switching Изделие ↔ Добавить needs one tap, not closing first. */
  body.fd-mobile-drawer-open .fd-mobile-dock{z-index:735}
  .layout>.panel.left.fd-mobile-sheet-open,.layout>.panel.right.fd-mobile-sheet-open{
    bottom:calc(var(--fdm-dock) + var(--fdm-safe))!important;
    height:min(80dvh,680px)!important;
    max-height:calc(100dvh - var(--fdm-dock) - var(--fdm-safe) - 8px)!important
  }
  .layout>.panel.left.fd-mobile-sheet-open .fd-sidebar-dock{display:none!important}
  /* Product contains model and colours plus a live, no-artwork mockup preview. */
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="product"] .fd-main-tools,
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="product"] .fd-text-composer,
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="product"] .fd-add-element,
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="product"] .left-tab-nav,
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="product"] .left-tab-scroll{display:none!important}
  /* Add contains only photo/text/AI/templates/elements. */
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="tools"] .fd-product-compact,
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="tools"] .fd-mobile-product-preview{display:none!important}
  .layout>.panel.left.fd-mobile-sheet-open[data-fd-mobile-view="product"] .fd-mobile-product-preview{
    display:flex;flex-direction:column;gap:10px;min-width:0;margin:18px 1px 10px;
    padding:12px;border:1px solid #ececec;border-radius:16px;background:#fafafa
  }
  .fd-mobile-product-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#282b30;font-size:13px;font-weight:850}
  .fd-mobile-product-preview-side{font-size:11px;font-weight:700;color:#e95924;background:#fff0e9;border-radius:15px;padding:5px 9px;white-space:nowrap}
  .fd-mobile-product-preview-stage{position:relative;display:grid;place-items:center;overflow:hidden;border-radius:12px;background:#f1f2f3;height:clamp(210px,40dvh,370px);min-width:0}
  .fd-mobile-product-preview-art{position:relative;width:100%;height:100%;display:grid;place-items:center;isolation:isolate}
  .fd-mobile-product-preview-photo.photo-shirt{
    position:absolute!important;left:0!important;top:0!important;right:0!important;bottom:0!important;
    width:100%!important;height:100%!important;max-width:none!important;aspect-ratio:auto!important;
    transform:none!important;pointer-events:none
  }
  .fd-mobile-product-preview-vector.shirt{display:block!important;width:100%!important;height:100%!important;max-width:100%!important}
  .fd-mobile-product-preview-loading{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:20px;font-size:12px;color:#81848b}
  .fd-mobile-product-preview-loading[hidden]{display:none!important}
  .fd-mobile-product-preview-caption{min-height:18px;text-align:center;color:#676b74;font-size:11px;line-height:1.35}
}
@media (max-width:380px){
  .fd-mobile-product-preview-stage{height:clamp(190px,35dvh,290px)}
}

@media (max-width:880px){
  /* When the virtual keyboard hides the dock, reclaim its height for editing. */
  body.fd-mobile-keyboard .layout>.panel.left.fd-mobile-sheet-open,
  body.fd-mobile-keyboard .layout>.panel.right.fd-mobile-sheet-open{
    bottom:0!important;max-height:calc(100dvh - 8px)!important
  }
}


/* 0.4.409 — a compact mobile workspace without duplicated header controls. */
@media(max-width:880px){
  /* Compact top row: logo/back + mode. The word 'Конструктор' is desktop-only. */
  header.top .fd-top-constructor{display:none!important}
  header.top .top-actions .fd-account-trigger{display:none!important}
  header.top{height:57px!important;min-height:57px!important;padding:5px 10px!important;gap:6px!important;justify-content:space-between!important}
  header.top .fd-brand-cluster{width:auto!important;flex:1 1 auto!important;min-width:0!important;justify-content:flex-start!important}
  header.top .brand-home{gap:4px!important}
  header.top .brand-logo{height:32px!important;max-width:138px!important;width:auto}
  header.top>.fd-mode-switch{display:inline-flex!important;flex:0 0 auto;justify-self:end;gap:2px;padding:3px;border-radius:10px;max-width:calc(100vw - 175px)}
  header.top>.fd-mode-switch button{font-size:10px;line-height:1.15;min-height:31px;padding:6px 8px;border-radius:7px;white-space:nowrap}
  header.top .top-actions{flex:0 0 auto!important;gap:0!important;width:0!important;min-width:0!important;overflow:hidden!important}
  /* With mode + zoom moved out of the canvas, side tabs use a single row. */
  .workspace .stage-top.fd-toolbar-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"tabs" "methods"!important;grid-auto-rows:min-content;gap:4px!important}
  .stage-top.fd-toolbar-layout>.tabs{grid-area:tabs!important;grid-column:1!important;grid-row:1!important;margin:0!important;justify-self:stretch!important}
  .stage-top.fd-toolbar-layout>.fd-application-picker{grid-area:methods!important;grid-column:1!important;grid-row:2!important}
  .stage-top.fd-toolbar-layout>.fd-toolbar-right{display:none!important}
  /* Actual live zoom/undo buttons sit at the top of Settings drawer. */
  .fd-mobile-editor-controls{padding:11px 12px 13px;margin:0 0 15px;border:1px solid #eee8e4;border-radius:13px;background:#faf9f7}
  .fd-mobile-controls-caption{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px;margin-bottom:8px}
  .fd-mobile-controls-caption strong{font-size:12px;font-weight:850;color:#24242a}
  .fd-mobile-controls-caption small{font-size:10px;color:#898991}
  .fd-mobile-editor-controls .fd-toolbar-right{display:flex!important;gap:8px;width:100%;align-items:center;justify-content:space-between;min-width:0}
  .fd-mobile-editor-controls .stage-actions{display:flex!important;gap:5px;align-items:center;flex:0 0 auto}
  .fd-mobile-editor-controls .stage-actions button{display:grid;place-items:center;min-width:39px;min-height:37px;padding:5px 10px!important;background:#fff;border:1px solid #e9e5e1;border-radius:9px;font-size:20px}
  .fd-mobile-editor-controls .zoom-controls{display:flex!important;flex:0 0 auto;padding:3px;gap:2px;box-shadow:none;border-radius:10px}
  .fd-mobile-editor-controls .zoom-controls button{min-width:35px;min-height:33px;font-size:15px}
  .fd-mobile-editor-controls .zoom-controls .zoom-current{min-width:54px;font-size:12px}
  /* Five equal-width navigation items, including the existing account action. */
  .fd-mobile-dock{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;padding-left:5px!important;padding-right:5px!important}
  .fd-mobile-dock-btn{font-size:clamp(8px,2.4vw,10px)!important;min-width:0!important;padding:6px 1px!important}
  .fd-mobile-dock-btn svg{width:20px;height:20px}
  .fd-mobile-dock-btn.is-authed{color:#eb5d28}
  .fd-mobile-dock-basket .fd-mobile-dock-count{color:#fff}
}
@media(max-width:360px){
  header.top .brand-logo{max-width:118px!important;height:30px!important}
  header.top>.fd-mode-switch button{padding:5px 6px!important;font-size:9px!important}
  .fd-mobile-editor-controls{padding:9px 8px}
  .fd-mobile-editor-controls .stage-actions button{min-width:35px;min-height:35px}
  .fd-mobile-editor-controls .zoom-controls button{min-width:31px}
  .fd-mobile-editor-controls .zoom-controls .zoom-current{min-width:49px}
}

/* 0.4.410 — one-line mobile measurements, always above fixed purchase bar. */
.fd-mobile-zone-summary{display:none}
@media(max-width:880px){
  .workspace>.stage-footer{
    position:fixed!important;z-index:486!important;
    left:50%;right:auto;bottom:calc(var(--fdm-dock) + var(--fdm-checkout) + var(--fdm-safe) + 4px)!important;
    transform:translateX(-50%);box-sizing:border-box;
    width:calc(100% - 16px)!important;max-width:560px!important;
    display:flex!important;flex-wrap:nowrap!important;align-items:center;justify-content:center!important;
    gap:7px!important;min-height:32px!important;margin:0!important;
    padding:4px 8px!important;background:rgba(255,255,255,.97)!important;
    border:1px solid #e5e9e6;border-radius:11px!important;
    box-shadow:0 2px 9px rgba(29,38,37,.07);
  }
  .workspace>.stage-footer>.pill{
    flex:0 0 auto;white-space:nowrap!important;display:inline-flex;align-items:center;
    font-size:clamp(10px,2.8vw,11px)!important;line-height:1.2;
    padding:5px 8px!important;margin:0!important;
  }
  .workspace>.stage-footer>#zoneInfo{display:none!important}
  .workspace>.stage-footer>.fd-mobile-zone-summary{
    display:block;min-width:0;flex:0 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    font-size:clamp(10px,2.7vw,11px);line-height:1.25;color:#39494e;font-weight:700;
  }
  body.fd-mobile-drawer-open .workspace>.stage-footer,
  body.fd-checkout-open .workspace>.stage-footer,
  body.fd-mobile-keyboard .workspace>.stage-footer{display:none!important}
}
@media(max-width:350px){
  .workspace>.stage-footer{gap:4px!important;padding-left:5px!important;padding-right:5px!important}
  .workspace>.stage-footer>.pill{padding:5px!important;font-size:9px!important}
  .workspace>.stage-footer>.fd-mobile-zone-summary{font-size:9px!important}
}

/* 0.4.411 — single mobile visual scale, no Safari layout-zoom feedback. */
@media(max-width:880px){
  .workspace>.stage>.zoom-scene{
    zoom:1!important;
    transform:translate(calc(-50% + var(--fd-mobile-fit-x,0px)),calc(-50% + var(--fd-mobile-fit-y,0px)))
      scale(calc(var(--fd-mobile-fit-scale,1) * var(--canvas-zoom,1)))!important;
    transform-origin:50% 50%!important;
  }
}


/* 0.4.412 — PRO methods must not push the garment/3D button down on phones.
   Only the active technology is shown in a compact overlay beside the 3D button;
   the other existing technology buttons live in a tap-open, non-layout popover. */
.fd-mobile-method-current{display:none}
.fd-mobile-method-list{display:contents}
@media (max-width:880px){
  .workspace .stage-top.fd-toolbar-layout{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    position:relative!important;z-index:55!important;gap:0!important;
    grid-template-columns:none!important;grid-template-areas:none!important;
    grid-auto-rows:auto!important;
  }
  .workspace .stage-top.fd-toolbar-layout>.tabs{
    flex:0 0 auto!important;width:100%!important;max-width:100%!important;
    grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;
    margin:0!important;min-height:0!important;
  }
  .workspace .stage-top.fd-toolbar-layout>.fd-application-picker{
    position:absolute!important;z-index:60!important;
    left:5px!important;right:auto!important;top:calc(100% + 7px)!important;
    width:min(216px,calc(100% - 113px))!important;max-width:calc(100% - 113px)!important;
    min-width:0!important;height:auto!important;min-height:0!important;
    display:block!important;margin:0!important;padding:0!important;
    border:0!important;background:transparent!important;
  }
  body.simple-mode .workspace .stage-top.fd-toolbar-layout>.fd-application-picker{display:none!important}
  .workspace .stage-top .fd-application-picker>.fd-application-caption{display:none!important}
  .workspace .stage-top .fd-mobile-method-current{
    display:flex!important;align-items:center;justify-content:center;gap:5px;
    width:100%;height:34px;min-height:34px;padding:5px 8px!important;
    background:rgba(255,255,255,.98)!important;color:#323238!important;
    border:1px solid #ff9b75!important;border-radius:10px!important;
    box-shadow:0 2px 7px #0000000d!important;
    font-family:inherit;font-size:11px;font-weight:750;line-height:1.2;cursor:pointer;text-align:center;
    -webkit-tap-highlight-color:transparent;
  }
  .fd-mobile-method-current svg{width:17px;height:17px;flex:0 0 17px;stroke:#f06a27;fill:none}
  .fd-mobile-method-current-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
  .fd-mobile-method-current-arrow{font-size:14px;color:#ff653b;margin-left:auto;flex:0 0 auto}
  .workspace .stage-top .fd-mobile-method-list{
    display:none!important;position:absolute;top:calc(100% + 5px);left:0;z-index:70;
    width:min(246px,calc(100vw - 22px));max-height:min(50dvh,330px);overflow-y:auto;
    box-sizing:border-box;padding:6px;background:#fff;border:1px solid #f2d6c8;
    border-radius:12px;box-shadow:0 9px 27px #00000026;
    flex-direction:column;align-items:stretch;gap:5px;
  }
  .workspace .stage-top .fd-application-picker.fd-mobile-method-open>.fd-mobile-method-list{display:flex!important}
  .workspace .stage-top .fd-mobile-method-list>.fd-application-option{
    box-sizing:border-box;width:100%;min-height:40px;padding:7px 9px!important;
    margin:0!important;justify-content:flex-start;font-size:12px!important;text-align:left;
    background:#fff;border:1px solid #ededed;border-radius:9px;
  }
  .workspace .stage-top .fd-mobile-method-list>.fd-application-option.is-active{background:#fff2ec;border-color:#ff653b}
  .fd-mobile-method-current:focus-visible,.fd-mobile-method-list>.fd-application-option:focus-visible{outline:2px solid #ff653b;outline-offset:2px}
  /* 3D is already anchored to the canvas's top right. It never takes room in the PRO row. */
  .workspace .stage .fd3d-switch-bar{top:7px!important;right:5px!important;z-index:12!important}
}
@media (min-width:881px){
  .fd-mobile-method-current{display:none!important}
  .fd-mobile-method-list{display:contents!important}
}

/* 0.4.413 — Mobile method controls must occupy a reserved row, never cover
   the product. The texture catalogue is a separate dialog, not page content. */
.fd-mobile-application-bar,.fd-mobile-texture-shade,.fd-mobile-texture-button{display:none}
@media(max-width:880px){
  .workspace .stage-top.fd-toolbar-layout{display:flex!important;flex-direction:column!important;gap:5px!important;z-index:65!important}
  .workspace .stage-top.fd-toolbar-layout>.tabs{margin:0!important}
  .workspace .stage-top .fd-mobile-application-bar{
    box-sizing:border-box;display:flex;flex:0 0 38px;align-items:center;gap:5px;
    height:38px;max-height:38px;width:100%;margin:0;padding:1px 2px;
    position:relative;z-index:67;
  }
  .workspace .stage-top .fd-mobile-application-bar>.fd-application-picker{
    position:relative!important;top:auto!important;left:auto!important;right:auto!important;
    z-index:68!important;flex:1 1 105px!important;width:auto!important;max-width:none!important;
    height:36px!important;min-height:0!important;display:flex!important;
    align-items:center!important;margin:0!important;padding:0!important;
  }
  body.simple-mode .workspace .stage-top .fd-mobile-application-bar>.fd-application-picker,
  .workspace .stage-top .fd-mobile-application-bar>.fd-application-picker[aria-hidden="true"]{
    display:none!important;
  }
  .workspace .stage-top .fd-mobile-application-bar .fd-mobile-method-current{
    width:100%;height:35px;min-height:35px;
  }
  .workspace .stage-top .fd-mobile-method-list{top:calc(100% + 5px);left:0;right:auto}
  .workspace .stage-top .fd-mobile-texture-button:not([hidden]){
    display:inline-flex!important;align-items:center;justify-content:center;gap:5px;
    flex:0 0 auto;white-space:nowrap;min-width:74px;height:35px;
    padding:5px 9px;border:1px solid #ffb591;border-radius:10px;
    color:#df551b;background:#fffaf6;font-size:11px;font-weight:800;font-family:inherit;
  }
  .fd-mobile-texture-button>span:first-child{font-size:18px;line-height:1}
  .workspace .stage-top .fd-mobile-application-bar .fd3d-switch-bar:not([hidden]){
    position:static!important;inset:auto!important;top:auto!important;right:auto!important;
    z-index:auto!important;display:flex;flex:0 0 auto;min-width:91px;
    width:clamp(91px,24vw,123px)!important;height:35px;min-height:35px;
    margin:0!important;padding:0!important;
  }
  .fd-mobile-application-bar .fd3d-switch-bar .fd3d-toggle{
    font-size:clamp(9px,2.7vw,11px)!important;min-height:35px!important;
    padding:4px 5px!important;border-radius:10px!important;white-space:nowrap!important;
  }
  .layout>.workspace>.stage{height:var(--fd-mobile-stage-height,clamp(220px,45dvh,520px))!important;min-height:0!important;max-height:var(--fd-mobile-stage-height,600px)!important;}
  .fd-mobile-texture-shade{position:fixed;inset:0;z-index:955;background:#090e19a8;}
  body.fd-mobile-texture-open{overflow:hidden!important}
  body.fd-mobile-texture-open .fd-mobile-texture-shade{display:block!important}
}
@media(max-width:360px){
  .workspace .stage-top .fd-mobile-application-bar{gap:4px;padding-inline:0}
  .workspace .stage-top .fd-mobile-texture-button:not([hidden]){min-width:65px;padding:5px 5px;font-size:10px}
  .workspace .stage-top .fd-mobile-application-bar .fd3d-switch-bar:not([hidden]){width:92px!important;min-width:92px}
}
@media(min-width:881px){
  .fd-mobile-application-bar,.fd-mobile-texture-shade,.fd-mobile-texture-button{display:none!important}
}
/* Products without a 3D model should not get an empty mobile toolbar in Simple mode. */
@media(max-width:880px){
 body.simple-mode .workspace .stage-top .fd-mobile-application-bar:not(:has(.fd3d-switch-bar:not([hidden]))){display:none!important}
}

@media(max-width:880px){
 .workspace.fd3d-active .stage-top .fd-mobile-application-bar .fd3d-switch-bar{display:none!important}
}

/* 0.4.414 — only the MOBILE side selector is more compact vertically.
   36px outer strip, 30px tabs; no changes to the number or width of sides,
   product print zone coordinates, stage scaling, desktop UI or 3D. */
@media (max-width:880px){
  .workspace .stage-top.fd-toolbar-layout > .tabs{
    box-sizing:border-box!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    padding:2px!important;
    gap:3px!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    overflow-x:auto;
    overflow-y:hidden;
    border-radius:11px;
  }
  .workspace .stage-top.fd-toolbar-layout > .tabs > .tab{
    box-sizing:border-box!important;
    flex:1 0 auto;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    padding:0 8px!important;
    line-height:14px!important;
    border-radius:8px!important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}

/* 0.4.416 — visual order in the mobile PRO toolbar; override legacy order:3. */
@media (max-width:880px){
  .workspace .stage-top .fd-mobile-application-bar > .fd3d-switch-bar{order:1!important}
  .workspace .stage-top .fd-mobile-application-bar > .fd-application-picker{order:2!important}
  .workspace .stage-top .fd-mobile-application-bar > .fd-mobile-texture-button{order:3!important}
}
