/* ================================================
   토토 승무패 패턴 분석 — Spokaz 라이트 테마 매치
   ================================================ */

/* ── 본문 ── */
.toto-layout { width: 100%; }
.toto-content { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* ── 헤더 ── */
.toto-header {
    background: linear-gradient(135deg, #0c2d5e, #1a6dff);
    color: #fff;
    border-radius: var(--spk-radius);
    padding: 20px 24px;
    box-shadow: var(--spk-shadow);
}
.toto-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.3px;
}
.toto-header p {
    margin: 0;
    font-size: 12px;
    color: rgba(255,255,255,.7);
    letter-spacing: .5px;
}

/* ── 통계 카드 그리드 ── */
.toto-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.toto-stat {
    background: var(--spk-card);
    border-radius: var(--spk-radius);
    padding: 14px 16px;
    box-shadow: var(--spk-shadow-soft);
    border-top: 3px solid var(--spk-primary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toto-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--spk-muted);
    letter-spacing: .5px;
}
.toto-stat strong {
    font-size: 22px;
    font-weight: 900;
    color: var(--spk-text);
    line-height: 1.1;
}
.toto-stat-sub { font-size: 11px; color: var(--spk-muted); }
.toto-stat-w { border-top-color: #1a6dff; }
.toto-stat-w strong { color: #1a6dff; }
.toto-stat-d { border-top-color: #888; }
.toto-stat-d strong { color: #5a6b7a; }
.toto-stat-l { border-top-color: #cc2233; }
.toto-stat-l strong { color: #cc2233; }

/* ── 패턴분석 전용 필터 ── */
.toto-pattern-filter { padding: 10px 14px; gap: 16px; }
.toto-recent-group { align-items: center; }
.toto-recent-btns { display: inline-flex; gap: 4px; }
.toto-recent-btn {
    padding: 5px 10px;
    border: 1px solid var(--spk-line, #c9d5e3);
    border-radius: 6px;
    background: #fff;
    color: var(--spk-text, #0e1726);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}
.toto-recent-btn:hover { background: #f0f5ff; border-color: var(--spk-primary, #1a6dff); color: var(--spk-primary, #1a6dff); }
.toto-recent-btn.is-active {
    background: var(--spk-primary, #1a6dff);
    border-color: var(--spk-primary, #1a6dff);
    color: #fff;
    box-shadow: 0 4px 10px rgba(26,109,255,.25);
}
.toto-pattern-hint {
    margin-left: auto;
    font-size: 11px;
    color: var(--spk-muted);
    align-self: center;
}

/* ── 탭 네비 ── */
.toto-tabs {
    display: flex;
    gap: 4px;
    background: var(--spk-card);
    border-radius: var(--spk-radius) var(--spk-radius) 0 0;
    padding: 6px 6px 0;
    margin-bottom: 0;
    box-shadow: var(--spk-shadow-soft);
    border-bottom: 2px solid var(--spk-line);
}
.toto-tab {
    padding: 10px 22px;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--spk-muted);
    cursor: pointer;
    transition: all .15s;
    position: relative;
    font-family: inherit;
    letter-spacing: -.1px;
}
.toto-tab:hover { color: var(--spk-primary-deep); background: rgba(26,109,255,.04); }
.toto-tab.is-active {
    color: var(--spk-primary);
    background: var(--spk-card);
    box-shadow: 0 -2px 0 var(--spk-primary) inset;
}
.toto-tab.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--spk-primary);
}
.toto-tab-panel { display: none; flex-direction: column; gap: 10px; }
.toto-tab-panel.is-active { display: flex; }

/* ── 필터 바 (회차+검색 통합) ── */
.toto-filter {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--spk-card);
    border-radius: var(--spk-radius);
    box-shadow: var(--spk-shadow-soft);
}
.toto-filter-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.toto-filter-group label {
    font-size: 10px;
    font-weight: 700;
    color: var(--spk-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.toto-filter-divider {
    width: 1px;
    align-self: stretch;
    background: var(--spk-line);
    margin: 0 4px;
}
.toto-select {
    padding: 7px 10px;
    border: 1.5px solid var(--spk-line);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    background: #fff;
    outline: none;
    min-width: 90px;
    cursor: pointer;
    transition: border-color .15s;
    font-family: inherit;
}
.toto-select:focus { border-color: var(--spk-primary); }
.toto-sel-sm { min-width: 80px; }
.toto-select-round { min-width: 90px; text-align: center; }
.toto-round-ctrl { display: flex; align-items: center; gap: 3px; }
.toto-round-btn {
    width: 28px; height: 32px;
    border: 1.5px solid var(--spk-line);
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
    font-weight: 900;
    color: var(--spk-text);
    cursor: pointer;
    transition: all .15s;
}
.toto-round-btn:hover { background: var(--spk-primary); color: #fff; border-color: var(--spk-primary); }
.toto-round-btn:disabled { opacity: .35; cursor: not-allowed; background: #fff !important; color: var(--spk-text) !important; border-color: var(--spk-line) !important; }
.toto-sale {
    margin-left: auto;
    font-size: 11px;
    color: var(--spk-muted);
    align-self: center;
}

/* ── 카드 ── */
.toto-card {
    background: var(--spk-card);
    border-radius: var(--spk-radius);
    padding: 16px 18px;
    box-shadow: var(--spk-shadow-soft);
}
.toto-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--spk-line);
}
.toto-card-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
    color: var(--spk-primary-deep);
    letter-spacing: -.2px;
}
.toto-summary {
    font-size: 12px;
    display: flex;
    gap: 10px;
    color: var(--spk-muted);
}
.toto-summary .r-w { color: #1a6dff; font-weight: 700; }
.toto-summary .r-d { color: #5a6b7a; font-weight: 700; }
.toto-summary .r-l { color: #cc2233; font-weight: 700; }

/* ── 테이블 ── */
.toto-table-wrap { overflow-x: auto; }
.toto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.toto-table thead th {
    background: #f2f6fb;
    color: var(--spk-primary-deep);
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    border-bottom: 2px solid var(--spk-line);
    white-space: nowrap;
}
.toto-table tbody td {
    padding: 9px 8px;
    text-align: center;
    border-bottom: 1px solid var(--spk-line);
    color: var(--spk-text);
}
.toto-table tbody tr:hover td { background: #f7fafe; }
.toto-th-home, .toto-th-away { min-width: 100px; }
.toto-th-score { min-width: 70px; }
.toto-th-odds  { min-width: 130px; }
.toto-game-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: #eaf2ff;
    color: var(--spk-primary);
    border-radius: 6px;
    font-weight: 900;
    font-size: 11px;
}
.toto-team { font-weight: 700; color: var(--spk-text); }

/* ── 투표 바 (경기 테이블 홈/스코어/원정 셀 하단) ── */
.tp-vote {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.tp-vote-bar {
    flex: 1;
    height: 6px;
    background: #e6ecf3;
    border-radius: 3px;
    overflow: hidden;
    min-width: 40px;
    max-width: 120px;
}
.tp-vote-bar > span {
    display: block;
    height: 100%;
    border-radius: 3px;
    transition: width .3s ease;
}
.tp-vote-txt {
    color: var(--spk-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-size: 10.5px;
}
.tp-vote-w .tp-vote-bar > span { background: linear-gradient(90deg, #1a6dff, #3b82f6); }
.tp-vote-d .tp-vote-bar > span { background: linear-gradient(90deg, #98a6b7, #6b7a8e); }
.tp-vote-l .tp-vote-bar > span { background: linear-gradient(90deg, #cc2233, #e5434f); }
.tp-vote-w .tp-vote-txt { color: #1a6dff; }
.tp-vote-d .tp-vote-txt { color: #5a6b7a; }
.tp-vote-l .tp-vote-txt { color: #cc2233; }

/* 배당 셀 (api 배당 소스 표시) */
.toto-odds-cell .o-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.toto-odds-cell .o-src {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: #eaf2ff;
    color: #1a6dff;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .02em;
    vertical-align: middle;
}
.toto-odds-cell .o-na { color: #98a6b7; font-weight: 600; }
.toto-team.tp-win  { color: #1a6dff; }
.toto-team.tp-lose { color: #98a6b7; }
/* 홈은 셀 오른쪽 끝, 어웨이는 셀 왼쪽 끝 → 스코어 중심으로 모임 */
.toto-team-home { text-align: right !important; }
.toto-team-away { text-align: left  !important; }
.toto-th-home   { text-align: right !important; padding-right: 12px !important; }
.toto-th-away   { text-align: left  !important; padding-left:  12px !important; }
.toto-team-home .toto-team-inner,
.toto-team-away .toto-team-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 22px;
    vertical-align: middle;
}
.toto-team-logo {
    width: 22px; height: 22px;
    object-fit: contain;
    background: #fff;
    border-radius: 3px;
    flex: 0 0 22px;
}
.toto-team-name { white-space: nowrap; }
.toto-score {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-weight: 900;
    font-size: 14px;
    color: var(--spk-text);
    letter-spacing: 1px;
}
.toto-score.toto-pending { color: var(--spk-muted); }
.toto-result {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .5px;
}
.toto-result.tp-r-w { background: #e5f0ff; color: #1a6dff; border: 1px solid #b9d5ff; }
.toto-result.tp-r-d { background: #f1f3f5; color: #5a6b7a; border: 1px solid #d4dae0; }
.toto-result.tp-r-l { background: #ffe5ea; color: #cc2233; border: 1px solid #ffbfc9; }
.toto-result.tp-r-p { background: #fff8e1; color: #b08500; border: 1px solid #ffe0a1; }

/* 투표 vs 결과 기반 배지 색상 (승/무/패/X 표기) */
.toto-result.tp-res-up      { background: #ffe5ea; color: #cc2233; border: 1px solid #ffbfc9; }  /* 이변 발생 → 빨강 */
.toto-result.tp-res-fav     { background: #fff4cc; color: #a07800; border: 1px solid #ffdf7e; }  /* 예감 적중 → 노랑 */
.toto-result.tp-res-mid     { background: #e5f0ff; color: #1a6dff; border: 1px solid #b9d5ff; }  /* 막상막하 → 파랑 */
.toto-result.tp-res-neutral { background: #f1f3f5; color: #5a6b7a; border: 1px solid #d4dae0; }  /* 무승부 → 무색 */
.toto-odds-cell {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 11px;
    color: var(--spk-muted);
}
.toto-odds-cell .o-na { color: #c9d5e3; }
.toto-loading { padding: 40px; color: var(--spk-muted); }

/* ── 검색 인풋 ── */
.toto-input {
    padding: 7px 10px;
    border: 1.5px solid var(--spk-line);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    background: #fff;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}
.toto-inp-sm { min-width: 110px; max-width: 140px; }
.toto-input:focus { border-color: var(--spk-primary); }
.toto-search-btn {
    padding: 7px 16px;
    height: 32px;
    border: none;
    border-radius: 7px;
    background: linear-gradient(135deg, #1a6dff, #0050cc);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    box-shadow: 0 2px 6px rgba(26,109,255,.22);
}
.toto-search-btn:hover { box-shadow: 0 4px 12px rgba(26,109,255,.38); transform: translateY(-1px); }
.toto-search-reset {
    width: 32px; height: 32px;
    border: 1.5px solid var(--spk-line);
    border-radius: 7px;
    background: #fff;
    color: var(--spk-muted);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
}
.toto-search-reset:hover { border-color: var(--spk-primary); color: var(--spk-primary); }
.toto-search-result { margin-top: 0; }
.toto-h2h-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #eef4fd, #f7fafe);
    border-radius: var(--spk-radius);
    margin-bottom: 12px;
    border: 1px solid var(--spk-line);
}
.toto-h2h-team {
    text-align: center;
}
.toto-h2h-team-name {
    font-size: 15px;
    font-weight: 900;
    color: var(--spk-primary-deep);
    margin-bottom: 4px;
}
.toto-h2h-wins {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}
.toto-h2h-team.team-a .toto-h2h-wins { color: #1a6dff; }
.toto-h2h-team.team-b .toto-h2h-wins { color: #cc2233; }
.toto-h2h-team-goals {
    font-size: 11px;
    color: var(--spk-muted);
    margin-top: 4px;
}
.toto-h2h-mid {
    text-align: center;
    padding: 0 12px;
}
.toto-h2h-draw {
    font-size: 20px;
    font-weight: 900;
    color: #5a6b7a;
    line-height: 1;
}
.toto-h2h-mid-label {
    font-size: 10px;
    color: var(--spk-muted);
    margin-top: 4px;
    letter-spacing: 1px;
}
.toto-h2h-count {
    font-size: 12px;
    color: var(--spk-muted);
    margin-bottom: 8px;
    font-weight: 600;
}
.toto-h2h-count b { color: var(--spk-primary-deep); }
.toto-search-empty {
    padding: 30px;
    text-align: center;
    color: var(--spk-muted);
    background: #f7fafe;
    border-radius: var(--spk-radius);
}

/* ── 범례 ── */
.toto-legend { display: flex; gap: 12px; }
.toto-leg {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--spk-muted);
}
.toto-leg-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-w { background: #1a6dff; }
.dot-d { background: #98a6b7; }
.dot-l { background: #cc2233; }
.dot-fav { background: #1a6dff; }  /* 정배승 */
.dot-up  { background: #cc2233; }  /* 역배승 */
.dot-mid { background: #f4b400; }  /* (deprecated) 막상막하 */
.dot-neu { background: #98a6b7; }  /* 무승부 */

/* ── 히트맵 (경기 14행 × 회차 N열, 가로 드래그 스크롤) ── */
.toto-hm-hint {
    font-size: 10px;
    color: var(--spk-muted);
    font-weight: 500;
    letter-spacing: 0;
    margin-left: 8px;
}
.toto-heatmap-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    user-select: none;
    padding: 4px 0px 10px;
    scrollbar-width: thin;
}
.toto-heatmap-wrap::-webkit-scrollbar { height: 8px; }
.toto-heatmap-wrap::-webkit-scrollbar-track { background: #f0f5fb; border-radius: 4px; }
.toto-heatmap-wrap::-webkit-scrollbar-thumb { background: #b9c7d8; border-radius: 4px; }
.toto-heatmap-wrap::-webkit-scrollbar-thumb:hover { background: var(--spk-primary); }
.toto-heatmap-wrap.toto-dragging { cursor: grabbing; }
/* 드래그 중 자식 pointer-events:none 을 걸면 mouseup 이 wrap 으로 빠져
   셀 click 이 발생하지 않음 → 제거 (user-select:none 으로 텍스트 드래그는 이미 방지) */

.toto-heatmap {
    display: grid;
    grid-template-columns: 70px repeat(14, 28px); /* 실제 열 수는 JS에서 덮어씀 */
    grid-auto-rows: 28px;
    gap: 3px;
    width: max-content;
}
/* 좌상단 코너 */
.toto-hm-corner {
    font-size: 10px;
    color: var(--spk-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f6fb;
    border-radius: 4px;
    position: sticky;
    left: 0;
    z-index: 3;
}
/* 헤더 (회차 라벨) */
.toto-hm-col-label {
    font-size: 9px;
    color: var(--spk-muted);
    font-weight: 700;
    text-align: center;
    padding: 4px 0;
    background: #f7fafe;
    border-radius: 3px;
 
    letter-spacing: 0;
    line-height: 1;
}
/* 좌측 행 라벨 (경기 N) */
.toto-hm-row-label {
    font-size: 11px;
    color: var(--spk-primary-deep);
    font-weight: 800;
    display: flex;
    align-items: center;
    padding: 0 8px;
    justify-content: flex-end;
    white-space: nowrap;
    background: #f2f6fb;
    border-radius: 4px;
    position: sticky;
    left: 0;
    z-index: 2;
}
.toto-hm-cell {
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.toto-hm-cell.cell-w { background: #1a6dff; }
.toto-hm-cell.cell-d { background: #98a6b7; }
.toto-hm-cell.cell-l { background: #cc2233; }
.toto-hm-cell.cell-empty { background: #f2f6fb; color: var(--spk-muted); font-weight: 600; }
/* W확률 vs L확률 히트맵 색상 */
.toto-hm-cell.tp-res-fav     { background: #1a6dff; color: #fff; }    /* 정배승 (W 우세) → 파랑 */
.toto-hm-cell.tp-res-up      { background: #cc2233; color: #fff; }    /* 역배승 (L 우세) → 빨강 */
.toto-hm-cell.tp-res-neutral { background: #98a6b7; color: #fff; }    /* 무승부/미확정 → 무색 */

/* ── 회차별 분포 그래프 (100% 누적 막대) ── */
.toto-dist-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    user-select: none;
    padding: 8px 4px 0;
    scrollbar-width: thin;
}
.toto-dist-wrap::-webkit-scrollbar { height: 8px; }
.toto-dist-wrap::-webkit-scrollbar-track { background: #f0f5fb; border-radius: 4px; }
.toto-dist-wrap::-webkit-scrollbar-thumb { background: #b9c7d8; border-radius: 4px; }
.toto-dist-wrap::-webkit-scrollbar-thumb:hover { background: var(--spk-primary); }
.toto-dist-wrap.toto-dragging { cursor: grabbing; }
.toto-dist-wrap.toto-dragging * { pointer-events: none; }
.toto-dist-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 100%;
}
.toto-dist-yaxis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 200px;
    padding-right: 10px;
    font-size: 10px;
    color: var(--spk-muted);
    font-weight: 600;
    text-align: right;
    min-width: 36px;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    border-right: 1px dashed var(--spk-line);
}
.toto-dist-bars {
    display: flex;
    gap: 4px;
    align-items: stretch;
    height: 200px;
    padding-left: 8px;
    flex: 1;            /* 카드 폭 가득 채움 */
    min-width: 0;
}
.toto-dist-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1 1 0;        /* 회차 수에 따라 균등 분할 → 적을수록 굵어짐 */
    min-width: 14px;    /* 100회차 이상이어도 최소 굵기 보장 */
}
.toto-dist-bar {
    width: 100%;
    max-width: 56px;    /* 회차 적을 때 너무 두꺼워지는 것 방지 */
    height: 180px;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    background: #f7fafe;
    box-shadow: inset 0 0 0 1px var(--spk-line);
}
.toto-dist-seg {
    width: 100%;
    transition: height .25s;
}
.toto-dist-seg.s-fav { background: #1a6dff; }  /* 정배승 파랑 */
.toto-dist-seg.s-up  { background: #cc2233; }  /* 역배승 빨강 */
.toto-dist-seg.s-neu { background: #98a6b7; }  /* 무승부 */
.toto-dist-label {
    font-size: 10px;
    color: var(--spk-muted);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
/* 범례 % 강조 */
.toto-legend b {
    color: var(--spk-primary-deep);
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 11px;
    margin-left: 3px;
}

/* ── 바 리스트 ── */
.toto-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.toto-bar-list { display: flex; flex-direction: column; gap: 6px; }
.toto-bar-row {
    display: grid;
    grid-template-columns: 90px 1fr 150px;
    gap: 10px;
    align-items: center;
    font-size: 12px;
}
.toto-bar-label {
    color: var(--spk-text);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toto-bar-track {
    display: flex;
    height: 18px;
    border-radius: 4px;
    overflow: hidden;
    background: #eef3f8;
    border: 1px solid var(--spk-line);
}
.toto-bar-seg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    transition: flex .3s;
    overflow: hidden;
    white-space: nowrap;
}
.toto-bar-seg.s-w { background: #1a6dff; }
.toto-bar-seg.s-d { background: #98a6b7; }
.toto-bar-seg.s-l { background: #cc2233; }
.toto-bar-pct {
    font-size: 11px;
    color: var(--spk-muted);
    font-family: 'Roboto Mono', 'Courier New', monospace;
    text-align: right;
}
.toto-bar-pct .p-w { color: #1a6dff; font-weight: 700; }
.toto-bar-pct .p-d { color: #5a6b7a; font-weight: 700; }
.toto-bar-pct .p-l { color: #cc2233; font-weight: 700; }

/* ── 번호별 분포 + 진행 회차 매치업 (한 줄에) ── */
.toto-byno-round {
    margin-left: 8px;
    color: var(--spk-muted);
    font-size: 12px;
    font-weight: 500;
}
.toto-byno-round b { color: var(--spk-primary); font-weight: 800; }

.toto-bar-list-wide .toto-bar-row-wide {
    grid-template-columns: 50px 1fr 100px 380px;
    transition: background .2s;
}
.toto-bar-list-wide .toto-bar-row-wide.is-decided {
    background: linear-gradient(90deg, rgba(255,193,7,.06) 0%, rgba(255,193,7,.14) 100%);
    border-left: 3px solid #f0c020;
    padding-left: 6px;
    margin-left: -9px;
    border-radius: 4px;
}

/* 진행 회차 매치업 셀 — 히트맵 upcoming 스타일 동일 톤 */
.toto-byno-game {
    display: grid;
    grid-template-columns: 78px 1fr auto 1fr;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef4fc 100%);
    border: 1px solid var(--spk-line);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
    min-height: 36px;
}
.toto-byno-game.is-clickable { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.toto-byno-game.is-clickable:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(26,109,255,.15); border-color: var(--spk-primary); }
.toto-byno-game.is-decided {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3c4 100%);
    border-color: #f0c020;
    box-shadow: 0 1px 4px rgba(240,192,32,.25);
}
.toto-byno-empty {
    grid-template-columns: 1fr;
    justify-items: center;
    color: #b0bcc9;
    background: transparent;
    border-style: dashed;
}

/* 시간 */
.toto-byno-date {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 10px;
    font-weight: 700;
    color: var(--spk-muted);
    background: rgba(255,255,255,.6);
    padding: 2px 6px;
    border-radius: 3px;
    text-align: center;
    white-space: nowrap;
}

/* 팀명 + 우세 컬러 (히트맵과 동일: fav=파랑, und=빨강) */
.toto-byno-team {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--spk-text);
    overflow: hidden;
    min-width: 0;
}
.toto-byno-team .toto-byno-pct,
.toto-byno-team .toto-byno-pct-draw {
    display: inline-block;
    flex: 0 0 auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
}
.toto-byno-team .toto-byno-pct {
    background: rgba(0,0,0,.05);
    color: var(--spk-muted);
}
.toto-byno-home { justify-content: flex-end; text-align: right; }
.toto-byno-away { justify-content: flex-start; text-align: left; }
.toto-byno-team.is-fav { color: #1a6dff; }
.toto-byno-team.is-fav .toto-byno-pct { background: rgba(26,109,255,.12); color: #1a6dff; }
.toto-byno-team.is-und { color: #cc2233; }
.toto-byno-team.is-und .toto-byno-pct { background: rgba(204,34,51,.12); color: #cc2233; }

/* 가운데: vs / 무 % / 점수 */
.toto-byno-vs {
    color: #98a6b7;
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 auto;
}
.toto-byno-pct-draw {
    background: rgba(152,166,183,.18);
    color: #5a6b7a;
}
.toto-byno-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: linear-gradient(135deg, #1a1f27, #2c3540);
    color: #fff;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.toto-byno-score-sep { opacity: .55; font-weight: 400; }
.toto-byno-score.s-w { background: linear-gradient(135deg, #1a6dff, #0d52d4); }
.toto-byno-score.s-d { background: linear-gradient(135deg, #5a6b7a, #3e4955); }
.toto-byno-score.s-l { background: linear-gradient(135deg, #cc2233, #9a1a27); }
.toto-byno-result-tag {
    margin-left: 4px;
    padding: 1px 5px;
    background: rgba(255,255,255,.25);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
}

/* ── 반응형 ── */
@media (max-width: 900px) {
    .toto-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .toto-stats-grid .toto-stat:nth-child(5) { grid-column: span 2; }
    .toto-grid2 { grid-template-columns: 1fr; }
    .toto-bar-row { grid-template-columns: 70px 1fr 120px; font-size: 11px; }
    .toto-bar-list-wide .toto-bar-row-wide {
        grid-template-columns: 50px 1fr;
        row-gap: 6px;
    }
    .toto-bar-list-wide .toto-bar-row-wide .toto-bar-pct,
    .toto-bar-list-wide .toto-bar-row-wide .toto-byno-game {
        grid-column: span 2;
    }
    .toto-hm-row-label { font-size: 10px; padding: 0 6px; }
}

/* ── 히트맵 내부 다음회차 행 (넓은 흰색 셀) ── */
.toto-hm-cell.toto-hm-upcoming {
    background: #fff;
    color: var(--spk-text);
    font-size: 11px;
    font-weight: 700;
    padding: 0 8px;
    border: 1px solid var(--spk-line);
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    cursor: default;
    transition: background .15s, box-shadow .15s;
}
.toto-hm-cell.toto-hm-upcoming.is-clickable { cursor: pointer; }
.toto-hm-cell.toto-hm-upcoming.is-clickable:hover {
    background: #f0f7ff;
    box-shadow: 0 0 0 1px var(--spk-primary) inset;
}
.toto-hm-cell.toto-hm-upcoming .hm-up-date {
    color: #3d3d3d;
    font-weight: 800;
    margin-right: 6px;
}
.toto-hm-cell.toto-hm-upcoming .hm-up-vs {
    color: var(--spk-muted);
    margin: 0 4px;
    font-weight: 500;
}
.toto-hm-cell.toto-hm-upcoming .hm-up-team { color: var(--spk-text); display: inline-flex; align-items: baseline; gap: 4px; }
.toto-hm-cell.toto-hm-upcoming .hm-up-team.is-fav { color: #1a6dff; font-weight: 800; }
.toto-hm-cell.toto-hm-upcoming .hm-up-team.is-und { color: #cc2233; font-weight: 700; }
.toto-hm-cell.toto-hm-upcoming .hm-up-pct {
    font-size: 10px;
    font-weight: 700;
    color: inherit;
    opacity: .75;
    font-variant-numeric: tabular-nums;
}
.toto-hm-cell.toto-hm-upcoming .hm-up-pct-draw {
    font-size: 10px;
    font-weight: 700;
    color: var(--spk-muted);
    font-variant-numeric: tabular-nums;
    padding: 0 4px;
}
.toto-hm-col-label.is-upcoming {
    background: var(--spk-primary);
    color: #fff;
    border-radius: 4px;
}

/* ── 경기 상세 아코디언 ── */
.toto-game-row { cursor: pointer; transition: background .15s; }
.toto-game-row:hover td { background: #f0f7ff !important; }
.toto-game-row.is-open td {
    background: #e6f0ff !important;
    box-shadow: inset 0 -2px 0 var(--spk-primary);
}
.toto-detail-row td { padding: 0 !important; background: #f7fafe !important; }
.toto-detail-wrap {
    padding: 14px 16px;
    background: #fafcff;
    border-top: 1px solid var(--spk-line);
    border-bottom: 2px solid var(--spk-primary);
}
.toto-detail-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--spk-line);
}
.toto-detail-tab {
    padding: 8px 18px;
    border: 0;
    background: transparent;
    color: var(--spk-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
}
.toto-detail-tab:hover { color: var(--spk-primary-deep); background: #eef4ff; }
.toto-detail-tab.is-active {
    color: var(--spk-primary);
    border-bottom-color: var(--spk-primary);
    background: #fff;
}
.toto-detail-periods {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.toto-detail-periods[data-hidden="1"] { display: none; }
.toto-period-btn {
    padding: 4px 12px;
    border: 1px solid var(--spk-line);
    border-radius: 999px;
    background: #fff;
    color: var(--spk-text);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.toto-period-btn:hover { border-color: var(--spk-primary); color: var(--spk-primary); }
.toto-period-btn.is-active {
    background: var(--spk-primary);
    border-color: var(--spk-primary);
    color: #fff;
}
.toto-detail-content {
    background: #fff;
    border: 1px solid var(--spk-line);
    border-radius: 8px;
    padding: 10px 12px;
    min-height: 120px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}
.toto-detail-loading,
.toto-detail-empty {
    padding: 30px;
    text-align: center;
    color: var(--spk-muted);
    font-size: 12px;
}
/* 와이즈토토 원본 HTML 캡슐화 — 테마 톤에 맞춰 살짝 정돈 */
.toto-detail-body { color: #333; }
.toto-detail-body table { border-collapse: collapse; width: 100%; }
.toto-detail-body th,
.toto-detail-body td { padding: 4px 6px; border-bottom: 1px solid #eef2f7; }
.toto-detail-body h2 { font-size: 13px; margin: 8px 0 6px; color: var(--spk-primary-deep); font-weight: 800; }
.toto-detail-body .tabs { display: none; } /* 원본 5/10/20 탭은 우리 버튼으로 대체 */
.toto-detail-body .sort_wrap { display: none; } /* 원본 정렬 라디오도 숨김 — 필요시 다시 노출 */
.toto-detail-body a { pointer-events: none; color: inherit; text-decoration: none; }

/* SVG 도넛 차트 (Google Charts 대체) */
.toto-detail-body .chart_wrap.type03 {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 0 8px;
}
.toto-detail-body .chart_wrap.type03 .chart,
.toto-detail-body .chart_wrap.type02 .chart {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* 전적통계 (latest_record) — 두 팀 좌/우 분리 + 각 팀별 3도넛 가로 */
.toto-detail-body .section_wrap { position: relative; font-size: 0; /* inline-block whitespace 제거 */ }
.toto-detail-body .section_wrap > *:not(.chart_wrap.type02) { font-size: 12px; }
.toto-detail-body .chart_wrap.type02 {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-start;
    vertical-align: top;
    width: 50%;
    padding: 10px 0 4px;
    font-size: 12px;
    box-sizing: border-box;
}
.toto-detail-body .chart_wrap.type02.left { border-right: 1px solid var(--spk-line); }
.toto-detail-body .chart_wrap.type02 .chart {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.toto-detail-body .chart_wrap.type02 .team_text {
    flex: 0 0 100%;
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--spk-text);
    text-align: center;
}
.toto-detail-body .chart_wrap.type02 .tp-donut { width: 64px; height: 64px; }
.toto-detail-body .chart_wrap.type02 .tp-donut-msg { font-size: 10px; }
.toto-detail-body .chart_wrap.type02 .tp-donut-msg strong { font-size: 14px; }

/* ── 다음 경기 섹션 ── */
.toto-detail-body .section_wrap.next_play {
    display: block;
    font-size: 0;  /* inline 공백 제거 */
}
.toto-detail-body .section_wrap.next_play > * { font-size: 12px; }
.toto-detail-body .section_wrap.next_play h2 {
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--spk-primary-deep);
    padding: 6px 0;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--spk-line);
}
.toto-detail-body .section_wrap.next_play .play_info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    vertical-align: top;
    padding: 6px 4px 14px;
    box-sizing: border-box;
    gap: 6px;
    font-size: 12px;
}
.toto-detail-body .section_wrap.next_play .play_info:first-of-type {
    border-right: 1px dashed var(--spk-line);
}

.toto-detail-body .play_team {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}
.toto-detail-body .play_team .thumb {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toto-detail-body .play_team .thumb img {
    max-width: 48px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.toto-detail-body .play_team .name {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--spk-text);
}
.toto-detail-body .play_team .info {
    margin-top: 2px;
    font-size: 10px;
    color: var(--spk-muted);
    line-height: 1.4;
}
.toto-detail-body .play_team .info strong {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: var(--spk-primary);
    margin-bottom: 2px;
}

.toto-detail-body .versus02 {
    flex-shrink: 0;
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--spk-muted);
    text-align: center;
}
.toto-detail-body .versus02 span { display: block; line-height: 1.3; }
.toto-detail-body .versus02 strong {
    margin-top: 4px;
    color: var(--spk-primary);
    font-size: 13px;
    font-weight: 900;
}

/* 하단 2개 "다음 경기 2" 박스 */
.toto-detail-body .play_info_nextwrap {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--spk-line);
}
.toto-detail-body .play_next_wrap {
    flex: 1 1 0;
    min-width: 0;
}
.toto-detail-body .play_info_next02 {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.toto-detail-body .play_next02 {
    background: #f7fafe;
    border: 1px solid var(--spk-line);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
}
.toto-detail-body .play_next02:last-child { margin-bottom: 0; }
.toto-detail-body .versus03 {
    font-size: 10px;
    color: var(--spk-muted);
    margin-bottom: 4px;
    font-weight: 600;
}
.toto-detail-body .versus03 span { display: inline; }

.toto-detail-body .play_team_next {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}
.toto-detail-body .next2_name_left,
.toto-detail-body .next2_name_right {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    color: var(--spk-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toto-detail-body .next2_name_left  { text-align: right; }
.toto-detail-body .next2_name_right { text-align: left; }
.toto-detail-body .next2_info_left,
.toto-detail-body .next2_info_right {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--spk-muted);
}
.toto-detail-body .versus04 {
    flex-shrink: 0;
    padding: 0 4px;
    font-size: 10px;
    color: var(--spk-primary);
    font-weight: 800;
}

/* 화살표 아이콘 — 작게 */
.toto-detail-body .play_next_ico {
    text-align: center;
    margin: 4px 0;
}
.toto-detail-body .play_next_ico img {
    display: inline-block;
    width: 16px;
    height: auto;
    opacity: 0.6;
}

/* ── 기록통계: 시간대별 평균 득/실 (bar chart) ── */
.toto-detail-body .section_wrap.score_time {
    position: relative;
    padding: 6px 0 10px;
}
.toto-detail-body .section_wrap.score_time > h2 {
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--spk-primary-deep);
    padding: 6px 0;
    margin: 0 0 8px;
    border-bottom: 1px solid var(--spk-line);
    background: #f2f6fb;
    border-radius: 6px;
}
.toto-detail-body .section_wrap.score_time .aside {
    position: absolute;
    top: 10px; right: 8px;
}
.toto-detail-body .section_wrap.score_time .aside .item_list {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0; margin: 0;
    font-size: 11px;
    color: var(--spk-muted);
}
.toto-detail-body .section_wrap.score_time .aside .item_list li { position: relative; padding-left: 14px; }
.toto-detail-body .section_wrap.score_time .aside .item_list li::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 10px; height: 10px;
    border-radius: 2px;
}
.toto-detail-body .section_wrap.score_time .aside .item_list li.score01::before { background: #1a6dff; }
.toto-detail-body .section_wrap.score_time .aside .item_list li.score02::before { background: #cc2233; }

/* 두 팀 좌우 나란히 */
.toto-detail-body .section_wrap.score_time {
    font-size: 0;
}
.toto-detail-body .section_wrap.score_time > * { font-size: 12px; }
.toto-detail-body .section_wrap.score_time .chart_wrap.half {
    display: inline-block;
    vertical-align: top;
    width: 50%;
    padding: 8px 6px;
    text-align: center;
    box-sizing: border-box;
    font-size: 12px;
}
.toto-detail-body .section_wrap.score_time .chart_wrap.half.first {
    border-right: 1px solid var(--spk-line);
}
.toto-detail-body .section_wrap.score_time .chart_wrap.half h3 {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--spk-text);
    text-align: center;
}
.toto-detail-body .section_wrap.score_time .chart_wrap.half .lines { display: none; }
.toto-detail-body .tp-barchart {
    width: 100%;
    height: auto;
    max-height: 180px;
    display: block;
}
.toto-detail-body .tp-donut {
    width: 88px; height: 88px;
    display: block;
}
.toto-detail-body .tp-donut-msg {
    font-size: 11px;
    line-height: 1.4;
    color: #555;
    text-align: center;
    font-weight: 500;
}
.toto-detail-body .tp-donut-msg strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #1a6dff;
    margin-bottom: 2px;
}
/* 라인 차트 (최근전적 득/실 추이) */
.toto-detail-body .chart_tab {
    display: flex;
    gap: 12px;
    padding: 8px 0;
}
.toto-detail-body .chart_tab .view_chart {
    flex: 1 1 0;
    min-width: 0;
    background: #fafcff;
    border: 1px solid var(--spk-line);
    border-radius: 8px;
    padding: 8px;
}
.toto-detail-body .chart_tab .view_chart .title {
    margin-top: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--spk-primary-deep);
}
.toto-detail-body .chart_tab .aside .item_list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
    justify-content: flex-end;
    font-size: 10px;
    color: var(--spk-muted);
}
.toto-detail-body .chart_tab .aside .item_list li { position: relative; padding-left: 12px; }
.toto-detail-body .chart_tab .aside .item_list li.score01::before,
.toto-detail-body .chart_tab .aside .item_list li.score02::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 8px; height: 2px;
    transform: translateY(-50%);
}
.toto-detail-body .chart_tab .aside .item_list li.score01::before { background: #1a6dff; }
.toto-detail-body .chart_tab .aside .item_list li.score02::before { background: #cc2233; }
.toto-detail-body .tp-linechart {
    width: 100%;
    height: auto;
    max-height: 200px;
    display: block;
}
/* graph bar (득/실 그래프) 기본 — score.left/right에서 폭은 100%로 확장 */
.toto-detail-body .graph_wrap {
    display: block;
    height: 6px;
    background: #eef2f7;
    border-radius: 3px;
    overflow: hidden;
}
.toto-detail-body .graph {
    height: 100%;
    background: #1a6dff;
}
.toto-detail-body .graph.type02 { background: #cc2233; }
.toto-detail-body .score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.toto-detail-body .score .info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toto-detail-body .score .result {
    flex-shrink: 0;
    min-width: 86px;
    font-weight: 700;
    font-size: 11px;
    color: var(--spk-muted);
}
.toto-detail-body .score .result strong { color: var(--spk-primary); font-size: 15px; margin-right: 2px; }
.toto-detail-body .score .text { margin: 0; font-size: 11px; color: var(--spk-muted); }

/* 홈(좌): [평균 result] [bar info] — result 바깥쪽(왼쪽), bar 안쪽(오른쪽) */
.toto-detail-body .score.left { justify-content: flex-start; text-align: left; }
.toto-detail-body .score.left .result { text-align: left; }
.toto-detail-body .score.left .graph_wrap { width: 100%; }
.toto-detail-body .score.left .graph { float: right; }  /* 바 오른쪽 정렬 (중앙 방향) */

/* 원정(우): [bar info] [평균 result] — bar 안쪽(왼쪽), result 바깥쪽(오른쪽) */
.toto-detail-body .score.right { justify-content: flex-end; text-align: right; }
.toto-detail-body .score.right .result { text-align: right; }
.toto-detail-body .score.right .graph_wrap { width: 100%; }

/* 가운데 "전체(득/실)" 셀 */
.toto-detail-body td.title {
    text-align: center;
    font-weight: 700;
    color: var(--spk-primary-deep);
    font-size: 11px;
    white-space: nowrap;
    padding: 0 6px !important;
}
.toto-detail-body td.empty { width: 24px; padding: 0 !important; }

/* ── 경기 결과 테이블 (로고 정렬 + 점수 여유) ── */
.toto-detail-body .match_result .score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.toto-detail-body .match_result .team {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1 1 0;
    min-width: 0;
    font-size: 12px;
    line-height: 1.2;
}
/* 홈(좌): 로고를 팀명 왼쪽으로 이동 — [img][name][score] */
.toto-detail-body .match_result .team.left { justify-content: flex-end; }
.toto-detail-body .match_result .team.left img { order: -1; margin-right: 2px; }
/* 원정(우): 이미 [score][img][name] 구조 — 로고는 팀명 바로 왼쪽 */
.toto-detail-body .match_result .team.right { justify-content: flex-start; }

.toto-detail-body .match_result .team img {
    width: 20px; height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.toto-detail-body .match_result .team span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 34px;
    padding: 2px 8px;
    background: #f2f6fb;
    border-radius: 5px;
    font-weight: 900;
    font-size: 14px;
    color: var(--spk-primary-deep);
}
.toto-detail-body .match_result .score em {
    flex-shrink: 0;
    font-style: normal;
    font-weight: 700;
    color: var(--spk-muted);
    padding: 0 2px;
}
.toto-detail-body .match_result .team.emphasis { font-weight: 800; }
.toto-detail-body .match_result .team.emphasis span { background: #e6f0ff; color: var(--spk-primary); }

/* 컬럼 폭 재조정: 스코어 셀 넉넉히, 기타 타이트하게 */
.toto-detail-body .match_result .data_table col:nth-child(1) { width: 80px !important; }   /* 대회 */
.toto-detail-body .match_result .data_table col:nth-child(2) { width: 70px !important; }   /* 일시 */
.toto-detail-body .match_result .data_table col:nth-child(3) { width: 60px !important; }   /* 전반전 */
.toto-detail-body .match_result .data_table col:nth-child(4) { width: auto !important; }   /* 스코어 — 넓게 */
.toto-detail-body .match_result .data_table col:nth-child(5) { width: 70px !important; }   /* 결과 */

/* ── 순위 테이블 (data_table type03) ── */
.toto-detail-body .data_table.type03 {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.toto-detail-body .data_table.type03 th,
.toto-detail-body .data_table.type03 td {
    padding: 6px 3px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.toto-detail-body .data_table.type03 th {
    background: #f2f6fb;
    color: var(--spk-primary-deep);
    font-weight: 700;
    font-size: 11px;
    border-bottom: 1px solid var(--spk-line);
}
.toto-detail-body .data_table.type03 tbody tr { border-bottom: 1px solid #eef2f7; }
.toto-detail-body .data_table.type03 tbody tr:hover td { background: #f7fafe; }

/* 순위/팀 컬럼 타이트하게 */
.toto-detail-body .data_table.type03 th:first-child,
.toto-detail-body .data_table.type03 td:first-child {
    width: 36px;
    font-weight: 800;
    color: var(--spk-primary);
}

/* 팀명 셀: 로고 + 이름 한 줄 정렬, 왼쪽 정렬, 폭 타이트 */
.toto-detail-body .data_table.type03 th.left,
.toto-detail-body .data_table.type03 td.left {
    width: 110px;
    text-align: left;
    padding-left: 6px;
}
.toto-detail-body .data_table.type03 td.left.line {
    font-weight: 700;
    color: var(--spk-text);
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toto-detail-body .data_table.type03 td.left.line img {
    width: 18px; height: 18px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

/* 숫자 컬럼 — "line"(그룹 시작) 좌측에만 구분선, 여유 padding */
.toto-detail-body .data_table.type03 td,
.toto-detail-body .data_table.type03 th { font-variant-numeric: tabular-nums; }
.toto-detail-body .data_table.type03 .line { border-left: 2px solid var(--spk-line); }
.toto-detail-body .data_table.type03 .last { border-right: none; }

/* 표 전체 좌우 여유 확보 */
.toto-detail-body .section_wrap.rank .table_wrap,
.toto-detail-body .table_wrap { overflow-x: auto; }

/* ─────────────────────────────────────────────────
   사용설명서 — 탭 내 버튼 + 모달 + 가이드 콘텐츠
   ───────────────────────────────────────────────── */
.toto-tabs { align-items: center; justify-content: flex-start; }
.toto-help-btn {
    margin-left: auto;
    padding: 6px 12px;
    border: 1px solid var(--spk-line);
    border-radius: 7px;
    background: #f0f5ff;
    color: var(--spk-primary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: none;
    font-family: inherit;
}
.toto-help-btn i { margin-right: 3px; }
.toto-help-btn:hover {
    background: var(--spk-primary);
    color: #fff;
    border-color: var(--spk-primary);
}
/* 활성 탭에 맞춰 노출 */
.toto-tabs[data-active-tab="match"] .toto-help-btn[data-help="match"],
.toto-tabs[data-active-tab="pattern"] .toto-help-btn[data-help="pattern"] {
    display: inline-flex;
    align-items: center;
}

/* ───────── 경기 상세 모달 ───────── */
body.toto-modal-open { overflow: hidden; }
.toto-detail-modal {
    position: fixed; inset: 0;
    z-index: 9998;
    background: rgba(2, 6, 18, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: tpHelpIn .18s ease;
}
.toto-detail-modal[hidden] { display: none; }
.toto-detail-backdrop {
    position: absolute; inset: 0;
}
.toto-detail-modal-box {
    position: relative;
    width: min(960px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.toto-detail-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0c2d5e, #1a6dff);
    color: #fff;
    flex-shrink: 0;
}
.toto-detail-modal-head strong {
    font-size: 15px;
    font-weight: 800;
}
.toto-detail-modal-head strong i { margin-right: 6px; }
.toto-detail-modal-close {
    width: 32px; height: 32px;
    border: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.toto-detail-modal-close:hover { background: rgba(255, 255, 255, 0.3); }
.toto-detail-modal-body {
    padding: 16px 18px 20px;
    overflow-y: auto;
    flex: 1;
}
.toto-detail-modal-body .toto-detail-wrap {
    padding: 0;
    background: transparent;
}
@media (max-width: 768px) {
    .toto-detail-modal { padding: 10px; }
    .toto-detail-modal-box { max-height: 95vh; }
    .toto-detail-modal-head { padding: 12px 14px; }
    .toto-detail-modal-body { padding: 12px 12px 16px; }
}

/* 모달 */
.toto-help-modal {
    position: fixed; inset: 0;
    z-index: 9999;
    background: rgba(2, 6, 18, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: tpHelpIn .18s ease;
}
.toto-help-modal[hidden] { display: none; }
@keyframes tpHelpIn { from { opacity: 0; } to { opacity: 1; } }
.toto-help-box {
    width: min(840px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.toto-help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: linear-gradient(135deg, #0c2d5e, #1a6dff);
    color: #fff;
}
.toto-help-head strong { font-size: 15px; font-weight: 800; }
.toto-help-head strong i { margin-right: 6px; }
.toto-help-close {
    width: 32px; height: 32px;
    border: 0;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.toto-help-close:hover { background: rgba(255, 255, 255, 0.3); }

.toto-help-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #fafcff;
    font-size: 13px;
    line-height: 1.7;
    color: #2c3e50;
}

/* 가이드 콘텐츠 구조 */
.help-doc .help-intro {
    background: linear-gradient(135deg, #eaf2ff, #f3f7fc);
    border-left: 4px solid var(--spk-primary);
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.help-doc .help-intro h3 {
    margin: 0 0 6px;
    font-size: 16px; font-weight: 900;
    color: var(--spk-primary-deep);
    letter-spacing: -0.01em;
}
.help-doc .help-intro p { margin: 0; color: var(--spk-muted); font-size: 12.5px; }

.help-sec {
    margin: 14px 0;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--spk-line);
    border-radius: 8px;
}
.help-sec h4 {
    margin: 0 0 10px;
    font-size: 14px; font-weight: 800;
    color: var(--spk-primary-deep);
}
.help-sec p { margin: 0 0 8px; }
.help-sec ul, .help-sec ol { margin: 8px 0 0; padding-left: 20px; }
.help-sec li { margin-bottom: 6px; }
.help-sec li b { color: var(--spk-primary-deep); font-weight: 800; }

.help-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.help-legend > div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.help-legend b { color: var(--spk-primary-deep); font-weight: 800; }

.help-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px; height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px; font-weight: 900;
    color: #fff;
    line-height: 1;
}
.help-chip.chip-fav { background: #1a6dff; }
.help-chip.chip-up  { background: #cc2233; }
.help-chip.chip-mid { background: #f4b400; color: #5a4100; }
.help-chip.chip-d,
.help-chip.chip-neu { background: #98a6b7; }

.help-tip {
    margin-top: 10px !important;
    padding: 8px 12px;
    background: #fff9e6;
    border-left: 3px solid var(--spk-accent);
    border-radius: 4px;
    font-size: 12.5px;
    color: #6b5b00;
}

.help-common { background: #f7fafe; border-color: var(--spk-primary); border-left-width: 4px; }
.help-disclaimer { background: #fff4f4; border-color: #f4c2c2; }
.help-disclaimer p { font-size: 12px; color: #7a3b3b; }
.help-disclaimer a { color: var(--spk-red); font-weight: 700; text-decoration: underline; }

@media (max-width: 600px) {
    .toto-help-body { padding: 14px 16px; }
    .help-doc .help-intro { padding: 12px 14px; }
    .help-sec { padding: 12px 14px; }
}
