:root {
  --ink: #172126;
  --muted: #5c6b73;
  --line: #d8e1e6;
  --paper: #fbfcfb;
  --panel: #ffffff;
  --green: #1d7f5c;
  --green-dark: #10543d;
  --blue: #2364aa;
  --amber: #b26d16;
  --rose: #b23a48;
  --shadow: 0 18px 48px rgba(23, 33, 38, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Segoe UI", Arial, sans-serif;
  background: #eef4f1;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 252, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 8px 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  border-radius: 7px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: #e4eee9;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 22px 56px;
}

.hero-tool {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 28px;
  align-items: stretch;
}

.intro {
  padding: 14px 0 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 14px;
}

h1,
h2,
h3 {
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 44px;
}

h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
}

.trust-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 24px 0;
  list-style: none;
}

.trust-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dot {
  width: 9px;
  height: 9px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--green);
  flex: 0 0 auto;
}

.hero-visual {
  max-width: 470px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  display: block;
}

.tool {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.tool-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.tool-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.stat {
  min-width: 94px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  color: var(--green-dark);
  font-size: 28px;
  line-height: 1.1;
}

.controls {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.control-group {
  display: grid;
  gap: 8px;
}

.label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segments {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.segment,
.icon-button,
.primary-button,
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.segment {
  min-height: 42px;
  font-weight: 800;
}

.segment.is-active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.secondary-button:hover,
.icon-button:hover,
.segment:hover {
  border-color: #9eb1ba;
  background: #f4f8f6;
}

.word-card {
  min-height: 260px;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}

.level-pill {
  width: max-content;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #dff0e8;
  font-size: 13px;
  font-weight: 900;
}

.jp {
  font-size: 42px;
  font-weight: 900;
  line-height: 1.1;
}

.kana {
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
}

.meaning {
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.example {
  padding-top: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.answer {
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.answer.correct {
  border-color: var(--green);
  background: #e2f3ea;
}

.answer.wrong {
  border-color: var(--rose);
  background: #fae5e8;
}

.feedback {
  min-height: 28px;
  color: var(--muted);
  font-weight: 800;
}

.section {
  padding: 46px 0 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.info-card,
.article-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.info-card p,
.article-card p {
  margin: 0;
  color: var(--muted);
}

.article-card a {
  display: inline-block;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.study-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
}

.toc {
  position: sticky;
  top: 84px;
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.toc a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.content-page {
  max-width: 860px;
}

.content-block {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.content-block p,
.content-block li {
  color: var(--muted);
}

.content-block table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
}

.content-block th,
.content-block td {
  text-align: left;
  padding: 11px;
  border-bottom: 1px solid var(--line);
}

.content-block th {
  background: #e6f0eb;
}

.contact-form {
  display: grid;
  gap: 12px;
  max-width: 620px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font: inherit;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #172126;
  color: #dfe8e2;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #dfe8e2;
  text-decoration: none;
}

@media (max-width: 920px) {
  .hero-tool,
  .study-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .hero-visual {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .segments,
  .toolbar,
  .quiz-options,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .jp {
    font-size: 34px;
  }

  .tool-head {
    flex-direction: column;
  }

  .stat {
    text-align: left;
  }
}
