/* ===========================================================================
   冠宇全球网络服务 — Liquid Glass (storefront prototype)

   Scope: 首页 / 商品详情 / 购买 Bottom Sheet（其余页面沿用原样式）。
   纯 CSS：只用 transform / opacity / backdrop-filter，不用 canvas / WebGL / 高频 JS。
   降低动效与不支持 backdrop-filter 的设备都有降级方案。
   =========================================================================== */

:root {
  /* 液态玻璃调色：极浅蓝紫，低饱和 */
  --lg-ink: #1d1d1f;
  --lg-ink-2: #6e6e73;
  --lg-ink-3: #86868b;
  --lg-accent: #5b6cff;          /* 蓝紫之间 */
  --lg-accent-2: #0071e3;
  --lg-glass: rgba(255, 255, 255, 0.58);
  --lg-glass-strong: rgba(255, 255, 255, 0.74);
  --lg-glass-weak: rgba(255, 255, 255, 0.34);
  --lg-stroke: rgba(255, 255, 255, 0.66);
  --lg-stroke-soft: rgba(255, 255, 255, 0.38);
  --lg-shadow: 0 10px 40px rgba(24, 32, 64, 0.1);
  --lg-shadow-lift: 0 18px 50px rgba(24, 32, 64, 0.16);
  --lg-radius: 24px;
  --lg-radius-lg: 30px;
  --lg-ease-spring: cubic-bezier(0.22, 1.12, 0.32, 1);
  --lg-ease-out: cubic-bezier(0.22, 0.8, 0.28, 1);
  --lg-fast: 150ms;
  --lg-card: 220ms;
  --lg-sheet: 340ms;
  --lg-blur: 24px;
}

/* ------------------------------------------------------------- 背景：柔和渐变 */
body {
  background: #eef1f8;
}
body::before {
  content: '';
  position: fixed;
  inset: -20% -10%;
  z-index: -2;
  background:
    radial-gradient(48% 42% at 18% 12%, rgba(186, 205, 255, 0.75), transparent 70%),
    radial-gradient(46% 40% at 82% 8%, rgba(214, 199, 255, 0.7), transparent 72%),
    radial-gradient(52% 46% at 72% 82%, rgba(255, 214, 233, 0.55), transparent 74%),
    radial-gradient(46% 44% at 12% 88%, rgba(206, 240, 255, 0.6), transparent 72%),
    linear-gradient(168deg, #f7f8fc 0%, #eef1fa 45%, #f6f3fb 100%);
  filter: saturate(112%);
  animation: lg-drift 34s ease-in-out infinite alternate;
  will-change: transform;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
@keyframes lg-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-1.4%, 1.1%, 0) scale(1.04); }
  100% { transform: translate3d(1.2%, -1.2%, 0) scale(1.02); }
}

/* ------------------------------------------------- 导航：悬浮玻璃条 */
body[data-surface='lg'] .site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  border-bottom: none;
  padding: 10px 12px 0;
}
body[data-surface='lg'] .site-header__inner {
  max-width: var(--container, 1200px);
  margin: 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--lg-glass-strong);
  backdrop-filter: blur(var(--lg-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(150%);
  border: 1px solid var(--lg-stroke);
  box-shadow: var(--lg-shadow);
}
body[data-surface='lg'] .site-nav a {
  border-radius: 999px;
  padding: 7px 12px;
  transition: background var(--lg-fast) var(--lg-ease-out), transform var(--lg-fast) var(--lg-ease-out);
}
body[data-surface='lg'] .site-nav a:hover { background: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
body[data-surface='lg'] .site-nav a.is-active { background: rgba(91, 108, 255, 0.14); color: var(--lg-accent); }

/* --------------------------------------------------------------- 通用玻璃 */
.lg-glass {
  position: relative;
  background: var(--lg-glass);
  backdrop-filter: blur(var(--lg-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(140%);
  border: 1px solid var(--lg-stroke);
  border-radius: var(--lg-radius);
  box-shadow: var(--lg-shadow);
  overflow: hidden;
}
/* 顶部高光 + 柔和内阴影（不刺眼、无彩虹边） */
.lg-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.06) 32%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(120% 60% at 12% -8%, rgba(255, 255, 255, 0.55), transparent 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -18px 34px rgba(120, 132, 180, 0.08);
}
.lg-glass > * { position: relative; z-index: 1; }

/* --------------------------------------------------------------- 首页 Hero */
.lg-hero {
  margin: 14px 0 18px;
  padding: 26px 22px;
  border-radius: var(--lg-radius-lg);
  text-align: left;
}
.lg-hero h1 {
  font-size: clamp(26px, 6vw, 40px);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.lg-hero p { color: var(--lg-ink-2); margin: 0 0 14px; }
.lg-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-pill {
  font-size: 13px;
  color: var(--lg-ink-2);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--lg-glass-weak);
  border: 1px solid var(--lg-stroke-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* 分类胶囊 */
.lg-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.lg-chips::-webkit-scrollbar { display: none; }
.lg-chip {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--lg-ink);
  text-decoration: none;
  background: var(--lg-glass-weak);
  border: 1px solid var(--lg-stroke-soft);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: transform var(--lg-fast) var(--lg-ease-spring), background var(--lg-fast) var(--lg-ease-out);
}
.lg-chip:hover { transform: translateY(-2px); background: var(--lg-glass-strong); }
.lg-chip:active { transform: scale(0.97); }

/* --------------------------------------------------------------- 商品卡片 */
.product-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--lg-radius);
  background: var(--lg-glass);
  backdrop-filter: blur(var(--lg-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(140%);
  border: 1px solid var(--lg-stroke);
  box-shadow: var(--lg-shadow);
  overflow: hidden;
  transition: transform var(--lg-card) var(--lg-ease-spring), box-shadow var(--lg-card) var(--lg-ease-out);
  animation: lg-rise 320ms var(--lg-ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 34%);
  opacity: 0.9;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--lg-shadow-lift); }
.product-card:active { transform: scale(0.98); }
.product-card__media { aspect-ratio: 4 / 3; background: rgba(255, 255, 255, 0.35); display: grid; place-items: center; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.product-card__title { font-weight: 600; letter-spacing: -0.01em; }
.product-card__sub { font-size: 13px; color: var(--lg-ink-3); }
.product-card__meta { font-size: 12.5px; color: var(--lg-ink-3); }
.product-card .price { font-size: 19px; font-weight: 650; color: var(--lg-ink); display: flex; align-items: baseline; gap: 6px; }
.product-card .price s { font-size: 13px; color: var(--lg-ink-3); }
@keyframes lg-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ------------------------------------------------------------- 商品详情 Hero */
.lg-hero-card {
  margin: 14px 0 16px;
  border-radius: var(--lg-radius-lg);
  overflow: hidden;
}
.lg-hero-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  font-size: 40px;
}
.lg-hero-card__media img { width: 100%; height: 100%; object-fit: cover; }
.lg-hero-card__body { padding: 18px 20px 20px; display: grid; gap: 6px; }
.lg-hero-card__title { font-size: clamp(22px, 5vw, 30px); font-weight: 650; letter-spacing: -0.03em; }
.lg-hero-card__sub { color: var(--lg-ink-2); }
.lg-hero-card__row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lg-price { font-size: 26px; font-weight: 680; color: var(--lg-ink); }
.lg-price s { font-size: 14px; color: var(--lg-ink-3); font-weight: 400; }
.lg-badge {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(91, 108, 255, 0.12);
  color: var(--lg-accent);
  border: 1px solid rgba(91, 108, 255, 0.18);
}
.lg-badge--muted { background: rgba(110, 110, 115, 0.1); color: var(--lg-ink-2); border-color: rgba(110, 110, 115, 0.16); }
.lg-badge--warn { background: rgba(214, 149, 33, 0.12); color: #a86a00; border-color: rgba(214, 149, 33, 0.2); }

/* 价格切换动画：旧淡出上移，新淡入下移 */
.lg-price--swap { animation: lg-price-in 260ms var(--lg-ease-out) both; }
@keyframes lg-price-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------- SKU 规格 */
.sku-list { display: grid; gap: 10px; }
.sku {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  text-align: left;
  background: var(--lg-glass-weak);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--lg-stroke-soft);
  box-shadow: 0 6px 22px rgba(24, 32, 64, 0.06);
  transition: transform var(--lg-card) var(--lg-ease-spring), background var(--lg-card) var(--lg-ease-out),
    box-shadow var(--lg-card) var(--lg-ease-out), border-color var(--lg-card) var(--lg-ease-out);
  min-height: 56px;
  cursor: pointer;
}
.sku:hover { transform: translateY(-2px); background: var(--lg-glass); }
.sku:active { transform: scale(0.985); }
.sku.is-selected {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 238, 255, 0.72));
  border-color: rgba(91, 108, 255, 0.36);
  box-shadow: 0 12px 34px rgba(91, 108, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: scale(1.02);
}
.sku.is-selected::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(91, 108, 255, 0.9), rgba(0, 113, 227, 0.65));
}
.sku[disabled] { opacity: 0.55; cursor: not-allowed; }
.sku[disabled]:hover { transform: none; }
.sku__main { display: grid; gap: 2px; }
.sku__name { font-weight: 560; }
.sku__sub { font-size: 12.5px; color: var(--lg-ink-3); }
.sku__side { display: grid; justify-items: end; gap: 2px; }
.sku__stock { font-size: 12px; color: var(--lg-ink-3); }

/* --------------------------------------------------------------- 内容分区 */
.lg-section { margin: 18px 0; }
.lg-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.lg-section__head h2 { font-size: 17px; letter-spacing: -0.01em; }
.lg-panel { padding: 18px 20px; border-radius: var(--lg-radius); }
.lg-panel + .lg-panel { margin-top: 10px; }
.detail-body p { margin: 0 0 6px; }
.detail-body ul { margin: 6px 0; padding-left: 20px; }

/* 教程玻璃卡 */
.lg-tutorial {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: var(--lg-glass-weak);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--lg-stroke-soft);
  transition: transform var(--lg-card) var(--lg-ease-spring), background var(--lg-card) var(--lg-ease-out);
  min-height: 56px;
}
.lg-tutorial:hover { transform: translateY(-2px); background: var(--lg-glass); }
.lg-tutorial:active { transform: scale(0.985); }
.lg-tutorial__icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(91, 108, 255, 0.18), rgba(0, 113, 227, 0.14));
  font-size: 17px;
}
.lg-tutorial__text { flex: 1; min-width: 0; }
.lg-tutorial__title { font-weight: 540; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-tutorial__sub { font-size: 12.5px; color: var(--lg-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-tutorial__arrow { color: var(--lg-ink-3); }

/* --------------------------------------------------------------- 底部购买栏 */
.buy-bar--glass {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  margin: 18px 0 6px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--lg-radius);
  background: var(--lg-glass-strong);
  backdrop-filter: blur(var(--lg-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(150%);
  border: 1px solid var(--lg-stroke);
  box-shadow: var(--lg-shadow-lift);
  z-index: 30;
}
.buy-bar__price { display: grid; gap: 2px; font-size: 12.5px; color: var(--lg-ink-3); }
.buy-bar__price b { font-size: 20px; color: var(--lg-ink); }
.lg-buy {
  margin-left: auto;
  min-height: 46px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  background: linear-gradient(135deg, #6b78ff 0%, #4a6cf7 45%, #2f7ef0 100%);
  box-shadow: 0 10px 26px rgba(74, 108, 247, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform var(--lg-fast) var(--lg-ease-spring), box-shadow var(--lg-fast) var(--lg-ease-out);
  cursor: pointer;
}
.lg-buy:hover { transform: translateY(-1px); }
.lg-buy:active { transform: scale(0.97); }
.lg-buy[disabled] { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.lg-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: lg-spin 700ms linear infinite;
  vertical-align: -2px;
}
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------- 购买 Bottom Sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 24, 40, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity var(--lg-sheet) var(--lg-ease-out);
}
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  margin: 0 auto;
  max-width: 640px;
  max-height: 92vh;
  max-height: 92dvh; /* iOS Safari 动态地址栏 / 键盘：用 dvh 避免疯狂 resize */
  overflow-y: auto;
  overscroll-behavior: contain; /* 面板内滚动不带动页面，减少键盘弹起时的滚动抖动 */
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 28px 28px 0 0;
  background: var(--lg-glass-strong);
  /* 用变量而不是写死 28px —— 否则 ≤640px 的 --lg-blur 降级管不到这个面板 */
  backdrop-filter: blur(var(--lg-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(150%);
  border: 1px solid var(--lg-stroke);
  border-bottom: none;
  box-shadow: 0 -20px 60px rgba(24, 32, 64, 0.22);
  transform: translateY(100%) scale(0.98);
  transition: transform var(--lg-sheet) var(--lg-ease-spring), opacity var(--lg-sheet) var(--lg-ease-out);
  opacity: 0;
}
.sheet.is-open { transform: translateY(0) scale(1); opacity: 1; }
.sheet__grabber { width: 44px; height: 5px; border-radius: 3px; background: rgba(110, 110, 115, 0.28); margin: 4px auto 12px; }
.sheet h2 { font-size: 19px; margin-bottom: 12px; }
.sheet__selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--lg-stroke-soft);
  margin-bottom: 14px;
}
.sheet__field { display: grid; gap: 6px; margin-bottom: 12px; }
.sheet__field > span { font-size: 13px; color: var(--lg-ink-2); }
.sheet__field input,
.sheet__field select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--lg-stroke-soft);
  background: rgba(255, 255, 255, 0.72);
  /* 明确 16px：低于 16px 时 iOS Safari 会在聚焦瞬间自动放大整页 */
  font: inherit;
  font-size: 16px;
  color: var(--lg-ink);
  width: 100%;
}
.sheet__field input:focus,
.sheet__field select:focus {
  outline: none;
  border-color: rgba(91, 108, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(91, 108, 255, 0.16);
}
.sheet__qty { display: flex; align-items: center; gap: 8px; }
.sheet__qty button {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--lg-stroke-soft);
  background: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  cursor: pointer;
  transition: transform var(--lg-fast) var(--lg-ease-spring);
}
.sheet__qty button:active { transform: scale(0.94); }
.sheet__qty input { text-align: center; }
.sheet__total { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 14px; }
.sheet__total b { font-size: 24px; }
.sheet__actions { display: flex; gap: 10px; }
.sheet__actions .lg-buy { margin-left: 0; flex: 1; }
.lg-quiet {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--lg-stroke-soft);
  background: rgba(255, 255, 255, 0.6);
  color: var(--lg-ink-2);
  font: inherit;
  cursor: pointer;
  transition: transform var(--lg-fast) var(--lg-ease-spring);
}
.lg-quiet:active { transform: scale(0.97); }
.sheet__note { margin: 10px 0 0; font-size: 12.5px; color: var(--lg-ink-3); }
.sheet__alert {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  background: rgba(199, 54, 47, 0.1);
  color: #b3261e;
  border: 1px solid rgba(199, 54, 47, 0.16);
}

/* --------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 80;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--lg-ink);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--lg-stroke);
  box-shadow: var(--lg-shadow);
  animation: lg-toast-in 240ms var(--lg-ease-out) both;
}
@keyframes lg-toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 复制按钮反馈 */
.copy-btn .is-copied { color: #2e7d4f; }

/* --------------------------------------------------- 通知 / 公告玻璃化 */
#announce-bar:not(.hidden) {
  margin: 10px auto 0;
  max-width: var(--container, 1200px);
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--lg-glass-strong);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border: 1px solid var(--lg-stroke);
  box-shadow: var(--lg-shadow);
  color: var(--lg-ink);
}
.announce-modal__panel {
  background: var(--lg-glass-strong);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--lg-stroke);
  border-radius: 26px;
  box-shadow: var(--lg-shadow-lift);
}

/* 骨架/加载 */
body[data-surface='lg'] .spinner { color: var(--lg-ink-2); }

/* 底部购买栏是悬浮的：给内容留出空间，并把客服按钮抬到购买栏之上 */
body[data-surface='lg'] .container { padding-bottom: 104px; }
body[data-surface='lg'] .chat-launcher { bottom: calc(96px + env(safe-area-inset-bottom)); }
body[data-surface='lg'] .chat-launcher {
  background: linear-gradient(135deg, #6b78ff 0%, #4a6cf7 45%, #2f7ef0 100%);
  box-shadow: 0 12px 30px rgba(74, 108, 247, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* --------------------------------------------------------------- 降级方案 */
/* 不支持 backdrop-filter（部分微信/安卓内置浏览器）：改用高不透明度白底，保证可读 */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .lg-glass,
  .product-card,
  .sku,
  .lg-tutorial,
  .buy-bar--glass,
  .sheet,
  .toast,
  #announce-bar:not(.hidden),
  body[data-surface='lg'] .site-header__inner {
    background: rgba(255, 255, 255, 0.94);
  }
}
/* 小屏：降低模糊半径，兼顾低端机性能 */
@media (max-width: 640px) {
  :root { --lg-blur: 16px; }
  body::after { backdrop-filter: none; -webkit-backdrop-filter: none; }
  /* 手机上面板自己保留一层玻璃，全屏遮罩只留半透明底：
     全屏 blur 是这一页最贵的合成层，键盘弹起时每帧都要重算。 */
  .sheet-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(20, 24, 40, 0.42);
  }
  body[data-surface='lg'] .site-header__inner { padding: 7px 12px; gap: 8px; }
  body[data-surface='lg'] .site-nav { gap: 2px; }
  body[data-surface='lg'] .site-nav a { font-size: 13px; padding: 6px 9px; white-space: nowrap; }
  /* 窄屏只保留品牌图标，把空间让给导航 */
  body[data-surface='lg'] .brand { font-size: 0; }
  body[data-surface='lg'] .brand__mark { font-size: 12px; }
  .lg-hero { padding: 22px 18px; }
  .lg-hero-card__body { padding: 16px 16px 18px; }
  .sheet { max-height: 94vh; }
  .sheet { max-height: 94dvh; }
}

/* ---------------------------------------------------------------------------
   购买面板打开时给底层「降档」：面板本身保留一层玻璃，
   背景主内容暂停昂贵效果（多层 blur + 34 秒背景动画）。
   关闭面板时 .sheet-open 被移除，视觉立刻恢复原样，不会永久失去液态玻璃。
   --------------------------------------------------------------------------- */
body.sheet-open::before {
  animation: none; /* 暂停背景漂移 */
}
body.sheet-open .site-header__inner,
body.sheet-open .lg-glass,
body.sheet-open .lg-pill,
body.sheet-open .lg-chip,
body.sheet-open .product-card,
body.sheet-open .sku,
body.sheet-open .lg-tutorial,
body.sheet-open .buy-bar--glass,
body.sheet-open .chat-launcher {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* 背景卡片改成接近不透明的底 + 常规阴影，观感几乎不变（本来就被遮罩压暗） */
body.sheet-open .product-card,
body.sheet-open .lg-tutorial,
body.sheet-open .lg-glass {
  background-color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(24, 32, 64, 0.08);
}

/* 输入框获得焦点时也暂停背景动画：iOS 键盘弹起 + 全屏动画会一起挤占合成资源 */
body.input-focus::before {
  animation: none;
}
/* 尊重系统"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .product-card,
  .sku,
  .lg-tutorial,
  .lg-buy,
  .lg-chip,
  .lg-quiet,
  .sheet,
  .sheet-backdrop,
  .toast,
  .lg-price--swap { animation: none !important; transition: none !important; }
  .product-card:hover,
  .sku:hover,
  .lg-tutorial:hover { transform: none; }
}
/* 触屏：去掉 hover 粘滞，保留按压反馈 */
@media (hover: none) {
  .product-card:hover,
  .sku:hover,
  .lg-tutorial:hover,
  .lg-chip:hover { transform: none; }
}
