:root {
  --navy: #10233f;
  --ink: #182536;
  --muted: #607086;
  --paper: #fff;
  --canvas: #fff;
  --line: #e2e6e8;
  --blue: #286178;
  --green: #19715b;
  --shadow: 0 12px 32px rgba(16, 35, 63, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.8;
}
button, input, select, textarea { font: inherit; }
a { color: var(--blue); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(40, 97, 120, .28); outline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  border-bottom: 1px solid rgba(216, 213, 205, .85);
  background: rgba(255, 253, 249, .94);
  backdrop-filter: blur(16px);
}
.topbar-inner { max-width: 1440px; margin: auto; padding: 13px 28px; display: flex; align-items: center; gap: 12px; }
.brand { color: var(--navy); font-weight: 900; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { color: var(--blue); }
.topbar-spacer { flex: 1; }
.lesson-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 800; }

.shell { max-width: 1440px; margin: auto; padding: 34px 28px 90px; }
main { min-width: 0; }
.section { margin: 0; padding: 52px 0; border-bottom: 1px solid var(--line); background: var(--paper); }
.section-number { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.section-number::after { content: ""; width: 44px; height: 1px; background: currentColor; }
h2 { margin: 0 0 12px; color: var(--navy); font-size: clamp(21px, 2.5vw, 28px); line-height: 1.5; }
h3 { margin: 28px 0 10px; color: var(--navy); font-size: 18px; line-height: 1.5; }
p { margin: 9px 0 15px; }
.lead { max-width: 760px; color: #3f4f62; font-size: 17px; }

.btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border: 0; border-radius: 11px; background: var(--navy); color: #fff; font-weight: 900; text-decoration: none; cursor: pointer; box-shadow: 0 6px 14px rgba(16, 35, 63, .14); }
.btn.secondary { border: 1px solid var(--line); background: #fff; color: var(--navy); box-shadow: none; }
.btn.small { min-height: 36px; padding: 6px 11px; font-size: 12px; }

.hero { position: relative; min-height: 470px; display: grid; align-items: end; overflow: hidden; border-radius: 32px; color: #fff; background: var(--navy); box-shadow: var(--shadow); }
.hero-content { position: relative; z-index: 1; padding: 54px 58px 60px; }
.kicker { color: #9fc5d1; font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.hero h1 { max-width: 760px; margin: 12px 0 18px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.35; }
.hero p { max-width: 710px; margin: 0; color: #dce7f4; font-size: 17px; line-height: 1.8; }

.concept-deck { margin: 28px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #f3f6f7; }
.concept-deck-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.concept-deck-head strong { color: var(--navy); }
.concept-deck-head span { color: var(--muted); font-size: 12px; }
.concept-deck-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(310px, .82fr); min-height: 560px; }
.master-map-wrap { display: grid; place-items: center; min-width: 0; padding: 24px; }
.master-network-map { display: block; width: 100%; height: auto; max-height: 520px; }
.master-network-map text { font-family: inherit; }
.master-network-map .path-label { paint-order: stroke; stroke: #f3f6f7; stroke-width: 8px; stroke-linejoin: round; }
.master-network-map .concept-group { opacity: 1; transition: opacity .25s ease, filter .25s ease; }
.concept-deck.deck-ready .master-network-map .concept-group { opacity: .16; }
.concept-deck.deck-ready .master-network-map .concept-group.is-context { opacity: .45; }
.concept-deck.deck-ready .master-network-map .concept-group.is-focus { opacity: 1; filter: drop-shadow(0 4px 8px rgba(16, 35, 63, .09)); }
.focus-panel { display: flex; flex-direction: column; justify-content: center; padding: 34px 30px; border-left: 1px solid var(--line); background: #fff; }
.focus-panel .focus-count { color: var(--blue); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.focus-panel h3 { margin: 9px 0 14px; font-size: 24px; }
.focus-panel p { color: #3f4f62; }
.focus-example { margin-top: 18px; padding: 14px 0; border-top: 2px solid var(--blue); border-bottom: 1px solid var(--line); color: var(--navy); font: 700 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.concept-deck-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--line); background: #fff; }
.deck-steps { display: flex; justify-content: center; gap: 7px; }
.deck-step { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c8d0d4; cursor: pointer; }
.deck-step.active { width: 28px; border-radius: 10px; background: var(--blue); }
.concept-deck-nav .btn:disabled { opacity: .35; cursor: not-allowed; }

.index-page { background: var(--canvas); }
.index-main { max-width: 1220px; margin: auto; padding: 34px 24px 90px; }
.index-hero { min-height: 570px; align-items: center; }
.index-hero .hero-content { max-width: 930px; }
.index-hero h1 { max-width: 900px; font-size: clamp(30px, 3.8vw, 42px); }
.index-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.index-hero-actions .btn.secondary { color: #fff; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); }
.index-intro { margin: 22px 0; }
.path-grid { display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr 32px 1fr; align-items: stretch; gap: 8px; margin-top: 24px; }
.path-card { padding: 20px 4px; border-top: 2px solid var(--navy); }
.path-card span { color: var(--blue); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.path-card h3 { margin: 7px 0; }
.path-card p { font-size: 14px; line-height: 1.7; }
.path-arrow { display: grid; place-items: center; color: var(--blue); font-size: 28px; font-weight: 900; }
.course-section { margin-top: 58px; }
.course-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.course-section-head h2 { margin: 0; }
.course-section-head p { max-width: 620px; margin: 0; color: var(--muted); }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.course-tile { min-height: 210px; display: flex; flex-direction: column; padding: 24px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.course-tile:hover { color: var(--blue); }
.course-topline { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .09em; }
.course-tile h3 { margin: 18px 0 8px; font-size: 18px; line-height: 1.55; }
.course-tile p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.course-status { margin-top: auto; color: var(--blue); font-size: 12px; font-weight: 900; }

@media (max-width: 1120px) {
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path-grid { grid-template-columns: 1fr; }
  .path-arrow { transform: rotate(90deg); }
}

@media (max-width: 650px) {
  .topbar-inner { padding: 11px 14px; }
  .topbar .lesson-chip { display: none; }
  .index-main { padding: 15px 12px 60px; }
  .index-hero { min-height: 520px; }
  .course-grid { grid-template-columns: 1fr; }
  .course-section-head { display: block; }
}
