/* ごろ暗かるた 語呂ページ・目次(goro/*.html)専用。style.css は読み込まない。
   古い端末向けに aspect-ratio / inset / flex の gap / dvh / ?. は使わない。 */
:root{ --bg:#f3ecd9; --card:#fffdf6; --text:#1a1a1a; --muted:#5a5448; --navy:#1c2a4b; --line:#d8cba8; --shu:#c9382d; --red:#ff6c00; }
*{ box-sizing:border-box; -webkit-text-size-adjust:100% }
html,body{ margin:0; padding:0 }
body{ font-family:"Yu Gothic UI","Meiryo","Hiragino Sans","Hiragino Kaku Gothic ProN",-apple-system,sans-serif; background:var(--bg); color:var(--text); line-height:1.8; font-size:16px }
a{ color:var(--navy) }
img{ max-width:100%; height:auto; display:block }

.topbar{ background:var(--navy); color:#fff; padding:8px 16px; font-size:13px; line-height:1.5; overflow:hidden }
.topbar a{ color:#fff; text-decoration:none; font-weight:700 }
.topbar .tb-home{ float:left; margin-right:12px }
.topbar .tb-hub{ float:right; font-weight:400; opacity:.9 }
.topbar a:hover{ text-decoration:underline }

.wrap{ max-width:760px; margin:0 auto; padding:14px 16px 32px }
.crumb{ font-size:12.5px; color:var(--muted); margin:0 0 8px }
.crumb a{ color:var(--muted) }
h1{ font-size:21px; line-height:1.45; color:var(--navy); margin:0 0 12px; letter-spacing:.02em }
h2{ font-size:17px; color:var(--navy); margin:0 0 8px; padding-left:10px; border-left:5px solid var(--shu) }
h2 small{ font-size:12px; color:var(--muted); font-weight:400; margin-left:8px }

.pic{ margin:0 0 12px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff }
.pic img{ width:100% }
.pic-copy{ margin:-8px 0 12px; font-size:11px; line-height:1.5; color:var(--muted); text-align:center }

.tolist{ display:flex; flex-direction:column; justify-content:center; align-items:center; min-height:52px; margin:0 0 12px; padding:6px 12px; background:#c9382d; color:#fff; border-radius:8px; text-decoration:none; text-align:center; line-height:1.3 }
.tolist b{ font-size:16px; letter-spacing:.04em }
.tolist small{ font-size:11.5px; opacity:.92; white-space:nowrap }
.tolist:hover{ background:#b02e24 }

.card{ background:var(--card); border:1px solid var(--line); border-radius:8px; padding:12px 16px; margin:0 0 16px; text-align:center }
.card p{ margin:0 }
.year{ font-size:44px; line-height:1.15; font-weight:800; letter-spacing:.04em }
.year .rs{ color:var(--red) }
.year .nen{ font-size:20px; margin-left:4px; color:var(--navy) }
.ev{ font-size:18px; font-weight:700; color:var(--navy); margin-top:4px !important }
.goro{ font-size:20px; font-weight:700; margin-top:8px !important; line-height:1.6 }
.era{ font-size:13px; color:var(--muted); margin-top:6px !important }

/* 赤シート対象: 赤シートで消えるオレンジ+太字(2026-11-03 ユーザー「オレンジっぽい色で太字・視認性」)。「答えを隠す」ボタンは廃止 */
.rs{ color:var(--red); font-weight:800 }
/* 表示点検 2026-11-03: 年号と「年」・h1 の語句を行の途中で分けない/見出しの 1〜2 字落ち・本文のぶら下がりを防ぐ */
.nw{ white-space:nowrap }
h1, .goro, .ev{ text-wrap:balance }
.kai-list li, .pts li, table.kw td{ text-wrap:pretty }

.sec{ margin:0 0 18px }
.kai{ margin:0; background:var(--card); border:1px solid var(--line); border-radius:8px; padding:10px 14px }
.kai.pending{ color:var(--muted) }
table.kw{ width:100%; border-collapse:collapse; background:var(--card); font-size:15px }
table.kw th, table.kw td{ border:1px solid var(--line); padding:6px 10px; text-align:left; vertical-align:top }
table.kw thead th{ background:var(--navy); color:#fff; font-weight:700; font-size:13px }
table.kw tbody th{ width:38%; font-weight:700 }

.sheet{ background:#fff; border:2px dashed var(--shu); border-radius:8px; padding:10px 14px; margin:0 0 18px }
.sheet-note{ margin:0 0 8px; font-size:14px }
.btns{ overflow:hidden }
.btn{ float:left; margin:0 8px 0 0; font:inherit; font-size:15px; font-weight:700; border:0; border-radius:6px; padding:9px 16px; background:var(--shu); color:#fff; cursor:pointer; -webkit-appearance:none }
.btn-sub{ background:var(--navy) }
.btn:focus{ outline:3px solid var(--navy); outline-offset:2px }
.btn:focus:not(:focus-visible){ outline:0 }

.prevnext{ display:table; width:100%; table-layout:fixed; border-spacing:8px 0; margin:0 -8px 18px; width:calc(100% + 16px) }
.pn{ display:table-cell; background:var(--card); border:1px solid var(--line); border-radius:8px; padding:8px 10px; text-decoration:none; font-weight:700; color:var(--navy); font-size:14px; vertical-align:top }
.pn small{ display:block; font-weight:400; color:var(--muted); font-size:12px; line-height:1.5; margin-top:2px }
.pn.next{ text-align:right }
.pn.off{ color:#aaa; background:#eee7d5 }

.elist{ list-style:none; margin:0; padding:0; background:var(--card); border:1px solid var(--line); border-radius:8px }
.elist li{ border-top:1px solid var(--line); font-size:14.5px; line-height:1.5 }
.elist li:first-child{ border-top:0 }
.elist a, .elist li.cur{ display:block; padding:8px 12px; text-decoration:none; color:var(--text) }
/* 2 行目を出来事名の先頭にそろえる(年号の下にもぐらせない)。.ey の text-indent:0 は必須(無いと年号が枠の外へ出る) */
.elist a, .elist li.cur{ padding-left:calc(12px + 3.2em); text-indent:-3.2em }
.elist a:hover{ background:#f7f0de }
.elist li.cur{ background:#efe5c8; font-weight:700 }
.ey{ display:inline-block; min-width:3.2em; color:var(--shu); font-weight:800; text-indent:0 }

.cta{ text-align:center; margin:22px 0 8px }
.cta a{ display:block; margin:0 auto 10px; max-width:420px; text-decoration:none; font-weight:700; border-radius:8px; padding:12px 16px }
.cta-main{ background:var(--shu); color:#fff !important }
.cta-sub{ background:var(--card); border:1px solid var(--navy); color:var(--navy) }

.lead{ margin:0 0 12px; font-size:15px }
.eratoc{ margin:0 0 18px; line-height:2.2 }
.eratoc a{ display:inline-block; margin:0 6px 6px 0; padding:2px 10px; line-height:1.8; border:1px solid var(--navy); border-radius:999px; font-size:13px; text-decoration:none; background:var(--card) }
.toc-page .sec h2{ scroll-margin-top:8px }

/* v2(2026-11-03 §26.7): 「〜とは」の箇条書き・入試でねらわれるポイント */
.kai-list{ list-style:none; margin:0; padding:8px 14px 8px 12px; background:var(--card); border:1px solid var(--line); border-radius:8px }
.kai-list li{ position:relative; padding:3px 0 3px 18px; line-height:1.75 }
.kai-list li:before{ content:""; position:absolute; left:4px; top:0.95em; width:7px; height:7px; margin-top:-1px; background:var(--shu); border-radius:50% }
.pts{ list-style:none; margin:0; padding:0; background:var(--card); border:1px solid var(--line); border-radius:8px }
.pts li{ position:relative; padding:8px 12px 8px 26px; border-top:1px solid var(--line); line-height:1.6 }
.pts li:first-child{ border-top:0 }
.pts li:before{ content:""; position:absolute; left:11px; top:17px; width:6px; height:6px; background:var(--shu) }

.foot{ border-top:1px solid var(--line); padding:14px 16px 28px; text-align:center; font-size:12px; color:var(--muted); line-height:1.7 }
.foot p{ margin:0 0 4px }
.foot a{ color:var(--muted) }

@media (min-width:600px){
  h1{ font-size:25px }
  .year{ font-size:56px }
}

/* 印刷: A4 縦 1 枚に必ず収める(§26.7)。帯・ボタン・前後・一覧・導線・フッターのリンクは出さない。
   画面の行間・余白は変えない(ここだけで詰める) */
@page{ size:A4 portrait; margin:10mm }
@media print{
  *{ -webkit-print-color-adjust:exact; print-color-adjust:exact }
  html,body{ background:#fff; font-size:10pt; line-height:1.35 }
  .topbar, .crumb, .sheet, .prevnext, .samera, .cta, .foot-links, .eratoc, .tolist{ display:none !important }
  .wrap{ max-width:none; padding:0 }
  a{ color:inherit; text-decoration:none }
  h1{ font-size:15pt; line-height:1.3; margin:0 0 2mm }
  h2{ font-size:12pt; line-height:1.3; margin:0 0 1.2mm; padding-left:2mm; border-left-width:3pt; page-break-after:avoid; break-after:avoid }
  /* 絵: 幅 110mm・中央 */
  .pic{ width:110mm; margin:0 auto 1mm; border-radius:0 }
  .pic-copy{ margin:0 0 2mm; font-size:6.5pt; line-height:1.3; color:#666 }
  /* 年号カード: 1 行目 = 年号・出来事、2 行目 = 語呂 */
  .card{ padding:1.5mm 3mm; margin:0 0 3mm; border-radius:0; line-height:1.35 }
  .card p{ display:inline; margin:0 !important; vertical-align:baseline }
  .year{ font-size:26pt; line-height:1.1; margin-right:3mm !important }
  .year .nen{ font-size:12pt; margin-left:0.5mm }
  .ev{ font-size:13pt }
  .card .goro{ display:block; font-size:13pt; margin-top:0.5mm !important }
  .era{ display:none !important }
  .sec{ margin:0 0 3mm; page-break-inside:avoid; break-inside:avoid }
  /* 箇条書き 11.5pt・行間 1.5 / ポイント 11pt */
  .kai-list{ padding:1.2mm 3mm 1.2mm 2.5mm; border-radius:0 }
  .kai-list li{ padding:0.3mm 0 0.3mm 4.5mm; font-size:11.5pt; line-height:1.5 }
  .kai-list li:before{ left:1mm; top:0.75em; width:1.8mm; height:1.8mm; margin-top:-0.9mm }
  .pts{ border-radius:0 }
  .pts li{ padding:0.8mm 3mm 0.8mm 6mm; font-size:11pt; line-height:1.45 }
  .pts li:before{ left:2.4mm; top:0.8mm; margin-top:calc(0.72em - 0.75mm); width:1.5mm; height:1.5mm }
  /* キーワード表: 10.5pt・セル余白 1.2mm × 2.5mm */
  table.kw{ font-size:10.5pt; line-height:1.35 }
  table.kw th, table.kw td{ padding:1.2mm 2.5mm }
  table.kw thead th{ font-size:9.5pt }
  .foot{ border-top:1px solid #999; padding:1.5mm 0 0; font-size:7pt; line-height:1.3 }
  .foot p{ margin:0 }
}

/* 印刷でもオレンジを必ず出す(赤シートで隠して使うため) */
@media print{.rs{color:#ff6c00 !important}}
