/* ==========================================================================
   Camping Packing Toolkit — 全站唯一样式表
   令牌与类名严格遵循 foundation-contract.md 第 11 章（Task 1，只用不改）
   ========================================================================== */

/* 1. 设计令牌 ------------------------------------------------------------- */
:root {
  /* 品牌色（契约固定值） */
  --green: #2f6b4f;
  --green-dark: #1e4d38;
  --sand: #f7f3ec;
  --amber: #e8a13c;
  --ink: #1c2b24;
  --paper: #fff;
  --line: #e5ded1;
  --radius: 16px;
  /* 派生色 */
  --green-soft: #e7f0ea;
  --green-tint: #f0f6f2;
  --amber-soft: #fdf3e2;
  --sand-deep: #efe8db;
  --ink-soft: #4a5a52;
  --ink-mute: #6f7d75;
  --white-70: rgba(255, 255, 255, .72);
  --white-55: rgba(255, 255, 255, .55);
  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(28, 43, 36, .06);
  --shadow-sm: 0 2px 8px rgba(28, 43, 36, .07);
  --shadow-md: 0 8px 24px rgba(28, 43, 36, .10);
  --shadow-lg: 0 18px 44px rgba(28, 43, 36, .16);
  --shadow-card: 0 10px 30px rgba(28, 43, 36, .14);
  --shadow-header: 0 2px 14px rgba(28, 43, 36, .08);
  --ring: 0 0 0 4px rgba(47, 107, 79, .16);
  /* 间距 */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;
  /* 排版与动效 */
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  --maxw: 1200px;
  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 2. 重置与基础 ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; color: var(--ink); }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { line-height: 1.7; }
::selection { background: var(--green); color: #fff; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.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 { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.section { padding: var(--space-16) 0; }
.section-sm { padding: var(--space-10) 0; }
.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* 4. 站点头部与导航 ------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 1000;
  background: var(--paper); box-shadow: var(--shadow-header); }
.site-header .header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  height: var(--header-h); display: flex; align-items: center; gap: var(--space-4);
}
.logo {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: 1.12rem; font-weight: 800; color: var(--green-dark);
  letter-spacing: -.01em; white-space: nowrap; margin-right: auto; min-height: 44px;
}
.logo:hover { color: var(--green); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--green); color: #fff; font-size: 1rem; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: var(--space-2); }
.nav-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; min-height: 44px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 600; font-size: .95rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--green-dark); background: var(--green-tint); }

.fav-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--amber); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1;
}
.fav-count.is-empty { display: none; }

.lang-switch {
  display: inline-flex; align-items: stretch; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; background: var(--paper); flex-shrink: 0;
}
.lang-switch button { padding: 7px 14px; min-height: 34px; font-size: .85rem;
  font-weight: 600; color: var(--ink-mute);
  transition: background .2s var(--ease), color .2s var(--ease); }
.lang-switch button.active { background: var(--green); color: #fff; }
.lang-switch button:not(.active):hover { background: var(--green-tint); color: var(--green-dark); }

.free-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; min-height: 34px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: .82rem; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}
.free-badge:hover { background: var(--green-dark); color: #fff; }

.badge-pro {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; min-height: 34px; border-radius: 999px;
  background: var(--amber); color: #fff; font-size: .82rem; font-weight: 700;
  white-space: nowrap; flex-shrink: 0; transition: filter .2s var(--ease);
}
.badge-pro:hover { filter: brightness(.94); color: #fff; }

.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed; top: 0; right: 0; width: min(86vw, 340px); height: 100dvh;
  background: var(--paper); z-index: 1100; transform: translateX(100%);
  transition: transform .3s var(--ease); display: flex; flex-direction: column;
  padding: calc(var(--space-6) + env(safe-area-inset-top)) var(--space-6) var(--space-6);
  overflow-y: auto; box-shadow: var(--shadow-lg); visibility: hidden;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav .mobile-nav-head { display: flex; align-items: center;
  justify-content: space-between; margin-bottom: var(--space-6); }
.mobile-nav-close { width: 44px; height: 44px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 10px; font-size: 1.5rem; color: var(--ink-soft); }
.mobile-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--space-3); min-height: 48px; border-radius: 10px;
  color: var(--ink); font-weight: 600; font-size: 1.02rem; border-bottom: 1px solid var(--line);
}
.mobile-nav a:active { background: var(--green-tint); }
.mobile-nav .mobile-nav-foot { margin-top: auto; padding-top: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3); }

.nav-overlay {
  position: fixed; inset: 0; background: rgba(28, 43, 36, .45); z-index: 1050;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.nav-overlay.open { opacity: 1; visibility: visible; }
body.nav-lock { overflow: hidden; }

/* 5. 按钮与胶囊 ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: 999px;
  font-size: .97rem; font-weight: 700; line-height: 1.2; text-align: center;
  white-space: nowrap; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease),
    color .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--sand-deep); color: var(--ink); }
.btn-light { background: #fff; color: var(--green-dark); box-shadow: var(--shadow-sm); }
.btn-light:hover { background: var(--sand); color: var(--green-dark); box-shadow: var(--shadow-md); }
.btn-sm { min-height: 38px; padding: 7px 16px; font-size: .87rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; min-height: 28px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.chip.chip-amber { background: var(--amber-soft); color: #9a6214; }
.chip.chip-sand { background: rgba(255, 255, 255, .18); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-6) 0; }
.filter-bar .filter-btn {
  padding: 8px 18px; min-height: 44px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink-soft); font-weight: 600; font-size: .9rem;
  transition: all .2s var(--ease);
}
.filter-bar .filter-btn:hover { border-color: var(--green); color: var(--green-dark); }
.filter-bar .filter-btn.active { background: var(--green); border-color: var(--green); color: #fff; }

/* 6. 照片卡片 ------------------------------------------------------------- */
.photo-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 200px; padding: var(--space-5); border-radius: var(--radius);
  overflow: hidden; background-color: var(--green-dark);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  color: #fff; text-decoration: none; isolation: isolate; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.photo-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(28, 43, 36, 0) 30%, rgba(28, 43, 36, .40) 72%, rgba(28, 43, 36, .72) 100%);
  transition: opacity .3s var(--ease);
}
.photo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.photo-card > * { position: relative; z-index: 1; }
.photo-card h3 { color: #fff; font-size: 1.12rem; margin: var(--space-2) 0 4px; }
.photo-card p { color: var(--white-70); font-size: .88rem; line-height: 1.55; margin: 0; }

.card-badge {
  position: absolute; top: var(--space-4); left: var(--space-4); z-index: 2;
  display: inline-flex; align-items: center; padding: 5px 12px; min-height: 26px;
  border-radius: 999px; background: var(--amber); color: #fff;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; box-shadow: var(--shadow-xs);
}
.card-badge.badge-green { background: var(--green); }

.card-link { display: inline-flex; align-items: center; gap: 5px; margin-top: var(--space-3);
  color: #fff; font-size: .85rem; font-weight: 700; }
.card-link::after { content: "→"; transition: transform .2s var(--ease); }
.photo-card:hover .card-link::after { transform: translateX(4px); }
.card-meta { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2);
  font-size: .78rem; color: var(--white-70); }

.article-card {
  display: flex; flex-direction: column; background: var(--paper);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  height: 100%; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.article-card .card-thumb { aspect-ratio: 16 / 9; background-size: cover;
  background-position: center; background-color: var(--green-dark); }
.article-card .card-body { padding: var(--space-5); display: flex; flex-direction: column;
  gap: var(--space-2); flex: 1; }
.article-card h3 { font-size: 1.05rem; }
.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--green); }
.article-card p { color: var(--ink-mute); font-size: .9rem; line-height: 1.6; }
.article-card .card-meta-dark { margin-top: auto; padding-top: var(--space-3);
  display: flex; align-items: center; gap: var(--space-3);
  color: var(--ink-mute); font-size: .8rem; }

/* 7. 收藏星标按钮 --------------------------------------------------------- */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--line); background: transparent;
  color: var(--ink-soft); font-size: 1.15rem; line-height: 1; cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease),
    color .2s var(--ease), border-color .2s var(--ease);
}
.fav-btn .star { font-style: normal; line-height: 1; }
.fav-btn .star::before { content: "☆"; }
.fav-btn:hover { border-color: var(--amber); color: var(--amber); }
.fav-btn.active { border-color: var(--amber); color: var(--amber); }
.fav-btn.active .star::before { content: "★"; }

/* 照片卡内：右上半透明黑圆 40x40 */
.fav-btn.card-fav {
  position: absolute; top: var(--space-4); right: var(--space-4); z-index: 3;
  width: 40px; height: 40px; min-width: 40px; min-height: 40px;
  border: 0; background: rgba(28, 43, 36, .42); color: #fff;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.fav-btn.card-fav:hover { background: rgba(28, 43, 36, .62); color: #fff; border: 0; }
.fav-btn.card-fav.active { background: var(--amber); color: #fff; border: 0; }

/* hero 区行内变体：白描边星 */
.hero-actions .fav-btn { border-color: rgba(255, 255, 255, .55); color: #fff; }
.hero-actions .fav-btn:hover,
.hero-actions .fav-btn.active {
  border-color: var(--amber); color: var(--amber); background: rgba(255, 255, 255, .12);
}

/* 8. 网格与区块标题 ------------------------------------------------------- */
.grid-2, .grid-3 { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cards-grid { display: grid; gap: var(--space-5);
  grid-template-columns: repeat(3, minmax(0, 1fr)); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-8); }
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.section-head .section-sub { margin-top: 6px; color: var(--ink-mute); font-size: .95rem; }
.section-head .view-all { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .9rem; white-space: nowrap; min-height: 44px; }

/* 9. 面板与表单 ----------------------------------------------------------- */
.panel {
  background: var(--paper); border-radius: var(--radius); padding: var(--space-6);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.panel + .panel { margin-top: var(--space-6); }
.panel-title { font-size: 1.15rem; margin-bottom: var(--space-5);
  display: flex; align-items: center; gap: var(--space-2); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5); }
.form-grid .field-full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .field-label { font-size: .88rem; font-weight: 700; color: var(--ink); }
.field .hint { font-size: .8rem; color: var(--ink-mute); }

.field input[type="text"], .field input[type="number"],
.field input[type="email"], .field input[type="search"], .field input[type="date"],
.field select, .field textarea,
input[type="text"], input[type="number"], input[type="email"],
input[type="search"], input[type="date"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus,
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green); box-shadow: var(--ring);
}
.field select, select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236f7d75' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}

.field-check { display: flex; align-items: flex-start; gap: 10px;
  min-height: 44px; padding: 8px 0; cursor: pointer; }
.field-check input[type="checkbox"],
.field-check input[type="radio"] {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 22px; height: 22px; margin: 1px 0 0;
  border: 1.5px solid var(--line); background: var(--paper); cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.field-check input[type="checkbox"] { border-radius: 6px; }
.field-check input[type="radio"] { border-radius: 50%; }
.field-check input:checked { background: var(--green); border-color: var(--green); }
.field-check input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10' viewBox='0 0 13 10'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M1 5l4 4 7-8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.field-check input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 8px;
}
.field-check input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.field-check .check-label { font-size: .93rem; line-height: 1.5; padding-top: 1px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 var(--space-4); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

.unit-toggle { display: inline-flex; border: 1.5px solid var(--line);
  border-radius: 999px; overflow: hidden; background: var(--paper); }
.unit-toggle button { padding: 8px 18px; min-height: 40px;
  font-size: .88rem; font-weight: 600; color: var(--ink-mute); }
.unit-toggle button.active { background: var(--green); color: #fff; }

/* 10. 结果卡 · 统计 · 进度条 ---------------------------------------------- */
.result-card { background: var(--green-tint); border: 1px solid var(--green-soft);
  border-radius: var(--radius); padding: var(--space-6); }
.result-card.is-hidden { display: none; }
.result-card .result-title { color: var(--green-dark); text-transform: uppercase;
  letter-spacing: .06em; font-size: .8rem; font-weight: 800; margin-bottom: var(--space-4); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4); }
.result-line { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-3); padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .94rem; }
.result-line:last-child { border-bottom: 0; }
.result-line .result-value { font-weight: 800; color: var(--green-dark); white-space: nowrap; }
.result-line.total { border-bottom: 0; border-top: 2px solid var(--green-soft);
  margin-top: var(--space-2); padding-top: var(--space-4); font-size: 1.05rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4); }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: var(--space-5); text-align: center; }
.stat .stat-num { display: block; font-size: 1.9rem; font-weight: 800;
  color: var(--green-dark); line-height: 1.15; letter-spacing: -.02em; }
.stat .stat-label { display: block; margin-top: 4px; font-size: .82rem;
  color: var(--ink-mute); font-weight: 600; }
.stat.stat-amber .stat-num { color: #b06f12; }

.progress { width: 100%; height: 12px; border-radius: 999px;
  background: var(--sand-deep); overflow: hidden; }
.progress > .progress-fill { height: 100%; border-radius: 999px;
  background: var(--green); width: 0; transition: width .5s var(--ease); }
.progress-fill.fill-amber { background: var(--amber); }
.progress-fill.fill-green-dark { background: var(--green-dark); }
.progress-wrap { display: flex; flex-direction: column; gap: 6px; }
.progress-meta { display: flex; justify-content: space-between;
  font-size: .82rem; color: var(--ink-mute); font-weight: 600; }

.pack-list { display: flex; flex-direction: column; gap: 2px; }
.pack-list .pack-row { display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-3); border-radius: 10px; font-size: .93rem; }
.pack-list .pack-row:nth-child(odd) { background: var(--sand); }
.pack-row .pack-name { flex: 1; }
.pack-row .pack-qty { font-weight: 700; color: var(--green-dark); }
.pack-row .row-remove { width: 36px; height: 36px; min-width: 36px;
  border-radius: 8px; color: var(--ink-mute); font-size: 1.05rem; }
.pack-row .row-remove:hover { background: var(--amber-soft); color: #9a6214; }

/* 11. 表格 ---------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; background: var(--paper);
  font-size: .92rem; border-radius: var(--radius); overflow: hidden; }
.tbl thead th { background: var(--green); color: #fff; text-align: left;
  padding: 13px 16px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.tbl tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line);
  color: var(--ink-soft); vertical-align: top; }
.tbl tbody tr:nth-child(even) { background: var(--sand); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--green-tint); }
.tbl tfoot td { padding: 13px 16px; font-weight: 800;
  color: var(--green-dark); background: var(--green-soft); }

/* 12. 文章排版 prose ------------------------------------------------------ */
.prose { max-width: 760px; margin: 0 auto; padding: var(--space-10) 0 var(--space-12);
  font-size: 1.02rem; line-height: 1.75; color: var(--ink-soft); }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  position: relative; color: var(--ink); font-size: 1.55rem;
  margin: var(--space-12) 0 var(--space-5); padding-top: var(--space-5);
}
.prose h2::before { content: ""; position: absolute; top: 0; left: 0;
  width: 44px; height: 4px; border-radius: 999px; background: var(--amber); }
.prose h3 { color: var(--ink); font-size: 1.2rem; margin: var(--space-8) 0 var(--space-3); }
.prose h4 { color: var(--ink); margin: var(--space-6) 0 var(--space-2); }
.prose p { margin: 0 0 var(--space-4); }
.prose ul, .prose ol { margin: 0 0 var(--space-5); padding-left: 1.4em;
  display: flex; flex-direction: column; gap: var(--space-2); }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 1.1em; }
.prose ul > li::before { content: ""; position: absolute; left: 0; top: .72em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--green); font-weight: 700; }
.prose li { line-height: 1.7; }
.prose a { color: var(--green); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--green-dark); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose img { width: 100%; border-radius: var(--radius);
  margin: var(--space-6) 0; box-shadow: var(--shadow-md); }
.prose .tbl { margin: var(--space-6) 0; box-shadow: var(--shadow-xs); }
.prose blockquote {
  margin: var(--space-6) 0; padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--green); background: var(--sand);
  border-radius: 0 12px 12px 0; color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { background: var(--sand-deep); padding: 2px 7px;
  border-radius: 6px; font-size: .88em; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: var(--space-10) 0; }

.faq-item { background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: var(--space-5) var(--space-6);
  margin: var(--space-4) 0; box-shadow: var(--shadow-xs); }
.faq-item > h3, .faq-item > h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--green-dark); }
.faq-item > h3::before { content: "Q "; color: var(--amber); font-weight: 800; }
.faq-item > p:last-child { margin-bottom: 0; }
.faq-item > p:first-of-type::before { content: "A "; color: var(--green); font-weight: 800; }

.article-meta { display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: var(--space-3); margin-bottom: var(--space-6);
  font-size: .88rem; color: var(--ink-mute); }

/* 13. Hero 区 ------------------------------------------------------------- */
.home-hero {
  position: relative; min-height: min(88vh, 720px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: var(--space-20) var(--space-5);
  background-color: var(--green-dark); background-size: cover; background-position: center;
  color: #fff; isolation: isolate;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(28, 43, 36, .55) 0%,
    rgba(28, 43, 36, .35) 45%, rgba(28, 43, 36, .72) 100%);
}
.home-hero .hero-inner { position: relative; z-index: 1; max-width: 760px;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.home-hero h1 { color: #fff; font-size: clamp(2rem, 5.2vw, 3.4rem);
  letter-spacing: -.02em; text-wrap: balance; }
.home-hero .hero-sub { color: var(--white-70); font-size: clamp(1rem, 2vw, 1.18rem);
  max-width: 600px; line-height: 1.7; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: var(--space-3); margin-top: var(--space-2); }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }

.tool-hero, .page-hero {
  position: relative; background-color: var(--green-dark);
  background-size: cover; background-position: center; color: #fff;
  padding: var(--space-16) 0 calc(var(--space-12) + 8px); isolation: isolate;
}
.tool-hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(28, 43, 36, .35) 0%, rgba(28, 43, 36, .65) 100%);
}
.tool-hero .container, .page-hero .container { position: relative; z-index: 1; }
.tool-hero h1, .page-hero h1 { color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.6rem); margin: var(--space-3) 0 var(--space-2); }
.tool-hero .tagline, .page-hero .tagline { color: var(--white-70);
  font-size: 1.05rem; max-width: 640px; }
.tool-hero .hero-actions { justify-content: flex-start; margin-top: var(--space-5); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--white-55); }
.crumbs a { color: var(--white-70); font-weight: 600; min-height: 28px;
  display: inline-flex; align-items: center; }
.crumbs a:hover { color: #fff; }
.crumbs span { color: #fff; }

.tool-page { padding-top: var(--space-10); padding-bottom: var(--space-16); }
.tool-page .form-panel { margin-bottom: var(--space-6); }

/* 14. 内容区块 ------------------------------------------------------------ */
.how-it-works { margin-top: var(--space-12); }
.how-it-works > h2, .related > h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin-bottom: var(--space-6);
  position: relative; padding-left: 16px;
}
.how-it-works > h2::before, .related > h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 1.2em; border-radius: 999px; background: var(--green);
}
.how-it-works .steps { display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.how-it-works .step { background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: var(--space-5); }
.step-num { display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--green-soft);
  color: var(--green-dark); font-weight: 800; margin-bottom: var(--space-3); }
.step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.step p { font-size: .9rem; color: var(--ink-mute); margin: 0; }

.related { margin-top: var(--space-16); padding-bottom: var(--space-8); }

.trust-band { background: var(--paper); border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); }
.feature-icon { display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; background: var(--green-soft);
  color: var(--green-dark); font-size: 1.4rem; margin-bottom: var(--space-4); }
.feature-item h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature-item p { color: var(--ink-mute); font-size: .93rem; margin: 0; }

.pro-banner { position: relative; border-radius: var(--radius);
  padding: var(--space-10) var(--space-8);
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  color: #fff; text-align: center; overflow: hidden; }
.pro-banner h2 { color: #fff; margin-bottom: var(--space-3); }
.pro-banner p { color: var(--white-70); max-width: 560px; margin: 0 auto var(--space-6); }

.empty-state { text-align: center; padding: var(--space-16) var(--space-5);
  color: var(--ink-mute); }
.empty-state .empty-icon { font-size: 2.4rem; margin-bottom: var(--space-3); }
.empty-state h3 { margin-bottom: 8px; }

/* 15. Toast --------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px);
  z-index: 2000; max-width: min(92vw, 440px);
  padding: 13px 22px; min-height: 48px; display: inline-flex;
  align-items: center; gap: 10px; border-radius: 999px;
  background: var(--green-dark); color: #fff; font-size: .92rem; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0);
  animation: toast-in .3s var(--ease); }
.toast.error { background: #8a2f2f; }
@keyframes toast-in {
  from { transform: translate(-50%, 24px) scale(.96); opacity: 0; }
  to   { transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* 16. 页脚 ---------------------------------------------------------------- */
.site-footer { flex-shrink: 0; background: var(--green-dark);
  color: rgba(255, 255, 255, .82);
  padding: var(--space-12) 0 var(--space-8); margin-top: var(--space-16); }
.footer-grid { display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--space-8); }
.site-footer .footer-brand .logo { color: #fff; margin-bottom: var(--space-3); }
.site-footer .footer-brand p { font-size: .9rem; line-height: 1.7;
  color: rgba(255, 255, 255, .68); max-width: 300px; }
.site-footer h4 { color: #fff; font-size: .92rem;
  margin-bottom: var(--space-4); letter-spacing: .02em; }
.site-footer ul { display: flex; flex-direction: column; gap: 2px; }
.site-footer ul a, .site-footer .footer-contact a {
  display: inline-flex; align-items: center; min-height: 36px;
  color: rgba(255, 255, 255, .72); font-size: .9rem;
}
.site-footer ul a:hover,
.site-footer .footer-contact a:hover { color: #a8d8be; }
.footer-contact { display: flex; flex-direction: column;
  gap: var(--space-2); font-size: .9rem; }
.footer-email { display: inline-flex; align-items: center; gap: 7px;
  color: #a8d8be !important; font-weight: 600; word-break: break-all; }
.footer-bottom { margin-top: var(--space-10); padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3); font-size: .82rem; color: rgba(255, 255, 255, .55); }
.footer-disclaimer { max-width: 680px; line-height: 1.6; }

/* 16b. 免责声明组件 ------------------------------------------------------- */
.disclaimer-banner {
  background: var(--amber-soft);
  border: 1px solid #e8c98c;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: var(--space-6) auto 0;
  max-width: 760px;
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .88rem; line-height: 1.65; color: #8a5a10;
}
.disclaimer-banner .disc-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--amber); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800;
  font-size: .8rem; line-height: 1;
}
.disclaimer-banner .disc-body strong { display: block; margin-bottom: 2px; }
.disclaimer-inline {
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px; margin: var(--space-4) 0;
  font-size: .84rem; line-height: 1.6; color: #8a5a10;
}
@media (max-width: 640px) {
  .disclaimer-banner { padding: 12px 14px; font-size: .84rem; }
}

/* 17. 响应式 1200 / 900 / 640 -------------------------------------------- */
@media (max-width: 1200px) {
  .container, .site-header .header-inner { max-width: 100%; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .nav-links, .site-header .free-badge,
  .site-header .badge-pro, .site-header .lang-switch { display: none; }
  .hamburger { display: inline-flex; }
  .form-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--space-6); }
  .home-hero { min-height: 70vh; }
  .section { padding: var(--space-12) 0; }
  .pro-banner { padding: var(--space-10) var(--space-5); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .site-header .header-inner { padding: 0 16px; gap: var(--space-2); }
  .logo { font-size: 1rem; }
  .logo-text-long { display: none; }
  .home-hero { min-height: 62vh; padding: var(--space-12) var(--space-4); }
  .home-hero h1 { font-size: 1.85rem; }
  .home-hero .hero-sub { font-size: .95rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .tool-hero, .page-hero { padding: var(--space-10) 0 var(--space-8); }
  .panel { padding: var(--space-5); }
  .section-head { flex-direction: column; align-items: flex-start;
    gap: var(--space-2); margin-bottom: var(--space-6); }
  .grid-2, .grid-3 { gap: var(--space-4); }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .prose { font-size: .98rem; padding: var(--space-8) 0 var(--space-10); }
  .prose h2 { font-size: 1.35rem; }
  .form-actions .btn { flex: 1 1 auto; }
  .toast { bottom: 16px; width: calc(100vw - 32px);
    justify-content: center; border-radius: 14px; }
}

/* 18. 360px 超窄屏：无横向滚动 ------------------------------------------- */
@media (max-width: 400px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .container { padding: 0 12px; }
  .home-hero h1 { font-size: 1.6rem; }
  .btn { padding-left: 16px; padding-right: 16px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .photo-card { min-height: 180px; padding: var(--space-4); }
  .panel { padding: var(--space-4); }
  .tbl thead th, .tbl tbody td, .tbl tfoot td { padding: 10px 12px; }
}

/* 19. 打印 ---------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .fav-btn, .hamburger,
  .mobile-nav, .nav-overlay, .hero-actions, .btn, .toast,
  .filter-bar, .related { display: none !important; }
  html, body { background: #fff !important; color: #000; font-size: 12pt; }
  .container { max-width: 100%; padding: 0; }
  .panel, .result-card, .stat, .faq-item, .tbl {
    box-shadow: none !important; border-color: #ccc !important; background: #fff !important;
  }
  /* 照片卡保留文字：去背景图与遮罩 */
  .photo-card {
    min-height: 0; background: none !important; color: #000;
    box-shadow: none; border: 1px solid #ccc; break-inside: avoid;
  }
  .photo-card::before { display: none; }
  .photo-card h3 { color: #000; }
  .photo-card p, .photo-card .card-meta { color: #444; }
  .card-badge {
    background: none; color: #000; border: 1px solid #999; box-shadow: none;
  }
  .tool-hero, .page-hero, .home-hero {
    background: none !important; color: #000; min-height: 0;
    padding: 0 0 var(--space-4);
  }
  .tool-hero::before, .page-hero::before, .home-hero::before { display: none; }
  .tool-hero h1, .page-hero h1, .home-hero h1 { color: #000; }
  .crumbs, .crumbs a, .crumbs span { color: #555; }
  a { color: #000; text-decoration: underline; }
  .prose { max-width: 100%; }
  .progress { border: 1px solid #999; background: #fff; }
}
