/* 幽门螺杆菌疗程规划 · 深青绿主题 */
:root {
  --hp-a: #115e59;
  --hp-a2: #14b8a6;
  --hp-a-soft: #ccfbf1;
  --hp-bg: #f0f7f6;
  --hp-card: #ffffff;
  --hp-card2: #f7fbfa;
  --hp-txt: #0f2b28;
  --hp-txt2: #45615d;
  --hp-txt3: #7b9490;
  --hp-line: #d3e5e1;
  --hp-line2: #e9f3f1;
  --hp-ok: #0f766e;
  --hp-warn: #b45309;
  --hp-bad: #b91c1c;
  --hp-shadow: 0 1px 2px rgba(17, 94, 89, .06), 0 14px 34px -18px rgba(17, 94, 89, .30);
  --hp-r: 16px;
  --hp-r2: 11px;
}

[data-theme='dark'] .hp {
  --hp-a: #2dd4bf;
  --hp-a2: #5eead4;
  --hp-a-soft: #0a3330;
  --hp-bg: #0a1615;
  --hp-card: #122422;
  --hp-card2: #0f1d1c;
  --hp-txt: #dff5f1;
  --hp-txt2: #a7c7c2;
  --hp-txt3: #789691;
  --hp-line: #21413d;
  --hp-line2: #1a332f;
  --hp-ok: #2dd4bf;
  --hp-warn: #fbbf24;
  --hp-bad: #f87171;
  --hp-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 14px 34px -18px rgba(0, 0, 0, .7);
  --hp-r: 16px;
  --hp-r2: 11px;
}

.hp { background: var(--hp-bg); color: var(--hp-txt); padding: 26px 0 46px; }
.hp-inner { width: min(1140px, calc(100% - 44px)); max-width: none; margin: 0 auto; }

/* ---------- Hero ---------- */
.hp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 26px; align-items: center;
  padding: 30px 32px 28px; border-radius: 22px;
  background:
    radial-gradient(780px 320px at 86% 8%, rgba(20, 184, 166, .18), transparent 66%),
    linear-gradient(135deg, var(--hp-card) 0%, var(--hp-card2) 100%);
  border: 1px solid var(--hp-line); box-shadow: var(--hp-shadow);
}
.hp-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .4px;
  color: var(--hp-a); background: var(--hp-a-soft);
  border: 1px solid color-mix(in srgb, var(--hp-a) 22%, transparent);
  padding: 5px 11px; border-radius: 999px;
}
.hp-hero h1 { margin: 14px 0 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.24; letter-spacing: -.6px; font-weight: 800; }
.hp-hero h1 em {
  font-style: normal; display: inline-block; margin-top: 4px; color: var(--hp-a);
  background: linear-gradient(180deg, transparent 62%, rgba(20, 184, 166, .26) 62%); padding: 0 2px;
}
.hp-sub { margin: 12px 0 0; font-size: 14.5px; line-height: 1.85; color: var(--hp-txt2); max-width: 66ch; }
.hp-sub b { color: var(--hp-txt); font-weight: 700; }
.hp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hp-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 5px 10px; border-radius: 8px; background: var(--hp-card2); border: 1px solid var(--hp-line); color: var(--hp-txt2); }
.hp-tag i { color: var(--hp-a); font-style: normal; font-weight: 800; }

/* 纯 CSS 日历 + 胶囊插画 */
.hp-hero-art { position: relative; height: 232px; }
.hp-cal-art {
  position: absolute; left: 6px; top: 16px; width: 186px; padding: 10px 12px 12px;
  background: var(--hp-card); border: 1px solid var(--hp-line); border-radius: 14px;
  box-shadow: var(--hp-shadow); transform: rotate(-4deg);
}
.hp-cal-head { display: block; font-size: 22px; font-weight: 800; color: var(--hp-a); text-align: center; padding-bottom: 6px; }
.hp-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hp-cal-grid s { display: block; height: 14px; border-radius: 4px; background: var(--hp-line2); }
.hp-cal-grid s.on { background: var(--hp-a2); }
.hp-cap {
  position: absolute; right: 6px; top: 148px; width: 128px; height: 42px;
  transform: rotate(-18deg);
}
.hp-cap-top { position: absolute; left: 0; top: 0; width: 64px; height: 42px; border-radius: 21px 0 0 21px; background: linear-gradient(180deg, #5eead4, #14b8a6); }
.hp-cap-body { position: absolute; right: 0; top: 0; width: 64px; height: 42px; border-radius: 0 21px 21px 0; background: linear-gradient(180deg, #f0fdfa, #a7f3d0); border: 1px solid var(--hp-line); box-sizing: border-box; }
.hp-chip { position: absolute; font-size: 11.5px; padding: 5px 10px; border-radius: 8px; background: var(--hp-card); border: 1px solid var(--hp-line); color: var(--hp-txt2); box-shadow: var(--hp-shadow); white-space: nowrap; }
.hp-chip b { color: var(--hp-a); }
.hp-chip.c1 { right: 0; top: 82px; animation: hpFloat 4s ease-in-out infinite; }
.hp-chip.c2 { left: 0; bottom: 6px; animation: hpFloat 4s ease-in-out .7s infinite; }
@keyframes hpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- 免责条 ---------- */
.hp-disclaimer {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding: 13px 20px; border-radius: 12px;
  background: #fef3c7; border: 1px solid #f59e0b;
  color: #7c2d12; font-size: 14px; font-weight: 600; line-height: 1.6;
  box-shadow: 0 8px 20px -16px rgba(180, 83, 9, .5);
}
.hp-disclaimer strong { color: #b45309; font-size: 13px; letter-spacing: .3px; }
[data-theme='dark'] .hp-disclaimer {
  background: #3a2a10; border-color: #d97706; color: #fde68a;
  box-shadow: 0 8px 20px -16px rgba(0, 0, 0, .7);
}
[data-theme='dark'] .hp-disclaimer strong { color: #fbbf24; }

.hp-card { background: var(--hp-card); border: 1px solid var(--hp-line); border-radius: var(--hp-r); box-shadow: var(--hp-shadow); padding: 20px 22px 22px; margin-top: 18px; }
.hp-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hp-card-h h2 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; display: flex; align-items: center; gap: 9px; }
.hp-no { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--hp-a); padding: 3px 7px; border-radius: 6px; }
[data-theme='dark'] .hp .hp-no { color: #06211f; }
.hp-card-h small { font-size: 12px; color: var(--hp-txt3); }

/* ---------- 步骤向导 ---------- */
.hp-stepper { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.hp-st {
  flex: 1 1 auto; min-width: 130px; text-align: center;
  font-size: 12.5px; font-weight: 700; color: var(--hp-txt3);
  padding: 9px 10px; border-radius: 10px; background: var(--hp-line2);
  border: 1px solid transparent;
}
.hp-st.on { color: var(--hp-a); background: var(--hp-a-soft); border-color: color-mix(in srgb, var(--hp-a) 35%, transparent); }
.hp-step[hidden] { display: none; }
.hp-wizard-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 6px; }

.hp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hp-field { margin-bottom: 6px; }
.hp-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.hp-label label { font-size: 13.5px; font-weight: 600; color: var(--hp-txt); }
.hp-label label b { color: var(--hp-bad); }
.hp-hint { font-size: 11.5px; color: var(--hp-txt3); }
.hp-numbox { display: flex; align-items: center; border: 1px solid var(--hp-line); border-radius: var(--hp-r2); background: var(--hp-card2); overflow: hidden; }
.hp-numbox input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--hp-txt); font-size: 15px; font-weight: 700; padding: 9px 10px; outline: none; }
.hp-numbox span { padding: 0 10px; font-size: 12px; color: var(--hp-txt3); background: var(--hp-line2); align-self: stretch; display: flex; align-items: center; }
.hp-control { border: 1px solid var(--hp-line); border-radius: var(--hp-r2); background: var(--hp-card2); }
.hp-control select {
  width: 100%; border: 0; background: transparent; color: var(--hp-txt); font-size: 13.5px; padding: 10px 11px; outline: none; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--hp-txt3) 50%), linear-gradient(135deg, var(--hp-txt3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.hp-err { display: none; margin-top: 6px; font-size: 12px; color: var(--hp-bad); }
.hp-err.on { display: block; }
.hp-field.bad .hp-numbox, .hp-field.bad .hp-control { border-color: var(--hp-bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp-bad) 14%, transparent); }

.hp-tip { margin: 12px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--hp-txt3); background: var(--hp-line2); border-left: 3px solid var(--hp-a2); padding: 9px 12px; border-radius: 0 8px 8px 0; }
.hp-tip code { font-size: 12px; background: var(--hp-card); padding: 1px 5px; border-radius: 4px; color: var(--hp-a); }
.hp-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hp-actions.tight { margin-top: 12px; }
.hp-btn { border: 1px solid var(--hp-line); background: var(--hp-card); color: var(--hp-txt); font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 10px; cursor: pointer; transition: transform .12s, box-shadow .18s, background .18s; }
.hp-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .5); }
.hp-btn.primary { background: var(--hp-a); border-color: var(--hp-a); color: #fff; }
[data-theme='dark'] .hp .hp-btn.primary { color: #06211f; }
.hp-btn.ghost { background: transparent; color: var(--hp-txt2); }
.hp-msg { margin-top: 12px; font-size: 12.5px; color: var(--hp-txt3); }

/* ---------- KPI ---------- */
.hp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--hp-line2); border: 1px solid var(--hp-line); border-radius: 12px; overflow: hidden; }
.hp-kpi { background: var(--hp-card); padding: 14px 16px; }
.hp-kpi span { display: block; font-size: 11.5px; color: var(--hp-txt3); }
.hp-kpi b { display: inline-block; font-size: 20px; font-weight: 800; color: var(--hp-a); margin-top: 2px; letter-spacing: -.4px; }
.hp-kpi small { font-size: 11px; color: var(--hp-txt3); margin-left: 3px; }
.hp-progress-wrap { margin-top: 16px; }
.hp-progress-track { height: 12px; border-radius: 999px; background: var(--hp-line2); overflow: hidden; }
.hp-progress-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--hp-a2), var(--hp-a)); transition: width .45s ease; }
.hp-progress-txt { margin-top: 8px; font-size: 12.5px; color: var(--hp-txt2); }

/* ---------- 14 天日历 ---------- */
.hp-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.hp-day {
  border: 1px solid var(--hp-line); border-radius: 12px; background: var(--hp-card2);
  padding: 9px 9px 10px; position: relative; min-height: 112px;
}
.hp-day.today { border-color: var(--hp-a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp-a) 16%, transparent); }
.hp-day.past { opacity: .72; }
.hp-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin-bottom: 6px; }
.hp-day-head b { font-size: 15px; font-weight: 800; color: var(--hp-txt); }
.hp-day-head small { font-size: 10px; color: var(--hp-txt3); }
.hp-day-date { display: block; font-size: 10px; color: var(--hp-txt3); margin-bottom: 6px; }
.hp-slot { display: flex; align-items: center; gap: 5px; font-size: 9.5px; line-height: 1.5; color: var(--hp-txt2); margin-bottom: 3px; }
.hp-slot i { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--hp-a2); }
.hp-slot.after i { background: var(--hp-txt3); }
.hp-slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--hp-txt3); }
.hp-cal-legend i.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.hp-cal-legend .before { background: var(--hp-a2); }
.hp-cal-legend .after { background: var(--hp-txt3); }
.hp-cal-legend .done { background: var(--hp-ok); }
.hp-cal-legend .today { background: var(--hp-a); box-shadow: 0 0 0 2px color-mix(in srgb, var(--hp-a) 25%, transparent); }

/* ---------- 复查时间轴 ---------- */
.hp-timeline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 16px; }
.hp-timeline::before { content: ''; position: absolute; left: 4%; right: 4%; top: 30px; height: 3px; border-radius: 999px; background: var(--hp-line2); }
.hp-node { position: relative; text-align: center; padding-top: 30px; }
.hp-node::before { content: ''; position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--hp-a2); border: 3px solid var(--hp-card); box-shadow: 0 0 0 1px var(--hp-line); z-index: 1; }
.hp-node.key::before { background: var(--hp-a); }
.hp-node b { display: block; font-size: 13px; color: var(--hp-txt); }
.hp-node small { display: block; font-size: 11px; color: var(--hp-txt3); margin-top: 3px; line-height: 1.6; }
.hp-node em { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: var(--hp-a); margin-top: 5px; }

/* ---------- 方案对比 ---------- */
.hp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hp-plan { border: 1.5px solid var(--hp-line); border-radius: 14px; background: var(--hp-card2); padding: 16px; position: relative; }
.hp-plan.rec { border-color: var(--hp-a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp-a) 16%, transparent); background: var(--hp-card); }
.hp-plan-tag { position: absolute; right: 12px; top: -10px; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--hp-a); padding: 3px 9px; border-radius: 999px; }
[data-theme='dark'] .hp .hp-plan-tag { color: #06211f; }
.hp-plan h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--hp-txt); }
.hp-plan h3 span { display: block; font-size: 11.5px; color: var(--hp-txt3); font-weight: 500; margin-top: 3px; }
.hp-plan dl { margin: 10px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 12.5px; }
.hp-plan dt { color: var(--hp-txt3); }
.hp-plan dd { margin: 0; text-align: right; font-weight: 600; color: var(--hp-txt); }
.hp-plan-pro { margin-top: 10px; font-size: 11.5px; line-height: 1.7; color: var(--hp-txt3); }
.hp-plan-pro b { color: var(--hp-ok); }
.hp-plan-pick { margin-top: 12px; width: 100%; border: 0; border-radius: 9px; padding: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; background: var(--hp-line2); color: var(--hp-txt2); }
.hp-plan.rec .hp-plan-pick { background: var(--hp-a); color: #fff; }
[data-theme='dark'] .hp .hp-plan.rec .hp-plan-pick { color: #06211f; }

/* ---------- 建议 / 红旗 ---------- */
.hp-advice h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.hp-advice ul { margin: 0; padding-left: 18px; }
.hp-advice li { font-size: 12.5px; line-height: 1.8; color: var(--hp-txt2); margin-bottom: 4px; }
.hp-risk { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--hp-warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--hp-warn) 35%, transparent); font-size: 12.5px; line-height: 1.7; color: var(--hp-txt2); }
.hp-risk strong { color: var(--hp-warn); margin-right: 6px; }
.hp-redflag { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, #dc2626 9%, transparent); border: 1.5px solid color-mix(in srgb, #dc2626 42%, transparent); }
[data-theme='dark'] .hp .hp-redflag { background: color-mix(in srgb, #f87171 10%, transparent); border-color: color-mix(in srgb, #f87171 45%, transparent); }
.hp-redflag h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 800; color: #b91c1c; }
[data-theme='dark'] .hp .hp-redflag h3 { color: #fca5a5; }
.hp-redflag p { margin: 0 0 8px; font-size: 12.5px; color: var(--hp-txt2); line-height: 1.7; }
.hp-redflag ul { margin: 0; padding-left: 18px; }
.hp-redflag li { font-size: 12.5px; line-height: 1.8; color: var(--hp-txt); }

/* ---------- 表格 / 步骤 / 批量 / 历史 ---------- */
.hp-table-wrap { overflow-x: auto; border: 1px solid var(--hp-line); border-radius: 12px; }
.hp-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
.hp-table th, .hp-table td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--hp-line2); }
.hp-table th { background: var(--hp-line2); font-size: 12px; color: var(--hp-txt2); font-weight: 700; }
.hp-table td:last-child { color: var(--hp-txt3); font-size: 12px; }
.hp-table tr:last-child td { border-bottom: 0; }
.hp-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hp-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 13px; line-height: 1.8; color: var(--hp-txt2); }
.hp-steps li b { color: var(--hp-txt); }
.hp-steps li em { display: block; font-style: normal; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--hp-a); margin-top: 3px; }
.hp-textarea { width: 100%; min-height: 116px; resize: vertical; border: 1px solid var(--hp-line); border-radius: 12px; background: var(--hp-card2); color: var(--hp-txt); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.7; padding: 12px; }
.hp-history { display: flex; flex-direction: column; gap: 8px; }
.hp-hist-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--hp-line); border-radius: 10px; padding: 10px 12px; background: var(--hp-card2); font-size: 12.5px; }
.hp-hist-item button { border: 0; background: var(--hp-a-soft); color: var(--hp-a); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.hp-empty { font-size: 12.5px; color: var(--hp-txt3); margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hp-hero { grid-template-columns: 1fr; }
  .hp-hero-art { display: none; }
  .hp-calendar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-plans { grid-template-columns: 1fr; }
  .hp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .hp-inner { width: calc(100% - 28px); }
  .hp-hero { padding: 22px 18px; border-radius: 16px; }
  .hp-card { padding: 16px 16px 18px; }
  .hp-grid2 { grid-template-columns: 1fr; }
  .hp-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-timeline { grid-template-columns: 1fr; gap: 6px; padding-top: 0; }
  .hp-timeline::before { left: 14px; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; }
  .hp-node { text-align: left; padding: 8px 0 8px 40px; }
  .hp-node::before { left: 14px; top: 50%; transform: translate(-50%, -50%); }
  .hp-actions .hp-btn { flex: 1 1 44%; }
}

/* ---------- 打印 ---------- */
@media print {
  .hp-actions, .hp-wizard-actions, .hp-textarea, .hp-history, .hp-stepper, .tsk-crumb-bar { display: none !important; }
  .hp { padding: 0; background: #fff; }
  .hp-card { box-shadow: none; border-color: #ddd; break-inside: avoid; margin-top: 10px; }
  .hp-hero { box-shadow: none; }
  .hp-day { break-inside: avoid; }
}

/* ---------- 全局对齐：面包屑 / 内容 / 底部区块统一 ---------- */
.tsk-crumb-bar-in { width: min(1140px, calc(100% - 44px)) !important; max-width: none !important; margin: 0 auto !important; padding: 11px 0 !important; }
.tsk-crumb { font-size: 13px; }
@media (max-width: 700px) {
  .tsk-crumb-bar-in { width: calc(100% - 28px) !important; padding: 9px 0 !important; }
}
