/* === 共通スタイル === */
body {
    font-family: Arial, sans-serif;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
    table-layout: fixed;
    word-wrap: break-word;
}

th,
td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    word-break: break-all;
}

th {
    background-color: #f2f2f2;
}

/* 検索ボックスまわり */
#searchContainer {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
}

#searchBox {
    width: 300px;
    padding: 8px;
    font-size: 16px;
    margin-left: 1px;
    flex: 1;
}

#clearButton {
    padding: 8px 12px;
    font-size: 16px;
    margin-left: 8px;
    cursor: pointer;
    flex: 0 0 auto;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button,
.pagination span {
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
}

/* === スマホ表示（768px以下） === */

/* === スマホ表示（768px以下） === */
@media screen and (max-width: 768px) {
    .main_contents {
        float: none;
        margin-bottom: 12vw;
        width: 100% !important;
        padding: 0;
        box-sizing: border-box;
    }

    .main_contents h1 {
        padding: 2.4vw;
        margin-bottom: 6.6667vw;
        font-size: 4vw;
    }

    .main_contents input[type="text"],
    .main_contents button {
        font-size: 4vw;
        padding: 2vw;
        margin: 1vw;
    }

    .main_contents .searchContainer {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 2vw;
        justify-content: flex-start;
        margin-bottom: 4vw;
        width: 100%;
        align-items: center;
    }

    /* 修正：flexによる幅制御 + 横スクロール防止 */
    #searchBox {
        flex: 1;
        min-width: 0;
        /* ←追加：横スクロール防止 */
        width: auto;
        /* ←calcを廃止 */
        padding: 2vw;
        font-size: 4vw;
        margin-left: 0;
    }

    #clearButton {
        flex: 0 0 90px;
        /* ←固定幅をflexで指定 */
        padding: 2vw;
        font-size: 4vw;
        margin-left: 2vw;
    }

    .main_contents table {
        width: 100%;
        font-size: 3.5vw;
        table-layout: fixed;
        word-wrap: break-word;
    }

    .main_contents .pagination {
        display: flex;
        justify-content: center;
        gap: 2vw;
        margin-top: 4vw;
        font-size: 4vw;
    }

    .main_contents .status {
        text-align: center;
        margin-top: 4vw;
        font-size: 3.5vw;
    }

    /* カラム幅指定 */
    table th:nth-child(1),
    table td:nth-child(1) {
        width: 40%;
        word-break: break-word;
    }

    table th:nth-child(2),
    table td:nth-child(2) {
        width: 25%;
        white-space: nowrap;
    }

    table th:nth-child(3),
    table td:nth-child(3) {
        width: 35%;
        white-space: nowrap;
        text-align: center;
    }

    table td:nth-child(3) a {
        display: inline-block;
        background-color: #0072c6;
        color: white;
        padding: 6px 6px;
        border-radius: 4px;
        text-decoration: none;
        font-size: 3.2vw;
        text-align: center;
        width: 85%;
    }

    table td:nth-child(3) a:hover {
        background-color: #005fa3;
    }
}

/* === PC表示（769px以上） === */
@media screen and (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        /* 横スクロールを出さない */
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .main_contents,
    #searchContainer {
        max-width: 100%;
        box-sizing: border-box;
    }
}


/* === PC表示（769px以上） === */
@media screen and (min-width: 769px) {
    .main_contents {
        width: 948px;
        margin: 0 auto;
    }

    /* カラム幅指定 */
    table th:nth-child(1),
    table td:nth-child(1) {
        width: 70%;
    }

    table th:nth-child(2),
    table td:nth-child(2) {
        width: 15%;
    }

    table th:nth-child(3),
    table td:nth-child(3) {
        width: 15%;
    }

    table td:nth-child(3) {
        text-align: center;
        vertical-align: middle;
    }

    table td:nth-child(3) a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-color: #0072c6;
        color: #fff;
        padding: 5px 12px;
        border-radius: 4px;
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        min-width: 110px;
        line-height: 1;
        text-align: center;
        transition: background-color 0.2s ease;
    }

    table td:nth-child(3) a:hover {
        background-color: #005fa3;
    }

    table tbody tr:hover {
        background-color: #f0f8ff;
    }

    table td:nth-child(1) a {
        color: #333;
        text-decoration: none;
    }

    table td:nth-child(1) a:hover {
        text-decoration: underline;
        color: #0072c6;
    }

    /* PC専用検索ボックス */
    #searchBox {
        width: 300px !important;
        flex: 0 0 auto;
    }
}

/* ラベルの基本スタイル */
.searchLabel {
    font-size: 16px;
    margin-right: 4px;
    white-space: nowrap;
}

/* スマホ表示時（768px以下）：ラベルを改行させる */
@media screen and (max-width: 768px) {
    #searchContainer {
        flex-wrap: wrap;
        /* 要素を折り返し可能にする */
    }

    .searchLabel {
        flex: 1 0 100%;
        /* ラベルを1行全幅にする */
        margin-bottom: 2px;
        line-height: 0.5;
        /* 必要なら文字の上下余白も少し詰める */
    }

    #searchBox {
        flex: 1 1 auto;
        /* 入力欄をできるだけ広く */
        width: auto;
        /* 固定幅を解除 */
        min-width: 0;
    }

    #clearButton {
        flex: 0 0 auto;
        /* クリアボタンは縮小しない */
    }
}

.notice {
    background-color: #fffaf0;
    /* 注意書き背景色 */
    padding: 8px ;
    margin-bottom: 25px;
}

.notice p {
    font-size: 15px;
    margin: 10px 0;
}

.notice a.txtLink {
    color: #0066b3;
    text-decoration: underline;
    transition: text-decoration 0.2s ease; /* ホバー時のスムーズな変化 */
}

.notice a.txtLink:hover {
    color: #0066b3;
    text-decoration: none;
}

/* ページの中身のマージンを少なく */
#contentInner>.inner {
    padding: 30px 50px 130px;
    position: relative;
}