*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --container-max: 1080px;
  --meta-date: 48px;
  --meta-time: 48px;
  --meta-small: 20px;
  --stadium-size: 15px;
  --inning-font: 16px;
  --score-font: 24px;
  --team-icon: 45px;
  --body-row-height: 80px;
  --body-pad-y: 0px;
  --cell-pad-y: 14px;
  --cell-pad-x: 10px;
  --score-col: clamp(18px, 4.5vw, 40px);
  --score-gap-x: clamp(4px, 1.2vw, 10px);
  --team-col: clamp(120px, 40vw, 500px);
  --header-height: 48px;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
    sans-serif;
  color: #222;
  background: #fff;
}

.otherWrap,
.scoreWrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px 24px 0;
}

.otherWrap {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 18px;
  row-gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 0;
  margin-bottom: 24px;
}

.otherWrap h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  font-family: "Oswald", sans-serif;
  font-size: var(--meta-date);
  line-height: 0.9;
  flex-wrap: wrap;
}

.otherWrap h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  font-family: "Oswald", sans-serif;
  font-size: calc(var(--meta-date) * 0.9);
  line-height: 1;
  flex-wrap: wrap;
}

.otherWrap h2 > span {
  display: inline-block;
}

.otherWrap h2 .day {
  font-size: var(--meta-small);
  order: 1;
}

.otherWrap h2 .time {
  font-size: var(--meta-time);
  letter-spacing: 0.02em;
  order: 2;
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
}

.otherWrap h2 .time::before {
  content: "START";
  display: inline-block;
  margin-left: 0;
  margin-right: 8px;
  padding: 4px 4px 5px 4px;
  background: #222;
  color: #fff;
  font-size: var(--meta-small);
  font-weight: 500;
  line-height: 0.7;
  vertical-align: middle;
  font-family: "Oswald", sans-serif;
}

.otherWrap h2 .place {
  font-size: var(--stadium-size);
  font-weight: 700;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
    sans-serif;
  color: #444;
  line-height: 1;
  order: 3;
}

.otherWrap a {
  font-size: 14px;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  line-height: 1;
}

.pc-only {
  display: inline;
}

.sp-only {
  display: none;
}

.scoreWrap {
  padding-top: 0;
  padding-bottom: 28px;
}

.scoreWrap table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--score-font);
  font-family: "Oswald", sans-serif;
  font-variant-numeric: tabular-nums;
}

.scoreWrap table tr:first-child th:first-child,
.scoreWrap tr.team td:first-child {
  width: var(--team-col);
}

.scoreWrap table tr:first-child th:not(:first-child),
.scoreWrap tr.team td:not(:first-child) {
  width: var(--score-col);
}

.scoreWrap th,
.scoreWrap td {
  padding: var(--cell-pad-y) var(--cell-pad-x);
  text-align: center;
  vertical-align: middle;
}

.scoreWrap thead th {
  background: #2f2f2f;
  color: #fff;
  height: var(--header-height);
  font-weight: 500;
  line-height: 0.9;
  padding: 8px 10px;
  font-size: var(--inning-font);
}

.scoreWrap table tr:first-child th {
  background: #2f2f2f;
  color: #fff;
  height: var(--header-height);
  font-weight: 500;
  line-height: 0.9;
  padding: 8px 10px;
  font-size: var(--inning-font);
  text-align: center;
}

.scoreWrap table tr:first-child {
  height: var(--header-height);
}

.scoreWrap table tr:first-child th:not(:first-child) {
  padding-left: var(--score-gap-x);
  padding-right: var(--score-gap-x);
}

.scoreWrap thead th:not(.teamHead) {
  padding-left: var(--score-gap-x);
  padding-right: var(--score-gap-x);
}

.scoreWrap tbody td {
  font-weight: 500;
  line-height: 0.9;
  padding-left: var(--score-gap-x);
  padding-right: var(--score-gap-x);
  padding-top: var(--body-pad-y);
  padding-bottom: var(--body-pad-y);
  font-size: var(--score-font);
}

.scoreWrap thead tr,
.scoreWrap tbody tr {
  border-bottom: 1px solid #d8d8d8;
}

.scoreWrap tbody tr {
  height: var(--body-row-height);
}

.scoreWrap tbody td {
  height: var(--body-row-height);
}

.teamHead {
  background: #2f2f2f;
  width: var(--team-col);
}

.run {
  letter-spacing: 0.08em;
  font-weight: 500;
}

.scoreWrap tr.team td:first-child {
  text-align: left;
  padding-left: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--body-row-height);
}

.scoreWrap tr.team td:first-child::after {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
    sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  color: #222;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  max-width: calc(var(--team-col) - var(--team-icon) - 24px);
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/carp.jpg"])::after {
  content: "広島東洋カープ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/tigers.jpg"])::after {
  content: "阪神タイガース";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/baystars.jpg"])::after {
  content: "横浜DeNAベイスターズ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/giants.jpg"])::after {
  content: "読売ジャイアンツ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/swallows.jpg"])::after {
  content: "東京ヤクルトスワローズ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/dragons.jpg"])::after {
  content: "中日ドラゴンズ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/orix_buffaloes.jpg"])::after {
  content: "オリックス・バファローズ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/marines.jpg"])::after {
  content: "千葉ロッテマリーンズ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/hawks.jpg"])::after {
  content: "福岡ソフトバンクホークス";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/eagles.jpg"])::after {
  content: "東北楽天ゴールデンイーグルス";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/lions.jpg"])::after {
  content: "埼玉西武ライオンズ";
}

#score tr.team td:has(> img[src^="https://www.hub.carp.co.jp/rcc-score-inc/images/fighters.jpg"])::after {
  content: "北海道日本ハムファイターズ";
}

.scoreWrap tr.team td:first-child img {
  width: var(--team-icon);
  height: var(--team-icon);
  border-radius: 50%;
  display: block;
  flex: 0 0 var(--team-icon);
  object-fit: cover;
}

@media (max-width: 1140px) {
  :root {
    --container-max: 980px;
    --meta-date: 40px;
    --meta-time: 40px;
    --meta-small: 18px;
    --stadium-size: 15px;
    --inning-font: 15px;
    --score-font: 20px;
    --cell-pad-y: 12px;
    --cell-pad-x: 8px;
    --team-col: 220px;
  }

  .scoreWrap tr.team td:first-child::after {
    font-size: 17px;
  }
}

@media (max-width: 840px) {
  :root {
    --container-max: 760px;
    --meta-date: 34px;
    --meta-time: 34px;
    --meta-small: 16px;
    --stadium-size: 15px;
    --inning-font: 14px;
    --score-font: 18px;
    --cell-pad-y: 10px;
    --cell-pad-x: 6px;
    --team-col: 190px;
    --header-height: 44px;
    --team-icon: 32px;
  }

  .scoreWrap tr.team td:first-child::after {
    font-size: 16px;
  }
}

@media (max-width: 540px) {
  :root {
    --container-max: 100%;
    --meta-date: 26px;
    --meta-time: 26px;
    --meta-small: 15px;
    --stadium-size: 14px;
    --inning-font: 13px;
    --score-font: 16px;
    --body-row-height: 33px;
    --cell-pad-y: 8px;
    --cell-pad-x: 4px;
    --team-col: 36px;
    --header-height: 20px;
    --team-icon: 28px;
    --body-pad-y: 4px;
  }

  .scoreWrap thead th,
  .scoreWrap table tr:first-child th {
    padding-top: 0;
    padding-bottom: 0;
  }

  .otherWrap {
    padding: 16px 12px 12px;
    margin-bottom: 12px;
  }

  .otherWrap h2 {
    width: 100%;
    justify-content: center;
    row-gap: 8px;
  }

  .otherWrap h3 {
    font-size: calc(var(--meta-date) * 0.78);
    line-height: 1.05;
  }

  .otherWrap h2 .day {
    padding-top: 0.25em;
  }

  .otherWrap h2 .time {
    display: inline-block;
    justify-content: center;
    margin-left: 0;
  }

  .otherWrap h2 .place {
    text-align: center;
    width: 100%;
  }

  .pc-only {
    display: none;
  }

  .sp-only {
    display: inline;
  }

  .scoreWrap {
    padding: 0 12px 22px;
  }

  .scoreWrap tr.team td:first-child {
    padding-left: 8px;
    gap: 0;
  }

  .scoreWrap tr.team td:first-child::after {
    display: none;
  }
}

@media (max-width: 320px) {
  :root {
    --meta-date: 20px;
    --meta-time: 20px;
    --meta-small: 14px;
    --stadium-size: 14px;
    --inning-font: 13px;
    --score-font: 15px;
    --body-row-height: 33px;
    --cell-pad-y: 5px;
    --cell-pad-x: 2px;
    --team-col: 32px;
    --header-height: 20px;
    --team-icon: 25px;
    --body-pad-y: 4px;
  }

  .scoreWrap thead th,
  .scoreWrap table tr:first-child th {
    padding-top: 0;
    padding-bottom: 0;
  }

  .otherWrap {
    gap: 8px;
  }

  .otherWrap h2 {
    gap: 6px;
  }

  .otherWrap h2 .day {
    font-size: 16px;
  }

  .otherWrap h2 .time::before {
    font-size: 15px;
  }

  .scoreWrap tr.team td:first-child {
    padding-left: 6px;
    gap: 0;
  }
}
