:root {
  --ink: #17172f;
  --muted: #6f7186;
  --paper: #f7f8ff;
  --white: #ffffff;
  --line: #e4e6f1;
  --purple: #6657e8;
  --purple-dark: #4b3ec7;
  --coral: #ff6f61;
  --lime: #c9f45b;
  --yellow: #ffd45b;
  --cyan: #55d7e8;
  --navy: #15152f;
  --green: #26a96c;
  --shadow: 0 16px 40px rgba(39, 37, 83, 0.1);
  --soft-shadow: 0 8px 22px rgba(39, 37, 83, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --accent: var(--coral);
  --accent-soft: #fff0ed;
  --accent-2: var(--lime);
  font-family: "Trebuchet MS", "Aptos", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 0%, rgba(102, 87, 232, 0.08), transparent 26rem),
    var(--paper);
  color: var(--ink);
  font-size: 16px;
}

body[data-group="senior"] {
  --accent: #3b9de2;
  --accent-soft: #e9f6ff;
  --accent-2: #a68bff;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(102, 87, 232, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-140%);
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 240px;
  display: flex;
  flex-direction: column;
  padding: 28px 20px 22px;
  background: var(--navy);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 15px 10px 16px 12px;
  transform: rotate(-4deg);
  background: var(--lime);
  color: var(--navy);
  font-weight: 950;
  font-size: 1.3rem;
  box-shadow: 5px 5px 0 var(--purple);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 1.28rem; letter-spacing: -0.04em; }
.brand-copy small { margin-top: 5px; font-size: 0.72rem; color: #c7c8db; }

.nav-list { display: grid; gap: 8px; margin-top: 54px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #aaacc5;
  font-weight: 750;
  cursor: pointer;
  transition: 160ms ease;
}
.nav-item > span:first-child { width: 24px; font-size: 1.35rem; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: #2a294d; color: #fff; box-shadow: inset 3px 0 var(--lime); }

.sidebar-bottom { margin-top: auto; display: grid; gap: 14px; }
.streak-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 16px;
  background: rgba(255,255,255,0.055);
}
.streak-flame { font-size: 1.8rem; }
.streak-card div, .profile-button > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.streak-card strong { font-size: 0.92rem; }
.streak-card small, .profile-button small { margin-top: 3px; color: #9698b1; font-size: 0.72rem; }
.profile-button {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.mini-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--purple);
  font-size: 1.45rem;
}
.profile-button strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

main { min-height: 100vh; margin-left: 240px; padding: 0 42px 64px; }
.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 -42px;
  padding: 0 42px;
  background: rgba(247, 248, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 230, 241, 0.76);
}
.mobile-brand { display: none; color: var(--ink); }
.group-switch {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 15px;
  background: #e9eaf4;
}
.group-switch button {
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}
.group-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 3px 12px rgba(26,27,61,0.08); }
.top-stats { display: flex; align-items: center; gap: 10px; }
.stat-pill {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(31,29,69,0.04);
}
.stat-pill > span { color: #f2ac20; font-size: 1.25rem; text-shadow: 0 1px 0 #b66b00; }
.stat-pill strong { font-size: 1rem; }
.stat-pill small { color: var(--muted); font-size: 0.75rem; }
.avatar-button {
  width: 46px;
  height: 46px;
  border: 2px solid #fff;
  border-radius: 15px;
  background: var(--accent-soft);
  box-shadow: var(--soft-shadow);
  font-size: 1.55rem;
  cursor: pointer;
}

.view { display: none; max-width: 1160px; margin: 0 auto; animation: view-in 220ms ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.welcome-row, .page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 0 24px;
}
.eyebrow, .section-kicker, .mission-kicker {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02; letter-spacing: -0.055em; }
h2 { letter-spacing: -0.035em; }
.welcome-row p:last-child, .page-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: 1.04rem; }
.level-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}
.level-badge > span { font-size: 1.7rem; }
.level-badge div { display: flex; flex-direction: column; }
.level-badge small { color: var(--muted); font-size: 0.7rem; }
.level-badge strong { font-size: 1.15rem; }

.mission-panel {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 24px 55px rgba(25,24,62,0.18);
}
.mission-panel::after {
  content: "";
  position: absolute;
  inset: auto -100px -150px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.5;
}
.mission-copy { position: relative; z-index: 2; padding: 42px; }
.mission-kicker { color: var(--lime); }
.mission-copy h2 { margin-bottom: 10px; font-size: clamp(2rem, 4vw, 3.05rem); line-height: 1; }
.mission-copy > p { max-width: 520px; margin-bottom: 28px; color: #c9cadd; }
.mission-progress-wrap { max-width: 430px; margin-bottom: 24px; }
.mission-progress-label { display: flex; justify-content: space-between; margin-bottom: 9px; color: #c9cadd; font-size: 0.82rem; }
.mission-progress-label strong { color: #fff; }
.progress-track { width: 100%; height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,0.14); }
.progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); transition: width 380ms ease; }
.primary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 19px;
  border: 0;
  border-radius: 14px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 7px 0 #839e2f;
  transition: 150ms ease;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 9px 0 #839e2f; }
.primary-button:active { transform: translateY(4px); box-shadow: 0 3px 0 #839e2f; }
.primary-button.full { width: 100%; margin-top: 20px; }

.mission-art { position: relative; z-index: 2; min-height: 300px; }
.mascot-bubble {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  transform: translate(-46%, -47%) rotate(4deg);
  border: 10px solid #fff;
  border-radius: 44% 56% 53% 47% / 53% 43% 57% 47%;
  background: var(--yellow);
  box-shadow: 14px 16px 0 rgba(0,0,0,0.16);
}
.mascot-bubble span { font-size: 6.2rem; filter: drop-shadow(0 8px 3px rgba(0,0,0,0.11)); }
.art-word { position: absolute; padding: 7px 11px; border-radius: 9px; font-size: 0.8rem; font-weight: 950; color: var(--navy); }
.word-one { top: 42px; left: 10%; transform: rotate(-9deg); background: var(--lime); }
.word-two { right: 12%; bottom: 43px; transform: rotate(7deg); background: var(--coral); }
.spark { position: absolute; color: #fff; font-size: 1.7rem; }
.spark-a { top: 34px; right: 20%; color: var(--cyan); }
.spark-b { bottom: 35px; left: 15%; color: var(--yellow); }
.spark-c { top: 48%; right: 8%; color: var(--lime); font-size: 0.85rem; }

.section-block { padding-top: 42px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 1.55rem; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--purple);
  font-weight: 850;
  cursor: pointer;
}
.text-button.light { color: #fff; padding: 0; }
.task-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.task-preview-card, .task-library-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 170ms ease, box-shadow 170ms ease;
}
.task-preview-card:hover, .task-library-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.task-preview-card { min-height: 190px; display: flex; flex-direction: column; padding: 20px; }
.task-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-icon {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 1.45rem;
}
.coin-value { display: flex; align-items: center; gap: 5px; color: #b16f00; font-size: 0.8rem; font-weight: 900; }
.coin-value span { color: #f0ad20; font-size: 1rem; }
.task-preview-card h3 { margin: 19px 0 5px; font-size: 1.08rem; }
.task-preview-card p { margin-bottom: 18px; color: var(--muted); font-size: 0.83rem; }
.task-card-action { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.task-type { color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.play-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
}
.done-badge { color: var(--green); font-size: 0.78rem; font-weight: 900; }

.dashboard-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 18px; padding-top: 38px; }
.year-card, .collection-card { min-height: 190px; border-radius: var(--radius-lg); }
.year-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 25px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--soft-shadow);
}
.card-icon { width: 61px; height: 61px; display: grid; place-items: center; border-radius: 20px; font-size: 1.8rem; }
.card-icon.purple { background: #eeebff; color: var(--purple); }
.year-card-copy h2, .collection-card h2 { margin: 0 0 5px; font-size: 1.35rem; }
.year-card-copy p, .collection-card p { margin-bottom: 17px; color: var(--muted); font-size: 0.84rem; }
.progress-track.dark { height: 8px; background: #ececf4; }
.progress-track.dark > span { background: var(--purple); }
.progress-caption { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 0.7rem; }
.round-arrow { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--purple); font-weight: 900; cursor: pointer; }
.collection-card {
  position: relative;
  overflow: hidden;
  padding: 25px;
  background: var(--purple);
  color: #fff;
}
.collection-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -68px; bottom: -85px; border-radius: 50%; background: rgba(255,255,255,0.1); }
.collection-card .section-kicker { color: var(--lime); }
.collection-card p { color: #d7d4ff; }
.avatar-stack { display: flex; margin: 14px 0 21px; }
.avatar-stack span { width: 45px; height: 45px; display: grid; place-items: center; margin-right: -7px; border: 3px solid var(--purple); border-radius: 50%; background: #fff; font-size: 1.55rem; }

.page-heading { align-items: center; padding-top: 46px; }
.page-heading h1 { margin-bottom: 8px; }
.progress-ring {
  --progress: 0deg;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--purple) var(--progress), #e5e6f0 0);
}
.progress-ring::before { content: ""; grid-area: 1 / 1; width: 62px; height: 62px; border-radius: 50%; background: var(--paper); }
.progress-ring span { grid-area: 1 / 1; z-index: 1; font-weight: 950; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 16px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row button {
  flex: 0 0 auto;
  min-height: 41px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}
.filter-row button.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.task-library { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.task-library-card { min-height: 150px; display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 18px; padding: 20px; }
.task-library-card .task-icon { width: 60px; height: 60px; border-radius: 19px; font-size: 1.7rem; }
.task-library-card h3 { margin: 0 0 5px; font-size: 1.07rem; }
.task-library-card p { margin: 0 0 12px; color: var(--muted); font-size: 0.8rem; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.meta-chip { padding: 4px 8px; border-radius: 7px; background: #f0f1f7; color: var(--muted); font-size: 0.68rem; font-weight: 850; }
.challenge-chip { background: #fff3c9; color: #7a5700; }
.complete-chip { background: #e5f8ed; color: #168952; }

.shop-heading { padding-bottom: 32px; }
.big-wallet {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  padding: 13px 17px;
  border-radius: 17px;
  background: var(--navy);
  color: #fff;
}
.big-wallet > span { color: var(--yellow); font-size: 1.8rem; }
.big-wallet div { display: flex; flex-direction: column; }
.big-wallet small { color: #b9bbcf; font-size: 0.7rem; }
.big-wallet strong { font-size: 1.02rem; }
.bajzel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bajzel-card {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 27px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}
.bajzel-card.selected { border: 3px solid var(--purple); padding: 20px; }
.selected-ribbon { position: absolute; top: 15px; right: 15px; z-index: 2; padding: 5px 8px; border-radius: 8px; background: var(--purple); color: #fff; font-size: 0.68rem; font-weight: 900; }
.character-stage {
  position: relative;
  height: 170px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 21px;
  background: var(--character-bg, #fff3c8);
}
.character-stage::before, .character-stage::after { content: "✦"; position: absolute; color: rgba(255,255,255,0.8); font-size: 1.4rem; }
.character-stage::before { left: 18px; top: 20px; }
.character-stage::after { right: 20px; bottom: 16px; font-size: 0.9rem; }
.character-emoji { position: relative; z-index: 1; font-size: 6.1rem; filter: drop-shadow(0 12px 4px rgba(37,28,67,0.14)); transition: transform 180ms ease; }
.bajzel-card:hover .character-emoji { transform: rotate(-5deg) scale(1.06); }
.locked .character-emoji { filter: grayscale(0.85) opacity(0.53); }
.lock-overlay { position: absolute; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(21,21,47,0.88); color: #fff; font-size: 1.25rem; }
.character-copy { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 18px 0 15px; }
.character-copy h3 { margin: 0 0 3px; font-size: 1.22rem; }
.character-copy p { margin: 0; color: var(--muted); font-size: 0.78rem; }
.price-tag { display: flex; align-items: center; gap: 5px; color: #9a6100; font-size: 0.83rem; font-weight: 950; white-space: nowrap; }
.price-tag span { color: #efad20; }
.character-button {
  width: 100%;
  min-height: 43px;
  margin-top: auto;
  border: 0;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.character-button:disabled { background: #e8e8f0; color: #9798aa; cursor: not-allowed; }
.selected .character-button { background: #eceaff; color: var(--purple); }

.points-ticket { min-width: 154px; padding: 15px 19px; border: 2px dashed var(--purple); border-radius: 17px; background: #efedff; text-align: center; }
.points-ticket small { display: block; color: var(--muted); font-size: 0.72rem; }
.points-ticket strong { display: block; margin-top: 2px; color: var(--purple); font-size: 1.55rem; }
.reward-journey { position: relative; margin-top: 22px; padding: 40px 20px 34px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: #fff; box-shadow: var(--soft-shadow); }
.journey-line { position: absolute; top: 91px; right: 10%; left: 10%; height: 8px; border-radius: 99px; background: #e7e8f1; }
.journey-line span { display: block; width: var(--journey, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--coral)); transition: width 450ms ease; }
.milestones { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.milestone { text-align: center; }
.milestone-medal { width: 68px; height: 68px; display: grid; place-items: center; margin: 16px auto 27px; border: 8px solid #fff; border-radius: 50%; background: #e7e8f1; box-shadow: 0 0 0 3px #e7e8f1; font-size: 1.7rem; }
.milestone.reached .milestone-medal { background: var(--yellow); box-shadow: 0 0 0 3px var(--purple); }
.milestone.physical-reward .milestone-medal { background: #fff3c9; box-shadow: 0 0 0 3px #d5a51c; }
.milestone.physical-reward.reached .milestone-medal { background: var(--yellow); box-shadow: 0 0 0 4px var(--coral); }
.milestone.physical-reward h3 { color: #7a5700; }
.milestone small { color: var(--purple); font-weight: 950; }
.milestone h3 { margin: 7px 0 6px; }
.milestone p { max-width: 210px; margin: 0 auto; color: var(--muted); font-size: 0.8rem; }
.reward-kind { display: inline-block; margin-top: 10px; padding: 5px 8px; border-radius: 8px; background: #fff0f1; color: #a30b1a; font-size: 0.66rem; font-weight: 950; letter-spacing: 0.04em; }
.reward-info { display: flex; align-items: flex-start; gap: 18px; margin-top: 22px; padding: 23px; border-radius: 21px; background: #eef0ff; }
.reward-info-icon { width: 49px; height: 49px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; background: var(--purple); color: var(--lime); font-size: 1.35rem; }
.reward-info h2 { margin: 0 0 5px; font-size: 1.15rem; }
.reward-info p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }

.modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14,14,37,0.72);
  backdrop-filter: blur(6px);
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  position: relative;
  width: min(100%, 650px);
  max-height: min(860px, calc(100vh - 40px));
  overflow: auto;
  padding: 32px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,0.28);
  animation: modal-in 190ms ease both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.close-button { position: absolute; z-index: 2; top: 16px; right: 16px; width: 39px; height: 39px; border: 0; border-radius: 13px; background: #f0f1f6; color: var(--muted); font-size: 1.45rem; cursor: pointer; }
.task-modal-head { display: flex; align-items: center; gap: 14px; padding-right: 38px; }
.task-modal-head .task-icon { width: 58px; height: 58px; flex: 0 0 auto; font-size: 1.75rem; }
.task-modal-head h2 { margin: 0 0 4px; font-size: 1.55rem; }
.task-modal-head p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.task-question { margin: 30px 0 20px; font-size: 1.18rem; line-height: 1.45; }
.task-context { margin: 20px 0; padding: 17px; border-radius: 15px; background: #f1f2f8; color: #3c3d55; line-height: 1.55; }
.answer-options { display: grid; gap: 10px; }
.answer-option {
  width: 100%;
  min-height: 53px;
  padding: 12px 15px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}
.answer-option:hover { border-color: #b8b4ed; background: #f8f7ff; }
.answer-option.selected { border-color: var(--purple); background: #efedff; }
.answer-option.correct { border-color: var(--green); background: #e9faef; }
.answer-option.wrong { border-color: #e24d4d; background: #fff0f0; }
.answer-letter { display: inline-grid; place-items: center; width: 29px; height: 29px; margin-right: 10px; border-radius: 9px; background: #eff0f5; color: var(--muted); font-size: 0.78rem; }
.listen-button { display: flex; align-items: center; gap: 12px; margin: 22px 0; padding: 14px 17px; border: 0; border-radius: 15px; background: var(--navy); color: #fff; font-weight: 900; cursor: pointer; }
.listen-button > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); }
.text-input { width: 100%; min-height: 53px; padding: 12px 15px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.text-input.correct { border-color: var(--green); background: #effaf3; }
.text-input.wrong { border-color: #e24d4d; background: #fff2f2; }
.task-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.task-controls .primary-button { box-shadow: none; }
.task-controls .primary-button:active { transform: none; }
.hint { color: var(--muted); font-size: 0.78rem; }
.feedback { display: none; margin-top: 18px; padding: 15px; border-radius: 14px; font-weight: 800; line-height: 1.45; }
.feedback.show { display: block; }
.feedback.success { background: #e8f9ef; color: #147d4c; }
.feedback.error { background: #fff0f0; color: #b03232; }
.order-bank, .order-answer { min-height: 66px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border-radius: 14px; }
.order-bank { background: #f0f1f7; }
.order-answer { margin-bottom: 12px; border: 2px dashed #cfd1df; }
.word-chip { padding: 9px 12px; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(25,24,63,0.1); font-weight: 850; cursor: pointer; }
.order-answer .word-chip { background: var(--purple); color: #fff; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.match-grid > div { display: grid; gap: 9px; }
.match-button { min-height: 47px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; cursor: pointer; }
.match-button.selected { border-color: var(--purple); background: #efedff; }
.match-button.matched { border-color: var(--green); background: #e8f9ef; color: #147d4c; cursor: default; }
.complete-screen { text-align: center; padding: 15px 0 3px; }
.complete-face { width: 122px; height: 122px; display: grid; place-items: center; margin: 0 auto 20px; border-radius: 41% 59% 52% 48%; background: var(--yellow); font-size: 4.8rem; box-shadow: 10px 10px 0 #efe0a1; }
.complete-screen h2 { margin-bottom: 7px; font-size: 2rem; }
.complete-screen p { color: var(--muted); }
.earned-row { display: flex; justify-content: center; gap: 10px; margin: 22px 0 25px; }
.earned-chip { padding: 10px 14px; border-radius: 13px; background: #f2f2f8; font-weight: 900; }
.earned-chip.coin { color: #9a6200; }
.earned-chip.xp { color: var(--purple); }
.profile-modal-card { width: min(100%, 520px); }
.profile-modal-card h2 { padding-right: 40px; margin-bottom: 24px; font-size: 1.65rem; }
.field-label, .profile-groups legend { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.78rem; font-weight: 900; }
.profile-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 0; padding: 0; border: 0; }
.profile-groups legend { grid-column: 1 / -1; }
.profile-groups button { min-height: 85px; display: flex; flex-direction: column; justify-content: center; padding: 13px; border: 2px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.profile-groups button.selected { border-color: var(--purple); background: #efedff; }
.profile-groups small { margin-top: 5px; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.danger-text { display: block; margin: 18px auto 0; border: 0; background: transparent; color: #b43c3c; font-size: 0.8rem; font-weight: 800; cursor: pointer; }

.toast-region { position: fixed; z-index: 90; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { min-width: 250px; padding: 14px 17px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 13px 35px rgba(0,0,0,0.25); animation: toast-in 180ms ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.confetti-layer { pointer-events: none; position: fixed; z-index: 100; inset: 0; overflow: hidden; }
.confetti-piece { position: absolute; top: -25px; animation: confetti-fall 1.25s ease-in forwards; }
@keyframes confetti-fall { to { transform: translate3d(var(--drift), 105vh, 0) rotate(720deg); opacity: 0.9; } }
.mobile-nav { display: none; }

@media (max-width: 1050px) {
  .sidebar { width: 205px; padding-inline: 15px; }
  main { margin-left: 205px; padding-inline: 28px; }
  .topbar { margin-inline: -28px; padding-inline: 28px; }
  .task-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .task-preview-card:last-child { display: none; }
  .bajzel-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  main { margin-left: 0; padding: 0 18px 36px; }
  .topbar { height: 74px; margin: 0 -18px; padding: 0 18px; }
  .mobile-brand { display: inline-flex; }
  .mobile-brand .brand-mark { width: 39px; height: 39px; flex-basis: 39px; border-radius: 12px 8px 13px 9px; font-size: 1.05rem; box-shadow: 4px 4px 0 var(--purple); }
  .mobile-brand .brand-copy { display: none; }
  .group-switch { margin-inline: auto; }
  .group-switch button { min-height: 37px; padding: 7px 10px; font-size: 0.78rem; }
  .stat-pill { min-width: 45px; justify-content: center; padding: 7px 9px; }
  .stat-pill small { display: none; }
  .avatar-button { display: none; }
  .welcome-row, .page-heading { padding-top: 28px; }
  .welcome-row h1, .page-heading h1 { font-size: 2.05rem; }
  .level-badge { padding: 8px 11px; }
  .mission-panel { grid-template-columns: 1fr; }
  .mission-copy { padding: 30px 26px 26px; }
  .mission-copy h2 { font-size: 2.18rem; }
  .mission-art { min-height: 210px; }
  .mascot-bubble { width: 145px; height: 145px; border-width: 7px; }
  .mascot-bubble span { font-size: 4.7rem; }
  .task-preview-grid { grid-template-columns: 1fr; }
  .task-preview-card { min-height: 168px; }
  .task-preview-card:nth-child(n+3) { display: none; }
  .section-heading { align-items: center; }
  .section-heading .text-button { font-size: 0; }
  .section-heading .text-button span { font-size: 1.2rem; }
  .dashboard-grid { padding-top: 24px; }
  .year-card { grid-template-columns: auto 1fr; }
  .year-card .round-arrow { display: none; }
  .task-library { grid-template-columns: 1fr; }
  .bajzel-grid { grid-template-columns: 1fr; }
  .bajzel-card { min-height: 300px; }
  .character-stage { height: 150px; }
  .shop-heading { align-items: flex-start; }
  .big-wallet { min-width: 125px; padding: 10px 12px; }
  .big-wallet > span { display: none; }
  .reward-journey { padding: 20px 18px; }
  .journey-line { top: 20px; bottom: 20px; left: 51px; width: 8px; height: auto; }
  .journey-line span { width: 100%; height: var(--journey, 0%); transition: height 450ms ease; }
  .milestones { grid-template-columns: 1fr; gap: 12px; }
  .milestone { display: grid; grid-template-columns: 66px 1fr; column-gap: 17px; text-align: left; }
  .milestone-medal { grid-row: 1 / span 4; width: 58px; height: 58px; margin: 8px 0; border-width: 7px; font-size: 1.4rem; }
  .milestone small { align-self: end; }
  .milestone h3 { margin: 3px 0; }
  .milestone p { margin: 0; max-width: none; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: 92vh; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; }
  .task-question { font-size: 1.08rem; }
  .profile-groups { grid-template-columns: 1fr; }
  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 10px;
    height: 65px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    background: rgba(21,21,47,0.96);
    box-shadow: 0 15px 40px rgba(21,21,47,0.3);
    backdrop-filter: blur(14px);
  }
  .mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 14px; background: transparent; color: #9b9db6; cursor: pointer; }
  .mobile-nav button > span { font-size: 1.18rem; line-height: 1; }
  .mobile-nav button small { font-size: 0.65rem; font-weight: 800; }
  .mobile-nav button.active { background: #2b2a50; color: #fff; }
  .toast-region { right: 12px; bottom: 88px; left: 12px; }
  .toast { min-width: 0; }
}

@media (max-width: 430px) {
  main { padding-inline: 14px; }
  .topbar { margin-inline: -14px; padding-inline: 14px; }
  .welcome-row { align-items: center; }
  .welcome-row p:last-child { max-width: 230px; font-size: 0.92rem; }
  .level-badge > span { display: none; }
  .mission-copy { padding: 27px 22px 24px; }
  .mission-art { min-height: 190px; }
  .year-card { grid-template-columns: 1fr; }
  .card-icon { display: none; }
  .page-heading { align-items: flex-start; }
  .progress-ring { width: 67px; height: 67px; }
  .progress-ring::before { width: 51px; height: 51px; }
  .task-library-card { grid-template-columns: 50px 1fr auto; gap: 12px; padding: 16px; }
  .task-library-card .task-icon { width: 50px; height: 50px; }
  .points-ticket { min-width: 112px; padding: 10px; }
  .reward-info { padding: 18px; }
  .reward-info-icon { display: none; }
}

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

/* Brand system: Bajzel z Angielskiego */
:root {
  --ink: #071c3c;
  --muted: #657187;
  --paper: #f5f7fb;
  --white: #ffffff;
  --line: #dfe4ec;
  --purple: #0a376e;
  --purple-dark: #041e46;
  --coral: #df0b20;
  --lime: #f3ce62;
  --yellow: #dca91f;
  --cyan: #71abc5;
  --navy: #041e46;
  --green: #237b57;
  --shadow: 0 18px 44px rgba(4, 30, 70, 0.12);
  --soft-shadow: 0 8px 24px rgba(4, 30, 70, 0.075);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --accent: var(--coral);
  --accent-soft: #fff0f1;
  --accent-2: var(--yellow);
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
}

body[data-group="senior"] {
  --accent: #0a376e;
  --accent-soft: #edf3f9;
  --accent-2: #dca91f;
}

body {
  background:
    radial-gradient(circle at 100% 0%, rgba(220, 169, 31, 0.12), transparent 28rem),
    radial-gradient(circle at 36% 100%, rgba(223, 11, 32, 0.045), transparent 24rem),
    var(--paper);
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

button:focus-visible, input:focus-visible {
  outline-color: rgba(220, 169, 31, 0.62);
}

.sidebar {
  width: 274px;
  padding: 22px 18px 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 42%),
    linear-gradient(155deg, #062a5a 0%, #041e46 58%, #02132f 100%);
  border-right: 1px solid rgba(220, 169, 31, 0.34);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow), #f5d877, var(--coral));
}

.brand-lockup {
  width: 100%;
  min-height: 112px;
  display: block;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(220, 169, 31, 0.48);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 25px rgba(0, 8, 27, 0.24);
}

.brand-logo-window {
  position: relative;
  display: block;
  width: 100%;
  height: 96px;
  overflow: hidden;
}

.brand-logo-window img {
  position: absolute;
  top: -55px;
  left: 50%;
  width: 224px;
  height: 224px;
  max-width: none;
  transform: translateX(-50%);
}

.nav-list { margin-top: 34px; }
.nav-item { min-height: 52px; border-radius: 12px; color: #b9c5d7; }
.nav-item:hover { background: rgba(255,255,255,0.08); }
.nav-item.active {
  background: rgba(255,255,255,0.11);
  color: #fff;
  box-shadow: inset 4px 0 var(--yellow);
}
.nav-item.active > span:first-child { color: #f3ce62; }
.streak-card { border-color: rgba(220,169,31,0.25); background: rgba(255,255,255,0.055); }
.streak-card small, .profile-button small { color: #aebdd1; }
.mini-avatar { background: #fff; border: 2px solid var(--yellow); }

main { margin-left: 274px; }
.topbar {
  height: 82px;
  background: rgba(245, 247, 251, 0.91);
  border-bottom-color: rgba(4, 30, 70, 0.12);
}

.brand-crest {
  width: 42px;
  height: 50px;
  flex: 0 0 42px;
  background-image: url("./bajzel-logo.png");
  background-repeat: no-repeat;
  background-size: 121px 121px;
  background-position: -2px -30px;
}

.mobile-brand .brand-copy strong {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
}
.mobile-brand .brand-copy small { color: var(--coral); font-weight: 800; }

.group-switch {
  padding: 4px;
  border: 1px solid #dce2eb;
  background: #e9edf3;
}
.group-switch button.active {
  color: var(--navy);
  box-shadow: inset 0 -2px var(--yellow), 0 3px 12px rgba(4,30,70,0.07);
}
.stat-pill { border-color: #dce2eb; }
.stat-pill > span, .coin-value span, .price-tag span, .big-wallet > span { color: var(--yellow); text-shadow: none; }
.coin-value, .price-tag, .earned-chip.coin { color: #8d6500; }
.avatar-button { border-color: #fff; background: #eef3f8; }

.eyebrow, .section-kicker { color: var(--coral); }
.level-badge { border-color: #dce2eb; border-bottom: 3px solid var(--yellow); }
.level-badge > span { color: var(--coral); }

.mission-panel {
  border: 1px solid rgba(220, 169, 31, 0.52);
  background:
    linear-gradient(102deg, rgba(4,30,70,0.08), rgba(4,30,70,0.74)),
    linear-gradient(140deg, #0a376e 0%, #041e46 68%, #02132f 100%);
  box-shadow: 0 24px 56px rgba(4, 30, 70, 0.24);
}
.mission-panel::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--yellow), #f6d77c 56%, var(--coral));
}
.mission-panel::after { background: var(--coral); opacity: 0.24; }
.mission-kicker { color: #f3ce62; letter-spacing: 0.12em; }
.mission-copy > p, .mission-progress-label { color: #d0d9e6; }
.progress-track > span { background: linear-gradient(90deg, var(--yellow), #f6d77c); }
.primary-button {
  background: linear-gradient(180deg, #f6d77c, #e2b331);
  color: var(--navy);
  box-shadow: 0 6px 0 #9c7110;
}
.primary-button:hover { box-shadow: 0 8px 0 #9c7110; }
.primary-button:active { box-shadow: 0 2px 0 #9c7110; }
.mascot-bubble {
  border-color: #f8f5ed;
  background: #f4cf64;
  box-shadow: 14px 16px 0 rgba(223, 11, 32, 0.44);
}
.word-one { background: #f4cf64; }
.word-two { background: var(--coral); color: #fff; }
.spark-a { color: #f4cf64; }
.spark-b { color: #fff; }
.spark-c { color: var(--coral); }

.task-preview-card, .task-library-card, .year-card, .bajzel-card, .reward-journey {
  border-color: #dfe4ec;
}
.task-preview-card::before, .task-library-card::before, .bajzel-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--coral));
}
.task-icon { border: 1px solid rgba(220,169,31,0.2); }
.play-button { background: var(--navy); }
.play-button:hover { background: #0a376e; }
.text-button { color: var(--navy); }
.card-icon.purple { background: #edf3f9; color: var(--navy); }
.progress-track.dark > span { background: linear-gradient(90deg, var(--navy), var(--coral)); }
.round-arrow { color: var(--coral); border-color: #dce2eb; }
.collection-card {
  background: linear-gradient(145deg, #df0b20 0%, #a70818 56%, #750611 100%);
}
.collection-card::after { background: rgba(243,206,98,0.16); }
.collection-card .section-kicker { color: #f6d77c; }
.collection-card p { color: #ffe0e3; }
.avatar-stack span { border-color: #a70818; }

.progress-ring { background: conic-gradient(var(--coral) var(--progress), #e4e8ee 0); }
.filter-row button.active { border-color: var(--navy); background: var(--navy); }
.big-wallet { background: linear-gradient(145deg, #0a376e, #041e46); border-bottom: 3px solid var(--yellow); }
.bajzel-card.selected { border-color: var(--yellow); box-shadow: 0 0 0 2px var(--navy), var(--shadow); }
.selected-ribbon { background: var(--navy); color: #f6d77c; }
.character-button { background: var(--navy); }
.selected .character-button { background: #edf3f9; color: var(--navy); }

.points-ticket { border-color: var(--yellow); background: #fff8df; }
.points-ticket strong, .milestone small { color: var(--navy); }
.milestone.reached .milestone-medal { background: #f3ce62; box-shadow: 0 0 0 3px var(--navy); }
.journey-line span { background: linear-gradient(90deg, var(--navy), var(--coral), var(--yellow)); }
.reward-info { background: #edf3f9; border-left: 4px solid var(--yellow); }
.reward-info-icon { background: var(--navy); color: #f3ce62; }

.answer-option:hover { border-color: #8da3bd; background: #f3f6fa; }
.answer-option.selected { border-color: var(--navy); background: #edf3f9; }
.order-answer .word-chip { background: var(--navy); }
.match-button.selected { border-color: var(--navy); background: #edf3f9; }
.earned-chip.xp { color: var(--navy); }
.profile-groups button.selected { border-color: var(--navy); background: #edf3f9; }

.mobile-nav {
  background: rgba(4,30,70,0.97);
  border-top: 1px solid rgba(220,169,31,0.44);
}
.mobile-nav button.active { background: rgba(255,255,255,0.12); color: #fff; box-shadow: inset 0 -2px var(--yellow); }

@media (max-width: 1050px) {
  .sidebar { width: 226px; }
  .brand-lockup { min-height: 102px; }
  .brand-logo-window { height: 86px; }
  .brand-logo-window img { top: -48px; width: 198px; height: 198px; }
  main { margin-left: 226px; }
}

@media (max-width: 760px) {
  main { margin-left: 0; }
  .topbar { height: 76px; }
  .mobile-brand { gap: 7px; }
  .mobile-brand .brand-copy { display: flex; }
  .mobile-brand .brand-copy strong { font-size: 0.92rem; }
  .mobile-brand .brand-copy small { margin-top: 3px; font-size: 0.58rem; }
  .brand-crest { width: 36px; height: 46px; flex-basis: 36px; background-size: 108px 108px; background-position: -2px -27px; }
}

@media (max-width: 520px) {
  .mobile-brand .brand-copy { display: none; }
}

/* Kolekcja Bajzelniaków inspirowana modnymi gniotkami squishy */
.squishy-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("./bajzelniaki-squishy.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  background-position: 0 0;
}

.sprite-butter { background-position: 0 0; }
.sprite-dumpling { background-position: 50% 0; }
.sprite-cheese { background-position: 100% 0; }
.sprite-mango { background-position: 0 100%; }
.sprite-strawberry { background-position: 50% 100%; }
.sprite-toast { background-position: 100% 100%; }

.mini-avatar,
.avatar-button,
.avatar-stack > span,
.complete-face {
  overflow: hidden;
}

.mini-avatar { padding: 1px; background: #fff8e7; }
.avatar-button { padding: 2px; }
#topAvatar {
  display: block;
  width: 100%;
  height: 100%;
}
#heroAvatar {
  display: block;
  width: 94%;
  height: 94%;
  filter: drop-shadow(0 10px 5px rgba(4, 30, 70, 0.18));
}
#topAvatar > .squishy-sprite,
#heroAvatar > .squishy-sprite { width: 100%; height: 100%; }
.avatar-stack > span { padding: 1px; }
.avatar-stack .squishy-sprite { width: 100%; height: 100%; }

.character-stage {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.94), rgba(255,255,255,0.24) 42%, transparent 66%),
    var(--character-bg, #fff3c8);
}
.character-stage::before { content: "SQUISHY"; color: rgba(4,30,70,0.28); font-size: 0.62rem; letter-spacing: 0.13em; font-family: "Aptos", "Segoe UI", sans-serif; font-weight: 900; }
.character-emoji {
  position: relative;
  z-index: 1;
  width: auto;
  height: 94%;
  aspect-ratio: 1;
  display: block;
  filter: drop-shadow(0 12px 5px rgba(4,30,70,0.16));
  transition: transform 180ms ease;
}
.character-emoji > .squishy-sprite { width: 100%; height: 100%; }
.bajzel-card:hover .character-emoji { transform: translateY(-3px) rotate(-2deg) scale(1.045); }
.locked .character-emoji { filter: grayscale(0.82) opacity(0.48); }
.character-copy { margin-bottom: 13px; }
.character-copy > div { min-width: 0; }
.character-copy h3 { margin-bottom: 2px; }
.character-copy .character-word {
  margin: 0 0 7px;
  color: var(--coral);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.055em;
}
.character-copy .character-word strong { color: var(--navy); }
.character-copy .character-word + p { margin: 0; color: var(--muted); font-size: 0.76rem; line-height: 1.35; }
.complete-face { padding: 5px; background: #fff1bd; }
.complete-face > .squishy-sprite { width: 100%; height: 100%; filter: drop-shadow(0 7px 4px rgba(4,30,70,0.15)); }

@media (max-width: 760px) {
  .character-emoji { height: 92%; }
}

/* Konta uczniów i panel nauczyciela */
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
  background: #f5f7fb;
}
.auth-brand-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 56px;
  background:
    radial-gradient(circle at 20% 16%, rgba(243, 206, 98, 0.25), transparent 16rem),
    radial-gradient(circle at 85% 85%, rgba(223, 11, 32, 0.22), transparent 19rem),
    linear-gradient(145deg, #0a376e 0%, #041e46 62%, #02132f 100%);
}
.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.auth-brand-panel > img {
  position: relative;
  z-index: 1;
  width: min(430px, 82%);
  border: 1px solid rgba(243,206,98,0.5);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 6, 24, 0.34);
}
.auth-squishy-row {
  position: absolute;
  z-index: 2;
  right: 8%;
  bottom: 7%;
  display: flex;
  gap: 7px;
  filter: drop-shadow(0 10px 8px rgba(0,0,0,0.25));
}
.auth-squishy-row > span {
  width: 74px;
  height: 74px;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 25px;
  background-color: #fff8df;
}
.auth-squishy-row > span:nth-child(2) { transform: translateY(-15px) rotate(4deg); }
.auth-card {
  width: min(100%, 550px);
  align-self: center;
  justify-self: center;
  padding: 48px clamp(28px, 6vw, 62px);
}
.auth-card form {
  padding: 38px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--yellow);
  border-radius: 25px;
  background: #fff;
  box-shadow: var(--shadow);
}
.auth-card h1 { margin: 6px 0 12px; font-size: clamp(2.1rem, 4vw, 3.1rem); line-height: 1.02; }
.auth-intro, .modal-intro { margin: 0 0 26px; color: var(--muted); line-height: 1.55; }
.auth-card .field-label, .admin-card .field-label, #passwordChangeForm .field-label, #resetPasswordForm .field-label { margin-top: 17px; }
.auth-card .primary-button { margin-top: 22px; }
.auth-help { margin: 19px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; text-align: center; }
.auth-loading {
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--navy);
}
.auth-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #dfe5ed;
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.password-field { position: relative; }
.password-field .text-input { padding-right: 76px; }
.reveal-button {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  min-width: 57px;
  min-height: 35px;
  border: 0;
  border-radius: 10px;
  background: #edf2f7;
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}
.field-hint { display: block; margin-top: 7px; color: var(--muted); font-size: 0.74rem; line-height: 1.4; }
.form-feedback { display: none; margin-top: 15px; padding: 12px 14px; border-radius: 12px; font-size: 0.82rem; font-weight: 800; line-height: 1.45; }
.form-feedback.show { display: block; }
.form-feedback.error { background: #fff0f1; color: #a30b1a; }
.form-feedback.success { background: #e9f7ef; color: #176c49; }

.sync-status {
  min-height: 18px;
  display: block;
  color: #aebdd1;
  font-size: 0.69rem;
  text-align: center;
}
.sync-status::before { content: "✓ "; color: #f3ce62; }
.sync-status.saving::before { content: "↻ "; }
.sync-status.error { color: #ffb6be; }
.sync-status.error::before { content: "! "; color: #ffb6be; }

.secondary-button {
  min-height: 43px;
  padding: 10px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}
.secondary-button:hover { border-color: #8fa2b8; background: #f3f6fa; }
.secondary-button:disabled { cursor: wait; opacity: 0.65; }
.secondary-button.full { width: 100%; margin-top: 11px; }
.secondary-button.compact { min-height: 38px; padding: 8px 11px; font-size: 0.74rem; }
.danger-button {
  min-height: 43px;
  padding: 10px 15px;
  border: 1px solid #c9192a;
  border-radius: 12px;
  background: #c9192a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}
.danger-button:hover { background: #a90f1e; border-color: #a90f1e; }
.danger-button:disabled { cursor: wait; opacity: 0.65; }
.danger-button.full { width: 100%; }
.logout-button {
  width: 100%;
  min-height: 44px;
  margin-top: 11px;
  border: 0;
  border-radius: 12px;
  background: #fff0f1;
  color: #a30b1a;
  font-weight: 900;
  cursor: pointer;
}
.account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -9px 0 22px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #edf3f9;
}
.account-summary span { padding: 5px 8px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 0.69rem; font-weight: 900; text-transform: uppercase; }
.account-summary strong { min-width: 0; overflow: hidden; color: var(--muted); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }

.teacher-heading { align-items: center; }
.teacher-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0;
}
.teacher-summary article {
  padding: 19px 21px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--yellow);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}
.teacher-summary small { display: block; color: var(--muted); font-size: 0.75rem; }
.teacher-summary strong { display: block; margin-top: 4px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.85rem; }
.teacher-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(480px, 1.7fr);
  align-items: start;
  gap: 22px;
}
.admin-card, .students-card {
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}
.admin-card { position: sticky; top: 103px; padding: 25px; }
.admin-card h2, .students-card h2 { margin: 4px 0 19px; font-size: 1.5rem; }
.admin-card .primary-button { margin-top: 19px; }
.text-input[type="search"], select.text-input { appearance: none; }
.password-generate-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.students-card { min-width: 0; overflow: hidden; }
.students-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 25px 18px;
  border-bottom: 1px solid var(--line);
}
.students-card-head h2 { margin-bottom: 0; }
.student-search input {
  width: 170px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.student-list { display: grid; }
.student-row {
  display: grid;
  grid-template-columns: 48px minmax(150px, 1.2fr) minmax(135px, 0.8fr) minmax(104px, auto);
  align-items: center;
  gap: 14px;
  padding: 17px 22px;
  border-bottom: 1px solid #edf0f4;
}
.student-row:last-child { border-bottom: 0; }
.student-initials {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--navy);
  color: #f3ce62;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}
.student-identity, .student-numbers { min-width: 0; display: flex; flex-direction: column; }
.student-identity strong, .student-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-identity small, .student-numbers small { margin-top: 3px; color: var(--muted); font-size: 0.73rem; }
.student-identity span, .student-numbers span { margin-top: 5px; color: #8b6507; font-size: 0.67rem; font-weight: 800; }
.student-numbers { text-align: right; }
.student-numbers strong { color: var(--navy); }
.student-numbers .student-reward-alert { align-self: flex-end; margin-top: 7px; padding: 4px 7px; border-radius: 7px; background: #fff0f1; color: #a30b1a; font-weight: 900; }
.student-actions { display: grid; gap: 7px; }
.student-actions [data-manage-student] { border-color: #d9ac2d; background: #fffaf0; }
.student-actions [data-manage-student]:hover { border-color: #b8890a; background: #fff5d9; }
.student-management-modal .modal-intro { overflow: hidden; text-overflow: ellipsis; }
.danger-zone { margin-top: 27px; padding: 20px; border: 1px solid #f0c5ca; border-radius: 16px; background: #fff7f8; }
.danger-zone .section-kicker { margin: 0 0 5px; }
.danger-zone h3 { margin: 0 0 7px; color: #82101c; font-size: 1.05rem; }
.danger-zone > p:not(.section-kicker), .delete-confirmation > p { margin: 0 0 15px; color: #7a4d52; font-size: 0.8rem; line-height: 1.5; }
.delete-confirmation { margin-top: 2px; }
.delete-confirmation[hidden] { display: none; }
.delete-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 9px; }
.empty-state { margin: 0; padding: 36px 24px; color: var(--muted); line-height: 1.5; text-align: center; }
.error-state { color: #a30b1a; }

@media (max-width: 1120px) {
  .teacher-layout { grid-template-columns: 1fr; }
  .admin-card { position: static; }
}

@media (max-width: 820px) {
  .auth-gate { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 210px; padding: 24px; }
  .auth-brand-panel > img { width: min(300px, 72%); border-radius: 19px; }
  .auth-squishy-row { right: 5%; bottom: 12px; }
  .auth-squishy-row > span { width: 53px; height: 53px; border-radius: 18px; }
  .auth-card { padding: 28px 18px 42px; }
  .auth-card form { padding: 28px 22px; }
}

@media (max-width: 760px) {
  .mobile-nav.has-teacher { grid-template-columns: repeat(5, 1fr); }
  .mobile-nav.has-teacher button small { font-size: 0.58rem; }
  .teacher-summary { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .teacher-summary article { padding: 14px 11px; }
  .teacher-summary strong { font-size: 1.42rem; }
  .students-card-head { align-items: flex-start; padding: 19px; }
  .student-search input { width: 126px; }
  .student-row { grid-template-columns: 44px 1fr auto; gap: 11px; padding: 15px; }
  .student-initials { width: 44px; height: 44px; }
  .student-numbers { grid-column: 2 / 3; text-align: left; }
  .student-numbers .student-reward-alert { align-self: flex-start; }
  .student-actions { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 480px) {
  .auth-brand-panel { min-height: 165px; }
  .auth-squishy-row > span { width: 45px; height: 45px; }
  .auth-card h1 { font-size: 2rem; }
  .teacher-heading { align-items: flex-start; }
  .teacher-heading .secondary-button { padding-inline: 10px; }
  .teacher-summary small { font-size: 0.65rem; }
  .teacher-summary strong { font-size: 1.22rem; }
  .student-row { grid-template-columns: 40px 1fr; }
  .student-initials { width: 40px; height: 40px; }
  .student-numbers { grid-column: 2; }
  .student-actions { grid-column: 1 / -1; grid-row: auto; grid-template-columns: 1fr 1fr; width: 100%; }
  .students-card-head { display: grid; }
  .student-search input { width: 100%; }
}

/* Gry językowe */
.games-heading { padding-bottom: 28px; }
.games-score {
  min-width: 175px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 17px;
  border: 1px solid #d7dee8;
  border-bottom: 3px solid var(--yellow);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}
.games-score > span { color: var(--coral); font-size: 1.7rem; }
.games-score div { display: flex; flex-direction: column; }
.games-score small { color: var(--muted); font-size: 0.7rem; }
.games-score strong { margin-top: 2px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; }

.games-banner {
  position: relative;
  min-height: 174px;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  align-items: center;
  gap: 25px;
  overflow: hidden;
  padding: 24px 31px;
  border: 1px solid rgba(220, 169, 31, 0.5);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 10%, rgba(243,206,98,0.19), transparent 14rem),
    linear-gradient(135deg, #0a376e, #041e46 68%, #02132f);
  color: #fff;
  box-shadow: 0 18px 42px rgba(4,30,70,0.2);
}
.games-banner::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--yellow), #f5d877, var(--coral)); }
.games-banner-character { width: 126px; height: 126px; overflow: hidden; border: 4px solid #fff; border-radius: 38% 62% 51% 49%; background: #fff4c8; box-shadow: 9px 10px 0 rgba(223,11,32,0.42); transform: rotate(-3deg); }
.games-banner-character .squishy-sprite { filter: drop-shadow(0 7px 5px rgba(4,30,70,0.2)); }
.games-banner .section-kicker { margin-bottom: 6px; color: #f3ce62; }
.games-banner h2 { margin: 0 0 7px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.games-banner p:last-child { max-width: 610px; margin: 0; color: #d7e0eb; line-height: 1.5; }
.games-banner-stars { padding-right: 8px; color: #f3ce62; font-size: 1.3rem; letter-spacing: 0.24em; white-space: nowrap; }

.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 25px; }
.game-card {
  position: relative;
  min-height: 315px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 170ms ease, box-shadow 170ms ease;
}
.game-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--yellow), var(--coral)); }
.game-card-2::before { background: linear-gradient(90deg, var(--navy), #4f80ac); }
.game-card-3::before { background: linear-gradient(90deg, var(--coral), #f3ce62); }
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.game-card.completed { background: linear-gradient(180deg, #fff, #f6faf8); }
.game-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.game-icon { width: 65px; height: 65px; display: grid; place-items: center; border-radius: 20px; background: #fff5d6; font-size: 2rem; box-shadow: inset 0 0 0 1px rgba(220,169,31,0.25); }
.game-card-2 .game-icon { background: #edf3f9; }
.game-card-3 .game-icon { background: #fff0f1; }
.game-status { padding: 6px 8px; border-radius: 8px; background: #fff6da; color: #866000; font-size: 0.67rem; font-weight: 900; text-align: right; }
.game-status.done { background: #e8f6ee; color: #176c49; }
.game-label { margin: 21px 0 5px; color: var(--coral); font-size: 0.7rem; font-weight: 950; letter-spacing: 0.11em; text-transform: uppercase; }
.game-card h2 { margin: 0 0 8px; font-size: 1.45rem; }
.game-card > p:not(.game-label) { margin: 0 0 20px; color: var(--muted); font-size: 0.85rem; line-height: 1.55; }
.game-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 17px; border-top: 1px solid #e8ebf0; }
.game-card-footer > span { color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.game-start-button { min-height: 42px; display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border: 0; border-radius: 12px; background: var(--navy); color: #fff; font-size: 0.8rem; font-weight: 900; cursor: pointer; }
.game-start-button:hover { background: #0a376e; }
.games-note { display: flex; align-items: center; gap: 12px; margin: 20px 0 10px; padding: 16px 18px; border-left: 4px solid var(--yellow); border-radius: 14px; background: #edf3f9; }
.games-note > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--navy); color: #f3ce62; font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.games-note p { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.games-note strong { color: var(--navy); }

.game-modal-card { width: min(100%, 720px); }
.game-modal-head { display: flex; align-items: center; gap: 14px; padding-right: 45px; }
.game-modal-icon { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 18px; background: #fff4cf; font-size: 1.7rem; }
.game-modal-head .game-label { margin: 0 0 3px; }
.game-modal-head h2 { margin: 0; font-size: 1.55rem; }
.game-round-progress { margin: 24px 0 27px; }
.game-round-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 0.75rem; font-weight: 850; }
.game-round-progress strong { color: var(--navy); }
.game-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e7ebf0; }
.game-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy), var(--coral), var(--yellow)); transition: width 250ms ease; }
.game-question-wrap { max-width: 610px; margin: 0 auto; }
.game-question { margin: 0 0 18px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; font-weight: 700; line-height: 1.4; text-align: center; }
.game-choice-grid { display: grid; gap: 10px; }
.game-choice { width: 100%; min-height: 56px; display: flex; align-items: center; padding: 11px 15px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--navy); font-weight: 850; text-align: left; cursor: pointer; }
.game-choice > span { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; margin-right: 12px; border-radius: 9px; background: #edf2f7; color: var(--muted); font-size: 0.75rem; }
.game-choice:hover:not(:disabled) { border-color: #8ca0b8; background: #f5f8fb; }
.game-choice.correct { border-color: #2c9267; background: #eaf8f0; color: #176c49; }
.game-choice.wrong { border-color: #cc3a48; background: #fff0f1; color: #a30b1a; }
.game-choice:disabled { cursor: default; opacity: 1; }
.game-audio-button { width: min(100%, 360px); display: grid; grid-template-columns: 46px 1fr; align-items: center; margin: 0 auto 23px; padding: 12px 16px; border: 0; border-radius: 16px; background: var(--navy); color: #fff; text-align: left; cursor: pointer; }
.game-audio-button > span { grid-row: 1 / span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); }
.game-audio-button strong { font-size: 0.88rem; }
.game-audio-button small { margin-top: 2px; color: #c6d2e1; font-size: 0.67rem; }
.game-feedback { display: none; margin-top: 15px; padding: 13px 15px; border-radius: 12px; font-size: 0.82rem; font-weight: 850; text-align: center; }
.game-feedback.show { display: block; }
.game-feedback.success { background: #e9f7ef; color: #176c49; }
.game-feedback.error { background: #fff0f1; color: #a30b1a; }
.game-next-button { min-width: 142px; margin: 18px 0 0 auto; box-shadow: none; }
.game-next-button:hover { box-shadow: none; }

.memory-instruction { margin: 0 0 18px; color: var(--muted); font-size: 0.82rem; line-height: 1.5; text-align: center; }
.memory-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.memory-card { position: relative; min-height: 82px; overflow: hidden; border: 2px solid #d7dee8; border-radius: 14px; background: linear-gradient(145deg, #0a376e, #041e46); color: #f3ce62; font-weight: 900; cursor: pointer; transition: transform 150ms ease, border-color 150ms ease; }
.memory-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--yellow); }
.memory-card-back { font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; }
.memory-card-front { display: none; padding: 8px; font-size: 0.8rem; line-height: 1.25; }
.memory-card.revealed { border-color: var(--yellow); background: #fff8df; color: var(--navy); transform: rotateY(0); }
.memory-card.revealed .memory-card-back { display: none; }
.memory-card.revealed .memory-card-front { display: block; }
.memory-card.matched { border-color: #2c9267; background: #e9f7ef; color: #176c49; }
.memory-moves { margin: 14px 0 0; color: var(--muted); font-size: 0.76rem; text-align: center; }
.memory-moves strong { color: var(--navy); }

.game-result-screen { max-width: 570px; margin: 0 auto; padding: 20px 0 4px; text-align: center; }
.game-result-screen.game-saving { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 18px; }
.game-result-icon { width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 19px; border-radius: 25px; background: #fff1bd; color: var(--navy); font-size: 2.2rem; font-weight: 950; }
.game-result-character { width: 128px; height: 128px; overflow: hidden; margin: 0 auto 20px; border: 5px solid #fff; border-radius: 42% 58% 51% 49%; background: #fff1bd; box-shadow: 9px 10px 0 #e8d794; }
.game-result-screen h2 { margin: 5px 0 8px; font-size: 2rem; }
.game-result-screen > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.game-result-screen > p strong { color: var(--navy); }
.game-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.game-result-actions .primary-button { min-height: 45px; box-shadow: none; }

@media (max-width: 1050px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .game-card:last-child { grid-column: 1 / -1; min-height: 260px; }
}

@media (max-width: 760px) {
  .games-heading { align-items: center; }
  .games-score { min-width: 125px; padding: 10px 12px; }
  .games-score > span { display: none; }
  .games-banner { grid-template-columns: 90px 1fr; gap: 18px; padding: 22px; }
  .games-banner-character { width: 90px; height: 90px; }
  .games-banner-stars { display: none; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card, .game-card:last-child { min-height: 268px; grid-column: auto; }
  .memory-board { grid-template-columns: repeat(3, 1fr); }
  .memory-card { min-height: 72px; }
  .mobile-nav { grid-template-columns: repeat(5, 1fr); }
  .mobile-nav.has-teacher { grid-template-columns: repeat(6, 1fr); }
  .mobile-nav button { min-width: 0; }
  .mobile-nav button small { font-size: 0.58rem; }
  .mobile-nav.has-teacher button small { font-size: 0.5rem; }
}

@media (max-width: 480px) {
  .games-heading { gap: 12px; }
  .games-score { min-width: 105px; padding-inline: 9px; }
  .games-score small { font-size: 0.62rem; }
  .games-score strong { font-size: 0.92rem; }
  .games-banner { grid-template-columns: 64px 1fr; gap: 14px; padding: 19px 17px; }
  .games-banner-character { width: 64px; height: 64px; border-width: 3px; border-radius: 20px; box-shadow: 5px 6px 0 rgba(223,11,32,0.42); }
  .games-banner .section-kicker { font-size: 0.59rem; }
  .games-banner h2 { font-size: 1.3rem; }
  .games-banner p:last-child { font-size: 0.76rem; }
  .game-card { padding: 20px; }
  .game-icon { width: 54px; height: 54px; border-radius: 17px; font-size: 1.7rem; }
  .game-status { max-width: 132px; }
  .game-modal-card { padding-inline: 16px; }
  .game-choice { min-height: 52px; }
  .memory-board { gap: 7px; }
  .memory-card { min-height: 64px; }
  .memory-card-front { padding: 5px; font-size: 0.68rem; }
  .game-result-actions { grid-template-columns: 1fr; }
}

/* Monster Hunt */
.monster-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("./monster-hunt-sprites.png");
  background-repeat: no-repeat;
  background-size: 400% 300%;
  background-position: var(--monster-x, 0%) var(--monster-y, 0%);
}

.game-card-4 {
  grid-column: 1 / -1;
  min-height: 275px;
  padding-right: 48%;
  background:
    radial-gradient(circle at 86% 20%, rgba(243,206,98,0.18), transparent 15rem),
    linear-gradient(135deg, #fff 0%, #fff 54%, #edf3f9 54%, #e7eef6 100%);
}
.game-card-4::before { background: linear-gradient(90deg, var(--coral), var(--yellow), var(--navy)); }
.game-card-4 .game-icon { background: #fff0f1; }
.game-card-4 > p:not(.game-label), .game-card-4 .game-card-footer { max-width: 520px; }
.monster-card-preview {
  position: absolute;
  top: 62px;
  right: 25px;
  bottom: 24px;
  width: 42%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  padding: 7px 10px 0;
  border: 1px solid rgba(4,30,70,0.09);
  border-radius: 19px;
  background: rgba(255,255,255,0.58);
}
.monster-card-preview .monster-sprite { width: 29%; height: auto; aspect-ratio: 1; margin-inline: -2.5%; filter: drop-shadow(0 8px 5px rgba(4,30,70,0.16)); }
.monster-card-preview .monster-sprite:nth-child(2) { transform: translateY(-18px) rotate(3deg); }
.monster-card-preview .monster-sprite:nth-child(3) { transform: translateY(-5px) rotate(-3deg); }

.monster-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: 22px;
  overflow: hidden;
  margin: -32px -32px 27px;
  padding: 42px 34px 32px;
  border-radius: 28px 28px 20px 20px;
  background:
    radial-gradient(circle at 85% 15%, rgba(243,206,98,0.22), transparent 14rem),
    linear-gradient(145deg, #0a376e, #041e46 66%, #02132f);
  color: #fff;
}
.monster-intro .game-label { margin-top: 0; color: #f3ce62; }
.monster-intro h2 { margin: 0 0 10px; font-size: 2.35rem; }
.monster-intro-copy > p:not(.game-label) { margin: 0; color: #d5deea; line-height: 1.55; }
.monster-intro-copy > p strong { color: #fff; }
.monster-intro-rules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.monster-intro-rules span { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid rgba(255,255,255,0.13); border-radius: 10px; background: rgba(255,255,255,0.08); color: #e7edf5; font-size: 0.7rem; font-weight: 850; }
.monster-intro-rules strong { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 7px; background: var(--yellow); color: var(--navy); }
.monster-intro-art { position: relative; min-height: 205px; }
.monster-intro-art .monster-sprite { position: absolute; width: 43%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 9px 6px rgba(0,0,0,0.25)); }
.monster-intro-art .monster-sprite:nth-child(1) { left: 0; bottom: 0; }
.monster-intro-art .monster-sprite:nth-child(2) { left: 27%; bottom: 16%; }
.monster-intro-art .monster-sprite:nth-child(3) { right: 0; bottom: -2%; }
.monster-intro-art .monster-sprite:nth-child(n+4) { width: 28%; opacity: 0.72; }
.monster-intro-art .monster-sprite:nth-child(4) { top: -5%; left: 4%; }
.monster-intro-art .monster-sprite:nth-child(5) { top: -12%; left: 39%; }
.monster-intro-art .monster-sprite:nth-child(6) { top: -3%; right: 2%; }
.monster-mode-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.monster-mode-heading h3 { margin: 0; color: var(--navy); font-size: 1.24rem; }
.monster-mode-heading > span { color: var(--muted); font-size: 0.75rem; text-align: right; }
.monster-mode-heading > span strong { color: var(--coral); }
.monster-mode-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.monster-mode-grid button { min-height: 118px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 15px; border: 2px solid var(--line); border-radius: 15px; background: #fff; text-align: left; cursor: pointer; transition: 150ms ease; }
.monster-mode-grid button:hover { transform: translateY(-2px); border-color: var(--yellow); background: #fffaf0; }
.monster-mode-grid button > span { font-size: 1.55rem; }
.monster-mode-grid button strong { margin-top: 8px; color: var(--navy); }
.monster-mode-grid button small { margin-top: 4px; color: var(--muted); font-size: 0.68rem; line-height: 1.35; }
.monster-intro-note { margin: 16px 0 0; padding: 12px; border-radius: 12px; background: #edf3f9; color: var(--muted); font-size: 0.75rem; text-align: center; }
.monster-intro-note strong { color: var(--navy); }

.monster-hunt-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-right: 42px; }
.monster-hunt-head .game-label { margin: 0 0 4px; }
.monster-hunt-head h2 { margin: 0; font-size: 1.48rem; }
.monster-hunt-stats { display: flex; align-items: center; gap: 8px; }
.monster-hunt-stats > span:not(.monster-lives) { min-width: 58px; display: flex; flex-direction: column; padding: 7px 9px; border-radius: 10px; background: #edf3f9; text-align: center; }
.monster-hunt-stats small { color: var(--muted); font-size: 0.58rem; text-transform: uppercase; }
.monster-hunt-stats strong { color: var(--navy); font-size: 0.92rem; }
.monster-lives { display: flex; gap: 2px; padding: 7px 9px; border-radius: 10px; background: #fff0f1; color: var(--coral); font-size: 1.05rem; }
.monster-lives .lost { color: #d7dce3; }
.monster-hunt-progress { height: 7px; overflow: hidden; margin: 18px 0 14px; border-radius: 99px; background: #e6ebf0; }
.monster-hunt-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--yellow)); transition: width 300ms ease; }
.monster-answer { margin-bottom: 14px; padding: 11px 14px; border-left: 4px solid #8da0b6; border-radius: 10px; background: #edf3f9; color: var(--navy); font-size: 0.78rem; font-weight: 850; }
.monster-answer.yes { border-color: #2c9267; background: #e9f7ef; color: #176c49; }
.monster-answer.no, .monster-answer.error { border-color: var(--coral); background: #fff0f1; color: #a30b1a; }
.monster-answer.warning { border-color: var(--yellow); background: #fff8df; color: #775600; }
.monster-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.monster-candidate { position: relative; min-height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: hidden; padding: 4px 5px 8px; border: 2px solid #dce3eb; border-radius: 15px; background: linear-gradient(180deg, #fff, #f2f6fa); cursor: default; transition: 160ms ease; }
.monster-candidate .monster-sprite { width: 100%; height: auto; aspect-ratio: 1; margin-bottom: -10px; filter: drop-shadow(0 6px 4px rgba(4,30,70,0.14)); }
.monster-candidate small { position: relative; z-index: 2; padding: 3px 5px; border-radius: 6px; background: rgba(255,255,255,0.86); color: var(--muted); font-size: 0.54rem; font-weight: 950; letter-spacing: 0.04em; }
.monster-eliminated-mark { display: none; position: absolute; z-index: 3; inset: 50% auto auto 50%; width: 38px; height: 38px; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; background: rgba(4,30,70,0.86); color: #fff; font-size: 1.6rem; }
.monster-candidate.eliminated { border-color: #e3e5e9; background: #f0f1f3; opacity: 0.34; filter: grayscale(1); }
.monster-candidate.eliminated .monster-eliminated-mark { display: grid; }
.monster-board.guess-mode .monster-candidate.active { border-color: var(--yellow); background: #fff9e7; cursor: pointer; box-shadow: 0 0 0 2px rgba(220,169,31,0.18); }
.monster-board.guess-mode .monster-candidate.active:hover { transform: translateY(-3px) scale(1.015); border-color: var(--coral); box-shadow: var(--soft-shadow); }
.monster-controls { margin-top: 17px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #f8fafc; }
.monster-question-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 12px; }
.monster-question-head .section-kicker { margin-bottom: 2px; font-size: 0.61rem; }
.monster-question-head h3 { margin: 0; color: var(--navy); font-size: 0.96rem; }
.monster-main-actions { display: flex; gap: 7px; }
.monster-power-button, .monster-guess-button { min-height: 38px; padding: 7px 11px; border: 0; border-radius: 10px; font-size: 0.7rem; font-weight: 950; cursor: pointer; }
.monster-power-button { border: 1px solid #d7af38; background: #fff7d9; color: #775600; }
.monster-power-button:disabled { border-color: #dfe3e8; background: #eceff3; color: #9ba5b0; cursor: default; }
.monster-guess-button { background: var(--coral); color: #fff; }
.monster-guess-button.active { background: var(--navy); box-shadow: inset 0 -2px var(--yellow); }
.monster-question-bank { max-height: 126px; display: flex; flex-wrap: wrap; gap: 6px; overflow: auto; padding-right: 3px; }
.monster-question-bank button { min-height: 34px; padding: 6px 9px; border: 1px solid #cdd7e2; border-radius: 9px; background: #fff; color: var(--navy); font-size: 0.68rem; font-weight: 800; cursor: pointer; }
.monster-question-bank button:hover:not(:disabled) { border-color: var(--navy); background: #edf3f9; }
.monster-question-bank button:disabled { background: #edf0f3; color: #a5acb4; text-decoration: line-through; cursor: default; }
.monster-board-hint { margin: 11px 0 0; color: var(--muted); font-size: 0.67rem; line-height: 1.45; }

.monster-found-screen, .monster-final-screen { text-align: center; padding: 8px 0 2px; }
.monster-found-art { width: 190px; height: 190px; margin: -2px auto -8px; filter: drop-shadow(0 11px 7px rgba(4,30,70,0.2)); }
.monster-found-screen .eyebrow, .monster-final-screen .eyebrow { margin-bottom: 5px; }
.monster-found-screen h2, .monster-final-screen h2 { margin: 0 0 8px; font-size: 2rem; }
.monster-found-screen > p:not(.eyebrow), .monster-final-screen > p:not(.eyebrow) { color: var(--muted); }
.monster-found-screen > p strong, .monster-final-screen > p strong { color: var(--navy); }
.monster-feature-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 17px 0; }
.monster-feature-row span { padding: 6px 9px; border-radius: 9px; background: #edf3f9; color: var(--navy); font-size: 0.7rem; font-weight: 850; }
.monster-found-progress { display: flex; flex-direction: column; width: 140px; margin: 0 auto 19px; padding: 10px; border-radius: 12px; background: #fff8df; }
.monster-found-progress strong { color: var(--coral); font-size: 1.25rem; }
.monster-found-progress small { color: var(--muted); font-size: 0.64rem; }
.monster-found-screen .primary-button { box-shadow: none; }
.monster-final-team { min-height: 152px; display: flex; align-items: flex-end; justify-content: center; margin: 0 auto -4px; }
.monster-final-team .monster-sprite { width: 145px; height: 145px; margin-inline: -25px; filter: drop-shadow(0 8px 5px rgba(4,30,70,0.17)); }
.monster-final-team .monster-sprite:nth-child(2) { transform: translateY(-14px); }
.monster-save-ok, .monster-save-warning, .monster-try-copy { width: fit-content; margin: 14px auto 0 !important; padding: 7px 10px; border-radius: 9px; font-size: 0.7rem; font-weight: 850; }
.monster-save-ok { background: #e9f7ef; color: #176c49 !important; }
.monster-save-warning { background: #fff0f1; color: #a30b1a !important; }
.monster-try-copy { background: #edf3f9; color: var(--navy) !important; }

@media (max-width: 1050px) {
  .game-card-4 { grid-column: 1 / -1; }
  .game-card-4:last-child { min-height: 275px; }
}

@media (max-width: 760px) {
  .game-card-4, .game-card-4:last-child { grid-column: auto; min-height: 340px; padding-right: 20px; background: #fff; }
  .monster-card-preview { position: static; width: 100%; height: 102px; margin: 15px 0 0; padding: 2px 6px 0; }
  .monster-card-preview .monster-sprite { width: 27%; }
  .game-card-4 > p:not(.game-label), .game-card-4 .game-card-footer { max-width: none; }
  .monster-intro { grid-template-columns: 1fr; margin: -28px -20px 24px; padding: 35px 22px 25px; }
  .monster-intro h2 { font-size: 2rem; }
  .monster-intro-art { min-height: 150px; }
  .monster-intro-art .monster-sprite { width: 34%; }
  .monster-intro-art .monster-sprite:nth-child(n+4) { width: 23%; }
  .monster-mode-grid { grid-template-columns: repeat(2, 1fr); }
  .monster-hunt-head { align-items: flex-start; padding-right: 37px; }
  .monster-hunt-head h2 { font-size: 1.15rem; }
  .monster-hunt-stats { flex-wrap: wrap; justify-content: flex-end; }
  .monster-lives { width: 100%; justify-content: center; }
  .monster-board { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .monster-candidate { min-height: 105px; }
  .monster-question-head { align-items: flex-start; }
  .monster-main-actions { flex-direction: column; }
  .monster-question-bank { max-height: 154px; }
}

@media (max-width: 430px) {
  .monster-mode-heading { display: block; }
  .monster-mode-heading > span { display: block; margin-top: 7px; text-align: left; }
  .monster-mode-grid button { min-height: 102px; }
  .monster-hunt-head { display: block; }
  .monster-hunt-stats { justify-content: flex-start; margin-top: 11px; padding-right: 5px; }
  .monster-lives { width: auto; }
  .monster-board { grid-template-columns: repeat(3, 1fr); }
  .monster-candidate { min-height: 94px; padding-inline: 2px; }
  .monster-candidate small { font-size: 0.48rem; }
  .monster-controls { padding: 13px; }
  .monster-question-head { display: block; }
  .monster-main-actions { flex-direction: row; margin-top: 10px; }
  .monster-question-bank button { font-size: 0.62rem; }
  .monster-found-art { width: 160px; height: 160px; }
  .monster-final-team .monster-sprite { width: 115px; height: 115px; margin-inline: -20px; }
}

/* Jungle Mission Expedition */
.game-card-jungle {
  border-color: rgba(34, 108, 70, 0.24);
  background:
    radial-gradient(circle at 84% 20%, rgba(243, 206, 98, 0.23), transparent 14rem),
    linear-gradient(135deg, #fff 0%, #fff 53%, #eaf4e9 53%, #dcebdd 100%);
}
.game-card-jungle::before { background: linear-gradient(90deg, #175f3d, #dca91f, #df0b20); }
.game-card-jungle .game-icon { background: #edf7e9; box-shadow: inset 0 0 0 1px rgba(34, 108, 70, 0.22); }
.game-card-jungle .game-label { color: #237b57; }
.jungle-card-preview {
  position: relative;
  width: 100%;
  min-height: 150px;
  margin-top: 16px;
  pointer-events: none;
  display: grid;
  place-items: center;
  align-content: center;
  overflow: hidden;
  padding: 24px 20px 17px;
  border: 1px solid rgba(23,95,61,0.16);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.26), transparent 42%),
    linear-gradient(145deg, #236b46, #103f2d 70%, #092d22);
  color: #fff;
  box-shadow: inset 0 -30px 50px rgba(2,31,20,0.18);
}
.jungle-card-preview::before,
.jungle-card-preview::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border: 20px solid rgba(116, 184, 89, 0.35);
  border-radius: 64% 36% 70% 30%;
  transform: rotate(28deg);
}
.jungle-card-preview::before { top: -82px; left: -55px; }
.jungle-card-preview::after { right: -68px; bottom: -93px; transform: rotate(-22deg); }
.jungle-card-sun { position: absolute; top: 17px; right: 25px; width: 32px; height: 32px; border-radius: 50%; background: #f3ce62; box-shadow: 0 0 0 9px rgba(243,206,98,0.1); }
.jungle-card-route { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; margin-bottom: 15px; }
.jungle-card-route::before { content: ""; position: absolute; right: 10%; left: 10%; height: 3px; border-radius: 99px; background: repeating-linear-gradient(90deg, #f3ce62 0 8px, transparent 8px 14px); }
.jungle-card-route > span { position: relative; z-index: 1; display: grid; justify-items: center; gap: 4px; }
.jungle-card-route i { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,0.82); border-radius: 50%; background: #fff; font-size: 1.25rem; font-style: normal; box-shadow: 0 5px 12px rgba(0,0,0,0.2); }
.jungle-card-route small { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #f3ce62; color: #173a27; font-size: 0.6rem; font-weight: 950; }
.jungle-card-preview > strong { position: relative; z-index: 1; color: #f3ce62; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; line-height: 1; }
.jungle-card-preview > small { position: relative; z-index: 1; margin-top: 5px; color: #d9eadf; font-size: 0.57rem; font-weight: 900; letter-spacing: 0.13em; }

.jungle-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(220px, 0.88fr);
  gap: 22px;
  overflow: hidden;
  margin: -32px -32px 27px;
  padding: 42px 34px 34px;
  border-radius: 28px 28px 20px 20px;
  background:
    radial-gradient(circle at 78% 15%, rgba(243,206,98,0.17), transparent 13rem),
    linear-gradient(145deg, #1f7047, #0e402d 58%, #06291f);
  color: #fff;
}
.jungle-intro .game-label { margin-top: 0; color: #f3ce62; }
.jungle-intro h2 { max-width: 430px; margin: 0 0 11px; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.03; }
.jungle-intro-copy > p:not(.game-label) { max-width: 500px; margin: 0; color: #d8eadf; line-height: 1.56; }
.jungle-intro-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jungle-intro-stats span { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; background: rgba(255,255,255,0.08); color: #e9f4ed; font-size: 0.7rem; font-weight: 800; }
.jungle-intro-stats strong { color: #f3ce62; font-size: 1rem; }
.jungle-intro-art { position: relative; min-height: 230px; }
.jungle-moon { position: absolute; top: 0; right: 20px; width: 82px; height: 82px; border-radius: 50%; background: #f3ce62; box-shadow: 0 0 0 15px rgba(243,206,98,0.07); }
.jungle-temple { position: absolute; right: 38px; bottom: 2px; font-size: 7rem; line-height: 1; filter: drop-shadow(0 14px 8px rgba(0,0,0,0.32)); }
.jungle-treasure { position: absolute; right: 16px; bottom: 14px; font-size: 2.8rem; filter: drop-shadow(0 5px 4px rgba(0,0,0,0.25)); }
.jungle-compass { position: absolute; left: 5px; bottom: 9px; width: 69px; height: 69px; display: grid; place-items: center; border: 3px solid rgba(255,255,255,0.75); border-radius: 50%; background: #fff7d9; font-size: 2.25rem; box-shadow: 0 10px 18px rgba(0,0,0,0.24); transform: rotate(-10deg); }
.jungle-leaf { position: absolute; color: #6fba63; font-size: 6rem; line-height: 1; text-shadow: 0 6px 12px rgba(0,0,0,0.2); }
.jungle-leaf.leaf-one { top: -38px; left: -18px; transform: scaleX(0.5) rotate(28deg); }
.jungle-leaf.leaf-two { right: -15px; bottom: -37px; transform: scaleX(0.55) rotate(-23deg); }

.jungle-map-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.jungle-map-heading .section-kicker { margin-bottom: 3px; }
.jungle-map-heading h3 { margin: 0; font-size: 1.2rem; }
.jungle-map-heading > span { color: var(--muted); font-size: 0.7rem; }
.jungle-map-heading > span strong { color: #237b57; }
.jungle-trail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.jungle-trail-stop { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 11px 9px; border: 1px solid #dfe7df; border-radius: 13px; background: #f7faf7; }
.jungle-trail-stop > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #e5eee4; font-size: 1rem; }
.jungle-trail-stop div { min-width: 0; }
.jungle-trail-stop small { display: block; margin-bottom: 2px; color: #77857c; font-size: 0.52rem; font-weight: 950; letter-spacing: 0.09em; }
.jungle-trail-stop strong { display: block; overflow: hidden; color: #31523f; font-size: 0.66rem; line-height: 1.25; text-overflow: ellipsis; }
.jungle-trail-stop.active { border-color: #d2a322; background: #fff9e7; box-shadow: inset 0 0 0 1px rgba(220,169,31,0.25); }
.jungle-trail-stop.active > span { background: #f3ce62; }
.jungle-trail-stop.complete { border-color: #a7d2b5; background: #edf8f1; }
.jungle-trail-stop.complete > span { background: #237b57; color: #fff; font-weight: 950; }
.jungle-launch { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 18px; padding: 15px 17px; border-radius: 14px; background: #edf3f0; }
.jungle-launch p { margin: 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
.jungle-launch p strong { color: var(--navy); }
.jungle-start-button { flex: 0 0 auto; background: #237b57; box-shadow: 0 8px 18px rgba(35,123,87,0.2); }
.jungle-start-button:hover { background: #175f3d; }

.jungle-mission-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding-right: 42px; }
.jungle-stage-emblem { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: #edf7e9; font-size: 1.7rem; box-shadow: inset 0 0 0 1px rgba(35,123,87,0.18); }
.jungle-mission-head .game-label { margin: 0 0 3px; color: #237b57; }
.jungle-mission-head h2 { margin: 0; font-size: 1.45rem; }
.jungle-live-score { min-width: 82px; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: end; column-gap: 3px; padding: 9px 11px; border: 1px solid #ead99b; border-radius: 13px; background: #fff9e2; color: var(--navy); text-align: right; }
.jungle-live-score small { grid-column: 1 / -1; color: #8b7330; font-size: 0.51rem; font-weight: 950; letter-spacing: 0.12em; }
.jungle-live-score strong { color: #237b57; font-size: 1.2rem; }
.jungle-live-score span { color: var(--muted); font-size: 0.62rem; font-weight: 800; }
.jungle-progress-row { margin: 20px 0; }
.jungle-progress-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 0.68rem; font-weight: 850; }
.jungle-progress-row strong { color: #237b57; }
.jungle-progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e5ebe6; }
.jungle-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #237b57, #83ad4b, #dca91f); transition: width 250ms ease; }
.jungle-question-panel { position: relative; overflow: hidden; padding: 24px; border: 1px solid #dfe7df; border-radius: 20px; background: linear-gradient(180deg, #fbfdfb, #f4f8f4); }
.jungle-question-panel::after { content: ""; position: absolute; top: -55px; right: -55px; width: 125px; height: 125px; border: 18px solid rgba(82,145,77,0.08); border-radius: 70% 30%; transform: rotate(22deg); pointer-events: none; }
.jungle-question-panel.stage-listening { border-color: #cbdce9; background: linear-gradient(180deg, #fbfdff, #eff6fa); }
.jungle-question-panel.stage-final { border-color: #ead99b; background: linear-gradient(180deg, #fffdf7, #fff9e6); }
.jungle-question-tag { width: fit-content; display: flex; align-items: center; gap: 6px; margin: 0 auto 14px; padding: 6px 9px; border-radius: 9px; background: #e8f3e9; color: #237b57; font-size: 0.6rem; font-weight: 950; letter-spacing: 0.1em; }
.jungle-question { position: relative; z-index: 1; max-width: 590px; margin: 0 auto 20px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.34rem; font-weight: 700; line-height: 1.4; text-align: center; }
.jungle-choice-grid { position: relative; z-index: 1; max-width: 600px; display: grid; gap: 10px; margin: 0 auto; }
.jungle-choice { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 11px 15px; border: 2px solid #dde5df; border-radius: 14px; background: #fff; color: var(--navy); text-align: left; cursor: pointer; transition: border-color 150ms ease, transform 150ms ease, background 150ms ease; }
.jungle-choice > span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: #edf3f0; color: #557263; font-size: 0.72rem; font-weight: 950; }
.jungle-choice > strong { font-size: 0.88rem; }
.jungle-choice:hover:not(:disabled) { border-color: #76a58a; background: #f5faf6; transform: translateY(-1px); }
.jungle-choice.correct { border-color: #2c9267; background: #eaf8f0; color: #176c49; }
.jungle-choice.correct > span { background: #237b57; color: #fff; }
.jungle-choice.wrong { border-color: #cc3a48; background: #fff0f1; color: #a30b1a; }
.jungle-choice.wrong > span { background: #cc3a48; color: #fff; }
.jungle-choice:disabled { cursor: default; opacity: 1; transform: none; }
.jungle-choice:focus-visible, .jungle-audio-button:focus-visible { outline: 3px solid rgba(220,169,31,0.58); outline-offset: 2px; }
.jungle-audio-button { position: relative; z-index: 1; width: min(100%, 410px); display: grid; grid-template-columns: 48px 1fr; align-items: center; margin: 0 auto 21px; padding: 12px 16px; border: 0; border-radius: 16px; background: linear-gradient(135deg, #0a4f77, #073852); color: #fff; text-align: left; cursor: pointer; box-shadow: 0 9px 20px rgba(7,56,82,0.17); }
.jungle-audio-button > span { grid-row: 1 / span 2; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: #f3ce62; color: #073852; }
.jungle-audio-button strong { font-size: 0.88rem; }
.jungle-audio-button small { margin-top: 2px; color: #c9e0eb; font-size: 0.65rem; }
.jungle-feedback { display: none; max-width: 600px; margin: 14px auto 0; padding: 12px 14px; border-radius: 12px; text-align: center; }
.jungle-feedback.show { display: grid; gap: 3px; }
.jungle-feedback strong { font-size: 0.78rem; }
.jungle-feedback span { font-size: 0.7rem; line-height: 1.4; }
.jungle-feedback.success { background: #e9f7ef; color: #176c49; }
.jungle-feedback.error { background: #fff0f1; color: #a30b1a; }
.jungle-next-button { min-width: 165px; margin: 16px 0 0 auto; background: #237b57; box-shadow: none; }

.jungle-checkpoint, .jungle-result-screen { max-width: 650px; margin: 0 auto; padding: 8px 0 2px; text-align: center; }
.jungle-checkpoint-badge { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 14px; border: 7px solid #dceddf; border-radius: 50%; background: #237b57; color: #fff; font-size: 1.7rem; font-weight: 950; box-shadow: 0 0 0 7px #f3f8f4; }
.jungle-checkpoint .eyebrow, .jungle-result-screen .eyebrow { margin-bottom: 5px; color: #237b57; }
.jungle-checkpoint h2, .jungle-result-screen h2 { margin: 0 0 8px; font-size: 2rem; }
.jungle-checkpoint > p:not(.eyebrow), .jungle-result-screen > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.jungle-checkpoint > p strong, .jungle-result-screen > p strong { color: var(--navy); }
.jungle-checkpoint .jungle-trail { margin: 20px 0; text-align: left; }
.jungle-next-stage { display: flex; align-items: center; gap: 13px; margin: 0 0 17px; padding: 14px 16px; border: 1px solid #ead99b; border-radius: 15px; background: #fff9e5; text-align: left; }
.jungle-next-stage > span { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: #fff; font-size: 1.55rem; }
.jungle-next-stage small { display: block; color: #987626; font-size: 0.57rem; font-weight: 950; letter-spacing: 0.1em; }
.jungle-next-stage strong { display: block; margin-top: 2px; color: var(--navy); }
.jungle-next-stage p { margin: 3px 0 0; color: var(--muted); font-size: 0.68rem; }
.jungle-checkpoint > .primary-button { background: #237b57; box-shadow: none; }
.jungle-saving-compass { font-size: 4rem; animation: jungle-compass-spin 1.4s ease-in-out infinite; }
@keyframes jungle-compass-spin { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
.jungle-treasure-scene { min-height: 110px; display: flex; align-items: end; justify-content: center; gap: 5px; margin-bottom: -3px; font-size: 3.8rem; }
.jungle-treasure-scene strong { font-size: 5.1rem; filter: drop-shadow(0 10px 6px rgba(4,30,70,0.18)); }
.jungle-treasure-scene span { color: #237b57; transform: scaleX(0.72) rotate(-12deg); }
.jungle-treasure-scene span:last-child { transform: scaleX(0.72) rotate(12deg); }
.jungle-result-score { width: 190px; display: grid; justify-items: center; margin: 16px auto 11px; padding: 15px; border: 1px solid #e6ce7b; border-radius: 18px; background: #fff8df; }
.jungle-result-score small { color: #8b6c1d; font-size: 0.56rem; font-weight: 950; letter-spacing: 0.12em; }
.jungle-result-score strong { margin: 3px 0 0; color: #237b57; font-family: Georgia, "Times New Roman", serif; font-size: 2.8rem; line-height: 1; }
.jungle-result-score span { margin-top: 3px; color: var(--muted); font-size: 0.68rem; font-weight: 800; }
.jungle-flawless, .jungle-result-hint, .jungle-save-ok, .jungle-save-warning { width: fit-content; margin: 10px auto !important; padding: 7px 11px; border-radius: 9px; font-size: 0.7rem; font-weight: 850; }
.jungle-flawless { background: #fff3c6; color: #806000 !important; }
.jungle-result-hint { max-width: 470px; background: #edf3f0; color: #4c6859 !important; }
.jungle-save-ok { background: #e9f7ef; color: #176c49 !important; }
.jungle-save-warning { background: #fff0f1; color: #a30b1a !important; }

@media (max-width: 760px) {
  .game-card-jungle, .game-card-jungle:last-child { min-height: 390px; padding-right: 20px; background: #fff; }
  .jungle-card-preview { position: static; width: 100%; height: 138px; margin: 15px 0 0; padding-block: 17px 11px; }
  .jungle-card-route i { width: 36px; height: 36px; font-size: 1.05rem; }
  .jungle-card-preview > strong { font-size: 1.55rem; }
  .jungle-intro { grid-template-columns: 1fr; margin: -28px -20px 24px; padding: 35px 22px 24px; }
  .jungle-intro h2 { font-size: 2.15rem; }
  .jungle-intro-art { min-height: 145px; }
  .jungle-temple { right: 23%; bottom: -8px; font-size: 5.7rem; }
  .jungle-moon { right: 20%; width: 63px; height: 63px; }
  .jungle-compass { left: 12%; width: 58px; height: 58px; font-size: 1.9rem; }
  .jungle-treasure { right: 14%; }
  .jungle-map-heading { display: block; }
  .jungle-map-heading > span { display: block; margin-top: 6px; }
  .jungle-trail { grid-template-columns: repeat(2, 1fr); }
  .jungle-launch { align-items: stretch; flex-direction: column; }
  .jungle-start-button { width: 100%; justify-content: center; }
  .jungle-mission-head { grid-template-columns: auto 1fr; padding-right: 38px; }
  .jungle-live-score { grid-column: 1 / -1; grid-template-columns: auto auto auto; justify-content: start; gap: 4px; min-width: 0; width: fit-content; padding: 6px 9px; }
  .jungle-live-score small { grid-column: auto; }
  .jungle-question-panel { padding: 20px 15px; }
  .jungle-question { font-size: 1.17rem; }
  .jungle-choice { min-height: 54px; padding-inline: 11px; }
  .jungle-checkpoint .jungle-trail { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  .jungle-intro-stats { gap: 5px; }
  .jungle-intro-stats span { padding-inline: 7px; }
  .jungle-trail-stop { gap: 6px; padding: 8px 6px; }
  .jungle-trail-stop > span { width: 29px; height: 29px; }
  .jungle-trail-stop strong { font-size: 0.58rem; }
  .jungle-mission-head h2 { font-size: 1.18rem; }
  .jungle-stage-emblem { width: 50px; height: 50px; border-radius: 15px; }
  .jungle-question-panel { margin-inline: -3px; }
  .jungle-choice > strong { font-size: 0.79rem; }
  .jungle-next-button { width: 100%; justify-content: center; }
  .jungle-checkpoint h2, .jungle-result-screen h2 { font-size: 1.7rem; }
  .jungle-treasure-scene { font-size: 3rem; }
  .jungle-treasure-scene strong { font-size: 4.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .jungle-saving-compass { animation: none; }
}

/* Feeding the pets */
.game-card-pets{background:linear-gradient(145deg,#fff5dc,#e7f7ed);border-color:#9acdb2}
.pets-intro,.pets-play{text-align:center}.pets-intro h3,.pets-play h3{font-size:clamp(24px,4vw,34px);margin:16px 0;color:#244a3b}.pets-intro p,.pets-play>p{line-height:1.6;color:#53665b}
.pets-vocabulary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0}
.pet-word,.pet-choice{font:inherit;cursor:pointer;border:2px solid #d5e6da;background:#fffdf7;border-radius:20px;color:#254337;display:flex;align-items:center;flex-direction:column;padding:14px 8px;gap:6px;transition:transform .18s,background .18s}
.pet-word>span{font-size:42px}.pet-word small{color:#667b6c}.pet-word:hover,.pet-choice:hover:not(:disabled){transform:translateY(-3px);background:#fff2c9;border-color:#c6a64c}.pet-word:focus-visible,.pet-choice:focus-visible{outline:3px solid #264cbe;outline-offset:3px}
.pets-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0}.pet-choice{min-height:165px;background:linear-gradient(#f4fbff 65%,#e8f3dc 65%);position:relative}.pet-animal{font-size:64px;line-height:1.1}.pet-bowl{font-size:28px}.pet-bowl-label{font-size:12px}.pet-fed,.pet-fed:disabled{opacity:1;border-color:#38965e;background:#e3f8df;transform:scale(1.03)}.pet-wrong{opacity:.45}.pets-feedback{min-height:52px;line-height:1.5;font-weight:700;color:#315b43;margin:12px 0}.pets-play .primary-button[hidden]{display:none}
@media(max-width:480px){.pets-vocabulary{grid-template-columns:repeat(2,1fr)}.pet-animal{font-size:52px}.pet-choice{min-height:150px}.pets-choices{gap:8px}}
@media(prefers-reduced-motion:reduce){.pet-word,.pet-choice{transition:none;transform:none!important}}
/* WEATHER CHAOS: Save the Weather Machine */
.game-card-weather{background:linear-gradient(145deg,#e7f5ff,#fff0c9);border-color:#a5c8e5}
.wc-wrap{text-align:center;color:#26384f}.wc-wrap h3{font-size:clamp(24px,4vw,34px);margin:18px 0 12px}.wc-wrap p{line-height:1.6}.wc-wrap>.eyebrow{margin-top:24px}.wc-machine{border:3px solid #2b4468;background:#e3edf6;border-radius:24px;padding:18px;max-width:430px;margin:22px auto;box-shadow:0 6px 0 #b5c8dc}.wc-machine-screen{background:#1c304d;border-radius:14px;padding:15px;color:#d6f8ff;display:flex;align-items:center;justify-content:center;gap:16px}.wc-machine-screen>span{font-size:54px}.wc-machine-screen small,.wc-machine-screen strong{display:block}.wc-machine-screen small{font-size:11px;letter-spacing:2px;margin-bottom:6px}.wc-machine-screen strong{color:#ffca7b}.wc-machine-lights{display:flex;justify-content:space-around;gap:7px;margin-top:14px}.wc-machine-lights span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#bdcbd9;color:#35455a;font-weight:800}.wc-machine-lights .on{background:#b6e99b;color:#19452b}.wc-fixed .wc-machine-screen{background:#234f4c}.wc-fixed .wc-machine-screen strong{color:#d4ffa6}
.wc-vocab{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0}.wc-vocab button{font:inherit;display:flex;flex-direction:column;align-items:center;gap:7px;padding:14px 8px;border:2px solid #d5e2ed;border-radius:17px;background:white;color:#243d5b;cursor:pointer}.wc-vocab button>span{font-size:36px}.wc-vocab small{font-size:12px}.wc-dictionary{border:1px solid #c5d4e4;border-radius:14px;text-align:left;padding:13px 16px;margin:16px 0;background:#f8fbff}.wc-dictionary summary{cursor:pointer;font-weight:700}.wc-missions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));text-align:left;gap:12px;padding-left:28px;font-size:14px}.wc-scene{font-size:64px;line-height:1.2;margin:15px}.wc-round{font-size:13px;color:#586b80;margin:10px}.wc-answers{display:grid;gap:10px;margin-top:20px}.wc-answer{font:inherit;font-size:20px;font-weight:700;padding:16px;border:2px solid #c1d1e2;border-radius:16px;background:#fff;color:#294362;cursor:pointer}.wc-answer:hover:not(:disabled),.wc-vocab button:hover{border-color:#477dac;background:#eef6ff}.wc-answer:focus-visible,.wc-vocab button:focus-visible,.wc-code:focus-visible{outline:3px solid #2678d8;outline-offset:3px}.wc-wrong{opacity:.5}.wc-correct:disabled{opacity:1;border-color:#4c9449;background:#e4f6dc;color:#254f26}.wc-feedback{min-height:54px;margin:16px 0;line-height:1.5;font-weight:700}.wc-wrap .primary-button[hidden]{display:none}.wc-code{display:block;width:160px;max-width:100%;margin:16px auto;padding:12px;border:3px solid #8eb0d2;border-radius:14px;font:800 36px monospace;text-align:center;letter-spacing:8px}.wc-celebration{background:linear-gradient(160deg,#fff,#eef9e5);border-radius:20px}.wc-celebration blockquote{margin:20px 0;font-size:20px;font-weight:700;color:#3d6750}.wc-celebration .primary-button{display:flex;margin:18px auto}.wc-wrap .game-modal-head{text-align:left}
@media(max-width:480px){.wc-vocab{grid-template-columns:repeat(2,minmax(0,1fr))}.wc-missions{font-size:12px}.wc-machine{padding:12px}.wc-machine-screen{gap:8px}.wc-machine-screen>span{font-size:40px}.wc-machine-screen small{letter-spacing:1px}.wc-answer{font-size:18px}}
/* Alien School Invasion */
.game-card-alien{background:linear-gradient(140deg,#eef0ff,#dff9ee);border-color:#9bafd7}.ai-wrap{color:#23334f;text-align:center}.ai-wrap h3{font-size:clamp(23px,4vw,33px);line-height:1.25;margin:17px 0}.ai-wrap p{line-height:1.6}.ai-wrap .game-modal-head{text-align:left}.ai-brief{position:relative;overflow:hidden;text-align:left;background:radial-gradient(circle at 90% 30%,#364e78,#15213d 65%);color:#f5f8ff;border-radius:22px;padding:26px 24px;margin:20px 0}.ai-brief p{max-width:80%;font-size:15px}.ai-alert{color:#b7f586;font-size:10px;font-weight:800;letter-spacing:2px}.ai-ufo{position:absolute;font-size:58px;right:12px;bottom:18px;transform:rotate(-15deg)}.ai-crew{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:20px 0}.ai-file{font:inherit;border:2px solid #d5e0ed;border-radius:18px;background:#f6f9ff;padding:13px 6px;display:flex;flex-direction:column;align-items:center;gap:10px;cursor:pointer;color:#263958}.ai-file strong{font-size:17px}.ai-file small{font-size:11px;line-height:1.5}.ai-file:hover:not(:disabled){background:#ecf7e6;border-color:#84ac56}.ai-portrait{display:inline-block;position:relative;width:86px;height:101px;flex-shrink:0}.ai-head{position:absolute;background:var(--alien-color);width:78px;height:62px;border:2px solid #26314c;border-radius:47% 47% 42% 42%;left:4px;top:13px;z-index:2;box-shadow:inset -6px -5px 0 #00000010}.ai-eyes{display:flex;justify-content:center;gap:4px;position:absolute;left:4px;right:4px;top:15px}.ai-eyes i{display:block;width:17px;height:21px;background:white;border:1.5px solid #26314c;border-radius:50%;position:relative}.ai-eyes i:after{content:"";position:absolute;left:5px;top:7px;width:7px;height:9px;background:#26314c;border-radius:50%}.ai-smile{position:absolute;width:20px;height:9px;border:2px solid #26314c;border-top:0;border-radius:0 0 14px 14px;bottom:10px;left:27px}.ai-antenna{position:absolute;top:0;left:42px;height:19px;width:3px;background:#26314c}.ai-antenna:before{content:"";position:absolute;width:9px;height:9px;border:2px solid #26314c;border-radius:50%;background:var(--alien-color);left:-3px;top:0}.ai-body{position:absolute;bottom:0;left:17px;width:52px;height:42px;background:var(--alien-color);border:2px solid #26314c;border-radius:18px 18px 14px 14px}.ai-body:after{content:"✦";color:#26314c;position:absolute;bottom:5px;left:17px;font-size:15px}.ai-glossary{padding:15px;border:1px solid #cdd7e9;border-radius:15px;text-align:left}.ai-glossary summary{cursor:pointer;font-weight:700}.ai-glossary>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px}.ai-glossary button{font:inherit;display:flex;flex-direction:column;gap:5px;text-align:left;padding:10px;background:#f5f7fc;border:1px solid #d7dfeb;border-radius:10px;cursor:pointer}.ai-glossary small{color:#596a7d}.ai-levels{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ai-levels button{font:inherit;text-align:left;padding:19px;border:2px solid #bccde0;background:#f2f7ff;border-radius:18px;color:#20314f;cursor:pointer}.ai-levels button:last-child{background:#eeeaff;border-color:#b9a4e7}.ai-levels span{font-size:10px;font-weight:800;letter-spacing:1px}.ai-levels strong{display:block;font-size:24px;margin:9px 0}.ai-levels small{line-height:1.6}.ai-note{font-size:12px;color:#5c6c82}.ai-stages{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}.ai-stages span{font-size:11px;border:1px solid #cbd5e3;color:#5c6d81;border-radius:20px;padding:6px 9px;background:#f3f6fa}.ai-stages .active{background:#253d66;color:#fff;border-color:#253d66}.ai-stages .done{background:#e3f2d8;color:#305333}.ai-evidence{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;background:#f0f4fa;border-radius:12px;padding:12px;font-size:12px;font-weight:700}.ai-school-map{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0;justify-content:center}.ai-school-map span{font-size:11px;padding:7px;border-radius:8px;background:#edf0f5;color:#526178}.ai-school-map .active{background:#ffe5a0;color:#3f381e;font-weight:700}.ai-question-head{margin:25px 0 15px}.ai-question-head .eyebrow{font-size:11px;color:#4b5e80}.ai-question-head h3{font-size:clamp(20px,3vw,26px)}.ai-answers{display:grid;gap:10px;margin:20px 0}.ai-answer{font:inherit;font-size:18px;font-weight:650;text-align:left;padding:17px;border:2px solid #cbd7e7;border-radius:15px;background:white;color:#293b57;cursor:pointer}.ai-answer:hover:not(:disabled){background:#edf5ff;border-color:#789ac1}.ai-wrong:disabled{opacity:.45}.ai-correct:disabled{opacity:1;background:#e5f5da;border-color:#649d48;color:#25482b}.ai-feedback{min-height:56px;line-height:1.6;font-weight:650;margin:16px 0}.ai-wrap .primary-button[hidden]{display:none}.ai-wrap button:focus-visible,.ai-wrap input:focus-visible{outline:3px solid #487fe2;outline-offset:3px}.ai-interview{display:flex;align-items:center;justify-content:center;gap:16px;margin:20px 0}.ai-interview blockquote{padding:18px;background:#eaf1fb;border-radius:18px;line-height:1.5;font-size:20px;margin:0;text-align:left}.ai-sentence{min-height:66px;padding:16px;border:2px dashed #9eb4d0;border-radius:14px;background:#f4f8fe;font-size:20px;line-height:1.5}.ai-tiles{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:18px 0}.ai-tiles button{font:inherit;font-size:18px;background:#fff;border:2px solid #b9cbe0;border-radius:10px;padding:10px 14px;cursor:pointer}.ai-tiles button:disabled{opacity:.3}.ai-order-controls{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}.ai-airlock{background:#172741;color:#e9f4ff;padding:22px;border-radius:20px;margin:22px 0}.ai-airlock>span{font-size:68px}.ai-airlock .eyebrow{color:#b1ed86}.ai-code,.ai-password{font:700 22px monospace;display:block;text-align:center;border:2px solid #a8bbd5;border-radius:12px;padding:14px;margin:12px auto 22px;width:100%;max-width:360px;box-sizing:border-box}.ai-code{max-width:160px;letter-spacing:8px;font-size:32px}.ai-launch{font-size:80px;margin:20px}.ai-farewell{justify-items:center}.ai-victory .eyebrow{color:#55733a}
@media(max-width:520px){.ai-crew{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-levels{grid-template-columns:1fr}.ai-brief{padding:20px}.ai-brief p{max-width:100%;padding-right:25px}.ai-ufo{font-size:38px;right:5px;bottom:8px}.ai-interview{gap:7px}.ai-interview blockquote{padding:12px;font-size:17px}.ai-glossary>div{grid-template-columns:1fr}.ai-farewell{grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}.ai-farewell .ai-portrait{transform:scale(.8)}}
/* Grammar Challenge */
body[data-group="junior"] .senior-only { display:none!important; }
.gc-hero {background:var(--navy);color:white;border-radius:24px;padding:32px;margin-bottom:22px;}
.gc-hero h1 {font-size:clamp(2rem,5vw,3rem);margin:12px 0;color:white;}
.gc-hero .eyebrow {color:var(--lime);}
.gc-stats {display:flex;flex-wrap:wrap;gap:24px;margin-top:24px;}
.gc-stats b {font-size:1.7rem;color:var(--lime);display:block;}
.gc-panel,.gc-sheet {background:white;border:1px solid var(--line);border-radius:22px;padding:26px;margin-bottom:22px;}
.gc-sheet summary, #view-grammar details summary {cursor:pointer;font-weight:bold;}
.gc-columns {display:grid;grid-template-columns:1fr 1fr;gap:24px;}
.gc-filters {display:grid;grid-template-columns:repeat(2,1fr);gap:18px;margin:24px 0;}
#view-grammar label {display:block;font-weight:bold;}
#view-grammar select,#view-grammar input {width:100%;padding:14px;border:1px solid #aaa9bb;border-radius:12px;background:white;color:var(--ink);font:inherit;margin-top:8px;}
.gc-actions,.gc-top {display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
.gc-top {justify-content:space-between;margin-bottom:18px;}
#view-grammar button {padding:12px 18px;border:1px solid var(--line);border-radius:12px;background:#f1efff;color:var(--ink);font:inherit;font-weight:bold;cursor:pointer;}
#view-grammar button.gc-primary {background:var(--purple);color:white;border-color:var(--purple);}
#view-grammar button:disabled {opacity:.5;cursor:default;}
#view-grammar button:focus-visible,#view-grammar input:focus-visible,#view-grammar select:focus-visible {outline:3px solid var(--purple);outline-offset:3px;}
.gc-note {font-size:.85rem;color:#666579;line-height:1.6;}
.gc-question h1 {font-size:clamp(1.5rem,4vw,2.1rem);line-height:1.45;}
.gc-question form {margin-top:24px;}
.gc-feedback {padding:18px;border-radius:14px;margin:20px 0;line-height:1.6;}
.gc-feedback.correct {background:#e6f7ed;}.gc-feedback.incorrect {background:#fff2d8;}
#view-grammar progress {width:100%;height:12px;accent-color:var(--purple);margin-bottom:20px;}
@media(max-width:700px){.gc-filters,.gc-columns{grid-template-columns:1fr;}.gc-panel,.gc-hero,.gc-sheet{padding:20px;}body[data-group="senior"] .mobile-nav{grid-template-columns:repeat(6,1fr);}body[data-group="senior"] .mobile-nav.has-teacher{grid-template-columns:repeat(7,1fr);}body[data-group="senior"] .mobile-nav small{font-size:.48rem;}}
/* Food Adventure, junior module */
body[data-group="senior"] .junior-only{display:none!important;}
.food-hero{background:#fff1cf;border:1px solid #f2d58d;border-radius:26px;padding:30px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px;}
.food-hero h1{font-size:clamp(2rem,5vw,3rem);margin:12px 0;}.food-hero-art{font-size:clamp(2.3rem,7vw,4.5rem);line-height:1.5;white-space:nowrap;}
.food-stats{display:flex;flex-wrap:wrap;gap:24px;margin-top:20px;}.food-stats b{display:block;font-size:1.65rem;}
.food-panel{padding:26px;background:white;border:1px solid var(--line);border-radius:22px;margin-bottom:22px;}.food-panel summary{cursor:pointer;font-weight:bold;font-size:1.1rem;}
.food-phrases,.food-vocab,.food-modes{display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr));margin:20px 0;}.food-modes{grid-template-columns:repeat(4,minmax(0,1fr));}
#view-food button{font:inherit;color:var(--ink);border:2px solid #e3e0ee;background:#fff;border-radius:16px;padding:16px;cursor:pointer;min-height:48px;}
#view-food button:hover:not(:disabled){border-color:var(--purple);background:#f6f3ff;}#view-food button:disabled{opacity:.55;cursor:default;}#view-food button:focus-visible,#view-food select:focus-visible{outline:3px solid var(--purple);outline-offset:3px;}
#view-food button.food-primary{background:var(--purple);border-color:var(--purple);color:white;}
.food-modes button{text-align:left;}.food-modes button>span{font-size:2rem;}.food-modes b,.food-phrases b,.food-vocab b{display:block;margin:8px 0;}.food-modes small,.food-phrases small,.food-vocab small{display:block;line-height:1.5;color:#615e70;}
.food-picture{display:block;font-size:3.5rem;line-height:1.5;}.food-play>.food-picture{font-size:5.5rem;}.food-play{text-align:center;}.food-play h1{font-size:clamp(1.4rem,4vw,2rem);line-height:1.4;}
.food-options,.food-actions,.food-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:18px 0;}.food-options{justify-content:center;}.food-options button{font-size:1.15rem!important;min-width:140px;flex:1;}.food-toolbar{justify-content:space-between;}.food-toolbar select{font:inherit;padding:10px;border-radius:10px;}.food-note{color:#666173;font-size:.85rem;line-height:1.6;}.food-cue{background:#f4f1ff;padding:16px;border-radius:12px;font-weight:bold;}
.food-feedback{padding:18px;border-radius:16px;margin:20px 0;background:#fff2d8;}.food-feedback.correct{background:#e6f7ed;}.food-sentence{padding:20px;background:#f4f1ff;border-radius:12px;min-height:64px;font-size:1.3rem;}#view-food progress{width:100%;height:12px;accent-color:var(--purple);margin-bottom:18px;}
@media(max-width:700px){.food-modes,.food-phrases,.food-vocab{grid-template-columns:repeat(2,minmax(0,1fr));}.food-panel,.food-hero{padding:20px;}.food-hero-art{display:none;}body[data-group="junior"] .mobile-nav{grid-template-columns:repeat(6,1fr);}body[data-group="junior"] .mobile-nav.has-teacher{grid-template-columns:repeat(7,1fr);}body[data-group="junior"] .mobile-nav small{font-size:.48rem;}.food-options button{min-width:110px;padding:12px!important;}}
.task-grades{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:24px 0;}
.task-grades button{border:2px solid var(--line);border-radius:18px;background:white;color:var(--ink);padding:18px 12px;text-align:left;font:inherit;cursor:pointer;min-height:80px;}
.task-grades b,.task-grades small{display:block;}.task-grades small{margin-top:6px;font-size:.8rem;}
.task-grades button.active{border-color:var(--purple);background:#f0edff;}.task-grades button:focus-visible{outline:3px solid var(--purple);outline-offset:3px;}
.grade-chip{background:#ede9ff;color:#40337e;font-weight:bold;}.task-list-summary{color:var(--muted);font-size:.9rem;margin-bottom:18px;}
@media(max-width:600px){.task-grades{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}.task-grades button{padding:14px;}}
/* Daily Routine Challenge */
.dr-hero{background:#122d4e;color:#fff;padding:26px;border-radius:22px;margin-bottom:20px;}.dr-hero h2{color:white;font-size:clamp(1.6rem,4vw,2.3rem);}.dr-kicker{color:#ffda76;font-size:.75rem;letter-spacing:.12em;font-weight:bold;}.dr-day{font-size:clamp(1.5rem,5vw,2.5rem);margin:20px 0;}.dr-levels,.dr-vocab{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0;}.dr-levels button,.dr-vocab button,.dr-options button,.dr-actions button{font:inherit;padding:16px;background:#fff;border:2px solid #e0dfed;border-radius:14px;color:var(--ink);cursor:pointer;min-height:48px;}.dr-levels b,.dr-levels span,.dr-vocab b,.dr-vocab small{display:block;}.dr-levels span,.dr-vocab small{margin-top:8px;line-height:1.5;}.dr-vocab button>span{font-size:1.8rem;}.dr-glossary{border:1px solid var(--line);padding:18px;border-radius:16px;margin:16px 0;line-height:1.6;}.dr-glossary summary{cursor:pointer;font-weight:bold;}.dr-note{font-size:.85rem;color:var(--muted);}.dr-top{display:flex;justify-content:space-between;gap:12px;color:var(--muted);}.dr-route{display:flex;gap:6px;margin:20px 0;}.dr-route span{flex:1;text-align:center;padding:10px 4px;background:#f0f1f7;border-radius:10px;font-weight:bold;}.dr-route small{display:block;font-size:.65rem;margin-top:5px;}.dr-route .active{background:#173959;color:white;}.dr-route .done{background:#dcf4e5;color:#175c38;}.dr-route+progress{width:100%;accent-color:var(--purple);height:10px;}.dr-story,.dr-sentence{padding:20px;background:#f0f3fc;border-radius:14px;margin:18px 0;line-height:1.8;}.dr-clock{font:700 3rem monospace;text-align:center;padding:24px;color:#153a57;}.dr-prompt{font-size:1.3rem;font-weight:bold;line-height:1.6;}.dr-options,.dr-actions{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0;}.dr-options button{flex:1;min-width:140px;}.dr-options button:hover:not(:disabled),.dr-levels button:hover{border-color:var(--purple);}.dr-feedback{padding:18px;margin:20px 0;border-radius:14px;line-height:1.6;background:#fff1d1;}.dr-feedback.correct{background:#dff6e8;}.dr-options button:disabled,.dr-actions button:disabled{opacity:.55;cursor:default;}.dr-levels button:focus-visible,.dr-options button:focus-visible,.dr-vocab button:focus-visible{outline:3px solid var(--purple);outline-offset:3px;}@media(max-width:520px){.dr-levels{grid-template-columns:1fr;}.dr-route small{font-size:.55rem;}.dr-hero{padding:20px;}.dr-options{flex-direction:column;}.dr-options button{width:100%;}}

/* Weekly family projects */
.wk-hero{padding:30px;border-radius:24px;background:linear-gradient(120deg,#082e50,#164c64);color:#fff;margin-bottom:22px;}.wk-hero h1{color:#fff;margin:10px 0;font-size:clamp(1.8rem,4vw,2.7rem);}.wk-hero .eyebrow{color:#ffdb70;}.wk-hero p{line-height:1.6;}.wk-hero>span{display:inline-block;padding:8px 12px;background:#ffffff14;border-radius:10px;font-size:.85rem;}.wk-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:20px 0;}.wk-toolbar label{margin-left:auto;}.wk-toolbar select{max-width:100%;padding:12px;border:1px solid #c8d5df;border-radius:12px;}.wk-toolbar button,.wk-panel button:not(.primary-button),#wkBack{border:1px solid #cedbe2;border-radius:12px;padding:12px 18px;background:#fff;color:#123851;cursor:pointer;font:inherit;}.wk-toolbar button[aria-pressed=true]{background:#f9d469;border-color:#f9d469;font-weight:800;}.wk-panel{padding:26px;border:1px solid #e0e8ed;border-radius:20px;background:#fff;margin:20px 0;}.wk-panel p{line-height:1.65;}.wk-words{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;}.wk-words button{display:grid;gap:6px;text-align:center;}.wk-words span{font-size:2rem;}.wk-words small{color:#556879;}.wk-game{display:flex;align-items:center;gap:24px;background:#fff9e7;}.wk-game>div{flex:1;}.wk-step{display:flex;align-items:flex-start;gap:12px;padding:17px;margin-bottom:12px;background:#f3f7fa;border-radius:12px;line-height:1.6;}.wk-step input{width:22px;height:22px;flex-shrink:0;accent-color:#1b6959;}.wk-panel textarea{display:block;width:100%;padding:16px;border:1px solid #bacbd6;border-radius:12px;margin:12px 0;font:inherit;resize:vertical;}.wk-panel button:disabled{opacity:.5;cursor:default;}.wk-note{font-size:.83rem;color:#5c6d7b;line-height:1.7;}.wk-options{display:flex;flex-wrap:wrap;gap:12px;}.wk-options button{flex:1;min-width:150px;min-height:65px;}.wk-panel progress{width:100%;accent-color:#21826a;}.wk-panel button:focus-visible,.wk-toolbar button:focus-visible{outline:3px solid #21826a;outline-offset:3px;}
@media(max-width:700px){.wk-words{grid-template-columns:repeat(2,minmax(0,1fr));}.wk-toolbar label{margin-left:0;width:100%;}.wk-hero,.wk-panel{padding:20px;}.wk-game{display:block;}.wk-game>.primary-button{margin-top:12px;}body[data-group="junior"] .mobile-nav,body[data-group="junior"] .mobile-nav.has-teacher{display:flex;overflow-x:auto;justify-content:flex-start;}body[data-group="junior"] .mobile-nav>button{min-width:62px;flex:1 0 62px;}}
