/* 最初の仮サイトの色味：クリーム × オレンジ */
:root {
  --ink: #2b2a33;
  --ink-2: #4a4856;
  --muted: #6b6878;
  --line: #ece5d8;
  --bg: #fffaf2;
  --surface: #ffffff;
  --white: #ffffff;
  --blue: #ff8a3d;          /* メインカラー（オレンジ） */
  --blue-dark: #e26d1f;
  --blue-soft: #fff0e2;
  --accent-text: #c2560f;   /* オレンジ系の文字色（白背景で読みやすい濃さ） */
  --red: #e5484d;
  --green: #2f9e6e;
  --lv1: #f5a15f; --lv2: #ff8a3d; --lv3: #d9631a; --lv4: #a4450c;
  --radius: 16px;
  --shadow: 0 2px 0 rgba(0, 0, 0, .04), 0 8px 24px rgba(60, 40, 0, .06);
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-weight: 500; color: var(--ink); background: var(--bg); line-height: 1.8; }
a { color: var(--accent-text); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.4; font-weight: 900; letter-spacing: .01em; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 32px); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px; z-index: 99; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.05rem; color: var(--ink-2); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; color: var(--accent-text); margin: 0 0 8px; }
.section { padding: 56px 0; }
.section-tint { background: var(--white); border-block: 1px solid var(--line); }
.section-title { font-size: 1.45rem; margin: 0 0 20px; }
.section-lead { color: var(--ink-2); margin: -8px 0 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 16px 20px; }
.notice { background: #FFF7E8; border: 1px solid #F0D9A8; border-radius: 10px; padding: 12px 16px; font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 10px; border: 1.5px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-dark); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--accent-text); }
.btn.disabled { opacity: .5; pointer-events: none; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #ffc79e; outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; }
.nav a:hover, .nav a[aria-current] { color: var(--accent-text); }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }
@media (max-width: 1180px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 4px 16px 12px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0; overflow: hidden; border-bottom: 1px solid var(--line); background:
  radial-gradient(circle at 8% 18%, #ffe3c9 0 90px, transparent 91px),
  radial-gradient(circle at 94% 26%, #d8ecff 0 120px, transparent 121px),
  radial-gradient(circle at 78% 96%, #dff5e8 0 70px, transparent 71px), var(--bg); }
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); margin: 0 0 16px; }
.hero h1 em { font-style: normal; color: var(--blue-dark); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-visual { position: relative; height: 340px; }
.hero-visual .sheet-mock { position: absolute; width: 230px; height: 310px; }
.sheet-a { left: 4%; top: 10px; transform: rotate(-4deg); }
.sheet-b { left: 40%; top: 24px; transform: rotate(4deg); border-top: 5px solid var(--red) !important; }
@media (max-width: 800px) { .hero-inner { grid-template-columns: 1fr; } .hero-visual { display: none; } .hero { padding: 40px 0; } }

.sheet-mock { background: #fff; border: 1px solid var(--line); border-top: 5px solid #3e7bfa; border-radius: 6px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.sheet-mock b { font-size: .9rem; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.sheet-mock em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--red); }
.sheet-mock i { display: block; height: 9px; border-radius: 5px; background: #f1ece3; }
.sheet-mock i:nth-of-type(even) { width: 72%; }
.sheet-large { position: static; width: 100%; max-width: 520px; aspect-ratio: 210/297; margin: 0 auto; gap: 18px; padding: 8% 9%; }
.sheet-large b { font-size: 1.1rem; }
.mock-fields { font-size: .75rem; color: var(--muted); text-align: right; border-bottom: 1px solid var(--line); }
.mock-note { margin-top: auto; text-align: center; font-size: .8rem; color: var(--muted); }

/* ---------- Features ---------- */
.features, .feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.features { margin-top: 36px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature h2 { font-size: 1.1rem; margin: 6px 0 6px; }
.feature p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.feature-num { font-family: Inter, var(--font); font-weight: 700; color: var(--accent-text); font-size: .85rem; letter-spacing: .1em; }
@media (max-width: 800px) { .features, .feature-list { grid-template-columns: 1fr; } .features { margin-top: 24px; } }

/* ---------- Grades ---------- */
.grade-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.grade-tile { display: flex; flex-direction: column; align-items: center; padding: 18px 8px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: .85rem; transition: border-color .15s, transform .15s; }
.grade-tile:hover { border-color: var(--gc, var(--blue)); transform: translateY(-2px); }
.grade-tile { border-bottom: 5px solid var(--gc); }
.grade-tile.g1 { --gc: #ff6b6b; } .grade-tile.g2 { --gc: #ff9f43; } .grade-tile.g3 { --gc: #e0b400; } .grade-tile.g4 { --gc: #2fb67c; } .grade-tile.g5 { --gc: #3e7bfa; } .grade-tile.g6 { --gc: #8e4ec6; }
.grade-tile strong { font-size: 2.4rem; line-height: 1.1; color: var(--gc, var(--blue)); font-family: Inter, var(--font); }
.grade-tile small { margin-top: 6px; color: var(--muted); }
@media (max-width: 700px) { .grade-grid { grid-template-columns: repeat(3, 1fr); } }

.level-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.level-steps li { background: var(--c); color: #fff; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.level-steps .lv1 { --c: var(--lv1); min-height: 110px; }
.level-steps .lv2 { --c: var(--lv2); min-height: 140px; }
.level-steps .lv3 { --c: var(--lv3); min-height: 170px; }
.level-steps .lv4 { --c: var(--lv4); min-height: 200px; }
.level-steps .lv-num { font-family: Inter, var(--font); font-weight: 700; opacity: .7; }
.level-steps strong { font-size: 1.15rem; margin-top: auto; }
.level-steps small { opacity: .85; }
@media (max-width: 700px) { .level-steps { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.card h3 { font-size: 1.02rem; margin: 10px 0 2px; }
.card-unit { margin: 0 0 12px; color: var(--muted); font-size: .85rem; }
.card-top { display: flex; gap: 6px; flex-wrap: wrap; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-tag { font-size: .72rem; color: var(--green); font-weight: 700; }
.chip { font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); border: 1px solid color-mix(in srgb, var(--c) 25%, white); }
.chip-plain { --c: var(--ink-2); }
.chip-hoshuko { --c: var(--green); }

.stairs { display: inline-flex; align-items: flex-end; gap: 2px; font-size: .75rem; }
.stairs i { width: 7px; background: #eadfce; border-radius: 2px; }
.stairs i:nth-child(1) { height: 6px; } .stairs i:nth-child(2) { height: 10px; } .stairs i:nth-child(3) { height: 14px; } .stairs i:nth-child(4) { height: 18px; }
.stairs i.on { background: var(--blue); }
.stairs b { margin-left: 6px; font-weight: 700; color: var(--ink-2); }

/* ---------- Grade page ---------- */
.page-head { padding: 12px 0 20px; }
.page-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 8px; }
.breadcrumb { font-size: .82rem; color: var(--muted); padding: 18px 0 4px; }
.breadcrumb a { color: var(--muted); }
.grade-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.grade-tabs a { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; }
.grade-tabs a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.subject-block { margin-bottom: 40px; scroll-margin-top: 140px; }
.subject-block:focus { outline: none; }

/* 教科タブ（算数／国語）。スクロールしてもヘッダーの下に残る */
.subject-tabs { position: sticky; top: 64px; z-index: 10; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px 0; margin-bottom: 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.subject-tab { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.subject-tab:hover { border-color: var(--c); }
.subject-tab-label { font-size: 1.15rem; font-weight: 900; }
.subject-tab-count { font-size: .8rem; font-weight: 700; color: var(--muted); }
.subject-tab[aria-current="page"] { background: var(--c); border-color: var(--c); color: #fff; }
.subject-tab[aria-current="page"] .subject-tab-count { color: rgba(255, 255, 255, .85); }
/* タブが動いているときは、パネル内の教科見出しはタブと重複するので隠す（読み上げには残す） */
.subject-title { font-size: 1.3rem; padding-left: 12px; border-left: 6px solid var(--c); margin: 0 0 16px; }
.unit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.unit h3 { margin: 0 0 12px; font-size: 1.05rem; }
.stair-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: end; }
.stair-cell { display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; border-radius: 10px; background: var(--c); color: #fff; text-decoration: none; font-size: .85rem; line-height: 1.5; order: var(--o); }
.stair-cell.lv1 { --c: var(--lv1); --o: 1; min-height: 70px; }
.stair-cell.lv2 { --c: var(--lv2); --o: 2; min-height: 90px; }
.stair-cell.lv3 { --c: var(--lv3); --o: 3; min-height: 110px; }
.stair-cell.lv4 { --c: var(--lv4); --o: 4; min-height: 130px; }
.stair-cell:hover { filter: brightness(1.12); }
.stair-empty { background: repeating-linear-gradient(45deg, #fbf6ec, #fbf6ec 6px, #f4ecde 6px, #f4ecde 12px); color: var(--muted); }
.lv-label { font-weight: 900; font-size: .78rem; opacity: .85; }
.stair-title { font-weight: 700; }
.stair-col { display: flex; flex-direction: column; gap: 6px; }
.stair-col.lv1 { order: 1; } .stair-col.lv2 { order: 2; } .stair-col.lv3 { order: 3; } .stair-col.lv4 { order: 4; }
.stair-col .stair-cell { min-height: 0; }
.stair-steps { flex-wrap: wrap; }
@media (max-width: 700px) { .stair-row { grid-template-columns: 1fr 1fr; } .stair-cell { min-height: 76px !important; } }

/* ---------- Detail ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; padding-top: 8px; }
.detail-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-title { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 10px 0 6px; }
.unit-stairs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 24px; }
.unit-stairs-label { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.stair-steps { display: flex; align-items: flex-end; gap: 4px; }
.stair-step { padding: 6px 12px; border-radius: 8px 8px 0 0; background: #f3ebdd; color: var(--ink-2); font-size: .8rem; font-weight: 700; text-decoration: none; }
.stair-step.lv1 { padding-top: 6px; } .stair-step.lv2 { padding-top: 12px; } .stair-step.lv3 { padding-top: 18px; } .stair-step.lv4 { padding-top: 24px; }
.stair-step.current { background: var(--blue); color: #fff; }
.stair-step:hover:not(.current) { background: var(--blue-soft); color: var(--accent-text); }
.preview { background: #f3ebdd; border-radius: var(--radius); padding: 28px; }
.guide { margin-top: 28px; background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--red); border-radius: var(--radius); padding: 22px 24px; }
.guide h2 { margin: 0 0 14px; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.guide-badge { font-size: .72rem; background: var(--red); color: #fff; padding: 2px 10px; border-radius: 999px; }
.guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.guide h3 { font-size: .95rem; margin: 0 0 6px; color: var(--ink-2); }
.guide .guide-notes { margin-top: 18px; }
.guide ul { margin: 0; padding-left: 1.2em; }
.guide li { margin-bottom: 6px; }
.guide .talk { list-style: none; padding: 0; }
.guide .talk li { background: var(--blue-soft); border-radius: 12px 12px 12px 2px; padding: 8px 12px; }
.detail-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.dl-box, .side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.dl-box h2 { font-size: 1.05rem; margin: 0 0 12px; }
.dl-list { display: grid; gap: 8px; margin: 12px 0; }
.dl-icon { font-weight: 900; color: var(--accent-text); }
.paper-toggle { display: grid; grid-template-columns: 1fr 1fr; background: #f3ebdd; border-radius: 10px; padding: 3px; }
.paper-toggle button { font: inherit; font-weight: 700; border: 0; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.paper-toggle button[aria-pressed="true"] { background: var(--white); color: var(--accent-text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.paper-hint { margin: 6px 0 0; }
.side-card h3 { font-size: .95rem; margin: 0 0 4px; }
.side-card p { margin: 0 0 8px; }
.side-card a { font-weight: 700; font-size: .9rem; text-decoration: none; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } .detail-side { position: static; } .guide-cols { grid-template-columns: 1fr; } .preview { padding: 16px; } }

/* ---------- Bands ---------- */
.split-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; background: var(--ink); color: #fff; border-radius: 20px; padding: 40px; }
.split-band h2 { margin: 0 0 10px; font-size: 1.5rem; }
.split-band p { color: #d9d4cb; }
.split-band .eyebrow { color: #ffb27a; }
.week-mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.week-mini li { background: #3d3c47; border-radius: 10px; padding: 10px; text-align: center; font-size: .85rem; color: #d9d4cb; }
.week-mini li:first-child { background: var(--blue); color: #fff; }
.week-mini b { display: block; font-size: 1.1rem; color: #fff; }
@media (max-width: 800px) { .split-band { grid-template-columns: 1fr; padding: 28px 22px; } }

.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; background: var(--blue-soft); border-radius: 20px; padding: 32px; margin: 32px 0; }
.newsletter h2 { margin: 0 0 4px; font-size: 1.2rem; }
.newsletter p { margin: 0; color: var(--ink-2); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter-form input { flex: 1 1 200px; font: inherit; padding: 12px 14px; border: 1.5px solid #ffd3b0; border-radius: 10px; background: #fff; }
.form-msg { flex-basis: 100%; font-size: .85rem; color: var(--red); margin: 0; }
@media (max-width: 800px) { .newsletter { grid-template-columns: 1fr; padding: 24px 20px; } }

/* ---------- Ads（控えめに1枠） ---------- */
.ad { margin: 32px auto; max-width: 728px; }
.ad-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 90px; border: 2px dashed #d8d2c6; border-radius: 10px; color: #a39d90; background: repeating-linear-gradient(45deg, #fbf8f2, #fbf8f2 10px, #f6f2ea 10px, #f6f2ea 20px); text-align: center; padding: 8px; }
.ad-placeholder span { font-size: .75rem; font-weight: 700; letter-spacing: .12em; }
.ad-placeholder small { font-size: .72rem; }

/* ---------- Tables / week ---------- */
.table-wrap { overflow-x: auto; }
.week-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.week-table th, .week-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.week-table thead th { background: var(--ink); color: #fff; font-size: .85rem; }
.week-table tbody th { width: 60px; color: var(--accent-text); }
.week-table tbody tr:first-child { background: var(--blue-soft); }

/* ---------- Shop ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-cover { background: var(--ink); color: #fff; padding: 28px 22px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.product-cover span { font-size: .75rem; color: #ffb27a; font-weight: 700; }
.product-cover b { font-size: 1.05rem; line-height: 1.5; }
.product-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { margin: 0 0 6px; font-size: 1rem; }
.product-body p { margin: 0 0 12px; color: var(--ink-2); font-size: .9rem; }
.product-foot { margin-top: auto; display: grid; gap: 8px; }
.product-body .price { margin-top: 0; font-size: 1.5rem; font-weight: 900; color: var(--ink); }
.product-body .price small { font-size: .8rem; color: var(--muted); }

/* ---------- Prose ---------- */
.prose { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); margin-bottom: 48px; }
.prose h2 { font-size: 1.15rem; margin: 1.8em 0 .6em; padding-left: 10px; border-left: 4px solid var(--blue); }
.prose h2:first-child { margin-top: 0; }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: #fbf6ec; width: 30%; }
.prose td ul { margin: 0; padding-left: 1.2em; }
.cta-row { text-align: center; margin-top: 28px; }
.lang-switch { margin: 8px 0 0; font-size: .9rem; }
.pr-note { display: inline-block; font-size: .8rem; font-weight: 700; background: #fbf6ec; border-radius: 6px; padding: 2px 10px; margin: 0 0 12px; }
.profile { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--blue-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; }
.profile-name { font-size: 1.2rem; font-weight: 900; margin: 0; }
.profile p { margin: 0; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form input, .form select, .form textarea { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); }
.form .btn { justify-self: start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d9d4cb; margin-top: 56px; padding: 48px 0 20px; }
.logo-footer { color: #fff; }
.logo-footer .logo-mark { background: var(--blue); }
.footer-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-links h3 { color: #fff; font-size: .85rem; margin: 0 0 8px; }
.footer-links a { display: block; color: #d9d4cb; text-decoration: none; font-size: .85rem; padding: 3px 0; }
.footer-links a:hover { color: #fff; }
.copyright { text-align: center; font-size: .78rem; color: #8e8b99; margin: 40px 0 0; }
@media (max-width: 800px) { .footer-inner, .footer-links { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- 50音表から選ぶ単元（ひらがなれんしゅう） ---------- */
/* 5行×10列。縦に「あいうえお」、列は本物の50音表と同じく右から左へ（あ行が右端） */
.unit-hint { margin: -4px 0 14px; font-size: .88rem; color: var(--muted); }
.kana-table { --cell: 52px; --gap: 6px; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: var(--gap); }
.kana-col { display: grid; grid-template-rows: repeat(5, var(--cell)); gap: var(--gap); width: var(--cell); }
.kana-cell { display: grid; place-items: center; border-radius: 10px; font-size: 1.45rem; font-weight: 700; text-decoration: none; }
a.kana-cell { background: var(--white); border: 2px solid var(--line); color: var(--ink); transition: border-color .12s, background .12s; }
a.kana-cell:hover, a.kana-cell:focus-visible { border-color: var(--blue); background: var(--blue-soft); color: var(--accent-text); }
a.kana-cell.pair { border-color: var(--blue); background: var(--blue-soft); }
a.kana-cell.current { background: var(--blue); border-color: var(--blue); color: #fff; }
.kana-none { background: repeating-linear-gradient(45deg, #fbf6ec, #fbf6ec 6px, #f4ecde 6px, #f4ecde 12px); color: #c9c1b2; }
.kana-blank { visibility: hidden; }
.kanji-table { --cell: 52px; --gap: 6px; display: grid; grid-template-columns: repeat(auto-fill, var(--cell)); grid-auto-rows: var(--cell); gap: var(--gap); }
.kanji-table .kana-cell { font-family: "YuKyokasho", "Hiragino Mincho ProN", serif; font-weight: 600; }
.unit-kana { margin: 16px 0 24px; }
.unit-kana .unit-stairs-label { display: block; margin-bottom: 8px; }
.kana-compact { --cell: 38px; --gap: 4px; }
.kanji-table.kana-compact { max-height: 260px; overflow-y: auto; padding: 2px; }
.kana-compact .kana-cell { font-size: 1.05rem; border-radius: 7px; border-width: 1.5px; }
/* スマホでも10列が1画面におさまるように、ますを画面幅から決める */
@media (max-width: 699px) {
  .kana-table, .kana-compact { --gap: 3px; --cell: min(52px, calc((100vw - 90px - 27px) / 10)); }
  .kana-cell, .kana-compact .kana-cell { font-size: 1.05rem; border-radius: 7px; border-width: 1.5px; }
}

/* ======================================================================
   さがし方（検索・単元一覧・教科の分野別・学期と月）
   ====================================================================== */
/* ---- ヘッダーの検索窓 ---- */
.header-inner { gap: 16px; }
.header-search { display: flex; align-items: center; margin-left: auto; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 14px; }
.header-search:focus-within { border-color: var(--blue); }
.header-search input { font: inherit; font-size: .88rem; border: 0; background: transparent; width: 180px; padding: 6px 0; color: var(--ink); outline: none; }
.header-search button { border: 0; background: none; cursor: pointer; font-size: .95rem; padding: 4px 8px; }
.search-icon { display: none; text-decoration: none; font-size: 1.2rem; margin-left: auto; }
.nav { flex-shrink: 0; }
@media (max-width: 1180px) { .header-search input { width: 200px; } }
@media (max-width: 640px) { .header-search { display: none; } .search-icon { display: block; } .menu-toggle { margin-left: 4px; } }

/* ---- ホーム ---- */
.hero-search { display: flex; gap: 8px; margin-top: 24px; max-width: 520px; }
.hero-search input { flex: 1; min-width: 0; font: inherit; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.hero-search input:focus { outline: none; border-color: var(--blue); }
.hero-search + .hero-cta { margin-top: 14px; }
.entry-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.entry-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1.5px solid var(--line); border-left: 6px solid var(--c); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.entry-card:hover { border-color: var(--c); }
.entry-card b { font-size: 1.1rem; }
.entry-card span { font-size: .82rem; color: var(--muted); }
@media (max-width: 700px) { .entry-cards { grid-template-columns: 1fr; } }
.month-picker { margin-bottom: 16px; }

/* ---- 月のリンク ---- */
.month-links { display: flex; flex-wrap: wrap; gap: 6px; }
.month-links a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .85rem; }
.month-links a:hover { border-color: var(--blue); }
.month-links a[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }
.month-links-label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

/* ---- 学期・分野のチップ ---- */
.chip-term { --c: #2f9e6e; }
.chip-term.t-kou { --c: #8e4ec6; }
.chip-term.t-tsu { --c: var(--ink-2); }
.chip-domain { --c: #c2560f; }
.chip-count { --c: var(--muted); }
.unit-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- 学年のトップ・単元一覧：もくじ ---- */
.toc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.toc-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.toc-col .subject-title a { color: inherit; text-decoration: none; }
.term-group + .term-group { margin-top: 14px; }
.term-label { display: inline-block; font-size: .8rem; font-weight: 900; color: var(--ink-2); margin: 0 0 6px; }
.term-label small { font-weight: 700; color: var(--muted); }
.unit-list { list-style: none; margin: 0; padding: 0; }
.unit-list a { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 7px 4px; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none; }
.unit-list a:hover .ul-name { color: var(--accent-text); text-decoration: underline; }
.ul-name { font-weight: 700; }
.ul-month { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.ul-count { font-size: .75rem; color: var(--muted); white-space: nowrap; min-width: 3em; text-align: right; }
.toc-more { display: inline-block; margin-top: 12px; font-weight: 700; font-size: .9rem; text-decoration: none; }
@media (max-width: 800px) { .toc-cols { grid-template-columns: 1fr; } }
.index-nav { display: grid; gap: 12px; margin-bottom: 8px; }
.grade-section { scroll-margin-top: 80px; }
.grade-section .section-title a { color: inherit; text-decoration: none; }

/* ---- 学年×教科ページ ---- */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.toc-title { font-size: 1rem; margin: 0 0 8px; }
.toc-term { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; align-items: start; padding: 6px 0; }
.toc-term + .toc-term { border-top: 1px dashed var(--line); }
.toc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.toc-chips a { padding: 3px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 700; }
.toc-chips a:hover { border-color: var(--blue); color: var(--accent-text); }
.unit { scroll-margin-top: 150px; }
.unit-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.unit-head h3 { margin: 0; }
.unit-head h3 a { color: var(--ink); text-decoration: none; }
.unit-head h3 a:hover { color: var(--accent-text); text-decoration: underline; }
.unit-more { display: inline-block; margin-top: 12px; font-size: .88rem; font-weight: 700; text-decoration: none; }

/* ---- 単元ページ ---- */
.page-head h1 small { font-size: .55em; color: var(--muted); margin-left: 6px; }
.page-head .unit-chips { margin-bottom: 8px; }
.unit-main { padding: 20px; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.level-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.level-list h3 { margin: 0 0 8px; }
.level-list ul { margin: 0; padding-left: 1.2em; }
.level-list li { margin-bottom: 4px; }
.flow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flow-label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.unit-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.unit-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.unit-card:hover { border-color: var(--blue); }
.uc-grade { font-size: .75rem; font-weight: 700; color: var(--accent-text); }
.uc-meta { font-size: .78rem; color: var(--muted); }
.unit-link { font-size: .9rem; margin: -4px 0 0; }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr; } }

/* ---- 教科ページ（分野別）・今月の単元 ---- */
.domain-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.domain-title { font-size: 1.15rem; margin: 0 0 10px; padding-left: 10px; border-left: 5px solid var(--c); }
.dom-row { display: grid; grid-template-columns: 3em 1fr; gap: 10px; align-items: start; padding: 8px 0; }
.dom-row + .dom-row { border-top: 1px dashed var(--line); }
.dom-grade { font-weight: 900; color: var(--ink-2); padding-top: 4px; }
.dom-units { display: flex; flex-wrap: wrap; gap: 6px; }
.dom-units a { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; }
.dom-units a:hover { border-color: var(--blue); color: var(--accent-text); }
.dom-units small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.dom-units em { font-style: normal; font-size: .7rem; font-weight: 900; padding: 0 6px; border-radius: 6px; color: #fff; }
.subj-sansu { background: #3e7bfa; }
.subj-kokugo { background: #e5484d; }
.this-month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; }

/* ---- 検索ページ ---- */
.search-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.search-main { display: flex; gap: 8px; }
.search-main input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.search-main input:focus { outline: none; border-color: var(--blue); }
.search-filters { display: grid; grid-template-columns: repeat(6, auto); gap: 10px; margin-top: 12px; align-items: end; }
.search-filters label { display: grid; gap: 2px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.search-filters select { font: inherit; font-size: .9rem; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.search-filters .check { display: flex; gap: 6px; align-items: center; font-size: .88rem; color: var(--ink); padding-bottom: 6px; }
@media (max-width: 900px) { .search-filters { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .search-filters { grid-template-columns: repeat(2, 1fr); } }
.search-summary { font-weight: 700; margin: 12px 0; }
.search-results { display: grid; gap: 12px; margin-bottom: 40px; }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.result-title { font-size: 1.1rem; font-weight: 900; color: var(--ink); text-decoration: none; }
.result-title:hover { color: var(--accent-text); text-decoration: underline; }
.result-meta { font-size: .8rem; color: var(--muted); }
.result-prints { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 16px; }
.result-prints a { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; color: var(--ink); text-decoration: none; font-size: .9rem; }
.result-prints a:hover { color: var(--accent-text); text-decoration: underline; }
.result-prints .lv { flex: none; font-size: .68rem; font-weight: 900; padding: 1px 6px; border-radius: 6px; color: #fff; background: var(--lv2); }
.result-prints .lv1 { background: var(--lv1); } .result-prints .lv3 { background: var(--lv3); } .result-prints .lv4 { background: var(--lv4); }
.result-more { display: inline-block; margin-top: 6px; font-size: .85rem; font-weight: 700; text-decoration: none; }
.search-hint { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.search-hint h2 { font-size: 1rem; margin: 0 0 8px; }
.search-hint .toc-chips { margin-bottom: 16px; }

/* ---- トップ：サイトの概要（特長・4段階）を上にまとめる ---- */
.intro-steps { padding: 36px 0 8px; }
.intro-steps .level-steps .lv1 { min-height: 84px; }
.intro-steps .level-steps .lv2 { min-height: 104px; }
.intro-steps .level-steps .lv3 { min-height: 124px; }
.intro-steps .level-steps .lv4 { min-height: 144px; }
.intro-steps + #grades { padding-top: 32px; }

/* ======================================================================
   スマホで見切れる・折り返しすぎる所の調整（〜700px）
   ====================================================================== */
@media (max-width: 700px) {
  /* 学年ページ・単元ページの「階段」：基礎の列と標準の列が上下にずれない／文字が窮屈にならない */
  .stair-row { align-items: start; gap: 8px; }
  .stair-row > .stair-cell { min-height: 72px !important; }
  .stair-col { gap: 6px; }
  .stair-col .stair-cell { min-height: 56px !important; }
  .stair-cell { padding: 9px 10px; font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
  .stair-title { word-break: normal; }

  /* プリントのページ上部の階段ナビ：段違いにせず、同じ高さのボタンを折り返して並べる */
  .stair-steps { align-items: stretch; gap: 6px; }
  .stair-step, .stair-step.lv1, .stair-step.lv2, .stair-step.lv3, .stair-step.lv4 {
    padding: 8px 12px; border-radius: 8px; display: flex; align-items: center; min-height: 38px;
  }

  /* 規約・特商法などの表：見出し（th）を上、中身（td）を下に積んで、1文字ずつの折り返しをなくす */
  .prose table, .prose tbody, .prose tr, .prose th, .prose td { display: block; width: 100%; }
  .prose tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
  .prose th, .prose td { border: 0; }
  .prose th { padding: 6px 12px; font-size: .82rem; }
  .prose td { padding: 8px 12px 10px; }

  /* 海外ページの1週間の表：「目安」「10分」を折り返さない */
  .week-table th, .week-table td { padding: 10px 10px; }
  .week-table th, .week-table td:last-child { white-space: nowrap; }
  .week-table tbody th { width: auto; }
}

/* 漢字の表（プリントのページ）：スマホでは「折りたたみ」にして、箱の中スクロールをやめる */
.kana-details > summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--ink-2); padding: 6px 0; list-style: none; }
.kana-details > summary::-webkit-details-marker { display: none; }
.kana-details > summary::after { content: "▼"; font-size: .7em; margin-left: 8px; color: var(--muted); }
.kana-details[open] > summary::after { content: "▲"; }
.kana-details .unit-stairs-label { display: none; }
@media (min-width: 701px) {
  .kana-details > summary { cursor: default; pointer-events: none; }
  .kana-details > summary::after { content: ""; }
}
@media (max-width: 700px) {
  .kana-details .kanji-table.kana-compact { max-height: none; overflow: visible; --cell: 34px; --gap: 4px; }
}

/* ======================================================================
   項目別（計算・漢字・読解 など）
   ====================================================================== */
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--c) 35%, white); color: var(--ink); text-decoration: none; font-weight: 900; font-size: .95rem; }
.topic-chip small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.topic-chip:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, white); }
.topic-chip[aria-current="page"] { background: var(--c); border-color: var(--c); color: #fff; }
.topic-chip[aria-current="page"] small { color: rgba(255, 255, 255, .85); }
.topic-groups { display: grid; gap: 12px; margin-bottom: 20px; }
.topic-group { display: grid; grid-template-columns: 4em 1fr; gap: 10px; align-items: start; }
.topic-group-label { display: inline-block; text-align: center; font-weight: 900; font-size: .85rem; color: #fff; background: var(--c); border-radius: 8px; padding: 6px 0; }
.topic-home-title { margin-top: 36px; }
.topic-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 16px; }
.topic-switch-label { font-size: .8rem; font-weight: 700; color: var(--muted); flex: none; }
.quick-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }

.topic-section { margin-bottom: 28px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.topic-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1.5px solid var(--line); border-top: 5px solid var(--c); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.topic-card:hover { border-color: var(--c); box-shadow: var(--shadow); }
.topic-card b { font-size: 1.15rem; }
.tc-blurb { font-size: .85rem; color: var(--ink-2); line-height: 1.6; }
.tc-meta { margin-top: auto; padding-top: 6px; font-size: .78rem; font-weight: 700; color: var(--muted); }

.topic-grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; margin-bottom: 24px; }
.topic-grade-grid .toc-col { scroll-margin-top: 80px; }
.topic-grade-grid .subject-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.topic-grade-grid .subject-title small { font-size: .75rem; font-weight: 700; color: var(--muted); }
.unit-topics { margin: 4px 0 0; font-size: .9rem; }
.unit-topics a { font-weight: 700; }
@media (max-width: 700px) {
  .topic-grade-grid { grid-template-columns: 1fr; }
  .topic-group { grid-template-columns: 1fr; gap: 6px; }
  .topic-group-label { justify-self: start; padding: 4px 14px; }
}

/* ======================================================================
   お知らせ・ブログ
   ====================================================================== */
.news-list { list-style: none; margin: 0 0 24px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.news-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 14px 18px; border-bottom: 1px dashed var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item time { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.news-item a { flex: 1 1 260px; font-weight: 700; color: var(--ink); text-decoration: none; }
.news-item a:hover { color: var(--accent-text); text-decoration: underline; }
.chip-pin { --c: var(--red); }
.home-posts { padding-top: 20px; padding-bottom: 20px; }
.home-posts .section-head { margin-bottom: 4px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 24px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; }
.post-card:hover { border-color: var(--c); box-shadow: var(--shadow); }
.post-thumb { aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--c) 14%, white); display: grid; place-items: center; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb-ph { font-weight: 900; color: var(--c); font-size: 1.1rem; }
.post-card-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.post-card-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.post-card-body p { margin: 0; font-size: .88rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; color: var(--muted); }
.blog-cats { margin-bottom: 20px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.pager a { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; }
.pager a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 記事ページ */
.post-head h1 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 8px 0 18px; line-height: 1.45; }
.post-hero { margin: 0 0 20px; }
.post-hero img { width: 100%; border-radius: var(--radius); }
.post-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); font-size: 1.02rem; line-height: 1.95; overflow-wrap: anywhere; }
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body h2 { font-size: 1.35rem; margin: 2em 0 .6em; padding-bottom: .3em; border-bottom: 3px solid var(--line); }
.post-body h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; padding-left: 10px; border-left: 5px solid var(--blue); }
.post-body h4 { font-size: 1rem; margin: 1.5em 0 .4em; }
.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body li { margin: .3em 0; }
.post-body blockquote { margin: 1.2em 0; padding: 6px 18px; background: var(--bg); border-left: 5px solid var(--lv1); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; }
.post-body figure { margin: 1.4em 0; text-align: center; }
.post-body figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.post-body hr { border: 0; border-top: 2px dashed var(--line); margin: 2em 0; }
.post-body pre { background: #2b2a33; color: #f4f1ea; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: .85rem; line-height: 1.6; }
.post-body code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.post-body pre code { background: none; padding: 0; }
.table-scroll { overflow-x: auto; margin: 1.2em 0; }
.post-body table { border-collapse: collapse; min-width: 100%; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.post-body th { background: #fbf6ec; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.post-nav a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 700; }
.post-nav a:hover { border-color: var(--blue); }
.post-nav a.next { text-align: right; }
.post-nav small { font-size: .75rem; color: var(--muted); font-weight: 700; }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav a.next { text-align: left; } }

/* ======================================================================
   広告（Google アドセンス）：ラベル・高さの確保・空のときは畳む
   ====================================================================== */
.ad { position: relative; }
.ad-label { display: block; text-align: center; font-size: .68rem; letter-spacing: .15em; color: var(--muted); margin-bottom: 4px; }
.ad ins.adsbygoogle { min-height: 100px; }                                   /* 読み込み時にページがずれないよう、高さを確保 */
.ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }       /* 広告が入らなかったら、枠ごと畳む */
.ad { margin: 36px auto; }                                                   /* ボタンやリンクから十分に離す（誤クリック防止） */
.grid-ad { grid-column: 1 / -1; }
.grid-ad .ad { margin: 8px auto; }


/* ---- 個別指導ページ：料金・体験の枠と、申し込みの流れ ---- */
.price-box { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; margin: 0 0 24px; background: var(--surface); border: 2px solid var(--blue); border-radius: var(--radius); overflow: hidden; }
.pb-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 18px 22px; }
.pb-label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.pb-price { font-size: 2.1rem; font-weight: 900; line-height: 1.2; }
.pb-price small { font-size: .85rem; font-weight: 700; color: var(--muted); margin-left: 2px; }
.pb-note { font-size: .95rem; font-weight: 900; color: var(--accent-text); }
.pb-trial { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 18px 22px; background: var(--blue-soft); }
.pb-trial b { font-size: 1.05rem; color: var(--accent-text); }
.pb-trial span { font-size: .88rem; color: var(--ink-2); }
@media (max-width: 640px) { .price-box { grid-template-columns: 1fr; } }
.flow-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.flow-steps li { counter-increment: step; position: relative; display: flex; flex-direction: column; gap: 2px; padding: 4px 0 4px 48px; }
.flow-steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 900; display: grid; place-items: center; }
.flow-steps b { font-size: 1.02rem; }
.flow-steps span { font-size: .92rem; color: var(--ink-2); }

/* ---- フォーム：迷惑投稿よけの見えない欄／送信結果の色 ---- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg.ok { color: var(--green); font-weight: 700; }

/* ---- 「きりんドリルについて」：長い文章の読みやすさ ---- */
.prose h3 { font-size: 1.05rem; margin: 1.8em 0 .5em; padding-left: 10px; border-left: 4px solid var(--lv1); }
.prose p { line-height: 1.95; }
.prose blockquote { margin: 1em 0; padding: 4px 18px; background: var(--bg); border-left: 5px solid var(--lv1); border-radius: 0 10px 10px 0; color: var(--ink-2); font-weight: 700; }
.prose blockquote p { margin: .5em 0; }
