:root { --bg:#080808; --panel:#171c24; --cell:#242426; --text:#f3f3f3; --muted:#aaa; --line:#303033; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue","Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif; -webkit-font-smoothing:antialiased; }
button { font:inherit; }
.loading { padding:80px 20px; text-align:center; color:var(--muted); }
.schedule-page,.detail-page { min-height:100vh; }
.site-header { padding:13px 24px 47px; text-align:center; border-bottom:1px solid var(--line); }
.brand { margin:0 0 12px; color:#d8d8da; font-size:13px; line-height:1; font-weight:700; letter-spacing:.13em; }
.site-header h1 { max-width:820px; margin:0 auto; font-size:32px; line-height:1.35; font-weight:700; letter-spacing:.01em; }
.schedule { position:relative; width:calc(100% - 48px); max-width:1200px; margin:auto; padding:0 0 60px; }
.date-nav { max-width:760px; min-height:90px; margin:auto; display:grid; grid-template-columns:56px 1fr 56px; align-items:center; gap:60px; }
.date-nav h2 { margin:0; text-align:center; font-size:21px; line-height:1; font-weight:700; font-variant-numeric:tabular-nums; }
.date-picker { position:relative; width:auto; height:auto; padding:0; border:0; border-radius:0; background:transparent; color:inherit; cursor:pointer; }
.date-picker:hover { background:transparent; }
.calendar-panel { position:absolute; top:78px; left:50%; z-index:10; width:min(520px,calc(100% - 24px)); transform:translateX(-50%); padding:16px; border:1px solid var(--line); border-radius:10px; background:#141518; box-shadow:0 12px 30px #0008; }
.calendar-close { position:absolute; top:8px; left:8px; width:28px; height:28px; padding:0; border:0; border-radius:50%; background:transparent; color:#aaa; font-size:22px; line-height:1; cursor:pointer; }
.calendar-close:hover { background:#2a2c31; color:#fff; }
.calendar-title { margin-bottom:12px; text-align:center; font-size:18px; font-weight:600; }
.calendar-week,.calendar-days { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.calendar-week { margin-bottom:4px; color:var(--muted); text-align:center; font-size:12px; }
.calendar-day { aspect-ratio:1; min-width:0; padding:5px 2px; border:1px solid transparent; border-radius:6px; background:#1d1f23; color:#777a80; }
.calendar-day b,.calendar-day small { display:block; }
.calendar-day b { font-size:15px; }
.calendar-day small { min-height:14px; margin-top:3px; font-size:9px; line-height:1.1; white-space:normal; overflow:hidden; }
.calendar-day.has-games { border-color:#555860; background:#303238; color:var(--text); cursor:pointer; }
.calendar-day.has-games:hover,.calendar-day.selected { background:#4a4d54; border-color:#a0a2a8; }
.date-nav button { width:56px; height:56px; border-radius:50%; border:1px solid #4b4b4d; background:#1d1d1f; color:white; font-size:26px; line-height:1; font-weight:700; cursor:pointer; }
.date-nav button:disabled { opacity:.22; cursor:not-allowed; }
.match-list { border-top:1px solid var(--line); }
.game { width:100%; padding:22px 30px 24px; display:flex; flex-direction:column; gap:20px; border-bottom:1px solid var(--line); background:transparent; color:var(--text); text-decoration:none; }
.game:hover { background:#111; }
.top { display:flex; justify-content:space-between; align-items:flex-start; color:#bdbdbf; font-size:16px; line-height:1.2; font-weight:600; }
.top span:last-child { max-width:55%; text-align:right; }
.score { width:min(1000px,84%); margin:auto; display:grid; grid-template-columns:minmax(0,1fr) 92px minmax(0,1fr); align-items:center; gap:16px; text-align:center; }
.team { min-width:0; font-size:21px; line-height:1.25; font-weight:700; white-space:nowrap; }
.team:first-child { text-align:right; }
.team:last-child { text-align:left; }
.time { font-size:30px; line-height:1; font-weight:700; font-variant-numeric:tabular-nums; }
.back-button { display:block; width:100%; margin-top:20px; padding-inline:max(24px,calc((100vw - 1200px)/2)); border:0; background:transparent; color:#c4c4c6; font-size:16px; font-weight:700; text-align:left; cursor:pointer; text-decoration:none; }
.detail-content { width:calc(100% - 48px); max-width:1200px; margin:auto; padding:50px 0 80px; }
.match-hero { height:125px; display:flex; align-items:center; justify-content:center; padding:28px; border-radius:10px; background:var(--panel); }
.match-hero h1 { margin:0; text-align:center; font-size:36px; line-height:1; font-weight:700; }
.match-hero span { font-size:1em; }
.match-meta { width:max-content; max-width:100%; margin:18px auto 0; padding:0 0 16px; color:#aeb2ba; font-size:16px; line-height:1.3; font-weight:400; font-variant-numeric:tabular-nums; border:0; }
.match-meta p { margin:0 0 12px; display:flex; gap:24px; white-space:nowrap; }
.score-section { padding-top:12px; }
.match-notes { margin-top:28px; padding-top:16px; border-top:1px solid var(--line); color:#b8bac0; }
.match-notes p { margin:0; font-size:16px; }
.score-scroll { overflow-x:auto; }
table { width:100%; min-width:900px; table-layout:fixed; border-collapse:separate; border-spacing:3px; }
th,td { height:52px; padding:5px; text-align:center; font-size:22px; font-weight:700; font-variant-numeric:tabular-nums; }
thead th { height:30px; color:var(--muted); font-size:18px; font-weight:400; }
tbody td { background:var(--cell); }
thead th:first-child,tbody th { width:230px; text-align:left; }
tbody th { padding-left:18px; font-size:18px; }
.team-short { display:none; }

@media(max-width:1100px){
  .site-header h1 { font-size:25px; }
  .date-nav { min-height:88px; grid-template-columns:50px 1fr 50px; gap:34px; }
  .date-nav button { width:50px; height:50px; font-size:23px; }
  .date-nav h2 { font-size:18px; }
  .game { padding:20px 24px 22px; gap:18px; }
  .top { font-size:15px; }
  .score { width:88%; grid-template-columns:minmax(0,1fr) 88px minmax(0,1fr); gap:14px; }
  .team { font-size:18px; }
  .time { font-size:25px; }
  .detail-content { width:calc(100% - 48px); padding:42px 0 70px; }
  .match-hero h1 { font-size:27px; }
  .match-meta { font-size:14px; }
  table { min-width:860px; border-spacing:2px; }
  thead th:first-child,tbody th { width:210px; }
  th,td { font-size:18px; height:48px; }
  tbody th { font-size:16px; }
  thead th { font-size:16px; }
}

@media(max-width:760px){
  .site-header { padding:18px 14px 34px; }
  .brand { font-size:14px; }
  .site-header h1 { font-size:22px; }
  .schedule { width:calc(100% - 24px); padding:0 12px 36px; }
  .date-nav { min-height:64px; grid-template-columns:42px 1fr 42px; gap:8px; }
  .date-nav button { width:42px; height:42px; font-size:22px; }
  .date-nav h2 { font-size:15px; white-space:nowrap; }
  .game { padding:18px 6px 20px; gap:18px; }
  .top { font-size:14px; }
  .top span:last-child { max-width:68%; }
  .score { width:100%; grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr); gap:7px; }
  .team { white-space:normal; font-size:15px; }
  .time { font-size:19px; }
  .detail-content { width:calc(100% - 24px); padding:28px 5px 64px; }
  .back-button { padding-inline:12px; font-size:14px; }
  .match-hero { height:96px; min-height:96px; padding:16px 12px; }
  .match-hero h1 { font-size:25px; }
  .match-meta { width:auto; margin:14px 4px 0; padding:0 0 10px; font-size:16px; line-height:1.45; text-align:center; }
  .match-meta p { justify-content:center; flex-wrap:wrap; gap:2px 12px; white-space:normal; margin:0 0 8px; }
  .score-section { padding-top:8px; }
  .score-scroll { overflow-x:hidden; }
  .score-scroll.extra-innings { position:relative; overflow-x:auto; overscroll-behavior-x:contain; isolation:isolate; touch-action:pan-x; }
  table { width:100%; min-width:0; table-layout:fixed; border-spacing:2px; }
  .score-scroll.extra-innings table { width:max-content; min-width:0; table-layout:auto !important; }
  .score-scroll.extra-innings thead th:not(:first-child):not(:nth-last-child(-n+3)),
  .score-scroll.extra-innings tbody td:not(:nth-last-child(-n+3)) { width:var(--score-cell-width); min-width:var(--score-cell-width); }
  .score-scroll.extra-innings thead th:nth-last-child(1),
  .score-scroll.extra-innings tbody td:nth-last-child(1) { position:sticky; right:0; z-index:3; width:var(--score-cell-width); min-width:var(--score-cell-width); background:#1d1d1f; }
  .score-scroll.extra-innings thead th:nth-last-child(2),
  .score-scroll.extra-innings tbody td:nth-last-child(2) { position:sticky; right:calc(var(--score-cell-width) + 2px); z-index:3; width:var(--score-cell-width); min-width:var(--score-cell-width); background:#1d1d1f; }
  .score-scroll.extra-innings thead th:nth-last-child(3),
  .score-scroll.extra-innings tbody td:nth-last-child(3) { position:sticky; right:calc(var(--score-cell-width) * 2 + 4px); z-index:3; width:var(--score-cell-width); min-width:var(--score-cell-width); background:#1d1d1f; }
  .score-scroll.extra-innings thead th:nth-last-child(-n+3) { background:var(--bg); }
  .score-scroll.extra-innings thead th:first-child,
  .score-scroll.extra-innings tbody th { z-index:4; }
  th,td { height:36px; font-size:17px; padding:1px 2px; line-height:1; }
  thead th { height:24px; font-size:14px; }
  thead th:first-child,tbody th { position:sticky; left:0; width:3.5em; padding-left:4px; background:var(--bg); z-index:2; font-size:14px; }
  tbody th { text-align:center; padding-left:0; }
  tbody td { padding:0; background:#1d1d1f; font-size:15px; }
  .team-full { display:none; }
  .team-short { display:inline; }
}

@media(max-width:420px){
  .site-header { padding-inline:10px; }
  .site-header h1 { font-size:21px; }
  .schedule { width:calc(100% - 16px); padding-inline:8px; }
  .date-nav { grid-template-columns:36px 1fr 36px; gap:5px; }
  .date-nav button { width:36px; height:36px; font-size:19px; }
  .date-nav h2 { font-size:15px; }
  .score-section table { width:100%; min-width:0; table-layout:fixed; }
  .game { padding-inline:4px; }
  .top { font-size:13px; }
  .score { grid-template-columns:minmax(0,1fr) 66px minmax(0,1fr); gap:5px; }
  .team { font-size:15px; overflow-wrap:anywhere; }
  .time { font-size:20px; }
  .detail-content { width:calc(100% - 16px); padding-inline:5px; }
  .match-meta { margin-top:12px; padding-bottom:8px; font-size:15px; }
  .match-meta p { gap:2px 10px; margin-bottom:6px; }
  .match-hero h1 { font-size:24px; line-height:1.35; }
  thead th { font-size:13px; }
  .score-scroll.extra-innings table { width:max-content; min-width:0; table-layout:auto !important; }
  .score-scroll.extra-innings thead th:not(:first-child):not(:nth-last-child(-n+3)),
  .score-scroll.extra-innings tbody td:not(:nth-last-child(-n+3)) { width:var(--score-cell-width); min-width:var(--score-cell-width); }
  .score-scroll.extra-innings thead th:nth-last-child(-n+3),
  .score-scroll.extra-innings tbody td:nth-last-child(-n+3) { width:var(--score-cell-width); min-width:var(--score-cell-width); }
  .score-scroll.extra-innings thead th:nth-last-child(2),
  .score-scroll.extra-innings tbody td:nth-last-child(2) { right:calc(var(--score-cell-width) + 2px); }
  .score-scroll.extra-innings thead th:nth-last-child(3),
  .score-scroll.extra-innings tbody td:nth-last-child(3) { right:calc(var(--score-cell-width) * 2 + 4px); }
  th,td { height:34px; font-size:17px; }
  thead th:first-child,tbody th { width:3.5em; font-size:12px; }
  tbody th { text-align:center; padding-left:0; }
  tbody td { font-size:15px; }
}
