/* =========================================================
   まなびのもり — 学習帳デザインシステム
   「方眼ノート × 和紙 × 藍と朱」
   ========================================================= */

:root {
  /* 紙とインク */
  --washi: #f6f1e6;
  --washi-deep: #efe8d8;
  --paper: #fdfaf2;
  --ink: #2b2b31;
  --ink-soft: #5c5a54;
  --line: #e3dbc8;

  /* 伝統色 */
  --ai: #1e4e79;        /* 藍 */
  --ai-deep: #163a5b;
  --shu: #d94f2b;       /* 朱 */
  --shu-soft: #f7ddd2;
  --kincha: #b9862f;    /* 金茶 */
  --wakaba: #3d8b63;    /* 若葉 */

  /* 学校段階カラー */
  --c-elem: #d94f2b;
  --c-elem-bg: #fbe9e0;
  --c-middle: #3d8b63;
  --c-middle-bg: #e3f0e7;
  --c-high: #1e4e79;
  --c-high-bg: #e1eaf3;

  --radius: 14px;
  --shadow: 0 2px 4px rgba(43, 43, 49, 0.06), 0 12px 28px -12px rgba(43, 43, 49, 0.18);
  --shadow-lift: 0 4px 8px rgba(43, 43, 49, 0.08), 0 20px 40px -16px rgba(43, 43, 49, 0.26);

  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  background-color: var(--washi);
  /* 方眼ノート + 和紙の質感 */
  background-image:
    linear-gradient(rgba(30, 78, 121, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 78, 121, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse at 20% -10%, rgba(217, 79, 43, 0.05), transparent 55%),
    radial-gradient(ellipse at 90% 0%, rgba(30, 78, 121, 0.06), transparent 50%);
  background-size: 28px 28px, 28px 28px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--shu-soft); }

ruby rt { font-size: 0.5em; color: var(--ink-soft); letter-spacing: 0.05em; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ai); color: #fff; padding: 8px 16px; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(246, 241, 230, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }

.brand-stamp, .footer-stamp {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  background: var(--shu);
  color: #fdf8ee;
  font-family: var(--font-display);
  font-weight: 800; font-size: 24px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(253, 248, 238, 0.35), 0 2px 6px rgba(217, 79, 43, 0.35);
  transform: rotate(-3deg);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 0.06em; }
.brand-sub { font-size: 11px; color: var(--ink-soft); letter-spacing: 0.14em; }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  position: relative;
  text-decoration: none; color: var(--ink-soft);
  font-weight: 700; font-size: 14px;
  padding: 8px 14px; border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.site-nav a:hover { color: var(--ink); background: rgba(30, 78, 121, 0.07); }
.site-nav a.active { color: #fff; background: var(--ai); }
.site-nav a.active.nav-review { background: var(--shu); }

.review-badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--shu); color: #fff;
  border-radius: 999px; font-size: 11px; line-height: 1;
}
.site-nav a.active .review-badge { background: #fff; color: var(--shu); }

/* ---------- レイアウト ---------- */
main {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px) 80px;
  outline: none;
}

.view { animation: view-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal { animation: view-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: clamp(28px, 5vw, 52px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px dashed rgba(30, 78, 121, 0.22);
  border-radius: 14px;
  pointer-events: none;
}
.hero-copy { position: relative; }
.hero-kicker {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 0.22em;
  color: var(--shu);
  border-bottom: 2px solid var(--shu);
  padding-bottom: 4px; margin-bottom: 14px;
}
.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.45;
  letter-spacing: 0.04em;
}
.hero h1 .accent { color: var(--shu); }
.hero p { margin: 0 0 24px; color: var(--ink-soft); max-width: 34em; }

.hero-tate {
  position: relative;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 2vw, 19px);
  letter-spacing: 0.42em;
  color: var(--ai);
  border-left: 1px solid var(--line);
  padding-left: 18px;
  align-self: stretch;
  display: flex; align-items: flex-start;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body);
  font-weight: 700; font-size: 15px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, background-color 0.18s, color 0.18s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--ai); color: #fff; box-shadow: 0 6px 16px -6px rgba(30, 78, 121, 0.55); }
.btn-primary:hover { background: var(--ai-deep); transform: translateY(-2px); }
.btn-accent { background: var(--shu); color: #fff; box-shadow: 0 6px 16px -6px rgba(217, 79, 43, 0.55); }
.btn-accent:hover { background: #c04324; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ai); border-color: var(--ai); }
.btn-ghost:hover { background: rgba(30, 78, 121, 0.08); transform: translateY(-2px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ---------- 統計ストリップ ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.12em; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--ai); line-height: 1.3; }
.stat-value small { font-size: 14px; margin-left: 2px; color: var(--ink-soft); }
.stat-card.stat-title .stat-value { color: var(--shu); font-size: 22px; }

/* ---------- 見出し ---------- */
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 44px 0 20px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: 0.06em;
}
.section-head h2::before { content: "▍"; color: var(--shu); margin-right: 6px; }
.section-head .sub { color: var(--ink-soft); font-size: 13px; }

/* ---------- 学校段階カード ---------- */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.stage-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--stage-color, var(--ai));
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s;
  overflow: hidden;
}
.stage-card:hover { transform: translateY(-5px) rotate(-0.3deg); box-shadow: var(--shadow-lift); }
.stage-card::after {
  content: attr(data-glyph);
  position: absolute; right: -8px; bottom: -26px;
  font-family: var(--font-display);
  font-size: 110px; font-weight: 800;
  color: var(--stage-color, var(--ai));
  opacity: 0.09;
  pointer-events: none;
}
.stage-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800; letter-spacing: 0.08em;
}
.stage-card .stage-desc { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 16px; }
.stage-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stage-count { font-size: 13px; font-weight: 700; color: var(--stage-color, var(--ai)); }

/* 進捗リング */
.ring { position: relative; width: 64px; height: 64px; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-bg { stroke: var(--washi-deep); }
.ring .ring-fg { stroke: var(--stage-color, var(--ai)); transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.ring .ring-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: var(--stage-color, var(--ai));
}

/* ---------- 段階ページ ---------- */
.stage-hero {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 26px clamp(20px, 4vw, 36px);
  border-radius: var(--radius);
  background: var(--stage-bg, var(--c-high-bg));
  border: 1px solid var(--line);
  margin-bottom: 30px;
}
.stage-hero .stamp {
  width: 58px; height: 58px; flex: none;
  display: grid; place-items: center;
  background: var(--stage-color, var(--ai));
  color: #fff; border-radius: 12px;
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}
.stage-hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: 0.08em; }
.stage-hero p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; width: 100%; }

.subject-block { margin-bottom: 34px; }
.subject-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.subject-head .subject-chip {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--stage-color, var(--ai));
  color: #fff; font-weight: 900; font-size: 15px;
}
.subject-head h3 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: 0.1em; }

.unit-list { display: grid; gap: 10px; }
.unit-row {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(43, 43, 49, 0.05);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  /* ノートの罫線風 */
  background-image: linear-gradient(transparent calc(100% - 1px), rgba(30, 78, 121, 0.05) 1px);
  background-size: 100% 14px;
}
.unit-row:hover { transform: translateX(6px); border-color: var(--stage-color, var(--ai)); box-shadow: var(--shadow); }
.unit-grade {
  flex: none;
  font-size: 11.5px; font-weight: 900;
  color: var(--stage-color, var(--ai));
  border: 1.5px solid currentColor;
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}
.unit-name { font-weight: 700; flex: 1; }
.unit-status { flex: none; font-size: 13px; font-weight: 700; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.unit-status .done { color: var(--wakaba); }
.unit-status .hanamaru-mini { font-size: 18px; }

/* ---------- 単元(授業)ページ ---------- */
.lesson-header { margin-bottom: 26px; }
.crumbs { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.crumbs a { color: var(--ai); text-decoration: none; font-weight: 700; }
.crumbs a:hover { text-decoration: underline; }
.lesson-header h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 800; letter-spacing: 0.05em; line-height: 1.5;
}
.lesson-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
  background: var(--washi-deep); color: var(--ink-soft);
}
.tag.tag-stage { background: var(--stage-bg, var(--c-high-bg)); color: var(--stage-color, var(--ai)); }

.lesson-section {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--ai);
  border-radius: 12px;
  padding: 24px clamp(20px, 4vw, 32px);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.lesson-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800; letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 10px;
}
.lesson-section h2 .sec-num {
  flex: none;
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  background: var(--ai); color: #fff;
  font-family: var(--font-body); font-size: 14px; font-weight: 900;
  border-radius: 8px;
}
.lesson-section p { margin: 0 0 10px; }
.lesson-section p:last-child { margin-bottom: 0; }

.example-box {
  margin: 14px 0 4px;
  padding: 16px 20px;
  background: var(--washi);
  background-image:
    linear-gradient(rgba(30, 78, 121, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 78, 121, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.example-box::before {
  content: "例題";
  display: inline-block;
  font-size: 11px; font-weight: 900; letter-spacing: 0.2em;
  color: #fff; background: var(--kincha);
  padding: 2px 10px; border-radius: 5px;
  margin-bottom: 8px;
}
.example-box p { margin: 0; }

.point-box {
  position: relative;
  margin: 14px 0 4px;
  padding: 18px 20px 14px;
  border: 2px dashed var(--shu);
  border-radius: 10px;
  background: rgba(217, 79, 43, 0.045);
}
.point-box::before {
  content: "ポイント";
  position: absolute; top: -12px; left: 14px;
  font-size: 11px; font-weight: 900; letter-spacing: 0.2em;
  color: #fff; background: var(--shu);
  padding: 2px 12px; border-radius: 999px;
}
.point-box p { margin: 0; font-weight: 700; }

.lesson-cta {
  text-align: center;
  padding: 30px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 26px;
}
.lesson-cta p { margin: 0 0 16px; font-weight: 700; color: var(--ink-soft); }

/* 分数表示 */
.frac {
  display: inline-flex; flex-direction: column; align-items: center;
  vertical-align: -0.7em;
  line-height: 1.15;
  font-size: 0.85em;
  margin: 0 2px;
  font-weight: 700;
}
.frac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 4px; }
.frac > span:last-child { padding: 0 4px; }

/* ---------- クイズ ---------- */
.quiz-wrap { max-width: 720px; margin: 0 auto; }
.quiz-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.quiz-top h1 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.quiz-dots { display: flex; gap: 7px; }
.quiz-dots .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--washi-deep);
  border: 1.5px solid var(--line);
  transition: background-color 0.25s, transform 0.25s;
}
.quiz-dots .dot.current { background: var(--ai); border-color: var(--ai); transform: scale(1.25); }
.quiz-dots .dot.correct { background: var(--shu); border-color: var(--shu); }
.quiz-dots .dot.wrong { background: var(--ink-soft); border-color: var(--ink-soft); }

.quiz-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--shadow-lift);
}
.quiz-qnum {
  display: inline-block;
  font-family: var(--font-display); font-weight: 800;
  font-size: 13px; letter-spacing: 0.2em;
  color: var(--ai);
  border-bottom: 2px solid var(--ai);
  padding-bottom: 3px;
  margin-bottom: 14px;
}
.quiz-question { font-size: clamp(17px, 2.6vw, 20px); font-weight: 700; line-height: 2; margin: 0 0 24px; }

/* find-error型: AIの解答ボックス */
.ai-box {
  position: relative;
  margin: 14px 0 20px;
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, rgba(30, 78, 121, 0.05), rgba(30, 78, 121, 0.09));
  border: 1.5px dashed rgba(30, 78, 121, 0.45);
  border-radius: 12px;
}
.ai-box-label {
  position: absolute; top: -12px; left: 14px;
  font-size: 11px; font-weight: 900; letter-spacing: 0.14em;
  color: #fff; background: var(--ai);
  padding: 3px 12px; border-radius: 999px;
}
.ai-box p { margin: 0; font-size: 15px; line-height: 2; }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 16px; font-weight: 700;
  line-height: 1.7;
  color: var(--ink);
  background: var(--washi);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 13px 18px;
  cursor: pointer;
  transition: border-color 0.16s, background-color 0.16s, transform 0.16s;
}
.choice:hover:not([disabled]) { border-color: var(--ai); background: #fff; transform: translateX(4px); }
.choice .kana {
  flex: none;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line);
  font-size: 14px; font-weight: 900; color: var(--ink-soft);
  transition: inherit;
}
.choice:hover:not([disabled]) .kana { border-color: var(--ai); color: var(--ai); }
.choice[disabled] { cursor: default; opacity: 0.6; }
.choice.is-correct {
  opacity: 1;
  border-color: var(--shu); background: #fff5f0;
}
.choice.is-correct .kana { border-color: var(--shu); background: var(--shu); color: #fff; }
.choice.is-wrong {
  opacity: 1;
  border-color: var(--ink-soft); background: #f0efec;
  animation: shake 0.4s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* 判定スタンプ */
.stamp-mark {
  position: absolute; top: 14px; right: 20px;
  font-family: var(--font-display);
  font-size: 60px; font-weight: 800; line-height: 1;
  pointer-events: none;
  animation: stamp-in 0.4s cubic-bezier(0.18, 1.6, 0.4, 1) both;
}
.stamp-mark.ok { color: var(--shu); }
.stamp-mark.ng { color: var(--ai); }
@keyframes stamp-in {
  from { opacity: 0; transform: scale(2.2) rotate(14deg); }
  to { opacity: 0.9; transform: scale(1) rotate(-8deg); }
}

.feedback {
  margin-top: 20px;
  border-radius: 12px;
  padding: 16px 20px;
  animation: view-in 0.35s both;
}
.feedback.ok { background: rgba(217, 79, 43, 0.07); border: 1.5px solid rgba(217, 79, 43, 0.35); }
.feedback.ng { background: rgba(30, 78, 121, 0.06); border: 1.5px solid rgba(30, 78, 121, 0.3); }
.feedback .fb-title { font-weight: 900; margin: 0 0 6px; }
.feedback.ok .fb-title { color: var(--shu); }
.feedback.ng .fb-title { color: var(--ai); }
.feedback .fb-explain { margin: 0; font-size: 14.5px; }
.quiz-next { margin-top: 20px; text-align: right; }

/* ---------- 結果画面 ---------- */
.result-card {
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(32px, 6vw, 56px);
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}
.result-card::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px dashed rgba(217, 79, 43, 0.25);
  border-radius: 14px;
  pointer-events: none;
}
.result-hanamaru {
  font-size: 84px; line-height: 1;
  display: inline-block;
  animation: stamp-in 0.6s cubic-bezier(0.18, 1.6, 0.4, 1) 0.2s both;
}
.result-card h1 {
  margin: 10px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: 0.08em;
}
.result-score {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 60px); font-weight: 800;
  color: var(--ai); line-height: 1.2; margin: 8px 0;
}
.result-score small { font-size: 0.45em; color: var(--ink-soft); }
.result-msg { color: var(--ink-soft); margin: 0 0 10px; }
.result-xp {
  display: inline-block;
  font-weight: 900; color: var(--kincha);
  background: rgba(185, 134, 47, 0.12);
  border: 1.5px solid rgba(185, 134, 47, 0.4);
  padding: 6px 18px; border-radius: 999px;
  margin-bottom: 22px;
}
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- にがて帳 ---------- */
.review-empty {
  text-align: center;
  padding: 60px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.review-empty .big { font-size: 56px; }
.review-empty h2 { font-family: var(--font-display); font-weight: 800; margin: 8px 0; }
.review-empty p { color: var(--ink-soft); margin: 0 0 20px; }

.review-intro {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--shu);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.review-intro .count {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 800; color: var(--shu); line-height: 1;
}
.review-intro .count small { font-size: 15px; color: var(--ink-soft); }
.review-intro p { margin: 0; color: var(--ink-soft); flex: 1; min-width: 220px; }

/* ---------- 特長 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.feature .f-icon { font-size: 30px; }
.feature h3 { margin: 8px 0 6px; font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.feature p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- 未就学児 おやこモード ---------- */
.oyako-banner {
  display: flex; align-items: center; gap: 18px;
  text-decoration: none; color: var(--ink);
  margin-top: 18px;
  padding: 20px 24px;
  background: linear-gradient(120deg, #fff, var(--washi));
  border: 1.5px solid var(--line);
  border-left: 6px solid var(--kincha);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.oyako-banner:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.oyako-banner-badge {
  flex: none;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  background: var(--kincha); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  border-radius: 14px; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}
.oyako-banner-text { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.oyako-banner-text strong { font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.oyako-banner-arrow { margin-left: auto; font-size: 22px; color: var(--kincha); font-weight: 900; }

.oyako-hero {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: clamp(24px, 4vw, 40px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.oyako-hero-badge {
  flex: none;
  display: grid; place-items: center;
  width: 76px; height: 76px;
  background: var(--kincha); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
  border-radius: 18px; transform: rotate(-4deg);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.4), 0 4px 12px rgba(185,134,47,0.35);
}
.oyako-hero h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: clamp(22px, 4vw, 30px); font-weight: 800; letter-spacing: 0.06em; }
.oyako-hero p { margin: 0; color: var(--ink-soft); font-size: 14.5px; flex-basis: 100%; }

.oyako-print-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 20px; margin-bottom: 26px;
  background: rgba(185, 134, 47, 0.09);
  border: 1px dashed rgba(185, 134, 47, 0.5);
  border-radius: 10px;
  font-size: 13.5px; color: var(--ink-soft);
}

.oyako-principles, .oyako-env, .oyako-sugata {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px clamp(20px, 4vw, 30px);
  box-shadow: var(--shadow);
  margin-bottom: 26px;
}
.oyako-principles h2, .oyako-env h2, .oyako-sugata h2 {
  margin: 0 0 14px; font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: 0.04em;
}
.oyako-principles ul { margin: 0; padding-left: 22px; }
.oyako-principles li { margin-bottom: 10px; line-height: 1.9; }
.oyako-env-sub { margin: 0 0 14px; color: var(--ink-soft); font-size: 13.5px; }

.oyako-check { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.oyako-check li {
  position: relative; padding: 10px 12px 10px 40px;
  background: var(--washi);
  border-radius: 9px; line-height: 1.8;
}
.oyako-check li::before {
  content: "✓"; position: absolute; left: 12px; top: 10px;
  color: var(--wakaba); font-weight: 900; font-size: 17px;
}

.oyako-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-bottom: 30px; }
.oyako-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--area-color, var(--ai));
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  break-inside: avoid;
}
.oyako-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.oyako-glyph {
  flex: none;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: var(--area-color, var(--ai)); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  border-radius: 12px; transform: rotate(-3deg);
}
.oyako-card-head h3 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: 0.06em; }
.steam-core {
  font-family: var(--font-body); font-size: 11px; font-weight: 900;
  color: #fff; background: var(--wakaba);
  padding: 2px 8px; border-radius: 999px; vertical-align: middle; letter-spacing: 0.05em;
}
.oyako-focus { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.oyako-montessori {
  margin: 0 0 14px; padding: 10px 14px;
  background: rgba(30, 78, 121, 0.05);
  border-radius: 8px; font-size: 13px; line-height: 1.8;
}
.oyako-montessori strong { color: var(--ai); }

.oyako-acts { display: grid; gap: 12px; }
.oyako-act {
  padding: 14px 16px;
  background: var(--washi);
  border: 1px solid var(--line);
  border-radius: 10px;
  break-inside: avoid;
}
.oyako-act-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.oyako-age {
  flex: none; font-size: 11px; font-weight: 900;
  color: var(--area-color, var(--ai));
  border: 1.5px solid currentColor; border-radius: 6px; padding: 2px 8px;
  white-space: nowrap;
}
.oyako-act-title { font-family: var(--font-display); font-weight: 800; font-size: 15.5px; }
.oyako-how { margin: 0 0 8px; font-size: 13.5px; line-height: 1.85; }
.oyako-steam { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.steam-tag {
  display: inline-block; font-size: 10px; font-weight: 900; letter-spacing: 0.1em;
  color: #fff; background: var(--wakaba);
  padding: 1px 7px; border-radius: 5px; margin-right: 7px;
}

.sugata-list {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px;
}
.sugata-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--washi); border-radius: 8px; font-size: 13.5px; font-weight: 700; }
.sugata-num {
  flex: none; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--kincha); color: #fff; font-size: 12px; font-weight: 900;
}

/* 印刷 */
@media print {
  .site-header, .site-footer, .no-print, .skip-link { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .oyako-card, .oyako-act, .oyako-principles, .oyako-env, .oyako-sugata { box-shadow: none; break-inside: avoid; }
  .oyako-hero { box-shadow: none; }
  .view { animation: none !important; }
  a[href]::after { content: ""; }
}

/* ---------- フッター ---------- */
.site-footer {
  text-align: center;
  padding: 36px 20px 44px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13.5px;
}
.site-footer p { margin: 4px 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer-stamp { width: 28px; height: 28px; font-size: 15px; border-radius: 7px; }
.footer-note { font-size: 11.5px; opacity: 0.75; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-tate { display: none; }
  .site-header { justify-content: center; }
  .unit-row { flex-wrap: wrap; gap: 8px; }
  .unit-name { flex-basis: 100%; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
