.mlb-standings {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1a1a;
}

.mlb-division {
    margin-bottom: 2em;
}

.mlb-division-title {
    background: #1a3a5c;
    color: #fff;
    padding: 8px 14px;
    font-size: 1em;
    font-weight: bold;
    border-left: 4px solid #c8a415;
    margin: 0;
}

.mlb-table-wrap {
    overflow-x: auto;
}

.mlb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    background: #fff;
}

.mlb-table thead tr {
    background-color: #1a3a5c !important;
    text-align: center;
}

.mlb-table thead tr th {
    background-color: #1a3a5c !important;
    color: #fff !important;
    padding: 7px 10px;
    border-bottom: 2px solid #c8a415;
    text-align: center;
    white-space: nowrap;
}

.mlb-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #dde4ec;
    text-align: center;
    white-space: nowrap;
    color: #1a1a1a;
}

.mlb-table td.mlb-team,
.mlb-table th.mlb-team {
    text-align: left;
    min-width: 160px;
}

.mlb-table tbody tr:nth-child(even) {
    background: #f4f7fb;
}

.mlb-table tbody tr:hover {
    background: #ddeeff;
}

.mlb-leader {
    color: #b8860b;
    font-weight: bold;
}

.mlb-streak-w {
    color: #2e7d32;
    font-weight: bold;
}

.mlb-streak-l {
    color: #c62828;
    font-weight: bold;
}

.mlb-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}

.mlb-loading,
.mlb-error {
    padding: 1em;
    color: #666;
}

/* ── チーム成績 ── */
.mlb-team-stats {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1a1a;
}

.ts-wrap { }

.ts-table {
    min-width: 680px;
}

.mlb-table td.ts-team,
.mlb-table th.ts-team {
    text-align: left !important;
    min-width: 180px;
    padding: 7px 10px;
    white-space: nowrap;
}

.ts-team span {
    vertical-align: middle;
}

.ts-table th.ts-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    padding-right: 18px;
    position: relative;
}

.ts-table th.ts-sortable:hover {
    background-color: #24527a !important;
}

.ts-sort-icon::after {
    content: '⇅';
    font-size: 0.75em;
    position: absolute;
    right: 5px;
    opacity: 0.4;
}

.ts-sort-asc .ts-sort-icon::after {
    content: '↑';
    opacity: 1;
    color: #fff;
}

.ts-sort-desc .ts-sort-icon::after {
    content: '↓';
    opacity: 1;
    color: #fff;
}

th.ts-sort-asc,
th.ts-sort-desc {
    background-color: #c8a415 !important;
    color: #fff !important;
}

td.ts-sorted-col {
    background-color: rgba(200, 164, 21, 0.10) !important;
}

/* ── タイトル争いランキング ── */
.mlb-stat-leaders {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1a1a;
}

.sl-tabs-wrap {
    margin-bottom: 1em;
}

.sl-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1em;
    border-bottom: 2px solid #1a3a5c;
}

.sl-tab {
    padding: 8px 20px;
    background: #e8eef5;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    color: #1a3a5c;
    border-radius: 4px 4px 0 0;
    transition: background 0.15s;
}

.sl-tab.active {
    background: #1a3a5c;
    color: #fff;
}

.sl-tab:hover:not(.active) {
    background: #c8d8e8;
}

.sl-hidden {
    display: none !important;
}

.sl-league-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.sl-ltab {
    padding: 5px 14px;
    background: #f0f4f8;
    border: 1px solid #c8d8e8;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
    color: #1a3a5c;
    border-radius: 3px;
    transition: background 0.15s;
}

.sl-ltab.active {
    background: #c8a415;
    color: #fff;
    border-color: #c8a415;
}

.sl-ltab:hover:not(.active) {
    background: #ddeeff;
}

.sl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sl-card {
    background: #fff;
    border: 1px solid #dde4ec;
    border-top: 3px solid #1a3a5c;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.sl-cat-title {
    background: #1a3a5c;
    color: #fff;
    margin: 0;
    padding: 6px 10px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #c8a415;
}

.sl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.sl-table tr {
    border-bottom: 1px solid #eef1f5;
}

.sl-table tr:last-child {
    border-bottom: none;
}

.sl-row-jp {
    background: #fffbe6 !important;
}

.sl-table tr:hover {
    background: #f0f6ff;
}

.sl-rank {
    width: 24px;
    text-align: center;
    padding: 5px 4px 5px 8px;
    color: #888;
    font-size: 0.8em;
    font-weight: bold;
}

.sl-table tr:first-child .sl-rank {
    color: #c8a415;
}

.sl-player {
    padding: 5px 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sl-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.sl-logo-ph {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sl-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.sl-name.sl-jp {
    font-weight: bold;
    color: #1a3a5c;
}

.sl-value {
    padding: 5px 10px 5px 4px;
    text-align: right;
    font-weight: bold;
    font-size: 0.95em;
    color: #1a1a1a;
    white-space: nowrap;
}

/* ── 日本人選手ページ ── */
.mlb-japanese-players {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1a1a;
}

.jp-section-title {
    background: #1a3a5c;
    color: #fff;
    padding: 10px 16px;
    font-size: 1.1em;
    font-weight: bold;
    border-left: 4px solid #c8a415;
    margin: 1.5em 0 0.5em;
}

.jp-group-title {
    font-size: 0.95em;
    font-weight: bold;
    color: #1a3a5c;
    border-bottom: 2px solid #c8a415;
    padding: 4px 0;
    margin: 1em 0 0.4em;
}

.jp-table th.jp-player,
.jp-table td.jp-player {
    text-align: left;
    min-width: 200px;
    padding: 8px 10px;
}

.jp-player-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jp-name {
    font-weight: bold;
    font-size: 1em;
    line-height: 1.3;
}

.jp-team {
    display: block;
    font-size: 0.78em;
    color: #666;
    margin-top: 2px;
    padding-left: 30px;
}

.mlb-logo-placeholder {
    display: inline-block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.jp-col-group {
    background-color: #1a3a5c !important;
    color: #fff !important;
    border-bottom: 1px solid #c8a415 !important;
    font-size: 0.85em;
    letter-spacing: 0.03em;
}

.jp-stat-sep {
    border-left: 2px solid #c8a415;
}

.mlb-updated {
    font-size: 0.8em;
    color: #888;
    text-align: right;
    margin-top: 0.5em;
}

/* ── トランザクション ── */
.mlb-transactions {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1a1a;
}

.tx-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 2px solid #1a3a5c;
    padding-bottom: 8px;
}

.tx-ftab {
    padding: 6px 14px;
    background: #e8eef5;
    border: none;
    cursor: pointer;
    font-size: 0.88em;
    font-weight: bold;
    color: #1a3a5c;
    border-radius: 4px;
    transition: background 0.15s;
}

.tx-ftab.active {
    background: #1a3a5c;
    color: #fff;
}

.tx-ftab:hover:not(.active) {
    background: #c8d8e8;
}

.tx-date-group {
    margin-bottom: 10px;
}

.tx-date-label {
    font-size: 0.82em;
    font-weight: bold;
    color: #fff;
    background: #1a3a5c;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.tx-items {
    border-left: 3px solid #dde4ec;
    padding-left: 10px;
}

.tx-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f3f8;
    font-size: 0.88em;
    line-height: 1.4;
}

.tx-item-jp {
    background: #fffbe6;
    padding: 5px 6px;
    border-radius: 3px;
}

.tx-badge {
    flex-shrink: 0;
    font-size: 0.78em;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
    color: #fff;
    margin-top: 1px;
}

.tx-il    { background: #1a3a5c; }
.tx-trade { background: #6a4fb4; }
.tx-dfa   { background: #c62828; }
.tx-up    { background: #2e7d32; }
.tx-down  { background: #e65100; }
.tx-other { background: #757575; }

.tx-desc {
    flex: 1;
    color: #333;
}

/* ── 歴代受賞者 ── */
.mlb-awards {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1a1a;
}

.aw-controls {
    margin-bottom: 10px;
}

.aw-season-label {
    font-size: 0.9em;
    font-weight: bold;
    color: #1a3a5c;
}

.aw-season-select {
    margin-left: 6px;
    padding: 4px 8px;
    border: 1px solid #c8d8e8;
    border-radius: 3px;
    font-size: 0.9em;
    color: #1a3a5c;
    cursor: pointer;
}

.aw-tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid #1a3a5c;
    margin-bottom: 14px;
}

.aw-tab {
    padding: 8px 16px;
    background: #e8eef5;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    color: #1a3a5c;
    border-radius: 4px 4px 0 0;
    transition: background 0.15s;
}

.aw-tab.active {
    background: #1a3a5c;
    color: #fff;
}

.aw-tab:hover:not(.active) {
    background: #c8d8e8;
}

.aw-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.aw-card {
    background: #fff;
    border: 1px solid #dde4ec;
    border-top: 3px solid #c8a415;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.aw-card-title {
    background: #1a3a5c;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.02em;
}

.aw-winner {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.aw-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.aw-player-name {
    font-weight: bold;
    font-size: 1em;
}

.aw-player-name.aw-jp {
    color: #1a3a5c;
}

.aw-team-name {
    font-size: 0.8em;
    color: #666;
    width: 100%;
    padding-left: 30px;
}

.aw-two-col {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.aw-half {
    flex: 1;
    min-width: 280px;
}

.aw-half-title {
    background: #1a3a5c;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.9em;
    font-weight: bold;
    border-left: 4px solid #c8a415;
    margin: 0 0 0;
}

.aw-table {
    margin-bottom: 1em;
}

.aw-pos {
    width: 40px;
    font-weight: bold;
    color: #888;
    text-align: center;
}

.aw-player-cell {
    text-align: left;
    font-size: 0.9em;
}

.aw-player-cell.aw-jp {
    font-weight: bold;
    color: #1a3a5c;
}

.aw-team-cell {
    white-space: nowrap;
    font-size: 0.85em;
}

.aw-logo-sm {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.aw-row-jp {
    background: #fffbe6 !important;
}

/* ════════════════════════════════════════════════════════════
   サイドバーウィジェット共通
   ════════════════════════════════════════════════════════════ */
.sb-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
    flex-shrink: 0;
}

/* ── クイックナビ ── */
.mlb-quick-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qn-link {
    display: block;
    padding: 7px 12px;
    background: #f0f4f8;
    border-left: 3px solid #1a3a5c;
    color: #1a3a5c;
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.qn-link:hover {
    background: #1a3a5c;
    color: #fff;
    border-color: #c8a415;
    text-decoration: none;
}

/* ── 各地区首位 ── */
.sb-standings-wrap {
    font-size: 0.88em;
}

.sb-league-block {
    margin-bottom: 8px;
}

.sb-league-hd {
    background: #1a3a5c;
    color: #fff;
    font-size: 0.8em;
    font-weight: bold;
    padding: 3px 8px;
    margin-bottom: 2px;
    letter-spacing: 0.04em;
}

.sb-div-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-bottom: 1px solid #eef1f5;
}

.sb-dir {
    width: 50px;
    font-size: 0.82em;
    color: #888;
    flex-shrink: 0;
}

.sb-team-name {
    flex: 1;
    font-weight: bold;
    color: #1a1a1a;
    display: flex;
    align-items: center;
}

.sb-record {
    font-size: 0.85em;
    color: #555;
    white-space: nowrap;
}

/* ── 日本人選手ハイライト ── */
.sb-jp-card {
    padding: 8px 6px;
    border-bottom: 1px solid #eef1f5;
}

.sb-jp-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}

.sb-jp-header strong {
    font-size: 0.92em;
    color: #1a3a5c;
    flex: 1;
}

.sb-jp-pos {
    font-size: 0.75em;
    background: #1a3a5c;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}

.sb-jp-stat {
    font-size: 0.82em;
    color: #444;
    padding-left: 25px;
    line-height: 1.6;
}

/* ── 最新トランザクション ── */
.sb-tx-item {
    padding: 6px 4px;
    border-bottom: 1px solid #eef1f5;
    font-size: 0.85em;
}

.sb-tx-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.sb-tx-date {
    font-size: 0.8em;
    color: #888;
}

.sb-tx-desc {
    color: #333;
    line-height: 1.4;
    font-size: 0.82em;
}

/* ── タイトル争いトップ3 ── */
.sb-leaders-block {
    margin-bottom: 10px;
}

.sb-leaders-hd {
    background: #c8a415;
    color: #fff;
    font-size: 0.82em;
    font-weight: bold;
    padding: 3px 8px;
    margin-bottom: 2px;
    letter-spacing: 0.04em;
}

.sb-ldr-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border-bottom: 1px solid #eef1f5;
    font-size: 0.85em;
}

.sb-ldr-rank {
    width: 16px;
    text-align: center;
    color: #aaa;
    font-size: 0.8em;
    font-weight: bold;
    flex-shrink: 0;
}

.sb-ldr-row:first-child .sb-ldr-rank { color: #c8a415; }

.sb-ldr-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sb-ldr-name.aw-jp {
    font-weight: bold;
    color: #1a3a5c;
}

.sb-ldr-val {
    font-weight: bold;
    font-size: 0.9em;
    color: #1a1a1a;
    white-space: nowrap;
}

/* ============================================================
   選手ポップアップ
   ============================================================ */
.mlb-player-link {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}
.mlb-player-link:hover {
    color: #c8a415;
}

#mlb-player-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#mlb-player-modal.is-open {
    display: flex;
}

.mlb-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.mlb-popup-box {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    border-top: 4px solid #c8a415;
    z-index: 1;
}

.mlb-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 1.4rem;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    z-index: 2;
}
.mlb-popup-close:hover { color: #c8a415; }

.mlb-popup-body {
    padding: 20px 22px 24px;
}

/* ヘッダー：写真 + 基本情報 */
.pu-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.pu-photo {
    width: 90px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #dde4ec;
    background: #f0f0f0;
}

.pu-info {
    flex: 1;
    min-width: 0;
}

.pu-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0 0 2px;
    line-height: 1.3;
}

.pu-name-en {
    font-size: 0.82rem;
    color: #666;
    margin: 0 0 6px;
}

.pu-team {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.pu-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.pu-team-name {
    font-size: 0.88rem;
    font-weight: bold;
    color: #1a3a5c;
}

.pu-meta {
    font-size: 0.78rem;
    color: #555;
    line-height: 1.7;
}
.pu-meta span {
    margin-right: 10px;
    white-space: nowrap;
}

/* 成績セクション */
.pu-stat-section {
    margin-top: 14px;
    border-top: 1px solid #dde4ec;
    padding-top: 12px;
}

.pu-stat-title {
    font-size: 0.82rem;
    font-weight: bold;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.pu-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
}

.pu-stat-item {
    background: #f4f6fa;
    border-radius: 4px;
    padding: 6px 8px;
    text-align: center;
}

.pu-stat-label {
    font-size: 0.7rem;
    color: #888;
    display: block;
    margin-bottom: 2px;
}

.pu-stat-val {
    font-size: 0.95rem;
    font-weight: bold;
    color: #1a1a1a;
    display: block;
}

.pu-loading {
    text-align: center;
    padding: 40px 0;
    color: #888;
    font-size: 0.9rem;
}

@media screen and (max-width: 700px) {
    .sl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 480px) {
    .sl-grid { grid-template-columns: 1fr; }
    .pu-header { flex-direction: column; align-items: center; text-align: center; }
    .pu-team { justify-content: center; }
    .pu-meta { text-align: center; }
}

/* ============================================================
   MLBルール辞典
   ============================================================ */
.mlb-rules-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mlb-rules-controls {
    margin-bottom: 1.4em;
}

.mlb-rules-search {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 2px solid #dde4ec;
    border-radius: 6px;
    margin-bottom: 10px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
.mlb-rules-search:focus { border-color: #1a3a5c; }

.mlb-rules-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rules-cat-btn {
    padding: 5px 14px;
    font-size: 0.82rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    color: #444;
}
.rules-cat-btn:hover    { background: #f0f4fa; border-color: #1a3a5c; color: #1a3a5c; }
.rules-cat-btn.active   { background: #1a3a5c; color: #fff; border-color: #1a3a5c; }

/* レベルフィルターボタン */
.mlb-rules-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.rules-lvl-btn {
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #c8d8e8;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: bold;
    cursor: pointer;
    color: #555;
    transition: background 0.15s, color 0.15s;
}
.rules-lvl-btn[data-level="basic"]    { border-color: #c8a415; color: #8a6f00; }
.rules-lvl-btn[data-level="basic"].active  { background: #c8a415; color: #fff; }
.rules-lvl-btn[data-level="standard"].active { background: #1a3a5c; color: #fff; border-color: #1a3a5c; }
.rules-lvl-btn[data-level="advanced"].active { background: #555; color: #fff; border-color: #555; }
.rules-lvl-btn[data-level="all"].active      { background: #1a3a5c; color: #fff; border-color: #1a3a5c; }
.rules-lvl-btn:hover:not(.active) { background: #f0f4fa; }

/* レベルバッジ（カード内） */
.rule-level-badge {
    display: inline-block;
    font-size: 0.75em;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}
.rule-level-basic    { background: #fff3cc; color: #8a6f00; border: 1px solid #c8a415; }
.rule-level-standard { background: #e8eef5; color: #1a3a5c; border: 1px solid #aac; }
.rule-level-advanced { background: #f0f0f0; color: #555;    border: 1px solid #bbb; }

/* 索引バー */
.rules-index {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #f5f7fa;
    border: 1px solid #dde4ec;
    border-radius: 6px;
}
.rules-idx-btn {
    display: inline-block;
    min-width: 2em;
    padding: 4px 6px;
    background: #fff;
    border: 1px solid #c8d8e8;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    color: #1a3a5c;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.rules-idx-btn:hover {
    background: #1a3a5c;
    color: #fff;
    border-color: #1a3a5c;
    text-decoration: none;
}

/* 索引グループ見出し */
.rules-alpha-group {
    scroll-margin-top: 80px;
}
.rules-alpha-head {
    font-size: 1.3em;
    font-weight: bold;
    color: #1a3a5c;
    border-left: 4px solid #c8a415;
    padding: 4px 10px;
    margin: 18px 0 10px;
    background: #f5f7fa;
    border-radius: 0 4px 4px 0;
}
.rules-alpha-group:first-child .rules-alpha-head {
    margin-top: 0;
}

/* ルールカード */
.mlb-rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-card {
    background: #fff;
    border: 1px solid #dde4ec;
    border-left: 4px solid #1a3a5c;
    border-radius: 4px;
    padding: 16px 18px;
    transition: box-shadow .15s;
}
.rule-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.rule-card-new   { border-left-color: #b8860b; }

.rule-card-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.rule-title {
    font-size: 1.05rem;
    font-weight: bold;
    color: #1a1a1a;
    margin: 0;
    flex-shrink: 0;
}

.rule-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-left: auto;
}

.rule-cat-badge {
    display: inline-block;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: bold;
}

.rule-since, .rule-article {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
}

.rule-excerpt {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.65;
    margin-bottom: 8px;
}

.rule-details summary {
    font-size: 0.82rem;
    color: #1a3a5c;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}
.rule-details summary:hover { text-decoration: underline; }
.rule-details[open] summary { margin-bottom: 8px; }

.rule-content {
    font-size: 0.88rem;
    color: #333;
    line-height: 1.8;
    border-top: 1px dashed #dde4ec;
    padding-top: 10px;
}
.rule-content p  { margin: 0 0 .7em; }
.rule-content ul { padding-left: 1.4em; margin: 0 0 .7em; }
.rule-content li { margin-bottom: .3em; }

.mlb-rules-empty {
    text-align: center;
    color: #888;
    padding: 2em 0;
}

@media screen and (max-width: 600px) {
    .rule-card-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .rule-meta { margin-left: 0; }
}

/* ============================================================
   スケジュール
   ============================================================ */
.sch-tabs-wrap { margin-bottom: 1em; }

.sch-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #1a3a5c;
    margin-bottom: 14px;
}
.sch-tab {
    padding: 7px 20px;
    background: #e8eef5;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    color: #1a3a5c;
    border-radius: 4px 4px 0 0;
    transition: background 0.15s;
}
.sch-tab.active { background: #1a3a5c; color: #fff; }
.sch-tab:hover:not(.active) { background: #c8d8e8; }

.sch-date-group { margin-bottom: 18px; }
.sch-date-head {
    font-size: 0.92em;
    font-weight: bold;
    color: #1a3a5c;
    border-left: 4px solid #1a3a5c;
    padding: 3px 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sch-today .sch-date-head { border-color: #c8a415; color: #8a6f00; }
.sch-today-badge {
    font-size: 0.75em;
    background: #c8a415;
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
}

/* カードグリッド */
.sch-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

/* 1枚のカード */
.sch-card {
    background: #fff;
    border: 1px solid #dde4ec;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.88em;
}
.sch-card-jp {
    border-color: #c8a415;
    background: #fffdf4;
}

/* チーム行 */
.sch-teams {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.sch-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.sch-away { flex-direction: row-reverse; text-align: right; }
.sch-home { flex-direction: row; text-align: left; }
.sch-logo {
    width: 28px; height: 28px;
    object-fit: contain; flex-shrink: 0;
}
.sch-logo-ph {
    width: 28px; height: 28px;
    background: #e8eef5; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65em; font-weight: bold; color: #1a3a5c;
    flex-shrink: 0;
}
.sch-team-name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.sch-team-city {
    font-size: 0.78em;
    font-weight: bold;
    color: #888;
    letter-spacing: 0.04em;
}
.sch-team-nick {
    font-size: 0.88em;
    font-weight: bold;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* スコア・時刻（中央） */
.sch-center {
    flex-shrink: 0;
    text-align: center;
    min-width: 70px;
}
.sch-score-wrap {
    display: flex; align-items: baseline;
    justify-content: center; gap: 3px;
}
.sch-score {
    font-size: 1.3em; font-weight: bold; color: #555;
    min-width: 1.4em; text-align: center;
}
.sch-winner { color: #1a3a5c; }
.sch-vs { color: #aaa; font-size: 0.9em; }
.sch-live-dot { color: #c00; animation: blink 1s infinite; font-size: 0.6em; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }
.sch-time { font-size: 1em; font-weight: bold; color: #1a3a5c; }
.sch-status { font-size: 0.75em; color: #888; margin-top: 2px; }
.sch-live { color: #c00; font-weight: bold; }

/* 球場・先発 */
.sch-meta {
    display: flex; flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 0.8em; color: #666;
    border-top: 1px solid #eee;
    padding-top: 5px;
}
.sch-venue { color: #888; }
.sch-pitcher { color: #333; }
.sch-pitcher-jp { color: #1a3a5c; font-weight: bold; }
.sch-pitcher-tbd { color: #bbb; font-style: italic; }
.sch-empty { color: #888; text-align: center; padding: 20px; }

@media (max-width: 600px) {
    .sch-cards { grid-template-columns: 1fr; }
    .sch-team-name { font-size: 0.82em; }
}

/* 球場地図モーダル */
#sch-map-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
}
#sch-map-modal.active { display: block; }

.sch-map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.sch-map-box {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, 94vw);
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
}
.sch-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #1a3a5c;
    color: #fff;
}
.sch-map-title {
    font-weight: bold;
    font-size: 0.95em;
}
.sch-map-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1em;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.sch-map-close:hover { color: #c8a415; }
.sch-map-iframe {
    width: 100%;
    height: 340px;
    border: none;
    display: block;
}
.sch-map-link {
    display: block;
    text-align: right;
    font-size: 0.78em;
    color: #1a3a5c;
    padding: 6px 12px;
    background: #f5f7fa;
    text-decoration: none;
}
.sch-map-link:hover { text-decoration: underline; }

/* ── チーム詳細 ─────────────────────────────────────── */
.td-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: #0d1e2e;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #fff;
    min-height: 130px;
    position: relative;
    overflow: hidden;
}
.td-header-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    z-index: 0;
}
.td-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 18, 32, 0.84);
}
.td-header-left,
.td-header-right {
    position: relative;
    z-index: 1;
}
.td-header-left { flex-shrink: 0; }
.td-logo { width: 80px; height: 80px; object-fit: contain; display: block; }
.td-team-name {
    margin: 0 0 4px !important;
    margin-top: 0 !important;
    font-size: 1.5em !important;
    color: #fff !important;
    font-weight: bold !important;
    border: none !important;
    padding: 0 !important;
    background: none !important;
}
.td-team-meta { font-size: 0.85em; color: #a0b8d0 !important; margin-bottom: 8px; }
.td-record { font-size: 1.1em; font-weight: bold; margin-bottom: 4px; color: #fff !important; }
.td-pct { color: #c8a415 !important; margin: 0 8px; }
.td-gb { color: #a0b8d0 !important; font-size: 0.9em; }
.td-splits { font-size: 0.85em; color: #a0b8d0 !important; }
.td-streak { margin-left: 10px; color: #c8a415 !important; font-weight: bold; }

.td-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e0e4ea;
}
.td-tab {
    padding: 8px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 4px 4px 0 0;
    transition: color 0.15s, background 0.15s;
}
.td-tab:hover { background: #f5f7fa; color: #1a3a5c; }
.td-tab.active { color: #1a3a5c; border-bottom-color: #1a3a5c; font-weight: bold; background: #fff; }
.td-hidden { display: none !important; }

.td-team-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.td-ts-section { flex: 1; min-width: 240px; }
.td-ts-head {
    font-size: 0.95em;
    font-weight: bold;
    color: #1a3a5c;
    border-left: 3px solid #c8a415;
    padding-left: 8px;
    margin: 0 0 12px;
}
.td-ts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.td-ts-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: #f5f7fa;
    border-radius: 6px;
    text-align: center;
}
.td-ts-label { font-size: 0.72em; color: #888; margin-bottom: 4px; }
.td-ts-val { font-size: 1.1em; font-weight: bold; color: #1a3a5c; }

.td-roster-table .td-pos {
    text-align: center;
    color: #888;
    font-size: 0.8em;
    width: 40px;
}
.td-roster-table .td-pname { font-weight: 500; min-width: 100px; }
.td-roster-table .td-name-ja { color: #1a3a5c; }
.td-empty { color: #999; font-size: 0.9em; padding: 20px 0; text-align: center; }

@media (max-width: 640px) {
    .td-header { flex-direction: column; gap: 12px; }
    .td-logo { width: 60px; height: 60px; }
    .td-ts-grid { grid-template-columns: repeat(2, 1fr); }
    .td-team-stats { flex-direction: column; }
    .td-tab { padding: 8px 10px; font-size: 0.82em; }
}

/* 球場名ボタン */
.sch-venue {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #1a3a5c;
    font-size: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}
.sch-venue:hover { color: #c8a415; }

/* ============================================================
   グラフ（Chart.js）
   ============================================================ */

/* 順位表: テーブル/グラフ切り替えバー */
.st-toggle-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.st-vtab {
    padding: 6px 18px;
    border: 1px solid #c4cfc4;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #444;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.st-vtab.active,
.st-vtab:hover {
    background: #1e3d2b;
    color: #fff;
    border-color: #1e3d2b;
}
.st-chart-container {
    position: relative;
    height: 720px;
    width: 100%;
    max-width: 860px;
}

/* チーム成績: グラフ stat セレクター */
.ts-chart-sel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 12px 0 14px;
    border-bottom: 1px solid rgba(0,0,0,0.09);
    margin-bottom: 14px;
}
.ts-cs-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}
.ts-cs-sep {
    color: #ccc;
    padding: 0 4px;
}
.ts-cs {
    padding: 5px 13px;
    border: 1px solid #c4cfc4;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #444;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.ts-cs.active,
.ts-cs:hover {
    background: #1e3d2b;
    color: #fff;
    border-color: #1e3d2b;
}
.ts-chart-container {
    position: relative;
    height: 720px;
    width: 100%;
}

@media (max-width: 640px) {
    .st-chart-container,
    .ts-chart-container { height: 600px; }
}

/* ============================================================
   選手比較ツール
   ============================================================ */
.mlb-player-compare { max-width: 900px; margin: 0 auto; }

/* 検索行 */
.pc-search-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}
.pc-slot { flex: 1; min-width: 0; }

.pc-vs-badge {
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #8b2020;
    padding-top: 10px;
}

/* 検索インプット */
.pc-search-wrap { position: relative; }
.pc-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #c4cfc4;
    border-radius: 4px;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.pc-input:focus { border-color: #1e3d2b; box-shadow: 0 0 0 2px rgba(30,61,43,0.12); }

/* サジェストドロップダウン */
.pc-suggestions {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #c4cfc4;
    border-top: none;
    border-radius: 0 0 4px 4px;
    list-style: none;
    margin: 0; padding: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    max-height: 280px;
    overflow-y: auto;
}
.pc-suggestions li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    transition: background 0.1s;
}
.pc-suggestions li:hover { background: #f5f9f5; }
.pc-sug-logo { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.pc-sug-name { font-weight: 600; color: #222; }
.pc-sug-meta { color: #888; font-size: 0.78rem; margin-left: auto; white-space: nowrap; }

/* 選択済み選手カード */
.pc-card { margin-top: 8px; }
.pc-card-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(30,61,43,0.07);
    border: 1px solid rgba(30,61,43,0.2);
    border-radius: 4px;
}
.pc-card-logo { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.pc-card-info { flex: 1; min-width: 0; }
.pc-card-name { font-weight: 700; font-size: 0.9rem; color: #1e3d2b; }
.pc-card-meta { font-size: 0.75rem; color: #666; }
.pc-card-clear {
    border: none;
    background: none;
    cursor: pointer;
    color: #999;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}
.pc-card-clear:hover { background: rgba(0,0,0,0.08); color: #444; }

/* 比較結果エリア */
.pc-result { margin-top: 24px; }

/* レーダーチャート */
.pc-radar-wrap {
    max-width: 480px;
    margin: 0 auto 28px;
}

/* 比較テーブル群 */
.pc-tables {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.pc-cmp-table {
    flex: 1;
    min-width: 280px;
    border-collapse: collapse;
    font-size: 0.88rem;
    width: 100%;
}
.pc-cmp-table thead tr { border-bottom: 2px solid #1e3d2b; }
.pc-th-player {
    color: #555;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 8px;
    width: 38%;
}
.pc-th-right { text-align: right; }
.pc-th-center {
    text-align: center;
    color: #1e3d2b;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 4px;
}
.pc-cmp-table tbody tr { border-bottom: 1px solid #f0ede8; }
.pc-cmp-table tbody tr:hover { background: rgba(0,0,0,0.02); }
.pc-val {
    padding: 6px 8px;
    text-align: center;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
    width: 38%;
}
.pc-val.pc-better {
    background: rgba(30,61,43,0.10);
    color: #1e3d2b;
    font-weight: 700;
    border-radius: 3px;
}
.pc-stat-label {
    text-align: center;
    font-size: 0.78rem;
    color: #666;
    font-weight: 600;
    padding: 6px 4px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .pc-search-row { flex-direction: column; }
    .pc-vs-badge { width: auto; padding: 4px 0; text-align: center; }
    .pc-tables { flex-direction: column; }
}

/* ============================================================
   メガメニュー（チーム成績）
   ============================================================ */
.mlb-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #0f2d1a;
    border-top: 2px solid #c4a060;
    border-bottom: 2px solid #c4a060;
    box-shadow: 0 8px 24px rgba(0,0,0,0.55);
}
.mlb-mega-menu.is-open { display: block; }

.mlb-mega-inner {
    display: flex;
    gap: 0;
    max-width: 1440px;
    margin: 0 auto;
    padding: 18px 24px;
}

.mlb-mega-league {
    flex: 1;
    padding: 0 20px;
    border-right: 1px solid rgba(196,160,96,0.25);
}
.mlb-mega-league:last-child { border-right: none; }

.mlb-mega-league-title {
    color: #c4a060;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(196,160,96,0.3);
}

.mlb-mega-divisions {
    display: flex;
    gap: 16px;
}

.mlb-mega-div { flex: 1; }

.mlb-mega-div-title {
    color: rgba(196,160,96,0.7);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.mlb-mega-teams {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mlb-mega-teams li { margin-bottom: 2px; }

.mlb-mega-teams a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    color: #e8e0d0 !important;
    text-decoration: none !important;
    font-size: 0.82rem;
    border-radius: 3px;
    white-space: nowrap;
    transition: background 0.12s;
}
.mlb-mega-teams a:hover {
    background-color: rgba(255,255,255,0.1);
    color: #c4a060 !important;
}

.mlb-mega-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
