/* ============================================================
   布局层 —— 三栏骨架 5 : 20 : 5（设计稿横向比例）
   ============================================================ */

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--rail-w);
  gap: var(--sp-5);
  align-items: start;
}

/* ---------- 侧栏（医院官网链接 / 官方转载） ---------- */
.rail { position: sticky; top: calc(var(--nav-h) + var(--sp-4)); padding: var(--sp-5) 0; }
.rail__block { margin-bottom: var(--sp-4); }

.rail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.rail-card__head {
  padding: 10px 14px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: flex; align-items: center; gap: 6px;
}
.rail-card__head svg { width: 13px; height: 13px; flex-shrink: 0; }
.rail-card__head--soft {
  background: var(--blue-50);
  color: var(--blue-800);
  border-bottom: 1px solid var(--blue-100);
}
.rail-card__body { padding: 8px; }

/* 医院官网链接 */
.hosp-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); color: var(--ink-700); line-height: 1.4;
  transition: background .16s, color .16s;
}
.hosp-link:hover { background: var(--blue-50); color: var(--blue-700); }
.hosp-link__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-400); flex-shrink: 0;
}
.hosp-link:hover .hosp-link__dot { background: var(--blue-600); }
.hosp-link__ext { margin-left: auto; width: 11px; height: 11px; opacity: .35; flex-shrink: 0; }
.hosp-link:hover .hosp-link__ext { opacity: .8; }

/* 官方转载 1. 2. 3. 4. */
.repost { counter-reset: rp; }
.repost li { counter-increment: rp; }
.repost a {
  display: flex; gap: 7px; padding: 8px 10px;
  border-radius: var(--r-sm); font-size: var(--fs-xs);
  color: var(--ink-700); line-height: 1.5;
  transition: background .16s, color .16s;
}
.repost a::before {
  content: counter(rp) ".";
  color: var(--blue-400); font-weight: 700;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.repost a:hover { background: var(--blue-50); color: var(--blue-700); }
.repost a span {
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* ---------- 主内容列 ---------- */
.main { min-width: 0; padding-bottom: var(--sp-8); }

.section { padding: var(--sp-8) 0; scroll-margin-top: calc(var(--nav-h) + var(--topbar-h)); }

.section__head { margin-bottom: var(--sp-6); }
.section__title { font-size: var(--fs-2xl); letter-spacing: -.01em; }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 999px;
  font-size: var(--fs-base); font-weight: 600; line-height: 1;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s;
}
.btn svg { width: 15px; height: 15px; }

/* 占位图 —— 后续替换为真实照片 */
.ph {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-100) 0%, var(--blue-200) 48%, var(--blue-300) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-800);
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 22% 28%, rgba(255,255,255,.55), transparent 42%),
    radial-gradient(circle at 78% 76%, rgba(40,80,160,.22), transparent 46%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0 2px, transparent 2px 12px);
}
.ph__inner {
  position: relative; z-index: 1; text-align: center;
  padding: var(--sp-4); max-width: 90%;
}
.ph__icon {
  width: 40px; height: 40px; margin: 0 auto 10px;
  opacity: .58; stroke: var(--blue-800); fill: none; stroke-width: 1.5;
}
.ph__label { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .04em; }
.ph__hint {
  font-size: var(--fs-xs); color: var(--blue-700); opacity: .72; margin-top: 3px;
  letter-spacing: .02em;
}
.ph--dark { background: linear-gradient(135deg, var(--blue-800), var(--blue-600) 60%, var(--blue-500)); color: var(--white); }
.ph--dark .ph__icon { stroke: var(--white); }
.ph--dark .ph__hint { color: var(--blue-100); }

/* 标签 */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.6;
  background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100);
}

/* 回到顶部 */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue-600); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-blue);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s, background .18s;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--blue-700); }
.to-top svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }

/* 进场动画 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
