/*
 * 顾客端方案 B：全屏试戴魔镜 + 底部浮动控制台。
 * 延续手机全屏试戴与珊瑚红操作栏；第二阶段补齐入口和保存状态。
 */

body:not(.admin-body) {
  --phone-width: 430px;
  --phone-edge: max(0px, calc((100vw - var(--phone-width)) / 2));
  --dock-height: clamp(300px, 42dvh, 390px);
  width: 100%;
  min-width: 320px;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--surface);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body:not(.admin-body)::before {
  content: "";
  position: fixed;
  inset: 0 var(--phone-edge);
  z-index: 0;
  background: var(--stage);
  box-shadow: 0 0 70px rgba(22, 20, 18, 0.22);
  pointer-events: none;
}

body:not(.admin-body) button,
body:not(.admin-body) input,
body:not(.admin-body) select,
body:not(.admin-body) summary {
  -webkit-tap-highlight-color: transparent;
}


body:not(.admin-body) .topbar {
  position: fixed;
  top: 0;
  right: var(--phone-edge);
  left: var(--phone-edge);
  z-index: 24;
  width: auto;
  max-width: none;
  min-height: 58px;
  margin: 0;
  padding: calc(9px + env(safe-area-inset-top)) 13px 8px;
  color: #fff;
  background: var(--surface);
  pointer-events: none;
}

body:not(.admin-body) .topbar > * {
  pointer-events: auto;
}

body:not(.admin-body) .brand {
  gap: 8px;
}

body:not(.admin-body) .brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: none;
  
}

body:not(.admin-body) .brand-mark svg {
  width: 19px;
  height: 19px;
}

body:not(.admin-body) .brand-name {
  color: #fff;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
}

body:not(.admin-body) .brand-tag {
  display: none;
}

body:not(.admin-body) .header-actions {
  gap: 6px;
}

body:not(.admin-body) .privacy-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.3);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: none;
  
}

body:not(.admin-body) .privacy-badge span {
  display: none;
}

body:not(.admin-body) .layout {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body:not(.admin-body) .stage-panel {
  position: fixed;
  top: 0;
  right: var(--phone-edge);
  bottom: calc(var(--dock-height) - 14px);
  left: var(--phone-edge);
  z-index: 2;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--stage);
  box-shadow: none;
}

body:not(.admin-body) .stage {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

body:not(.admin-body) .stage canvas {
  /* 图片和实时画面统一由舞台裁切，避免纵向首屏出现黑边。 */
  max-width: none;
  max-height: none;
  filter: saturate(0.98) contrast(1.015);
}

body:not(.admin-body) .toolbar {
  position: absolute;
  top: calc(56px + env(safe-area-inset-top));
  right: 11px;
  left: 11px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: rgba(16, 17, 16, 0.48);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
  
}

body:not(.admin-body) .btn {
  min-height: 40px;
  height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body:not(.admin-body) .toolbar .btn {
  gap: 5px;
  min-width: 0;
  height: 38px;
  padding: 0 5px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 11px;
  box-shadow: none;
}

body:not(.admin-body) .toolbar .btn svg {
  width: 15px;
  height: 15px;
}



body:not(.admin-body) .toolbar .btn:disabled {
  opacity: 0.46;
}

body:not(.admin-body) .btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

body:not(.admin-body) .btn:active:not(:disabled) {
  transform: translateY(0);
}




body:not(.admin-body) .btn-ghost {
  border-color: #ded9d2;
  background: #fff;
  color: var(--ink);
}

body:not(.admin-body) .btn-sm {
  min-height: 34px;
  height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

body:not(.admin-body) .section-head .btn,
body:not(.admin-body) .compare-tray .btn,
body:not(.admin-body) .wizard-nav .btn {
  flex: 0 0 auto;
}

body:not(.admin-body) .drop-hint {
  justify-content: center;
  gap: 8px;
  padding: 112px 30px 52px;
  color: #abaeaa;
}

body:not(.admin-body) .drop-hint svg {
  width: 46px;
  height: 46px;
  color: #8c908c;
}

body:not(.admin-body) .drop-hint strong {
  color: #f6f6f4;
  font-size: 17px;
}

body:not(.admin-body) .drop-hint span {
  max-width: 300px;
  font-size: 11px;
  line-height: 1.6;
}

body:not(.admin-body) .overlay {
  padding-top: 100px;
  background: rgba(12, 13, 12, 0.8);
  
}

body:not(.admin-body) .status-line {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 11;
  width: fit-content;
  max-width: calc(100% - 28px);
  min-height: 28px;
  margin: 0 auto;
  padding: 6px 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(18, 19, 18, 0.58);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  
}

body:not(.admin-body) .camera-quality {
  bottom: 52px;
  max-width: calc(100% - 28px);
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(18, 19, 18, 0.64);
  font-size: 10px;
}

body:not(.admin-body) .control-panel {
  position: fixed;
  right: var(--phone-edge);
  bottom: 0;
  left: var(--phone-edge);
  z-index: 18;
  width: auto;
  height: var(--dock-height);
  margin: 0;
  padding: 0 14px calc(12px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  background: rgba(250, 248, 244, 0.97);
  box-shadow: 0 -16px 50px rgba(13, 12, 10, 0.24);
  scrollbar-width: none;
  
}

body:not(.admin-body) .control-panel::-webkit-scrollbar {
  display: none;
}

body:not(.admin-body) .customer-dock-header {
  position: sticky;
  top: 0;
  z-index: 15;
  margin: 0 -14px;
  padding: 7px 14px 8px;
  background: var(--surface);
}

body:not(.admin-body) .customer-dock-grip {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: #ccc6be;
}

body:not(.admin-body) .customer-dock-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #e3ded7;
  border-radius: 13px;
  background: #eeeae4;
}

body:not(.admin-body) .customer-dock-tab {
  min-width: 0;
  height: 36px;
  padding: 0 5px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #777169;
  font-size: 12px;
  font-weight: 680;
}


body:not(.admin-body) .ui-panel-hidden {
  display: none !important;
}

body:not(.admin-body) .control-section {
  padding: 12px 0 18px;
  border: 0;
  animation: customerPanelIn 0.18s ease-out;
}

body:not(.admin-body) .control-section + .control-section:not(.ui-panel-hidden) {
  padding-top: 15px;
  border-top: 1px solid #e6e1da;
}

@keyframes customerPanelIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

body:not(.admin-body) .section-head {
  margin-bottom: 9px;
}

body:not(.admin-body) h2 {
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

body:not(.admin-body) .section-meta {
  padding: 3px 8px;
  border-radius: 999px;
  background: #eeeae4;
  color: #777169;
  font-size: 10px;
  font-weight: 650;
}

body:not(.admin-body) .frame-search,
body:not(.admin-body) .customer-filter-grid select {
  min-height: 38px;
  height: 38px;
  border-color: #ded9d2;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

body:not(.admin-body) .frame-search {
  padding: 0 11px;
}


body:not(.admin-body) .category-filter,
body:not(.admin-body) .collection-filter {
  flex-wrap: nowrap;
  gap: 6px;
  margin: 8px -14px;
  padding: 0 14px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

body:not(.admin-body) .category-filter::-webkit-scrollbar,
body:not(.admin-body) .collection-filter::-webkit-scrollbar {
  display: none;
}

body:not(.admin-body) .category-filter .chip,
body:not(.admin-body) .collection-filter .chip {
  flex: none;
  min-height: 32px;
  height: 32px;
  padding: 0 11px;
  border-color: #dfdad3;
  border-radius: 999px;
  background: transparent;
  color: #716b64;
  font-size: 10px;
  font-weight: 650;
}

body:not(.admin-body) .chip.active {
  border-color: var(--line-strong);
  background: #f9e5df;
  color: #aa3e28;
}

body:not(.admin-body) .customer-filter-grid {
  gap: 7px;
  margin: 8px 0;
}

body:not(.admin-body) .customer-filter-drawer {
  margin: 7px 0 8px;
  border: 1px solid #e1dcd5;
  border-radius: 10px;
  background: #fff;
}

body:not(.admin-body) .customer-filter-drawer > summary {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  cursor: pointer;
  list-style: none;
  color: #514c46;
  font-size: 11px;
  font-weight: 680;
}

body:not(.admin-body) .customer-filter-drawer > summary::-webkit-details-marker {
  display: none;
}

body:not(.admin-body) .customer-filter-drawer > summary::after {
  content: "+";
  margin-left: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

body:not(.admin-body) .customer-filter-drawer[open] > summary::after {
  content: "−";
}

body:not(.admin-body) .customer-filter-drawer > summary em {
  flex: 1;
  margin-left: 7px;
  color: #999189;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
  text-align: right;
}

body:not(.admin-body) .customer-filter-body {
  padding: 8px;
  border-top: 1px solid #ece7e1;
}

body:not(.admin-body) .customer-filter-body .collection-filter {
  margin: 8px -8px 0;
  padding-right: 8px;
  padding-left: 8px;
}

body:not(.admin-body) .customer-filter-grid label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

body:not(.admin-body) .customer-filter-grid label > span {
  padding-left: 2px;
  font-size: 9px;
  font-weight: 650;
}

body:not(.admin-body) .frame-grid {
  display: flex;
  gap: 8px;
  margin: 9px -14px 5px;
  padding: 3px 14px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

body:not(.admin-body) .frame-grid::-webkit-scrollbar {
  display: none;
}

body:not(.admin-body) .frame-item {
  flex: 0 0 128px;
  min-width: 0;
  scroll-snap-align: start;
  border-color: #e1dcd5;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(31, 28, 24, 0.045);
}

body:not(.admin-body) .frame-item:hover {
  border-color: #cfc8bf;
  background: #fff;
}

body:not(.admin-body) .frame-item.active {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--line-strong), 0 5px 15px rgba(44, 31, 25, 0.08);
}

body:not(.admin-body) .frame-item .thumb {
  aspect-ratio: 16 / 8;
  padding: 5px;
  border-bottom: 1px solid #eee9e3;
}

body:not(.admin-body) .frame-select {
  gap: 2px;
  padding: 7px 7px 5px;
}

body:not(.admin-body) .frame-select span {
  font-size: 11px;
}

body:not(.admin-body) .frame-select em {
  font-size: 8px;
}

body:not(.admin-body) .frame-item-actions {
  grid-template-columns: 30px 1fr;
  gap: 4px;
  padding: 0 6px 6px;
}

body:not(.admin-body) .frame-item-actions button {
  min-height: 28px;
  height: 28px;
  border-color: #e2ddd6;
  border-radius: 8px;
  font-size: 9px;
}

body:not(.admin-body) .frame-item-actions button.active {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

body:not(.admin-body) .compare-tray {
  position: sticky;
  bottom: 0;
  z-index: 8;
  min-height: 46px;
  margin: 8px 0 0;
  padding: 6px 8px;
  border-color: var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 244, 240, 0.96);
  color: var(--ink);
  
}

body:not(.admin-body) .measurement-section h2 em,
body:not(.admin-body) .recommendation-section h2 em {
  color: var(--ink);
}

body:not(.admin-body) .control-hint {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.45;
}

body:not(.admin-body) .measurement-grid {
  gap: 8px;
  margin: 9px 0;
}

body:not(.admin-body) .measurement-grid > label {
  gap: 4px;
  font-size: 10px;
  font-weight: 650;
}

body:not(.admin-body) .measurement-input {
  height: 39px;
  border-color: #ded9d2;
  border-radius: 10px;
  background: #fff;
}

body:not(.admin-body) .measurement-input input {
  padding: 0 9px;
  font-size: 14px;
}

body:not(.admin-body) .measurement-assist {
  margin: 0 0 8px;
}

body:not(.admin-body) .measurement-assist span {
  font-size: 9px;
}

body:not(.admin-body) .measurement-help,
body:not(.admin-body) .fit-assessment,
body:not(.admin-body) .recommendation-card {
  border-color: #e1dcd5;
  border-radius: 11px;
  background: #fff;
}

body:not(.admin-body) .measurement-help {
  margin: 7px 0 9px;
}

body:not(.admin-body) .measurement-help summary {
  min-height: 38px;
  padding: 9px 10px;
  color: var(--ink);
  font-size: 11px;
}

body:not(.admin-body) .measurement-help-grid {
  gap: 7px;
  padding: 0 9px 9px;
}

body:not(.admin-body) .measurement-help-grid section {
  padding: 8px;
  border: 1px solid #ebe6e0;
  border-radius: 9px;
}

body:not(.admin-body) .fit-assessment {
  gap: 3px;
  padding: 10px;
}

body:not(.admin-body) .fit-assessment strong {
  font-size: 12px;
}

body:not(.admin-body) .recommendation-card {
  padding: 10px 11px;
}

body:not(.admin-body) .recommendation-stars {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

body:not(.admin-body) .recommendation-note {
  font-size: 9px;
}

body:not(.admin-body) .slider-row {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 9px;
  min-height: 48px;
  margin-bottom: 4px;
  padding: 0 4px;
  border-bottom: 1px solid #ebe6e0;
}

body:not(.admin-body) .slider-row label {
  color: #4e4943;
  font-weight: 650;
}

body:not(.admin-body) .slider-row output {
  color: var(--ink);
  font-weight: 700;
}

body:not(.admin-body) input[type="range"] {
  min-height: 34px;
  accent-color: var(--ink);
}

body:not(.admin-body) .privacy-note {
  margin: 0;
  padding: 14px 2px 20px;
  background: transparent;
}

body:not(.admin-body) .privacy-note p {
  padding: 11px;
  border: 1px solid #e3ded7;
  border-radius: 11px;
  background: #fff;
  color: #6f6962;
  font-size: 11px;
  line-height: 1.65;
}

body:not(.admin-body) .privacy-note p + p {
  margin-top: 8px;
}

body:not(.admin-body) .footer {
  display: none;
}

body:not(.admin-body) .modal {
  z-index: 40;
  align-items: end;
  padding: 16px max(16px, var(--phone-edge)) calc(16px + env(safe-area-inset-bottom));
  background: rgba(11, 11, 10, 0.62);
  
}

body:not(.admin-body) .modal-card {
  width: min(430px, 100%);
  max-height: 86dvh;
  padding: 19px;
  border-color: rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: #fbfaf7;
  box-shadow: 0 28px 80px rgba(13, 12, 10, 0.34);
}

body:not(.admin-body) .modal-head {
  margin-bottom: 14px;
}

body:not(.admin-body) .modal-close {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

body:not(.admin-body) .compare-grid {
  grid-template-columns: 1fr;
}

body:not(.admin-body) .compare-card {
  border-radius: 13px;
}

body:not(.admin-body) .toast {
  z-index: 50;
  bottom: calc(var(--dock-height) + 12px);
  width: max-content;
  max-width: min(400px, calc(100vw - 28px));
  border-radius: 12px;
  background: #26231f;
  text-align: center;
}

@media (max-width: 370px) {
  body:not(.admin-body) {
    --dock-height: clamp(292px, 43dvh, 350px);
  }

  body:not(.admin-body) .topbar {
    padding-right: 10px;
    padding-left: 10px;
  }

  body:not(.admin-body) .brand-name {
    font-size: 15px;
  }

  body:not(.admin-body) .toolbar {
    right: 8px;
    left: 8px;
    gap: 4px;
    padding: 4px;
  }

  body:not(.admin-body) .toolbar .btn {
    gap: 3px;
    padding: 0 3px;
    font-size: 10px;
  }

  body:not(.admin-body) .toolbar .btn svg {
    width: 13px;
    height: 13px;
  }

  body:not(.admin-body) .control-panel {
    padding-right: 11px;
    padding-left: 11px;
  }

  body:not(.admin-body) .customer-dock-header {
    margin-right: -11px;
    margin-left: -11px;
    padding-right: 11px;
    padding-left: 11px;
  }

  body:not(.admin-body) .frame-grid,
  body:not(.admin-body) .category-filter,
  body:not(.admin-body) .collection-filter {
    margin-right: -11px;
    margin-left: -11px;
    padding-right: 11px;
    padding-left: 11px;
  }
}

@media (min-width: 700px) {
  body:not(.admin-body)::after {
    content: "手机试戴预览";
    position: fixed;
    top: 50%;
    left: calc(50% + 244px);
    color: rgba(44, 42, 38, 0.42);
    font-size: 11px;
    letter-spacing: 0.18em;
    transform: translateY(-50%) rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.admin-body) *,
  body:not(.admin-body) *::before,
  body:not(.admin-body) *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body:not(.admin-body) .compare-original-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  color: #fff;
  background: rgba(26, 24, 21, 0.66);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  
  font-size: 12px;
  font-weight: 700;
  touch-action: none;
  user-select: none;
}

body:not(.admin-body) .compare-original-btn.active {
  color: #1f1c18;
  background: rgba(255, 255, 255, 0.92);
}

/*
 * 轻颜相机式移动布局（2026-08-26）
 * 首屏始终保留完整试戴画面；所有高级控制默认收起，按“调整”后进入底部抽屉。
 */
body:not(.admin-body) {
  --phone-width: 440px;
  --phone-edge: max(0px, calc((100vw - var(--phone-width)) / 2));
  background: #eef0f2;
}

body:not(.admin-body)::before {
  background: var(--stage);
  box-shadow: 0 0 0 1px rgba(15, 18, 22, 0.08), 0 16px 48px rgba(17, 24, 39, 0.16);
}

body:not(.admin-body) .topbar {
  min-height: 52px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 6px;
  background: transparent;
}

body:not(.admin-body) .brand-mark,
body:not(.admin-body) .privacy-badge {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(20, 21, 24, 0.56);
  
}

body:not(.admin-body) .brand-mark {
  display: none;
}

body:not(.admin-body) .brand-name {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 21, 24, 0.56);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  
}

body:not(.admin-body) .stage-panel {
  inset: 0 var(--phone-edge);
}

body:not(.admin-body) .stage {
  background: #0d0e10;
}

body:not(.admin-body) .stage canvas {
  object-fit: cover;
  filter: none;
}

body:not(.admin-body) .toolbar {
  top: auto;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(24, 25, 29, 0.76);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  
}

body:not(.admin-body) .toolbar .btn {
  flex-direction: column;
  gap: 2px;
  height: 48px;
  min-height: 48px;
  padding: 3px 1px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 10px;
  font-weight: 550;
  line-height: 1;
}

body:not(.admin-body) .toolbar .btn svg {
  width: 18px;
  height: 18px;
}

body:not(.admin-body) .toolbar .btn-primary,
body:not(.admin-body) .toolbar #cameraBtn.active,
body:not(.admin-body) .toolbar .btn-dark {
  border: 0;
}

body:not(.admin-body) .toolbar .btn:hover:not(:disabled),
body:not(.admin-body) .toolbar .btn:active:not(:disabled) {
  transform: none;
  background: rgba(255, 255, 255, 0.1);
}

body:not(.admin-body) .toolbar .customer-adjust-toggle {
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
}

body:not(.admin-body).customer-controls-open .toolbar .customer-adjust-toggle {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}


body:not(.admin-body).camera-mode .stage canvas {
  /* 允许实时画布超出舞台后被裁切；静态照片仍使用完整显示规则。 */
  max-width: none;
  max-height: none;
  object-fit: cover;
}

body:not(.admin-body) .drop-hint {
  padding: 80px 30px 96px;
}

body:not(.admin-body) .drop-hint strong {
  font-size: 16px;
  font-weight: 600;
}

body:not(.admin-body) .drop-hint span {
  max-width: 286px;
  font-size: 11px;
}

body:not(.admin-body) .status-line {
  right: 18px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  left: 18px;
  max-width: calc(100% - 36px);
  min-height: 26px;
  padding: 5px 10px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(20, 21, 24, 0.58);
  font-size: 10px;
}

body:not(.admin-body) .camera-quality {
  bottom: calc(111px + env(safe-area-inset-bottom));
  max-width: calc(100% - 36px);
  background: rgba(20, 21, 24, 0.66);
}

body:not(.admin-body) .compare-original-btn {
  right: 15px;
  bottom: calc(147px + env(safe-area-inset-bottom));
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(20, 21, 24, 0.6);
  font-size: 11px;
  box-shadow: none;
}

body:not(.admin-body) .customer-sheet-backdrop {
  position: fixed;
  inset: 0 var(--phone-edge);
  z-index: 16;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: rgba(4, 6, 9, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body:not(.admin-body) .control-panel {
  right: var(--phone-edge);
  bottom: 0;
  left: var(--phone-edge);
  z-index: 18;
  height: auto;
  max-height: min(72dvh, 650px);
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.16);
  visibility: hidden;
  transform: translateY(102%);
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.28, 1), visibility 0s linear 0.24s;
  
}

body:not(.admin-body).customer-controls-open .customer-sheet-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body:not(.admin-body).customer-controls-open .control-panel {
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

body:not(.admin-body) .customer-dock-header {
  margin: 0 -16px;
  padding: 7px 16px 10px;
  border-bottom: 1px solid #eceef0;
  background: #fff;
}

body:not(.admin-body) .customer-dock-grip {
  width: 34px;
  height: 3px;
  margin-bottom: 5px;
  background: #d7d9dd;
}

body:not(.admin-body) .customer-dock-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 7px;
}

body:not(.admin-body) .customer-dock-title-row strong {
  color: #1f2329;
  font-size: 15px;
  font-weight: 650;
}

body:not(.admin-body) .customer-dock-close {
  min-width: 48px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f4f5f6;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

body:not(.admin-body) .customer-dock-tabs {
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body:not(.admin-body) .customer-dock-tab {
  position: relative;
  height: 36px;
  border-radius: 0;
  color: #7b8189;
  font-size: 12px;
  font-weight: 560;
}

body:not(.admin-body) .customer-dock-tab.active {
  font-weight: 650;
}

body:not(.admin-body) .customer-dock-tab.active::after {
  content: "";
  position: absolute;
  right: 24%;
  bottom: -1px;
  left: 24%;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

body:not(.admin-body) .control-section {
  padding: 14px 0 18px;
}

body:not(.admin-body) .control-section + .control-section:not(.ui-panel-hidden) {
  border-top-color: #eceef0;
}

body:not(.admin-body) h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

body:not(.admin-body) .section-meta {
  border-radius: 6px;
  background: #f4f5f6;
  color: #7b8189;
}

body:not(.admin-body) .frame-item,
body:not(.admin-body) .customer-filter-drawer,
body:not(.admin-body) .measurement-help,
body:not(.admin-body) .fit-assessment,
body:not(.admin-body) .recommendation-card,
body:not(.admin-body) .privacy-note p {
  border-color: #e5e7eb;
  border-radius: 10px;
  box-shadow: none;
}

body:not(.admin-body) .frame-item.active {
  border-color: var(--ink);
  background: var(--surface-soft);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong);
}

body:not(.admin-body) .chip.active,
body:not(.admin-body) .frame-item-actions button.active {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}


body:not(.admin-body) .toast {
  bottom: calc(84px + env(safe-area-inset-bottom));
  border-radius: 10px;
}

body:not(.admin-body) .photo-mode-card .modal-head {
  align-items: flex-start;
}

body:not(.admin-body) .photo-mode-card .modal-head > div {
  min-width: 0;
}

body:not(.admin-body) .photo-mode-card .modal-head p {
  margin: 4px 0 0;
  color: #7b8189;
  font-size: 12px;
}

body:not(.admin-body) .photo-mode-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

body:not(.admin-body) .photo-mode-actions .btn {
  height: 46px;
  min-height: 46px;
  border-radius: 10px;
  font-size: 13px;
}

body:not(.admin-body) .photo-mode-tip {
  margin: 12px 1px 0;
  color: #8f959e;
  font-size: 11px;
  line-height: 1.55;
}

body:not(.admin-body).customer-controls-open .toast {
  bottom: min(74dvh, 670px);
}

@media (max-width: 370px) {
  body:not(.admin-body) .toolbar {
    right: 8px;
    left: 8px;
    gap: 0;
    padding: 5px;
  }

  body:not(.admin-body) .toolbar .btn {
    height: 46px;
    min-height: 46px;
    font-size: 9px;
  }

  body:not(.admin-body) .control-panel {
    padding-right: 12px;
    padding-left: 12px;
  }

  body:not(.admin-body) .customer-dock-header {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }
}
/* 第二阶段：店铺入口、可恢复加载与手机保存。 */
body:not(.admin-body) .shop-heading { display: grid; min-width: 0; gap: 3px; }
body:not(.admin-body) .shop-heading .brand-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.admin-body) #shopSubtitle { color: #d9dce2; font-size: 11px; line-height: 1.4; }
body:not(.admin-body) .topbar .brand { min-width: 0; flex: 1; }
body:not(.admin-body) .topbar .brand-mark { flex-shrink: 0; }
body:not(.admin-body) .topbar .header-actions { flex-shrink: 0; }
body:not(.admin-body) button.privacy-badge { width: 44px; height: 44px; cursor: pointer; }
body:not(.admin-body) .current-product { position: absolute; top: calc(76px + env(safe-area-inset-top)); left: 18px; right: 18px; z-index: 5; display: grid; gap: 3px; padding: 10px 12px; color: #fff; background: rgba(20, 21, 24, .7); border-radius: 10px; pointer-events: none; }
body:not(.admin-body) .current-product strong, body:not(.admin-body) .current-product span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body:not(.admin-body) .current-product strong { font-size: 14px; }
body:not(.admin-body) .current-product span { color: #d9dce2; font-size: 12px; }
body:not(.admin-body) .drop-hint { padding: calc(146px + env(safe-area-inset-top)) 24px calc(110px + env(safe-area-inset-bottom)); overflow-y: auto; pointer-events: auto; }
body:not(.admin-body) .drop-hint > svg { display: none; }
body:not(.admin-body) .drop-hint .entry-product-image { width: 100%; max-width: 290px; height: clamp(72px, 18dvh, 160px); object-fit: contain; padding: 16px; border-radius: 16px; background: #f5f5f4; box-sizing: border-box; }
body:not(.admin-body) .drop-hint strong { overflow-wrap: anywhere; flex-shrink: 0; }
body:not(.admin-body) .drop-hint span { color: #c7cbd2; font-size: 13px; line-height: 1.7; flex-shrink: 0; }
body:not(.admin-body) .drop-hint .btn { flex-shrink: 0; min-height: 44px; }
body:not(.admin-body) .stage .overlay { z-index: 8; padding: 150px 24px 120px; text-align: center; background: rgba(13, 14, 16, .94); color: #fff; }
body:not(.admin-body) .stage .overlay p { overflow-wrap: anywhere; line-height: 1.7; }
body:not(.admin-body) #cancelTryOnBtn { color: #fff; border-color: #747a84; }
body:not(.admin-body) .status-line { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
body:not(.admin-body) .toolbar .btn { font-size: 11px; }
body:not(.admin-body) .modal-card { overflow-y: auto; overscroll-behavior: contain; }
body:not(.admin-body) .measurement-input input, body:not(.admin-body) .frame-search, body:not(.admin-body) .customer-filter-grid select { font-size: 16px; }
body:not(.admin-body) .customer-dock-tab, body:not(.admin-body) .customer-dock-close, body:not(.admin-body) .frame-item-actions button { min-height: 44px; }
body:not(.admin-body) .privacy-note p { font-size: 13px; line-height: 1.8; }
body:not(.admin-body) .save-dialog { width: min(398px, calc(100vw - 32px)); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); box-sizing: border-box; padding: 20px; border: 0; border-radius: 20px; background: #fff; color: #1f2329; overflow-y: auto; overscroll-behavior: contain; }
body:not(.admin-body) .save-dialog::backdrop { background: rgba(8, 10, 14, .75); }
body:not(.admin-body) #savePreview { display: block; width: 100%; max-height: 48dvh; object-fit: contain; background: #f4f5f6; border-radius: 10px; -webkit-touch-callout: default; user-select: auto; }
body:not(.admin-body) .save-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body:not(.admin-body) .save-actions .btn { min-height: 44px; text-decoration: none; }
body:not(.admin-body) #saveHint { font-size: 13px; line-height: 1.7; }
body:not(.admin-body) .save-help { font-size: 12px; color: #626a76; line-height: 1.7; }
body:not(.admin-body) .hidden { display: none !important; }
@media (max-height: 540px) {
  body:not(.admin-body) { --phone-width: 760px; }
  body:not(.admin-body) .drop-hint { justify-content: flex-start; padding-top: 142px; }
  body:not(.admin-body) .drop-hint .entry-product-image { height: 54px; padding: 6px; flex-shrink: 0; }
  body:not(.admin-body) .entry-product-image:not(.hidden) + strong { display: none; }
  body:not(.admin-body) .drop-hint span { max-width: 520px; }
  body:not(.admin-body) .stage .overlay { padding-top: 80px; padding-bottom: 100px; overflow-y: auto; }
  body:not(.admin-body) .control-panel { max-height: 80dvh; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.admin-body) *, body:not(.admin-body) *::before, body:not(.admin-body) *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
