/* ============================================================
   陪跑 正式版骨架 · 给家长的一封信（页面 3）
   视觉：demo/03 提取（信纸样式 + 打印适配）
   数据：PP.letter.buildLetter(profile) 真实生成（问卷答案槽位）
   作用域：.lt 整页固定层（自带滚动），不影响主页 body 布局
   ============================================================ */
.lt {
  --main: #e05570;
  --main-deep: #d6456d;
  --ink: #5a3a42;
  --ink-soft: #a87f8b;
  position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    radial-gradient(85% 65% at 10% 6%, rgba(255,255,255,.55), transparent 62%),
    radial-gradient(65% 55% at 90% 12%, rgba(255,196,220,.34), transparent 66%),
    #f7f3ec;
}
.lt * { box-sizing: border-box; }

/* ---- 顶栏 ---- */
.lt-topbar { max-width: 760px; margin: 0 auto; padding: 20px 20px 0; display: flex; align-items: center; gap: 12px; }
.lt-logo { font-size: 22px; font-weight: 900; color: var(--main-deep); letter-spacing: 2px; }
.lt-logo .heart { font-size: 13px; }
.lt-note { margin-left: auto; font-size: 12px; color: var(--ink-soft); }
.lt-back { font-size: 12.5px; color: var(--main-deep); text-decoration: none; font-weight: 700;
  background: rgba(255,255,255,.8); border: 1px solid rgba(224,85,112,.35); padding: 7px 16px;
  border-radius: 999px; cursor: pointer; font-family: inherit; }
.lt-back:hover { background: #fff0f3; }

/* ---- 信纸 ---- */
.lt-wrap { max-width: 760px; margin: 0 auto; padding: 20px 20px 60px; }
.paper { background: #fffdf8; border-radius: 8px; padding: 56px 60px 48px;
  box-shadow: 0 12px 40px rgba(120,90,50,.14); position: relative;
  border: 1px solid #f0e8d8; line-height: 2; }
@media (max-width: 640px) { .paper { padding: 34px 24px; } }
.paper::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(transparent 0 31px, rgba(210,180,140,.06) 31px 32px); }
.date-line { text-align: right; font-size: 13px; color: #a09078; margin-bottom: 22px; }
.salute { font-size: 18px; font-weight: 800; color: #5a4632; margin-bottom: 14px; }
.para { font-size: 15px; color: #5d4f3a; margin-bottom: 18px; text-indent: 2em; }
.para b { color: #b04a66; }
.paper h2 { font-size: 15px; color: #b04a66; margin: 26px 0 8px; letter-spacing: 1px; }
.ph { color: #c9a394; background: rgba(201,163,148,.12); border-radius: 5px; padding: 0 5px;
  font-size: 13.5px; white-space: nowrap; }
.sign { margin-top: 34px; text-align: right; font-size: 15px; color: #5d4f3a; }
.sign .s1 { font-size: 13px; color: #a09078; }
.print-note { text-align: center; margin-top: 18px; font-size: 12px; color: #b7a893; }

/* ---- 动作按钮 ---- */
.act-row { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.act-row button, .act-row a { border: none; border-radius: 999px; padding: 12px 28px; font-size: 14.5px;
  font-weight: 800; font-family: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
.act-print { background: var(--leaf); color: #fff; box-shadow: none; }
.act-print:hover { filter: brightness(1.06); }
.act-go { background: #fff; color: var(--main-deep); border: 1.5px solid #f0b9c5; }
.act-go:hover { background: #fff0f3; }

/* ---- 无档案提示（直接输 #letter 的兜底） ---- */
.lt-empty { max-width: 520px; margin: 12vh auto 0; text-align: center; }
.lt-empty .card { background: rgba(255,255,255,.85); border-radius: 26px; padding: 34px 30px;
  box-shadow: 0 20px 60px rgba(60,20,30,.16); }
.lt-empty .e-ic { font-size: 46px; display: inline-block; animation: ltBounce 1.3s ease infinite; }
@keyframes ltBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.lt-empty .e-t { font-size: 21px; font-weight: 800; color: var(--ink); margin: 10px 0 6px; }
.lt-empty .e-s { font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 20px; }
.lt-empty .e-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media print {
  /* 打印空白页的根因：① 固定舞台 #app 绝对定位+scale；② onboarding.css 在 letter.css 之后加载，
     里面 .lt/.lt-wrap/.paper 都带 !important，同样权重时后者胜出 → 必须用更高优先级（#app 前缀）压住。 */
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  /* 用 html body #app 提高优先级：design-overrides.css（在 letter.css 之后加载）里 #app 也带 !important */
  html body #app { position: static !important; left: auto !important; top: auto !important;
         width: auto !important; height: auto !important; transform: none !important;
         overflow: visible !important; background: #fff !important; }
  html body #app .lt { position: static !important; inset: auto !important; overflow: visible !important;
             background: #fff !important; padding: 0 !important; }
  html body #app .lt-wrap { height: auto !important; max-height: none !important; overflow: visible !important; padding: 0 !important; }
  html body #app .paper { max-height: none !important; overflow: visible !important; box-shadow: none !important;
                border: 0 !important; padding: 0 !important; }
  html body #app .lt-topbar, html body #app .act-row { display: none !important; }
  .print-note { display: block !important; font-size: 9.5px; color: #b7a893; margin-top: 14px;
    border-top: 1px dashed #ddd; padding-top: 8px; }
}
