:root {
  --app-width: 960px;
  --accent: #e86149;
  --ink: #22322b;
  --muted: #6e786f;
  --line: #e7ddcf;
  --paper: #fffdf8;
  --cream: #fbf4e7;
  --forest: #1f5544;
  --forest-deep: #143b30;
  --coral: #ed6b50;
  --gold: #f5bf57;
  --mint: #8ac9aa;
  --sky: #5da7c6;
  --soft-shadow: 0 16px 40px rgba(54, 48, 37, .09);
}

html {
  scrollbar-width: none;
  background: #f1eadc;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
dialog::-webkit-scrollbar,
.app-menu::-webkit-scrollbar {
  display: none;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 9% 8%, rgba(255, 241, 201, .9) 0, transparent 24rem),
    radial-gradient(circle at 91% 18%, rgba(199, 232, 214, .75) 0, transparent 25rem),
    linear-gradient(145deg, #f6efe1, #eee7da);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI Variable", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button,
select,
input {
  font-family: inherit;
}

button {
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.course-app {
  width: 100%;
  max-width: var(--app-width);
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: 72px;
  border: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 244, 218, .72), transparent 20rem),
    var(--paper);
  box-shadow: 0 0 0 1px rgba(109, 91, 63, .08), 0 30px 100px rgba(58, 50, 36, .12);
}

:where(.course-app) button:hover {
  color: inherit;
}

.app-header {
  height: 72px;
  padding: 0 clamp(18px, 3.2vw, 30px);
  border-bottom: 1px solid rgba(211, 200, 182, .62);
  background: rgba(255, 253, 247, .92);
  box-shadow: 0 8px 24px rgba(57, 48, 34, .045);
  backdrop-filter: blur(18px);
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
}

.app-header h1 {
  color: var(--ink);
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -.045em;
}

.app-header button {
  width: auto;
  min-height: 40px;
  padding: 0;
  color: var(--forest);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.app-header button:first-child {
  justify-self: start;
}

.app-header button:last-child {
  justify-self: end;
}

#menu {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 999px;
  background: #f2ecdf;
}

#menu:hover {
  background: #e9e0cf;
  color: var(--forest-deep);
}

.menu-glyph {
  font-size: 18px;
  line-height: 1;
}

#tutor-play {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(232, 97, 73, .26);
}

#tutor-play:hover {
  background: #d9553e;
  color: #fff;
  transform: translateY(-1px);
}

.header-progress {
  justify-self: end;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #e5dbc9;
  border-radius: 999px;
  background: #fffaf0;
  color: #758177;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.header-progress strong {
  color: var(--forest);
  font-size: 16px;
  font-weight: 900;
}

.home-shell {
  padding: 18px clamp(16px, 3.5vw, 28px) 48px;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  min-height: 260px;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 84% 10%, rgba(245, 191, 87, .25), transparent 15rem),
    radial-gradient(circle at 2% 94%, rgba(138, 201, 170, .19), transparent 15rem),
    linear-gradient(135deg, #173f33, #245c48 58%, #1c4b3d);
  color: #fffaf0;
  box-shadow: 0 24px 48px rgba(24, 64, 51, .2);
  isolation: isolate;
}

.home-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .24;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(120deg, transparent 20%, #000 100%);
}

.home-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px 0 28px clamp(24px, 4vw, 38px);
}

.home-eyebrow,
.section-eyebrow {
  display: block;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.home-hero .home-eyebrow {
  color: #f8d47d;
}

.home-hero h2 {
  max-width: 590px;
  margin: 10px 0 0;
  color: #fffaf0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(36px, 5.5vw, 52px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.055em;
}

.home-hero p {
  max-width: 420px;
  margin: 14px 0 20px;
  color: #dbe8de;
  font-size: 15px;
  line-height: 1.55;
}

.home-hero p strong {
  color: #ffe39b;
  font-weight: 800;
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--forest-deep);
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

.home-cta:hover {
  background: #ffd477;
  color: var(--forest-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, .2);
}

.home-cta span {
  font-size: 20px;
  line-height: 1;
}

.home-progress {
  width: min(100%, 330px);
  margin-top: 22px;
}

.home-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #dce9df;
  font-size: 12px;
  font-weight: 700;
}

.home-progress-row strong {
  color: #fff7df;
  font-size: 13px;
  font-weight: 850;
}

.home-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.home-progress-track i {
  display: block;
  width: var(--home-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4b952, #ffe18b);
  box-shadow: 0 0 14px rgba(245, 191, 87, .5);
  animation: home-progress-in .8s cubic-bezier(.2, .8, .2, 1) both;
}

.home-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
}

.home-hero-art:before,
.home-hero-art:after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 240, 193, .25);
  border-radius: 50%;
}

.home-hero-art:before {
  width: 220px;
  height: 220px;
  right: -20px;
  top: 22px;
}

.home-hero-art:after {
  width: 154px;
  height: 154px;
  right: 16px;
  top: 55px;
  border-color: rgba(255, 240, 193, .16);
}

.hero-letter {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border: 2px solid rgba(255, 247, 220, .55);
  border-radius: 38px;
  background: linear-gradient(145deg, rgba(255, 247, 220, .98), rgba(249, 212, 126, .9));
  color: var(--forest-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -.09em;
  transform: rotate(-7deg);
  box-shadow: 0 24px 42px rgba(0, 0, 0, .2);
}

.hero-spark {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff4db;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
  animation: spark-float 3.6s ease-in-out infinite;
}

.hero-spark-one {
  right: 34px;
  top: 34px;
}

.hero-spark-two {
  right: 176px;
  bottom: 38px;
  width: 31px;
  height: 31px;
  background: #7fc6a5;
  font-size: 15px;
  animation-delay: -.9s;
}

.home-story-spotlight {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 215px;
  min-height: 205px;
  margin: 16px 0 0;
  overflow: hidden;
  border: 1px solid #efd7b6;
  border-radius: 28px;
  background:
    radial-gradient(circle at 93% 24%, rgba(255, 255, 255, .72), transparent 12rem),
    linear-gradient(125deg, #fff3d9, #f9e3cf 58%, #dcebdc);
  box-shadow: var(--soft-shadow);
  isolation: isolate;
}

.home-story-spotlight:before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -48px;
  top: -74px;
  z-index: -1;
  border: 26px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
}

.home-story-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 25px 10px 25px 28px;
}

.story-eyebrow {
  color: #956139;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.home-story-copy h2 {
  margin: 7px 0 5px;
  color: #2e2922;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.home-story-copy p {
  max-width: 490px;
  margin: 0 0 12px;
  color: #6d6156;
  font-size: 14px;
  line-height: 1.5;
}

.home-story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 17px;
}

.home-story-tags span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 96, 55, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  color: #755a44;
  font-size: 12px;
  font-weight: 750;
}

.home-story-copy > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 9px 18px rgba(31, 85, 68, .19);
}

.home-story-copy > button:hover {
  background: var(--forest-deep);
  color: #fff;
  transform: translateY(-2px);
}

.home-story-art {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 0;
  padding: 8px 8px 0 0;
}

.reading-art-home {
  max-height: 184px;
}

.chapter-map {
  margin-top: 28px;
}

.chapter-map-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 14px;
}

.chapter-map-head h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -.055em;
}

.level-picker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px 7px 13px;
  border: 1px solid #e4dac9;
  border-radius: 16px;
  background: #fffcf5;
  box-shadow: 0 7px 18px rgba(58, 48, 34, .055);
}

.level-picker > span {
  color: #8a948b;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.level-picker select {
  max-width: 210px;
  padding: 7px 24px 7px 7px;
  border: 0;
  background: transparent;
  color: var(--forest);
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  text-align-last: left;
  cursor: pointer;
}

.chapter-list {
  display: grid;
  gap: 12px;
}

.chapter-row {
  --chapter-accent: #e86149;
  --chapter-soft: #fff1ea;
  --chapter-line: #f0d2c8;
  position: relative;
  display: grid;
  grid-template-columns: 112px 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 118px;
  padding: 12px 18px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--chapter-line);
  border-radius: 24px;
  background: linear-gradient(120deg, var(--chapter-soft), #fffdf8 72%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 26px rgba(61, 51, 37, .065);
}

.chapter-row:after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -82px;
  width: 150px;
  height: 150px;
  border: 20px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  pointer-events: none;
}

.chapter-row:hover {
  border-color: var(--chapter-accent);
  background: linear-gradient(120deg, var(--chapter-soft), #fffdf8 65%);
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 17px 32px rgba(61, 51, 37, .11);
}

.chapter-row.is-locked {
  --chapter-accent: #8f978f;
  --chapter-soft: #f3f0e9;
  --chapter-line: #ded9cf;
  box-shadow: none;
}

.chapter-row.is-locked:hover {
  transform: none;
  box-shadow: none;
}

.chapter-tone-gold {
  --chapter-accent: #c8882c;
  --chapter-soft: #fff5d9;
  --chapter-line: #efdab0;
}

.chapter-tone-mint {
  --chapter-accent: #3d8d70;
  --chapter-soft: #ebf7f0;
  --chapter-line: #cfe8da;
}

.chapter-tone-sky {
  --chapter-accent: #4b8eaf;
  --chapter-soft: #eef7fb;
  --chapter-line: #d1e5ee;
}

.chapter-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 92px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, .55);
}

.chapter-art img {
  width: 104px;
  height: 86px;
  object-fit: contain;
}

.chapter-art svg {
  width: 38px;
  height: 46px;
  color: #9ba39b;
}

.chapter-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--chapter-accent);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(59, 50, 38, .13);
}

.chapter-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.chapter-info > span {
  color: var(--chapter-accent);
  font-size: 13px;
  font-weight: 850;
}

.chapter-info small.chapter-name {
  margin-top: 2px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.035em;
}

.chapter-info small.ready,
.chapter-info small.planned {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #66736a;
  font-size: 12px;
  font-weight: 750;
}

.chapter-info small.ready {
  color: #34745a;
}

.chapter-info i {
  width: 8px;
  height: 8px;
  background: var(--chapter-accent);
}

.chapter-progress {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.chapter-info > .chapter-progress {
  display: flex;
}

.chapter-progress i {
  display: block;
  width: 22px;
  height: 5px;
  border-radius: 999px;
  background: #e4ded3;
}

.chapter-progress i.on {
  background: var(--chapter-accent);
}

@keyframes home-progress-in {
  from { width: 0; }
}

@keyframes spark-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

/* Full-screen game menu */
.app-menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 86% 12%, rgba(245, 191, 87, .2), transparent 23rem),
    radial-gradient(circle at 7% 92%, rgba(138, 201, 170, .18), transparent 24rem),
    linear-gradient(145deg, #133a2e, #1d4d3c 54%, #163d31);
  color: #fff9ec;
  scrollbar-width: none;
}

.app-menu[hidden] {
  display: none;
}

.app-menu:not([hidden]) {
  animation: menu-arrive .3s cubic-bezier(.2, .8, .2, 1) both;
}

.menu-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: min(100%, 1000px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px) clamp(20px, 5vw, 52px) 32px;
}

.menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-right: 62px;
}

.menu-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: auto;
}

.menu-brand-mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 247, 220, .45);
  border-radius: 15px;
  background: var(--gold);
  color: var(--forest-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 700;
  transform: rotate(-4deg);
}

.menu-brand-copy {
  display: grid;
  gap: 1px;
}

.menu-brand-copy strong {
  color: #fff8e8;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -.035em;
}

.menu-brand-copy small {
  color: #b7cec1;
  font-size: 12px;
  font-weight: 650;
}

.menu-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  min-height: 225px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 30px;
  background: linear-gradient(130deg, rgba(255, 250, 239, .12), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.menu-feature-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 0 27px 30px;
}

.menu-kicker {
  color: #f5c660;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.menu-feature h2 {
  margin: 8px 0 8px;
  color: #fff9eb;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(32px, 4.6vw, 45px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -.05em;
}

.menu-feature p {
  max-width: 460px;
  color: #c9dccd;
  font-size: 14px;
  line-height: 1.55;
}

.menu-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.menu-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #dbe8df;
  font-size: 12px;
  font-weight: 700;
}

.menu-stats strong {
  color: #ffe293;
  font-size: 17px;
  font-weight: 900;
}

.menu-character {
  display: grid;
  place-items: center;
  align-self: stretch;
  padding: 4px 8px 0;
}

.menu-character .reading-art {
  max-height: 205px;
}

.menu-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin: 0;
  transform: none;
}

.menu-main button {
  width: 100%;
  padding: 0;
  color: var(--forest-deep);
  text-align: left;
}

.menu-card {
  --menu-accent: #e86149;
  --menu-tint: #fff2ea;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 24px;
  gap: 13px;
  align-items: center;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 21px;
  background: var(--menu-tint);
  color: var(--forest-deep);
  box-shadow: 0 13px 26px rgba(0, 0, 0, .1);
}

.menu-card:hover {
  color: var(--forest-deep);
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, .14);
}

.menu-card-reading {
  --menu-accent: #3d8d70;
  --menu-tint: #eef8f2;
}

.menu-card-words {
  --menu-accent: #4b8eaf;
  --menu-tint: #edf7fb;
}

.menu-card-progress {
  --menu-accent: #c8882c;
  --menu-tint: #fff6da;
}

.menu-card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--menu-accent);
  color: #fff;
}

.menu-card-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.7;
}

.menu-card strong {
  display: block;
  color: #1d3f34;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.menu-card small {
  display: block;
  margin-top: 4px;
  color: #6e786f;
  font-size: 12px;
  font-weight: 650;
}

.menu-card-arrow {
  justify-self: end;
  color: var(--menu-accent);
  font-size: 22px;
  font-weight: 800;
}

.menu-new {
  display: inline-flex;
  margin-left: 7px;
  padding: 4px 7px 3px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  vertical-align: middle;
  transform: translateY(-2px);
}

.menu-lower {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.menu-lower button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #dbe8df;
  font-size: 13px;
  font-weight: 700;
}

.menu-lower button:hover {
  background: rgba(255, 255, 255, .13);
  color: #fff8e8;
}

.menu-lower button svg {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  vertical-align: -3px;
}

.menu-return {
  position: fixed;
  left: auto;
  right: clamp(18px, 4vw, 34px);
  top: clamp(20px, 3.5vw, 32px);
  z-index: 31;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: rgba(255, 255, 255, .11);
  color: #fff8e8;
  font-size: 27px;
  font-weight: 350;
  line-height: 1;
}

.menu-return:hover {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.menu-return[hidden] {
  display: none;
}

body.menu-open {
  overflow: hidden;
  background: var(--forest-deep);
}

.menu-open .course-app {
  position: fixed;
  left: 50%;
  top: 0;
  width: min(100vw, var(--app-width));
  height: 100dvh;
  overflow: hidden;
  transform: translateX(-50%);
  filter: blur(5px);
  opacity: .22;
  pointer-events: none;
  box-shadow: none;
}

.menu-open .app-header {
  position: relative;
}

.menu-open .lesson-tabs {
  display: none;
}

@keyframes menu-arrive {
  from { opacity: .4; transform: translateY(12px); }
}

/* Chapter route */
.chapter-intro {
  margin: 20px clamp(16px, 3.5vw, 28px);
  padding: 27px 28px 25px;
  overflow: hidden;
  border: 1px solid #d9e6db;
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 4%, rgba(245, 191, 87, .32), transparent 11rem),
    linear-gradient(135deg, #eef8f1, #fff8e8);
  box-shadow: var(--soft-shadow);
}

.chapter-intro > span {
  color: #3b8065;
  font-size: 13px;
  font-weight: 850;
}

.chapter-intro h2 {
  margin: 7px 0 7px;
  color: var(--ink);
  font-size: clamp(29px, 4.5vw, 38px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -.055em;
}

.chapter-intro p {
  color: #6a786e;
  font-size: 14px;
  line-height: 1.55;
}

.lesson-list {
  display: grid;
  gap: 12px;
  padding: 0 clamp(16px, 3.5vw, 28px);
}

.lesson-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e7ddcf;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 9px 22px rgba(61, 51, 37, .055);
}

.lesson-row:hover {
  border-color: #cbdccc;
  box-shadow: 0 14px 28px rgba(61, 51, 37, .09);
}

.lesson-open {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 18px 10px 18px 20px;
  color: var(--ink);
  text-align: left;
}

.lesson-open > small:first-child {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf5e9;
  color: #44785d;
  font-size: 12px;
  font-weight: 800;
}

.lesson-open > span {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.03em;
}

.lesson-open small {
  color: #7c857d;
  font-size: 13px;
}

.lesson-open small.ready,
.lesson-open small.planned {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef6ea;
  color: #427657;
  font-size: 12px;
  font-weight: 750;
}

.lesson-open small.planned {
  background: #f3f0e9;
  color: #8c918a;
}

.info-button {
  align-self: center;
  justify-self: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dfe7da;
  border-radius: 50%;
  background: #f4f8f0;
  color: #568064;
  font-size: 19px;
  font-weight: 700;
}

.info-button:hover {
  border-color: #afc7aa;
  background: #eaf3e5;
  color: #376b48;
}

.review-row {
  gap: 5px;
  margin: 16px clamp(16px, 3.5vw, 28px) 36px;
  padding: 20px 22px;
  border: 1px solid #ecd8ae;
  border-radius: 21px;
  background: #fff7e2;
  color: #5d4a2d;
  box-shadow: 0 8px 20px rgba(89, 67, 31, .05);
}

.review-row > span {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.review-row small {
  color: #85745a;
  font-size: 13px;
}

.review-row:disabled {
  border-color: #e5dfd3;
  background: #f3f0e9;
  color: #8a8e87;
  opacity: 1;
}

/* Lesson flow */
.tutor-app {
  background:
    radial-gradient(circle at 92% 4%, rgba(245, 191, 87, .11), transparent 20rem),
    #fbf8f0;
}

.lesson-context {
  padding: 14px clamp(18px, 4vw, 34px) 2px;
  color: #8a9189;
  font-size: 13px;
  font-weight: 650;
}

.tutor-feed {
  padding: 16px clamp(16px, 4vw, 34px) 26px;
}

.tutor-step {
  display: block;
  margin: 0 0 13px;
  scroll-margin: 94px 0 120px;
}

.speech-bubble,
.example .speech-bubble,
.practice .speech-bubble {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid #e6ddcf;
  border-radius: 21px;
  background: #fffdf8;
  color: #28352e;
  text-align: left;
  box-shadow: 0 8px 20px rgba(58, 49, 36, .055);
}

.speech-bubble:before,
.example .speech-bubble:before,
.practice .speech-bubble:before {
  display: none;
}

.speech-bubble:hover {
  border-color: #cfc6b7;
  background: #fff;
  color: #28352e;
  transform: translateY(-1px);
}

.example .speech-bubble {
  border-color: #cfe5da;
  background: linear-gradient(135deg, #f0faf4, #fffdf8 78%);
}

.practice .speech-bubble {
  border-color: #f0d5ad;
  background: linear-gradient(135deg, #fff4df, #fffdf8 78%);
}

.step-text {
  color: #26342c;
  font-size: 18px;
  font-weight: 560;
  line-height: 1.55;
  letter-spacing: -.015em;
}

.example .step-text {
  color: #1c3e31;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
}

.step-meaning {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #d8ded5;
  color: #67756b;
  font-size: 14px;
  line-height: 1.6;
}

.practice-time {
  display: inline-flex;
  margin-top: 11px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(237, 107, 80, .1);
  color: #a8513d !important;
  font-size: 12px;
  font-weight: 750;
}

.tutor-step.current .speech-bubble {
  border-color: #e6b54e;
  background: #fffdf5;
  box-shadow: 0 0 0 4px rgba(245, 191, 87, .18), 0 15px 32px rgba(58, 49, 36, .09);
}

.tutor-step.current.example .speech-bubble {
  background: linear-gradient(135deg, #edfaf3, #fffdf8 78%);
}

.tutor-step.current:before {
  display: none;
}

.is-playing .tutor-step:not(.current) {
  opacity: .42;
}

.is-playing .tutor-step.current:before {
  display: none;
}

.lesson-picture {
  display: block;
  margin-top: 14px;
}

.lesson-picture img {
  width: min(100%, 430px);
  height: auto;
  border-radius: 16px;
  background: #fff;
}

.picture-caption {
  display: block;
  margin-top: 6px;
  color: #7b847c;
  font-size: 13px;
  font-weight: 600;
}

.form-visual {
  display: grid;
  gap: 1px;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid #dce5db;
  border-radius: 14px;
  background: #dce5db;
}

.form-visual > span {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) 1fr;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #647068;
  font-size: 14px;
}

.form-visual b {
  color: #214f3c;
}

.tutor-end {
  margin: 18px 0 0;
  padding: 19px 21px;
  border: 1px solid #d8e7d7;
  border-radius: 21px;
  background: linear-gradient(135deg, #eef8ea, #fffdf7);
  box-shadow: 0 10px 24px rgba(55, 74, 53, .06);
}

.tutor-end h3 {
  margin: 0 0 12px;
  color: #335e42;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.tutor-end button {
  min-height: 44px;
  padding: 0 17px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.tutor-end button:hover {
  background: var(--forest-deep);
  color: #fff;
}

.tutor-footer {
  margin: 15px 0 4px;
  padding: 10px 2px;
  color: #8a9189;
  font-size: 12px;
  line-height: 1.5;
}

.tutor-footer button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #dfd8cc;
  border-radius: 999px;
  background: #fff;
  color: #65726a;
  font-size: 12px;
  font-weight: 700;
}

.audio-error {
  margin: 14px clamp(16px, 4vw, 34px) 0;
  padding: 14px 16px;
  border: 1px solid #f0c6ae;
  border-radius: 14px;
  background: #fff1e7;
  color: #824b35;
  font-size: 14px;
  line-height: 1.5;
}

.lesson-tabs {
  bottom: 12px;
  width: min(calc(100% - 24px), 680px);
  padding: 8px 10px;
  border: 1px solid rgba(215, 205, 189, .78);
  border-radius: 22px;
  background: rgba(255, 253, 248, .96);
  box-shadow: 0 16px 40px rgba(49, 43, 32, .16);
  backdrop-filter: blur(18px);
}

.lesson-tabs button {
  gap: 3px;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 16px;
  color: #8e958e;
  font-size: 12px;
  font-weight: 750;
}

.lesson-tabs button:hover {
  background: #f6f1e7;
  color: #58665d;
}

.lesson-tabs button.active {
  background: #e8f2e7;
  color: var(--forest);
}

.lesson-tabs svg {
  width: 25px;
  height: 25px;
}

.sheet {
  padding: 22px clamp(18px, 4vw, 34px) 42px;
}

.small-label {
  margin-bottom: 7px;
  color: #9a7656;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .04em;
}

.objective {
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -.035em;
}

.prereq {
  margin: 15px 0 22px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #f6f1e6;
  color: #69746c;
  font-size: 14px;
  line-height: 1.55;
}

.summary-point {
  margin-bottom: 12px;
  padding: 20px;
  border: 1px solid #e8dfd1;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(58, 49, 36, .045);
}

.summary-point h2 {
  margin-bottom: 8px;
  color: #26362e;
  font-size: 20px;
  font-weight: 820;
  letter-spacing: -.03em;
}

.summary-point p {
  color: #5d6a61;
  font-size: 16px;
  line-height: 1.68;
}

.practice-box {
  margin: 18px 0 22px;
  padding: 20px;
  border: 1px solid #ebd39e;
  border-radius: 21px;
  background: #fff5df;
}

.practice-box h2 {
  margin-bottom: 8px;
  color: #59462b;
  font-size: 18px;
  font-weight: 820;
}

.practice-box p {
  color: #5d5344;
  font-size: 16px;
}

.practice-box small {
  color: #87765d;
  font-size: 12px;
  line-height: 1.55;
}

.next-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 10px 22px rgba(31, 85, 68, .18);
}

.next-button:hover {
  background: var(--forest-deep);
  color: #fff;
  transform: translateY(-1px);
}

.next-button:disabled {
  background: #dfe6dc;
  color: #879087;
  box-shadow: none;
  opacity: 1;
}

.vocab-list {
  display: grid;
  gap: 12px;
  padding: 18px clamp(16px, 4vw, 34px) 0;
}

.vocab-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid #e7ddcf;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(58, 49, 36, .05);
}

.vocab-row h2 {
  color: #1d493a;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.vocab-row p {
  margin: 5px 0;
  color: #59665e;
  font-size: 16px;
}

.vocab-row small {
  color: #7a847c;
  font-size: 14px;
  line-height: 1.55;
}

.vocab-row button {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 62px;
  padding: 11px 9px;
  border-radius: 15px;
  background: #edf6e9;
  color: #3d7754;
  font-size: 12px;
  font-weight: 750;
}

.vocab-row button:hover {
  background: #e2f0de;
  color: #2f6143;
}

.vocab-row svg {
  width: 24px;
  height: 24px;
}

.quiz-sheet {
  padding-top: 18px;
}

.quiz-intro {
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #f1f6ed;
  color: #5b6f5d;
  font-size: 14px;
  line-height: 1.55;
}

.question {
  margin: 0 0 14px;
  padding: 20px;
  border: 1px solid #e7ddcf;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(58, 49, 36, .04);
}

.question legend {
  padding: 0;
  color: #293a31;
  font-size: 18px;
  font-weight: 780;
  line-height: 1.5;
  letter-spacing: -.02em;
}

.answer-options {
  gap: 8px;
  margin-top: 14px;
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #dde4da;
  border-radius: 13px;
  background: #fdfcf8;
  color: #4d5b52;
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
}

.answer-option:hover {
  border-color: #b8cdb2;
  background: #f9fcf7;
}

.answer-option:has(input:checked) {
  border-color: #6ba67a;
  background: #eef8eb;
  color: #315a3d;
}

.answer-option input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #4c8459;
}

.answer-option.correct {
  border-color: #7db889;
  background: #ebf8e8;
  color: #2d6238;
}

.answer-option.wrong {
  border-color: #e5b1a5;
  background: #fff2ef;
  color: #8d3e32;
}

.answer-explanation {
  margin-top: 9px;
  color: #5d6c61;
  font-size: 13px;
  line-height: 1.55;
}

.quiz-result {
  padding: 22px;
  border: 1px solid #d4e5cf;
  border-radius: 22px;
  background: linear-gradient(135deg, #eef9e9, #fffdf7);
  box-shadow: 0 10px 25px rgba(55, 76, 53, .07);
}

.quiz-result h2 {
  color: #285f3a;
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.quiz-result p {
  margin: 8px 0 16px;
  color: #657265;
  font-size: 14px;
}

.quiz-result button {
  min-height: 42px;
  margin-right: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #cddcc8;
  color: #406c4f;
  font-size: 13px;
  font-weight: 800;
}

.quiz-result button:hover {
  background: #eaf5e5;
  color: #2f5a3b;
}

.small-note {
  color: #888f88;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* Story Club shelf and reader */
.reading-app {
  background:
    radial-gradient(circle at 92% 3%, rgba(245, 191, 87, .12), transparent 19rem),
    #fffdf8;
}

.reading-library-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  gap: 18px;
  margin: 18px clamp(16px, 3.5vw, 28px) 22px;
  padding: 28px 30px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 91% 9%, rgba(245, 191, 87, .24), transparent 15rem),
    linear-gradient(135deg, #1b493b, #2a614d);
  color: #fffaf0;
  box-shadow: 0 22px 44px rgba(31, 85, 68, .19);
}

.reading-library-hero:before {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -112px;
  width: 260px;
  height: 260px;
  border: 30px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

.reading-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.reading-hero-topline {
  color: #f5d078;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.reading-hero-topline span:last-child {
  color: #d5e5da;
}

.reading-library-hero h2 {
  max-width: 540px;
  margin: 12px 0 8px;
  color: #fffaf0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(31px, 4.8vw, 43px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.05em;
}

.reading-library-hero > .reading-hero-copy > p {
  max-width: 540px;
  color: #cfe1d4;
  font-size: 14px;
  line-height: 1.55;
}

.reading-trail {
  grid-template-columns: auto minmax(70px, 1fr) auto;
  gap: 11px;
  margin-top: 20px;
  padding-top: 14px;
  border-top-color: rgba(255, 255, 255, .16);
}

.reading-streak {
  color: #dce9df;
  font-size: 12px;
  font-weight: 700;
}

.reading-streak strong {
  color: #ffde88;
  font-size: 24px;
  font-weight: 900;
}

.trail-line {
  height: 8px;
  background: rgba(255, 255, 255, .14);
}

.reading-next {
  color: #dce9df;
  font-size: 12px;
  font-weight: 650;
}

.reading-hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
}

.reading-hero-art .reading-art {
  max-height: 185px;
}

.story-shelf {
  padding: 0 clamp(16px, 3.5vw, 28px);
}

.story-shelf-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 13px;
}

.story-shelf-heading h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 27px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -.05em;
}

.story-shelf-count {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6e9;
  color: #48745b !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  white-space: nowrap;
}

.story-shelf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.story-shelf-card {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--story-line);
  border-radius: 23px;
  background: linear-gradient(135deg, var(--story-soft), #fffdfa 76%);
  color: var(--story-deep);
  text-align: left;
  box-shadow: 0 9px 22px rgba(58, 49, 36, .055);
}

.story-shelf-card:hover {
  border-color: var(--story-accent);
  color: var(--story-deep);
  transform: translateY(-3px);
  box-shadow: 0 17px 32px rgba(58, 49, 36, .11);
}

.story-shelf-card.is-featured {
  grid-column: 1 / -1;
  grid-template-columns: 235px minmax(0, 1fr);
  min-height: 225px;
  padding: 14px;
  border-width: 2px;
  box-shadow: 0 16px 34px rgba(58, 49, 36, .1);
}

.story-shelf-card.is-featured:after {
  content: "";
  position: absolute;
  right: -52px;
  bottom: -100px;
  width: 190px;
  height: 190px;
  border: 23px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
}

.story-card-art {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 120px;
  overflow: hidden;
  border-radius: 17px;
  background: rgba(255, 255, 255, .48);
}

.reading-art-card {
  max-height: 108px;
}

.story-shelf-card.is-featured .story-card-art {
  min-height: 190px;
  border-radius: 21px;
}

.story-shelf-card.is-featured .reading-art-card {
  max-height: 180px;
}

.story-card-number {
  left: 8px;
  top: 7px;
  width: 30px;
  height: 30px;
  background: var(--story-accent);
  font-size: 12px;
}

.story-card-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: center;
  padding: 2px 7px 2px 0;
}

.story-card-flag {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--story-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
}

.story-card-meta {
  color: var(--story-accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .05em;
}

.story-card-copy > strong {
  margin-top: 4px;
  color: var(--story-deep);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.story-shelf-card.is-featured .story-card-copy > strong {
  font-size: 32px;
}

.story-card-korean {
  margin-top: 4px;
  color: var(--story-deep);
  opacity: .75;
  font-size: 13px;
  font-weight: 750;
}

.story-shelf-card.is-featured .story-card-korean {
  font-size: 15px;
}

.story-card-blurb {
  margin-top: 7px;
  color: #69675f;
  font-size: 13px;
  line-height: 1.45;
}

.story-shelf-card.is-featured .story-card-blurb {
  max-width: 500px;
  font-size: 15px;
}

.story-card-status {
  gap: 7px;
  margin-top: 11px;
  padding: 6px 11px 6px 7px;
  background: rgba(255, 255, 255, .78);
  color: var(--story-accent);
  font-size: 12px;
}

.story-card-status i {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

.reading-library-note {
  padding: 14px 24px 38px;
  color: #9b978f;
  font-size: 12px;
  line-height: 1.6;
}

.reading-story {
  background: var(--story-paper);
}

.story-cover {
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 18px;
  padding: 34px clamp(22px, 4vw, 34px) 30px;
  border-bottom-color: var(--story-line);
}

.story-cover h1 {
  max-width: 590px;
  margin: 10px 0 3px;
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.01;
}

.story-cover-korean {
  font-size: 18px;
}

.story-cover-kicker {
  margin-top: 14px;
  color: #625e55;
  font-size: 15px;
  line-height: 1.55;
}

.story-cover-cast {
  margin-top: 17px;
  color: #72736b;
  font-size: 12px;
}

.reading-art-cover {
  max-height: 195px;
}

.reading-toolbar {
  top: 72px;
  gap: 8px;
  min-height: 57px;
  padding: 9px clamp(18px, 4vw, 34px);
  background: rgba(255, 252, 246, .96);
}

.reading-toolbar button {
  min-height: 38px;
  padding: 0 14px;
  border-color: #dfd8cc;
  color: #5c665e;
  font-size: 13px;
  font-weight: 750;
}

.reading-toolbar button[aria-pressed="true"] {
  border-color: #aacba8;
  background: #eaf6e7;
  color: #376b43;
}

.reading-help-label {
  color: #8e968e;
  font-size: 12px;
}

.story-paper {
  padding: 34px clamp(22px, 4vw, 40px) 16px;
}

.story-paragraph {
  max-width: 700px;
  margin-bottom: 31px;
}

.story-first-label {
  margin-top: 13px;
  font-size: 11px;
  letter-spacing: .1em;
}

.story-text {
  color: #2a2c27;
  font-size: 22px;
  line-height: 1.82;
}

.story-translation {
  margin-top: 12px;
  padding: 11px 14px;
  color: #716f68;
  font-size: 14px;
  line-height: 1.68;
}

.story-expression-box,
.reading-check {
  margin: 12px clamp(16px, 3.5vw, 28px) 20px;
  padding: 23px 21px;
  border-radius: 23px;
}

.story-section-heading > span {
  font-size: 11px;
}

.story-section-heading h2 {
  font-size: 22px;
}

.story-expression-list {
  margin-top: 14px;
}

.story-expression-list > div {
  padding: 12px 14px;
}

.story-expression-list strong {
  font-size: 16px;
}

.story-expression-list span {
  font-size: 13px;
}

.reading-check-progress,
.reading-question legend,
.reading-answer,
.reading-answer-note {
  font-size: 14px;
}

.reading-answer {
  min-height: 46px;
  padding: 12px 13px;
  border-radius: 13px;
}

.reading-primary-action {
  min-height: 50px;
  border-radius: 999px;
  background: var(--forest);
  font-size: 15px;
}

.reading-result {
  border-radius: 18px;
}

.reading-result-actions > button {
  border-radius: 999px;
}

.story-done-strip {
  border-radius: 19px;
}

/* Word lookups stay tactile without getting in the way of reading. */
.reading-word-pop {
  padding: 16px 16px 15px;
  border: 1px solid #ddd4c5;
  border-radius: 19px;
  background: rgba(255, 253, 247, .985);
  box-shadow: 0 22px 56px rgba(43, 38, 31, .23);
}

.word-pop-kicker {
  color: #a27d5d;
  font-size: 10px;
}

.reading-word-pop > strong {
  margin-top: 3px;
  font-size: 25px;
}

.reading-word-pop > p {
  margin-top: 4px;
  color: #6c6b62;
  font-size: 13px;
  line-height: 1.5;
}

.word-pop-actions button {
  min-height: 38px;
  border-radius: 11px;
  font-size: 12px;
}

.word-pop-actions button:last-child {
  border-color: var(--forest);
  background: var(--forest);
}

.reading-word-dialog {
  inset: 90px max(18px, calc((100vw - var(--app-width))/2 + 16px)) auto auto;
  width: min(385px, calc(100vw - 36px));
  max-height: calc(100dvh - 118px);
  border-color: #ddd3c3;
  border-radius: 26px;
  background: #fffdf8;
  box-shadow: 0 34px 100px rgba(34, 32, 27, .32);
}

.reading-word-dialog::backdrop {
  background: rgba(27, 45, 36, .32);
  backdrop-filter: blur(3px);
}

.word-dialog-head {
  padding: 17px 18px 0;
  color: #9e7b5c;
  font-size: 11px;
}

.word-dialog-head button {
  width: 36px;
  height: 36px;
  background: #f2ece2;
}

.word-dialog-title {
  padding: 9px 19px 0;
}

.word-dialog-title h2 {
  font-size: 36px;
}

.word-dialog-title span {
  margin-top: 3px;
  color: #86877e;
  font-size: 12px;
}

.word-listen {
  flex-basis: 44px;
  width: 44px;
  height: 44px;
  border-color: #cfdfc9;
  background: #eef7eb;
  color: #3f7250;
}

.word-dialog-korean {
  margin: 20px 19px 0;
  color: #c0523f;
  font-size: 27px;
}

.word-dialog-meaning {
  margin: 7px 19px 0;
  color: #5b655e;
  font-size: 15px;
}

.reading-word-dialog blockquote {
  margin: 16px 19px 0;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f5f0e6;
  color: #706d64;
  font-size: 14px;
}

.word-dialog-actions {
  gap: 9px;
  padding: 19px 19px 0;
}

.word-dialog-actions button {
  min-height: 48px;
  border-radius: 999px;
  background: var(--forest);
  font-size: 14px;
}

.word-dialog-actions button:disabled {
  background: #e9f3e4;
  color: #447454;
}

.word-dialog-actions .word-dialog-done {
  border-color: #ded6ca;
  background: #fff;
}

.word-dialog-note {
  margin: 11px 19px 19px;
  color: #96978f;
  font-size: 11px;
}

/* Shared dialogs and feedback */
#detail {
  max-width: 520px;
  padding: 25px;
  border: 1px solid #e3d9c9;
  border-radius: 27px;
  background: #fffdf8;
  box-shadow: 0 34px 100px rgba(34, 32, 27, .3);
}

#detail::backdrop {
  background: rgba(24, 45, 36, .34);
  backdrop-filter: blur(4px);
}

#detail h2 {
  color: #223c31;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -.04em;
}

#detail p {
  color: #5d685f;
  font-size: 15px;
  line-height: 1.65;
}

#close-detail {
  min-height: 46px;
  margin-top: 16px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

#close-detail:hover {
  background: var(--forest-deep);
  color: #fff;
}

#toast {
  bottom: 100px;
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  background: #1b4135;
  box-shadow: 0 12px 30px rgba(20, 51, 41, .24);
  color: #fffaf0;
  font-size: 13px;
  line-height: 1.5;
}

@media (min-width: 761px) {
  .tutor-feed,
  .sheet,
  .vocab-list {
    width: 100%;
    max-width: 800px;
    margin-right: auto;
    margin-left: auto;
  }

  .lesson-context {
    width: 100%;
    max-width: 800px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
  }
}

@media (max-width: 760px) {
  .app-header {
    height: 66px;
    padding: 0 17px;
  }

  .app-header h1 {
    font-size: 19px;
  }

  .app-header button {
    font-size: 14px;
  }

  #menu {
    padding: 0 11px;
  }

  .home-shell {
    padding-top: 14px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) 145px;
    min-height: 238px;
    border-radius: 27px;
  }

  .home-hero-copy {
    padding: 26px 0 24px 23px;
  }

  .home-hero h2 {
    font-size: clamp(32px, 8.6vw, 42px);
  }

  .home-hero p {
    margin: 12px 0 17px;
    font-size: 14px;
  }

  .home-cta {
    min-height: 46px;
    padding: 0 18px;
    font-size: 15px;
  }

  .home-progress {
    width: min(100%, 260px);
    margin-top: 18px;
  }

  .home-hero-art {
    overflow: visible;
  }

  .home-hero-art:before {
    width: 168px;
    height: 168px;
    right: -70px;
  }

  .home-hero-art:after {
    width: 116px;
    height: 116px;
    right: -42px;
  }

  .hero-letter {
    width: 102px;
    height: 102px;
    border-radius: 29px;
    font-size: 48px;
  }

  .hero-spark-one {
    right: 3px;
    top: 27px;
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .hero-spark-two {
    right: 104px;
    bottom: 28px;
    width: 27px;
    height: 27px;
    font-size: 13px;
  }

  .home-story-spotlight {
    grid-template-columns: minmax(0, 1fr) 132px;
    min-height: 189px;
    border-radius: 24px;
  }

  .home-story-copy {
    padding: 21px 2px 21px 20px;
  }

  .home-story-copy h2 {
    font-size: 25px;
  }

  .home-story-copy p {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .home-story-tags {
    margin-bottom: 13px;
  }

  .home-story-tags span {
    padding: 5px 8px;
    font-size: 11px;
  }

  .home-story-copy > button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }

  .home-story-art {
    padding: 6px 3px 0 0;
  }

  .reading-art-home {
    max-height: 142px;
  }

  .chapter-map {
    margin-top: 24px;
  }

  .chapter-map-head {
    display: grid;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 12px;
  }

  .chapter-map-head h2 {
    font-size: 27px;
  }

  .level-picker {
    justify-content: space-between;
    width: 100%;
  }

  .level-picker select {
    max-width: 62%;
    font-size: 13px;
  }

  .chapter-row {
    grid-template-columns: 86px 50px minmax(0, 1fr);
    gap: 12px;
    min-height: 110px;
    padding: 10px 13px 10px 10px;
    border-radius: 21px;
  }

  .chapter-art {
    height: 84px;
    border-radius: 16px;
  }

  .chapter-art img {
    width: 90px;
    height: 76px;
  }

  .chapter-number {
    width: 48px;
    height: 48px;
    font-size: 25px;
  }

  .chapter-info small.chapter-name {
    font-size: 18px;
  }

  .chapter-info > span {
    font-size: 12px;
  }

  .chapter-info small.ready,
  .chapter-info small.planned {
    margin-top: 6px;
    padding: 4px 7px;
    font-size: 11px;
  }

  .chapter-progress {
    margin-top: 7px;
  }

  .chapter-progress i {
    width: 18px;
    height: 4px;
  }

  .menu-inner {
    gap: 16px;
    padding: max(20px, env(safe-area-inset-top)) 17px 26px;
  }

  .menu-top {
    padding-right: 54px;
  }

  .menu-brand-mark {
    width: 41px;
    height: 41px;
    border-radius: 13px;
    font-size: 24px;
  }

  .menu-brand-copy strong {
    font-size: 19px;
  }

  .menu-feature {
    grid-template-columns: 1fr;
    min-height: 188px;
    border-radius: 25px;
  }

  .menu-feature-copy {
    padding: 23px 22px;
  }

  .menu-feature h2 {
    font-size: 34px;
  }

  .menu-character {
    display: none;
  }

  .menu-main {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .menu-card {
    grid-template-columns: 48px minmax(0, 1fr) 20px;
    min-height: 74px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .menu-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .menu-card strong {
    font-size: 18px;
  }

  .menu-return {
    top: max(18px, env(safe-area-inset-top));
    right: 17px;
    width: 42px;
    height: 42px;
  }

  .chapter-intro {
    margin: 15px 16px;
    padding: 23px 21px;
    border-radius: 24px;
  }

  .chapter-intro h2 {
    font-size: 30px;
  }

  .lesson-list {
    padding: 0 16px;
  }

  .lesson-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    border-radius: 18px;
  }

  .lesson-open {
    padding: 16px 7px 16px 17px;
  }

  .lesson-open > span {
    font-size: 18px;
  }

  .review-row {
    margin: 14px 16px 30px;
    border-radius: 18px;
  }

  .lesson-context {
    padding: 12px 17px 1px;
    font-size: 12px;
  }

  .tutor-feed {
    padding: 13px 14px 24px;
  }

  .speech-bubble,
  .example .speech-bubble,
  .practice .speech-bubble {
    padding: 16px 16px;
    border-radius: 18px;
  }

  .step-text {
    font-size: 17px;
    line-height: 1.55;
  }

  .example .step-text {
    font-size: 19px;
  }

  .step-meaning {
    font-size: 13px;
  }

  .lesson-tabs button {
    min-height: 54px;
  }

  .lesson-tabs {
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    padding: 7px 6px;
    border-radius: 20px;
  }

  .sheet {
    padding: 18px 16px 36px;
  }

  .objective {
    font-size: 21px;
  }

  .summary-point {
    padding: 17px;
    border-radius: 18px;
  }

  .summary-point h2 {
    font-size: 18px;
  }

  .summary-point p {
    font-size: 15px;
  }

  .vocab-list {
    padding: 14px 16px 0;
  }

  .vocab-row {
    padding: 17px 16px;
    border-radius: 18px;
  }

  .vocab-row h2 {
    font-size: 25px;
  }

  .vocab-row p {
    font-size: 15px;
  }

  .vocab-row small {
    font-size: 13px;
  }

  .vocab-row button {
    min-width: 56px;
    padding: 9px 7px;
  }

  .question {
    padding: 17px;
    border-radius: 18px;
  }

  .question legend {
    font-size: 16px;
  }

  .answer-option {
    font-size: 14px;
  }

  .quiz-result {
    padding: 18px;
    border-radius: 19px;
  }

  .quiz-result h2 {
    font-size: 20px;
  }

  .reading-library-hero {
    grid-template-columns: minmax(0, 1fr) 105px;
    gap: 8px;
    margin: 14px 16px 19px;
    padding: 23px 20px;
    border-radius: 25px;
  }

  .reading-library-hero h2 {
    font-size: 30px;
  }

  .reading-library-hero > .reading-hero-copy > p {
    font-size: 13px;
  }

  .reading-trail {
    grid-template-columns: auto 1fr;
    gap: 7px 10px;
    margin-top: 17px;
  }

  .reading-next {
    grid-column: 1 / -1;
    text-align: left;
  }

  .reading-hero-art .reading-art {
    max-height: 120px;
  }

  .story-shelf {
    padding: 0 16px;
  }

  .story-shelf-heading h2 {
    font-size: 24px;
  }

  .story-shelf-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .story-shelf-card,
  .story-shelf-card.is-featured {
    grid-column: auto;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 11px;
    min-height: 0;
    padding: 8px;
    border-radius: 19px;
  }

  .story-shelf-card.is-featured:after {
    display: none;
  }

  .story-card-art,
  .story-shelf-card.is-featured .story-card-art {
    min-height: 98px;
    border-radius: 14px;
  }

  .reading-art-card,
  .story-shelf-card.is-featured .reading-art-card {
    max-height: 94px;
  }

  .story-shelf-card.is-featured .story-card-copy > strong {
    font-size: 22px;
  }

  .story-shelf-card.is-featured .story-card-korean {
    font-size: 13px;
  }

  .story-shelf-card.is-featured .story-card-blurb {
    display: none;
  }

  .story-card-copy {
    padding: 2px 4px 2px 0;
  }

  .story-card-meta {
    font-size: 10px;
  }

  .story-card-copy > strong {
    font-size: 18px;
  }

  .story-card-korean {
    font-size: 12px;
  }

  .story-card-blurb {
    font-size: 12px;
  }

  .story-card-status {
    margin-top: 8px;
    font-size: 11px;
  }

  .story-cover {
    grid-template-columns: minmax(0, 1fr) 126px;
    gap: 5px;
    padding: 26px 18px 22px;
  }

  .story-cover h1 {
    font-size: clamp(32px, 8.7vw, 39px);
  }

  .story-cover-korean {
    font-size: 15px;
  }

  .story-cover-kicker {
    margin-top: 10px;
    font-size: 13px;
  }

  .story-cover-cast {
    margin-top: 12px;
    font-size: 11px;
  }

  .reading-art-cover {
    max-height: 138px;
  }

  .reading-toolbar {
    top: 66px;
    min-height: 52px;
    padding: 7px 12px;
    overflow-x: auto;
  }

  .reading-toolbar button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12px;
  }

  .story-paper {
    padding: 25px 19px 10px;
  }

  .story-text {
    font-size: 20px;
    line-height: 1.78;
  }

  .story-translation {
    font-size: 13px;
  }

  .story-expression-box,
  .reading-check {
    margin: 10px 16px 17px;
    padding: 19px 17px;
    border-radius: 20px;
  }

  .story-section-heading h2 {
    font-size: 20px;
  }

  .reading-word-dialog {
    inset: auto 8px calc(8px + env(safe-area-inset-bottom));
    width: auto;
    max-height: 82dvh;
    border-radius: 25px;
  }

  .word-dialog-korean {
    font-size: 24px;
  }

  .word-dialog-actions {
    grid-template-columns: 1fr;
  }

  #toast {
    bottom: 96px;
  }
}

@media (max-width: 420px) {
  .header-progress {
    padding: 7px 9px;
    font-size: 11px;
  }

  .header-progress strong {
    font-size: 15px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) 105px;
  }

  .home-hero-copy {
    padding-left: 20px;
  }

  .home-hero h2 {
    font-size: 32px;
  }

  .hero-letter {
    width: 86px;
    height: 86px;
    font-size: 41px;
  }

  .hero-spark-two {
    right: 83px;
  }

  .home-story-spotlight {
    grid-template-columns: minmax(0, 1fr) 108px;
  }

  .home-story-copy h2 {
    font-size: 22px;
  }

  .home-story-copy p {
    font-size: 12px;
  }

  .home-story-tags span:last-child {
    display: none;
  }

  .reading-art-home {
    max-height: 122px;
  }

  .chapter-row {
    grid-template-columns: 78px 45px minmax(0, 1fr);
    gap: 9px;
    min-height: 104px;
    padding: 9px 10px 9px 9px;
  }

  .chapter-art {
    height: 78px;
  }

  .chapter-art img {
    width: 80px;
    height: 70px;
  }

  .chapter-number {
    width: 43px;
    height: 43px;
    font-size: 23px;
  }

  .chapter-info small.chapter-name {
    font-size: 17px;
  }

  .chapter-progress i {
    width: 14px;
  }

  .reading-library-hero {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .reading-library-hero h2 {
    font-size: 27px;
  }

  .reading-hero-art .reading-art {
    max-height: 103px;
  }
}

@media (max-width: 350px) {
  .home-hero-art,
  .home-story-art,
  .reading-hero-art {
    display: none;
  }

  .home-hero,
  .home-story-spotlight {
    grid-template-columns: 1fr;
  }

  .chapter-row {
    grid-template-columns: 68px 41px minmax(0, 1fr);
    gap: 8px;
  }

  .chapter-art {
    height: 70px;
  }

  .chapter-art img {
    width: 70px;
    height: 64px;
  }

  .chapter-number {
    width: 39px;
    height: 39px;
    font-size: 21px;
  }

  .chapter-info small.ready,
  .chapter-info small.planned {
    padding: 3px 6px;
  }

  .story-cover {
    grid-template-columns: 1fr;
  }

  .story-cover-art {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .home-progress-track i,
  .hero-spark,
  .app-menu:not([hidden]),
  .story-shelf-card,
  .reading-word-dialog[open] {
    animation: none !important;
    transition: none !important;
  }
}
