@media print {
    /* ページの基本設定 */
    @page {
        margin: 5mm;
        size: A4;
    }
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 非表示にする要素 */
    header,
    footer,
    .detail-block01,
    .detail-block05,
    .detail-block03 .flex-box,
    .detail-block02 .h-style01 {
        display: none !important;
    }

    /* レイアウトの再構築 */
    .w-style-postdetail {
        display: flex;
        flex-wrap: wrap;
    }
    .w-style-postdetail > div {
        width: 100%;
    }
    .detail-block02 {
        order: 2;
    }
    .detail-block04 {
        order: 1;
    }

    /* 履歴書のヘッダー */
    .detail-block04::before {
        content: "履歴書";
        width: 100%;
        display: block;
        text-align: center;
        font-size: 20px;
        margin-bottom: 16px;
        font-weight: bold;
    }

    /* ギャラリーセクション */
    .pr-gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 24px;
        margin-bottom: 24px;
    }
    .pr-gallery .gallery-item .img-box {
        aspect-ratio: 4/3;
        margin-bottom: 8px;
    }
    .pr-gallery .gallery-item .img-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .pr-gallery .gallery-item .img-box img {
        width: 100%;
        height: auto;
    }
    
    /* テーブルの共通スタイル */
    table {
        break-inside: avoid;
        page-break-after: auto;
        border-collapse: collapse;
        border-spacing: 0;
        width: 100%;
        table-layout: fixed;
        letter-spacing: 0em;
        margin-bottom: 16px;
        border-top: 1px solid #999999;
        border-left: 1px solid #999999;
    }
    table.sp {
        display: none;
    }
    .post-detail table th {
        background: #eee;
        width: 110px;
        text-align: center;
        border-bottom: 1px solid #999999;
        border-right: 1px solid #999999;
        font-size: 15px;
    }
    .post-detail table td {
        border-bottom: 1px solid #999999;
        border-right: 1px solid #999999;
        padding: 8px 12px;
        font-size: 16px;
    }
    table td p {
        margin: 0;
        padding: 0;
    }

    /* テーブル内の詳細スタイル */
    .detail-block04 .flex-box {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
    }
    .detail-block04 .flex-box .img-box {
        order: 2;
        width: 24%;
    }
    .detail-block04 .flex-box .img-box img {
        width: 100%;
    }
    .detail-block04 .flex-box table {
        order: 1;
        width: 72%;
    }
    .post-detail td.td-year {
        width: 72px;
        text-align: center;
        padding: 8px;
        font-size: 17px;
    }
    .post-detail td.td-month {
        width: 40px;
        text-align: center;
        padding: 8px;
        font-size: 17px;
    }
    .post-detail td.td-detail {
        padding: 8px 20px;
        font-size: 17px;
    }
    .post-detail td.td-name {
        font-size: 18px;
    }
    .post-detail td.td-pr {
        font-size: 17px;
        line-height: 1.6em;
    }
    .post-detail td.td-relationship {
        width: 110px;
    }
    .post-detail td.td-birth {
        width: 79px;
    }
    .post-detail .tb07 td.birth p {
        display: none !important;
    }

    /* その他 */
    .post-info {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 14px;
        letter-spacing: 0em;
        margin-bottom: 8px;
    }
}