:root {
  --team: #1E3A6E;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #16181d;
  --text-2: #5d6470;
  --line: #e3e5ea;
  --win: #c8302d;
  --lose: #5d6470;
  --board: #1f3d2c;
  --board-text: #f4f1e6;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121418; --card: #1c1f25; --text: #eceef2; --text-2: #9aa1ad; --line: #2c3038;
    --lose: #8d94a0; --board: #183324; --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-head { background: var(--team); color: #fff; }
.site-name { display: flex; align-items: center; gap: 10px; max-width: 1120px; margin: 0 auto; padding: 14px 16px; font-weight: 700; font-size: 17px; text-decoration: none; }
.site-name small { font-weight: 400; font-size: 13px; opacity: .8; }
.ball { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.site-foot { text-align: center; color: var(--text-2); font-size: 12px; padding: 32px 16px 40px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.empty { color: var(--text-2); text-align: center; padding: 48px 0; }

/* 一覧 */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 0 20px; }
.hero h1 { font-size: 26px; margin: 0; letter-spacing: .02em; }
.records { display: flex; gap: 10px; flex-wrap: wrap; }
.rec { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); padding: 6px 14px; display: flex; gap: 10px; align-items: baseline; }
.rec-year { color: var(--text-2); font-size: 13px; }
.rec-num { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 28px rgba(0,0,0,.10); }
.card-img { aspect-ratio: 16 / 9; background: var(--team); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { height: 100%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 22px; }
.card-body { padding: 12px 16px 16px; }
.card-meta { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.card-meta span { margin-left: 8px; }
.card-vs { font-weight: 700; font-size: 18px; margin-top: 2px; }
.card-score { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card-score b { font-size: 26px; line-height: 1.2; }
.card-score i { font-style: normal; color: var(--text-2); }
.card-score .badge { margin-left: 8px; }
.card-ground { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: #fff; background: var(--lose); vertical-align: middle; }
.badge.win { background: var(--win); }
.badge.draw { background: #8a7a3a; }

/* 試合のページ */
.back { display: inline-block; margin: 18px 0 0; color: var(--text-2); font-size: 14px; text-decoration: none; }
.back:hover { color: var(--text); }
.game-head { text-align: center; padding: 18px 0 22px; }
.game-meta { color: var(--text-2); font-size: 14px; }
.game-meta span { margin-left: 10px; }
.game-head h1 { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 8px 0 10px; font-size: 20px; }
.game-head .big { font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.game-head .big i { font-style: normal; color: var(--text-2); margin: 0 10px; font-weight: 400; }

.panel { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 20px; min-width: 0; }
.panel h2 { font-size: 16px; margin: 0 0 10px; }
.panel h2 small { font-weight: 400; color: var(--text-2); font-size: 12px; margin-left: 6px; }

.board-scroll { overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; background: var(--board); color: var(--board-text); border-radius: 10px; overflow: hidden; font-variant-numeric: tabular-nums; }
table.board th, table.board td { padding: 8px 6px; text-align: center; min-width: 34px; font-size: 18px; }
table.board thead th { font-size: 12px; font-weight: 400; opacity: .75; padding-bottom: 2px; }
table.board tbody td { font-weight: 600; border-left: 1px solid rgba(255,255,255,.08); }
table.board .tn { text-align: left; font-size: 15px; white-space: nowrap; padding-left: 14px; border-left: 5px solid var(--c); min-width: 7em; }
table.board .tot { font-weight: 800; background: rgba(255,255,255,.08); min-width: 46px; }
.board.simple { background: var(--board); color: var(--board-text); border-radius: 10px; padding: 6px 0; }
.board-row { display: flex; justify-content: space-between; padding: 6px 16px; font-size: 18px; font-weight: 700; }
.board-row .tn { border-left: 5px solid var(--c); padding-left: 10px; }

.videos { display: grid; gap: 20px; margin-bottom: 20px; }
.videos.with-short { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
.main-videos { display: grid; gap: 20px; min-width: 0; }
.video { margin: 0; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video.vertical .frame { aspect-ratio: 9 / 16; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.soon { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; background: #20242c center / cover no-repeat; }
.soon.own { place-items: end center; padding-bottom: 18px; }
.soon.own::before { background: linear-gradient(transparent 70%, rgba(15,18,24,.55)); }
.soon::before { content: ""; position: absolute; inset: 0; background: rgba(15,18,24,.62); }
.soon-msg { position: relative; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.14); }
.kind-badge { position: absolute; top: 14px; right: 14px; z-index: 1; padding: 6px 14px; border-radius: 8px; font-weight: 800; font-size: 18px; letter-spacing: .04em; color: #fff; background: var(--win); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.kind-badge.long { background: var(--team); outline: 2px solid rgba(255,255,255,.85); }
.kind-badge.short { background: #222; }
.video figcaption { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-weight: 700; font-size: 15px; }
.kind-tag { padding: 2px 10px; border-radius: 6px; color: #fff; background: var(--win); font-size: 14px; }
.kind-tag.long { background: var(--team); }
.kind-tag.short { background: #333; }
.kind-note { font-weight: 400; font-size: 13px; color: var(--text-2); }
.video figcaption .yt-link { margin-left: auto; }
.yt-link { font-weight: 400; font-size: 13px; color: var(--text-2); text-decoration: none; }
.yt-link:hover { color: var(--text); }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.two > .panel { margin-bottom: 0; }
.lineup table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lineup th { font-size: 12px; font-weight: 400; color: var(--text-2); text-align: center; padding: 4px 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lineup td { text-align: center; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lineup tr:last-child td { border-bottom: 0; }
.lineup .name { text-align: left; font-weight: 700; }
.lineup .ord { color: var(--text-2); font-variant-numeric: tabular-nums; }
.lineup td small, .lineup th small { display: block; font-size: 11px; font-weight: 400; color: var(--text-2); }
.lineup th.grp { border-bottom: 0; font-weight: 700; color: var(--text); padding-bottom: 0; }
.lineup td.n { font-variant-numeric: tabular-nums; }
.lineup td.hot { color: var(--win); font-weight: 800; }
.lineup .res { text-align: left; white-space: normal; min-width: 220px; }
.lineup .r { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 6px; font-size: 13px; background: var(--bg); color: var(--text-2); }
.lineup .r.hit { background: var(--win); color: #fff; font-weight: 700; }
.lineup .r.hr { background: #b8860b; color: #fff; font-weight: 800; }
.lineup .r.walk { background: #dcebe0; color: #1f5c33; font-weight: 700; }
@media (prefers-color-scheme: dark) { .lineup .r.walk { background: #1f3d2c; color: #a9e0bb; } }
.lineup .sub { font-size: 12px; color: var(--text-2); margin-left: 6px; }
.lineup tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 0; font-size: 14px; }
.pager a { color: var(--text-2); text-decoration: none; }
.pager a:hover { color: var(--text); }

@media (max-width: 820px) {
  .videos.with-short { grid-template-columns: 1fr; }
  .side-video { max-width: 320px; margin: 0 auto; width: 100%; }
  .two { grid-template-columns: 1fr; }
  .two > .panel { margin-bottom: 0; }
  .game-head .big { font-size: 38px; }
  .game-head h1 { gap: 10px; font-size: 17px; }
  table.board th, table.board td { font-size: 16px; padding: 7px 4px; min-width: 28px; }
  table.board .tn { min-width: 5em; font-size: 14px; }
}

/* 一覧：見出し・動画ありの印・絵の無いカード */
.sec-title { font-size: 18px; margin: 8px 0 12px; }
.card-img { position: relative; }
.card-play { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 24px; border-radius: 7px; background: rgba(220,30,30,.92); }
.card-play::after { content: ""; position: absolute; left: 13px; top: 6px; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.noimg { background: linear-gradient(135deg, var(--team), #0b0e14); }
.noimg span { font-size: 40px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* 試合をさがす */
.finder { margin-top: 36px; }
.finder-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.finder .panel { margin-bottom: 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 16px; }
.cal-nav { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-week span { font-size: 12px; color: var(--text-2); padding-bottom: 4px; }
.cal-week span:first-child { color: #c8302d; }
.cal-week span:last-child { color: #2f62b3; }
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 8px; font-size: 14px; color: var(--text-2); border: 0; background: none; font: inherit; padding: 0; }
.cal-day.has { background: var(--bg); color: var(--text); font-weight: 700; cursor: pointer; }
.cal-day.has:hover { box-shadow: inset 0 0 0 2px var(--team); }
.cal-day.on { background: var(--team); color: #fff; }
.dots { display: flex; gap: 3px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lose); }
.dot.win { background: var(--win); }
.dot.draw { background: #8a7a3a; }
.cal-day.on .dot { box-shadow: 0 0 0 1.5px #fff; }
.cal-legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.cal-legend .dot { margin-right: 4px; vertical-align: 0; }
.search { display: flex; flex-direction: column; gap: 4px; }
.search span { font-size: 12px; color: var(--text-2); }
.search input { font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.search input:focus { outline: 2px solid var(--team); outline-offset: 1px; }
.res-title { font-weight: 700; margin: 14px 0 6px; }
.res-list { list-style: none; margin: 0; padding: 0; }
.res-list li a { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto auto 4.2em; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--line); text-decoration: none; }
.res-list li:last-child a { border-bottom: 0; }
.res-list li a:hover { background: var(--bg); }
.r-date { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 14px; }
.r-vs { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-vs small { margin-left: 8px; font-weight: 400; color: var(--text-2); font-size: 12px; }
.r-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.r-video { font-size: 12px; color: #d33; text-align: right; }
.res-list .none { color: var(--text-2); padding: 12px 8px; }

/* 試合のレポート */
.report p { margin: 0 0 10px; line-height: 1.85; font-size: 15px; }
.report p:last-child { margin-bottom: 0; }
.kind-tag.full { background: var(--team); }

@media (max-width: 820px) {
  .finder-grid { grid-template-columns: 1fr; }
  .res-list li a { grid-template-columns: 3em minmax(0, 1fr) auto auto; }
  .r-video { display: none; }
  .r-vs small { display: block; margin: 0; }
}
.cards.recent { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cards.recent .card-vs { font-size: 16px; }
@media (max-width: 1000px) { .cards.recent { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cards.recent { grid-template-columns: 1fr; } }

.cal-title { display: flex; align-items: center; gap: 6px; }
.cal-title select { font: inherit; font-weight: 700; font-size: 16px; border: 0; background: var(--bg); color: var(--text); border-radius: 8px; padding: 4px 6px; }
.cal-rec { text-align: center; font-size: 13px; color: var(--text-2); margin: -4px 0 10px; }
