/* Consumer layout: one page with landing and try-on states, using shared theme tokens. */
body.customer-ui:not(.admin-body) { --phone-width: 480px; display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden; background: var(--bg); line-height: 1.65; }
body.customer-ui::before { content: none; }
body.customer-ui .topbar { position: relative; flex-shrink: 0; inset: auto; width: 100%; max-width: 480px; min-height: 58px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 20px 10px; z-index: 24; }
body.customer-ui .brand-name { padding: 0; font-size: 17px; border-radius: 0; }
body.customer-ui #shopSubtitle { font-size: 10px; }
.customer-shop-avatar { width: 38px; height: 38px; flex: 0 0 38px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
body.customer-ui .privacy-badge { width: 36px; height: 36px; border: 0; border-radius: 50%; }
body.customer-ui .layout { position: static; display: flex; flex-direction: column; align-items: stretch; flex: 1; min-height: 0; width: 100%; max-width: 480px; margin: 0 auto; padding: 0; }
body.customer-ui[data-customer-view="landing"] .layout { flex: 0; }
.customer-landing { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px max(16px, env(safe-area-inset-bottom)); }
.landing-nav { display: flex; justify-content: flex-end; gap: 18px; min-height: 44px; }
.landing-nav { flex-shrink: 0; }
.landing-nav button { padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; min-height: 44px; cursor: pointer; }
.landing-nav button:hover { color: var(--ink); }
.landing-hero { display: flex; flex-direction: column; flex: 1; min-height: 0; text-align: center; padding: 12px 0 0; }
.landing-hero > :not(.landing-product) { flex: 0 0 auto; }
.landing-eyebrow { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 12px; margin: 0 0 12px; overflow-wrap: anywhere; }
.landing-hero h1 { margin: 0; font-size: 33px; line-height: 1.16; letter-spacing: -.045em; font-weight: 650; }
.landing-intro { margin: 14px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.landing-product { position: relative; display: grid; place-items: center; flex: 1; min-height: 64px; width: 100%; max-width: 320px; max-height: 260px; margin: 0 auto; padding: 30px 20px 18px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-card); }
.landing-product > span { position: absolute; top: 13px; left: 17px; color: var(--faint); font-size: 11px; letter-spacing: .08em; }
.landing-product img { position: absolute; inset: 30px 20px 18px; width: calc(100% - 40px); height: calc(100% - 48px); object-fit: contain; }
.landing-specs { margin: 14px 0 20px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
body.customer-ui .landing-cta { display: flex; justify-content: center; width: 100%; margin: 10px 0 0; min-height: 50px; padding: 10px 20px; font-size: 15px; }
.landing-privacy { color: var(--faint); font-size: 11px; margin: 13px 0 0; }
.landing-notice { padding: 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-tile); }
.landing-notice strong { font-size: 14px; }.landing-notice p { color: var(--muted); font-size: 12px; }
.landing-hero:has(.landing-notice:not([hidden])) .landing-product, .landing-hero:has(.landing-notice:not([hidden])) .landing-intro { display: none; }
.landing-hero:has(.landing-notice:not([hidden])) .landing-notice { overflow-y: auto; flex-shrink: 1; min-height: 60px; }
.customer-thumbnails { display: flex; gap: 10px; padding: 6px 0 12px; overflow-x: auto; }
.customer-thumbnails button { position: relative; flex: 0 0 66px; width: 66px; height: 48px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; }
.customer-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.customer-thumbnails button[aria-pressed="true"]::after { content: ""; position: absolute; width: 4px; height: 4px; bottom: -8px; left: calc(50% - 2px); border-radius: 50%; background: var(--ink); }
body.customer-ui[data-customer-view="landing"] .stage-panel { display: none; }
body.customer-ui[data-customer-view="tryon"] .customer-landing { display: none; }
body.customer-ui[data-customer-view="tryon"] > .topbar { display: none; }
body.customer-ui.customer-controls-open > .topbar { display: flex; }
body.customer-ui .stage-panel { position: static; display: flex; flex-direction: column; flex: 1; min-height: 0; height: 100%; padding: 0 16px max(12px, env(safe-area-inset-bottom)); min-width: 0; background: var(--bg); }
.tryon-heading, .tryon-mode-switch, .tryon-product-panel, body.customer-ui .status-line { flex-shrink: 0; }
.tryon-heading { display: flex; align-items: center; justify-content: space-between; height: 44px; }.tryon-heading strong { font-size: 13px; font-weight: 600; }.tryon-heading button { min-width: 44px; min-height: 44px; padding: 0; background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 12px; }.tryon-heading button:first-child { font-size: 24px; text-align: left; }
body.customer-ui .stage { position: relative; inset: auto; display: grid; place-items: center; flex: 1; height: auto; min-height: 0; max-height: none; width: 100%; margin: 8px 0 14px; border-radius: 28px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
body.customer-ui .stage canvas { position: static; object-fit: contain; max-width: 100%; max-height: 100%; }
body.customer-ui.camera-mode .stage canvas { max-width: none; max-height: none; }
body.customer-ui .stage video { position: absolute; inset: auto; width: 1px; height: 1px; opacity: 0; }
body.customer-ui .stage .drop-hint { padding: 28px; justify-content: center; overflow-y: auto; }
body.customer-ui .stage .drop-hint .entry-product-image { max-width: 230px; height: 100px; padding: 16px; background: var(--bg); }
body.customer-ui .stage .drop-hint strong { font-size: 14px; }
body.customer-ui .stage .drop-hint span { font-size: 12px; }
body.customer-ui .stage .overlay { padding: 24px; border-radius: 28px; }
body.customer-ui .compare-original-btn { right: 12px; bottom: 12px; min-height: 36px; font-size: 11px; padding: 0 12px; }
body.customer-ui .camera-quality { bottom: auto; top: 10px; left: 10px; right: auto; transform: none; max-width: calc(100% - 20px); min-width: 0; font-size: 11px; align-items: flex-start; white-space: normal; }
body.customer-ui .camera-quality > span { margin-top: 5px; }
body.customer-ui .camera-quality > strong { min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
body.customer-ui .status-line { position: static; order: 4; margin: 8px 0 0; max-width: none; width: 100%; min-height: 0; border: 0; padding: 0 4px; text-align: center; background: transparent; color: var(--muted); font-size: 10px; }
.tryon-mode-switch { display: flex; gap: 8px; }
body.customer-ui .tryon-mode-switch .btn { flex: 1; min-height: 40px; height: 40px; gap: 6px; font-size: 12px; border-radius: var(--radius-pill); }
body.customer-ui .tryon-mode-switch #cameraBtn { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
body.customer-ui .tryon-mode-switch #cameraBtn.active { background: var(--bg); border-color: var(--ink); color: var(--ink); }
.tryon-product-panel { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
body.customer-ui .current-product { position: static; inset: auto; display: grid; gap: 3px; margin: 0; padding: 0 60px 0 0; border: 0; border-radius: 0; background: transparent; }
body.customer-ui .current-product strong { font-size: 18px; font-weight: 650; }
body.customer-ui .current-product strong, body.customer-ui .current-product span, .tryon-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.customer-ui .current-product span { font-size: 11px; }
.tryon-product-panel > p { margin: 5px 0 8px; font-size: 11px; color: var(--muted); }
.tryon-details { position: absolute; right: 15px; top: 14px; min-height: 44px; padding: 0; background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 11px; }
body.customer-ui .toolbar { position: static; inset: auto; display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding: 0; margin: 12px 0 0; gap: 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.customer-ui .toolbar .btn { flex-direction: row; gap: 6px; min-height: 48px; height: 48px; font-size: 14px; }
body.customer-ui .toolbar .btn svg { width: 17px; height: 17px; }
body.customer-ui .toolbar .btn-dark { padding: 8px; }
body.customer-ui .toolbar #downloadBtn { font-size: 14px; }
body.customer-ui .toolbar #adjustPanelToggle { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); }
body.customer-ui .control-panel { inset: calc(58px + env(safe-area-inset-top)) var(--phone-edge) 0; width: auto; height: auto; max-height: none; border-radius: 0; padding: 0 20px calc(84px + env(safe-area-inset-bottom)); background: var(--surface); }
body.customer-ui .customer-dock-header { position: sticky; top: 0; margin: 0 -20px; padding: 12px 20px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
body.customer-ui .customer-dock-grip { display: none; }
body.customer-ui .customer-dock-title-row { min-height: 44px; margin: 0; }
body.customer-ui .customer-dock-title-row strong { font-size: 23px; font-weight: 650; }
body.customer-ui .customer-dock-close { min-width: 44px; height: 44px; padding: 0; background: transparent; font-size: 12px; color: var(--muted); }
body.customer-ui .customer-dock-tabs { margin-top: 10px; }
body.customer-ui .customer-dock-tab { font-size: 13px; }
body.customer-ui #customerPanelFrames > .section-head { display: none; }
body.customer-ui .customer-filter-drawer { margin: 10px 0; border: 0; background: var(--surface-soft); }
body.customer-ui .customer-filter-drawer > summary { min-height: 44px; font-size: 12px; }
body.customer-ui .category-filter { gap: 16px; margin: 4px 0 12px; padding: 0; overflow-x: auto; }
body.customer-ui .category-filter .chip { position: relative; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; font-size: 13px; background: transparent; box-shadow: none; color: var(--muted); }
body.customer-ui .category-filter .chip.active { color: var(--ink); }
body.customer-ui .category-filter .chip.active::after { content: ""; position: absolute; bottom: 2px; left: 0; right: 0; height: 2px; background: var(--ink); border-radius: 2px; }
body.customer-ui .frame-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 3px 0 16px; overflow: visible; }
body.customer-ui .frame-item { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-tile); background: var(--surface); box-shadow: var(--shadow-card); }
body.customer-ui .frame-item.active { border: 2px solid var(--ink); box-shadow: none; }
body.customer-ui .frame-item.active::before { content: "已选"; position: absolute; top: 9px; left: 9px; padding: 1px 7px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: 10px; pointer-events: none; z-index: 1; }
body.customer-ui .frame-select { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 7px 7px 10px; width: 100%; text-align: left; }
body.customer-ui .frame-select .thumb { width: 100%; height: 100px; aspect-ratio: auto; padding: 12px 5px; border: 0; border-radius: 14px; background: var(--bg); object-fit: contain; }
body.customer-ui .frame-select > span { margin: 3px 6px 0; font-size: 13px; font-weight: 600; }
body.customer-ui .frame-select > em { margin: 0 6px; font-size: 10px; color: var(--muted); }
body.customer-ui .frame-item-actions { gap: 4px; padding: 0 10px 10px; grid-template-columns: 44px 1fr; }
body.customer-ui .frame-item-actions button { height: 36px; min-height: 36px; font-size: 10px; border-radius: var(--radius-pill); }
.frame-confirm-bar { position: fixed; bottom: 0; left: var(--phone-edge); right: var(--phone-edge); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); z-index: 22; }
.frame-confirm-bar > span { color: var(--muted); font-size: 12px; }
body.customer-ui .frame-confirm-bar .btn { min-height: 44px; height: 44px; padding: 7px 26px; }
body.customer-ui .control-panel:not([data-active-panel="frames"]) .frame-confirm-bar { display: none; }
body.customer-ui .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
body.customer-ui.customer-controls-open .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
body.customer-ui .customer-sheet-backdrop { inset: 0; }
body.customer-ui .modal { align-items: center; padding-inline: max(16px, var(--phone-edge)); }
body.customer-ui .modal-card { width: 100%; max-width: 440px; }
body.customer-ui [hidden] { display: none; }
@media (max-width: 360px) {
  .customer-landing { padding-inline: 16px; }
  body.customer-ui .control-panel { padding-inline: 14px; }.frame-confirm-bar { padding-inline: 14px; }
  body.customer-ui .tryon-product-panel { padding: 14px; } body.customer-ui .toolbar .btn { font-size: 13px; }
}
@media (max-height: 700px) {
  .landing-hero { padding-top: 4px; }
  .landing-hero h1 { font-size: 28px; }.landing-hero h1 br { display: none; }
  .landing-eyebrow { margin-bottom: 6px; font-size: 11px; }
  .landing-intro { margin: 8px 0 10px; font-size: 12px; }.landing-intro br { display: none; }
  .landing-specs { margin: 8px 0; font-size: 11px; }
  body.customer-ui .landing-cta { min-height: 46px; margin-top: 8px; padding-block: 8px; }
  .landing-privacy { margin-top: 8px; }
  body.customer-ui .tryon-product-panel { padding: 12px; }
  body.customer-ui .current-product strong { font-size: 16px; }
  body.customer-ui .stage { margin-block: 6px 8px; }
  body.customer-ui .status-line { margin-top: 4px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { body.customer-ui .control-panel { transition: none; } }
