/* =====================================================================
   方寸菜园 — 视觉系统「种子站 · 农事手账」v2
   墨绿墨色 · 燕麦纸 · 万寿菊黄 · 甜菜红
   标题=宋体 / 正文=无衬线 / 数据=等宽
   层次三级线规范：粗题线 1.5-2px 实线 · 正文 1px 细线 · 注释 1px 点线
   ===================================================================== */
:root {
  color-scheme: light;
  /* —— 沿用旧变量名（内联 var() 自动换肤），值全部重定 —— */
  --primary:        #3C7A43;   /* 园圃绿：主操作 */
  --primary-light:  #5A9A55;
  --primary-dark:   #2A5A33;
  --accent:         #E0A21B;   /* 万寿菊黄：阳光/光照 */
  --accent2:        #B23A5E;   /* 甜菜红：警示/农残 */
  --bg:             #E8E4D5;   /* 燕麦纸：页面 */
  --bg2:            #DEDAC8;   /* 深一档纸：内嵌轨道 */
  --surface:        #F4F1E6;   /* 种子包纸面：卡片 */
  --ink:            #20312A;   /* 松墨：正文/结构 */
  --muted:          #525E53;   /* 淡墨（对纸面 ≥4.5:1） */
  --rule:           #C7C0AC;   /* 纸上发丝线 */
  --shadow:         2px 3px 0 rgba(32,49,42,0.10);
  --radius:         6px;
  --radius-sm:      4px;
  --font:           "PingFang SC","HarmonyOS Sans SC","Microsoft YaHei","Segoe UI",system-ui,sans-serif;

  /* —— 新增 —— */
  --paper:   #E8E4D5;
  --card:    #F4F1E6;
  --gold:    #E0A21B;
  --gold-ink:#7D590B;          /* 金字加深（对纸面 ≥4.5:1） */
  --beet:    #B23A5E;
  --green:   #3C7A43;
  --line:    #C7C0AC;
  --display: "Songti SC","STSong","Noto Serif SC","Noto Serif CJK SC","Source Han Serif SC","Source Han Serif CN",STZhongsong,SimSun,serif;
  --sans:    var(--font);
  --mono:    "DM Mono","Roboto Mono",ui-monospace,SFMono-Regular,"JetBrains Mono",Menlo,Consolas,monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { font-size: 16px; }
body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.62;
  min-height: 100vh;
  background-color: var(--paper);
  /* 纸的牙口：feTurbulence 噪点 + 极淡纸纹点阵 */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.13 0 0 0 0 0.19 0 0 0 0 0.16 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(rgba(32,49,42,0.022) 1px, transparent 1.2px);
  background-size: 160px 160px, 5px 5px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

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

fieldset { border: 0; min-width: 0; }
legend { padding: 0; }

/* ===== 数据=等宽 的通用约定 ===== */
.mono, .stat-value, .stepper-count, .season-count, .utilization,
.cal-months span, .cal-label-times, .enc-risk-fill { font-family: var(--mono); }

/* ===== 页面容器 ===== */
.page {
  display: none;
  max-width: 920px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== 手账翻页：前进=向左翻开下一页，后退=翻回上一页 =====
   单面翻页（只动进入的那页），左侧装订，纸页从掀起状态落定 + 掠过的书页阴影 */
.page.turn-fwd, .page.turn-back {
  transform-origin: left center;
  backface-visibility: hidden;
  animation: fcTurnFwd 0.52s cubic-bezier(.34,.72,.24,1) both;
}
.page.turn-back {
  transform-origin: right center;
  animation-name: fcTurnBack;
}
@keyframes fcTurnFwd {
  0%   { opacity: 0; transform: perspective(1500px) rotateY(-17deg) translateX(6%); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: perspective(1500px) rotateY(0) translateX(0); }
}
@keyframes fcTurnBack {
  0%   { opacity: 0; transform: perspective(1500px) rotateY(17deg) translateX(-6%); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: perspective(1500px) rotateY(0) translateX(0); }
}
/* 翻页时掠过纸面的柔和书页阴影，强化「掀起一页」的手感 */
.page.turn-fwd::before, .page.turn-back::before {
  content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none;
  animation: fcTurnShade 0.52s ease-out both;
}
.page.turn-fwd::before { background: linear-gradient(100deg, rgba(58,46,31,.16), transparent 42%); }
.page.turn-back::before { background: linear-gradient(260deg, rgba(58,46,31,.16), transparent 42%); }
@keyframes fcTurnShade { 0% { opacity: .9; } 100% { opacity: 0; } }

/* ===== 导航栏（账册抬头） ===== */
.navbar {
  background: rgba(244,241,230,0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1.5px solid var(--ink);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.logo-icon {
  width: 1.9rem; height: 1.9rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.35);
}
.logo-icon svg { width: 1.1rem; height: 1.1rem; }
.nav-back {
  background: none;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--mono);
  transition: background .15s, color .15s;
}
.nav-back:hover { background: var(--ink); color: var(--paper); }

/* ===== 按钮（油印按压感，非渐变） ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn-primary {
  background: var(--green);
  color: #FCFBF4;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary:disabled {
  background: var(--bg2); color: var(--muted);
  border-color: var(--rule); box-shadow: none; cursor: not-allowed;
}
.btn-secondary {
  background: var(--card); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-secondary:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.btn-large { padding: 0.95rem 2.4rem; font-size: 1.08rem; }
.btn-small { padding: 0.42rem 0.9rem; font-size: 0.82rem; font-family: var(--mono); box-shadow: 2px 2px 0 var(--ink); }

/* ===== 首页 / 报头 ===== */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  position: relative;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  color: var(--gold-ink);
  text-transform: uppercase;
  margin-bottom: 1.1rem;
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ""; height: 1px; width: 38px; background: var(--rule);
}
/* 报头右缘竖排节气候应（线装书书脊） */
.hero-vterm {
  position: absolute;
  top: 4.6rem; right: 0.2rem;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--display);
  font-size: 0.88rem;
  letter-spacing: 0.32em;
  color: var(--muted);
  border-left: 1px solid var(--rule);
  padding-left: 0.55rem;
  max-height: 17rem;
}
.hero-icon {
  width: 3.2rem; height: 3.2rem; margin: 0 auto 0.8rem;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--ink); border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.hero-icon svg { width: 1.7rem; height: 1.7rem; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-indent: 0.2em; /* 抵消末字字距，保持视觉居中 */
  color: var(--ink);
  line-height: 1.05;
}
/* 报头文武线 */
.hero h1::after {
  content: "";
  display: block;
  width: min(360px, 70%);
  height: 0; margin: 0.9rem auto 0;
  border-top: 1.5px solid var(--ink);
  border-bottom: 4px double var(--ink);
  padding-top: 4px;
}
.hero-slogan {
  font-family: var(--display);
  font-size: 1.12rem;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--gold-ink);
  margin-top: 1rem;
}
.hero .subtitle {
  margin: 0.7rem auto 1.6rem;
  max-width: 30rem;
  color: var(--muted);
  font-size: 0.97rem;
}
/* ===== 首页 CTA · 报头版尾（居中竖列，收束报头）=====
   居中竖列：开场文武线 → 去种菜(+注脚) → 续种(隐藏) → 花饰分隔 → 蔬菜图鉴。
   仅复用既有 token；.btn / .btn-primary / .btn-secondary 油印按钮系统不动。 */
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;      /* 按钮随内容宽度、整体居中 */
  gap: 0;                   /* 逐元素调节竖向节奏 */
  max-width: 420px;
  margin: 1.9rem auto 0;
  text-align: center;
}
/* 收束块内每个按钮都保证 ≥44px 触控热区（旧图鉴按钮约 37px，此处修正） */
.hero-cta .btn { min-height: 44px; }
/* 主行动与续种：同宽的一对「门」，笃定不孤单（图鉴不套此宽，保持三级更窄） */
.hero-cta #btn-start,
.hero-cta #btn-resume { min-width: 15rem; max-width: 100%; }
/* 续种：JS 在有存档时揭示，位于注脚下方，二级按钮观感一致 */
.hero-cta #btn-resume { margin-top: 0.9rem; }
/* 键盘焦点环（.btn 默认无可见焦点） */
.hero-cta .btn:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; }

/* 开场文武线：构造同报头墨线（.hero h1::after），但用发丝线 --rule 弱化，从属于标题墨线 */
.cta-colophon-rule {
  width: 130px;
  height: 0;
  margin-bottom: 1.5rem;
  border-top: 1.5px solid var(--rule);
  border-bottom: 3px double var(--rule);
  padding-top: 3px;
}

/* 花饰分隔：双发丝线 + 金墨小菱形，弱化并引出图鉴入口（CSS 绘制，无字形/豆腐块风险，非甜菜红） */
.cta-seam {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: min(240px, 68%);
  margin: 1.2rem auto 1.05rem;
}
.cta-seam::before,
.cta-seam::after {
  content: "";
  flex: 1 1 auto;
  height: 3px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);   /* 呼应双线 */
}
.cta-seam-mark {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  border: 1px solid var(--gold-ink);      /* 印工小菱形 */
}

/* ===== 关于（首页页尾：作者介绍 + 作品集链接） ===== */
.about-fc {
  max-width: 620px;
  margin: 3.6rem auto 0.5rem;
  padding: 2.2rem 1.2rem 0.6rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.about-eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.3em;
  color: var(--gold-ink);
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  margin-bottom: 1rem;
}
.about-eyebrow::before, .about-eyebrow::after {
  content: ""; height: 1px; width: 34px; background: var(--rule);
}
.about-eyebrow span { padding-left: 0.3em; }
.about-lead {
  font-family: var(--display);
  font-size: 1.04rem; letter-spacing: 0.04em;
  color: var(--ink); margin-bottom: 0.8rem;
}
.about-by {
  font-size: 0.88rem; line-height: 1.85;
  color: var(--muted);
  max-width: 480px; margin: 0 auto 1.2rem;
}
.about-by strong { color: var(--ink); font-weight: 600; }
.about-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem; letter-spacing: 0.03em;
  color: var(--gold-ink); text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.about-link:hover { color: var(--gold); border-color: var(--gold-ink); }

/* ===== 表单（账册字段） ===== */
.form-section {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem 2rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}
.form-section h2 {
  font-family: var(--display);
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--ink);
}
.form-section .form-desc { color: var(--muted); font-size: 0.9rem; margin: 0.4rem 0 1.6rem; }

.form-group { margin-bottom: 1.6rem; }
.form-group > label, .form-group > legend {
  display: block;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding-left: 0.9rem;
  position: relative;
}
.form-group > label::before, .form-group > legend::before {
  content: "▪"; position: absolute; left: 0; top: -1px; color: var(--gold-ink);
}
.form-group .hint {
  font-size: 0.78rem; color: var(--muted); margin-top: 0.55rem; line-height: 1.45;
}
.field-error {
  font-size: 0.8rem; color: var(--beet); font-weight: 600; margin-top: 0.45rem;
}
input.invalid, select.invalid { border-color: var(--beet); box-shadow: 0 0 0 1px var(--beet); }

input[type="number"], select {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
}
select { cursor: pointer; }
.dimension-inputs {
  display: flex; align-items: center; gap: 0.7rem;
}
.dimension-inputs input { width: 100%; }
.dimension-inputs span { color: var(--muted); font-weight: 700; font-family: var(--mono); }
/* 长/宽持久标签 + 单位 */
.dim-field {
  position: relative; display: inline-flex; align-items: center; flex: 1;
}
.dim-field input { width: 100%; padding-left: 2.1rem; padding-right: 2.1rem; }
.dim-field .dim-label {
  position: absolute; left: 0.7rem; font-size: 0.78rem; color: var(--muted);
  font-family: var(--sans); font-weight: 600; pointer-events: none;
}
.dim-field .dim-unit {
  position: absolute; right: 0.7rem; font-size: 0.78rem; color: var(--muted);
  font-family: var(--sans); pointer-events: none;
}

.radio-group { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.radio-option { position: relative; }
.radio-option input { position: absolute; opacity: 0; pointer-events: none; }
.radio-option label {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .12s, color .12s, box-shadow .12s;
}
.radio-option label:hover { box-shadow: 2px 2px 0 var(--ink); }
.radio-option input:checked + label {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 2px 2px 0 var(--gold);
}
.radio-option input:focus-visible + label { outline: 2px solid var(--green); outline-offset: 2px; }

/* 不可选的窗（背靠建筑侧） */
.radio-option input:disabled + label {
  opacity: 0.38; cursor: not-allowed; text-decoration: line-through;
  border-style: dashed; box-shadow: none;
}

/* ===== 光照精调折叠区 ===== */
.form-advanced {
  border: 1px dashed var(--rule);
  border-radius: var(--radius-sm);
  margin-bottom: 1.6rem;
  background: rgba(232,228,213,0.45);
}
.form-advanced > summary {
  cursor: pointer;
  list-style: none;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.7rem;
  padding: 0.75rem 0.95rem;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--ink);
}
.form-advanced > summary::-webkit-details-marker { display: none; }
.form-advanced > summary::before { content: "▸"; color: var(--gold-ink); margin-right: 0.15rem; transition: transform .15s; display: inline-block; }
.form-advanced[open] > summary::before { transform: rotate(90deg); }
.form-advanced .adv-title small { font-weight: 400; color: var(--muted); letter-spacing: 0.04em; }
.form-advanced .adv-preview { font-weight: 400; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.03em; }
.form-advanced .adv-body { padding: 0.4rem 0.95rem 0.2rem; border-top: 1px dashed var(--rule); }
.form-advanced .adv-body .form-group { margin-bottom: 1.2rem; }

/* ===== 选择页：顶栏 ===== */
.select-topbar {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  justify-content: space-between; align-items: center;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 0.7rem 0.2rem;
  margin-top: 0.5rem;
}
.select-topbar-info {
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--ink);
}
.select-topbar-slots { display: flex; gap: 1rem; align-items: baseline; }
.slot-count, .utilization { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.utilization { color: var(--gold-ink); font-weight: 600; }

/* ===== 四季占用条（账册条） ===== */
.season-bars {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.4rem;
  margin: 1rem 0 0.4rem;
}
.season-bar-item { display: flex; align-items: center; gap: 0.6rem; }
.season-label {
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  width: 1.4rem; text-align: center; color: var(--ink);
}
.season-bar-track {
  flex: 1; height: 12px; background: var(--bg2);
  border: 1px solid var(--ink); border-radius: 2px; overflow: hidden;
}
.season-bar-fill {
  height: 100%; background: var(--green);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.18) 0 4px, transparent 4px 8px);
  transition: width .35s ease;
}
.season-bar-fill.over { background: var(--beet); }
.season-count { font-size: 0.78rem; color: var(--muted); width: 3rem; text-align: right; }
.season-warning {
  color: var(--beet); font-size: 0.82rem; margin: 0.3rem 0 0.6rem;
  font-weight: 600; min-height: 1rem;
}

/* ===== 推荐网格头 ===== */
.select-grid-header { margin: 1.4rem 0 0.9rem; }
.select-grid-header h3 {
  font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink);
}
.select-subtitle { font-family: var(--sans); font-size: 0.82rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.select-crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

/* ===== 种子包卡片（signature：双线框 + 油印阴影 + 红章） ===== */
.select-card {
  position: relative;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.3rem 1rem 0.9rem;   /* 顶部留白给右上角章 + 左上角旗 */
  box-shadow:
    inset 0 0 0 3px var(--card),
    inset 0 0 0 4px var(--rule),
    var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease;
}
.select-card:hover {
  transform: translate(-1px,-2px);
  box-shadow:
    inset 0 0 0 3px var(--card),
    inset 0 0 0 4px var(--rule),
    4px 5px 0 rgba(32,49,42,0.14);
}
.select-card.selected {
  border-color: var(--green);
  box-shadow:
    inset 0 0 0 3px var(--card),
    inset 0 0 0 4px rgba(60,122,67,0.4),
    3px 4px 0 var(--green);
  background:
    linear-gradient(0deg, rgba(60,122,67,0.05), rgba(60,122,67,0.05)), var(--card);
}
/* 已选择小旗：贴在卡片内框角上，不悬浮出卡片 */
.select-card.selected::after {
  content: "已选择";
  position: absolute; top: 4px; left: 4px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  background: var(--green); color: #fff;
  padding: 2px 7px; border-radius: 3px 0 var(--radius-sm) 0;
  z-index: 0;
}
.select-card-header { margin-bottom: 0.5rem; padding-right: 74px; }
.card-toggle {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  background: none; border: none; padding: 0; cursor: pointer;
  text-align: left; font: inherit; color: inherit;
}
.card-check {
  flex: 0 0 auto;
  width: 1.15rem; height: 1.15rem;
  border: 1.5px solid var(--ink); border-radius: 3px;
  background: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff; line-height: 1;
}
.select-card.selected .card-check { background: var(--green); border-color: var(--green); }
.select-card.selected .card-check::before { content: "✓"; }
.select-card-name {
  font-family: var(--display); font-size: 1.18rem; font-weight: 700; letter-spacing: 0.03em; color: var(--ink);
}
.select-card-name small { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; }

.select-card-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.55rem; }
.select-badge {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.03em;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--muted);
  background: var(--paper);
  white-space: nowrap;
}
.select-badge.perennial { border-color: var(--gold-ink); color: var(--gold-ink); }
.select-badge.trellis { border-color: var(--ink); color: var(--ink); }

/* —— 农残红印章：把风险徽章拽到卡片右上角，盖章感（手绘不齐边） —— */
.select-card .select-badge.risk-high,
.select-card .select-badge.risk-medium,
.select-card .select-badge.risk-low {
  position: absolute;
  top: 12px; right: 12px;
  transform: rotate(7deg);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 6px;
  border-radius: 4px 7px 5px 8px / 7px 5px 8px 4px;
  border: 1.5px solid currentColor;
  background: transparent;
  box-shadow: inset 0 0 0 1px currentColor;
  text-align: center;
  line-height: 1.1;
}
.select-card:nth-child(3n) .select-badge.risk-high,
.select-card:nth-child(3n) .select-badge.risk-medium,
.select-card:nth-child(3n) .select-badge.risk-low { transform: rotate(-5deg); border-radius: 7px 4px 8px 5px / 5px 8px 4px 7px; }
.select-badge.risk-high   { color: var(--beet); }
.select-badge.risk-medium { color: var(--gold-ink); }
.select-badge.risk-low    { color: var(--green); }

.select-card-row {
  display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem;
  margin-top: 0.4rem; font-size: 0.8rem;
}

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; }
.stepper-btn {
  width: 2.4rem; height: 2.4rem; border: none; background: var(--paper);
  color: var(--ink); font-size: 1.15rem; cursor: pointer; line-height: 1;
}
.stepper-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.stepper-btn:disabled { color: var(--rule); cursor: not-allowed; }
.stepper-count {
  width: 2.1rem; text-align: center; font-weight: 700; font-size: 0.95rem;
  border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink);
}


/* ===== 底部资材汇总条 ===== */
.materials-bar {
  position: sticky; bottom: 0;
  display: flex; flex-wrap: wrap; gap: 0.7rem;
  justify-content: space-between; align-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-top: 1.4rem;
  box-shadow: 0 -2px 14px rgba(32,49,42,0.18);
  border: 1.5px solid var(--ink);
}
.materials-bar.warn { border-color: var(--beet); box-shadow: 0 -2px 14px rgba(178,58,94,0.35); }
.materials-bar-warning {
  flex-basis: 100%;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  color: #F4C6D4;
  border-bottom: 1px dashed rgba(244,198,212,0.4);
  padding-bottom: 0.4rem;
}
.materials-bar-content { font-family: var(--mono); font-size: 0.82rem; line-height: 1.5; }
.materials-bar-content strong { color: var(--gold); font-weight: 700; }
.materials-bar .btn { padding: 0.6rem 1.3rem; border-color: var(--gold); background: var(--gold); color: var(--ink); box-shadow: none; }
.materials-bar .btn:hover:not(:disabled) { background: #EBB23B; transform: translateY(-1px); }
.materials-bar .btn:disabled { background: transparent; color: var(--rule); border-color: var(--muted); }

/* 选菜页底部四季总结芯片 */
.season-summary {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}
.ss-label {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted); opacity: 0.7;
}
.ss-chip {
  display: inline-block; padding: 0.15rem 0.5rem;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  background: rgba(255,255,255,0.08); color: #C8D5A8;
  border-radius: 20px; border: 1px solid rgba(255,255,255,0.12);
}

/* 卡片上季节信息 */
.select-card-season {
  font-size: 0.72rem; color: var(--muted); margin-bottom: 0.55rem;
  padding: 0.3rem 0.4rem; background: var(--bg); border-radius: 4px;
  font-family: var(--mono); letter-spacing: 0.02em;
}

/* ===== 我的方寸菜园（预览页） ===== */
#page-garden { padding-bottom: 2rem; }
.garden-head {
  text-align: center; margin: 1.2rem 0 2rem;
}
.garden-title {
  font-family: var(--display); font-size: 1.8rem; font-weight: 700;
  letter-spacing: 0.06em; color: var(--ink); margin-bottom: 0.4rem;
}
.garden-eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--gold-ink);
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.garden-eyebrow::before, .garden-eyebrow::after {
  content: ""; height: 1px; width: 26px; background: var(--rule);
}
.garden-sub {
  font-family: var(--mono); font-size: 0.85rem; color: var(--muted);
  max-width: 26rem; margin: 0 auto; line-height: 1.6;
}

/* 自动播放条 */
.garden-playbar {
  display: flex; align-items: center; gap: 0.8rem;
  margin-bottom: 1.8rem; padding: 0.8rem 1rem;
  background: var(--bg); border-radius: var(--radius);
  border: 1px solid var(--rule);
}
.garden-play-btn {
  font-family: var(--display); font-size: 0.95rem; font-weight: 600;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--green); border-radius: 24px;
  background: var(--green); color: var(--paper); cursor: pointer;
  white-space: nowrap; transition: all .15s ease;
}
.garden-play-btn:hover { background: #3A6B35; transform: translateY(-1px); }
.garden-play-hint {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
}

/* 花园区块 */
.garden-section {
  margin-bottom: 2rem;
}
.garden-section-title {
  font-family: var(--display); font-size: 1.3rem; font-weight: 700;
  letter-spacing: 0.04em; color: var(--ink); margin-bottom: 0.3rem;
}
.garden-section-sub {
  font-family: var(--sans); font-size: 0.82rem; color: var(--muted); margin-bottom: 0.8rem;
}

/* 月份滑杆包装 */
.garden-month-ruler {
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.garden-month-label {
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
}

/* 月份建议 */
.garden-month-suggest {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  margin-top: 0.5rem; min-height: 1.2rem;
}

/* 底部动作 */
.garden-actions {
  text-align: center; margin-top: 2.4rem; padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
.garden-actions .btn {
  padding: 0.9rem 2.4rem; font-size: 1.1rem;
}
/* 揭晓微文：告诉用户下一页有啥，把「谜底」吊起来 */
.garden-reveal-hint {
  font-family: var(--mono); font-size: 0.76rem; color: var(--muted);
  letter-spacing: 0.04em; margin-top: 0.7rem;
}
/* 一年看完 → 揭晓按钮点亮：金色光环 + 轻脉冲两下后驻留 */
#btn-garden-next.is-ready {
  box-shadow: 0 0 0 4px rgba(224,162,27,0.30), 3px 3px 0 var(--ink);
  animation: gardenRevealPulse 1.15s ease 2;
}
@keyframes gardenRevealPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(224,162,27,0.28), 3px 3px 0 var(--ink); }
  50%      { box-shadow: 0 0 0 9px rgba(224,162,27,0.12), 4px 4px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  #btn-garden-next.is-ready { animation: none; }
}

/* ===== 规划结果页（顺序叙事：语境 → 愿景 → 时间线 → 图纸 → 提示 → 本月 → 详情） ===== */
#page-plan { padding-bottom: 2rem; }

/* ① 我的阳台 · 未来一年 */
.plan-summary, .my-balcony {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.4rem 1.5rem;
  margin: 0.4rem 0 1.6rem;
}
.my-balcony .band-title { margin-bottom: 0.7rem; }
.my-balcony #layout-section { margin: 1rem 0; }
.my-balcony .plan-vision { margin-top: 1rem; }
.pcs-thumb.pcs-dim { opacity: 0.32; filter: grayscale(0.65); }
.balcony-snapshot {
  font-size: 0.9rem; line-height: 1.6; color: var(--ink);
  background: rgba(60,122,67,0.07); border-left: 3px solid var(--green);
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; margin: 0 0 1rem;
}
.balcony-snapshot strong { color: var(--green); font-weight: 700; }
.plan-meta {
  font-family: var(--mono); font-size: 0.76rem; color: var(--muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem;
  padding-bottom: 0.95rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.plan-meta .meta-seg { white-space: nowrap; position: relative; }
.plan-meta .meta-seg:not(:last-of-type)::after {
  content: "·"; color: var(--rule); margin-left: 0.7rem;
}
.plan-meta .meta-note {
  flex-basis: 100%; font-size: 0.7rem; opacity: 0.8; letter-spacing: 0.02em;
}

.plan-crop-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  margin-bottom: 1rem;
}
.pcs-thumb {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--paper);
  display: inline-grid; place-items: center; overflow: hidden;
  position: relative; flex: 0 0 auto;
}
.pcs-thumb .pcs-emoji { font-size: 1.05rem; line-height: 1; }
.pcs-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.pcs-count {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  margin-left: 0.35rem; white-space: nowrap;
}

.plan-vision {
  font-family: var(--display); font-size: 1.22rem; line-height: 1.7;
  color: var(--ink); letter-spacing: 0.01em;
}
.plan-vision strong { color: var(--green); font-weight: 700; }

.plan-confidence {
  list-style: none; margin: 1.1rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem;
}
.plan-confidence li {
  font-size: 0.82rem; color: var(--muted);
  display: flex; align-items: baseline; gap: 0.35rem;
}
.plan-confidence li::before {
  content: "✓"; color: var(--green); font-weight: 700; flex: 0 0 auto;
}

/* 通用区块 */
.plan-band { margin-bottom: 1.7rem; }
.band-title {
  font-family: var(--display); font-size: 1.24rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--ink); margin-bottom: 0.35rem;
  display: flex; align-items: baseline; gap: 0.5rem;
}
.band-title::before {
  content: ""; width: 0.5rem; height: 1.05rem; background: var(--gold);
  flex: 0 0 auto; transform: translateY(0.12rem); border-radius: 1px;
}
.band-sub {
  font-size: 0.82rem; color: var(--muted); margin-bottom: 0.9rem; line-height: 1.5;
}
/* 菜园页眉题：参考资料区隔（v3.1 re-home） */
.band-eyebrow {
  text-align: center; font-size: 0.76rem; color: var(--muted); letter-spacing: 0.08em;
  margin: 1.1rem 0 0.4rem; user-select: none;
}

/* ===== 容器卡（时间线甘特图外壳） ===== */
.calendar-container {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.4rem;
  box-shadow: var(--shadow);
}

/* ④ 种植小提示 */
.plan-tip {
  display: flex; align-items: baseline; gap: 0.55rem;
  font-size: 0.92rem; line-height: 1.6; color: var(--ink);
  padding: 0.6rem 0.85rem; margin-bottom: 0.5rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}
.plan-tip:last-child { margin-bottom: 0; }
.plan-tip .tip-dot { flex: 0 0 auto; font-weight: 700; color: var(--gold); }

/* ⑤ 现在就开始 · 本月 */
.plan-start {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.4rem 1.4rem;
}
.plan-start .band-title { margin-bottom: 0.9rem; }
.pm-lead { font-size: 0.98rem; font-weight: 600; color: var(--ink); margin-bottom: 0.7rem; }
.pm-list { list-style: none; margin: 0 0 0.9rem; padding: 0; }
.pm-list li {
  font-size: 0.92rem; color: var(--ink); line-height: 1.5;
  padding: 0.45rem 0 0.45rem 0.2rem; border-bottom: 1px dashed var(--rule);
}
.pm-list li:last-child { border-bottom: none; }
.pm-note { font-size: 0.85rem; color: var(--muted); line-height: 1.7; margin: 0; }
.pm-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--green); font-weight: 600;
  border-bottom: 1.5px solid var(--gold); line-height: 1;
}
.pm-link:hover { color: var(--ink); }

/* ⑥⑦⑧ 折叠详情 */
.plan-fold {
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  margin-bottom: 0.9rem; overflow: hidden;
}
.plan-fold > summary {
  list-style: none; cursor: pointer;
  padding: 0.95rem 1.2rem; font-family: var(--display);
  font-size: 1.02rem; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.plan-fold > summary::-webkit-details-marker { display: none; }
.plan-fold > summary::after {
  content: "＋"; font-family: var(--mono); color: var(--gold); font-size: 1.1rem;
  transition: transform .2s;
}
.plan-fold[open] > summary::after { content: "－"; }
.plan-fold[open] > summary { border-bottom: 1px solid var(--rule); }
.plan-fold > summary + * { padding: 1.1rem 1.2rem 1.3rem; }

/* ⑨ 动作条 */
.plan-actionbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.6rem; padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
}
.plan-actionbar-edit { margin-left: auto; }

/* ===== 农事卷轴（从今天起逐月竖排的个性化时间线） ===== */
.timeline-scroll { position: relative; }
.timeline { position: relative; padding: 0.1rem 0 0.2rem; }
.tl-node, .tl-empty, .tl-end { position: relative; padding-left: 1.5rem; }
/* 贯穿的松墨竖线：各节点左侧 2px 线首尾相接 */
.tl-node::before, .tl-empty::before, .tl-end::before {
  content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--rule);
}
.tl-end::before { bottom: auto; height: 0.8rem; }
.tl-mhead {
  display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
  position: relative; padding: 0.55rem 0 0.35rem;
}
.tl-dot {
  position: absolute; left: -1.5rem; top: 0.6rem;
  width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box;
  background: var(--card); border: 2px solid var(--muted);
}
.tl-dot.hollow { top: 0.15rem; }
.tl-dot.now { background: var(--beet); border-color: var(--beet); box-shadow: 0 0 0 3px rgba(178,58,94,0.16); }
.tl-dot.inline { position: static; display: inline-block; width: 10px; height: 10px; vertical-align: middle; }
.tl-dot.now.inline { box-shadow: none; }
.tl-mname { font-family: var(--display); font-weight: 700; font-size: 1.06rem; letter-spacing: 0.03em; color: var(--ink); }
.tl-mmeta { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
/* 今天节点：起点更醒目（不吸顶——时间线本就从今天起，今天永远在最上方） */
.tl-today .tl-mname { font-size: 1.15rem; }
.tl-body { padding-bottom: 0.5rem; }
.tl-zone {
  font-family: var(--sans); font-size: 0.76rem; font-weight: 700; color: var(--gold-ink);
  letter-spacing: 0.02em; margin: 0.55rem 0 0.35rem;
}
.tl-crop {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.42rem 0.55rem; margin-bottom: 0.36rem;
  border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--card);
  cursor: pointer; transition: border-color .12s, transform .12s;
}
.tl-crop:hover { border-color: var(--ink); transform: translateX(1px); }
.tl-crop:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 1px; }
.tl-crop-wait {
  background: repeating-linear-gradient(45deg, var(--card), var(--card) 7px, rgba(199,192,172,0.28) 7px, rgba(199,192,172,0.28) 14px);
}
.tl-thumb {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--muted); overflow: hidden; flex: 0 0 auto;
  display: inline-grid; place-items: center; background: var(--paper);
}
.tl-thumb .tl-emoji { font-size: 0.98rem; line-height: 1; }
.tl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tl-cname { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--ink); display: flex; flex-direction: column; gap: 1px; }
.tl-mode { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.tl-right { flex: 0 0 auto; text-align: right; max-width: 56%; }
.tl-wait { display: inline-block; }
.tl-eta { font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: var(--gold-ink); }
.tl-sow { font-family: var(--mono); font-size: 0.75rem; color: var(--green); }
.tl-wait { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); line-height: 1.4; }
.tl-empty { }
.tl-empty > summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 0.5rem 0; font-size: 0.8rem; color: var(--muted);
}
.tl-empty > summary::-webkit-details-marker { display: none; }
.tl-empty > summary::after { content: " ▾"; font-family: var(--mono); }
.tl-empty[open] > summary::after { content: " ▴"; }
.tl-empty-body { font-size: 0.82rem; color: var(--muted); line-height: 1.6; padding: 0 0 0.5rem; }
.tl-end {
  padding: 0.7rem 0 0.3rem; font-family: var(--display); font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem;
}
.tl-neverfit {
  font-size: 0.82rem; color: var(--ink); line-height: 1.6;
  border-left: 3px solid var(--gold); background: var(--card);
  padding: 0.55rem 0.75rem; margin-top: 0.7rem; border-radius: var(--radius-sm);
}
.tl-legend {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem;
  margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--rule);
  font-size: 0.73rem; color: var(--muted);
}
.tl-legend .tl-lg { display: inline-flex; align-items: center; gap: 0.28rem; }
.tl-legend .tl-eta, .tl-legend .tl-sow { font-size: 0.73rem; }
.tl-legend .tl-lg-wait::before {
  content: ""; display: inline-block; width: 14px; height: 12px; margin-right: 0.28rem; vertical-align: -2px;
  border-radius: 2px;
  background: repeating-linear-gradient(45deg, var(--card), var(--card) 4px, rgba(199,192,172,0.5) 4px, rgba(199,192,172,0.5) 8px);
  border: 1px solid var(--rule);
}
.tl-legend .tl-lg-note { flex-basis: 100%; opacity: 0.85; }
@media (prefers-reduced-motion: reduce) { .tl-crop { transition: none; } }

/* ===== 甘特图（旧·未用，保留兜底样式） ===== */
.cal-scroll-hint {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  text-align: center; margin: -0.3rem 0 0.5rem;
}
.cal-wrap { overflow-x: auto; position: relative; }
.cal-wrap.scrollable {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}
.cal-inner { min-width: 680px; }
.cal-head, .cal-row { display: flex; align-items: center; }
.cal-head { margin-bottom: 0.6rem; position: relative; }
.cal-months { flex: 1; display: flex; position: relative; }
.cal-months span {
  flex: 1; text-align: center; font-size: 0.72rem; color: var(--muted);
  border-left: 1px dotted var(--rule);
}
.cal-rows { position: relative; }
.cal-row { margin-bottom: 0.55rem; }
.cal-label {
  width: 120px; flex-shrink: 0; padding-right: 0.6rem;
  position: sticky; left: 0; z-index: 3;
  background: var(--card);
}
.cal-label > div:first-child { font-size: 0.86rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 0.3rem; }
.cal-label-times { display: flex; flex-direction: column; font-size: 0.7rem; margin-top: 1px; }
.cal-label-times span { white-space: nowrap; }
.cal-time-sow { color: var(--green); }
.cal-time-harvest { color: var(--gold-ink); }
.cal-mini-thumb {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: #EAE3D2; border: 1px solid var(--rule); position: relative;
}
.cal-mini-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cal-track {
  position: relative; flex: 1; height: 30px;
  background: var(--bg2);
  border: 1px solid var(--rule); border-radius: 3px;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), rgba(32,49,42,0.06) calc(8.333% - 1px) 8.333%);
}
.bar {
  position: absolute; top: 3px; height: 24px;
  border-radius: 3px; cursor: pointer; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
  transition: filter .15s;
}
.bar:hover { filter: brightness(1.08); }
.bar.past { filter: saturate(0.35) brightness(0.96); }
.seg-grow { position: absolute; left: 0; top: 0; height: 100%; }
.seg-harvest { position: absolute; top: 0; right: 0; height: 100%; }
.seg-harvest.continuous { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.55) 0 3px, transparent 3px 6px); }
.seg-harvest.single { background: rgba(255,255,255,0.4); }
.bar-label {
  position: relative; z-index: 2;
  display: block; height: 100%; line-height: 24px;
  color: #fff; font-size: 0.68rem; font-weight: 600; white-space: nowrap;
  padding: 0 5px; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(32,49,42,0.35);
}
.seg-single-end { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 0.7rem; z-index: 2; }
/* 全图仅一条今天线 */
.now-line-global {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--beet); z-index: 2; pointer-events: none;
}
.cal-months .now-flag {
  position: absolute; top: -2px; transform: translateX(-50%);
  flex: none; border-left: none; text-align: center;
  font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--beet);
  padding: 0 4px; border-radius: 2px; font-family: var(--mono); z-index: 4; pointer-events: none;
}

.cal-legend {
  margin-top: 1rem; padding-top: 0.8rem; border-top: 1px dashed var(--rule);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.legend-families, .legend-symbols { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.legend-item { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: var(--muted); }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.legend-seg.grow { color: var(--green); font-weight: 700; }
.legend-harvest-tex { width: 22px; height: 11px; display: inline-block; border-radius: 2px; border: 1px solid var(--rule); }
.legend-harvest-tex.continuous { background-image: repeating-linear-gradient(45deg, var(--muted) 0 2px, transparent 2px 4px); }
.legend-harvest-tex.single { background: var(--bg2); }
.legend-line { width: 2px; height: 13px; background: var(--beet); display: inline-block; }
.legend-note { font-size: 0.72rem; color: var(--muted); font-style: italic; }

/* ===== 排序栏 ===== */
.sort-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 1.1rem; }
.sort-btn {
  font-family: var(--mono); font-size: 0.78rem;
  padding: 0.35rem 0.75rem; border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); cursor: pointer; transition: background .12s, color .12s;
}
.sort-btn:hover { box-shadow: 2px 2px 0 var(--ink); }
.sort-btn.active { background: var(--ink); color: var(--paper); }

/* ===== 作物方案卡 ===== */
.crop-section { margin-bottom: 1.8rem; }
.crop-section h3 {
  font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: 0.03em; color: var(--ink);
  margin-bottom: 0.9rem; padding-bottom: 0.4rem; border-bottom: 1.5px solid var(--ink);
  display: flex; align-items: baseline; gap: 0.6rem;
}
.season-current-badge {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--gold-ink); border: 1.5px solid currentColor; border-radius: 3px; padding: 1px 6px;
  transform: rotate(-3deg);
}
.crop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.9rem; }
.crop-card {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 0.95rem 1rem; box-shadow: var(--shadow); transition: transform .14s, box-shadow .14s;
}
.crop-card.clickable { cursor: pointer; }
.crop-card.clickable:hover, .crop-card.clickable:focus-visible { transform: translate(-1px,-2px); box-shadow: 4px 5px 0 rgba(32,49,42,0.14); }
.crop-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.5rem; }
.crop-name { font-family: var(--display); font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.crop-badge {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 3px; border: 1.5px solid currentColor;
  box-shadow: inset 0 0 0 1px currentColor; transform: rotate(4deg); white-space: nowrap;
}
.crop-detail { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); line-height: 1.7; }
.crop-detail strong { color: var(--ink); font-weight: 600; }

/* ===== 立体摆放 ===== */
#layout-section h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 700; color: var(--ink); }
#layout-section svg { border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--card); padding: 0.5rem; box-shadow: var(--shadow); }

/* ===== 资材清单 / 提示框 ===== */
.tip-box {
  display: flex; gap: 0.7rem; align-items: flex-start;
  background: var(--card); border: 1.5px solid var(--ink); border-left-width: 5px;
  border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-top: 1rem;
}
.tip-icon { font-size: 1.2rem; line-height: 1.4; }
.tip-box p { font-size: 0.85rem; color: var(--ink); }

/* 账册合计栏（替代橙渐变） */
.ledger-total {
  margin-top: 1.2rem;
  border-top: 1.5px solid var(--ink);
  border-bottom: 4px double var(--ink);
  padding: 0.75rem 0.3rem 0.8rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; align-items: baseline;
}
.ledger-total .lt-label { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: 0.1em; }
.ledger-total .lt-amount { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; color: var(--gold-ink); }
.ledger-total .lt-note { font-size: 0.76rem; color: var(--muted); }
/* ===== 农事月历 ===== */
.task-list { display: flex; flex-direction: column; gap: 1.1rem; }
.task-month {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.task-month-head {
  display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap;
  padding: 0.65rem 1rem;
  border-bottom: 1.5px solid var(--ink);
  background: rgba(232,228,213,0.5);
}
.task-month-head .tm-title {
  font-family: var(--display); font-size: 1.08rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink);
}
.task-month-head .tm-term { font-family: var(--mono); font-size: 0.74rem; color: var(--gold-ink); letter-spacing: 0.08em; }
.task-month-head .tm-now {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--beet); border: 1.5px solid currentColor; border-radius: 3px; padding: 1px 6px;
  transform: rotate(-3deg); margin-left: auto;
}
.task-month.current { border-color: var(--gold-ink); box-shadow: 3px 4px 0 rgba(224,162,27,0.4); }

/* 一事一卡：<details> 点开看盆栽做法 */
.tk-card { border-bottom: 1px dotted var(--rule); }
.tk-card:last-child { border-bottom: none; }
.tk-card > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.68rem 1rem; min-height: 44px;
}
.tk-card > summary::-webkit-details-marker { display: none; }
.tk-card > summary:hover { background: rgba(232,228,213,0.45); }
.tk-title { flex: 1; font-size: 0.9rem; color: var(--ink); }
.tk-card > summary::after {
  content: "＋"; font-family: var(--mono); color: var(--muted); font-size: 0.95rem; flex: 0 0 auto;
}
.tk-card[open] > summary::after { content: "－"; color: var(--gold-ink); }
.tk-detail {
  padding: 0.15rem 1rem 0.9rem 1rem;
  font-size: 0.86rem; line-height: 1.75; color: var(--ink);
  background: rgba(232,228,213,0.3);
  border-top: 1px dashed var(--rule);
}
.tk-detail p { margin: 0.45rem 0 0; }
.tk-detail .tk-note { color: var(--gold-ink); font-size: 0.8rem; }
.tk-detail .tk-crop strong { color: var(--green); margin-right: 0.4rem; font-weight: 700; }
.tk-buy-h { font-weight: 700; color: var(--ink); margin-top: 0.7rem !important; }
.tk-buy-item { color: var(--ink); }
.tk-buy-item .tk-buy-note { color: var(--muted); font-size: 0.78rem; margin-left: 0.45rem; }
.tk-buy-tip { color: var(--muted); font-size: 0.8rem; }
.tk-detail .btn { margin-top: 0.7rem; }
.task-tag {
  font-family: var(--mono); font-size: 0.7rem; padding: 2px 8px; border-radius: 3px;
  border: 1px solid currentColor; white-space: nowrap; flex: 0 0 auto;
}
.tag-sow { color: var(--green); }
.tag-water { color: var(--gold-ink); }
.tag-harvest { color: var(--beet); }
.tag-buy { color: var(--ink); background: rgba(224,162,27,0.18); border-color: var(--gold-ink); }

/* ===== 顶层导航 + 图鉴支线页 + 合并后的种植月历 ===== */
/* 支线页淡入（无翻页位移） */
.page.turn-fade { animation: fadeIn 0.28s ease; }

/* 首页次门：作物图鉴入口（描边金墨，明显小一号，绝不给甜菜红）
   竖列布局：抵消旧的 flex-basis:100% / auto-margin 行内换行取值，使其比主按钮更窄=三级。
   本段须位于 .btn-secondary/:hover 之后，靠源序覆盖其墨影与描边（此处满足）。 */
.hero-door-atlas {
  flex: 0 0 auto;
  margin: 0;
  max-width: 340px;
  padding: 0.5rem 1.1rem;
  font-size: 0.86rem;
  border-color: var(--gold-ink);
  color: var(--gold-ink);                 /* 金墨，对纸面/卡片 ≥4.5:1 */
}
.hero-door-atlas:hover { box-shadow: 3px 3px 0 var(--gold-ink); }

/* plan 页 navbar 安静图鉴入口 */
.nav-actions { display: flex; align-items: center; gap: 0.4rem; }
.nav-link {
  background: none; border: none; cursor: pointer; font: inherit;
  color: var(--gold-ink); font-size: 0.82rem; white-space: nowrap;
  padding: 0.3rem 0.4rem; min-height: 44px;
}
.nav-link:hover { color: var(--ink); }

/* 图鉴页 */
.atlas-head { text-align: center; margin: 0.4rem 0 0.9rem; }
.atlas-head h2 { font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: 0.05em; color: var(--ink); }
.atlas-sub { font-size: 0.85rem; color: var(--muted); margin-top: 0.3rem; }
.atlas-filter {
  position: sticky; top: 0; z-index: 30; background: var(--paper);
  display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 0 0.7rem; margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.atlas-filter .tc-n { font-size: 0.66rem; opacity: 0.7; margin-left: 0.25rem; font-family: var(--mono); }
.atlas-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.atlas-card {
  text-align: left; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0.6rem; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: transform .12s, box-shadow .12s;
}
.atlas-card:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.atlas-card:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 1px; }
.atlas-thumb {
  position: relative; width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--paper); border: 1px solid var(--rule);
  display: grid; place-items: center;
}
.atlas-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.atlas-thumb .lay-emoji { font-size: 2rem; }
.atlas-name { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--ink); }
.atlas-meta { font-size: 0.73rem; color: var(--muted); }
.atlas-risk { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; }

/* 种植月历：今天大卡引导句 + 事件卡标签/图鉴链接/等天气斜纹 */
.tl-lead {
  font-size: 0.88rem; line-height: 1.6; color: var(--ink);
  background: rgba(224,162,27,0.1); border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem; margin: 0.1rem 0 0.6rem;
}
.tl-today > .tl-body {
  background: rgba(224,162,27,0.05); border: 1px solid var(--rule);
  border-radius: var(--radius-sm); padding: 0.2rem 0.6rem 0.5rem; margin-top: 0.2rem;
}
.tk-right { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }
.tk-tag {
  font-family: var(--mono); font-size: 0.7rem; padding: 2px 7px; border-radius: 3px;
  border: 1px solid currentColor; white-space: nowrap;
}
.tk-tag-sow { color: var(--green); }
.tk-tag-bite { color: var(--gold-ink); }
.tk-tag-buy { color: var(--ink); background: rgba(224,162,27,0.18); border-color: var(--gold-ink); }
.tk-tag-care { color: var(--muted); }
.tk-tag-wait { color: var(--muted); }
.tk-atlas {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 0.72rem; color: var(--gold-ink); white-space: nowrap;
  padding: 0.2rem 0; border-bottom: 1px solid var(--gold);
}
.tk-atlas:hover { color: var(--ink); }
.tk-card.tk-wait > summary {
  background: repeating-linear-gradient(45deg, transparent, transparent 7px, rgba(199,192,172,0.22) 7px, rgba(199,192,172,0.22) 14px);
}

@media (max-width: 420px) {
  .atlas-grid { gap: 0.5rem; }
  .atlas-thumb .lay-emoji { font-size: 1.6rem; }
}

/* ===== 图鉴弹窗（种子包说明书） ===== */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.modal.active { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(32,49,42,0.55); backdrop-filter: blur(2px); }
.modal-content {
  position: relative; z-index: 1; max-width: 560px; width: calc(100% - 2rem);
  margin: 5vh auto; max-height: 90vh; overflow-y: auto;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 0 1.6rem 1.8rem; box-shadow: 8px 10px 0 rgba(32,49,42,0.25);
}
.modal-head {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  background: var(--card);
  margin: 0 -1.6rem 0.6rem; padding: 0.7rem 0.7rem 0.5rem 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.modal-head-title { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--muted); }
.modal-close {
  background: none; border: 1.5px solid transparent; font-size: 1.5rem; line-height: 1;
  color: var(--ink); cursor: pointer;
  width: 2.75rem; height: 2.75rem; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--beet); border-color: var(--ink); }
.enc-header { display: flex; align-items: center; gap: 0.9rem; padding-bottom: 0.9rem; border-bottom: 4px double var(--ink); margin-bottom: 1rem; }
.enc-icon {
  position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  flex: 0 0 auto; display: inline-flex; background: rgba(60,122,67,0.1);
  box-shadow: inset 0 0 0 1.5px rgba(32,49,42,0.25);
}
.enc-icon .st-emoji { font-size: 2.2rem; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.enc-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 卡片/详情条里的作物小圆图（emoji 兜底垫在图下） */
.select-thumb {
  position: relative; width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  display: inline-flex; flex: 0 0 auto; vertical-align: -9px; margin-right: 4px;
  background: rgba(60,122,67,0.1);
  box-shadow: inset 0 0 0 1px rgba(32,49,42,0.18);
}
.select-thumb .st-emoji { font-size: 1rem; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.select-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.enc-title { font-family: var(--display); font-size: 1.5rem; font-weight: 800; letter-spacing: 0.04em; color: var(--ink); }
.enc-family { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.enc-section { margin-bottom: 1.1rem; }
.enc-section h4 {
  font-family: var(--display); font-size: 1.02rem; font-weight: 700; color: var(--ink);
  margin-bottom: 0.5rem; letter-spacing: 0.03em;
}
.enc-section p { font-size: 0.86rem; color: var(--ink); margin-bottom: 0.25rem; }
.enc-section strong { color: var(--ink); }
.enc-warn { color: var(--gold-ink); font-weight: 600; }
.enc-risk-bar { height: 10px; background: var(--bg2); border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; margin: 0.4rem 0; }
.enc-risk-fill { height: 100%; }
.enc-risk-high { background: var(--beet); }
.enc-risk-medium { background: var(--gold); }
.enc-risk-low { background: var(--green); }
.enc-authority { font-size: 0.74rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.6; }
.enc-authority a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }

/* ===== 分享海报浮层 ===== */
.poster-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(32,49,42,0.82); backdrop-filter: blur(3px);
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem; overflow-y: auto;
}
.poster-tip {
  color: #F4F1E6; font-size: 0.88rem; font-weight: 600; margin: 0.4rem 0 0.7rem;
  font-family: var(--mono); letter-spacing: 0.06em;
}
.poster-overlay img {
  max-width: min(420px, 92vw);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.poster-actions { display: flex; gap: 0.6rem; margin: 0.9rem 0 1.5rem; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 2.2rem; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 0.55rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid rgba(244,241,230,0.3);
  opacity: 0; pointer-events: none; z-index: 1200;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .season-bars { grid-template-columns: 1fr; }
  .navbar { padding: 0.7rem 1rem; }
  .page { padding: 1.5rem 1rem 3rem; }
  .hero-vterm { display: none; }
  .plan-summary, .plan-start { padding: 1.1rem 1.1rem 1.2rem; }
  .plan-vision { font-size: 1.1rem; }
  .plan-actionbar-edit { margin-left: 0; }
  /* iOS 聚焦不触发放大：输入控件 ≥16px */
  input[type="number"], select, .pot-select { font-size: 1rem; }
}
@media (max-width: 420px) {
  .select-crop-grid, .crop-grid { grid-template-columns: 1fr; }
  .materials-bar { padding: 0.7rem 0.9rem; }
  .season-summary { flex-basis: 100%; justify-content: center; }
  .garden-title { font-size: 1.4rem; }
  .garden-playbar { flex-direction: column; align-items: flex-start; }
  .garden-actions .btn { width: 100%; }
  html { scroll-padding-top: 70px; scroll-padding-bottom: 150px; }
}

/* ===== 动效降级 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ===== 摆放图纸（写实插画版） ===== */
.layout-stage {
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
/* 图纸标题栏（替代原透视横幅，与下方地台无缝相连） */
.layout-titleblock {
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; display: flex; align-items: baseline;
  justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
}
.layout-titleblock .tb-title {
  font-family: var(--display); font-size: 1.12rem; font-weight: 700; letter-spacing: 0.06em;
}
.layout-titleblock .tb-meta { font-family: var(--mono); font-size: 0.74rem; opacity: 0.85; }
.diagram-deck, .layout-deck {
  background-color: #C9A87C;
  background-image: url('assets/parts/deck_tile.webp');
  background-position: center; background-size: cover;
}
.layout-deck {
  padding: 0.9rem 1rem 1.1rem;
  border-top: 1px solid rgba(32,49,42,0.25);
}
.lay-section-label {
  font-family: var(--mono); font-size: 0.72rem; color: #3a2c1e;
  background: rgba(244,241,230,0.82); display: inline-block;
  padding: 2px 8px; border-radius: 5px; margin: 0.3rem 0 0.5rem; font-weight: 600;
}
.lay-row { display: flex; align-items: flex-end; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.lay-rowlabel {
  flex: 0 0 auto; width: 2.3rem; align-self: center; text-align: center;
  font-family: var(--mono); font-size: 0.64rem; line-height: 1.15; color: #3a2c1e;
  background: rgba(244,241,230,0.78); border-radius: 5px; padding: 3px 2px;
}
.lay-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; width: var(--mw, 84px); }
.lay-medallion {
  position: relative; width: var(--mw, 84px); height: var(--mw, 84px);
  border-radius: 50%; overflow: hidden; background: #EAE3D2;
  border: 2px solid rgba(255,255,255,0.7); box-shadow: 0 4px 9px rgba(32,49,42,0.30);
  display: flex; align-items: center; justify-content: center;
}
.lay-medallion img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lay-medallion .lay-emoji { font-size: 1.7rem; }
.lay-empty {
  width: var(--mw, 84px); height: var(--mw, 84px); border-radius: 50%;
  border: 2px dashed rgba(244,241,230,0.85); background: rgba(32,49,42,0.10);
  display: flex; align-items: center; justify-content: center;
  color: rgba(244,241,230,0.95); font-size: 1.5rem;
}
.lay-name {
  font-size: 0.74rem; font-weight: 600; color: #20312A; text-align: center; line-height: 1.15;
  text-shadow: 0 1px 2px rgba(244,241,230,0.95), 0 0 3px rgba(244,241,230,0.8);
}
.lay-badge {
  font-family: var(--mono); font-size: 0.62rem; padding: 0 3px; border-radius: 3px;
  background: rgba(244,241,230,0.9); color: var(--gold-ink);
}
.lay-tip { font-size: 0.78rem; color: var(--muted); margin-top: 0.6rem; }

/* 作物圆形缩略图（作物方案卡） */
.crop-thumb {
  width: 54px; height: 54px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  position: relative; background: #EAE3D2; border: 1.5px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 5px rgba(32,49,42,0.2);
}
.crop-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.crop-thumb .lay-emoji { font-size: 1.35rem; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }

/* 首页主图 */
.hero-art {
  width: 100%; max-width: 620px; margin: 0 auto 1.6rem; display: block;
  border-radius: var(--radius); border: 1.5px solid var(--ink); box-shadow: var(--shadow);
  aspect-ratio: 16 / 9; object-fit: cover;
}

/* ===== 常见尺寸快填 ===== */
.preset-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.preset-btn {
  font-family: var(--mono); font-size: 0.76rem; padding: 0.45rem 0.7rem;
  border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); cursor: pointer; transition: box-shadow .12s, transform .1s;
}
.preset-btn:hover { box-shadow: 2px 2px 0 var(--ink); }
.preset-btn:active { transform: translate(1px,1px); box-shadow: none; }

/* ===== 摆放图纸：采光窗示意 ===== */
.lay-windowbar {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  background: rgba(244,241,230,0.86); border: 1px solid var(--rule);
  border-radius: 8px; padding: 0.5rem 0.7rem; margin-bottom: 0.7rem;
}
.lay-windowbar svg { flex: 0 0 auto; }
.lay-windowbar .wb-title { font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.lay-windowbar .wb-sub { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 2px; }

/* ===== 阳台图纸（输入页交互 / 选择页 / 结果页共用） ===== */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.window-editor {
  position: relative;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 0.5rem; display: flex; flex-direction: column; justify-content: center;
  max-width: 620px; margin: 0 auto;
}
.we-svg { flex: 1; display: flex; justify-content: center; }

/* 「换成墙 / 换成采光」按钮行：图外操作，不遮挡图纸；每条可改的边一个 */
.we-edge-btns {
  display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: wrap; gap: 0.4rem;
  margin: 0.35rem 0.2rem 0; padding: 0.1rem 0 0;
}
/* 与「朝向」标签同款：▪ 记号 + 同缩进，三行左对齐对齐 */
.web-label {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; color: var(--ink);
  padding-left: 0.8rem; position: relative; flex: 0 0 auto; margin-right: 0.1rem;
}
.web-label::before { content: "▪"; position: absolute; left: 0; top: -1px; color: var(--gold-ink); }
.web-btn {
  display: inline-flex; align-items: baseline; gap: 0.32rem;
  background: var(--card); border: 1.5px solid var(--gold-ink); border-radius: var(--radius-sm);
  color: var(--gold-ink); cursor: pointer;
  padding: 0.32rem 0.62rem; font-family: var(--sans);
  box-shadow: 2px 2px 0 rgba(125,89,11,0.28); transition: transform .1s, box-shadow .1s, background .12s;
}
.web-btn .web-dir { font-weight: 700; font-size: 0.8rem; }
.web-btn .web-act { font-size: 0.76rem; }
.web-btn::before { content: "⇄"; font-size: 0.8rem; opacity: 0.7; margin-right: 0.05rem; }
.web-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 rgba(125,89,11,0.3); background: var(--paper); }
.web-btn:active { transform: translate(1px,1px); box-shadow: none; }
.web-btn.is-open { border-color: var(--primary-dark); color: var(--primary-dark); box-shadow: 2px 2px 0 rgba(42,90,51,0.25); }

/* 「正前方挡光？」按钮组：没有 / 有矮楼 / 有高楼（单选态，当前项填实） */
.we-obs-btns {
  display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0.2rem 0; padding: 0.1rem 0 0;
}
.obs-btn {
  background: var(--card); border: 1.5px solid var(--rule); border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer;
  padding: 0.32rem 0.7rem; font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  transition: background .12s, color .12s, border-color .12s, box-shadow .1s;
}
.obs-btn:hover { border-color: var(--gold-ink); color: var(--ink); }
.obs-btn.on {
  background: var(--gold-ink); color: #FFF6E0; border-color: var(--gold-ink);
  box-shadow: 2px 2px 0 rgba(32,49,42,0.15);
}

/* 朝向按钮：嵌在图纸框内、贴着图下沿（点按钮，图上的墙/窗/光带立刻跟着转） */
.ori-inline {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  border-top: 1px dashed var(--rule);
  margin: 0.35rem 0.2rem 0.1rem; padding-top: 0.55rem;
}
.ori-label {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--ink);
  padding-left: 0.8rem; position: relative; flex: 0 0 auto;
}
.ori-label::before { content: "▪"; position: absolute; left: 0; top: -1px; color: var(--gold-ink); }
.ori-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; flex: 1; min-width: 0; }
.ori-chips .radio-option label { padding: 0.34rem 0.62rem; font-size: 0.84rem; }
.window-editor svg { width: 100%; height: auto; touch-action: manipulation; }
/* 尺寸标注线拖拽手柄（HTML 覆盖层，重绘不掉指针捕获） */
.dim-handle {
  position: absolute; width: 32px; height: 32px;
  transform: translate(-50%, -50%);
  background: transparent; border: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize; touch-action: none; z-index: 5;
}
.dim-handle.dh-wid { cursor: ns-resize; }
.dh-grip {
  width: 15px; height: 15px; position: relative;
  background: var(--gold); border: 1.5px solid var(--ink); border-radius: 3px;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.dh-grip::before {
  content: ""; position: absolute; inset: 3px 4.5px;
  border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink);
}
.dim-handle.dh-wid .dh-grip::before {
  inset: 4.5px 3px;
  border-left: none; border-right: none;
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
}
.dim-handle:hover .dh-grip { background: #EBB23B; }
.dim-handle:focus-visible { outline: 2px solid var(--green); outline-offset: -4px; border-radius: 8px; }

/* ===== 盆位/季节详情条（点图上的盆或四季条弹出） ===== */
.pot-detail {
  max-width: 620px; margin: 0.55rem auto 0;
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  box-shadow: 2px 2px 0 rgba(32,49,42,0.12);
}
.pot-detail .pd-name { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--ink); flex: 0 0 auto; }
.pot-detail .pd-info { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); line-height: 1.5; flex: 1; min-width: 12rem; }
.pot-detail .pd-info small { font-size: 0.68rem; opacity: 0.85; }
.pot-detail .pd-btn {
  font-family: var(--mono); font-size: 0.72rem; padding: 0.28rem 0.6rem;
  background: var(--gold); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px;
  cursor: pointer; box-shadow: 1.5px 1.5px 0 var(--ink); flex: 0 0 auto;
}
.pot-detail .pd-btn:active { transform: translate(1px,1px); box-shadow: none; }
#layout-pot-detail { margin: 0.55rem 0.9rem 0.7rem; max-width: none; }

/* 花盆详情弹卡：点盆位在盆边弹出的小卡（替代下方长条条） */
.pot-popover {
  position: fixed; z-index: 1400;
  width: max-content; max-width: min(280px, 86vw);
  display: flex; flex-direction: column; gap: 0.4rem;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 0.65rem 0.8rem 0.7rem;
  box-shadow: 3px 4px 0 rgba(32,49,42,0.16), 0 10px 26px rgba(32,49,42,0.16);
  opacity: 0; transform: scale(0.96) translateY(3px); transform-origin: center bottom;
  transition: opacity .13s ease, transform .13s ease;
}
.pot-popover.show { opacity: 1; transform: none; }
.pot-popover .pp-close {
  position: absolute; top: 2px; right: 5px;
  border: none; background: none; cursor: pointer; padding: 2px 4px;
  font-size: 1.15rem; line-height: 1; color: var(--muted);
}
.pot-popover .pp-close:hover { color: var(--ink); }
.pot-popover .pd-name {
  display: flex; align-items: center; gap: 0.45rem; padding-right: 1.1rem;
  font-family: var(--display); font-weight: 700; font-size: 0.98rem; color: var(--ink);
}
.pot-popover .pd-info { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); line-height: 1.55; }
.pot-popover .pd-btn {
  align-self: flex-start; margin-top: 0.15rem;
  font-family: var(--mono); font-size: 0.74rem; padding: 0.32rem 0.7rem;
  background: var(--gold); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 3px;
  cursor: pointer; box-shadow: 1.5px 1.5px 0 var(--ink);
}
.pot-popover .pd-btn:active { transform: translate(1px,1px); box-shadow: none; }
/* 09 篇盆详情增量：近况行 / 按钮排 / 记录简列（fromShare 只读态不渲染） */
.pot-popover .pd-now {
  font-size: 0.8rem; color: var(--ink); line-height: 1.5;
  border-top: 1px dashed var(--rule); padding-top: 0.35rem;
}
.pot-popover .pd-actions { display: flex; gap: 0.5rem; }
.pot-popover .pd-actions .pd-btn {
  margin-top: 0; flex: 1; min-height: 40px;   /* 触屏热区 ≥40px */
}
.pot-popover .pd-actions .pd-clinic { background: var(--card); }
.pot-popover .pd-journal {
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px dashed var(--rule); padding-top: 0.35rem;
}
.pot-popover .pd-jr-row { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); line-height: 1.5; }
.pot-popover .pd-past {
  align-self: flex-start; border: none; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.72rem; color: var(--primary);
  text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; min-height: 40px;
}
.pot-popover .pp-arrow {
  position: absolute; width: 11px; height: 11px; background: var(--card);
  border: 1.5px solid var(--ink); transform: rotate(45deg);
}
.pot-popover .pp-arrow[data-dir="down"] { bottom: -6.5px; border-top: none; border-left: none; }
.pot-popover .pp-arrow[data-dir="up"]   { top: -6.5px; border-bottom: none; border-right: none; }
@media (prefers-reduced-motion: reduce) {
  .pot-popover { transition: none; }
}

/* 选择页 toast 抬到吸底栏上方，不盖生成按钮 */
body:has(#page-select.active) #toast { bottom: 158px; }

/* 受限作物：可选但降饱和 + 警示徽章（原因简写，title 有破解提示） */
.select-card.gated { border-style: dashed; }
.select-card.gated:not(.selected) { opacity: 0.82; }
.select-badge.badge-gate {
  background: none; color: var(--gold-ink);
  border: 1px dashed var(--gold-ink);
  cursor: help;
}

/* ===== 手机端整体优化（2026-07 小白审计批） ===== */
/* 新手引导语 */
.select-guide {
  font-size: 0.88rem; line-height: 1.6; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem; margin: 0.7rem 0;
  box-shadow: 2px 2px 0 rgba(32,49,42,0.12);
}
/* 四季/图纸折叠区 */
.select-fold { margin: 0.4rem 0 0.8rem; }
.select-fold > summary {
  cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  color: var(--ink); padding: 0.55rem 0.2rem; list-style: none;
  display: flex; align-items: baseline; gap: 0.5rem; min-height: 44px; box-sizing: border-box;
}
.select-fold > summary::before { content: '▸'; transition: transform .15s; }
.select-fold[open] > summary::before { transform: rotate(90deg); }
.select-fold > summary::-webkit-details-marker { display: none; }
.select-fold > summary small { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); font-weight: 400; }
/* 词典行 */
.glossary {
  font-size: 0.78rem; color: var(--muted); line-height: 1.6;
  background: rgba(60,122,67,0.06); border-radius: 3px; padding: 0.4rem 0.6rem; margin-top: 0.35rem;
}
/* 首页 CTA 微文案 */
.cta-micro { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); margin-top: 0.6rem; letter-spacing: 0.06em; }
/* 类型筛选吸顶（手机） */
@media (max-width: 760px) {
  .type-filter { position: sticky; top: 54px; z-index: 55; background: var(--bg); padding: 0.45rem 0; margin-top: 0; }
}
/* 未选中卡片折叠：只留头部+徽章，点选后展开控件（页高从18屏压到约6屏） */
.select-card:not(.selected) .select-card-info,
.select-card:not(.selected) .select-card-yield,
.select-card:not(.selected) .select-card-row,
.select-card:not(.selected) details { display: none; }
/* 触控目标下限 */
.nav-back, .btn-small, .sort-btn, .sun-play { min-height: 44px; }
.type-chip { min-height: 40px; }
.stepper-btn { min-width: 42px; min-height: 42px; }
.season-bar-item { min-height: 40px; align-items: center; display: flex; }
/* 小字号提级（决策信息 ≥12px） */
.tc-sub { font-size: 0.72rem; }
.select-badge { font-size: 0.78rem; }
.select-badge.risk-high, .select-badge.risk-medium, .select-badge.risk-low { font-weight: 700; }
.select-card-info, .select-card-yield { font-size: 0.8rem; }
/* 甘特条加高 */
#gantt-body .bar { height: 32px; }
.bar-label { font-size: 0.76rem; }


/* 受限原因就地展开 */
.gate-explain {
  font-size: 0.8rem; color: var(--gold-ink); line-height: 1.55;
  background: rgba(224,162,27,0.09); border-left: 3px solid var(--gold);
  padding: 0.45rem 0.6rem; border-radius: 3px; margin: 0.4rem 0 0.2rem;
}

/* 类型筛选章 */
.type-filter { display: flex; gap: 0.45rem; flex-wrap: wrap; margin: 0.6rem 0 0.9rem; }
.type-chip {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem; background: var(--card); color: var(--muted);
  border: 1.5px solid rgba(32,49,42,0.4); border-radius: var(--radius-sm);
  cursor: pointer; box-shadow: 1.5px 1.5px 0 rgba(32,49,42,0.12);
}
.type-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 1.5px 1.5px 0 var(--gold); }
.type-chip:hover:not(.active) { border-color: var(--ink); color: var(--ink); }

/* 四季条可点 */
.season-bar-item { border-radius: var(--radius-sm); padding: 2px 4px; margin: -2px -4px; transition: background .12s; }
.season-bar-item:hover { background: rgba(224,162,27,0.12); }
.season-bar-item.active { background: rgba(224,162,27,0.18); box-shadow: inset 0 0 0 1.5px var(--gold); }

/* ===== 月份时间穿梭标尺 ===== */
/* 月份标尺：13 格手账纸带 [全年‖1..12]，选中格墨底反白 */
.month-ruler {
  max-width: 620px; margin: 0.55rem auto 0;
  display: flex; align-items: stretch;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0 rgba(32,49,42,0.12);
  overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.mr-cell {
  flex: 1; min-width: 0; padding: 0.4rem 0;
  font-family: var(--mono); font-size: 0.72rem; line-height: 1; color: var(--muted);
  background: none; border: none; border-left: 1px solid rgba(32,49,42,0.14);
  cursor: pointer; transition: background .12s; white-space: nowrap;
}
@media (max-width: 520px) {
  .mr-cell { font-size: 0.7rem; letter-spacing: -0.02em; padding: 0.8rem 0; }
  .mr-year { padding: 0.8rem 0.4rem; }
  /* 手机上摆放图纸用满宽度，盆位更好点 */
  #select-diagram, #layout-diagram { padding: 0.3rem !important; }
}
.mr-cell:first-child { border-left: none; }
.mr-year {
  flex: 0 0 auto; padding: 0.4rem 0.65rem;
  font-weight: 600; letter-spacing: 0.1em; color: var(--ink);
  border-right: 3px double var(--ink);
}
.mr-cell.now { color: var(--gold-ink); font-weight: 700; }
.mr-cell.on { background: var(--ink); color: var(--paper); }
.mr-cell.on.now { color: var(--gold); }
.mr-cell:hover:not(.on) { background: rgba(224,162,27,0.14); }
.mr-cell:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: -2px; }
.month-suggest {
  text-align: center; font-family: var(--mono); font-size: 0.78rem;
  color: var(--gold-ink); margin-top: 0.35rem; min-height: 1rem;
}
.layout-ruler-wrap {
  background: var(--card);
  padding: 0.45rem 0.9rem 0.35rem;
  border-bottom: 1px solid rgba(32,49,42,0.25);
}
/* 结果页图纸「看一整年」播放条（由原预览页并过来） */
.layout-playbar {
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
  background: var(--card);
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(32,49,42,0.15);
}
.layout-play-btn {
  font-family: var(--display); font-size: 0.9rem; font-weight: 600;
  padding: 0.4rem 1.05rem;
  border: 1.5px solid var(--green); border-radius: 22px;
  background: var(--green); color: var(--paper); cursor: pointer;
  white-space: nowrap; transition: background .15s ease, transform .15s ease;
}
.layout-play-btn:hover { background: #3A6B35; transform: translateY(-1px); }
.layout-play-hint { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }

/* ===== 一键起步模板 ===== */
.template-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; align-items: stretch; }
.template-label {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted);
  align-self: center; letter-spacing: 0.08em; margin-right: 0.15rem;
}
.template-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 0.38rem 0.7rem;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  cursor: pointer; box-shadow: 2px 2px 0 rgba(32,49,42,0.12);
  transition: transform .1s, box-shadow .1s;
}
.template-chip:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 rgba(32,49,42,0.18); }
.template-chip:active { transform: translate(1px,1px); box-shadow: none; }
.template-chip .tc-name { font-family: var(--display); font-weight: 700; font-size: 0.88rem; color: var(--ink); line-height: 1.2; }
.template-chip .tc-sub { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); letter-spacing: 0.02em; }
.template-chip.tc-clear { justify-content: center; border-style: dashed; box-shadow: none; }
.template-chip.tc-clear .tc-name { font-family: var(--sans); font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.window-editor [data-winedge] { cursor: pointer; }
.window-editor [data-winedge] .edge-hit { fill: transparent; }
.window-editor [data-winedge]:hover .edge-hint,
.window-editor [data-ghost]:hover .edge-hint { opacity: 1; }
.window-editor [data-pot], .window-editor [data-empty] {
  transition: opacity .18s ease, transform .18s ease;
  outline: none;
}
.window-editor [data-pot]:focus-visible,
.window-editor [data-empty]:focus-visible {
  filter: drop-shadow(0 0 3px var(--gold-ink));
}
.window-editor [data-winedge]:focus-visible,
.window-editor [data-dial]:focus-visible,
.window-editor [data-ghost]:focus-visible,
.window-editor [data-building]:focus-visible { outline: none; }
.window-editor [data-winedge]:focus-visible .edge-hit { stroke: var(--green); stroke-width: 2; stroke-dasharray: 4 3; }
.window-editor [data-dial]:focus-visible circle { stroke: var(--green); stroke-width: 2; stroke-dasharray: 3 2; }
.window-editor [data-ghost]:focus-visible rect:last-of-type,
.window-editor [data-building]:focus-visible rect:last-of-type { stroke: var(--green); stroke-width: 2; stroke-dasharray: 4 3; }
.window-light {
  text-align: center; font-family: var(--mono); font-size: 0.86rem;
  color: var(--gold-ink); margin-top: 0.55rem; font-weight: 600;
}

/* 采光口：一排常见窗型 + 窗台/窗高两根滑杆，拖着看图上光带怎么挪 */
#we-win-presets .obs-btn { font-size: 0.76rem; padding: 0.3rem 0.55rem; }
.we-winh {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap;
  margin: 0.3rem 0.2rem 0; padding: 0.1rem 0 0;
}
.winh-key {
  flex: 0 0 auto; width: 4.4rem;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
}
.we-winh input[type="range"] {
  flex: 1; min-width: 0; appearance: none; -webkit-appearance: none;
  height: 24px; background: transparent; cursor: pointer;
}
.we-winh input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--rule) 0%, var(--gold) 100%);
}
.we-winh input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  margin-top: -8px; width: 20px; height: 20px;
  background: var(--gold); border: 1.5px solid var(--ink); border-radius: 50%;
  box-shadow: 1.5px 1.5px 0 var(--ink); cursor: grab;
}
.we-winh input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--rule) 0%, var(--gold) 100%);
}
.we-winh input[type="range"]::-moz-range-thumb {
  width: 17px; height: 17px; background: var(--gold);
  border: 1.5px solid var(--ink); border-radius: 50%; cursor: grab;
}
.winh-val {
  flex: 0 0 auto; width: 3.6rem; text-align: right;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  color: var(--gold-ink); white-space: nowrap;
}
.we-winhtip { margin: 0.3rem 0.2rem 0; }
#winh-sum { color: var(--gold-ink); }
@media (max-width: 400px) {
  .winh-val { font-size: 0.72rem; width: 3.2rem; }
  .winh-key { width: 4rem; font-size: 0.7rem; }
  #we-win-presets .obs-btn { font-size: 0.72rem; padding: 0.28rem 0.45rem; }
}

/* ===== 节气标尺：24 格纸带，选哪天看太阳 ===== */
.term-picker { max-width: 620px; margin: 0.7rem auto 0; }
.term-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.5rem; margin-bottom: 0.3rem;
}
.term-now {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted); white-space: nowrap;
}
.term-ruler {
  display: flex; align-items: stretch;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: 2px 2px 0 rgba(32,49,42,0.12);
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  user-select: none; -webkit-user-select: none;
}
.term-ruler::-webkit-scrollbar { height: 4px; }
.term-ruler::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 2px; }
.tr-cell {
  flex: 0 0 auto; padding: 0.5rem 0.5rem;
  font-family: var(--serif); font-size: 0.78rem; line-height: 1.1; color: var(--muted);
  background: none; border: none; border-left: 1px solid rgba(32,49,42,0.14);
  cursor: pointer; transition: background .12s; white-space: nowrap;
  writing-mode: horizontal-tb;
}
.tr-cell:first-child { border-left: none; }
.tr-cell.key { color: var(--ink); font-weight: 700; }
.tr-cell.today { color: var(--gold-ink); }
.tr-cell.today::after { content: "·今"; font-size: 0.6rem; }
.tr-cell.on { background: var(--ink); color: var(--paper); }
.tr-cell.on.today, .tr-cell.on.key { color: var(--gold); }
.tr-cell:hover:not(.on) { background: rgba(224,162,27,0.14); }
.tr-cell:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: -2px; }

/* ===== 一天日照模拟：时刻标尺 ===== */
.sun-ruler {
  max-width: 620px; margin: 0.55rem auto 0;
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.sun-play {
  flex: 0 0 auto;
  width: 2.1rem; height: 2.1rem; margin-top: 1px;
  background: var(--card); color: var(--gold-ink);
  border: 1.5px solid var(--ink); border-radius: var(--radius-sm);
  font-size: 0.8rem; cursor: pointer;
  box-shadow: 1.5px 1.5px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.sun-play:hover { background: var(--gold); color: var(--ink); }
.sun-play:active { transform: translate(1px, 1px); box-shadow: none; }
.sun-ruler-track { flex: 1; min-width: 0; }
.sun-ruler input[type="range"] {
  width: 100%; appearance: none; -webkit-appearance: none;
  height: 24px; background: transparent; cursor: pointer; display: block;
}
.sun-ruler input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--rule) 0%, var(--gold) 50%, var(--rule) 100%);
}
.sun-ruler input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  margin-top: -8px; width: 20px; height: 20px;
  background: var(--gold); border: 1.5px solid var(--ink); border-radius: 50%;
  box-shadow: 1.5px 1.5px 0 var(--ink); cursor: grab;
}
.sun-ruler input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--rule) 0%, var(--gold) 50%, var(--rule) 100%);
}
.sun-ruler input[type="range"]::-moz-range-thumb {
  width: 17px; height: 17px; background: var(--gold);
  border: 1.5px solid var(--ink); border-radius: 50%; cursor: grab;
}
.sr-ticks { display: flex; justify-content: space-between; padding: 0 6px; margin-top: 1px; }
.sr-ticks span { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); }
.sun-time {
  flex: 0 0 auto; width: 3.2rem; text-align: right;
  font-family: var(--mono); font-size: 0.88rem; font-weight: 700;
  color: var(--gold-ink); margin-top: 5px;
}

/* =====================================================================
   打印样式：一键打印「种植月历 + 图纸 + 清单」，隐藏交互骨架
   ===================================================================== */
@media print {
  body { background: #fff; }
  .navbar, .plan-actionbar, .nav-back, .materials-bar,
  .sort-bar, .cal-scroll-hint, .poster-overlay, .toast, .btn,
  .dim-handle, .month-suggest { display: none !important; }
  .page { display: none; padding: 0; max-width: none; }
  #page-plan.active { display: block; }
  /* 折叠详情在打印时全部展开（月历卡片的做法也展开） */
  .plan-fold { display: block !important; border: 1px solid var(--ink) !important; box-shadow: none !important; margin-bottom: 1rem; }
  .plan-fold > summary { pointer-events: none; }
  .plan-fold > summary::after { display: none; }
  .plan-fold > summary + * { display: block !important; }
  .tk-card > summary::after { display: none; }
  .tk-card > .tk-detail { display: block !important; }
  .tl-today { position: static; }
  .tl-empty > summary::after { display: none; }
  .tl-empty-body { display: block !important; }
  .tl-node, .tl-crop, .tl-end { break-inside: avoid; page-break-inside: avoid; }
  .tk-detail .btn { display: none !important; }
  .plan-band, .plan-summary, .plan-start { break-inside: avoid; page-break-inside: avoid; }
  /* 小单元不跨页拦腰截断；大区块允许自然分页 */
  .crop-card, .cal-row, .cal-legend, .tk-card, .plan-tip, .ledger-total {
    break-inside: avoid; page-break-inside: avoid;
  }
  .band-title { break-after: avoid; page-break-after: avoid; }
  .task-month-head { break-after: avoid; page-break-after: avoid; }
  .cal-wrap { overflow: visible; mask-image: none; -webkit-mask-image: none; }
  .cal-label { position: static; }
  * { box-shadow: none !important; }
  .bar, .seg-grow, .seg-harvest, .season-bar-fill, .enc-risk-fill, .legend-dot {
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .calendar-container, .crop-card, .select-card, .task-month { border-width: 1px; }
}

/* ===== 菜园 / 小本本 / 急诊（V2） ===== */
.garden-today{background:var(--surface);border:1px solid var(--rule);border-left:3px solid var(--accent);border-radius:6px;padding:11px 13px;margin:.6rem 0 1rem}
/* 08 篇：节气报头（与海报报头同族=等宽金墨小印；甜菜红按色板纪律只用于警示，不用这里） */
.gt-term{font-family:var(--mono);font-size:.66rem;letter-spacing:.18em;color:var(--gold-ink);margin-bottom:4px}
.gt-yi{font-family:var(--display);font-size:1rem;color:var(--ink)}
.gt-bite{font-family:var(--mono);font-size:.72rem;color:var(--gold-ink);margin-top:3px}
.gt-xiao{font-size:.78rem;color:var(--muted);margin-top:3px}
/* 08 篇「还好吗」小字链 + sheet */
.gt-checkup{display:inline-block;border:none;background:none;color:var(--primary);font-size:.78rem;text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:8px 0 0;min-height:40px;font-family:inherit}
.chk-item{padding:10px 2px;border-bottom:1px dashed var(--rule)}
.chk-item:last-of-type{border-bottom:none}
.chk-name{font-size:.9rem;font-weight:600;color:var(--ink)}
.chk-env{font-size:.78rem;color:var(--muted);margin-top:3px}
.chk-line{font-size:.82rem;color:var(--ink);margin-top:3px}
.jr-ev.eat.on{border-color:var(--accent);background:rgba(224,162,27,.12);color:var(--gold-ink)}
.jr-preview img{max-width:120px;border-radius:6px;margin-top:8px}
.g-stampflash{position:fixed;inset:0;z-index:600;display:grid;place-items:center;pointer-events:none}
.g-seal{width:96px;height:96px;border:3px solid var(--beet);border-radius:50%;color:var(--beet);font-family:var(--display);font-size:1.7rem;display:grid;place-items:center;background:rgba(178,58,94,.08);transform:scale(1.6) rotate(-8deg);opacity:0;transition:transform .5s cubic-bezier(.2,1.4,.4,1),opacity .4s}
.g-stampflash.go .g-seal{transform:scale(1) rotate(-5deg);opacity:1}
@media (prefers-reduced-motion:reduce){.g-seal{transition:opacity .3s}}
.g-modal{position:fixed;inset:0;z-index:550;background:rgba(32,49,42,.5);opacity:0;transition:.25s;display:flex;align-items:flex-end;justify-content:center}
.g-modal.on{opacity:1}
.g-modal-inner{background:var(--paper);width:100%;max-width:480px;max-height:88%;border-top-left-radius:16px;border-top-right-radius:16px;display:flex;flex-direction:column;transform:translateY(20px);transition:.25s}
.g-modal.on .g-modal-inner{transform:none}
.g-modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1.5px solid var(--ink);font-family:var(--display);font-size:1.1rem}
.g-close{background:none;border:none;font-size:1.5rem;color:var(--muted);cursor:pointer;line-height:1}
.g-modal-scroll{padding:16px 20px calc(20px + env(safe-area-inset-bottom));overflow-y:auto}
.g-entry{display:flex;gap:12px;padding:12px 0;border-bottom:1px dashed var(--rule)}
.g-entry-seal{flex-shrink:0;width:38px;height:38px;border:1.5px solid var(--beet);border-radius:50%;display:grid;place-items:center;font-size:1.2rem;background:rgba(178,58,94,.05)}
.g-entry-top{display:flex;justify-content:space-between;align-items:baseline}
.g-entry-crop{font-family:var(--display);font-size:.95rem}
.g-entry-date{font-family:var(--mono);font-size:.68rem;color:var(--muted)}
.g-entry-line{font-size:.85rem;color:#3d4a3f;margin-top:2px}
.g-entry-photo img{max-width:140px;border-radius:6px;margin-top:6px}
.g-empty{text-align:center;color:var(--muted);padding:30px 10px;font-size:.85rem}
.g-empty b{display:block;color:var(--ink);font-family:var(--display);margin-top:6px}
.g-stamps-h{font-family:var(--display);margin:18px 0 10px}
.g-stamps{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.g-stampgot{width:52px;height:52px;border:1.8px solid var(--beet);border-radius:50%;color:var(--beet);font-family:var(--display);font-size:.85rem;display:grid;place-items:center;background:rgba(178,58,94,.05)}
.g-to-atlas{width:100%}
.g-postmark{font-family:var(--mono);font-size:.72rem;letter-spacing:.1em;color:var(--gold-ink);border:1px solid var(--rule);border-radius:3px;display:inline-block;padding:2px 8px;margin-bottom:12px}
.g-letter-p{font-family:var(--display);font-size:1rem;line-height:1.9;color:var(--ink);margin-bottom:10px}
.atlas-card{position:relative}
.atlas-card.jr-lit{border-color:var(--primary)!important}
.jr-lit-seal{position:absolute;top:5px;right:6px;width:20px;height:20px;border:1.3px solid var(--beet);border-radius:50%;color:var(--beet);font-family:var(--display);font-size:.65rem;display:grid;place-items:center;background:var(--paper);z-index:2}
.atlas-lit-count{font-family:var(--mono);font-size:.72rem;color:var(--gold-ink);margin:6px 0}
.clinic-sec{border:1px solid var(--rule);border-radius:8px;margin-bottom:10px;overflow:hidden;background:var(--surface)}
.clinic-sec>summary{padding:12px 14px;cursor:pointer;font-family:var(--display);font-size:.95rem;list-style:none}
.clinic-sec>summary::-webkit-details-marker{display:none}
.clinic-body{padding:0 14px 14px;font-size:.85rem;color:#3d4a3f}
.clinic-body p{margin-bottom:8px}
.clinic-ul{margin:0 0 8px 1.1em}.clinic-ul li{margin-bottom:6px}
.clinic-q{font-family:var(--display);font-size:.95rem;color:var(--ink);margin-bottom:10px}
.clinic-verdict{background:rgba(60,122,67,.09);border-left:3px solid var(--primary);border-radius:6px;padding:10px 12px;margin-bottom:10px}
.clinic-again{margin-top:4px}.clinic-mut{color:var(--muted);font-size:.8rem}

/* ===== 选菜页 · 速成标签/徽章（V2） ===== */
.select-badge.badge-quick{background:var(--accent);color:#4a3406;border-color:var(--accent);font-weight:700}
/* 金标速成位：万寿菊黄底松墨字（黄=阳光/高亮专用），描边压金墨与普通⚡区分开（03 篇） */
.select-badge.badge-gold{background:var(--gold);color:var(--ink);border-color:var(--gold-ink);font-weight:700}
/* 难度 chip：普通描边不用甜菜红；配色与 bridge.js 词条弹窗同一口径 */
.select-badge.badge-tier-adv{color:var(--gold-ink);border-color:#B8862D;background:rgba(224,162,27,.12)}
.select-badge.badge-tier-nat{color:var(--primary-dark);border-color:var(--primary);background:rgba(60,122,67,.1)}
.type-chip.chip-quick{border-color:var(--accent);color:var(--gold-ink);font-weight:700}
.type-chip.chip-quick.active{background:var(--accent);color:#3a2a06;border-color:var(--accent)}

/* ===== 购物式选菜 + 种植计划购物车（V2） ===== */
.select-shop{display:flex;gap:10px;align-items:flex-start}
.select-rail{flex:0 0 76px;display:flex;flex-direction:column;gap:6px;position:sticky;top:8px}
.select-rail .type-chip{display:block;width:100%;text-align:center;padding:9px 4px;font-size:.72rem;line-height:1.25;border-radius:8px;white-space:normal}
.select-list{flex:1;min-width:0}
.cart-toggle{display:flex;align-items:center;gap:8px;width:100%;background:none;border:none;cursor:pointer;text-align:left;padding:0;font:inherit;color:inherit}
.cart-ic{font-size:1.1rem;flex:0 0 auto}
.cart-caret{margin-left:auto;color:var(--gold-ink);font-size:.72rem;white-space:nowrap;flex:0 0 auto}
.cart-sheet{max-width:480px;margin:0 auto}
.cart-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.cart-head h3{font-family:var(--display);font-size:1.15rem}
.cart-clear{background:none;border:none;color:var(--accent2);font-size:.82rem;cursor:pointer}
.cart-list{display:flex;flex-direction:column}
.cart-row{display:flex;justify-content:space-between;align-items:center;padding:11px 0;border-bottom:1px dashed var(--rule)}
.cart-row-name{font-size:.95rem}
.cart-stepper{display:flex;align-items:center;gap:12px}
.cart-stepper .stepper-btn{width:30px;height:30px;border:1.5px solid var(--rule);border-radius:50%;background:var(--surface);font-size:1.05rem;cursor:pointer;line-height:1;color:var(--ink)}
.cart-n{min-width:20px;text-align:center;font-variant-numeric:tabular-nums;font-weight:600}
.cart-empty{color:var(--muted);text-align:center;padding:26px 10px;font-size:.85rem}
.cart-foot{display:flex;justify-content:space-between;align-items:center;margin-top:16px;gap:12px}
.cart-foot>span{font-size:.85rem;color:var(--muted)}
.cart-foot .btn{flex:1;max-width:190px}

/* ===== 选菜页 · 购物式重构（V2） ===== */
.select-topbar-slots{display:none}
.select-rail{gap:0}
.select-rail .type-chip{margin-bottom:6px}
.select-rail .chip-tpl{border-color:var(--accent);color:var(--gold-ink);font-weight:700;margin-bottom:10px;position:relative}
.select-rail .chip-tpl.active{background:var(--accent);color:#3a2a06}
.select-rail .chip-tpl::after{content:"";position:absolute;left:10%;right:10%;bottom:-6px;height:1px;background:var(--rule)}
.select-tpl-pane .select-subtitle{font-weight:400}
.tpl-grid{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.tpl-card{background:var(--surface);border:1.4px solid var(--rule);border-radius:8px;padding:12px 14px}
.tpl-name{font-family:var(--display);font-size:1rem}
.tpl-sub{font-size:.78rem;color:var(--muted);margin:3px 0 8px}
.tpl-card .tpl-apply{width:auto}
.select-card{padding:10px 12px}
.sc-main{display:flex;align-items:center;gap:10px}
.sc-main .select-thumb{flex:0 0 auto}
.sc-info{flex:1;min-width:0;background:none;border:none;text-align:left;padding:0;font:inherit;color:inherit;cursor:pointer;display:flex;flex-direction:column;gap:4px}
.sc-name{font-size:.98rem;font-weight:600;color:var(--ink)}
.sc-tags{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.sc-lt{font-size:.68rem;padding:2px 7px;border-radius:20px;border:1px solid var(--rule);color:var(--muted);white-space:nowrap}
.sc-lt-full{color:#a06a10;border-color:#e6c88a;background:rgba(224,162,27,.08)}
.sc-lt-shade{color:#4a6a5a;border-color:#b9cabf;background:rgba(60,90,70,.06)}
.sc-main .stepper{flex:0 0 auto}
.sc-detail{margin-top:10px;padding-top:10px;border-top:1px dashed var(--rule)}
.sc-family{color:var(--muted);font-size:.72rem}
.cart-brief{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.9rem;color:var(--ink);min-width:0}
.lb-tiers{display:inline-flex;gap:8px;font-family:var(--mono);font-size:.74rem;color:var(--muted)}
.lb-t{white-space:nowrap}
.lb-t.lb-over{color:var(--accent2);font-weight:700}

/* ===== 购物车：栏内向上展开、与栏同色（V2 修） ===== */
.cart-brief{color:var(--paper)}
.lb-tiers{color:rgba(244,241,230,.75)}
.lb-t.lb-over{color:var(--gold);font-weight:700}
.lb-est{color:rgba(244,241,230,.6);font-size:.68rem}
.cart-footer{flex-basis:100%;display:flex;gap:.7rem;align-items:center;justify-content:space-between}
.cart-footer .cart-toggle{flex:1;min-width:0}
.materials-bar.expanded{z-index:395}
.cart-panel{flex-basis:100%;max-height:0;overflow:hidden;transition:max-height .28s ease}
.materials-bar.expanded .cart-panel{max-height:46vh;overflow-y:auto;margin-bottom:.5rem}
.cart-panel-head{display:flex;justify-content:space-between;align-items:center;padding:2px 0 8px;border-bottom:1px solid rgba(244,241,230,.2);margin-bottom:4px;font-family:var(--display);font-size:.95rem;color:var(--paper)}
.cart-clear{background:none;border:none;color:#F4C6D4;font-size:.8rem;cursor:pointer}
.cart-row{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px dashed rgba(244,241,230,.18);color:var(--paper)}
.cart-row-name{font-size:.9rem}
.cart-stepper{display:flex;align-items:center;gap:10px}
.cart-step{width:26px;height:26px;border:1.4px solid rgba(244,241,230,.4);border-radius:50%;background:transparent;color:var(--paper);font-size:1rem;line-height:1;cursor:pointer}
.cart-n{min-width:18px;text-align:center;color:var(--paper);font-variant-numeric:tabular-nums}
.cart-empty{color:rgba(244,241,230,.7);text-align:center;padding:16px 6px;font-size:.82rem}
.cart-backdrop{position:fixed;inset:0;background:rgba(32,49,42,.42);opacity:0;pointer-events:none;transition:.25s;z-index:390}
.cart-backdrop.on{opacity:1;pointer-events:auto}

/* ===== 购物车/套餐 · 作物图标与光照标注（V2 修） ===== */
.cart-row-name{display:flex;align-items:center;gap:8px;min-width:0}
.cart-row .select-thumb{width:28px;height:28px;flex:0 0 auto}
.cart-row .select-thumb img{width:100%;height:100%;object-fit:cover;border-radius:5px}
.cart-row-txt{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.cart-lt{border-color:rgba(244,241,230,.4)!important;color:rgba(244,241,230,.8)!important;background:transparent!important}
.tpl-crops{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 10px}
.tpl-crop{display:inline-flex;align-items:center;gap:4px;font-size:.76rem;color:var(--muted)}
.tpl-crop-thumb{width:22px;height:22px;flex:0 0 auto}
.tpl-crop-thumb img{width:100%;height:100%;object-fit:cover;border-radius:4px}
.type-chip[data-type="risk"]{color:var(--beet);border-color:var(--beet)}
.type-chip[data-type="risk"].active{background:var(--beet);color:#F4F1E6;border-color:var(--beet)}

/* ===== 选菜筛选 · 分组（组内单选 · 组间多选） ===== */
.filter-group{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid var(--rule)}
.filter-group-label{font-size:.6rem;color:var(--muted);letter-spacing:.12em;padding-left:2px;margin-bottom:1px}
.filter-group .type-chip{margin-bottom:0}
.select-rail .chip-tpl{margin-bottom:2px}
.type-chip.chip-risk{color:var(--beet);border-color:var(--beet)}
.type-chip.chip-risk.active{background:var(--beet);color:#F4F1E6;border-color:var(--beet)}

/* ===== 摆盆位 · 阳台图纸（真实比例盆） ===== */
#advanced-light{display:none}   /* 去掉「看影子」校准，忽略外部遮挡 */
.bl-palette{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.bl-chip{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1.4px solid var(--rule);border-radius:20px;background:var(--surface);font-size:.8rem;cursor:pointer;color:var(--ink);font-family:inherit}
.bl-chip:active{transform:scale(.96)}
.bl-chip-ic{display:inline-block;width:18px;height:12px;border:1.2px solid #8F5F38;border-radius:3px;background:#C99B6E}
.bl-chip-ic.bl-ic-round20,.bl-chip-ic.bl-ic-round30,.bl-chip-ic.bl-ic-deep35{width:12px;height:12px;border-radius:50%}
.bl-chip-ic.bl-ic-grow_bag{width:14px;height:14px;border-radius:3px;background:#37473A;border-color:#20312A}
.bl-chip-ic.bl-ic-rack{background:repeating-linear-gradient(180deg,#C99B6E 0 3px,#8a5a3a 3px 4px)}
.bl-board{position:relative}
.bl-floor{position:relative;width:100%;border:1.5px solid var(--ink);border-radius:8px;background:var(--paper)}
.bl-floor>svg{display:block;width:100%;height:auto;border-radius:6px}
.bl-overlay{position:absolute;z-index:2;touch-action:pan-y}
.bl-heat{position:absolute;inset:0;display:grid;z-index:0;mix-blend-mode:multiply;pointer-events:none}
.bl-heat-cell{width:100%;height:100%}
.bl-sun{background:#F0D69A}.bl-half{background:#DCDCC6}.bl-shade{background:#C6CCC4}
.bl-item{position:absolute;transform:translate(-50%,-50%);z-index:2;cursor:grab;touch-action:none;user-select:none;display:flex;align-items:center;justify-content:center}
.bl-item.drag{cursor:grabbing;z-index:5;opacity:.92}
.bl-item.sel{outline:2px solid var(--primary);outline-offset:2px}
/* 盆体造型跟图纸语言走：陶沿+培土面；圆盆正圆、长条盆圆角条、种植袋深绿毡方 */
.bl-pot{background:#C99B6E;border:1.5px solid #8F5F38;box-shadow:0 2px 4px rgba(32,49,42,.18)}
.bl-sh-round20,.bl-sh-round30,.bl-sh-deep35{border-radius:50%}
.bl-sh-trough40,.bl-sh-trough60{border-radius:22%/40%}
.bl-sh-grow_bag{border-radius:14%;background:#37473A;border-color:#20312A}
.bl-item.sel.bl-sh-round20,.bl-item.sel.bl-sh-round30,.bl-item.sel.bl-sh-deep35{border-radius:50%}
.bl-soil{position:absolute;inset:14%;border-radius:inherit;background:radial-gradient(circle at 42% 38%,#8A6A4C,#5E4632)}
.bl-sh-grow_bag .bl-soil{inset:10%}
.bl-tag{position:absolute;top:calc(100% + 2px);left:50%;transform:translateX(-50%);font-family:var(--mono);font-size:.5rem;color:var(--ink);background:rgba(244,241,230,.88);padding:0 3px;border-radius:3px;white-space:nowrap;pointer-events:none}
.bl-rack{border:1.5px solid #7a5a3a;border-radius:6px;background:rgba(122,90,58,.16);padding:2px}
.bl-rack-lvs{display:flex;flex-direction:column;gap:2px;width:100%;height:100%}
.bl-rack-lv{flex:1;border-radius:2px}
.bl-legend{display:flex;gap:14px;justify-content:center;margin-top:10px;font-size:.62rem;color:var(--muted)}
.bl-legend i{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:4px;vertical-align:middle}
.bl-sw.sun{background:#F0D69A}.bl-sw.half{background:#DCDCC6}.bl-sw.shade{background:#C6CCC4}
.bl-step{display:inline-flex;align-items:center;gap:6px}
.bl-step button{width:24px;height:24px;border:1.3px solid var(--rule);border-radius:50%;background:var(--surface);cursor:pointer;font-size:.9rem;line-height:1;color:var(--ink)}
.bl-tools{display:flex;gap:8px;margin-top:12px}
.bl-tools .btn{flex:1}
.bl-hint{font-size:.8rem;color:var(--primary-dark);margin-top:10px;background:rgba(60,122,67,.08);border:1px dashed var(--primary);border-radius:6px;padding:8px 10px}
/* 盆卡三件套：菜 icon 坐土面上（不吃指针，拖拽任意点生效）；实心盆红章角标对齐 g-seal 的印章红 */
.bl-crop-ic{position:relative;z-index:1;font-size:clamp(.6rem,2.4vw,1.15rem);line-height:1;pointer-events:none}
.bl-seal{position:absolute;top:-4px;right:-4px;width:13px;height:13px;border:1.5px solid var(--beet);border-radius:50%;background:rgba(178,58,94,.16);z-index:2}
.bl-real-dot{font-family:var(--mono);font-size:.62rem;color:var(--beet);border:1px solid var(--beet);border-radius:4px;padding:0 4px;vertical-align:2px}
/* ===== 配盆底部面板 bl-sheet（点盆开出：换菜/换盆/留空/删除 + 提醒）===== */
.bl-mask{position:fixed;inset:0;background:rgba(32,49,42,.42);opacity:0;pointer-events:none;transition:.25s;z-index:400}
.bl-mask.on{opacity:1;pointer-events:auto}
.bl-sheet{position:fixed;left:0;right:0;bottom:0;max-width:480px;margin:0 auto;background:var(--paper);border-top-left-radius:16px;border-top-right-radius:16px;border-top:1.5px solid var(--ink);padding:18px 20px calc(20px + env(safe-area-inset-bottom));transform:translateY(101%);transition:transform .28s cubic-bezier(.2,.8,.2,1);z-index:401;max-height:82%;overflow-y:auto}
.bl-sheet.on{transform:none}
.bl-grip{width:38px;height:4px;background:var(--rule);border-radius:2px;margin:0 auto 14px}
.bl-sheet h3{font-family:var(--display);font-size:1.1rem;margin-bottom:.1rem}
.bl-sheet-sub{color:var(--muted);font-size:.8rem;margin:.25rem 0 .9rem}
.bl-sheet-key{font-size:.7rem;letter-spacing:.1em;color:var(--gold-ink);margin:.9rem 0 .5rem}
.bl-sheet-note{color:var(--muted);letter-spacing:0;font-size:.68rem}
.bl-chip-row{display:flex;flex-wrap:wrap;gap:7px}
.bl-chip.on{border-color:var(--primary);background:rgba(60,122,67,.1);color:var(--primary-dark);font-weight:600}
.bl-chip.rec{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
.bl-chip-pick{border-style:dashed;color:var(--muted)}
.bl-warn{background:rgba(224,162,27,.12);border:1px solid var(--accent);border-radius:6px;padding:8px 10px;font-size:.72rem;color:var(--gold-ink);margin-top:8px}
.bl-sheet-acts{display:flex;gap:10px;margin-top:14px;align-items:center}
.bl-act{padding:8px 14px;border:1.4px solid var(--rule);border-radius:8px;background:var(--surface);font-size:.82rem;cursor:pointer;color:var(--ink);font-family:inherit}
.bl-act-del{background:none;border:none;color:var(--beet);cursor:pointer;font-size:.82rem;text-decoration:underline;padding:8px 0;font-family:inherit}
.bl-del-cfm{margin-top:14px;border:1px solid var(--rule);border-radius:8px;padding:10px 12px}
.bl-del-quote{font-size:.82rem;color:var(--muted);margin:0 0 8px}
/* 浮层表单字段（garden/clinic 浮层从 pp- 迁来后的配套样式，07 篇补） */
.bl-field{margin-bottom:.9rem}
.bl-flabel{font-size:.7rem;letter-spacing:.1em;color:var(--gold-ink);margin-bottom:.5rem}

/* ===== 今天的菜园 · 图纸孪生（07 篇）===== */
/* 自由坐标覆盖层：与摆盆编辑器同一套对齐手法（bare 图纸 + data-geo 百分比覆盖层） */
#layout-diagram{position:relative}
.twin-pot{pointer-events:auto;cursor:pointer;touch-action:pan-y}
.pot-ghost{opacity:.35}
.twin-st-harvest{color:var(--gold-ink)}
.twin-st-grow{color:var(--primary-dark)}
/* 「蓝图」图签：整片蓝图态 / 折叠行展开时盖上图角 */
.twin-legend{position:absolute;top:6px;right:8px;z-index:3;font-family:var(--mono);font-size:.58rem;letter-spacing:.14em;color:var(--muted);border:1px dashed var(--rule);border-radius:3px;padding:2px 7px;background:rgba(244,241,230,.85);pointer-events:none}
/* 幽灵盆折叠行（图纸下一行） */
.twin-fold{margin:.6rem 0 .4rem}
.twin-fold-bar{width:100%;display:flex;justify-content:space-between;align-items:center;border:1px dashed var(--rule);border-radius:8px;background:var(--surface);padding:9px 12px;font-size:.82rem;color:var(--muted);cursor:pointer;font-family:inherit}
.twin-fold-bar:active{transform:scale(.99)}
.twin-caret{font-size:.7rem}
.twin-fold-body{margin-top:8px;border:1px dashed var(--rule);border-radius:8px;padding:10px 12px;background:rgba(244,241,230,.6)}
.twin-fold-acts{display:flex;gap:8px;flex-wrap:wrap}
.twin-fold-claim{font-size:.72rem;color:var(--muted);margin:10px 0 0}
.twin-fold-claim button{border:none;background:none;color:var(--primary);text-decoration:underline;text-underline-offset:3px;cursor:pointer;font-size:.72rem;padding:0;font-family:inherit}
/* 开工前主 CTA（图纸下） */
.gt-cta{margin:.8rem 0 1rem;text-align:center}
.gt-cta-main{width:100%;font-size:1rem;padding:13px 16px}
.gt-cta-sub{font-size:.78rem;color:var(--muted);margin:.55rem 0 .35rem}
.gt-cta-claim{border:none;background:none;color:var(--primary);font-size:.82rem;text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:6px;font-family:inherit}
/* 批量认领 sheet */
.claim-row{display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px dashed var(--rule);cursor:pointer}
.claim-row input[type=checkbox]{width:20px;height:20px;flex-shrink:0;accent-color:var(--primary)}
.claim-ic{font-size:1.2rem;line-height:1}
.claim-name{font-size:.88rem;color:var(--ink)}
.claim-pot{font-size:.7rem;color:var(--muted);margin-left:2px}
.claim-when{display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding:8px 0 12px 32px;border-bottom:1px dashed var(--rule)}
.claim-row:last-of-type,.claim-when:last-child{border-bottom:none}
.claim-date{font:inherit;font-size:.8rem;padding:6px 8px;border:1.4px solid var(--rule);border-radius:8px;background:var(--surface);color:var(--ink)}
/* 愿景散文折叠开关 */
.pv-more{border:none;background:none;color:var(--primary);font-size:.82rem;cursor:pointer;padding:2px 0;text-decoration:underline;text-underline-offset:3px;font-family:inherit}
/* ===== 录入页一键成套 combo（02 篇：整套预设写入，手动微调即取消点亮）===== */
.combo-row{margin:.6rem 0 .2rem}
.combo-label{font-size:.78rem;color:var(--muted)}
.combo-chips{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:6px}
.combo-chip{display:flex;flex-direction:column;gap:2px;text-align:left;padding:9px 12px;border:1.4px solid var(--rule);border-radius:8px;background:var(--surface);cursor:pointer;color:var(--ink);font-family:inherit}
.combo-chip b{font-size:.85rem;font-weight:600}
.combo-chip span{font-size:.68rem;color:var(--muted);line-height:1.4}
.combo-chip.on{border-color:var(--primary);background:rgba(60,122,67,.08)}
.combo-chip.on b{color:var(--primary-dark)}
.combo-chip:active{transform:scale(.97)}
.combo-honest{margin-top:.9rem}

/* ===== 愿望幕（wish.js · 此前一直缺失的配套样式）===== */
.wish-veil{position:fixed;inset:0;z-index:320;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:32px 22px;background:var(--paper);opacity:0;pointer-events:none;transition:opacity .45s ease}
.wish-veil.on{opacity:1;pointer-events:auto}
.wv-eyebrow{font-family:var(--display);font-size:.82rem;letter-spacing:.3em;color:var(--gold-ink);font-weight:600}
.wv-balcony{display:grid;gap:6px;justify-content:center;padding:14px;background:var(--card);border:1.5px solid var(--rule);border-radius:var(--radius);box-shadow:var(--shadow)}
.wv-cell{width:42px;height:42px;border-radius:8px;background:var(--bg2);border:1px solid var(--rule);display:grid;place-items:center;font-size:1.35rem}
.wv-cell.g{background:#E2ECDC;border-color:#B8CCB0}
/* 自由坐标帧（layout2 v3）：愿望幕按真实盆位摆，不再是格子 */
.wv-balcony.wv-free{display:block;position:relative;width:min(78vw,320px)}
.wv-pot{position:absolute;transform:translate(-50%,-50%);font-size:1.35rem;line-height:1}
.wish-veil h2{font-family:var(--display);font-size:1.55rem;color:var(--ink);margin:4px 0 0;letter-spacing:.04em}
.wv-prose{margin:0;text-align:center;line-height:1.95;color:var(--muted);font-size:.98rem}
.wv-prose .em{color:var(--green);font-weight:700}
.wv-seal{width:76px;height:76px;border:3px double var(--beet);border-radius:4px;color:var(--beet);display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:var(--display);font-weight:700;font-size:1.25rem;line-height:1.15;transform:rotate(-4deg);margin-top:2px}
.wv-seal small{font-size:.55rem;letter-spacing:.12em;font-weight:400;margin-top:3px}
.wv-go{min-width:200px;margin-top:6px}
.wv-save{border:none;background:transparent;color:var(--muted);font-size:.85rem;text-decoration:underline;text-underline-offset:3px;cursor:pointer;padding:4px 8px}
/* 跳过：右上常驻、第一帧即可点，与「开始吧」同一出口（06 篇） */
.wv-skip{position:absolute;top:calc(10px + env(safe-area-inset-top));right:12px;min-width:44px;min-height:44px;border:none;background:transparent;color:var(--muted);font-size:.88rem;cursor:pointer;z-index:1}
/* 通用当屏图片浮层（FC.ui.showPosterImage：愿望图/海报共用） */
.poster-float{position:fixed;inset:0;z-index:400;background:rgba(32,49,42,.82);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px}
.poster-float img{max-width:86%;max-height:70vh;border-radius:6px;box-shadow:0 12px 40px rgba(0,0,0,.4)}
.pf-tip{color:var(--paper);font-size:.88rem}
.pf-actions{display:flex;gap:10px}
@media (max-height:640px){.wish-veil{justify-content:flex-start}}
