:root {
  --bg: #F4F1EA;
  --bg-soft: #E8E5DE;
  --paper: #FFFcf7;
  --ink: #171719;
  --muted: #4B4B4F;
  --line: #d6d3cc;
  --signal: #FF4B3E;
  --signal-dark: #d4352a;
  --navy: #1c2430;
  --ok: #2a6b4f;
  --shadow: 0 18px 50px rgba(23, 20, 25, 0.08);
  --radius: 18px;
  --max: 1160px;
  --font: "Helvetica Neue", Arial, "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.eyebrow {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--signal);
  font-weight: 700;
}
.muted { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 42em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800;
  letter-spacing: 0.04em; white-space: nowrap;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--signal); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.brand small { display: block; font-weight: 500; color: var(--muted); letter-spacing: 0; font-size: 11px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 8px 11px; border-radius: 999px; font-size: 14px; color: var(--muted);
}
.nav a:hover, .nav a.is-active { background: #fff; color: var(--ink); }
.header-cta {
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 600;
}
.header-cta:hover { background: var(--signal); }
.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff;
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
}

/* Hero */
.hero {
  padding: 72px 0 48px;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(255,75,62,.16), transparent 60%),
    linear-gradient(180deg, #f7f3ea 0%, var(--bg) 100%);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 14px 0 18px;
}
.hero h1 em { font-style: normal; color: var(--signal); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--signal); color: #fff; border-radius: 999px;
  padding: 12px 20px; font-weight: 700;
}
.btn:hover { background: var(--signal-dark); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 18px; font-weight: 600;
}
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 48px;
}
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 16px;
}
.stat b { display: block; font-size: 28px; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 13px; }

/* Sections */
section { padding: 64px 0; }
.section-kicker { color: var(--signal); font-weight: 700; letter-spacing: 0.12em; font-size: 12px; }
section h2 {
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.03em; line-height: 1.2;
  margin: 8px 0 16px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card ol, .card ul { padding-left: 18px; color: var(--muted); }
.card li + li { margin-top: 6px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--signal); background: rgba(255,75,62,.1);
  border-radius: 999px; padding: 3px 9px; margin-bottom: 10px;
}
.tag.navy { color: #1c2430; background: #e8e5de; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #efece4; font-size: 13px; }
tr:last-child td { border-bottom: 0; }

/* Timeline */
.timeline { position: relative; margin-left: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.t-item { position: relative; padding: 0 0 24px 36px; }
.t-item::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 4px rgba(255,75,62,.15);
}
.t-item h4 { font-size: 16px; }
.t-item p { color: var(--muted); font-size: 14px; }

/* Paths */
.path-banner {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 13px;
}

/* Callout */
.callout {
  border-left: 4px solid var(--signal);
  background: #fff7f5; padding: 16px 18px; border-radius: 0 12px 12px 0;
  color: var(--muted); margin: 18px 0;
}
.note {
  background: #efece4; border-radius: 12px; padding: 14px 16px;
  color: var(--muted); font-size: 14px; margin-top: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); padding: 36px 0 24px; color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-footer a:hover { color: var(--ink); }
.copyright { margin-top: 28px; font-size: 13px; }

/* Page hero */
.page-hero { padding: 48px 0 20px; }
.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em; line-height: 1.15; margin: 8px 0 14px;
}
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a:hover { color: var(--signal); }

.school-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.pill { font-size: 12px; background: var(--bg-soft); border-radius: 999px; padding: 3px 9px; }

details {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
}
summary { cursor: pointer; font-weight: 700; }
details p, details ul { margin-top: 10px; color: var(--muted); }
details ul { padding-left: 18px; }

.toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px;
}
.toc a {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 13px;
}
.toc a:hover { border-color: var(--signal); color: var(--signal); }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute;
    left: 20px; right: 20px; top: 72px; background: #fff;
    border: 1px solid var(--line); border-radius: 16px; padding: 10px;
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .stat-row, .grid-3, .grid-2, .path-banner, .footer-grid { grid-template-columns: 1fr; }
  .header-cta { display: none; }
}

.nav a.star { background: #fff; color: var(--signal); font-weight: 700; }
.rank {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 6px; vertical-align: middle;
}
.rank-s { background: #171719; color: #fff; }
.rank-a { background: var(--signal); color: #fff; }
.rank-b { background: #e8e5de; color: #171719; }
.rank-warn { background: #fff3cd; color: #6b5200; }
.fit-ok { border-left: 4px solid var(--ok); }
.fit-mid { border-left: 4px solid #c9a227; }
.fit-hard { border-left: 4px solid var(--signal); }
.profile {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: start;
}
.plan-year { margin-bottom: 28px; }
.plan-year h3 { font-size: 22px; margin-bottom: 10px; }
.month-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.month { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.month b { display: block; color: var(--signal); font-size: 13px; margin-bottom: 4px; }
.uni-list a.card { display: block; color: inherit; transition: transform .15s ease; }
.uni-list a.card:hover { transform: translateY(-2px); }
.mini-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.mini-nav a { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.mini-nav a:hover { border-color: var(--signal); color: var(--signal); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; }
.kv b { color: var(--muted); font-weight: 600; }
@media (max-width: 900px) {
  .profile, .month-grid, .kv { grid-template-columns: 1fr; }
}

.prose { max-width: 46em; }
.prose p { margin: 0 0 14px; color: var(--muted); }
.prose h3 { margin: 26px 0 10px; font-size: 22px; }
.prose ul, .prose ol { padding-left: 18px; color: var(--muted); margin: 0 0 14px; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--signal); font-weight: 600; }
.prose a:hover { text-decoration: underline; }
.long { max-width: 48em; }
.long p { color: var(--muted); margin: 0 0 14px; }
.long h3 { font-size: 22px; margin: 28px 0 10px; }
.long ul, .long ol { padding-left: 18px; color: var(--muted); margin: 0 0 16px; }
.long li + li { margin-top: 6px; }
.long a { color: var(--signal); font-weight: 600; }
.q-banner {
  background: #171719; color: #fff; padding: 12px 0; font-size: 14px;
}
.q-banner a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.35); }
.q-banner a:hover { color: #ffb3ac; }
.split-article {
  display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start;
}
.side-card { position: sticky; top: 88px; }
.related { margin-top: 8px; }
.related a.card { display: block; }
.flag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  padding: 2px 8px; border-radius: 6px; margin-left: 6px; vertical-align: middle;
}
.flag-en { background: #e8f3ee; color: var(--ok); }
.flag-jp { background: #fff3cd; color: #6b5200; }
.flag-mix { background: #f3e8f8; color: #5b2d7a; }
.site-header { position: sticky; }
@media (max-width: 900px) {
  .split-article { grid-template-columns: 1fr; }
  .side-card { position: static; }
}

.task-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.progress-wrap { min-width: 220px; flex: 1; }
.progress-track { height: 8px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress-bar { height: 100%; width: 0; background: var(--signal); border-radius: 99px; transition: width .2s ease; }
.task {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 8px;
}
.task input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0;
  accent-color: var(--signal); cursor: pointer;
}
.task-title { font-weight: 700; }
.task-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.task.done { opacity: .58; }
.task.done .task-title { text-decoration: line-through; }
.task-group { margin-bottom: 36px; }
.task-group h3 { margin-bottom: 10px; }
.rhythm { font-size: 13px; }
.rhythm td.on { background: #e8f3ee; font-weight: 700; color: var(--ok); }
.rhythm td.peak { background: #fff3f1; font-weight: 700; color: var(--signal); }
.uni-block { margin-top: 28px; }
.uni-block h3 { font-size: 24px; margin-bottom: 10px; }
.uni-block p { color: var(--muted); margin: 0 0 12px; }
.uni-block ul { padding-left: 18px; color: var(--muted); margin: 0 0 14px; }
.uni-block li + li { margin-top: 6px; }

.opp { border-left: 4px solid var(--ok); }
.chal { border-left: 4px solid var(--signal); }
.trace-box {
  background: #fff; border: 1px dashed var(--line); border-radius: 14px;
  padding: 16px 18px; color: var(--muted); font-size: 14px; margin: 16px 0;
}
.trace-box b { color: var(--ink); }
.lang-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.lang-pills span {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
}
