/* ===========================
   ベース（前ページと共通設計でも単体で動作）
   =========================== */
:root {
    --s1: .25rem;
    --s2: .5rem;
    --s3: .75rem;
    --s4: 1rem;
    --s5: 1.5rem;
    --s6: 2rem;
    --s7: 3rem;
    --card: #fff;
    --bg: #f7f7f9;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #0ea5e9;
    --primary-weak: #e0f2fe;
    --danger: #ef4444;
    --ok: #10b981;
    --warn: #f59e0b;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, .06);
    --ff: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "游ゴシック体", YuGothic, system-ui, -apple-system, sans-serif;
    --lh: 1.8;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: clamp(.875rem, .75rem+1vw, 1.125rem)/var(--lh) var(--ff)
}

/* ===========================
   カード＆見出し
   =========================== */
.contents_m {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: clip;
}


.contents_m>.main {
    padding: clamp(var(--s5), 2vw+var(--s4), var(--s7));
}

/* ===========================
   ページネーション（上/下共通）
   =========================== */
.search_page {
    margin-block: var(--s5);
    display: grid;
    gap: var(--s3);
}

.search_page>p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(.9rem, .85rem+.2vw, 1rem)
}

.search_page>ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: var(--s2);
    flex-wrap: wrap
}

.search_page>ul>li {
    min-width: 2.25rem;
    height: 2.25rem;
    padding-inline: .5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.search_page>ul>li.focus {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

.search_page a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.search_page a:hover {
    background: color-mix(in oklab, var(--primary-weak), var(--card) 70%)
}

/* ===========================
   凡例（本人確認）
   =========================== */
.message {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-block: var(--s4);
    color: var(--muted);
}

.message .att {
    display: inline-grid;
    place-items: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: .1rem .35rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: .95em;
    line-height: 1;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.message .att:first-of-type {
    background: color-mix(in oklab, var(--ok) 20%, var(--card));
    border-color: color-mix(in oklab, var(--ok) 40%, var(--border));
}

.message .att:last-of-type {
    background: color-mix(in oklab, var(--warn) 20%, var(--card));
    border-color: color-mix(in oklab, var(--warn) 40%, var(--border));
}

/* ===========================
   テーブル（モバイルファースト）
   =========================== */
.list_table {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    overflow: hidden;
    /* 小画面は安全に横スクロール */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow);
}

/* テーブル本体 */
.list_table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
    /* 列数的にこのくらいが実用ライン */
}

/* ヘッダー */
.list_table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, color-mix(in oklab, var(--primary-weak) 55%, transparent) 0%, transparent 100%);
    color: var(--text);
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    padding: .85rem 1rem;
    font-size: .95em;
}

/* セル */
.list_table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    background: var(--card);
    color: var(--text);
}

/* 列ごとの整列補正（HTMLのclassを尊重） */
td.center {
    text-align: center
}

td.right {
    text-align: right
}

/* ストライプ */
.list_table tbody tr:nth-child(even) td {
    background: color-mix(in oklab, var(--card) 92%, var(--primary-weak));
}

/* 最終行のボーダー削除（視覚的にすっきり） */
.list_table tbody tr:last-child td {
    border-bottom: 0
}

/* 氏名/ニックネーム内の本人確認アイコン */
td .att {
    display: inline-grid;
    place-items: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-right: .4rem;
    font-size: .9em;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--card);
}

td .att:contains("★"),
td .att:is(.verified) {
    /* 将来クラスでも判定可能に */
    background: color-mix(in oklab, var(--ok) 20%, var(--card));
    border-color: color-mix(in oklab, var(--ok) 40%, var(--border));
}

/* 操作列（ボタン風） */
.operation {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.operation li a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .8rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--card) 90%, var(--primary-weak));
    color: var(--text);
    transition: background .2s ease, border-color .2s ease, transform .05s ease;
    will-change: transform;
}

.operation li.more a::before {
    content: "🔎";
}

.operation li a:hover {
    background: color-mix(in oklab, var(--primary-weak) 85%, var(--card));
    border-color: color-mix(in oklab, var(--border), var(--primary) 25%);
}

.operation li a:active {
    transform: translateY(1px);
}

/* 行ホバー（操作性UP：大きい画面のみ有効） */
@media (hover:hover) and (pointer:fine) {
    .list_table tbody tr:hover td {
        background: color-mix(in oklab, var(--primary-weak) 80%, var(--card));
    }
}

/* ===========================
   ブレークポイント
   =========================== */

/* 600px~：行間・余白を少し広げる */
@media (min-width:600px) {
    .contents_m>.main {
        padding: clamp(var(--s6), 1.5vw + var(--s6), var(--s7));
    }

    .list_table th,
    .list_table td {
        padding: 1rem 1.1rem;
    }
}

/* 900px~：テーブル最適化（最小幅解除・列幅調整） */
@media (min-width:900px) {
    .list_table table {
        min-width: 100%;
    }

    .list_table th:nth-child(1),
    .list_table td:nth-child(1) {
        width: 12ch;
    }

    /* 現住所（短め想定） */
    .list_table th:nth-child(2),
    .list_table td:nth-child(2) {
        width: 18ch;
    }

    /* ニックネーム */
    .list_table th:nth-child(3),
    .list_table td:nth-child(3) {
        width: 6ch;
    }

    /* 性別 */
    .list_table th:nth-child(4),
    .list_table td:nth-child(4) {
        width: 8ch;
    }

    /* 年齢 */
    .list_table th:nth-child(5),
    .list_table td:nth-child(5) {
        width: 22ch;
    }

    /* 職種 */
    .list_table th:nth-child(6),
    .list_table td:nth-child(6) {
        width: 22ch;
    }

    /* 得意分野 */
    .list_table th:nth-child(7),
    .list_table td:nth-child(7) {
        width: 1%;
        white-space: nowrap;
    }

    /* 操作 */
}

/* 1200px~：密度をさらに調整 */
@media (min-width:1200px) {

    .list_table th,
    .list_table td {
        padding: 1.1rem 1.25rem;
    }
}

/* ===========================
   アクセシビリティ＆印刷
   =========================== */
:where(a, button, [tabindex]:not([tabindex="-1"])):focus {
    outline: 3px solid color-mix(in oklab, var(--primary) 70%, white);
    outline-offset: 3px;
    border-radius: 6px;
}

@media print {
    body {
        background: #fff
    }

    .contents_m {
        box-shadow: none;
        border-color: #ddd
    }

    .list_table {
        overflow: visible
    }

    .list_table th {
        position: static;
        background: #f2f2f2;
        color: #000
    }

    a {
        color: #000;
        text-decoration: underline
    }
}

@media (max-width: 768px) {
    .search_page {
        padding: 0 16px;
    }

    .message,
    .list_table {
        margin: 16px;
    }
}