/* /league/5/ 専用（上の塊・回×コートの試合順・対戦表のマスの試合番号・本文の表・印刷の追加）。共通の見た目は seo.css（docs/SEO_PAGE_DESIGN.md）。色は style.css のトークンだけ */

/* ---------- 上の塊（h1・リード文・案内ボックス）。/tournament/8/ と同じ（2026-10-24 オーナー指示: ページで一番強い塊にする） ---------- */
.seo-top { margin: 8px -8px 40px; padding: 24px 16px 16px; background: var(--card); border-top: 6px solid var(--sky); border-radius: 16px; box-shadow: var(--shadow-lg); }
.seo-top .seo-h1 { margin: 0 0 16px; font-size: 30px; line-height: 1.3; }
.seo-leadtext { margin: 0; font-size: 18px; line-height: 1.7; word-break: normal; overflow-wrap: anywhere; text-wrap: pretty; max-width: none !important; }
.seo-guide { margin: 24px 0 0; }
.sg-g + .sg-g { margin-top: 24px; }
.sg-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; font-weight: 800; line-height: 1.4; color: var(--sky-deep); max-width: none !important; }
.sg-no { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sky); color: #fff; font: 800 15px/1 var(--num); }
.seo-guide ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.seo-guide li { margin: 0; border-bottom: 1px solid var(--line); max-width: none !important; }
:where(body.seo) .seo-guide a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 28px 8px 0; position: relative; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.45; text-decoration: none; }
.seo-guide a::after { content: "↓"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--sky); font-weight: 800; }
.seo-guide a:hover .sg-t, .seo-guide a:focus-visible .sg-t { text-decoration: underline; text-underline-offset: 3px; }
.sg-t { word-break: normal; overflow-wrap: anywhere; }
.sg-mk { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font: 800 14px/1 var(--num); }
.sg-check .sg-mk { background: var(--sky-soft); }
.sg-check .sg-mk::before { content: ""; width: 10px; height: 6px; margin-top: -3px; border-left: 2.5px solid var(--sky); border-bottom: 2.5px solid var(--sky); transform: rotate(-45deg); }
.sg-num .sg-mk { border: 1.5px solid var(--sky); color: var(--sky-deep); border-radius: 50%; }
.seo-guide li.sg-plain { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
@media (min-width: 768px) {
  .seo-top { margin: 16px 0 40px; padding: 32px 32px 24px; }
  .seo-top .seo-h1 { font-size: 32px; }
  :where(body.seo) .seo-guide a { font-size: 18px; }
  .seo-guide li.sg-plain { font-size: 18px; }
}
/* PC（1024px以上）: 縦1列のまま（①→②→③が左右に振れないように）。幅760px */
@media (min-width: 1024px) {
  .seo-top { width: 760px; margin-left: calc(50% - 380px); }
}

/* 道具の節の見出し（tool.headingTop）: 図の上に h2 と1文。PCは2列の上に通しで置く */
.work-head { margin: 0 0 16px; }
.work-head .work-toph { margin: 0 0 8px; }
.work-head p { margin: 0; }
@media (min-width: 1024px) {
  body.seo-v2 .seo-work.has-toph { grid-template-areas: "head head" "ctrl fig" "ctrl can" "ctrl out"; }
  .seo-work.has-toph .work-head { grid-area: head; margin-bottom: 24px; }
}
@media print { html body.seo .work-head, html body.seo .seo-top { display: none !important; } }

/* 答えの帯と図は、上の塊より弱く。白地＋左の細い黄色の線だけ、数字も一段小さく */
body.seo-v2 .seo-ans { margin: 0 0 24px; padding: 8px 0 8px 16px; background: none; border-left: 3px solid var(--yellow); border-radius: 0; }
body.seo-v2 .seo-ans-t { font-size: 17px; }
body.seo-v2 .seo-ans-n dd b { font-size: 26px; }
body.seo-v2 .seo-ans-n dd small { font-size: 16px; }
body.seo-v2 .work-board .bk-wrap { background: none; border-color: transparent; padding: 0; }


/* 回×コートの試合順（休み・審判つき）と、チームごとの表 */
.l5-grid th, .l5-grid td { vertical-align: middle; }
.l5-grid td { white-space: normal; }
.l5-grid td.l5-rest { white-space: nowrap; }
.l5-grid thead th, .l5-team thead th { color: var(--ink); font-size: 14px; }
.l5-grid caption, .l5-team caption { caption-side: top; text-align: left; font-weight: 800; padding: 0 0 4px; }
.l5-grid .l5-rd { width: 4.6em; white-space: nowrap; background: #fff; }
.l5-grid .l5-rd b { display: block; font-size: 14px; }
.l5-grid .l5-rd .num { font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 15px; }
.l5-grid tr.b1 td, .l5-grid tr.b1 th { background: #fffdf4; }
.l5-vs { text-align: left !important; line-height: 1.45; }
.l5-vs .l5-no { display: block; font-size: 14px; color: var(--ink-2); }
.l5-vs .l5-t { font-weight: 800; white-space: nowrap; }
.l5-v { margin: 0 6px; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.l5-vs .l5-rf { display: block; margin-top: 3px; font-size: 14px; color: var(--ink-2); }
.l5-vs .l5-rf b { color: var(--sky-deep); }
.l5-vs span.l5-rn { white-space: nowrap; }
.l5-rest { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.l5-rs { display: block; }
.l5-empty { color: var(--ink-2); font-size: 14px; }
.l5-leg td { background: var(--sky-soft) !important; font-size: 14px; font-weight: 800; text-align: left; }
.l5-team td, .l5-team th { font-size: 14px; white-space: normal; }
.l5-team td.num { white-space: nowrap; }
.l5-order span { white-space: nowrap; }
.l5-team th.l5-tn { white-space: nowrap; background: #fff; font-weight: 800; }

/* 対戦表（道具の図）: マスに何試合目かを小さく入れる。○●を書く場所は空けておく。
   style.css の .tn（inline-flex）が表の見出しのセルにも当たり、列がずれるので、このページではセルに戻す（共通側は未修正） */
body.seo .cross th.tn { display: table-cell; vertical-align: middle; }
.cross.l5-cross td { position: relative; height: 40px; }
.l5-cn { position: absolute; top: 3px; left: 4px; font: 700 14px/1 var(--num); color: var(--ink-2); }
.l5-hint { margin: 6px 0 0; }
.l5-stnote { display: none; }
/* 総当たりでは山の拡大は使わない（template が hidden を付ける） */
.work-cond [data-act=zoom][hidden] { display: none !important; }
.l5-hint[hidden] { display: none; }

/* 本文の表（スマホ358pxに入れる） */
.l5-time th[scope=row], .l5-near th[scope=row] { line-height: 1.4; }
.l5-time .num, .l5-per .num { width: 1%; white-space: nowrap; }
.l5-near td, .l5-near th { font-size: 14px; }

@media (max-width: 480px) {
  .l5-grid .l5-rd { width: 3.6em; }
  .l5-v { margin: 0 3px; }
  .l5-grid.c2 .l5-vs .l5-no + .l5-t { display: block; }
  .l5-grid.c2 .l5-vs .l5-rn { display: block; }
  .l5-grid td, .l5-grid th { padding: 6px 4px; }
  .l5-team td, .l5-team th { padding: 6px 4px; }
  /* 勝・負・勝ち点・順位の欄は、画面では隠す（印刷とExcelには入る） */
  .cross.l5-cross .st { display: none; }
  .l5-stnote { display: inline; }
}

/* 印刷: 対戦表（左）と試合順・メモ（右）をA4横1枚に（並べ方は seo.css の v2 の印刷） */
@media print {
  html body.seo .l5-memo { margin: 3mm 0 0; padding: 2.5mm 3mm; border: 1pt solid #000; font-size: 10pt; line-height: 1.6; }
  html body.seo .l5-memo.l5-empty-memo { display: none; }
  html body.seo .l5-grid td, html body.seo .l5-grid th { padding: .8mm 1.5mm; font-size: 9pt; line-height: 1.3; }
  html body.seo .l5-grid .l5-rd b, html body.seo .l5-grid .l5-rd .num { display: inline; font-size: 9pt; margin-right: 1mm; }
  html body.seo .l5-vs .l5-rf { display: inline; margin-left: 2mm; }
  html body.seo .l5-vs .l5-no + .l5-t, html body.seo .l5-vs .l5-rn { display: inline !important; }
  html body.seo .work-out > .seo-note, html body.seo [data-out=schedule] > .seo-note { font-size: 8pt; margin: 0 0 1.5mm; }
  html body.seo .l5-vs .l5-no { display: inline; margin-right: 2mm; font-size: 8.5pt; color: #000; }
  html body.seo .l5-vs .l5-rf { font-size: 8pt; color: #000; }
  html body.seo .l5-rest { color: #000; font-size: 8.5pt; white-space: normal; }
  html body.seo .l5-rs { display: inline; }
  html body.seo .l5-rs + .l5-rs::before { content: "・"; }
  html body.seo .l5-leg td { background: #eee !important; }
  html body.seo .l5-cn { color: #555; font-size: 7pt; }
  html body.seo .cross.l5-cross td { height: 12mm; }
  html body.seo-v2 .work-fig { width: 130mm; }
  html body.seo-v2 .work-out { margin-left: 138mm; }
  /* 10回を超える並び（1コート・2回戦総当たり）は行を詰める */
  html body.seo .seo-work.l5-long .l5-grid td, html body.seo .seo-work.l5-long .l5-grid th { padding: .2mm 1mm; font-size: 7.5pt; line-height: 1.15; }
  html body.seo .seo-work.l5-long .l5-vs .l5-rf { font-size: 7pt; }
  html body.seo .seo-work.l5-long .l5-leg td { padding: .2mm 1mm; font-size: 7.5pt; }
  html body.seo .seo-work.l5-long .l5-vs .l5-no { display: none; }
}

/* ---------- チーム数別ページ（_league-n.mjs）の本文の表と試合順 ---------- */
.lg-order { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5em, 1fr)); gap: 4px 12px; margin: 8px 0 16px; padding-left: 2em; max-width: none !important; }
.lg-order li { font-family: var(--num); font-size: 15px; line-height: 1.6; }
.lg-grid th, .lg-grid td, .lg-team th, .lg-team td { font-size: 14px; }
