/* stats.css — 시즌 기록·선수 기록·리그 순위. app.css 에서 주제별로 나눔; layout.html 이 base → … 순서로 전부 링크한다. */
  table.aitab td.who small.acc { display: block; font-size: 11px; color: var(--muted); font-weight: 400; white-space: normal; line-height: 1.3; } /* 참가자 시즌 적중률: 승패 58% (14/24) · U/O 52% (12/23) */
  table.aitab .acc-m { display: none; }
  @media (max-width: 700px) {
    table.aitab td.who small.acc { display: none; }
    table.aitab .acc-m { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
  } /* 모바일: 적중률은 이름 칸 대신 근거 줄 위에 (이름 칸이 세로로 길어지지 않게) */
  table.t.kv td.l { white-space: nowrap; } /* 시즌 기록 요약 표: 항목 이름은 줄바꿈하지 않고 설명은 툴팁으로 (다른 표의 긴 글엔 적용 안 함) */
  table.t.kv tr.src td { color: var(--muted); font-size: 13px; } /* 모델 vs 배당: 출처별 하위 줄 */
  .ctabs { display: flex; border-bottom: 2px solid var(--navy); margin-top: 8px; }
  .ctabs a { flex: 1; text-align: center; padding: 9px 4px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; border: 1px solid var(--line); border-bottom: none; background: #f7f8fa; }
  .ctabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
  .csub { font-size: 13px; color: var(--muted); padding: 8px 12px 0; }
  .clegend { display: flex; justify-content: flex-end; gap: 10px; font-size: 12px; color: var(--muted); padding: 2px 4px; }
  .clegend i { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-sm); margin-right: 4px; vertical-align: -1px; }
  .ctip { position: absolute; background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; padding: 6px 9px; font-size: 13px; line-height: 1.5; box-shadow: 0 2px 8px rgba(0,0,0,.12); pointer-events: none; white-space: nowrap; z-index: 5; }
  @media (max-width: 700px) {
    .ctip { white-space: normal; max-width: 230px; font-size: 12px; }
    .chart svg { touch-action: pan-y; }
  }
  @media (max-width: 700px) {
    .ctabs a { font-size: 13px; }
  }
  .chart { padding: 6px 12px 4px; overflow-x: auto; }
  .chart svg { display: block; }
  @media (max-width: 700px) {
    table.standings th, table.standings td { padding: 6px 4px; font-size: 13px; }
    table.standings th.ours, table.standings td.ours { display: none; }
    /* 모바일: 팀마다 두 줄 — 1행 기록(순위~게임차), 2행 매직넘버·최근10·연속·득실·ELO·예상 최종. 옆으로 스크롤하지 않아도 다 보이게 */
    table.standings th:nth-child(9), table.standings th:nth-child(10), table.standings th:nth-child(11), table.standings th:nth-child(12),
    table.standings tr:not(.sub) td:nth-child(9), table.standings tr:not(.sub) td:nth-child(10), table.standings tr:not(.sub) td:nth-child(11), table.standings tr:not(.sub) td:nth-child(12) { display: none; } /* 모바일: 잔여·매직넘버·최근10·연속은 펼친 줄(.sub6)에 */
    table.standings tr.sub { display: none; }
    table.standings tr.sub.open { display: table-row; }
    table.standings tr.sub td { padding: 0 4px 8px; border-top: none; white-space: normal; }
    table.standings tr.trow { cursor: pointer; }
    table.standings .chev { display: inline-block; font-style: normal; color: #b5bccb; font-size: 11px; margin-left: 4px; transition: transform .15s; }
    table.standings tr.trow.open .chev { transform: rotate(180deg); color: var(--blue); }
    table.standings tr.trow:not(.open) td { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
    table.standings .sub6 { display: grid; grid-template-columns: .6fr auto 1.3fr .75fr .9fr .85fr 1.05fr; gap: 3px; background: #f6f7fa; border-radius: 4px; padding: 5px 4px; }
    table.standings .sub6 div { text-align: center; min-width: 0; }
    table.standings .sub6 small { display: block; font-size: 10px; color: var(--muted); line-height: 1.2; margin-bottom: 2px; }
    table.standings .sub6 b { display: block; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    table.standings .sub6 b.pos { color: var(--green); }
    table.standings .sub6 b.neg { color: var(--red); }
    table.standings .sub6 a.sub-team { grid-column: 1 / -1; display: block; text-align: center; padding: 6px 0 2px; margin-top: 2px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--blue); text-decoration: none; } /* 7칸 그리드 아래 한 줄 (칸으로 넣으면 줄이 넘쳐 깨짐) */
    table.standings .sub6 .mtag { font-size: 10px; padding: 0 3px; }
    table.standings .sub6 .mgbtn, table.standings .sub6 .mgplain { gap: 2px; } table.standings .sub6 .mgbtn .mgi { width: 12px; height: 12px; font-size: 8px; } table.standings .sub6 .mgbtn { margin: -4px 0; padding: 4px 0; } table.standings .sub6 div.mgc { min-width: max-content; } table.standings .sub6 div.mgc b { overflow: visible; } /* 매직넘버 칸: "우승 확정 ⓘ"가 잘려서 칸 폭을 내용만큼(auto) 주고 간격·아이콘을 줄임 (버튼 음수 좌우 여백은 칸 폭 계산을 줄여서 0) */
    table.standings tr:not(.sub) td { border-bottom: none; padding-bottom: 2px; }
  }
  .clegend.tg { gap: 6px 8px; padding: 6px 8px 4px; }
  .clegend.tg a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); cursor: pointer; color: var(--text); font-size: 13px; background: #fff; user-select: none; }
  .clegend.tg a.off { opacity: .4; text-decoration: line-through; }
  table.odds-t td, table.odds-t th { white-space: nowrap; }
  @media (max-width: 700px) {
    table.odds-t { font-size: 12px; }
    table.odds-t td, table.odds-t th { padding: 6px 5px; }
  }
  #oddsHist, #oddsChart, #flatChart, #trend { clear: both; width: auto; display: block; }
  .hsw { float: right; display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; font-size: 13px; font-weight: 700; }
  .hsw a { padding: 3px 10px; color: var(--muted); cursor: pointer; }
  .hsw a.on { background: var(--navy); color: #fff; }
  @media (max-width: 700px) {
    .ctip { max-width: 260px; white-space: normal; }
  }
  .acc.hi { color: var(--green); font-weight: 700; }
  .acc.top { color: var(--blue); font-weight: 800; }
  .acc.lo { color: var(--red); } /* 적중률 80%↑ 파랑, 60~80% 초록, 50% 미만 빨강 */
  .stitle { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
  .stitle b { white-space: nowrap; }
  .stitle small { color: var(--muted); font-size: 13px; margin-left: auto; }
  @media (max-width: 700px) {
    .stitle { padding: 9px 10px; }
    .stitle small { display: none; }
  }
  .boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; padding: 12px; background: var(--bg); }
  .board { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
  .board .bh { padding: 8px 10px; font-weight: 800; border-bottom: 1px solid var(--line); }
  .board .top1 { display: flex; align-items: center; gap: 8px; padding: 10px; color: var(--text); background: #fbfcfe; }
  .board .top1 .logo { width: 40px; height: 40px; flex-basis: 40px; }
  @media (max-width: 700px) {
    .board .top1 { padding: 8px; gap: 6px; }
    .board .top1 .logo { width: 30px; height: 30px; flex-basis: 30px; }
    .board .top1 .nm { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .board .top1 .val { font-size: 16px; }
    .board .row { padding: 4px 8px; font-size: 12px; }
  }
  .board .top1 .nm { flex: 1; font-weight: 700; min-width: 0; }
  .board .top1 .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
  .board .top1 .val { font-size: 18px; font-weight: 800; color: var(--blue); }
  .board .row { display: flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 13px; border-top: 1px dotted var(--line); }
  .board .row .rk { width: 14px; color: var(--muted); }
  .board .row .nm { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .board .row .nm small { color: var(--muted); }
  .board .row .v { font-weight: 700; }
  .tbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; color: var(--muted); }
  .tbar .sp { flex: 1; }
  .tbar select { font: inherit; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
  table.rec th a { color: #fff; }
  table.rec th a.on { text-decoration: underline; }
  table.rec td.hl { background: var(--blue-light); font-weight: 700; }
  table.rec th, table.rec td { padding: 6px 5px; font-size: 13px; white-space: nowrap; }
  @media (max-width: 700px) {
    .boards { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 8px; }
  }
  .mtag { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 5px; border-radius: var(--r-sm); vertical-align: 1px; white-space: nowrap; }
  .mtag.title { background: #fff3cd; color: #8a6100; border: 1px solid #f2d27a; }
  .mtag.ps { background: var(--blue-light); color: var(--blue); border: 1px solid #b9cdf2; }
  .mtag.out { background: var(--hover); color: var(--muted); border: 1px solid var(--line-strong); }
  table.standings td.mg, table.odds-t td.mg { white-space: nowrap; font-weight: 700; }
  table.standings td.pj { white-space: nowrap; }
  table.standings td.pj small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
  table.standings th.ours { background: var(--slate); }
  table.standings td.ours { background: #f6f7fa; color: var(--muted); }
  table.standings td.ours.pos { color: var(--green); }
  table.standings td.ours.neg { color: var(--red); }
  /* 표 공통 규칙 — 자리를 옮기지 말 것. 한 파일이던 app.css 에서 이 4줄은 위의 페이지별 표 규칙(순위·예측판 AI·내 예측·순위표·배당·기록의 모바일 셀 여백)보다 뒤에 있었다. */
  /* 아래 calib·포스트시즌 규칙보다는 앞. 같은 우선순위라 순서가 곧 모양(셀 여백 8px)이므로 그 위치를 지킨다. base.css 로 올리면 표 여백이 모두 바뀐다. */
  table.t th { background: var(--navy); color: #fff; font-weight: 600; padding: 8px; text-align: center; }
  table.t td { padding: 8px; border-bottom: 1px solid var(--line); text-align: center; }
  table.t td.l, table.t th.l { text-align: left; }
  table.t tr:nth-child(even) td { background: var(--surface); }
  @media (min-width: 701px) {
    table.standings tr.sub { display: none; }
    table.standings .chev { display: none; }
  } /* 두 줄 접기는 모바일에서만 (기본 규칙이 뒤에 오면 모바일 규칙을 덮어써서 min-width로) */
  @media (max-width: 700px) {
    table.standings tr:nth-child(even) td { background: #fff; }
    table.standings tr:nth-child(4n+2) td, table.standings tr:nth-child(4n+3) td { background: var(--surface); }
  } /* 줄무늬는 팀(2행) 단위로 */
  @media (max-width: 400px) {   /* 360~390px 폰: 위 표 공통 여백(8px)이 모바일 순위표 여백을 덮어써 표가 카드보다 넓어지고 게임차가 잘리던 것 — 좌우 여백만 줄임 (공통 규칙 뒤라야 적용) */
    table.standings tr:not(.sub) > th, table.standings tr:not(.sub) > td { padding-left: 3px; padding-right: 3px; }
  }
  @media (max-width: 370px) { table.standings th, table.standings tr:not(.sub) > td { font-size: 12px; } table.standings .chev { margin-left: 2px; } table.standings .sub6 { gap: 2px; padding: 5px 2px; } table.standings .sub6 b { font-size: 11px; } }
  .grid2 .gcol { display: flex; flex-direction: column; gap: 16px; min-width: 0; } /* 한 칸에 카드 두 개 세로로 (시즌 기록 요약: 승패 예측 + 모델 vs 배당) */
  table.rec tr.hlrow td { background: #fff6d5; }
  table.rec tr.hlrow td b { color: var(--navy); }
/* 확률 캘리브레이션 표 */
  table.calib .cbar { position: relative; height: 14px; background: var(--hover); border-radius: var(--r-sm); overflow: hidden; max-width: 260px; }
  table.calib .cbar i { position: absolute; left: 0; top: 0; height: 7px; display: block; }
  table.calib .cbar i.p { background: var(--line-strong); }
  table.calib .cbar i.a { top: 7px; background: var(--blue); }
  table.calib td.l small { color: var(--muted); font-size: 12px; }
  table.calib .sw { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-sm); vertical-align: -1px; }
  table.calib .sw.p { background: var(--line-strong); }
  table.calib .sw.a { background: var(--blue); }
  @media (max-width: 700px) {
    table.calib .cbar { max-width: 78px; }
    table.calib td, table.calib th { padding: 6px 3px; font-size: 12px; }
    table.calib td:first-child { white-space: nowrap; }
    table.calib td.l small { font-size: 10px; }
    table.calib td.rc small { font-size: 10px; }
  } /* 모바일: 5열이 360px 에 들어가게 */
  table.calib tr.thin td { color: var(--muted); }
  table.calib td.pos { color: var(--green); }
  table.calib td.neg { color: var(--red); }
  table.calib td.rc { white-space: nowrap; }
  table.calib td.rc small { display: block; color: var(--muted); font-size: 11px; }

/* 리그 순위 하위 탭 줄 오른쪽 끝의 시즌 선택 (다음 시즌부터 지난 시즌 돌아보기) */
/* 시즌 기록 · AI 참가자 조합 누적 표: 모바일에서 5열이 카드 밖으로 밀리지 않게 */
  @media (max-width: 700px) { table.aitbl td, table.aitbl th { padding: 6px 4px; font-size: 12px; } table.aitbl td.nw { white-space: normal; word-break: keep-all; } }
/* 시즌 기록 개편: 요약 숫자 카드 · 우승 표 안 막대 · 모델 상세 접힌 섹션 */
  .skpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .skpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; color: var(--text); min-width: 0; }
  .skpi span { font-size: 13px; color: var(--muted); font-weight: 600; }
  .skpi b { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .skpi b em { font-style: normal; font-size: 16px; color: var(--muted); font-weight: 700; }
  .skpi small { font-size: 12px; color: var(--muted); }
  .skpi.lk { cursor: pointer; }
  .skpi.lk:hover { border-color: var(--navy); }
  .skpi.lk b em { color: #a46900; font-size: 20px; }
  .skpi.lk small { color: var(--blue); font-weight: 600; }
  .spanel[data-p="sum"] > .card { margin-bottom: 12px; }
  table.odds-t td.ob { min-width: 120px; }
  table.odds-t td.ob b { display: inline-block; min-width: 46px; text-align: right; font-weight: 700; }
  .obar { display: inline-block; width: 70px; height: 8px; margin-right: 8px; border-radius: 4px; background: #eef1f6; vertical-align: middle; overflow: hidden; }
  .obar i { display: block; height: 100%; border-radius: 4px; }
  .obar.t i { background: #f5a623; }
  .obar.p i { background: #9cc0f5; }
  .dnote { padding: 0 2px 8px; font-size: 13px; color: var(--muted); }
  details.dsec { margin-bottom: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
  details.dsec > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 13px 14px; font-weight: 800; font-size: 15px; color: var(--navy); cursor: pointer; }
  details.dsec > summary::-webkit-details-marker { display: none; }
  details.dsec > summary small { font-weight: 500; font-size: 13px; color: var(--muted); }
  details.dsec > summary::after { content: "▸"; margin-left: auto; color: var(--muted); font-size: 13px; transition: transform .15s; }
  details.dsec[open] > summary::after { transform: rotate(90deg); }
  details.dsec[open] > summary { border-bottom: 1px solid var(--line); }
  details.dsec > .card, details.dsec > .grid2 { margin: 10px; }
  details.dsec .grid2 > .card { min-width: 0; }
  @media (max-width: 700px) {
    .skpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .skpi { padding: 10px 12px; }
    .skpi b { font-size: 20px; }
    table.odds-t td.ob { min-width: 0; }
    .obar { width: 34px; margin-right: 5px; }
    details.dsec > .card, details.dsec > .grid2 { margin: 8px 6px; }
    details.dsec > summary small { display: none; }
  }
  table.odds-t .wrec { display: none; }
  @media (max-width: 700px) { table.odds-t .wrec { display: block; font-size: 11px; color: var(--muted); font-weight: 500; } } /* 모바일: '현재' 열 대신 팀 이름 아래 승-패 */
  table.t.mkt td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
  table.t.mkt td.nm { width: 1%; white-space: nowrap; font-weight: 700; }
  table.t.mkt tr.sub td.nm { font-weight: 500; color: var(--text-2); padding-left: 20px; }
  table.t.mkt td.br { width: 100%; }
  table.t.mkt td.v { width: 1%; white-space: nowrap; text-align: right; }
  table.t.mkt td.v b { display: inline-block; min-width: 54px; font-size: 15px; }
  table.t.mkt td.v small { display: inline-block; min-width: 64px; margin-left: 8px; color: var(--muted); font-size: 12px; }
  .mbar { position: relative; display: block; height: 10px; border-radius: var(--r-sm); background: #eef1f6; overflow: hidden; }
  .mbar i { display: block; height: 100%; background: #8fb3ea; border-radius: var(--r-sm); }
  .mbar i.hi { background: var(--green); } .mbar i.lo { background: #e5a3a3; }
  .mbar em { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 0; border-left: 2px dashed #9aa3b2; } /* 50% 눈금(동전 던지기) */
  @media (max-width: 700px) { table.t.mkt td { padding: 8px 8px; } table.t.mkt td.v small { display: none; } table.t.mkt td.v b { min-width: 46px; font-size: 14px; } }
