/* 久阳春轻养生酒 · 结构与组件样式 v2
 * 设计方向：高端编辑式留白、细线分隔、衬线标题、暖金/深棕体系、图片蒙板、柔和动效。
 * 依赖 assets/css/tokens.css 的设计令牌与四套皮肤（taojin/miyouhong/shanquanqing/yeyan）。
 * admin.html 依赖的 .admin-* / .mode-badge / .skin-swatch 等类完整保留。
 */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }

p { margin: 0 0 var(--space-3); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }

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

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

/* 仅在 JS 可用时启用滚动浮现，避免无 JS 时内容不可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 640ms ease, transform 640ms ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--primary-ink);
  text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

.container {
  width: min(var(--container), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

/* 陶浸线：主内容区左侧 2px 琥珀脊椎 */
main .container {
  border-left: 2px solid var(--amber);
  padding-left: clamp(14px, 2vw, 24px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(var(--overlay-rgb), .92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 72px;
  flex-wrap: wrap;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  white-space: nowrap;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.brand-sub {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.site-nav a:hover { color: var(--text); border-bottom-color: var(--amber); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--amber);
  font-weight: 600;
}

/* ---------- Shared blocks ---------- */
.section { padding-block: clamp(56px, 9vw, 104px); }
.section + .section { border-top: 1px solid var(--border); }
.section--tint { background: var(--surface-2); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 5vw, 56px);
}
.section-head h2 { margin-bottom: var(--space-3); }
.section-head p:last-child { color: var(--text-muted); }

.eyebrow {
  margin-bottom: var(--space-2);
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.2em;
}
/* 编辑式细线：eyebrow 前的短横线 */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--amber);
}

.lead { font-size: 1.08rem; color: var(--text-muted); }
.note { font-size: var(--fs-sm); color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: var(--shadow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--primary-ink);
  box-shadow: var(--shadow-strong);
}
.btn-primary:active { background: var(--primary-active); }
.btn-ghost { border-color: var(--border-strong); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--primary); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; transform: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  color: var(--primary);
}
.text-link::after {
  content: "→";
  font-weight: 400;
  transition: transform var(--transition);
}
.text-link:hover::after { transform: translateX(3px); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.photo-note { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-muted); }

/* 图片蒙板：底部渐隐 + 细边 */
.media-frame {
  position: relative;
  margin: 0;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.media-frame[data-focus="bottle"] img { object-position: 50% 38%; }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--overlay-rgb), var(--overlay-alpha)) 0%, rgba(var(--overlay-rgb), 0) 55%);
  pointer-events: none;
}
.media-frame figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(20, 14, 9, 0.68);
  color: #FFF8EC;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.notice {
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  font-size: var(--fs-sm);
}
.notice strong { color: var(--primary); }

/* ---------- 首页轮播（编辑式大幅首屏） ---------- */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.carousel-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 640ms cubic-bezier(.33, .1, .2, 1);
  will-change: transform;
}
.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: clamp(560px, 82vh, 840px);
  display: flex;
  align-items: flex-end;
}
.carousel-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
/* 每张轮播的遮罩：底部加深保证文字对比度 */
.slide-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(18, 11, 6, .82) 0%, rgba(18, 11, 6, .34) 46%, rgba(18, 11, 6, .18) 100%);
}
.slide-body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(20px, 6vw, 80px);
  color: #FFF8EC;
}
.slide-body > p,
.slide-body > h2,
.slide-body > div { max-width: 640px; }
.slide-eyebrow {
  margin-bottom: var(--space-2);
  color: #E8C87E;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.24em;
}
.slide-title {
  margin-bottom: var(--space-3);
  color: #FFF8EC;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.22;
  letter-spacing: 0.04em;
}
.slide-sub {
  color: rgba(255, 248, 236, .86);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  margin-bottom: var(--space-5);
}
.slide-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.slide-actions .btn-primary { box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.btn-slide-ghost {
  border: 1px solid rgba(255, 248, 236, .55);
  color: #FFF8EC;
  background: rgba(18, 11, 6, .28);
  backdrop-filter: blur(3px);
}
.btn-slide-ghost:hover { background: rgba(18, 11, 6, .46); color: #FFF8EC; }
.slide-note {
  margin-top: var(--space-4);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255, 248, 236, .68);
}

/* 轮播控件 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 236, .4);
  border-radius: 50%;
  background: rgba(18, 11, 6, .42);
  color: #FFF8EC;
  font-size: 1.15rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background-color var(--transition), transform var(--transition);
}
.carousel-arrow:hover { background: rgba(18, 11, 6, .62); }
.carousel-arrow:active { transform: scale(.94); }
.carousel-arrow[data-slide-prev] { left: clamp(8px, 2vw, 24px); }
.carousel-arrow[data-slide-next] { right: clamp(8px, 2vw, 24px); }

.carousel-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(12px, 3vw, 28px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-inline: clamp(20px, 6vw, 80px);
  pointer-events: none;
}
.carousel-dots {
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
}
.carousel-dot {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
}
.carousel-dot i {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 248, 236, .45);
  transition: width var(--transition), background-color var(--transition);
}
.carousel-dot:hover i { background: rgba(255, 248, 236, .75); }
.carousel-dot[aria-current="true"] i { width: 36px; background: #E8C87E; }

.carousel-pause {
  pointer-events: auto;
  min-height: 44px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 248, 236, .4);
  border-radius: var(--radius-pill);
  background: rgba(18, 11, 6, .42);
  color: #FFF8EC;
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.carousel-pause:hover { background: rgba(18, 11, 6, .62); }
.carousel-pause[data-playing="true"] .pause-icon::before { content: "❚❚"; letter-spacing: 2px; }
.carousel-pause[data-playing="false"] .pause-icon::before { content: "▶"; }

/* ---------- Hero（产品页等非轮播首屏） ---------- */
.hero {
  padding-block: clamp(48px, 8vw, 96px);
  background: linear-gradient(to bottom, rgba(var(--overlay-rgb), .28), transparent 32%), var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}
.hero-copy h1 { margin-bottom: var(--space-4); }
.hero-lead { margin-bottom: var(--space-3); }
.hero-note { color: var(--text-muted); font-size: var(--fs-sm); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-6); }
.hero-media { aspect-ratio: 16 / 10; }

/* ---------- 编辑式要点（细线分栏，非等宽卡片） ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border-strong);
}
.feature,
.scene {
  position: relative;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 2.5vw, 32px) clamp(20px, 3vw, 36px);
  background: transparent;
  border: 0;
  border-radius: 0;
}
.feature + .feature,
.scene + .scene { border-left: 1px solid var(--border); }
.feature::before,
.scene::before { display: none; }
.feature-index {
  display: block;
  margin-bottom: var(--space-4);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.feature h3, .scene h3 { margin-bottom: var(--space-2); }
.feature p, .scene p { color: var(--text-muted); font-size: var(--fs-sm); }

/* 场景：非对称错位排版 */
.scene-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.1fr;
  gap: 0;
  border-top: 1px solid var(--border-strong);
}
.scene-grid .scene:nth-child(2) { transform: translateY(clamp(0px, 2vw, 20px)); }
.scene .scene-index {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

/* ---------- Split / table ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}
.split figure { aspect-ratio: 4 / 5; }
.split-body > * + * { margin-top: var(--space-3); }

.definition-list,
.spec-list {
  display: grid;
  grid-template-columns: minmax(110px, .34fr) minmax(0, 1fr);
  margin: 0;
  border-top: 1px solid var(--border);
}
.definition-list dt,
.definition-list dd,
.spec-list dt,
.spec-list dd {
  margin: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
  max-width: none;
}
.definition-list dt,
.spec-list dt { color: var(--primary); font-weight: 600; }
.definition-list dd,
.spec-list dd { color: var(--text-muted); }

.spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.spec-table th,
.spec-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.spec-table th { width: 30%; color: var(--primary); font-weight: 600; }
.spec-table td { color: var(--text-muted); }

/* ---------- Product ---------- */
.spec-tabs {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.spec-tabs::-webkit-scrollbar { display: none; }
.spec-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  font-weight: 600;
}
.spec-tabs a:hover,
.spec-tabs a[aria-current="true"] { color: var(--text); border-bottom-color: var(--amber); }

/* 产品栅格：非对称（第三张更宽），移动端单列 */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: clamp(16px, 2.5vw, 28px);
}
.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-3px);
}
.product-card figure {
  aspect-ratio: 4 / 5;
  border: 0;
  border-radius: 0;
}
.product-card .media-frame::after { display: none; }
.product-body { padding: clamp(16px, 2.5vw, 26px); }
.product-body h3 { margin-bottom: 4px; }
.product-sub {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-2);
}
.product-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}
.product-spec {
  display: inline-block;
  margin: 0 0 var(--space-3);
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.76rem;
}
.product-body > p:not(.product-price):not(.product-sub) { color: var(--text-muted); font-size: var(--fs-sm); }
.product-body ul {
  margin: var(--space-2) 0 var(--space-3);
  padding-left: 1.2em;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.product-body li + li { margin-top: 4px; }
.product-body .text-link { margin-top: auto; }
.product-tag {
  display: inline-block;
  margin-bottom: var(--space-2);
  padding: 2px 10px;
  border: 1px solid var(--amber);
  border-radius: var(--radius-pill);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
}

.ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}
.ingredient-list li {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  font-size: var(--fs-sm);
}

.science-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-6); margin-top: var(--space-4); }
.science-posters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-6); margin-top: var(--space-6); }
.science-poster {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.science-poster img { width: 100%; height: auto; display: block; }
.science-poster figcaption { padding: 10px 14px; font-size: var(--fs-sm); color: var(--text-muted); }
.science-item { border-bottom: 1px dashed var(--border-strong); }
.science-item summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}
.science-item summary::-webkit-details-marker { color: var(--accent); }
.science-item p { padding-bottom: var(--space-3); color: var(--text-muted); font-size: var(--fs-sm); }

/* ---------- 动态内容状态（loading / empty / error） ---------- */
.grid-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  max-width: none;
}
.grid-status[hidden] { display: none; }
.grid-status[data-kind="loading"]::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid var(--border-strong);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: status-spin 900ms linear infinite;
}
.grid-status[data-kind="error"] { color: var(--error-color); }
.grid-status[data-kind="empty"] { color: var(--text-muted); }
@keyframes status-spin { to { transform: rotate(360deg); } }

.state-box {
  padding: clamp(24px, 4vw, 40px);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: center;
  max-width: none;
}
.state-box h3 { margin-bottom: var(--space-2); }
.state-box p { margin-inline: auto; color: var(--text-muted); font-size: var(--fs-sm); }
.state-box .btn { margin-top: var(--space-4); }

[data-busy="true"] { position: relative; }
[data-busy="true"] > * { opacity: .55; transition: opacity var(--transition); }
[data-busy="true"] .grid-status { opacity: 1; }

/* ---------- Forms ---------- */
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.form-card { padding: clamp(20px, 4vw, 36px); }
.order-form fieldset {
  min-width: 0;
  margin: 0 0 var(--space-8);
  padding: 0;
  border: 0;
}
.order-form fieldset:last-of-type { margin-bottom: var(--space-4); }
.order-form legend {
  width: 100%;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
}

.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.option:has(input:checked) {
  border-color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber);
  background: var(--accent-soft);
}
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.option-name { font-weight: 600; color: var(--text); }
.option-price { font-size: var(--fs-sm); color: var(--primary); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label,
.field .label-text {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
}
.field textarea { min-height: 108px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); opacity: .8; }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error-color); }
.error { margin: 6px 0 0; color: var(--error-color); font-size: 0.82rem; max-width: none; }
.error[hidden] { display: none; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-note { color: var(--text-muted); font-size: 0.85rem; max-width: none; }

.summary { padding: clamp(20px, 4vw, 32px); }
.summary[hidden] { display: none; }
.summary h2 { margin-bottom: var(--space-3); font-size: 1.5rem; }
.summary-list {
  display: grid;
  grid-template-columns: minmax(92px, .3fr) minmax(0, 1fr);
  margin: 0 0 var(--space-3);
  border-top: 1px solid var(--border);
}
.summary-list dt,
.summary-list dd {
  margin: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
  max-width: none;
}
.summary-list dt { color: var(--primary); font-weight: 600; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-3); }

.qr-card { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--border-strong); }
.qr-card figure,
.contact-qr figure {
  margin: 0;
  aspect-ratio: 1;
  max-width: 220px;
  border-radius: 4px;
  background: #FFFFFF;
  border-color: #DDDDDD;
}
.qr-card .media-frame::after,
.contact-qr .media-frame::after { display: none; }
.qr-card .media-frame img,
.contact-qr .media-frame img { object-fit: contain; padding: 8%; filter: none; }
.qr-card figcaption,
.contact-qr figcaption { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); }
/* 真实二维码（uploads/）上传后由 JS 标注 */
.qr-card figure[data-qr-real="true"],
.contact-qr figure[data-qr-real="true"] { border-color: var(--success-color); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .72fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.contact-address { font-style: normal; font-size: 1.05rem; line-height: 2; max-width: none; }
.contact-address a { font-weight: 700; font-size: 1.2rem; }
.contact-qr figure { max-width: 220px; }
.contact-qr { display: flex; flex-direction: column; align-items: center; }

/* ---------- Admin（admin.html 依赖，勿删） ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.admin-stack { display: grid; gap: var(--space-4); min-width: 0; }
.admin-card { padding: clamp(20px, 4vw, 36px); }
.mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.admin-form .field { margin-bottom: var(--space-4); }
.admin-form fieldset { min-width: 0; margin: 0 0 var(--space-4); padding: 0; border: 0; }
.admin-form legend {
  width: 100%;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.admin-skins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-skins .option { min-height: 84px; }
.skin-swatch { width: 100%; height: 18px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); }
.swatch-taojin { background: linear-gradient(90deg, #5B3A22 50%, #A97B2E 50%); }
.swatch-miyouhong { background: linear-gradient(90deg, #7C2B44 50%, #B08A3C 50%); }
.swatch-shanquanqing { background: linear-gradient(90deg, #2E5A4A 50%, #C08A3E 50%); }
.swatch-yeyan { background: linear-gradient(90deg, #221A15 50%, #D9B26A 50%); }
.admin-message { margin-top: var(--space-3); min-height: 1.6em; font-size: var(--fs-sm); max-width: none; }
.admin-message[data-kind="error"] { color: var(--error-color); }
.admin-message[data-kind="success"] { color: var(--success-color); }
.admin-help { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--border-strong); }
.admin-preview { padding: var(--space-4); }
.admin-preview-frame { aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: var(--space-4); overflow: hidden; }
.admin-preview-line { height: 10px; border-radius: 5px; background: var(--border-strong); margin-bottom: 10px; }
.admin-preview-line:nth-child(1) { width: 40%; background: var(--amber); }
.admin-preview-line:nth-child(2) { width: 80%; }
.admin-preview-line:nth-child(3) { width: 62%; }
.admin-preview-cta { display: inline-block; min-height: 44px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--primary); color: var(--primary-ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }

/* ---------- Skin switcher ---------- */
.skin-switcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  font-size: var(--fs-sm);
}
.skin-toggle {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.skin-panel {
  width: min(268px, calc(100vw - 32px));
  padding: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}
.skin-panel[hidden] { display: none; }
.skin-panel p { margin-bottom: 10px; color: var(--text-muted); font-size: 0.78rem; max-width: none; }
.skin-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.skin-options button {
  min-height: 44px;
  padding: var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.skin-options button[aria-pressed="true"] {
  border-color: var(--amber);
  background: var(--accent-soft);
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--amber);
}

/* ---------- Toast / mobile bars ---------- */
.toast {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 80;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-strong);
  font-size: var(--fs-sm);
  animation: toast-in var(--transition);
}
.toast[data-kind="error"] { border-color: var(--error-color); color: var(--error-color); }
.toast[data-kind="success"] { border-color: var(--success-color); color: var(--success-color); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mobile-order-bar,
.mobile-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: none;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: rgba(var(--overlay-rgb), .96);
}
.mobile-order-bar a,
.mobile-bottom-bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.mobile-bottom-bar[hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (min-width: 1024px) {
  .summary { position: sticky; top: 96px; }
}

@media (max-width: 1023px) {
  .hero-grid,
  .split,
  .order-layout,
  .contact-grid,
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid .product-card:last-child { grid-column: 1 / -1; }
  .feature-grid,
  .scene-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scene-grid .scene:nth-child(2) { transform: none; }
  .hero-media { aspect-ratio: 16 / 9; }
  .carousel-slide { height: clamp(480px, 70vh, 720px); }
}

@media (max-width: 767px) {
  .header-inner { align-items: flex-start; }
  .has-nav-toggle .nav-toggle { display: inline-flex; }
  .has-nav-toggle .site-nav { display: none; }
  .has-nav-toggle .site-nav[data-open="true"] { display: flex; }
  .site-nav { width: 100%; padding-bottom: var(--space-1); }
  .site-nav a { padding-inline: 10px; }
  .hero-media { aspect-ratio: 4 / 5; }
  .feature-grid,
  .scene-grid,
  .product-grid,
  .science-grid,
  .science-posters,
  .option-grid,
  .form-grid,
  .admin-skins { grid-template-columns: minmax(0, 1fr); }
  .product-grid .product-card:last-child { grid-column: auto; }
  .feature + .feature,
  .scene + .scene {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .scene-grid .scene:nth-child(2) { transform: none; }
  .field--full { grid-column: auto; }
  .definition-list,
  .summary-list { grid-template-columns: minmax(92px, .32fr) minmax(0, 1fr); }
  .definition-list dt,
  .definition-list dd,
  .summary-list dt,
  .summary-list dd { padding-inline: 6px; }
  .skin-switcher { right: 12px; bottom: 80px; }
  .toast { bottom: 152px; }
  .mobile-order-bar,
  .mobile-bottom-bar:not([hidden]) { display: block; }
  body:has(.mobile-order-bar:not([hidden]), .mobile-bottom-bar:not([hidden])) { padding-bottom: 80px; }
  .contact-qr figure { max-width: 180px; }
  .spec-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td { display: block; width: 100%; }
  .spec-table tr { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
  .spec-table th { width: auto; padding: 0 0 4px; border: 0; }
  .spec-table td { padding: 0; border: 0; }
  .carousel-slide { height: clamp(440px, 66vh, 600px); }
  .carousel-arrow { width: 44px; height: 44px; }
  .carousel-arrow[data-slide-prev] { left: 8px; }
  .carousel-arrow[data-slide-next] { right: 8px; }
  .carousel-ui { padding-inline: 16px; flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
  .definition-list,
  .summary-list { grid-template-columns: minmax(0, 1fr); }
  .definition-list dt,
  .summary-list dt { border-bottom: 0; padding-bottom: 0; }
  .definition-list dd,
  .summary-list dd { padding-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0ms !important; transition-duration: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
