/* ============================================================
   print.css — 印刷・PDF保存用（A4縦・1セクション1ページ）
   Web表示用CSSと分離して管理。@media print 内でのみ効かせる。
   ============================================================ */

@page {
  size: A4 portrait;
  margin: 0;               /* 余白はページ内側 .pad で統一 */
}

@media print {
  html, body { background: #fff !important; }

  /* 画面用UIをすべて非表示 */
  .topbar, .dots, .progress, .modal, .print-hint,
  .works-filter { display: none !important; }

  /* 背景色・背景画像を印刷する */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .sheet { display: block; padding: 0; gap: 0; }

  /* 1ページ＝A4。ページ途中で切れないようにする */
  .page {
    width: 210mm;
    height: 297mm;
    max-width: none;
    aspect-ratio: auto;      /* 固定寸法を優先 */
    margin: 0;
    box-shadow: none !important;
    overflow: hidden;
    break-inside: avoid;
    break-after: page;
    page-break-inside: avoid;
    page-break-after: always;
  }
  .page:last-child { break-after: auto; page-break-after: auto; }

  /* ページ内の要素が分割されないように */
  .strength, .num-cell, .wcard, .flow-step, .sys-item,
  .shop, .future-item, .profile-row, .net, .biz-hero {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* 表紙(P01)にはページ番号を出さない */
  #p01 .folio { display: none !important; }

  /* リンクのURL自動追記を無効化（一部ブラウザ向け） */
  a[href]::after { content: "" !important; }

  /* リンクは黒のまま（下線・色変化を出さない） */
  a { color: inherit !important; text-decoration: none !important; }

  /* ダーク面は背景を確実に出す */
  #p01, #p15 { background: #14110f !important; color: #fff !important; }

  /* ホバー由来の拡大などを無効化 */
  .wcard-thumb img { transform: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
