/* ==========================================================================
   知愈 RING · 纯白极简黑白风官网 (v6 Pure Monochrome Edition)
   纯白留白背景、克制黑白灰字阶、无单选圆点小胶囊选款、内联智能地址、动态App展台、悬浮视频窗
   ========================================================================== */

:root,
[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-subtle: #F5F5F7;
  --surface-hover: #ECECF0;
  --stage-bg: #F5F5F7;
  --title: #1D1D1F;
  --text: #424245;
  --muted: #86868B;
  --ink-solid: #1D1D1F;
  --ink-on-solid: #FFFFFF;
  --line: #EBEBEF;
  --line-strong: #D2D2D7;
  --ok: #1D1D1F;
  --danger: #D93829;
  --backdrop: rgba(0, 0, 0, 0.44);
  --float-bg: rgba(24, 24, 27, 0.90);
  --float-fg: #FFFFFF;
}

[data-theme="dark"] {
  --bg: #0A0A0C;
  --surface: #141417;
  --surface-subtle: #1E1E23;
  --surface-hover: #28282E;
  --stage-bg: #16161A;
  --title: #F5F5F7;
  --text: #B4B4B9;
  --muted: #7C7C82;
  --ink-solid: #F5F5F7;
  --ink-on-solid: #111113;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --ok: #F5F5F7;
  --danger: #F06253;
  --backdrop: rgba(0, 0, 0, 0.72);
  --float-bg: rgba(38, 38, 43, 0.92);
  --float-fg: #F5F5F7;
}

:root {
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

button:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible {
  outline: 1.5px solid var(--title);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* ─────────────── 1. 纯白极简顶栏 (44px) ─────────────── */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 44px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
}

.global-nav-inner {
  max-width: 960px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--title);
}

.brand-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.brand-link span {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.15s;
}

.nav-item.is-active {
  background: var(--surface-subtle);
  color: var(--title);
  font-weight: 500;
}

.theme-pill {
  margin-left: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  color: var(--text);
}

/* ─────────────── 2. 首屏留白大图 + 极简小胶囊选配区 ─────────────── */
.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 88px;
}

.minimal-hero-head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.minimal-hero-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.minimal-hero-head h1 {
  font-size: 21px;
  font-weight: 600;
  color: var(--title);
  letter-spacing: -0.02em;
}

.minimal-hero-sub {
  font-size: 12px;
  color: var(--muted);
}

.hero-video-pill {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  color: var(--title);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.hero-video-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--ink-solid);
  color: var(--ink-on-solid);
  font-size: 8px;
  display: inline-grid;
  place-items: center;
  padding-left: 1px;
}

.buy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

@media (min-width: 820px) {
  .page-shell {
    padding: 32px 24px 96px;
  }
  .minimal-hero-head {
    margin-bottom: 20px;
  }
  .minimal-hero-head h1 {
    font-size: 24px;
  }
  .buy-layout {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
  }
  .viewer-col {
    position: sticky;
    top: 68px;
  }
}

/* 纯净无遮挡实拍画廊 */
.viewer-stage-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--stage-bg);
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 3 / 2;
  scroll-snap-align: center;
  overflow: hidden;
  background: var(--stage-bg);
}

.carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide img.is-contain {
  object-fit: contain;
  padding: 10px;
  background: #F4F1EC;
}

.carousel-bar {
  margin-top: 8px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.carousel-caption {
  font-size: 11.5px;
  color: var(--muted);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.c-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: transform 0.18s, background-color 0.18s;
}

.c-dot.is-active {
  background: var(--title);
  transform: scale(1.25);
}

/* ─────────────── 3. 纯黑白极简小胶囊选配 + 内联智能收件 ─────────────── */
.config-flow {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cfg-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfg-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cfg-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.cfg-label strong {
  color: var(--title);
  font-weight: 500;
  margin-left: 6px;
}

.subtle-link {
  font-size: 11.5px;
  color: var(--title);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}

/* 款式极简胶囊（无单选圆圈，纯黑白胶囊切换） */
.sku-capsules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sku-pill {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.16s, color 0.16s, transform 0.12s;
}

.sku-pill em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

.sku-pill.is-selected {
  background: var(--ink-solid);
  color: var(--ink-on-solid);
  font-weight: 500;
}

.sku-pill.is-selected em {
  opacity: 0.92;
}

.sku-pill:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 颜色矿物圆点 */
.color-row-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-dot-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  padding: 2.5px;
  border: 1.5px solid transparent;
  transition: border-color 0.15s;
}

.color-dot-btn.is-active {
  border-color: var(--title);
}

.color-dot-core {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.color-dot-core.black { background: radial-gradient(circle at 32% 28%, #48484A, #141416); }
.color-dot-core.silver { background: radial-gradient(circle at 32% 28%, #F6F6F8, #B0B4BC); border: 1px solid rgba(0, 0, 0, 0.08); }
.color-dot-core.gold { background: radial-gradient(circle at 32% 28%, #EFE0BE, #B89458); }

/* 尺码小胶囊 */
.size-capsules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.size-pill {
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: all 0.14s;
}

.size-pill.is-selected {
  background: var(--ink-solid);
  color: var(--ink-on-solid);
  font-weight: 500;
}

/* 显眼的在线测指围入口胶囊按钮 */
.measure-cta-pill {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.25px solid var(--title);
  background: var(--surface);
  color: var(--title);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.15s, color 0.15s;
}

.measure-cta-pill:active {
  background: var(--ink-solid);
  color: var(--ink-on-solid);
}

/* 带真实指模实拍图的同单加购卡片 */
.sizer-addon-card {
  margin-top: 4px;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  border: 1.25px solid var(--line);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.sizer-addon-card.is-checked {
  border-color: var(--title);
  background: var(--surface);
}

.sizer-addon-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #F4F1EC;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.sizer-addon-meta {
  flex: 1;
  min-width: 0;
}

.sizer-addon-meta strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--title);
}

.sizer-addon-meta span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.sizer-addon-check {
  width: 16px;
  height: 16px;
  accent-color: var(--ink-solid);
  flex-shrink: 0;
  margin-left: 2px;
}

.sizer-addon-meta strong em {
  font-style: normal;
  font-weight: 600;
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}

/* 内联收件与智能识别区（不弹框，直接紧凑填写） */
.shipping-card {
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smart-tools-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tool-pill-btn {
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  font-size: 11px;
  color: var(--title);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.15s;
}

.tool-pill-btn:hover {
  background: var(--surface-hover);
}

.smart-paste-box {
  background: var(--surface-subtle);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.smart-paste-box textarea {
  width: 100%;
  min-height: 52px;
  border: none;
  background: transparent;
  resize: none;
  font-size: 12px;
  color: var(--title);
  line-height: 1.5;
}

.smart-paste-box textarea:focus {
  outline: none;
}

.smart-paste-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.input-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.clean-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface-subtle);
  color: var(--title);
  font-size: 12.5px;
  transition: border-color 0.15s, background-color 0.15s;
}

.clean-input::placeholder {
  color: var(--muted);
}

.clean-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--title);
}

.email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.chip-btn {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-subtle);
  font-size: 11px;
  color: var(--text);
}

/* 付款胶囊切页与核对下单底栏 */
.seg-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-subtle);
}

.seg-tab-btn {
  height: 30px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.15s;
}

.seg-tab-btn.is-selected {
  background: var(--surface);
  color: var(--title);
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.checkout-bar {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-price-col strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--title);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.checkout-price-col span {
  font-size: 11px;
  color: var(--muted);
}

.primary-btn {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  background: var(--ink-solid);
  color: var(--ink-on-solid);
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.15s;
}

.primary-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.cta-review-btn {
  width: auto;
  padding: 0 22px;
  height: 38px;
  white-space: nowrap;
}

.secondary-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 12px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.danger-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger);
  font-size: 11.5px;
}

.form-banner {
  padding: 7px 11px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--danger);
  font-size: 11.5px;
}

/* ─────────────── 4. 配套知愈 App 动态切屏展台（自动轮播 + 进度条） ─────────────── */
.app-showcase {
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.showcase-header {
  text-align: center;
  margin-bottom: 18px;
}

.showcase-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--title);
  letter-spacing: -0.01em;
}

.showcase-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-subtle);
  margin: 12px auto 0;
}

.showcase-tab {
  position: relative;
  overflow: hidden;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.2s;
}

.showcase-tab.is-active {
  background: var(--surface);
  color: var(--title);
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.showcase-tab-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 1.5px;
  background: transparent;
  overflow: hidden;
}

.showcase-tab.is-active .showcase-tab-bar::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--title);
  transform-origin: left center;
  animation: tabProgress 3.8s linear forwards;
}

.app-showcase.is-paused .showcase-tab.is-active .showcase-tab-bar::after {
  animation-play-state: paused;
}

@keyframes tabProgress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.showcase-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.phone-mockup {
  position: relative;
  width: 214px;
  aspect-ratio: 9 / 19.5;
  border-radius: 30px;
  padding: 7px;
  background: #1D1D1F;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.11);
}

[data-theme="dark"] .phone-mockup {
  background: #2A2A2F;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.phone-screen-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 23px;
  overflow: hidden;
  background: var(--stage-bg);
}

.phone-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.46s ease, transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.phone-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.showcase-caption-box {
  text-align: center;
  max-width: 320px;
}

.showcase-caption-box strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--title);
}

.showcase-caption-box p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* 极简折叠问答 */
.accordion-list {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-item summary {
  list-style: none;
  padding: 14px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--title);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-item summary::after {
  content: "+";
  font-size: 15px;
  color: var(--muted);
}

.accordion-item[open] summary::after {
  content: "−";
}

.accordion-body {
  padding-bottom: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
}

/* ─────────────── 5. 右下角显眼动态画中画（PiP）真机视频浮窗 ─────────────── */
.floating-video-pip {
  position: fixed;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.floating-video-pip.is-yielding {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.pip-callout-tip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--float-bg);
  color: var(--float-fg);
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  animation: pipBob 2.6s ease-in-out infinite;
}

@keyframes pipBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.pip-card-shell {
  position: relative;
  width: 90px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  background: #161618;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease;
}

/* 向下滚动填表时自动收拢成小胶囊，不挡右侧输入与定位按钮 */
.floating-video-pip.is-compact .pip-callout-tip,
.floating-video-pip.is-compact .pip-bottom-bar,
.floating-video-pip.is-compact .pip-dismiss {
  display: none;
}

.floating-video-pip.is-compact .pip-card-shell {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.floating-video-pip.is-compact .pip-center-play {
  top: 50%;
  width: 26px;
  height: 26px;
  font-size: 10px;
}

[data-theme="dark"] .pip-card-shell {
  border-color: rgba(255, 255, 255, 0.28);
}

.pip-trigger {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  color: #FFFFFF;
}

.pip-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pip-center-play {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1D1D1F;
  font-size: 13px;
  display: grid;
  place-items: center;
  padding-left: 2px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.pip-center-play::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.78);
  animation: pipPulse 2.2s ease-out infinite;
}

@keyframes pipPulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.36); opacity: 0; }
}

.pip-bottom-bar {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 6px 6px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 100%);
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pip-dismiss {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.56);
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* ─────────────── 6. 弹窗（核对订单 / 测指围图示 / 视频 / 客服 / 收银台） ─────────────── */
.phone-os-row {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 7px;
  align-items: center;
}

.phone-os-tabs {
  height: 36px;
}

.phone-os-tabs .seg-tab-btn {
  height: 30px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

#serviceModal {
  z-index: 86;
}

#confirmModal {
  z-index: 90;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 16px;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 420px;
  max-height: 90svh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  position: relative;
}

@media (min-width: 640px) {
  .modal-sheet {
    border-radius: 20px;
    padding: 20px;
  }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-head h2,
.sheet-head h3 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--title);
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text);
  font-size: 16px;
  display: grid;
  place-items: center;
}

/* 核对订单确认单表格 */
.review-list {
  background: var(--surface-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 12.5px;
}

.review-row span {
  color: var(--muted);
  white-space: nowrap;
}

.review-row strong {
  color: var(--title);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.terms-slim {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}

.terms-slim input {
  margin-top: 2px;
  accent-color: var(--ink-solid);
}

/* 测指围纯黑白极简矢量图示 */
.illus-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 10px 0;
}

.illus-card {
  background: var(--surface-subtle);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
}

.illus-card svg {
  width: 100%;
  height: 56px;
  display: block;
  margin: 0 auto 4px;
  color: var(--title);
}

.illus-card strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--title);
}

.illus-card span {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
}

.photo-guide-diagram {
  background: var(--surface-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.photo-guide-diagram svg {
  width: 112px;
  height: 66px;
  flex-shrink: 0;
  color: var(--title);
}

.photo-calibrator-wrap {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  background: #121214;
}

.photo-calibrator-wrap canvas {
  width: 100%;
  height: 196px;
  display: block;
}

.gentle-tip-bar {
  margin-top: 10px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--surface-subtle);
  font-size: 11.5px;
  color: var(--muted);
}

/* 视频与收银台 */
.video-theater {
  width: 100%;
  max-width: 360px;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  margin: auto;
}

.video-theater .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.55);
  color: #FFF;
}

.video-theater video {
  width: 100%;
  max-height: 82svh;
  display: block;
}

.qr-frame {
  margin: 10px auto;
  width: 206px;
  min-height: 210px;
  padding: 8px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.qr-frame img {
  max-width: 188px;
  max-height: 244px;
  width: auto;
  height: auto;
  display: block;
}

.pay-code-card {
  margin: 10px 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 查单与后台 */
.narrow-wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.card-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.timeline { display: flex; flex-direction: column; gap: 9px; margin: 12px 0; }
.tl-step { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; background: var(--line-strong); flex-shrink: 0; }
.tl-step.is-done { color: var(--text); }
.tl-step.is-done .tl-dot { background: var(--title); }
.tl-step.is-current { color: var(--title); font-weight: 500; }
.tl-step.is-current .tl-dot { background: var(--title); }
.status-pill { padding: 3px 9px; border-radius: 999px; font-size: 11px; background: var(--surface-subtle); color: var(--title); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.kpi-card { background: var(--surface-subtle); border-radius: 12px; padding: 11px; }
.kpi-card span { font-size: 11px; color: var(--muted); }
.kpi-card strong { display: block; margin-top: 3px; font-size: 18px; font-weight: 600; color: var(--title); }
.admin-order-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.admin-order-actions, .admin-order-secondary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-order-secondary { margin-inline-start: auto; }
#adminStatusFilters [aria-pressed="true"] { background: var(--ink-solid); color: var(--ink-on-solid); }
.inline-input { background: var(--surface-subtle); border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 8px; font-size: 12px; color: var(--title); }

.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: var(--ink-solid);
  color: var(--ink-on-solid);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
}

.site-footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* 知愈 App 双主题展示 */
.app-dual-card { position:relative; overflow:hidden; border-radius:26px; padding:36px 24px 30px; color:#f7f1e7; text-align:center; background:linear-gradient(107deg,#090b0d 0%,#10100f 51%,#d4c6ae 51.5%,#f5f0e6 55%,#eee8dc 100%); }
.app-dual-copy { position:relative; z-index:1; text-align:left; max-width:520px; margin:0 auto 24px; }
.app-dual-eyebrow { color:#d4b47f; font-size:11px; letter-spacing:.08em; }
.app-dual-copy h2 { color:#fff9ef; font-family:serif; font-size:clamp(25px,4vw,36px); margin:8px 0; }
.app-dual-copy p { color:#d5cec1; font-size:13px; line-height:1.7; }
.app-dual-phones { display:flex; justify-content:center; align-items:end; gap:12px; position:relative; z-index:1; }
.app-dual-phone { width:min(38%,220px); margin:0; }
.app-device { padding:4px; border:1px solid #ad9168; border-radius:21px; background:#1d1a17; box-shadow:0 18px 35px #0007; overflow:hidden; }
.app-device img { display:block; width:100%; height:auto; border-radius:16px; }
.app-dual-phone figcaption { margin-top:16px; padding:7px 5px; border-radius:99px; font-size:11px; white-space:nowrap; }
.app-dual-light figcaption { background:#f4f0e8; color:#5f5545; }
.app-dual-dark figcaption { background:#201b18; color:#e6d2ad; }
.app-dual-download { display:inline-block; position:relative; z-index:1; margin-top:28px; padding:10px 20px; border:1px solid #b99b70; border-radius:99px; background:#1c1916; color:#f8eddb; font-size:13px; text-decoration:none; }
.app-dual-download:hover { background:#403125; }
@media (max-width:480px) { .app-dual-card { padding:28px 16px 26px; } .app-dual-copy { margin-bottom:20px; } .app-dual-phone { width:44%; } .app-dual-phones { gap:8px; } .app-device { border-radius:16px; padding:3px; } .app-device img { border-radius:12px; } .app-dual-phone figcaption { font-size:10px; } }

.app-page-picker { position:relative; z-index:1; display:flex; justify-content:center; gap:5px; width:max-content; max-width:100%; margin:22px auto 0; padding:5px; border:1px solid #9e8664; border-radius:99px; background:#211d19; }
.app-page-picker button { border:0; border-radius:99px; padding:8px 16px; color:#d7cbbb; background:transparent; cursor:pointer; font-size:12px; }
.app-page-picker button.is-active { background:#e9d6b8; color:#29211a; }
.app-page-picker button:focus-visible { outline:2px solid #fff; outline-offset:2px; }
@media (max-width:480px) { .app-page-picker button { padding:8px 12px; } }

/* 交错的光与星点缓慢流动，呼应演示片中的晨星与星夜。 */
.app-dual-card::before,.app-dual-card::after { content:""; position:absolute; pointer-events:none; inset:-35%; }
.app-dual-card::before { background:linear-gradient(107deg,#090b0d 0%,#10100f 48.5%,#c8b89d 49.5%,#fff8e8 50.5%,#eee8dc 53%,#eee8dc 100%); animation:app-light-drift 9s ease-in-out infinite alternate; }
.app-dual-card::after { inset:0; opacity:.65; background-image:radial-gradient(circle at 12% 16%,#e6d0aa 0 1px,transparent 2px),radial-gradient(circle at 35% 40%,#e6d0aa 0 1px,transparent 2px),radial-gradient(circle at 22% 72%,#e6d0aa 0 1px,transparent 2px),radial-gradient(circle at 43% 82%,#e6d0aa 0 1px,transparent 2px); animation:app-stars 4s ease-in-out infinite alternate; }
@keyframes app-light-drift { from { transform:translateX(-8%); } to { transform:translateX(8%); } }
@keyframes app-stars { from { opacity:.25; } to { opacity:.85; } }
.app-screen { position:relative; }
.app-demo-planets { display:none; position:absolute; inset:0; overflow:hidden; border-radius:16px; pointer-events:none; }
.show-relation-demo .app-demo-planets { display:block; }
.app-demo-label { position:absolute; top:11.5%; left:4%; font-size:clamp(6px,1vw,9px); padding:3px 5px; border-radius:4px; color:#665d50; background:#e6e8e5; white-space:nowrap; }
.app-dual-dark .app-demo-label { color:#c9bda9; background:#12120f; }
.app-demo-planets i { position:absolute; width:12%; aspect-ratio:1; border-radius:50%; box-shadow:0 0 10px #d8c39988, inset -4px -3px 6px #0005; animation:app-planet-float 5s ease-in-out infinite alternate; }
.app-demo-planets i:nth-of-type(1) { left:20%; top:32%; background:radial-gradient(circle at 30% 25%,#e6d0b2,#ad806e 52%,#583b40); }
.app-demo-planets i:nth-of-type(2) { left:72%; top:34%; background:radial-gradient(circle at 30% 25%,#f3ddaf,#9ca68f 55%,#495c61); animation-delay:-2s; }
.app-demo-planets i:nth-of-type(3) { left:68%; top:49%; width:9%; background:radial-gradient(circle at 30% 25%,#f7e6c5,#c6a26d 54%,#745641); animation-delay:-3s; }
@keyframes app-planet-float { to { transform:translateY(-5px); } }
.showcase-paused .showcase-tab.is-active .showcase-tab-bar::after { animation-play-state:paused; }
@media (prefers-reduced-motion:reduce) { .app-dual-card::before,.app-dual-card::after,.app-demo-planets i,.showcase-tab.is-active .showcase-tab-bar::after { animation:none; } }

/* 新界面在原界面上轻轻滑入，始终保留完整画面。 */
.app-screen { overflow:hidden; border-radius:16px; }
.app-transition-frame { position:absolute; inset:0; overflow:hidden; opacity:0; transform:translateX(4%); transition:opacity .48s ease, transform .48s cubic-bezier(.22,1,.36,1); pointer-events:none; }
.app-transition-frame.is-visible { opacity:1; transform:translateX(0); }
@media (prefers-reduced-motion:reduce) { .app-transition-frame { transition:none; } }

/* 店主行为看板 */
.analytics-dashboard { color:var(--title); }
.analytics-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin:24px 0 18px; }
.analytics-heading h1 { font-size:clamp(24px, 4vw, 34px); font-weight:600; line-height:1.2; }
.analytics-heading-actions { display:flex; flex-wrap:wrap; gap:8px; }
#analyticsShare h2 { font-size:15px; font-weight:650; }
.launch-maintenance { margin-bottom:14px; }
.launch-maintenance h2 { color:var(--title); font-size:15px; }
.launch-maintenance p { margin:8px 0; color:var(--text); font-size:13px; }
.analytics-test-link { display:inline-flex; align-items:center; text-decoration:none; white-space:nowrap; }
.analytics-test-banner { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:12px 0; padding:10px 14px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface-subtle); color:var(--text); }
.analytics-test-banner[hidden] { display:none; }
.analytics-test-banner a { color:var(--title); white-space:nowrap; }
.analytics-note { color:var(--text); font-size:12px; line-height:1.6; margin:12px 0; }
.analytics-filter-status { display:flex; justify-content:space-between; align-items:baseline; gap:12px; min-height:43px; }
.analytics-reset { align-self:center; color:var(--title); font-size:12px; text-decoration:underline; text-underline-offset:3px; white-space:nowrap; }
.analytics-view-switch { display:flex; align-items:center; gap:4px; width:fit-content; padding:4px; margin-bottom:16px; border:1px solid var(--line); border-radius:11px; background:var(--surface-subtle); }
.analytics-view-switch button { padding:7px 14px; border-radius:8px; color:var(--text); font-size:13px; font-weight:600; }
.analytics-view-switch button[aria-pressed="true"] { background:var(--ink-solid); color:var(--ink-on-solid); }
#analyticsReport[aria-busy="true"] { opacity:.5; pointer-events:none; }
.analytics-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:10px; margin:12px 0 20px; }
.analytics-watch-total { margin-top:16px; font-weight:600; }
.analytics-kpi,.analytics-panel { background:var(--surface); border:1px solid var(--line); border-radius:16px; }
.analytics-kpi { padding:16px; display:flex; flex-direction:column; gap:4px; min-width:0; }
.analytics-kpi span,.analytics-kpi small { color:var(--text); font-size:12px; }
.analytics-kpi strong { font-size:clamp(20px, 2.5vw, 28px); font-weight:600; font-variant-numeric:tabular-nums; }
.analytics-kpi:nth-child(3),.analytics-kpi:nth-child(4) { background:var(--surface-subtle); }
.analytics-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.analytics-filters label { display:flex; flex-direction:column; gap:6px; color:var(--text); font-size:12px; }
.analytics-filters select,.analytics-filters input { width:100%; border:1px solid var(--line-strong); border-radius:9px; padding:9px 10px; color:var(--title); background:var(--surface); font:inherit; }
.analytics-charts { display:grid; grid-template-columns:1.65fr 1fr; gap:12px; margin:16px 0; }
.analytics-panel { padding:20px; min-width:0; }
.analytics-panel h2 { font-size:16px; font-weight:600; }
.analytics-panel > p,.analytics-activity-head p { color:var(--text); font-size:12px; margin:4px 0; }
.analytics-bar-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; align-items:center; font-size:12px; margin-top:14px; }
.analytics-bar-row span { overflow-wrap:anywhere; }
.analytics-bar-row b { text-align:right; font-variant-numeric:tabular-nums; }
.analytics-bar-row small { color:var(--text); white-space:nowrap; }
.analytics-bar-track { height:6px; min-width:0; border-radius:999px; overflow:hidden; background:var(--surface-subtle); }
.analytics-bar-track i { display:block; height:100%; border-radius:999px; background:#957343; }
#analyticsVisitors .analytics-bar-track { grid-column:1/-1; }
#analyticsVisitors .analytics-bar-track i { background:var(--ink-solid); }
.analytics-activity { margin-bottom:22px; }
.analytics-table-wrap { overflow:auto; }
.analytics-table-wrap table { border-collapse:collapse; width:100%; min-width:560px; font-size:12px; text-align:left; }
.analytics-table-wrap th { color:var(--text); font-weight:500; }
.analytics-table-wrap th,.analytics-table-wrap td { border-bottom:1px solid var(--line); padding:10px 8px; }
@media(max-width:720px) {
  .analytics-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .analytics-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .analytics-charts { grid-template-columns:1fr; }
}
