:root {
  --ink: #1d2421;
  --muted: #716c63;
  --paper: #f2eadc;
  --surface: #fffaf0;
  --white: #fffdf8;
  --line: #c9c0af;
  --green: #3d5b4b;
  --green-dark: #263f34;
  --green-soft: #dce3da;
  --red: #b64b35;
  --yellow: #d6ad58;
  --blue: #3f6170;
  --frame: #171c1a;
  --frame-soft: #242b27;
  --shadow: 0 24px 70px rgba(10, 15, 12, .24);
  --serif: "Noto Serif KR", "Noto Serif JP", "Yu Mincho", "Batang", serif;
  --sans: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Yu Gothic", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--frame); }
body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--frame);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.72;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(214, 173, 88, .8);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  min-height: 78px;
  padding: 10px max(22px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.11);
  background: rgba(23, 28, 26, .94);
  color: #f8f1e5;
  backdrop-filter: blur(18px);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-brand > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  background: var(--red);
  color: #fff9ee;
  font-family: var(--serif);
  font-size: 21px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.08);
}
.site-brand strong {
  display: grid;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .015em;
  line-height: 1.05;
}
.site-brand strong small {
  margin-top: 5px;
  color: #aaa69e;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
}
.site-header nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 34px);
}
.site-header nav a {
  position: relative;
  color: #bbb9b2;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}
.site-header nav a:hover { color: #fffaf0; }
.site-header nav a::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  background: var(--red);
  content: "";
  opacity: 0;
  transform: scaleX(.4);
  transition: .18s ease;
}
.site-header nav a:hover::after { opacity: 1; transform: scaleX(1); }
.study-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid #d7cbb8;
  color: #f8f1e5;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .025em;
  text-decoration: none;
}
.study-link:hover { background: #f8f1e5; color: var(--frame); }

main {
  position: relative;
  width: min(1240px, calc(100% - 40px));
  min-height: 72vh;
  margin: 28px auto 0;
  padding: 0 clamp(22px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(90deg, rgba(92,72,43,.04), transparent 9%, transparent 91%, rgba(92,72,43,.04)),
    var(--paper);
  box-shadow: var(--shadow);
}
main::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 5px;
  border-top: 1px solid rgba(92,72,43,.22);
  border-bottom: 1px solid rgba(92,72,43,.12);
  content: "";
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(34px, 6vw, 78px);
  align-items: center;
  min-height: 670px;
  padding: 88px 0 78px;
  border-bottom: 1px solid var(--line);
}
.home-hero h1, .level-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 6.8vw, 86px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -.055em;
  text-wrap: balance;
  word-break: keep-all;
}
.home-hero h1::after {
  display: block;
  width: 62px;
  height: 5px;
  margin-top: 30px;
  background: var(--red);
  content: "";
}
.home-hero > div > p:last-of-type,
.level-hero > div > p:last-child {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
  word-break: keep-all;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.primary-cta, .secondary-cta {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease;
}
.primary-cta { background: var(--ink); color: #fffaf0; }
.primary-cta:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }
.secondary-cta { background: rgba(255,250,240,.48); }
.secondary-cta:hover { background: var(--white); transform: translateY(-2px); }

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 104px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.value-strip div {
  padding: 28px 30px;
  border-right: 1px solid var(--line);
}
.value-strip div:first-child { padding-left: 0; }
.value-strip div:last-child { border-right: 0; }
.value-strip strong, .value-strip span { display: block; }
.value-strip strong { font-family: var(--serif); font-size: 24px; }
.value-strip span { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
  margin-bottom: 34px;
}
.section-title > div { flex: 1 1 590px; min-width: 0; }
.section-title h2, .editorial-grid h2, .study-method h2, .faq-section h2,
.how-section h2, .source-note h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 55px);
  line-height: 1.2;
  letter-spacing: -.035em;
  text-wrap: balance;
  word-break: keep-all;
}
.section-title > p {
  flex: 0 1 420px;
  max-width: 490px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  word-break: keep-all;
}
.levels-section, .how-section, .faq-section, .lesson-section, .study-method { padding: 78px 0; }

.level-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--ink);
}
.level-links > a {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 185px;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.level-links > a:nth-child(2n) { border-right: 0; }
.level-links > a:hover { background: rgba(255,250,240,.82); }
.level-links > a > span {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid var(--ink);
  color: var(--red);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 900;
}
.level-links h3 { margin: 0 0 7px; font-family: var(--serif); font-size: 21px; }
.level-links p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.level-links b { color: var(--red); font-family: var(--mono); font-size: 11px; white-space: nowrap; }

.editorial-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(38px, 6vw, 72px);
  align-items: center;
  margin: 78px 0;
  padding: clamp(36px, 5vw, 62px);
  overflow: hidden;
  background: var(--frame-soft);
  color: #fffaf0;
}
.editorial-grid::after {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  border-top: 1px solid var(--yellow);
  border-right: 1px solid var(--yellow);
  content: "";
}
.editorial-grid.home { margin-block: 40px 98px; }
.editorial-grid p:not(.eyebrow) { color: #c7c8c1; }
.editorial-grid ol { display: grid; gap: 0; margin: 0; padding: 0; counter-reset: item; list-style: none; }
.editorial-grid li {
  position: relative;
  padding: 16px 12px 16px 53px;
  border-top: 1px solid rgba(255,255,255,.16);
}
.editorial-grid li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.editorial-grid li::before {
  position: absolute;
  left: 10px;
  content: counter(item, decimal-leading-zero);
  counter-increment: item;
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.how-grid, .study-method > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.how-grid article, .study-method article {
  padding: 29px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,250,240,.54);
}
.how-grid article:first-child, .study-method article:first-child { border-left: 1px solid var(--line); }
.how-grid span, .study-method b {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}
.how-grid h3, .study-method h3 { margin: 16px 0 8px; font-family: var(--serif); font-size: 20px; }
.how-grid p, .study-method article p { margin: 0; color: var(--muted); font-size: 14px; }

.faq-section { width: min(840px, 100%); margin: auto; }
.faq-section h2 { margin-bottom: 30px; }
.faq-section details { border-top: 1px solid var(--line); }
.faq-section details:last-child { border-bottom: 1px solid var(--line); }
.faq-section summary { padding: 21px 2px; font-size: 17px; font-weight: 850; cursor: pointer; }
.faq-section details p { margin: 0 0 24px; color: var(--muted); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 42px;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px clamp(22px, 5vw, 72px) 62px;
  color: #eee7db;
}
.site-footer strong { font-family: var(--serif); font-size: 20px; }
.site-footer strong small { color: #9d9e98; font-family: var(--sans); font-size: 10px; }
.site-footer p { max-width: 580px; margin: 8px 0 0; color: #949891; font-size: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: flex-end; gap: 16px; }
.site-footer a { color: #aaaDA7; font-size: 11px; font-weight: 750; }

.level-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 42px;
  align-items: end;
  padding: 96px 0 54px;
}
.level-hero h1 { max-width: 870px; font-size: clamp(45px, 6.5vw, 76px); }
.level-hero aside {
  display: flex;
  min-width: 195px;
  flex-direction: column;
  padding: 22px;
  border-top: 3px solid var(--red);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: rgba(255,250,240,.68);
}
.level-hero aside span, .level-hero aside small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.level-hero aside strong { font-family: var(--serif); font-size: 44px; line-height: 1.2; }
.breadcrumbs { display: flex; gap: 9px; align-items: center; padding: 15px 0 43px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; }
.breadcrumbs a { font-weight: 800; }
.breadcrumbs strong { color: var(--ink); }

.lesson-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lesson-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(255,250,240,.74);
  box-shadow: 0 10px 25px rgba(51,42,29,.035);
}
.lesson-card h3 { margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.45; }
.lesson-card ruby rt { color: var(--green); font-family: var(--sans); font-size: .34em; font-weight: 700; }
.lesson-card .meaning { margin: 5px 0 18px; color: var(--green-dark); font-weight: 850; }
.example { padding: 16px; border-left: 3px solid var(--red); background: #e7e2d5; }
.example > span { color: var(--red); font-family: var(--mono); font-size: 9px; font-weight: 900; }
.example > p { margin: 6px 0 2px; font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.7; }
.example > small { display: block; color: var(--muted); font-size: 11px; }
.example > strong { display: block; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(29,36,33,.13); font-size: 13px; }
.study-method { text-align: center; }
.study-method > div { margin: 31px 0; }
.study-method article { text-align: left; }
.source-note { margin: 50px 0 100px; padding: 30px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 5px solid var(--blue); background: #dde4e2; }
.source-note h2 { font-size: 26px; }
.source-note p { color: #465954; }
.source-note a { color: var(--blue); font-weight: 900; }
.not-found { display: grid; min-height: 72dvh; place-content: center; justify-items: center; text-align: center; }
.not-found > span { color: var(--red); font-family: var(--mono); font-size: 13px; font-weight: 950; }
.not-found h1 { margin: 12px 0; font-family: var(--serif); font-size: clamp(35px, 7vw, 66px); letter-spacing: -.05em; }
.not-found p { max-width: 600px; margin: 0 0 25px; color: var(--muted); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: auto 1fr; }
  .site-header nav { display: none; }
  .study-link { justify-self: end; }
  .home-hero { grid-template-columns: 1fr; gap: 36px; min-height: auto; padding-top: 72px; }
  .level-hero { grid-template-columns: 1fr; }
  .level-hero aside { display: grid; grid-template-columns: 1fr auto; min-width: 0; }
  .level-hero aside small { grid-column: 1 / -1; }
  .editorial-grid { grid-template-columns: 1fr; gap: 32px; }
  .section-title { align-items: start; flex-direction: column; gap: 15px; }
  .section-title > div, .section-title > p { flex-basis: auto; width: 100%; max-width: 650px; }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .site-header { min-height: 66px; padding-inline: 14px; }
  .site-brand > span { width: 36px; height: 36px; }
  .site-brand strong { font-size: 16px; }
  .site-brand strong small { display: none; }
  .study-link { min-height: 40px; padding-inline: 11px; font-size: 10px; }
  main { width: 100%; margin-top: 0; padding-inline: 16px; border: 0; }
  main::before { right: 14px; left: 14px; }
  .home-hero { padding-top: 58px; padding-bottom: 54px; }
  .home-hero h1, .level-hero h1 { font-size: 41px; line-height: 1.16; }
  .home-hero > div > p:last-of-type, .level-hero > div > p:last-child { font-size: 15px; }
  .value-strip { grid-template-columns: 1fr; margin-bottom: 58px; }
  .value-strip div, .value-strip div:first-child { padding: 17px 5px; border-right: 0; border-bottom: 1px solid var(--line); }
  .levels-section, .how-section, .faq-section, .lesson-section, .study-method { padding: 54px 0; }
  .section-title h2, .editorial-grid h2, .study-method h2, .faq-section h2, .how-section h2 { font-size: 34px; }
  .level-links { grid-template-columns: 1fr; }
  .level-links > a, .level-links > a:nth-child(2n) { grid-template-columns: 52px 1fr; min-height: 158px; padding-inline: 6px; border-right: 0; }
  .level-links > a > span { width: 46px; height: 46px; }
  .level-links > a > b { grid-column: 2; }
  .editorial-grid { margin: 44px -16px; padding: 30px 21px; }
  .how-grid, .study-method > div, .lesson-grid { grid-template-columns: 1fr; }
  .how-grid article, .study-method article { border-right: 1px solid var(--line); border-bottom: 0; border-left: 1px solid var(--line); }
  .how-grid article:last-child, .study-method article:last-child { border-bottom: 1px solid var(--line); }
  .site-footer { width: 100%; align-items: flex-start; flex-direction: column; padding: 38px 18px 52px; }
  .site-footer nav { justify-content: flex-start; }
  .lesson-card { padding: 18px; }
  .lesson-card h3 { font-size: 27px; }
  .level-hero { padding-top: 66px; }
  .section-title { margin-bottom: 24px; }
  .study-method { text-align: left; }
}

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

/* YomiHaru JLPT: contemporary Japanese index */
:root { --ink:#181817; --muted:#686864; --paper:#f3f4f1; --surface:#fff; --white:#fff; --line:#d8dad5; --green:#15745d; --green-dark:#0f5848; --green-soft:#e1f0eb; --red:#d64b35; --yellow:#edc75e; --blue:#356c85; --frame:#181817; --frame-soft:#252523; --shadow:0 12px 34px rgba(24,24,23,.08); }
body { letter-spacing:0; background:var(--frame); }
.site-header { min-height:70px; background:rgba(24,24,23,.96); }
.site-brand > span { width:38px; height:38px; border:0; background:var(--red); transform:rotate(-2deg); box-shadow:none; }
.site-brand strong { font-family:var(--sans); font-size:17px; letter-spacing:0; }
.site-brand strong small { font-family:var(--mono); letter-spacing:.1em; }
.site-header nav a { letter-spacing:.04em; }
.study-link,.primary-cta,.secondary-cta { border-radius:3px; }
main { background-color:var(--paper); background-image:linear-gradient(rgba(24,24,23,.032) 1px,transparent 1px); background-size:100% 32px; }
.home-hero,.level-hero,.practical-hero,.lesson-hero,.news-hero { border-radius:0; }
.home-hero h1,.level-hero h1,.practical-hero h1,.lesson-hero h1,.news-hero h1 { letter-spacing:0; }
.lesson-card,.track-card,.route-card,.course-grid>a,.how-grid article,.phrase-grid article,.expression-grid article { border-radius:6px; }
.route-card::after { display:none; }
.level-links a,.lesson-card,.track-card,.route-card { transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
.level-links a:hover,.lesson-card:hover,.track-card:hover,.route-card:hover { transform:translateY(-2px); box-shadow:0 15px 34px rgba(24,24,23,.09); }
.eyebrow { color:var(--red); font-family:var(--mono); letter-spacing:.06em; }
.value-strip { border-radius:0; }
.site-footer { background:#181817; }
@media(max-width:720px){.site-header{min-height:64px}.site-brand strong{font-size:15px}.site-brand strong small{font-size:8px}.home-hero,.level-hero,.practical-hero,.lesson-hero,.news-hero{border-radius:0}.site-header nav{display:none}}
@media(prefers-reduced-motion:reduce){.level-links a,.lesson-card,.track-card,.route-card{transition:none!important;transform:none!important}}