/* NERUPASS の見た目 — 色はここの変数を変えるとアプリ全体が変わる */
:root {
  --bg: #FBF6EE;          /* 背景(クリーム) */
  --card: #FFFFFF;        /* カード */
  --line: #E3D5C2;        /* 線(ベージュ) */
  --text: #3B2A1C;        /* 文字(こげ茶) */
  --muted: #6B5A48;       /* うすい文字 */
  --primary: #4F6140;     /* 主なボタン(深緑) */
  --primary-dark: #3E4E32;
  --primary-soft: #E9EFE2;
  --neru-bg: #F7EBDA;     /* NERUの枠 */
  --neru-line: #A07848;
  --track: #EFE5D6;       /* 進み具合のバーの地 */
  --correct: #1A7F37;     /* 正解(確定: 緑) */
  --wrong: #CF222E;       /* 不正解(確定: 赤) */
  --radius: 14px;
  --tab-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--primary); }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.view {
  padding: 16px 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom));
  outline: none;
}

h1 {
  font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
  font-weight: 800; font-size: 24px; margin: 8px 0 12px;
}
.lead { color: var(--muted); margin: 0 0 16px; font-size: 14px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.card h2 { font-size: 15px; margin: 0 0 6px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.card.neru { background: transparent; border: 0; box-shadow: none; } /* 2026-11-14 点線と色の枠をなくし、背景になじませる */

.badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark); margin-bottom: 8px;
}

.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; border: 0; border-radius: 12px;
  background: var(--primary); color: #FFFFFF; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--primary-dark); }
.btn[disabled] { background: #A9AFA2; cursor: default; }

.version { text-align: center; font-size: 11px; color: var(--muted); margin-top: 24px; }

/* 下のタブ */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1; max-width: 112px; height: var(--tab-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--muted); text-decoration: none;
}
.tabs svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.tabs a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.tabs a:focus-visible { outline: 2px solid var(--primary); outline-offset: -4px; border-radius: 8px; }

/* ----- ステップ2: 学ぶ画面 ----- */
.field { margin: 0 0 14px; }
.field-label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.seg { display: flex; gap: 4px; background: var(--track); border-radius: 12px; padding: 4px; }
.seg button {
  flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: transparent;
  font: inherit; font-size: 14px; color: var(--muted); cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); font-weight: 700; box-shadow: 0 1px 2px rgba(59,42,28,.12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  min-height: 44px; padding: 0 14px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text);
}
.chips button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.chips button[disabled] { color: #8C7E6E; background: transparent; cursor: default; }
.group { font-size: 13px; color: var(--muted); margin: 20px 0 8px; }
.list { list-style: none; margin: 0 0 12px; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 10px 14px;
  border: 0; background: transparent; font: inherit; text-align: left; color: var(--text); text-decoration: none; cursor: pointer;
}
.row:hover { background: #FDFAF5; }
.row[aria-expanded="true"] { background: var(--primary-soft); font-weight: 700; }
.row[aria-disabled="true"] { color: #8C7E6E; pointer-events: none; }
.row-all .row-name { font-weight: 700; }
.row-name { flex: 1; }
.row-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.chev { color: var(--muted); font-size: 20px; line-height: 1; }
.range { padding: 4px 14px 16px; background: var(--primary-soft); }
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; }
.notice { background: var(--card); border: 1.5px solid var(--primary); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; font-size: 14px; }
.notice-error { border-color: var(--wrong); }
.loading, .empty { color: var(--muted); text-align: center; padding: 24px 0; }

/* ----- ステップ3: 問題演習と結果 ----- */
.focus-mode .tabs { display: none; }
.focus-mode .view { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.pr-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.icon-btn { width: 44px; height: 44px; flex: none; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bar { flex: 1; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.bar > div { height: 100%; background: var(--primary); border-radius: 5px; transition: width .2s; }
.pr-count { font-size: 13px; font-weight: 700; white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.pill-ok { color: var(--correct); border-color: var(--correct); }
.pill-nat { color: var(--primary-dark); border-color: var(--primary); }
.stem { font-size: 18px; font-weight: 700; line-height: 1.7; margin: 8px 0 16px; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  font: inherit; font-size: 16px; text-align: left; color: var(--text); cursor: pointer;
}
.choice:hover:not([disabled]) { border-color: var(--primary); }
.choice[disabled] { cursor: default; }
.choice .num { flex: none; width: 26px; height: 26px; border-radius: 13px; background: var(--track); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.choice .ctext { flex: 1; }
.choice .tag { flex: none; font-size: 12px; font-weight: 700; }
.choice.is-correct { border: 2px solid var(--correct); background: #E6F4EA; color: var(--correct); font-weight: 700; }
.choice.is-wrong { border: 2px solid var(--wrong); background: #FCE8EA; color: var(--wrong); font-weight: 700; }
.fill-row { display: flex; gap: 8px; }
.fill input { flex: 1; min-height: 52px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 18px; background: var(--card); color: var(--text); }
.fill input.is-correct { border: 2px solid var(--correct); color: var(--correct); }
.fill input.is-wrong { border: 2px solid var(--wrong); color: var(--wrong); }
.btn-small { width: auto; padding: 0 18px; }
.feedback { margin: 18px 0 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); border: 2px solid var(--line); }
.feedback.ok { border-color: var(--correct); }
.feedback.ng { border-color: var(--wrong); }
.feedback h2 { margin: 0 0 6px; font-size: 18px; outline: none; }
.feedback.ok h2 { color: var(--correct); }
.feedback.ng h2 { color: var(--wrong); }
.feedback h3 { font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.expl { margin: 0; font-size: 15px; line-height: 1.75; }
.answer-line { margin: 0 0 6px; }
.cx { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.cx li { margin-bottom: 6px; }
.cx-ok strong { color: var(--correct); }
.source { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.link-btn { display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.result-score { text-align: center; }
.score { font-size: 18px; margin: 0; }
.score strong { font-size: 40px; color: var(--primary); }
.result-list .mark { flex: none; width: 28px; font-size: 18px; font-weight: 700; text-align: center; }
.mark.ok { color: var(--correct); }
.mark.ng { color: var(--wrong); }
.result-list .row-name { font-size: 14px; }
.btn-sub { background: var(--card); color: var(--primary); border: 1.5px solid var(--primary); margin-top: 10px; }
.btn-sub:hover, .btn-sub:focus-visible { background: var(--primary-soft); color: var(--primary-dark); }

/* ----- ステップ4: 自分の画面(記録と書き出し・読み込み) ----- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.stat-v { margin: 0; font-size: 24px; font-weight: 700; }
.stat-l { margin: 0; font-size: 12px; color: var(--muted); }
.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row .btn { margin-top: 0; }
.code { width: 100%; font: 12px/1.5 ui-monospace, Menlo, monospace; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #FDFAF5; color: var(--text); margin: 6px 0 10px; }
.file { display: block; margin: 0 0 10px; font-size: 14px; }
.card .notice { margin-top: 12px; }

/* ----- ステップ5: 復習 ----- */
.card-main { border: 2px solid var(--primary); }
.sec-title { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--primary); }
.big-num { margin: 0 0 12px; }
.big-num strong { font-size: 36px; margin-right: 2px; }
.next-review { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--primary-dark); }
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--track); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.s-fresh { background: #E2B97C; }
.s-mid { background: #9DB08A; }
.s-solid { background: var(--primary); }
.list .row .hint { margin: 0; }

/* ----- ステップ6: ホームと今日のミッション ----- */
.date { margin: 0; font-size: 12px; color: var(--muted); }
.mission .m-head { display: flex; justify-content: space-between; align-items: baseline; }
.m-what { font-size: 17px; font-weight: 700; margin: 4px 0 10px; }
.mission .bar { margin-bottom: 4px; }
.mission .btn { margin-top: 12px; }
.m-done { font-size: 18px; font-weight: 800; color: var(--primary); margin: 10px 0 0; text-align: center; }
.m-clear { text-align: center; border-color: var(--primary); }
.neru-home { display: flex; gap: 14px; align-items: center; min-height: 200px; }
.neru-home img { width: 120px; height: auto; border-radius: 12px; flex: none; }
.bubble { background: var(--card); border-radius: 12px; padding: 8px 12px; font-weight: 700; margin: 0 0 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini { text-decoration: none; color: var(--text); display: block; margin-bottom: 0; }
.mini-num { font-size: 24px; font-weight: 700; margin: 0; }

/* ----- ステップ7: 初期設定 ----- */
.ob-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.dots { display: flex; gap: 6px; flex: 1; }
.dots span { flex: 1; height: 6px; border-radius: 3px; background: var(--track); }
.dots span.on { background: var(--primary); }
.ob-hero { text-align: center; padding: 24px 0 8px; }
.ob-hero img { width: 160px; height: auto; }
.ob-logo { font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif; font-weight: 800; font-size: 34px; color: var(--primary); margin: 8px 0 0; letter-spacing: .04em; }
.ob-catch { margin: 0 0 12px; font-weight: 700; }
.opts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.opts-row { flex-direction: row; flex-wrap: wrap; }
.opts-row .opt { flex: 1 1 40%; }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); font: inherit; text-align: left; color: var(--text); cursor: pointer; }
.opt[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary-soft); }
.opt[disabled] { color: #8C7E6E; background: transparent; cursor: default; }
.opt-main { font-weight: 700; font-size: 16px; }
.opt-sub { font-size: 12px; color: var(--muted); }
.date-input { width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; background: var(--card); color: var(--text); margin-bottom: 16px; }
.icon-btn svg path { fill: none; }
.exam-row { display: flex; justify-content: space-between; align-items: center; }
.exam-row strong { font-size: 20px; }
.prof { display: grid; grid-template-columns: 6em 1fr; gap: 6px 10px; margin: 0 0 12px; font-size: 14px; }
.prof dt { color: var(--muted); }
.prof dd { margin: 0; }

/* ----- ステップ8: XP・レベル・連続日数・カレンダー ----- */
.xp-line { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: #8A5A1E; }
.xp-gain { margin: 6px 0 0; font-weight: 800; color: #8A5A1E; font-size: 18px; }
.lvup { margin: 4px 0 0; font-weight: 800; color: var(--primary); }
.pill-strong { color: var(--text); font-weight: 700; border-color: var(--neru-line); }
.lv-card { display: flex; gap: 14px; align-items: center; }
.lv-badge { flex: none; width: 64px; height: 64px; border-radius: 32px; background: var(--primary); color: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; line-height: 1.1; }
.lv-badge small { font-size: 11px; font-weight: 700; }
.lv-badge span { font-size: 22px; }
.lv-card .grow { flex: 1; min-width: 0; }
.stats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h3 { margin: 0; font-size: 16px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal .wd { font-size: 11px; color: var(--muted); padding: 2px 0; }
.cal .wd.sun { color: #B3261E; }
.cal .wd.sat { color: #1F5FAF; }
.cal .d { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-size: 13px; background: #F6EFE4; color: var(--text); }
.cal .d.empty { background: transparent; }
.cal .d.study { background: var(--primary); color: #FFFFFF; font-weight: 700; }
.cal .d.little { background: #D7E1CC; }
.cal .d.freeze { background: #FFFFFF; border: 2px dashed #8EA5C8; }
.cal .d.future { color: #B5A898; background: transparent; }
.cal .d.today { outline: 2px solid var(--neru-line); outline-offset: 1px; }
.cal .d i { font-style: normal; font-size: 9px; line-height: 1; margin-top: 1px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 10px; }
.cal-legend b { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }
.subj-row { margin-bottom: 10px; }
.subj-row .top { display: flex; justify-content: space-between; font-size: 13px; }
.subj-row .bar { height: 8px; margin-top: 4px; }

/* ----- ステップ9: 苦手な分野 ----- */
.weak-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.weak-row .btn { flex: none; min-height: 44px; }
.mini-cat { font-size: 15px; font-weight: 700; margin: 2px 0 0; line-height: 1.4; }

/* ----- ステップ11: 経穴の図・経穴一覧表・模擬試験 ----- */
.fig { --sk:#f3dcc9; --skl:#c79c80; --skd:#c79c80; --moxa:#b8691a; --accent2:#1d6b62; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fig svg { width: 100%; max-width: 260px; height: auto; display: block; }
.fig svg.big { max-width: 340px; }
.fig .fs line { stroke: var(--skl); }
.fig .fs2 *, .fig .ff, .fig .ff * { fill: var(--sk); stroke: var(--skl); stroke-width: 1.2; }
.fig .fs { stroke: var(--sk); }
.fig .fd * { fill: var(--skd); stroke: var(--skl); stroke-width: .7; opacity: .85; }
.fig .fd [fill=none] { fill: none !important; }
.fig .mk-ring { fill: none; stroke: var(--moxa); stroke-width: 1.6; }
.fig .mk-dot { fill: var(--moxa); stroke: none; }
.fig .mk-lab { font-size: 7px; font-weight: 700; fill: var(--text); paint-order: stroke; stroke: #FFFFFF; stroke-width: 2.4px; }
.fig .fm .lm { fill: none; stroke: var(--moxa); stroke-width: .5; stroke-dasharray: 2 1.5; opacity: .8; }
.fig .fm .tk { stroke: var(--accent2); stroke-width: .6; opacity: .7; }
.fig .fm .lt { font-size: 4.2px; fill: var(--muted); }
.fig .fm .lp { fill: var(--moxa); }
.fig .pat { fill: var(--sk); stroke: var(--skl); stroke-width: .8; }
.fig .cap { font-size: 12px; color: var(--muted); align-self: stretch; margin: 0; }
.figbox h3 { margin-top: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid3 .btn { font-size: 14px; padding: 0 4px; min-height: 48px; }
.grid3 .btn[aria-pressed="true"] { background: var(--primary-soft); }
.ref-chips { margin: 4px 0 12px; }
.ref-chips button { min-height: 40px; font-size: 13px; }
.refrow { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.refrow:first-of-type { border-top: 0; }
.ref-name { font-size: 17px; }
.ref-loc { margin: 0; font-size: 14px; line-height: 1.7; }
.refrow .btn { align-self: flex-start; min-height: 40px; }
.checks { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
select.date-input { appearance: auto; }
.ex-quit { width: auto; margin: 0; text-decoration: none; }
.ex-timer { flex: 1; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.ex-timer.low { color: var(--wrong); }
.qgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: 4px 0 12px; }
.qgrid button { min-height: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font: inherit; font-size: 11px; color: var(--muted); padding: 0; cursor: pointer; }
.qgrid button.an { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.qgrid button.cur { outline: 2px solid var(--primary); }
.choice.is-picked { border: 2px solid var(--primary); background: var(--primary-soft); font-weight: 700; }
.rv summary { cursor: pointer; font-size: 14px; line-height: 1.6; }
.rv[open] summary { margin-bottom: 8px; }
.ok-text { color: var(--correct); }

/* ----- ホームを1画面に収める(2026-11-13 ユーザーの依頼) ----- */
.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.home-head h1 { margin: 4px 0 8px; font-size: 22px; }
.home-head .date { font-size: 13px; color: var(--muted); }
.pill-exam { color: var(--primary-dark); border-color: var(--primary); font-weight: 700; }
.mission { padding: 14px 16px; margin-bottom: 10px; }
.mission .m-what { margin: 2px 0 8px; font-size: 16px; }
.mission .btn { margin-top: 10px; }
.mission .hint { margin-top: 4px; }
.neru-home { min-height: 0; padding: 10px 14px; gap: 12px; margin-bottom: 10px; }
.neru-home img { width: 84px; }
.neru-home .bubble { margin-bottom: 2px; }
.grid2 .mini { padding: 12px 14px; }
.grid2 .mini-num { font-size: 20px; }

/* ----- NERUのレベルとNERUのようす(2026-11-13) ----- */
a.neru-home, a.lv-link { text-decoration: none; color: var(--text); display: flex; align-items: center; }
.neru-home .chev, .lv-link .chev { margin-left: auto; }
.neru-mini { margin: 0; font-size: 13px; font-weight: 700; color: var(--neru-line); }
.lv-badge small { font-size: 9px; letter-spacing: .04em; }
.neru-big { text-align: center; padding: 16px; }
.neru-big img { width: 180px; height: auto; border-radius: 16px; }
.neru-lv { margin: 8px 0 0; font-weight: 800; color: var(--neru-line); }
.neru-name { margin: 0; font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif; font-size: 22px; font-weight: 800; }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.stage img { width: 100%; max-width: 72px; height: auto; border-radius: 10px; }
.stage.now { border: 2px solid var(--primary); background: var(--primary-soft); }
.stage.locked img { opacity: .35; filter: grayscale(.6); }
.stage-lv { font-size: 11px; font-weight: 700; color: var(--muted); }
.stage-name { font-size: 12px; font-weight: 700; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot { aspect-ratio: 1; border-radius: 10px; border: 1px dashed #A89A88; background: #F3ECE2; }

/* ----- NERUの反応とホームのNERU枠(ステップ10、2026-11-14) ----- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.neru-art { display: inline-block; position: relative; line-height: 0; }
.neru-art img { display: block; height: auto; }
/* 絵がまだ届いていないポーズの代わりの見た目(基本の絵を使う) */
.neru-art.fb-sleep img { filter: saturate(.7) brightness(.97); transform: rotate(-6deg); }
.neru-art.fb-sleep::after { content: 'z z z'; position: absolute; top: 2px; right: -6px; font: 800 12px/1 'M PLUS Rounded 1c', sans-serif; color: var(--neru-line); }
.neru-art.fb-shonbori img { filter: saturate(.55); transform: translateY(4px) rotate(4deg); }
.neru-art.fb-jump img, .neru-art.fb-yatta img, .neru-art.fb-daisuki img, .neru-art.fb-hirameki img { animation: neru-hop .6s ease-out 1; }
.neru-art.hop img { animation: neru-hop .5s ease-out 1; }
@keyframes neru-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-10px); } 70% { transform: translateY(0); } 85% { transform: translateY(-3px); } 100% { transform: translateY(0); } }

.neru-tap { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: 12px; flex: none; }
.neru-tap:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.neru-frame { display: flex; gap: 12px; align-items: center; padding: 0 2px; margin: 0 0 12px; cursor: pointer; }
.nf-exam { font-weight: 700; color: var(--primary); }
.neru-frame .neru-art img { width: 84px; }
.nf-body { flex: 1; min-width: 0; }
.nf-top { display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: 12px; font-weight: 700; color: var(--neru-line); white-space: nowrap; }
.nf-top span:last-child { overflow: hidden; text-overflow: ellipsis; }
.neru-frame .bubble { margin: 4px 0; }
.nf-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; font-size: 13px; color: var(--muted); }
.nf-strong { color: var(--text); font-weight: 700; }
.nf-link { margin-left: auto; font-weight: 700; text-decoration: none; }

.neru-big .neru-art img { width: 180px; }
.neru-big .bubble { display: inline-block; margin: 6px auto 0; }
.neru-wake, .neru-sleep { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.neru-wake .neru-art img { width: 100px; }
.neru-sleep .neru-art img { width: 72px; }
.neru-wake .bubble + .bubble { margin-top: 6px; }

/* 反応(画面の下に少しのあいだ出る。タップで閉じる) */
.neru-pop {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(520px, calc(100% - 24px)); z-index: 50; display: flex; gap: 10px; align-items: center;
  background: var(--neru-bg); border: 2px solid var(--neru-line); border-radius: var(--radius); padding: 8px 12px;
  box-shadow: 0 6px 20px rgba(59, 42, 28, .18); animation: neru-pop-in .25s ease-out; cursor: pointer;
}
.focus-mode .neru-pop { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.neru-pop .neru-art img { width: 72px; }
.neru-pop .bubble { margin: 0; }
@keyframes neru-pop-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) {
  .neru-art img, .neru-art.hop img, .neru-pop { animation: none !important; }
}

/* ホームのいちばん下: ほかの学び方への近道(v0.12.1) */
.home-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.home-more .btn { margin: 0; padding: 10px 4px; font-size: 14px; white-space: nowrap; }
/* 小さいスマホ(画面の高さ720px以下)では、ホームの余白を詰めて1画面に収める(v0.12.1) */
@media (max-height: 720px) {
  .view { padding-top: 10px; }
  .card-main { padding: 12px 14px; margin-bottom: 8px; }
  .card-main .btn { margin-top: 6px; }
  .grid2 .mini { padding: 10px 12px; }
  .mini .hint { font-size: 12px; line-height: 1.4; }
  .neru-frame { margin-bottom: 8px; }
  .neru-frame .neru-art img { width: 64px; }
  .home-more { margin-top: 8px; }
  .home-more .btn { padding-top: 7px; padding-bottom: 7px; }
}
/* 縦に長いスマホでは、いちばん上のNERUを少し大きくして下の空きを減らす(v0.12.2) */
@media (min-height: 780px) {
  .neru-frame { margin: 6px 0 18px; }
  .neru-frame .neru-art img { width: 116px; }
  .home-more { margin-top: 16px; }
}

/* 表情アルバム(v0.13、2026-11-15) */
.album { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.al-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.al-item img { width: 100%; max-width: 64px; height: auto; }
.al-name { font-size: 12px; font-weight: 700; }
.al-hint { font-size: 10px; line-height: 1.3; color: var(--muted); }
.al-locked img { filter: brightness(0); opacity: .18; }
.al-locked .al-name { color: var(--muted); }
.al-past { margin: 8px 0; }
.al-past summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 6px 0; }

/* v0.14 成長アルバム: 姿/表情の切り替え、会えた日、レベルの記録 */
.al-tabs { margin-bottom: 10px; }
.stage-date { font-size: 10px; line-height: 1.3; color: var(--muted); }
.stage.locked .stage-date { color: #8C7E6E; }
.lv-log { list-style: none; margin: 4px 0 8px; padding: 0; max-height: 240px; overflow-y: auto; }
.lv-log li { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lv-log li span:first-child { font-weight: 700; }

/* v0.15 ひみつのバッジ */
.bg-got { border: 2px solid var(--neru-line, var(--primary)); text-align: center; }
.bg-got-title { font-weight: 800; font-size: 16px; margin: 0 0 6px; }
.bg-got-item { display: inline-block; margin: 2px 6px; font-weight: 700; font-size: 15px; }
.bg-icon { font-size: 32px; line-height: 64px; height: 64px; display: block; }
.al-locked .bg-icon { color: var(--muted); font-size: 26px; }

/* v0.16 挑戦状 */
.ng-text { color: var(--wrong); }
.ch-timer { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin: 6px 0 2px; }
.ch-timer div { height: 100%; background: var(--neru-line); transition: width .1s linear; }
.ch-sec { font-size: 12px; color: var(--muted); text-align: right; margin: 0 0 4px; }
.ch-intro .ch-from { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.ch-rules { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.ch-vs { display: flex; align-items: center; justify-content: space-around; text-align: center; }
.ch-side { flex: 1; }
.ch-name { font-weight: 700; color: var(--text) !important; font-size: 14px; }
.ch-ok { font-size: 15px; color: var(--text) !important; }
.ch-ok strong { font-size: 34px; color: var(--primary); }
.ch-vs-mark { font-weight: 800; color: var(--muted); }
.ch-msg { text-align: center; font-weight: 700; margin: 4px 0 12px; }
.ch-input { width: 100%; min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; font-size: 16px; background: var(--card); color: var(--text); }
.ch-link textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; font-size: 13px; background: var(--card); color: var(--text); word-break: break-all; }
.ch-list .row { cursor: default; }
.fill-row .btn-small { flex: none; white-space: nowrap; }

/* v0.16.1 間違い報告 */
.report-box { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.report-box textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; font-size: 15px; background: var(--card); color: var(--text); }
.report-box .btn { margin-top: 8px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.rq-text { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; font-size: 16px; background: var(--card); color: var(--text); }
#rq-line { display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* v0.16.4 大きく見る(会えた姿・見た表情をタップ) */
button.stage, button.al-item { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.stage:active, button.al-item:active { transform: scale(.96); }
.viewer { position: fixed; inset: 0; z-index: 100; background: rgba(43, 33, 24, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.vw-box { width: 100%; max-width: 360px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 20px; padding: 16px 16px 14px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.vw-lv { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.vw-name { margin: 2px 0 6px; font-size: 18px; font-weight: 800; }
.vw-art img { width: 100%; max-width: 240px; height: auto; }
.vw-pose { margin: 4px 0 0; font-weight: 700; }
.vw-met { margin: 2px 0 8px; }
.vw-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.vw-th { display: flex; align-items: center; justify-content: center; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font: inherit; }
button.vw-th { cursor: pointer; }
.vw-th img { width: 100%; max-width: 44px; height: auto; }
.vw-th[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary-soft); }
.vw-locked img { filter: brightness(0); opacity: .18; }

/* v0.16.5 ホームの連続日数を大きく(NERUの枠の吹き出しの下) */
.nf-streak { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; white-space: nowrap; }
.sk-main { display: flex; align-items: baseline; gap: 3px; color: var(--text); font-weight: 700; }
.sk-ico { font-size: 18px; align-self: center; }
.sk-num { font-family: 'M PLUS Rounded 1c', sans-serif; font-size: 28px; font-weight: 800; line-height: 1; color: var(--primary); }
.sk-unit { font-size: 13px; font-weight: 700; }
.sk-state { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.sk-state.done { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.nf-left { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.nf-left .nf-link { margin: 0; font-size: 12px; white-space: nowrap; }
@media (max-height: 720px) {
  .nf-streak { margin-top: 2px; }
  .sk-num { font-size: 24px; }
}

/* v0.16.7 ひみつのバッジのカードを目立たせる(金色の枠・大きな絵・ふわっと出る) */
.bg-got { position: relative; overflow: hidden; border: 2px solid #D9A441; background: #FFF8E6; animation: bg-pop .45s ease-out both; }
.bg-got::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent); animation: bg-shine 1.1s .35s ease-out both; pointer-events: none; }
.bg-got-title { color: #8A6420; }
.bg-got-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 4px 0 2px; }
.bg-got-item { display: flex; flex-direction: column; align-items: center; margin: 0; }
.bg-got-icon { font-size: 40px; line-height: 1.15; animation: bg-icon 0.6s .15s ease-out both; }
.bg-got-name { font-weight: 800; font-size: 15px; }
@keyframes bg-pop { 0% { opacity: 0; transform: scale(.92); } 70% { opacity: 1; transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes bg-shine { from { left: -60%; } to { left: 130%; } }
@keyframes bg-icon { 0% { transform: scale(.4) rotate(-12deg); } 60% { transform: scale(1.15) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .bg-got, .bg-got-icon, .bg-got::after { animation: none; } .bg-got::after { display: none; } }

/* みんなで対戦(v0.17) */
.bt-room { text-align: center; }
.card .bt-code { font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif; font-weight: 800; font-size: 44px; line-height: 1.2; letter-spacing: .25em; color: var(--text); margin: 0 0 4px; padding-left: .25em; }
.bt-code-input { font-size: 24px; letter-spacing: .3em; text-align: center; }
.bt-players .row { cursor: default; gap: 10px; align-items: center; }
.bt-dot { width: 10px; height: 10px; border-radius: 50%; background: #CFC3B2; flex: none; }
.bt-dot.on { background: var(--correct); }
.bt-players .badge { margin: 0 0 0 4px; }
.bt-kick { min-height: 36px; margin-top: 0 !important; padding: 0 12px; font-size: 13px; }
