/* ============================================================
   GymCalc 瘦体重(LBM)计算器 专用样式表 lbm.css
   仅 /lbm 页面加载（style.css → lbm.css）
   依赖 style.css 中的 CSS 变量与导航/页脚基础样式
   ============================================================ */

.lbm-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 1rem) 1.5rem 3rem;
}

/* ---------- 页头（居中，与其他工具页一致；无额外 padding） ---------- */
.lbm-header {
  padding: 0;
  text-align: center;
  margin: 0 0 2rem;
}
.lbm-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.lbm-header p {
  color: var(--text-light);
  line-height: 1.85;
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- 双栏布局 ---------- */
.lbm-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .lbm-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- 区块标题 ---------- */
.lbm-form-title,
.lbm-result-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1.25rem;
}

/* ---------- 表单 ---------- */
.lbm-field { margin-bottom: 1.1rem; }
.lbm-field > label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}
.lbm-field > label a { color: var(--accent); text-decoration: none; font-weight: 500; }
.lbm-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
}
.lbm-input:focus { outline: none; border-color: var(--accent); }
.lbm-input:disabled { background: #f8fafc; color: var(--text-light); }

.lbm-seg { display: flex; gap: 0.5rem; }
.lbm-seg button {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.lbm-seg button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: #eff6ff;
  font-weight: 600;
}

.lbm-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0.25rem 0 0.75rem;
  cursor: pointer;
  line-height: 1.6;
}
.lbm-check input { margin-top: 0.2rem; accent-color: var(--accent); }

.lbm-estimate-hint {
  font-size: 0.85rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.lbm-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin: 0.25rem 0 0.75rem;
  line-height: 1.6;
}

.lbm-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.lbm-btn:hover { background: #2563eb; }

/* ---------- 结果区 ---------- */
.lbm-sample-note {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: #ef4444;
  margin-bottom: 1.1rem;
}

.lbm-result-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-bottom: 0.5rem;
}
.lbm-result-big { font-size: 2.6rem; font-weight: 800; color: var(--primary); line-height: 1.1; letter-spacing: -0.02em; }
.lbm-result-big small { font-size: 1rem; font-weight: 500; color: var(--text-light); margin-left: 0.25rem; }
.lbm-rating { font-size: 1rem; font-weight: 700; }
.lbm-rating.good { color: #059669; }
.lbm-rating.mid { color: #d97706; }
.lbm-rating.low { color: #dc2626; }

/* 组成比例条：蓝色=瘦体重，琥珀=脂肪 */
.lbm-bar {
  height: 12px;
  border-radius: 999px;
  background: #fde68a;
  overflow: hidden;
  margin: 0.75rem 0 0.4rem;
}
.lbm-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #3b82f6;
  transition: width 0.4s ease;
}
.lbm-bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
}
.lbm-bar-legend b { color: var(--text); font-weight: 600; }
.lbm-bar-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.35rem; }
.dot-blue { background: #3b82f6; }
.dot-amber { background: #f59e0b; }

/* 数据行：标签左、数值右，细虚线分隔（编辑风） */
.lbm-rows { margin: 0 0 1.25rem; }
.lbm-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}
.lbm-row:last-child { border-bottom: none; }
.lbm-row .k { color: var(--text-light); }
.lbm-row .v { font-weight: 700; color: var(--primary); }

.lbm-note { font-size: 0.85rem; color: var(--text-light); line-height: 1.75; margin: 0 0 0.5rem; }
.lbm-note-sub { font-size: 0.8rem; }

.lbm-links {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 2;
}
.lbm-links a { color: var(--accent); text-decoration: none; font-weight: 500; }
.lbm-links a:hover { text-decoration: underline; }

/* ---------- 使用说明 ---------- */
.lbm-howto { max-width: 860px; margin: 2.5rem 0 0; }
.lbm-howto h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.85rem;
}
.lbm-howto p { color: var(--text-light); line-height: 1.85; margin-bottom: 0.9rem; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .lbm-wrap { padding: calc(var(--nav-height) + 1.25rem) 1rem 2.5rem; }
  .lbm-header h1 { font-size: 1.45rem; }
  .lbm-result-big { font-size: 2.2rem; }
}
