/*
 * J English: an editorial classroom.
 * White paper, deep ink type, one loud yellow; coral is the teacher's pencil mark,
 * sky is used only where the books live. Hairline rules and a 4/8 column grid do
 * the structuring that boxes used to do.
 */

[hidden] { display: none !important; }

:root {
  --ink: #1b1f3b;
  --ink-2: #4a4f6b;
  --ink-3: #737891;
  --yellow: #ffd23f;
  --yellow-deep: #ffc61a;
  --yellow-soft: #fff6d1;
  --coral: #ff8a73;
  --coral-ink: #c0381f;
  --sky: #cfe9ff;
  --sky-strong: #8fc6f2;
  --sky-soft: #eef6ff;
  --coral-soft: #ffe8e2;
  --white: #ffffff;
  --line-soft: #eceef4;
  --shadow-card: 0 1px 2px rgba(27, 31, 59, 0.05), 0 14px 34px -22px rgba(27, 31, 59, 0.35);
  --shadow-lift: 0 2px 4px rgba(27, 31, 59, 0.05), 0 26px 48px -24px rgba(27, 31, 59, 0.45);
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: clamp(24px, 3.5vw, 36px);
  --display: "Bricolage Grotesque", "Gothic A1", "IBM Plex Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif;
  --font: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --wrap: 76rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --header-h: 4.5rem;

  /* names used by the signup form rules below */
  --text: var(--ink);
  --muted: var(--ink-2);
  --faint: #5c6180;
  --line: #e4e6ee;
  --line-strong: #b9bed0;
  --green: var(--ink);
  --green-tint: var(--yellow-soft);
  --panel: var(--sky-soft);
  --error: #b3261e;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
strong, b { font-weight: 600; }
::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 700 0.95rem/1.2 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-deep); }
.btn-ink, .btn-primary { background: var(--ink); color: var(--white); }
.btn-ink:hover, .btn-primary:hover { background: #2b3060; }
.btn-ghost { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-line { border-color: var(--ink); background: var(--white); color: var(--ink); }
.btn-lg { min-height: 3.5rem; padding-inline: 1.75rem; font-size: 1.02rem; }
.btn-arrow::after { content: "→"; transition: transform 0.2s var(--ease); }
.btn-arrow:hover::after { transform: translateX(3px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform 0.2s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.7rem;
  background: var(--yellow);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
}

.brand-text { display: grid; line-height: 1.1; }
.brand-en { font-family: var(--display); font-weight: 800; font-size: 1.22rem; letter-spacing: -0.03em; color: var(--ink); }
.brand-ko { font-size: 0.72rem; font-weight: 500; color: var(--ink-3); }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; gap: 1.75rem; }
.nav-list a { font-weight: 600; font-size: 0.94rem; text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav-list a:hover, .nav-list a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.nav-cta { min-height: 2.6rem; padding: 0.45rem 1.15rem; font-size: 0.9rem; }

.menu-toggle {
  position: relative;
  z-index: 2;
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle-lines { display: grid; place-content: center; gap: 5px; }
.menu-toggle-lines span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s, opacity 0.2s; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 52rem) {
  .js .menu-toggle { display: block; }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 1.75rem;
    padding: calc(var(--header-h) + 1.25rem) var(--gutter) 2rem;
    background: var(--white);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0s linear 0.2s;
  }

  .js .site-nav.is-open { visibility: visible; opacity: 1; transition: opacity 0.2s, visibility 0s; }
  .js .nav-list { flex-direction: column; gap: 0; border-top: 1.5px solid var(--ink); }
  .js .nav-list a { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.035em; color: var(--ink); text-decoration: none; }
  .js .nav-cta { min-height: 3.25rem; font-size: 1.05rem; }

  .no-js .header-inner { flex-wrap: wrap; padding-block: 0.75rem; }
  .no-js .site-nav { flex-wrap: wrap; gap: 0.5rem 1rem; }
}

/* ---------- hero ---------- */

.hero { padding-top: clamp(1.5rem, 5vw, 4rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.hero-copy { padding-bottom: clamp(2rem, 5vw, 4.5rem); }

.hero-place {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.95rem 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink-2);
}
.hero-place::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--coral); }

.hero-title {
  margin-top: 1.6rem;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.05em;
}
.hero-title-sub {
  display: block;
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--ink-2);
}
.hero-title-name {
  display: block;
  margin-top: 0.1em;
  font-size: clamp(4.5rem, 2rem + 10vw, 9.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-role {
  margin-top: 1.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem);
  letter-spacing: -0.035em;
}
.hero-role span {
  padding: 0 0.12em;
  background: linear-gradient(transparent 56%, var(--yellow) 56%, var(--yellow) 90%, transparent 90%);
}

.hero-detail { margin-top: 0.6rem; max-width: 34rem; font-size: 1.02rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

.hero-visual { justify-self: end; width: 100%; max-width: 30rem; padding-top: 15%; }

/* The arch is the backdrop; the cut-out portrait stands in front and breaks out over its top. */
.hero-arch {
  position: relative;
  aspect-ratio: 1 / 1.12;
  border-radius: 999px 999px 0 0;
  background: var(--yellow);
}
.hero-arch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(rgba(27, 31, 59, 0.13) 1.2px, transparent 1.5px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.hero-arch img {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: 113%;
  max-width: none;
  margin-inline: auto;
  filter: drop-shadow(0 18px 24px rgba(27, 31, 59, 0.18));
}
.hero-arch::after {
  content: "";
  position: absolute;
  top: 6%;
  right: -4%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.fact {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.2rem;
  padding: clamp(1.25rem, 3vw, 1.9rem) clamp(1rem, 2.5vw, 2rem);
}
.fact:first-child { padding-left: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact dd { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.5vw, 2.15rem); line-height: 1.15; letter-spacing: -0.04em; }
.fact dt { font-size: 0.88rem; font-weight: 500; color: var(--ink-2); }

/* ---------- sections ---------- */

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.section-head { position: sticky; top: calc(var(--header-h) + 2rem); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow-no {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.35rem + 2.7vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

/* director */

.director-quote {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.55rem, 1.05rem + 2vw, 2.65rem);
  line-height: 1.3;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.director-quote::before {
  content: "\201C";
  display: block;
  height: 0.62em;
  font-size: 2.6em;
  line-height: 1;
  color: var(--coral);
}

.director-words { display: grid; gap: 1rem; max-width: 40rem; margin-top: 2rem; }
.director-words p { font-size: 1.06rem; line-height: 1.85; color: var(--ink-2); }
.director-words .link-arrow { margin-top: 0.6rem; }

.director-history { margin-top: clamp(3rem, 6vw, 4.5rem); }

/* smiling portrait under the sticky section title: a soft coral disc behind the light-blue shirt */
.director-portrait {
  position: relative;
  width: min(100%, 17rem);
  aspect-ratio: 1 / 1.14;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  overflow: hidden;
  border-radius: 0 0 999px 999px;
}
.director-portrait::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral-soft);
}
.director-portrait img { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; margin-inline: auto; }

/* book club shorts */
.bookclub { margin-top: clamp(3.5rem, 7vw, 5.5rem); padding-top: clamp(2rem, 4vw, 2.75rem); border-top: 1.5px solid var(--ink); }
.bookclub-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.yt-dot {
  position: relative;
  width: 1.5rem;
  height: 1.05rem;
  border-radius: 0.3rem;
  background: var(--coral);
}
.yt-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-style: solid;
  border-width: 0.26rem 0 0.26rem 0.42rem;
  border-color: transparent transparent transparent var(--white);
  transform: translate(-35%, -50%);
}
.bookclub-title {
  margin-top: 0.7rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -0.035em;
}
.bookclub-lead { max-width: 36rem; margin-top: 0.6rem; font-size: 1.02rem; line-height: 1.8; color: var(--ink-2); }
.shorts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.15rem);
  margin: 1.75rem 0 1.5rem;
  padding: 0;
  list-style: none;
}
.short { display: grid; gap: 0.2rem; color: inherit; text-decoration: none; }
.short-thumb {
  position: relative;
  display: block;
  margin-bottom: 0.55rem;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--ink);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.short-thumb img { width: 100%; height: 100%; object-fit: cover; }
.short-thumb::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%231b1f3b'/%3E%3C/svg%3E") center / 60% no-repeat;
  transition: transform 0.35s var(--ease);
}
.short:hover .short-thumb, .short:focus-visible .short-thumb { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.short:hover .short-thumb::after { transform: scale(1.08); }
.short-book { font-weight: 700; font-size: 0.95rem; line-height: 1.35; }
.short-author { font-size: 0.82rem; color: var(--ink-3); }
.history-title { margin-bottom: 0.9rem; font-size: 0.9rem; font-weight: 700; color: var(--ink-3); }
.history { border-top: 1.5px solid var(--ink); }
.history-row {
  display: grid;
  grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.history-row dt { font-weight: 700; font-size: 0.92rem; color: var(--coral-ink); }
.history-row li { font-weight: 600; font-size: 1.02rem; line-height: 1.55; }
.history-row li + li { margin-top: 0.5rem; }

/* lesson flow */

.lesson-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
}
.lesson-lede { margin-top: 0.5rem; max-width: 38rem; color: var(--ink-2); }

.flow-bar { display: flex; gap: 3px; height: 0.8rem; margin-top: 2rem; border-radius: 999px; overflow: hidden; }
.flow-seg { flex-basis: 0; min-width: 0; font-size: 0; }
.flow-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.lesson-flow { margin: 1.75rem 0 0; padding: 0; list-style: none; counter-reset: step; border-top: 1.5px solid var(--ink); }
.flow-step {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  column-gap: 1.25rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.flow-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-3);
}
.flow-name { grid-column: 2; grid-row: 1; font-size: 1.07rem; font-weight: 700; line-height: 1.45; letter-spacing: -0.015em; }
.flow-text { grid-column: 2; grid-row: 2; margin-top: 0.2rem; font-size: 0.95rem; color: var(--ink-2); }
.flow-min {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.flow-min::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--dot); box-shadow: var(--dot-ring, none); }

.flow-yellow { --dot: var(--yellow); }
.flow-sky { --dot: var(--sky-strong); }
.flow-coral { --dot: var(--coral); }
.flow-rest { --dot: var(--white); --dot-ring: inset 0 0 0 1.5px var(--line-strong); }
.flow-seg.flow-yellow, .flow-seg.flow-sky, .flow-seg.flow-coral { background: var(--dot); }
.flow-seg.flow-rest { background: repeating-linear-gradient(-45deg, var(--line-strong) 0 1.5px, transparent 1.5px 5px); }
.flow-step.flow-rest .flow-name, .flow-step.flow-rest .flow-text { color: var(--ink-3); }

/* books */

.books-block { margin-top: clamp(4rem, 8vw, 6rem); }
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); margin-top: 1.5rem; }

.book-open {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.book-open:hover { border-color: var(--ink); box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.book-open:focus-visible { outline-offset: 4px; }

.book-stage { display: grid; place-items: center; aspect-ratio: 5 / 4; }
.book-yellow .book-stage { background: var(--yellow); }
.book-sky .book-stage { background: var(--sky); }
.book-stage img {
  width: 44%;
  border-radius: 4px;
  box-shadow: 0 26px 40px -18px rgba(27, 31, 59, 0.6);
  transition: transform 0.4s var(--ease);
}
.book-open:hover .book-stage img { transform: translateY(-6px) rotate(-1.5deg); }

.book-info { display: grid; gap: 0.15rem; padding: 1.3rem 1.4rem 1.45rem; }
.book-kind { font-weight: 700; font-size: 0.84rem; color: var(--coral-ink); }
.book-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.55rem); line-height: 1.2; letter-spacing: -0.035em; }
.book-levels { font-size: 0.9rem; color: var(--ink-2); }
.book-more { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.9rem; font-weight: 700; font-size: 0.9rem; }
.book-more::after { content: "→"; transition: transform 0.2s var(--ease); }
.book-open:hover .book-more::after { transform: translateX(4px); }

/* book + letter dialogs */

html:has(.book-dialog[open]) { overflow: hidden; }

.book-dialog {
  width: min(46rem, calc(100% - 2rem));
  max-height: min(90vh, 56rem);
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--white);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
.book-dialog::backdrop { background: rgba(20, 23, 46, 0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

.dialog-inner { position: relative; }

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 400 1.6rem/1 var(--font);
  cursor: pointer;
}

.dialog-head {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.5rem);
  padding-right: 4.5rem;
}
.book-yellow .dialog-head { background: var(--yellow); }
.book-sky .dialog-head { background: var(--sky); }
.dialog-head img { width: 100%; border-radius: 4px; box-shadow: 0 18px 30px -14px rgba(27, 31, 59, 0.55); }

.dialog-label { font-weight: 700; font-size: 0.9rem; color: var(--coral-ink); }
.dialog-title { margin-top: 0.15rem; font-family: var(--display); font-weight: 800; font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); line-height: 1.15; letter-spacing: -0.04em; }
.dialog-levels { margin-top: 0.35rem; font-weight: 600; color: var(--ink-2); }

.dialog-body { padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem) clamp(1.75rem, 4vw, 2.5rem); }
.dialog-promise { font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 1rem + 0.9vw, 1.5rem); line-height: 1.45; letter-spacing: -0.035em; }
.dialog-sub { margin-top: 2rem; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 700; color: var(--ink-3); }

.curriculum { margin: 0; padding: 0; list-style: none; border-top: 1.5px solid var(--ink); }
.curriculum li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); column-gap: 1rem; padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--line); }
.curriculum li > * { grid-column: 2; }
.curriculum .cur-when { grid-column: 1; grid-row: 1 / span 3; font-family: var(--display); font-weight: 800; font-size: 0.98rem; letter-spacing: -0.02em; color: var(--coral-ink); }
.cur-goal { font-weight: 700; font-size: 1.02rem; line-height: 1.5; }
.cur-topics { margin-top: 0.15rem; font-size: 0.92rem; color: var(--ink-2); }
.cur-example { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.cur-example span { padding: 0.2rem 0.75rem; border-radius: 999px; background: var(--sky-soft); font-weight: 600; font-size: 0.9rem; }
.book-yellow .cur-example span { background: var(--yellow-soft); }
.cur-example span + span { background: var(--ink) !important; color: var(--white); }

.letter-dialog .letter-head { background: var(--yellow); }
.letter-head img { width: 6rem; border-radius: 50%; background: var(--white); box-shadow: none; border: 3px solid var(--white); }
.letter-body p:not(.dialog-promise) { margin-top: 1.1rem; line-height: 1.9; color: var(--ink-2); }
.letter-body .dialog-promise { margin-bottom: 0.75rem; }

@media (prefers-reduced-motion: no-preference) {
  .book-dialog[open] { animation: rise 0.35s var(--ease) both; }
  .book-dialog[open]::backdrop { animation: fade 0.3s ease both; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 36rem) {
  .book-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  .dialog-head { grid-template-columns: 5rem minmax(0, 1fr); padding-right: 4rem; }
  .curriculum li { grid-template-columns: minmax(0, 1fr); }
  .curriculum li > *, .curriculum .cur-when { grid-column: 1; grid-row: auto; }
}

/* ---------- trial ---------- */

.trial { background: var(--ink); color: var(--white); }
.trial :focus-visible { outline-color: var(--yellow); }
.trial .signup-card :focus-visible { outline-color: var(--ink); }
.trial .eyebrow { color: rgba(255, 255, 255, 0.62); }
.trial .eyebrow-no { background: var(--yellow); color: var(--ink); }

.trial-date {
  margin-top: 1.25rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--yellow);
}

.sessions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.session { padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2.5vw, 2rem) clamp(1.5rem, 3vw, 2.25rem) 0; }
.session + .session { padding-left: clamp(1rem, 2.5vw, 2rem); border-left: 1px solid rgba(255, 255, 255, 0.2); }
.session-yellow { --dot: var(--yellow); }
.session-coral { --dot: var(--coral); }
.session-time {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.session-time::before { content: ""; flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--dot); }
.session-name { margin-top: 1.1rem; font-size: 1.15rem; font-weight: 700; }
.session p { margin-top: 0.15rem; color: rgba(255, 255, 255, 0.7); }

.signup-card {
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  padding: clamp(1.4rem, 3.5vw, 2.25rem);
  border-radius: var(--r-lg);
  background: var(--white);
  color: var(--ink);
}

.prelaunch-title { font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.035em; }
.prelaunch p:not(.prelaunch-title) { margin-top: 0.2rem; color: var(--ink-2); }

[data-signup]:is([data-state="ready"], [data-state="error"], [data-state="submitting"], [data-state="done"], [data-state="closed"]) .prelaunch { display: none; }
[data-signup][data-state="done"] .form-preview { display: none; }
[data-signup]:is([data-state="ready"], [data-state="error"], [data-state="submitting"]) .form-preview > summary,
[data-signup]:is([data-state="ready"], [data-state="error"], [data-state="submitting"]) .preview-note { display: none; }

.form-preview { margin-top: 1.25rem; border-top: 1px solid var(--line); }

.form-preview > summary {
  padding-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
}

.preview-note { margin: 0.5rem 0 1.25rem; font-size: 0.88rem; color: var(--faint); }

.form-fields {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form-fields:disabled { opacity: 0.6; }
.form-fields:disabled * { cursor: not-allowed; }

.field { margin: 0; padding: 0; border: 0; min-width: 0; }

.field-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  padding: 0;
  font-weight: 600;
  font-size: 0.98rem;
}

.req { font-size: 0.75rem; font-weight: 500; color: var(--faint); }
.field-hint { margin: -0.2rem 0 0.6rem; font-size: 0.85rem; color: var(--faint); }
.text-input + .field-hint { margin: 0.45rem 0 0; }

.options { display: grid; gap: 0.5rem; }
.options-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options-chips { display: flex; flex-wrap: wrap; }

.slot-option, .chip-option { position: relative; display: block; cursor: pointer; }

.slot-option input, .chip-option input, .check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.opt-box {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.opt-box b { font-weight: 600; }
.opt-box span { font-size: 0.88rem; color: var(--muted); }

.chip-option span {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.slot-option input:checked + .opt-box,
.chip-option input:checked + span { border-color: var(--green); background: var(--green-tint); box-shadow: inset 0 0 0 1px var(--green); }

.slot-option input:focus-visible + .opt-box,
.chip-option input:focus-visible + span,
.check input:focus-visible + .check-box { outline: 2px solid var(--green); outline-offset: 2px; }

.slot-option.is-closed .opt-box { opacity: 0.5; }
.slot-option.is-closed .opt-box span::after { content: " · 마감"; font-weight: 600; color: var(--error); }

[aria-invalid="true"] + .opt-box,
[aria-invalid="true"] + span,
.text-input[aria-invalid="true"] { border-color: var(--error) !important; }

.text-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  font: 500 1rem/1.3 var(--font);
  color: var(--text);
}

.text-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.field-error { margin-top: 0.45rem; font-size: 0.88rem; font-weight: 600; color: var(--error); }

.consent-details {
  margin-bottom: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.88rem;
}

.consent-title { margin-bottom: 0.4rem; font-weight: 600; }
.consent-details dl { display: grid; gap: 0.3rem; }
.consent-details dl > div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 0.75rem; }
.consent-details dt { color: var(--muted); }
.consent-details dd { white-space: pre-line; }
.consent-details[data-pending] dd { color: var(--faint); }
.consent-foot { margin-top: 0.5rem; color: var(--faint); }
.consent-foot a { display: inline-block; margin-top: 0.25rem; font-weight: 600; color: var(--green); }

/* consent: one-line summary with a 보기 button; the details open in a dialog like the books */
.consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.9rem 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.92rem;
}
.consent-row .consent-title { margin: 0; }
.consent-view {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.3rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s;
}
.consent-view:hover { background: var(--yellow-soft); }

.privacy-dialog { width: min(38rem, calc(100% - 2rem)); }
.privacy-dialog :focus-visible { outline-color: var(--ink); }
.privacy-head { display: block; background: var(--sky-soft); }
.privacy-dialog .consent-details { margin: 0; border: 0; border-radius: 0; font-size: 0.97rem; padding: clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.25rem); }
.privacy-dialog .consent-details dl { gap: 0; border-top: 1.5px solid var(--ink); }
.privacy-dialog .consent-details dl > div { grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.privacy-dialog .consent-details dt { font-weight: 700; color: var(--ink-3); }
.privacy-dialog .consent-details dd { line-height: 1.7; }
.privacy-dialog .consent-foot { margin-top: 1rem; font-size: 0.9rem; color: var(--ink-3); }
.privacy-dialog .consent-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* child birth year + month */
.birth-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; max-width: 26rem; }
.select-field { display: block; }
select.text-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.4rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%231b1f3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 0.8rem center / 1.1rem no-repeat;
  cursor: pointer;
}
select.text-input:disabled { cursor: default; }

.check { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }

.check-box {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  border: 1px solid var(--muted);
  border-radius: 3px;
}

.check input:checked + .check-box {
  border-color: var(--green);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat,
    var(--green);
}

.check input[aria-invalid="true"] + .check-box { border-color: var(--error); }

.btn-submit { width: 100%; min-height: 3.2rem; margin-top: 1.5rem; font-size: 1rem; }
.btn-submit[aria-busy="true"] { cursor: progress; }

.form-status { min-height: 1.5rem; margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); text-align: center; }
[data-signup][data-state="error"] .form-status { color: var(--error); }

.success { padding-top: 0.5rem; text-align: center; }
.success h3 { margin-bottom: 0.75rem; font-weight: 700; font-size: 1.3rem; color: var(--green); }
.success p { margin-top: 0.3rem; }
.receipt { letter-spacing: 0.05em; font-variant-numeric: tabular-nums; }
.success-small { font-size: 0.88rem; color: var(--faint); }
.success .btn { margin-top: 1.25rem; }

/* ---------- admin (/admin) ---------- */

.admin { min-height: 100vh; padding-block: 3rem 5rem; background: var(--sky-soft); }
.admin-inner { max-width: 52rem; }
.admin-back { font-weight: 700; color: var(--coral-ink); text-decoration: none; }
.admin .section-title { margin-top: 1rem; }
.admin-status { margin-top: 0.75rem; color: var(--ink-2); }
.admin-login { margin-top: 1.5rem; max-width: 34rem; }
.admin-login-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.admin-login-row .text-input { flex: 1 1 14rem; width: auto; min-height: 3rem; }
.admin-login .field-hint { margin-top: 0.5rem; }
.admin-code-row { margin-top: 0.6rem; }
.admin-code-row .text-input { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.admin-slot { margin-top: 1.5rem; padding: 1.5rem; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow-card); }
.admin-slot h2 { font-size: 1.15rem; font-weight: 700; }
.admin-empty { margin-top: 0.5rem; color: var(--ink-2); }
.admin-rows { margin-top: 0.75rem; }
.admin-rows li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.25rem 1rem; align-items: center; padding: 0.85rem 0; border-top: 1px solid var(--line-soft); }
.admin-phone { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.admin-meta { grid-column: 1 / 3; font-size: 0.85rem; color: var(--ink-2); }
.admin-delete { grid-row: 1 / span 2; grid-column: 3; min-height: 2.5rem; padding: 0 1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white); color: var(--error); font: 600 0.88rem/1 var(--font); cursor: pointer; }
.admin-delete:hover { border-color: var(--error); }

/* ---------- footer ---------- */

.site-footer { padding-block: 2.5rem 3rem; border-top: 1px solid rgba(255, 255, 255, 0.12); background: var(--ink); color: var(--white); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem 2rem; font-size: 0.86rem; }
.footer-brand { font-weight: 600; font-size: 0.95rem; }
.footer-brand span[lang="en"] { margin-right: 0.4rem; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em; color: var(--yellow); }
.site-footer p:not(.footer-brand) { color: rgba(255, 255, 255, 0.66); }
.site-footer :focus-visible { outline-color: var(--yellow); }
.site-footer .footer-link { color: var(--white); font-weight: 600; text-decoration-color: rgba(255, 255, 255, 0.4); text-underline-offset: 4px; }
.site-footer .footer-link:hover { text-decoration-color: var(--yellow); }

/* ---------- motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.07s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.14s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.2s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.26s; }
  .hero-arch { animation: rise 0.9s 0.1s var(--ease) both; }
  .hero-arch img { animation: rise 1s 0.25s var(--ease) both; }

  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 60rem) {
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .section-head { position: static; }
}

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { padding-bottom: 2.5rem; }
  .hero-visual { justify-self: center; max-width: 26rem; }
}

@media (max-width: 36rem) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { flex-direction: row-reverse; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem 0; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .fact dd { font-size: 1.35rem; }
  .history-row { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .shorts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .director-portrait { width: min(72%, 15rem); }
  .flow-step { grid-template-columns: 2rem minmax(0, 1fr) auto; column-gap: 0.85rem; }
  .books { grid-template-columns: minmax(0, 1fr); }
  .book-stage { aspect-ratio: 16 / 11; }
  .book-stage img { width: 38%; }
  .sessions { grid-template-columns: minmax(0, 1fr); }
  .session { padding-right: 0; }
  .session + .session { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.2); }
  .options-2 { grid-template-columns: minmax(0, 1fr); }
  .consent-details dl > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .privacy-dialog .consent-details dl > div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 24rem) {
  .brand-ko { display: none; }
  .nav-cta { padding-inline: 0.85rem; }
}

@media print {
  .site-header, .signup-card, .hero-actions, .book-more { display: none !important; }
  .trial { background: none; color: var(--ink); }
}
