/* ==========================================================
   Plan Studio · 配绿工作台  (plan 页专用，ps- 前缀)
   依赖 theme.css 的 --g-* 令牌与 .container
   ========================================================== */

.container { width: min(var(--g-wrap), calc(100% - 64px)); margin-inline: auto; }

.ps-head { background: var(--g-deep); color: #fff; padding: 34px 0 96px; }
.ps-head-in { position: relative; }
.ps-crumb { font-size: 12.5px; color: rgba(255,255,255,.55); display: flex; align-items: center; gap: 8px; }
.ps-crumb a { color: rgba(255,255,255,.78); text-decoration: none; }
.ps-crumb a:hover { color: #fff; }
.ps-crumb i { font-style: normal; opacity: .45; }
.ps-head-grid {
  margin-top: clamp(26px, 3.4vw, 44px);
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px); align-items: end;
}
.ps-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--g-leaf);
}
.ps-head-title { margin-top: 14px; font-size: clamp(30px, 3.6vw, 50px); line-height: 1.16; color: #fff; }
.ps-head-title em { font-style: normal; color: var(--g-leaf); }
.ps-head-sub { margin-top: 14px; max-width: 56ch; font-size: 15px; line-height: 1.9; color: rgba(255,255,255,.72); }
.ps-head-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid rgba(255,255,255,.16); }
.ps-head-facts li { padding: 10px 0 10px 22px; }
.ps-head-facts li + li { border-top: 1px dashed rgba(255,255,255,.14); }
.ps-head-facts b { display: block; font-size: clamp(22px, 2vw, 28px); color: #fff; letter-spacing: -.01em; }
.ps-head-facts span { display: block; margin-top: 2px; font-size: 12px; color: rgba(255,255,255,.55); }

/* ---------- 工作台 ---------- */
.ps-studio { margin-top: -62px; padding-bottom: 26px; }
.ps-bench {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  background: #fff; border: 1px solid var(--g-line); border-radius: 18px;
  box-shadow: var(--g-shadow); overflow: hidden;
}

/* 左：参数面板 */
.ps-params { border-right: 1px solid var(--g-line); min-width: 0; }
.ps-param { padding: clamp(24px, 2.6vw, 36px) clamp(24px, 2.8vw, 40px); }
.ps-param + .ps-param { border-top: 1px dashed var(--g-line); }
.ps-p-hd { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.ps-p-no {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--g-green);
  border: 1px solid var(--g-leaf); border-radius: 999px; padding: 3px 9px;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.ps-p-t { margin: 0; font-size: 18px; color: var(--g-ink); }
.ps-p-hd p { margin: 3px 0 0; font-size: 12.5px; color: var(--g-muted); }
.ps-p-hd p i { font-style: normal; color: var(--g-green); font-weight: 600; }

.ps-field { margin-top: 18px; }
.ps-field:first-of-type { margin-top: 0; }
.ps-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--g-ink); }
.ps-label i { font-style: normal; font-weight: 500; color: var(--g-muted); font-size: 12px; }
.ps-label b { color: var(--g-green); font-variant-numeric: tabular-nums; }

.ps-chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.ps-chip {
  appearance: none; border: 1px solid var(--g-line); background: #fff; color: var(--g-ink);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; cursor: pointer;
  transition: border-color .18s, background .18s, color .18s;
  font-family: inherit;
}
.ps-chip:hover { border-color: var(--g-leaf); }
.ps-chip.is-on { background: var(--g-ink); border-color: var(--g-ink); color: #fff; font-weight: 600; }

.ps-area-row { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: center; }
.ps-area-row input[type="range"] {
  --plan-fill: 15%;
  appearance: none; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--g-green) var(--plan-fill), #e3ede6 var(--plan-fill));
  outline: none; cursor: pointer; width: 100%;
}
.ps-area-row input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--g-green); box-shadow: 0 2px 8px rgba(13,47,34,.22);
  cursor: grab;
}
.ps-area-row input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--g-green); cursor: grab;
}
.ps-area-row input[type="number"] {
  border: 1px solid var(--g-line); border-radius: 10px; padding: 9px 12px;
  font-size: 14.5px; font-weight: 700; color: var(--g-ink); width: 100%;
  font-variant-numeric: tabular-nums; font-family: inherit;
}
.ps-area-row input[type="number"]:focus { outline: none; border-color: var(--g-green); }
.ps-hint { margin: 10px 0 0; font-size: 12px; color: var(--g-muted); line-height: 1.6; }

/* 档位分段器 */
.ps-tiers { margin-top: 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ps-tier {
  position: relative; appearance: none; text-align: left; cursor: pointer;
  border: 1px solid var(--g-line); background: #fff; border-radius: 12px;
  padding: 11px 12px 10px; font-family: inherit;
  display: grid; gap: 3px; transition: border-color .18s, box-shadow .18s, background .18s;
}
.ps-tier:hover { border-color: var(--g-leaf); }
.ps-tier-name { font-size: 13.5px; font-weight: 700; color: var(--g-ink); }
.ps-tier-price { font-size: 15px; font-weight: 700; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.ps-tier-price i { font-style: normal; font-size: 11px; font-weight: 500; color: var(--g-muted); margin-right: 1px; }
.ps-tier-price span { font-size: 11px; font-weight: 500; color: var(--g-muted); }
.ps-tier-area { font-size: 11px; color: var(--g-muted); font-variant-numeric: tabular-nums; }
.ps-tier.is-match::after {
  content: "荐"; position: absolute; top: -7px; right: 10px;
  font-size: 10px; font-weight: 700; color: #fff; background: var(--g-green);
  border-radius: 999px; padding: 2px 7px; letter-spacing: .05em;
}
.ps-tier.is-on {
  background: #f2f9f4; border-color: var(--g-green);
  box-shadow: inset 0 0 0 1px var(--g-green);
}
.ps-tier.is-on .ps-tier-name { color: var(--g-green); }

/* 区域 toggle */
.ps-zones { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ps-zone {
  position: relative; display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--g-line); border-radius: 10px; padding: 9px 12px;
  cursor: pointer; transition: border-color .18s, background .18s;
}
.ps-zone:hover { border-color: var(--g-leaf); }
.ps-zone input { position: absolute; opacity: 0; pointer-events: none; }
.ps-zone-box {
  width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid #c6d6cb;
  flex-shrink: 0; display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.ps-zone-box::after {
  content: ""; width: 8px; height: 4.5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -0.5px); opacity: 0;
}
.ps-zone.is-on { border-color: var(--g-green); background: #f2f9f4; }
.ps-zone.is-on .ps-zone-box { background: var(--g-green); border-color: var(--g-green); }
.ps-zone.is-on .ps-zone-box::after { opacity: 1; }
.ps-zone-txt { min-width: 0; }
.ps-zone-txt b { display: block; font-size: 13px; color: var(--g-ink); font-weight: 600; }
.ps-zone-txt em { display: block; font-style: normal; font-size: 11px; color: var(--g-muted); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 右：实时输出 ---------- */
.ps-out { background: #f7fbf8; min-width: 0; padding: clamp(24px, 2.6vw, 36px) clamp(24px, 2.8vw, 40px); }
.ps-out-hd { padding-bottom: 16px; border-bottom: 1px solid var(--g-line); }
.ps-out-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--g-green);
}
.ps-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g-green); box-shadow: 0 0 0 4px rgba(47,125,79,.16); }
.ps-out-title { margin: 10px 0 0; font-size: clamp(20px, 1.8vw, 26px); color: var(--g-ink); }
.ps-out-scene { margin: 4px 0 0; font-size: 13px; color: var(--g-muted); }

.ps-facts { margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ps-facts div { background: #fff; border: 1px solid var(--g-line); border-radius: 12px; padding: 12px 13px; }
.ps-facts dt { font-size: 11.5px; color: var(--g-muted); }
.ps-facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 700; color: var(--g-ink); font-variant-numeric: tabular-nums; }

.ps-sub { margin: 22px 0 10px; font-size: 13px; font-weight: 700; color: var(--g-ink); }
.ps-sub i { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--g-muted); }

/* 区域配比示意条 */
.ps-zonebar { display: flex; height: 34px; border-radius: 9px; overflow: hidden; border: 1px solid var(--g-line); background: #fff; }
.ps-zonebar i {
  height: 100%; min-width: 4px;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11px; font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums; transition: width .4s var(--g-ease);
}
.ps-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; }
.ps-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--g-ink); }
.ps-legend li i { font-style: normal; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.ps-legend .pl-n { margin-left: auto; color: var(--g-muted); font-variant-numeric: tabular-nums; }

/* 加购 */
.ps-addons { display: grid; gap: 8px; }
.ps-addon {
  position: relative; display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  background: #fff; border: 1px solid var(--g-line); border-radius: 12px; padding: 12px 14px;
  transition: border-color .18s, box-shadow .18s;
}
.ps-addon:hover { border-color: var(--g-leaf); }
.ps-addon input { position: absolute; opacity: 0; pointer-events: none; }
.ps-addon-box {
  width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid #c6d6cb;
  flex-shrink: 0; margin-top: 2px; display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.ps-addon-box::after {
  content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -0.5px); opacity: 0;
}
.ps-addon.is-on { border-color: var(--g-green); box-shadow: inset 0 0 0 1px var(--g-green); }
.ps-addon.is-on .ps-addon-box { background: var(--g-green); border-color: var(--g-green); }
.ps-addon.is-on .ps-addon-box::after { opacity: 1; }
.ps-addon-txt { min-width: 0; flex: 1; }
.ps-addon-txt b { display: block; font-size: 13.5px; color: var(--g-ink); }
.ps-addon-txt em { display: block; font-style: normal; font-size: 12px; color: var(--g-muted); margin-top: 2px; line-height: 1.55; }
.ps-addon-txt i { display: block; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--g-green); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* 价格与动作 */
.ps-price-row {
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--g-line);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
}
.ps-price-label { font-size: 13px; color: var(--g-muted); }
.ps-price-main { display: inline-flex; align-items: baseline; gap: 6px; }
.ps-price-main b { font-size: clamp(28px, 2.6vw, 38px); color: var(--g-ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ps-price-main b::before { content: "¥"; font-size: .6em; font-weight: 600; }
.ps-price-note { margin: 0; width: 100%; font-size: 12.5px; color: var(--g-muted); }
.ps-price-note strong { color: var(--g-green); font-weight: 700; }

.ps-out-acts { margin-top: 18px; display: grid; gap: 10px; }
.ps-out-acts2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ps-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 13px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none; font-family: inherit; transition: transform .18s var(--g-ease), box-shadow .18s, background .18s, color .18s;
}
.ps-btn svg { width: 16px; height: 16px; }
.ps-btn.solid { background: var(--g-green); color: #fff; border: none; box-shadow: 0 10px 24px -12px rgba(47,125,79,.55); }
.ps-btn.solid:hover { background: var(--g-ink); transform: translateY(-1px); }
.ps-btn.ghost { background: #fff; color: var(--g-ink); border: 1px solid var(--g-line); }
.ps-btn.ghost:hover { border-color: var(--g-green); color: var(--g-green); }
.ps-note { margin: 14px 0 0; font-size: 11.5px; color: var(--g-muted); line-height: 1.7; }

/* ---------- 清单区 ---------- */
.ps-sec { padding: clamp(52px, 6vw, 84px) 0 0; }
.ps-sec-head { max-width: 72ch; }
.ps-kicker { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--g-green); }
.ps-sec-head h2 { margin: 10px 0 0; font-size: clamp(24px, 2.6vw, 34px); color: var(--g-ink); }
.ps-sec-head h2 em { font-style: normal; color: var(--g-green); }
.ps-lead { margin: 12px 0 0; font-size: 14.5px; line-height: 1.85; color: var(--g-muted); }

.ps-list-grid {
  margin-top: clamp(24px, 3vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 44px); align-items: start;
}
.ps-plants { border-top: 2px solid var(--g-ink); }
.ps-plants-ul { list-style: none; margin: 0; padding: 0; }
.ps-plants-ul > li {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 64px minmax(0, 1.1fr);
  gap: 14px; align-items: baseline; padding: 14px 2px; border-bottom: 1px solid var(--g-line);
}
.ps-plants-ul .pp-name { font-size: 14.5px; font-weight: 700; color: var(--g-ink); }
.ps-plants-ul .pp-spec { font-size: 12.5px; color: var(--g-muted); }
.ps-plants-ul .pp-qty { font-size: 13.5px; font-weight: 700; color: var(--g-green); text-align: right; font-variant-numeric: tabular-nums; }
.ps-plants-ul .pp-place { font-size: 12.5px; color: var(--g-muted); text-align: right; }
.ps-plants-total {
  margin: 0; padding: 14px 16px; background: var(--g-deep); color: #fff;
  border-radius: 0 0 12px 12px; font-size: 13.5px; font-weight: 600;
  display: flex; flex-wrap: wrap; gap: 4px 18px; font-variant-numeric: tabular-nums;
}
.ps-plants-empty { padding: 26px 2px; font-size: 13.5px; color: var(--g-muted); border-bottom: 1px solid var(--g-line); }

.ps-side { display: grid; gap: 16px; }
.ps-side-card { background: #f7fbf8; border: 1px solid var(--g-line); border-radius: 16px; padding: 22px; }
.ps-side-card h3 { margin: 0; font-size: 15.5px; color: var(--g-ink); }
.ps-side-card h3 i { font-style: normal; font-size: 12px; font-weight: 500; color: var(--g-muted); margin-left: 4px; }
.ps-svc-ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.ps-svc-ul li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--g-ink); line-height: 1.6; }
.ps-svc-ul li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--g-leaf); }
.ps-palette { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ps-palette a {
  display: grid; gap: 6px; text-decoration: none; background: #fff;
  border: 1px solid var(--g-line); border-radius: 10px; overflow: hidden; padding-bottom: 7px;
  transition: border-color .18s, transform .18s;
  font-size: 12px; color: var(--g-ink); text-align: center;
}
.ps-palette a:hover { border-color: var(--g-leaf); transform: translateY(-2px); }
.ps-palette img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

/* ---------- FAQ ---------- */
.ps-faq { margin-top: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ps-faq-item {
  background: #fff; border: 1px solid var(--g-line); border-radius: 14px; padding: 0 20px;
}
.ps-faq-item summary {
  cursor: pointer; list-style: none; padding: 17px 0; font-size: 14.5px; font-weight: 700; color: var(--g-ink);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.ps-faq-item summary::-webkit-details-marker { display: none; }
.ps-faq-item summary::after {
  content: ""; width: 9px; height: 9px; border-right: 2px solid var(--g-green); border-bottom: 2px solid var(--g-green);
  transform: rotate(45deg); transition: transform .2s; flex-shrink: 0; margin-top: -4px;
}
.ps-faq-item[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.ps-faq-item p { margin: 0; padding: 0 0 18px; font-size: 13.5px; line-height: 1.9; color: var(--g-muted); }

.ps-empty { background: #fff; border: 1px solid var(--g-line); border-radius: 16px; padding: 46px 40px; text-align: center; }
.ps-empty h2 { margin: 0; font-size: 22px; color: var(--g-ink); }
.ps-empty p { margin: 12px auto 0; max-width: 60ch; font-size: 14px; line-height: 1.9; color: var(--g-muted); }
.ps-empty a { color: var(--g-green); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .ps-bench { grid-template-columns: minmax(0, 1fr); }
  .ps-params { border-right: none; border-bottom: 1px solid var(--g-line); }
  .ps-list-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body .cs-float { display: none; }
  .container { width: calc(100% - 36px); }
  .ps-head { padding: 24px 0 78px; }
  .ps-head-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
  .ps-head-facts { border-left: none; border-top: 1px solid rgba(255,255,255,.16); display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ps-head-facts li { padding: 12px 6px 0 0; }
  .ps-head-facts li + li { border-top: none; }
  .ps-studio { margin-top: -48px; }
  .ps-param { padding: 22px 18px; }
  .ps-out { padding: 22px 18px; }
  .ps-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-zones { grid-template-columns: minmax(0, 1fr); }
  .ps-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-legend { grid-template-columns: minmax(0, 1fr); }
  .ps-plants-ul > li { grid-template-columns: minmax(0, 1.2fr) 54px; row-gap: 4px; }
  .ps-plants-ul .pp-spec { grid-column: 1 / -1; }
  .ps-plants-ul .pp-place { display: none; }
  .ps-faq { grid-template-columns: minmax(0, 1fr); }
  .ps-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-btn, .ps-tier, .ps-zonebar i, .ps-palette a { transition: none; }
}
