:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1f1e1c;
  --muted: #6b6863;
  --line: #e3e0d9;
  --accent: #0f6e56;
  --accent-soft: #e1f5ee;
  /* アクセント色を背景に敷いたときの文字色。ダークではアクセントが明るくなるので反転する。 */
  --on-accent: #ffffff;
  --radius: 10px;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --surface: #1f2124;
    --text: #ececea;
    --muted: #9c9a95;
    --line: #33363a;
    --accent: #5dcaa5;
    --accent-soft: #123329;
    --on-accent: #10231d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem; min-width: 0;
  font-weight: 600; text-decoration: none; color: var(--text); font-size: 0.95rem;
}
.brand-mark {
  flex: none;
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
}
.brand-name { line-height: 1.3; }
.session-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; min-width: 0; }
.nav-pills { display: flex; align-items: center; gap: 0.2rem; }
.nav-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav-pill:hover { background: var(--accent-soft); color: var(--accent); }
.nav-pill.is-current { background: var(--accent); color: var(--on-accent); }
.who { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-link {
  flex: none;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.logout-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* メールアドレスは狭い画面では省く。マイページで確認できる。 */
@media (max-width: 880px) {
  .who { display: none; }
}

@media (max-width: 560px) {
  header.site { padding-inline: 0.9rem; gap: 0.5rem; }
  .brand-name { display: none; }
  .session-actions { gap: 0.35rem; }
  .nav-pill { padding: 0.3rem 0.55rem; font-size: 0.75rem; }
  .logout-link { padding: 0.3rem 0.55rem; font-size: 0.7rem; }
}

main { max-width: var(--measure); margin: 0 auto; padding: 2rem 1.25rem 5rem; }

h1 { font-size: 1.6rem; line-height: 1.5; margin: 0.2rem 0 1.2rem; font-weight: 600; }
.eyebrow { color: var(--muted); font-size: 0.82rem; margin: 0; }
.eyebrow a { color: var(--muted); }

/* 進捗 */
.progress { margin: 1.5rem 0; }
.progress-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.progress-text { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--muted); }
.progress-text strong { color: var(--text); font-size: 1.05rem; }
.pct { float: right; }

/* 続きから読む */
.cta {
  display: block;
  margin: 1.5rem 0 2.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius);
  text-decoration: none;
}
.cta.done { background: var(--accent-soft); color: var(--text); }
.cta-label { display: block; font-size: 0.78rem; opacity: 0.85; }
.cta-title { display: block; font-weight: 600; font-size: 1.05rem; margin-top: 0.15rem; }

/* モジュール */
.module { margin: 2rem 0; }
.module h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.mnum { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.mcount { margin-left: auto; color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.note { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.75rem; }

ul.lessons { list-style: none; margin: 0; padding: 0; }
ul.lessons li { border-bottom: 1px solid var(--line); }
ul.lessons li:last-child { border-bottom: 0; }
ul.lessons a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.25rem;
  text-decoration: none;
  color: var(--text);
}
ul.lessons a:hover { background: var(--accent-soft); }
.check {
  flex: none;
  width: 1.35rem; height: 1.35rem;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.75rem; color: var(--on-accent);
}
.is-done .check { background: var(--accent); border-color: var(--accent); }
.is-done .lesson-title { color: var(--muted); }
.lesson-title { font-size: 0.93rem; }
.tag {
  margin-left: auto; flex: none;
  font-size: 0.7rem; padding: 0.1rem 0.45rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
}

/* 本文 */
.prose { margin-top: 1.5rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.15rem; font-weight: 600; margin: 2.4rem 0 0.8rem; line-height: 1.6; }
.prose h3 { font-size: 1rem; font-weight: 600; margin: 1.8rem 0 0.6rem; }
.prose p { margin: 1.1rem 0; }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 1.1rem 0; }
.prose li { margin: 0.35rem 0; }
.prose img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 1.5rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
}
.prose blockquote p { margin: 0.3rem 0; font-size: 0.92rem; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface); font-weight: 600; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.updated { font-size: 0.8rem; color: var(--muted); margin-top: 2rem; }

/* 課題への導線 */
.assignment-cta {
  margin: 2rem 0;
  padding: 1rem 1.15rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.assignment-cta p { margin: 0 0 0.4rem; font-size: 0.9rem; }
.assignment-cta.pending p { margin: 0; color: var(--muted); }

/* 完了ボタン */
form.complete { margin: 2.5rem 0 1.5rem; }
form.complete button {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
form.complete button.is-done {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 400;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  main { padding: 1.5rem 1rem 4rem; }
  h1 { font-size: 1.35rem; }
}

/* ── 公開ページ（ランディング・証書確認） ── */
body.public main.verify {
  max-width: 46rem; margin: 0 auto; padding: 0 1.25rem;
}

/* ランディングは受講画面から独立したアートディレクションにする。 */
body.landing-page {
  --lp-ink: #172d27;
  --lp-green: #174f41;
  --lp-green-deep: #0d352d;
  --lp-mint: #dff0e9;
  --lp-cream: #f3efe5;
  --lp-paper: #fbfaf5;
  --lp-coral: #e36f52;
  --lp-line: rgba(23, 45, 39, 0.16);
  background: var(--lp-paper);
  color: var(--lp-ink);
  color-scheme: light;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}

.landing-shell { overflow: hidden; }

.public-nav {
  width: min(100% - 3rem, 74rem);
  height: 6.5rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--lp-ink);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.04em;
}
.brand-monogram {
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--lp-ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-login,
.nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--lp-ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.nav-admin {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  color: #5f706a;
  font-size: 0.72rem;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.nav-admin:hover { border-color: var(--lp-green); background: var(--lp-mint); color: var(--lp-green); }
.nav-login span { transition: transform 180ms ease; }
.nav-login:hover span { transform: translateX(0.3rem); }

body.landing-page .hero {
  width: min(100% - 3rem, 74rem);
  min-height: 40rem;
  margin: 0 auto;
  padding: 4.25rem 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(29rem, 0.9fr);
  grid-template-rows: 1fr auto;
  gap: 3.5rem 5rem;
  border-top: 1px solid var(--lp-line);
}
.hero-copy { align-self: center; position: relative; z-index: 2; }
.hero-label,
.section-index {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.3;
}
.hero-label { display: flex; align-items: center; gap: 0.7rem; color: #52645f; }
.hero-label > span { display: block; width: 2.25rem; height: 1px; background: var(--lp-coral); }
body.landing-page .hero h1 {
  margin: 1.5rem 0 1.7rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(3.5rem, 6vw, 5.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.055em;
}
body.landing-page .hero h1 em { color: var(--lp-green); font-style: normal; position: relative; }
body.landing-page .hero h1 em::after {
  content: "";
  position: absolute;
  left: 0.03em;
  right: 0;
  bottom: -0.1em;
  height: 0.12em;
  background: var(--lp-coral);
  border-radius: 999px;
  transform: rotate(-1deg);
}
body.landing-page .hero .lead {
  max-width: 34rem;
  margin: 0;
  color: #52645f;
  font-size: 0.96rem;
  line-height: 2;
}
.hero-actions { display: flex; align-items: center; gap: 2rem; margin-top: 2.25rem; }
.primary-action {
  min-width: 13.5rem;
  padding: 1rem 1.25rem;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  border-radius: 999px;
  background: var(--lp-green);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(23, 79, 65, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(23, 79, 65, 0.24); }
.text-action {
  color: var(--lp-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--lp-line);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0;
}
.text-action span { color: var(--lp-coral); padding-left: 0.4rem; }

.hero-visual {
  position: relative;
  align-self: center;
  min-height: 31rem;
  border-radius: 50% 50% 2rem 2rem;
  background: var(--lp-mint);
  isolation: isolate;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 1.25rem;
  border: 1px solid rgba(23, 79, 65, 0.12);
  border-radius: inherit;
  z-index: -1;
}
.hero-visual::after {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  right: -3rem;
  top: 5rem;
  border-radius: 50%;
  background: var(--lp-coral);
  opacity: 0.85;
  z-index: -2;
}
.orbit { position: absolute; border: 1px solid rgba(23, 79, 65, 0.14); border-radius: 50%; z-index: -1; }
.orbit-one { width: 20rem; height: 20rem; left: -3rem; top: -2rem; }
.orbit-two { width: 7rem; height: 7rem; right: 2rem; bottom: -2rem; background: var(--lp-paper); }
.visual-caption {
  position: absolute;
  top: 4.5rem;
  right: 3.3rem;
  margin: 0;
  color: rgba(23, 45, 39, 0.55);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.67rem;
  line-height: 1.45;
  letter-spacing: 0.16em;
}
.visual-stage {
  position: absolute;
  width: 13.5rem;
  padding: 1rem 1.15rem;
  background: rgba(251, 250, 245, 0.94);
  border: 1px solid rgba(23, 45, 39, 0.12);
  box-shadow: 0 18px 45px rgba(23, 45, 39, 0.1);
  backdrop-filter: blur(8px);
}
.visual-stage span {
  float: right;
  color: var(--lp-coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.7rem;
}
.visual-stage strong { display: block; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.35rem; line-height: 1.35; }
.visual-stage small { display: block; margin-top: 0.25rem; color: #65746f; font-size: 0.68rem; }
.stage-one { left: -1.75rem; bottom: 3.25rem; border-radius: 0 1.2rem 1.2rem 1.2rem; }
.stage-two { left: 7rem; top: 11.5rem; border-radius: 1.2rem; }
.stage-three { right: 1rem; top: 3.8rem; border-radius: 1.2rem 1.2rem 0 1.2rem; }
.hero-foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lp-line);
  color: #72807c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.61rem;
  letter-spacing: 0.16em;
}

body.landing-page main.landing {
  max-width: none;
  margin: 0;
  padding: 0;
}
.roadmap-section {
  width: min(100% - 3rem, 74rem);
  margin: 0 auto;
  padding: 8rem 0;
}
.section-intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.section-index { color: var(--lp-coral); padding-top: 0.6rem; }
.section-intro > div { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: end; }
.section-intro h2,
.cta-section h2 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(2.25rem, 4vw, 3.7rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.035em;
}
.section-intro > div > p {
  margin: 0;
  color: #5a6965;
  font-size: 0.9rem;
  line-height: 2;
}

.steps { position: relative; }
.steps::before {
  content: "";
  position: absolute;
  top: 8.5rem;
  bottom: 8.5rem;
  left: 4rem;
  width: 1px;
  background: var(--lp-line);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 8rem 1fr;
  border-top: 1px solid var(--lp-line);
  padding: 3rem 0;
}
.step:last-child { border-bottom: 1px solid var(--lp-line); }
.step-marker { position: relative; z-index: 1; }
.step-marker span {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--lp-green);
  border-radius: 50%;
  background: var(--lp-paper);
  color: var(--lp-green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.75rem;
}
.step-02 .step-marker span { background: var(--lp-green); color: #fff; }
.step-kicker { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.step-kicker > span:first-child { color: #75827e; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.13em; }
.step-goal {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--lp-mint);
  color: var(--lp-green);
  font-size: 0.72rem;
  font-weight: 700;
}
.step-content h3 {
  margin: 0.8rem 0 1rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.4;
}
.step-text { max-width: 44rem; margin: 0; color: #3e514b; font-size: 0.94rem; line-height: 2; }
.step-base { margin: 1rem 0 0; color: #7a8581; font-size: 0.73rem; }
.step-outcome {
  margin-top: 1.6rem;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 45, 39, 0.055);
}
.cert-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lp-green);
  color: #fff;
  font-size: 0.72rem;
}
.step-outcome p { margin: 0; line-height: 1.4; }
.step-outcome strong { display: block; font-size: 0.8rem; }
.step-outcome p span { display: block; margin-top: 0.25rem; color: #77827e; font-size: 0.7rem; }

.future-section {
  width: min(100% - 3rem, 78rem);
  margin: 0 auto;
  padding: 7rem 2rem 2rem;
  border-radius: 2.5rem;
  background: var(--lp-green-deep);
  color: #f8f6ef;
}
.future-section .section-intro { width: min(100%, 70rem); margin: 0 auto 4rem; }
.section-intro.is-light .section-index { color: #f2997e; }
.section-intro.is-light > div > p { color: rgba(248, 246, 239, 0.65); }
.tracks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.13);
}
.track {
  min-height: 22rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  background: #16483c;
  transition: background 180ms ease, transform 180ms ease;
}
.track:hover { background: #1a5546; }
.track-num {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
}
.track h3 {
  margin: auto 0 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
}
.track h3 span { color: #f2997e; font-family: system-ui, sans-serif; font-size: 1rem; }
.track > p:not(.track-cert) { min-height: 5.5rem; margin: 0; color: rgba(248, 246, 239, 0.68); font-size: 0.79rem; line-height: 1.8; }
.track-cert {
  align-self: flex-start;
  margin: 1.5rem 0 0;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}
.track-cert.is-open { border-color: transparent; padding-left: 0; color: rgba(255, 255, 255, 0.38); letter-spacing: 0.14em; }

body.landing-page .cta-section {
  width: min(100% - 3rem, 74rem);
  margin: 0 auto;
  padding: 8rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 4rem;
}
.cta-section .section-index { margin-bottom: 1.2rem; }
.cta-section > div > p:last-child { margin: 1.5rem 0 0; color: #65746f; font-size: 0.85rem; }
.cta-arrow {
  width: 12rem;
  height: 12rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-radius: 50%;
  background: var(--lp-coral);
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  transform: rotate(-4deg);
  transition: transform 200ms ease;
}
.cta-arrow:hover { transform: rotate(0) scale(1.03); }
.cta-arrow b { align-self: flex-end; font-size: 2rem; font-weight: 400; line-height: 1; }

body.landing-page .site-footer {
  margin: 0;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--lp-line);
}
body.landing-page .site-footer p {
  width: min(100%, 74rem);
  margin: 0 auto;
  color: #798581;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  body.landing-page .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .hero-visual { width: min(100%, 34rem); justify-self: center; }
  .section-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-intro > div { grid-template-columns: 1fr 1fr; }
  .tracks { grid-template-columns: 1fr; }
  .track { min-height: 18rem; }
  .track > p:not(.track-cert) { min-height: auto; }
}

@media (max-width: 620px) {
  .public-nav { width: min(100% - 2rem, 74rem); height: 5.5rem; }
  .public-brand > span:last-child { display: none; }
  .nav-actions { gap: 0.65rem; }
  .nav-admin { padding: 0.45rem 0.65rem; font-size: 0.65rem; }
  .nav-login { font-size: 0.72rem; }
  body.landing-page .hero { width: min(100% - 2rem, 74rem); min-height: auto; padding: 2.5rem 0 1.5rem; gap: 3rem; }
  body.landing-page .hero h1 { font-size: clamp(3rem, 15vw, 4rem); }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 1rem; }
  .primary-action { width: 100%; }
  .text-action { align-self: flex-start; }
  .hero-visual { min-height: 27rem; }
  .hero-visual::after { right: -5rem; }
  .visual-caption { top: 3rem; right: 1.75rem; }
  .visual-stage { width: 11.5rem; }
  .stage-one { left: -0.4rem; bottom: 2.5rem; }
  .stage-two { left: 4.2rem; top: 10.7rem; }
  .stage-three { right: 0.35rem; top: 3rem; }
  .hero-foot { flex-wrap: wrap; justify-content: flex-start; gap: 0.6rem 1.5rem; }
  .roadmap-section { width: min(100% - 2rem, 74rem); padding: 6rem 0; }
  .section-intro > div { grid-template-columns: 1fr; gap: 1.25rem; }
  .step { grid-template-columns: 3.25rem 1fr; padding: 2.25rem 0; }
  .steps::before { left: 1.25rem; }
  .step-marker span { width: 2.5rem; height: 2.5rem; font-size: 0.65rem; }
  .step-kicker { align-items: flex-start; flex-direction: column; }
  .step-goal { font-size: 0.66rem; }
  .step-content h3 { margin-top: 1rem; }
  .step-outcome { align-items: flex-start; }
  .future-section { width: min(100% - 1rem, 78rem); padding: 5rem 1rem 1rem; border-radius: 1.75rem; }
  .future-section .section-intro { margin-bottom: 3rem; }
  .track { min-height: 17rem; padding: 1.5rem; }
  body.landing-page .cta-section { width: min(100% - 2rem, 74rem); padding: 6rem 0; grid-template-columns: 1fr; gap: 2.5rem; }
  .cta-arrow { width: 10rem; height: 10rem; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-login span, .nav-admin, .primary-action, .track, .cta-arrow { transition: none; }
}

.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 1.25rem; }
.site-footer p { max-width: 46rem; margin: 0 auto; color: var(--muted); font-size: 0.82rem; }

/* 証書の確認 */
main.verify { padding-top: 4rem; padding-bottom: 4rem; }
.verify-card { border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem; background: var(--surface); }
.verify-card.is-valid { border-color: var(--accent); }
.verify-status { font-weight: 600; font-size: 0.9rem; margin: 0 0 0.75rem; }
.is-valid .verify-status { color: var(--accent); }
.is-invalid .verify-status { color: var(--muted); }
.verify-card h1 { font-size: 1.3rem; margin: 0 0 1.25rem; }
.verify-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.verify-meta { display: grid; grid-template-columns: 6rem 1fr; gap: 0.5rem 1rem; margin: 0; font-size: 0.92rem; }
.verify-meta dt { color: var(--muted); font-size: 0.85rem; }
.verify-meta dd { margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.verify-goal { font-size: 0.85rem; color: var(--muted); margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.verify-back { margin-top: 1.5rem; font-size: 0.85rem; }

/* ── ダッシュボードの追加分 ── */
.credential {
  border: 1px solid var(--accent); border-radius: 12px;
  background: var(--accent-soft); padding: 1.1rem 1.25rem; margin: 1.5rem 0;
}
.credential.is-pending { border-color: var(--line); background: var(--surface); }
.credential-label { margin: 0; font-weight: 600; font-size: 0.95rem; }
.credential-id { margin: 0.35rem 0; font-size: 1.15rem; font-weight: 600; letter-spacing: 0.02em; }
.credential-note { margin: 0.35rem 0 0.6rem; font-size: 0.85rem; color: var(--muted); }
.credential-link { font-size: 0.88rem; font-weight: 600; }

/* ── 課題フォーム ── */
.assignment-form { margin: 2rem 0; }
.form-section { border: 0; border-top: 1px solid var(--line); margin: 2rem 0 0; padding: 1.25rem 0 0; }
.form-section legend { font-weight: 600; font-size: 1rem; padding: 0 0.6rem 0 0; }
.section-help { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.section-help p { margin: 0.4rem 0; }

.field { margin: 1.5rem 0; }
.field-label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.field-hint { margin: 0 0 0.4rem; font-size: 0.82rem; color: var(--muted); }
.field-help { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.field-help p { margin: 0.35rem 0; }
.field-help table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 0.5rem 0; }
.field-help th, .field-help td { border: 1px solid var(--line); padding: 0.35rem 0.5rem; }

.assignment-form textarea, .assignment-form input[type="text"], .assignment-form input[type="date"] {
  width: 100%; font: inherit; font-size: 0.95rem; padding: 0.6rem 0.7rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.assignment-form input.short { max-width: 16rem; }
.assignment-form textarea { resize: vertical; line-height: 1.7; }
.assignment-form textarea:focus, .assignment-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.scale { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.scale label { flex: 1; min-width: 2.4rem; text-align: center; cursor: pointer; }
.scale input { position: absolute; opacity: 0; width: 0; height: 0; }
.scale span {
  display: block; padding: 0.45rem 0; font-size: 0.9rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.scale input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.choices { display: grid; gap: 0.4rem; }
.choice { display: flex; align-items: center; gap: 0.55rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.55rem 0.75rem;
  background: var(--surface); font-size: 0.92rem; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.assignment-form button {
  width: 100%; margin-top: 1.5rem; padding: 0.85rem 1rem;
  font: inherit; font-weight: 600; font-size: 0.95rem; color: #fff;
  background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer;
}

/* 提出状態 */
.sub-status { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.5rem 0; }
.sub-status.is-approved { border-color: var(--accent); background: var(--accent-soft); }
.sub-status.is-revision { border-color: #ba7517; }
.sub-status-label { margin: 0; font-weight: 600; font-size: 0.95rem; }
.sub-status.is-revision .sub-status-label { color: #ba7517; }
.sub-status-meta { margin: 0.2rem 0 0; font-size: 0.82rem; color: var(--muted); }
.feedback { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.feedback-label { margin: 0 0 0.3rem; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.feedback p { margin: 0; font-size: 0.92rem; }

.submitted-view { margin: 2rem 0; }
.submitted-view h2 { font-size: 1rem; font-weight: 600; margin: 0 0 0.75rem; }
.answers { margin: 1rem 0; }
.answers dt { font-weight: 600; font-size: 0.88rem; margin-top: 1.1rem; color: var(--muted); }
.answers dd { margin: 0.25rem 0 0; font-size: 0.95rem; }
.answers .blank { color: var(--muted); font-size: 0.88rem; }
.tag.is-warn { border-color: #ba7517; color: #ba7517; }

/* ── 管理ページ ── */
.invite-panel {
  margin: 1.5rem 0 2.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.invite-panel h2 { margin: 0 0 0.25rem; font-size: 1rem; }
.invite-form { margin-top: 1rem; }
.invite-form label { display: block; margin-bottom: 0.35rem; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.invite-form > div { display: flex; gap: 0.55rem; }
.invite-form input {
  min-width: 0;
  flex: 1;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}
.invite-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.invite-form button,
.student-access-form button {
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.admin-notice {
  margin: 1rem 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}
.admin-section-title { margin: 2rem 0 0.75rem; font-size: 1rem; }
.tag.access-invited { color: #91610b; border-color: #c49a45; }
.tag.access-active { color: var(--accent); border-color: var(--accent); }
.tag.access-suspended { color: #a33d3d; border-color: #c76a6a; }
.student-access-form { margin: -0.5rem 0 1.75rem; }
.student-access-form button.danger { background: transparent; color: #a33d3d; border: 1px solid #c76a6a; }

@media (max-width: 480px) {
  .invite-form > div { flex-direction: column; }
  .invite-form button { width: 100%; }
}

.queue { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--line); }
.queue li { border-bottom: 1px solid var(--line); }
.queue a { display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap;
  padding: 0.75rem 0.25rem; text-decoration: none; color: var(--text); }
.queue a:hover { background: var(--accent-soft); }
.queue-who { font-weight: 600; font-size: 0.93rem; }
.queue-what { font-size: 0.88rem; color: var(--muted); }
.queue-when { margin-left: auto; font-size: 0.8rem; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); padding: 0.5rem 0.6rem; text-align: left; white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.sub-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 1.5rem; }
.review-form { margin: 2rem 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.review-form label { display: block; font-weight: 600; font-size: 0.95rem; }
.review-form textarea { width: 100%; font: inherit; font-size: 0.95rem; padding: 0.6rem 0.7rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius); resize: vertical; line-height: 1.7; }
.review-actions { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.review-actions button { flex: 1; min-width: 10rem; padding: 0.8rem 1rem; font: inherit;
  font-weight: 600; font-size: 0.95rem; border-radius: var(--radius); cursor: pointer; border: 0; }
.review-actions .approve { background: var(--accent); color: var(--on-accent); }
.review-actions .revise { background: transparent; color: #ba7517; border: 1px solid #ba7517; }

/* ── コース選択とマイページ ── */

/* 見出しはランディングと同じ明朝で、ログイン前後の印象を揃える。 */
h1.display {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0.4rem 0 0.5rem;
}
.lede { margin: 0 0 2rem; color: var(--muted); font-size: 0.9rem; }

.stat-strip {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
  margin: 0 0 2.25rem; padding: 1rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.stat { display: flex; flex-direction: column; margin: 0; }
.stat-num { font-size: 1.5rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.stat-link { margin-left: auto; font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.stat-link:hover { text-decoration: underline; }

.course-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.course-card { margin: 0; }
.course-card-inner {
  display: block;
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
a.course-card-inner:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 110, 86, 0.13);
}
.course-card.is-locked .course-card-inner { background: transparent; border-style: dashed; }
.course-card.is-locked .course-title,
.course-card.is-locked .course-goal { color: var(--muted); }

.course-card-head { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 0.7rem; }
.course-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.45rem; font-weight: 600; line-height: 1; color: var(--accent);
}
.course-card.is-locked .course-num { color: var(--line); }
.course-state {
  margin-left: auto;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.7rem; color: var(--muted); white-space: nowrap;
}
.course-state.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.course-state.is-done { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }

.course-title {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.3rem; font-weight: 600; line-height: 1.45;
}
.course-goal { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--muted); }
.course-card .progress { margin: 1.1rem 0 0; }
.course-meta { margin: 0.55rem 0 0; font-size: 0.8rem; color: var(--muted); }
.course-cert { margin-left: 0.5rem; }
.course-lock { margin: 1.1rem 0 0; font-size: 0.85rem; color: var(--muted); }
.course-go {
  margin: 1.2rem 0 0; padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem; font-weight: 600; color: var(--accent);
}
.course-go span { display: inline-block; transition: transform 160ms ease; }
a.course-card-inner:hover .course-go span { transform: translateX(0.3rem); }

.my-section { margin: 2.5rem 0; }
.my-section > h2 {
  margin: 0 0 0.9rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem; font-weight: 600;
}

.cert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.cert-card {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--accent); border-radius: 12px;
  background: var(--accent-soft);
}
.cert-card.is-revoked { border-color: var(--line); background: var(--surface); }
.cert-card.is-revoked .cert-id { text-decoration: line-through; color: var(--muted); }
.cert-kind { margin: 0; font-size: 0.85rem; font-weight: 600; }
.cert-id { margin: 0.25rem 0; font-size: 1.15rem; font-weight: 600; letter-spacing: 0.02em; }
.cert-meta { margin: 0; font-size: 0.8rem; color: var(--muted); }
.cert-link { display: inline-block; margin-top: 0.6rem; font-size: 0.85rem; font-weight: 600; }
.empty-card {
  margin: 0; padding: 1.1rem 1.25rem; list-style: none;
  border: 1px dashed var(--line); border-radius: 12px;
  color: var(--muted); font-size: 0.88rem;
}

.history { list-style: none; margin: 0; padding: 0; }
.history-item { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; }
.history.compact .history-item { padding: 0.6rem 0; }
.history-head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin: 0; }
.history-head a { font-weight: 600; font-size: 0.93rem; text-decoration: none; color: var(--text); }
.history-head a:hover { color: var(--accent); text-decoration: underline; }
.history-when { margin-left: auto; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.history-meta { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--muted); }
.history .feedback { margin-top: 0.7rem; padding-top: 0.7rem; }
.tag.is-ok { border-color: var(--accent); color: var(--accent); }

@media (max-width: 480px) {
  h1.display { font-size: 1.55rem; }
  .course-card-inner { padding: 1.25rem 1.15rem 1.15rem; }
  .stat-strip { gap: 1.5rem; }
  .stat-link { margin-left: 0; width: 100%; }
}
