/* =========================
   기본 초기화
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 전역 변수 */
/* :root { */
/* --header-height: 100px; */
/* 헤더 높이 */
/* --team-width: 250px; */
/* 스코어보드 상단 Team 칸 전체 폭 */
/* } */

/* 메인 구조 */
main {
  padding-top: var(--header-height);
  padding-bottom: 40px;
}



/* =========================
   스코어보드 전체 (PC 전용)
   ========================= */
@media (min-width: 769px) {


  .scoreboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 0;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    flex-wrap: wrap;
    /* 줄바꿈 허용 */
    gap: 16px;
    /* 블록 간격 */
    align-items: flex-start;
    /* 상단 정렬 */
    justify-content: space-between;
    overflow-anchor: none;
    /* 새로고침 시 점프 방지 */

  }

  /* 상단 텍스트/표 블록은 한 줄 전체 차지 */
  .scoreboard>.result_admin,
  .scoreboard>.result_table,
  .scoreboard>.result_table_bottom {
    flex: 1 1 100%;
    max-width: 100%;
  }

  /* 제목 */


  .result_admin p {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: left;

    /* background-color: aqua; */

  }

  .scoreboard .review {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: left;
  }

  /* =========================
   1. 상단 스코어 테이블
   ========================= */
  .result_table {
    padding-top: 8px;
    margin-bottom: 30px;
  }

  /* 표 기본 스타일 */
  .result_table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 2px solid #000;
    background: #fff;
  }

  /* 열 비율 */
  .result_table col.col-1 {
    width: calc(var(--team-width) * 0.30);
  }

  .result_table col.col-2 {
    width: calc(var(--team-width) * 0.70);
  }

  .result_table col.col-rest {
    width: calc((100% - var(--team-width)) / 16);
  }

  /* 셀 공통 스타일 */
  .result_table td,
  .result_table th {
    border: 1px solid #000;
    padding: 8px 10px;
    text-align: center;
    word-break: keep-all;
  }

  /* 헤더 행 (Team) 강조 */
  .result_table .team {
    width: var(--team-width);
    font-weight: 700;
    background: #f6f6f6;
  }

  /* Team A/B 행 강조 */
  .result_table tr:nth-child(n+2) td:nth-child(2) {
    font-weight: 600;
  }

  /* =========================
   2. 하단 주요 기록 표
   ========================= */
  .result_table_bottom table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 2px solid #000;
    background: #fff;
    height: 400px;
    margin-bottom: 50px;
    text-align: center;

  }

  .result_table_bottom td,
  .result_table_bottom th {
    border: 1px solid #000;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
  }

  /* 첫 번째 열 라벨 */
  .result_table_bottom tr td:first-child {
    width: 200px;
    font-weight: 700;
    background: #f6f6f6;
    text-align: center;
  }

  /* 줄간 강조 */
  .result_table_bottom tr:nth-child(odd) td:nth-child(2) {
    background: #fafafa;
  }

  /* =========================
   3. 타자 기록 표 2개 (A/B)
   ========================= */
  .teamA_hitter_result,
  .teamB_hitter_result {
    flex: 0 0 48%;
    max-width: 48%;
    padding: 0 1%;
    box-sizing: border-box;
    padding-top: 8px;
    margin-bottom: 50px;
  }

  .teamA_hitter_result table,
  .teamB_hitter_result table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    text-align: center;
    border: 2px solid #000;
  }

  .teamA_hitter_result td,
  .teamB_hitter_result td {
    border: 1px solid #000;
    padding: 6px;
    word-break: keep-all;
  }

  .teamA_hitter_result>p,
  .teamB_hitter_result>p {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: left;
  }

  /* 첫 번째 열 굵게 */
  .teamA_hitter_result tr td:nth-child(1),
  .teamB_hitter_result tr td:nth-child(1) {
    font-weight: bold;
  }

  /* 헤더 행 굵게 */
  .teamA_hitter_result tr:nth-child(1),
  .teamB_hitter_result tr:nth-child(1) {
    font-weight: bold;
  }

  /* =========================
   4. 투수 기록 표 2개 (A/B)
   ========================= */
  .teamA_pitcher_result,
  .teamB_pitcher_result {
    padding-top: 8px;
    margin-bottom: 30px;
  }

  .teamA_pitcher_result>p,
  .teamB_pitcher_result>p {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: left;
  }

  .teamA_pitcher_result table,
  .teamB_pitcher_result table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border: 2px solid #000;
    background: #fff;
    height: 200px;
    text-align: center;
  }

  .teamA_pitcher_result td,
  .teamA_pitcher_result th,
  .teamB_pitcher_result td,
  .teamB_pitcher_result th {
    border: 1px solid #000;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;

  }

  .teamA_pitcher_result tr:last-child td,
  .teamA_pitcher_result tr:first-child td,
  .teamB_pitcher_result tr:last-child td,
  .teamB_pitcher_result tr:first-child td {
    height: 40px;
    padding: 4px 8px;
    text-align: center;
    font-weight: bold;

  }

  .teamA_pitcher_result tr:first-child td:first-child,
  .teamB_pitcher_result tr:first-child td:first-child {
    /* background-color: rebeccapurple; */
    width: 100px;
  }


  /* 우클릭 시도중 */
  .ctx-menu {
    position: fixed;
    display: none;
    min-width: 140px;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    z-index: 99999;
  }

  .ctx-menu button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer
  }

  .ctx-menu button:hover {
    background: #f5f5f5
  }
}