/* 款视界 · 全站手机端壳层与布局（≤900px） */
:root{
  --m-topbar-h:52px;
  --m-tabbar-h:56px;
  --m-safe-t:env(safe-area-inset-top,0px);
  --m-safe-b:env(safe-area-inset-bottom,0px);
  --m-safe-l:env(safe-area-inset-left,0px);
  --m-safe-r:env(safe-area-inset-right,0px);
  --m-pad-x:16px;
  --m-sheet-radius:20px;
  --m-z-topbar:240;
  --m-z-tabbar:230;
  --m-z-mask:250;
  --m-z-drawer:260;
  --m-z-sheet:270;
}

.m-topbar,
.m-nav-mask,
.m-tabbar,
.m-config-fab,
.m-tools-sheet,
.m-desktop-hint{display:none}

@media(max-width:900px){
  html.ecom-m,
  body.ecom-m{
    --home-pad-x:var(--m-pad-x);
    --home-core-w:100%;
    --ecom-user-dock-gap:8px;
  }

  body.ecom-m{
    -webkit-tap-highlight-color:transparent;
    overscroll-behavior-y:contain;
  }
  /* 仅有底栏的 App 壳页面才预留底部安全区 */
  body.ecom-m.m-has-tabbar{
    padding-bottom:calc(var(--m-tabbar-h) + var(--m-safe-b));
  }

  body.ecom-m .m-topbar{
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    position:fixed;left:0;right:0;top:0;z-index:var(--m-z-topbar);
    height:calc(var(--m-topbar-h) + var(--m-safe-t));
    padding:var(--m-safe-t) max(12px,var(--m-safe-r)) 0 max(12px,var(--m-safe-l));
    background:rgba(252,252,252,.92);
    border-bottom:1px solid var(--line,#e5e5e5);
    backdrop-filter:blur(16px) saturate(1.2);
    -webkit-backdrop-filter:blur(16px) saturate(1.2);
    box-sizing:border-box;
  }
  html.dark body.ecom-m .m-topbar{
    background:rgba(10,10,10,.92);
    border-bottom-color:rgba(255,255,255,.08);
  }
  body.ecom-m .m-topbar-btn{
    width:40px;height:40px;border:none;border-radius:12px;
    background:transparent;color:var(--text,#0a0a0a);
    display:inline-flex;align-items:center;justify-content:center;
    flex-shrink:0;cursor:pointer;padding:0;
  }
  body.ecom-m .m-topbar-btn:active{background:rgba(0,0,0,.06)}
  html.dark body.ecom-m .m-topbar-btn:active{background:rgba(255,255,255,.08)}
  body.ecom-m .m-topbar-brand{
    display:flex;align-items:center;justify-content:center;flex:1;min-width:0;
    text-decoration:none;color:inherit;
  }
  body.ecom-m .m-topbar-brand img{
    height:24px;width:auto;max-width:120px;object-fit:contain;display:block;
  }
  body.ecom-m .m-topbar-spacer{width:40px;flex-shrink:0}

  body.ecom-m .m-tabbar{
    display:flex;align-items:stretch;justify-content:space-around;
    position:fixed;left:0;right:0;bottom:0;z-index:var(--m-z-tabbar);
    height:calc(var(--m-tabbar-h) + var(--m-safe-b));
    padding:0 max(4px,var(--m-safe-r)) var(--m-safe-b) max(4px,var(--m-safe-l));
    background:rgba(255,255,255,.94);
    border-top:1px solid var(--line,#e5e5e5);
    backdrop-filter:blur(18px) saturate(1.25);
    -webkit-backdrop-filter:blur(18px) saturate(1.25);
    box-sizing:border-box;
  }
  html.dark body.ecom-m .m-tabbar{
    background:rgba(18,18,18,.94);
    border-top-color:rgba(255,255,255,.08);
  }
  body.ecom-m .m-tab{
    flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:2px;min-width:0;border:none;background:transparent;color:var(--muted,#737373);
    font-size:10px;font-weight:600;letter-spacing:.02em;padding:6px 4px 4px;
    text-decoration:none;cursor:pointer;font-family:inherit;line-height:1.2;
    -webkit-tap-highlight-color:transparent;
  }
  body.ecom-m .m-tab .ico{display:flex;color:inherit}
  body.ecom-m .m-tab.on{color:var(--accent,#2563eb)}
  body.ecom-m .m-tab:active{opacity:.7}

  /* 手机端隐藏完整侧栏，改用精选「做图」面板 */
  body.ecom-m .side-nav,
  body.ecom-m #sideNav{display:none!important}
  body.ecom-m .m-nav-mask{
    display:block;position:fixed;inset:0;z-index:var(--m-z-mask);
    background:rgba(15,23,42,.46);opacity:0;pointer-events:none;
    transition:opacity var(--ecom-dur-panel,.32s) var(--ecom-ease-out,ease);
  }
  body.ecom-m.m-tools-open .m-nav-mask{opacity:1;pointer-events:auto}
  body.ecom-m .m-tools-sheet{
    display:flex;flex-direction:column;
    position:fixed;left:0;right:0;bottom:0;z-index:var(--m-z-drawer);
    max-height:min(78dvh,640px);
    padding:10px 0 calc(12px + var(--m-safe-b));
    background:var(--surface,#fff);
    border-radius:var(--m-sheet-radius) var(--m-sheet-radius) 0 0;
    box-shadow:0 -12px 40px rgba(15,23,42,.16);
    transform:translate3d(0,110%,0);
    transition:transform var(--ecom-dur-panel,.32s) var(--ecom-ease-fluid,cubic-bezier(.32,.72,0,1));
  }
  body.ecom-m.m-tools-open .m-tools-sheet{transform:translate3d(0,0,0)}
  body.ecom-m .m-tools-head{
    display:flex;align-items:center;justify-content:space-between;
    padding:8px 16px 4px;flex-shrink:0;position:relative;
  }
  body.ecom-m .m-tools-head::before{
    content:'';position:absolute;left:50%;top:-2px;transform:translateX(-50%);
    width:36px;height:4px;border-radius:999px;background:rgba(0,0,0,.14);
  }
  body.ecom-m .m-tools-head strong{font-size:16px;font-weight:700}
  body.ecom-m .m-tools-close{
    width:36px;height:36px;border:none;border-radius:10px;background:transparent;
    color:var(--muted,#737373);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
  }
  body.ecom-m .m-tools-sub{
    margin:0;padding:0 16px 10px;font-size:12px;color:var(--muted,#737373);flex-shrink:0;
  }
  body.ecom-m .m-tools-list{
    overflow:auto;-webkit-overflow-scrolling:touch;padding:4px 12px 8px;
    display:flex;flex-direction:column;gap:6px;
  }
  body.ecom-m .m-tool-item{
    display:flex;align-items:center;gap:12px;padding:12px;
    border-radius:14px;border:1px solid var(--line,#e5e5e5);
    background:var(--surface,#fff);text-decoration:none;color:inherit;
  }
  body.ecom-m .m-tool-item.on{
    border-color:var(--opt-card-on-border,#bfdbfe);
    background:var(--opt-card-on-bg,#eff6ff);
  }
  body.ecom-m .m-tool-item:active{background:var(--surface-2,#f5f5f5)}
  body.ecom-m .m-tool-ico{
    width:40px;height:40px;border-radius:12px;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;
    background:var(--surface-2,#f5f5f5);color:var(--text,#0a0a0a);
  }
  body.ecom-m .m-tool-item.on .m-tool-ico{background:#fff;color:var(--accent,#2563eb)}
  body.ecom-m .m-tool-meta{min-width:0;display:flex;flex-direction:column;gap:2px}
  body.ecom-m .m-tool-meta strong{font-size:14px;font-weight:650}
  body.ecom-m .m-tool-meta em{font-style:normal;font-size:12px;color:var(--muted,#737373)}
  body.ecom-m .m-desktop-hint{
    display:block;position:fixed;left:12px;right:12px;z-index:var(--m-z-tabbar);
    bottom:calc(var(--m-tabbar-h) + var(--m-safe-b) + 12px);
    padding:14px 14px 12px;border-radius:16px;
    background:rgba(15,23,42,.92);color:#fff;
    box-shadow:0 10px 28px rgba(15,23,42,.28);
  }
  body.ecom-m .m-desktop-hint p{margin:0 0 10px;font-size:13px;font-weight:600;line-height:1.4}
  body.ecom-m .m-desktop-hint-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
  body.ecom-m .m-desktop-hint-btn{
    border:none;border-radius:999px;padding:8px 14px;font-size:12px;font-weight:650;
    background:#fff;color:#0a0a0a;cursor:pointer;font-family:inherit;
  }
  body.ecom-m .m-desktop-hint-link{font-size:12px;color:rgba(255,255,255,.8);text-decoration:none}

  body.ecom-m .studio-app{
    padding-top:calc(var(--m-topbar-h) + var(--m-safe-t));
    min-height:100dvh;height:auto;max-height:none;
  }
  body.ecom-m.page-studio .studio-app,
  body.ecom-m.page-home .studio-app,
  body.ecom-m.page-history .studio-app,
  body.ecom-m.page-copy .studio-app,
  body.ecom-m.page-cases .studio-app,
  body.ecom-m.page-video .studio-app,
  body.ecom-m.page-model-plaza .studio-app,
  body.ecom-m.page-pose-plaza .studio-app{
    height:100dvh;max-height:100dvh;overflow:hidden;
  }
  body.ecom-m .studio-body,
  body.ecom-m .home-main,
  body.ecom-m .hist-main,
  body.ecom-m .mp-main,
  body.ecom-m .copy-main,
  body.ecom-m .cases-main,
  body.ecom-m .video-main{
    width:100%;min-width:0;flex:1;
  }

  body.ecom-m .ecom-user-dock{
    top:calc(var(--m-safe-t) + 6px)!important;
    right:max(8px,var(--m-safe-r))!important;
    z-index:calc(var(--m-z-topbar) + 2);
  }
  body.ecom-m .ecom-user-bar{
    --ecom-user-ctrl-h:32px;
    --ecom-user-py:6px;
    --ecom-user-px:10px;
    --ecom-user-fs:12px;
    gap:6px;
  }
  body.ecom-m #ecomUserUpgradeLabel{display:none}
  body.ecom-m .ecom-user-pill--upgrade-dark{padding:0 10px}
  body.ecom-m .ecom-user-pill--credits{padding:0 10px}
  body.ecom-m.page-home .home-topbar .ecom-user-dock,
  body.ecom-m.studio-home-active .home-topbar .ecom-user-dock{
    position:fixed!important;top:calc(var(--m-safe-t) + 6px)!important;right:max(8px,var(--m-safe-r))!important;
  }
  body.ecom-m .home-topbar{padding-top:8px;min-height:0}
  body.ecom-m.page-home .home-topbar{justify-content:flex-end;padding-right:var(--m-pad-x)}

  body.ecom-m .wb-float-rail,
  body.ecom-m .ws-support.wb-float-rail{display:none!important}

  /* ── Studio：工作台直接展示配置表单（对齐由前AI手机端） ── */
  body.ecom-m.page-studio .studio-stage{
    flex-direction:column!important;
    min-height:0;flex:1;overflow:hidden;
  }
  body.ecom-m.page-studio .studio-tool-shell{
    display:flex!important;flex-direction:column;width:100%;min-width:0;flex:1;min-height:0;overflow:hidden;
  }
  /* 顶栏：仅三 Tab 横排，去掉常用/头像挤占 */
  body.ecom-m.page-studio .wb-workspace{
    display:flex;flex-direction:column;width:100%;min-width:0;min-height:0;
    order:-1;flex:0 0 auto;background:var(--surface,#fff);
    border-bottom:1px solid var(--line,#e5e5e5);
  }
  body.ecom-m.page-studio .wb-topbar{
    display:flex;flex-wrap:nowrap;align-items:center;gap:0;
    padding:8px 12px;min-height:0;height:auto;
  }
  body.ecom-m.page-studio .wb-tabs{
    order:0;flex:1 1 auto;width:100%;min-width:0;
    display:flex!important;flex-wrap:nowrap!important;align-items:stretch;
    justify-content:stretch;overflow:hidden;
    height:40px;min-height:40px;padding:3px;gap:0;
    border-radius:12px;
  }
  body.ecom-m.page-studio .wb-tab{
    flex:1 1 0!important;min-width:0!important;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    justify-content:center;padding:0 6px!important;
    font-size:13px!important;font-weight:600;
    height:auto!important;min-height:0!important;
  }
  body.ecom-m.page-studio .wb-tab-indicator{display:none!important}
  /* 常用工具（桌面套图入口）手机端隐藏：改走底栏「做图」 */
  body.ecom-m.page-studio .wb-topbar-main,
  body.ecom-m.page-studio .wf-progress-host,
  body.ecom-m.page-studio .wf-progress-host--dock,
  body.ecom-m.page-studio .wb-reverse-prompt-btn{display:none!important}
  body.ecom-m.page-studio .wb-topbar-actions{display:none!important}
  body.ecom-m.page-studio .wb-credits-pill{display:none!important}
  body.ecom-m.page-studio .ecom-user-bar,
  body.ecom-m.page-studio .ecom-user-wrap,
  body.ecom-m.page-studio #ecomUserBar{display:none!important}
  /* 工作台 Tab：显示配置表单，隐藏空演示区 */
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio{
    position:relative!important;left:auto;right:auto;bottom:auto;top:auto;
    z-index:auto;
    width:100%!important;max-width:none!important;min-width:0!important;
    height:auto!important;max-height:none!important;
    flex:1 1 auto!important;min-height:0;
    border:none!important;border-radius:0!important;
    box-shadow:none!important;
    transform:none!important;
    padding-bottom:calc(8px + var(--m-safe-b));
    display:flex!important;flex-direction:column;
    overflow:hidden;
    background:var(--surface,#fff);
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio .config-head::before{display:none}
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio .studio-tool-slide{
    flex:1 1 auto;min-height:0;height:100%;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio .config-body{
    flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;
    padding:12px 14px 16px;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio .config-footer{
    flex-shrink:0;position:sticky;bottom:0;z-index:2;
    padding:10px 14px calc(10px + var(--m-safe-b));
    background:var(--surface,#fff);border-top:1px solid var(--line,#e5e5e5);
    box-shadow:0 -6px 16px rgba(15,23,42,.04);
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-panels-track,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-content,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-hist-head,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #wbPanelWorkbench{
    display:none!important;
    flex:0 0 0!important;height:0!important;min-height:0!important;overflow:hidden!important;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-workspace{
    flex:0 0 auto!important;min-height:0!important;height:auto!important;
  }
  /* 结果 / 历史 Tab：隐藏配置，展示面板 */
  body.ecom-m.page-studio.m-studio-tab-results .config-panel--studio,
  body.ecom-m.page-studio.m-studio-tab-history .config-panel--studio{
    display:none!important;
  }
  body.ecom-m.page-studio.m-studio-tab-results .wb-workspace,
  body.ecom-m.page-studio.m-studio-tab-history .wb-workspace{
    flex:1 1 auto;min-height:0;order:0;border-bottom:none;
  }
  body.ecom-m.page-studio.m-studio-tab-results .wb-content,
  body.ecom-m.page-studio.m-studio-tab-history .wb-content{
    display:flex!important;flex:1 1 auto!important;min-height:0!important;height:auto!important;
  }
  body.ecom-m.page-studio.m-studio-tab-results .wb-panels-track,
  body.ecom-m.page-studio.m-studio-tab-history .wb-panels-track{
    display:flex!important;flex:1;min-height:0;height:auto!important;
  }
  body.ecom-m.page-studio .region-switch{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
  body.ecom-m.page-studio .seg-row{flex-wrap:wrap}
  body.ecom-m.page-studio .studio-upload-grid{grid-template-columns:1fr!important}
  body.ecom-m.page-studio .btn-gen{min-height:48px;font-size:15px;border-radius:12px;font-weight:650}
  body.ecom-m.page-studio .config-title-row h2{font-size:18px}
  body.ecom-m.page-studio .upload-zone{min-height:160px}
  body.ecom-m.page-studio .m-config-fab{display:none!important}
  body.ecom-m.page-studio .config-drawer-mask{display:none!important}
  body.ecom-m.page-studio .ws-float-dock{display:none!important}
  /* 手机端不需要联系客服 / 帮助问号浮层 */
  body.ecom-m .ws-support.wb-float-rail,
  body.ecom-m .wb-float-rail,
  body.ecom-m #floatCs,
  body.ecom-m #helpBtn{display:none!important}
  body.ecom-m.page-studio .ecom-user-dock{display:none!important}
  body.ecom-m.page-studio .ecom-user-pill--credits,
  body.ecom-m.page-studio .ecom-user-pill--upgrade-dark{display:none!important}
  body.ecom-m.page-studio .home-topbar{display:none}


  body.ecom-m.page-home .home-main,
  body.ecom-m.studio-home-active .home-main{
    padding-bottom:calc(24px + var(--m-tabbar-h) + var(--m-safe-b));
  }
  body.ecom-m .home-hero h1{font-size:clamp(28px,8vw,36px)!important}
  body.ecom-m .home-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  body.ecom-m .home-qcard{min-height:88px;border-radius:14px}
  body.ecom-m .home-prompt,
  body.ecom-m .home-split-nav,
  body.ecom-m .home-showcase-module{padding-left:0;padding-right:0}
  body.ecom-m .home-case-scroll{gap:12px;padding-bottom:8px}
  body.ecom-m .home-case-scroll .home-case-card{flex:0 0 152px;width:152px}
  body.ecom-m .home-case-scroll .home-case-img,
  body.ecom-m .home-case-mock,
  body.ecom-m .home-case-ph{height:304px}

  /* 素材页：修复手机端列表高度为 0 导致「加载不出来」 */
  body.ecom-m.page-history #ecomSidebarSlot{display:none!important}
  body.ecom-m.page-history .studio-app{
    display:flex!important;flex-direction:column!important;
    height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;
    padding-top:calc(var(--m-topbar-h) + var(--m-safe-t));
    padding-bottom:0;
  }
  body.ecom-m.page-history .hist-main{
    flex:1 1 auto!important;min-height:0!important;width:100%!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
    padding-bottom:calc(var(--m-tabbar-h) + var(--m-safe-b))!important;
  }
  body.ecom-m.page-history .hist-topbar{flex-shrink:0}
  body.ecom-m.page-history .hist-layout{
    flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;
    flex-direction:column!important;
  }
  body.ecom-m.page-history .hist-folders{
    flex:0 0 auto!important;width:100%!important;max-height:none!important;
    min-height:0!important;overflow:visible!important;
    padding:10px 12px;gap:8px;border-bottom:1px solid var(--line,#e5e5e5);
  }
  body.ecom-m.page-history .hist-folder-tip{display:none!important}
  body.ecom-m.page-history .hist-btn-outline{width:auto;align-self:flex-start;padding:8px 12px}
  body.ecom-m .hist-folder-list{
    display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;padding-bottom:2px;
    margin:0;-webkit-overflow-scrolling:touch;
  }
  body.ecom-m .hist-folder-list li{flex:0 0 auto}
  body.ecom-m.page-history .hist-gallery-wrap{
    flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;
    padding:12px 12px 0!important;display:flex!important;flex-direction:column!important;
  }
  body.ecom-m.page-history .hist-toolbar-row{flex-shrink:0;margin-bottom:10px}
  body.ecom-m.page-history .hist-gallery-scroll{
    flex:1 1 auto!important;min-height:0!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    padding-bottom:calc(16px + var(--m-safe-b))!important;
  }
  body.ecom-m .hist-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  body.ecom-m .hist-empty{
    min-height:min(280px,46vh)!important;margin:8px 0 20px;
  }
  body.ecom-m .hist-seg{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
  body.ecom-m .hist-mobile-link{display:inline-flex!important}

  body.ecom-m .mp-main{padding:16px var(--m-pad-x) calc(24px + var(--m-tabbar-h) + var(--m-safe-b))!important}
  body.ecom-m .mp-hero{padding:0 0 48px!important;text-align:left}
  body.ecom-m .mp-title{font-size:22px!important}
  body.ecom-m .mp-grid,
  body.ecom-m .mp-grid--modal{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  body.ecom-m .mp-card-edit,
  body.ecom-m .mp-card-del,
  body.ecom-m .mp-card-fav,
  body.ecom-m .mp-card-preview,
  body.ecom-m .mp-card-hover-info{opacity:1;pointer-events:auto}

  body.ecom-m.page-copy .copy-main,
  body.ecom-m.page-video .video-main,
  body.ecom-m.page-cases .cases-main{
    padding:12px var(--m-pad-x) calc(24px + var(--m-tabbar-h) + var(--m-safe-b));
  }
  body.ecom-m .copy-fields,
  body.ecom-m .copy-form-grid{grid-template-columns:1fr!important}

  body.ecom-m .ecom-promo-bar{
    padding:8px 36px 8px 12px;
    top:calc(var(--m-topbar-h) + var(--m-safe-t));
  }
  body.ecom-m.ecom-promo-visible .studio-app{
    padding-top:calc(var(--m-topbar-h) + var(--m-safe-t) + var(--ecom-promo-h,0px));
  }

  body.ecom-m.page-home-guest{padding-bottom:0}
  body.ecom-m.page-home-guest .m-tabbar{display:none}
  body.ecom-m.page-home-guest .hm-nav,
  body.ecom-m.page-home-pro .hm-nav{padding:10px 14px}
  body.ecom-m.page-home-guest .hm-nav-links a:not(.hm-nav-cta),
  body.ecom-m.page-home-pro .hm-nav-links a:not(.hm-nav-cta){display:none}
  body.ecom-m .lp-pro .lp-hero,
  body.ecom-m.page-home-pro .hm-hero{padding-top:24px}

  body.ecom-m .ecom-nav{
    padding:10px 14px;gap:10px;flex-wrap:wrap;
  }
  body.ecom-m .ecom-nav .links{
    width:100%;display:none;flex-direction:column;align-items:stretch;
    gap:0;padding-top:8px;border-top:1px solid var(--line,#e4e4e7);
  }
  body.ecom-m .ecom-nav.m-pub-open .links{display:flex}
  body.ecom-m .ecom-nav .links a,
  body.ecom-m .ecom-nav .links .ecom-btn{
    padding:12px 4px;font-size:15px;border-radius:10px;
  }
  body.ecom-m .ecom-nav .m-pub-toggle{
    display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;
    border:none;border-radius:12px;background:transparent;color:inherit;cursor:pointer;
  }
  body.ecom-m .ecom-wrap{padding:16px 14px 40px}

  body.ecom-m .ecom-modal,
  body.ecom-m .ecom-user-modal,
  body.ecom-m .recharge-modal-panel{
    width:min(100vw - 24px,480px)!important;
    max-height:min(88dvh,720px);
    border-radius:16px!important;
  }
  body.ecom-m .ecom-user-panel{
    position:fixed!important;left:12px!important;right:12px!important;
    top:calc(var(--m-topbar-h) + var(--m-safe-t) + 8px)!important;
    width:auto!important;max-width:none!important;
  }
}

@media(max-width:480px){
  body.ecom-m{--m-pad-x:12px}
  body.ecom-m .home-tools-grid{gap:8px}
  body.ecom-m .hist-grid{gap:8px}
  body.ecom-m .mp-grid,
  body.ecom-m .mp-grid--modal{gap:8px}
}

@media(max-width:900px) and (orientation:landscape) and (max-height:500px){
  body.ecom-m{
    --m-tabbar-h:48px;
    --m-topbar-h:44px;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio{
    flex:1 1 auto!important;height:auto!important;max-height:none!important;
  }
}


/* studio-tool-shell-mobile-fix */
@media(max-width:900px){
  body.ecom-m.page-studio .wb-topbar,
  body.ecom-m.page-studio .wb-tabs{
    padding-left:12px;padding-right:12px;flex-wrap:wrap;gap:8px;
  }
  body.ecom-m.page-studio .wb-hist-feed{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px;padding:12px;
  }
  body.ecom-m.page-studio .resultsEmpty p,
  body.ecom-m.page-studio .wb-results-empty p{font-size:13px}
  body.ecom-m .upload-zone{min-height:140px}
  body.ecom-m .field label{font-size:13px}
  body.ecom-m select.sel,
  body.ecom-m .ui-select-trigger,
  body.ecom-m .ctrl-input,
  body.ecom-m textarea{
    font-size:16px!important; /* iOS 防自动缩放 */
  }

  /* 设计画布 / 视频 */
  body.ecom-m.page-design-canvas .dc-app,
  body.ecom-m .design-canvas-app{padding-top:calc(var(--m-topbar-h) + var(--m-safe-t))}
  body.ecom-m .video-tool-shell{padding:12px var(--m-pad-x) calc(20px + var(--m-tabbar-h) + var(--m-safe-b))}

  /* 锁定滚动：面板打开时 */
  body.ecom-m.m-tools-open{overflow:hidden;touch-action:none}
  body.ecom-m.m-tools-open .studio-app{pointer-events:none}
  body.ecom-m.m-tools-open .m-tools-sheet,
  body.ecom-m.m-tools-open .m-nav-mask,
  body.ecom-m.m-tools-open .m-tabbar{pointer-events:auto}
}

@media(max-width:900px){
  html.dark body.ecom-m .m-tools-sheet{background:#141414}
  html.dark body.ecom-m .m-tool-item{background:#1a1a1a;border-color:rgba(255,255,255,.1)}
  html.dark body.ecom-m .m-tool-item.on{background:rgba(59,130,246,.16);border-color:rgba(59,130,246,.35)}
  html.dark body.ecom-m .m-tool-ico{background:rgba(255,255,255,.06)}
  html.dark body.ecom-m .m-tools-head::before{background:rgba(255,255,255,.22)}
}


/* override-ui-900-stack · 取消 ecom-ui 在 900px 把配置压成 52dvh 顶栏的旧布局 */
@media(max-width:900px){
  body.ecom-m.page-studio .studio-stage{flex-direction:column!important}
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio{
    flex:1 1 auto!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
  }
  body.ecom-m.page-studio .wb-workspace{min-height:0!important}
}


/* hide-user-dock-studio · 手机工作台去掉右上角悬浮用户坞，避免与顶栏/页签叠层 */
@media(max-width:900px){
  body.ecom-m.page-studio .ecom-user-dock{display:none!important}
  body.ecom-m.page-studio .m-topbar{z-index:280}
  body.ecom-m.page-history .ecom-user-dock,
  body.ecom-m.page-home .ecom-user-dock,
  body.ecom-m.studio-home-active .ecom-user-dock{display:none!important}
  /* 首页快捷：手机只保留核心卡，弱化八宫格次要入口可仍显示但更紧凑 */
  body.ecom-m .home-tools-grid .home-qcard{min-height:76px;padding:12px}
}


/* studio-home-mobile-full */
@media(max-width:900px){
  body.ecom-m.page-studio.studio-home-active .config-panel--studio,
  body.ecom-m.page-studio.studio-broker-active .config-panel--studio{display:none!important}
  body.ecom-m.page-studio.studio-home-active .wb-workspace,
  body.ecom-m.page-studio.studio-home-active .home-tool-shell,
  body.ecom-m.page-studio.studio-home-active .home-main{
    flex:1;min-height:0;width:100%;order:0;border:none;
  }
  body.ecom-m.page-studio.studio-home-active .wb-topbar{display:none}
}


/* p0-mobile-home · 手机首页弱化次要工具宫格，突出测款入口 */
@media(max-width:900px){
  body.ecom-m .home-tools-sec,
  body.ecom-m .home-tools-secondary,
  body.ecom-m [data-home-tools="secondary"]{display:none!important}
  body.ecom-m .m-tools-sub{line-height:1.45}
}


/* m-tabbar-two · 仅做图/素材时更紧凑 */
@media(max-width:900px){
  body.ecom-m .m-tabbar{justify-content:center;gap:0;padding-left:max(24px,var(--m-safe-l));padding-right:max(24px,var(--m-safe-r))}
  body.ecom-m .m-tabbar .m-tab{flex:1;max-width:160px}
}


/* m-studio-form-force · 工作台强制显示配置表单（覆盖 ecom-ui 900px 空工作区） */
@media(max-width:900px){
  body.ecom-m.page-studio #ecomSidebarSlot{display:none!important}

  body.ecom-m.page-studio .studio-app{
    display:flex!important;flex-direction:column!important;
    height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;
    padding-top:calc(var(--m-topbar-h) + var(--m-safe-t))!important;
  }
  body.ecom-m.page-studio .studio-body{
    flex:1 1 auto!important;min-height:0!important;width:100%!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
  }
  body.ecom-m.page-studio .studio-stage{
    flex:1 1 auto!important;min-height:0!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
  }
  body.ecom-m.page-studio .studio-tool-shell,
  body.ecom-m.page-studio #studioToolShell{
    flex:1 1 auto!important;min-height:0!important;width:100%!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
  }

  /* 工作台：配置占满剩余高度 */
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-workspace,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #workspaceMain{
    flex:0 0 auto!important;min-height:0!important;height:auto!important;
    order:-1!important;width:100%!important;
    border-bottom:1px solid var(--line,#e5e5e5);
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-panels-track,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #wbPanelsTrack,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-content,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #wbPanelWorkbench,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-hist-head,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .yq-effect-demo,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .ws-float-dock{
    display:none!important;flex:0 0 0!important;height:0!important;min-height:0!important;overflow:hidden!important;
    visibility:hidden!important;pointer-events:none!important;
  }

  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #studioConfigPanel{
    position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    transform:none!important;opacity:1!important;visibility:visible!important;
    display:flex!important;flex-direction:column!important;
    flex:1 1 auto!important;
    width:100%!important;max-width:none!important;min-width:0!important;
    height:auto!important;max-height:none!important;
    min-height:min(55dvh,480px)!important;
    order:0!important;
    border:none!important;border-radius:0!important;box-shadow:none!important;
    overflow:hidden!important;
    background:var(--surface,#fff)!important;
    z-index:2!important;
    padding-bottom:calc(var(--m-tabbar-h) + var(--m-safe-b))!important;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .studio-tool-slide{
    display:grid!important;
    grid-template-rows:auto minmax(120px,1fr) auto auto!important;
    flex:1 1 auto!important;min-height:0!important;height:100%!important;
    overflow:hidden!important;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-body{
    min-height:120px!important;overflow:auto!important;-webkit-overflow-scrolling:touch;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-footer{
    display:block!important;flex-shrink:0!important;
  }

  /* 覆盖 ecom-ui ≤900 的 52dvh 顶栏 + 48vh 空工作区 */
  body.ecom-m.page-studio .config-panel--studio{
    flex-basis:auto!important;
  }
  body.ecom-m.page-studio:not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-workspace{
    min-height:0!important;
  }
}

/* m-studio-wb-content-fix */
@media(max-width:900px){
  /* 根因：.wb-content 默认 flex:1，隐藏 panels 后仍占满高度导致配置区被挤没 */
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .studio-tool-shell,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #studioToolShell{
    display:flex!important;flex-direction:column!important;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-workspace,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #workspaceMain{
    flex:0 0 auto!important;order:-1!important;min-height:0!important;height:auto!important;max-height:none!important;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .wb-content{
    display:none!important;
  }
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) .config-panel--studio,
  body.ecom-m.page-studio:not(.studio-home-active):not(.studio-broker-active):not(.m-studio-tab-results):not(.m-studio-tab-history) #studioConfigPanel{
    flex:1 1 auto!important;min-height:min(50dvh,420px)!important;order:0!important;
    width:100%!important;max-width:none!important;min-width:0!important;
    height:auto!important;max-height:none!important;
    display:flex!important;visibility:visible!important;opacity:1!important;
  }
}

/* m-studio-chrome-clean */
@media(max-width:900px){
  body.ecom-m.page-studio .config-panel--studio .config-head{
    padding:12px 14px 10px!important;min-height:0!important;
  }
  body.ecom-m.page-studio .config-panel--studio .config-title-row{
    flex-wrap:wrap!important;align-items:flex-start!important;gap:10px!important;
    margin-bottom:0!important;
  }
  body.ecom-m.page-studio .config-panel--studio .config-title-main{
    flex:1 1 100%!important;min-width:0!important;
    display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px;
  }
  body.ecom-m.page-studio .config-panel--studio .config-title-row h2{
    font-size:18px!important;line-height:1.25!important;white-space:normal!important;
  }
  body.ecom-m.page-studio .config-panel--studio .region-switch{
    width:100%!important;max-width:none!important;align-self:stretch!important;
  }
  body.ecom-m.page-studio .config-panel--studio .region-switch .region-tab{
    flex:1 1 0!important;justify-content:center;
  }
  /* 店铺芯片等次要入口收进标题行右侧时避免挤爆 */
  body.ecom-m.page-studio .config-panel--studio .config-title-row > .help-link,
  body.ecom-m.page-studio .config-panel--studio .config-title-row > a.help-link{display:none!important}
}
