/* ==========================================================================
   维帝丝兰 —— 网站样式表
   设计语言：Apple 式大留白 / 大字号标题 / 极简线条 / 深色沉浸区块
   适配：桌面 / 平板 / 手机（iOS Safari、Android Chrome、微信内置浏览器）
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --paper: #ffffff;
  --paper-2: #f5f5f7;
  --paper-3: #ececee;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #2f5d50;
  --accent-2: #4f8a78;
  --accent-soft: #e6efeb;
  --dark: #101013;
  --dark-2: #18181c;
  --dark-line: rgba(255, 255, 255, 0.1);
  --white-2: rgba(255, 255, 255, 0.66);
  --white-3: rgba(255, 255, 255, 0.42);

  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 32px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial,
    sans-serif;

  --nav-h: 52px;
/* iOS 刘海屏 / 全面屏的安全区，其他设备为 0 */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --container: 1160px;
  --pad: clamp(20px, 5vw, 48px);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
/* 横屏时避免 iOS 自动放大字号，并去掉点击高亮 */
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--safe-t) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  /* 中文正文 1.55 偏紧，1.75 更舒展 */
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 中文桌面端避免大字号下浏览器自动插入的标点避头尾造成异常断行 */
.display,
.h1,
.h2,
.h3 {
  text-wrap: balance;
}

/* 标题兜底：限制布局容器的行宽，避免窄容器里长句被挤成三行以上或孤字成行 */
.feature-tile__title,
.h2 {
  max-width: 22em;
}

.hero__sub,
.lead {
  text-wrap: pretty;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: clamp(72px, 11vw, 140px);
}

.section--tight {
  padding-block: clamp(56px, 8vw, 100px);
}

.section--paper {
  background: var(--paper-2);
}

.section--dark {
  background: var(--dark);
  color: #f5f5f7;
}

.section--dark a {
  color: #8fd3bf;
}

.center {
  text-align: center;
}

.stack > * + * {
  margin-top: 22px;
}

/* ---------- 4. 排版 ---------- */
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}

.section--dark .eyebrow {
  color: #8fd3bf;
}

.display {
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.h3 {
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.25;
}

.lead {
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.7;
  color: var(--ink-2);
  letter-spacing: 0.005em;
}

.section--dark .lead {
  color: var(--white-2);
}

.muted {
  color: var(--ink-3);
}

.section--dark .muted {
  color: var(--white-3);
}

.text-gradient {
  background: linear-gradient(90deg, #1d6b57 0%, #4f8a78 45%, #9fc7b9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
  will-change: transform;
}

/* hidden 属性要能压过 .btn 的 display，否则未配置电话时按钮仍会显示 */
.btn[hidden],
[hidden].btn {
  display: none !important;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: #274f44;
  color: #fff;
}

.btn--ghost {
  border: 1px solid rgba(0, 0, 0, 0.16);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: rgba(0, 0, 0, 0.36);
  color: var(--ink);
}

.btn--light {
  background: #f5f5f7;
  color: #1d1d1f;
}

.btn--light:hover {
  background: #fff;
  color: #1d1d1f;
}

.btn--outline-light {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #f5f5f7;
}

.btn--outline-light:hover {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 17px;
}

.link-arrow::after {
  content: "鈥?;
  font-size: 1.25em;
  line-height: 1;
  transition: transform 0.25s var(--ease-out);
}

.link-arrow:hover {
  text-decoration: none;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-row--center {
  justify-content: center;
}

/* ---------- 6. 导航 ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: calc(var(--nav-h) + var(--safe-t));
  padding-top: var(--safe-t);
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: border-color 0.3s var(--ease);
}

/*
 * 毛玻璃背景放在伪元素上。
 * 关键：backdrop-filter 会让元素成为「fixed 定位子元素的包含块」，
 * 若直接写在 .topbar 上，移动端整屏菜单会退化成只有导航条那么高。
 */
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: background 0.3s var(--ease);
  pointer-events: none;
}

.topbar > .container {
  position: relative;
  z-index: 1;
}

/* 首页、工艺页的首屏为浅色大图，导航在顶部时透明、文字保持深色 */
body.nav-on-dark:not(.scrolled) .topbar {
  border-bottom-color: transparent;
  color: var(--ink);
}

body.nav-on-dark:not(.scrolled) .topbar::before {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.nav-on-dark:not(.scrolled) .topbar a {
  color: var(--ink-2);
}

body.nav-on-dark:not(.scrolled) .topbar a:hover,
body.nav-on-dark:not(.scrolled) .topbar a.is-active {
  color: var(--ink);
}

.topbar .container {
  max-width: 1280px;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: inherit;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

body.nav-on-dark:not(.scrolled) .brand-sub {
  color: rgba(255, 255, 255, 0.5);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  margin-left: auto;
  list-style: none;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  text-decoration: none;
}

.nav-cta {
  margin-left: 4px;
}

.nav-cta .btn {
  min-height: 32px;
  padding: 6px 16px;
  font-size: 13px;
}


.nav-toggle {
  display: none;
}

/* 滚动后导航恢复白色底与分隔线 */
body.nav-on-dark.scrolled .topbar {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.nav-on-dark.scrolled .topbar::before {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

/* ---------- 7. 首屏 Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* 不支持 svh 的旧浏览器回退 */
  padding-top: calc(var(--nav-h) + var(--safe-t) + clamp(48px, 9vh, 96px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__title {
  margin-top: 18px;
}

.hero__sub {
  max-width: 640px;
  margin: 22px auto 0;
}

.hero__actions {
  margin-top: 32px;
}

.hero__foot {
  position: relative;
  z-index: 2;
  margin-top: clamp(40px, 8vh, 80px);
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 72px);
  padding-bottom: 40px;
}

.hero__stat strong {
  display: block;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero__stat span {
  font-size: 13px;
}

/* 光晕背景 */
.aura {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}

.aura--a {
  width: 46vw;
  height: 46vw;
  min-width: 340px;
  min-height: 340px;
  top: 8%;
  left: -6%;
  background: radial-gradient(circle, #b9dbcf 0%, rgba(185, 219, 207, 0) 70%);
}

.aura--b {
  width: 40vw;
  height: 40vw;
  min-width: 300px;
  min-height: 300px;
  top: 22%;
  right: -8%;
  background: radial-gradient(circle, #dfe6e2 0%, rgba(223, 230, 226, 0) 70%);
  animation-delay: -6s;
}

.aura--c {
  width: 36vw;
  height: 36vw;
  bottom: -18%;
  left: 30%;
  background: radial-gradient(circle, #efe6d6 0%, rgba(239, 230, 214, 0) 70%);
  animation-delay: -11s;
}

.aura--dark-a {
  background: radial-gradient(circle, #1f5a49 0%, rgba(31, 90, 73, 0) 70%);
  opacity: 0.85;
}

.aura--dark-b {
  background: radial-gradient(circle, #2a3d48 0%, rgba(42, 61, 72, 0) 70%);
  opacity: 0.85;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(3%, -4%, 0) scale(1.08);
  }
}

/* 床垫立体图 */
.mattress-stage {
  position: relative;
  margin: clamp(28px, 5vh, 56px) auto 0;
  width: min(760px, 92vw);
  perspective: 1400px;
  z-index: 1;
}

.mattress {
  position: relative;
  width: 100%;
  aspect-ratio: 760 / 300;
  border-radius: 26px / 38px;
  background: linear-gradient(170deg, #fbfaf7 0%, #ece8df 58%, #d9d3c6 100%);
  box-shadow: 0 40px 80px -30px rgba(38, 34, 28, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.9) inset, 0 -14px 30px -12px rgba(0, 0, 0, 0.18) inset;
  transform: rotateX(18deg) rotateZ(-1.5deg);
  transform-style: preserve-3d;
  animation: floaty 9s ease-in-out infinite;
}

.mattress::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.045) 0 1px,
      transparent 1px 38px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.03) 0 1px,
      transparent 1px 24px
    );
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 40%, transparent 85%);
}

.mattress::after {
  content: "";
  position: absolute;
  inset: 16px 18px auto;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  opacity: 0.9;
}

.mattress__tag {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%) rotate(1.5deg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(47, 93, 80, 0.55);
  white-space: nowrap;
}

.mattress-shadow {
  width: 70%;
  height: 34px;
  margin: -14px auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.16), transparent 70%);
  filter: blur(8px);
  animation: shadow-breath 9s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: rotateX(18deg) rotateZ(-1.5deg) translateY(0);
  }
  50% {
    transform: rotateX(16deg) rotateZ(-1deg) translateY(-10px);
  }
}

@keyframes shadow-breath {
  0%,
  100% {
    opacity: 0.8;
    transform: scaleX(1);
  }
  50% {
    opacity: 0.55;
    transform: scaleX(0.92);
  }
}


/* ---------- 8. 滚动渐显 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 9. 卡片与网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.28);
}

.card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 20px;
}

.card__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card__text {
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.card__link {
  margin-top: auto;
  padding-top: 22px;
  font-size: 15px;
}

/* 特色大卡片（深色） */
.feature-tile {
  position: relative;
  min-height: clamp(360px, 44vw, 520px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #f5f5f7;
  isolation: isolate;
}

.feature-tile--dark {
  background: linear-gradient(160deg, #1b1b20 0%, #111114 60%, #0b0b0d 100%);
}

.feature-tile--soft {
  background: linear-gradient(160deg, #eef3f0 0%, #e2e9e5 100%);
  color: var(--ink);
}

.feature-tile--warm {
  background: linear-gradient(160deg, #f6f1e8 0%, #ece3d4 100%);
  color: var(--ink);
}

.feature-tile__title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.feature-tile__text {
  margin-top: 14px;
  max-width: 30em;
  font-size: 17px;
  color: var(--white-2);
}

.feature-tile--soft .feature-tile__text,
.feature-tile--warm .feature-tile__text {
  color: var(--ink-2);
}

/* 大数字 */
.stat {
  padding: 8px 0;
}

.stat__num {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  white-space: nowrap;
}

/* 数据上方的小分类标签，让“数字 + 说明”形成清晰层级 */
.stat__eyebrow {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.section--dark .stat__eyebrow {
  color: var(--white-3);
}

.stat__label {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
}

.section--dark .stat__label {
  color: var(--white-2);
}

/* ---------- 10. 横向产品滑块 ---------- */
.carousel {
  position: relative;
}

.carousel__track {
  width: 100%;
  max-width: 100vw;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px var(--pad) 28px;
  margin-inline: calc(-1 * var(--pad));
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 min(360px, 82vw);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

.product-card__visual {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  overflow: hidden;
}

.product-card__visual .mattress--small {
  width: 78%;
  aspect-ratio: 760 / 300;
}

.product-card__body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__meta {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}

.product-card__name {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.product-card__desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-2);
}

.product-card__price {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink-2);
}

.product-card__price strong {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.carousel__nav {
  display: flex;
  gap: 10px;
}

.carousel__btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  color: var(--ink);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.carousel__btn:hover {
  background: var(--paper-3);
}

.carousel__btn:active {
  transform: scale(0.94);
}

.carousel__btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.section--dark .carousel__btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

.section--dark .carousel__btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

/* 床垫小图配色（放在 .mattress::after 之后以保证覆盖背景） */
.product-card__visual .mattress--cloud {
  background: linear-gradient(170deg, #fbfbfa 0%, #eef1ee 55%, #d8e2dc 100%);
}

.product-card__visual .mattress--bamboo {
  background: linear-gradient(170deg, #fcf7ee 0%, #f1e5cd 55%, #dcc9a5 100%);
}

.product-card__visual .mattress--latax {
  background: linear-gradient(170deg, #f7f7f9 0%, #e4e6ee 55%, #c9ccd9 100%);
}

.product-card__visual .mattress--custom {
  background: linear-gradient(170deg, #f4f6f8 0%, #dde3e9 55%, #bfc9d3 100%);
}

.product-card__visual .mattress {
  transform: rotateX(16deg);
  animation: floaty-s 7s ease-in-out infinite;
}

.product-card__visual .mattress__tag {
  font-size: 11px;
  letter-spacing: 0.22em;
}

@keyframes floaty-s {
  0%,
  100% {
    transform: rotateX(16deg) translateY(0);
  }
  50% {
    transform: rotateX(14deg) translateY(-6px);
  }
}

/* 页面标识牌 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.section--dark .badge {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--dark-line);
  color: var(--white-2);
}

/* 规格参数网格 */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.specs > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.specs > div:nth-child(odd) {
  padding-right: 20px;
}

.specs dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.specs dd {
  margin: 0;
  font-size: 16px;
}

/* 产品详情大版块 */
.product-hero {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}

.product-hero:nth-of-type(1) {
  border-top: 0;
}

.product-hero:nth-child(even) {
  direction: rtl;
}

.product-hero:nth-child(even) > * {
  direction: ltr;
}

.product-hero__visual {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}

.product-hero__visual .mattress {
  width: 100%;
  transform: rotateX(20deg) rotateZ(-1deg);
}

.product-hero__media {
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
}

.product-hero__desc {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 17px;
}

.product-hero__price {
  margin-top: 24px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.product-hero__price strong {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.product-hero__price span {
  font-size: 15px;
  color: var(--ink-3);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .product-hero,
  .product-hero:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .specs {
    grid-template-columns: 1fr 1fr;
  }
}

/* 滚动浮现的层叠卡片（工艺页） */
.layers-sticky {
  position: sticky;
  top: calc(var(--nav-h) + var(--safe-t) + 40px);
}

/* 小屏幕隐藏的换行 */
@media (max-width: 640px) {
  .hide-sm {
    display: none;
  }
}

/* FAQ 手风琴 */
details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details[open] > summary span[aria-hidden] {
  transform: rotate(45deg);
}

details > summary span[aria-hidden] {
  transition: transform 0.3s var(--ease);
  display: inline-block;
}

/* ---------- 11. 对比 / 规格表 ---------- */
.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}

.compare th,
.compare td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare thead th {
  font-size: 17px;
  font-weight: 600;
  background: var(--paper);
  position: sticky;
  top: calc(var(--nav-h) + var(--safe-t));
  z-index: 2;
}

.compare tbody th {
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.compare tbody tr:hover td {
  background: rgba(47, 93, 80, 0.03);
}

.compare__wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

/* 宽度条 */
.bar {
  --v: 50%;
  display: grid;
  gap: 8px;
}

.bar__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.bar__head span {
  min-width: 0;
}

.bar__head span + span {
  text-align: right;
  color: var(--accent);
  white-space: nowrap;
}

.bar__track {
  height: 6px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  width: var(--v);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s var(--ease-out);
}

.is-visible .bar__fill {
  transform: scaleX(1);
}

/* ---------- 12. 数字计数器 ---------- */
.counters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

/* ---------- 13. 时间线 ---------- */
.timeline {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 760px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-2), var(--line));
}

.timeline li {
  position: relative;
  padding: 0 0 34px 38px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent-2);
}

.timeline__year {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.timeline__title {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 600;
}

.timeline__text {
  margin-top: 6px;
  font-size: 15.5px;
  color: var(--ink-2);
}

/* ---------- 14. 流程步骤 ---------- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.step {
  counter-increment: step;
  position: relative;
  padding-top: 64px;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-3);
}

.step__title {
  font-size: 18px;
  font-weight: 600;
}

.step__text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* ---------- 15. 引语 ---------- */
.quote {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.quote blockquote {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 36px);
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.quote figcaption {
  margin-top: 26px;
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------- 16. 订阅条（保留样式） ---------- */
.subscribe {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 28px auto 0;
  flex-wrap: wrap;
  justify-content: center;
}

.subscribe input {
  flex: 1 1 240px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.subscribe input::placeholder {
  color: var(--white-3);
}

.subscribe input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.subscribe .btn {
  flex-shrink: 0;
}

.form-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--white-3);
}

.form-note.is-success {
  color: #8fd3bf;
}

.form-note.is-error {
  color: #ff9b8f;
}

/* ---------- 17. 页脚 ---------- */
.footer {
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 14px;
  padding-block: 56px 32px;
  border-top: 1px solid var(--line);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.footer__brand p {
  margin-top: 14px;
  max-width: 280px;
  font-size: 13.5px;
  line-height: 1.6;
}

.footer h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer a {
  color: var(--ink-2);
  font-size: 13.5px;
}

.footer a:hover {
  color: var(--ink);
}

.footer__bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------- 18. 页面头（内页） ---------- */
.page-head {
  padding-top: calc(var(--nav-h) + var(--safe-t) + clamp(64px, 10vw, 120px));
  padding-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
}

.page-head .lead {
  max-width: 36em;
  margin: 22px auto 0;
}

.breadcrumb {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--ink-3);
}

/* ---------- 19. 工艺页特殊样式 ---------- */
.layer-hero {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 40px;
}

.layers {
  display: grid;
  gap: 10px;
  width: min(620px, 100%);
  transform: rotateX(12deg);
  transform-style: preserve-3d;
  perspective: 900px;
}

.layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.layer:hover {
  transform: translateX(8px);
  box-shadow: 0 18px 30px -20px rgba(0, 0, 0, 0.5);
}

.layer small {
  font-size: 12.5px;
  font-weight: 400;
  opacity: 0.72;
}

.layer--a {
  background: #f7f6f2;
  color: #2a2a2c;
}

.layer--b {
  background: #d9c8a8;
  color: #3a3021;
}

.layer--c {
  background: #b4c8bf;
  color: #1f3b31;
}

.layer--d {
  background: #6f8f83;
  color: #f2f6f4;
}

.layer--e {
  background: #2f5d50;
  color: #e8f1ed;
}

.layer--f {
  background: #1c1c20;
  color: #c9c9cf;
}

.materials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.material {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--dark-line);
  background: var(--dark-2);
}

.material__swatch {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.material h3 {
  font-size: 19px;
}

.material p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--white-2);
}

/* ---------- 20. 联系方式 / 表单 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 26px;
}

.contact-info__item {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.contact-info__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.contact-info__value {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
}

.contact-info__value small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-2);
}

.form {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -50px rgba(0, 0, 0, 0.5);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
}

.field label .req {
  color: #c0392b;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(0, 0, 0, 0.28);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 93, 80, 0.12);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #c0392b;
}

.field__error {
  font-size: 13px;
  color: #c0392b;
  min-height: 0;
}

.field__hint {
  font-size: 13px;
  color: var(--ink-3);
}

.form__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 6px;
}

.form__status {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.form__status[hidden] {
  display: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
}

.consent input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
}



/* ---------- 21. 404 ---------- */
.notfound {
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + var(--safe-t) + 40px) var(--pad) 60px;
}

/* ---------- 22. 响应式 ---------- */
@media (max-width: 980px) {
  /* ===== 移动端全屏菜单 ===== */
  .nav-links {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    padding: calc(var(--nav-h) + var(--safe-t) + 8px)
      calc(var(--pad) + var(--safe-r)) calc(32px + var(--safe-b))
      calc(var(--pad) + var(--safe-l));
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
      visibility 0.28s;
    z-index: 90;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--line);
    list-style: none;
  }

  /* 菜单项：左侧文字 + 右侧箭头，整行可点，点击区域 ≥ 56px */
  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 16px 2px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink) !important;
    text-decoration: none;
  }

  .nav-links a::after {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-top: 1.5px solid var(--ink-3);
    border-right: 1.5px solid var(--ink-3);
    transform: rotate(45deg);
    margin-right: 4px;
  }

  .nav-links a:active {
    background: var(--paper-2);
  }

  /* 当前页：品牌色 + 加粗 + 左侧竖条 */
  .nav-links a.is-active {
    color: var(--accent) !important;
    font-weight: 600;
  }

  .nav-links a.is-active::after {
    border-color: var(--accent);
  }

  .nav-links li:has(a.is-active) {
    box-shadow: inset 3px 0 0 var(--accent);
    padding-left: 12px;
  }

  /* 菜单展开时品牌名仍显示在顶部，与关闭按钮形成完整标题栏 */
  body.menu-open .brand {
    position: relative;
    z-index: 96;
    color: var(--ink);
  }

  body.menu-open .brand-sub {
    display: none;
  }

  /* 底部行动按钮 */
  .nav-cta {
    margin: 28px 0 0;
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
  }

  .nav-cta a.btn,
  .nav-cta a.btn--primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 14px;
    background: var(--accent);
    color: #fff !important;
  }

  .nav-cta a.btn:active {
    background: #274f44;
  }

  .nav-cta a.btn::after {
    content: none;
  }

  body.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    position: relative;
    z-index: 95;
    border-radius: 50%;
    color: var(--ink);
  }

  body.nav-on-dark:not(.scrolled) .nav-toggle,
  body.nav-on-dark.menu-open .nav-toggle {
    color: var(--ink);
  }

  .nav-toggle__bar {
    display: block;
    position: relative;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), background 0.3s var(--ease);
  }

  .nav-toggle__bar::before,
  .nav-toggle__bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), top 0.3s var(--ease);
  }

  .nav-toggle__bar::before {
    top: -6px;
  }

  .nav-toggle__bar::after {
    top: 6px;
  }


  /* 菜单打开后按钮压在白色抽屉上，统一改为深色 */
  body.menu-open .nav-toggle {
    color: var(--ink);
  }

  body.menu-open .nav-toggle__bar {
    background: transparent;
  }

  body.menu-open .nav-toggle__bar::before {
    top: 0;
    transform: rotate(45deg);
  }

  body.menu-open .nav-toggle__bar::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .brand-sub {
    display: none;
  }

  .grid--4,
  .counters,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--3,
  .materials {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer__top {
    grid-template-columns: repeat(2, 1fr);
  }

  .carousel-head {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .counters,
  .steps,
  .materials {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__foot {
    flex-wrap: wrap;
    row-gap: 20px;
    column-gap: 32px;
  }

  .mattress {
    transform: rotateX(12deg);
    animation-name: floaty-m;
  }

  .hero__title .display {
    font-size: clamp(40px, 12vw, 56px);
  }

  .footer__top {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 首屏底部数据在手机上改为两列，避免四个数据挤成一行 */
  .hero__foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
    column-gap: 20px;
    text-align: left;
    max-width: 360px;
    margin-inline: auto;
  }

  .hero__title .display {
    word-break: break-word;
  }

  .hero {
    min-height: auto;
    padding-bottom: calc(48px + var(--safe-b));
  }

  /* 小屏横向留白收窄，内容更容易占满一屏 */
  .container {
    padding-left: calc(clamp(16px, 4vw, 24px) + var(--safe-l));
    padding-right: calc(clamp(16px, 4vw, 24px) + var(--safe-r));
  }

  /* 主按钮更易点按，次要按钮保持自适应宽度 */
  .btn-row .btn--primary,
  .btn-row .btn--light {
    flex: 1 1 auto;
  }

  /* 表单输入框字号不小于 16px，避免 iOS 聚焦时自动放大页面 */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }

  /* 表格在手机上字号和留白收紧，首列保持可读 */
  .compare {
    font-size: 14px;
  }

  .compare th,
  .compare td {
    padding: 12px 14px;
  }

  .compare thead th {
    font-size: 15px;
  }

  /* 宽度条标题在窄屏换行显示 */
  .bar__head {
    flex-direction: column;
    gap: 2px;
  }

  .bar__head span + span {
    text-align: left;
  }

  /* 规格参数改为单列，避免长数值被挤断 */
  .specs {
    grid-template-columns: 1fr;
  }

  .specs > div:nth-child(odd) {
    padding-right: 0;
  }

  /* 页脚底部留出 iPhone 底部横条空间 */
  .footer {
    padding-bottom: calc(32px + var(--safe-b));
  }

  /* 材料层叠图在手机上不必倾斜，避免文字被压扁 */
  .layers {
    transform: none;
  }
}

/* 小屏标签文字适当缩小 */
@media (max-width: 380px) {
  .hero__title .display {
    font-size: 34px;
  }

  .display {
    font-size: 38px;
  }
}

@keyframes floaty-m {
  0%,
  100% {
    transform: rotateX(12deg) translateY(0);
  }
  50% {
    transform: rotateX(10deg) translateY(-8px);
  }
}

/* ---------- 23. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .bar__fill {
    transform: none;
  }
}

/* ---------- 24. 选床助手 ---------- */
.tool {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

.tool__panel {
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
}

.tool__step + .tool__step {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.tool__step-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.tool__step-no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.tool__step-title {
  font-size: 16px;
  font-weight: 600;
}

.tool__hint {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-3);
}

.tool__inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool__input {
  display: grid;
  gap: 6px;
}

.tool__input span {
  font-size: 13px;
  color: var(--ink-2);
}

.tool__input input,
.tool__input select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tool__input input:focus,
.tool__input select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 93, 80, 0.12);
}

.tool__input.has-error input,
.tool__input.has-error select {
  border-color: #c0392b;
}

.tool__hint-inline {
  font-size: 12.5px;
  color: var(--ink-3);
}

.tool__error {
  font-size: 13px;
  color: #c0392b;
  min-height: 0;
}

.tool__error:empty {
  display: none;
}

.tool__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  display: inline-flex;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: var(--paper);
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
  user-select: none;
}

.chip span:hover {
  border-color: rgba(0, 0, 0, 0.3);
  color: var(--ink);
}

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.tool__result {
  position: sticky;
  top: calc(var(--nav-h) + var(--safe-t) + 20px);
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius-lg);
  color: #f5f5f7;
  background: linear-gradient(160deg, #14332b 0%, #101013 62%, #0b0b0d 100%);
}

.tool__result-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}

.tool__empty {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--white-2);
}

.tool__firmness {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.tool__firmness strong {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.tool__firmness span {
  font-size: 14px;
  color: var(--white-2);
}

.tool__meter {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.tool__meter i {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.3s var(--ease);
}

.tool__meter i.on {
  background: linear-gradient(90deg, #4f8a78, #9fcfbd);
}

.tool__meter-labels {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--white-3);
}

.tool__rec {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tool__rec-name {
  font-size: 20px;
  font-weight: 600;
}

.tool__rec-why {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--white-2);
}

.tool__dims {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.tool__dims div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.tool__dims dt {
  color: var(--white-3);
}

.tool__dims dd {
  margin: 0;
  text-align: right;
  color: #f5f5f7;
}

.tool__actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool__actions .btn {
  flex: 1 1 auto;
}

.tool__note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--white-3);
}

@media (max-width: 900px) {
  .tool {
    grid-template-columns: 1fr;
  }

  .tool__result {
    position: static;
  }
}

@media (max-width: 480px) {
  .tool__inputs {
    grid-template-columns: 1fr;
  }
}

/* ---------- 25. 打印 ---------- */
@media print {
  .topbar,
  .carousel__nav,
  .footer {
    display: none;
  }
}
/* ---------- 25. 百度地图区块 ---------- */
.baidu-map {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 8;
  min-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8ece9;
}

.baidu-map__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--ink-3);
}

.baidu-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.baidu-map__link {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.baidu-map__link:hover {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 640px) {
  .baidu-map {
    aspect-ratio: auto;
    height: 340px;
  }
}

/* 无 AK 时的地图卡片 */
.baidu-map--card {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(160deg, #f4f7f5 0%, #e6ece8 100%);
}

.baidu-map__card {
  text-align: center;
  max-width: 520px;
}

.baidu-map__card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.baidu-map__card-address {
  margin-top: 12px;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.baidu-map__card-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 640px) {
  .baidu-map--card {
    min-height: 260px;
    height: auto;
  }
}

.baidu-map__card-note {
  margin: 14px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--accent);
}


/* 微信二维码 */
.wechat-qr {
  width: 132px;
  height: 132px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
}

