/* 漢字の書き順（/漢字の書き順/ と 1字の ページ）だけの 見た目。inc/kanji.php が この ページたちの ときだけ 読みこむ。2026-10-28
   1画ずつの コマは tehon.css の .th-kj を そのまま 使う。箱の 片がわに 色の 線は 使わない。 */

/* 大きい 字（アニメ）と 画数・読み */
.kj-top { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: center; max-width: 820px; margin: 0 auto; }
.kj-stage { text-align: center; }
.kj-anim { display: block; width: 100%; max-width: 340px; aspect-ratio: 1; margin: 0 auto; background: #fff; border: 2px solid #E6D9C6; border-radius: 20px; box-shadow: var(--shadow-s); }
.kj-anim .g { stroke: #EFE4D4; stroke-width: .6; stroke-dasharray: 2 2; fill: none; }
.kj-anim .s { fill: none; stroke: var(--ink); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.kj-anim .s.now { stroke: #E0452B; }
.kj-anim .nm { font-family: var(--sans); font-size: 7px; font-weight: 700; fill: #E0452B; opacity: .85; }
.kj-anim.is-run .nm { opacity: 0; }
.kj-ctl { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.kj-ctl .btn { min-height: 48px; }
.kj-ctl .kj-play svg { width: 18px; height: 18px; }
.kj-tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); overflow: hidden; }
.kj-tbl th, .kj-tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 16px; }
.kj-tbl tr:last-child th, .kj-tbl tr:last-child td { border-bottom: 0; }
.kj-tbl th { width: 7em; font-family: var(--maru); font-weight: 700; color: var(--shodo-d); background: var(--cream); white-space: nowrap; }
.kj-tbl td b { font-family: var(--maru); font-size: 26px; margin-right: 2px; }
.kj-tbl td small { font-size: .82em; color: var(--ink3); }
.kj-note { font-size: 13px; color: var(--ink3); margin: 10px 0 0; }

/* 1画ずつ・とめ はね はらい */
.kj-steps { justify-content: center; }
.kj-thh { max-width: 640px; margin: 22px auto 0; background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); padding: 16px 20px; }
.kj-thh-h { margin: 0 0 8px; font-family: var(--maru); font-weight: 700; color: var(--shodo-d); }
.kj-thh ul { margin: 0; padding-left: 1.2em; }
.kj-thh li { margin: 4px 0; line-height: 1.7; }
.kj-thh em { font-style: normal; font-weight: 700; color: #E0452B; }

/* ことば・例文 */
.kj-words { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 720px; }
.kj-words li { background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); padding: 16px 10px; text-align: center; }
.kj-words b { display: block; font-family: var(--maru); font-size: 26px; line-height: 1.3; }
.kj-words small { display: block; margin-top: 4px; font-size: 14px; color: var(--ink2); }
.kj-sent { max-width: 720px; margin: 16px auto 0; background: #fff; border-radius: var(--r-s); padding: 14px 18px; font-size: 18px; line-height: 1.8; box-shadow: var(--shadow-s); }
.kj-sent span { display: inline-block; margin-right: 10px; padding: 2px 10px; border-radius: 999px; background: var(--shodo-l); color: var(--shodo-d); font-family: var(--maru); font-weight: 700; font-size: 13px; vertical-align: 2px; }

/* 練習・お手本・会員 */
.kj-oh-h { margin: 26px 0 10px; text-align: center; font-family: var(--maru); font-weight: 700; }
.kj-oh { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.kj-oh a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--ink); text-decoration: none; font-family: var(--maru); font-weight: 700; }
.kj-oh a:hover { border-color: var(--shodo); color: var(--shodo-d); }
.kj-mem { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--ink2); }

/* 前の字・次の字・一覧 */
.kj-pn { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; max-width: 720px; margin: 0 auto 26px; }
.kj-pn a { text-decoration: none; color: var(--ink); }
.kj-pv, .kj-nx { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 16px; background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); }
.kj-nx { justify-content: flex-end; }
.kj-pv b, .kj-nx b { font-family: var(--maru); font-size: 32px; line-height: 1; }
.kj-pv small, .kj-nx small { font-size: 13px; color: var(--ink2); }
.kj-up { font-family: var(--maru); font-weight: 700; font-size: 14px; color: var(--shodo-d) !important; text-align: center; }
.kj-gh { margin: 0 0 10px; text-align: center; font-family: var(--maru); font-weight: 700; }
.kj-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; max-width: 820px; margin: 0 auto; }
.kj-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; padding: 6px 2px; background: #fff; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.kj-chip b { font-family: var(--maru); font-size: 24px; line-height: 1.15; }
.kj-chip small { font-size: 11px; color: var(--ink3); }
.kj-chip:hover { border-color: var(--shodo); }
.kj-chip.is-cur { border-color: var(--shodo); background: var(--shodo-l); }

/* 入口：さがす・学年 */
.kj-find { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; margin: 0 auto 18px; }
.kj-find .f-search { flex: 1; min-width: 0; }
.kj-find .f-search input { font-size: 20px; }
.kj-find-msg { flex-basis: 100%; margin: 0; min-height: 1.2em; text-align: center; font-size: 14px; color: #C0392B; }
.kj-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 16px; }
.kj-tab { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 6px 14px; border-radius: 999px; font-family: var(--maru); font-weight: 700; font-size: 14px; }
.kj-tab.is-on { background: var(--shodo); color: #fff; }
.kj-tab.is-wait { background: var(--cream2); color: var(--ink3); }
.kj-tab small { font-family: var(--sans); font-weight: 500; font-size: 10.5px; }
.kj-in { font-family: var(--maru); font-weight: 700; font-size: 1.15em; }

@media (max-width: 760px) {
  .kj-top { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .kj-anim { max-width: 280px; }
  .kj-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kj-words { grid-template-columns: minmax(0, 1fr); }
  .kj-words li { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 12px; }
  .kj-words small { margin: 0; }
  .kj-pv b, .kj-nx b { font-size: 26px; }
  .kj-pv, .kj-nx { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .kj-anim .s { transition: none !important; } }
