:root {
  color-scheme: light;
  --ink: #102334;
  --muted: #5d7080;
  --line: #d9e7ef;
  --paper: #ffffff;
  --sky: #eaf7ff;
  --mint: #dff7ee;
  --sun: #ffd66b;
  --coral: #ff6b6b;
  --blue: #2f8cff;
  --green: #15a66a;
  --navy: #12324a;
  --violet: #7666ff;
  --shadow: 0 14px 34px rgba(18, 50, 74, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f6fbff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 214, 107, 0.42), transparent 24rem),
    radial-gradient(circle at 88% 4%, rgba(47, 140, 255, 0.18), transparent 22rem),
    linear-gradient(180deg, #f6fbff 0%, #ecf8f1 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(14px, 4vw, 34px);
  background: rgba(246, 251, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 231, 239, 0.72);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bot-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow);
}

.bot-face {
  width: 28px;
  height: 24px;
  position: relative;
  border-radius: 9px;
  background: white;
}

.bot-face::before,
.bot-face::after {
  content: "";
  position: absolute;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--blue);
}

.bot-face::before {
  left: 6px;
}

.bot-face::after {
  right: 6px;
  background: var(--sun);
}

.brand-title {
  display: grid;
  line-height: 1.05;
}

.brand-title strong {
  font-size: 1rem;
}

.brand-title span {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.icon-btn,
.primary-btn,
.ghost-btn,
.chip-btn {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.icon-btn:active,
.primary-btn:active,
.ghost-btn:active,
.chip-btn:active {
  transform: translateY(1px);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.nav-btn.active {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 4vw, 34px) 34px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 22px;
  align-items: stretch;
}

.mission-stage,
.panel,
.card,
.report-card,
.question-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.mission-stage {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(18, 50, 74, 0.96), rgba(37, 88, 113, 0.95)),
    var(--navy);
  color: white;
}

.mission-stage::after {
  content: "";
  position: absolute;
  inset: auto -50px -76px auto;
  width: 280px;
  height: 220px;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255,255,255,0.18) 28% 36%, transparent 36%),
    linear-gradient(#ffd66b, #ffab4f);
  clip-path: polygon(24% 70%, 46% 20%, 68% 70%, 100% 70%, 74% 100%, 20% 100%, 0 70%);
  opacity: 0.92;
}

.mission-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dff7ee;
  font-weight: 700;
}

.mission-stage h1 {
  width: min(690px, 100%);
  margin: 18px 0 12px;
  font-size: clamp(2.05rem, 7vw, 4.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.mission-stage p {
  width: min(640px, 100%);
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  line-height: 1.58;
}

.mission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 148px;
  padding: 0 18px;
  background: var(--sun);
  color: #192633;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 191, 60, 0.32);
}

.primary-btn.blue {
  color: white;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(47, 140, 255, 0.22);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 118px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  font-weight: 700;
}

.ghost-btn.dark {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.panel {
  padding: 18px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-title h2,
.section-title {
  margin: 0;
  font-size: 1.15rem;
}

.small-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.stat {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: var(--sky);
}

.stat:nth-child(2n) {
  background: var(--mint);
}

.stat strong {
  font-size: 1.45rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dcebf2;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.step-list {
  display: grid;
  gap: 9px;
}

.step-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #f4f9fc;
  border: 1px solid #e4eef5;
}

.step-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-weight: 900;
}

.step-row.done .step-dot {
  color: white;
  background: var(--green);
}

.step-row.current {
  border-color: var(--blue);
  background: #edf7ff;
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

.card {
  padding: 16px;
}

.word-card {
  min-height: 175px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.worksheet-grid {
  align-items: start;
}

.worksheet-card-wrap {
  padding: 10px;
  background:
    linear-gradient(90deg, rgba(255, 214, 107, 0.18), transparent 18px),
    #fff;
}

.worksheet-mini-card {
  padding: 10px;
}

.worksheet-card {
  overflow: hidden;
  border-radius: 8px;
  background: #fffdfb;
  border: 2px solid #f0d7a7;
  box-shadow: inset 0 0 0 6px #fff8ee;
}

.worksheet-top {
  min-height: 48px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px 6px;
  border-bottom: 1px solid #f1dfbd;
}

.worksheet-mascot {
  width: 48px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 18px 18px 10px 10px;
  color: #12324a;
  background: #ffd66b;
  border: 3px solid #111;
  font-weight: 900;
  font-size: 0.8rem;
}

.worksheet-level {
  color: #ff8a00;
  font-weight: 900;
  font-size: 0.78rem;
}

.worksheet-path,
.worksheet-date {
  color: #697987;
  font-size: 0.75rem;
}

.worksheet-date {
  min-width: 74px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #fff6dc;
  text-align: center;
}

.worksheet-title {
  padding: 10px 16px 4px;
  color: #666393;
  font-size: clamp(1.1rem, 3.4vw, 1.55rem);
  line-height: 1.1;
}

.worksheet-word-row {
  display: grid;
  grid-template-columns: 72px minmax(70px, max-content) minmax(38px, max-content) minmax(58px, 1fr);
  gap: 10px;
  align-items: center;
  margin: 8px 16px 0;
  padding: 7px;
  border: 2px dashed #e8b7b7;
  border-radius: 8px;
}

.worksheet-word-row strong {
  color: var(--swatch, #ff3434);
  font-size: clamp(1.6rem, 6vw, 2.45rem);
  line-height: 1;
}

.worksheet-word-row span {
  color: #111;
  font-weight: 700;
}

.worksheet-word-row em {
  color: #b84b4b;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.worksheet-swatch {
  width: 72px;
  height: 46px;
  border-radius: 6px;
  background: var(--swatch, #ff3434);
  border: 2px solid #f2a9a9;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}

.worksheet-art {
  width: 100%;
  height: auto;
  display: block;
  margin: 4px auto 0;
  padding: 0 12px;
}

.worksheet-sentence {
  padding: 0 16px 8px;
  color: #333;
  font-size: clamp(1rem, 3.1vw, 1.35rem);
  text-align: center;
}

.worksheet-sentence::first-letter {
  text-transform: uppercase;
}

.trace-word {
  margin: 0 18px;
  color: rgba(16, 35, 52, 0.12);
  font-size: clamp(2.1rem, 8vw, 3.25rem);
  line-height: 1;
  border-bottom: 2px solid #e4cfcf;
}

.writing-lines {
  display: grid;
  gap: 17px;
  padding: 12px 18px 18px;
}

.writing-lines span {
  display: block;
  height: 1px;
  background: #e4cfcf;
  box-shadow: 0 -18px 0 #f4ecec;
}

.worksheet-card.compact {
  box-shadow: inset 0 0 0 4px #fff8ee;
}

.worksheet-card.compact .worksheet-top,
.worksheet-card.compact .worksheet-title,
.worksheet-card.compact .trace-word,
.worksheet-card.compact .writing-lines {
  display: none;
}

.worksheet-card.compact .worksheet-word-row {
  grid-template-columns: 42px minmax(0, 1fr);
  margin: 8px;
}

.worksheet-card.compact .worksheet-word-row span,
.worksheet-card.compact .worksheet-word-row em {
  display: none;
}

.worksheet-card.compact .worksheet-swatch {
  width: 42px;
  height: 30px;
}

.worksheet-card.compact .worksheet-word-row strong {
  font-size: 1.35rem;
}

.worksheet-card.compact .worksheet-art {
  max-height: 92px;
  padding: 0 6px;
}

.worksheet-card.compact .worksheet-sentence {
  display: none;
}

.word-visual {
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 140, 255, 0.12), rgba(255, 214, 107, 0.24)),
    #f7fbff;
  font-size: 2.2rem;
}

.word-text strong {
  display: block;
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  line-height: 1.05;
}

.word-text span {
  color: var(--muted);
}

.worksheet-card-wrap {
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.26)),
    linear-gradient(135deg, rgba(47,140,255,.16), rgba(255,214,107,.2));
}

.worksheet-mini-card {
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.34)),
    #f7fbff;
}

.collectible-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  min-height: 390px;
  padding: 13px;
  border: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.9), transparent 24%),
    linear-gradient(145deg, color-mix(in srgb, var(--card) 28%, #ffffff), #ffffff 46%, color-mix(in srgb, var(--card) 18%, #eaf7ff));
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.9),
    inset 0 0 0 6px color-mix(in srgb, var(--card) 38%, #ffffff),
    0 14px 26px rgba(18,50,74,.14);
}

.collectible-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 8px;
  border: 2px solid rgba(18, 50, 74, .16);
  pointer-events: none;
}

.collectible-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.collectible-top span,
.collectible-top strong,
.collectible-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(18,50,74,.12);
  color: #12324a;
  font-size: .78rem;
  font-weight: 900;
}

.collectible-top strong {
  color: white;
  background: #12324a;
  border-color: #12324a;
}

.collectible-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 210px;
  margin: 2px 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.7)),
    radial-gradient(circle at 50% 84%, rgba(18,50,74,.12), transparent 36%);
  border: 2px dashed rgba(18,50,74,.16);
}

.sticker-art {
  width: min(100%, 380px);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 12px rgba(18,50,74,.16));
}

.cartoon-sticker {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1.18;
  display: grid;
  place-items: center;
}

.cartoon-bubble {
  position: relative;
  z-index: 2;
  width: 76%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 38% 42% 36% 44%;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,.98), rgba(255,255,255,.72) 35%, transparent 36%),
    linear-gradient(145deg, color-mix(in srgb, var(--sticker) 28%, #ffffff), #ffffff);
  border: 12px solid #fff;
  box-shadow:
    0 0 0 6px #132535,
    0 16px 18px rgba(18,50,74,.18);
}

.cartoon-img {
  position: absolute;
  z-index: 2;
  width: 68%;
  height: 68%;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 0 0 #fff)
    drop-shadow(0 6px 3px rgba(18,50,74,.16));
}

.cartoon-emoji {
  position: relative;
  z-index: 1;
  width: 72%;
  height: 72%;
  display: grid;
  place-items: center;
  font-size: clamp(4rem, 13vw, 7rem);
  line-height: 1;
}

.fallback-emoji {
  display: grid;
}

.cartoon-letter {
  width: 70%;
  height: 70%;
  display: grid;
  place-items: center;
  border-radius: 32px;
  color: white;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--sticker) 82%, #12324a), var(--sticker));
  border: 6px solid #132535;
  font-size: clamp(2.2rem, 9vw, 5rem);
  font-weight: 1000;
}

.cartoon-orbit {
  position: absolute;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sticker) 30%, #ffffff);
  opacity: .8;
}

.orbit-one {
  width: 38%;
  height: 18%;
  left: 2%;
  top: 18%;
  transform: rotate(-18deg);
}

.orbit-two {
  width: 30%;
  height: 16%;
  right: 4%;
  bottom: 18%;
  transform: rotate(18deg);
}

.cartoon-spark {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #12324a;
  background: #ffd66b;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #132535;
  font-size: 1rem;
  font-weight: 900;
}

.spark-one {
  right: 7%;
  top: 9%;
}

.spark-two {
  left: 7%;
  bottom: 11%;
  color: white;
  background: #2f8cff;
}

.collectible-word {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.collectible-word strong {
  color: #12324a;
  font-size: clamp(2rem, 7vw, 3.45rem);
  line-height: .9;
  letter-spacing: 0;
}

.collectible-word span {
  color: #5d7080;
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}

.collectible-sentence {
  position: relative;
  z-index: 1;
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #22384a;
  background: rgba(255,255,255,.72);
  font-weight: 800;
  line-height: 1.35;
}

.collectible-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.collectible-card.compact {
  min-height: 230px;
  padding: 10px;
}

.collectible-card.compact .collectible-top {
  min-height: 28px;
}

.collectible-card.compact .collectible-stage {
  min-height: 120px;
}

.collectible-card.compact .cartoon-sticker {
  width: min(100%, 190px);
}

.collectible-card.compact .cartoon-bubble {
  border-width: 8px;
  box-shadow:
    0 0 0 5px #132535,
    0 10px 14px rgba(18,50,74,.15);
}

.collectible-card.compact .cartoon-spark {
  width: 24px;
  height: 24px;
  border-width: 3px;
  box-shadow: 0 0 0 3px #132535;
  font-size: .78rem;
}

.collectible-card.compact .collectible-word {
  grid-template-columns: 1fr;
}

.collectible-card.compact .collectible-word strong {
  font-size: 1.55rem;
}

.collectible-card.compact .collectible-sentence,
.collectible-card.compact .collectible-tags {
  display: none;
}

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

.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-weight: 700;
}

.chip-btn.selected,
.chip-btn.good {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.chip-btn.warn {
  color: white;
  border-color: var(--coral);
  background: var(--coral);
}

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

.day-node {
  min-height: 70px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
}

.day-node.done {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.day-node.today {
  color: var(--ink);
  background: var(--sun);
  border-color: #efbd34;
  box-shadow: 0 10px 24px rgba(255, 191, 60, 0.3);
}

.day-node.locked {
  opacity: 0.55;
}

.day-node strong {
  font-size: 1.05rem;
}

.mission-page {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
}

.mission-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
}

.mission-workspace {
  min-width: 0;
}

.story-box {
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(20px, 5vw, 42px);
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(135deg, rgba(47, 140, 255, 0.96), rgba(21, 166, 106, 0.92)),
    var(--blue);
}

.story-box h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
}

.story-box p {
  max-width: 720px;
  margin: 0;
  color: rgba(255,255,255,0.88);
  line-height: 1.6;
  font-size: 1.1rem;
}

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

.listen-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
}

.question-card {
  padding: clamp(16px, 4vw, 26px);
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.question-title {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.1rem);
}

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

.answer-card {
  min-height: 116px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fbfd;
  border: 2px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.answer-card.correct {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.answer-card.wrong {
  color: white;
  border-color: var(--coral);
  background: var(--coral);
}

.answer-card .answer-visual {
  font-size: 2.1rem;
}

.feedback {
  min-height: 48px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.letter-slot,
.letter-tile {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
  font-size: 1.2rem;
}

.letter-slot {
  border: 2px dashed var(--line);
  background: white;
}

.letter-tile {
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
}

.reward-room {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

.big-bot {
  min-height: 330px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(160deg, #dff7ee, #eaf7ff);
}

.bot-character {
  width: 210px;
  height: 235px;
  position: relative;
}

.bot-head {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 24px;
  height: 126px;
  border-radius: 36px;
  background: white;
  border: 8px solid var(--navy);
}

.bot-eye {
  position: absolute;
  top: 68px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: var(--blue);
}

.bot-eye.left {
  left: 64px;
}

.bot-eye.right {
  right: 64px;
  background: var(--sun);
}

.bot-smile {
  position: absolute;
  left: 82px;
  top: 112px;
  width: 48px;
  height: 22px;
  border-bottom: 7px solid var(--navy);
  border-radius: 0 0 40px 40px;
}

.bot-body {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 20px;
  height: 92px;
  border-radius: 28px 28px 16px 16px;
  background: var(--navy);
}

.bot-core {
  position: absolute;
  left: 88px;
  bottom: 48px;
  width: 34px;
  height: 34px;
  border-radius: 17px;
  background: var(--coral);
  box-shadow: 0 0 0 10px rgba(255, 107, 107, 0.2);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.search {
  min-height: 42px;
  min-width: min(340px, 100%);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 800;
}

.badge.green {
  background: var(--mint);
  color: #0b7650;
}

.badge.red {
  background: #ffe6e6;
  color: #b23333;
}

.badge.yellow {
  background: #fff1c8;
  color: #875d00;
}

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

.calendar-day {
  min-height: 100px;
  padding: 10px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  cursor: pointer;
}

.calendar-day.complete {
  border-color: var(--green);
  background: #f1fbf7;
}

.calendar-day.partial {
  border-color: var(--sun);
  background: #fff9e8;
}

.calendar-day strong {
  display: block;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff9e8;
  border: 1px solid #ffe19a;
  color: #6d4c00;
}

@media (max-width: 880px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel,
  .mission-page,
  .reward-room {
    grid-template-columns: 1fr;
  }

  .mission-sidebar {
    position: static;
  }

  .grid.three,
  .grid.four,
  .calendar-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .brand-title span {
    display: none;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .answer-grid,
  .stats-grid,
  .calendar-list {
    grid-template-columns: 1fr;
  }

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

  .mission-stage {
    min-height: 390px;
  }

  .table {
    display: block;
    overflow-x: auto;
  }

  .worksheet-card-wrap,
  .worksheet-mini-card {
    padding: 8px;
  }

  .worksheet-top {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .worksheet-date {
    display: none;
  }

  .worksheet-mascot {
    width: 38px;
    height: 32px;
    font-size: 0.68rem;
  }

  .worksheet-word-row {
    grid-template-columns: 58px minmax(0, 1fr);
    margin: 8px 10px 0;
  }

  .worksheet-word-row span,
  .worksheet-word-row em {
    grid-column: 2;
    text-align: left;
  }

  .worksheet-swatch {
    width: 54px;
    height: 40px;
    grid-row: span 3;
  }

  .worksheet-art {
    padding: 0 4px;
  }

  .trace-word {
    margin: 0 12px;
  }

  .writing-lines {
    padding-inline: 12px;
  }
}
