/* 免费版报告：屏幕上的覆盖层 + A4 打印样式
   报告固定用白底黑字，不跟随深色模式，这样打印和另存为 PDF 都稳定。 */

.report-overlay {
  position: fixed; inset: 0; z-index: 1200;
  overflow-y: auto;
  padding: 24px 16px 72px;
  background: rgba(20, 18, 15, 0.6);
  -webkit-overflow-scrolling: touch;
}

.report-toolbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  width: min(780px, 100%); margin: 0 auto 16px;
  padding: 12px 16px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.report-tip { font-size: 13px; color: var(--ink-2); }
.report-actions { display: flex; gap: 10px; }
.report-actions .btn { min-height: 40px; padding: 0 20px; font-size: 14px; }

.report-sheet {
  width: min(780px, 100%); margin: 0 auto;
  background: #fff; color: #1e1c19;
  padding: 56px 56px 44px;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 13.5px; line-height: 1.8;
  outline: none;
  print-color-adjust: exact; -webkit-print-color-adjust: exact;
}
.report-sheet h1, .report-sheet h2, .report-sheet h3, .report-sheet b {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}
.report-sheet p { margin: 0; }

.rp-head { text-align: center; padding-bottom: 24px; border-bottom: 2px solid #1e1c19; }
.rp-seal {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 12px;
  background: #b5341f; color: #fff;
  font-family: "Songti SC", "STSong", serif; font-size: 24px; font-weight: 700;
  border-radius: 5px; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 3px #b5341f, inset 0 0 0 5px #fff;
}
.rp-head h1 { font-size: 24px; letter-spacing: 0.16em; margin-bottom: 6px; }
.rp-meta { font-size: 11.5px; color: #8c857a; }

.rp-section { margin-top: 32px; }
.rp-section h2 {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 17px; letter-spacing: 0.08em;
  padding-bottom: 8px; border-bottom: 1px solid #d8cfbe; margin-bottom: 16px;
}
.rp-section h2 span { color: #b5341f; font-size: 13px; font-weight: 400; font-style: italic; }

.rp-verdict { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.rp-lede { color: #57524a; margin-bottom: 16px; }

.rp-tendency { margin: 18px 0 24px; }
.rp-tendency-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: #8c857a; margin-bottom: 6px; }
.rp-tendency-track { position: relative; height: 6px; background: #ece5d6; border-radius: 3px; }
.rp-tendency-track i {
  position: absolute; top: 50%; left: 50%;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #b5341f; border: 2px solid #fff;
  box-shadow: 0 0 0 1px #b5341f;
}

.rp-dims { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.rp-dim { break-inside: avoid; }
.rp-dim-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.rp-dim-head b { font-size: 14px; }
.rp-poles { font-size: 11.5px; color: #8c857a; }
.rp-track { height: 4px; background: #ece5d6; border-radius: 2px; overflow: hidden; }
.rp-track i { display: block; height: 100%; width: 0; background: #57524a; border-radius: 2px; transition: none; }
.rp-dim p { margin-top: 6px; font-size: 12.5px; color: #57524a; }

.rp-field { margin-top: 24px; break-inside: avoid; }
.rp-field h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.rp-field h3 small { font-size: 11px; font-weight: 400; color: #8c857a; letter-spacing: 0.1em; }

.rp-ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rp-rank { break-inside: avoid; padding: 8px 12px; background: #fbf8f2; border: 1px solid #ece5d6; border-radius: 8px; }
.rp-rank-line { display: grid; grid-template-columns: 26px 1fr auto; align-items: baseline; gap: 10px; }
.rp-no { font-family: "Songti SC", "STSong", serif; font-style: italic; color: #8c857a; font-size: 12px; }
.rp-ranks li:first-child .rp-no { color: #b5341f; }
.rp-rank-line b { font-size: 13.5px; }
.rp-fit { font-family: "Songti SC", "STSong", serif; font-weight: 700; font-size: 17px; }
.rp-fit small { font-size: 10px; font-weight: 400; color: #8c857a; margin-left: 1px; }
.rp-sub { font-size: 11px; color: #8c857a; padding-left: 36px; }
.rp-more { margin-top: 8px; font-size: 11px; color: #8c857a; }

.rp-top { margin-top: 12px; display: grid; gap: 6px; }
.rp-top p { font-size: 12.5px; color: #57524a; }
.rp-top b { color: #1e1c19; }

.rp-empty { color: #8c857a; font-size: 12.5px; }

.rp-foot {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid #d8cfbe;
  text-align: center; font-size: 10.5px; color: #8c857a; display: grid; gap: 2px;
}

/* ── 打印 / 另存为 PDF ─────────────────────────────────────── */
@media print {
  @page { size: A4; margin: 14mm; }

  html, body { background: #fff !important; overflow: visible !important; }
  body > *:not(.report-overlay) { display: none !important; }

  .report-overlay {
    position: static !important; inset: auto !important;
    padding: 0 !important; background: none !important;
    overflow: visible !important; display: block !important;
  }
  .report-toolbar { display: none !important; }

  .report-sheet {
    width: auto !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important;
    box-shadow: none !important; border-radius: 0 !important;
    font-size: 11pt;
  }
  .rp-section { break-inside: auto; }
  .rp-section h2, .rp-field h3 { break-after: avoid; break-inside: avoid; }
  .rp-field, .rp-dim, .rp-rank { break-inside: avoid; }
  .rp-head { break-after: avoid; }
}

@media (max-width: 640px) {
  .report-sheet { padding: 32px 22px 28px; font-size: 13px; }
  .report-toolbar { flex-direction: column; align-items: stretch; }
  .report-actions { justify-content: flex-end; }
  .rp-head h1 { font-size: 20px; }
  .rp-rank-line { grid-template-columns: 22px 1fr auto; }
  .rp-sub { padding-left: 32px; }
}
