:root {
  --paper: #f4efe7;
  --paper-deep: #eae1d5;
  --ink: #171715;
  --muted: #625e57;
  --line: rgba(23, 23, 21, 0.15);
  --soft-line: rgba(23, 23, 21, 0.08);
  --blue: #1268f3;
  --blue-dark: #0749b5;
  --blue-text: #0649a8;
  --cyan: #44d8f5;
  --coral: #ff665f;
  --coral-text: #9f2925;
  --pink: #e94893;
  --pink-text: #9c1e5b;
  --green: #16866a;
  --yellow: #ffd759;
  --cream: #fffaf2;
  --white: #fff;
  --night: #151821;
  --shadow: 0 24px 80px rgba(46, 39, 29, 0.12);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 42px;
  --shell: 1180px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

html.has-hangul-picker {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Noto Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(3.6rem, 8vw, 7.6rem);
  font-weight: 700;
}

h1 em {
  color: var(--blue);
  font-style: normal;
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(2.6rem, 5vw, 5.1rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(100px, 13vw, 180px);
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 28px;
  height: 2px;
  background: currentColor;
}

.mini-label {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-weight: 700;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 16px 34px rgba(23, 23, 21, 0.18);
}

.button-primary span {
  font-size: 1.25rem;
}

.button-quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.36);
}

/* Navigation */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  padding-block: 14px;
  transition: background 200ms ease, box-shadow 200ms ease, padding 200ms ease;
}

.site-header.is-scrolled {
  padding-block: 8px;
  border-bottom: 1px solid var(--soft-line);
  background: rgba(244, 239, 231, 0.82);
  box-shadow: 0 10px 40px rgba(23, 23, 21, 0.06);
  backdrop-filter: blur(20px) saturate(150%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(23, 23, 21, 0.16);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
  font-size: 0.85rem;
  font-weight: 700;
}

.nav-links a:not(.nav-app-link) {
  position: relative;
  color: var(--muted);
}

.nav-links a:not(.nav-app-link)::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 2px;
  background: var(--ink);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:not(.nav-app-link):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-app-link {
  padding: 9px 16px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 180ms ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: 840px;
  padding-top: clamp(150px, 18vh, 210px);
  padding-bottom: 100px;
  background:
    radial-gradient(circle at 76% 20%, rgba(68, 216, 245, 0.34), transparent 26%),
    radial-gradient(circle at 88% 57%, rgba(255, 102, 95, 0.3), transparent 26%),
    linear-gradient(180deg, #fbf7f0 0%, var(--paper) 70%);
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(23, 23, 21, 0.13) 0.75px, transparent 0.75px);
  background-size: 18px 18px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  opacity: 0.38;
}

.hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: clamp(50px, 8vw, 120px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-note {
  color: var(--muted);
  font-size: 0.83rem;
}

.hero-note strong {
  color: var(--ink);
}

.hero-stage {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.hero-card-main {
  position: relative;
  z-index: 2;
  width: min(420px, 92%);
  padding: 26px 34px 32px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.7);
  text-align: center;
  backdrop-filter: blur(26px) saturate(140%);
  transform: rotate(2deg);
}

.window-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.window-dots span:nth-child(1) { background: var(--coral); }
.window-dots span:nth-child(2) { background: var(--yellow); }
.window-dots span:nth-child(3) { background: var(--green); }

.hero-hangul {
  margin-block: 8px 20px;
  font-size: clamp(8rem, 17vw, 12rem);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.9;
  text-shadow: 0 16px 28px rgba(23, 23, 21, 0.12);
}

.hero-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 24px 0 14px;
}

.hero-equation span {
  display: flex;
  width: 58px;
  height: 64px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.74);
}

.hero-equation b {
  font-size: 1.8rem;
  line-height: 1.1;
}

.hero-equation small {
  color: var(--muted);
  font-size: 0.65rem;
}

.hero-equation i {
  color: var(--muted);
  font-style: normal;
}

.hero-translation {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.floating-glyph {
  position: absolute;
  display: grid;
  width: 95px;
  height: 95px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(26, 57, 81, 0.15);
  color: var(--white);
  font-size: 3rem;
  font-weight: 700;
  backdrop-filter: blur(18px);
}

.floating-glyph-one {
  top: 48px;
  right: 4px;
  background: rgba(18, 104, 243, 0.74);
  transform: rotate(12deg);
}

.floating-glyph-two {
  bottom: 42px;
  left: 2px;
  background: rgba(233, 72, 147, 0.76);
  transform: rotate(-9deg);
}

.floating-note {
  position: absolute;
  z-index: 3;
  top: 105px;
  left: -22px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(23, 23, 21, 0.1);
  font-size: 0.73rem;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.floating-note span {
  color: var(--blue-text);
}

.floating-note-two {
  top: auto;
  right: -16px;
  bottom: 105px;
  left: auto;
}

.floating-note-two span {
  color: var(--pink-text);
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(23, 23, 21, 0.09);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit-one {
  top: 100px;
  right: -240px;
  width: 720px;
  height: 720px;
}

.hero-orbit-two {
  top: 190px;
  right: -150px;
  width: 540px;
  height: 540px;
}

.hero-ticker {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.32);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 48px;
  white-space: nowrap;
}

.hero-ticker div {
  width: max-content;
  min-width: 100%;
  text-align: center;
}

.hero-ticker span {
  margin-inline: 20px;
  color: var(--coral);
}

/* Story */
.section-heading {
  max-width: 800px;
  margin-bottom: clamp(50px, 8vw, 90px);
}

.section-heading > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.logic-flow {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 24px;
  padding-block: 30px 70px;
  border-bottom: 1px solid var(--line);
}

.logic-step {
  position: relative;
  min-height: 350px;
  padding: 30px;
  border-top: 1px solid var(--line);
}

.logic-step h3 {
  margin-block: 28px 10px;
}

.logic-step p:last-child {
  margin: 0;
  color: var(--muted);
}

.logic-step-block {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.step-number {
  position: absolute;
  top: 30px;
  right: 30px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.logic-glyphs,
.logic-word {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logic-glyphs span {
  display: grid;
  width: 68px;
  height: 76px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 2.4rem;
  font-weight: 700;
}

.logic-glyphs span:nth-child(1) { color: var(--blue); }
.logic-glyphs span:nth-child(2) { color: var(--pink); }
.logic-glyphs span:nth-child(3) { color: var(--green); }

.logic-result {
  min-height: 150px;
  font-size: 8rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.logic-word span {
  display: grid;
  width: 90px;
  height: 104px;
  place-items: center;
  border-radius: 26px;
  background: var(--ink);
  color: var(--white);
  font-size: 3.4rem;
  font-weight: 700;
}

.logic-word span:last-child {
  background: var(--coral);
}

.logic-arrow {
  color: var(--muted);
  font-size: 1.4rem;
}

.story-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: clamp(30px, 6vw, 90px);
  padding-top: 70px;
}

.history-card {
  display: grid;
  align-items: start;
  grid-template-columns: auto 1fr;
  gap: 34px;
}

.history-year {
  color: var(--blue);
  font-size: clamp(3.4rem, 7vw, 6.8rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.history-card h3 {
  margin-bottom: 14px;
}

.history-card p:last-child {
  color: var(--muted);
}

.fact-stack {
  border-top: 1px solid var(--line);
}

.fact-stack > div {
  display: grid;
  align-items: center;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.fact-stack strong {
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.fact-stack span {
  color: var(--muted);
  font-size: 0.84rem;
}

/* Composer */
.composer-section {
  background:
    radial-gradient(circle at 15% 20%, rgba(68, 216, 245, 0.22), transparent 26%),
    radial-gradient(circle at 88% 85%, rgba(255, 102, 95, 0.22), transparent 24%),
    var(--night);
  color: var(--white);
  overflow: hidden;
}

.composer-section::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  content: "";
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.composer-section .shell {
  position: relative;
}

.section-heading-light .eyebrow,
.section-heading-light > p:last-child {
  color: rgba(255, 255, 255, 0.63);
}

.composer-lab {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.28);
  grid-template-columns: 1fr 1fr;
  backdrop-filter: blur(24px);
}

.composer-result-panel {
  position: relative;
  display: flex;
  min-height: 680px;
  align-items: center;
  justify-content: center;
  padding: 60px;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
  text-align: center;
}

.composer-result-panel .mini-label {
  color: rgba(255, 255, 255, 0.55);
}

.composer-result {
  font-size: clamp(9rem, 22vw, 15rem);
  font-weight: 700;
  letter-spacing: -0.09em;
  line-height: 0.8;
  text-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
  transform-origin: center;
}

.composer-result.is-changing {
  animation: syllable-pop 260ms ease;
}

@keyframes syllable-pop {
  50% { transform: scale(0.9) rotate(-2deg); opacity: 0.6; }
}

.composer-romanization {
  margin-block: 22px 36px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.2rem;
  font-weight: 700;
}

.block-visual {
  display: grid;
  overflow: hidden;
  width: 138px;
  height: 138px;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.block-visual.block-vertical {
  grid-template: "initial vowel" 1fr / 1fr 1fr;
}

.block-visual.block-horizontal {
  grid-template: "initial" 1fr "vowel" 1fr / 1fr;
}

.block-visual.block-mixed {
  grid-template: "initial vowel-extra" 1fr "vowel vowel-extra" 1fr / 1fr 1fr;
}

.block-visual.block-with-final.block-vertical {
  grid-template: "initial vowel" 1fr "final final" 0.72fr / 1fr 1fr;
}

.block-visual.block-with-final.block-horizontal {
  grid-template: "initial" 1fr "vowel" 0.75fr "final" 0.75fr / 1fr;
}

.block-visual.block-with-final.block-mixed {
  grid-template: "initial vowel-extra" 1fr "vowel vowel-extra" 0.85fr "final final" 0.72fr / 1fr 1fr;
}

.block-piece {
  display: grid;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border-radius: 14px;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}

.block-initial { grid-area: initial; background: rgba(18, 104, 243, 0.52); }
.block-vowel { grid-area: vowel; background: rgba(233, 72, 147, 0.52); }
.block-vowel-extra { grid-area: vowel-extra; background: rgba(233, 72, 147, 0.52); }
.block-vowel-extra[hidden] { display: none; }
.block-final { grid-area: final; background: rgba(22, 134, 106, 0.52); }
.block-final:empty { display: none; }

.block-caption {
  max-width: 350px;
  min-height: 48px;
  margin: 16px 0 28px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.icon-button {
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.composer-controls {
  display: flex;
  justify-content: center;
  padding: clamp(38px, 6vw, 70px);
  flex-direction: column;
}

.select-step {
  padding-block: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.select-step-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.select-step-heading > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 700;
}

.select-step-heading div {
  display: flex;
  flex-direction: column;
}

.select-step-heading small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.7rem;
}

.composer-picker {
  position: relative;
  min-height: 92px;
  --picker-accent: var(--blue);
}

.composer-picker[data-picker="vowel"] {
  --picker-accent: var(--pink);
}

.composer-picker[data-picker="final"] {
  --picker-accent: var(--green);
}

.composer-picker-face {
  display: grid;
  width: 100%;
  min-height: 92px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--picker-accent) 20%, transparent), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.composer-picker-glyph {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 16px;
  background: var(--picker-accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--picker-accent) 22%, transparent);
  color: var(--night);
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1;
}

.composer-picker-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.composer-picker-copy strong {
  overflow: hidden;
  color: var(--white);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-picker-copy small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-picker-chevron,
.native-picker-chevron {
  display: grid;
  place-items: center;
  pointer-events: none;
}

.composer-picker-chevron {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.25rem;
  transition: background 160ms ease, transform 160ms ease;
}

.composer-picker select {
  width: 100%;
  min-height: 56px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--white);
  font-size: 16px;
}

.composer-picker:hover .composer-picker-face {
  border-color: color-mix(in srgb, var(--picker-accent) 66%, transparent);
  background: linear-gradient(110deg, color-mix(in srgb, var(--picker-accent) 27%, transparent), rgba(255, 255, 255, 0.1));
  transform: translateY(-2px);
}

.composer-picker:hover .composer-picker-chevron {
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(2px);
}

.composer-picker-trigger:focus-visible {
  outline: 3px solid var(--picker-accent);
  outline-offset: 3px;
}

.native-picker {
  position: relative;
  display: block;
}

.native-picker select {
  width: 100%;
  min-height: 56px;
  padding: 12px 54px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  appearance: none;
  background: linear-gradient(120deg, color-mix(in srgb, var(--blue) 7%, var(--white)), var(--white));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8), 0 8px 22px rgba(23, 23, 21, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.native-picker-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.1rem;
  transform: translateY(-50%);
}

.native-picker:hover select {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8), 0 12px 28px rgba(23, 23, 21, 0.09);
}

.native-picker:focus-within select {
  outline: 3px solid color-mix(in srgb, var(--blue) 38%, transparent);
  outline-offset: 2px;
}

/* Shared Hangul picker */
.hangul-picker-dialog {
  width: min(calc(100% - 32px), 760px);
  max-width: none;
  max-height: min(86dvh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--cream);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.38);
  color: var(--ink);
}

.hangul-picker-dialog:not([open]) {
  display: none;
}

.hangul-picker-dialog::backdrop {
  background: rgba(6, 8, 13, 0.68);
  backdrop-filter: blur(8px);
}

.hangul-picker-sheet {
  display: flex;
  max-height: min(86dvh, 760px);
  flex-direction: column;
}

.hangul-picker-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.hangul-picker-header .mini-label {
  margin-bottom: 7px;
  color: var(--muted);
}

.hangul-picker-header h2 {
  margin-bottom: 6px;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.hangul-picker-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.hangul-picker-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.hangul-picker-close:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.hangul-picker-close:focus-visible,
.hangul-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--picker-accent, var(--blue)) 45%, transparent);
  outline-offset: 2px;
}

.hangul-picker-groups {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 28px 32px;
  overscroll-behavior: contain;
  scrollbar-color: var(--muted) transparent;
}

.hangul-option-group + .hangul-option-group {
  margin-top: 26px;
}

.hangul-option-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.hangul-option-group-heading h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.hangul-option-group-heading span {
  color: var(--muted);
  font-size: 0.7rem;
}

.hangul-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 10px;
}

.hangul-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100px;
  align-items: center;
  justify-content: center;
  padding: 10px 7px 8px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--picker-accent, var(--blue)) 6%, var(--cream));
  color: var(--ink);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  --picker-accent: var(--blue);
}

.hangul-option[data-picker-kind="vowel"],
.hangul-option[data-picker-kind="drawing-vowel"] {
  --picker-accent: var(--pink);
}

.hangul-option[data-picker-kind="final"] {
  --picker-accent: var(--green);
}

.hangul-option:hover {
  border-color: color-mix(in srgb, var(--picker-accent) 55%, var(--line));
  background: color-mix(in srgb, var(--picker-accent) 12%, var(--cream));
  transform: translateY(-2px);
}

.hangul-option[aria-current="true"] {
  border: 2px solid var(--picker-accent);
  background: color-mix(in srgb, var(--picker-accent) 20%, var(--cream));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--picker-accent) 16%, transparent);
}

.hangul-option-glyph {
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(2.7rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hangul-option-roman {
  overflow: hidden;
  max-width: 100%;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hangul-option-no-final {
  align-items: flex-start;
  justify-content: center;
  grid-column: 1 / -1;
  min-height: 74px;
  padding-inline: 18px;
  text-align: left;
}

.hangul-option-no-final .hangul-option-glyph {
  font-size: 1rem;
}

.hangul-option-no-final .hangul-option-roman {
  margin-top: 3px;
  font-weight: 400;
  white-space: normal;
}

.formula-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
}

.formula-note > span {
  color: var(--cyan);
}

.formula-note p {
  margin: 0;
}

.formula-note strong {
  color: rgba(255, 255, 255, 0.88);
}

/* Alphabet explorer */
.alphabet-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-button {
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.filter-button span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 0.67rem;
}

.filter-button:hover {
  transform: translateY(-1px);
}

.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.filter-button.is-active span {
  color: rgba(255, 255, 255, 0.62);
}

.alphabet-explorer {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 42px;
}

.jamo-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.jamo-tile {
  position: relative;
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border 150ms ease, box-shadow 150ms ease;
}

.jamo-tile:hover {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 28px rgba(23, 23, 21, 0.08);
  transform: translateY(-3px);
}

.jamo-tile.is-selected {
  border-color: var(--ink);
  background: var(--cream);
  box-shadow: 0 12px 28px rgba(23, 23, 21, 0.08);
}

.jamo-tile.is-hidden {
  display: none;
}

.jamo-tile .glyph {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.jamo-tile[data-kind="consonant"] .glyph { color: var(--blue); }
.jamo-tile[data-kind="vowel"] .glyph { color: var(--pink); }

.jamo-tile .roman {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.67rem;
}

.basic-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.jamo-detail {
  position: sticky;
  top: 100px;
  padding: 32px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
}

.jamo-detail .mini-label,
.jamo-detail p:last-child {
  color: rgba(255, 255, 255, 0.58);
}

.jamo-detail-glyph {
  margin-block: 22px;
  font-size: 7.5rem;
  font-weight: 700;
  line-height: 0.9;
}

.jamo-detail h3 {
  margin-bottom: 10px;
}

.jamo-detail-sound {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.detail-meta span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.65rem;
}

.jamo-detail p:last-child {
  margin: 0;
  font-size: 0.78rem;
}

.writing-panel {
  display: grid;
  overflow: hidden;
  margin-top: 100px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: var(--shadow);
  grid-template-columns: 0.82fr 1.18fr;
}

.writing-copy {
  display: flex;
  justify-content: center;
  padding: clamp(36px, 6vw, 70px);
  flex-direction: column;
}

.writing-copy h3 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.writing-copy > p:not(.eyebrow) {
  color: var(--muted);
}

.drawing-picker-label {
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.drawing-picker {
  --picker-accent: var(--blue);
}

.drawing-picker[data-kind="vowel"] {
  --picker-accent: var(--pink);
}

.drawing-picker select {
  width: 100%;
  min-height: 56px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
  color: var(--ink);
  font-size: 1rem;
}

.drawing-picker-trigger {
  display: grid;
  width: 100%;
  min-height: 84px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--picker-accent) 34%, var(--line));
  border-radius: 20px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--picker-accent) 12%, var(--cream)), var(--cream));
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.drawing-picker-trigger:hover {
  border-color: var(--picker-accent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--picker-accent) 12%, transparent);
  transform: translateY(-2px);
}

.drawing-picker-trigger:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--picker-accent) 42%, transparent);
  outline-offset: 3px;
}

.drawing-picker-glyph {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 16px;
  background: var(--picker-accent);
  color: var(--night);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}

.drawing-picker-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.drawing-picker-copy small {
  color: var(--muted);
  font-size: 0.68rem;
}

.drawing-picker-copy strong {
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-picker-chevron {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.2rem;
}

.drawing-clear {
  align-self: flex-start;
  margin-top: 12px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.stroke-stage {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(var(--soft-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--soft-line) 1px, transparent 1px),
    var(--white);
  background-size: 33.333% 33.333%;
}

.stroke-stage::before,
.stroke-stage::after {
  position: absolute;
  background: var(--line);
  content: "";
}

.stroke-stage::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.stroke-stage::after {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.drawing-guide {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: clamp(13rem, 32vw, 25rem);
  font-weight: 700;
  line-height: 1;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

#drawing-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.matrix-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 120px;
  margin-bottom: 30px;
}

.matrix-heading h3 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.matrix-heading-copy > p:last-child {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
}

.matrix-selection {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.4);
}

.matrix-selection > span {
  color: var(--muted);
  font-size: 1rem;
}

.matrix-selection strong {
  font-size: 1.8rem;
  line-height: 1;
}

.matrix-selection button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-size: 0.65rem;
}

.matrix-wrap {
  overflow-x: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.6);
  scrollbar-color: var(--ink) transparent;
}

.syllable-matrix {
  display: grid;
  width: max-content;
  grid-template-columns: 52px repeat(21, 52px);
  gap: 4px;
}

.matrix-row {
  display: contents;
}

.matrix-cell {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.matrix-cell:hover,
.matrix-cell.is-selected {
  background: var(--ink);
  color: var(--white);
  transform: scale(1.05);
}

.matrix-header {
  color: var(--muted);
  font-size: 1.05rem;
  cursor: default;
}

.matrix-header:hover {
  background: transparent;
  color: var(--muted);
  transform: none;
}

.matrix-row-header {
  color: var(--blue-text);
}

.matrix-column-header {
  color: var(--pink-text);
}

.matrix-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

/* Library */
.library-section {
  background: #eae1d5;
}

.library-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.library-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.library-tabs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.library-tabs button + button {
  border-left: 1px solid var(--line);
}

.library-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--white);
}

.library-tabs span {
  font-size: 1.1rem;
  font-weight: 700;
}

.library-tabs strong {
  color: inherit;
  font-size: 0.72rem;
}

.library-panel {
  padding: clamp(24px, 5vw, 54px);
}

.library-controls {
  display: grid;
  grid-template-columns: 1fr minmax(210px, 0.32fr);
  gap: 12px;
}

.search-field {
  position: relative;
}

.search-field > span:not(.sr-only) {
  position: absolute;
  top: 50%;
  left: 17px;
  color: var(--muted);
  font-size: 1.25rem;
  transform: translateY(-50%);
}

.search-field input,
.category-field select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.search-field input {
  padding: 12px 16px 12px 48px;
}

.category-field select {
  padding: 12px 54px 12px 16px;
}

.search-field input:disabled,
.category-field select:disabled {
  cursor: wait;
  opacity: 0.62;
}

.library-status {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-block: 24px 12px;
  color: var(--muted);
  font-size: 0.75rem;
}

.library-status p {
  margin: 0;
}

.library-count {
  font-variant-numeric: tabular-nums;
}

.library-results {
  border-top: 1px solid var(--line);
}

.library-item {
  border-bottom: 1px solid var(--line);
}

.library-item-header {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(170px, 0.35fr) 1fr auto;
  gap: 24px;
  padding-block: 20px;
}

details > .library-item-header {
  cursor: pointer;
  list-style: none;
}

details > .library-item-header::-webkit-details-marker {
  display: none;
}

details > .library-item-header::after {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "+";
  font-weight: 700;
  transition: transform 150ms ease;
}

.library-item[open] > .library-item-header::after {
  transform: rotate(45deg);
}

.library-inline-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: right;
  white-space: nowrap;
}

.library-term {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.library-term strong {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.library-term small {
  color: var(--muted);
  font-size: 0.67rem;
}

.library-meaning {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.library-detail {
  display: grid;
  grid-template-columns: minmax(170px, 0.35fr) 1fr 30px;
  gap: 24px;
  padding-bottom: 24px;
}

.library-detail-meta {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex-wrap: wrap;
}

.library-detail-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  font-size: 0.62rem;
}

.library-detail-copy {
  color: var(--muted);
  font-size: 0.78rem;
}

.library-detail-copy p:last-child {
  margin-bottom: 0;
}

.grammar-examples {
  display: grid;
  gap: 12px;
}

.grammar-example {
  padding-left: 14px;
  border-left: 2px solid var(--coral);
}

.grammar-example strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 1.12rem;
}

.grammar-example span {
  display: block;
}

.grammar-example small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.button-load {
  width: 100%;
  margin-top: 24px;
  border-color: var(--line);
  background: transparent;
  cursor: pointer;
}

.button-load[hidden] {
  display: none;
}

.library-error {
  margin: 24px 0 0;
  color: #a32620;
  font-size: 0.82rem;
}

.library-empty {
  padding-block: 70px;
  color: var(--muted);
  text-align: center;
}

/* Field notes */
.field-notes {
  background: var(--paper);
}

.field-notes-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(50px, 9vw, 130px);
}

.field-notes-title h2 {
  font-size: clamp(2.7rem, 5vw, 4.8rem);
}

.note-list {
  border-top: 1px solid var(--line);
}

.note-list article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 22px;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}

.note-list article > span {
  color: var(--coral-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.note-list h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.note-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* App spotlight */
.app-spotlight {
  overflow: hidden;
  background: var(--paper-deep);
}

.app-spotlight .shell {
  position: relative;
  z-index: 1;
}

.app-spotlight-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
}

.app-spotlight-glow-cyan {
  top: -180px;
  left: -150px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(68, 216, 245, 0.34), transparent 68%);
}

.app-spotlight-glow-coral {
  right: -190px;
  bottom: -220px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 102, 95, 0.25), transparent 68%);
}

.app-spotlight-poster {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(20px, 4vw, 42px);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.app-spotlight-poster img {
  width: 100%;
  height: auto;
}

.app-spotlight-bridge {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(48px, 8vw, 110px);
  margin-top: clamp(46px, 7vw, 88px);
}

.app-spotlight-copy h2 {
  font-size: clamp(2.8rem, 5vw, 5rem);
}

.app-spotlight-copy > p:not(.eyebrow, .product-freshness) {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--muted);
}

.product-freshness {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.product-freshness cite {
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
}

.app-facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.app-facts > div {
  display: grid;
  grid-template-columns: minmax(105px, 0.35fr) 1fr;
  gap: 24px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.app-facts dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.app-facts dd {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
}

/* Buyer questions */
.faq-section {
  background: var(--cream);
}

.faq-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 8vw, 110px);
}

.faq-intro {
  position: sticky;
  top: 130px;
}

.faq-intro h2 {
  font-size: clamp(2.8rem, 5vw, 5rem);
}

.faq-intro > p:last-child {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 42px;
  gap: 20px;
  padding-block: 25px;
  cursor: pointer;
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.32;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue-text);
  content: "+";
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  place-items: center;
  transition: transform 220ms ease, background-color 220ms ease;
}

.faq-item[open] summary::after {
  background: var(--paper-deep);
  transform: rotate(45deg);
}

.faq-answer {
  max-width: 760px;
  padding: 0 62px 26px 0;
  color: var(--muted);
}

.faq-answer p {
  margin: 0;
}

.faq-answer a {
  color: var(--blue-text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(80px, 12vw, 150px);
  background: var(--night);
  color: var(--white);
}

.footer-glow {
  position: absolute;
  top: -180px;
  right: -100px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(68, 216, 245, 0.6), rgba(18, 104, 243, 0.14) 45%, transparent 70%);
  filter: blur(8px);
}

.footer-glow::after {
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 102, 95, 0.58), transparent 70%);
  content: "";
}

.footer-cta {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: clamp(28px, 5vw, 70px);
  padding-bottom: clamp(80px, 10vw, 130px);
}

.footer-cta picture > img {
  border-radius: 29px;
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.35);
}

.footer-cta .eyebrow,
.footer-cta p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.62);
}

.footer-cta h2 {
  margin-bottom: 18px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
}

.footer-cta p:not(.eyebrow) {
  max-width: 540px;
  margin: 0;
}

.app-store-button {
  display: inline-block;
  width: 200px;
  line-height: 0;
}

.app-store-button img {
  width: 100%;
  height: auto;
}

.footer-bottom {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.72rem;
}

.footer-bottom p {
  margin: 0;
  text-align: center;
}

.footer-bottom > div {
  display: flex;
  gap: 18px;
}

.footer-bottom a:hover {
  color: var(--white);
}

.footer-brand {
  color: var(--white);
}

.apple-credit {
  position: relative;
  margin-bottom: 0;
  padding-bottom: 22px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
  text-align: center;
}

/* Reveal enhancement */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Tablet */
@media (max-width: 980px) {
  .hero {
    padding-top: 140px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-stage {
    width: min(600px, 100%);
    margin-inline: auto;
  }

  .logic-flow {
    grid-template-columns: 1fr;
  }

  .logic-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .logic-step {
    min-height: auto;
  }

  .logic-glyphs,
  .logic-word,
  .logic-result {
    min-height: 120px;
  }

  .story-grid,
  .field-notes-grid,
  .app-spotlight-bridge,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-intro {
    position: static;
    max-width: 720px;
  }

  .composer-lab {
    grid-template-columns: 1fr;
  }

  .composer-result-panel {
    min-height: 620px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .alphabet-explorer {
    grid-template-columns: 1fr;
  }

  .jamo-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .jamo-detail {
    position: static;
    display: grid;
    align-items: center;
    grid-template-columns: 100px 1fr;
    column-gap: 24px;
  }

  .jamo-detail .mini-label,
  .jamo-detail-glyph {
    grid-row: span 2;
  }

  .jamo-detail-glyph {
    margin: 0;
    font-size: 5.5rem;
  }

  .jamo-detail h3,
  .jamo-detail-sound,
  .detail-meta,
  .jamo-detail p:last-child {
    grid-column: 2;
  }

  .jamo-detail h3 {
    margin-top: -28px;
  }

  .writing-panel {
    grid-template-columns: 1fr;
  }

  .stroke-stage {
    min-height: 460px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer-cta {
    grid-template-columns: auto 1fr;
  }

  .app-store-button {
    grid-column: 2;
    justify-self: start;
  }
}

/* Mobile navigation and layout */
@media (max-width: 740px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .section {
    padding-block: 90px;
  }

  .site-header {
    padding-block: 9px;
  }

  .nav {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.75rem;
  }

  .js .nav {
    flex-wrap: nowrap;
  }

  .js .nav-toggle {
    display: block;
  }

  .nav-toggle[aria-expanded="true"] span:not(.sr-only):nth-child(2) {
    transform: translateY(3px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:not(.sr-only):nth-child(3) {
    transform: translateY(-3px) rotate(-45deg);
  }

  .js .nav-links {
    position: absolute;
    top: calc(100% + 2px);
    right: 14px;
    left: 14px;
    display: none;
    align-items: stretch;
    padding: 14px;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 250, 242, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
  }

  .js .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .nav-links a:not(.nav-app-link)::after {
    display: none;
  }

  .nav-app-link {
    margin-top: 8px;
    text-align: center;
  }

  .hero {
    min-height: auto;
    padding-top: 128px;
    padding-bottom: 0;
  }

  .hero-stage {
    min-height: 500px;
  }

  .hero-card-main {
    padding-inline: 24px;
  }

  .floating-glyph {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    font-size: 2.4rem;
  }

  .floating-note {
    left: 0;
  }

  .floating-note-two {
    right: 0;
    left: auto;
  }

  .hero-ticker {
    position: relative;
    margin-top: 40px;
  }

  .history-card {
    grid-template-columns: 1fr;
  }

  .history-year {
    font-size: 5rem;
  }

  .composer-result-panel {
    min-height: 560px;
    padding: 42px 24px;
  }

  .composer-controls {
    padding: 28px 22px 38px;
  }

  .jamo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .jamo-tile {
    min-height: 92px;
  }

  .jamo-detail {
    display: block;
  }

  .jamo-detail-glyph {
    margin-block: 18px;
  }

  .jamo-detail h3 {
    margin-top: 0;
  }

  .matrix-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .matrix-selection {
    align-self: flex-start;
  }

  .library-tabs {
    grid-template-columns: 1fr;
  }

  .library-tabs button + button {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .library-controls {
    grid-template-columns: 1fr;
  }

  .library-status {
    flex-direction: column;
    gap: 5px;
  }

  .library-item-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .library-meaning {
    grid-column: 1;
  }

  details > .library-item-header::after {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .library-item-static .library-item-header {
    grid-template-columns: 1fr;
  }

  .library-item-static .library-meaning,
  .library-inline-meta {
    grid-column: 1;
  }

  .library-inline-meta {
    text-align: left;
  }

  .library-detail {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hangul-picker-dialog {
    width: 100%;
    max-height: 88dvh;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .hangul-picker-sheet {
    max-height: 88dvh;
  }

  .hangul-picker-header {
    padding: 22px 20px 18px;
  }

  .hangul-picker-header h2 {
    font-size: 1.9rem;
  }

  .hangul-picker-groups {
    padding: 20px 14px calc(30px + env(safe-area-inset-bottom));
  }

  .hangul-option-grid {
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 8px;
  }

  .hangul-option {
    min-height: 90px;
    border-radius: 17px;
  }

  .hangul-option-glyph {
    font-size: 2.8rem;
  }

  .app-facts > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .faq-item summary {
    grid-template-columns: 1fr 38px;
  }

  .faq-answer {
    padding-right: 0;
  }

  .footer-cta {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-cta picture {
    justify-self: center;
  }

  .footer-cta picture > img {
    width: 104px;
    height: 104px;
  }

  .footer-cta .eyebrow {
    justify-content: center;
  }

  .app-store-button {
    grid-column: 1;
    justify-self: center;
  }

  .footer-bottom {
    justify-items: center;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: clamp(3rem, 15vw, 4rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-stage {
    min-height: 460px;
  }

  .hero-card-main {
    width: 100%;
  }

  .floating-glyph {
    display: none;
  }

  .logic-step {
    padding-inline: 20px;
  }

  .logic-glyphs span {
    width: 60px;
  }

  .jamo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .writing-copy {
    padding-inline: 28px;
  }

  .stroke-stage {
    min-height: 350px;
  }

  .app-spotlight-copy .button {
    width: 100%;
    line-height: 1.25;
    text-align: center;
  }

  .app-spotlight-poster {
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .faq-item summary::after {
    transition: none;
  }

  .composer-picker:hover .composer-picker-face,
  .composer-picker:hover .composer-picker-chevron,
  .drawing-picker-trigger:hover,
  .hangul-option:hover {
    transform: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17181d;
    --paper-deep: #202126;
    --ink: #f4f0e9;
    --muted: #aaa69e;
    --line: rgba(255, 255, 255, 0.15);
    --soft-line: rgba(255, 255, 255, 0.08);
    --blue-text: #8bb8ff;
    --coral-text: #ffaaa6;
    --pink-text: #ff9dce;
    --cream: #22242a;
    --white: #f7f5f0;
    --night: #0c0d11;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
    color-scheme: dark;
  }

  .site-header.is-scrolled {
    background: rgba(23, 24, 29, 0.84);
  }

  .hero {
    background:
      radial-gradient(circle at 76% 20%, rgba(18, 104, 243, 0.26), transparent 26%),
      radial-gradient(circle at 88% 57%, rgba(255, 102, 95, 0.22), transparent 26%),
      linear-gradient(180deg, #131419 0%, var(--paper) 70%);
  }

  .hero-card-main,
  .floating-note {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(34, 36, 42, 0.72);
  }

  .hero-equation span,
  .button-quiet,
  .jamo-tile,
  .matrix-selection,
  .matrix-wrap {
    background: rgba(255, 255, 255, 0.05);
  }

  .button-primary,
  .nav-app-link,
  .skip-link,
  .filter-button.is-active,
  .matrix-selection button,
  .matrix-cell:hover,
  .matrix-cell.is-selected {
    background: var(--white);
    color: #141414;
  }

  .nav-toggle {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
  }

  .nav-toggle span:not(.sr-only) {
    background: var(--white);
  }

  .logic-step-block,
  .library-shell,
  .writing-panel {
    background: #22242a;
  }

  .logic-word span {
    background: var(--white);
    color: #141414;
  }

  .composer-section,
  .site-footer {
    background-color: #0b0c10;
  }

  .jamo-tile:hover,
  .jamo-tile.is-selected {
    background: rgba(255, 255, 255, 0.1);
  }

  .jamo-detail {
    background: #090a0d;
  }

  .stroke-stage,
  .search-field input {
    background-color: #191a1f;
  }

  .native-picker select {
    background: linear-gradient(120deg, color-mix(in srgb, var(--blue) 10%, #191a1f), #191a1f);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 8px 22px rgba(0, 0, 0, 0.18);
  }

  .library-section {
    background: #111217;
  }

  .library-tabs button[aria-selected="true"] {
    background: var(--white);
    color: #141414;
  }

  .grammar-example strong {
    color: var(--white);
  }

  .nav-links {
    background: rgba(28, 29, 34, 0.97);
  }

  .app-spotlight-poster {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  }
}

@media (forced-colors: active) {
  .composer-picker-face,
  .drawing-picker-trigger,
  .hangul-option,
  .hangul-picker-close,
  .faq-item summary::after {
    background: Canvas;
    color: CanvasText;
    border-color: ButtonText;
  }
}
