:root {
  --navy: #003a73;
  --navy-dark: #002a54;
  --blue: #009fe6;
  --blue-soft: #e3f4fd;
  --ink: #1c2b36;
  --gray: #5b6b78;
  --line: #dde5ec;
  --bg: #f5f8fa;
  --white: #ffffff;
  --accent: #ff7a45;
  --green: #2bb673;
  --red: #e0443a;
  --teal: #0c8599;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(0, 42, 84, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Noto Sans JP', 'Inter', sans-serif; color: var(--ink); background: var(--bg); line-height: 1.8; }
.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* ---------- header / hero(共通) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.header-inner { max-width: 980px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { color: #fff; font-weight: 900; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--teal); color: #fff; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a { color: #cfe3f5; text-decoration: none; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; transition: .15s; }
.nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav .nav-home { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; border: 1px solid rgba(255,255,255,.25); }
.nav .nav-home:hover { background: var(--teal); border-color: var(--teal); }

.hero { background: linear-gradient(135deg, var(--navy) 0%, #00518f 55%, #0c8599 100%); color: #fff; padding: 64px 0 56px; }
.hero-eyebrow { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .2em; color: #8fe3ef; margin: 0 0 10px; }
.hero h1 { font-size: 38px; font-weight: 900; margin: 0 0 16px; letter-spacing: .02em; }
.hero-lead { font-size: 15px; color: #d7e7f5; margin: 0 0 28px; }
.hero-lead strong { color: #fff; }
.hero-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.step-chip { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px; transition: .15s; }
.step-chip:hover { background: var(--teal); border-color: var(--teal); }

/* ---------- lesson(共通) ---------- */
.lesson { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 36px 32px; margin: 36px 0; }
.lesson-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.step-badge { background: var(--teal); color: #fff; font-family: 'Inter', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: .08em; padding: 4px 12px; border-radius: 999px; }
.lesson h2 { font-size: 24px; font-weight: 900; color: var(--navy); margin: 0; }
.lesson-desc { color: var(--gray); font-size: 14.5px; margin: 10px 0 20px; }
.lesson-desc strong { color: var(--navy); }
.sub-head { color: var(--navy); font-size: 17px; margin: 28px 0 12px; }

.term-grid, .tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 20px; }
.term-card, .tip-card { background: var(--bg); border-radius: 10px; padding: 18px 18px 14px; border: 1px solid var(--line); }
.term-card h3, .tip-card h3 { font-size: 14.5px; color: var(--navy); margin: 6px 0 6px; }
.term-card p, .tip-card p { font-size: 13px; color: var(--gray); margin: 0; line-height: 1.7; }
.term-card p strong, .tip-card p strong { color: var(--navy); }
.term-icon { font-size: 18px; }

/* ---------- STEP2 1作品ページの解剖 ---------- */
.anat-area { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.anat-page { flex: 0 0 320px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; }
.anat-img { height: 160px; border-radius: 8px; background: repeating-linear-gradient(45deg, #eef3f7, #eef3f7 12px, #e7eef3 12px, #e7eef3 24px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 38px; color: #9fb3c2; }
.anat-img span { font-size: 12px; font-weight: 700; }
.anat-info { margin-top: 14px; min-height: 40px; display: flex; flex-direction: column; gap: 7px; }
.anat-line { font-size: 13px; line-height: 1.5; opacity: 0; transform: translateY(4px); transition: .2s; }
.anat-line.on { opacity: 1; transform: none; }
.anat-line .lab { display: inline-block; font-size: 10.5px; font-weight: 800; color: var(--teal); background: #e6f6f9; border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.anat-line.title-line { font-size: 17px; font-weight: 900; color: var(--navy); }
.anat-line.concept-line { color: #36474f; font-weight: 500; }
.anat-meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.anat-side { flex: 1; min-width: 240px; }
.canvas-note { font-size: 13.5px; color: var(--gray); margin: 0 0 10px; font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.info-chip { font-family: inherit; font-size: 12.5px; font-weight: 700; background: var(--bg); color: var(--gray); border: 2px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: .12s; }
.info-chip:hover { border-color: var(--teal); }
.info-chip.on { background: #e6f6f9; border-color: var(--teal); color: #0a6c7c; }
.info-chip .ess { font-size: 10px; color: var(--accent); margin-left: 4px; }
.meter-wrap { margin: 4px 0 12px; }
.meter-label { font-size: 13px; color: var(--gray); margin-bottom: 5px; }
.meter-label strong { font-family: 'Inter', sans-serif; font-size: 17px; color: var(--navy); }
.meter { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width .35s; }
.anat-msg { font-size: 13px; color: var(--teal); font-weight: 700; min-height: 2.6em; margin: 4px 0 12px; line-height: 1.6; }
.anat-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- STEP3 並び替え ---------- */
.order-area { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.order-item { display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.order-rank { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 13px; color: #fff; background: var(--navy); width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.order-thumb { font-size: 26px; width: 44px; text-align: center; flex-shrink: 0; }
.order-body { flex: 1; min-width: 0; }
.order-name { font-size: 14px; font-weight: 800; color: var(--navy); }
.order-tag { font-size: 11.5px; color: var(--gray); }
.order-moves { display: flex; flex-direction: column; gap: 3px; }
.order-moves button { font-family: inherit; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 6px; width: 30px; height: 22px; cursor: pointer; font-size: 12px; line-height: 1; }
.order-moves button:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.order-moves button:disabled { opacity: .3; cursor: default; }
.order-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.order-result { margin-top: 14px; }
.order-result .chal-stars { font-size: 28px; letter-spacing: 4px; }
.order-result p { font-weight: 900; color: var(--navy); margin: 6px 0 0; }

/* ---------- 次ページへのCTA ---------- */
.cta-next { margin-top: 22px; background: linear-gradient(135deg, #063b45, #0c8599); color: #fff; border-radius: 14px; padding: 24px 26px; }
.cta-next-lead { font-size: 17px; font-weight: 900; margin: 0 0 6px; }
.cta-next-sub { font-size: 13.5px; color: #d7f1f5; margin: 0 0 16px; line-height: 1.7; }
.cta-next-sub strong { color: #fff; }
.cta-next-btn { background: #fff; color: #0a6c7c; border-color: #fff; font-size: 14.5px; }
.cta-next-btn:hover { background: #f0fafb; color: #084e5a; }

/* ---------- クイズ共通 ---------- */
.quiz-box { border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: 26px 28px; }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.quiz-q { font-size: 16.5px; font-weight: 900; color: var(--navy); margin-bottom: 16px; line-height: 1.7; }
.quiz-q .q-icon { font-size: 24px; margin-right: 6px; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt { text-align: left; font-family: inherit; font-size: 14.5px; font-weight: 700; background: var(--bg); color: var(--ink); border: 2px solid var(--line); border-radius: 10px; padding: 11px 18px; cursor: pointer; transition: .12s; }
.quiz-opt:hover { border-color: var(--teal); background: #e6f6f9; }
.quiz-opt.is-correct { border-color: var(--green); background: #f2fbf6; color: #1d7a4d; }
.quiz-opt.is-wrong { border-color: var(--red); background: #fdf0ef; color: #b3372f; }
.quiz-opt:disabled { cursor: default; }
.quiz-note { margin-top: 14px; background: #e6f6f9; border-radius: 10px; padding: 12px 16px; font-size: 13.5px; color: #0a5563; font-weight: 500; }
.quiz-note[hidden] { display: none; }
.quiz-next { margin-top: 14px; }
.quiz-final { text-align: center; padding: 10px 0; }
.quiz-final .qf-score { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 50px; color: var(--navy); }
.quiz-final .qf-score small { font-size: 18px; }
.quiz-final p { margin: 6px 0 14px; font-weight: 900; color: var(--navy); }

/* ---------- btn / toast / table / note ---------- */
.btn { font-family: inherit; font-size: 13.5px; font-weight: 700; padding: 9px 18px; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--line); background: #fff; color: var(--navy); transition: .15s; }
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-ghost { border-color: transparent; color: var(--gray); }
.shortcut-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.shortcut-table th, .shortcut-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.shortcut-table th { background: var(--bg); color: var(--navy); font-size: 12.5px; }
.shortcut-table td:first-child { white-space: nowrap; font-weight: 700; color: var(--navy); }
.note { margin-top: 18px; background: #fff8f0; border: 1px solid #ffd9bd; border-radius: 10px; padding: 16px 20px; font-size: 13.5px; color: #6b4a2f; }
.note strong { color: #b34a14; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 700; padding: 10px 22px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 1000; transition: opacity .3s; max-width: 90vw; text-align: center; }
.toast[hidden] { display: none; }
.site-footer { background: var(--navy); color: #9fc0dd; text-align: center; padding: 24px 20px; font-size: 12.5px; margin-top: 48px; }
.site-footer p { margin: 0; }

/* ---------- ページ送りナビ ---------- */
.page-nav { display: flex; gap: 12px; align-items: stretch; margin: 44px auto 0; }
.pgnav { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; text-decoration: none; background: #fff; border: 1.5px solid #dde5ec; border-radius: 12px; padding: 14px 18px; transition: .15s; box-shadow: 0 2px 12px rgba(0,42,84,.08); }
.pgnav:hover { border-color: #0c8599; transform: translateY(-2px); }
.pgnav.prev { text-align: left; }
.pgnav.next { text-align: right; }
.pgnav.top { flex: 0 0 130px; text-align: center; background: #003a73; border-color: #003a73; }
.pgnav.top .pgnav-dir, .pgnav.top .pgnav-name { color: #fff; }
.pgnav.top:hover { background: #002a54; border-color: #002a54; }
.pgnav-dir { font-size: 12px; font-weight: 700; color: #0c8599; }
.pgnav-name { font-size: 14px; font-weight: 900; color: #003a73; }
.pgnav.is-disabled { visibility: hidden; }
@media (max-width: 560px) { .page-nav { flex-wrap: wrap; } .pgnav.top { order: -1; flex-basis: 100%; } }

@media (max-width: 700px) {
  .hero h1 { font-size: 25px; }
  .lesson { padding: 24px 18px; }
  .header-inner { flex-direction: column; height: auto; padding: 10px 20px; gap: 4px; }
  .anat-page { flex-basis: 100%; }
}
