/* 教科書シネマの見た目（2026-10-26 作り直し）。手本は My Memora（オーナー「My Memora の質感が理想」）：
   グレー地 #F2F2F4・白いカード・黒 #1D1D1F の丸いボタン・白黒だけ・字は端末の字（iPhone は SF とヒラギノ）・下はガラスの浮いたタブ。
   演習のページは白いカード。終わると右下がめくれて、スワイプで次へ（10/19 の教科書の形）。 */
:root {
  --bg: #F2F2F4; --card: #fff; --ink: #1D1D1F; --sub: #86868B; --sub2: #6E6E73; --line: #E3E3E8;
  --fill: #F2F2F4; --fill2: #E9E9EE; --panel: #F5F5F7; --mute: #AEAEB2; --red: #FF3B30; --redbg: #FFF0EF;
  /* ダークモードで入れかえる色（10/26 オーナー：濃いグレー・端末の設定に合わせる） */
  --on-ink: #fff; --press: #F7F7F9; --track: #E5E5EA; --rule: #D1D1D6; --dash: #C7C7CC; --mid: #8E8E93; --sheet: #F7F7F9;
  --sea: #E6E6EB; --land: #fff; --landline: #CBCBD0; --riv: #A9A9AF; --rivm: #BDBDC2; --slotbg: rgba(255,255,255,.92);
  --navbg: rgba(255,255,255,.78); --navact: rgba(0,0,0,.06); --segbg: #E4E4E9; --back1: #F9F9FA; --back2: #F4F4F6;
  --oi: 255,255,255; --ik: 29,29,31;
  color-scheme: light;
  --sh: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -14px rgba(0,0,0,.12);
  --sh-c: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -12px rgba(0,0,0,.14), 0 40px 70px -40px rgba(0,0,0,.2);
  --sh-b: 0 1px 2px rgba(0,0,0,.05), 0 6px 16px -8px rgba(0,0,0,.18);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --num: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Inter", sans-serif;
  --page-r: 28px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--font); color: var(--ink); font-weight: 400; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overflow-x: hidden; font-feature-settings: "palt";
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font-family: inherit; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font-size: inherit; font-weight: inherit; text-align: inherit; }
svg { display: block; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; overflow-x: hidden; }

/* 画面（動くのは .screen の中だけ） */
.screen { display: none; position: fixed; top: 0; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: none; padding-bottom: calc(118px + var(--sab)); }
.screen.on { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: .4; } to { opacity: 1; } }
.pad { padding: 0 16px; }

/* 見出し */
.hhd { display: flex; align-items: center; gap: 12px; padding: calc(var(--sat) + 10px) 16px 0; min-height: calc(var(--sat) + 58px); }
.hhd .seg { flex: 1; }
.lhd { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: calc(var(--sat) + 18px) 20px 6px 21px; }
.lhd .t { font-size: 32px; font-weight: 700; letter-spacing: .01em; line-height: 1.15; margin: 0; white-space: nowrap; }
.nhd { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--sat) + 10px) 16px 0; min-height: calc(var(--sat) + 50px); }
.ttl { padding: 12px 21px 0; }
.ttl h1 { font-size: 28px; font-weight: 700; letter-spacing: .01em; line-height: 1.25; margin: 0; }
.ttl p { font-size: 13px; color: var(--sub); margin: 4px 0 0 1px; }
.round { width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: var(--sh-b); display: grid; place-items: center; color: var(--ink); flex: none; }
.round svg { width: 20px; height: 20px; }
.round:disabled { color: var(--mute); }
.gh { font-size: 13px; font-weight: 600; color: var(--sub); margin: 22px 6px 8px; letter-spacing: .02em; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gh em { font-style: normal; font-family: var(--num); font-variant-numeric: tabular-nums; font-weight: 500; }
.gf { font-size: 12px; color: var(--sub); line-height: 1.6; margin: 8px 6px 0; }

/* ホームの大きな科目名 */
.big { padding: 18px 22px 0; }
.big h1 { font-size: 34px; font-weight: 700; letter-spacing: .02em; line-height: 1.15; margin: 0; }
.big p { margin: 6px 0 0 1px; font-size: 13px; color: var(--sub); }
.big p em { font-style: normal; font-family: var(--num); font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

/* 白いカードと一覧 */
.grp2 { background: var(--card); border-radius: 24px; box-shadow: var(--sh); overflow: hidden; }
.grp2 + .grp2 { margin-top: 12px; }
.rw { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 18px 12px 16px; text-align: left; }
.rw + .rw::before { content: ''; position: absolute; top: 0; left: 72px; right: 0; height: .5px; background: var(--line); }
.ic { width: 42px; height: 42px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; flex: none; color: var(--ink); }
.ic svg { width: 20px; height: 20px; }
.ic.k { background: var(--ink); color: var(--on-ink); }
.rw .tx { flex: 1; min-width: 0; }
.rw .tx b { display: block; font-size: 17px; font-weight: 500; letter-spacing: .01em; }
.rw .tx small { display: block; font-size: 12.5px; color: var(--sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw .v { font-family: var(--num); font-size: 28px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.chev { width: 8px; height: 14px; color: var(--dash); flex: none; }
.lrow { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 10px 16px; text-align: left; }
.lrow + .lrow::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--line); }
.lrow .tx { flex: 1; min-width: 0; }
.lrow .tx b { display: block; font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .tx small { display: block; font-size: 12.5px; color: var(--sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .tx small.w2 { white-space: normal; text-overflow: clip; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.3; }   /* 入りきらない時は文節の間で2行（設定の卒業・11/29 総点検） */
.lrow .tx .pb { margin-top: 8px; width: 60%; max-width: 170px; }
.lrow .ct { font-family: var(--num); font-size: 13px; font-weight: 500; color: var(--sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lrow.red .tx b { color: var(--red); }
.rw:active, .lrow:active, .crow:active, .trow:active { background: var(--press); }
.pb { display: block; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.pb i { display: block; height: 100%; border-radius: 2px; background: var(--ink); }
.crow { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 11px 16px; text-align: left; }
.crow + .crow::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--line); }
.crow .tx { flex: 1; min-width: 0; }
.crow .tx b { display: block; font-size: 15px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.crow .tx small { display: block; font-size: 12.5px; color: var(--sub); margin-top: 2px; line-height: 1.45; }
.empty { text-align: center; color: var(--sub); font-size: 14px; padding: 28px 18px; line-height: 1.75; }
.hello { padding: 28px 22px 24px; text-align: center; }
.hello .ic { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; }
.hello .ic svg { width: 30px; height: 30px; }
.hello b { display: block; font-size: 18px; font-weight: 700; }
.hello p { font-size: 13.5px; color: var(--sub2); line-height: 1.7; margin: 8px 0 0; }

/* 続きから */
.cont { padding: 18px 18px 18px; }
.cont .lbl { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--sub); letter-spacing: .04em; }
.cont .lbl em { font-style: normal; font-family: var(--num); font-variant-numeric: tabular-nums; }
.cont .nm { display: flex; align-items: center; gap: 14px; margin: 14px 0 16px; }
.cont .nm .ic { width: 52px; height: 52px; }
.cont .nm .ic svg { width: 22px; height: 22px; }
.cont .nm b { display: block; font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: .01em; }
.cont .nm small { display: block; font-size: 13px; color: var(--sub); margin-top: 3px; }
.cont .pb { height: 6px; border-radius: 3px; margin: 0 0 16px; }
.cont .btn { width: 100%; height: 54px; border-radius: 27px; font-size: 16.5px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); padding: 16px 6px; }
.stats3 > * { text-align: center; }
.stats3 > * + * { border-left: .5px solid var(--line); }
.stats3 small { display: block; font-size: 12px; color: var(--sub); }
.stats3 b { display: block; font-family: var(--num); font-size: 30px; font-weight: 300; line-height: 1.2; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* 目次（テーマごとの白いカード） */
.trow { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; }
.trow + .trow::before { content: ''; position: absolute; top: 0; left: 52px; right: 0; height: .5px; background: var(--line); }
.trow .no { width: 26px; flex: none; font-family: var(--num); font-size: 15px; font-weight: 600; color: var(--sub2); text-align: center; font-variant-numeric: tabular-nums; }
.trow .tx { flex: 1; min-width: 0; }
.trow .tx b { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }
.trow .tx small { display: block; font-size: 12.5px; color: var(--sub); margin-top: 1px; }
.trow.sub { padding-top: 10px; padding-bottom: 10px; }
.trow.sub .tx b { font-size: 14.5px; font-weight: 500; }
.trow.cur { background: var(--press); }
.trow.cur::after { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ink); }
.ck { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--rule); color: var(--on-ink); }
.ck svg { width: 12px; height: 12px; }
.ck.on { background: var(--ink); box-shadow: none; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--fill); font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--sub2); }

/* ボタン */
.btn { height: 52px; border-radius: 26px; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 20px; cursor: pointer; white-space: nowrap; letter-spacing: .03em; text-align: center; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.pri { background: var(--ink); color: var(--on-ink); }
.btn.pri:disabled { background: var(--dash); color: var(--on-ink); }
.btn.white { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.14), 0 6px 16px -10px rgba(0,0,0,.2); }
.btn.gray { background: var(--fill2); color: var(--ink); }
.btn.red { background: var(--redbg); color: var(--red); }
.btn.wide { width: 100%; }
.btn.sm { height: 40px; font-size: 14px; padding: 0 16px; border-radius: 20px; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btns { display: flex; gap: 10px; }
.btns > * { flex: 1; min-width: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 38px; border-radius: 12px; background: var(--segbg); padding: 2px; }
.seg button { border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink); display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; }
.seg button.on { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button em { font-style: normal; font-family: var(--num); color: var(--sub); margin-left: 4px; font-weight: 500; }
.sw { position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--track); transition: background .2s; flex: none; }
.sw i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.sw.on { background: var(--ink); }
.sw.on i { transform: translateX(20px); }

/* 下のタブ（ガラスの浮いたタブ） */
.nav { position: fixed; left: 50%; bottom: calc(12px + var(--sab)); transform: translateX(-50%); z-index: 30; height: 62px; padding: 0 7px; border-radius: 31px; background: var(--navbg); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 .5px rgba(0,0,0,.07), 0 12px 30px -12px rgba(0,0,0,.22); display: flex; align-items: center; gap: 2px; }
.nav .it { width: 86px; height: 50px; border-radius: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 500; color: var(--ink); }
.nav .it svg { width: 24px; height: 24px; }
.nav .it.act { background: var(--navact); font-weight: 600; }
body.studying .nav { display: none; }

/* 下に浮くシート */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.32); opacity: 0; transition: opacity .2s; }
.sheet-bg.on { opacity: 1; }
.sheet { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--sab)); z-index: 61; max-width: 464px; margin: 0 auto; background: var(--sheet); border-radius: 38px; padding: 12px 16px 20px; max-height: calc(100vh - var(--sat) - 40px); max-height: calc(100dvh - var(--sat) - 40px); overflow-y: auto; -webkit-overflow-scrolling: touch; transform: translateY(110%); transition: transform .26s cubic-bezier(.2,.8,.2,1); box-shadow: 0 -10px 40px -10px rgba(0,0,0,.25); }
.sheet.on { transform: translateY(0); }
.sheet .grip { width: 38px; height: 5px; border-radius: 3px; background: var(--rule); margin: 0 auto 14px; }
.sh-x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--fill2); color: var(--sub2); display: grid; place-items: center; z-index: 2; }
.sh-x svg { width: 14px; height: 14px; }
.sheet h3 { margin: 0 46px 6px 6px; font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.sheet .lead { font-size: 13.5px; color: var(--sub2); line-height: 1.65; margin: 0 6px 14px; }
.sheet .btns { margin-top: 18px; }
.sheet .grp2 { box-shadow: inset 0 0 0 .5px rgba(0,0,0,.06); }
.sheet .gh:first-of-type { margin-top: 8px; }

/* トースト */
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--sab)); transform: translate(-50%, 20px); z-index: 80; background: var(--ink); color: var(--on-ink); font-weight: 500; font-size: 14px; line-height: 1.5; padding: 11px 18px; border-radius: 20px; opacity: 0; transition: all .22s; pointer-events: none; max-width: calc(100% - 32px); width: max-content; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
body.studying .toast { bottom: calc(70px + var(--sab)); }

/* ---------- 演習の本（白いカードのページ） ---------- */
.study { position: fixed; inset: 0; z-index: 40; max-width: 480px; margin: 0 auto; background: var(--card); overflow: hidden; display: flex; flex-direction: column; padding-top: var(--sat); }
.study.in { animation: rise .4s cubic-bezier(.2,.8,.2,1); }   /* ふわっと浮かぶ（111回目② C・アプリ全体・11/27） */
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: none; } }
.st-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px 2px; flex: none; }
.st-top .tt { flex: 1; min-width: 0; text-align: center; }
.st-top .tt b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-top .tt span { display: block; font-size: 11.5px; color: var(--sub); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book { position: relative; flex: 1; min-height: 0; margin: 4px 0 0; }
.frame { position: absolute; inset: 0; }
/* 当てはめ（11/6 全画面）：右上の「1 / 3」（押すと演習をえらぶ）・その下に演習の数だけの線。閉じるは丸い台なし */
.st-top .stnum { min-width: 40px; height: 40px; padding: 0 4px 0 12px; border-radius: 20px; flex: none; background: none; text-align: right; font-family: var(--num); font-size: 13px; font-weight: 700; color: var(--ra2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stl .trow .no svg { width: 20px; height: 20px; }
.stl .tk { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--ra); color: var(--card); display: grid; place-items: center; }
.stl .tk svg { width: 12px; height: 12px; stroke-width: 3.2; }
.page { position: absolute; inset: 0; background: var(--card); overflow: hidden; outline: none; }
.page-in { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 20px 18px 0; display: flex; flex-direction: column; touch-action: pan-y; }
/* 全画面なので、スクロールの棒で地図のはばが細らないようにする（11/6） */
.page-in { scrollbar-width: none; }
.page-in::-webkit-scrollbar { display: none; }
.page-in > .grow { flex: 1 0 auto; }
/* ページの中の部品は縮めない（あふれたら下へスクロール）。overflow:hidden の地図の枠が、答え合わせのあとの余白に押されて縮んでいた */
.page-in > * { flex-shrink: 0; }

/* ページの中 */
.ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 600; color: var(--sub); letter-spacing: .02em; }
.ph span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph .exno { flex: none; font-family: var(--num); font-variant-numeric: tabular-nums; }
.pt { font-size: 23px; font-weight: 700; letter-spacing: .01em; line-height: 1.3; margin: 8px 0 0; }
.how { font-size: 13px; color: var(--sub2); line-height: 1.65; margin: 6px 0 14px; }
.board { position: relative; border-radius: 22px; background: var(--panel); padding: 14px 12px; }
.board.pad0 { padding: 0; overflow: hidden; margin-left: -18px; margin-right: -18px; border-radius: 0; }
.board.pad0 .mapwrap { border-radius: 0; }
.hint { min-height: 1.4em; margin: 10px 2px 0; font-size: 13px; line-height: 1.6; color: var(--sub2); }
.hint.ng { color: var(--red); }
.hint.ok { color: var(--ink); font-weight: 600; }
.dock { position: sticky; bottom: 0; z-index: 3; margin: 6px -18px 0; padding: 18px 18px 16px; background: linear-gradient(rgba(var(--oi),0), var(--card) 18px); }
/* 語の並び：横にスクロールする1〜2段（横になでるとスクロール・上へ引くと置ける） */
.tray { margin: 0 -18px; padding: 4px 18px 12px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tray::-webkit-scrollbar { display: none; }
.tray-in { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 2), auto); grid-auto-columns: max-content; gap: 7px; width: max-content; margin: 0 auto; }
.tray-in:empty { display: none; }
.tray .chip { min-height: 38px; padding: 5px 13px; font-size: 14px; touch-action: none; }
.check { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; border-radius: 27px; background: var(--ink); color: var(--on-ink); font-size: 16.5px; font-weight: 600; letter-spacing: .04em; text-align: center; }
.check:disabled { background: var(--dash); }
.after { margin: 16px 0 0; }
.takeaway { border-radius: 20px; background: var(--panel); padding: 16px 16px 15px; font-size: 14.5px; line-height: 1.8; }
.takeaway .lbl { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--ink); letter-spacing: .14em; }
.takeaway .lbl i { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.takeaway .lbl i svg { width: 12px; height: 12px; }
.takeaway b { font-weight: 700; }
.endpad { height: 110px; flex: none; }

/* 語のチップ */
.chip { position: relative; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; max-width: 100%; padding: 6px 15px; border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.16), 0 5px 14px -9px rgba(0,0,0,.35); font-weight: 600; font-size: 14.5px; line-height: 1.35; text-align: center; letter-spacing: .01em; transition: transform .12s ease, opacity .15s ease, background .2s, color .2s; }
.chip.sel { background: var(--ink); color: var(--on-ink); transform: translateY(-2px); box-shadow: 0 10px 18px -10px rgba(0,0,0,.55); }
.chip.lifting { opacity: .2; }
.chip.locked { cursor: pointer; }
.chip.unsure::after { content: "?"; position: absolute; top: -7px; right: -6px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: 11px; line-height: 19px; text-align: center; font-weight: 700; font-family: var(--num); box-shadow: 0 0 0 2px var(--card); }
.chip.unsure { text-decoration: underline wavy rgba(var(--ik),.45); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ghost { position: fixed; left: 0; top: 0; margin: 0; z-index: 1000; pointer-events: none; opacity: .98; box-shadow: 0 16px 30px -10px rgba(0,0,0,.4); }
.tgt.ok .chip { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.tgt.bad .chip { box-shadow: 0 0 0 2px var(--red); animation: shake .36s; }
@keyframes shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* 空欄 */
.slot { display: inline-flex; align-items: center; justify-content: center; min-width: 6.4em; min-height: 38px; max-width: 100%; padding: 2px 8px; border-radius: 12px; border: 1.5px dashed var(--dash); background: var(--card); transition: transform .15s, border-color .15s; }
.slot::before { content: ""; width: 14px; height: 2px; border-radius: 1px; background: var(--rule); }
.slot.over { transform: scale(1.05); border-style: solid; border-color: var(--ink); }
.selecting .slot:not(.has) { animation: pulse 1.3s ease-in-out infinite; border-color: var(--ink); }
.slot.has { border-color: transparent; background: transparent; padding: 0; min-width: 0; }
.slot.has::before { content: none; }
.slot .chip { min-height: 36px; padding: 4px 11px; font-size: 13.5px; white-space: normal; }

/* 比べる表 */
.tbl { display: grid; gap: 6px; align-items: stretch; }
.tbl .th { display: flex; align-items: flex-end; justify-content: center; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--sub2); line-height: 1.35; padding: 0 4px 2px; }
.tbl .th.corner { background: transparent; }
.tbl .rh { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.35; padding: 6px 8px; border-radius: 12px; background: var(--card); min-width: 3.6em; box-shadow: 0 0 0 .5px rgba(0,0,0,.06); }
.tbl.long .rh { justify-content: flex-start; text-align: left; font-size: 12.5px; font-weight: 600; line-height: 1.5; padding: 8px 11px; min-width: 0; }
.tbl .td { display: flex; min-width: 0; }
.tbl .td > span:not(.slot) { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; line-height: 1.4; padding: 6px; border-radius: 12px; background: var(--fill2); }
.tbl .slot { flex: 1; min-width: 0; min-height: 50px; }
.tbl .slot .chip { width: 100%; font-size: 13px; padding: 4px 6px; min-height: 46px; border-radius: 12px; }

/* 流れ図（地域ごとの列） */
.lanes { --gap: 34px; display: grid; column-gap: var(--gap); align-items: stretch; }
.lanes[data-n="1"] { --gap: 0px; max-width: 290px; margin: 0 auto; width: 100%; }
.lanes[data-n="3"] { --gap: 22px; }
.lanes[data-n="4"] { --gap: 9px; }
.lane-h { font-size: 11.5px; font-weight: 600; color: var(--sub2); text-align: center; padding: 0 2px 8px; line-height: 1.3; }
.lanes[data-n="4"] .lane-h { font-size: 10px; letter-spacing: -.02em; }
.cell { position: relative; display: flex; flex-direction: column; min-width: 0; padding-bottom: 30px; }
.cell.end { padding-bottom: 0; }
.cell > .box { flex: 1 1 auto; }
.box { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 3px 10px -6px rgba(0,0,0,.18); text-align: center; font-weight: 600; font-size: 14px; line-height: 1.35; transition: background .5s, color .5s; }
.box .main, .box .sub { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.box .sub { font-size: 11.5px; color: var(--sub2); font-weight: 600; }
.box .btxt { padding: 2px 0; }
.box.given { background: var(--fill2); box-shadow: none; padding: 12px 8px; color: var(--sub2); }
.lanes[data-n="4"] .box { font-size: 11px; padding: 7px 3px; gap: 4px; border-radius: 11px; }
.lanes[data-n="4"] .box.given { padding: 10px 4px; }
.cell.down .box::after { content: ""; position: absolute; left: 50%; bottom: -24px; height: 18px; border-left: 1.5px solid var(--mute); }
.cell.down .box::before { content: ""; position: absolute; left: calc(50% - 4.5px); bottom: -27px; border-top: 7px solid var(--mute); border-left: 5px solid transparent; border-right: 5px solid transparent; }
.dlabel { position: absolute; bottom: 7px; left: calc(50% + 10px); font-size: 10.5px; font-weight: 600; color: var(--sub); white-space: nowrap; line-height: 1.2; }
.xarrow { position: absolute; top: 50%; width: var(--gap); border-top: 1.5px solid var(--mute); }
.xarrow.l { left: calc(-1 * var(--gap)); }
.xarrow.r { right: calc(-1 * var(--gap)); }
.xarrow.l::before { content: ""; position: absolute; left: -2px; top: -6px; border-right: 8px solid var(--mute); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.xarrow.r::before { content: ""; position: absolute; right: -2px; top: -6px; border-left: 8px solid var(--mute); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.xarrow span { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 600; color: var(--sub2); white-space: nowrap; background: var(--panel); padding: 0 2px; border-radius: 3px; line-height: 1.3; z-index: 2; }
.lanes[data-n="4"] .xarrow span { font-size: 10px; bottom: 4px; }
.sub .slot { min-width: 5.6em; min-height: 34px; }
.lanes[data-n="4"] .slot, .lanes[data-n="3"] .slot { min-width: 0; width: 100%; }
.lanes[data-n="4"] .slot .chip, .lanes[data-n="3"] .slot .chip { font-size: 12px; padding: 3px 5px; min-height: 32px; width: 100%; border-radius: 10px; }
.lanes[data-n="4"] .slot .chip { font-size: 10.5px; padding: 2px 2px; letter-spacing: -.03em; }
/* 終わったあとの色分け（白黒の濃さで） */
.lanes.revealed .box[data-fam] .chip { background: transparent; color: inherit; box-shadow: none; }
.lanes.revealed .box[data-fam="a"] { background: var(--ink); color: var(--on-ink); }
.lanes.revealed .box[data-fam="b"] { background: var(--sub2); color: var(--on-ink); }
.lanes.revealed .box[data-fam="c"] { background: var(--rule); color: var(--ink); }
.lanes.revealed .box[data-fam="d"] { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.lanes.revealed .box[data-fam="a"] .sub, .lanes.revealed .box[data-fam="b"] .sub { color: rgba(var(--oi),.75); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--sub2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend i[data-fam="a"] { background: var(--ink); }
.legend i[data-fam="b"] { background: var(--sub2); }
.legend i[data-fam="c"] { background: var(--rule); }
.legend i[data-fam="d"] { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }

/* 地図 */
.mapwrap { position: relative; border-radius: 22px; overflow: hidden; background: var(--sea); }
.map { width: 100%; height: auto; }
.map .sea { fill: var(--sea); }
.map .land { fill: var(--land); stroke: var(--landline); stroke-width: .8; stroke-linejoin: round; }
.map .riv { fill: none; stroke: var(--riv); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s, stroke-width .4s; }
.map .riv.minor { stroke-width: 1; stroke: var(--rivm); }
.map .riv.lit { stroke: var(--ink); stroke-width: 2.6; }
.map .crescent { fill: none; stroke: rgba(var(--ik),.16); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .6s; }
.map.revealed .crescent { opacity: 1; }
.map .route { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 5; opacity: 0; transition: opacity .6s; }
.map.revealed .route { opacity: .8; }
.map .route-l { font-size: 13px; font-weight: 700; fill: var(--ink); stroke: var(--card); stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; opacity: 0; transition: opacity .6s; }
.map.revealed .route-l { opacity: 1; }
.map .sea-l { font-size: 19px; font-style: italic; fill: var(--mid); letter-spacing: .14em; font-weight: 500; }
.map .sea-l.small { font-size: 15px; letter-spacing: .06em; }
.map .region-l { font-size: 22px; font-weight: 700; fill: var(--sub2); letter-spacing: .1em; stroke: var(--card); stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }
.map .region-l.small { font-size: 17px; letter-spacing: .04em; }
.mlayer { position: absolute; inset: 0; }
.mslot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 1.5px dashed var(--mid); background: var(--slotbg); display: grid; place-items: center; transition: border-color .2s, background .2s; }
.mslot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mid); }
.selecting .mslot:not(.has) { animation: pulse 1.3s ease-in-out infinite; border-color: var(--ink); }
.mslot.over { border-style: solid; border-color: var(--ink); box-shadow: 0 0 0 6px rgba(var(--ik),.12); }
.mslot.has { border-style: solid; border-color: var(--ink); }
.mslot.has::before { background: var(--ink); }
.mslot.ok { border-color: var(--ink); background: var(--ink); }
.mslot.ok::before { background: var(--card); }
.mslot.bad { border-color: var(--red); }
.mslot .chip { position: absolute; top: 50%; left: 21px; margin-top: -15px; max-width: none; min-height: 30px; padding: 2px 10px; font-size: 12.5px; white-space: nowrap; border-radius: 15px; z-index: 2; }
.mslot[data-side="l"] .chip { left: auto; right: 21px; }
.mslot[data-side="b"] .chip { left: 50%; top: auto; bottom: auto; margin-top: 0; translate: -50% 28px; }
.mslot[data-side="t"] .chip { left: 50%; top: auto; bottom: auto; margin-top: 0; translate: -50% -34px; }

/* スワイプ仕分け */
.sortbox { display: grid; gap: 12px; }
.deck { position: relative; height: 210px; }
.scard { position: absolute; inset: 6px 4%; display: grid; place-items: center; text-align: center; padding: 30px 18px 18px; border-radius: 24px; background: var(--card); box-shadow: var(--sh-c); font-weight: 600; font-size: 19px; line-height: 1.55; letter-spacing: .01em; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; will-change: transform; transition: transform .25s cubic-bezier(.2,1.2,.4,1); --l: 0; --r: 0; overflow: hidden; }
.scard.back { transform: translateY(12px) scale(.94); background: var(--press); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 22px -14px rgba(0,0,0,.16); cursor: default; }
.scard .side { position: absolute; top: 12px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--on-ink); transition: opacity .1s; }
.scard .side.l { left: 12px; opacity: var(--l); }
.scard .side.r { right: 12px; opacity: var(--r); }
.scard .stext { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
/* 写真のカード（文化史・11/6）：写真だけを出し、答えたら名前を出す */
.scard .simg { display: block; max-width: 100%; max-height: 190px; margin: 0 auto; border-radius: 10px; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.scard .sname { display: none; margin-top: 8px; font-size: 15px; font-weight: 700; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.scard.named .sname, .scard.wrong .sname { display: block; }
.sortbox.four .fdeck .scard.pic { padding: 10px 8px; }
/* 写真の仕分けは、左右の箱を少し細くしてカード（写真）を広げる */
.sortbox.four.pics .fz.l, .sortbox.four.pics .fz.r { width: 21%; padding-left: 5px; padding-right: 5px; }
.sortbox.four.pics .fdeck { left: 22.5%; right: 22.5%; }
.sortbox.four.pics .fourf, .sortbox.four.pics[data-n="3"] .fourf { height: 340px; }
.crl { display: grid; margin-top: 6px; }
.crl .cr1 { display: grid; gap: 2px; padding: 10px 0; border-bottom: .5px solid var(--line); }
.crl .cr1 b { font-size: 15px; }
.crl .cr1 small { font-size: 12px; color: var(--sub2); line-height: 1.5; }
.crl .cr1 small.u { color: var(--sub); word-break: break-all; }
.scard .why { display: none; margin-top: 10px; font-size: 13px; font-weight: 400; line-height: 1.6; color: var(--sub2); }
.scard.wrong { background: var(--press); }
.scard.wrong .why { display: block; }
.scard .why b { display: block; color: var(--red); font-weight: 700; margin-bottom: 2px; }
.scard.shake { animation: shake .4s; }
.sort-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--sub); padding: 0 4px; font-family: var(--num); }
.combo { font-weight: 700; color: var(--ink); }
.sort-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sbtn { height: 50px; border-radius: 25px; background: var(--card); font-size: 14.5px; font-weight: 600; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.14), 0 6px 16px -10px rgba(0,0,0,.2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 12px; text-align: center; }
.sbtn:active { background: var(--ink); color: var(--on-ink); }
.bins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bin { border-radius: 18px; background: var(--card); padding: 10px 10px 12px; min-height: 64px; box-shadow: 0 0 0 .5px rgba(0,0,0,.06); transition: box-shadow .2s; }
.bin.flash { box-shadow: 0 0 0 2px var(--ink); }
.bin h3 { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 2px 8px; font-size: 12px; font-weight: 700; color: var(--ink); }
.bin h3 span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bin .cnt { font-family: var(--num); color: var(--sub); font-weight: 500; }
.bin ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bitem { position: relative; width: 100%; text-align: left; padding: 7px 10px; border-radius: 11px; background: var(--panel); font-size: 12.5px; line-height: 1.45; font-weight: 500; }
.bitem.unsure::after { content: "?"; position: absolute; top: -6px; right: -5px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: 10px; line-height: 17px; text-align: center; font-weight: 700; box-shadow: 0 0 0 2px var(--card); }
.bitem.unsure { text-decoration: underline wavy rgba(var(--ik),.45); text-underline-offset: 3px; }
.sortbox.revealed .deck, .sortbox.revealed .sort-ctl, .sortbox.revealed .sort-meta { display: none; }

/* 終わりのページ */

/* ポイントの小さな数字 */
.float { position: fixed; z-index: 90; pointer-events: none; font-family: var(--num); font-size: 14px; font-weight: 700; color: var(--ink); background: var(--card); padding: 2px 8px; border-radius: 10px; box-shadow: 0 4px 12px -4px rgba(0,0,0,.25); }

@media (prefers-reduced-motion: reduce) {
  .screen.on, .study.in { animation: none; }
  .selecting .slot:not(.has), .selecting .mslot:not(.has) { animation: none; }
}

/* ---------- 演習のページの頭（？と使わない語の数） ---------- */
.phr { display: flex; align-items: center; gap: 8px; flex: none; }
.qbtn { width: 28px; height: 28px; border-radius: 50%; background: var(--fill2); color: var(--sub2); display: grid; place-items: center; font-family: var(--num); font-weight: 700; font-size: 14px; text-align: center; }
.qbtn:active { background: var(--fill2); }
.xn { display: inline-block; align-self: flex-start; margin: 8px 0 0; padding: 3px 10px; border-radius: 10px; background: var(--panel); font-size: 11.5px; font-weight: 600; color: var(--sub2); }
.pt + .board, .xn + .board { margin-top: 14px; }

/* ---------- はじめてのお手本（C） ---------- */
.coach { position: fixed; inset: 0; z-index: 70; background: rgba(17,17,19,.62); animation: fade .2s ease; }
.coach-slot { position: fixed; border-radius: 14px; border: 2px dashed #fff; background: rgba(255,255,255,.14); }
.coach-chip { position: fixed; z-index: 2; margin: 0; white-space: nowrap; min-height: 38px; padding: 5px 13px; font-size: 14px; box-shadow: 0 16px 30px -10px rgba(0,0,0,.45); pointer-events: none; }
.scard.coach-scard { position: fixed; z-index: 2; pointer-events: none; }
.coach-tp { position: fixed; left: 0; top: 0; z-index: 3; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.42); box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 8px 18px rgba(0,0,0,.3); pointer-events: none; }
.coach-box { position: fixed; left: 20px; right: 20px; max-width: 440px; margin: 0 auto; z-index: 4; background: var(--card); border-radius: 24px; padding: 16px 18px; box-shadow: var(--sh-c); text-align: center; }
.coach-box b { display: block; font-size: 17px; font-weight: 700; }
.coach-box small { display: block; font-size: 12.5px; color: var(--sub); margin: 5px 0 14px; line-height: 1.6; }
.coach-box .btn { width: 100%; height: 46px; }

/* ---------- 解いたあと（A：スタンプ・10/26 オーナー） ---------- */
.board.done { position: relative; }
.ptpill { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 13px; background: var(--ink); color: var(--on-ink); font-family: var(--num); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.ptpill i { display: inline-grid; place-items: center; margin: 0 5px 0 -2px; }
.ptpill i svg { width: 13px; height: 13px; stroke-width: 3; }
.endpad.big { height: 46vh; }

/* ---------- 復習（B：演習ごとのカード・10/26 オーナー） ---------- */
.lead2 { margin: 6px 4px 0; font-size: 13px; line-height: 1.65; color: var(--sub2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.gcard { position: relative; display: block; min-height: 150px; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: var(--sh); text-align: left; }
.gcard:active { background: var(--press); }
.gcard .ti { width: 40px; height: 40px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; }
.gcard .ti svg { width: 20px; height: 20px; }
.gcard b { display: block; margin-top: 12px; font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.gcard small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--sub); }
.gcard .cnt { position: absolute; top: 14px; right: 14px; padding: 3px 8px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-size: 11px; font-weight: 700; }
.gcard .cnt.l { background: var(--fill2); color: var(--sub2); }

/* ---------- 仕分け（C：まわりに2列の表ができる・10/26 オーナー） ---------- */
.tchart { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.tchart::before { content: ''; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1.5px; margin-left: -.75px; background: var(--rule); }
.tcol { min-width: 0; padding: 4px 8px 8px; }
.tcol h4 { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 10px; font-size: 12.5px; font-weight: 700; text-align: center; }
.tcol h4 span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcol .cnt { font-family: var(--num); font-weight: 500; color: var(--sub); }
.tcol ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tcol.flash h4 .cnt { color: var(--ink); }
.tcol .bitem { background: var(--card); box-shadow: 0 0 0 .5px rgba(0,0,0,.05), 0 2px 6px -4px rgba(0,0,0,.18); }
.deck.tdeck { grid-column: 1 / -1; position: relative; height: 176px; margin-top: 6px; transition: height .2s ease; }
.tdeck .scard { inset: 8px 13%; font-size: 17px; padding: 26px 14px 14px; }
.tdeck .scard.back { transform: translateY(10px) scale(.95); }
.sortbox.tc .sort-ctl .sbtn { height: 44px; font-size: 13.5px; }
.sortbox.tc.revealed .tdeck { display: none; }

/* ---------- 目次（A：本の目次・10/26 オーナー） ---------- */
.bk { background: var(--card); border-radius: 28px; box-shadow: var(--sh); padding: 6px 18px 8px; margin-top: 14px; }
.sheet .bk { margin-top: 0; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.06); }
.bk-u { display: flex; align-items: baseline; gap: 10px; padding: 18px 2px 7px; border-bottom: 1px solid var(--ink); }
.bk-u b { font-size: 17px; font-weight: 700; letter-spacing: .06em; }
.bk-u em { margin-left: auto; font-style: normal; font-family: var(--num); font-size: 12.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.bk-r { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 13px 2px 11px; text-align: left; border-bottom: .5px solid var(--line); }
.bk-r:last-child { border-bottom: 0; }
.bk-r:active { background: var(--press); }
.bk-r .n { width: 36px; flex: none; white-space: nowrap; font-family: var(--num); font-size: 26px; font-weight: 200; line-height: 1; margin-top: -1px; }
.bk-r .n.s { font-family: var(--font); font-size: 10.5px; font-weight: 700; line-height: 24px; }
.bk-r .tx { flex: 1; min-width: 0; }
.bk-r .ln { display: flex; align-items: baseline; gap: 6px; }
.bk-r .ln b { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.bk-r .ds { display: flex; gap: 5px; margin-top: 7px; }
.bk-r .ds u { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--dash); }
.bk-r .ds u.on { background: var(--ink); box-shadow: none; }
.bk-r .now { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px; background: var(--ink); color: var(--on-ink); font-size: 10.5px; font-weight: 700; vertical-align: 2px; white-space: nowrap; }
.bk-r.fut .n, .bk-r.fut .ln b { color: var(--sub2); }

/* ---------- 設定（A：行ごとのアイコン・10/26 オーナー） ---------- */
.lrow .lic { width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--fill); color: var(--ink); display: grid; place-items: center; }
.lrow .lic svg { width: 18px; height: 18px; }
.lrow .lic.r { background: var(--redbg); color: var(--red); }
.lrow.wi + .lrow.wi::before { left: 60px; }

/* ---------- 科目が多いとき：横にスクロールする切り替え ---------- */
.seg.many { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.seg.many::-webkit-scrollbar { display: none; }
.seg.many button { flex: none; padding: 0 13px; }

/* ---------- 要点のページ ---------- */
.pts .pblk { margin-top: 18px; }
.pts .pblk h3 { margin: 0 0 8px 2px; font-size: 12.5px; font-weight: 700; color: var(--sub); letter-spacing: .08em; }
.pts b { font-weight: 700; }
.pf { list-style: none; margin: 0; padding: 0 0 0 16px; position: relative; }
.pf::before { content: ''; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 2px; background: var(--track); }
.pf li { position: relative; display: flex; gap: 10px; padding: 5px 0; }
.pf li::before { content: ''; position: absolute; left: -16px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
.pf .y { flex: none; width: var(--yw, 3.6em); min-width: 0; font-family: var(--num); font-size: 13px; font-weight: 600; line-height: 1.75; color: var(--sub2); font-variant-numeric: tabular-nums; }
.pf .t { font-size: 15px; line-height: 1.65; }
.pc { display: grid; gap: 8px; }
.pcard { padding: 12px 14px; border-radius: 18px; background: var(--panel); }
.pch { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pch b { font-size: 16px; }
.pch small { font-size: 12px; color: var(--sub); }
.pcard ul { margin: 6px 0 0; padding: 0 0 0 18px; font-size: 14px; line-height: 1.65; }
.pl { margin: 0; padding: 0 0 0 20px; font-size: 15px; line-height: 1.7; }
.pl li + li { margin-top: 5px; }
.pd { margin: 0; display: grid; gap: 8px; }
.pd > div { padding: 10px 14px; border-radius: 16px; background: var(--panel); }
.pd dt { font-size: 15px; font-weight: 700; }
.pd dd { margin: 3px 0 0; font-size: 14px; line-height: 1.6; color: var(--sub2); }
.ptbl { display: grid; gap: 4px; font-size: 13px; line-height: 1.5; }
.ptbl .th { padding: 4px 6px; font-weight: 700; text-align: center; color: var(--sub2); }
.ptbl .rh { padding: 8px; border-radius: 10px; background: var(--panel); font-weight: 700; }
.ptbl .td { padding: 8px; border-radius: 10px; background: var(--card); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.1); }
.pmap { border-radius: 18px; overflow: hidden; }
.pmap .pdot { fill: var(--ink); stroke: var(--card); stroke-width: 2; }
.pmap .plab { font-size: 22px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 6px; stroke-linejoin: round; }

/* ---------- 並べる（年代順） ---------- */
.ordl { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 2px 4px 2px 34px; }
.ordl::before { content: ''; position: absolute; left: 15px; top: 26px; bottom: 26px; width: 2px; background: var(--rule); }
.ord-end { margin-left: -30px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--sub); }
.ord-row { position: relative; display: flex; align-items: center; gap: 10px; }
.ord-no { position: absolute; left: -30px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--dash); display: grid; place-items: center; font-family: var(--num); font-size: 11.5px; font-weight: 700; color: var(--sub2); }
.ord-row .slot { flex: 1; min-width: 0; }
.ord-y { display: none; flex: none; font-family: var(--num); font-size: 12px; color: var(--sub); white-space: nowrap; }
.ordl.revealed .ord-y { display: block; }
.ordl.revealed .ord-no { background: var(--ink); color: var(--on-ink); box-shadow: none; }

/* ---------- グラフ ---------- */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chartc { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 8px 8px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 .5px rgba(0,0,0,.06); }
.chl { position: absolute; top: 6px; left: 10px; font-family: var(--num); font-size: 12px; font-weight: 700; color: var(--sub); }
.cgw svg { display: block; width: 100%; height: auto; }
.cgw .cp { fill: var(--dash); }
.cgw .ct { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.cgw .cg { stroke: var(--track); stroke-width: 1; }
.cgw .cg.z { stroke: var(--rule); }
.cgw .ca, .cgw .cu, .cgw .cl { font-family: var(--num); font-size: 8px; fill: var(--sub); }
.cgw .cl { font-size: 9px; fill: var(--ink); font-weight: 600; }
.cgw .pm { fill: var(--mid); }
.cgw .pf2 { fill: var(--dash); }
.cgw .cb { fill: var(--ink); }
.chartc .slot { width: 100%; }

/* ---------- 仕分け：3〜4つの箱 ---------- */
.sortbox.multi .tchart::before { display: none; }
.sortbox.multi .tcol + .tcol { box-shadow: inset 1.5px 0 0 var(--rule); }
.sortbox.multi .tcol { padding: 4px 5px 8px; }
.sortbox.multi .tcol h4 { font-size: 11.5px; }
.sortbox.multi .bitem { font-size: 11.5px; padding: 6px 7px; }
.sortbox.multi .sort-ctl { gap: 6px; }
.sortbox.multi .sort-ctl .sbtn { height: 42px; padding: 0 6px; font-size: 12.5px; }

/* ---------- 科目の切り替え（C：名前を押すとシート・10/26 オーナー） ---------- */
.subjbtn { display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 40px; padding: 0 4px; font-size: 17px; font-weight: 700; color: var(--ink); }
.subjbtn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subjbtn i { display: grid; place-items: center; color: var(--sub); transform: rotate(-90deg); }
.subjbtn i svg { width: 16px; height: 16px; stroke-width: 2.4; }
.subjbtn.big { flex: 1; height: 44px; font-size: 24px; letter-spacing: .02em; }
.subjbtn.big i svg { width: 18px; height: 18px; }
.subjbtn:active { opacity: .6; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; text-align: left; }
.srow + .srow { box-shadow: inset 0 .5px 0 var(--line); }
.srow b { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.srow.on b { font-weight: 700; }
.srow small { font-family: var(--num); font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; }
.srow:active { background: var(--press); }

/* ---------- 要点のページ（C：3行でいうと＋開いてくわしく・10/26 オーナー） ---------- */
.p3 { margin-top: 16px; padding: 16px 16px 14px; border-radius: 20px; background: var(--ink); color: var(--on-ink); }
.p3 h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: rgba(var(--oi),.6); }
.p3 ol { margin: 0; padding: 0 0 0 20px; font-size: 15px; line-height: 1.7; }
.p3 li + li { margin-top: 2px; }
.pts .p3 b { color: var(--on-ink); }
.acc { margin-top: 10px; border-radius: 18px; background: var(--panel); overflow: hidden; }
.acch { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 16px; font-size: 15px; font-weight: 700; text-align: left; }
.acch i { flex: none; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--sub); }
.acch i::after { content: ' ›'; }
.acc.open .acch i::after { content: ''; }
.accb { display: none; padding: 0 14px 14px; }
.acc.open .accb { display: block; }
.accb .pblk { margin-top: 0; }
.accb .pcard, .accb .pd > div, .accb .ptbl .rh { background: var(--card); }
.accb .ptbl .td { box-shadow: inset 0 0 0 .5px rgba(0,0,0,.08); }
.accb .pmap { box-shadow: 0 0 0 .5px rgba(0,0,0,.06); }

/* ---------- 並べる（C：横の年表・10/26 オーナー） ---------- */
.ordh { position: relative; height: 252px; margin: 0 2px; }
.ordh .oax { position: absolute; left: 4px; right: 4px; top: 126px; height: 2px; background: var(--ink); }
.ordh .oax::after { content: ''; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--ink); border-right: 0; }
.ordh .olb { position: absolute; top: 134px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--sub); }
.ordh .olb.l { left: 2px; }
.ordh .olb.r { right: 2px; }
.ordh .olb.r.top { top: 104px; }
.ordh .ocol { position: absolute; display: flex; flex-direction: column; align-items: center; max-width: 150px; transform: translateX(-50%); }
.ordh .ocol.up { bottom: 119px; }
.ordh .ocol.dn { top: 119px; flex-direction: column-reverse; }
.ordh .ocol .slot { width: 100%; min-width: 0; min-height: 46px; }   /* 空の枠どうしが重ならない（11/30 点検：.slot の min-width 6.4em が列の幅より広かった） */
.ordh .ocol .slot .chip { max-width: 100%; white-space: normal; line-height: 1.3; text-align: center; }
.ordh .ostem { width: 2px; height: 22px; background: var(--rule); }
.ordh .odot { width: 16px; height: 16px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); font-size: 0; }
.ordh .oy { display: none; margin: 4px 0 0; font-family: var(--num); font-size: 11.5px; font-weight: 600; color: var(--sub2); white-space: nowrap; }
.ordh .ocol.dn .oy { margin: 0 0 4px; }
.ordh.revealed .oy { display: block; }
.ordh.revealed .odot { background: var(--ink); }

/* ---------- グラフ（C：1枚ずつ・タブ・10/26 オーナー） ---------- */
.ctabs { display: grid; gap: 6px; margin-bottom: 10px; }
.ctabs button { height: 36px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--num); font-size: 14px; font-weight: 700; color: var(--ink); }
.ctabs button.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.ctabs button i { display: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .45; }
.ctabs button.has i { display: block; }
.ctabs button.ok i { opacity: 1; }
.charts.one1 { grid-template-columns: 1fr; }
.charts.one1 .chartc { display: none; padding: 28px 14px 12px; }
.charts.one1 .chartc.on { display: flex; }
.charts.one1 .chl { font-size: 14px; top: 8px; left: 14px; }
.charts.one1 .slot { min-height: 46px; }
.charts.one1.revealed { grid-template-columns: 1fr 1fr; }
.charts.one1.revealed .chartc { display: flex; padding: 24px 8px 8px; }
.charts.one1.revealed .chl { font-size: 12px; top: 6px; left: 10px; }

/* ---------- 3〜4箱の仕分け（C：上下左右にはらう・10/26 オーナー） ---------- */
.sortbox.four .fourf { position: relative; height: 336px; transition: height .2s ease; }
.sortbox.four[data-n="3"] .fourf { height: 290px; }
.sortbox.four .fz { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 8px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.1); font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--sub2); text-align: center; transition: background .15s, color .15s, box-shadow .15s; }
.sortbox.four .fz small { font-family: var(--num); font-size: 11px; font-weight: 500; color: var(--sub); }
.sortbox.four .fz.t { left: 50%; top: 0; transform: translateX(-50%); width: 48%; min-height: 50px; }
.sortbox.four .fz.b { left: 50%; bottom: 0; transform: translateX(-50%); width: 48%; min-height: 50px; }
.sortbox.four .fz.l { left: 0; top: 50%; transform: translateY(-50%); width: 23%; min-height: 108px; }
.sortbox.four .fz.r { right: 0; top: 50%; transform: translateY(-50%); width: 23%; min-height: 108px; }
.sortbox.four[data-n="3"] .fz.l, .sortbox.four[data-n="3"] .fz.r { top: calc(50% + 28px); }
.sortbox.four .fz.hot { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.sortbox.four .fz.hot small { color: rgba(var(--oi),.7); }
.sortbox.four .fz.flash { box-shadow: 0 0 0 2px var(--ink); }
.sortbox.four .fdeck { position: absolute; z-index: 1; left: 26%; right: 26%; top: 62px; bottom: 62px; }
.sortbox.four .fz { z-index: 2; }
.sortbox.four[data-n="3"] .fdeck { top: 62px; bottom: 6px; }
.sortbox.four .fdeck .scard { inset: 0; padding: 16px 12px; font-size: 15.5px; }
.sortbox.four .fdeck .scard.back { transform: translateY(8px) scale(.95); }
.sortbox.four .fres { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sortbox.four .fres .tcol { padding: 10px 8px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.08); }
.sortbox.four .fres .tcol h4 { justify-content: flex-start; margin: 0 2px 8px; font-size: 12.5px; }
.sortbox.four .fres .bitem { background: var(--panel); box-shadow: none; }
.sortbox.four.revealed .fourf, .sortbox.four.revealed .sort-meta { display: none; }
.sortbox.four.revealed .fres { display: grid; }

/* ---------- 語の並び（B：下から引き出すシート・10/26 オーナー） ---------- */
.dock { margin: 6px -18px 0; padding: 6px 16px calc(14px + var(--sab)); background: var(--card); box-shadow: 0 -1px 0 var(--line); }
.dock .dgrip { width: 38px; height: 5px; border-radius: 3px; background: var(--rule); margin: 0 auto 4px; cursor: pointer; }
.dock .dhd { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 4px 2px 10px; font-size: 13px; font-weight: 700; color: var(--sub2); }
.dock .dhd b { font-family: var(--num); }
.dock .dhd i { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--sub); }
.dock .tray { margin: 0; padding: 0 0 12px; overflow: visible; }
.dock .tray-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; width: auto; margin: 0; }
.dock.min .tray { display: none; }

/* ---------- はじめて開いたとき（3枚の説明 → 科目をえらぶ・10/26 オーナー） ---------- */
.onb { position: fixed; inset: 0; z-index: 95; max-width: 480px; margin: 0 auto; background: var(--bg); }
.oslide { height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--sat) + 64px) 26px calc(var(--sab) + 28px); }
.oskip { position: absolute; top: calc(var(--sat) + 16px); right: 18px; height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13.5px; font-weight: 600; color: var(--sub); }
.oart { position: relative; width: 240px; height: 240px; border-radius: 40px; background: var(--card); box-shadow: var(--sh); margin-bottom: 30px; display: grid; place-items: center; }
.oslide h2 { margin: 0; font-size: 25px; font-weight: 700; }
.oslide p { margin: 12px 0 0; font-size: 15px; line-height: 1.75; color: var(--sub2); }
.odots { display: flex; gap: 7px; margin-top: auto; }
.odots i { width: 7px; height: 7px; border-radius: 4px; background: var(--rule); transition: width .2s; }
.odots i.on { width: 20px; background: var(--ink); }
.oslide .btn { width: 100%; margin-top: 22px; }
.oa-pg { width: 150px; height: 180px; padding: 18px 16px; border-radius: 18px; background: var(--panel); }
.oa-pg i { display: block; height: 10px; margin-bottom: 11px; border-radius: 5px; background: var(--rule); }
.oa-pg i.k { width: 62%; background: var(--ink); }
.oa-pg i.s { width: 74%; }
.oa-p3 { position: absolute; right: 16px; bottom: 22px; width: 118px; padding: 10px 12px; border-radius: 14px; background: var(--ink); color: var(--on-ink); text-align: left; }
.oa-p3 b { display: block; font-size: 10.5px; letter-spacing: .1em; color: rgba(var(--oi),.65); margin-bottom: 6px; }
.oa-p3 span { display: block; height: 6px; margin-top: 5px; border-radius: 3px; background: rgba(var(--oi),.75); }
.oa-tb { display: grid; grid-template-columns: 52px 52px 52px; gap: 6px; }
.oa-tb i { height: 34px; border-radius: 9px; background: var(--track); }
.oa-tb i.h { background: var(--rule); }
.oa-tb i.k { background: var(--ink); }
.oa-tb i.d { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--dash); }
.oa-chip { position: absolute; right: 34px; bottom: 38px; padding: 8px 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.16), 0 10px 18px -10px rgba(0,0,0,.5); font-size: 14px; font-weight: 700; transform: rotate(-6deg); }
.oa-cards { display: grid; grid-template-columns: 74px 74px; gap: 10px; }
.oa-cards span { height: 104px; border-radius: 16px; background: var(--panel); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.06); }
.oa-stamp { position: absolute; right: 36px; top: 40px; width: 62px; height: 62px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; transform: rotate(-9deg); box-shadow: 0 0 0 4px var(--card), 0 10px 20px -8px rgba(0,0,0,.5); }
.oa-stamp svg { width: 28px; height: 28px; stroke-width: 2.6; }
.opick { height: 100%; display: flex; flex-direction: column; padding: calc(var(--sat) + 54px) 20px calc(var(--sab) + 28px); overflow-y: auto; }
.opick .lab { font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--sub); }
.opick h1 { margin: 8px 0 4px; font-size: 28px; font-weight: 700; line-height: 1.3; }
.opick p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--sub2); }
.otiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.otile { min-height: 92px; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: var(--sh); display: flex; flex-direction: column; justify-content: space-between; text-align: left; }
.otile b { font-size: 18px; font-weight: 700; }
.otile small { font-size: 12px; color: var(--sub); }
.otile.on { background: var(--ink); color: var(--on-ink); }
.otile.on small { color: rgba(var(--oi),.6); }
.opick .btn { width: 100%; margin-top: auto; flex: none; }
.opick .otiles + .btn { margin-top: 22px; }

/* ---------- 解いたあと：自信を3つから → タップで選ぶ → まとめ（3行でいうとに ✓）・10/26 オーナー ---------- */

/* ---------- 輪（JS の SVG）の色を変数に ---------- */
[stroke="#E5E5EA"] { stroke: var(--track); }
[stroke="#1D1D1F"] { stroke: var(--ink); }

/* ---------- ダークモード（10/26 オーナーが選んだ C：濃いグレー・端末の設定に合わせて自動） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C1E; --card: #2C2C2E; --ink: #F2F2F7; --on-ink: #1C1C1E; --sub: #98989D; --sub2: #AEAEB2; --line: rgba(255,255,255,.1);
    --fill: #3A3A3C; --fill2: #48484A; --panel: #38383A; --mute: #8E8E93; --red: #FF453A; --redbg: rgba(255,69,58,.18);
    --press: #3A3A3C; --track: #48484A; --rule: #545458; --dash: #636366; --mid: #8E8E93; --sheet: #1C1C1E;
    --sea: #232325; --land: #3A3A3C; --landline: #545458; --riv: #6E6E73; --rivm: #5A5A5E; --slotbg: rgba(58,58,60,.92);
    --navbg: rgba(44,44,46,.82); --navact: rgba(255,255,255,.1); --segbg: #3A3A3C; --back1: #262628; --back2: #333335;
    --oi: 28,28,30; --ik: 242,242,247;
    --sh: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -14px rgba(0,0,0,.6);
    --sh-c: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
    --sh-b: 0 1px 2px rgba(0,0,0,.3), 0 6px 16px -8px rgba(0,0,0,.6);
    color-scheme: dark;
  }
  .grp2, .cover, .page-base, .sback { box-shadow: 0 0 0 .5px rgba(255,255,255,.06); }
  .chip { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.14), 0 5px 14px -9px rgba(0,0,0,.6); }
}

/* ---------- 科目の印（10/27 オーナーが選んだ B） ---------- */
.subicon { width: 34px; height: 34px; flex: none; border-radius: 11px; background: var(--fill); color: var(--ink); display: grid; place-items: center; }
.subicon svg { width: 18px; height: 18px; }
.otile { position: relative; }
.otile b { padding-right: 34px; }
.otile .subicon { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 10px; }
.otile .subicon svg { width: 16px; height: 16px; }
.otile.on .subicon { background: rgba(var(--oi),.16); color: var(--on-ink); }

/* ---------- プレミアムの入口（設定のいちばん上・10/27 A）と説明シート ---------- */
.prem { width: 100%; margin: 6px 0 4px; padding: 16px; border-radius: 22px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; gap: 12px; text-align: left; }
.prem i { width: 44px; height: 44px; border-radius: 14px; background: rgba(var(--oi),.14); display: grid; place-items: center; flex: none; }
.prem i svg { width: 22px; height: 22px; }
.prem b { display: block; font-size: 16px; }
.prem small { display: block; font-size: 12px; opacity: .7; margin-top: 2px; word-break: keep-all; overflow-wrap: anywhere; }
.prem em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; opacity: .8; white-space: nowrap; }
.prem:active { transform: scale(.99); }
.prhd { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.prhd .prs { width: 56px; height: 56px; border-radius: 18px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.prhd .prs svg { width: 28px; height: 28px; }
.prhd h3 { margin: 12px 0 4px; }
.prhd .lead { margin: 0; }
.prl { margin-top: 14px; }
.prr { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.prr + .prr { box-shadow: inset 0 .5px 0 var(--line); }
.prr b { display: block; font-size: 15.5px; font-weight: 700; }
.prr small { display: block; font-size: 12.5px; color: var(--sub); margin-top: 2px; }
.prb { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.prlink { height: 40px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--sub2); }

/* ---------- 鍵のページ（今日の章を開いたあとの章・14回目 B：大きな鍵とボタン2つ） ---------- */
.lockp { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 30px; }
.lockp .cl { font-size: 12.5px; font-weight: 600; color: var(--sub); letter-spacing: .06em; }
.lockp h2 { margin: 6px 0 0; font-size: 22px; font-weight: 700; line-height: 1.35; }
.lockp .big { margin-top: 34px; width: 96px; height: 96px; border-radius: 50%; background: var(--panel); color: var(--ink); display: grid; place-items: center; }
.lockp .big svg { width: 42px; height: 42px; }
.lockp h3 { margin: 20px 0 0; font-size: 21px; font-weight: 700; }
.lockp p { margin: 6px 0 0; font-size: 14px; color: var(--sub); line-height: 1.6; }
.lockp .bt { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.lockp .st { margin-top: 22px; font-size: 13px; color: var(--sub); }
.lockp .st b { color: var(--ink); font-family: var(--num); font-size: 15px; }
.lockp .pl { margin-top: 12px; height: 40px; padding: 0 6px; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.lockp .pl i { width: 24px; height: 24px; border-radius: 8px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.lockp .pl i svg { width: 13px; height: 13px; }

/* ---------- 連続記録（ホームの右上・14回目 C）と、くわしいシート ---------- */
.flm { height: 40px; padding: 0 12px 0 10px; border-radius: 20px; background: var(--card); box-shadow: var(--sh-b); display: inline-flex; align-items: center; gap: 4px; flex: none; font-family: var(--num); font-weight: 700; font-size: 15px; color: var(--ink); }
.flm span { display: grid; place-items: center; }
.flm svg { width: 18px; height: 18px; }
.flm.z { color: var(--sub); }
.stkh { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.stkh .stki { width: 56px; height: 56px; border-radius: 18px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.stkh .stki svg { width: 28px; height: 28px; }
.stkh h3 { margin: 12px 0 4px; font-family: var(--font); }
.stkh .lead { margin: 0; }
.stkb { margin-top: 14px; padding: 14px 16px; }
.stkr { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stkr .pb { flex: 1; height: 6px; border-radius: 3px; }
.stkr em { font-style: normal; font-weight: 700; font-size: 13px; white-space: nowrap; }
.stkb p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--sub2); }

/* ---------- 仮の広告（AdMob をつなぐまで） ---------- */
.adph { position: fixed; inset: 0; z-index: 99; background: #111; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.adph .box { width: 84%; max-width: 400px; aspect-ratio: 9/14; border-radius: 18px; background: repeating-linear-gradient(45deg,#2a2a2c,#2a2a2c 12px,#333 12px,#333 24px); display: grid; place-items: center; font-size: 20px; font-weight: 700; letter-spacing: .2em; color: #aaa; }
.adph small { margin-top: 12px; font-size: 12px; color: #888; }
.adph .adx { position: absolute; z-index: 1; top: calc(var(--sat) + 14px); right: 16px; min-width: 34px; height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(255,255,255,.16); color: #fff; font-size: 13px; font-weight: 700; }
.adph .adx:disabled { opacity: .7; }
.adph .adq { position: absolute; z-index: 1; top: calc(var(--sat) + 14px); left: 16px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); color: #bbb; display: grid; place-items: center; }
.adph .adq svg { width: 16px; height: 16px; }
@media (prefers-color-scheme: dark) { .lockp .btn.white { background: var(--fill); box-shadow: none; } }

/* ---------- 文字が切れる・折れるのを直す（10/27 各科目の担当の申し送り） ---------- */
/* 3〜4箱の左右の箱：矢印を上の行に。長い名前は少し小さく */
.sortbox.four .fz .fa { font-style: normal; font-size: 13px; line-height: 1; }
.sortbox.four .fz.long span { font-size: 11px; letter-spacing: -.02em; }
/* 仕分けのあとの箱ごとの表の見出しは、切らずに2行まで */
.sortbox.four .fres .tcol h4 span:first-child { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
/* 流れ図のいちばん右の列は、下向き矢印の文を矢印の左に */
.cell.lastc .dlabel { left: auto; right: calc(50% + 10px); text-align: right; }
/* ページの小見出しは、整理済の印が出ても切らずに折り返す */
.ph span:first-child { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }

/* ---------- 15回目：目次で開けない章はうすく（C）・連続記録がのびたら＋1（C）・はじめの数日の最後の日のシート（B） ---------- */
.bk-r.lk { opacity: .42; }
.flm { position: relative; }
.flm .p1 { position: absolute; top: -9px; right: -6px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--ink); color: var(--on-ink); font-style: normal; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; pointer-events: none; animation: p1 2.4s ease forwards; }
.flm.bump { animation: flmb .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes p1 { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes flmb { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .flm.bump { animation: none; } .flm .p1 { animation-duration: .01s; animation-delay: 2.4s; } }
.trs { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 2px 2px; }
.trs .ti { width: 56px; height: 56px; border-radius: 18px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.trs .ti svg { width: 28px; height: 28px; }
.trs h3 { margin: 12px 0 4px; }
.trs p { margin: 4px 0 0; font-size: 14px; line-height: 1.7; color: var(--sub2); }
.trs .rows { width: 100%; margin-top: 14px; border-radius: 20px; background: var(--card); text-align: left; }
.trs .rows div { display: flex; gap: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.55; }
.trs .rows div + div { box-shadow: inset 0 .5px 0 var(--line); }
.trs .rows i { width: 22px; height: 22px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; flex: none; font-style: normal; font-size: 12px; font-weight: 700; font-family: var(--num); }
.trs .bar { width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.trs .bar .pb { flex: 1; height: 6px; border-radius: 3px; }
.trs .btn { margin-top: 16px; }
/* 並べる演習：長い語は小さめの字で（「マーシャ／ル＝プラ／ン」と細かく折れていた） */
.ordh .chip.long { font-size: 10.5px; letter-spacing: -.03em; }

/* 当てはめ（11/6）：閉じるは丸い台なし・上に演習の数だけの線 */
.study .st-top .round { background: none; box-shadow: none; }
.st-seg { display: flex; gap: 4px; padding: 4px 16px 0; flex: none; min-height: 8px; }
.st-seg i { flex: 1; height: 4px; border-radius: 2px; background: var(--rtrk); transition: background .3s; }
.st-seg i.on { background: var(--ra); }
/* 答え合わせ＝11/6 オーナーが選んだ 4-A：論述と同じ点数の輪がうまり、置いた語に1つずつ ◎ と × */
.sring { position: absolute; top: 12px; right: 14px; z-index: 4; width: 64px; height: 64px; border-radius: 50%; background: var(--card); box-shadow: 0 6px 18px -8px rgba(0,0,0,.3); animation: mkin .35s ease; }
.sring svg { position: absolute; left: 2px; top: 2px; width: 60px; height: 60px; transform: rotate(-90deg); }
.sring .tr { fill: none; stroke: var(--rtrk); stroke-width: 6; transition: stroke .3s; }
.sring .pr { fill: none; stroke: var(--ra); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .45s cubic-bezier(.3,.8,.3,1); }
.sring b { position: absolute; left: 0; right: 0; top: 21px; text-align: center; font-family: var(--num); font-size: 19px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sring b small { font-size: 10px; font-weight: 700; color: var(--sub); margin-left: 1px; }
.sring.up b span { display: inline-block; animation: sup .32s ease; }
.sring.sh { animation: shake .4s; }
.sring.sh .tr { stroke: rgba(224,68,58,.32); }
@keyframes sup { 50% { transform: scale(1.25); } }
@keyframes mkin { from { transform: scale(1.8) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.page.scoring .qbtn { visibility: hidden; }
.page.scoring .pt { padding-right: 70px; }
/* 答え合わせの丸：札の左上の外へ（22px・10px 内 → 18px・7px 内）＝細い3列の流れ図で1字目にかぶっていた（11/29 総点検） */
.mkb { position: absolute; top: -11px; left: -11px; z-index: 2; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; line-height: 1; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); animation: mkin .35s cubic-bezier(.2,1.5,.4,1); }
.mkb.ok { background: var(--ra); }
.mkb.ng { background: var(--red); }
.board.busy .chip { pointer-events: none; }
/* 正解のあと：下のふちから青い結果（整理済・自信・次へ）。まちがいは「おしい！ もう一回やってみよう」 */
.rpanel, .rmiss { position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; padding: 14px 16px calc(14px + var(--sab)); border-radius: 22px 22px 0 0; }
.rpanel { background: #2C64B0; color: #fff; max-height: 64%; display: flex; flex-direction: column; }
.rpanel .rph { flex: none; display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15.5px; font-weight: 700; }
.rpanel .rph i { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #2C64B0; display: grid; place-items: center; }
.rpanel .rph i svg { width: 12px; height: 12px; stroke-width: 3.2; }
.rpanel .rpr { flex: none; display: flex; gap: 6px; margin: 0 0 10px; }
.rpanel .rpr button { flex: 1; min-width: 0; height: 34px; border-radius: 17px; border: 1.5px solid rgba(255,255,255,.5); font-size: 12px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.rpanel .rpr button.on { background: #fff; color: #1B4A8A; border-color: #fff; }
.rpanel .rpn { flex: none; width: 100%; height: 50px; border-radius: 25px; background: #fff; color: #1B4A8A; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rpanel .rpa { flex: none; margin: 8px auto 0; padding: 4px 8px; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.85); }
.rmiss { background: #FFF4F3; box-shadow: 0 -1px 0 #F3D2CF; }
.rmiss .rmh { margin: 2px 0 4px; font-size: 17px; font-weight: 800; color: #C2372E; }
.rmiss .rms { margin: 0 0 12px; font-size: 12.5px; line-height: 1.6; color: var(--sub2); }
.rmiss .rms b { color: var(--ra); }
.rmiss .rms em { font-style: normal; font-weight: 700; color: var(--red); }
.rmiss .rpn { width: 100%; height: 50px; border-radius: 25px; background: #2C64B0; color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
@media (prefers-color-scheme: dark) { .rmiss { background: #3A2422; box-shadow: none; } .rmiss .rmh { color: #FF8A80; } }
.sdone { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 44px 0 0; text-align: center; }
.sdone .ic { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.sdone .ic svg { width: 26px; height: 26px; stroke-width: 3; }
.sdone b { font-size: 17px; }
.sdone small { font-size: 12.5px; color: var(--sub); }
