/* ==========================================================================
   Seiryu-Theme — Print Style
   ========================================================================== */

@media print {

  /* 印刷時に不要な要素を非表示 */
  .seiryu-header,
  .seiryu-infobar,
  .seiryu-mobile-nav,
  .seiryu-search-overlay,
  .seiryu-footer,
  .seiryu-sidebar,
  #js-scroll-top,
  .seiryu-popup-overlay,
  .seiryu-share,
  .seiryu-related,
  .article-nav,
  .seiryu-staff-back,
  .article-author,
  .wp-block-navigation,
  nav,
  button,
  .no-print {
    display: none !important;
  }

  /* ページ余白 */
  @page {
    margin: 20mm 15mm;
  }

  /* 基本スタイルリセット */
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-family: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', Georgia, serif;
    font-size: 11pt;
    line-height: 1.7;
    color: #000;
    background: #fff;
  }

  /* レイアウト */
  .seiryu-container,
  .seiryu-page-content,
  .seiryu-single-wrap,
  .seiryu-single-main,
  .seiryu-single-layout,
  .seiryu-blog-wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .seiryu-main {
    padding: 0 !important;
  }

  /* ページバナー */
  .seiryu-page-banner {
    background: #f0f0f0 !important;
    color: #000 !important;
    min-height: 0 !important;
    padding: 1rem 0 !important;
    border-bottom: 2px solid #333;
    margin-bottom: 1.5rem;
  }

  .page-banner-title {
    color: #000 !important;
    font-size: 18pt;
    margin-bottom: 0.3rem;
  }

  /* リンク */
  a {
    color: #000 !important;
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 8pt;
    color: #555 !important;
  }

  /* 内部リンク・画像リンクは URL 表示しない */
  a[href^="#"]::after,
  a[href^="javascript:"]::after,
  .post-card-thumb a::after,
  .seiryu-staff-card__inner::after,
  .seiryu-related__link::after {
    content: '' !important;
  }

  /* 画像 */
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  .article-thumbnail img {
    max-height: 400px;
    object-fit: contain;
  }

  /* 見出し */
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif JP', 'Yu Mincho', serif;
    page-break-after: avoid;
    orphans: 3;
    widows: 3;
  }

  h1 { font-size: 20pt; margin-bottom: 0.5rem; }
  h2 { font-size: 16pt; margin-top: 1.5rem; margin-bottom: 0.5rem; border-bottom: 1px solid #ccc; padding-bottom: 0.2rem; }
  h3 { font-size: 13pt; margin-top: 1rem; margin-bottom: 0.3rem; }

  /* テーブル */
  table { border-collapse: collapse; width: 100%; }
  th, td { border: 1px solid #ccc; padding: 0.3rem 0.5rem; }
  th { background: #eee !important; }

  /* ニュースリスト */
  .seiryu-news-item { border-bottom: 1px solid #ccc; padding: 0.3rem 0; flex-wrap: wrap; }

  /* スタッフ詳細 */
  .seiryu-staff-detail__header { grid-template-columns: 150px 1fr; gap: 1rem; }
  .seiryu-staff-detail__photo img { max-width: 150px; }

  /* 事例メタ */
  .case-meta-table { border: 1px solid #ccc; }
  .case-meta-row { border-bottom: 1px solid #ccc; }
  .case-meta-row dt { background: #eee !important; }

  /* TOC */
  .seiryu-toc {
    background: #f9f9f9 !important;
    border-left: 3px solid #333;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
  }

  /* ページ区切り */
  article, section { page-break-inside: avoid; }
  p { orphans: 3; widows: 3; }

  /* コードブロック */
  pre, code {
    font-family: monospace;
    background: #f5f5f5 !important;
    border: 1px solid #ddd;
    padding: 0.2em 0.4em;
    white-space: pre-wrap;
    word-break: break-all;
  }

}
