:root {
  --navy-950: #07152f;
  --navy-900: #0b1f4b;
  --navy-800: #12346f;
  --blue-600: #155eef;
  --blue-700: #1249bd;
  --cyan-400: #22d3ee;
  --yellow-300: #ffe34d;
  --lime-300: #b7f36b;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3f9;
  --ink: #101828;
  --muted: #5f6b7b;
  --border: #d9e1eb;
  --success: #087443;
  --danger: #b42318;
  --shadow-sm: 0 8px 30px rgba(7, 21, 47, .07);
  --shadow-lg: 0 32px 90px rgba(7, 21, 47, .17);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  color-scheme: light;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 211, 238, .08), transparent 28rem),
    var(--canvas);
}
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #6e97ff;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 11px 14px;
  background: var(--surface);
  color: var(--navy-900);
  border-radius: 10px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.app-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(203, 214, 226, .78);
  background: rgba(244, 247, 251, .84);
  backdrop-filter: blur(22px) saturate(130%);
}
.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  color: var(--navy-900);
  text-decoration: none;
}
.brand img { border-radius: 13px; box-shadow: 0 7px 22px rgba(21, 94, 239, .16); }
.brand > span, .footer-brand > span { display: flex; flex-direction: column; }
.brand strong { font-size: 20px; letter-spacing: -.6px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }

.primary-nav {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(203, 214, 226, .7);
  border-radius: 15px;
  background: rgba(235, 241, 248, .86);
}
.nav-item {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.nav-item.is-active {
  background: var(--surface);
  color: var(--navy-900);
  box-shadow: 0 3px 12px rgba(7, 21, 47, .08);
}
.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  margin-left: auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .8);
  color: var(--navy-900);
  cursor: pointer;
}
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.offline-banner {
  padding: 10px 20px;
  background: #fff4d8;
  color: #714c00;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

main { width: min(1240px, 100%); margin: 0 auto; padding: 44px clamp(18px, 4vw, 48px) 96px; }
.view { animation: view-in .25s ease both; }
@keyframes view-in { from { opacity: .2; transform: translateY(8px); } }
.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan-400);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 1.35px;
}
.eyebrow-blue { color: var(--blue-600); }
.eyebrow-cyan { color: var(--cyan-400); }

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  min-height: 610px;
  align-items: center;
  gap: clamp(34px, 6vw, 88px);
  overflow: hidden;
  padding: clamp(42px, 7vw, 88px);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 34px;
  background:
    radial-gradient(circle at 89% 16%, rgba(34, 211, 238, .23), transparent 28%),
    linear-gradient(145deg, var(--navy-950), #0b2f70 66%, #0d4673);
  box-shadow: var(--shadow-lg);
}
.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, .08), transparent 26%, transparent 72%, rgba(255, 255, 255, .05));
}
.hero-copy, .speech-stage { position: relative; z-index: 1; }
.hero-copy h1 {
  max-width: 740px;
  margin: 0;
  color: #fff;
  font-size: clamp(46px, 5.4vw, 76px);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -3.5px;
  word-break: keep-all;
}
.hero-copy h1 span { color: #bdeef8; }
.hero-lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: #dbe8fb;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 34px; }
.privacy-line { display: flex; gap: 8px; margin: 24px 0 0; color: #afc5e3; font-size: 12px; line-height: 1.6; }
.privacy-line span { color: #59e4bb; font-size: 9px; transform: translateY(4px); }

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button-primary { background: var(--blue-600); color: #fff; box-shadow: 0 10px 26px rgba(21, 94, 239, .22); }
.button-primary:hover:not(:disabled) { background: var(--blue-700); }
.hero-stage .button-primary { background: var(--yellow-300); color: var(--navy-950); box-shadow: none; }
.hero-stage .button-primary:hover { background: #ffea72; }
.button-secondary { background: #eaf1ff; color: var(--blue-700); border-color: #d7e4ff; }
.button-ghost { background: var(--surface); color: var(--navy-900); border-color: var(--border); }
.button-danger { background: #fff3f1; color: var(--danger); border-color: #ffd1ca; }
.text-button { min-height: 46px; padding: 0 4px; border: 0; background: transparent; color: #d9eaff; font-weight: 750; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }

.speech-stage {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 26px;
  background: rgba(8, 28, 63, .62);
  box-shadow: inset 0 1px rgba(255, 255, 255, .16), 0 28px 60px rgba(0, 0, 0, .2);
  backdrop-filter: blur(18px);
  transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
}
.speech-stage-top { display: flex; justify-content: space-between; color: #8debf3; font-size: 10px; font-weight: 850; letter-spacing: 1px; }
.speech-sample { margin: 30px 0; color: #f8fbff; font-size: clamp(23px, 2.2vw, 34px); line-height: 1.72; letter-spacing: -.45px; }
.speech-sample .soft { color: #a8b8ce; }
.speech-sample strong { font-weight: 900; }
.speech-sample i { margin: 0 4px; color: #64dce9; font-style: normal; font-weight: 900; }
.speech-sample mark { padding: 0 3px; border-radius: 5px; background: var(--yellow-300); color: var(--navy-950); font-weight: 900; }
.speech-sample mark.fall { background: var(--lime-300); }
.speech-sample .linked { text-decoration: underline; text-decoration-color: #74e8f2; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 7px; }
.legend span { padding: 6px 9px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .07); color: #d8e6f8; font-size: 11px; }
.legend .legend-rise { color: #ffeb82; }
.legend .legend-fall { color: #c8fa8e; }
.audio-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  margin-top: 23px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.play-icon { color: var(--yellow-300); font-size: 11px; }

.today-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 18px; margin-top: 20px; }
.lesson-brief, .next-action {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.next-action { background: var(--navy-900); color: #fff; border-color: transparent; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.lesson-brief h2, .next-action h2 { max-width: 700px; margin: 0; color: var(--navy-900); font-size: clamp(26px, 3vw, 38px); line-height: 1.25; letter-spacing: -1.2px; word-break: keep-all; }
.next-action h2 { color: #fff; font-size: clamp(25px, 2.5vw, 34px); }
.lesson-brief > p, .next-action > p { color: var(--muted); line-height: 1.7; }
.next-action > p { color: #b8c9df; }
.duration-label { flex: 0 0 auto; padding: 8px 11px; border-radius: 10px; background: #eef4ff; color: var(--blue-700); font-size: 13px; font-weight: 850; }
.lesson-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 28px 0; border-block: 1px solid #e6ebf1; }
.lesson-facts div { padding: 17px 14px 17px 0; }
.lesson-facts div + div { padding-left: 18px; border-left: 1px solid #e6ebf1; }
.lesson-facts dt { color: var(--muted); font-size: 11px; }
.lesson-facts dd { margin: 5px 0 0; color: var(--navy-900); font-weight: 850; }
.actual-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; margin-top: 30px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: rgba(255, 255, 255, .12); }
.actual-metrics div { padding: 18px; background: rgba(3, 15, 35, .56); }
.actual-metrics strong { display: block; font-size: 25px; }
.actual-metrics span { display: block; margin-top: 3px; color: #9fb3cf; font-size: 11px; }
.principle-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; border-block: 1px solid var(--border); }
.principle-strip > div { position: relative; padding: 32px clamp(18px, 3vw, 34px); }
.principle-strip > div + div::before { content: ""; position: absolute; inset: 24px auto 24px 0; width: 1px; background: var(--border); }
.principle-strip span { color: var(--blue-600); font-size: 11px; font-weight: 850; }
.principle-strip strong { display: block; margin-top: 8px; color: var(--navy-900); font-size: 19px; }
.principle-strip p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.lesson-view { width: 100%; margin-inline: 0; }
.lesson-header { display: grid; grid-template-columns: 150px 1fr 150px; align-items: end; gap: 24px; }
.lesson-header h2 { margin: 0; color: var(--navy-900); font-size: clamp(28px, 3.2vw, 46px); line-height: 1.18; letter-spacing: -1.5px; word-break: keep-all; }
.back-button { min-height: 44px; width: fit-content; border: 0; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.lesson-time { justify-self: end; padding: 9px 11px; border-radius: 10px; background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 800; }
.lesson-progress { overflow: hidden; height: 4px; margin: 25px 0; border-radius: 5px; background: #dae2ec; }
.lesson-progress span { display: block; width: 12.5%; height: 100%; border-radius: inherit; background: var(--blue-600); transition: width .25s ease; }
.lesson-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr) 280px; align-items: start; gap: 18px; }
.lesson-rail, .lesson-aside {
  position: sticky;
  top: 100px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}
.rail-step { display: grid; grid-template-columns: 30px 1fr; min-height: 54px; width: 100%; align-items: center; gap: 8px; padding: 7px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.rail-step span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--border); border-radius: 9px; font-size: 11px; font-weight: 850; }
.rail-step strong { font-size: 13px; }
.rail-step.is-active { background: #eaf1ff; color: var(--blue-700); }
.rail-step.is-active span { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.rail-step.is-complete span { border-color: #a6dfc2; color: var(--success); }
.lesson-workspace { min-height: 610px; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-head { margin-bottom: 30px; }
.workspace-head h2 { max-width: 800px; margin: 0; color: var(--navy-900); font-size: clamp(30px, 3.3vw, 46px); line-height: 1.2; letter-spacing: -1.6px; word-break: keep-all; }
.workspace-head > p:not(.eyebrow) { max-width: 760px; margin: 14px 0 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.prompt-card { padding: 24px; border-radius: 18px; background: #eff4fb; }
.prompt-card strong { display: block; color: var(--navy-900); font-size: clamp(22px, 2.5vw, 32px); line-height: 1.5; letter-spacing: -.6px; word-break: keep-all; }
.prompt-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.option-button { min-height: 58px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: #fff; color: var(--navy-900); text-align: left; font-weight: 750; cursor: pointer; }
.option-button:hover, .option-button.is-selected { border-color: #9ebcff; background: #edf3ff; }
.audio-console { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; padding: 22px; border: 1px solid #dbe5f2; border-radius: 18px; background: #f7faff; }
.audio-main { width: 64px; height: 64px; border: 0; border-radius: 50%; background: var(--blue-600); color: #fff; font-weight: 900; cursor: pointer; }
.audio-console strong { color: var(--navy-900); }
.audio-console p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.speed-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.speed-button, .sentence-tab { min-height: 42px; padding: 0 13px; border: 1px solid var(--border); border-radius: 11px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.speed-button.is-active, .sentence-tab.is-active { border-color: var(--blue-600); background: #eaf1ff; color: var(--blue-700); }
.script-list { display: grid; gap: 12px; }
.script-sentence { padding: 20px; border: 1px solid var(--border); border-radius: 16px; }
.script-sentence p { margin: 0; color: var(--navy-900); font-size: 20px; line-height: 1.65; }
.script-sentence .ko { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e6ebf1; color: var(--muted); font-size: 15px; }
.reveal-button { min-height: 42px; margin-top: 12px; padding: 0 13px; border: 0; border-radius: 10px; background: #edf3ff; color: var(--blue-700); font-size: 12px; font-weight: 800; cursor: pointer; }
.sentence-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.prosody-line { margin: 26px 0; color: var(--navy-900); font-size: clamp(26px, 3.4vw, 43px); line-height: 1.72; letter-spacing: -.8px; }
.prosody-line .reduced { color: #818da0; }
.prosody-line .stress { font-weight: 950; }
.prosody-line .rise, .prosody-line .fall { padding: 0 3px; border-radius: 5px; color: var(--navy-950); font-weight: 900; }
.prosody-line .rise { background: var(--yellow-300); }
.prosody-line .fall { background: var(--lime-300); }
.prosody-line .boundary { margin: 0 5px; color: var(--blue-600); font-weight: 900; }
.prosody-line .linked { text-decoration: underline; text-decoration-color: var(--cyan-400); text-underline-offset: 6px; }
.prosody-line.hide-stress .stress { font-weight: inherit; }
.prosody-line.hide-intonation .rise, .prosody-line.hide-intonation .fall { padding-inline: 0; background: transparent; }
.prosody-line.hide-boundary .boundary { display: none; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.toggle-control { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 11px; color: var(--muted); font-size: 12px; font-weight: 800; }
.toggle-control input { width: 17px; height: 17px; accent-color: var(--blue-600); }
.expression-grid { display: grid; gap: 10px; }
.expression-card { padding: 18px 0; border-bottom: 1px solid #e5eaf0; }
.expression-card:first-child { padding-top: 0; }
.expression-card strong { color: var(--navy-900); font-size: 20px; }
.expression-card span { display: block; margin-top: 4px; color: var(--blue-700); font-weight: 750; }
.expression-card p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; }
.recorder { margin-top: 22px; padding: 22px; border: 1px solid #d4e1f2; border-radius: 18px; background: #f2f6fc; }
.record-status { display: flex; align-items: center; gap: 10px; color: var(--navy-900); }
.record-status::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #aab5c3; }
.recorder.is-recording .record-status::before { background: #e5484d; box-shadow: 0 0 0 7px rgba(229, 72, 77, .12); }
.record-status time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.record-helper { margin: 10px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.record-actions, .compare-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.audio-playback { width: 100%; margin-top: 16px; }
.quality-note { margin: 12px 0 0; color: var(--success); font-size: 12px; font-weight: 750; }
.hint-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hint-box, .answer-box, .coach-box { margin-top: 16px; padding: 18px; border-radius: 15px; line-height: 1.65; }
.hint-box { background: #edf4ff; color: var(--blue-700); }
.answer-box { border: 1px solid #b9e5cd; background: #effbf4; color: #0b5435; }
.answer-box strong { display: block; font-size: 20px; }
.answer-box p { margin: 7px 0 0; }
.self-check { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.conversation { display: grid; gap: 12px; }
.conversation-turn { max-width: 82%; padding: 14px 16px; border-radius: 16px; line-height: 1.6; }
.conversation-turn.coach { background: #edf3ff; color: var(--navy-900); }
.conversation-turn.user { margin-left: auto; background: var(--navy-900); color: #fff; }
.conversation-actions { display: flex; gap: 8px; margin-top: 18px; }
.transfer-prompt { padding: clamp(22px, 4vw, 34px); border: 1px solid #d5e1f1; border-radius: 20px; background: linear-gradient(135deg, #f4f8ff, #eefcff); }
.transfer-prompt .ko { margin: 0; color: var(--navy-900); font-size: clamp(24px, 3vw, 37px); font-weight: 800; line-height: 1.45; word-break: keep-all; }
.transfer-prompt .en { margin: 14px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.timer-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 16px 18px; border-radius: 15px; background: var(--navy-900); color: #fff; }
.timer-box strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.coach-box { background: #fff8d8; color: #5f4a00; }
.lesson-aside h3 { margin: 5px 6px 12px; color: var(--navy-900); font-size: 16px; }
.aside-card { padding: 14px; border-radius: 14px; background: #eff4fa; }
.aside-card + .aside-card { margin-top: 9px; }
.aside-card strong { color: var(--navy-900); font-size: 13px; }
.aside-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.lesson-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-left: 208px; padding-right: 298px; }

.page-heading { max-width: 850px; margin: 20px 0 38px; }
.page-heading h2 { margin: 0; color: var(--navy-900); font-size: clamp(42px, 5.4vw, 70px); line-height: 1.08; letter-spacing: -3px; word-break: keep-all; }
.page-heading > p:not(.eyebrow) { max-width: 680px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.empty-state, .review-summary, .progress-grid > article, .progress-note {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.empty-state h2, .review-summary h2, .progress-note h2 { margin: 0; color: var(--navy-900); font-size: clamp(25px, 3vw, 36px); }
.empty-state p, .review-summary p, .progress-note p { color: var(--muted); line-height: 1.7; }
.review-list { display: grid; gap: 10px; margin-top: 18px; }
.review-row { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 16px; padding: 17px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.review-day { display: grid; min-height: 54px; place-items: center; border-radius: 13px; background: #edf3ff; color: var(--blue-700); font-weight: 900; }
.review-row strong { color: var(--navy-900); }
.review-row p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.review-row.is-complete { opacity: .65; }
.progress-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.progress-grid strong { display: block; color: var(--navy-900); font-size: clamp(30px, 4vw, 48px); letter-spacing: -1.5px; }
.progress-grid span { display: block; margin-top: 6px; color: var(--muted); }
.progress-note { margin-top: 16px; background: var(--navy-900); border-color: transparent; }
.progress-note h2 { color: #fff; }
.progress-note p { color: #c2d2e7; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 1.4fr) 1fr;
  align-items: center;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 64px);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--navy-900); }
.footer-brand img { border-radius: 9px; }
.footer-brand small { color: var(--muted); }
.site-footer p { text-align: center; }
.site-footer nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 14px; }
.site-footer a { text-underline-offset: 4px; }

.modal {
  width: min(720px, calc(100vw - 28px));
  max-height: min(860px, calc(100dvh - 28px));
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 26px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  box-shadow: 0 40px 120px rgba(7, 21, 47, .32);
}
.modal::backdrop { background: rgba(3, 12, 29, .62); backdrop-filter: blur(6px); }
.modal form { padding: clamp(24px, 5vw, 42px); }
.modal-head h2 { margin: 0; color: var(--navy-900); font-size: clamp(27px, 4vw, 40px); line-height: 1.25; letter-spacing: -1.2px; }
.modal-head p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.modal-head-inline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal fieldset { margin: 26px 0 0; padding: 0; border: 0; }
.modal legend { margin-bottom: 12px; color: var(--navy-900); font-weight: 850; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.choice-grid label { cursor: pointer; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid label > span { display: block; min-height: 94px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.choice-grid input:focus-visible + span { outline: 3px solid #6e97ff; outline-offset: 2px; }
.choice-grid input:checked + span { border-color: var(--blue-600); background: #edf3ff; box-shadow: inset 0 0 0 1px var(--blue-600); }
.choice-grid strong { display: block; color: var(--navy-900); }
.choice-grid small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.45; }
.data-notice { margin-top: 24px; padding: 16px; border-radius: 14px; background: #eef9f4; color: #135b3c; }
.data-notice p { margin: 5px 0 0; font-size: 13px; line-height: 1.6; }
.modal select { width: 100%; min-height: 50px; padding: 0 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--navy-900); }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 28px; }
.modal-actions.split { align-items: center; justify-content: space-between; }
.modal-actions.split > div { display: flex; gap: 8px; }
.settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 28px; }
.small-copy { color: var(--muted); font-size: 12px; line-height: 1.6; }
.review-modal-content { color: var(--navy-900); }
.review-modal-content .review-prompt { padding: 20px; border-radius: 16px; background: #eef4fb; font-size: 20px; font-weight: 800; line-height: 1.55; }
.review-targets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.review-targets span { padding: 7px 9px; border-radius: 8px; background: #fff8d8; color: #674f00; font-size: 12px; font-weight: 800; }
.sr-live { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.legal-shell { width: min(840px, calc(100% - 36px)); margin: 0 auto; padding: 72px 0; }
.legal-shell .brand { margin-bottom: 56px; }
.legal-shell h1 { margin: 0; color: var(--navy-900); font-size: clamp(42px, 7vw, 68px); letter-spacing: -2.5px; }
.legal-shell h2 { margin: 42px 0 12px; color: var(--navy-900); font-size: 24px; }
.legal-shell p, .legal-shell li { color: var(--muted); line-height: 1.8; }
.legal-shell .legal-lead { color: var(--navy-900); font-size: 19px; }
.legal-back { display: inline-flex; margin-top: 42px; color: var(--blue-700); font-weight: 800; }

@media (max-width: 1100px) {
  .hero-stage { grid-template-columns: 1fr; min-height: auto; }
  .speech-stage { max-width: 720px; transform: none; }
  .lesson-layout { grid-template-columns: 150px minmax(0, 1fr); }
  .lesson-aside { position: static; grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .aside-card + .aside-card { margin-top: 0; }
  .lesson-aside h3 { grid-column: 1 / -1; }
  .lesson-actions { padding-left: 168px; padding-right: 0; }
}

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 68px; padding-bottom: 8px; background: var(--canvas); backdrop-filter: none; }
  .primary-nav { position: fixed; z-index: 50; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); left: 12px; justify-content: space-around; box-shadow: 0 18px 60px rgba(7, 21, 47, .22); }
  .nav-item { flex: 1; padding-inline: 8px; }
  .icon-button { grid-column: 2; grid-row: 1; }
  main { padding-top: 24px; padding-bottom: 122px; }
  .hero-stage { padding: 42px 28px; border-radius: 26px; }
  .hero-copy h1 { font-size: clamp(43px, 9vw, 64px); letter-spacing: -2.5px; }
  .today-grid { grid-template-columns: 1fr; }
  .principle-strip { grid-template-columns: 1fr; }
  .principle-strip > div + div::before { inset: 0 18px auto; width: auto; height: 1px; }
  .lesson-view { width: 100%; margin-inline: 0; }
  .lesson-header { grid-template-columns: 1fr auto; align-items: start; }
  .lesson-header > div { grid-column: 1 / -1; grid-row: 2; }
  .lesson-time { grid-column: 2; grid-row: 1; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-rail { position: static; display: flex; overflow-x: auto; padding: 7px; }
  .rail-step { flex: 0 0 110px; grid-template-columns: 26px 1fr; min-height: 48px; }
  .lesson-aside { grid-column: 1; grid-template-columns: 1fr 1fr; }
  .lesson-actions { padding: 0; }
  .page-heading h2 { font-size: clamp(40px, 10vw, 62px); }
  .progress-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; padding-bottom: 110px; text-align: center; }
  .footer-brand, .site-footer nav { justify-content: center; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-grid label > span { min-height: auto; }
}

@media (max-width: 560px) {
  .brand small { display: none; }
  .brand img { width: 38px; height: 38px; }
  .hero-stage { padding: 36px 22px; }
  .hero-copy h1 { font-size: 43px; line-height: 1.09; }
  .hero-lead { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button, .hero-actions .text-button { width: 100%; }
  .speech-stage { padding: 21px; }
  .speech-sample { font-size: 24px; }
  .section-heading { display: block; }
  .duration-label { display: inline-block; margin-top: 12px; }
  .lesson-facts { grid-template-columns: 1fr; }
  .lesson-facts div + div { padding-left: 0; border-top: 1px solid #e6ebf1; border-left: 0; }
  .option-grid, .self-check, .settings-actions { grid-template-columns: 1fr; }
  .lesson-workspace { min-height: 560px; padding: 24px 19px; }
  .lesson-aside { grid-template-columns: 1fr; }
  .review-row { grid-template-columns: 58px 1fr; }
  .review-row .button { grid-column: 1 / -1; }
  .modal-actions.split { align-items: stretch; flex-direction: column; }
  .modal-actions.split > div { display: grid; grid-template-columns: 1fr; }
  .modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .speech-stage { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header, .lesson-rail, .lesson-aside, .modal { background: #fff; backdrop-filter: none; }
}

@media print {
  .site-header, .site-footer, .lesson-actions, .button, .text-button { display: none !important; }
  main { width: 100%; padding: 0; }
  .view[hidden] { display: none !important; }
}
