@charset "UTF-8";
/* 募集一覧(/relations)- 仕様書 2026-08-05 対応。2026-08-06 板羽
   文字サイズはトップページと同じ可変指定(clamp)に揃え、画像を使わない表組みで構成する。
   アクセントはブランド赤 #BF4328。 */

:root {
    --rel-ink: #2b2320;
    --rel-muted: #6b6560;
    --rel-line: #e4e0da;
    --rel-line-soft: #f0ece6;
    --rel-accent: #BF4328;
    --rel-tint: #faf8f5;
}

.rel-page {
    padding-bottom: 4rem;
    color: var(--rel-ink);
    font-size: clamp(.82rem, .79rem + .15vw, .9rem);
    line-height: 1.9;
}

/* ── 導入文 ── */
.rel-intro {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2.5rem 0 0.5rem;
}
.rel-intro p {
    margin: 0 0 .9rem !important;
    font-weight: 500;
    text-align: justify;
}
.rel-intro p:last-child {
    color: var(--rel-muted);
    font-size: clamp(.78rem, .74rem + .15vw, .86rem);
}

/* ── 見出し(トップの top_title と同じ気配に揃える) ── */
.rel-heading {
    margin: 0 0 1.6rem !important;
    font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem) !important;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: center;
}

/* ── 絞り込み ── */
.rel-search {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2.6rem 0 0;
}
.rel-filter {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1rem 1.4rem;
    align-items: start;
    padding: 1.15rem 0;
    border-top: 1px solid var(--rel-line);
}
.rel-filter:last-of-type {
    border-bottom: 1px solid var(--rel-line);
}
.rel-filter__label {
    margin: 0 !important;
    font-weight: 700;
    line-height: 2.1;
}
.rel-filter__choices {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .6rem;
}

/* 選択肢は「押せる面」にする(素のチェックボックスより指で押しやすい) */
.rel-choice {
    position: relative;
    margin: 0;
    cursor: pointer;
}
.rel-choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.rel-choice span {
    display: inline-block;
    padding: .5rem 1.05rem;
    border: 1px solid var(--rel-line);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
    line-height: 1.6;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.rel-choice:hover span {
    border-color: #cfc8bf;
    background: var(--rel-tint);
}
.rel-choice input:checked + span {
    border-color: var(--rel-accent);
    background: var(--rel-accent);
    color: #fff;
}
.rel-choice input:focus-visible + span {
    outline: 2px solid var(--rel-accent);
    outline-offset: 2px;
}

.rel-search__actions {
    display: flex;
    justify-content: center;
    gap: .7rem;
    padding: 1.8rem 0 0;
}
.rel-btn {
    display: inline-block;
    min-width: 11rem;
    padding: .7rem 2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: inherit;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    cursor: pointer;
    transition: opacity .18s ease, background-color .18s ease, color .18s ease;
}
.rel-btn--primary {
    color: #fff;
    background: var(--rel-accent);
}
.rel-btn--primary:hover {
    opacity: .88;
    color: #fff;
}
.rel-btn--ghost {
    border-color: var(--rel-line);
    color: var(--rel-muted);
    background: #fff;
}
.rel-btn--ghost:hover {
    border-color: #cfc8bf;
    color: var(--rel-ink);
    background: var(--rel-tint);
}

/* ── 一覧(表)── 枠で囲わず、細い横罫だけで区切る ── */
.rel-result {
    padding: 3.4rem 0 0;
}
.rel-count {
    margin: -0.6rem 0 1.2rem !important;
    color: var(--rel-muted);
    font-size: clamp(.76rem, .73rem + .14vw, .82rem);
    text-align: center;
}
.rel-empty {
    padding: 2.5rem 0;
    color: var(--rel-muted);
    text-align: center;
}
.rel-table-wrap {
    overflow-x: auto;
}
.rel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(.82rem, .79rem + .15vw, .9rem);
}

/* 列幅:名称と自治体・団体名を広めに、他は内容ぶんだけ */
.rel-table th:nth-child(1) { width: 8.5rem; }
.rel-table th:nth-child(2) { width: 7.5rem; }
.rel-table th:nth-child(3) { width: 5.5rem; }
.rel-table th:nth-child(4) { width: 6rem; }
.rel-table th:nth-child(5) { width: 25%; }
.rel-table th:nth-child(6) { width: 25%; }
.rel-table th:nth-child(7) { width: 6rem; }
.rel-table th:nth-child(8) { width: 5.5rem; }

/* 短い項目だけ折り返さない */
.rel-table th:nth-child(1), .rel-table td:nth-child(1),
.rel-table th:nth-child(2), .rel-table td:nth-child(2),
.rel-table th:nth-child(3), .rel-table td:nth-child(3),
.rel-table th:nth-child(4), .rel-table td:nth-child(4),
.rel-table th:nth-child(7), .rel-table td:nth-child(7),
.rel-table th:nth-child(8), .rel-table td:nth-child(8) {
    white-space: nowrap;
}

/* common.css の th/td に 1px の実線枠が入っているため、ここで打ち消して横罫だけにする */
.rel-table th,
.rel-table td {
    padding: 1.05rem .9rem;
    text-align: left;
    vertical-align: middle;
    font-weight: 500;
    border: 0;
    border-bottom: 1px solid var(--rel-line-soft);
}
.rel-table th:first-child,
.rel-table td:first-child {
    padding-left: .2rem;
}
.rel-table th:last-child,
.rel-table td:last-child {
    padding-right: .2rem;
}
.rel-table thead th {
    padding-top: .5rem;
    padding-bottom: .7rem;
    border: 0;
    border-bottom: 1px solid var(--rel-line);
    color: var(--rel-muted);
    font-size: clamp(.72rem, .7rem + .1vw, .78rem);
    font-weight: 700;
    letter-spacing: .06em;
    white-space: nowrap;
}
.rel-table tbody tr:last-child th,
.rel-table tbody tr:last-child td {
    border-bottom: 0;
}
.rel-table tbody tr:hover th,
.rel-table tbody tr:hover td {
    background: #fbf9f6;
}
.rel-table__name {
    font-weight: 700;
}
.rel-table__name a {
    color: var(--rel-ink);
    text-decoration: none;
    border-bottom: 1px solid #d8d2ca;
    padding-bottom: .1em;
}
.rel-table__name a:hover {
    color: var(--rel-accent);
    border-bottom-color: currentColor;
}
.rel-tag {
    display: inline-block;
    padding: .22rem .68rem;
    border-radius: 999px;
    background: #eef4ee;
    color: #2f6b3a;
    font-size: clamp(.7rem, .68rem + .1vw, .76rem);
    font-weight: 700;
    line-height: 1.7;
    white-space: nowrap;
}

/* 詳細ボタン */
.rel-detail {
    display: inline-block;
    padding: .34rem 1.05rem;
    border: 1px solid var(--rel-accent);
    border-radius: 999px;
    color: var(--rel-accent);
    font-size: clamp(.72rem, .7rem + .1vw, .78rem);
    font-weight: 700;
    line-height: 1.7;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease;
}
.rel-detail:hover {
    background: var(--rel-accent);
    color: #fff;
}
.rel-detail--off {
    border-color: var(--rel-line);
    color: #b9b2aa;
    pointer-events: none;
}

.rel-cta {
    display: flex;
    justify-content: center;
    padding: 2.8rem 0 0;
}

/* ── スマホ:表を1件ずつのカードに積み替える(横スクロールを強いない) ── */
@media screen and (max-width: 767px) {
    .rel-filter {
        grid-template-columns: 1fr;
        gap: .6rem;
    }
    .rel-filter__label {
        line-height: 1.6;
    }
    .rel-table-wrap {
        overflow-x: visible;
    }
    .rel-table,
    .rel-table tbody,
    .rel-table tr,
    .rel-table th,
    .rel-table td {
        display: block;
        width: 100%;
    }
    .rel-table thead {
        display: none;
    }
    .rel-table {
        white-space: normal;
    }
    .rel-table tbody tr {
        margin-bottom: 1.4rem;
        padding-bottom: .6rem;
        border-bottom: 1px solid var(--rel-line);
    }
    .rel-table tbody tr:last-child {
        border-bottom: 0;
    }
    .rel-table th,
    .rel-table td {
        border: 0;
    }
    .rel-table th,
    .rel-table td {
        display: grid;
        grid-template-columns: 7.5rem minmax(0, 1fr);
        gap: .8rem;
        padding: .55rem .9rem;
        white-space: normal;
    }
    .rel-table th::before,
    .rel-table td::before {
        content: attr(data-label);
        color: var(--rel-muted);
        font-size: clamp(.74rem, .71rem + .12vw, .8rem);
        font-weight: 700;
    }
    .rel-table td:empty {
        display: none;
    }
    .rel-table__name {
        min-width: 0;
    }
    .rel-search__actions .rel-btn {
        min-width: 8.5rem;
    }
}

/* ── 文字サイズの統一 ──
   extra.css の `p, span, li, th, tr, label { font-size: 1rem }` が全体に効いているため、
   このページ配下は指定のクランプで上書きする(トップの表も同じ見え方に揃える)。 */
.rel-page,
.rel-page p,
.rel-page span,
.rel-page li,
.rel-page label,
.rel-page a,
.rel-page th,
.rel-page td,
.rel-table,
.rel-table p,
.rel-table span,
.rel-table th,
.rel-table td,
.rel-table a,
#recruit .rel-table th,
#recruit .rel-table td,
#recruit .rel-table span,
#recruit .rel-table a {
    font-size: clamp(.82rem, .79rem + .15vw, .9rem) !important;
    letter-spacing: .02em;
}

/* 補助的な文字だけ一段小さく */
.rel-page .rel-intro p:last-child,
.rel-page .rel-count,
.rel-table thead th,
.rel-page .rel-tag,
.rel-page .rel-detail,
.rel-table .rel-tag,
.rel-table .rel-detail,
#recruit .rel-table thead th,
#recruit .rel-table .rel-tag,
#recruit .rel-table .rel-detail {
    font-size: clamp(.74rem, .72rem + .12vw, .8rem) !important;
}

/* 見出しは見出しのまま(上書きの巻き添えを防ぐ) */
.rel-page .rel-heading {
    font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem) !important;
}

/* ── 文字サイズの統一(テーマ側の指定に負けないよう明示)── */
.rel-page,
.rel-intro p,
.rel-filter__label,
.rel-choice span,
.rel-btn,
.rel-table,
.rel-table th,
.rel-table td {
    font-size: clamp(.82rem, .79rem + .15vw, .9rem) !important;
}
.rel-intro p:last-child,
.rel-count,
.rel-table thead th,
.rel-tag,
.rel-detail {
    font-size: clamp(.74rem, .72rem + .1vw, .8rem) !important;
}

/* ── トップの表:全幅に広がるため、本文と同じ幅(コンテナ幅)に収める ── */
#site-content #recruit .rel-table-wrap {
    width: min(1000px, calc(100% - 30px));   /* /relations の本文幅と揃える */
    margin: 0 auto;
    text-align: left;
}
