/* ============================================================
   DURU KOREAN — global stylesheet
   ============================================================ */

:root {
  --bg-deep: #0a2620;
  --bg: #0e332b;
  --bg-soft: #123a32;
  --cream: #f4efe2;
  --cream-dim: rgba(244, 239, 226, 0.68);
  --cream-faint: rgba(244, 239, 226, 0.4);
  --line: rgba(244, 239, 226, 0.2);
  --accent: #cf8a52;
  --accent-red: #b8492f;
  --accent-red-soft: rgba(184, 73, 47, 0.12);
  --paper: #f8f5ed;
  --paper-alt: #f1ece0;
  --ink: #16302b;
  --ink-dim: #4c635c;
  --radius: 14px;
  --shadow: 0 20px 50px -25px rgba(10, 38, 32, 0.35);
  --maxw: 1180px;

  /* Header (warm toupe beige) + banner (dark green) palette.
     The three-band flow is deliberate: toupe menu → dark green page
     banner → light ivory body, so each area reads as its own region. */
  --header-bg: #d8ccbc;
  --header-border: #b9aa97;
  --logo-duru: #123c32;
  --logo-korean: #b8492d;
  --nav-text: #243831;
  --nav-hover-bg: rgba(243, 214, 200, 0.5);
  --nav-active-bg: #f3d6c8;
  --nav-active-text: #9f3f27;
  --login-text: #28483e;
  --login-bg: transparent;
  --banner-bg: #103f35;
  --banner-title: #faf8f2;
  --banner-desc: #d7e2db;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 100px; }

body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
.card:focus-visible,
.step-card:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 3px;
  border-radius: 4px;
}

.kr { font-family: 'Noto Sans KR', sans-serif; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

section { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn[hidden] { display: none; }

.btn-primary {
  background: var(--accent-red);
  color: var(--cream);
}
.btn-primary:hover { background: #a13f29; }

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--cream);
}
.btn-outline:hover { border-color: var(--cream); }

.btn-dark {
  background: var(--bg);
  color: var(--cream);
}
.btn-dark:hover { background: var(--bg-deep); }

.btn-ghost {
  background: var(--accent-red-soft);
  color: var(--accent-red);
}
.btn-ghost:hover { background: rgba(184,73,47,0.2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 1.1;
  color: var(--logo-duru);
  flex-shrink: 0;
}
.logo .logo-en {
  font-weight: 800;
  font-size: 27px;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.logo .logo-en span { color: var(--logo-korean); }

.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-main a {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--nav-text);
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-main a:hover {
  color: var(--nav-text);
  background: var(--nav-hover-bg);
}
.nav-main a.active {
  color: var(--nav-active-text);
  background: var(--nav-active-bg);
  font-weight: 800;
}

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Auth: login button / account menu ---------- */
.btn-login {
  background: var(--login-bg);
  border: 1px solid var(--login-text);
  color: var(--login-text);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease;
}
.btn-login:hover { background: rgba(40, 72, 62, 0.1); }

.account-menu { position: relative; }
.account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--header-bg);
  border: 1px solid var(--header-border);
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  max-width: 220px;
}
.account-trigger .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-red);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.account-trigger .email {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px;
}
.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: #fbf8f2;
  border: 1px solid var(--header-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 20px 40px -10px rgba(16,59,49,0.18);
  z-index: 200;
}
.account-dropdown a,
.account-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
}
.account-dropdown a:hover,
.account-dropdown button:hover { background: var(--nav-active-bg); color: var(--nav-active-text); }

/* ---------- Language switcher ---------- */
.lang-switcher { position: relative; }
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--header-border);
  color: var(--nav-text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.lang-trigger:hover { background: var(--nav-hover-bg); border-color: var(--nav-active-bg); color: var(--nav-text); }
.lang-globe { display: flex; line-height: 0; }
.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 150px;
  background: #fbf8f2;
  border: 1px solid var(--header-border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 20px 40px -10px rgba(16,59,49,0.18);
  z-index: 200;
  list-style: none;
  margin: 0;
}
.lang-menu[hidden] { display: none; }
.lang-menu li {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--nav-text);
  cursor: pointer;
}
.lang-menu li:hover { background: var(--nav-active-bg); color: var(--nav-active-text); }
.lang-menu li.is-active { color: var(--nav-active-text); font-weight: 800; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 34px;
  height: 34px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 16px;
  height: 2px;
  background: var(--nav-text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--nav-text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span::after { transform: translateY(-7px) rotate(-45deg); }

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid var(--logo-duru);
  outline-offset: 2px;
}

/* ---------- Hero (index) ---------- */
:root { --header-h: 84px; }

.hero {
  background: var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: calc(100svh - var(--header-h));
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(22, 48, 43, 0.16);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-red);
  width: fit-content;
  margin-bottom: 22px;
}

.hero-text h1 {
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.14;
  margin: 0 0 12px;
}
.hero-text .kr-sub {
  font-size: 13.5px;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.hero-lead {
  font-size: 15.5px;
  color: var(--ink-dim);
  max-width: 460px;
  margin: 0 0 22px;
}

.hero-why {
  padding-top: 20px;
  border-top: 1px solid rgba(22, 48, 43, 0.1);
  max-width: 520px;
}
.hero-why-head { margin-bottom: 14px; }
.hero-why-head .eyebrow { display: block; margin-bottom: 6px; }
.hero-why-head h2 {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.hero-why-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hero-why-list li { display: flex; flex-direction: column; gap: 8px; }
.hero-why-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-red-soft);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.hero-why-list strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.hero-why-list p { font-size: 12px; color: var(--ink-dim); margin: 0; line-height: 1.4; }

.btn-outline-dark {
  background: transparent;
  border: 1px solid rgba(22, 48, 43, 0.25);
  color: var(--ink);
}
.btn-outline-dark:hover { border-color: var(--ink); }

.hero-graphic {
  position: relative;
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-soft) 0%, var(--bg) 55%, var(--bg-deep) 100%);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
}

.hero-graphic-top,
.hero-graphic-bottom {
  position: absolute;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.hero-graphic-top { top: 24px; color: var(--accent); }
.hero-graphic-bottom { bottom: 24px; color: var(--cream-faint); }

.hangul-ring {
  position: relative;
  width: min(620px, 96%, calc(100svh - var(--header-h) - 130px));
  max-height: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.ring-outer,
.ring-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.ring-outer { border: 1px solid var(--line); }
.ring-inner {
  inset: 8%;
  border: 1px solid var(--accent-red);
  opacity: 0.55;
}

.ring-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 37px;
  height: 37px;
  margin: -18px 0 0 -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  color: var(--cream-dim);
  font-size: 17px;
  transform: rotate(calc(360deg / var(--n) * var(--i))) translateY(calc(-1 * var(--r))) rotate(calc(-360deg / var(--n) * var(--i)));
}
.ring-inner .ring-letter { font-size: 14px; color: rgba(244,239,226,0.5); }

.hero-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 70%;
}
.hero-center .eyebrow { justify-content: center; display: block; margin-bottom: 12px; font-size: 11px; }
.hero-center .ring-title {
  font-size: clamp(38px, 2.9vw, 46px);
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
.hero-center .kr-sub {
  font-size: 15px;
  color: var(--cream-dim);
  margin-bottom: 12px;
}
.hero-center .tagline {
  font-size: 14.5px;
  color: var(--cream-dim);
  margin-bottom: 18px;
}
.hero-divider {
  width: 40px;
  height: 1px;
  background: var(--line);
  margin: 0 auto 16px;
}
.combo-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  color: var(--cream-dim);
}
.combo-row .eq { color: var(--accent-red); font-weight: 700; font-size: 16px; }

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  background: var(--banner-bg);
  color: var(--banner-title);
  padding: 40px 0 32px;
  overflow: hidden;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero-mark {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  font-size: clamp(70px, 9vw, 120px);
  line-height: 1;
  color: rgba(184, 73, 47, 0.2);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero h1 {
  font-size: clamp(32px, 3.6vw, 50px);
  font-weight: 800;
  margin: 0 0 10px;
  max-width: 800px;
  line-height: 1.08;
}
.page-hero-rule {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent-red);
  margin: -2px 0 12px;
}
.page-hero-tagline {
  font-size: 16px;
  font-weight: 600;
  color: var(--banner-title);
  margin: 0 0 8px;
  max-width: 620px;
}
.page-hero p {
  color: var(--banner-desc);
  max-width: 620px;
  font-size: 16px;
}
.page-hero .kr { color: var(--banner-desc); opacity: 0.8; font-size: 12.5px; margin-bottom: 0; }
.section-lead-in {
  color: var(--ink-dim);
  font-size: 16px;
  max-width: 680px;
  margin: 0 0 28px;
}

/* ---------- Generic sections ---------- */
.section { padding: 84px 0; }
.section-compact { padding: 56px 0; }
.section-after-hero { padding-top: 36px; }
.section-alt { background: var(--paper-alt); }
.section-dark { background: var(--bg); color: var(--cream); }

.section-head {
  max-width: 620px;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 800;
  margin: 12px 0 10px;
  color: var(--ink);
}
.section-dark .section-head h2 { color: var(--cream); }
.section-head p { color: var(--ink-dim); font-size: 15.5px; }
.section-dark .section-head p { color: var(--cream-dim); }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Feature / Card grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card {
  background: var(--paper);
  border: 1px solid rgba(22, 48, 43, 0.08);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
}
.section-alt .card { background: #fff; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-red-soft);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
  margin-bottom: 18px;
  font-size: 17px;
}
.card h3 { font-size: 17px; margin: 0 0 8px; color: var(--ink); }
.card p { font-size: 14px; color: var(--ink-dim); margin: 0; }

/* ---------- Stage cards (Four stages, one clear direction) ---------- */
.stage-card h4 { font-size: 16px; margin: 0 0 8px; color: var(--ink); }
.stage-card p { font-size: 14px; color: var(--ink-dim); margin: 0; }
.stage-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}
.stage-badge--blue { background: #e8f0fc; color: #285aa0; }
.stage-badge--apricot { background: #fbebdd; color: #975019; }
.stage-badge--lavender { background: #eee8f8; color: #69469b; }
.stage-badge--rose { background: #f8e6ec; color: #9a3f61; }

/* ---------- Teaser split ---------- */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.split.reverse { grid-template-columns: 1.1fr 0.9fr; }
.split.reverse .split-visual { order: 2; }

.split-visual {
  background: var(--bg);
  border-radius: var(--radius);
  min-height: 320px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-mock {
  width: 190px;
  height: 260px;
  background: linear-gradient(160deg, var(--bg-soft), var(--bg-deep));
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 18px;
  color: var(--cream);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.book-mock .eyebrow { font-size: 9px; }
.book-mock .book-title { font-weight: 800; font-size: 19px; line-height: 1.2; }
.book-mock .book-foot { font-size: 10px; color: var(--cream-faint); letter-spacing: 0.1em; text-transform: uppercase; }

.audio-mock {
  width: 100%;
  max-width: 330px;
  background: rgba(244,239,226,0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--cream);
}
.audio-mock .track {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.audio-mock .track:last-child { border-bottom: none; }
.play-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--cream); flex-shrink: 0;
}

.split-body .eyebrow { margin-bottom: 12px; }
.split-body h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; margin: 0 0 14px; }
.split-body p { color: var(--ink-dim); margin: 0 0 22px; font-size: 15px; }
.section-dark .split-body h2 { color: var(--cream); }
.section-dark .split-body p { color: var(--cream-dim); }

.check-list { margin-bottom: 24px; }
.check-list li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-dim);
  padding: 6px 0;
}
.section-dark .check-list li { color: var(--cream-dim); }
.check-list li::before {
  content: '✓';
  color: var(--accent-red);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Resource cards ---------- */
.resource-card {
  background: #fff;
  border: 1px solid rgba(22,48,43,0.08);
  border-radius: var(--radius);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}
.resource-tag {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-red);
  font-weight: 700;
}
.resource-card h3 { font-size: 16px; margin: 0; color: var(--ink); }
.resource-card p { font-size: 13.5px; color: var(--ink-dim); margin: 0; flex-grow: 1; }
.resource-card .btn { align-self: flex-start; }

/* ---------- Admin-managed resource files ---------- */
.resource-empty-note { color: var(--ink-dim); font-size: 14.5px; margin: 0 0 20px; }
.resource-card--file p.resource-meta { font-size: 12px; color: var(--ink-dim); opacity: 0.85; flex-grow: 0; }
.resource-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.resource-card-actions .btn { align-self: auto; }
.resource-unavailable { font-size: 13px; color: var(--ink-dim); font-style: italic; }
.resource-delete-btn {
  background: none;
  border: none;
  color: #b3261e;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 4px;
}
.resource-delete-btn:hover { text-decoration: underline; }

.resource-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 8, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.resource-confirm-overlay[hidden] { display: none; }
.resource-confirm-modal {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 18px;
  padding: 32px;
  position: relative;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5);
}
.resource-confirm-modal h3 { margin: 0 0 10px; font-size: 20px; color: var(--ink); }
.resource-confirm-body { font-size: 14.5px; color: var(--ink-dim); margin: 0 0 22px; }
.resource-confirm-actions { display: flex; gap: 12px; justify-content: flex-end; }
.btn-danger {
  background: #b3261e;
  color: #fff;
  border: 1px solid #b3261e;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
}
.btn-danger:hover { background: #921f19; }
.btn-danger:disabled, .resource-confirm-actions .btn:disabled { opacity: 0.6; cursor: not-allowed; }

.resource-upload-modal { max-width: 460px; }
.resource-upload-modal select,
.resource-upload-modal textarea,
.resource-upload-modal input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(22,48,43,0.16);
  background: #fff;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
}
.resource-upload-modal textarea { resize: vertical; }
.resource-hint { font-size: 12px; color: var(--ink-dim); margin: 6px 0 0; }
.resource-upload-msg {
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.resource-upload-msg.error { background: rgba(179,38,30,0.1); color: #b3261e; }
.resource-upload-msg.success { background: rgba(58,122,74,0.12); color: #2f6b41; }
.resource-upload-msg[hidden] { display: none; }

/* ---------- Blog cards ---------- */
.blog-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(22,48,43,0.08);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.blog-thumb {
  height: 150px;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7f4ec;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.4;
}
.blog-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.blog-meta { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-red); font-weight: 700; }
.blog-body h3 { font-size: 16.5px; margin: 0; color: var(--ink); }
.blog-body p { font-size: 13.5px; color: var(--ink-dim); margin: 0; flex-grow: 1; }
.blog-body .read-more { font-size: 13px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--ink); align-self: flex-start; }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(22,48,43,0.15);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
}
.filter-btn.active, .filter-btn:hover { background: var(--bg); color: var(--cream); border-color: var(--bg); }

/* ---------- FAQ accordion ---------- */
.faq-item {
  border-bottom: 1px solid rgba(22,48,43,0.1);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.faq-q .plus {
  font-size: 20px;
  color: var(--accent-red);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-a p { padding: 0 0 22px; color: var(--ink-dim); font-size: 14.5px; max-width: 640px; }

/* ---------- Steps (start-here) ---------- */
.steps-col { display: flex; flex-direction: column; gap: 20px; }
.step-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  background: #fff;
  border: 1px solid rgba(22,48,43,0.08);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.step-card:hover { transform: translateY(-3px); box-shadow: 0 26px 55px -25px rgba(10,38,32,0.45); }
.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--cream);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  font-family: 'Noto Sans KR', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body h3 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.step-body p { margin: 0 0 14px; color: var(--ink-dim); font-size: 14.5px; }
.step-cta { font-size: 13px; font-weight: 700; color: var(--accent-red); }

/* ---------- Curriculum (learning-korean) ---------- */
.level-tabs { display: flex; gap: 10px; margin-bottom: 36px; flex-wrap: wrap; }
.level-block { margin-bottom: 56px; }
.level-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.level-head h3 { font-size: 22px; margin: 0; color: var(--ink); }
.level-head span { font-size: 12.5px; color: var(--accent-red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

.lesson-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lesson-card {
  background: #fff;
  border: 1px solid rgba(22,48,43,0.08);
  border-radius: 12px;
  padding: 20px;
}
.lesson-card .lesson-tag { font-size: 11px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; display:block; }
.lesson-card h4 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.lesson-card p { margin: 0; font-size: 13px; color: var(--ink-dim); }

/* ---------- About: authors ---------- */
.author-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.author-card {
  background: #fff;
  border: 1px solid rgba(22,48,43,0.08);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.author-card .card-icon { width: 52px; height: 52px; font-size: 20px; margin-bottom: 22px; }
.author-card h3 { font-size: 22px; margin: 0 0 4px; color: var(--ink); }
.author-card .author-role { font-size: 13px; color: var(--accent-red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px; }
.author-card .check-list { margin-bottom: 0; }
.author-card .check-list li { color: var(--ink-dim); }

/* ---------- Testimonial strip ---------- */
.testi-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.testi { border-left: 2px solid var(--accent-red); padding-left: 18px; }
.testi p { font-size: 14.5px; color: var(--ink-dim); margin: 0 0 10px; }
.testi span { font-size: 12.5px; font-weight: 700; color: var(--ink); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--bg);
  color: var(--cream);
  border-radius: 20px;
  padding: 52px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.newsletter h3 { font-size: 24px; margin: 0 0 8px; font-weight: 800; }
.newsletter p { margin: 0; color: var(--cream-dim); font-size: 14.5px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(244,239,226,0.06);
  color: var(--cream);
  font-size: 14px;
  min-width: 240px;
}
.newsletter-form input::placeholder { color: var(--cream-faint); }

/* ---------- CTA banner ---------- */
.cta-banner {
  text-align: center;
  padding: 90px 0;
  background: var(--bg-deep);
  color: var(--cream);
}
.cta-banner h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin: 10px 0 20px; }
.cta-banner p { color: var(--cream-dim); max-width: 480px; margin: 0 auto 30px; }
.cta-banner .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  color: var(--cream-dim);
  padding: 56px 0 26px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.footer-top .logo { margin-bottom: 14px; }
.footer-top p { font-size: 13.5px; max-width: 260px; color: var(--cream-faint); }
.footer-col h5 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cream);
  margin: 0 0 16px;
}
.footer-col li { margin-bottom: 10px; font-size: 13.5px; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 12px;
  color: var(--cream-faint);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .socials { display: flex; gap: 16px; }


/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4, .lesson-grid, .testi-strip { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .split, .split.reverse, .author-grid, .hero-grid { grid-template-columns: 1fr; }
  .split-visual { order: -1; }
  .hero-grid { min-height: auto; }
  .hero-text { padding: 44px 40px 48px; order: 2; }
  .hero-graphic { min-height: 460px; padding: 48px 32px; order: 1; }
  .path-row { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .path-step { border-left: none; padding-left: 0; }
  .footer-top { grid-template-columns: repeat(3, 1fr); }
}

/* Between the full-size header and the hamburger there's a band where the
   longest label set (Vietnamese) no longer fits on one line alongside a
   non-wrapping wordmark. Tighten spacing there rather than shrinking the
   menu text, then hand over to the mobile menu below 1300px. */
@media (max-width: 1570px) {
  .logo .logo-en { font-size: 24px; }
  .nav-main { gap: 2px; }
  .nav-main a { padding: 10px 12px; }
  .site-header .wrap { gap: 16px; }
}

@media (max-width: 1310px) {
  .nav-main { display: none; }
  .nav-toggle { display: block; }
  .logo .logo-en { font-size: 23px; }
  .btn-login { font-size: 13.5px; padding: 8px 14px; }
  .account-trigger .email { max-width: 80px; }
  .lang-trigger { font-size: 12.5px; padding: 7px 10px; }
  .lang-trigger .lang-current { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header.menu-open .nav-main {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--header-bg);
    padding: 20px 28px 30px;
    gap: 10px;
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 12px 24px -12px rgba(16,59,49,0.18);
  }
  .site-header.menu-open .nav-main a { text-align: center; }
}

/* Vietnamese labels are materially longer than English or Korean, and the
   header shares the 1180px content column. Rather than shrinking the menu
   text to force a fit, hand over to the mobile menu a little earlier for
   that language only. Selector specificity keeps this above the 1310px
   rules regardless of source order. */
@media (max-width: 1370px) {
  html[lang="vi"] .nav-main { display: none; }
  html[lang="vi"] .nav-toggle { display: block; }
  html[lang="vi"] .site-header.menu-open .nav-main {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--header-bg);
    padding: 20px 28px 30px;
    gap: 10px;
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 12px 24px -12px rgba(16,59,49,0.18);
  }
  html[lang="vi"] .site-header.menu-open .nav-main a { text-align: center; }
}

@media (max-width: 720px) {
  .logo .logo-en { font-size: 20px; }
  .grid-3, .grid-4, .lesson-grid, .testi-strip, .footer-top { grid-template-columns: 1fr; }
  .newsletter { flex-direction: column; align-items: flex-start; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { flex-grow: 1; }
  .section { padding: 60px 0; }
  .hero-text { padding: 40px 24px 40px; }
  .hero-graphic { min-height: 400px; padding: 40px 24px; }
  .hero-graphic-top, .hero-graphic-bottom { left: 20px; right: 20px; font-size: 9px; }
  .page-hero-mark { display: none; }
  .hero-why-list { grid-template-columns: 1fr; gap: 12px; }
  .section-after-hero { padding-top: 24px; }
  .lang-trigger { padding: 8px; }
  .lang-trigger .lang-current { display: none; }
  .lang-menu { left: auto; right: 0; }
}

/* Very narrow phones. Must stay after the 720px block: the wordmark is
   one unbroken line now, so the header buys back width from padding and
   control sizing, and an equal-specificity rule defined later wins. */
@media (max-width: 380px) {
  .site-header .wrap { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .logo .logo-en { font-size: 16px; }
  .header-actions { gap: 6px; }
  .btn-login { font-size: 12px; padding: 6px 10px; }
  .lang-trigger { padding: 6px; }
  .nav-toggle { width: 28px; }
}

/* ============================================================
   Auth modal (Supabase Auth)
   ============================================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 8, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.auth-overlay[hidden] { display: none; }

.auth-modal {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 18px;
  padding: 36px 32px;
  position: relative;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.5);
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(22,48,43,0.06);
  border: none;
  color: var(--ink);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-close:hover { background: rgba(22,48,43,0.12); }

.auth-tabs { display: flex; gap: 6px; margin-bottom: 24px; background: rgba(22,48,43,0.06); padding: 4px; border-radius: 999px; }
.auth-tabs[hidden] { display: none; }
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-dim);
}
.auth-tab.active { background: var(--bg); color: var(--cream); }

.auth-panel[hidden] { display: none; }
.auth-panel h2 { font-size: 22px; margin: 0 0 6px; color: var(--ink); }
.auth-panel .auth-sub { font-size: 13.5px; color: var(--ink-dim); margin: 0 0 22px; }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(22,48,43,0.18);
  background: #fff;
  font-size: 14.5px;
  color: var(--ink);
  font-family: inherit;
}
.auth-field input:focus-visible { outline: 2px solid var(--accent-red); outline-offset: 1px; }

.auth-row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-red);
}

.auth-submit { width: 100%; justify-content: center; margin-bottom: 14px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-dim);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 16px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(22,48,43,0.14); }

.auth-google {
  width: 100%;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(22,48,43,0.18);
  color: var(--ink);
}
.auth-google:hover { background: #f5f5f5; }

.auth-message {
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.auth-message.info { background: rgba(207, 138, 82, 0.14); color: #7a4f22; }
.auth-message.success { background: rgba(74, 138, 92, 0.14); color: #2d5c3d; }
.auth-message.error { background: rgba(184, 73, 47, 0.12); color: var(--accent-red); }
.auth-message[hidden] { display: none; }

.auth-config-notice {
  font-size: 12.5px;
  color: var(--ink-dim);
  background: rgba(22,48,43,0.05);
  border: 1px dashed rgba(22,48,43,0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  line-height: 1.6;
}
.auth-config-notice code { background: rgba(22,48,43,0.08); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ---- Legal pages (privacy, terms) ------------------------------- */
/* Long-form prose needs a narrower measure than the 1180px content
   column; anything wider becomes tiring to read. */
.legal-wrap { max-width: 760px; }
.legal-updated {
  font-size: 14px;
  color: var(--ink-dim);
  margin: 0 0 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(22, 48, 43, 0.12);
}
.legal-wrap h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  margin: 40px 0 12px;
  color: var(--ink);
}
.legal-wrap h2:first-of-type { margin-top: 0; }
.legal-wrap p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-dim);
  margin: 0 0 14px;
}
.legal-wrap p strong { color: var(--ink); font-weight: 700; }
.legal-wrap a { color: var(--accent-red); font-weight: 600; }
