:root {
  --bg: #0b1220;
  --card: #121a2b;
  --text: #eef2ff;
  --muted: #a9b4d0;
  --line: #243049;
  --accent: #6ea8ff;
  --warn: #f0c674;
  --btn: #1a56db; /* WCAG: #fff on #1a56db ≈ 6.18:1 */
  --btn-text: #fff;
  --btn2: #2a3a5c;
  --ok: #5ddea5;
  --rep: #f0c674;
  --view: #9b8cff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 56rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; width: 100%; }
header { padding: 1rem 0 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.site-name { font-size: 1.1rem; font-weight: 800; text-decoration: none; color: var(--text); }
.kicker { color: var(--accent); font-size: 0.85rem; letter-spacing: 0.04em; margin: 0.35rem 0; }
h1 { font-size: 1.75rem; line-height: 1.3; margin: 0 0 0.7rem; font-weight: 800; word-wrap: break-word; overflow-wrap: break-word; }
h2 { font-size: 1.22rem; line-height: 1.35; margin: 0 0 0.9rem; font-weight: 800; letter-spacing: 0.01em; }
h3 { font-size: 1.05rem; line-height: 1.4; margin: 1.4rem 0 0.55rem; font-weight: 700; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.85rem 0 0; }
.chip {
  display: inline-block; font-size: 0.82rem; color: var(--accent);
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 0.35rem 0.75rem; text-decoration: none;
}
.chip[aria-current="page"] { background: #1a2744; border-color: var(--accent); }
section {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.15rem 1.1rem 1.25rem; margin: 0 0 1.35rem;
}
p { margin: 0 0 0.85rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.5rem; }
a { color: var(--accent); word-break: break-word; }
.next { border-left: 3px solid var(--accent); padding-left: 0.85rem; margin: 0.5rem 0 0; }
.ko-primary { font-size: 1.05rem; font-weight: 700; }
.ko-secondary { color: var(--muted); font-size: 0.92rem; }
.warn { color: var(--warn); }
.note { color: var(--muted); font-size: 0.88rem; margin-top: 0.65rem; }
.badge {
  display: inline-block; border: 1px solid var(--line); border-radius: 0.4rem;
  padding: 0.1rem 0.5rem; color: var(--warn); font-size: 0.8rem;
}
.badge.jst { color: var(--ok); border-color: #2a5a45; }
.notice { border-left: 4px solid var(--warn); }
.lane { border-left-width: 4px; border-left-style: solid; }
.lane-confirmed { border-left-color: var(--ok); }
.lane-reported { border-left-color: var(--rep); }
.lane-view { border-left-color: var(--view); }
.lane-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem; border-radius: 999px; margin-right: 0.45rem; vertical-align: middle;
}
.lane-confirmed .lane-tag { background: #163528; color: var(--ok); }
.lane-reported .lane-tag { background: #3a2f14; color: var(--rep); }
.lane-view .lane-tag { background: #2a2450; color: var(--view); }
.lane-list { margin: 0.4rem 0 0; }
.src { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.issue-list { list-style: none; padding: 0; margin: 0; }
.issue-list li {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem; align-items: baseline;
  padding: 0.75rem 0; border-bottom: 1px solid var(--line); margin: 0;
}
.issue-no { font-weight: 800; color: var(--accent); min-width: 3.2rem; }
.scene-card { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem; margin: 0 0 0.85rem; background: #0e1626; }
.scene-card h3 { margin: 0 0 0.35rem; }
.scene-label { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.55rem; }
.btn {
  display: inline-block; background: var(--btn); color: var(--btn-text) !important;
  text-decoration: none; font-weight: 600; padding: 0.7rem 1.25rem; border-radius: 999px;
  margin: 0.35rem 0.5rem 0.35rem 0; border: none; font-size: 0.95rem; cursor: pointer; font-family: inherit;
}
.btn.secondary { background: var(--btn2); color: var(--btn-text) !important; border: 1px solid var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.digest-cta {
  margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--line);
  font-size: 0.92rem; color: var(--muted);
}
.toast { display: none; margin-top: 0.5rem; color: var(--warn); font-size: 0.88rem; }
.toast.show { display: block; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: #121a2b; padding: 1rem; z-index: 10; }
a:focus-visible, button:focus-visible { outline: 3px solid #f0c674; outline-offset: 4px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-size: 0.9rem; }
th { color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.grid section { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; }
.section-links { display: flex; flex-wrap: wrap; gap: 0.7rem; }
details { border-bottom: 1px solid var(--line); padding: 0.8rem 0; }
summary { cursor: pointer; font-weight: 700; }
details p { margin-top: 0.7rem; }
.print-note { font-size: 0.85rem; color: var(--muted); }
.guide-index a { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.guide-index a strong { color: var(--text); display: block; }
.guide-index a span { color: var(--muted); font-size: 0.88rem; }
footer { margin-top: 1.5rem; color: var(--muted); font-size: 0.85rem; }

.support-rail {
  border-left: 4px solid var(--accent);
}
.support-rail h2 {
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
}
.support-rail p {
  margin-bottom: 0.55rem;
}
.inline-aff {
  background: #0e1626;
}
.inline-aff > h2 {
  font-size: 1.02rem;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 0.6rem;
}
.inline-aff .scene-card:last-child {
  margin-bottom: 0;
}
@media (max-width: 480px) {
  h1 { font-size: 1.42rem; }
  h2 { font-size: 1.12rem; margin-bottom: 0.75rem; }
  .wrap { padding: 1rem 0.75rem 2rem; }
  section { padding: 1rem 0.95rem 1.1rem; margin-bottom: 1.15rem; }
  .btn { width: 100%; text-align: center; margin: 0.25rem 0; }
  .btn-row { flex-direction: column; }
  .support-rail .btn,
  .inline-aff .btn { width: 100%; text-align: center; margin: 0.25rem 0; }
  .support-rail .btn-row { flex-direction: column; width: 100%; }
  .chip { padding: 0.35rem 0.6rem; }
  th, td { font-size: 0.8rem; padding: 0.5rem 0.25rem; }
}
@media print {
  body { background: white; color: black; }
  .wrap { max-width: 100%; padding: 0; }
  nav, .btn-row, .skip, footer { display: none; }
  section { border: 1px solid #ccc; background: white; break-inside: avoid; }
  a { color: black; }
  .meta, .note, .print-note, .src { color: #444; }
}

/* Mode A/B tables */
.lineup-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.5rem 0 1rem; }
.lineup-table { min-width: 28rem; }
.lineup-table caption { text-align: left; font-weight: 700; margin-bottom: 0.4rem; color: var(--text); }
.lineup-table .pos { color: var(--muted); width: 4.5rem; white-space: nowrap; }
.rating-table .score { font-weight: 800; color: var(--accent); width: 3rem; }
.keys ol { margin: 0.4rem 0 0; }
.weekday-slots { display: grid; gap: 0.75rem; }
.weekday-slot { border: 1px dashed var(--line); border-radius: 10px; padding: 0.75rem 0.9rem; background: #0e1626; }
.weekday-slot h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.mode-badge { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.15rem 0.55rem; border-radius: 999px; background: #1a2744; color: var(--accent); margin-bottom: 0.5rem; }
.hypo-check { border-left: 3px solid var(--view); padding-left: 0.75rem; margin: 0.6rem 0; }

.verify-lead {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #0e1626;
  border: 1px dashed var(--line);
  font-size: 0.92rem;
}
.verify-lead a { font-weight: 700; }
.formation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}
.formation-card {
  background: #0e1626;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
}
.formation-card img, .formation-card object, .formation-card svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.formation-card figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.source-deep {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #0e1626;
  border: 1px dashed var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.source-deep a { font-weight: 700; }
.verify-lead { /* legacy alias — prefer body then .source-deep */ }
.formation-card img { image-rendering: auto; background: #0a1628; }

.read-order {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.55rem; align-items: center;
  font-size: 0.88rem; color: var(--muted); margin: 0 0 1rem;
  padding: 0.55rem 0.75rem; border: 1px dashed var(--line); border-radius: 10px;
  background: #0e1626;
}
.read-order strong { color: var(--text); font-weight: 700; }
.read-order a { text-decoration: none; }
.detail-lead {
  border-left: 4px solid var(--view);
}

/* === common header v25 (all pages) === */
.site-banner{display:block;max-width:640px;margin:0 auto .6rem;line-height:0;border-radius:10px}.site-banner img{display:block;width:100%;height:auto;aspect-ratio:1448/276;border-radius:10px}.site-banner:focus-visible{outline:2px solid #6ea8ff;outline-offset:3px}.kicker-center{text-align:center}
header.top-head{padding:.6rem 0 .9rem;margin-bottom:1rem}header.top-head .kicker{margin:.2rem 0 .45rem;font-size:.78rem;color:#a9b4d0}
.topnav-row{list-style:none;margin:0 0 .8rem;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:.3rem;align-items:start}.topnav-row>li{min-width:0;margin:0}
.topnav-row>li>a,.menu>summary{display:flex;align-items:center;justify-content:center;min-height:44px;box-sizing:border-box;padding:0 .25rem;border:1px solid #243049;border-radius:10px;color:#6ea8ff;text-decoration:none;font-size:.88rem;font-weight:700;background:#0e1626;cursor:pointer;white-space:nowrap}
.topnav-row>li>a[aria-current="page"],.menu>summary.has-current{background:#1a2744;border-color:#6ea8ff;color:#eef2ff}
details.menu{border:0;padding:0}.menu>summary{list-style:none}.menu>summary::-webkit-details-marker{display:none}
.topnav-row>li>a:focus-visible,.menu>summary:focus-visible{outline:2px solid #6ea8ff;outline-offset:2px}
.topnav-menu{position:relative}.menu-list{list-style:none;margin:.3rem 0 0;padding:.35rem;position:absolute;right:0;z-index:10;min-width:12rem;max-width:calc(100vw - 2rem);background:#121a2b;border:1px solid #243049;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.45)}.menu-list li{margin:0}
.menu-list a{display:block;padding:.6rem .7rem;min-height:44px;box-sizing:border-box;color:#6ea8ff;text-decoration:none;border-radius:8px}.menu-list a:hover,.menu-list a:focus-visible{background:#1a2744;outline:none}.menu-list a[aria-current="page"]{color:#eef2ff;background:#1a2744}
header.top-head h1{color:#f3f6ff;font-size:1.5rem;margin:0 0 .35rem}header.top-head .meta{color:#a9b4d0;font-size:.85rem}
.preview-note{color:#a9b4d0;font-size:.85rem;margin:0 0 1rem;padding:.5rem .75rem;border-left:3px solid #243049}.preview-note small{display:block;margin-top:.2rem;font-size:.78rem}
@media (max-width:400px){.topnav-row>li>a,.menu>summary{font-size:.8rem;padding:0 .15rem}header.top-head h1{font-size:1.32rem}}
