/* こそだてくらべ まなび — 方眼ノートと積み木
   トークンの正本は manabi/DESIGN.md。色・角丸・影はここの :root だけで定義する。
   たて・よこ・高さの3色は Okabe–Ito の色覚配慮パレットから選び、3D の軸・式・ラベルで同じ意味に使う。 */
:root {
  --paper: #FBF8F1;
  --panel: #FFFFFF;
  --ink: #1D2433;
  --ink-soft: #596172;
  --grid: #E3DDCC;
  --tate: #0072B2;
  --yoko: #D55E00;
  --takasa: #009E73;
  --wood: #E9C68D;
  --wood-light: #F3DDB4;
  --wood-dark: #DDB271;
  --wood-edge: #A87A3F;
  /* 図解の色（理科・社会の図解アニメの絵だけに使う。たて・よこ・高さの3色とは別） */
  --fig-sky: #DCEEF7;
  --fig-water: #7DB9DE;
  --fig-water-deep: #3F86B8;
  --fig-leaf: #8CC269;
  --fig-leaf-dark: #4F8A3A;
  --fig-soil: #C49A6C;
  --fig-soil-dark: #8E6B45;
  --fig-fire: #F4A340;
  --fig-red: #D9483B;
  --fig-metal: #B9C1CB;
  --fig-metal-dark: #7F8894;
  --fig-skin: #F7D7B8;
  --fig-light: #FFE36E;
  --fig-night: #2E3A57;
  --fig-rose: #F2B8B5;
  --fig-plastic: #C9E3F0;
  --fig-glass: #E6F3F8;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-pill: 999px;
  /* 影は「積み木の底」: ぼかさず真下へずらした墨の面だけ */
  --lift: 0 5px 0 var(--ink);
  --lift-hover: 0 7px 0 var(--ink);
  --lift-press: 0 1px 0 var(--ink);
  --t: 160ms cubic-bezier(.3, .7, .4, 1);

  --font-head: "Zen Maru Gothic", "BIZ UDPGothic", sans-serif;
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.m-body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(color-mix(in srgb, var(--grid) 55%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--grid) 55%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  word-break: auto-phrase;
  font-variant-numeric: tabular-nums;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--tate); text-underline-offset: .2em; text-decoration-thickness: 1.5px; transition: color var(--t); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 900; line-height: 1.3; margin: 0; text-wrap: balance; }
p { margin: 0; }

.m-wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: 20px; }
.m-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m-skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--radius-s); transition: top var(--t); }
.m-skip:focus-visible { top: 12px; }

/* ヘッダは全ページ共通（templates/_header.html・site/assets/site-header.css） */

/* パンくず */
.m-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; padding: 20px 0 0; margin: 0; font-size: 14px; color: var(--ink-soft); }
.m-crumbs li + li::before { content: "›"; margin: 0 10px; color: var(--ink-soft); }
.m-crumbs a { color: var(--ink-soft); }
.m-crumbs a:hover { color: var(--ink); }

/* 単元の表紙 */
.m-hero { padding: 28px 0 104px; }
.m-hero__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.m-hero__text { padding-top: 24px; }
.m-chip { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--radius-pill); overflow: hidden; font-weight: 700; font-size: 14px; line-height: 1; }
.m-chip span { padding: 8px 12px; }
.m-chip__grade { background: var(--ink); color: var(--paper); }
.m-chip__subject { background: var(--wood); }
.m-hero__title { font-size: clamp(56px, 7vw, 88px); letter-spacing: .04em; margin-top: 24px; }
.m-hero__sub { display: block; font-size: clamp(20px, 2vw, 24px); letter-spacing: .08em; margin-top: 8px; color: var(--ink-soft); font-weight: 700; }
.m-hero__lead { margin-top: 24px; font-size: 19px; line-height: 1.8; }
.m-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 28px; margin: 36px 0 0; }
.m-facts div { border-top: 2px solid var(--ink); padding-top: 10px; }
.m-facts dt { font-size: 13px; color: var(--ink-soft); }
.m-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; }
.m-facts small { font-weight: 400; font-size: 13px; color: var(--ink-soft); }
/* 公開日・更新日。数字の欄（m-facts）の下に小さく添える */
.m-dates { margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }
.m-dates__sep { margin: 0 .4em; }

/* 再生画面（16:9）。文字は画面幅に比例（cqw）させ、動画書き出しと同じ見た目にする */
.m-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-m);
  background: var(--paper);
  box-shadow: var(--lift);
  overflow: hidden;
}
.m-stage { position: relative; }
.m-screen .m-stage { position: absolute; inset: 0; }
.m-stage canvas { width: 100%; height: 100%; touch-action: none; }
.m-stage__overlay { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-head); }
.m-stage__overlay [hidden] { display: none !important; }
/* 図解アニメ（kind: anim）: 方眼の上に SVG の絵を描く。時刻だけで絵が決まるよう、transition・animation は使わない */
.m-stage--anim {
  background-color: var(--paper);
  background-image:
    linear-gradient(color-mix(in srgb, var(--grid) 70%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--grid) 70%, transparent) 1px, transparent 1px);
  background-size: 3.125cqw 3.125cqw;
  background-position: center;
}
.an-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.an-svg, .an-svg * { transition: none !important; animation: none !important; }
.an-t--head { font-family: var(--font-head); }
.an-t--body { font-family: var(--font-body); }
.m-screen__chapter {
  position: absolute; left: 2.4cqw; top: 2.2cqw;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-head); font-weight: 700; font-size: 1.9cqw; line-height: 1;
  padding: 1cqw 1.6cqw; border-radius: var(--radius-pill);
}
.m-screen__chapter:empty { display: none; }
.m-screen__caption {
  position: absolute; left: 4cqw; right: 4cqw; bottom: 2.6cqw;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 2px solid var(--ink); border-radius: 1.4cqw;
  padding: 1.2cqw 2.4cqw;
  font-family: var(--font-head); font-weight: 700; font-size: 2.9cqw; line-height: 1.45;
  text-align: center; text-wrap: balance;
  /* 字幕は文節ごとに空白を入れて書くので、空白と句読点でだけ折り返す（長すぎる語だけは途中で折る） */
  word-break: keep-all; overflow-wrap: anywhere;
}
.m-screen__caption:empty { display: none; }

.stage-tag { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: .5em; white-space: nowrap; font-size: 2.4cqw; }
.stage-tag__name {
  /* 1〜2字は丸、3字以上は横に伸びる小判形（「あまり」などが欠けない） */
  display: grid; place-items: center; min-width: 2.1em; height: 2.1em; padding: 0 .5em; box-sizing: border-box; border-radius: 1.05em;
  background: var(--ink); color: var(--paper); font-weight: 900; font-size: 1.15em; line-height: 1;
}
.stage-tag__count, .stage-tag__value {
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-pill);
  padding: .25em .8em; font-weight: 900; font-size: 1.2em; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.stage-tag small { font-size: .7em; margin-left: .15em; }
.stage-tag__value.is-bigger { background: var(--wood); box-shadow: 0 .18em 0 var(--ink); }
.stage-tag--unit { font-size: 3.2cqw; }
.stage-dim {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-radius: var(--radius-pill); padding: .2em .7em;
  font-size: 2.2cqw; font-weight: 700; line-height: 1.3; color: var(--ink);
}
.stage-dim b { font-weight: 900; margin-right: .2em; }
.stage-dim--tate b { color: var(--tate); }
.stage-dim--yoko b { color: var(--yoko); }
.stage-dim--takasa b { color: var(--takasa); }
.stage-dim--plain b { color: var(--ink-soft); }
.stage-dim--return { background: var(--panel); border: 2px solid var(--ink); font-size: 1.8cqw; }
.stage-dim--prop { font-size: 1.9cqw; transform: translate(-50%, -100%); white-space: pre-line; text-align: center; line-height: 1.25; }
/* 文字のタイル（メールアドレスの部分） */
.stage-tile {
  /* 2行に折ったタイルは改行（\n）で行を分ける */
  position: absolute; transform: translate(-50%, -50%); white-space: pre; text-align: center;
  font-family: var(--font-body); font-weight: 700; font-size: calc(3.2cqw * var(--tile-scale, 1)); line-height: 1.25; color: var(--ink);
  letter-spacing: .02em;
}
.stage-tile--at { font-size: calc(3.8cqw * var(--tile-scale, 1)); }
.stage-slot {
  position: absolute; transform: translate(-50%, -100%); white-space: nowrap;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-pill);
  padding: .15em .6em; font-family: var(--font-body); font-weight: 700; font-size: 1.6cqw; line-height: 1.2;
}
.stage-slot.is-hit { background: var(--wood); }
/* 「a/b」だけのタイルは縦書きの分数（分子が上、横線、分母が下） */
.stage-frac { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stage-frac__num { padding: 0 .2em .06em; border-bottom: .09em solid currentColor; }
.stage-frac__den { padding: .06em .2em 0; }
/* 多角形の頂点の記号（ア・イ・ウ）。強調した頂点は青 */
.stage-vertex {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--font-head); font-weight: 900; font-size: 2.3cqw; line-height: 1; color: var(--ink);
}
.stage-vertex.is-hit { color: var(--tate); }
/* 強調した辺・頂点の名札（「辺」「頂点」） */
.stage-dim--mark { background: var(--panel); border: 2px solid var(--yoko); }
/* 時計の文字盤の数字 */
.stage-clocknum {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--font-body); font-weight: 700; font-size: 1.7cqw; line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* 筆算。方眼ノートに書いたように、位ごとの列にそろえる。強調した位の列は木の色の帯、くり上がりは小さく */
.stage-hissan {
  position: absolute; transform: translate(-50%, -50%);
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-s);
  padding: .15em .45em .25em;
  font-family: var(--font-body); font-weight: 700; font-size: calc(5cqw * var(--hs-scale, 1)); line-height: 1.15; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hs { display: grid; align-items: end; }
.hs-c { text-align: center; }
.hs-c.is-col { background: var(--wood-light); }
.hs-op { color: var(--ink-soft); }
.hs-small { font-size: .5em; line-height: 1.3; color: var(--yoko); font-weight: 900; }
.hs-line { grid-column: 1 / -1; height: 0; border-top: .08em solid var(--ink); margin: .06em 0 .1em; }
.hs-answer { color: var(--tate); }
.hs-c.is-struck { text-decoration: line-through; text-decoration-thickness: .08em; text-decoration-color: var(--yoko); }
.hs .is-hidden { visibility: hidden; }
.stage-stamp {
  position: absolute; transform: translate(-50%, -50%) rotate(-4deg); white-space: nowrap;
  background: var(--wood-light); border: 3px solid var(--ink); color: var(--ink); border-radius: .6cqw;
  padding: .35em .8em; font-weight: 900; font-size: 2.3cqw; line-height: 1.2;
}
.stage-timer {
  position: absolute; transform: translate(-50%, -50%); display: flex; gap: .9em; white-space: nowrap;
  background: var(--panel); border: 2px solid var(--ink); border-radius: 1.2cqw; padding: .5em .9em;
  font-size: 2.6cqw; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stage-timer span { display: inline-flex; flex-direction: column; align-items: flex-end; min-width: 2.6em; }
.stage-timer small { font-size: .5em; color: var(--ink-soft); font-weight: 700; }
.stage-timer span small:last-child { align-self: auto; }

/* 式。たて・よこ・高さは下線の色でも区別する */
.m-formula { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .1em .45em; font-family: var(--font-head); font-weight: 900; line-height: 1; }
.m-formula--stage {
  position: absolute; right: 2.4cqw; top: 2.2cqw; font-size: 3.4cqw;
  background: var(--panel); border: 2px solid var(--ink); border-radius: 1.4cqw; padding: 1.1cqw 1.8cqw 1.4cqw;
}
.m-formula[hidden] { display: none; }
.formula__title { flex-basis: 100%; font-size: .5em; color: var(--ink-soft); margin-bottom: .5em; font-weight: 700; }
.formula__term { display: inline-flex; flex-direction: column; align-items: center; gap: .25em; padding-bottom: .2em; border-bottom: .14em solid currentColor; min-width: 1.4em; }
.formula__term small { font-size: .42em; font-weight: 700; }
.formula__term--tate { color: var(--tate); }
.formula__term--yoko { color: var(--yoko); }
.formula__term--takasa { color: var(--takasa); }
.formula__op { color: var(--ink-soft); padding-bottom: .3em; }
.formula__result { padding-bottom: .2em; }
.formula__result small { font-size: .55em; margin-left: .1em; }

/* 再生の操作 */
.m-controls { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.m-play {
  flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: var(--wood); color: var(--ink); cursor: pointer;
  box-shadow: 0 4px 0 var(--ink); transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.m-play:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: var(--wood-light); }
.m-play:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-play__icon--pause, [data-playing="1"] .m-play__icon--play { display: none; }
[data-playing="1"] .m-play__icon--pause { display: block; }
.m-seek { flex: 1; display: flex; }
.m-time { flex: none; font-weight: 700; font-size: 15px; min-width: 7.5em; text-align: right; }
.m-fs {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-s);
  border: 2px solid var(--ink); background: var(--panel); color: var(--ink); cursor: pointer;
  transition: background-color var(--t), transform var(--t);
}
.m-fs:hover { background: var(--wood-light); transform: translateY(-1px); }
.m-fs:focus-visible, .m-play:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.m-fs__icon--exit, [data-fs="1"] .m-fs__icon--enter { display: none; }
[data-fs="1"] .m-fs__icon--exit { display: block; }

/* 全画面（Fullscreen API と、使えない端末で重ねる表示の両方）: 再生画面と操作だけを、画面に収まる 16:9 で出す */
html.m-fs-lock { overflow: hidden; }
.m-player[data-fs="1"] {
  position: fixed; inset: 0; z-index: 1000; margin: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--paper);
}
.m-player[data-fs="1"] .m-screen, .m-player[data-fs="1"] .m-controls { width: min(100%, calc((100dvh - 96px) * 16 / 9)); margin: 0 auto; }
.m-player[data-fs="1"] .m-chapters, .m-player[data-fs="1"] .m-player__file, .m-player[data-fs="1"] .m-qr { display: none !important; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0;
  --fill: var(--ink);
}
input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: var(--radius-pill); border: 2px solid var(--ink); background: linear-gradient(90deg, var(--fill) calc(var(--p, 0) * 100%), var(--panel) 0); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: var(--radius-pill); border: 2px solid var(--ink); background: var(--panel); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: var(--radius-pill); background: var(--fill); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 44px; height: 44px; margin-top: -19px; border-radius: 50%;
  background: var(--wood); border: 2.5px solid var(--ink); transition: transform var(--t);
}
input[type="range"]::-moz-range-thumb { width: 44px; height: 44px; border-radius: 50%; background: var(--wood); border: 2.5px solid var(--ink); transition: transform var(--t); }
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:hover::-moz-range-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.m-seek input { --p: var(--progress, 0); }

.m-chapters { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.m-chapters a {
  display: flex; align-items: center; gap: 8px; height: 100%;
  padding: 8px 10px; border: 2px solid var(--ink); border-radius: var(--radius-s); background: var(--panel);
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.35;
  transition: background-color var(--t), transform var(--t);
}
.m-chapters a:hover { background: var(--wood-light); transform: translateY(-1px); }
.m-chapters__no { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 12px; }
.m-chapters__time { margin-left: auto; font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.m-player__file { margin-top: 14px; font-size: 14px; }

/* 節 */
.m-section { padding: 0 0 112px; }
.m-section__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
.m-section__icon { flex: none; width: 48px; height: 48px; padding: 4px; border: 2px solid var(--ink); border-radius: var(--radius-s); background: var(--panel); }
.m-section__title { font-size: clamp(28px, 3.2vw, 38px); }
.m-section__lead { margin-top: 8px; color: var(--ink-soft); }

/* やってみよう */
/* 「やってみよう」の下の印刷プリント（PDF）への送り先 */
.m-print { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.m-print__note { color: var(--ink-soft); font-size: 15px; }
/* 保護者向けの動画（こそだての制度）: もとのガイド記事と市区町村のページへの送り先 */
.m-more { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.m-more li { background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 28px; box-shadow: var(--lift); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.m-more span { color: var(--ink-soft); line-height: 1.7; }
.m-try { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.m-try__item { background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 28px; box-shadow: var(--lift); display: flex; flex-direction: column; gap: 12px; }
.m-try__q { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.6; display: flex; gap: 12px; margin-bottom: 8px; }
.m-try__no { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 16px; margin-top: 1px; }
.m-reveal { border-top: 2px dashed var(--grid); padding-top: 10px; }
.m-reveal summary {
  cursor: pointer; font-weight: 700; list-style: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 8px; border-radius: var(--radius-pill); transition: background-color var(--t);
}
.m-reveal summary::-webkit-details-marker { display: none; }
.m-reveal summary::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: linear-gradient(var(--ink), var(--ink)) center / 8px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 8px no-repeat; transition: transform var(--t); }
.m-reveal[open] summary::before { background: linear-gradient(var(--ink), var(--ink)) center / 8px 2px no-repeat; }
.m-reveal summary:hover { background: var(--wood-light); }
.m-reveal p { margin-top: 8px; }
.m-reveal--answer summary { color: var(--yoko); }
.m-reveal--answer summary::before { border-color: var(--yoko); }
.m-try__a { font-family: var(--font-head); font-weight: 900; font-size: 22px; }

/* ことば */
.m-words { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; }
.m-words__item { background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 20px 20px 18px; }
.m-words dt { font-family: var(--font-head); font-weight: 900; font-size: 26px; }
.m-words rt { font-size: 11px; font-weight: 700; color: var(--ink-soft); letter-spacing: .08em; }
.m-words dd { margin: 10px 0 0; font-size: 15px; line-height: 1.7; }

/* おうちの方へ */
.m-parents { padding-top: 72px; border-top: 2px solid var(--ink); background: var(--panel); }
.m-parents__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
.m-parents__title { font-size: 26px; }
.m-parents__list { margin: 20px 0 0; padding-left: 1.2em; display: grid; gap: 12px; }
.m-note { font-size: 14px; line-height: 1.75; color: var(--ink-soft); border: 2px solid var(--grid); border-radius: var(--radius-m); padding: 22px 24px; display: grid; gap: 10px; align-content: start; }
.m-note__title { font-size: 16px; color: var(--ink); }
.m-note ul { margin: 0; padding-left: 1.2em; }

/* 一覧 */
/* 入口の表紙: 左に見出し・説明・近道・検索、右に「方眼ノートの上の再生画面」の絵 */
.m-index-hero { padding: 56px 0 64px; }
.m-index-hero__grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 48px; align-items: start;
  grid-template-areas: "title art" "text art";
}
.m-index-hero__title { grid-area: title; font-size: clamp(40px, 5.6vw, 72px); letter-spacing: .03em; }
/* 見出しは文節（見て、／聞いて、／わかる。）の切れ目でだけ折り返す */
.m-index-hero__title span { display: inline-block; }
.m-index-hero__text { grid-area: text; }
.m-index-hero__lead { margin-top: 24px; font-size: 19px; max-width: 34em; }
.m-index-hero__count { margin-top: 18px; font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.5; }
.m-index-hero__count b { font-weight: 900; font-size: 30px; margin: 0 .08em; }
.m-index-hero__count small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.m-index-hero__art { grid-area: art; align-self: center; justify-self: center; width: 100%; height: auto; max-width: 480px; }
.m-art-label { font-family: var(--font-head); font-weight: 900; font-size: 16px; }
.m-art-label--pill { font-size: 13px; letter-spacing: .08em; }
.m-art-label--caption { font-size: 17px; letter-spacing: .04em; }

/* 学年・テーマの近道（表紙の中のチップ） */
.m-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.m-shortcut {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 54px; padding: 0 13px;
  font-weight: 700; font-size: 16px; line-height: 1; color: var(--ink); text-decoration: none; white-space: nowrap;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-pill);
  transition: background-color var(--t), transform var(--t);
}
.m-shortcut--theme { background: var(--wood-light); }
.m-shortcut:hover { background: var(--wood-light); color: var(--ink); transform: translateY(-1px); }
.m-shortcut--theme:hover { background: var(--wood); }
.m-shortcut:active { transform: translateY(1px); }
.m-shortcut:focus-visible { border-radius: var(--radius-pill); }

/* 単元の検索（index.js が動いたときだけ出る） */
.m-search[hidden], .m-search__results[hidden], .m-search__more[hidden] { display: none; }
.m-search { margin-top: 26px; max-width: 34em; }
.m-search__label { display: block; font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.4; margin-bottom: 6px; }
.m-search__input {
  display: block; width: 100%; height: 52px; padding: 0 16px; margin: 0;
  font: inherit; font-size: 17px; color: var(--ink); -webkit-appearance: none; appearance: none;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-s);
  transition: background-color var(--t), box-shadow var(--t);
}
.m-search__input::placeholder { color: var(--ink-soft); opacity: 1; }
.m-search__input:hover { background: #FFFDF7; }
.m-search__input:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: var(--radius-s); box-shadow: 0 3px 0 var(--ink); }
.m-search__status { min-height: 1.6em; margin-top: 8px; font-size: 14px; line-height: 1.6; font-weight: 700; }
.m-search__results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.m-search__results > li { display: flex; }
.m-hit {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; color: var(--ink); text-decoration: none;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: 0 4px 0 var(--ink);
  transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.m-hit:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: #FFFDF7; color: var(--ink); }
.m-hit:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-hit .m-chip { font-size: 12px; white-space: nowrap; max-width: 100%; }
.m-hit .m-chip span { padding: 6px 10px; }
.m-hit__title { font-family: var(--font-head); font-weight: 900; font-size: 19px; line-height: 1.35; }
.m-hit__title small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); font-weight: 700; }
.m-search__more { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }

/* 入口の節の説明 */
.m-index-lead { margin: -10px 0 26px; max-width: 40em; color: var(--ink-soft); }

/* 主ボタン（木の色。押すと沈む） */
.m-btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px;
  font-family: var(--font-head); font-weight: 900; font-size: 18px; line-height: 1.2; color: var(--ink); text-decoration: none;
  background: var(--wood); border: 2.5px solid var(--ink); border-radius: var(--radius-s); box-shadow: 0 4px 0 var(--ink);
  transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.m-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: var(--wood-light); color: var(--ink); }
.m-btn:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-btn:focus-visible { border-radius: var(--radius-s); }

/* シリーズのカード（入口の「シリーズで 学ぶ」）。上に第1回の絵と説明、下に章ごとの回の一覧 */
.m-series-section { padding-bottom: 88px; }
.m-series-list { display: grid; gap: 28px; }
.m-series {
  padding: 28px; scroll-margin-top: 24px;
  background: var(--panel); border: 2.5px solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--lift);
}
.m-series__top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: center; }
.m-series__thumb { display: block; border: 2.5px solid var(--ink); border-radius: var(--radius-m); overflow: hidden; }
.m-series__thumb .m-thumb { border-bottom: 0; }
.m-series__title { font-size: clamp(28px, 3.4vw, 40px); }
.m-series__lead { margin-top: 10px; font-size: 18px; line-height: 1.75; }
.m-series__meta { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.m-series__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 22px; }
.m-series__all { font-weight: 700; color: var(--ink); }
.m-series__all:hover { color: var(--tate); }
.m-series__chapters { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-top: 28px; padding-top: 24px; border-top: 2px dashed var(--grid); }
.m-series__chapter { flex: 1 1 220px; min-width: 0; }
.m-series__chapter--wide { flex: 2 1 472px; }
.m-series__chapter-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 15px; line-height: 1; }
.m-series__chapter-title span { background: var(--ink); color: var(--paper); font-weight: 700; padding: 7px 14px; border-radius: var(--radius-pill); }
.m-series__chapter-title small { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--ink-soft); }
.m-series__episodes { list-style: none; margin: 10px 0 0; padding: 0; }
.m-series__chapter--wide .m-series__episodes { column-count: 2; column-gap: 32px; }
.m-series__episodes li { break-inside: avoid; }
.m-series__episodes a {
  display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; margin-inline: -8px;
  font-weight: 700; font-size: 16px; line-height: 1.5; color: var(--ink); text-decoration: none; border-radius: var(--radius-s);
  transition: background-color var(--t);
}
.m-series__episodes a:hover { background: var(--wood-light); color: var(--ink); }
.m-series__no {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); font-size: 12px; line-height: 1;
}
.m-series__note { margin-top: 20px; font-size: 13px; color: var(--ink-soft); }

/* テーマのカード（入口の「テーマで えらぶ」。学年によらない棚） */
.m-grades-section { padding-bottom: 72px; }
.m-themes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.m-theme {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px 20px; align-content: start; align-items: center;
  padding: 24px 24px 22px; scroll-margin-top: 24px;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: 0 4px 0 var(--ink);
}
.m-theme__art { width: 96px; height: auto; }
.m-theme__title { font-size: 26px; }
.m-theme__title a { color: var(--ink); text-decoration: none; }
.m-theme__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.m-theme__lead { margin-top: 4px; font-size: 15px; line-height: 1.7; }
.m-theme__count { font-size: 14px; color: var(--ink-soft); }
.m-theme__chips { grid-column: 1 / -1; }
.m-theme__all { grid-column: 1 / -1; justify-self: start; font-weight: 700; color: var(--ink); }
.m-theme__all:hover { color: var(--tate); }
.m-grade { scroll-margin-top: 24px; }
.m-grade__title { font-size: clamp(30px, 3.4vw, 40px); padding-bottom: 14px; border-bottom: 2.5px solid var(--ink); margin-bottom: 28px; }
/* 教科ごとに1行。見出しの下に単元のカードを横へ並べる（教科を列にすると、教科の数が少ない学年で細い1列になる） */
.m-grade__subjects { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.m-subject { scroll-margin-top: 24px; }
.m-subject__title { font-size: 22px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.m-subject__empty { color: var(--ink-soft); font-size: 14px; border: 2px dashed var(--grid); border-radius: var(--radius-m); padding: 18px; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.m-units { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.m-units > li { display: flex; }
.m-units .m-unit-card { flex: 1; }
/* 単元のカード: 上にサムネイル（再生画面の1コマ）、下に題名と説明 */
.m-unit-card {
  display: flex; flex-direction: column; overflow: hidden; color: var(--ink); text-decoration: none;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: 0 4px 0 var(--ink);
  transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.m-unit-card:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: #FFFDF7; color: var(--ink); }
.m-unit-card:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-unit-card:focus-visible { border-radius: var(--radius-m); }
.m-unit-card__body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 16px; }
.m-unit-card__no { display: block; margin-bottom: 2px; font-family: var(--font-body); font-size: 13px; line-height: 1.4; color: var(--ink-soft); font-weight: 700; }
/* サムネイル（16:9）。まだ無い単元は、教科の色の地に積み木を1こ置く（地の色は図解の色から。3色は使わない） */
.m-thumb { flex: none; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--fig-sky); border-bottom: 2px solid var(--ink); }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-thumb__block { width: 56px; height: 56px; }
.m-thumb--kokugo { background: var(--fig-rose); }
.m-thumb--sansu { background: var(--wood-light); }
.m-thumb--seikatsu { background: var(--fig-light); }
.m-thumb--rika { background: var(--fig-leaf); }
.m-thumb--shakai { background: var(--fig-sky); }
.m-thumb--ongaku { background: var(--fig-skin); }
.m-thumb--katei { background: var(--fig-metal); }
.m-thumb--taiiku { background: var(--fig-plastic); }
.m-thumb--net { background: var(--fig-glass); }
.m-unit-card__title { font-family: var(--font-head); font-weight: 900; font-size: 22px; }
.m-unit-card__title { line-height: 1.35; }
.m-unit-card__title small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); font-weight: 700; }
.m-unit-card__lead { font-size: 14px; line-height: 1.6; }
.m-unit-card__meta { font-size: 12px; color: var(--ink-soft); margin-top: auto; padding-top: 4px; }

/* 入口の新着の動画（学年・教科の札と公開日を上に） */
.m-new { padding-bottom: 88px; }
.m-new .m-units { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.m-new-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 4px; }
.m-new-card .m-chip { font-size: 12px; }
.m-new-card .m-chip span { padding: 6px 10px; }
.m-new-card__date { font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

/* 学年のカード（一覧） */
.m-grades { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.m-grade-card {
  display: grid; align-content: start; gap: 14px; padding: 20px 20px 18px; scroll-margin-top: 24px;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: 0 4px 0 var(--ink);
}
.m-grade-card__main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; }
.m-grade-card__main:hover .m-grade-card__label { text-decoration: underline; text-underline-offset: 4px; }
.m-grade-card__label { font-family: var(--font-head); font-weight: 900; font-size: 28px; }
.m-grade-card__count { font-size: 14px; color: var(--ink-soft); }
.m-grade-card__subjects, .m-jump, .m-theme__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.m-grade-card__subjects li { scroll-margin-top: 24px; }
.m-grade-card__subjects a, .m-grade-card__soon, .m-jump a, .m-theme__chips a {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; font-size: 15px; font-weight: 700; line-height: 1.5;
  color: var(--ink); text-decoration: none; border: 2px solid var(--ink); border-radius: var(--radius-pill); background: var(--paper);
  transition: background-color var(--t);
}
.m-grade-card__subjects a:hover, .m-jump a:hover, .m-theme__chips a:hover { background: var(--wood-light); color: var(--ink); }
.m-grade-card__subjects a span, .m-grade-card__soon span { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.m-grade-card__soon { border-style: dashed; border-color: var(--grid); color: var(--ink-soft); background: transparent; }
.m-subject__title a { color: var(--ink); }
.m-subject__title small { font-size: 13px; color: var(--ink-soft); font-weight: 700; }

/* 学年・教科のページの見出し（左に題名と説明、右に QR） */
.m-list-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; padding-top: 28px; margin-bottom: 32px; }
.m-list-head__title { margin-top: 12px; }
.m-list-head .m-grade__title { margin-bottom: 16px; }
.m-list-head__lead { max-width: 40em; color: var(--ink-soft); }
.m-list-head .m-jump { margin-top: 18px; }
.m-list-head__note { margin-top: 6px; font-size: 13px; color: var(--ink-soft); }

/* QR コード: パソコンの画面と印刷だけに出す。スマホ・タブレット（小さい画面・指で操作する画面）では出さない */
.m-qr { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 12px 16px 12px 12px; max-width: 360px;
  background: var(--panel); border: 2px solid var(--grid); border-radius: var(--radius-m); }
.m-list-head .m-qr { margin-top: 0; }
.m-qr__code { width: 128px; height: 128px; flex: none; }
.m-qr__title { font-weight: 700; font-size: 15px; }
.m-qr__lead { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 960px), (pointer: coarse) {
  .m-qr { display: none; }
  .m-list-head { grid-template-columns: minmax(0, 1fr); }
}

/* 前の単元・次の単元 */
.m-pager { padding: 0 0 56px; }
.m-hero + .m-pager { padding-top: 0; margin-top: -24px; }
.m-pager__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: stretch; }
.m-pager__link {
  display: grid; gap: 4px; align-content: center; padding: 14px 18px; color: var(--ink); text-decoration: none;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: 0 4px 0 var(--ink);
  transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.m-pager__link:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: #FFFDF7; color: var(--ink); }
.m-pager__link--next { text-align: right; }
.m-pager__link--next:not(.m-pager__link--list) { background: var(--wood-light); }
.m-pager__link--next:not(.m-pager__link--list):hover { background: #F7E6C6; }
.m-pager__link--list { border-style: dashed; box-shadow: none; }
.m-pager__link--list:hover { box-shadow: none; transform: none; }
.m-pager__dir { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.m-pager__title { font-family: var(--font-head); font-weight: 900; font-size: 20px; line-height: 1.35; }
.m-pager__count { display: grid; place-items: center; align-content: center; gap: 2px; padding: 0 8px; font-size: 13px; color: var(--ink-soft); text-decoration: none; text-align: center; }
.m-pager__count span { font-size: 15px; font-weight: 700; color: var(--ink); }
@media (max-width: 640px) {
  .m-pager__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .m-pager__count { grid-column: 1 / -1; grid-row: 1; }
  .m-pager__title { font-size: 17px; }
  .m-pager__link { padding: 12px 14px; }
}

/* 印刷: QR を出し、動かない部品（再生の操作・前後の案内・ナビ）は省く */
@media print {
  .m-qr { display: flex !important; break-inside: avoid; border-color: var(--ink); }
  .m-qr__code { width: 32mm; height: 32mm; }
  .m-pager, .m-controls, .m-skip, .m-search { display: none !important; }
  .m-unit-card, .m-grade-card, .m-series, .m-theme, .m-btn { box-shadow: none; }
}

/* フッタ */
.m-footer { border-top: 2px solid var(--ink); background: var(--paper); padding: 40px 0 56px; }
.m-footer__inner { display: grid; gap: 10px; font-size: 14px; }
.m-footer__note { color: var(--ink-soft); }
.m-footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 6px 0 0; }
.m-footer__links a { color: var(--ink); }

@media (max-width: 960px) {
  .m-hero__grid, .m-parents__grid { grid-template-columns: minmax(0, 1fr); }
  /* 入口の表紙: 絵は小さくして見出しの横へ。説明・近道・検索は下に通しで置く */
  .m-index-hero__grid { grid-template-columns: minmax(0, 1fr) 240px; gap: 0 24px; grid-template-areas: "title art" "text text"; align-items: center; }
  .m-index-hero__text { align-self: start; }
  .m-series__top { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .m-series__thumb { max-width: 520px; }
  .m-themes { grid-template-columns: minmax(0, 1fr); }
  .m-hero__grid { gap: 28px; }
  .m-hero__text { padding-top: 8px; }
  .m-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body.m-body { font-size: 16px; }
  .m-hero { padding-bottom: 72px; }
  .m-hero__title { margin-top: 16px; }
  .m-facts { gap: 0 16px; }
  .m-try { grid-template-columns: minmax(0, 1fr); }
  .m-more { grid-template-columns: minmax(0, 1fr); }
  .m-words { grid-template-columns: minmax(0, 1fr); }
  .m-section { padding-bottom: 80px; }
  .m-try__item { padding: 22px 20px; }
  .m-time { min-width: 0; font-size: 13px; }
  /* 小さい画面では字幕を画面の下へ出し、文字を大きく保つ（動画書き出しは画面内のまま） */
  html:not([data-render]) .m-screen { aspect-ratio: auto; display: flex; flex-direction: column; }
  html:not([data-render]) .m-screen .m-stage { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  html:not([data-render]) .m-screen__caption {
    position: static; border: 0; border-top: 2px solid var(--ink); border-radius: 0;
    font-size: 17px; padding: 12px 16px; min-height: calc(2 * 1.45em + 24px); display: grid; place-items: center;
  }
  /* 全画面の横向きは高さが足りないので、字幕を画面の中へ戻す（縦向きは下に出したまま） */
  @media (orientation: landscape) {
    html:not([data-render]) .m-player[data-fs="1"] .m-screen { aspect-ratio: 16 / 9; display: block; }
    html:not([data-render]) .m-player[data-fs="1"] .m-screen .m-stage { position: absolute; inset: 0; aspect-ratio: auto; }
    html:not([data-render]) .m-player[data-fs="1"] .m-screen__caption {
      position: absolute; border: 2px solid var(--ink); border-radius: 1.4cqw;
      font-size: 2.9cqw; padding: 1.2cqw 2.4cqw; min-height: 0; display: block;
    }
  }
  .m-screen__chapter { font-size: 3cqw; }
  .m-formula--stage { font-size: 4.4cqw; }
  .stage-tag { font-size: 3.4cqw; }
  .stage-dim { font-size: 3.2cqw; }
  /* 表紙: 題名のすぐ下に再生画面を置き、説明と数字はそのあと */
  .m-hero__text { display: contents; }
  .m-hero__grid { gap: 0; }
  .m-hero .m-chip { order: 1; justify-self: start; }
  .m-hero__title { order: 2; font-size: 48px; margin-top: 12px; }
  .m-player { order: 3; margin-top: 20px; }
  .m-hero__lead { order: 4; margin-top: 28px; font-size: 17px; }
  .m-facts { order: 5; margin-top: 24px; }
  .m-dates { order: 6; }
  .m-index-hero { padding: 24px 0 56px; }
  .m-index-hero__grid { grid-template-columns: minmax(0, 1fr) 168px; gap: 0 10px; }
  .m-index-hero__title { font-size: 34px; }
  .m-index-hero__lead { margin-top: 14px; font-size: 16px; line-height: 1.75; }
  .m-index-hero__count { margin-top: 12px; font-size: 16px; }
  .m-index-hero__count b { font-size: 24px; }
  .m-index-hero__count small { font-size: 12px; }
  /* 近道: 1〜6年を1段に6つ、テーマを次の段に2つ */
  .m-shortcuts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 16px; gap: 8px 6px; }
  .m-shortcut { padding: 0 4px; min-width: 0; font-size: 15px; }
  .m-shortcut--theme { grid-column: span 3; }
  .m-search { margin-top: 16px; }
  .m-index-lead { margin-top: -14px; }
  .m-series { padding: 18px 16px 18px; }
  .m-series__chapter--wide .m-series__episodes { column-count: 1; }
  .m-series__chapters { margin-top: 22px; padding-top: 20px; }
  .m-series__actions { margin-top: 18px; }
  .m-theme { grid-template-columns: 72px minmax(0, 1fr); gap: 14px 16px; padding: 18px 16px; }
  .m-theme__art { width: 72px; }
  .m-theme__title { font-size: 22px; }
  /* 単元のカード: 小さい画面ではサムネイルを左に小さく置き、一覧を短く保つ */
  .m-units { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .m-new .m-units { grid-template-columns: minmax(0, 1fr); }
  .m-unit-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px 12px; align-content: start; align-items: start; padding: 12px; }
  .m-unit-card__body { display: contents; }
  .m-unit-card .m-thumb { border: 2px solid var(--ink); border-radius: var(--radius-s); }
  .m-unit-card__title { font-size: 19px; }
  .m-unit-card__lead, .m-unit-card__meta, .m-new-card__head { grid-column: 1 / -1; }
  .m-new-card__head { grid-row: 1; margin-bottom: 0; }
  .m-unit-card__meta { padding-top: 0; }
}

/* 動画書き出し: 再生画面だけを 1280×720 で出す */
html[data-render] body { background: var(--paper); }
html[data-render] body > *:not(main), html[data-render] main > *:not(.m-hero), html[data-render] .m-hero__text,
html[data-render] .m-controls, html[data-render] .m-chapters, html[data-render] .m-crumbs, html[data-render] .m-player__file,
html[data-render] .m-qr { display: none !important; }
html[data-render] .m-screen { position: fixed; left: 0; top: 0; width: 1280px; height: 720px; border: 0; border-radius: 0; box-shadow: none; }

/* 「見た」しるし（site/manabi/assets/watched.js。記録は端末の中だけ）。サムネイルには重ねず、カードの文字の側に置く。
   見た＝墨地に白字と ✓、とちゅう＝白地に墨のわくと、どこまで見たかの短い線（木の色）。色だけに頼らず文字を添える */
.m-watched {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; white-space: nowrap;
  padding: 3px 9px; border: 2px solid var(--ink); border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 12px; line-height: 1.2; font-weight: 700; color: var(--ink); background: var(--panel);
}
.m-watched--done { background: var(--ink); color: var(--paper); }
.m-watched__check { font-size: 11px; }
.m-watched__bar { position: relative; width: 32px; height: 6px; border: 1.5px solid var(--ink); border-radius: var(--radius-pill); overflow: hidden; background: var(--paper); }
.m-watched__bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--watched, 0) * 100%); background: var(--wood-edge); }
.m-unit-card__meta .m-watched { margin-right: 8px; }
.m-hit .m-watched { margin-top: auto; }
.m-pager__dir .m-watched { margin-left: 8px; font-size: 11px; padding: 2px 7px; }
/* シリーズの回の番号の丸: 見た＝墨で塗る、とちゅう＝木の色 */
.m-series__episodes a[data-watched="done"] .m-series__no { background: var(--ink); color: var(--paper); }
.m-series__episodes a[data-watched="part"] .m-series__no { background: var(--wood); }
/* 一覧の進みぐあいと、シリーズの次の1本 */
.m-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; font-weight: 700; }
.m-progress[hidden] { display: none; }
.m-series__text .m-progress { margin: 14px 0 0; }
.m-progress__count { padding: 4px 12px; border: 2px solid var(--ink); border-radius: var(--radius-pill); background: var(--wood-light); }
.m-progress__next { color: var(--ink); }
.m-progress__next::after { content: " →"; }
.m-progress__next:hover { color: var(--tate); }
.m-progress__all { color: var(--ink-soft); }
/* 入口の「つづきから 見る」 */
.m-resume { margin: 16px 0 0; }
.m-resume[hidden] { display: none; }
.m-resume__link {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; max-width: 100%; padding: 10px 16px;
  color: var(--ink); text-decoration: none; background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-s); box-shadow: 0 4px 0 var(--ink);
  transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.m-resume__link:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: var(--wood-light); color: var(--ink); }
.m-resume__link:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-resume__label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.m-resume__label::after { content: " →"; }
.m-resume__title { font-family: var(--font-head); font-weight: 900; font-size: 18px; line-height: 1.35; }
/* 単元ページの「見ました」と「つづきから 見る」 */
.m-watched-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; font-size: 14px; font-weight: 700; }
.m-watched-note[hidden] { display: none; }
.m-watched-note__resume {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px; cursor: pointer;
  font: inherit; font-family: var(--font-head); font-weight: 900; font-size: 16px; line-height: 1.2; color: var(--ink);
  background: var(--wood); border: 2px solid var(--ink); border-radius: var(--radius-s); box-shadow: 0 4px 0 var(--ink);
  transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.m-watched-note__resume small { font-family: var(--font-body); font-size: 12px; font-weight: 700; }
.m-watched-note__resume:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); background: var(--wood-light); }
.m-watched-note__resume:active { transform: translateY(3px); box-shadow: var(--lift-press); }
/* 足もとの記録の説明と、記録を消すボタン */
.m-footer__watch { color: var(--ink-soft); }
.m-footer__watch[hidden] { display: none; }
.m-footer__clear {
  margin-left: 8px; padding: 2px 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-s);
}
.m-footer__clear:hover { background: var(--wood-light); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* 動画紹介のまとめ（/manabi/matome/。templates/manabi/hub.html・hub_index.html、単元ページの「この動画が入っているまとめ」） */
.m-hub__answer { max-width: 40em; font-size: 17px; line-height: 1.9; }
.m-hub__section { margin-top: 40px; }
.m-hub__section-title { font-size: 22px; margin-bottom: 8px; }
.m-hub__section-text { max-width: 40em; margin-bottom: 16px; color: var(--ink-soft); }
.m-unit-card__shelf { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.m-unit-card__note { font-size: 15px; line-height: 1.7; }
.m-hub-faq__list { margin: 0; display: grid; gap: 16px; max-width: 44em; }
.m-hub-faq__item dt { font-weight: 700; }
.m-hub-faq__item dd { margin: 4px 0 0; line-height: 1.8; }
.m-hub__adults { max-width: 44em; line-height: 1.9; }
.m-hub__links-title { margin-top: 20px; font-size: 16px; }
.m-hub__links { margin: 8px 0 0; padding-left: 1.2em; line-height: 2; }
.m-hub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.m-hub-list__item { padding: 18px 20px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.m-hub-list__title { font-size: 20px; font-weight: 700; color: var(--ink); }
.m-hub-list__lead { margin-top: 6px; line-height: 1.8; }
.m-hub-list__meta { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.m-hubs__title { font-size: 20px; margin-bottom: 12px; }
.m-hubs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.m-hubs__link { font-weight: 700; color: var(--ink); }
.m-hubs__section { font-weight: 400; color: var(--ink-soft); }
.m-hubs__line { margin-top: 2px; font-size: 14px; color: var(--ink-soft); }
.m-jump--hubs { margin-top: 6px; }

/* 棚「さわって わかる」（/manabi/sawaru/。templates/manabi/sawaru.html・sawaru_index.html、単元ページの「さわって わかる」）。
   ページの中身（body.html）は sw-<slug>- のクラスで自分の見た目を持ち、ここは枠だけ */
.m-sawaru { padding-bottom: 64px; }
.m-sawaru .m-list-head { margin-bottom: 20px; }
.m-sawaru__lead { max-width: 44em; font-size: 17px; line-height: 1.9; }
.m-sawaru__howto { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 12px; font-weight: 700; }
.m-sawaru__howto-tag { flex: none; padding: 2px 12px; border-radius: var(--radius-pill); background: var(--ink); color: var(--paper); font-size: 13px; }
.m-sawaru__stage { min-width: 0; overflow-wrap: anywhere; }
.m-sawaru__about { max-width: 52em; }
.m-sawaru-rel { padding-bottom: 64px; }
.m-sawaru-links { padding-bottom: 72px; }
.m-sawaru-links__lead { margin: -4px 0 14px; color: var(--ink-soft); }
.m-sawaru-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.m-sawaru-list > li { display: flex; }
.m-sawaru-card {
  flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: var(--ink); text-decoration: none;
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--lift);
  transition: transform var(--t), box-shadow var(--t);
}
.m-sawaru-card:hover { transform: translateY(-2px); box-shadow: var(--lift-hover); color: var(--ink); }
.m-sawaru-card:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-sawaru-card__tag { align-self: flex-start; padding: 2px 10px; border: 2px solid var(--ink); border-radius: var(--radius-pill); background: var(--wood-light); font-size: 12px; font-weight: 700; }
.m-sawaru-card__title { font-family: var(--font-head); font-weight: 900; font-size: 20px; line-height: 1.4; }
.m-sawaru-card__lead { font-size: 14px; line-height: 1.7; }
.m-sawaru-card__go { margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 700; }
.m-sawaru-index__field { margin: 20px 0 10px; font-size: 18px; }
@media (max-width: 720px) {
  .m-sawaru-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
/* 動画と「さわって わかる」の2枚の入口（双璧。2026-10-24 サク指示）。同じ大きさ・同じ重さで並べ、色だけで見分ける */
.m-twin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; max-width: 560px; }
.m-twin__door {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "icon kind" "icon num" "note note";
  gap: 2px 12px; align-items: center; padding: 14px 16px 12px; color: var(--ink); text-decoration: none;
  border: 3px solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--lift); transition: transform var(--t), box-shadow var(--t);
}
.m-twin__door--video { background: var(--wood-light); }
.m-twin__door--sawaru { background: var(--fig-glass); }
.m-twin__door:hover { transform: translateY(-2px); box-shadow: var(--lift-hover); color: var(--ink); }
.m-twin__door:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-twin__icon { grid-area: icon; width: 48px; height: 48px; }
.m-twin__kind { grid-area: kind; font-family: var(--font-head); font-weight: 900; font-size: 18px; line-height: 1.3; }
.m-twin__num { grid-area: num; font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.3; white-space: nowrap; }
.m-twin__num b { font-size: 28px; font-weight: 900; margin-right: 2px; }
.m-twin__door--video .m-twin__num b { color: var(--yoko); }
.m-twin__door--sawaru .m-twin__num b { color: var(--tate); }
.m-twin__note { grid-area: note; margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.m-index-hero__count small { margin-top: 0; }
.m-sawaru-pick .m-sawaru-index__field { margin-top: 28px; }
.m-sawaru-pick__all { margin-top: 20px; }
.m-sawaru-pick__all .m-theme__all { display: inline-block; }
@media (max-width: 720px) {
  .m-twin { gap: 10px; margin-top: 14px; }
  .m-twin__door { grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "kind kind" "icon num" "note note"; gap: 4px 8px; padding: 10px 10px 9px; }
  .m-twin__kind { white-space: nowrap; }
  .m-twin__icon { width: 36px; height: 36px; }
  .m-twin__kind { font-size: 15px; }
  .m-twin__num b { font-size: 22px; }
  .m-twin__note { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .m-twin__door:hover, .m-twin__door:active { transform: none; } }
/* 棚の中のカテゴリ（教科・保護者の方へ）と導線（2026-10-24 サク指示） */
.m-sawaru-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.m-sawaru-cats > li { display: flex; }
.m-sawaru-cat {
  flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; color: var(--ink); text-decoration: none;
  background: var(--fig-glass); border: 2px solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--lift);
  transition: transform var(--t), box-shadow var(--t);
}
.m-sawaru-cat--adult { background: var(--wood-light); }
.m-sawaru-cat:hover { transform: translateY(-2px); box-shadow: var(--lift-hover); color: var(--ink); }
.m-sawaru-cat:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-sawaru-cat__title { font-family: var(--font-head); font-weight: 900; font-size: 22px; line-height: 1.3; }
.m-sawaru-cat__title small { margin-left: 8px; font-size: 14px; color: var(--tate); white-space: nowrap; }
.m-sawaru-cat__grades { font-size: 13px; font-weight: 700; }
.m-sawaru-cat__lead { font-size: 14px; line-height: 1.7; }
.m-sawaru-cat__ex { margin-top: auto; padding-top: 4px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.m-sawaru-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.m-sawaru-grade { scroll-margin-top: 16px; }
.m-sawaru-index__field small, .m-sawaru-shelf .m-hub__section-title small { margin-left: 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.m-sawaru-titles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 20px; }
.m-sawaru-titles a { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--grid); color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.5; }
.m-sawaru-titles a:hover { color: var(--tate); text-decoration: underline; }
.m-sawaru-titles__tag { flex: none; padding: 0 8px; border: 1.5px solid var(--ink); border-radius: var(--radius-pill); background: var(--panel); font-size: 12px; }
.m-sawaru-next { padding-bottom: 56px; }
.m-sawaru-card--next { text-align: right; }
.m-sawaru-card--next .m-sawaru-card__tag { align-self: flex-end; }
a.m-chip__grade { color: inherit; text-decoration: none; }
@media (max-width: 720px) {
  .m-sawaru-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .m-sawaru-cat { padding: 10px 12px; }
  .m-sawaru-cat__title { font-size: 18px; }
  .m-sawaru-cat__title small { display: block; margin-left: 0; font-size: 13px; }
  .m-sawaru-cat__lead, .m-sawaru-cat__ex { display: none; }
  .m-sawaru-titles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .m-sawaru-cat:hover, .m-sawaru-cat:active { transform: none; } }
/* 棚の入口: 何ができるか・サムネイルつきのカード・教科の段（2026-10-24 サク指摘: どんなページがあるのかわからない） */
.m-sawaru-how { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.m-sawaru-how__step {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "icon title" "icon text";
  gap: 2px 14px; align-items: center; padding: 14px 16px; background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m);
}
.m-sawaru-how__step svg { grid-area: icon; }
.m-sawaru-how__step b { grid-area: title; font-family: var(--font-head); font-weight: 900; font-size: 19px; }
.m-sawaru-how__step > span:last-child { grid-area: text; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.m-sawaru-how__no { position: absolute; top: -12px; left: -10px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 900; font-size: 15px; }
.m-sawaru-stats { margin: 18px 0 10px; font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.m-sawaru-stats b { font-size: 26px; font-weight: 900; color: var(--tate); margin: 0 2px; }
.m-sawaru-card--thumb { padding-top: 0; overflow: hidden; }
.m-sawaru-card__thumb { display: block; width: calc(100% + 36px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: contain; margin: 0 -18px 6px; background: #fff; border-bottom: 2px solid var(--ink); }
.m-sawaru-row { padding: 22px 0 26px; border-top: 2px dashed var(--grid); }
.m-sawaru-row:first-of-type { border-top: 0; padding-top: 4px; }
.m-sawaru-row__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 12px; }
.m-sawaru-row__title { font-family: var(--font-head); font-weight: 900; font-size: 26px; }
.m-sawaru-row__title a { color: var(--ink); text-decoration: none; }
.m-sawaru-row__title a:hover { text-decoration: underline; }
.m-sawaru-row__title small { margin-left: 10px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.m-sawaru-row__lead { color: var(--ink-soft); }
.m-sawaru-row__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.m-sawaru-row__list > li { display: flex; min-width: 0; }
.m-sawaru-row__list .m-sawaru-card { padding: 0 14px 12px; }
.m-sawaru-row__list .m-sawaru-card__thumb { width: calc(100% + 28px); margin: 0 -14px 6px; }
.m-sawaru-row__list .m-sawaru-card__title { font-size: 16px; }
.m-sawaru-row__list .m-sawaru-card__go { display: none; }
.m-sawaru-row__all { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--ink); }
@media (max-width: 860px) {
  .m-sawaru-how { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .m-sawaru-row__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 720px) {
  .m-sawaru-row__title { font-size: 22px; }
  .m-sawaru-row__list .m-sawaru-card { padding: 0 10px 10px; }
  .m-sawaru-row__list .m-sawaru-card__thumb { width: calc(100% + 20px); margin: 0 -10px 6px; }
  .m-sawaru-row__list .m-sawaru-card__tag { font-size: 11px; padding: 1px 8px; }
  .m-sawaru-row__list .m-sawaru-card__title { font-size: 14px; }
}
/* 棚の入口の頭: さわって わかるが どういうものか（見本・3つの段・動画との ちがい・1ページの つくり） */
.m-sawaru-intro { margin: 8px 0 28px; }
.m-sawaru-intro__title { font-family: var(--font-head); font-weight: 900; font-size: 24px; margin-bottom: 14px; }
.m-sawaru-intro__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.m-sawaru-intro__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
.m-sawaru-intro__sub { font-family: var(--font-head); font-weight: 900; font-size: 19px; margin-bottom: 10px; }
.m-sawaru-how--col { grid-template-columns: minmax(0, 1fr); margin: 10px 0 0; gap: 18px; }
.m-sawaru-demo { padding: 16px 18px; background: var(--panel); border: 3px solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--lift); }
.m-sawaru-demo__q { font-weight: 700; line-height: 1.7; }
.m-sawaru-demo__fig { display: block; width: 100%; height: auto; max-width: 520px; margin: 4px auto 0; }
.m-sawaru-demo__fig [data-demo-beam] { transition: transform var(--t); }
.m-sawaru-demo__tick { font-size: 10px; font-weight: 700; fill: var(--ink-soft); }
.m-sawaru-demo__vals { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.m-sawaru-demo__vals b { font-family: var(--font-head); font-size: 18px; }
.m-sawaru-demo__msg { min-height: 1.8em; margin-top: 6px; font-family: var(--font-head); font-weight: 900; font-size: 18px; color: var(--tate); }
.m-sawaru-demo__ctrl { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 6px; }
.m-sawaru-demo__ctrl > div { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.m-sawaru-demo__ctrl button { width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: var(--radius-s); background: var(--wood-light); font-size: 22px; font-weight: 900; cursor: pointer; }
.m-sawaru-demo__ctrl button:disabled { opacity: .35; cursor: default; }
.m-sawaru-demo__ctrl output { min-width: 1.4em; text-align: center; font-family: var(--font-head); font-weight: 900; font-size: 22px; }
.m-sawaru-demo__rec { margin-top: 12px; padding-top: 10px; border-top: 2px dashed var(--grid); font-size: 14px; }
.m-sawaru-demo__rec ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; padding: 0; list-style: none; }
.m-sawaru-demo__rec li { padding: 2px 10px; border: 2px solid var(--ink); border-radius: var(--radius-pill); background: var(--fig-glass); font-weight: 700; }
.m-sawaru-demo__still { padding: 16px; border: 2px dashed var(--ink-soft); border-radius: var(--radius-m); color: var(--ink-soft); }
.m-sawaru-vs__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-sawaru-vs__card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; }
.m-sawaru-vs__card--video { background: var(--wood-light); }
.m-sawaru-vs__card--sawaru { background: var(--fig-glass); }
.m-sawaru-vs__card b { font-family: var(--font-head); font-weight: 900; font-size: 18px; }
.m-sawaru-vs__card span { font-size: 14px; line-height: 1.7; }
.m-sawaru-vs__card small { margin-top: auto; font-weight: 700; font-size: 13px; }
.m-sawaru-vs__note { margin-top: 10px; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.m-sawaru-anatomy__body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: center; }
.m-sawaru-anatomy__fig { width: 100%; height: auto; }
.m-sawaru-anatomy__no circle { fill: var(--ink); }
.m-sawaru-anatomy__num text { fill: var(--paper); font-size: 12px; font-weight: 900; text-anchor: middle; }
.m-sawaru-anatomy__list { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; font-size: 14px; line-height: 1.6; }
.m-sawaru-anatomy__list b { margin-right: 6px; font-family: var(--font-head); font-weight: 900; }
@media (max-width: 860px) {
  .m-sawaru-intro__grid, .m-sawaru-intro__grid--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .m-sawaru-vs__pair { grid-template-columns: minmax(0, 1fr); }
  .m-sawaru-anatomy__body { grid-template-columns: minmax(0, 1fr); }
  .m-sawaru-anatomy__fig { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) { .m-sawaru-demo__fig [data-demo-beam] { transition: none; } }
.m-sawaru-explain { padding-bottom: 56px; }
.m-sawaru-explain__box { border: 2px solid var(--ink); border-radius: var(--radius-m); background: var(--panel); padding: 14px 18px; }
.m-sawaru-explain__box > summary { cursor: pointer; font-family: var(--font-head); font-weight: 900; font-size: 18px; }
.m-sawaru-explain__rule { margin-top: 14px; max-width: 44em; font-size: 17px; line-height: 1.9; }
.m-sawaru-explain__examples { margin: 10px 0 0; padding-left: 1.2em; line-height: 1.9; }
.m-sawaru-explain__terms { margin-top: 14px; }

/* ことばの 絵じてん（/manabi/kotoba/。2026-10-30） */
.m-kotoba { padding-top: 28px; padding-bottom: 72px; }
.m-kotoba__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }
.m-kotoba__title { font-size: clamp(48px, 6vw, 76px); letter-spacing: .04em; margin-top: 22px; }
.m-kotoba__title rt { font-size: .3em; font-weight: 700; color: var(--ink-soft); letter-spacing: .1em; }
.m-kotoba__reading { margin-top: 6px; color: var(--ink-soft); font-weight: 700; }
.m-kotoba__short { margin-top: 24px; background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 18px 20px; }
.m-kotoba__short-tag { display: inline-block; background: var(--ink); color: var(--paper); border-radius: var(--radius-pill); padding: 4px 12px; font-size: 13px; font-weight: 700; }
.m-kotoba__short-text { margin-top: 10px; font-family: var(--font-head); font-weight: 700; font-size: 21px; line-height: 1.7; }
.m-kotoba__figure { margin: 0; }
.m-kotoba__figure img { display: block; width: 100%; height: auto; border: 2.5px solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--lift); background: var(--paper); }
.m-kotoba__figure figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-soft); }
.m-kotoba__block { margin-top: 44px; max-width: 46em; }
.m-kotoba__h2 { font-size: 24px; padding-bottom: 8px; border-bottom: 2px dashed var(--grid); margin-bottom: 14px; }
.m-kotoba__block p { font-size: 18px; line-height: 1.95; }
.m-kotoba__block p + p { margin-top: 10px; }
.m-kotoba__examples { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.m-kotoba__examples li { font-size: 18px; line-height: 1.8; background: var(--panel); border-left: 6px solid var(--wood); border-radius: var(--radius-s); padding: 10px 16px; }
.m-kotoba-video { padding-bottom: 56px; }
.m-kotoba-video .m-units { max-width: 560px; }
.m-kotoba-video__scene { margin-top: 14px; font-weight: 700; }
.m-kotoba-rel, .m-kotoba-others { padding-bottom: 56px; }
.m-kotoba-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.m-kotoba-cards > li { display: flex; }
.m-kotoba-card {
  flex: 1; display: flex; flex-direction: column; background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m);
  box-shadow: var(--lift); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform var(--t), box-shadow var(--t);
}
.m-kotoba-card:hover { transform: translateY(-2px); box-shadow: var(--lift-hover); color: var(--ink); }
.m-kotoba-card:active { transform: translateY(3px); box-shadow: var(--lift-press); }
.m-kotoba-card:focus-visible { border-radius: var(--radius-m); }
.m-kotoba-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-bottom: 2px solid var(--ink); }
.m-kotoba-card__body { display: grid; gap: 6px; padding: 12px 14px 14px; }
.m-kotoba-card__shelf { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.m-kotoba-card__term { font-family: var(--font-head); font-weight: 900; font-size: 24px; line-height: 1.5; }
.m-kotoba-card__term rt { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.m-kotoba-card__meaning { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.m-kotoba-rows { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.m-shortcut--off { opacity: .4; border-style: dashed; pointer-events: none; }
.m-kotoba-row { margin-top: 24px; }
.m-kotoba-row__title { font-size: 18px; margin-bottom: 12px; display: inline-block; background: var(--ink); color: var(--paper); border-radius: var(--radius-pill); padding: 4px 16px; }
.m-kotoba-groups { margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.m-kotoba-groups__item { background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius-m); padding: 14px 16px; }
.m-kotoba-groups dt { font-family: var(--font-head); font-weight: 900; font-size: 18px; }
.m-kotoba-groups dd { margin: 8px 0 0; }
.m-kotoba-groups ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.m-kotoba-groups li { display: flex; align-items: baseline; gap: 8px; }
.m-kotoba-groups li a { font-weight: 700; }
.m-kotoba-groups li small { color: var(--ink-soft); font-size: 12px; }
.m-kotoba-parents__back { margin-top: 20px; font-weight: 700; }
.m-words__more { margin: 10px 0 0; font-size: 14px; font-weight: 700; }
@media (max-width: 860px) {
  .m-kotoba__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .m-kotoba__title { margin-top: 16px; }
}
@media (max-width: 640px) {
  .m-kotoba__short-text { font-size: 19px; }
  .m-kotoba__block p, .m-kotoba__examples li { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .m-kotoba-card:hover, .m-kotoba-card:active { transform: none; } }

/* 利用の実績（/manabi/jisseki/）。サイト全体の週ごとの数のカードと表 */
.jk__inner { display: grid; gap: 16px; padding-block: 8px 48px; }
.jk__lead, .jk__note { margin: 0; font-size: 15px; line-height: 1.8; max-width: 46em; }
.jk__note { font-size: 14px; color: var(--ink-soft, inherit); }
.jk__h2 { font-size: 22px; margin-top: 24px; }
.jk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.jk-card { padding: 16px 18px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-m); }
.jk-card__label { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.jk-card__num { margin: 6px 0 0; font-family: var(--font-head); font-weight: 900; font-size: 20px; }
.jk-card__num span { font-size: 40px; margin-right: 2px; }
.jk-card__note { margin: 4px 0 0; font-size: 13px; }
.jk-table-wrap { overflow-x: auto; }
.jk-table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--paper); }
.jk-table th, .jk-table td { padding: 8px 10px; border-bottom: 1px solid var(--line, #d8d2c4); text-align: right; white-space: nowrap; }
.jk-table th[scope="row"], .jk-table thead th:first-child { text-align: left; }
.jk-table thead th { font-size: 13px; border-bottom: 2px solid var(--ink); }
.jk-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 14px; line-height: 1.8; max-width: 46em; }
@media (max-width: 760px) { .jk-cards { grid-template-columns: minmax(0, 1fr); } .jk-card__num span { font-size: 34px; } }

/* 単元ページの「Google Classroom で 配る（先生向け）」 */
.m-classroom { margin: 10px 0 0; font-size: 14px; }
.m-classroom a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
