/*
Theme Name: futsal-db
Theme URI: https://futsal-database.jp
Description: フットサルコートDB & Fリーグデータベース
Version: 1.0.0
Author: futsal-database.jp
*/

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    font-size: 0.9375rem;
    color: #1a1a2e;
    background: #f0f4f8;
    line-height: 1.7;
}
a { color: #0066cc; text-decoration: none; }
a:hover { color: #0052a3; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ── Variables ── */
:root {
    --primary: #0057a8;
    --primary-dark: #003d7a;
    --accent: #ff6b35;
    --accent-light: #fff4ef;
    --green: #00a86b;
    --bg: #f0f4f8;
    --white: #ffffff;
    --border: #dde3ea;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --radius: 8px;
    --header-h: 64px;
}

/* ── Wrapper ── */
#page-wrap { min-height: 100vh; display: flex; flex-direction: column; }
#main-wrap { flex: 1; max-width: 1160px; margin: 0 auto; width: 100%; padding: 0 20px; }

/* ── Header ── */
#header {
    background: var(--primary);
    height: var(--header-h);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,57,168,.25);
}
.header-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
}
.site-logo a {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
}
.site-logo a span { color: #7ec8ff; }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-nav a {
    color: rgba(255,255,255,.85);
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background .2s;
}
.header-nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
.header-nav .nav-post-btn {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 20px;
    margin-left: 8px;
}
.header-nav .nav-post-btn:hover { background: #e55a25; }

/* ── Breadcrumb ── */
.breadcrumb-wrap {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.breadcrumb-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb-inner a { color: var(--text-muted); }
.breadcrumb-inner a:hover { color: var(--primary); }
.bc-sep { color: var(--border); }

/* ── Hero (top) ── */
.hero-wrap {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #0088cc 100%);
    color: #fff;
    padding: 60px 20px 50px;
    text-align: center;
}
.hero-wrap h1 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.hero-wrap p { font-size: 1rem; opacity: .85; margin-bottom: 28px; }
.hero-count { display: inline-flex; gap: 32px; background: rgba(255,255,255,.12); border-radius: 10px; padding: 16px 32px; margin-bottom: 28px; }
.hero-count-item { text-align: center; }
.hero-count-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.hero-count-label { font-size: 0.75rem; opacity: .8; margin-top: 4px; }

/* ── Search Box ── */
.search-box-wrap {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    max-width: 800px;
    margin: 0 auto;
}
.search-box-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-box-row select,
.search-box-row input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color .2s;
}
.search-box-row select:focus,
.search-box-row input[type="text"]:focus { border-color: var(--primary); background: #fff; }
.search-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.search-btn:hover { background: var(--primary-dark); }

/* ── Section Title ── */
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.section-title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.section-title::before { content: ''; display: inline-block; width: 4px; height: 1.25em; background: var(--primary); border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.section-count { font-size: 0.82rem; color: var(--text-muted); }

/* ── Court Card Grid ── */
.court-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.court-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.court-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.court-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #dde3ea;
}
.court-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.court-card:hover .court-card-thumb img { transform: scale(1.04); }
.court-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #b0bec5;
}
.court-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.court-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.court-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 500;
}
.court-tag-pref { background: #e8f0fe; color: var(--primary); }
.court-tag-type { background: #e8f7ef; color: var(--green); }
.court-tag-indoor { background: #fff4ef; color: var(--accent); }
.court-card-name { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.court-card-address { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.court-card-meta { display: flex; gap: 12px; margin-top: auto; font-size: 0.8rem; color: var(--text-muted); }
.court-card-meta span { display: flex; align-items: center; gap: 4px; }

/* ── Archive Layout ── */
.archive-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    margin: 28px 0 48px;
    align-items: start;
}

/* ── Filter Sidebar ── */
.filter-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto;
}
.filter-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
}
.filter-header-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.filter-toggle-icon {
    display: none;
    color: var(--text-muted);
    transition: transform .3s;
}
.filter-toggle-icon svg { display: block; }
.filter-header.is-open .filter-toggle-icon { transform: rotate(180deg); }
.filter-body { padding: 16px 18px; }
.filter-group { margin-bottom: 20px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
}
.filter-list { display: flex; flex-direction: column; gap: 4px; }
.filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 0.85rem;
    color: var(--text);
    transition: background .15s;
}
.filter-link:hover { background: var(--bg); }
.filter-link.active { background: #e8f0fe; color: var(--primary); font-weight: 700; }
.filter-count { font-size: 0.75rem; color: var(--text-muted); background: var(--bg); padding: 1px 6px; border-radius: 10px; }
.filter-reset { display: block; text-align: center; font-size: 0.8rem; color: var(--text-muted); padding: 10px; border-top: 1px solid var(--border); margin-top: 16px; }
.filter-reset:hover { color: var(--accent); }

/* ── Archive Main ── */
.archive-main {}
.archive-header-bar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 10px;
}
.archive-result-count { font-size: 0.9rem; color: var(--text-muted); }
.archive-result-count strong { color: var(--text); font-weight: 700; }
.archive-sort { display: flex; gap: 6px; }
.sort-btn {
    font-size: 0.82rem;
    padding: 5px 12px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .15s;
    background: var(--white);
}
.sort-btn.active, .sort-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 32px 0;
}
.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1.5px solid var(--border);
    color: var(--text);
    transition: all .15s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

/* ── Single Court ── */
.single-court-wrap { margin: 28px 0 48px; }
.single-court-inner { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.single-court-main { min-width: 0; }
.single-court-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto;
}

/* Court Header */
.court-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.court-header-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.court-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.court-header-address { font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* Court Gallery */
.court-gallery {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.court-gallery-main { aspect-ratio: 16/9; overflow: hidden; background: #dde3ea; }
.court-gallery-main img { width: 100%; height: 100%; object-fit: cover; }

/* Court Info Table */
.court-info {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.court-info-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.court-info-table { width: 100%; border-collapse: collapse; }
.court-info-table th, .court-info-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    vertical-align: top;
    text-align: left;
}
.court-info-table th { width: 130px; color: var(--text-muted); font-weight: 500; background: var(--bg); }
.court-info-table tr:last-child th, .court-info-table tr:last-child td { border-bottom: none; }
.court-info-icon { font-size: 0.9rem; margin-right: 4px; }

/* Map */
.court-map-wrap {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.court-map-head { padding: 14px 18px; font-size: 0.95rem; font-weight: 700; border-bottom: 1px solid var(--border); }
.court-map-embed { height: 320px; }
.court-map-embed iframe { width: 100%; height: 100%; border: none; display: block; }
.court-map-placeholder { height: 100%; background: #dde3ea; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.9rem; }

/* Court Content */
.court-content-wrap {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.court-content-wrap h2 { font-size: 1.1rem; font-weight: 700; margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--primary); }
.court-content-wrap p { margin-bottom: 14px; }

/* Sidebar Widget */
.sw {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.sw:last-child { margin-bottom: 0; }
.sw-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}
.sw-official-btn {
    display: block;
    text-align: center;
    background: var(--primary);
    color: #fff;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background .2s;
}
.sw-official-btn:hover { background: var(--primary-dark); color: #fff; }

/* Nearby Courts */
.nearby-list { display: flex; flex-direction: column; gap: 10px; }
.nearby-item { display: flex; gap: 10px; align-items: flex-start; }
.nearby-thumb { width: 60px; height: 45px; border-radius: 4px; overflow: hidden; background: #dde3ea; flex-shrink: 0; }
.nearby-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nearby-body {}
.nearby-name { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.nearby-pref { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ── Top Page ── */
.top-section { margin: 32px 0; }
.top-section + .top-section { margin-top: 0; }
.top-pref-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}
.pref-btn {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text);
    transition: all .15s;
    display: block;
}
.pref-btn:hover { background: #e8f0fe; border-color: var(--primary); color: var(--primary); }
.region-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: .05em;
    margin-bottom: 8px;
    margin-top: 16px;
}
.region-title:first-child { margin-top: 0; }

/* ── Footer ── */
#footer {
    background: #0d1b2e;
    color: rgba(255,255,255,.7);
    margin-top: auto;
}
.footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-brand { }
.footer-logo { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-logo span { color: #7ec8ff; }
.footer-desc { font-size: 0.82rem; line-height: 1.7; }
.footer-nav-title { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,.9); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.footer-nav-list { display: flex; flex-direction: column; gap: 8px; }
.footer-nav-list a { font-size: 0.82rem; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-nav-list a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ── ヘッダーナビ ドロップダウン ── */
.nav-dropdown-wrap { position: relative; display: inline-block; }
.nav-dropdown-trigger { display: flex; align-items: center; gap: 3px; cursor: pointer; }
.nav-arrow { font-size: .65rem; transition: transform .2s; }
.nav-dropdown-wrap:hover .nav-arrow { transform: rotate(180deg); }
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    padding: 16px;
    padding-top: 20px;
    z-index: 9999;
    min-width: 480px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s;
}
/* 隙間を埋めるブリッジ（カーソルが途切れないように） */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}
.nav-dropdown-wrap:hover .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
}
/* header-nav a の白文字をドロップダウン内で上書き */
.nav-dropdown a,
.nav-dropdown .nav-region-head,
.nav-dropdown .nav-region-div {
    color: #333 !important;
}
.nav-dropdown .nav-region-head {
    color: var(--primary) !important;
    font-weight: 800;
}
.nav-dropdown .nav-region-div:hover {
    color: var(--primary) !important;
    background: #f0f4f8;
}
.nav-dropdown .nav-region-div--soon {
    color: #bbb !important;
}
.nav-dropdown--regional { min-width: 520px; }
.nav-dropdown--pref { min-width: 600px; }
.nav-region-col { display: flex; flex-direction: column; gap: 2px; min-width: 80px; }
.nav-region-head {
    font-size: .8rem;
    font-weight: 800;
    color: var(--primary);
    padding: 4px 6px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 4px;
    text-decoration: none;
    display: block;
}
.nav-region-head:hover { opacity: .8; }
.nav-region-div {
    font-size: .78rem;
    color: #444;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background .15s;
    text-decoration: none;
    display: block;
}
.nav-region-div:hover { background: #f0f4f8; color: var(--primary); }
.nav-region-div--soon { color: #bbb; cursor: default; }
.nav-dropdown-note { width: 100%; font-size: .75rem; color: #999; margin-top: 4px; padding-top: 8px; border-top: 1px solid #eee; }

/* 試合結果/順位切替タブ */
.match-view-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid #e2e8f0; }
.match-view-tab { padding: 8px 20px; font-size: .875rem; font-weight: 600; color: #666; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .15s; }
.match-view-tab:hover { color: var(--primary); }
.match-view-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }

/* 順位表 */
.standings-block { margin-bottom: 28px; background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); overflow: hidden; }
.standings-league-label { background: var(--primary); color: #fff; padding: 10px 16px; font-size: .85rem; font-weight: 700; }
.standings-table-wrap { overflow-x: auto; }
.standings-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.standings-table th { background: #f8fafc; padding: 8px 10px; text-align: center; font-size: .78rem; color: #666; font-weight: 600; border-bottom: 1.5px solid #e2e8f0; white-space: nowrap; }
.standings-table td { padding: 9px 10px; border-bottom: 1px solid #f0f4f8; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-table tr:hover td { background: #f8fafc; }
.st-rank { width: 36px; text-align: center; font-weight: 700; color: #888; }
.st-team { text-align: left; font-weight: 600; color: #1a1a2e; padding-left: 12px !important; }
.st-num { text-align: center; color: #444; min-width: 32px; }
.st-pts { text-align: center; font-weight: 800; color: var(--primary); min-width: 40px; }
.st-plus { color: #00a86b; font-weight: 600; }
.st-minus { color: #e53e3e; font-weight: 600; }
.standings-table tr.st-top td { background: #fffbeb; }
.standings-table tr.st-top .st-rank { color: var(--accent); }

/* 試合詳細ページ */
.match-detail-wrap { max-width: 860px; margin: 0 auto; padding: 24px 0 60px; }
.match-hero { background: var(--primary); border-radius: 14px; padding: 28px 20px; text-align: center; margin-bottom: 24px; }
.match-hero-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.match-hero-league { font-size: .85rem; color: rgba(255,255,255,.8); font-weight: 600; }
.match-hero-round { font-size: .78rem; color: rgba(255,255,255,.6); }
.match-hero-score { display: flex; align-items: center; justify-content: center; gap: 16px; }
.match-hero-team { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: 260px; }
.match-hero-team.away { flex-direction: column-reverse; }
.mh-team-name { font-size: 1rem; font-weight: 700; color: #fff; }
.mh-score { font-size: 3rem; font-weight: 900; color: #fff; line-height: 1; }
.match-hero-team.win .mh-score { color: #ffd700; }
.match-hero-team.lose .mh-score { color: rgba(255,255,255,.5); }
.match-hero-sep { font-size: 2rem; color: rgba(255,255,255,.4); font-weight: 300; }
.match-hero-date { margin-top: 14px; font-size: .85rem; color: rgba(255,255,255,.7); }
.match-detail-body { display: flex; flex-direction: column; gap: 20px; }
.match-detail-card { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); overflow: hidden; }
.match-detail-title { font-size: .95rem; font-weight: 700; padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; margin: 0; }
.match-detail-table { width: 100%; border-collapse: collapse; }
.match-detail-table th { width: 100px; padding: 12px 16px; font-size: .84rem; color: #666; font-weight: 600; text-align: left; border-bottom: 1px solid #f0f4f8; background: #fafafa; }
.match-detail-table td { padding: 12px 16px; font-size: .9rem; color: #1a1a2e; border-bottom: 1px solid #f0f4f8; }
.match-detail-table tr:last-child th, .match-detail-table tr:last-child td { border-bottom: none; }
/* ── 得点記録 ── */
.match-scorers-wrap { display: flex; gap: 0; }
.match-scorers-side { flex: 1; padding: 16px; }
.match-scorers-side.away { text-align: right; border-left: 1px solid #f0f4f8; }
.match-scorers-sep { width: 1px; background: #f0f4f8; }
.match-scorers-team { font-size: .82rem; font-weight: 700; color: #888; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .04em; }
.match-scorer-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid #f8fafc; }
.match-scorers-side.away .match-scorer-row { justify-content: flex-end; }
.scorer-time { font-size: .78rem; color: #888; white-space: nowrap; min-width: 50px; }
.scorers-side.away .scorer-time { text-align: right; }
.scorer-name { font-size: .9rem; font-weight: 600; color: #1a1a2e; }
.scorer-type { font-size: .72rem; background: #e8f0fe; color: #2563eb; padding: 1px 5px; border-radius: 3px; font-weight: 700; }
.match-scorer-none { color: #bbb; font-size: .85rem; padding: 4px 0; }

/* ── 警告・退場カード ── */
.match-card-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid #f8fafc; }
.match-scorers-side.away .match-card-row { justify-content: flex-end; }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 24px; border-radius: 3px; font-size: .65rem; font-weight: 900; line-height: 1; }
.card-yellow { background: #f59e0b; color: #fff; }
.card-red    { background: #dc2626; color: #fff; }
.card-reason { font-size: .72rem; background: #fff3cd; color: #856404; padding: 1px 5px; border-radius: 3px; }

/* ── 出場選手 ── */
.match-players-wrap { display: flex; gap: 0; }
.match-players-side { flex: 1; border-left: 1px solid #f0f4f8; }
.match-players-side:first-child { border-left: none; }
.match-players-head { padding: 12px 14px 8px; border-bottom: 1px solid #f0f4f8; }
.players-team-name { font-size: .85rem; font-weight: 700; color: #1a1a2e; display: block; }
.players-coach { font-size: .75rem; color: #888; display: block; margin-top: 2px; }
.match-players-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.match-players-table th { padding: 6px 10px; background: #f8fafc; color: #888; font-size: .75rem; font-weight: 700; text-align: left; border-bottom: 1px solid #e2e8f0; }
.match-players-table td { padding: 6px 10px; border-bottom: 1px solid #f0f4f8; color: #333; }
.match-players-table tr:last-child td { border-bottom: none; }
.match-players-table tr.played-no { opacity: .4; }
.pl-number { color: #888; font-size: .78rem; width: 28px; }
.pl-pos { width: 32px; font-size: .78rem; color: #555; }
.pl-played { text-align: center; width: 32px; font-weight: 700; color: var(--primary); }
.match-players-table tr.played-no .pl-played { color: #bbb; }

.match-row-link { text-decoration: none; color: inherit; display: block; }
.match-row-link:hover .match-row { background: #f8fafc; }
.match-row-date-small { font-size: .75rem; color: #aaa; margin-left: auto; }

/* ── 試合アーカイブ ── */
.match-archive-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 0 60px; }
.match-archive-inner { background: transparent; }
.match-archive-head h1 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin-bottom: 20px; }

.match-cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 2px solid #e2e8f0; padding-bottom: 12px; }
.match-cat-tab { padding: 8px 20px; border-radius: 20px; font-size: .875rem; font-weight: 600; color: #555; background: #fff; border: 1.5px solid #dde3ec; transition: all .18s; }
.match-cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.match-cat-tab.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

.match-archive-layout { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
.match-archive-main { min-width: 0; }
.match-archive-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }

.match-date-group { margin-bottom: 20px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.match-date-label { background: #f0f4f8; padding: 8px 16px; font-size: .82rem; font-weight: 700; color: #444; border-bottom: 1px solid #e2e8f0; letter-spacing: .05em; }

.match-row { padding: 12px 16px; border-bottom: 1px solid #f0f4f8; transition: background .15s; }
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: #f8fafc; }

.match-row-league { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.match-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: .03em; }
.badge-fleague { background: #0057a8; color: #fff; }
.badge-regional { background: #00a86b; color: #fff; }
.badge-pref { background: #f97316; color: #fff; }
.match-badge-name { font-size: .82rem; font-weight: 600; color: #333; }
.match-round { font-size: .78rem; color: #888; margin-left: auto; }

.match-row-score { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.match-team { font-size: .9rem; font-weight: 600; color: #1a1a2e; flex: 1; }
.match-home { text-align: right; }
.match-away { text-align: left; }
.match-score { display: flex; align-items: center; gap: 6px; min-width: 80px; justify-content: center; }
.match-score strong { font-size: 1.25rem; font-weight: 800; color: var(--primary); min-width: 24px; text-align: center; }
.score-sep { font-size: 1rem; color: #aaa; font-weight: 400; }

.match-row-meta { display: flex; gap: 12px; font-size: .78rem; color: #888; margin-top: 4px; flex-wrap: wrap; }
.match-venue::before { content: "📍 "; font-size: .72rem; }

/* サイドバーフィルター */
.mf-box { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 16px; margin-bottom: 16px; }
.mf-title { font-size: .85rem; font-weight: 700; color: #444; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1.5px solid #e2e8f0; }
.mf-list { display: flex; flex-direction: column; gap: 3px; }
.mf-item { font-size: .84rem; color: #444; padding: 5px 10px; border-radius: 6px; transition: background .15s; }
.mf-item:hover { background: #f0f4f8; color: var(--primary); }
.mf-item.is-active { background: var(--primary); color: #fff; font-weight: 600; }
.mf-group { font-size: .75rem; font-weight: 700; color: #999; margin-top: 8px; margin-bottom: 3px; padding: 0 10px; letter-spacing: .05em; text-transform: uppercase; }
.mf-item-sub { padding-left: 18px; font-size: .81rem; }

/* ページネーション */
.archive-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 28px 0 8px; }
.page-btn { padding: 8px 20px; border-radius: 6px; background: #fff; border: 1.5px solid #dde3ec; font-size: .875rem; font-weight: 600; color: var(--primary); transition: all .15s; }
.page-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-info { font-size: .875rem; color: #888; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .court-grid { grid-template-columns: repeat(2, 1fr); }
    .top-pref-grid { grid-template-columns: repeat(6, 1fr); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .footer-cols > *:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .archive-layout { grid-template-columns: 1fr; }
    .match-archive-layout { grid-template-columns: 1fr; }
    .match-archive-sidebar { position: static; }
    .filter-sidebar { position: static; max-height: none; overflow-y: visible; }
    .filter-toggle-icon { display: block; }
    .filter-body { max-height: 0; overflow: hidden; padding: 0 18px; transition: max-height .35s ease, padding .3s; }
    .filter-body.is-open { max-height: 1400px; padding: 16px 18px; }
    .single-court-inner { grid-template-columns: 1fr; }
    .single-court-sidebar { position: static; max-height: none; }
}
@media (max-width: 768px) {
    :root { --header-h: 56px; }
    .header-inner { padding: 0 14px; }
    .site-logo a { font-size: 1rem; }
    .header-nav { display: none; }
    .hero-wrap { padding: 40px 16px 36px; }
    .hero-wrap h1 { font-size: 1.5rem; }
    .hero-count { gap: 20px; padding: 14px 20px; }
    .hero-count-num { font-size: 1.5rem; }
    #main-wrap { padding: 0 14px; }
    .court-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .top-pref-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-cols { grid-template-columns: 1fr; gap: 24px; }
    .match-row-score { flex-direction: column; align-items: stretch; gap: 4px; }
    .match-home { text-align: left; }
    .match-score { justify-content: flex-start; }
}
@media (max-width: 480px) {
    .court-grid { grid-template-columns: 1fr; }
    .top-pref-grid { grid-template-columns: repeat(3, 1fr); }
    .search-box-row { flex-direction: column; }
    .search-btn { width: 100%; }
}

/* ── 過去シーズン折りたたみ ── */
.mf-past-seasons { margin-top: 2px; }
.mf-past-toggle {
  cursor: pointer;
  font-size: .78rem;
  color: #888;
  padding: 4px 8px;
  list-style: none;
  user-select: none;
}
.mf-past-toggle::-webkit-details-marker { display: none; }
.mf-past-toggle::before { content: '▸ '; font-size: .7rem; }
details[open] .mf-past-toggle::before { content: '▾ '; }

/* ── チームページ ── */
.team-page-wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 40px; }
.team-header-block { padding: 24px 0 16px; border-bottom: 2px solid #e8f0ea; margin-bottom: 20px; }
.team-page-name { font-size: 1.6rem; font-weight: 700; margin: 0 0 4px; color: #1a3a1a; }
.team-page-div { font-size: .875rem; color: #666; margin: 0 0 10px; }

.team-meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 12px; font-size: .875rem; color: #555; }
.team-meta-item { display: flex; gap: 6px; align-items: center; }
.team-meta-label { font-size: .75rem; font-weight: 600; color: #888; background: #f0f4f0; padding: 1px 6px; border-radius: 3px; }
.team-meta-url { font-size: .8rem; color: #2d7a2d; text-decoration: none; border: 1px solid #2d7a2d; border-radius: 4px; padding: 2px 8px; }
.team-meta-url:hover { background: #2d7a2d; color: #fff; }

.team-season-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.season-tab { font-size: .8rem; padding: 4px 12px; border-radius: 20px; background: #f0f4f0; color: #555; text-decoration: none; }
.season-tab.is-active { background: #2d7a2d; color: #fff; font-weight: 600; }

.team-page-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 680px) { .team-page-layout { grid-template-columns: 1fr; } }

.team-section-title { font-size: 1rem; font-weight: 700; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid #e0e8e0; color: #1a3a1a; }
.team-no-data { color: #999; font-size: .875rem; }
.team-roster-note { font-size: .78rem; color: #aaa; margin: 0 0 8px; }

.team-roster-wrap { overflow-x: auto; }
.team-roster-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.team-roster-table th { background: #f5f8f5; font-size: .78rem; font-weight: 600; color: #555; padding: 6px 8px; text-align: left; border-bottom: 1px solid #dde8dd; }
.team-roster-table td { padding: 6px 8px; border-bottom: 1px solid #f0f4f0; }
.team-roster-table .roster-gk td { background: #fffbf0; }
.tr-num, .tr-pos, .tr-apps, .tr-goals { text-align: center; width: 40px; }
.tr-height, .tr-weight { text-align: center; width: 52px; }
.tr-birthday { width: 96px; font-size: .8rem; color: #777; }
.cap-badge { display: inline-block; font-size: .65rem; font-weight: 700; color: #fff; background: #e08000; border-radius: 3px; padding: 1px 4px; margin-left: 4px; vertical-align: middle; }

.team-staff-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: .82rem; }
.team-staff-item { display: flex; gap: 5px; align-items: center; color: #555; }
.staff-role { font-size: .72rem; background: #e8f0e8; color: #3a6a3a; padding: 1px 5px; border-radius: 3px; }

.team-matches-list { display: flex; flex-direction: column; gap: 4px; }
.team-match-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border: 1px solid #e8ede8; border-radius: 6px; text-decoration: none; color: #333; font-size: .875rem; }
.team-match-row:hover { background: #f5faf5; border-color: #c0d8c0; }
.tm-date { font-size: .8rem; color: #888; min-width: 36px; }
.tm-result { font-size: .72rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; min-width: 20px; text-align: center; }
.tm-result--win { background: #e8f5e8; color: #2a6a2a; }
.tm-result--loss { background: #fde8e8; color: #a02020; }
.tm-result--draw { background: #f5f5e0; color: #7a7a20; }
.tm-result--tbd { background: #f0f0f0; color: #999; }
.tm-score { font-weight: 700; min-width: 40px; text-align: center; }
.tm-vs { font-size: .72rem; color: #bbb; }
.tm-opponent { flex: 1; }

/* チームリスト */
.team-grid { display: flex; flex-direction: column; gap: 0; padding: 4px 0; }
.team-grid-item { display: flex; align-items: center; padding: 11px 14px; background: #fff; border-bottom: 1px solid #f0f0f0; font-size: .92rem; font-weight: 500; color: #1a3a5c; text-decoration: none; transition: background .12s; }
.team-grid-item:first-child { border-top: 1px solid #f0f0f0; }
.team-grid-item:hover { background: #f5f8ff; color: #1d4ed8; }
