/* =====================================================================
   print.css : 유료 화면 인쇄 · PDF 저장 공통 규칙
   쓰는 곳: deepq.html · report-premium.html · saju-report.html · report.html  (<link media="print">)
   1) 화면에 떠 있는 것(설치 안내, 토스트, 편지·출석 카드, 언어·음악·말투 버튼, 공유, 주문번호 안내,
      아래 고정 막대, 대화 풍선, 반짝이 효과)은 인쇄하지 않아요.
   2) 흰 종이 위에 읽기 좋은 글자색으로 바꿔요. 카드 그림은 그대로 둬요.
   3) 억지 쪽 나눔을 없애요: 큰 꼭지(섹션)는 쪽을 넘어가도 되고, 카드 줄·작은 풀이 덩어리만 자르지 않아요.
      (report-premium 의 책 모양 쪽(.pg)은 원래부터 한 장씩 나뉘는 디자인이라 건드리지 않아요)
   ===================================================================== */
@media print {
  /* ── 1. 떠 있는 것 모두 숨기기 ─────────────────────────────── */
  #install-tip, .hs-float, .intro,
  .pf-toast, .pf-bar, .dsh, .dsh-msg, .la-letter, .la-greet, .la-news, .la-stamp, .la-stamp-solo, .la-review, .la-reviews,
  #lang-btn, #lang-sw, .lang-sw, .lang-menu, .lsend, .i18n-note,
  .bgm-btn, .tone-btn, .tone-ask, .dp-fab, .dp-bg, #ordnote, #paydlg, .rd-sheet, .rd-top, .rd-progress, .bar2,
  #fx, .flyer, .mys-veil, .mys-ripple, .mys-vig, .mys-stars, .mys-mist, .holo-glow, .holo-motes, .sky-live, .op-dim, .op-fx, .op-skip,
  #reader-bar, .la-promise, .la-help, .la-foot, .la-trust, nav, footer, [data-share], .share-row, .share-btns {
    display: none !important;
  }
  *, *::before, *::after { animation: none !important; transition: none !important; }

  /* ── 2. 흰 종이 · 읽기 좋은 글자 ───────────────────────────── */
  html, body { background: #fff !important; color: #222 !important; }
  body { padding: 0 !important; min-height: 0 !important; font-size: 11pt; line-height: 1.65; }
  a { color: inherit; text-decoration: none; }
  img { max-width: 100%; }
  p, li { orphans: 3; widows: 3; }
  h2, h3, h4 { break-after: avoid; page-break-after: avoid; }
  /* 그림·색 막대는 "배경 그래픽" 설정을 꺼도 보이게 */
  img, .card-face, .glyph, .bar i, .el i, .dot, .dq-meter i, .face { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* ── 3-1. 한 질문 심화 (deepq.html) ────────────────────────── */
  body:has(.dq) {
    --ink: #222; --mist: #555; --gilt: #8a6526; --line: #cfc6b4; --night: #fff; --night-2: #fff; --rev: #b0473a;
  }
  .wrap:has(.dq) { display: block; padding: 0; max-width: none; }
  .dq { display: block; max-width: none; }
  .dq > * + *, #dq-body > * + * { margin-top: 12pt; }
  .dq .back, .dq-hero, .dq-acts2, .dq-buy, .dq-err { display: none !important; }
  .dq-head { margin-bottom: 8pt; }
  .dq-head h2 { font-size: 17pt; color: #222; }
  .dq-cards { break-inside: avoid; page-break-inside: avoid; gap: 8mm; max-width: 150mm; margin: 0 auto; }
  .dq-card { break-inside: avoid; }
  .dq-card > .card-face { width: min(100%, 42mm); box-shadow: none !important; }
  .dq-card figcaption { color: #222; font-size: 9.5pt; }
  .dq-sec { background: none !important; border: 1px solid #cfc6b4; border-radius: 8px; padding: 10pt 12pt; break-inside: auto !important; page-break-inside: auto !important; }
  .dq-sec h3 { color: #8a6526; font-size: 13pt; }
  /* 자르지 않는 것: 풀이 한 덩어리(제목+문단) · 두 장의 대화 하나 · 편지 · 목록 한 줄 (카드 한 장의 풀이 전체(.dq-one)는 길어서 넘어가도 돼요) */
  .dq-f, .dq-sym, .dq-pair, .dq-fx, .dq-time li, .dq-acts li, .dq-letter, .dq-meter { break-inside: avoid; page-break-inside: avoid; }
  .dq-one h4 { break-after: avoid; page-break-after: avoid; }
  .dq-pos, .dq-big { color: #222 !important; }
  .dq-sym, .dq-sym b, .dq-adv, .dq-foot { color: #444 !important; }
  .dq-meter i { background: #e6e0d4 !important; } .dq-meter i.on { background: #c99b45 !important; }
  .dq-letter { background: #faf6ec !important; box-shadow: inset 0 0 0 1px #d8c79c; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* ── 3-2. 사주 상세 · 신년 종합 (saju-report.html · report.html) ── */
  body:has(#book.book) { --ink: #222; --ink-soft: #555; --paper: #fff; --paper-2: #f4efe4; }
  .form, .notice, body > .back, .actions, .lock .go { display: none !important; }
  .book { display: block; max-width: none; padding: 0; }
  .book > .page + .page { margin-top: 10mm; }
  .page { box-shadow: none !important; border-radius: 0; padding: 8mm 6mm; background: #fff !important; break-inside: auto; }
  .page::before { display: none; }
  .page.cover { min-height: 0; padding-block: 18mm 12mm; }
  .box, .pillar, .pillars, .tcard, .tip, .verdict, .score, .months div, .elements, .chart-wrap, .grid-3 > *, .grid-2 > * { break-inside: avoid; page-break-inside: avoid; }
  .chart-wrap { overflow: visible; } .chart-wrap svg { min-width: 0; }
  .page.locked { display: none !important; }
}
