/* 后土农业 · 共享主题变量与基础样式 V1.3
 * 色值来源：02_品牌管理/品牌视觉规范.md、05_官网开发/官网视觉与交互规范.md
 * 与官网规范冲突时以品牌规范为准（00_官网开发工作手册 第四章 禁令 2）
 */
:root {
  --green: #173b2c;
  --green-dark: #10291f;
  --green-deep: #0b2118;
  --green-light: #315844;
  --gold: #c7a66a;
  --gold-light: #e3d1a6;
  --paper: #fffefa;
  --cream: #f7f5ee;
  --text: #243229;
  --muted: #747d74;
  --line: #e6e7df;
  --white: #ffffff;
  --danger: #a8443a;
  --ok: #2f6b4f;
  --warn: #9a6b1f;

  --font-cn: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --font-en: Georgia, "Times New Roman", serif;

  --shadow-sm: 0 2px 10px rgba(16, 41, 31, .05);
  --shadow-md: 0 12px 32px rgba(16, 41, 31, .10);
  --radius: 4px;
  --maxw: 1180px;

  /* 模块化字号阶梯（统一全站文字尺度，消除散乱的 11/12/12.5/13/13.5） */
  --fs-eyebrow: 11px;
  --fs-caption: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 16px;
  --fs-lg: 19px;
  --fs-xl: 26px;
  --fs-2xl: 36px;
  --fs-hero: clamp(30px, 4.6vw, 52px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-cn);
  color: var(--text);
  background: var(--paper);
  line-height: 1.85;
  overflow-x: hidden;
  word-break: break-word;
}
img, svg, canvas, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .7; }
.section-title { font-size: clamp(25px, 3vw, var(--fs-2xl)); font-weight: 650; color: var(--green); letter-spacing: .5px; line-height: 1.45; }
.gold-line { width: 48px; height: 2px; background: var(--gold); margin: 20px 0 26px; }
.num { font-family: var(--font-en); color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.muted { color: var(--muted); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px; border: 1px solid transparent;
  border-radius: var(--radius); font-size: 14px; letter-spacing: .5px;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  background: var(--green); color: var(--paper);
}
.btn:hover { transform: translateY(-2px); background: var(--green-light); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--green); border-color: rgba(23, 59, 44, .35); }
.btn-ghost:hover { background: rgba(23, 59, 44, .06); color: var(--green); }
.btn-gold { background: var(--gold); color: var(--green-deep); }
.btn-gold:hover { background: var(--gold-light); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 12.5px; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(168, 68, 58, .4); }
.btn-danger:hover { background: rgba(168, 68, 58, .08); color: var(--danger); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* 表单 */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .4px; }
.input, .textarea, .select {
  width: 100%; max-width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); font-size: 14px; line-height: 1.6;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199, 166, 106, .16);
}
.textarea { min-height: 96px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 6px; }
.pending-tag {
  display: inline-block; padding: 1px 8px; border: 1px dashed var(--gold);
  color: var(--warn); background: rgba(199, 166, 106, .08);
  border-radius: 3px; font-size: 11.5px; letter-spacing: .5px;
}
.confirm-tag {
  display: inline-block; padding: 1px 8px; border: 1px solid rgba(154, 107, 31, .35);
  color: var(--warn); background: rgba(154, 107, 31, .06);
  border-radius: 3px; font-size: 11.5px;
}

/* 空态 / 待补图位 */
.empty-state {
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--cream); padding: 34px 20px; text-align: center;
  color: var(--muted); font-size: 14px; line-height: 1.9;
}
.pending-box {
  position: relative; width: 100%; min-height: 150px;
  border: 1px dashed rgba(199, 166, 106, .55); border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, rgba(247,245,238,.9), rgba(247,245,238,.9) 12px, rgba(255,254,250,.9) 12px, rgba(255,254,250,.9) 24px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted); font-size: 12.5px; text-align: center; padding: 18px;
  overflow: hidden;
}
.pending-box .pending-tag { font-size: 11px; }
.pending-box img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pending-box.is-filled { border-style: solid; border-color: var(--line); background: var(--white); }

/* 提示条 */
.toast-host { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast {
  padding: 11px 20px; border-radius: var(--radius); font-size: 13.5px;
  background: var(--green-deep); color: var(--paper); box-shadow: var(--shadow-md);
  animation: toastIn .22s ease both; max-width: 100%; line-height: 1.6;
}
.toast.is-error { background: var(--danger); }
.toast.is-warn { background: var(--warn); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* 弹窗 */
.modal-host { position: fixed; inset: 0; z-index: 900; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-host.is-open { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(11, 33, 24, .58); }
.modal-card {
  position: relative; width: min(100%, 620px); max-height: min(86vh, 820px); overflow-y: auto;
  background: var(--paper); border-radius: 6px; box-shadow: 0 24px 70px rgba(0,0,0,.28);
  padding: 30px; animation: modalIn .24s ease both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-title { font-size: 20px; font-weight: 650; color: var(--green); line-height: 1.5; }
.modal-close { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); padding: 2px 6px; }
.modal-close:hover { color: var(--green); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }

/* 滚动淡入 */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* 响应式：断点 1050 / 820 / 480 */
@media (max-width: 1050px) {
  .wrap { padding: 0 24px; }
}
@media (max-width: 820px) {
  .wrap { padding: 0 20px; }
  .section-title { font-size: 25px; }
  .modal-card { padding: 22px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .btn { padding: 0 16px; font-size: 13px; }
  .gold-line { margin: 16px 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 通用小工具 */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 200px; min-width: 0; }
.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; }
