/* =====================================================================
   まなびの ぼうけん  見た目（v5：こども が まんなか  2026-10）

   考え方（保護者「小学生向けということを忘れずに」2026-10-18 を うけて v4 を 作りなおし）
   - 6さいが 字を 読まなくても わかる：絵が さき、文字は みじかく 大きく。押す ところは 大きく、色で 目立たせる。
   - 1画面に「つぎに おす ところ」は 1つ（ホームは すごろくの つぎの マスが ひかる）。
   - あかるい 色。でも 色の 数は しぼって ちらからない（さんすう＝そら色、こくご＝さんご色、はじめる＝みどり、ほし＝きいろ）。
   - おもちゃの ような ぷっくりした ボタン（下に こい 色の かげ、おすと しずむ）。
   - 日本の 学校の なじみの もの は のこす：はなまる・せんせいの はんこ・すごろく・せいがいは（なみ）・さくら。
   - 文字は Windows の「UD デジタル 教科書体」（学校の 教科書と おなじ 字の 形）。iPad は ヒラギノ丸ゴ、Android は Noto。
   ===================================================================== */

/* タブレット用の 教科書体に 近い フォント（Klee One・SIL OFL 1.1。fonts\OFL.txt）。
   Windows は 先に 書いた UD デジタル 教科書体が あるので、これは よみこまれない。作りなおしは tools\build_font.py */
@font-face { font-family: "Klee One"; src: url("../fonts/KleeOne-Regular.woff") format("woff"); font-weight: 100 500; font-display: swap; }
@font-face { font-family: "Klee One"; src: url("../fonts/KleeOne-SemiBold.woff") format("woff"); font-weight: 600 900; font-display: swap; }

:root {
  --font: "UD Digi Kyokasho N-R", "UD デジタル 教科書体 N-R", "UD Digi Kyokasho N", "Klee One", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Noto Sans JP", "Meiryo", sans-serif;
  --font-ui: "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif;

  --ink: #3a3530;
  --ink-2: #6f6a63;
  --ink-3: #a39d95;
  --cream: #fffaf1;
  --soft: #f5efe5;
  --line: #ece4d7;
  --line-2: #ddd2c0;
  --card: #fff;

  --math: #3b8beb;   --math-d: #2667bd;  --math-2: #8dbdf6;  --math-l: #e5f1ff;    /* さんすう */
  --koku: #f25f5c;   --koku-d: #c8403d;  --koku-2: #f8a3a1;  --koku-l: #ffe9e8;    /* こくご */
  --go: #2ebd6b;     --go-d: #1e9150;    --go-l: #e2f7ea;                          /* はじめる・すすむ */
  --star: #ffc531;   --star-d: #e09e00;  --star-l: #fff4d3;                        /* ほし・いま ここ */
  --pink: #ff7eb0;   --pink-d: #db5a8e;  --pink-l: #ffe8f1;                        /* シール */
  --purple: #8f6cf0; --purple-d: #6b4ccb; --purple-l: #efe9ff;                     /* あいぼう */
  --orange: #ff9b3d; --orange-d: #dc7a1a; --orange-l: #fff0e0;                     /* にがて */
  --red: #ec4a2c;    --red-d: #c4361c;   --red-l: #fde8e3;                         /* はなまる・はんこ */

  --r: 18px;
  --r-l: 26px;
  --sh-1: 0 2px 0 rgba(58, 53, 48, .05), 0 10px 24px -14px rgba(60, 70, 110, .35);
  --sh-2: 0 3px 0 rgba(58, 53, 48, .06), 0 20px 40px -20px rgba(60, 70, 110, .45);
  --grid: rgba(59, 139, 235, .07);
  --hogan: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  /* せいがいは（なみの もよう） */
  --seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%233b8beb' stroke-opacity='.13' stroke-width='1.4'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M6 24a18 18 0 0 1 36 0M12 24a12 12 0 0 1 24 0M18 24a6 6 0 0 1 12 0'/%3E%3Cpath d='M-24 12a24 24 0 0 1 48 0M-18 12a18 18 0 0 1 36 0M-12 12a12 12 0 0 1 24 0M-6 12a6 6 0 0 1 12 0'/%3E%3Cpath d='M24 12a24 24 0 0 1 48 0M30 12a18 18 0 0 1 36 0M36 12a12 12 0 0 1 24 0M42 12a6 6 0 0 1 12 0'/%3E%3C/g%3E%3C/svg%3E");
  --seigaiha-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.2' stroke-width='1.6'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M6 24a18 18 0 0 1 36 0M12 24a12 12 0 0 1 24 0M18 24a6 6 0 0 1 12 0'/%3E%3Cpath d='M-24 12a24 24 0 0 1 48 0M-18 12a18 18 0 0 1 36 0M-12 12a12 12 0 0 1 24 0M-6 12a6 6 0 0 1 12 0'/%3E%3Cpath d='M24 12a24 24 0 0 1 48 0M30 12a18 18 0 0 1 36 0M36 12a12 12 0 0 1 24 0M42 12a6 6 0 0 1 12 0'/%3E%3C/g%3E%3C/svg%3E");
}
/* 教科ごとの 色（.s-math / .s-kokugo / .s-other を つけた 中で つかう） */
.s-math { --c: var(--math); --c-d: var(--math-d); --c-2: var(--math-2); --c-l: var(--math-l); }
.s-kokugo { --c: var(--koku); --c-d: var(--koku-d); --c-2: var(--koku-2); --c-l: var(--koku-l); }
.s-other { --c: var(--star); --c-d: var(--star-d); --c-2: #ffdd80; --c-l: var(--star-l); }

/* ---------- きほん ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 20px;
  color: var(--ink);
  /* わかちがきの すきまで だけ 改行する（「いくつと いく／つ」の ように ことばの とちゅうで きらない） */
  word-break: keep-all;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #e3f2ff 0%, #f2f8ff 34%, #fff8ec 100%) fixed;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;      /* ながおしの メニューを 出さない（iPad） */
  overflow-x: hidden;
  overscroll-behavior: none;        /* ひっぱって 更新 を ふせぐ */
}
/* したに なみの もよう（せいがいは） */
body::before { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 110px; background: var(--seigaiha); pointer-events: none; z-index: -1;
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%); }
/* タッチ：ダブルタップ拡大と 0.3秒の まちを なくす。タップしたときの 青い わくを けす */
button, .tapc, .tile, .choice, .placed, .tray-st { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; color: inherit; cursor: pointer; }
button:focus-visible { outline: 4px solid var(--star); outline-offset: 3px; }
input, select { font-family: inherit; }
b { font-weight: 700; }
[hidden] { display: none !important; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }

/* ---------- 上の バー ---------- */
#topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 66px; padding: 0 18px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(59, 139, 235, .12);
}
#tb-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 700; letter-spacing: .06em; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark .eyes-normal, .brand-mark .eyes-sad, .brand-mark .beak-close { display: none; }
#tb-right { display: flex; gap: 10px; align-items: center; }
.tb-btn {
  width: 52px; height: 52px; border: 0; border-radius: 50%; background: #fff; padding: 0;
  display: grid; place-items: center; box-shadow: 0 4px 0 var(--line-2), 0 0 0 2px var(--line) inset; color: var(--math-d);
}
.tb-btn .ic { width: 28px; height: 28px; stroke-width: 2.6; }
.tb-btn:active, .player-chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line-2), 0 0 0 2px var(--line) inset; }
.player-chip {
  display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 6px; border: 0;
  border-radius: 26px; background: #fff; box-shadow: 0 4px 0 var(--line-2), 0 0 0 2px var(--line) inset; font-size: 19px; font-weight: 700;
}
.chip-av { font-size: 26px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--star-l); border-radius: 50%; }
.chip-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#app { max-width: 1200px; margin: 0 auto; padding: 18px 24px 36px; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }

/* ---------- ボタン（ぷっくり）---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 18px; padding: 12px 22px; font-size: 21px; font-weight: 700;
  background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line-2), 0 0 0 2px var(--line) inset; transition: transform .08s, box-shadow .08s;
}
.btn .ic { stroke-width: 2.6; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line-2), 0 0 0 2px var(--line) inset; }
.btn.primary { background: var(--go); color: #fff; box-shadow: 0 5px 0 var(--go-d); }
.btn.primary:active { box-shadow: 0 1px 0 var(--go-d); }
.btn.big { font-size: 25px; padding: 15px 30px; border-radius: 22px; }
.btn.small { font-size: 16px; padding: 8px 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--line-2), 0 0 0 2px var(--line) inset; }
.btn.danger { color: var(--red-d); }
.btn.back { font-size: 18px; padding: 10px 18px 10px 12px; }
.btn.back .ic { width: 24px; height: 24px; }
.btn small { font-size: .62em; font-weight: 400; opacity: .9; }
.btn:disabled { opacity: .55; cursor: default; }
.row-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.row-btns.left { justify-content: flex-start; margin-top: 10px; }
.badge {
  display: inline-block; background: var(--red); color: #fff; border-radius: 999px; padding: 0 9px; min-width: 26px;
  font-size: 15px; line-height: 26px; text-align: center; font-family: var(--font-ui); font-weight: 700;
}
.badge.new { font-size: 12px; letter-spacing: .06em; background: var(--pink); }

/* ---------- 単元の 絵 ---------- */
.uart {
  --u: 72px;
  position: relative; flex: none; width: var(--u); height: var(--u); border-radius: calc(var(--u) * .28);
  display: grid; place-items: center; background: #fff;
}
.uart.math { background: var(--math-l); }
.uart.kokugo { background: var(--koku-l); }
.uart.other { background: var(--star-l); }
.uart svg { width: 78%; height: 78%; }
.art-t { font-family: var(--font); font-size: 15px; font-weight: 700; fill: #fff; text-anchor: middle; dominant-baseline: central; }
.art-t.koku { fill: var(--koku); font-size: 22px; }
.ua-e { font-size: calc(var(--u) * .56); line-height: 1; }
.ua-t { font-weight: 700; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.ua-t i { font-style: normal; }
.ua-t.n1 { font-size: calc(var(--u) * .62); }
.ua-t.n2 { font-size: calc(var(--u) * .44); }
.ua-t.n3 { font-size: calc(var(--u) * .36); }
.ua-t.n4 { font-size: calc(var(--u) * .28); }
.ua-t.n5 { font-size: calc(var(--u) * .23); }
.ua-b {
  position: absolute; right: -6px; bottom: -6px; min-width: calc(var(--u) * .4); height: calc(var(--u) * .4); padding: 0 4px; border-radius: 999px;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); display: grid; place-items: center; font-size: calc(var(--u) * .24); font-weight: 700; color: var(--ink);
}
.uart.sm { --u: 44px; }
.uart.lg { --u: 96px; }

/* ---------- あいぼう（ぴよまる）と ふきだし ---------- */
.mascot { display: flex; align-items: center; gap: 12px; }
.mascot-svg { width: 90px; height: 90px; flex: none; animation: bob 3s ease-in-out infinite; }
.bubble {
  position: relative; background: #fff; border-radius: 22px; padding: 12px 18px;
  font-size: 22px; line-height: 1.5; box-shadow: var(--sh-1), 0 0 0 2px var(--line) inset; min-width: 100px;
}
.bubble:empty { display: none; }
.bubble::before {
  content: ''; position: absolute; left: -10px; top: 50%; width: 18px; height: 18px; background: #fff; border-radius: 3px;
  box-shadow: -2px 2px 0 0 var(--line); transform: translateY(-50%) rotate(45deg);
}
.bubble small { display: block; font-size: .78em; color: var(--ink-2); }
.fb-h { display: block; font-weight: 700; }
.fb-a { display: block; color: var(--red); font-weight: 700; font-size: 1.15em; letter-spacing: .02em; }
.fb-s { display: block; font-size: .8em; color: var(--ink-2); }
.mascot .eyes-happy, .mascot .eyes-sad, .mascot .beak-open { display: none; }
.mascot[data-mood="happy"] .eyes-normal { display: none; }
.mascot[data-mood="happy"] .eyes-happy, .mascot[data-mood="happy"] .beak-open { display: inline; }
.mascot[data-mood="happy"] .beak-close { display: none; }
.mascot[data-mood="sad"] .eyes-normal, .mascot[data-mood="think"] .eyes-normal { display: none; }
.mascot[data-mood="sad"] .eyes-sad, .mascot[data-mood="think"] .eyes-sad { display: inline; }
.mascot[data-mood="happy"] .wl { animation: flapL .25s ease-in-out 4 alternate; transform-origin: 26px 64px; }
.mascot[data-mood="happy"] .wr { animation: flapR .25s ease-in-out 4 alternate; transform-origin: 94px 64px; }
.mascot.jump .mascot-svg { animation: jump .55s ease; }

/* ---------- だれが あそぶ ---------- */
.center-col { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 6px; }
.brand { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.brand .brand-mark { width: 92px; height: 92px; }
.logo { margin: 0; font-size: 48px; letter-spacing: .1em; line-height: 1.15; }
.logo .lg i { font-style: normal; }
.logo small { display: block; font-size: 17px; letter-spacing: .2em; color: var(--ink-2); font-weight: 400; margin-top: 6px; }
.profile-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.profile-card {
  width: 186px; padding: 0 0 16px; border: 0; border-radius: 26px; background: #fff; overflow: hidden;
  box-shadow: 0 7px 0 var(--line-2), 0 0 0 2px var(--line) inset; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .12s;
}
.profile-card:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--line-2), 0 0 0 2px var(--line) inset; }
.pf-band { align-self: stretch; height: 30px; background: var(--math) var(--seigaiha-w); }
.profile-card:nth-child(3n+2) .pf-band { background-color: var(--koku); }
.profile-card:nth-child(3n+3) .pf-band { background-color: var(--go); }
.pf-av { font-size: 70px; line-height: 1.15; margin-top: 8px; }
.pf-name { font-size: 26px; font-weight: 700; padding: 0 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-lv { font-size: 15px; color: var(--ink-2); }
.profile-card.add { background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 3px var(--line-2) inset; justify-content: center; padding: 16px 0; min-height: 200px; color: var(--ink-2); }
.profile-card.add .pf-av { font-size: 44px; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--go); color: #fff; margin: 0 0 6px; box-shadow: 0 4px 0 var(--go-d); }
.profile-card.add .pf-av .ic { stroke-width: 3; }
.profile-card.add .pf-name { font-size: 19px; }
.panel { background: #fff; border-radius: var(--r-l); box-shadow: var(--sh-2); padding: 24px 28px; }
.new-profile { width: min(660px, 100%); }
.lbl { display: block; font-size: 18px; color: var(--ink-2); margin: 6px 0 8px; }
.name-input {
  width: 100%; font-size: 32px; padding: 10px 16px; border: 3px solid var(--line-2); border-radius: 16px; outline: none; user-select: text;
}
.name-input:focus { border-color: var(--math); }
.avatar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.av-btn { font-size: 40px; padding: 6px 0; border: 0; border-radius: 16px; background: var(--cream); box-shadow: 0 0 0 2px var(--line) inset; }
.av-btn.sel { background: var(--star-l); box-shadow: 0 0 0 4px var(--star) inset; transform: scale(1.06); }

/* ---------- ホーム ---------- */
.home { display: flex; flex-direction: column; gap: 18px; }
/* すごろくの ボード */
.board {
  position: relative; border-radius: 34px; padding: 16px 22px 22px; overflow: hidden;
  background: linear-gradient(180deg, #c7ecb4 0%, #a8de8f 100%);
  box-shadow: 0 6px 0 #86c46b, var(--sh-2);
}
.board::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .45) 0 60px, transparent 61px), radial-gradient(circle at 88% 85%, rgba(255, 255, 255, .3) 0 90px, transparent 91px); }
.board-head { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ribbon {
  display: inline-flex; align-items: center; gap: 8px; background: var(--star); color: #5a3d00; font-size: 25px; font-weight: 700; letter-spacing: .08em;
  padding: 7px 22px; border-radius: 999px; box-shadow: 0 4px 0 var(--star-d);
}
.pills { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .92); border: 0; border-radius: 999px; padding: 5px 14px 5px 8px;
  font-size: 18px; font-weight: 700; color: var(--ink); box-shadow: 0 3px 0 rgba(58, 53, 48, .1);
}
.pill i { font-style: normal; font-size: 22px; line-height: 1; }
.pill small { font-size: 13px; color: var(--ink-2); font-weight: 400; }
button.pill:active { transform: translateY(2px); box-shadow: none; }
.pill.review { background: var(--orange); color: #fff; box-shadow: 0 3px 0 var(--orange-d); }
.pill.review small { color: #fff; }
.board-main { position: relative; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 10px; align-items: end; margin-top: 8px; }
.guide .mascot { flex-direction: column-reverse; gap: 6px; }
.guide .mascot-svg { width: 150px; height: 150px; }
.guide .bubble { font-size: 23px; text-align: center; }
.guide .bubble::before { left: 50%; top: auto; bottom: -9px; transform: translateX(-50%) rotate(-45deg); box-shadow: -2px 2px 0 0 var(--line); }
.road { display: flex; align-items: flex-start; justify-content: center; padding: 6px 0 2px; }
.road-row + .road-row { margin-top: 12px; }
.stop {
  position: relative; width: 164px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0;
}
.stop-ring {
  position: relative; width: 128px; height: 128px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 7px 0 rgba(58, 53, 48, .16), 0 0 0 7px var(--c-2) inset;
}
.stop .uart { --u: 82px; background: transparent; }
.stop-no {
  position: absolute; top: -4px; left: -4px; width: 38px; height: 38px; border-radius: 50%; background: var(--c); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 700; box-shadow: 0 3px 0 var(--c-d); z-index: 2;
}
.stop-t { font-size: 21px; font-weight: 700; text-align: center; line-height: 1.25; max-width: 164px; word-break: keep-all; overflow-wrap: anywhere; color: #24461a; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.stop:active .stop-ring { transform: translateY(4px); box-shadow: 0 3px 0 rgba(58, 53, 48, .16), 0 0 0 7px var(--c-2) inset; }
.stop.next .stop-ring { box-shadow: 0 7px 0 rgba(58, 53, 48, .16), 0 0 0 7px var(--star) inset; animation: ringPulse 1.6s ease-in-out infinite; }
.stop-go { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--go); color: #fff; font-size: 21px; font-weight: 700; padding: 8px 18px; border-radius: 999px; box-shadow: 0 4px 0 var(--go-d); animation: nudgeY 1.6s ease-in-out infinite; }
.stop-go .ic { width: 20px; height: 20px; }
.stop.done .uart { opacity: .45; }
.stop .hanamaru { position: absolute; left: 50%; top: 64px; width: 140px; height: 140px; margin: -70px 0 0 -70px; transform: rotate(-8deg); }
.road-link { flex: 1 1 24px; min-width: 18px; max-width: 80px; height: 0; margin-top: 64px; border-top: 8px dotted rgba(255, 255, 255, .95); }
.road-link.done { border-top-color: var(--star); }
.goal { flex: none; width: 124px; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.goal svg { width: 116px; height: 102px; overflow: visible; }
.goal .lid { transition: transform .5s; transform-origin: 8px 30px; }
.goal.open .lid { transform: rotate(-24deg); }
.goal.open svg { filter: drop-shadow(0 0 14px rgba(255, 220, 80, .95)); }
.goal span { font-size: 18px; font-weight: 700; color: #24461a; }
.plan-done { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; background: rgba(255, 255, 255, .85); border-radius: 20px; padding: 8px 18px; font-size: 20px; line-height: 1.5; }
.plan-done .hanko { --hk: 90px; flex: none; }

/* 大きい 4つの ボタン */
.big-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bigbtn {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 132px;
  border: 0; border-radius: var(--r-l); color: #fff; text-align: left; background: var(--c); box-shadow: 0 6px 0 var(--c-d), var(--sh-1);
}
.bigbtn::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 50%; background: var(--seigaiha-w); pointer-events: none; }
.bigbtn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--c-d); }
.bigbtn.b-math { --c: var(--math); --c-d: var(--math-d); }
.bigbtn.b-kokugo { --c: var(--koku); --c-d: var(--koku-d); }
.bigbtn.b-sticker { --c: var(--pink); --c-d: var(--pink-d); }
.bigbtn.b-buddy { --c: var(--purple); --c-d: var(--purple-d); }
.bb-art { position: relative; z-index: 1; width: 86px; height: 86px; flex: none; border-radius: 20px; background: #fff; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.bb-art svg { width: 82%; height: 82%; }
.bb-art .mascot-svg { width: 92%; height: 92%; animation: none; }
.bb-art .eyes-normal, .bb-art .eyes-sad, .bb-art .beak-close { display: none; }
.bb-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bb-t { font-size: 32px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; white-space: nowrap; text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.bb-s { font-size: 16px; opacity: .95; }
.bigbtn .badge { position: absolute; top: 8px; right: 10px; z-index: 2; background: #fff; color: var(--c-d); }
.home-foot { text-align: center; }
.link-btn { border: 0; background: none; color: var(--ink-2); font-size: 15px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 画面の みだし ---------- */
.page-head, .units-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.page-head h2, .units-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 31px; display: flex; align-items: center; gap: 12px; letter-spacing: .06em; }
.page-head h2 .ic, .units-head h2 .ic { width: 32px; height: 32px; color: var(--math); stroke-width: 2.6; }
.ph-side, .uh-stars { font-size: 17px; color: var(--ink-2); background: #fff; border-radius: 999px; padding: 7px 16px; white-space: nowrap; box-shadow: 0 0 0 2px var(--line) inset; }
.ph-side b, .uh-stars b { font-size: 22px; color: var(--ink); }

/* ---------- 単元えらび ---------- */
.u-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 14px 20px; margin-bottom: 16px;
  border-radius: 30px; color: #fff; background: var(--c); box-shadow: 0 6px 0 var(--c-d);
}
.u-hero::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 55%; background: var(--seigaiha-w); pointer-events: none; }
.u-hero .btn.back { position: relative; z-index: 1; background: rgba(255, 255, 255, .95); color: var(--c-d); box-shadow: 0 4px 0 var(--c-d); }
.u-hero .bb-art { width: 70px; height: 70px; }
.u-hero h2 { position: relative; z-index: 1; flex: 1; margin: 0; font-size: 38px; letter-spacing: .12em; text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.u-crown { position: relative; z-index: 1; background: rgba(255, 255, 255, .95); color: var(--ink); border-radius: 999px; padding: 6px 16px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.u-crown i { font-style: normal; font-size: 22px; }
.rec-bar {
  width: 100%; display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-bottom: 4px; position: relative;
  background: #fff; border: 0; border-radius: var(--r-l); box-shadow: 0 6px 0 var(--star-d), 0 0 0 4px var(--star) inset; text-align: left;
}
.rec-bar:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--star-d), 0 0 0 4px var(--star) inset; }
.rec-bar .tag-rec { top: -12px; }
.rb-t { flex: 1; min-width: 0; font-size: 28px; font-weight: 700; display: flex; flex-direction: column; }
.rb-t small { font-size: 16px; color: var(--ink-2); font-weight: 400; }
.rb-go { pointer-events: none; }
.u-note { display: none; }
.term { margin-top: 22px; }
.term-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 22px; }
.term-h b { background: var(--c); color: #fff; padding: 4px 18px; border-radius: 999px; box-shadow: 0 3px 0 var(--c-d); letter-spacing: .08em; }
.term-h small { font-size: 15px; color: var(--ink-2); font-weight: 400; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.unit-card {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 108px;
  background: #fff; border: 0; border-radius: 24px; box-shadow: 0 6px 0 var(--c-2), 0 0 0 3px var(--c-l) inset; text-align: left;
  animation: rise .35s both; animation-delay: var(--d);
}
.unit-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--c-2), 0 0 0 3px var(--c-l) inset; }
.unit-card.rec { box-shadow: 0 6px 0 var(--star-d), 0 0 0 4px var(--star) inset; }
.u-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.u-t { font-size: 23px; font-weight: 700; line-height: 1.25; }
.u-s { font-size: 14px; color: var(--ink-2); }
.u-stars { display: flex; gap: 2px; font-size: 24px; line-height: 1; margin-top: 4px; }
.u-stars i { font-style: normal; color: var(--line-2); }
.u-stars i.on { color: var(--star); text-shadow: 0 2px 0 var(--star-d); }
.u-crownmark { position: absolute; right: 10px; top: 8px; font-size: 30px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .12)); }
.tag-new, .tag-rec {
  position: absolute; top: -10px; font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 999px; letter-spacing: .06em; z-index: 1;
}
.tag-new { right: 12px; background: var(--pink); color: #fff; font-family: var(--font-ui); box-shadow: 0 2px 0 var(--pink-d); }
.tag-rec { left: 14px; background: var(--star); color: #4a3500; box-shadow: 0 2px 0 var(--star-d); }
.seal {
  flex: none; width: 54px; height: 54px; border-radius: 50%; border: 2.5px solid var(--red); color: var(--red);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center;
  transform: rotate(-12deg); background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px rgba(236, 74, 44, .35);
}
.seal.sm { width: 44px; height: 44px; font-size: 10px; }

/* ---------- もんだい ---------- */
.quiz { display: flex; flex-direction: column; gap: 14px; }
.quiz-top { display: flex; align-items: center; gap: 14px; min-height: 82px; }
.quiz-top .mascot { flex: 1; min-width: 0; }
.quiz-top .mascot-svg { width: 78px; height: 78px; }
.quiz-top .bubble { font-size: 21px; padding: 9px 16px; }
.qt-mid { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; }
.unit-label { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--ink-2); white-space: nowrap; }
.unit-label b { font-size: 22px; color: var(--ink); }
.unit-label .uart { --u: 34px; border-radius: 10px; }
.step-tag { font-size: 14px; background: #fff; border-radius: 999px; padding: 1px 10px; color: var(--ink-2); box-shadow: 0 0 0 2px var(--line) inset; }
/* すすみぐあい：ほし（1かいめで せいかい＝きいろ、2かいめ＝うすい きいろ、まちがい＝はいいろ） */
.progress { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; max-width: 460px; }
.pdot { position: relative; width: 24px; height: 24px; font-size: 24px; line-height: 24px; text-align: center; color: rgba(255, 255, 255, .95); text-shadow: 0 0 0 transparent; -webkit-text-stroke: 1.5px var(--line-2); }
.pdot::before { content: '★'; }
.pdot.cur { -webkit-text-stroke: 2px var(--ink-2); transform: scale(1.18); }
.pdot.ok { color: var(--star); -webkit-text-stroke: 1.5px var(--star-d); animation: pop .4s; }
.pdot.retry { color: #ffe39a; -webkit-text-stroke: 1.5px #e8c35a; }
.pdot.ng { color: var(--soft); -webkit-text-stroke: 1.5px var(--line-2); }
.combo { min-width: 92px; text-align: center; font-size: 15px; font-weight: 700; color: var(--orange-d); line-height: 1.1; }
.combo b { display: block; font-size: 30px; color: var(--orange); }
.combo.pop { animation: pop .45s; }
.timer { min-width: 116px; font-size: 28px; font-weight: 700; color: var(--math-d); font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: center; gap: 6px; }
.speak-btn {
  flex: none; width: 92px; height: 80px; border: 0; border-radius: 24px; background: var(--math); color: #fff;
  box-shadow: 0 5px 0 var(--math-d); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0;
}
.speak-btn .ic { width: 36px; height: 36px; stroke-width: 2.4; }
.speak-btn small { font-size: 12px; font-weight: 700; }
.speak-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--math-d); }

.quiz-body { display: grid; gap: 18px; align-items: start; }
.quiz-body.kind-pad { grid-template-columns: 1.35fr 1fr; align-items: stretch; }
/* たてに つむ（したから なんばんめ）は よこに ならべて 画面に おさめる */
.quiz-body.st-col { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.q-card {
  position: relative; background-color: #fff; background-image: var(--hogan); background-size: 30px 30px; background-position: -1px -1px;
  border-radius: 30px; box-shadow: 0 0 0 4px var(--c-l, var(--line)) inset, var(--sh-2); padding: 24px;
  min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center;
}
.shake { animation: shake .45s; }
.q-text { font-size: 28px; margin: 0; line-height: 1.55; }
.q-text small { display: block; font-size: 18px; color: var(--ink-2); }
.hint { width: 100%; }
.hint:empty { display: none; }
.hint > * { animation: rise .35s both; }
.q-card .hint:empty { display: none; }
.q-card .hint { border-top: 3px dashed var(--line-2); padding-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: rgba(255, 255, 255, .85); }
.hint-t { font-size: 20px; color: var(--math-d); margin: 0; line-height: 1.55; }
.howto {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; margin: 0 auto 12px;
  font-size: 18px; font-weight: 700; color: var(--ink-2); background: #fff; border-radius: 999px; padding: 6px 16px; box-shadow: 0 0 0 2px var(--line) inset;
}
.howto .ic { width: 22px; height: 22px; color: var(--c, var(--math)); stroke-width: 2.4; }
.a-area > .howto { display: flex; }
.howto.big { font-size: 23px; padding: 9px 22px; margin: 0 auto; }
.howto.big .ic { width: 28px; height: 28px; }
/* 「つぎへ」は せつめいが ながくても 画面の したに みえて いるように する */
.next-row { display: flex; justify-content: center; gap: 16px; min-height: 10px; position: sticky; bottom: 14px; z-index: 6; }
.next-row:empty { display: none; }
.next-row .btn { animation: rise .3s both; box-shadow: 0 5px 0 var(--go-d), 0 12px 26px -6px rgba(58, 53, 48, .35); }

/* 赤ペン：はなまる と まる */
.hanamaru { position: absolute; right: 8px; top: 4px; width: 140px; height: 140px; pointer-events: none; overflow: visible; transform: rotate(-8deg); z-index: 3; }
.hanamaru path { fill: none; stroke: var(--red); stroke-width: 3.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .55s ease-out forwards; }
.hanamaru .hm-pe { animation-delay: .4s; animation-duration: .5s; }
.hanamaru.still path { animation: none; stroke-dashoffset: 0; }
.pen-circle { position: absolute; pointer-events: none; overflow: visible; z-index: 2; }
.pen-circle path { fill: none; stroke: var(--red); stroke-width: 3.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .42s ease-out forwards; opacity: .92; }

/* しき */
.eq { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 78px; font-weight: 700; line-height: 1.1; }
.eq span { min-width: .6em; text-align: center; }
.eq.long { font-size: 60px; gap: 8px; }
.qbox { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border: 5px dashed var(--star-d); border-radius: 16px; color: var(--star-d); font-size: .8em; background: var(--star-l); }
.qbox.small { width: 1.4em; height: 1.4em; border-width: 3px; border-radius: 12px; font-size: 1em; vertical-align: middle; margin: 0 4px; }
.ask-eq { color: var(--red); }

/* 絵の ならび */
.objs { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.frame { display: grid; grid-template-columns: repeat(5, auto); gap: 4px 6px; }
.frame.boxed { border: 3px solid #cfe2fa; border-radius: 14px; padding: 6px; background: rgba(229, 241, 255, .6); }
.ob { font-size: 46px; line-height: 1.15; width: 1.15em; text-align: center; animation: pop .35s both; }
.ob:nth-child(2) { animation-delay: .03s; } .ob:nth-child(3) { animation-delay: .06s; } .ob:nth-child(4) { animation-delay: .09s; } .ob:nth-child(5) { animation-delay: .12s; }
.ob:nth-child(6) { animation-delay: .15s; } .ob:nth-child(7) { animation-delay: .18s; } .ob:nth-child(8) { animation-delay: .21s; } .ob:nth-child(9) { animation-delay: .24s; } .ob:nth-child(10) { animation-delay: .27s; }
.objs.many .ob { font-size: 36px; }
.ob.empty { display: inline-block; height: 1.15em; border: 2px dashed #cfe2fa; border-radius: 8px; }
.ob.gone { position: relative; opacity: .35; }
.ob.gone::after { content: '✕'; position: absolute; inset: 0; color: var(--red); font-size: .9em; font-weight: 700; opacity: 1; }
.objs.line { flex-wrap: nowrap; gap: 4px; }
.objs.line .ob { font-size: 40px; }
.hint-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.hint-row .ob, .hint-col .ob, .hint .ob { font-size: 32px; }
.hint-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.op { font-size: 28px; font-weight: 700; color: var(--ink-2); }
.dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 360px; }
.dot { width: 36px; height: 36px; border-radius: 50%; }
.dot.on { background: #f5895d; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12); }
.dot.off { background: #fff; border: 4px solid var(--math-2); }
.scatter { display: flex; flex-wrap: wrap; gap: 6px 12px; max-width: 420px; justify-content: center; }
.scatter span { font-size: 34px; display: inline-block; }
.scatter-box { position: relative; width: min(420px, 90%); height: 190px; background: rgba(229, 241, 255, .55); border-radius: 18px; border: 3px dashed #cfe2fa; }
.scatter-box .ob { position: absolute; font-size: 40px; }
.dice { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(3, 56px); gap: 4px; background: #fff; border: 4px solid var(--line-2); border-radius: 22px; padding: 8px; }
.dice .ob { display: grid; place-items: center; width: auto; font-size: 40px; }
.hide-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.hidebox { position: relative; font-size: 90px; line-height: 1; }
.hidebox b { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); font-size: 34px; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .4); }

/* さくらんぼ */
.sakura { display: flex; flex-direction: column; align-items: center; }
.sk-row { display: grid; grid-template-columns: repeat(5, 74px); align-items: start; }
.sk-c { text-align: center; font-size: 52px; font-weight: 700; }
.sk-c.tgt { color: var(--red); }
.cherry { width: 96px; height: 80px; margin-left: -11px; }
.cherry-t { font-size: 26px; font-weight: 700; fill: #fff; text-anchor: middle; dominant-baseline: central; font-family: var(--font); }
.sk-text { font-size: 21px; line-height: 1.6; margin: 6px 0 0; }

/* おはなし */
.story { display: flex; gap: 18px; align-items: center; text-align: left; }
.story-pic { font-size: 86px; animation: bob 2.6s infinite; }
.story p { font-size: 29px; line-height: 1.75; margin: 0; }
.story.small p { font-size: 22px; line-height: 1.6; }
.story.small .story-pic { font-size: 56px; }

/* おおきい かず */
.blocks { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.ten { display: grid; grid-template-rows: repeat(10, 14px); gap: 2px; padding: 3px; background: var(--math); border-radius: 6px; }
.ten i, .ones i { display: block; width: 18px; height: 14px; background: #b3d3fa; border-radius: 3px; }
.ones { display: grid; grid-template-rows: repeat(10, 14px); gap: 2px; padding: 3px; align-content: end; }
.ones i { background: #ffc35c; }
.hundred { width: 72px; height: 72px; background: repeating-linear-gradient(0deg, var(--math) 0 6px, #b3d3fa 6px 7px), var(--math); border-radius: 6px; color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 20px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.seq { display: flex; align-items: center; gap: 8px; font-size: 48px; font-weight: 700; flex-wrap: wrap; justify-content: center; }
.seq .arrow { font-style: normal; color: var(--line-2); font-size: 30px; }
.seq.words { font-size: 30px; }
.bignum { font-size: 76px; font-weight: 700; }
.bignum.inline { font-size: 46px; vertical-align: middle; }
.numline { display: flex; gap: 2px; background: #fff; padding: 6px; border-radius: 12px; flex-wrap: wrap; justify-content: center; }
.nl { width: 42px; text-align: center; font-size: 24px; font-weight: 700; border-bottom: 4px solid var(--line-2); padding: 4px 0; }
.nl.five { border-color: var(--ink-3); }
.nl-q { color: var(--star-d); }

/* とけい */
.clock { width: 250px; height: 250px; }
.ck-face { fill: #fff; stroke: var(--math); stroke-width: 8; }
.ck-t { stroke: var(--line-2); stroke-width: 2; }
.ck-t5 { stroke: var(--ink-2); stroke-width: 3.5; }
.ck-n { font-size: 22px; font-weight: 700; fill: var(--ink); text-anchor: middle; dominant-baseline: central; font-family: var(--font); }
.ck-hour { stroke: var(--koku); stroke-width: 9; stroke-linecap: round; }
.ck-min { stroke: var(--math); stroke-width: 6; stroke-linecap: round; }
.ck-c { fill: var(--ink); }
.q-card .hint .clock { width: 170px; height: 170px; }

/* ながさ・かさ・ひろさ・グラフ */
.tapes { display: flex; flex-direction: column; gap: 6px; width: min(460px, 100%); }
.tape { width: 100%; height: auto; }
.tape .cell { fill: #fff; stroke: #d3e3f6; stroke-width: 1.5; }
.chip { display: inline-block; padding: 2px 14px; border-radius: 10px; color: #fff; font-weight: 700; }
.chip.red { background: #f0705f; } .chip.blue { background: #4f95e6; }
.choices .chip { font-size: 30px; padding: 6px 22px; }
.glasses { display: flex; gap: 40px; } .glasses > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.glass { width: 74px; height: 120px; }
.vol-rows { display: flex; flex-direction: column; gap: 8px; font-size: 22px; align-items: flex-start; }
.cups { font-size: 30px; letter-spacing: 2px; }
.areas { display: flex; gap: 30px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.area { max-width: 100%; height: auto; }
.clip-wrap { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pencil { height: 40px; background: linear-gradient(90deg, #ffcf4a 85%, #f6b8a8 85%); border-radius: 6px 20px 20px 6px; font-size: 26px; line-height: 40px; text-align: right; padding-right: 6px; }
.clips { display: flex; } .clips span { width: 46px; text-align: center; font-size: 34px; }
.graph { display: flex; gap: 14px; align-items: flex-end; background: rgba(255, 255, 255, .92); border-radius: 16px; padding: 10px 16px; box-shadow: 0 0 0 2px var(--line) inset; }
.g-col { display: flex; flex-direction: column; align-items: center; }
.g-stack { display: flex; flex-direction: column-reverse; gap: 2px; min-height: 40px; border-bottom: 3px solid var(--ink-3); padding: 0 6px; }
.g-stack span { font-size: 30px; line-height: 1.1; }
.g-base { font-size: 26px; margin-top: 4px; }

/* かたち */
.stamp-shape { width: 70px; height: 70px; fill: #ffb85c; }
.tangram { max-width: 100%; height: auto; }
.tan-row { display: flex; align-items: center; gap: 30px; }
.tan-unit { font-size: 16px; color: var(--ink-2); text-align: center; border-left: 3px dashed var(--line-2); padding-left: 20px; }

/* なんばんめ */
.row-wrap { display: flex; align-items: center; gap: 8px; }
.row-end { font-size: 16px; color: var(--ink-2); writing-mode: vertical-rl; }
.row-line { display: flex; gap: 6px; background: rgba(229, 241, 255, .7); border-radius: 16px; padding: 8px 10px; }
.row-line.small .ra { font-size: 28px; }
.ra { font-size: 46px; line-height: 1.1; }
.row-labels { display: flex; justify-content: space-between; font-size: 18px; color: var(--ink-2); padding: 0 6px 6px; }

/* こくご */
.pic { font-size: 112px; line-height: 1.1; animation: pop .4s; }
.pic.small { font-size: 66px; }
.listen-card { width: 136px; height: 136px; border-radius: 50%; background: var(--math); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 0 var(--math-d); animation: pop .4s; cursor: pointer; }
.listen-card .ic { width: 66px; height: 66px; stroke-width: 2.2; }
.listen-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--math-d); }
.ear-big { display: grid; place-items: center; }
.kana-big { font-size: 154px; line-height: 1.05; font-weight: 700; color: var(--koku); }
.kana-big.hira { color: var(--go); }
.kana-big .mark { color: var(--red); font-size: .6em; vertical-align: top; }
.kanji-big { font-size: 124px; line-height: 1.1; letter-spacing: .05em; }
.word-card { font-size: 60px; background: #fff; border-radius: 22px; padding: 8px 34px; box-shadow: 0 5px 0 var(--c-2, var(--line-2)), 0 0 0 3px var(--c-l, var(--line)) inset; }
.sentence { font-size: 40px; margin: 0; line-height: 1.6; }
.hl { color: var(--red); background: var(--red-l); border-radius: 8px; padding: 0 4px; }
.big-word { font-size: 46px; }
.shiri { display: flex; align-items: center; gap: 14px; }
.shiri-w { font-size: 48px; font-weight: 700; }
.shiri-arrow { font-size: 36px; color: var(--orange); font-weight: 700; }
.objs-line { font-size: 48px; letter-spacing: 4px; max-width: 520px; text-align: center; line-height: 1.3; }
.objs-line.small { font-size: 30px; letter-spacing: 2px; }
.item-row { display: flex; gap: 22px; }
.item-row span { display: flex; flex-direction: column; align-items: center; font-size: 22px; }
.item-row b { font-size: 62px; font-weight: 400; }
.calendar { width: 150px; border-radius: 16px; overflow: hidden; background: #fff; text-align: center; box-shadow: 0 5px 0 var(--line-2), 0 0 0 2px var(--line) inset; }
.cal-top { background: var(--koku); color: #fff; font-size: 18px; padding: 4px; letter-spacing: .2em; }
.cal-day { font-size: 76px; font-weight: 700; line-height: 1.3; }
.cal-day small { font-size: 30px; }
.week-strip { display: flex; gap: 6px; }
.week-strip span { width: 48px; height: 48px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 27px; box-shadow: 0 0 0 2px var(--line) inset; }
.week-strip span.on { background: var(--star-l); box-shadow: 0 0 0 3px var(--star) inset; }
u.kj { text-decoration: none; border-bottom: 6px solid var(--star); padding: 0 2px; }
ruby rt { font-size: 45%; color: var(--red); }
.blank-y { display: inline-flex; flex-direction: column; align-items: center; vertical-align: bottom; line-height: 1; }
.blank-y small { font-size: 18px; color: var(--red); margin-bottom: 2px; }

/* ---------- こたえる ところ ---------- */
.choices { display: grid; gap: 14px; }
.choices.n2 { grid-template-columns: repeat(2, 1fr); }
.choices.n3 { grid-template-columns: repeat(3, 1fr); }
.choices.n4 { grid-template-columns: repeat(4, 1fr); }
.choices.n5 { grid-template-columns: repeat(5, 1fr); }
.choices.n6 { grid-template-columns: repeat(3, 1fr); }
.choice {
  position: relative; border: 0; background: #fff; border-radius: 24px; min-height: 104px; padding: 12px 10px;
  box-shadow: 0 7px 0 var(--c-2, var(--line-2)), 0 0 0 3px var(--c-l, var(--line)) inset; font-size: 42px; font-weight: 700;
  display: grid; place-items: center; transition: transform .08s, box-shadow .08s, background .15s;
}
@media (hover: hover) { .choice:hover:not(:disabled) { background: var(--c-l, var(--cream)); } }
.choice:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 var(--c-2, var(--line-2)), 0 0 0 3px var(--c-l, var(--line)) inset; }
.choice .key { position: absolute; left: 11px; top: 7px; font-size: 12px; color: var(--ink-3); font-family: var(--font-ui); font-weight: 400; }
.c-body { display: contents; }
.choice.wrong { opacity: .4; background: var(--soft); box-shadow: 0 0 0 3px var(--line) inset; transform: translateY(5px); cursor: default; }
.choice.right { background: #fffaf8; box-shadow: 0 7px 0 #f4b3a6, 0 0 0 4px var(--red) inset; }
.choice.reveal { background: var(--star-l); box-shadow: 0 7px 0 var(--star-d), 0 0 0 4px var(--star) inset; animation: glow 1.1s ease-in-out infinite alternate; }
.choice.sel { background: var(--c-l, var(--math-l)); box-shadow: 0 7px 0 var(--c-d, var(--math-d)), 0 0 0 4px var(--c, var(--math)) inset; }
.choice.sel::after {
  content: '✓'; position: absolute; top: -12px; right: -10px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--go); color: #fff; font-size: 21px; display: grid; place-items: center; font-family: var(--font-ui); box-shadow: 0 3px 0 var(--go-d);
}
.choices.st-num .choice { font-size: 64px; }
.choices.st-num.n3 .choice, .choices.st-num.n4 .choice { font-size: 58px; }
.choices.st-kana .choice { font-size: 74px; min-height: 128px; }
.choices.st-kanji .choice { font-size: 56px; }
.choices.st-word .choice { font-size: 36px; }
.choices.st-text .choice { font-size: 33px; }
.choices.st-card .choice { min-height: 196px; }
.choices.st-card .choice .objs .ob { font-size: 30px; }
.choices.st-pic .choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 26px; min-height: 130px; }
.pc-e { font-size: 68px; line-height: 1.1; }
.pc-w { font-size: 25px; }
.choices.st-sentence { grid-template-columns: 1fr !important; }
.choices.st-sentence .choice { font-size: 31px; min-height: 76px; justify-items: start; padding: 12px 26px; text-align: left; }
.choices.st-clock .choice { min-height: 0; padding: 10px; }
.choices.st-clock .clock { width: 170px; height: 170px; }
.choices.st-row { display: flex; gap: 8px; justify-content: center; flex-wrap: nowrap; }
.choices.st-row .choice { min-height: 96px; min-width: 0; flex: 1; max-width: 112px; font-size: 52px; padding: 8px 4px; }
.choices-wrap.colwrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.col-end { font-size: 17px; font-weight: 700; color: var(--ink-2); }
.choices.st-col { display: flex; flex-direction: column; gap: 8px; width: 140px; }
.choices.st-col .choice { min-height: 64px; font-size: 44px; padding: 4px; }
.ends.h { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; color: var(--ink-2); padding: 0 8px 6px; }

/* すうじパッド */
.pad { background: #fff; border-radius: 30px; box-shadow: var(--sh-2); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pad-display {
  position: relative; height: 94px; border-radius: 18px; background-color: #fff; background-image: var(--hogan); background-size: 23px 23px;
  box-shadow: 0 0 0 3px var(--line-2) inset; display: grid; place-items: center; font-size: 68px; font-weight: 700; letter-spacing: .08em;
}
.pad-display .ph { color: var(--line-2); }
.pad-display.right { box-shadow: 0 0 0 4px var(--red) inset; color: var(--red); }
.pad-display.reveal { box-shadow: 0 0 0 4px var(--star) inset; background-color: var(--star-l); color: var(--ink); animation: glow 1.1s ease-in-out infinite alternate; }
.pad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pk { height: 70px; border: 0; border-radius: 18px; background: var(--math-l); font-size: 40px; font-weight: 700; color: var(--math-d); box-shadow: 0 5px 0 var(--math-2); transition: transform .06s; }
.pk:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--math-2); }
.pk.del { background: var(--koku-l); color: var(--koku-d); box-shadow: 0 5px 0 var(--koku-2); display: grid; place-items: center; }
.pk.del .ic { width: 34px; height: 34px; stroke-width: 2.4; }
.pk.ok { background: var(--go); color: #fff; box-shadow: 0 5px 0 var(--go-d); font-size: 24px; }

/* ことば づくり（ならべる） */
.build { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.slots { position: relative; display: flex; gap: 10px; }
.slot { width: 90px; height: 90px; border-radius: 18px; border: 4px dashed var(--line-2); background: rgba(255, 255, 255, .85); display: grid; place-items: center; font-size: 60px; font-weight: 700; }
.slot.filled { border-style: solid; border-color: var(--c-2, var(--ink-3)); background: #fff; animation: pop .25s; }
.slots.right .slot { border-color: var(--red); }
.slot.reveal { border-color: var(--star); background: var(--star-l); }
.tiles { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.tile { width: 90px; height: 90px; border: 0; border-radius: 20px; font-size: 56px; font-weight: 700; background: #fff; box-shadow: 0 6px 0 var(--c-2, var(--line-2)), 0 0 0 3px var(--c-l, var(--line)) inset; transition: transform .1s, opacity .2s; }
.tile:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--c-2, var(--line-2)), 0 0 0 3px var(--c-l, var(--line)) inset; }
.tile:disabled { opacity: .2; transform: scale(.92); box-shadow: none; }
.build.wide .slot { width: auto; min-width: 150px; padding: 0 12px; font-size: 32px; }
.build.wide .tile { width: auto; padding: 0 18px; font-size: 32px; height: 78px; }

/* もじを タッチ */
.tapline { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; padding: 8px; }
.tapc { position: relative; min-width: 70px; height: 84px; border: 0; border-radius: 18px; background: #fff; font-size: 48px; font-weight: 700; box-shadow: 0 6px 0 var(--c-2, var(--line-2)), 0 0 0 3px var(--c-l, var(--line)) inset; padding: 0 6px; }
.tapc:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--c-2, var(--line-2)), 0 0 0 3px var(--c-l, var(--line)) inset; }
.tapc.wrong { opacity: .4; box-shadow: 0 0 0 3px var(--line) inset; transform: translateY(4px); }
.tapc.right { box-shadow: 0 6px 0 #f4b3a6, 0 0 0 4px var(--red) inset; }
.tapc.reveal { background: var(--star-l); box-shadow: 0 6px 0 var(--star-d), 0 0 0 4px var(--star) inset; animation: glow 1.1s ease-in-out infinite alternate; }
.tap-gap { width: 18px; }
.tap-punct { font-size: 44px; padding: 0 2px; }

/* 書き順 */
.quiz-body.kind-write { grid-template-columns: auto 1fr; }
.kind-write .q-card { padding: 16px; }
.kind-write .a-area { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.writer { touch-action: none; cursor: crosshair; border-radius: 16px; box-shadow: 0 0 0 3px #f6cfc5; background: #fffdf8; }
.w-paper { fill: #fffdf8; stroke: #eab5a7; stroke-width: 1; }
.w-grid { stroke: #f0c4b9; stroke-width: .6; stroke-dasharray: 2.5 2.5; fill: none; }
.w-guide path { fill: none; stroke: #e3e3e3; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.w-done path { fill: none; stroke: var(--ink); stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.w-ink { fill: none; stroke: #4a4440; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.w-demo { fill: none; stroke: var(--star-d); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.w-hintpath { fill: none; stroke: var(--go); stroke-width: 6.5; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.w-start { fill: var(--red); stroke: #fff; stroke-width: 1; }
.w-start.demo { fill: var(--star-d); }
.w-num { fill: #fff; font-size: 5px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: sans-serif; }
.trace-info { display: flex; align-items: center; gap: 18px; justify-content: center; }
.trace-char { font-size: 106px; line-height: 1; color: var(--koku); background-color: #fff; background-image: var(--hogan); background-size: 26px 26px; border-radius: 22px; padding: 6px 22px; box-shadow: 0 0 0 3px var(--koku-l) inset; }
.trace-ex { font-size: 32px; }
.trace-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.trace-stars { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, .94); border-radius: 18px; padding: 2px 14px; animation: pop .4s; }
.trace-stars .stars { font-size: 44px; }
.wr-count { font-size: 18px; color: var(--ink-2); }
.wr-yomi { display: flex; flex-direction: column; gap: 4px; font-size: 30px; }
.stars { font-size: 26px; letter-spacing: 2px; }
.stars .on { color: var(--star); text-shadow: 0 2px 0 var(--star-d); }
.stars .off { color: var(--line-2); }

/* ---------- けっか ---------- */
.result { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
.res-sheet {
  position: relative; background-color: #fff; background-image: var(--hogan); background-size: 30px 30px; border-radius: 30px;
  box-shadow: var(--sh-2); padding: 16px 24px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.res-title { margin: 2px 0 0; font-size: 46px; letter-spacing: .12em; color: var(--orange); text-shadow: 0 3px 0 #fff, 0 5px 0 rgba(0, 0, 0, .08); animation: pop .5s; }
.res-head { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: var(--ink-2); }
.res-head .uart { --u: 40px; border-radius: 12px; }
.res-date { font-size: 15px; color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.res-stars { display: flex; gap: 8px; }
.rs { font-size: 72px; color: var(--line); line-height: 1; transition: color .2s; }
.rs.on { color: var(--star); text-shadow: 0 4px 0 var(--star-d); animation: starIn .5s cubic-bezier(.2, 1.8, .5, 1); }
.res-mark { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 4px 0 2px; flex-wrap: wrap; }
.res-score { display: flex; flex-direction: column; align-items: center; }
.score-line { display: flex; align-items: baseline; gap: 4px; }
.score-n { font-size: 90px; font-weight: 700; color: var(--red); line-height: 1; }
.score-d { font-size: 36px; color: var(--ink-2); }
.res-score small { font-size: 17px; color: var(--ink-2); }
.hanko {
  --hk: 140px;
  position: relative; width: var(--hk); height: var(--hk); border-radius: 50%; color: var(--red); flex: none;
  border: calc(var(--hk) * .035) solid var(--red); box-shadow: inset 0 0 0 calc(var(--hk) * .03) #fff, inset 0 0 0 calc(var(--hk) * .05) var(--red);
  display: grid; place-items: center; text-align: center; font-weight: 700; font-size: calc(var(--hk) * .13); line-height: 1.22; letter-spacing: 0;
  padding: calc(var(--hk) * .06); white-space: nowrap;
  transform: rotate(-10deg); animation: stampIn .5s cubic-bezier(.2, 1.5, .5, 1) both; animation-delay: .25s;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.4 3.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.4 3.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}
.hanko.still { animation: none; opacity: .92; }
.res-lines { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.res-combo, .res-grow { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 6px; }
.res-combo { color: var(--ink-2); }
.res-grow { color: var(--go-d); font-weight: 700; }
.res-combo .ic, .res-grow .ic { width: 22px; height: 22px; stroke-width: 2.6; }
.banners { display: flex; flex-direction: column; gap: 8px; width: min(470px, 100%); }
.banner { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 16px; font-size: 19px; font-weight: 700; text-align: left; animation: rise .4s both; box-shadow: 0 0 0 2px var(--line) inset; }
.banner .ic { width: 24px; height: 24px; flex: none; stroke-width: 2.6; }
.banner.gold { background: var(--star-l); box-shadow: 0 0 0 3px var(--star) inset; color: #6a4a00; }
.banner.pink { background: var(--pink-l); box-shadow: 0 0 0 3px var(--pink) inset; color: var(--pink-d); }
.banner.soft { background: var(--go-l); box-shadow: 0 0 0 2px #b7e4c8 inset; color: var(--go-d); font-weight: 400; }
.res-level { width: min(470px, 100%); background: #fff; border-radius: 16px; padding: 10px 16px; text-align: left; box-shadow: 0 0 0 2px var(--line) inset; }
.st-lv { font-size: 17px; margin-bottom: 6px; }
.st-lv b { font-size: 23px; }
.bar { height: 12px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--star); border-radius: 6px; transition: width .8s ease; }
.res-side { background: #fff; border-radius: 30px; box-shadow: var(--sh-2); padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.pick-title { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pick-title .ic { width: 26px; height: 26px; color: var(--star-d); }
.offer { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.offer-st {
  position: relative; width: 116px; height: 116px; border: 0; border-radius: 50%; background: var(--pink-l);
  display: grid; place-items: center; transition: transform .2s, opacity .3s; box-shadow: 0 6px 0 #f5bcd4, 0 0 0 3px #ffd1e3 inset;
}
.offer-st:active { transform: scale(.95); }
.offer-st .puffy { font-size: 64px; }
.offer-st.gone { opacity: .15; transform: scale(.85); }
.offer-st.chosen { transform: scale(1.12); background: var(--star-l); box-shadow: 0 6px 0 var(--star-d), 0 0 0 4px var(--star) inset; }
.offer.done .offer-st { pointer-events: none; }
.newb { position: absolute; top: -6px; right: -12px; background: var(--pink); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; font-family: var(--font-ui); font-weight: 700; transform: rotate(10deg); box-shadow: 0 2px 0 var(--pink-d); }
.res-btns { display: flex; flex-direction: column; gap: 12px; width: min(340px, 100%); }
.res-btns .btn { width: 100%; justify-content: flex-start; }
.res-btns .btn .ic { width: 26px; height: 26px; }

/* ぷっくり シール（白い ふちどり＋かげ）／キラキラ */
.puffy { display: inline-block; filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 3px 3px rgba(0, 0, 0, .22)); }
.puffy.kira { animation: kira 2.4s linear infinite; }

/* ---------- シールちょう ---------- */
.album-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0; padding-left: 10px; }
.atab { border: 0; border-radius: 16px 16px 0 0; padding: 9px 20px; font-size: 19px; background: rgba(255, 255, 255, .6); color: var(--ink-2); }
.atab.sel { background: #fff; color: var(--ink); font-weight: 700; box-shadow: inset 0 4px 0 var(--pink); }
.atab.zukan { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; background: #fff; }
.album-main { position: relative; }
.album-page { position: relative; width: 100%; height: clamp(240px, calc(100vh - 360px), 560px); border-radius: 0 var(--r-l) var(--r-l) var(--r-l); overflow: hidden; box-shadow: var(--sh-1); touch-action: none; }
.bg-sky { background: linear-gradient(180deg, #a9d6f5, #e8f4fc 70%, #cfeac2 70%); }
.bg-sea { background: linear-gradient(180deg, #d4ecf8 0 35%, #5dacdc 35%, #2b72ad); }
.bg-forest { background: radial-gradient(circle at 20% 110%, #6faa62 0 30%, transparent 31%), radial-gradient(circle at 80% 115%, #5a9a52 0 35%, transparent 36%), linear-gradient(180deg, #edf6e4, #c9e3b6); }
.bg-castle { background: linear-gradient(180deg, #f8dce6, #fbf0f4 65%, #ecd8f1 65%); }
.bg-space { background: radial-gradient(circle at 30% 30%, #36327a, #13112f 70%); }
.bg-candy { background: repeating-linear-gradient(45deg, #fff1f6 0 26px, #fbe3ec 26px 52px); }
.page-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: rgba(58, 53, 48, .6); margin: 0; }
.bg-space .page-empty { color: rgba(255, 255, 255, .75); }
.placed { position: absolute; font-size: 62px; transform: translate(-50%, -50%) scale(var(--s)) rotate(var(--r)); cursor: grab; touch-action: none; user-select: none; }
.placed.selected { outline: 3px dashed var(--star-d); outline-offset: 4px; border-radius: 12px; }
.sel-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; background: rgba(255, 255, 255, .95); padding: 8px; border-radius: 16px; }
.sel-tools .ic { width: 18px; height: 18px; }
.tray { display: flex; flex-wrap: wrap; gap: 10px; background: #fff; border-radius: var(--r-l); padding: 14px; margin-top: 14px; box-shadow: var(--sh-1); min-height: 90px; }
.tray-st { position: relative; font-size: 48px; cursor: grab; touch-action: none; }
.tray-st b { position: absolute; right: -8px; bottom: -4px; font-size: 12px; background: var(--pink); color: #fff; border-radius: 10px; padding: 0 6px; font-family: var(--font-ui); filter: none; }
.drag-ghost { position: fixed; z-index: 80; font-size: 66px; transform: translate(-50%, -50%) scale(1.1); pointer-events: none; }
.st-note { text-align: center; font-size: 18px; color: var(--ink-2); margin: -6px 0 12px; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 12px; }
.sticker { position: relative; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 0 var(--line-2); }
.sticker .puffy { font-size: 46px; }
.sticker.empty { background: transparent; color: var(--line-2); font-size: 30px; box-shadow: 0 0 0 3px var(--line-2) inset; }
.sticker b { position: absolute; bottom: -4px; right: -4px; font-size: 12px; background: var(--pink); color: #fff; border-radius: 10px; padding: 1px 6px; font-family: var(--font-ui); }

/* ---------- あいぼう ---------- */
.buddy-main { display: grid; grid-template-columns: 1fr 1.2fr; gap: 22px; align-items: start; }
.card-base { background: #fff; border-radius: var(--r-l); box-shadow: var(--sh-1); }
.buddy-big { padding: 20px; text-align: center; position: relative; overflow: hidden; background: linear-gradient(180deg, #efe9ff, #fff 70%); }
.buddy-big > .mascot-svg { width: 240px; height: 240px; animation: bob 3s ease-in-out infinite; }
.bd-name { font-size: 26px; font-weight: 700; }
.bd-name small { font-size: 16px; color: var(--ink-2); font-weight: 400; }
.evo { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 8px; }
.evo span { display: flex; flex-direction: column; align-items: center; opacity: .35; font-size: 13px; }
.evo span.on { opacity: 1; }
.evo .mascot-svg { width: 58px; height: 58px; animation: none; }
.evo i { font-style: normal; color: var(--line-2); }
.closet { padding: 14px 20px 18px; }
.closet h3 { font-size: 18px; margin: 12px 0 8px; color: var(--purple-d); letter-spacing: .1em; }
.items { display: flex; gap: 10px; flex-wrap: wrap; }
.item { width: 120px; border: 0; border-radius: 18px; background: var(--cream); padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 15px; box-shadow: 0 4px 0 var(--line-2), 0 0 0 2px var(--line) inset; }
.item.worn { background: var(--purple-l); box-shadow: 0 4px 0 var(--purple-d), 0 0 0 3px var(--purple) inset; }
.item.locked { opacity: .6; cursor: default; box-shadow: 0 0 0 2px var(--line) inset; }
.item.locked .item-svg { filter: grayscale(1) opacity(.4); }
.item .ic { width: 14px; height: 14px; }
.item-svg { width: 70px; height: 70px; }
.note { font-size: 14px; color: var(--ink-2); line-height: 1.65; }

/* ---------- やすみ・おしまい ---------- */
.break { text-align: center; }
.break-scene { width: min(540px, 92vw); height: auto; border-radius: var(--r-l); box-shadow: var(--sh-1); }
.break-t { font-size: 27px; margin: 0; }
.break-count { position: relative; width: 124px; height: 124px; }
.break-count svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bc-bg { fill: none; stroke: #fff; stroke-width: 9; }
.bc-fg { fill: none; stroke: var(--go); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: countdown 20s linear forwards; }
.break-count b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 50px; color: var(--go-d); font-variant-numeric: tabular-nums; }
.limit { text-align: center; }
.limit .q-text { display: flex; align-items: center; gap: 8px; justify-content: center; }

/* ---------- 保護者（おとな むけ。こども むけの 大きさに しない）---------- */
.scr-parent { font-family: var(--font-ui); font-size: 15px; }
.scr-parent .page-head h2 { font-size: 26px; letter-spacing: .04em; }
.gate { width: min(520px, 100%); text-align: center; font-family: var(--font-ui); }
.gate h2 { margin: 0 0 6px; }
.gate p { font-size: 16px; }
.gate-q { font-size: 34px !important; font-family: var(--font); }
.gate-q input { width: 120px; font-size: 34px; padding: 4px 10px; border: 2px solid var(--line-2); border-radius: 12px; user-select: text; }
.ptabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ptab { border: 0; background: rgba(255, 255, 255, .6); border-radius: 12px; padding: 8px 16px; font-size: 16px; box-shadow: 0 0 0 1px var(--line) inset; }
.ptab.sel { background: #fff; font-weight: 700; box-shadow: 0 2px 0 var(--line-2), 0 0 0 1px var(--line-2) inset; }
.pcard { background: #fff; border-radius: 16px; box-shadow: var(--sh-1); padding: 18px 22px; margin-bottom: 14px; }
.pcard h3 { margin: 4px 0 12px; font-size: 18px; }
.pcard h3 small { font-weight: 400; font-size: 12px; color: var(--ink-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.kpis div { background: var(--cream); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; box-shadow: 0 0 0 1px var(--line) inset; }
.kpis b { font-size: 23px; }
.kpis span { font-size: 12px; color: var(--ink-2); }
.week { display: flex; gap: 10px; align-items: flex-end; height: 140px; margin-top: 16px; }
.wcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; font-size: 13px; }
.wbar { flex: 1; width: 100%; max-width: 40px; background: var(--soft); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.wbar i { display: block; width: 100%; background: var(--math); border-radius: 8px; }
.wcol small { color: var(--ink-2); height: 1.2em; }
.tbl-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th, .ptable td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ptable th { background: var(--cream); font-weight: 700; }
.ptable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ptable tr.warn td { background: var(--red-l); }
.ptable .uart { --u: 26px; border-radius: 7px; vertical-align: middle; margin-right: 6px; display: inline-grid; }
.ptable .ua-b { display: none; }
.settings { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.settings label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.settings input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--go); }
.settings input[type=range] { accent-color: var(--math); }
.settings select { font-size: 15px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-2); font-family: var(--font-ui); }
.tbar { height: 10px; background: var(--soft); border-radius: 6px; overflow: hidden; margin-bottom: 3px; }
.tbar i { display: block; height: 100%; background: var(--star); }
.term-t td { min-width: 200px; white-space: normal; }
.miss-list { display: flex; flex-wrap: wrap; gap: 8px; }
.miss { display: inline-flex; align-items: baseline; gap: 6px; background: var(--red-l); border-radius: 10px; padding: 4px 10px; font-size: 14px; }
.miss small { color: var(--ink-2); font-size: 12px; }
.miss b.big { font-size: 24px; font-family: var(--font); }
.miss i { font-style: normal; color: var(--red-d); font-weight: 700; }
.note.warnbox { background: var(--star-l); border-radius: 10px; padding: 10px 12px; color: #6a4a00; font-size: 14px; }
.note.good { background: var(--go-l); border-radius: 10px; padding: 10px 12px; color: var(--go-d); font-size: 14px; }

/* ---------- モーダル・おしらせ ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(40, 50, 80, .4); display: grid; place-items: center; animation: fadeIn .2s; }
.modal { background: #fff; border-radius: 30px; padding: 24px 34px; text-align: center; box-shadow: var(--sh-2); animation: pop .3s; max-width: 92vw; }
.modal .mascot { justify-content: center; margin-bottom: 6px; }
.modal-msg { font-size: 29px; margin-bottom: 18px; }
.modal-btns { display: flex; gap: 14px; justify-content: center; }
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 140%); z-index: 70;
  background: var(--ink); color: #fff; padding: 14px 26px; border-radius: 999px; font-size: 20px; max-width: 90vw;
  opacity: 0; visibility: hidden; transition: transform .3s, opacity .3s, visibility .3s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- うごき ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes jump { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-22px) scale(1.05, .95); } 60% { transform: translateY(0) scale(1.08, .9); } 100% { transform: none; } }
@keyframes flapL { to { transform: rotate(-30deg); } }
@keyframes flapR { to { transform: rotate(30deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }
@keyframes glow { from { filter: drop-shadow(0 0 0 rgba(255, 197, 49, 0)); } to { filter: drop-shadow(0 0 10px rgba(255, 197, 49, .9)); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes stampIn { from { opacity: 0; transform: scale(1.7) rotate(-22deg); } to { opacity: .92; transform: scale(1) rotate(-10deg); } }
@keyframes starIn { from { transform: scale(0) rotate(-180deg); } to { transform: none; } }
@keyframes nudgeY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ringPulse { 0%, 100% { outline: 0 solid rgba(255, 197, 49, .55); outline-offset: 0; } 50% { outline: 12px solid rgba(255, 197, 49, 0); outline-offset: 4px; } }
@keyframes countdown { to { stroke-dashoffset: 1; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes kira {
  0%, 100% { filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 0 6px #ffe08a) brightness(1); }
  50% { filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 0 12px #f7b9c8) brightness(1.12) saturate(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-svg, .story-pic, .stop-go, .stop.next .stop-ring, .puffy.kira { animation: none !important; }
}

/* =====================================================================
   画面の 大きさ ごとの ちょうせい
   ===================================================================== */
/* ひくい 画面（ノートPC 1366×768 など）では すこし つめる */
@media (max-height: 800px) and (min-width: 981px) {
  #app { padding-top: 12px; }
  .q-card { min-height: 214px; padding: 16px; }
  .pic { font-size: 86px; }
  .listen-card { width: 116px; height: 116px; }
  .kana-big { font-size: 120px; }
  .kanji-big { font-size: 98px; }
  .choice { min-height: 90px; }
  .choices.st-kana .choice { min-height: 108px; font-size: 64px; }
  .choices.st-card .choice { min-height: 156px; }
  .choices.st-pic .choice { min-height: 136px; }
  .pc-e { font-size: 72px; }
  .pk { height: 58px; }
  .pad-display { height: 80px; font-size: 58px; }
  .clock { width: 210px; height: 210px; }
  .score-n { font-size: 78px; }
  .rs { font-size: 60px; }
  .hanko { --hk: 124px; }
}

/* 4つの ボタンが よこに ならぶ ちゅうくらいの はば（iPad よこ・小さめの PC）では 絵と 字を すこし 小さく */
@media (max-width: 1180px) and (min-width: 981px) {
  .bigbtn { gap: 10px; padding: 14px; }
  .bb-art { width: 66px; height: 66px; border-radius: 18px; }
  .bb-t { font-size: 26px; letter-spacing: .02em; }
  .board-main { grid-template-columns: 210px minmax(0, 1fr); }
  .guide .mascot-svg { width: 124px; height: 124px; }
}

/* タブレット・せまい 画面：1れつに ならべる */
@media (max-width: 980px), (orientation: portrait) and (max-width: 1100px) {
  #app { padding: 14px 18px 30px; }
  .board-main { grid-template-columns: 1fr; }
  .guide .mascot { flex-direction: row; justify-content: center; }
  .guide .mascot-svg { width: 96px; height: 96px; }
  .guide .bubble::before { left: -10px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(45deg); box-shadow: -2px 2px 0 0 var(--line); }
  .big-btns { grid-template-columns: repeat(2, 1fr); }
  .quiz-body, .quiz-body.kind-pad, .quiz-body.kind-write { grid-template-columns: 1fr !important; justify-items: stretch; }
  .kind-write .q-card { justify-self: center; }
  .pad { max-width: 580px; margin: 0 auto; width: 100%; }
  .result, .buddy-main { grid-template-columns: 1fr; }
  .eq { font-size: 62px; }
  .choices.n4 { grid-template-columns: repeat(2, 1fr); }
  .choices.n5, .choices.n6 { grid-template-columns: repeat(3, 1fr); }
  .choices.st-row .choice { font-size: 40px; min-height: 78px; }
}
@media (orientation: portrait) and (max-width: 1100px) {
  /* たてもちの タブレットは たてに よゆうが あるので、おす ところを もっと 大きく */
  .stop { width: 176px; }
  .stop-ring { width: 140px; height: 140px; }
  .stop .uart { --u: 90px; }
  .stop .hanamaru { top: 70px; width: 150px; height: 150px; margin: -75px 0 0 -75px; }
  .road-link { margin-top: 70px; }
  .bigbtn { min-height: 148px; }
  .quiz-top { flex-wrap: wrap; }
  .quiz-top .mascot { flex-basis: 100%; order: 2; }
  .qt-mid { flex: 1; align-items: flex-start; }
  .progress { justify-content: flex-start; }
  .q-card { min-height: 330px; }
  .choice { min-height: 126px; }
  .album-page { height: clamp(260px, 42vh, 620px); }
  .choices.st-pic .choice { min-height: 152px; }
  .pc-e { font-size: 78px; }
  .choices.st-kana .choice { min-height: 142px; }
  .pk { height: 72px; }
}
@media (max-width: 760px) {
  .road { flex-wrap: wrap; row-gap: 14px; }
  .stop { width: 120px; }
  .stop-ring { width: 100px; height: 100px; }
  .stop .uart { --u: 62px; }
  .road-link { display: none; }
  .bigbtn { min-height: 92px; gap: 10px; padding: 12px; }
  .bb-art { width: 58px; height: 58px; }
  .bb-t { font-size: 23px; }
}
@media (max-width: 600px) {
  #app { padding: 12px 14px 28px; }
  #topbar { padding: 0 12px; }
  .brand-name { display: none; }
  .logo { font-size: 32px; }
  .brand .brand-mark { width: 66px; height: 66px; }
  .avatar-grid { grid-template-columns: repeat(5, 1fr); }
  .choices.n3 { grid-template-columns: 1fr; }
  .sk-row { grid-template-columns: repeat(5, 56px); }
  .sk-c { font-size: 38px; }
  .cherry { width: 74px; margin-left: -9px; }
  .story { flex-direction: column; }
  .story p { font-size: 23px; }
  .slot, .tile { width: 66px; height: 66px; font-size: 42px; }
  .kana-big { font-size: 110px; }
  .speak-btn { width: 74px; }
  .big-btns { grid-template-columns: 1fr; }
}
