@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --background:#faf5d8;
  --surface:#ffffff;
  --surface-soft:rgba(255,255,255,0.85);
  --text:#1a1a1a;
  --muted:#535766;
  --accent:#3c7262;
  --accent-strong:#2b574c;
  --accent-soft:rgba(60,114,98,0.15);
  --highlight:#e74c3c;
  --success:#27ae60;
  --note:#8e44ad;
  --tip:#f39c12;
  --radius-xl:32px;
  --radius-lg:28px;
  --radius-md:20px;
  --radius-sm:12px;
  --shadow-xl:0 36px 70px rgba(60,114,98,0.2);
  --shadow-lg:0 32px 70px rgba(17, 24, 39, 0.12);
  --shadow-sm:0 14px 32px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:
    radial-gradient(1200px 600px at 12% -12%, rgba(60,114,98,0.16), transparent 70%),
    radial-gradient(1200px 600px at 110% 110%, rgba(60,114,98,0.12), transparent 70%),
    var(--background);
  font-family:'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  line-height:1.7;
  font-size:18px;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

header.site-header {
  position:sticky;
  top:0;
  z-index:20;
  background:linear-gradient(180deg, var(--accent-strong), var(--accent));
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(0,0,0,0.18);
}

.site-nav {
  max-width:1100px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 24px;
  gap:32px;
}

.brand {
  display:flex;
  align-items:center;
  gap:14px;
  font-weight:700;
  font-size:20px;
  letter-spacing:0.04em;
}

.brand img {
  width:44px;
  height:44px;
  border-radius:50%;
  box-shadow:0 12px 28px rgba(0,0,0,0.24);
}

.brand span {
  color:#ffffff;
}

.nav-links {
  display:flex;
  gap:22px;
  font-weight:500;
  color:rgba(255,255,255,0.85);
}

.nav-links a {
  text-decoration:none;
  transition:color .2s ease;
  position:relative;
  padding-bottom:2px;
  color:rgba(255,255,255,0.85);
}

.nav-links a:hover,
.nav-links a.active {
  color:#ffffff;
}

.nav-links a.active::after {
  content:"";
  position:absolute;
  left:0;
  bottom:-6px;
  width:100%;
  height:2px;
  background:#ffffff;
  opacity:0.8;
}

.nav-cta {
  display:inline-flex;
  align-items:center;
  gap:12px;
  padding:12px 20px;
  background:#ffffff;
  border-radius:999px;
  font-weight:600;
  color:var(--accent-strong);
  text-decoration:none;
  box-shadow:0 14px 30px rgba(0,0,0,0.22);
  transition:transform .15s ease, box-shadow .2s ease, background .25s ease, color .25s ease;
}

.nav-cta:hover {
  transform:translateY(-2px);
  box-shadow:0 24px 45px rgba(0,0,0,0.28);
}

main {
  flex:1;
  width:100%;
  max-width:920px;
  margin:0 auto;
  padding:120px 16px 96px;
}

.lesson-nav {
  margin:0 0 24px;
  display:flex;
  justify-content:flex-start;
}

.lesson-nav a {
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--accent-strong);
  font-weight:600;
  background:rgba(41,128,185,0.12);
  padding:10px 18px;
  border-radius:999px;
  transition:background 0.2s ease, transform 0.2s ease;
}

.lesson-nav a:hover {
  background:rgba(41,128,185,0.2);
  transform:translateY(-1px);
}

.content {
  background:var(--surface);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xl);
  padding:56px clamp(22px, 6vw, 64px) 80px;
}

.lesson-title {
  margin:0 0 12px;
  font-size:clamp(32px, 5vw, 44px);
  line-height:1.15;
  font-weight:700;
}

.lesson-subtitle {
  margin:0 0 32px;
  color:var(--muted);
  font-size:20px;
}

.section-title {
  color:var(--accent-strong);
  font-size:clamp(22px, 3.5vw, 28px);
  font-weight:700;
  margin:44px 0 14px;
}

p {
  margin:0 0 18px;
}

ul, ol {
  margin:0 0 24px 20px;
  padding:0 0 0 12px;
  color:var(--muted);
}

li + li {
  margin-top:10px;
}

.description {
  margin-bottom:24px;
}

.example {
  margin:28px 0;
  border-left:4px solid var(--accent);
  padding:18px 20px 18px 24px;
  background:rgba(41,128,185,0.08);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow:var(--shadow-sm);
}

.example-label {
  display:inline-block;
  font-weight:600;
  color:var(--accent-strong);
  margin-bottom:8px;
}

.japanese-text {
  font-size:24px;
  font-weight:600;
  color:var(--text);
}

.furigana {
  font-size:16px;
  color:var(--muted);
}

.translation {
  font-style:italic;
  color:var(--success);
}

.highlight {
  color:var(--highlight);
  font-weight:700;
}

rt {
  font-size:72%;
  color:#000000;
  font-weight:400;
}

.kanji {
  color:#000000;
  font-weight:700;
}

.note {
  color:var(--note);
  font-weight:600;
}

.tip {
  background:var(--tip);
  color:#ffffff;
  padding:20px 22px;
  border-radius:var(--radius-md);
  margin:30px 0;
  line-height:1.6;
  font-weight:500;
}

.callout {
  background:rgba(39,174,96,0.12);
  border-left:4px solid var(--success);
  padding:18px 20px;
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  margin:26px 0;
}

.cta-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-decoration:none;
  background:linear-gradient(135deg, var(--accent), var(--accent-strong));
  color:#ffffff;
  padding:14px 26px;
  border-radius:999px;
  font-weight:600;
  margin-top:18px;
  box-shadow:0 18px 36px rgba(31,95,141,0.25);
  transition:transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform:translateY(-2px);
  box-shadow:0 26px 52px rgba(31,95,141,0.3);
}

@media (max-width:720px) {
  body {
    padding:0;
  }
  .site-nav {
    flex-direction:column;
    align-items:flex-start;
  }
  .nav-cta {
    width:100%;
    justify-content:center;
  }
  .lesson-nav {
    margin-bottom:16px;
  }
  main {
    padding:108px 16px 64px;
  }
  .content {
    padding:42px 20px 64px;
  }
  .lesson-title {
    font-size:clamp(28px, 8vw, 38px);
  }
}
