:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #66736f;
  --line: #d8e2dc;
  --paper: #fff8ed;
  --panel: #ffffff;
  --nav: #315a7d;
  --green: #2f7d5f;
  --green-soft: #dff1e8;
  --blue: #2d68b2;
  --blue-soft: #e2ecf8;
  --gold: #9a6816;
  --gold-soft: #f8ead0;
  --coral: #c85d49;
  --coral-soft: #fae3dc;
  --violet: #6b5bb7;
  --violet-soft: #ebe8fb;
  --shadow: 0 16px 38px rgba(52, 77, 105, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fff8ed 0%, #eef7ff 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 96px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

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

.profile-gate {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 100vh;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.12), rgba(255, 248, 237, 0.92) 68%, #fff8ed 100%),
    url("assets/reading-world.png") center top / cover no-repeat,
    linear-gradient(180deg, #fff8ed 0%, #eef7ff 100%);
  overflow: hidden;
}

.profile-hero {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto 18px;
  text-align: center;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.95);
}

.profile-hero h1 {
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.95;
}

.profile-hero p {
  color: var(--muted);
  font-size: 1.08rem;
}

.profile-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 0.55fr);
  gap: 20px;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.profile-card {
  display: grid;
  min-height: 270px;
  padding: 14px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 58px rgba(40, 85, 116, 0.22);
  backdrop-filter: blur(8px);
}

.profile-card.child {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, #ffe077, #8edbe7 48%, #f7a88a);
}

.profile-card.parent {
  align-self: end;
  min-height: 170px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, #dff1e8, #f8ead0);
}

.profile-avatar-art {
  width: min(190px, 72%);
  aspect-ratio: 1;
  margin: -44px auto 0;
  border: 5px solid #fff;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 18px 34px rgba(35, 70, 90, 0.22);
}

.parent-gate-mark {
  display: grid;
  place-items: center;
  width: 72px;
  min-height: 72px;
  margin: 4px auto 0;
  border-radius: 22px;
  background: #e2f0e8;
  color: #2f5d4b;
  font-weight: 950;
}

.profile-avatar.small {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #ffd36b;
  color: #27323f;
  font-size: 1.2rem;
  font-weight: 950;
}

.profile-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.profile-name-area {
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: 10px;
}

.profile-name-row {
  position: relative;
  min-height: 116px;
  display: grid;
  place-items: center;
}

.profile-name-button {
  width: 100%;
  min-height: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(2.25rem, 5vw, 4.2rem);
  font-weight: 950;
  letter-spacing: 0;
  text-align: center;
}

.profile-card.child .profile-name-button:hover {
  color: #2d68b2;
  transform: translateY(-1px);
}

.profile-card.parent .profile-name-button {
  color: #2f5d4b;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.edit-name-button {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(49, 90, 125, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-weight: 900;
}

.edit-name-button:hover {
  background: #fff;
  color: var(--blue);
}

.site-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.child-mode .site-shell {
  display: block;
}

.child-mode .sidebar {
  display: none;
}

.site-shell[hidden],
.profile-gate[hidden] {
  display: none;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(49, 90, 125, 0.98), rgba(43, 112, 103, 0.98));
  color: #f7fbf9;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #f3c665;
  color: #1b302a;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.learner-button span,
.sidebar-panel span {
  color: #c8ddd6;
  font-size: 0.86rem;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #f3c665;
}

.learner-buttons,
.nav-list {
  display: grid;
  gap: 8px;
}

.learner-button,
.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  text-align: left;
}

.back-profile-button {
  width: 100%;
}

.learner-button {
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbf9;
}

.learner-button strong,
.learner-button span {
  display: block;
}

.learner-button.active,
.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.nav-item {
  min-height: 42px;
  padding: 10px 12px;
  background: transparent;
  color: #d9e9e3;
  font-weight: 800;
}

.sidebar-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-panel strong,
.sidebar-panel span {
  display: block;
}

.sidebar-panel span {
  margin-top: 8px;
  line-height: 1.45;
}

.main-area {
  min-width: 0;
  padding: 28px;
}

.child-mode .main-area {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar,
.section-heading,
.mission-card-top,
.top-actions,
.card-actions,
.popover-actions,
.hero-stats,
.review-row {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.child-mode .topbar {
  min-height: 82px;
  padding: 14px 18px;
  border: 2px solid rgba(49, 90, 125, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.child-mode .topbar h1 {
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.child-mode .hero-band {
  display: none;
}

.top-actions,
.card-actions,
.popover-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.top-actions {
  justify-content: flex-end;
}

.current-date {
  display: grid;
  align-content: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: right;
  box-shadow: 0 10px 22px rgba(49, 90, 125, 0.08);
}

.date-label,
.date-value {
  display: block;
}

.date-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-value {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.15;
}

.child-mode .current-date.home-date {
  min-height: 56px;
  padding: 8px 16px;
  border: 4px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff4cf, #e8f8ff);
  box-shadow: 0 16px 30px rgba(49, 90, 125, 0.14);
}

.child-mode .current-date.home-date .date-label {
  color: var(--green);
}

.child-mode .current-date.home-date .date-value {
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: 1.08rem;
}

.primary-action,
.secondary-action,
.icon-button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-action {
  padding: 0 14px;
  border: 0;
  background: var(--green);
  color: #fff;
}

.secondary-action,
.icon-button {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.audio-active {
  border-color: #c85d49;
  background: #fae3dc;
  color: #8e3425;
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  text-decoration: none;
}

.hero-band,
.wide-panel,
.mission-card,
.word-card,
.review-block,
.skill-column,
.practice-card,
.exam-card,
.parent-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
}

.child-mode .hero-band {
  background:
    linear-gradient(135deg, rgba(255, 224, 119, 0.52), rgba(142, 219, 231, 0.42), rgba(250, 227, 220, 0.74)),
    #fff;
  border-width: 2px;
  border-radius: 24px;
}

.child-mode .hero-band h2 {
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.parent-mode .hero-band {
  background:
    linear-gradient(135deg, rgba(223, 241, 232, 0.78), rgba(255, 255, 255, 0.96)),
    #fff;
}

.child-mode .mission-card {
  border-width: 2px;
  min-height: 278px;
  padding-top: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98)),
    var(--panel);
  border-radius: 22px;
}

.child-mode .mission-card h3 {
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: 1.24rem;
}

.child-mode .nav-item[hidden] {
  display: none;
}

.parent-mode .nav-item[hidden] {
  display: none;
}

.hero-band p {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.55;
}

.hero-stats {
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-stats span,
.status-pill,
.time-chip,
.domain-chip,
.score-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-stats span {
  padding: 10px 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.hero-stats strong {
  margin-right: 5px;
  font-size: 1.1rem;
}

.section-view {
  display: none;
}

.section-view.active {
  display: block;
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.status-pill {
  padding: 0 10px;
  background: var(--green-soft);
  color: var(--green);
}

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

.child-weekly-plan {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.weekly-story-card,
.weekly-knowledge-card,
.weekly-vocab-card,
.detail-card {
  border: 2px solid rgba(49, 90, 125, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.weekly-story-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 224, 119, 0.5), rgba(142, 219, 231, 0.32)),
    #fff;
}

.child-mode #section-today > .section-heading {
  display: none;
}

.child-mode .child-weekly-plan {
  grid-template-columns: minmax(280px, 1.05fr) minmax(220px, 0.72fr) minmax(320px, 1.18fr);
  align-items: stretch;
  margin-bottom: 24px;
}

.weekly-target-story {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.88), transparent 22%),
    linear-gradient(135deg, rgba(142, 219, 231, 0.62), rgba(255, 211, 107, 0.58) 48%, rgba(250, 227, 220, 0.82)),
    #fff;
}

.weekly-target-story::after {
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  border: 18px solid rgba(255, 255, 255, 0.42);
  border-radius: 44px;
  content: "";
  transform: rotate(14deg);
}

.weekly-target-story h3 {
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.6rem, 3.2vw, 2.45rem);
  line-height: 1.03;
}

.weekly-target-story p {
  position: relative;
  z-index: 1;
  color: #425955;
  font-weight: 760;
}

.weekly-story-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.video-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: #fff;
  color: var(--coral);
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(49, 90, 125, 0.12);
}

.weekly-knowledge-card {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(234, 248, 239, 0.9)),
    #fff;
}

.weekly-knowledge-card h3,
.weekly-vocab-card h3 {
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: 1.22rem;
}

.weekly-vocab-card {
  padding: 18px;
}

.weekly-story-visual {
  position: relative;
  min-height: 126px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 28%, #fff 0 13%, transparent 14%),
    linear-gradient(135deg, #8edbe7, #ffd36b);
  overflow: hidden;
}

.book-shape {
  position: absolute;
  left: 24px;
  bottom: 22px;
  width: 82px;
  height: 52px;
  border-radius: 10px 10px 18px 18px;
  background: #fff;
  box-shadow: inset 40px 0 #fae3dc;
  transform: rotate(-5deg);
}

.spark-shape {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f7a88a;
  box-shadow: 0 0 0 8px rgba(247, 168, 138, 0.25);
}

.focus-chips,
.vocab-strip,
.word-tile-row,
.spelling-word-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-chips span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
}

.weekly-vocab-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.weekly-vocab-head span {
  align-self: start;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.vocab-strip {
  max-height: 230px;
  overflow: auto;
}

.vocab-strip article {
  display: grid;
  min-width: 118px;
}

.vocab-word-button {
  min-height: 52px;
  padding: 0 15px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #eaf8ef);
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(49, 90, 125, 0.1);
}

.child-mode .mission-path {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  overflow: visible;
}

.child-mode .mission-path::before {
  display: none;
}

.mission-card,
.word-card,
.practice-card,
.exam-card,
.parent-card,
.review-block,
.skill-column,
.wide-panel {
  padding: 16px;
}

.mission-card {
  position: relative;
  min-height: 238px;
}

.path-step {
  transform: translateY(calc((var(--step-index) % 2) * 18px));
}

.mission-card.done {
  border-color: var(--green);
  outline: 3px solid rgba(47, 125, 95, 0.12);
}

.mission-card-top {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.center-icon {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #ffd36b;
  color: #27323f;
  font-weight: 950;
}

.child-mode .center-icon {
  top: -18px;
  left: 50%;
  width: 58px;
  height: 58px;
  transform: translateX(-50%);
  border: 4px solid #fff;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(39, 50, 63, 0.15);
  font-size: 1.05rem;
}

.launcher-card {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 0;
  overflow: hidden;
}

.child-mode .launcher-card {
  min-height: 214px;
  padding: 12px;
}

.today-practice-heading {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.today-practice-heading h3 {
  margin-bottom: 0;
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1;
}

.practice-entry-card {
  position: relative;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 260px;
  padding: 18px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  box-shadow: 0 24px 48px rgba(49, 90, 125, 0.16);
}

.practice-entry-card.done {
  outline: 4px solid rgba(47, 125, 95, 0.16);
}

.story-entry {
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.78), transparent 25%),
    linear-gradient(135deg, #dff6ff, #fff4cf 52%, #fae3dc);
}

.writing-entry {
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.8), transparent 26%),
    linear-gradient(135deg, #eaf8ef, #fff 46%, #e2ecf8);
}

.practice-entry-art {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 6px solid #fff;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 34px rgba(49, 90, 125, 0.14);
}

.practice-entry-art span {
  font-size: 2.4rem;
}

.practice-entry-copy {
  display: grid;
  gap: 9px;
}

.practice-entry-card h3 {
  margin-bottom: 0;
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.6rem);
  line-height: 0.98;
}

.practice-entry-card p {
  margin-bottom: 0;
  color: #4c625e;
  font-size: 1.02rem;
  font-weight: 780;
  line-height: 1.45;
}

.practice-entry-card .primary-action {
  grid-column: 1 / -1;
  min-height: 54px;
  border-radius: 18px;
  font-size: 1.04rem;
}

.mission-visual {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 112px;
  border-radius: 20px;
  background: linear-gradient(135deg, #dff1e8, #fff);
  overflow: hidden;
}

.theme-sky {
  background: linear-gradient(180deg, #e8f8ff, #fff);
}

.theme-coral {
  background: linear-gradient(180deg, #fff0e8, #fff);
}

.theme-green {
  background: linear-gradient(180deg, #eaf8ef, #fff);
}

.theme-peach {
  background: linear-gradient(180deg, #ffece7, #fff);
}

.theme-mint {
  background: linear-gradient(180deg, #e8f7f0, #fff);
}

.theme-blue {
  background: linear-gradient(180deg, #eaf2ff, #fff);
}

.theme-yellow {
  background: linear-gradient(180deg, #fff7d8, #fff);
}

.mission-visual span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 4px solid #fff;
  border-radius: 22px;
  background: #ffd36b;
  color: #27323f;
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(39, 50, 63, 0.16);
}

.child-mode .mission-visual {
  min-height: 74px;
  border-radius: 16px;
}

.child-mode .mission-visual span {
  width: 46px;
  height: 46px;
  border-width: 3px;
  border-radius: 16px;
  font-size: 1.08rem;
}

.child-mode .launcher-card h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.mission-visual.listen {
  background: linear-gradient(135deg, #8edbe7, #fff4cf);
}

.mission-visual.sight {
  background: linear-gradient(135deg, #ffd36b, #fae3dc);
}

.mission-visual.blocks {
  background: linear-gradient(135deg, #ebe8fb, #dff1e8);
}

.mission-visual.speaking {
  background: linear-gradient(135deg, #fae3dc, #e2ecf8);
}

.mission-visual.reading {
  background: linear-gradient(135deg, #dff1e8, #f8ead0);
}

.mission-visual.writing {
  background: linear-gradient(135deg, #e2ecf8, #fff);
}

.mission-visual.warmup {
  background: linear-gradient(135deg, #fff4cf, #dff1e8);
}

.practice-detail-panel {
  margin-bottom: 16px;
}

.practice-route-view {
  display: block;
}

.practice-route-mode.child-mode .hero-band {
  display: none;
}

.practice-route-mode.child-mode .topbar {
  margin-bottom: 10px;
  padding: 14px 16px;
}

.practice-route-mode.child-mode .topbar-title {
  display: none;
}

.detail-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.practice-page-card {
  position: relative;
  overflow: hidden;
}

.story-page-card,
.writing-page-card {
  border: 0;
  border-radius: 30px;
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 211, 107, 0.44), transparent 26%),
    radial-gradient(circle at 94% 14%, rgba(142, 219, 231, 0.5), transparent 28%),
    linear-gradient(180deg, #fffdf7, #eef9ff 70%, #fff8ed);
}

.practice-page-hero {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.68);
}

.practice-page-hero h2 {
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1;
}

.practice-page-hero p {
  max-width: 760px;
  color: #506763;
  font-weight: 760;
  line-height: 1.5;
}

.story-page-art,
.writing-page-art {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 7px solid #fff;
  border-radius: 34px;
  background: linear-gradient(135deg, #8edbe7, #ffd36b);
  font-size: 2.7rem;
  box-shadow: 0 18px 34px rgba(49, 90, 125, 0.16);
}

.writing-page-art {
  background: linear-gradient(135deg, #dff1e8, #e2ecf8);
}

.story-practice-grid,
.writing-task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.story-task-card,
.writing-task-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 320px;
  padding: 20px;
  border: 4px solid #fff;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 34px rgba(49, 90, 125, 0.12);
}

.story-task-card h3,
.writing-task-card h3 {
  color: #1f3d46;
  font-family: "Comic Sans MS", "Comic Sans", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  font-size: 1.42rem;
  line-height: 1.08;
}

.story-task-card p,
.writing-task-card p {
  color: #506763;
  font-weight: 780;
  line-height: 1.48;
}

.task-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: #ffd36b;
  color: #27323f;
  font-weight: 950;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.audio-story-shell {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(49, 90, 125, 0.1);
}

.audio-story-shell strong,
.audio-story-shell span {
  display: block;
}

.audio-story-shell span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 780;
}

.story-cover-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 24px;
  background: linear-gradient(180deg, #dff6ff 0%, #fff4cf 58%, #eaf8ef 100%);
  box-shadow: 0 16px 30px rgba(49, 90, 125, 0.12);
}

.cover-sun,
.cover-river,
.cover-brush {
  position: absolute;
  display: block;
}

.cover-sun {
  top: 18px;
  right: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffd36b;
  box-shadow: 0 0 0 10px rgba(255, 211, 107, 0.28);
}

.cover-river {
  left: 18px;
  right: 18px;
  bottom: 22px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8edbe7, #2d68b2);
  transform: rotate(-4deg);
}

.cover-brush {
  left: 42px;
  bottom: 48px;
  width: 72px;
  height: 14px;
  border-radius: 999px;
  background: #9a6816;
  transform: rotate(-22deg);
}

.cover-brush::after {
  position: absolute;
  right: -18px;
  top: -5px;
  width: 22px;
  height: 24px;
  border-radius: 8px 14px 14px 8px;
  background: #c85d49;
  content: "";
}

.quiz-story-head,
.quiz-question-head {
  display: grid;
  gap: 12px;
  align-items: center;
}

.quiz-story-head {
  grid-template-columns: 76px minmax(0, 1fr);
}

.story-cover-thumb {
  position: relative;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 22px;
  background: linear-gradient(180deg, #dff6ff, #fff4cf 62%, #eaf8ef);
  box-shadow: 0 12px 24px rgba(49, 90, 125, 0.12);
}

.story-cover-thumb .cover-sun {
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 6px rgba(255, 211, 107, 0.28);
}

.story-cover-thumb .cover-river {
  left: 8px;
  right: 8px;
  bottom: 13px;
  height: 18px;
}

.quiz-question-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.story-replay-button {
  min-height: 44px;
  border-radius: 16px;
}

.quiz-choice.correct-choice {
  background: #dff1e8;
  color: var(--green);
  box-shadow: inset 0 0 0 3px rgba(47, 125, 95, 0.18);
}

.quiz-choice.wrong-choice {
  background: #fae3dc;
  color: var(--coral);
  box-shadow: inset 0 0 0 3px rgba(200, 93, 73, 0.18);
}

.quiz-choice.selected-choice {
  transform: translateY(-1px);
}

.quiz-feedback {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(49, 90, 125, 0.1);
}

.quiz-feedback strong {
  font-size: 1.08rem;
}

.quiz-feedback.correct {
  color: var(--green);
  background: #eaf8ef;
}

.quiz-feedback.wrong {
  color: var(--coral);
  background: #fff0e8;
}

.retell-prompts p,
.feedback-preview {
  min-height: 52px;
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(49, 90, 125, 0.1);
}

.retell-prompts {
  display: grid;
  gap: 10px;
}

.retell-prompts p {
  margin: 0;
  color: var(--coral);
}

.retell-question-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(49, 90, 125, 0.08);
}

.retell-question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.retell-question-actions .primary-action,
.retell-question-actions .secondary-action {
  min-height: 42px;
  border-radius: 14px;
}

.feedback-preview {
  display: grid;
  place-items: center;
  color: var(--green);
  text-align: center;
  background: #eaf8ef;
}

.writing-segment-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.writing-segment-row span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 16px;
  background: #fff;
  color: var(--blue);
  font-weight: 950;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(49, 90, 125, 0.08);
}

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

.writing-task-card {
  min-height: 260px;
}

.writing-task-card .primary-action,
.story-task-card .primary-action {
  align-self: end;
  min-height: 48px;
  border-radius: 16px;
}

.spelling-page-card {
  border: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 211, 107, 0.45), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(142, 219, 231, 0.55), transparent 26%),
    linear-gradient(180deg, #fffdf7, #eef9ff 68%, #fff8ed);
}

.spelling-route-mode .detail-card {
  gap: 12px;
}

.spelling-route-mode .detail-header {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
}

.spelling-route-mode .detail-header .mission-visual {
  width: 74px;
  min-height: 74px;
  border-radius: 22px;
  font-size: 1.8rem;
}

.detail-header {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.practice-workspace {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(223, 241, 232, 0.66), rgba(255, 255, 255, 0.96)),
    #fff;
}

.playful-spelling {
  position: relative;
  min-height: min(430px, 68svh);
  min-height: min(430px, 68dvh);
  padding: 24px;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.96)),
    linear-gradient(135deg, #dff6ff, #fff4cf 46%, #fae3dc);
}

.spelling-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.spelling-cloud {
  position: absolute;
  width: 92px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    22px -10px 0 rgba(255, 255, 255, 0.68),
    45px 1px 0 rgba(255, 255, 255, 0.62);
}

.spelling-cloud.one {
  top: 28px;
  right: 110px;
}

.spelling-cloud.two {
  bottom: 42px;
  left: 34px;
}

.letter-block {
  position: absolute;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 4px solid #fff;
  border-radius: 16px;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(49, 90, 125, 0.12);
}

.block-a {
  right: 44px;
  bottom: 42px;
  background: #ffd36b;
  transform: rotate(8deg);
}

.block-b {
  right: 104px;
  bottom: 78px;
  background: #8edbe7;
  transform: rotate(-10deg);
}

.block-c {
  right: 152px;
  bottom: 36px;
  background: #fae3dc;
  transform: rotate(5deg);
}

.spelling-stage,
.spelling-control-row,
.spelling-answer-form {
  position: relative;
  z-index: 1;
}

.spelling-stage {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.spelling-stage h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.spelling-word-count {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.spelling-word-count.word-pulse {
  animation: wordPulse 650ms ease both;
}

.spelling-progress {
  max-width: 420px;
  height: 14px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.spelling-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hear-word-action {
  min-width: 150px;
}

.attempt-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(49, 90, 125, 0.1);
}

.spelling-answer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 620px;
}

.spelling-answer-panel {
  display: grid;
  gap: 7px;
}

.spelling-answer-label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 900;
}

.spelling-answer-display {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border: 3px solid rgba(45, 104, 178, 0.16);
  border-radius: 18px;
  background: #fff;
  color: var(--blue);
  font-size: 1.25rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  word-break: break-word;
}

.spelling-answer-display.empty {
  color: rgba(49, 90, 125, 0.52);
  letter-spacing: 0;
}

.spelling-keyboard {
  display: grid;
  gap: 8px;
  max-width: 760px;
  padding: 12px;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(49, 90, 125, 0.08);
}

.spelling-key-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.spelling-key-row button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 48px;
  padding: 0 10px;
  border: 3px solid #fff;
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #eef8fb);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(49, 90, 125, 0.11);
}

.spelling-key-row.utility-row button {
  min-width: 78px;
  background: linear-gradient(180deg, #fff8dc, #ffe8dc);
  font-size: 0.95rem;
  text-transform: none;
}

.spelling-key-row button:disabled {
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

.spelling-feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  pointer-events: none;
  background: rgba(255, 248, 237, 0.22);
}

.feedback-card {
  display: grid;
  justify-items: center;
  gap: 9px;
  width: min(420px, 88vw);
  padding: 24px 22px;
  border: 6px solid #fff;
  border-radius: 30px;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 24px 54px rgba(39, 50, 63, 0.22);
}

.spelling-feedback-overlay.correct .feedback-card {
  background: linear-gradient(135deg, #dff1e8, #fff4cf);
}

.spelling-feedback-overlay.try .feedback-card {
  background: linear-gradient(135deg, #fff4cf, #fff);
}

.spelling-feedback-overlay.saved .feedback-card {
  background: linear-gradient(135deg, #fae3dc, #fff);
}

.feedback-card strong {
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1;
}

.feedback-card span {
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 850;
}

.feedback-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 6px solid #fff;
  border-radius: 28px;
  background: #ffd36b;
  box-shadow: 0 16px 28px rgba(49, 90, 125, 0.14);
}

.feedback-icon::before {
  font-size: 3rem;
  font-weight: 950;
}

.feedback-icon.star::before {
  content: "★";
  color: #9a6816;
}

.feedback-icon.retry {
  background: #8edbe7;
}

.feedback-icon.retry::before {
  content: "↻";
  color: var(--blue);
}

.feedback-icon.notebook {
  background: #fae3dc;
}

.feedback-icon.notebook::before {
  content: "ab";
  color: var(--coral);
}

.feedback-pop {
  animation: feedbackPop 420ms cubic-bezier(0.2, 1.25, 0.28, 1) both;
}

@keyframes feedbackPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.82);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wordPulse {
  0% {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.76);
  }

  45% {
    transform: scale(1.08);
    background: #fff4cf;
  }

  100% {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.76);
  }
}

.spelling-complete {
  place-items: center;
  text-align: center;
}

.mini-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(49, 90, 125, 0.12);
  overflow: hidden;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7d5f, #8edbe7);
}

.detail-progress {
  max-width: 360px;
  margin: 10px 0;
}

.practice-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.launcher-progress {
  color: var(--blue);
  font-size: 0.92rem;
}

.timer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 95, 0.18);
}

.listen-orb {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 6px solid #fff;
  border-radius: 34px;
  background: linear-gradient(135deg, #8edbe7, #ffd36b);
  font-size: 2.4rem;
  box-shadow: 0 18px 34px rgba(39, 50, 63, 0.16);
}

.flashcard {
  min-width: 120px;
  min-height: 74px;
  border: 2px solid rgba(49, 90, 125, 0.1);
  border-radius: 18px;
  background: #fff;
  color: var(--blue);
  font-size: 1.25rem;
  font-weight: 950;
  text-decoration: none;
}

.sight-workspace {
  position: relative;
  gap: 16px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 211, 107, 0.38), transparent 24%),
    linear-gradient(135deg, #fff0e8, #fff 62%, #eaf8ef);
}

.sight-game-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.sight-badge {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 5px solid #fff;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffd36b, #fae3dc);
  color: var(--gold);
  font-size: 2rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(49, 90, 125, 0.14);
}

.sight-progress {
  max-width: 420px;
  margin-top: 8px;
}

.sight-game-panel {
  display: grid;
  gap: 14px;
}

.sight-helper {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 850;
}

.sight-helper strong {
  color: var(--coral);
  font-size: 1.08em;
}

.sight-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sight-choice-grid.compact-choices {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sight-choice,
.letter-tile-row button {
  min-height: 64px;
  border: 4px solid #fff;
  border-radius: 20px;
  background: #fff;
  color: var(--blue);
  font-size: 1.32rem;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(49, 90, 125, 0.1);
}

.sight-choice:active,
.letter-tile-row button:active,
.hunt-passage button:active {
  transform: translateY(2px) scale(0.98);
}

.missing-word {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 12px;
  border: 4px solid #fff;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(49, 90, 125, 0.1);
}

.missing-word span {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 54px;
  padding: 0 12px;
  border-radius: 16px;
  background: #fff4cf;
  color: var(--blue);
  font-size: 1.5rem;
  font-weight: 950;
}

.missing-word .blank-part {
  min-width: 74px;
  border: 3px dashed rgba(250, 126, 96, 0.72);
  background: #fff;
}

.sight-fill-choice {
  background: #fff8dc;
  color: var(--coral);
  font-size: 1.45rem;
}

.letter-tile-row button:disabled {
  opacity: 0.36;
  transform: translateY(3px);
}

.built-word-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.built-word-slots span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 54px;
  border: 3px dashed rgba(49, 90, 125, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--coral);
  font-size: 1.45rem;
  font-weight: 950;
}

.sight-target {
  width: fit-content;
  padding: 14px 18px;
  border-radius: 20px;
  background: #fff;
  color: var(--coral);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 950;
  line-height: 1;
}

.sight-target.small-target {
  font-size: clamp(1.5rem, 5vw, 2.3rem);
}

.letter-tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.letter-tile-row button {
  width: auto;
  min-width: 56px;
  padding: 0 16px;
  min-height: 56px;
  background: #fff4cf;
  color: var(--ink);
}

.sentence-strip,
.mini-passage {
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.8;
}

.hunt-passage button {
  margin: 3px;
  padding: 6px 9px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff4cf;
  color: var(--blue);
  font: inherit;
  font-weight: 850;
}

.hunt-passage button:hover,
.hunt-passage button:focus-visible {
  border-color: rgba(255, 168, 120, 0.85);
}

.sight-complete {
  place-items: center;
  text-align: center;
}

.word-tile-row span,
.word-tile-row button {
  padding: 11px 13px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--line);
}

.time-chip,
.domain-chip,
.score-pill {
  padding: 0 9px;
}

.time-chip {
  background: var(--gold-soft);
  color: var(--gold);
}

.domain-chip {
  background: var(--violet-soft);
  color: var(--violet);
}

.score-pill {
  background: var(--blue-soft);
  color: var(--blue);
}

.mission-card p,
.practice-card p,
.exam-card p,
.parent-card p,
.review-block p,
.word-card p,
.skill-column li {
  color: var(--muted);
  line-height: 1.48;
}

.skill-line {
  font-size: 0.88rem;
}

.child-mode .mission-card p {
  font-size: 0.96rem;
}

.child-mode .mission-card .card-actions {
  margin-top: 14px;
}

.child-mode .mission-card .primary-action,
.child-mode .mission-card .secondary-action {
  min-height: 44px;
}

.mission-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 750;
}

.epic-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.child-mode .epic-panel {
  border-width: 2px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(223, 241, 232, 0.78), rgba(255, 255, 255, 0.95), rgba(248, 234, 208, 0.7)),
    #fff;
}

.epic-book-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.epic-book-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(49, 90, 125, 0.12);
  border-radius: 16px;
  background: #fff;
}

.epic-book-card span {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.epic-book-card strong {
  color: var(--blue);
}

.search-hint {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.inline-form,
.planner-grid {
  display: grid;
  gap: 12px;
}

.inline-form {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

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

.span-2 {
  grid-column: 1 / -1;
}

.word-check-grid,
.practice-board,
.exam-grid,
.parent-grid,
.skill-columns {
  display: grid;
  gap: 14px;
}

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

.word-card {
  display: grid;
  gap: 12px;
}

.word-title {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 900;
  text-align: left;
}

.review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.review-row {
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

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

.skill-column ul,
.parent-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

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

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

.choice-list {
  display: grid;
  gap: 8px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
}

.choice input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.answer-note {
  min-height: 22px;
  margin: 10px 0 0;
  font-weight: 850;
}

.answer-note.correct {
  color: var(--green);
}

.answer-note.needs-practice {
  color: var(--coral);
}

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

.materials-grid {
  display: grid;
  gap: 16px;
}

.parent-session-card,
.password-card,
.epic-shelf-card,
.library-card,
.suggestion-panel {
  grid-column: 1 / -1;
}

.parent-session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.password-form,
.material-form {
  display: grid;
  gap: 12px;
}

.password-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}

.material-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.material-upload-panel,
.material-list-panel,
.setup-panel,
.suggestion-panel {
  display: grid;
  gap: 14px;
}

.material-upload-panel p,
.material-list-panel p,
.setup-panel p,
.suggestion-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.material-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  gap: 16px;
  align-items: end;
}

.material-list {
  display: grid;
  gap: 10px;
}

.material-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.material-card h3 {
  margin: 8px 0 4px;
}

.file-type-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.material-status,
.auth-message {
  min-height: 22px;
  color: var(--coral);
  font-weight: 850;
}

.epic-shelf-card,
.library-card {
  grid-column: 1 / -1;
}

.shelf-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.shelf-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.shelf-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.shelf-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-row {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(49, 90, 125, 0.12);
}

.archive-row:last-child {
  border-bottom: 0;
}

.archive-row span,
.archive-row small {
  color: var(--muted);
}

.tag-cloud span {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
}

.parent-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.summary-strip span {
  min-height: 58px;
  padding: 10px;
  border-radius: 8px;
  background: #f5f9fb;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.summary-strip strong {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
}

.parent-card h4 {
  margin: 14px 0 8px;
  font-size: 0.92rem;
}

.word-link {
  display: inline;
  min-height: 0;
  padding: 0 2px;
  border: 0;
  border-radius: 4px;
  background: rgba(45, 104, 178, 0.08);
  color: #214f89;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.word-popover {
  position: fixed;
  z-index: 20;
  width: min(380px, calc(100vw - 32px));
  max-height: min(70dvh, 520px);
  padding: 20px;
  border: 4px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(24, 33, 31, 0.22);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.word-popover[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 33, 31, 0.38);
  backdrop-filter: blur(8px);
}

.auth-modal[hidden] {
  display: none;
}

.auth-card {
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(24, 33, 31, 0.26);
}

.auth-card p {
  color: var(--muted);
  line-height: 1.5;
}

.word-popover h2 {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1;
}

.word-popover p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.example-text {
  padding: 12px;
  border-radius: 16px;
  background: var(--gold-soft);
  color: #63430f !important;
  font-weight: 800;
}

.word-audio-button {
  display: grid;
  place-items: center;
  width: 46px;
  min-height: 46px;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #8edbe7, #ffd36b);
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(49, 90, 125, 0.14);
}

.close-popover {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  min-height: 32px;
  padding: 0;
}

@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .learner-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 780px;
  }

  .profile-card.parent {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(360px, 100%);
  }

  .mission-grid,
  .word-check-grid,
  .practice-board,
  .skill-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .child-mode .mission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .child-weekly-plan {
    grid-template-columns: 1fr;
  }

  .child-mode .child-weekly-plan {
    grid-template-columns: 1fr;
  }

  .child-mode .mission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-practice-grid,
  .writing-task-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main-area,
  .sidebar,
  .profile-gate {
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .epic-panel,
  .inline-form,
  .child-weekly-plan,
  .weekly-story-card,
  .practice-entry-card,
  .practice-page-hero,
  .spelling-stage,
  .sight-game-head,
  .spelling-answer-form,
  .detail-header,
  .hero-band {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions .primary-action,
  .top-actions .secondary-action {
    flex: 1;
  }

  .nav-list,
  .mission-grid,
  .word-check-grid,
  .practice-board,
  .exam-grid,
  .parent-grid,
  .skill-columns,
  .planner-grid,
  .review-list,
  .learner-buttons,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .profile-grid,
  .epic-book-row,
  .shelf-form,
  .password-form,
  .material-form,
  .material-toolbar,
  .material-card,
  .parent-session-card {
    grid-template-columns: 1fr;
  }

  .parent-session-card {
    align-items: stretch;
  }

  .profile-card {
    min-height: 178px;
    border-radius: 22px;
  }

  .profile-avatar-art {
    width: min(112px, 54%);
    margin-top: -22px;
    border-radius: 22px;
  }

  .profile-hero h1 {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }

  .profile-hero p {
    font-size: 0.96rem;
  }

  .profile-name-row,
  .profile-name-button {
    min-height: 76px;
  }

  .profile-name-button {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .profile-card.parent {
    min-height: 128px;
  }

  .child-mode .mission-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .practice-entry-art,
  .story-page-art,
  .writing-page-art {
    width: 82px;
    height: 82px;
    border-radius: 26px;
    font-size: 2rem;
  }

  .practice-entry-card {
    min-height: 0;
    padding: 16px;
  }

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

  .quiz-question-head {
    grid-template-columns: 1fr;
  }

  .story-replay-button {
    width: 100%;
  }

  .child-mode .mission-path::before {
    display: none;
  }

  .path-step {
    transform: none;
  }

  .hero-stats {
    justify-content: flex-start;
  }

  .child-mode .main-area {
    padding: 16px;
  }

  .spelling-route-mode.child-mode .main-area {
    min-height: 100svh;
    min-height: 100dvh;
    padding: 10px;
  }

  .spelling-route-mode.child-mode .topbar {
    padding: 9px 10px;
  }

  .spelling-route-mode.child-mode .topbar h1 {
    font-size: 1.15rem;
  }

  .spelling-route-mode .detail-card {
    padding: 10px;
    border-radius: 18px;
  }

  .spelling-route-mode .detail-header {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px;
  }

  .spelling-route-mode .detail-header .mission-visual {
    width: 46px;
    min-height: 46px;
    border-radius: 15px;
    font-size: 1.25rem;
  }

  .spelling-route-mode .detail-header h2 {
    font-size: 1rem;
  }

  .spelling-route-mode .detail-progress {
    margin: 6px 0;
  }

  .playful-spelling {
    align-content: start;
    min-height: min(420px, 70svh);
    min-height: min(420px, 70dvh);
    padding: 12px;
    gap: 9px;
    border-radius: 18px;
  }

  .spelling-stage {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .spelling-stage .listen-orb {
    width: 58px;
    height: 58px;
    border-width: 4px;
    border-radius: 18px;
    font-size: 1.55rem;
  }

  .spelling-stage h3 {
    margin-bottom: 4px;
    font-size: 1.26rem;
  }

  .spelling-progress {
    height: 10px;
    margin-top: 6px;
  }

  .spelling-control-row {
    gap: 8px;
  }

  .hear-word-action,
  .attempt-chip {
    min-height: 38px;
  }

  .spelling-answer-form {
    gap: 8px;
    max-width: none;
  }

  .spelling-answer-display {
    min-height: 52px;
    border-radius: 15px;
    font-size: 1.14rem;
  }

  .spelling-answer-form .primary-action {
    min-height: 48px;
  }

  .spelling-keyboard {
    gap: 6px;
    padding: 9px;
    border-radius: 18px;
  }

  .spelling-key-row {
    gap: 4px;
  }

  .spelling-key-row button {
    min-width: 30px;
    min-height: 42px;
    padding: 0 7px;
    border-radius: 12px;
    font-size: 0.96rem;
  }

  .spelling-key-row.utility-row button {
    min-width: 62px;
    font-size: 0.84rem;
  }

  .spelling-cloud.one {
    top: 10px;
    right: 30px;
  }

  .spelling-cloud.two {
    display: none;
  }

  .letter-block {
    opacity: 0.76;
    transform: scale(0.82);
  }

  .block-a {
    right: 18px;
  }

  .block-b {
    right: 72px;
  }

  .block-c {
    right: 116px;
  }

  .feedback-card {
    width: min(340px, 88vw);
    padding: 18px 16px;
    border-radius: 24px;
  }

  .feedback-icon {
    width: 74px;
    height: 74px;
    border-radius: 22px;
  }

  .sight-choice-grid {
    grid-template-columns: 1fr;
  }

  .sight-choice {
    min-height: 56px;
  }
}

@media (max-width: 520px) {
  .word-popover {
    width: calc(100vw - 24px);
    max-height: min(72dvh, 520px);
    padding: 18px;
    border-radius: 22px;
  }

  .child-mode .mission-grid {
    grid-template-columns: 1fr;
  }

  .child-mode .launcher-card {
    min-height: 190px;
  }
}
