:root { color: #f5f5f5; background: #090909; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #090909; }
.site-header { padding: 24px 16px 20px; text-align: center; border-bottom: 1px solid #303030; }
.site-header h1 { margin: 4px 0 0; font-size: clamp(21px, 4vw, 32px); }
.brand { margin: 0; color: #f2c94c; font-size: 13px; font-weight: 800; letter-spacing: .12em; }
.date-nav { display: grid; grid-template-columns: clamp(64px, 10vw, 160px) auto clamp(64px, 10vw, 160px); align-items: center; justify-content: center; margin-top: 24px; }
.date-nav h2 { margin: 0; font-size: clamp(20px, 2.4vw, 28px); white-space: nowrap; }
.date-nav button:first-child { justify-self: start; }
.date-nav button:last-child { justify-self: end; }
.date-nav button { width: 42px; height: 42px; border: 1px solid #4c4c4c; border-radius: 50%; background: #202020; color: #fff; font-size: 27px; line-height: 1; cursor: pointer; }
.date-nav button:not(:disabled):hover { background: #3d3d3d; }
.date-nav button:disabled { opacity: .32; cursor: default; }
.games { width: min(920px, 100%); margin: 0 auto; }
.game { display: block; padding: 20px clamp(16px, 4vw, 30px); border-bottom: 1px solid #303030; color: inherit; text-decoration: none; transition: background .18s ease; }
.game:hover { background: #1b1b1b; }
.top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 15px; color: #c7c7c7; font-size: 14px; }
.score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; font-size: clamp(17px, 5.5vw, 32px); font-weight: 700; }
.team { font-size: .7em; }
.team:first-child { text-align: right; }
.team:last-child { text-align: left; }
.result, .time { min-width: 94px; text-align: center; white-space: nowrap; }
.win { color: #f2c94c; }
.empty { padding: 48px 20px; color: #bbb; text-align: center; }
.compact-header { padding: 16px; }
.back-link { display: block; margin: 0 auto 14px; width: min(920px, 100%); color: #ddd; text-align: left; text-decoration: none; }
.detail { width: min(920px, 100%); margin: 0 auto; padding: 32px 16px; }
.detail h1 { margin: 8px 0; text-align: center; font-size: clamp(24px, 5vw, 38px); }
.match-meta { margin: 0; color: #bdbdbd; text-align: center; }
.detail-score { margin: 10px 0 32px; color: #f2c94c; text-align: center; font-size: clamp(32px, 8vw, 56px); font-weight: 800; }
.scoreboard-section { padding: 22px 0 0; border-top: 1px solid #303030; background: transparent; }
.scoreboard-section h2 { margin: 0 0 14px; padding: 0 4px; font-size: 17px; }
.table-wrap { overflow-x: auto; padding: 0 4px 12px; -webkit-overflow-scrolling: touch; }
.inning-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 3px; }
.inning-table th, .inning-table td { width: 36px; height: 36px; padding: 0; border: 0; text-align: center; }
.inning-table tr:first-child th { height: 22px; color: #a8a8ad; background: transparent; font-size: 13px; font-weight: 600; }
.inning-table tr:not(:first-child) td { background: #202023; color: #f6f6f7; font-size: 16px; font-weight: 650; }
.inning-table tr:not(:first-child) td:nth-last-child(3) { background: #303034; font-weight: 800; }
.inning-table tr:not(:first-child) td:first-child { width: 132px; padding-right: 8px; background: transparent; color: #f6f6f7; font-size: 14px; font-weight: 700; text-align: left; white-space: nowrap; }
.team-name-short { display: none; }
/* JavaScript の R/H/E を、スポナビ風の日本語表記として表示します。 */
.inning-table tr:first-child th:nth-last-child(3), .inning-table tr:first-child th:nth-last-child(2), .inning-table tr:first-child th:last-child { font-size: 0; }
.inning-table tr:first-child th:nth-last-child(3)::after { content: "計"; }
.inning-table tr:first-child th:nth-last-child(2)::after { content: "安"; }
.inning-table tr:first-child th:last-child::after { content: "失"; }
.inning-table tr:first-child th:nth-last-child(3)::after, .inning-table tr:first-child th:nth-last-child(2)::after, .inning-table tr:first-child th:last-child::after { font-size: 13px; }
.error-message { color: #ff9d9d; text-align: center; }
.result, .time{width:10%; }
@media (max-width: 700px) { .team { font-size: .75em; } .inning-table { border-spacing: 2px; } .inning-table th, .inning-table td { width: 32px; height: 32px; } .inning-table tr:not(:first-child) td:first-child { width: 116px; } }
@media (max-width: 700px) { .date-nav { grid-template-columns: 48px auto 48px; } .date-nav h2 { font-size: 19px; } .top { font-size: 12px; } .score { gap: 4px; } .result, .time { width: 15%; } }
/* 通常の9回試合は、スマホでも横スクロールなしで表示します。 */
@media (max-width: 700px) {
  .table-wrap:has(.inning-table:not(.is-scrollable)) { overflow-x: hidden; }
  .inning-table:not(.is-scrollable) { width: 100%; min-width: 0; table-layout: fixed; border-spacing: clamp(1px, .55vw, 3px); }
  .inning-table:not(.is-scrollable) th,
  .inning-table:not(.is-scrollable) td { width: auto; height: auto; padding-block: clamp(5px, 1.8vw, 8px); font-size: clamp(11px, 3.6vw, 14px); font-variant-numeric: tabular-nums; }
  .inning-table:not(.is-scrollable) tr > :first-child { width: 14%; }
  .inning-table:not(.is-scrollable) tr:not(:first-child) td:first-child { width: 14%; padding: 0; font-size: clamp(11px, 3.4vw, 13px); overflow: visible; text-align: center; text-overflow: clip; }
  .inning-table:not(.is-scrollable) tr:first-child th { font-size: clamp(9px, 2.8vw, 11px); }
  .inning-table:not(.is-scrollable) tr:first-child th:nth-last-child(3),
  .inning-table:not(.is-scrollable) tr:first-child th:nth-last-child(2),
  .inning-table:not(.is-scrollable) tr:first-child th:last-child { font-size: 0; }
  .inning-table:not(.is-scrollable) tr:first-child th:nth-last-child(3)::after,
  .inning-table:not(.is-scrollable) tr:first-child th:nth-last-child(2)::after,
  .inning-table:not(.is-scrollable) tr:first-child th:last-child::after { font-size: clamp(9px, 2.8vw, 11px); }
  .inning-table .team-name-full { display: none !important; }
  .inning-table .team-name-short { display: block !important; }
}
