:root {
  --teal: #2e9e8f;
  --teal-d: #237f74;
  --teal-soft: #eaf6f3;
  --ink: #16262c;
  --ink-2: #4c6067;
  --ink-3: #7c8e94;
  --ink-deep: #1f3a44;
  --page: #f4f8f6;
  --paper: #ffffff;
  --raised: #edf5f2;
  --line: rgba(22, 38, 44, 0.09);
  --line-2: rgba(22, 38, 44, 0.06);
  --card-border: rgba(35, 127, 116, 0.13);
  --orange: #f2994a;
  --orange-ink: #a2621f;
  --orange-soft: #fff1e3;
  --blue: #5b8ff9;
  --blue-soft: rgba(91, 143, 249, 0.11);
  --green: #56a77a;
  --green-soft: rgba(86, 167, 122, 0.11);
  --rose: #df8e9e;
  --rose-soft: rgba(223, 142, 158, 0.13);
  --gray: #94a9ae;
  --gray-soft: rgba(148, 169, 174, 0.12);
  --danger: #c0553f;
  --danger-soft: #fdf0ec;
  --radius-card: 16px;
  --radius-panel: 20px;
  --radius-ctl: 10px;
  --shadow-card: 0 1px 2px rgba(16, 32, 38, 0.04), 0 10px 26px rgba(16, 32, 38, 0.045);
  --shadow-float: 0 12px 32px rgba(16, 32, 38, 0.1);
  --page-bg:
    radial-gradient(1100px 520px at 8% -12%, rgba(46, 158, 143, 0.13), transparent 62%),
    radial-gradient(820px 460px at 102% -4%, rgba(242, 153, 74, 0.08), transparent 58%),
    linear-gradient(180deg, #f3f8f6 0%, #f6f8f7 48%, #f8f5f1 100%);
  --surface-grad: linear-gradient(180deg, #ffffff 0%, #fcfefd 100%);
  --accent-grad: linear-gradient(135deg, #2fa596 0%, #237f74 100%);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .32;
  background-image: radial-gradient(rgba(22, 38, 44, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

img { display: block; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 58px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 9px; }

.brand-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--teal-soft); padding: 3px; }

.brand-name { font-size: 14px; font-weight: 650; letter-spacing: .2px; color: var(--ink); }

.ro-badge {
  padding: 1px 8px;
  border: 1px solid #cfe7df;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--teal-d);
  background: rgba(234, 246, 243, 0.72);
}

.head-meta { display: flex; align-items: center; gap: 10px; }

.cutoff { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.btn-exit {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-grad);
  color: var(--ink-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.btn-exit:hover { border-color: #cfe3de; color: var(--ink); background: var(--paper); }

.site-main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 22px 72px;
}

.view[hidden] { display: none; }

/* ---------- S1 访问码门 ---------- */
.gate { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 9vh; }

.gate-card {
  width: 100%;
  max-width: 470px;
  padding: 32px 30px 24px;
  background: var(--surface-grad);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.gate-hero { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 24px; }

.gate-hero img { width: 52px; height: 52px; border-radius: 14px; background: var(--teal-soft); padding: 4px; }

.gate-hero h1 { margin: 0 0 6px; font-size: 22px; font-weight: 650; letter-spacing: -0.2px; line-height: 1.3; }

.gate-sub { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }

.field { display: block; margin-bottom: 14px; }

.label { display: block; margin-bottom: 7px; font-size: 11.5px; letter-spacing: .4px; color: var(--ink-3); }

.code-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  background: #fff;
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.code-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46, 158, 143, 0.13); }

#access-code {
  flex: 1;
  height: 46px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 1.5px;
  font-family: inherit;
}

#access-code::placeholder { color: var(--ink-3); letter-spacing: 0; font-size: 13px; }

.btn-reveal {
  height: 46px;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

.remember { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 18px; }

.btn-primary {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--radius-ctl);
  background: var(--accent-grad);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .3px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(35, 127, 116, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform .16s ease, box-shadow .16s ease;
}

.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 11px 22px rgba(35, 127, 116, 0.22); }

.btn-primary:disabled { opacity: 0.6; cursor: default; }

.gate-error {
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px solid rgba(192, 85, 63, 0.16);
  border-radius: var(--radius-ctl);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
}

.gate-disclaimer { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink-3); }

.gate-foot { margin: 0; font-size: 11.5px; color: var(--ink-3); }

/* ---------- S2 总览 ---------- */
.member-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 22px;
  background: var(--surface-grad);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f2fbf8 0%, #eaf6f3 100%);
  border: 1px solid #d8eee8;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--teal-d);
  flex: 0 0 auto;
}

.member-info { flex: 1; min-width: 0; }

.member-name { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.2px; }

.member-relation { margin: 3px 0 0; font-size: 12px; color: var(--ink-2); }

.publish-time { margin: 0; font-size: 11.5px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 22px;
  background: var(--line);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(16, 32, 38, 0.03);
}

.stat { background: var(--surface-grad); padding: 15px 16px; display: flex; flex-direction: column; gap: 3px; }

.stat-num { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.3px; }

.stat-small { font-size: 13px; font-weight: 500; letter-spacing: 0; }

.stat-label { font-size: 11px; letter-spacing: .4px; color: var(--ink-3); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 24px 0 11px; }

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .1px;
}

.section-head h2::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent-grad);
}

.section-hint { font-size: 11.5px; color: var(--ink-3); }

.episode-list { display: flex; flex-direction: column; gap: 10px; }

.episode-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 15px 17px;
  background: var(--surface-grad);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.episode-card:hover { border-color: #bfe0d9; box-shadow: 0 7px 18px rgba(16, 32, 38, 0.06); transform: translateY(-1px); }

.episode-card.active-ep {
  border-left: 3px solid var(--teal);
  background: linear-gradient(90deg, rgba(234, 246, 243, 0.72) 0%, #fff 58%);
}

.episode-card .ep-main { flex: 1; min-width: 0; }

.episode-card .ep-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }

.episode-card .ep-sub { margin-top: 3px; font-size: 12px; color: var(--ink-2); }

.episode-card .ep-right { font-size: 11.5px; color: var(--ink-3); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-2);
  background: var(--paper);
  white-space: nowrap;
}

.status-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  flex: none;
}

.status-chip.status-active i { background: var(--teal-d); }
.status-chip.status-observing i { background: var(--blue); }
.status-chip.status-closed i,
.status-chip.status-archived i { background: var(--gray); }

.status-chip.active { color: var(--teal-d); border-color: #bfe0d9; background: var(--teal-soft); }
.status-chip.status-observing { color: #3f6fc4; border-color: rgba(91, 143, 249, 0.2); background: var(--blue-soft); }
.status-chip.status-closed,
.status-chip.status-archived { color: var(--ink-2); background: var(--gray-soft); }

.notice { margin: 24px 0 0; font-size: 11.5px; color: var(--ink-3); }

/* ---------- S3 详情 ---------- */
.btn-back {
  height: 32px;
  padding: 0 11px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-grad);
  color: var(--ink-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}

.btn-back:hover { border-color: #cfe3de; color: var(--ink); }

.ep-head {
  padding: 20px 22px;
  background: var(--surface-grad);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
}

.ep-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ep-title { margin: 0; font-size: 23px; font-weight: 650; letter-spacing: -.3px; }

.ep-meta { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-2); }

.ep-note { margin: 12px 0 0; padding: 9px 12px; border-left: 3px solid #cfe7df; border-radius: 0 10px 10px 0; background: rgba(234, 246, 243, 0.62); font-size: 12.5px; color: var(--ink-2); }

.timeline { position: relative; padding-left: 22px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(46, 158, 143, 0.45), rgba(46, 158, 143, 0.12) 55%, rgba(242, 153, 74, 0.25));
}

.day-group { margin-bottom: 18px; }

.day-label {
  display: inline-flex;
  position: relative;
  margin: 0 0 9px -22px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}

.tl-item { position: relative; display: flex; gap: 10px; padding: 8px 0; }

.tl-dot {
  position: absolute;
  left: -21px;
  top: 13px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal-soft);
  border: 4px solid rgba(46, 158, 143, 0.14);
  box-shadow: 0 0 0 1px rgba(46, 158, 143, 0.08);
}

.tl-item.med .tl-dot,
.tl-item.medication .tl-dot { background: var(--orange-soft); border-color: rgba(242, 153, 74, 0.2); box-shadow: 0 0 0 1px rgba(242, 153, 74, 0.08); }
.tl-item.visit .tl-dot { background: var(--blue-soft); border-color: rgba(91, 143, 249, 0.2); box-shadow: 0 0 0 1px rgba(91, 143, 249, 0.08); }
.tl-item.lab .tl-dot { background: var(--green-soft); border-color: rgba(86, 167, 122, 0.22); box-shadow: 0 0 0 1px rgba(86, 167, 122, 0.08); }
.tl-item.symptom .tl-dot { background: var(--rose-soft); border-color: rgba(223, 142, 158, 0.22); box-shadow: 0 0 0 1px rgba(223, 142, 158, 0.08); }
.tl-item.note .tl-dot,
.tl-item.status .tl-dot { background: var(--gray-soft); border-color: rgba(148, 169, 174, 0.24); box-shadow: 0 0 0 1px rgba(148, 169, 174, 0.1); }

.tl-time { flex: 0 0 44px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 1px; }

.tl-body { flex: 1; min-width: 0; }

.tl-title { font-size: 13.5px; font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.tl-detail { margin-top: 2px; font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; }

.tag-backfill { padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; font-size: 10.5px; font-weight: 400; color: var(--ink-3); background: rgba(255, 255, 255, 0.6); }

.tl-created { font-size: 11px; color: var(--ink-3); font-weight: 400; }

.day-group.empty { color: var(--ink-3); font-size: 12.5px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--card-border); border-radius: var(--radius-card); background: var(--paper); box-shadow: 0 4px 14px rgba(16, 32, 38, 0.03); }

.meds-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 620px; }

.meds-table th, .meds-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }

.meds-table thead th { position: sticky; top: 0; background: var(--raised); font-weight: 600; color: var(--ink-2); font-size: 11.5px; z-index: 1; }

.meds-table tr:last-child td { border-bottom: 0; }

.meds-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.meds-table .muted { color: var(--ink-3); }

.detail-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.btn-ghost {
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-ctl);
  background: var(--surface-grad);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.btn-ghost:hover { border-color: #cfe3de; box-shadow: 0 5px 14px rgba(16, 32, 38, 0.05); }

/* ---------- 病程总结 ---------- */
.summary-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 20px;
  padding: 13px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: linear-gradient(90deg, rgba(234, 246, 243, 0.72) 0%, rgba(255, 255, 255, 0.92) 54%, rgba(255, 248, 240, 0.68) 100%);
}

.summary-entry strong { display: block; font-size: 13.5px; font-weight: 650; }

.summary-entry span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-3); }

.summary-entry .btn-ghost { flex: 0 0 auto; height: 34px; font-size: 12px; }

.summary-cover {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 26px 23px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-panel);
  background: var(--surface-grad);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.summary-cover::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 260px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 153, 74, 0.1), transparent 68%);
  pointer-events: none;
}

.summary-cover-main { position: relative; z-index: 1; flex: 1; min-width: 0; }

.summary-kicker { margin: 0 0 8px; font-size: 10.5px; letter-spacing: 1.8px; color: var(--teal-d); font-weight: 650; }

.summary-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.summary-title { margin: 0; font-size: clamp(22px, 2.2vw, 31px); line-height: 1.25; font-weight: 700; letter-spacing: -.5px; }

.summary-lede { margin: 9px 0 0; max-width: 650px; font-size: 12.5px; color: var(--ink-2); }

.summary-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 16px; }

.summary-actions .btn-primary { width: auto; height: 36px; padding: 0 15px; border-radius: 10px; font-size: 12.5px; }

.summary-actions .btn-ghost { height: 36px; font-size: 12.5px; }

.summary-daymark {
  position: relative;
  z-index: 1;
  flex: 0 0 100px;
  text-align: right;
  color: var(--ink);
}

.summary-daymark b { display: block; font-size: 56px; line-height: .9; font-weight: 800; letter-spacing: -3px; color: rgba(35, 127, 116, 0.2); font-variant-numeric: tabular-nums; }

.summary-daymark span { display: block; margin-top: 2px; font-size: 10px; letter-spacing: 2.6px; color: var(--ink-3); font-weight: 650; }

.summary-daymark small { display: block; margin-top: 9px; font-size: 10.5px; color: var(--ink-3); }

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--line);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(16, 32, 38, 0.03);
}

.summary-stat { background: var(--surface-grad); padding: 14px 16px; }

.summary-stat b { display: block; font-size: 25px; line-height: 1.15; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }

.summary-stat span { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3); }

.summary-stat small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--teal-d); font-weight: 600; }

.summary-stage {
  position: relative;
  margin: 18px 0 22px;
  padding: 22px 24px 17px;
  border-radius: var(--radius-panel);
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(242, 153, 74, 0.12), transparent 64%),
    radial-gradient(420px 260px at 0% 100%, rgba(126, 217, 198, 0.12), transparent 68%),
    linear-gradient(138deg, #173d39 0%, #10292e 76%);
  color: #eef9f5;
  box-shadow: 0 14px 30px rgba(10, 33, 31, 0.18);
  overflow: hidden;
}

.summary-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .4;
}

.summary-stage > * { position: relative; z-index: 1; }

.summary-stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

.summary-stage-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: .2px; }

.summary-stage-head p { margin: 3px 0 0; font-size: 11.5px; color: rgba(238, 249, 245, 0.52); }

.summary-stage-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid rgba(238, 249, 245, 0.14); border-radius: 999px; font-size: 10.5px; color: rgba(238, 249, 245, 0.6); background: rgba(238, 249, 245, 0.05); white-space: nowrap; }

.summary-stage-badge i { width: 6px; height: 6px; border-radius: 50%; background: #7ed9c6; }

.summary-timeline { position: relative; height: 172px; margin-top: 4px; }

.summary-rail { position: absolute; left: 4%; right: 4%; top: 80px; height: 2px; border-radius: 2px; background: rgba(238, 249, 245, 0.16); }

.summary-rail i { display: block; width: 0; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #df8e9e 0%, #5b8ff9 28%, #56a77a 52%, #f2994a 74%, #7ed9c6 100%); box-shadow: 0 0 16px rgba(126, 217, 198, 0.35); transition: width .2s linear; }

.summary-node {
  position: absolute;
  top: 0;
  width: 136px;
  height: 154px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.summary-node .label { height: 34px; margin-top: 24px; font-size: 11.5px; line-height: 1.4; font-weight: 600; color: rgba(238, 249, 245, 0.9); overflow: hidden; }

.summary-node .dot { width: 15px; height: 15px; margin-top: 7px; border-radius: 50%; background: currentColor; border: 3px solid rgba(255, 253, 248, 0.92); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.1), 0 0 22px currentColor; flex: none; }

.summary-node .date { margin-top: 8px; font-size: 10px; letter-spacing: .8px; color: rgba(238, 249, 245, 0.48); white-space: nowrap; }

.summary-node.rose { color: var(--rose); }
.summary-node.blue { color: var(--blue); }
.summary-node.green { color: var(--green); }
.summary-node.orange { color: var(--orange); }
.summary-node.teal { color: #7ed9c6; }
.summary-node.muted { opacity: .4; }

.summary-caption { margin: 0 0 0 4px; font-size: 11.5px; color: rgba(238, 249, 245, 0.56); letter-spacing: .2px; }

.summary-stage-foot { display: flex; align-items: center; gap: 12px; margin-top: 11px; }

.summary-play-btn {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(238, 249, 245, 0.2);
  border-radius: 50%;
  background: rgba(238, 249, 245, 0.08);
  color: #eef9f5;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.summary-progress { flex: 1; height: 3px; border-radius: 3px; background: rgba(238, 249, 245, 0.14); overflow: hidden; }

.summary-progress i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #7ed9c6, #f2b47b); }

.summary-timecode { font-size: 10.5px; color: rgba(238, 249, 245, 0.5); font-variant-numeric: tabular-nums; }

.summary-block { margin-bottom: 20px; }

.summary-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }

.summary-block-head h2 { margin: 0; font-size: 16px; font-weight: 650; }

.summary-block-head span { font-size: 11.5px; color: var(--ink-3); }

.summary-quote {
  padding: 16px 18px 14px;
  border: 1px solid var(--card-border);
  border-left: 4px solid #bfe0d9;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  background: var(--surface-grad);
  box-shadow: 0 4px 14px rgba(16, 32, 38, 0.03);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.summary-phases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.summary-phase {
  padding: 14px 15px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--surface-grad);
}

.summary-phase small { display: block; font-size: 10px; letter-spacing: 1px; color: var(--teal-d); font-variant-numeric: tabular-nums; }

.summary-phase h3 { margin: 4px 0 5px; font-size: 14px; font-weight: 650; }

.summary-phase p { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }

.summary-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

.summary-panel {
  min-width: 0;
  padding: 16px 17px 13px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  background: var(--surface-grad);
  box-shadow: 0 4px 14px rgba(16, 32, 38, 0.03);
}

.summary-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 11px; }

.summary-panel-head h3 { margin: 0; font-size: 14px; font-weight: 650; }

.summary-panel-head p { margin: 3px 0 0; font-size: 10.5px; color: var(--ink-3); }

.summary-mini { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; color: var(--ink-3); white-space: nowrap; }

.summary-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line-2); font-size: 10.5px; color: var(--ink-3); }

.summary-gantt { display: flex; flex-direction: column; gap: 7px; }

.summary-gantt-row { display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: center; gap: 8px; }

.summary-gantt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; color: var(--ink-2); }

.summary-gantt-track { position: relative; height: 8px; border-radius: 999px; background: var(--raised); overflow: hidden; }

.summary-gantt-bar { position: absolute; top: 1px; bottom: 1px; border-radius: 999px; background: linear-gradient(90deg, #f6c08d, #f2994a); }

.summary-gantt-empty, .summary-list-empty { padding: 15px 0; font-size: 11.5px; color: var(--ink-3); }

.summary-temp svg { display: block; width: 100%; height: auto; }

.summary-list { display: flex; flex-direction: column; gap: 8px; }

.summary-list-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }

.summary-list-row:last-child { padding-bottom: 0; border-bottom: 0; }

.summary-list-row strong { display: block; font-size: 12px; font-weight: 600; }

.summary-list-row span { display: block; margin-top: 2px; font-size: 10.5px; color: var(--ink-3); }

.summary-list-row .summary-state { flex: none; padding: 1px 7px; border: 1px solid #d8eee8; border-radius: 999px; background: var(--teal-soft); font-size: 10px; color: var(--teal-d); }

.summary-legend-dot { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--rose); }

.summary-share-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 22px 0 12px;
  padding: 22px 24px;
  border-radius: var(--radius-panel);
  background:
    radial-gradient(380px 220px at 100% 0%, rgba(242, 153, 74, 0.16), transparent 66%),
    linear-gradient(135deg, #1a3d39 0%, #11292e 78%);
  color: #eef9f5;
  box-shadow: 0 14px 30px rgba(10, 33, 31, 0.16);
}

.summary-share-kicker { margin: 0 0 6px; font-size: 10px; letter-spacing: 1.8px; color: rgba(126, 217, 198, 0.72); }

.summary-share-cta h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.2px; }

.summary-share-cta p { margin: 7px 0 0; max-width: 580px; font-size: 11.5px; line-height: 1.65; color: rgba(238, 249, 245, 0.58); }

.summary-share-cta .btn-primary { flex: 0 0 auto; width: auto; height: 40px; padding: 0 17px; background: #f2fbf8; color: var(--teal-d); font-size: 12.5px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14); }

/* ---------- 分享长图 ---------- */
.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 27, 30, 0.46);
  backdrop-filter: blur(7px);
}

.share-overlay[hidden] { display: none; }

.share-sheet {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 20px 20px 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-panel);
  background: var(--surface-grad);
  box-shadow: 0 24px 70px rgba(10, 27, 30, 0.28);
}

.share-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.share-sheet-head h3 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.2px; }

.share-close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; }

.share-options { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; font-size: 12px; color: var(--ink-2); }

.share-options label { display: inline-flex; align-items: center; gap: 6px; }

.share-sheet .btn-primary { height: 40px; font-size: 13px; }

.share-preview-wrap { margin-top: 13px; }

.share-preview { display: block; width: 100%; max-height: 46vh; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #f5f1e8; }

.share-sheet-actions { display: flex; align-items: center; gap: 9px; margin-top: 12px; }

.share-sheet-actions .btn-primary, .share-sheet-actions .btn-ghost { width: auto; flex: 1; height: 38px; font-size: 12.5px; text-align: center; line-height: 38px; text-decoration: none; }

.share-note { margin: 12px 0 0; font-size: 10.5px; line-height: 1.6; color: var(--ink-3); }

/* ---------- S4 移动端 ---------- */
.site-tabs {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--line);
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  backdrop-filter: blur(14px);
}

.tab {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

.tab.active { color: var(--teal-d); background: linear-gradient(135deg, rgba(234, 246, 243, 0.9) 0%, rgba(255, 255, 255, 0.78) 100%); font-weight: 600; }

@media (max-width: 760px) {
  .site-main { padding: 20px 14px 88px; }
  .site-head { height: 54px; padding: 0 14px; }
  .cutoff { display: none; }
  .gate { padding-top: 4vh; }
  .gate-card { padding: 26px 22px 22px; border-radius: 18px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 13px 14px; }
  .stat-num { font-size: 22px; }
  .member-card { flex-wrap: wrap; }
  .publish-time { width: 100%; text-align: left; }
  .btn-primary, .btn-ghost, .btn-exit, .episode-card { min-height: 40px; }
  .timeline { padding-left: 18px; }
  .day-label { margin-left: -18px; }
  .tl-dot { left: -17px; }
  .tl-time { flex-basis: 40px; }
  .meds-table th, .meds-table td { padding: 8px 10px; }

  .summary-entry { align-items: flex-start; flex-direction: column; gap: 9px; }
  .summary-entry .btn-ghost { width: 100%; }
  .summary-cover { flex-direction: column; gap: 15px; padding: 20px 18px; }
  .summary-daymark { flex: 0 0 auto; text-align: left; }
  .summary-daymark b { font-size: 42px; }
  .summary-daymark span { display: inline-block; margin-left: 5px; }
  .summary-daymark small { display: block; margin-top: 4px; }
  .summary-title { font-size: 23px; }
  .summary-actions .btn-primary, .summary-actions .btn-ghost { width: 100%; }
  .summary-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-stat { padding: 12px 13px; }
  .summary-stat b { font-size: 22px; }
  .summary-stage { padding: 17px 14px 14px; }
  .summary-stage-head { flex-direction: column; gap: 8px; }
  .summary-timeline { height: 166px; margin-top: 0; }
  .summary-rail { top: 78px; }
  .summary-node { width: 80px; height: 150px; }
  .summary-node .label { height: 30px; margin-top: 23px; font-size: 10px; }
  .summary-node .dot { width: 12px; height: 12px; margin-top: 7px; }
  .summary-node .date { margin-top: 7px; font-size: 9px; letter-spacing: .4px; }
  .summary-caption { font-size: 10.5px; }
  .summary-block-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .summary-phases { grid-template-columns: 1fr; }
  .summary-two-col { grid-template-columns: 1fr; }
  .summary-panel { padding: 14px 14px 12px; }
  .summary-gantt-row { grid-template-columns: 86px minmax(0, 1fr); }
  .summary-share-cta { align-items: flex-start; flex-direction: column; gap: 15px; padding: 19px 18px; }
  .summary-share-cta h2 { font-size: 18px; }
  .summary-share-cta .btn-primary { width: 100%; }
  .share-overlay { padding: 10px; }
  .share-sheet { padding: 16px; max-height: 94vh; }
  .share-preview { max-height: 48vh; }
  .site-tabs[hidden] { display: none; }
  .site-tabs:not([hidden]) { display: flex; }
  .site-tabs .tab { font-size: 12px; }
}

.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--page); color: var(--ink); font-size: 14px; }

@media print {
  .site-head, .site-tabs, .btn-print, .btn-exit, .btn-back, #btn-back { display: none !important; }
  body::before { display: none; }
  .sheet { box-shadow: none; border: 0; }
  .day-group { break-inside: avoid; }
  .print-watermark::after {
    content: "只读投影 · 数据截止于 " attr(data-cutoff);
    position: fixed;
    bottom: 8mm;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10pt;
    color: #7c8e94;
  }
  body { background: #fff; }
  .site-main { max-width: none; padding: 0; }
}
