@charset "utf-8";

/**
 * 印刷専用（wp_head 末尾で media="print" 読み込み）
 * 画面用 SCSS の @media screen 限定のため、印刷時は PC/SP 用レイアウトが当たらず崩れる。
 * ここでナビ等を非表示にし、本文の可読性を優先する。
 */

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  /* 背景はブラウザ既定で省略されやすい前提。装飾は落とす */
  *,
  *::before,
  *::after {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* 単独の * より詳細度が高い body 配下で一括指定（style.css の a / #breadcrumbs 等に勝つ） */
  body,
  body *,
  body *::before,
  body *::after {
    color: #000 !important;
  }

  /* リンク直後の URL 表示を抑止 */
  a[href]::after,
  abbr[title]::after {
    content: "" !important;
  }

  html,
  body {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    zoom: normal !important;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.6;
  }

  /* WordPress 管理バー */
  #wpadminbar {
    display: none !important;
  }

  .l-wrap,
  .l-page {
    width: auto !important;
    max-width: none !important;
  }

  .l-main,
  .l-main.wrapper {
    width: auto !important;
    max-width: none !important;
  }

  /* ----- 非表示（ナビ・装飾・印刷不要 UI） ----- */
  .pageTabs,
  .p-news-ticker,
  .l-header .c-nav,
  header.l-header nav.c-nav,
  .l-header > .container > nav.c-nav,
  .l-header__tel,
  .c-page-top,
  .c-footer-nav,
  .c-footer-concierge,
  /* お問い合わせ・サイトポリシー */
  .c-footer-bottom2,
  /* 撮影要領・公営競技・車券の3リンク（.c-footer-upper の次のブロック） */
  .c-footer-upper + .c-footer-bottom,
  .no_print {
    display: none !important;
  }

  /* ----- ヘッダー: ロゴのみ ----- */
  .l-header {
    padding: 0 !important;
    border-top: 0 !important;
  }

  .l-header > .container {
    display: block !important;
    margin: 0 0 8mm !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .l-header__branding {
    display: block !important;
  }

  .l-header__logo {
    max-width: 180px !important;
    margin: 0 !important;
    width: auto !important;
  }

  .l-header__logo a,
  .l-header__logo img {
    display: block !important;
  }

  .l-header__logo img {
    width: 100% !important;
    height: auto !important;
  }

  /* ----- パンくず（SP では画面で非表示だが印刷では表示） ----- */
  .l-breadcrumb-bar {
    display: block !important;
    background: transparent !important;
    padding: 0 0 4mm !important;
  }

  /* ----- 下層タイトル ----- */
  .c-lower-title {
    page-break-after: avoid;
  }

  /* ----- 本文まわりの改ページ ----- */
  img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
  }

  table,
  figure,
  .l-content article {
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }

  /* ----- フッター: 住所・著作権（ナビ・コンシェルジュ・各種リンク除く） ----- */
  .l-footer {
    border-top: 1px solid #999 !important;
    padding-top: 6mm !important;
    margin-top: 8mm !important;
  }

  .c-footer-address {
    display: block !important;
  }

  .c-footer-address__item {
    margin: 0 0 4mm !important;
  }
}
