/* ============================================================
   标准体重计算器 /tool/ideal-weight
   视觉：暖纸质健康档案 + 玉色标尺
   ============================================================ */

.wgt-page {
  --paper: #f3efe5;
  --card: #fffdf8;
  --card-2: #faf5e9;
  --ink: #1c211b;
  --ink-2: #454d41;
  --mute: #7d8474;
  --line: #e2dac5;
  --line-2: #efe8d7;
  --jade: #1b7a5c;
  --jade-2: #2a9a76;
  --jade-soft: #e3f1e9;
  --clay: #a8503a;
  --clay-soft: #f8e7e0;
  --amber: #a4771d;
  --amber-soft: #f8eed5;
  --steel: #6b7d84;
  --steel-soft: #e6ecee;
  --shadow: 0 1px 2px rgba(48, 40, 22, .05), 0 16px 34px -24px rgba(48, 40, 22, .4);
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  background:
    radial-gradient(900px 380px at 78% -8%, rgba(42, 154, 118, .1), transparent 62%),
    radial-gradient(700px 320px at 4% 4%, rgba(164, 119, 29, .09), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  padding-bottom: 56px;
  overflow-x: hidden;
}

:root[data-theme="dark"] .wgt-page {
  --paper: #12140f;
  --card: #1a1d17;
  --card-2: #21251c;
  --ink: #eef1e4;
  --ink-2: #c4cab7;
  --mute: #8b927f;
  --line: #2d3326;
  --line-2: #252b1f;
  --jade: #63caa3;
  --jade-2: #82dcb9;
  --jade-soft: #1d3429;
  --clay: #e18b6f;
  --clay-soft: #3a231b;
  --amber: #ddb163;
  --amber-soft: #332a17;
  --steel: #93a6ac;
  --steel-soft: #232c2d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 20px 40px -28px rgba(0, 0, 0, .8);
  background:
    radial-gradient(900px 380px at 78% -8%, rgba(99, 202, 163, .1), transparent 62%),
    radial-gradient(700px 320px at 4% 4%, rgba(221, 177, 99, .07), transparent 60%),
    var(--paper);
}

.wgt-page * { box-sizing: border-box; }
.wgt-page h1, .wgt-page h2, .wgt-page h3 { margin: 0; font-weight: 700; }
.wgt-page p { margin: 0; }
.wgt-page a { color: inherit; text-decoration: none; }

.wgt-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ---------- 面包屑 ---------- */
.wgt-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 0;
  font-size: 12.5px;
  color: var(--mute);
  flex-wrap: wrap;
}
.wgt-crumb a:hover { color: var(--jade); }
.wgt-crumb span { opacity: .5; }
.wgt-crumb b { color: var(--ink-2); font-weight: 600; }

/* ---------- 首屏 ---------- */
.wgt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 40px;
  align-items: center;
  padding: 30px 0 34px;
}

.wgt-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: .22em;
  font-weight: 700;
  color: var(--jade);
}
.wgt-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--jade);
  border-radius: 2px;
}

.wgt-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.22;
  letter-spacing: -.02em;
  color: var(--ink);
}
.wgt-hero h1 em {
  font-style: normal;
  color: var(--jade);
  background: linear-gradient(transparent 64%, var(--jade-soft) 64%);
  padding: 0 3px;
}

.wgt-lead {
  margin-top: 16px;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-2);
}

.wgt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.wgt-tags span {
  font-size: 12px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .58);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
}
:root[data-theme="dark"] .wgt-tags span { background: rgba(255, 255, 255, .04); }

.wgt-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- 按钮 ---------- */
.wgt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.wgt-btn.primary {
  background: var(--jade);
  color: #fff;
  box-shadow: 0 8px 18px -12px var(--jade);
}
.wgt-btn.primary:hover { background: var(--jade-2); transform: translateY(-1px); }
:root[data-theme="dark"] .wgt-btn.primary { color: #10231b; }
.wgt-btn.line {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}
.wgt-btn.line:hover { border-color: var(--jade); color: var(--jade); }
.wgt-btn:active { transform: translateY(0) scale(.985); }

/* ---------- 标尺 ---------- */
.wgt-gauge {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px 12px;
  box-shadow: var(--shadow);
}
.wgt-gauge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-2);
}
.wgt-gauge-head span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .04em; }
.wgt-gauge-head em { font-style: normal; font-size: 11px; color: var(--mute); font-family: var(--serif); }
.wgt-gauge svg { display: block; width: 100%; height: auto; margin: 8px 0 2px; }

.wgt-gauge-axis { stroke: var(--line); stroke-width: 1.5; }
.wgt-g-band { stroke: none; opacity: .95; }
.wgt-g-band.norm { fill: var(--jade); opacity: .82; }
.wgt-g-band.thin { fill: var(--steel); opacity: .5; }
.wgt-g-band.over { fill: var(--amber); opacity: .62; }
.wgt-g-band.obese { fill: var(--clay); opacity: .6; }
.wgt-g-tick { stroke: var(--line); stroke-width: 1.5; stroke-linecap: round; }
.wgt-g-label { font-family: var(--sans); font-size: 13px; fill: var(--ink-2); font-weight: 600; }
.wgt-g-num { font-family: var(--serif); font-size: 11px; fill: var(--mute); }
.wgt-g-mark { transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .3s ease; }
.wgt-g-mark line { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; opacity: .35; }
.wgt-g-mark circle { fill: var(--ink); stroke: var(--card); stroke-width: 3; }

.wgt-gauge-cap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-2);
}
.wgt-gauge-cap b { font-family: var(--serif); font-size: 22px; line-height: 1; color: var(--ink); }
.wgt-gauge-cap span { font-size: 11.5px; color: var(--mute); }
.wgt-gauge-cap em {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--jade);
  margin-left: 4px;
}

/* ---------- 主体栅格 ---------- */
.wgt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  grid-template-areas: "main side";
  gap: 22px;
  align-items: start;
  margin-top: 6px;
}
.wgt-main { grid-area: main; min-width: 0; }
.wgt-side { grid-area: side; min-width: 0; position: sticky; top: 16px; }

/* ---------- 结果卡 ---------- */
.wgt-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--jade);
  border-radius: 20px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
}
.wgt-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wgt-result-label { font-size: 12px; letter-spacing: .12em; font-weight: 700; color: var(--mute); }
.wgt-chip {
  font-size: 11.5px;
  color: var(--jade);
  background: var(--jade-soft);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.wgt-result-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}
.wgt-result-num b {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.wgt-result-num small { font-size: 13px; color: var(--mute); font-weight: 600; }
.wgt-result-sub { margin-top: 2px; font-size: 11.5px; color: var(--mute); line-height: 1.6; }

.wgt-range { margin-top: 14px; border-top: 1px dashed var(--line-2); }
.wgt-range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-2);
}
.wgt-range-row span { font-size: 12.5px; color: var(--ink-2); }
.wgt-range-row span small { display: block; font-size: 10.5px; color: var(--mute); margin-top: 2px; }
.wgt-range-row b { font-family: var(--serif); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.wgt-diff {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
}
.wgt-diff-k { font-size: 12px; color: var(--ink-2); }
.wgt-diff-v { font-family: var(--serif); font-size: 16px; font-variant-numeric: tabular-nums; }
.wgt-diff.is-over { background: var(--clay-soft); border-color: transparent; }
.wgt-diff.is-over .wgt-diff-v { color: var(--clay); }
.wgt-diff.is-under { background: var(--steel-soft); border-color: transparent; }
.wgt-diff.is-under .wgt-diff-v { color: var(--steel); }
.wgt-diff.is-ok { background: var(--jade-soft); border-color: transparent; }
.wgt-diff.is-ok .wgt-diff-v { color: var(--jade); }

.wgt-bmi { margin-top: 16px; }
.wgt-bmi-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wgt-bmi-head span { font-size: 12px; color: var(--mute); }
.wgt-bmi-head b { font-family: var(--serif); font-size: 17px; font-variant-numeric: tabular-nums; }
.wgt-bmi-track {
  position: relative;
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: visible;
  background: var(--line-2);
}
.wgt-bmi-track i { display: block; height: 100%; }
.wgt-bmi-track i.thin { flex: 0 0 17.5%; background: var(--steel); opacity: .45; border-radius: 999px 0 0 999px; }
.wgt-bmi-track i.norm { flex: 0 0 27.5%; background: var(--jade); opacity: .85; }
.wgt-bmi-track i.over { flex: 0 0 20%; background: var(--amber); opacity: .8; }
.wgt-bmi-track i.obese { flex: 0 0 35%; background: var(--clay); opacity: .75; border-radius: 0 999px 999px 0; }
.wgt-bmi-mark {
  position: absolute;
  top: -4px;
  left: 0;
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--card);
  transform: translateX(-50%);
  transition: left .38s cubic-bezier(.22, 1, .36, 1);
}
.wgt-bmi-axis { position: relative; height: 15px; margin-top: 7px; }
.wgt-bmi-axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.wgt-bmi-axis span:first-child { transform: none; }
.wgt-bmi-axis span:last-child { transform: translateX(-100%); }

.wgt-verdict {
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 13px;
  background: var(--card-2);
  border: 1px dashed var(--line);
}
.wgt-verdict-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--ink-2);
}
.wgt-verdict p { margin-top: 7px; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }
.wgt-verdict.is-ok { background: var(--jade-soft); border-color: transparent; }
.wgt-verdict.is-ok .wgt-verdict-tag { background: var(--jade); color: #fff; }
:root[data-theme="dark"] .wgt-verdict.is-ok .wgt-verdict-tag { color: #10231b; }
.wgt-verdict.is-warn { background: var(--amber-soft); border-color: transparent; }
.wgt-verdict.is-warn .wgt-verdict-tag { background: var(--amber); color: #fff; }
:root[data-theme="dark"] .wgt-verdict.is-warn .wgt-verdict-tag { color: #1c1608; }
.wgt-verdict.is-danger { background: var(--clay-soft); border-color: transparent; }
.wgt-verdict.is-danger .wgt-verdict-tag { background: var(--clay); color: #fff; }
:root[data-theme="dark"] .wgt-verdict.is-danger .wgt-verdict-tag { color: #24120c; }

.wgt-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.wgt-result-actions .wgt-btn { height: 40px; padding: 0 10px; font-size: 13px; }
.wgt-privacy { margin-top: 10px; font-size: 10.5px; color: var(--mute); text-align: center; }

/* ---------- 卡片 ---------- */
.wgt-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  scroll-margin-top: 18px;
}
.wgt-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px 14px;
  border-bottom: 1px dashed var(--line-2);
}
.wgt-step {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--jade);
  background: var(--card-2);
}
.wgt-card-head h2 { font-size: 17px; letter-spacing: -.01em; }
.wgt-card-head p { margin-top: 4px; font-size: 12.5px; color: var(--mute); line-height: 1.6; }
.wgt-card-body { padding: 20px 22px 22px; }

/* ---------- 双列输入 ---------- */
.wgt-duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 28px;
}
.wgt-duo-col { min-width: 0; }
.wgt-duo-col + .wgt-duo-col {
  padding-left: 28px;
  border-left: 1px dashed var(--line-2);
}
.wgt-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--mute);
}
.wgt-col-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade);
}

/* ---------- 标签切换 ---------- */
.wgt-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.wgt-tabs::-webkit-scrollbar { display: none; }
.wgt-tabs button {
  flex: 1 0 auto;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--mute);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.wgt-tabs button:hover { color: var(--ink); }
.wgt-tabs button.on {
  background: var(--card);
  color: var(--jade);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(48, 40, 22, .1);
}
.wgt-tabs button:focus-visible { outline: 2px solid var(--jade); outline-offset: 1px; }
.wgt-pane { padding-top: 18px; animation: wgtPaneIn .24s ease both; }
.wgt-pane[hidden] { display: none; }
.wgt-pane-tip { margin-bottom: 10px; font-size: 12px; color: var(--mute); }
@keyframes wgtPaneIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 表单 ---------- */
.wgt-field { margin-bottom: 20px; }
.wgt-field:last-child { margin-bottom: 0; }
.wgt-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 9px;
}
.wgt-label em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--mute); margin-left: 6px; }

.wgt-seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
}
.wgt-seg button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--mute);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .16s ease;
}
.wgt-seg button:hover { color: var(--ink); }
.wgt-seg button.on {
  background: var(--card);
  color: var(--jade);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(48, 40, 22, .1);
}
.wgt-seg.small button { padding: 6px 13px; font-size: 12.5px; }

.wgt-height-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: center;
}
.wgt-pace { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wgt-pace > span { font-size: 12px; color: var(--mute); }

.wgt-unit {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-2);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.wgt-unit:focus-within { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(42, 154, 118, .12); }
.wgt-unit.wide { max-width: 220px; }
.wgt-unit input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.wgt-unit input::-webkit-outer-spin-button,
.wgt-unit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wgt-unit span { font-size: 11.5px; color: var(--mute); flex: 0 0 auto; }

.wgt-height-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}
.wgt-height-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--card);
  border: 4px solid var(--jade);
  box-shadow: 0 2px 6px rgba(27, 122, 92, .3);
  cursor: grab;
}
.wgt-height-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 4px solid var(--jade);
  box-shadow: 0 2px 6px rgba(27, 122, 92, .3);
}

.wgt-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.wgt-quick button {
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--mute);
  font-family: inherit;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .16s ease;
}
.wgt-quick button:hover { border-color: var(--jade); color: var(--jade); background: var(--jade-soft); border-style: solid; }

.wgt-hint { margin-top: 8px; font-size: 11.5px; color: var(--mute); line-height: 1.65; }
.wgt-err { font-size: 12px; color: var(--clay); margin-top: 7px; line-height: 1.5; }
.wgt-err:empty { display: none; }
.wgt-unit.is-invalid { border-color: var(--clay); }

.wgt-target-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wgt-mini {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all .16s ease;
}
.wgt-mini:hover { border-color: var(--jade); color: var(--jade); background: var(--jade-soft); }

/* ---------- 目标输出 ---------- */
.wgt-goalout {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
}
.wgt-goalout-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}
.wgt-goalout-row span { font-size: 12.5px; color: var(--ink-2); }
.wgt-goalout-row b { font-family: var(--serif); font-size: 16px; font-variant-numeric: tabular-nums; }
.wgt-goalout-note { margin-top: 8px; font-size: 11.5px; color: var(--mute); line-height: 1.7; }
.wgt-goalout-note.is-warn { color: var(--clay); }

/* ---------- 公式对照 ---------- */
.wgt-formulas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.wgt-formula {
  padding: 14px;
  border-radius: 15px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  transition: border-color .2s ease, transform .2s ease;
}
.wgt-formula.is-best { border-color: var(--jade); }
.wgt-formula-head { display: flex; flex-direction: column; gap: 2px; }
.wgt-formula-head b { font-size: 13.5px; }
.wgt-formula-head em { font-style: normal; font-size: 10.5px; color: var(--mute); }
.wgt-formula-val {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 8px 0 8px;
  font-family: var(--serif);
}
.wgt-formula-val span { font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.wgt-formula-val small { font-size: 11px; color: var(--mute); }
.wgt-formula-bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.wgt-formula-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--jade), var(--jade-2));
  transition: width .45s cubic-bezier(.22, 1, .36, 1);
}
.wgt-formula-foot { margin-top: 7px; font-size: 11px; color: var(--mute); }
.wgt-formula-foot.is-near { color: var(--jade); font-weight: 600; }
.wgt-note {
  margin-top: 14px;
  padding-left: 11px;
  border-left: 2px solid var(--line);
  font-size: 12px;
  color: var(--mute);
  line-height: 1.8;
}

/* ---------- 表格 ---------- */
.wgt-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}
.wgt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wgt-table th {
  background: var(--card-2);
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
  white-space: nowrap;
}
.wgt-table th span { display: block; font-size: 10px; font-weight: 400; opacity: .8; margin-top: 2px; }
.wgt-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wgt-table tbody tr { transition: background .15s ease; }
.wgt-table tbody tr:hover { background: var(--jade-soft); }
#wgtRefBody tr { cursor: pointer; }
#wgtRefBody tr.is-active { background: var(--jade-soft); }
#wgtRefBody tr.is-active td { color: var(--jade); font-weight: 700; }
.wgt-table td.hl { color: var(--ink); font-weight: 600; }
.wgt-lv { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.wgt-lv.ok { background: var(--jade-soft); color: var(--jade); }
.wgt-lv.warn { background: var(--amber-soft); color: var(--amber); }
.wgt-lv.danger { background: var(--clay-soft); color: var(--clay); }
.wgt-lv.info { background: var(--steel-soft); color: var(--steel); }

/* ---------- 批量 ---------- */
.wgt-textarea {
  display: block;
  width: 100%;
  min-height: 118px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.75;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.wgt-textarea:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(42, 154, 118, .12); }
.wgt-textarea::placeholder { color: var(--mute); opacity: .75; }
.wgt-batch-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.wgt-batch-actions .wgt-btn { height: 38px; padding: 0 16px; font-size: 13px; }
.wgt-batch-msg { margin-top: 12px; font-size: 12.5px; line-height: 1.7; color: var(--mute); }
.wgt-batch-msg:empty { display: none; }
.wgt-batch-msg.is-ok { color: var(--jade); }
.wgt-batch-msg.is-err { color: var(--clay); }
.wgt-batch-msg ul { margin: 6px 0 0; padding-left: 16px; }
.wgt-batch-msg li { margin-top: 2px; }
#wgtBatchWrap { margin-top: 14px; }
#wgtBatchWrap table { min-width: 720px; }

/* ---------- FAQ ---------- */
.wgt-details { border-bottom: 1px dashed var(--line-2); }
.wgt-details:last-child { border-bottom: 0; }
.wgt-details summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.wgt-details summary::-webkit-details-marker { display: none; }
.wgt-details summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  color: var(--jade);
  transition: transform .2s ease, background .2s ease;
}
.wgt-details[open] summary::before { content: "−"; background: var(--jade-soft); border-color: transparent; }
.wgt-details p {
  padding: 0 0 14px 30px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-2);
}
.wgt-details strong { color: var(--ink); }

/* ---------- 页脚区块 ---------- */
.wgt-foot-note {
  margin-top: 6px;
  padding: 15px 18px;
  border-radius: 13px;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}
.wgt-foot-note strong { color: var(--ink); }

.wgt-comments {
  margin-top: 30px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.wgt-related { margin-top: 26px; }
.wgt-related h2 { font-size: 16px; margin-bottom: 12px; }
.wgt-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.wgt-related-grid a {
  display: block;
  padding: 15px 16px;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform .18s ease, border-color .18s ease;
}
.wgt-related-grid a:hover { transform: translateY(-2px); border-color: var(--jade); }
.wgt-related-grid b { display: block; font-size: 13.5px; }
.wgt-related-grid small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--mute); line-height: 1.6; }

.wgt-page ~ .back-to-top {
  background: var(--jade);
  border-color: var(--jade);
  color: #fff;
  width: 42px;
  height: 42px;
  font-size: 17px;
}
.wgt-page ~ .back-to-top:hover { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .wgt-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 940px) {
  .wgt-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .wgt-gauge { max-width: 300px; }
  .wgt-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "side" "main";
    gap: 18px;
  }
  .wgt-side { position: static; }
  .wgt-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .wgt-wrap { padding: 0 16px 48px; }
  .wgt-hero { padding: 22px 0 26px; }
  .wgt-hero h1 { font-size: 28px; }
  .wgt-lead { font-size: 14px; }
  .wgt-gauge { display: none; }
  .wgt-card-head { padding: 15px 16px 12px; gap: 11px; }
  .wgt-card-body { padding: 16px; }
  .wgt-duo { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wgt-duo-col + .wgt-duo-col {
    padding: 18px 0 0;
    margin-top: 2px;
    border-left: 0;
    border-top: 1px dashed var(--line-2);
  }
  .wgt-tabs button { flex: 1 0 auto; padding: 8px 12px; font-size: 12.5px; }
  .wgt-result { padding: 18px 16px 16px; }
  .wgt-result-num b { font-size: 46px; }
  .wgt-formulas { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .wgt-formula {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head val" "bar bar" "foot foot";
    gap: 7px 10px;
    align-items: center;
    padding: 12px 13px;
  }
  .wgt-formula-head { grid-area: head; }
  .wgt-formula-val { grid-area: val; margin: 0; }
  .wgt-formula-val span { font-size: 24px; }
  .wgt-formula-bar { grid-area: bar; }
  .wgt-formula-foot { grid-area: foot; margin-top: 0; }
  .wgt-height-row { grid-template-columns: minmax(0, 1fr) 118px; gap: 12px; }
  .wgt-seg button { padding: 7px 13px; }
  .wgt-details p { padding-left: 0; }
  .wgt-comments { padding: 16px; }
  .wgt-foot-note { font-size: 12px; }
}

@media (max-width: 420px) {
  .wgt-hero h1 { font-size: 25px; }
  .wgt-hero-actions .wgt-btn { flex: 1 1 100%; }
  .wgt-related-grid { grid-template-columns: minmax(0, 1fr); }
  .wgt-bmi-axis span { font-size: 9.5px; }
  .wgt-tabs { gap: 3px; padding: 3px; }
  .wgt-tabs button { padding: 8px 8px; font-size: 11.5px; letter-spacing: -.01em; }
}
