/* =========================
   自動更新バナー
   ========================= */
.update-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #e8f5e9, #f1f8e9);
    border-left: 4px solid #4caf50;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    color: #2e7d32;
}
.update-banner i {
    font-size: 1rem;
}

/* =========================
   基本スタイル
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066CC;
    --secondary-color: #FFD700;
    --premier-color: #D4AF37;
    --prince-color: #4A90E2;
    --prefecture-color: #7FB3D5;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================
   ヘッダー
   ========================= */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004999 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title i {
    color: var(--secondary-color);
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* =========================
   メインコンテンツ
   ========================= */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* =========================
   情報カード
   ========================= */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.info-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.info-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.info-icon.premier {
    background: linear-gradient(135deg, var(--premier-color), #B8941E);
}

.info-icon.prince {
    background: linear-gradient(135deg, var(--prince-color), #2E6FAD);
}

.info-icon.prefecture {
    background: linear-gradient(135deg, var(--prefecture-color), #5A93B9);
}

.info-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.info-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* =========================
   検索セクション
   ========================= */
.search-section {
    margin-bottom: 40px;
    animation: fadeIn 0.3s;
}

.search-box {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.search-box h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
    font-family: 'Noto Sans JP', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.3s;
}

.clear-btn:hover {
    color: var(--danger-color);
}

.search-results {
    max-height: 500px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-result-item:hover {
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.search-result-team {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.search-result-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-light);
}

.search-no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.search-no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* =========================
   地図セクション
   ========================= */
.map-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.map-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.japan-map {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.japan-map svg {
    width: 100%;
    height: auto;
}

.prefecture {
    fill: #e0e0e0;
    stroke: #fff;
    stroke-width: 1;
    cursor: pointer;
    transition: all 0.3s;
}

.prefecture:hover {
    opacity: 0.8;
    stroke-width: 2;
}

.prefecture.has-premier {
    fill: var(--premier-color);
}

.prefecture.has-prince {
    fill: var(--prince-color);
}

.prefecture.has-prefecture {
    fill: var(--prefecture-color);
}

.prefecture.no-data {
    fill: #f0f0f0;
}

.map-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.premier-color {
    background-color: var(--premier-color);
}

.prince-color {
    background-color: var(--prince-color);
}

.prefecture-color {
    background-color: var(--prefecture-color);
}

.no-data-color {
    background-color: #f0f0f0;
}

/* =========================
   地域別リスト表示
   ========================= */
.region-group {
    margin-bottom: 30px;
}

.region-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

.pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.pref-button {
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans JP', sans-serif;
    text-align: center;
}

.pref-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.pref-button.level-premier {
    background: linear-gradient(135deg, var(--premier-color), #B8941E);
    color: white;
    border-color: var(--premier-color);
}

.pref-button.level-premier:hover {
    background: linear-gradient(135deg, #B8941E, var(--premier-color));
}

.pref-button.level-prince {
    background: linear-gradient(135deg, var(--prince-color), #2E6FAD);
    color: white;
    border-color: var(--prince-color);
}

.pref-button.level-prince:hover {
    background: linear-gradient(135deg, #2E6FAD, var(--prince-color));
}

.pref-button.level-prefecture {
    background: linear-gradient(135deg, var(--prefecture-color), #5A93B9);
    color: white;
    border-color: var(--prefecture-color);
}

.pref-button.level-prefecture:hover {
    background: linear-gradient(135deg, #5A93B9, var(--prefecture-color));
}

.pref-button.level-no-data {
    background: #f0f0f0;
    color: var(--text-light);
    cursor: not-allowed;
}

.pref-button.level-no-data:hover {
    transform: none;
    box-shadow: none;
}

/* =========================
   モーダル
   ========================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), #004999);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s;
    border-radius: 5px;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* タブ */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans JP', sans-serif;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* 統計サマリー */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* テーブル */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background-color: var(--primary-color);
    color: white;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background-color 0.3s;
}

.data-table tbody tr:hover {
    background-color: var(--bg-light);
}

.data-table td {
    font-size: 0.95rem;
}

.league-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
}

.league-badge.premier {
    background: linear-gradient(135deg, var(--premier-color), #B8941E);
}

.league-badge.prince {
    background: linear-gradient(135deg, var(--prince-color), #2E6FAD);
}

.league-badge.prefecture {
    background: linear-gradient(135deg, var(--prefecture-color), #5A93B9);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: white;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: white;
}

.rank-other {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* =========================
   フッター
   ========================= */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    margin: 5px 0;
}

.footer-note {
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 10px;
}

.footer-note i {
    margin-right: 5px;
}

.footer-nav {
    font-size: 0.92rem;
    color: #ccc;
}

.footer-nav a {
    color: #93c5fd;
    text-decoration: none;
    margin: 0 4px;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

/* =========================
   アニメーション
   ========================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================
   レスポンシブデザイン
   ========================= */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 20px;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main-content {
        padding: 20px 0;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .map-legend {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ============================================================
 * プレミア/プリンスリーグ 階層アコーディオン用スタイル
 * (既存 style.css にマージしてもOK、別ファイルとして読み込んでもOK)
 * ============================================================ */

.league-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

/* details のデフォルト三角マークを消す */
.league-accordion details > summary::-webkit-details-marker {
    display: none;
}
.league-accordion details > summary {
    list-style: none;
}

/* 共通: summary (クリック可能な帯) */
.league-accordion__summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 6px;
    user-select: none;
    transition: background 0.15s ease;
}

/* 地域レベル (1段目) */
.league-accordion__summary--region {
    background: #f2f5fb;
    border-left: 4px solid #1e3a8a;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1.05rem;
}
.league-accordion__summary--region:hover {
    background: #e6edf8;
}

/* 部レベル (2段目) */
.league-accordion__summary--division {
    background: #fafbfc;
    border-left: 3px solid #60a5fa;
    color: #1e40af;
    font-weight: 500;
    font-size: 0.98rem;
    margin: 6px 0 0 12px;
}
.league-accordion__summary--division:hover {
    background: #eef4ff;
}

/* 開閉時の chevron アニメーション */
.league-accordion__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    transition: transform 0.2s ease;
    color: inherit;
}
details[open] > summary > .league-accordion__chevron {
    transform: rotate(90deg);
}

.league-accordion__label {
    flex: 1;
}

.league-accordion__count {
    color: #6b7280;
    font-weight: normal;
    font-size: 0.88rem;
    white-space: nowrap;
}
.league-accordion__count--region {
    color: #2563eb;
    font-weight: 500;
}

/* 開いたときの中身 */
.league-accordion__body {
    padding: 8px 0 6px;
}
.league-accordion__body--nested {
    padding-left: 0;  /* 中間アコーディオンは子の div summary 側でインデント */
}
.league-accordion__empty {
    margin: 12px 18px;
    color: #6b7280;
    font-style: italic;
    font-size: 0.9rem;
}

/* 既存 .league-group-block の上下マージンを調整 (アコーディオン配下では詰める) */
.league-accordion .league-group-block {
    margin-top: 6px !important;
}
.league-accordion .league-group-block > h3 {
    display: none;   /* summary 側にタイトルがあるので重複を防ぐ */
}

/* モバイル調整 */
@media (max-width: 640px) {
    .league-accordion__summary {
        padding: 9px 10px;
        font-size: 0.95rem;
    }
    .league-accordion__summary--division {
        margin-left: 8px;
    }
}
/* ==========================================================
   P2: リーグ階層アコーディオン (option A: 排他的に1つだけ展開)
   ========================================================== */

.league-accordion-root {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 共通 */
.league-accordion {
    border: 1px solid #d9e0ec;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.league-accordion + .league-accordion {
    margin-top: 0;
}

.league-accordion__summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    transition: background 0.15s ease;
}
.league-accordion__summary::-webkit-details-marker { display: none; }

.league-accordion__summary:hover {
    background: #f2f5fb;
}

/* chevron 回転 */
.league-accordion__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    color: #1e3a8a;
    transition: transform 0.2s ease;
}
.league-accordion[open] > .league-accordion__summary > .league-accordion__chevron {
    transform: rotate(90deg);
}

.league-accordion__label {
    font-weight: 600;
    color: #1e3a8a;
}

.league-accordion__count {
    margin-left: auto;
    color: #666;
    font-size: 0.85rem;
    font-weight: normal;
}

.league-accordion__body {
    padding: 8px 14px 14px;
    border-top: 1px solid #eef1f7;
    background: #fafbfe;
}

/* 地域レベル (外側) */
.league-accordion--region {
    border-left: 4px solid #1e3a8a;
}
.league-accordion__summary--region {
    background: #f2f5fb;
    font-size: 1rem;
}

/* ネスト (1部/2部) */
.league-accordion__body--nested {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.league-accordion--division {
    border-left: 3px solid #64748b;
    background: #fff;
}
.league-accordion__summary--division {
    background: #fff;
    font-size: 0.95rem;
    padding: 8px 12px;
}
.league-accordion__summary--division .league-accordion__label {
    color: #334155;
}

/* リーフブロック内テーブル余白 */
.league-group-block {
    margin-top: 0;
}
.league-group-block .data-table {
    margin-top: 4px;
}

/* モバイル調整 */
@media (max-width: 640px) {
    .league-accordion__summary         { padding: 9px 10px; }
    .league-accordion__body            { padding: 6px 8px 10px; }
    .league-accordion__summary--region { font-size: 0.95rem; }
    .league-accordion__summary--division { font-size: 0.9rem; }
}

/* ============================================================
   都道府県ページ「大会成績」タブ
   data/tournaments.json から該当県のチームを大会別に表示
   ============================================================ */
.tournament-section-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 0 4px;
}

.tournament-section {
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tournament-section-title {
    margin: 0;
    padding: 12px 18px;
    font-size: 1.0rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4a6fa5 0%, #2c4d7e 100%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tournament-section-title i {
    color: #ffd86b;
    font-size: 0.95rem;
}

.tournament-year-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tournament-year-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 11px 18px;
    border-top: 1px solid #f0f3f8;
}

.tournament-year-row:first-child {
    border-top: none;
}

.tournament-year {
    flex: 0 0 64px;
    font-weight: 600;
    color: #4a6fa5;
    font-size: 0.95rem;
    padding-top: 4px;
}

.tournament-teams {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.tournament-result-team {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 12px;
    background: #f5f7fa;
    border: 1px solid #e8ecf2;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #2c3e50;
    line-height: 1.3;
}

.tournament-result-team-name {
    font-weight: 500;
}

.tournament-result-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* 優勝: ゴールド */
.tournament-result-badge.result-champion {
    background: linear-gradient(135deg, #ffd700, #f4a712);
    color: #5a4500;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.35);
}

/* 準優勝: シルバー */
.tournament-result-badge.result-runner-up {
    background: linear-gradient(135deg, #d8d8d8, #a0a0a0);
    color: #2c2c2c;
}

/* ベスト4: ブロンズ */
.tournament-result-badge.result-best4 {
    background: linear-gradient(135deg, #d39068, #a0633a);
    color: #fff;
}

/* ベスト8: 落ち着いた青 */
.tournament-result-badge.result-best8 {
    background: linear-gradient(135deg, #7d97b5, #4a6f95);
    color: #fff;
}

/* 都道府県代表 (今後の拡張用): グレー */
.tournament-result-badge.result-representative {
    background: #95a5a6;
    color: #fff;
}

.tournament-result-badge.result-other {
    background: #b0b8c1;
    color: #fff;
}

.tournament-disclaimer {
    margin: 14px 4px 0;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: #7d8898;
    background: #f7f9fc;
    border-radius: 6px;
    border-left: 3px solid #c0cbdc;
}

.tournament-disclaimer i {
    margin-right: 4px;
    color: #8a99b0;
}

/* モバイル調整 */
@media (max-width: 640px) {
    .tournament-section-title { padding: 10px 14px; font-size: 0.95rem; }
    .tournament-year-row      { flex-direction: column; gap: 6px; padding: 10px 14px; }
    .tournament-year          { flex: none; padding-top: 0; }
    .tournament-result-team   { font-size: 0.88rem; padding: 4px 8px 4px 10px; }
    .tournament-result-badge  { font-size: 0.68rem; padding: 2px 7px; }
}

/* ============================================================
   チームカードに付ける小ドット (順位表/検索結果のチーム名の右隣)
   - 直近5年で最も良かった成績を 色だけ で表示 (文字なし)
   - title 属性で全成績がツールチップ表示される
   ============================================================ */
.team-tournament-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 6px;
    border-radius: 50%;
    vertical-align: middle;
    /* カーソルは通常のままにする (?マークにしない) */
    cursor: default;
    user-select: none;
    /* 視認性を上げるための薄い縁取り */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    /* ホバーでわずかに大きくする */
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.team-tournament-icon:hover {
    transform: scale(1.4);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

/* 大会セクションのバッジと同じ色味で統一 */
.team-tournament-icon.result-champion {
    background: linear-gradient(135deg, #ffd700, #f4a712);
    box-shadow: 0 0 0 1px rgba(180, 130, 0, 0.5),
                0 0 4px rgba(255, 215, 0, 0.5);
}
.team-tournament-icon.result-runner-up {
    background: linear-gradient(135deg, #e3e3e3, #9c9c9c);
}
.team-tournament-icon.result-best4 {
    background: linear-gradient(135deg, #d39068, #a0633a);
}
.team-tournament-icon.result-best8 {
    background: linear-gradient(135deg, #7d97b5, #4a6f95);
}
.team-tournament-icon.result-representative {
    background: #95a5a6;
}
.team-tournament-icon.result-other {
    background: #b0b8c1;
}

/* モバイルでも同じ大きさを維持 (10px は十分小さい) */
@media (max-width: 640px) {
    .team-tournament-icon {
        width: 9px;
        height: 9px;
        margin-left: 5px;
    }
}

/* ============================================================
   バッジ用カスタムツールチップ (main.js が動的に生成)
   - position: fixed で表セルの overflow に切られない
   - white-space: pre-line で \n を改行扱い
   ============================================================ */
.tournament-tooltip {
    position: fixed;
    display: none;
    z-index: 10000;
    background: rgba(33, 33, 33, 0.96);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.55;
    white-space: pre-line;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    max-width: 320px;
    /* 表示は JS が visibility 切り替えで一瞬の位置合わせをするので
       transition は付けない (タイムラグの原因になる) */
}

/* ============================================================
   トップページの大会成績バッジ凡例
   ============================================================ */
.badge-legend {
    margin: 12px auto 0;
    max-width: 880px;
    padding: 12px 16px;
    background: #f7f9fc;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}
.badge-legend-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
}
.badge-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    justify-content: center;
}
.badge-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #4a5568;
}
.badge-legend-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}
.badge-legend-dot.result-champion {
    background: linear-gradient(135deg, #ffd700, #f4a712);
    box-shadow: 0 0 0 1px rgba(180, 130, 0, 0.5),
                0 0 4px rgba(255, 215, 0, 0.5);
}
.badge-legend-dot.result-runner-up {
    background: linear-gradient(135deg, #e3e3e3, #9c9c9c);
}
.badge-legend-dot.result-best4 {
    background: linear-gradient(135deg, #d39068, #a0633a);
}
.badge-legend-dot.result-best8 {
    background: linear-gradient(135deg, #7d97b5, #4a6f95);
}
.badge-legend-dot.result-representative {
    background: #95a5a6;
}
@media (max-width: 640px) {
    .badge-legend {
        padding: 10px 12px;
    }
    .badge-legend-title {
        font-size: 0.8rem;
    }
    .badge-legend-items {
        gap: 6px 14px;
    }
    .badge-legend-item {
        font-size: 0.76rem;
    }
}
