/* 脳トレプリント — あたたかく、落ち着いた、読みやすい色。用紙(.sheet)は mm と pt で組み、画面の見本と印刷を同じにする */
:root {
  --bg: #f7f2e8;
  --paper: #fffdf8;
  --ink: #26221d;
  --sub: #5d554b;
  --line: #ddd2bf;
  --acc: #2f6b55;
  --acc-d: #1f4d3c;
  --warm: #c0562b;
  --warm-t: #fbe6dc;
  --gold: #e9b44c;
  --r: 14px;
  --font: "BIZ UDPGothic", "BIZ UDPゴシック", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.75; overflow-x: hidden; }
a { color: var(--acc-d); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.4; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px; border-radius: 12px; border: 2px solid var(--acc); background: #fff; color: var(--acc-d); font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: #eef6f2; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc-d); }
.btn.big { min-height: 60px; font-size: 19px; padding: 12px 26px; }
.btn.disabled { border-color: #bbb; color: #777; background: #f1f1f1; cursor: default; }
.btn.buy { width: 100%; border-color: var(--warm); color: var(--warm); }
.btn.buy:hover { background: var(--warm-t); }
button.link { background: none; border: 0; padding: 6px 4px; color: var(--acc-d); text-decoration: underline; font: inherit; font-size: 15px; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- ヘッダー・フッター ---- */
.hdr { position: sticky; top: 0; z-index: 20; background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 8px max(16px, calc((100vw - 1320px) / 2)); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.logo-mark { width: 42px; height: 42px; flex: none; }
.logo b { display: block; font-size: 20px; line-height: 1.2; }
.logo small { display: block; font-size: 12px; color: var(--sub); line-height: 1.3; }
.tnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; margin-left: auto; }
.tnav a { flex: none; padding: 8px 11px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 700; white-space: nowrap; }
.tnav a:hover, .tnav a[aria-current] { background: var(--tt, #eee); color: var(--tc, var(--ink)); }
.tnav a.mt { background: var(--warm-t); color: var(--warm); }
.foot { margin-top: 64px; background: #2c2924; color: #eee6d8; padding: 40px 16px 24px; }
.foot a { color: #f3e3c3; }
.foot-in { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand p { margin: 4px 0 0; font-size: 14px; color: #cfc4b2; }
.foot nav { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.foot h4 { margin: 0 0 6px; font-size: 15px; color: #fff; }
.copy { max-width: 1200px; margin: 28px auto 0; font-size: 13px; color: #b9ad99; text-align: center; }

/* ---- 共通の見出しまわり ---- */
.crumb { font-size: 14px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.crumb a { color: var(--sub); }
.badges { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: 2px 14px; font-size: 14px; font-weight: 700; }

/* ---- 種類のページ ---- */
.tool { max-width: 1320px; margin: 0 auto; padding: 18px 16px 0; }
.tool-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.ticon { flex: none; width: 64px; height: 64px; border-radius: 18px; background: var(--tt); color: var(--tc); display: grid; place-items: center; }
.ticon svg { width: 40px; height: 40px; }
.tool-head h1 { margin: 0; font-size: 30px; }
.tool-head .lead { margin: 4px 0 0; color: var(--sub); }
.work { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
.panel { position: sticky; top: 76px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r); padding: 18px 18px 20px; max-height: calc(100vh - 92px); overflow: auto; }
.ctl { margin-bottom: 16px; }
.ctl h3 { margin: 0 0 6px; font-size: 16px; color: var(--sub); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; }
.seg.wide { grid-template-columns: repeat(6, 1fr); }
.seg button { min-height: 50px; border-radius: 10px; border: 2px solid var(--line); background: #fff; font: inherit; font-weight: 700; font-size: 16px; color: var(--ink); cursor: pointer; padding: 4px 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.seg.wide button { min-height: 46px; font-size: 15px; padding: 2px; }
.seg button[aria-checked="true"] { background: var(--acc); border-color: var(--acc); color: #fff; }
.seg button.locked { color: #8a8174; background: #f6f1e7; }
.lk { width: 15px; height: 15px; flex: none; }
.chk { display: flex; gap: 10px; align-items: center; font-weight: 700; cursor: pointer; min-height: 44px; }
.chk input { width: 24px; height: 24px; accent-color: var(--acc); }
.acts { display: grid; gap: 10px; margin: 6px 0 8px; }
.seedline { font-size: 15px; color: var(--sub); margin: 4px 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seedline b { color: var(--ink); font-size: 17px; }
.pdf { background: #f6f1e7; border-radius: 10px; padding: 8px 14px; font-size: 15px; margin-bottom: 14px; }
.pdf summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; }
.pdf ol { margin: 4px 0 6px; padding-left: 1.3em; }
.paidbox { border: 2px dashed #e0b9a3; border-radius: var(--r); padding: 14px 14px 16px; background: #fffaf5; }
.paidbox.on { border: 2px solid var(--acc); background: #f3faf6; }
.paidbox > h3 { margin: 0 0 10px; font-size: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paidbox .price { color: var(--warm); font-size: 15px; display: inline-flex; gap: 4px; align-items: center; }
.paidbox .ok { background: var(--acc); color: #fff; font-size: 13px; border-radius: 99px; padding: 2px 12px; }
.inp { width: 100%; min-height: 48px; font: inherit; font-size: 17px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.inp.locked { background: #f6f1e7; cursor: pointer; }
.hint { font-size: 14px; color: var(--sub); margin: 6px 0 0; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 44px; }
.chip input { width: 20px; height: 20px; accent-color: var(--acc); }

/* 見本(プレビュー)。.pages の zoom を JS が幅に合わせる */
.preview { background: #e9e2d4; border-radius: var(--r); padding: 16px; min-width: 0; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pv-bar span { font-size: 15px; font-weight: 700; color: var(--sub); }
.pv-bar .btns { display: flex; gap: 8px; }
.pv-bar .btn { min-height: 46px; font-size: 16px; padding: 6px 16px; }
.pages { zoom: var(--z, 1); display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* ---- 読みもの ---- */
.article, .doc { max-width: 860px; margin: 40px auto 0; padding: 0 16px; }
.article h2, .doc h2 { font-size: 24px; margin: 40px 0 12px; padding-left: 12px; border-left: 6px solid var(--tc, var(--acc)); }
.doc h1 { font-size: 30px; }
.article ul, .article ol, .doc ul, .doc ol { padding-left: 1.4em; }
.article li, .doc li { margin: 4px 0; }
.faq details { background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; margin: 8px 0; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; }
.faq p { margin: 0 0 12px; }
table.info { border-collapse: collapse; width: 100%; background: #fff; }
table.info th, table.info td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
table.info th { background: #f6f1e7; width: 32%; }
.back { margin-top: 32px; }
.mlinks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mlinks a { display: block; text-align: center; padding: 10px 4px; border-radius: 10px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; font-weight: 700; color: var(--ink); }
.mlinks a.on { background: var(--acc); color: #fff; border-color: var(--acc); }

/* ---- トップ ---- */
.home { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding: 48px 0 24px; }
.eyebrow { margin: 0 0 8px; font-weight: 700; color: var(--warm); }
.hero h1 { font-size: 44px; margin: 0 0 14px; line-height: 1.35; }
.hero h1 .mk { background: linear-gradient(transparent 62%, #f5d58a 62%); }
.hero-lead { font-size: 19px; color: var(--sub); margin: 0 0 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-art { position: relative; height: 420px; }
.mini { position: absolute; width: 250px; background: #fff; border-radius: 6px; box-shadow: 0 10px 28px rgba(60, 40, 20, .18); padding: 16px 16px 12px; font-size: 13px; line-height: 1.5; }
.mini b { display: block; font-size: 15px; border-bottom: 2px solid #333; margin-bottom: 8px; padding-bottom: 4px; }
.mini.a { left: 4%; top: 18px; transform: rotate(-4deg); }
.mini.b { right: 4%; top: 70px; transform: rotate(3deg); z-index: 2; }
.mini.c { left: 22%; top: 210px; transform: rotate(-1deg); z-index: 3; }
.mini .row { display: flex; justify-content: space-between; border-bottom: 1px dashed #ccc; padding: 4px 0; font-size: 16px; font-weight: 700; }
.mini .row i { display: inline-block; width: 38px; height: 22px; border: 1.5px solid #333; border-radius: 3px; }
.mini svg { width: 100%; height: auto; display: block; }
.stamp { position: absolute; right: 8%; bottom: 20px; z-index: 4; width: 116px; height: 116px; border-radius: 50%; background: var(--warm); color: #fff; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 16px; line-height: 1.35; transform: rotate(8deg); box-shadow: 0 6px 0 #8f3c1c; }
.sec { margin-top: 56px; }
.sec-title { font-size: 28px; margin: 0 0 6px; }
.sec-lead { margin: 0 0 20px; color: var(--sub); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.tcard { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink); transition: transform .12s, box-shadow .12s; min-height: 104px; }
.tcard:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(60, 40, 20, .12); }
.tcard b { display: block; font-size: 19px; }
.tcard span.d { display: block; font-size: 14px; color: var(--sub); line-height: 1.55; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r); padding: 20px; }
.step h3 { margin: 0 0 6px; font-size: 19px; }
.step h3::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--acc); color: #fff; margin-right: 10px; font-size: 17px; }
.step p { margin: 0; color: var(--sub); font-size: 16px; }
.band { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--warm-t); border: 2px solid #efc3ad; border-radius: var(--r); padding: 22px 24px; }
.band b { font-size: 21px; display: block; }
.band p { margin: 4px 0 0; color: var(--sub); }
.season { display: flex; gap: 16px; align-items: center; background: #fff7e8; border: 2px solid #f0d49b; border-radius: var(--r); padding: 18px 22px; text-decoration: none; color: var(--ink); }
.season b { font-size: 20px; display: block; }
.season .go { margin-left: auto; font-weight: 700; color: var(--warm); white-space: nowrap; }

/* ---- まとめ版のダイアログ ---- */
dialog { border: 0; border-radius: 18px; padding: 0; max-width: min(560px, calc(100vw - 24px)); width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); color: var(--ink); }
dialog::backdrop { background: rgba(30, 25, 20, .55); }
.shop { padding: 24px 24px 18px; }
.shop h2 { margin: 0 0 6px; font-size: 24px; }
.shop .lead { margin: 0 0 6px; color: var(--warm); font-weight: 700; }
.price-big { font-size: 34px; font-weight: 700; margin: 0; color: var(--warm); }
.price-big small { font-size: 15px; color: var(--sub); margin-left: 6px; }
.feat { padding-left: 1.2em; margin: 8px 0; }
.note { font-size: 15px; color: var(--sub); margin: 8px 0; }
.note.small { font-size: 13px; }
.buyrow { margin: 12px 0; display: grid; }
.codel { display: grid; gap: 6px; font-weight: 700; margin-top: 8px; }
.msg { min-height: 1.6em; font-weight: 700; color: var(--acc-d); margin: 8px 0; }
.dlg-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.dlg-acts .btn { flex: 1; }

@media (max-width: 1080px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; max-height: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { height: 360px; max-width: 560px; width: 100%; margin: 0 auto; }
  .foot-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hdr { gap: 10px; }
  .logo small { display: none; }
  .tool-head h1 { font-size: 23px; }
  .ticon { width: 52px; height: 52px; }
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 31px; }
  .hero-art { height: 320px; }
  .mini { width: 200px; font-size: 12px; }
  .mini.c { left: 14%; top: 170px; }
  .stamp { width: 96px; height: 96px; font-size: 14px; right: 2%; }
  .steps3 { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .mlinks { grid-template-columns: repeat(4, 1fr); }
  .preview { padding: 10px; }
  .seg.wide { grid-template-columns: repeat(4, 1fr); }
}

/* ===================== 用紙(A4) ===================== */
.sheet { width: 210mm; height: 297mm; padding: 12mm 14mm 9mm; background: #fff; color: #111; font-family: var(--font); font-size: 15pt; line-height: 1.45; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 4px 18px rgba(50, 35, 20, .18); flex: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet .ans { color: #d1342f; font-weight: 700; }
.sh-head { border-bottom: .7mm solid #222; padding-bottom: 2.5mm; }
.sh-top { display: flex; justify-content: space-between; align-items: center; min-height: 6mm; font-size: 12pt; gap: 4mm; }
.sh-org { font-weight: 700; }
.sh-day { margin-left: auto; font-weight: 700; }
.sh-badge { border: .6mm solid #d1342f; color: #d1342f; font-weight: 700; padding: 0 4mm; border-radius: 1.5mm; }
.sh-title { margin: 1mm 0 0; font-size: 22pt; line-height: 1.3; }
.sh-title small { font-size: 13pt; font-weight: 400; margin-left: 4mm; color: #333; }
.sh-meta { display: flex; justify-content: flex-end; gap: 10mm; margin-top: 2mm; font-size: 14pt; }
.sh-meta i { display: inline-block; border-bottom: .4mm solid #222; width: 12mm; height: 7mm; vertical-align: bottom; }
.sh-name i { width: 62mm; margin-left: 2mm; }
.sh-lead { margin: 3mm 0 3mm; font-size: 14pt; font-weight: 700; }
.sh-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sh-foot { display: flex; justify-content: space-between; font-size: 9pt; color: #666; border-top: .3mm solid #bbb; padding-top: 1.5mm; margin-top: 2mm; }
.qn { font-size: 14pt; min-width: 9mm; flex: none; color: #333; }
.ab { display: inline-flex; align-items: center; justify-content: center; min-width: 22mm; height: 12mm; border: .5mm solid #222; border-radius: 1.5mm; background: #fff; vertical-align: middle; padding: 0 2mm; flex: none; }
.ab.w5 { min-width: 42mm; }
.ab.w6 { min-width: 50mm; }
.ab.w1 { min-width: 14mm; } .ab.w2 { min-width: 20mm; } .ab.w3 { min-width: 27mm; } .ab.w4 { min-width: 34mm; }
.sheet ol { list-style: none; margin: 0; padding: 0; }
.ch { display: flex; gap: 7mm; margin: 1mm 0 0 9mm; font-size: 15pt; flex-wrap: wrap; }
.ch span { padding: 0 2mm; border-radius: 99px; border: .4mm solid transparent; }
.ch span.ok { border-color: #d1342f; color: #d1342f; font-weight: 700; }
.bank { border: .5mm dashed #444; border-radius: 2mm; padding: 2mm 4mm 2.5mm; margin-top: 3mm; flex: none; }
.bank b { font-size: 13pt; display: block; }
.bank div { display: flex; flex-wrap: wrap; gap: 1.5mm 6mm; font-size: 16pt; }

/* 計算 */
.calc { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; column-gap: 10mm; }
.calc li { display: flex; align-items: center; border-bottom: .3mm dashed #bbb; font-size: 22pt; }
.calc .ex { display: flex; align-items: center; }
.calc .nm { width: 12mm; text-align: center; flex: none; }
.calc .op { margin: 0 2mm; }
.calc .ab { min-width: 21mm; height: 12mm; font-size: 20pt; }
.calc.n24 li { font-size: 21pt; }
.calc.n24 .ab { height: 11mm; }

/* 漢字 */
.kanji { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 3mm 5mm; }
.kanji li { display: flex; flex-direction: column; justify-content: center; border: .3mm solid #ccc; border-radius: 2mm; padding: 1.5mm 2.5mm; }
.kanji li { position: relative; padding-top: 4.5mm; }
.kanji li .qn { position: absolute; left: 1.5mm; top: .8mm; font-size: 12pt; min-width: 0; }
.kw { font-size: 26pt; font-weight: 700; text-align: center; line-height: 1.25; letter-spacing: .05em; }
.yb { display: flex; align-items: center; justify-content: center; height: 11mm; border: .5mm solid #222; border-radius: 1.5mm; margin-top: 1mm; font-size: 15pt; }
.kr { font-size: 19pt; font-weight: 700; text-align: center; }
.kc { font-size: 14pt; color: #444; text-align: center; }
.kbs { display: flex; justify-content: center; gap: 1mm; margin-top: 1mm; }
.kb { width: 12.5mm; height: 12.5mm; border: .5mm solid #222; display: inline-flex; align-items: center; justify-content: center; font-size: 20pt; background: #fff; }
.kb b:not(.ans) { color: #111; }
.ks-k { flex: none; grid-template-columns: repeat(4, 1fr); grid-auto-rows: auto; }
.ks-k .kw { font-size: 21pt; }

/* ことわざ */
.kw-list { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.kw-list li { display: flex; flex-wrap: wrap; align-items: center; font-size: 18pt; padding: 1mm 0; border-bottom: .3mm dashed #ccc; }
.kw-list .kt { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 1mm; }
.kw-list .ab { height: 11mm; font-size: 17pt; }
.kw-list .ch { width: 100%; }
.mean { width: 100%; margin-left: 9mm; font-size: 12pt; color: #444; line-height: 1.3; }

/* 都道府県 */
.pref { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.pref li { display: flex; align-items: center; gap: 2mm; font-size: 19pt; border-bottom: .3mm dashed #ccc; padding: .6mm 0; }
.pref .pa { font-weight: 700; flex: 1; }
.pref .ph { font-size: 13pt; color: #444; border: .3mm solid #888; border-radius: 99px; padding: 0 2.5mm; }
.pref .arrow { margin: 0 1mm; }
.pref .ab { height: 10.5mm; font-size: 17pt; }
.pref.n20 li { font-size: 17pt; }
.pref.n20 .ab { height: 9mm; }

/* 数字つなぎ・迷路・間違いさがし(SVG) */
.kz-wrap, .mz-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; }
.kz, .mz { height: 100%; width: 100%; }
.kz-ans { flex: none; display: flex; align-items: center; gap: 4mm; font-size: 17pt; font-weight: 700; margin-top: 2mm; }
.kz-note { flex: none; margin: 2mm 0 0; font-size: 14pt; }
.mc-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 3mm; }
.mc-p { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mc-p b { font-size: 14pt; }
.mc { flex: 1; min-height: 0; width: 100%; }
.mc-count { flex: none; margin: 2mm 0 0; font-size: 15pt; }

/* ミニ数独 */
.sd-list { flex: 1; display: grid; align-content: space-around; justify-content: space-around; }
.sd-list.n4 { grid-template-columns: repeat(3, auto); row-gap: 6mm; }
.sd-list.n6 { grid-template-columns: repeat(2, auto); row-gap: 6mm; column-gap: 12mm; }
.sd-no { display: block; font-size: 14pt; margin-bottom: 1mm; }
.sd { display: grid; border: .9mm solid #111; width: max-content; }
.sd.n4 { grid-template-columns: repeat(4, 14mm); grid-auto-rows: 14mm; }
.sd.n6 { grid-template-columns: repeat(6, 12.5mm); grid-auto-rows: 12.5mm; }
.sd span { border-right: .25mm solid #888; border-bottom: .25mm solid #888; display: flex; align-items: center; justify-content: center; font-size: 21pt; font-weight: 700; }
.sd span:nth-child(4n).x { border-right: 0; }
.sd span.br { border-right: .9mm solid #111; }
.sd span.bb { border-bottom: .9mm solid #111; }

/* 言葉あそび */
.ws { flex: none; display: grid; margin: 0 auto; border: .7mm solid #222; }
.ws.s6 { grid-template-columns: repeat(6, 24mm); grid-auto-rows: 24mm; font-size: 26pt; }
.ws.s8 { grid-template-columns: repeat(8, 19.5mm); grid-auto-rows: 19.5mm; font-size: 23pt; }
.ws.s10 { grid-template-columns: repeat(10, 16mm); grid-auto-rows: 16mm; font-size: 20pt; }
.ws span { display: flex; align-items: center; justify-content: center; border-right: .25mm solid #bbb; border-bottom: .25mm solid #bbb; font-weight: 700; }
.ws span.hit { background: #fbd3cb; color: #a3211c; }
.ws-list { flex: 1; margin: 5mm auto 0; max-width: 170mm; }
.ws-list b { font-size: 14pt; }
.ws-list div { display: flex; flex-wrap: wrap; gap: 2mm 7mm; font-size: 17pt; margin-top: 1mm; }
.shiri { flex: 1; display: flex; flex-direction: column; justify-content: space-around; align-items: flex-start; padding-left: 10mm; }
.shiri li { display: flex; align-items: center; gap: 3mm; font-size: 19pt; }
.shiri li.arr { font-size: 14pt; color: #777; padding-left: 13mm; line-height: 1; }
.shiri .sw { font-size: 22pt; font-weight: 700; letter-spacing: .1em; }
.shiri .kb { width: 12mm; height: 12mm; }
.shiri .sh { font-size: 14pt; color: #444; }
.note { font-size: 13pt; }
.hj { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 5mm; }
.hj-item { border: .4mm solid #888; border-radius: 2mm; padding: 3mm 4mm; display: flex; flex-direction: column; }
.hj-item b { font-size: 17pt; display: flex; align-items: center; gap: 1mm; }
.hj-item .lines { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.hj-item .lines span { border-bottom: .4mm dotted #555; height: 12mm; }
.hj-item p.ans { font-size: 15pt; font-weight: 400; color: #d1342f; }

/* 季節 */
.ks { display: flex; flex-direction: column; justify-content: space-around; flex: 1; }
.ks li { display: flex; flex-wrap: wrap; align-items: center; font-size: 16pt; padding: .8mm 0; border-bottom: .3mm dashed #ccc; }
.ks .kq { flex: 1; min-width: 60%; }
.ks .ab { height: 10mm; font-size: 15pt; }
.ks.with-ch .ch { width: 100%; }
.sub-h { margin: 3mm 0 2mm; font-size: 15pt; border-left: 1.5mm solid #222; padding-left: 2mm; flex: none; }

/* ===================== 印刷 ===================== */
@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { background: #fff !important; margin: 0; padding: 0; }
  .noprint, .hdr, .foot, dialog, .tool-head, .article, .panel, .pv-bar { display: none !important; }
  .tool, .work, .preview { display: block; padding: 0 !important; margin: 0 !important; background: none !important; max-width: none !important; border-radius: 0; }
  .pages { zoom: 1 !important; display: block; gap: 0; }
  .sheet { box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
}
/* 書きの問題は1行多いので、詰めて6段に収める */
.kanji li.kk { padding-top: 3mm; padding-bottom: 1mm; }
.kanji li.kk .kr { line-height: 1.2; }
.kanji li.kk .kc { line-height: 1.2; }
.kanji li.kk .kb { width: 11.5mm; height: 11.5mm; }
@media (max-width: 640px) { .mini .row { font-size: 13px; } .mini .row i { width: 26px; height: 18px; } }
/* トップの10種類は 5×2 で端数を出さない */
@media (min-width: 1100px) { .home #types .tgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .home #types .tcard { flex-direction: column; text-align: center; padding: 18px 12px; } }
.mini { width: 268px; }
@media (max-width: 640px) { .mini { width: 200px; } }
@media (min-width: 1100px) { .home #types .tcard b { font-size: 17px; } }
