/* ============================================================
   食光 Pantry Life · 基础层
   reset / 纸张纹理 / 排版 / 可复用组件（都只吃 tokens.css 变量）
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background-color: var(--cream);
  background-image:
    radial-gradient(ellipse at 12% 4%, rgba(233, 239, 216, .55), transparent 42%),
    radial-gradient(ellipse at 88% 88%, rgba(240, 224, 201, .50), transparent 46%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 纸张纤维纹理：全屏固定薄层，不拦截点击 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  background-size: 180px 180px;
  mix-blend-mode: multiply;
  opacity: .055;
  pointer-events: none;
  z-index: var(--z-grain);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .4px;
  line-height: 1.3;
}
p { margin: 0; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* ---------- 通用文字 ---------- */
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--ink-3);
}
.serif { font-family: var(--serif); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- 纸卡 ---------- */
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: var(--sp-4);
  overflow: hidden;
}
.card--tight { padding: var(--sp-3); border-radius: var(--r-card-sm); }
.card--wash { background: var(--sage-wash); }
.card--warm { background: var(--paper-warm); }

/* 卡片角落的手绘晕染 */
.card::before {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  right: -90px; top: -110px;
  border-radius: var(--r-round);
  background: radial-gradient(circle, rgba(185, 195, 154, .18), transparent 68%);
  pointer-events: none;
}

/* ---------- 区块标题 ---------- */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.sec-head h2 { font-size: 20px; }
.sec-head .sec-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.sec-more {
  font-size: 11px;
  color: var(--olive);
  white-space: nowrap;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.sec-more:hover { border-bottom-color: var(--olive); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--primary { background: var(--olive); color: var(--on-olive); box-shadow: 0 6px 18px rgba(85, 96, 57, .22); }
.btn--primary:hover { background: var(--olive-deep); }
.btn--ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--sage); }
.btn--warm { background: var(--warm); color: #fff; box-shadow: 0 6px 18px rgba(133, 91, 59, .22); }
.btn--warm:hover { background: var(--warm-deep); }
.btn--block { width: 100%; }
.btn--lg { min-height: var(--tap); font-size: 14px; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}
.badge--sage { background: var(--sage-pale); color: var(--olive-deep); }
.badge--warm { background: var(--warm-pale); color: var(--warm-deep); }
.badge--clay { background: var(--clay-pale); color: var(--clay); }
.badge--honey { background: var(--honey-pale); color: var(--warm-deep); }
.badge--plain { background: var(--cream-deep); color: var(--ink-2); }

/* ---------- 进度 ---------- */
.progress {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--cream-deep);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--sage), var(--olive));
}
.progress--warm > i { background: linear-gradient(90deg, var(--honey), var(--warm)); }

/* ---------- 水彩图 ---------- */
.wash-img {
  object-fit: cover;
  background: var(--sage-pale);
  border-radius: var(--r-card-sm);
}
.wash-img--round { border-radius: var(--r-round); }

/* ---------- 装饰叶片（纯 CSS 手绘感） ---------- */
.leaf {
  position: absolute;
  width: 46px; height: 22px;
  border-radius: 100% 0 100% 0;
  background: var(--sage-light);
  opacity: .42;
  pointer-events: none;
  transform: rotate(-28deg);
}
.leaf::after {
  content: "";
  position: absolute;
  left: 4px; right: 6px; top: 50%;
  border-top: 1px solid rgba(85, 96, 57, .45);
}
.leaf--a { right: 34px; top: 22px; }
.leaf--b { right: 8px; top: 52px; width: 34px; height: 17px; transform: rotate(38deg); opacity: .3; }

/* ---------- 待开发占位 / 状态 ---------- */
.stage-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-3);
}
.stage-note::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: var(--r-round);
  background: var(--sage-light);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 30px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  padding: 11px 22px;
  border-radius: var(--r-pill);
  font-size: 12px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: var(--z-toast);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 弹窗与表单 ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: calc(var(--z-drawer) + 2);
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(58, 58, 48, .38);
  backdrop-filter: blur(3px);
}
.modal[hidden] { display: none !important; }
.modal-card {
  width: min(420px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lift);
  padding: 22px 24px 24px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { font-size: 21px; }
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-round);
  background: var(--cream-deep);
  color: var(--ink-2);
  font-size: 20px; line-height: 1;
}
.form__lead { font-size: 12px; color: var(--ink-2); line-height: 1.7; margin-bottom: 16px; }
.form__note { font-size: 10px; color: var(--ink-3); line-height: 1.7; margin: 14px 0 18px; }
.field { display: block; font-size: 11px; color: var(--ink-2); }
.field > span { display: block; margin-bottom: 6px; }
.field input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 13px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  font-size: 13px;
  outline: none;
}
.field input:focus { border-color: var(--sage); background: var(--paper); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }

@media (max-width: 900px) {
  .btn { min-height: var(--tap); padding: 10px 20px; }
  .sec-head h2 { font-size: 18px; }
  .toast { bottom: 96px; }
  .modal { align-items: end; padding: 14px; }
  .modal-card { padding: 20px 18px 24px; }
}
