/* ============================================
   サクモン(仮) デザインシステム v2
   テイスト: 明るいオンラインスクール系
   (白〜クリーム地 × オレンジ × グリーンCTA、丸み、手書き風あしらい)
   方針: ライトテーマ固定 / スマホ最優先 / 大きなタップ領域 / 広告なし
   ============================================ */
:root {
  --bg: #fff8ef;
  --surface: #ffffff;
  --ink: #3b352e;
  --muted: #8a7f70;
  --line: #f0e2cf;
  --primary: #ef8200;
  --primary-deep: #d26f00;
  --primary-soft: #fdefdd;
  --cta: #2fa968;
  --cta-deep: #22824f;
  --cta-soft: #e7f6ee;
  --good: #2fa968;
  --good-soft: #e7f6ee;
  --bad: #e05b4b;
  --bad-soft: #fdece9;
  --radius: 16px;
  --shadow: 0 3px 14px rgba(180, 130, 60, 0.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  padding-bottom: 72px; /* bottom nav */
}
h1, h2, h3, .logo { font-family: "Zen Maru Gothic", "Zen Kaku Gothic New", sans-serif; line-height: 1.45; text-wrap: balance; }
a { color: var(--primary-deep); }
img { max-width: 100%; height: auto; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1rem;
}
.logo { font-weight: 900; font-size: 1.2rem; color: var(--primary); text-decoration: none; letter-spacing: 0.02em; }
.logo .beta { font-size: 0.6rem; color: var(--muted); font-weight: 700; vertical-align: super; margin-left: 2px; }
.exam-chip { font-size: 0.7rem; font-weight: 700; background: var(--primary-soft); color: var(--primary-deep); border-radius: 99px; padding: 0.15rem 0.7rem; }
header.site .spacer { margin-left: auto; }
header.site a.login {
  font-size: 0.78rem; font-weight: 800; text-decoration: none; color: #fff;
  background: var(--primary); border-radius: 99px; padding: 0.35rem 0.9rem;
}

/* ---------- layout ---------- */
main { max-width: 40rem; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.wide { max-width: 52rem; }
section { margin-top: 2.4rem; }
h2.sec { font-size: 1.18rem; font-weight: 900; margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
h2.sec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex: none; }
.note-muted { font-size: 0.78rem; color: var(--muted); }

/* ---------- hero ---------- */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.hero img { display: block; width: 100%; }
.hero .inner { padding: 1.4rem 1.2rem 1.6rem; }
.hero h1 { font-size: clamp(1.4rem, 5.5vw, 1.85rem); font-weight: 900; margin: 0 0 0.6rem; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.lead { margin: 0 0 1.1rem; font-size: 0.92rem; color: var(--muted); }

/* 丸囲みバッジ(参考サイトの「業界最安級」風) */
.badge-row { display: flex; justify-content: center; gap: 0.7rem; margin: 0 0 1.2rem; }
.round-badge {
  width: 92px; height: 92px; border-radius: 50%;
  border: 2.5px solid var(--primary);
  background: #fff; color: var(--primary-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.78rem; line-height: 1.35; text-align: center;
  font-family: "Zen Maru Gothic", sans-serif;
}
.round-badge b { font-size: 0.95rem; color: var(--primary); }

/* 斜線あしらい: ＼ まずは体験 ／ */
.hand-note { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 900; font-size: 0.88rem; color: var(--ink); margin-bottom: 0.5rem; font-family: "Zen Maru Gothic", sans-serif; }
.hand-note::before { content: "＼"; color: var(--primary); }
.hand-note::after { content: "／"; color: var(--primary); }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 54px; border-radius: 99px;
  font-size: 1rem; font-weight: 900; text-decoration: none; cursor: pointer;
  border: none; width: 100%; font-family: "Zen Maru Gothic", "Zen Kaku Gothic New", sans-serif;
  transition: transform 0.06s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--cta); color: #fff; box-shadow: 0 4px 0 var(--cta-deep); }
.btn-secondary { background: #fff; color: var(--primary-deep); border: 2px solid var(--primary); margin-top: 0.7rem; }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--muted); margin-top: 0.7rem; }
.btn:focus-visible, .choice:focus-visible, a:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- cards / grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.15rem 1.1rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
@media (max-width: 480px) { .grid2.collapse { grid-template-columns: 1fr; } }
.menu-card { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.95rem 1rem; box-shadow: var(--shadow); }
.menu-card b { display: flex; align-items: center; gap: 0.45rem; color: var(--ink); font-size: 0.95rem; font-family: "Zen Maru Gothic", sans-serif; }
.menu-card small { color: var(--muted); font-size: 0.74rem; line-height: 1.5; display: block; margin-top: 0.2rem; }

/* ---------- quiz ---------- */
.q-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.7rem; align-items: center; }
.chip { font-size: 0.68rem; font-weight: 700; border-radius: 99px; padding: 0.15rem 0.6rem; background: var(--primary-soft); color: var(--primary-deep); }
.chip.freq { background: var(--bad-soft); color: var(--bad); }
.chip.origin { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.q-text { font-size: 1rem; font-weight: 500; margin: 0 0 1rem; }
.choices { display: flex; flex-direction: column; gap: 0.55rem; }
.choice {
  display: flex; gap: 0.7rem; align-items: flex-start; text-align: left;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 0.8rem 0.9rem; font-size: 0.92rem; line-height: 1.6;
  cursor: pointer; width: 100%; font-family: inherit; color: var(--ink);
}
.choice .key {
  flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; margin-top: 0.1rem;
}
.choice.correct { border-color: var(--good); background: var(--good-soft); }
.choice.correct .key { background: var(--good); color: #fff; }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice.wrong .key { background: var(--bad); color: #fff; }
.choice.dim { opacity: 0.55; }
.choice:disabled { cursor: default; }

.verdict { font-size: 1.15rem; font-weight: 900; margin: 1rem 0 0.3rem; font-family: "Zen Maru Gothic", sans-serif; }
.verdict.ok { color: var(--good); }
.verdict.ng { color: var(--bad); }

.explain { border-top: 3px solid var(--primary); margin-top: 1rem; padding-top: 0.9rem; }
.explain h3 { font-size: 0.85rem; color: var(--primary-deep); margin: 0 0 0.4rem; }
.explain p { font-size: 0.88rem; margin: 0 0 0.7rem; }
.explain .why { display: flex; gap: 0.5rem; font-size: 0.84rem; color: var(--muted); margin-bottom: 0.4rem; }
.explain .why b { flex: none; color: var(--bad); }
.explain .memo { background: var(--primary-soft); border-radius: 12px; padding: 0.6rem 0.8rem; font-size: 0.84rem; }
.explain .memo::before { content: "💡 覚え方: "; font-weight: 800; color: var(--primary-deep); }
.review-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 700; color: var(--cta-deep); background: var(--cta-soft); border-radius: 99px; padding: 0.15rem 0.65rem; }

.progress-wrap { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.progress { flex: 1; height: 10px; background: #f3e8d8; border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.3s ease; }
.progress-num { font-size: 0.78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.6rem; text-align: center; box-shadow: var(--shadow); }
.stat .v { font-size: 1.4rem; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; font-family: "Zen Maru Gothic", sans-serif; }
.stat .l { font-size: 0.66rem; color: var(--muted); font-weight: 700; }
.field-bar { margin-bottom: 0.7rem; }
.field-bar .name { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.25rem; }
.field-bar .name em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.field-bar .track { height: 12px; background: #f3e8d8; border-radius: 99px; overflow: hidden; }
.field-bar .track i { display: block; height: 100%; border-radius: 99px; background: var(--good); }
.field-bar.weak .track i { background: var(--bad); }
.field-bar.weak .name { color: var(--bad); }

/* ---------- bottom nav ---------- */
nav.bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: #ffffff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
}
nav.bottom a {
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  text-decoration: none; color: var(--muted); font-size: 0.62rem; font-weight: 700;
  min-width: 64px; padding: 0.2rem 0.4rem; border-radius: 12px;
}
nav.bottom a .ico { font-size: 1.25rem; line-height: 1; }
nav.bottom a.active { color: var(--primary-deep); background: var(--primary-soft); }

/* ---------- faq / footer ---------- */
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 0.6rem; }
details.faq summary { font-weight: 700; font-size: 0.9rem; cursor: pointer; }
details.faq p { font-size: 0.85rem; color: var(--muted); margin: 0.6rem 0 0; }
footer.site { max-width: 40rem; margin: 3rem auto 0; padding: 1.2rem 1rem 2rem; border-top: 1px solid var(--line); font-size: 0.74rem; color: var(--muted); }
footer.site a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
