/* 子どもが読む文字：BIZ UDゴシック（モリサワ、SIL OFL 1.1。自分のサイトに置いて使う。2026年10月27日）
   UDデジタル教科書体にするかは、あとで確認（03_デザイン_フォントの決定_1027.md） */
@font-face { font-family: "YomizoUD"; src: url("/assets/fonts/BIZUDGothic-Regular.woff2") format("woff2"); font-weight: 100 549; font-style: normal; font-display: swap; }
@font-face { font-family: "YomizoUD"; src: url("/assets/fonts/BIZUDGothic-Bold.woff2") format("woff2"); font-weight: 550 900; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --sky: #E6F5FA;
  --card: #FFFFFF;
  --ink: #1E2547;
  --muted: #59628A;
  --shu: #F2542D;
  --sun: #FFC93C;
  --leaf: #1FAE7A;
  --leaf-soft: #CDEFE1;
  --paper: #FFF3D6;
  --mist: #D6EAF2;
  --hl: #FFE58A;
  --ui: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --text: "YomizoUD", "BIZ UDGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
body { background: var(--sky); color: var(--ink); font-family: var(--ui); font-weight: 500; font-size: 16px; line-height: 1.7; }
#app { max-width: 46rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 20px 64px; display: flex; flex-direction: column; gap: 18px; }
#app.wide { max-width: 72rem; }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; font-weight: 800; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 3px solid var(--ink); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.btn { font: inherit; font-weight: 800; font-size: 1.1rem; cursor: pointer; color: #fff; background: var(--shu); border: 3px solid var(--ink); border-radius: 18px; padding: 12px 22px; box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--ink); }
.btn.sub { background: var(--card); color: var(--ink); }
.btn.go { background: var(--leaf); }
.btn.small { font-size: .9rem; padding: 6px 14px; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
.btn:focus-visible, .choice:focus-visible, .pic:focus-visible, .kk:focus-visible, input:focus-visible, .tool:focus-visible, .pick input:focus-visible + span { outline: 4px solid var(--sun); outline-offset: 3px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.who { font-size: .9rem; color: var(--muted); }
/* 忍者と吹き出し */
.sensei { display: flex; gap: 14px; align-items: flex-end; }
.sensei svg { flex: none; }
.sensei img { flex: none; }
.chara { display: block; height: auto; max-width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .chara.happy { animation: hop .9s ease-in-out 2; transform-origin: 50% 100%; }
  @keyframes hop { 0%, 100% { transform: none; } 30% { transform: translateY(-10px) scaleY(1.03); } 55% { transform: none; } 70% { transform: translateY(-4px); } }
}
.bubble { position: relative; background: var(--card); border: 3px solid var(--ink); border-radius: 20px; padding: 12px 16px; font-weight: 800; font-size: 1.05rem; min-width: 0; }
.bubble::before { content: ""; position: absolute; left: -12px; bottom: 18px; border: 10px solid transparent; border-right-color: var(--ink); border-left: 0; }
.bubble::after { content: ""; position: absolute; left: -7px; bottom: 21px; border: 7px solid transparent; border-right-color: var(--card); border-left: 0; }
/* スタート画面 */
.field { display: flex; flex-direction: column; gap: 8px; font-weight: 800; }
input[type="text"] { font: inherit; font-size: 1.1rem; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); width: 100%; max-width: 22rem; }
.picks { display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; }
.pick span { display: flex; align-items: center; justify-content: center; padding: 10px 0; border: 3px solid var(--ink); border-radius: 14px; font-weight: 800; cursor: pointer; background: var(--card); }
.pick input:checked + span { background: var(--sun); }
.note-small { font-size: .88rem; color: var(--muted); font-weight: 500; }
.note-out { font-size: .76rem; color: var(--muted); font-weight: 500; line-height: 1.6; padding-inline: 6px; margin-top: -6px; }
/* ご家庭版の申し込み */
.buy { background: var(--paper); }
.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .08em; color: var(--shu); }
.plan-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; border-bottom: 2px dashed var(--mist); }
.plan-row span { color: var(--muted); font-size: .9rem; }
.plan-row strong { min-width: 0; overflow-wrap: anywhere; }
input[type="email"], select { font: inherit; font-size: 1.05rem; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); width: 100%; max-width: 22rem; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { margin-top: .3em; width: 20px; height: 20px; accent-color: var(--leaf); flex: none; }
.form-error { color: var(--shu); font-weight: 800; }
.handoff { border-style: dashed; }
select:focus-visible, .check input:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
@media (max-width: 560px) { .field-pair { grid-template-columns: minmax(0, 1fr); } }
ruby { ruby-align: center; ruby-position: over; }
ruby rt { font-size: .5em; font-weight: 500; letter-spacing: -.02em; }
.gnum { display: inline-block; font-weight: 800; line-height: 1; padding-top: .7em; }
/* 進み具合（学年は出さない。何本目かだけ） */
.progress { display: flex; gap: 6px; flex-wrap: wrap; }
.progress i { width: 26px; height: 10px; border-radius: 5px; border: 2px solid var(--ink); background: var(--card); }
.progress i.done { background: var(--leaf); }
.progress i.now { background: var(--sun); }
/* 本文と問題 */
.tag { display: inline-block; font-size: .8rem; font-weight: 800; padding: 2px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); }
.tag.k, .tag.kw { background: var(--sun); }
.tag.pic { background: var(--leaf-soft); }
.tag.kaiwa { background: #D9F1FA; }
.passage { font-family: var(--text); font-size: var(--pfs, 1.3rem); line-height: 2.05; letter-spacing: .04em; display: flex; flex-direction: column; gap: .3em; }
.passage p { text-indent: 1em; }
.passage.tate { writing-mode: vertical-rl; height: 22em; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; gap: 0; line-height: 1.9; scrollbar-width: thin; scrollbar-color: var(--muted) var(--mist); padding-bottom: 6px; }
.passage.tate::-webkit-scrollbar { height: 10px; }
.passage.tate::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 5px; }
.passage.tate::-webkit-scrollbar-track { background: var(--mist); border-radius: 5px; }
.passage:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.ref u { text-decoration-color: var(--shu); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.refnum { font-family: var(--ui); font-weight: 800; color: var(--shu); margin-inline-end: .1em; }
.refnum.big { font-size: 1.15em; }
.ref.on { background: var(--hl); border-radius: 4px; box-shadow: 0 0 0 2px var(--hl); }
.passage.mini { font-size: 1.25rem; background: var(--paper); border-radius: 14px; padding: 10px 14px; }
.tate-hint { font-size: .8rem; color: var(--muted); }
.passage.tate p { margin-left: .5em; }
/* 縦書きの傍線は、文字の右側に引く */
.passage.tate u { text-underline-position: right; }
.src { font-size: .8rem; color: var(--muted); }
.tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tool { font: inherit; font-size: .85rem; font-weight: 800; border: 2px solid var(--ink); background: var(--card); color: var(--ink); border-radius: 10px; padding: 3px 10px; cursor: pointer; }
.tool[aria-pressed="true"] { background: var(--sun); }
.qlayout { display: grid; gap: 16px; }
.side { height: 40vh; min-height: 15rem; }
.side .passage { flex: 1; min-height: 0; overflow-y: auto; }
.side .passage.tate { height: auto; flex: 1 1 0; overflow-y: hidden; overflow-x: auto; }
@media (min-width: 820px) {
  .qlayout.with-passage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); height: calc(100vh - 150px); min-height: 24rem; }
}
.qdots { display: flex; gap: 6px; }
.qdots i { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--card); }
.qdots i.answered { background: var(--shu); }
.qdots i.cur { box-shadow: 0 0 0 3px var(--sun); }
.qtext { font-family: var(--text); font-size: 1.35rem; font-weight: 600; line-height: 1.6; }
.ktext { font-family: var(--text); font-size: 2.1rem; letter-spacing: .05em; }
.ktext u, .rq u { text-decoration-color: var(--shu); text-decoration-thickness: 3px; text-underline-offset: 7px; }
.bigword { font-family: var(--text); font-size: 2.6rem; font-weight: 600; letter-spacing: .12em; text-align: center; padding: 8px 0; }
.bigpic { font-size: 4.2rem; line-height: 1.2; text-align: center; }
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice { text-align: left; font-family: var(--text); font-weight: 600; font-size: 1.2rem; line-height: 1.5; padding: 12px 18px; border: 3px solid var(--ink); border-radius: 18px; background: var(--card); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.choice[aria-checked="true"], .pic[aria-checked="true"] { background: var(--sun); }
.pics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pic { font-size: 2.6rem; line-height: 1; padding: 14px 0; border: 3px solid var(--ink); border-radius: 18px; background: var(--card); cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.parent-note { background: var(--paper); border: 3px dashed var(--ink); border-radius: 16px; padding: 10px 14px; font-weight: 800; }
/* 記述式：画面の50音キーボード */
.kwbox { font-family: var(--text); font-size: 1.8rem; font-weight: 600; letter-spacing: .08em; text-align: center; width: 100%; max-width: none; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 14px; background: var(--paper); color: var(--ink); }
.kana { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(5, auto); grid-auto-flow: column; gap: 4px; direction: rtl; }
.kana > * { direction: ltr; }
.kk { font-family: var(--text); font-weight: 600; font-size: 1.2rem; line-height: 1; padding: 9px 0; border: 2px solid var(--ink); border-radius: 9px; background: var(--card); color: var(--ink); cursor: pointer; min-width: 0; }
.kk:active { background: var(--sun); }
.kk.blank { visibility: hidden; }
.kana-x { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.kk.fn { font-family: var(--ui); font-weight: 800; font-size: 1rem; background: var(--mist); }
/* こたえあわせ */
.verdict { display: flex; flex-direction: column; gap: 12px; }
.score { font-weight: 800; font-variant-numeric: tabular-nums; }
.review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.review li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 8px; padding: 12px 0; border-top: 2px dashed var(--mist); }
.rmark { font-family: var(--text); font-size: 2rem; line-height: 1; color: var(--shu); font-weight: 600; }
.rq { font-family: var(--text); font-weight: 600; }
.ra { font-size: .95rem; color: var(--muted); }
.ra.right { color: var(--leaf); font-weight: 800; }
/* 結果 */
.result-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.stamp { font-size: 2rem; font-weight: 800; color: var(--shu); line-height: 1.3; }
.big-level { font-size: 1.6rem; font-weight: 800; }
.scrolls { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sc { height: 40px; border: 2.5px solid var(--ink); border-radius: 8px; background: var(--card); display: flex; align-items: center; justify-content: center; font-family: var(--text); font-weight: 600; font-size: .95rem; color: var(--muted); }
.sc.ok { background: var(--leaf-soft); color: var(--ink); }
.sc.start { background: var(--shu); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--ink); display: inline-block; }
.adult { background: var(--card); border: 3px solid var(--ink); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { background: var(--sky); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact span { font-size: .8rem; color: var(--muted); font-weight: 800; letter-spacing: .04em; }
.fact strong { font-size: 1.2rem; }
.table-wrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; min-width: 40rem; font-variant-numeric: tabular-nums; }
table.grid th, table.grid td { padding: 9px 8px; border-bottom: 2px solid var(--mist); text-align: left; vertical-align: top; }
table.grid th { font-size: .82rem; color: var(--muted); letter-spacing: .04em; }
.ok { color: var(--leaf); font-weight: 800; }
.ng { color: var(--shu); font-weight: 800; }
.notes { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.hist { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
a.btn { display: inline-block; text-decoration: none; }
.hist-item { font: inherit; text-align: left; width: 100%; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.hist-item:hover, .hist-item:focus-visible { background: var(--paper); outline: 3px solid var(--sun); outline-offset: 2px; }
.hist div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px dashed var(--mist); padding-bottom: 4px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .pop { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
  @keyframes pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (max-width: 480px) {
  h1 { font-size: 1.55rem; }
  .picks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bubble { font-size: .95rem; }
  .pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kk { font-size: 1rem; padding: 8px 0; }
  .kana { gap: 3px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .sc { height: 34px; font-size: .8rem; }
}
/* トップページの入口 */
.hero { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.hero h1 { font-size: 2.1rem; }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.door { font: inherit; text-align: left; cursor: pointer; color: var(--ink); background: var(--card); border: 3px solid var(--ink); border-radius: 24px; padding: 22px 20px 20px; box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: transform .08s, box-shadow .08s; }
.door:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.door:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.door .who-for { font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.door .dname { font-size: 1.45rem; font-weight: 800; line-height: 1.35; }
.door .ddesc { font-size: .95rem; color: var(--muted); }
.door .dgo { margin-top: auto; align-self: flex-start; font-weight: 800; color: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 6px 16px; }
.door.school .who-for { color: var(--muted); }
.door.school .dgo { background: var(--muted); }
.door.home { background: var(--paper); }
.door.home .who-for { color: var(--shu); }
.door.home .dgo { background: var(--leaf); }
.soon { display: inline-block; font-size: .78rem; font-weight: 800; padding: 1px 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--mist); margin-left: 6px; vertical-align: .2em; }
.foot { font-size: .8rem; color: var(--muted); text-align: center; padding-top: 8px; }
.backlink { font: inherit; font-size: .9rem; font-weight: 800; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; align-self: flex-start; }
.backlink:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.snd { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 10; width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 var(--ink); }
.snd:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.snd:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.snd svg { width: 26px; height: 26px; }
@media (max-width: 600px) { .doors { grid-template-columns: minmax(0, 1fr); } .hero h1 { font-size: 1.6rem; } }

/* ===== 道場・先生・保護者・記録の画面（10月16日にひとつのページにまとめた） ===== */
input[type="password"] { font: inherit; font-size: 1.1rem; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); width: 100%; max-width: 22rem; }
input:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.err { color: var(--shu); font-weight: 800; }
.wscrolls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wscroll { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .8rem; font-weight: 800; color: var(--muted); }
.wscroll svg { width: 100%; max-width: 96px; height: auto; }
.wscroll.got { color: var(--ink); }
.days { display: flex; gap: 4px; }
.days span { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--ink); background: var(--card); font-size: .65rem; display: flex; align-items: center; justify-content: center; }
.days span.on { background: var(--leaf); color: #fff; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; border: 2px solid var(--ink); white-space: nowrap; }
.chip.ok { background: var(--leaf); color: #fff; }
.chip.near { background: var(--sun); }
.chip.call { background: var(--shu); color: #fff; }
.chip.local { background: var(--paper); }
.sample-note { font-size: .85rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { border: 3px solid var(--ink); border-radius: 18px; padding: 12px; background: var(--card); min-width: 0; }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }
.switch { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.switch input { margin-top: .35em; width: 18px; height: 18px; accent-color: var(--shu); }
.savenote { font-size: .82rem; color: var(--muted); }
.savenote.warn { color: var(--shu); font-weight: 800; }
.kirirow { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.kirirow span { height: 2.4rem; border: 2.5px solid var(--ink); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; background: var(--card); color: var(--muted); }
.kirirow span.ok { background: var(--leaf-soft); color: var(--ink); }
.kirirow span.start { background: var(--shu); color: #fff; }
.adminrow { cursor: pointer; }
.adminrow:hover td, .adminrow:focus-visible td { background: var(--paper); }
.adminrow:focus-visible { outline: 3px solid var(--sun); }
.tmono { font-family: ui-monospace, monospace; font-weight: 700; }
@media (max-width: 480px) { .stats { grid-template-columns: minmax(0, 1fr); } .wscrolls { gap: 6px; } .kirirow { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* ===== 100段・ふりがな・確認用（10月15日） ===== */
ruby { ruby-align: center; ruby-position: over; }
ruby rt { font-size: .5em; font-weight: 500; letter-spacing: -.02em; }
.passage.tate ruby rt { font-size: .45em; }
.passage .ln { border-radius: 6px; transition: background .2s; }
.passage .ln.on { background: var(--sun); box-shadow: 0 0 0 3px var(--sun); }
.passage.low { word-spacing: .05em; }
.kword { font-family: var(--text); font-size: 2.6rem; font-weight: 600; letter-spacing: .1em; text-align: center; padding: 6px 0; }
.kword u { text-decoration-color: var(--shu); text-decoration-thickness: 4px; text-underline-offset: 10px; }
.idk { font: inherit; font-weight: 800; font-size: .95rem; align-self: center; border: 2px dashed var(--muted); color: var(--muted); background: var(--mist); border-radius: 14px; padding: 8px 18px; cursor: pointer; }
.idk:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.choice.ok { background: var(--leaf); color: #fff; }
.choice.ng { background: var(--card); text-decoration: line-through; opacity: .6; }
.choice:disabled { cursor: default; }
.kfb { border: 3px solid var(--ink); border-radius: 16px; padding: 10px 14px; font-weight: 800; background: var(--paper); }
.kfb.good { background: #CDEFE1; }
.kres { display: flex; gap: 8px; flex-wrap: wrap; }
.kres span { min-width: 3.2rem; text-align: center; border: 2.5px solid var(--ink); border-radius: 10px; padding: 4px 8px; font-family: var(--text); font-weight: 600; background: var(--card); }
.kres span.ok { background: #CDEFE1; }
.kres span.ng { background: #FFE0D6; }
.kres span.idk2 { background: var(--mist); }
.kres small { display: block; font-size: .7rem; color: var(--muted); font-family: var(--ui); }
/* 地図 */
.map { display: flex; flex-direction: column; gap: 14px; }
.map h3 { font-size: .95rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.9rem, 1fr)); gap: 6px; }
.tile { font: inherit; font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; position: relative; height: 2.6rem; border: 2px solid var(--mist); border-radius: 10px; background: var(--card); color: var(--muted); cursor: pointer; }
.tile.kiri { border-color: var(--ink); }
.tile.has { color: var(--ink); background: var(--paper); border-color: var(--ink); }
.tile.has::after { content: ""; position: absolute; right: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.tile.done { background: #CDEFE1; color: var(--ink); }
.tile.now { background: var(--shu); color: #fff; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.tile:focus-visible { outline: 4px solid var(--sun); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--ink); display: inline-block; }
.sess { display: flex; flex-direction: column; gap: 8px; }
.sess button { font: inherit; text-align: left; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 16px; background: var(--card); color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.sess button:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.sess b { font-family: var(--text); font-size: 1.15rem; }
.checkbar { background: var(--ink); color: #fff; border-radius: 14px; padding: 8px 14px; font-size: .88rem; font-weight: 800; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.checkbar button { font: inherit; font-weight: 800; font-size: .85rem; border: 2px solid #fff; color: #fff; background: transparent; border-radius: 10px; padding: 2px 10px; cursor: pointer; }
.lvbar { display: flex; gap: 6px; }
.lvbar i { flex: 1; height: 12px; border-radius: 6px; border: 2px solid var(--ink); background: var(--card); }
.lvbar i.p { background: var(--leaf-soft, #CDEFE1); }
.lvbar i.f { background: var(--leaf); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { font: inherit; font-weight: 800; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 16px; background: var(--card); color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--sun); }

/* ===== キャラクター（10月26日：イラスト納品。ヨミゾウ・コノハ・ウタ・リク） ===== */
.chara { display: block; height: auto; max-width: 100%; }
.face { flex: none; width: var(--fs, 56px); height: var(--fs, 56px); border-radius: 50%; border: 3px solid var(--ink); background: var(--fbg, #FFF3D6); overflow: hidden; display: block; }
.face img { width: 100%; height: 100%; display: block; }
.face.yomizo { --fbg: #FFF3D6; } .face.konoha { --fbg: #D9F1FA; } .face.uta { --fbg: #CDEFE1; } .face.riku { --fbg: #FFDCD3; }
.talk { display: flex; gap: 14px; align-items: flex-end; }
/* 会話の回：左に話している人の顔（名前は読み上げ用にだけ残す） */
.passage p.say { text-indent: 0; display: flex; gap: .55em; align-items: flex-start; }
.passage p.say .face { --fs: 2.3em; border-width: 2px; margin-top: .2em; }
.passage.tate p.say .face { margin: 0 .2em 0 0; }
.passage p.say .ln { min-width: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* トップ：4人がならぶ */
.hero2 { background: linear-gradient(to bottom, #BFE6F3 0, #E6F5FA 70%, #F7E2B5 70%, #F7E2B5 100%); border: 3px solid var(--ink); border-radius: 26px; padding: 22px 16px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; overflow: hidden; }
.hero2 h1 { font-size: 2.2rem; }
.hero2 .lead { font-weight: 800; color: var(--muted); }
.nw { white-space: nowrap; display: inline-block; }
.hero2 .pill { font-weight: 800; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 6px 18px 4px; box-shadow: 0 4px 0 var(--ink); margin-top: 6px; line-height: 1.9; }
.hero2 .pill rt, .hero2 .lead rt { font-size: .5em; }
.cast { font: inherit; display: flex; align-items: flex-end; justify-content: center; gap: 2%; width: 100%; max-width: 34rem; margin-top: 10px; padding: 0 0 10px; background: none; border: 0; cursor: pointer; }
.cast img { height: auto; }
.cast .c-yomizo { width: 37%; } .cast .c-konoha { width: 17%; } .cast .c-uta { width: 17.5%; } .cast .c-riku { width: 16.5%; }
.cast:focus-visible { outline: 4px solid var(--sun); outline-offset: -4px; border-radius: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .cast:hover img { animation: hop .9s ease-in-out 1; transform-origin: 50% 100%; }
  .cast:hover img:nth-child(2) { animation-delay: .08s; } .cast:hover img:nth-child(3) { animation-delay: .16s; } .cast:hover img:nth-child(4) { animation-delay: .24s; }
}
@media (max-width: 600px) { .hero2 h1 { font-size: 1.6rem; } .hero2 .pill { font-size: .95rem; border-radius: 22px; } }
/* キャラクターしょうかい */
.cast-list { display: grid; gap: 16px; }
.cast-card { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 16px; align-items: center; background: var(--card); border: 3px solid var(--ink); border-radius: 22px; padding: 16px 18px; }
.cast-card .pic { display: flex; align-items: flex-end; justify-content: center; height: 11rem; border-radius: 16px; background: var(--fbg); border: 0; box-shadow: none; padding: 8px 0 0; cursor: default; font-size: inherit; }
.cast-card .pic img { max-height: 100%; width: auto; }
.cast-card.yomizo { --fbg: #FFF3D6; } .cast-card.konoha { --fbg: #D9F1FA; } .cast-card.uta { --fbg: #CDEFE1; } .cast-card.riku { --fbg: #FFDCD3; }
.cast-card h2 { font-size: 1.7rem; }
.cast-card .kind { font-size: .9rem; font-weight: 800; color: var(--shu); }
.cast-card ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.cast-card .line { font-family: var(--text); font-weight: 600; font-size: 1.1rem; background: var(--paper); border-radius: 12px; padding: 6px 12px; }
.cast-card .line::before { content: "「"; } .cast-card .line::after { content: "」"; }
@media (max-width: 520px) { .cast-card { grid-template-columns: minmax(0, 1fr); } .cast-card .pic { height: 12rem; } }

/* お試し入門テスト（登録ページ用）で足したもの */
body { margin: 0; }
a.backlink { text-decoration: none; }
.notes li { line-height: 1.8; }
.buy .note-small { line-height: 1.7; }
.hdr { gap: 16px; align-items: flex-end; }
.hdr-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b { font-weight: 800; }
.note-big { font-size: 1.15rem; font-weight: 800; line-height: 1.8; }
.passage.survey-p { --pfs: 1.5rem; }
.row.end { justify-content: flex-end; }
.legend b.lg-ok { background: var(--leaf-soft); }
.legend b.lg-start { background: var(--shu); }
.shu { color: var(--shu); }
.intro-h { font-size: 1.15rem; font-weight: 800; line-height: 1.5; text-wrap: balance; }
.nw { display: inline-block; }

/* hidden の付いたものは必ず隠す（.adult の display:flex より優先） */
[hidden] { display: none !important; }
/* 学年の分かれ道（10月26日） */
.grade-ask .choice { font-family: var(--ui); font-weight: 800; }
.grade-ask .choice small { display: block; margin-top: 4px; font-size: .85rem; font-weight: 500; color: var(--muted); }
