:root {
  --cream: #fffaf1;
  --paper: #ffffff;
  --ink: #17364b;
  --muted: #647684;
  --coral: #ff6547;
  --coral-dark: #df432e;
  --teal: #08aeb8;
  --teal-dark: #087d88;
  --yellow: #ffbf2f;
  --purple: #8d61dc;
  --green: #5cbf74;
  --shadow: 0 18px 50px rgba(33, 64, 79, 0.12);
  --soft-shadow: 0 8px 24px rgba(33, 64, 79, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Avenir Next", "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(10, 174, 184, 0.28);
  outline-offset: 3px;
}

.topbar {
  width: min(1180px, calc(100% - 40px));
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 1000;
  font-size: 21px;
  line-height: 1;
  background: var(--coral);
  border-radius: 12px 9px 13px 8px;
  transform: rotate(-4deg);
  box-shadow: 0 5px 0 #d8432d;
}

.topnav {
  display: flex;
  gap: 36px;
  margin-left: 70px;
}

.topnav a {
  color: #526978;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.topnav a:hover {
  color: var(--coral);
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 5px 6px 5px 14px;
  border: 1px solid rgba(23, 54, 75, 0.1);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
  font-size: 14px;
}

.player-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-left: 5px;
  background: #ffedd0;
  border-radius: 50%;
  font-size: 23px;
}

.hero {
  width: min(1120px, calc(100% - 40px));
  margin: 18px auto 0;
  display: block;
  position: relative;
}

.hero::before,
.hero::after {
  display: none;
}

.hero::before {
  width: 370px;
  height: 370px;
  right: -80px;
  top: 20px;
  background: rgba(13, 183, 190, 0.1);
}

.hero::after {
  width: 230px;
  height: 230px;
  left: -140px;
  bottom: 5px;
  background: rgba(255, 191, 47, 0.14);
}

.eyebrow,
.section-kicker {
  color: var(--coral-dark);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: #fff0e9;
  border: 1px solid #ffd5c8;
  border-radius: 999px;
}

.eyebrow > span:first-child {
  color: var(--yellow);
}

.eyebrow [data-current-series] {
  color: var(--coral-dark);
}

.hero h1 {
  max-width: 600px;
  margin: 24px 0 18px;
  font-size: clamp(44px, 5.2vw, 72px);
  line-height: 0.98;
  letter-spacing: -3px;
  font-weight: 1000;
}

.hero h1 span {
  display: inline-block;
  color: var(--coral);
  transform: rotate(-1.2deg);
}

.hero-copy > p {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 550;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  color: white;
  background: var(--coral);
  box-shadow: 0 7px 0 var(--coral-dark), 0 15px 25px rgba(223, 67, 46, 0.2);
}

.secondary-button {
  color: var(--ink);
  background: white;
  border: 1px solid rgba(23, 54, 75, 0.12);
  box-shadow: 0 5px 0 #dce5e7;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(3px);
  box-shadow: none;
}

.hero-trust {
  display: flex;
  gap: 28px;
  margin-top: 36px;
}

.hero-trust div {
  display: grid;
}

.hero-trust strong {
  font-size: 20px;
  line-height: 1;
}

.hero-trust span {
  margin-top: 5px;
  color: #788995;
  font-size: 11px;
  font-weight: 750;
}

.hero-art-card {
  width: 100%;
  aspect-ratio: 2 / 1;
  position: relative;
  overflow: hidden;
  border: 8px solid white;
  border-radius: 38px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-art-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 30px;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 65, 71, 0.1));
  pointer-events: none;
}

.hero-art-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 46%;
  border-radius: 30px;
}

.speech-bubble {
  position: absolute;
  z-index: 2;
  top: 26px;
  left: -36px;
  padding: 13px 17px;
  background: white;
  border-radius: 18px 18px 18px 4px;
  box-shadow: var(--soft-shadow);
  color: #607583;
  font-size: 12px;
  line-height: 1.35;
  transform: rotate(-3deg);
}

.speech-bubble strong {
  color: var(--ink);
}

.floating-badge {
  position: absolute;
  z-index: 3;
  min-width: 140px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  column-gap: 9px;
  background: white;
  border-radius: 17px;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.floating-badge > span {
  width: 34px;
  height: 34px;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  background: #fff1c1;
  border-radius: 11px;
  font-size: 19px;
}

.floating-badge b {
  font-size: 14px;
}

.floating-badge small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.badge-stars {
  right: -26px;
  top: 98px;
}

.badge-level {
  left: -46px;
  bottom: 38px;
  transform: rotate(3deg);
}

.series-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 70px;
  padding: 20px;
  background: #fff2d6;
  border: 1px solid rgba(226, 153, 0, 0.15);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.series-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.series-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(23px, 2.6vw, 30px);
  line-height: 1.06;
  letter-spacing: -1.5px;
}

.series-heading > p {
  max-width: 300px;
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.series-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.series-card {
  min-width: 0;
  min-height: 118px;
  padding: 13px 14px;
  display: grid;
  align-content: start;
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  border: 2px solid transparent;
  border-radius: 19px;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(65, 70, 64, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.series-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(65, 70, 64, 0.13);
}

.series-card.active {
  background: white;
  border-color: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(255, 101, 71, 0.15), 0 14px 24px rgba(65, 70, 64, 0.1);
}

.series-card.annual.active { border-color: var(--teal); box-shadow: 0 6px 0 rgba(8, 174, 184, 0.14), 0 14px 24px rgba(65, 70, 64, 0.1); }
.series-card.logic.active { border-color: var(--purple); box-shadow: 0 6px 0 rgba(141, 97, 220, 0.14), 0 14px 24px rgba(65, 70, 64, 0.1); }

.series-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.series-card-head small {
  color: var(--coral-dark);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1.1px;
}

.series-card.annual .series-card-head small { color: var(--teal-dark); }
.series-card.logic .series-card-head small { color: #6f43ba; }

.series-check {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: white;
  border: 2px solid #cfd8d4;
  border-radius: 7px;
}

.series-card.active .series-check {
  color: white;
  background: var(--coral);
  border-color: var(--coral);
}

.series-card.annual.active .series-check { background: var(--teal); border-color: var(--teal); }
.series-card.logic.active .series-check { background: var(--purple); border-color: var(--purple); }
.series-card.active .series-check::after { content: "✓"; font-size: 14px; font-weight: 950; }

.series-copy {
  display: grid;
}

.series-copy strong {
  margin-top: 6px;
  font-size: 15px;
  letter-spacing: -0.4px;
}

.series-copy > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.series-count {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
}

.mission-strip {
  width: min(1080px, calc(100% - 40px));
  min-height: 118px;
  margin: 40px auto 90px;
  padding: 22px 30px;
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 0.9fr) auto;
  align-items: center;
  gap: 22px;
  color: white;
  background: var(--ink);
  border-radius: 25px;
  box-shadow: 0 12px 0 #0d2637, var(--shadow);
}

.mission-icon {
  width: 63px;
  height: 63px;
  display: grid;
  place-items: center;
  background: #284a60;
  border-radius: 20px;
  font-size: 32px;
}

.mission-label {
  color: #81dce0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.mission-strip h2 {
  margin: 5px 0 0;
  font-size: 21px;
  letter-spacing: -0.5px;
}

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

.mission-track,
.subject-progress,
.quiz-track {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.mission-track {
  height: 9px;
  flex: 1;
}

.mission-track span,
.subject-progress span,
.quiz-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--yellow);
}

.mission-progress strong {
  font-size: 11px;
  white-space: nowrap;
}

.mission-strip > button {
  min-height: 47px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--yellow);
  border: 0;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 0 #cb8e00;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 110px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 32px;
}

.section-heading h2,
.progress-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -1.8px;
}

.section-heading > p {
  max-width: 360px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.contest-practice-copy > p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.contest-series-picker {
  min-width: 210px;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
}

.subject-card {
  min-height: 330px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgba(23, 54, 75, 0.08);
  border-radius: 25px;
  box-shadow: var(--soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.subject-card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: var(--shadow);
}

.subject-card.is-disabled {
  filter: grayscale(0.6);
  opacity: 0.48;
}

.subject-card.is-disabled:hover {
  transform: none;
  box-shadow: var(--soft-shadow);
}

.subject-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.subject-icon {
  width: 88px;
  height: 88px;
  display: block;
  transform: rotate(-2deg);
  filter: drop-shadow(0 9px 9px rgba(33, 64, 79, 0.16));
}

.subject-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.subject-count {
  padding: 6px 9px;
  color: var(--muted);
  background: #f4f6f5;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
}

.subject-card h3 {
  margin: 17px 0 6px;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.subject-card p {
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.subject-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
}

.subject-progress {
  height: 7px;
  flex: 1;
  background: #edf0ef;
}

.subject-card.coral .subject-progress span { background: var(--coral); }
.subject-card.teal .subject-progress span { background: var(--teal); }
.subject-card.green .subject-progress span { background: var(--green); }
.subject-card.purple .subject-progress span { background: var(--purple); }

.subject-progress-row strong {
  color: var(--muted);
  font-size: 10px;
}

.subject-card > button {
  min-height: 40px;
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  color: var(--ink);
  background: #f7f7f3;
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.subject-card > button:hover {
  background: #eef4f1;
}

.subject-card > button:disabled,
.map-stop:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.modes-section {
  width: min(1180px, calc(100% - 40px));
  padding: 76px 46px 82px;
  position: relative;
  background: #f0eee6;
  border-radius: 42px;
}

.modes-section::before {
  content: "";
  position: absolute;
  width: 118px;
  height: 118px;
  top: -46px;
  right: 46px;
  background: url("assets/mode-icons/learn-your-way.png") center / contain no-repeat;
  transform: rotate(5deg);
  filter: drop-shadow(0 9px 8px rgba(23, 54, 75, 0.14));
  pointer-events: none;
}

.section-heading.centered {
  display: block;
  text-align: center;
}

.section-heading.centered > p {
  max-width: 530px;
  margin: 12px auto 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.mode-card {
  min-height: 450px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: left;
  background: white;
  border: 0;
  border-radius: 27px;
  box-shadow: 0 6px 0 rgba(23, 54, 75, 0.11), var(--soft-shadow);
  cursor: pointer;
  transition: transform 180ms ease;
}

.mode-card:hover {
  transform: translateY(-7px);
}

.flash-mode,
.letter-mode,
.memory-mode {
  cursor: default;
}

.letter-mode,
.pairs-mode {
  grid-column: auto;
  grid-row: auto;
}

.mode-art {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  background: #eef8f3;
  border-radius: 20px;
}

.mode-art::before,
.mode-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}

.mode-art::before { width: 120px; height: 120px; left: -35px; top: -45px; }
.mode-art::after { width: 80px; height: 80px; right: -16px; bottom: -28px; }

.mode-art-generated img {
  width: 190px;
  height: 190px;
  z-index: 1;
  object-fit: contain;
  filter: drop-shadow(0 9px 8px rgba(23, 54, 75, 0.12));
}

.mode-art span,
.mode-art b {
  min-width: 70px;
  height: 88px;
  display: grid;
  place-items: center;
  z-index: 1;
  color: white;
  background: var(--teal);
  border: 5px solid white;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  font-size: 28px;
  font-style: normal;
  transform: rotate(-8deg);
}

.mode-art b {
  background: var(--yellow);
  transform: rotate(8deg);
  font-size: 24px;
}

.mode-art i {
  z-index: 2;
  color: var(--ink);
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

.quiz-mode .mode-art { background: #fff1e8; }
.quiz-mode .mode-art span { background: var(--coral); }
.quiz-mode .mode-art b { background: var(--purple); }
.flash-mode .mode-art { background: #e7f8f6; }
.letter-mode .mode-art { background: #fff1e8; }
.pairs-mode .mode-art { background: #f3edff; }
.pairs-mode .mode-art span { background: var(--purple); }
.pairs-mode .mode-art b { background: var(--green); }
.pairs-exercise-mode .mode-art { background: #fff1e8; }
.pairs-polish .mode-art { background: #fff1e8; }
.pairs-polish .mode-art span { background: var(--coral); }
.pairs-polish .mode-art b { background: var(--purple); }
.pairs-nature .mode-art { background: #eaf7ea; }
.pairs-nature .mode-art span { background: var(--green); }
.pairs-nature .mode-art b { background: var(--teal); }
.pairs-math .mode-art { background: #e7f8f6; }
.pairs-math .mode-art span { background: var(--teal); }
.pairs-math .mode-art b { background: var(--yellow); }

.mode-card > .mode-title {
  margin-top: 22px;
  color: var(--coral-dark);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.flash-mode > .mode-title,
.letter-mode > .mode-title { color: var(--teal-dark); }
.pairs-mode > .mode-title { color: #6d45b1; }

.mode-subheading {
  margin-top: 4px;
  color: var(--coral-dark);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.learning-mission-mode {
  grid-column: 1 / -1;
}

.mode-card > small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.practice-picker {
  width: 100%;
  margin-top: 15px;
  display: grid;
  gap: 6px;
}

.practice-picker > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.practice-picker select {
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 13px;
  color: var(--ink);
  background: #faf8ff;
  border: 2px solid #ded2f5;
  border-radius: 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.practice-picker select:focus-visible {
  outline: 3px solid rgba(124, 91, 179, 0.24);
  outline-offset: 2px;
}

.mode-cta {
  width: 100%;
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #d9dfde;
  font-size: 12px;
  font-weight: 900;
}

.mode-cta b {
  font-size: 17px;
}

.mode-start {
  padding: 18px 0 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-top: 1px dashed #d9dfde;
  font-family: inherit;
  cursor: pointer;
}

.mode-start:focus-visible {
  outline: 3px solid rgba(124, 91, 179, 0.24);
  outline-offset: 5px;
}

.mode-actions {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  border-top: 1px dashed #d9dfde;
}

.mode-actions .mode-cta,
.mode-actions .mode-review-button {
  min-height: 42px;
  margin: 0;
  padding: 9px 11px;
  border-radius: 12px;
}

.mode-actions .mode-cta {
  gap: 7px;
  background: #f5f8f7;
  border: 1px solid #d5dfdd;
}

.mode-review-button {
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  color: #5d4680;
  background: #f7f2ff;
  border: 1px solid #d9caef;
  border-radius: 12px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.mode-review-button:hover {
  background: #efe6fc;
}

.mode-actions .mode-review-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1.15;
}

.mode-review-button:focus-visible {
  outline: 3px solid rgba(124, 91, 179, 0.24);
  outline-offset: 2px;
}

.learning-dashboard {
  width: min(1120px, calc(100% - 40px));
  margin: 18px auto 52px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  align-items: start;
  gap: 18px;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 195, 70, 0.45), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(115, 216, 215, 0.34), transparent 30%),
    linear-gradient(135deg, #fff5d6 0%, #e9f8f6 56%, #f3edff 100%);
  border: 1px solid rgba(226, 153, 0, 0.16);
  border-radius: 38px;
  box-shadow: var(--soft-shadow);
}

.learning-map-panel {
  --learning-map-accent: var(--coral);
  --learning-map-glow: rgba(255, 101, 71, 0.32);
  min-width: 0;
  padding: 16px;
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  box-shadow: 0 12px 28px rgba(65, 70, 64, 0.1);
}

.learning-map-panel[data-learning-map-color="teal"] {
  --learning-map-accent: var(--teal);
  --learning-map-glow: rgba(8, 174, 184, 0.3);
}

.learning-map-panel[data-learning-map-color="green"] {
  --learning-map-accent: var(--green);
  --learning-map-glow: rgba(92, 191, 116, 0.3);
}

.learning-map-panel[data-learning-map-color="purple"] {
  --learning-map-accent: var(--purple);
  --learning-map-glow: rgba(141, 97, 220, 0.3);
}

.learning-map-heading {
  display: grid;
  gap: 13px;
  text-align: left;
}

.learning-map-heading h1 {
  margin: 5px 0 0;
  font-size: clamp(31px, 3.3vw, 44px);
  line-height: 1;
  letter-spacing: -1.7px;
}

.learning-map-heading p {
  max-width: 520px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.contest-map-heading {
  margin: 0 2px 13px;
}

.contest-map-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(31px, 3.3vw, 44px);
  line-height: 1;
  letter-spacing: -1.7px;
}

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

.contest-map-series button {
  justify-content: center;
}

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

.learning-map-categories button {
  min-width: 0;
  min-height: 52px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: #f7f8f5;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.learning-map-categories button:hover { transform: translateY(-2px); }
.learning-map-categories button[aria-pressed="true"] { background: white; border-color: var(--coral); }
.learning-map-categories button.teal[aria-pressed="true"] { border-color: var(--teal); }
.learning-map-categories button.green[aria-pressed="true"] { border-color: var(--green); }
.learning-map-categories button.purple[aria-pressed="true"] { border-color: var(--purple); }

.learning-map-categories img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.learning-map-categories span {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.learning-map-card {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #fff1cf;
  border: 5px solid white;
  border-radius: 23px;
  box-shadow: 0 12px 30px rgba(91, 72, 35, 0.16);
}

.learning-map-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.learning-map-stop {
  position: absolute;
  z-index: 2;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.learning-map-stop > span {
  width: 62px;
  height: 62px;
  padding: 4px;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  background: #fffdf8;
  border: 4px solid var(--learning-map-accent);
  border-radius: 50%;
  box-shadow: 0 6px 0 rgba(23, 54, 75, 0.2), 0 10px 22px rgba(23, 54, 75, 0.13);
  transition: transform 160ms ease, border-color 160ms ease;
}

.learning-map-stop:not(:disabled):hover > span { transform: scale(1.07); }
.learning-map-stop.is-current > span { animation: learning-map-pulse 1.9s ease-in-out infinite; }
.learning-map-stop.is-locked { cursor: not-allowed; opacity: 0.64; }

.learning-map-stop .learning-map-status-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(23, 54, 75, 0.2));
}

.learning-map-stop > strong {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(23, 54, 75, 0.13);
  font-size: 10px;
  white-space: nowrap;
}

.learning-stop-easy { left: 23.6%; top: 62.2%; }
.learning-stop-medium { left: 52.2%; top: 35.8%; }
.learning-stop-hard { left: 74.4%; top: 15.4%; }

.learning-map-action {
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  background: #fff8e8;
  border: 1px solid #f2dfaa;
  border-radius: 18px;
}

.learning-map-action-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 15px;
}

.learning-map-action-icon img { width: 48px; height: 48px; object-fit: contain; }
.learning-map-action-copy { min-width: 0; display: grid; gap: 2px; }
.learning-map-action-copy small { color: var(--coral-dark); font-size: 8px; font-weight: 950; letter-spacing: 0.8px; text-transform: uppercase; }
.learning-map-action-copy strong { font-size: 13px; line-height: 1.2; }
.learning-map-action-copy > span { color: var(--muted); font-size: 10px; line-height: 1.35; }

.learning-map-action > button {
  min-height: 42px;
  padding: 0 14px;
  color: white;
  background: var(--learning-map-accent);
  border: 0;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 0 rgba(23, 54, 75, 0.18);
}

@keyframes learning-map-pulse {
  0%, 100% { box-shadow: 0 6px 0 rgba(23, 54, 75, 0.2), 0 0 0 0 var(--learning-map-glow); }
  50% { box-shadow: 0 6px 0 rgba(23, 54, 75, 0.2), 0 0 0 7px transparent; }
}

.learning-dashboard-art {
  min-width: 0;
  min-height: 100%;
  padding: 10px;
  display: grid;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  box-shadow: 0 12px 28px rgba(65, 70, 64, 0.1);
  overflow: hidden;
}

.learning-dashboard-art img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  display: block;
  object-fit: cover;
  border-radius: 23px;
}

.learning-dashboard-copy {
  min-width: 0;
  padding: 24px;
  position: relative;
  display: grid;
  align-content: start;
  gap: 15px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(65, 70, 64, 0.08);
}

.learning-dashboard-copy h1 {
  margin: 6px 0 0;
  font-size: clamp(34px, 4.4vw, 55px);
  line-height: 0.96;
  letter-spacing: -2.2px;
}

.learning-dashboard-copy h2 {
  margin: 5px 0 0;
  font-size: clamp(29px, 3vw, 39px);
  line-height: 1;
  letter-spacing: -1.4px;
}

.learning-dashboard-copy > p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

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

.learning-stat-card {
  min-width: 0;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 6px;
  background: #f8faf8;
  border: 1px solid #e5eee9;
  border-radius: 18px;
}

.learning-stat-card > span,
.series-pick-heading > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.learning-stat-card > span { font-size: 10px; }

.learning-stat-card strong {
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.7px;
}

.learning-stat-card small,
.series-pick-heading small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.learning-stat-card small { font-size: 11px; }

.learning-stat-card.level-card {
  grid-column: 1 / -1;
  padding: 18px;
  color: white;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 199, 87, 0.28), transparent 34%),
    #123c4d;
  border-color: rgba(255, 255, 255, 0.16);
}

.learning-stat-card.level-card > span,
.learning-stat-card.level-card small {
  color: rgba(255, 255, 255, 0.72);
}

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

.level-track i {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--yellow), #ffe7a1);
  border-radius: inherit;
  transition: width 260ms ease;
}

.learning-next-step,
.learning-level-block {
  margin-top: 0;
}

.learning-dashboard .progress-subject-list {
  margin-top: 10px;
  grid-template-columns: 1fr;
}

.learning-dashboard .progress-subject-copy strong { font-size: 13px; }
.learning-dashboard .progress-subject-copy small { font-size: 10px; }

.learning-stats-heading {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.learning-stats-heading > span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1px;
}

.learning-stats-content {
  padding-top: 0;
}

.learning-stats-panel.is-collapsed {
  min-height: 56px;
  padding: 10px;
  align-self: start;
}

.learning-stats-panel.is-collapsed .learning-stats-content {
  display: none;
}

.learning-stats-heading .learning-stats-toggle {
  position: static;
  flex: 0 0 auto;
}

.learning-subject-row {
  --learning-subject-accent: var(--coral);
  min-height: 112px;
  align-items: center;
}

.learning-subject-row.teal { --learning-subject-accent: var(--teal); }
.learning-subject-row.green { --learning-subject-accent: var(--green); }
.learning-subject-row.purple { --learning-subject-accent: var(--purple); }

.learning-dashboard .progress-subject-copy > .learning-level-meter {
  height: 10px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}

.learning-level-meter > span {
  height: 10px;
  position: relative;
  overflow: hidden;
  background: #e4e9e7;
  border-radius: 999px;
}

.learning-dashboard .learning-level-meter i {
  width: 0;
  height: 100%;
  display: block;
  background: var(--learning-subject-accent);
  border-radius: inherit;
  transition: width 260ms ease;
}

.learning-level-meter > span.is-complete i { width: 100%; }
.learning-level-meter > span.is-current { box-shadow: 0 0 0 2px rgba(23, 54, 75, 0.09); }

.learning-dashboard .progress-subject-copy > .learning-level-labels {
  height: auto;
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}

.learning-level-labels small {
  margin: 0;
  color: #89959b;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.learning-level-labels small.is-complete,
.learning-level-labels small.is-current {
  color: var(--learning-subject-accent);
  font-weight: 950;
}

.learning-subject-result {
  min-width: 70px;
  display: grid;
  justify-items: end;
}

.learning-subject-result > strong {
  color: #9a6800;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.learning-subject-result > small {
  margin-top: 3px;
  color: var(--learning-subject-accent);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.learning-subject-row > b {
  min-width: 62px;
  padding: 5px 8px;
  color: var(--teal-dark);
  background: #e6f8f6;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
}

.learning-subject-row.coral > b { color: var(--coral-dark); background: #fff0e9; }
.learning-subject-row.green > b { color: #30733b; background: #eaf7ea; }
.learning-subject-row.purple > b { color: #6f43ba; background: #f0e9ff; }

.learning-subject-row.is-selected {
  background: white;
  border-color: var(--coral);
  box-shadow: 0 0 0 2px rgba(255, 101, 71, 0.1);
}

.learning-subject-row.teal.is-selected { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(8, 174, 184, 0.1); }
.learning-subject-row.green.is-selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(92, 191, 116, 0.1); }
.learning-subject-row.purple.is-selected { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(141, 97, 220, 0.1); }

.learning-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(12, 38, 51, 0.76);
  backdrop-filter: blur(10px);
  animation: fade-in 180ms ease-out;
}

.learning-progress-overlay[hidden] { display: none; }

.learning-progress-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #f8fbfa;
  border: 7px solid white;
  border-radius: 28px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.learning-progress-dialog-header {
  min-height: 72px;
  padding: 12px 16px 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(248, 251, 250, 0.96);
  border-bottom: 1px solid #dfe9e5;
  backdrop-filter: blur(8px);
}

.learning-progress-dialog-header > div { min-width: 0; }

.learning-progress-dialog-header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.8px;
}

.learning-progress-dialog-header h2 {
  margin: 3px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.learning-progress-dialog-header .close-button { flex: 0 0 auto; }

.learning-level-details {
  --learning-detail-accent: var(--coral);
  padding: 18px;
  background: #f8fbfa;
}

.learning-level-details[data-category="teal"] { --learning-detail-accent: var(--teal); }
.learning-level-details[data-category="green"] { --learning-detail-accent: var(--green); }
.learning-level-details[data-category="purple"] { --learning-detail-accent: var(--purple); }

.learning-level-details-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.learning-level-details-heading > div { min-width: 0; }

.learning-level-details-heading > div > strong {
  margin-top: 3px;
  display: block;
  color: #425860;
  font-size: 12px;
  line-height: 1.4;
}

.learning-level-details-heading > div > span,
.learning-level-scope-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.75px;
  text-transform: uppercase;
}

.learning-level-details-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 1.15;
}

.learning-level-details-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #315c50;
  background: #e8f4ef;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.learning-level-detail-tabs {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.learning-level-detail-tabs button {
  min-width: 0;
  padding: 9px 6px;
  display: grid;
  gap: 2px;
  color: #637078;
  background: white;
  border: 1px solid #dce5e1;
  border-radius: 12px;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}

.learning-level-detail-tabs button strong { font-size: 13px; }
.learning-level-detail-tabs button small { color: var(--muted); font-size: 9px; font-weight: 800; }
.learning-level-detail-tabs button.is-complete strong { color: #27713d; }
.learning-level-detail-tabs button.is-current strong { color: var(--learning-detail-accent); }
.learning-level-detail-tabs button.is-locked { background: #f2f4f3; }
.learning-level-detail-tabs button.is-locked strong { color: #8b9599; }

.learning-level-detail-tabs button.is-selected {
  border-color: var(--learning-detail-accent);
  box-shadow: 0 0 0 2px rgba(23, 54, 75, 0.09);
}

.learning-level-detail-tabs button:focus-visible {
  outline: 3px solid rgba(23, 54, 75, 0.16);
  outline-offset: 2px;
}

.learning-level-detail-content { margin-top: 12px; }

.learning-level-detail-content:focus-visible {
  outline: 3px solid rgba(23, 54, 75, 0.15);
  outline-offset: 3px;
  border-radius: 13px;
}

.learning-level-details-intro {
  margin: 0 1px 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.learning-level-set-list { display: grid; gap: 9px; }

.learning-level-set-card,
.learning-level-general-card {
  padding: 12px;
  background: white;
  border: 1px solid #e2e8e5;
  border-radius: 14px;
}

.learning-level-set-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.learning-level-set-heading > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.learning-level-set-heading span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.learning-level-set-heading strong { color: var(--muted); font-size: 10px; }

.learning-level-set-heading > small {
  padding: 4px 7px;
  color: #4a6570;
  background: #edf4f5;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.learning-level-set-card[data-level-status="complete"] .learning-level-set-heading > small {
  color: #27713d;
  background: #e7f5eb;
}

.learning-level-set-card[data-level-status="current"] .learning-level-set-heading > small {
  color: #795716;
  background: #fff2ca;
}

.learning-level-set-card[data-level-status="locked"] .learning-level-set-heading > small {
  color: #737c80;
  background: #eef0ef;
}

.learning-level-set-progress {
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  background: #e8ecea;
  border-radius: 999px;
}

.learning-level-set-progress i {
  height: 100%;
  display: block;
  background: var(--learning-detail-accent);
  border-radius: inherit;
}

.learning-level-set-card > p,
.learning-level-general-card > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.learning-level-set-card > p span { color: #53666e; font-weight: 850; }

.learning-level-set-card h3,
.learning-level-general-card h3 {
  margin: 11px 0 0;
  font-size: 12px;
}

.learning-level-type-list {
  margin: 7px 0 0;
  padding: 0;
  display: grid;
  gap: 5px;
  list-style: none;
}

.learning-level-type {
  min-width: 0;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  background: #f8faf9;
  border: 1px solid #e8ecea;
  border-radius: 10px;
}

.learning-level-type > span {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  color: #66747a;
  background: white;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 950;
}

.learning-level-type strong {
  color: #34464e;
  font-size: 11px;
  line-height: 1.3;
}

.learning-level-type small {
  color: #7c888d;
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.learning-level-type.is-confirmed { background: #edf8f0; border-color: #c8e5d0; }
.learning-level-type.is-confirmed > span { color: #27713d; }
.learning-level-type.is-started { background: #fff8e5; border-color: #ead9a7; }
.learning-level-type.is-started > span { color: #9a701a; }
.learning-level-type.is-locked { opacity: 0.68; }

.learning-level-empty { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.learning-level-general-card h3 { margin-top: 3px; font-size: 17px; }

.learning-level-general-progress {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.learning-level-general-progress > div > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.learning-level-general-progress small { color: var(--muted); font-weight: 850; }

.learning-level-general-progress > div > i {
  height: 6px;
  margin-top: 4px;
  display: block;
  overflow: hidden;
  background: #e6ebe8;
  border-radius: 999px;
}

.learning-level-general-progress b {
  height: 100%;
  display: block;
  background: var(--learning-detail-accent);
  border-radius: inherit;
}

.learning-level-method-note {
  padding: 8px 9px;
  background: #f2f6f4;
  border-radius: 10px;
}

.contest-dashboard-panel {
  margin-top: 20px;
}

.contest-dashboard {
  margin-top: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(115, 216, 215, 0.24), transparent 30%),
    #10394a;
  border-radius: 30px;
  box-shadow: 0 13px 28px rgba(16, 57, 74, 0.15);
}

.contest-breakdown {
  min-width: 0;
  padding: 24px;
  color: var(--ink);
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  position: relative;
}

.contest-stats-toggle {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  color: var(--coral-dark);
  background: #fff6dc;
  border: 1px solid #f2d58c;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.contest-stats-toggle:hover {
  transform: translateY(-1px);
  background: #ffe9ad;
}

.contest-stats-toggle i::before {
  content: "⌄";
  font-size: 16px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.contest-stats-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.contest-breakdown-content {
  transition: opacity 160ms ease;
}

.contest-breakdown.is-collapsed {
  min-height: 56px;
  padding: 10px;
  align-self: start;
}

.contest-breakdown.is-collapsed .contest-breakdown-content {
  display: none;
}

.contest-breakdown .progress-subject-list {
  grid-template-columns: 1fr;
}

.contest-stats-heading .contest-stats-toggle {
  position: static;
  flex: 0 0 auto;
}

.contest-breakdown .contest-path-list {
  margin-top: 10px;
}

.contest-path-row .progress-subject-copy > strong {
  font-size: 13px;
}

.contest-path-row .progress-subject-copy > small {
  font-size: 10px;
}

.contest-breakdown .progress-subject-copy > .contest-path-meter {
  height: 10px;
  margin-top: 10px;
}

.contest-path-result {
  min-width: 70px;
}

.series-pick-heading {
  margin-top: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.series-pick-heading small {
  max-width: 420px;
  text-align: right;
}

.progress-section {
  width: min(1120px, calc(100% - 40px));
  margin: 18px auto 48px;
  padding: 24px;
  color: white;
  background: #10394a;
  border-radius: 38px;
  overflow: hidden;
  position: relative;
}

.winner-dashboard {
  margin-top: 18px;
}

.progress-section::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  left: -100px;
  top: -110px;
  background: #1d5365;
  border-radius: 50%;
}

.section-kicker.light {
  color: #73d8d7;
}

.progress-copy {
  position: relative;
  z-index: 1;
}

.progress-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 38px;
}

.progress-heading > div:first-child {
  max-width: 560px;
}

.progress-copy p {
  max-width: 560px;
  margin: 18px 0 0;
  color: #b5cad1;
  font-size: 14px;
  line-height: 1.6;
}

.big-stats {
  width: min(420px, 100%);
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 0;
}

.big-stats div {
  padding: 14px 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 7px;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}

.big-stats span {
  grid-row: 1 / 3;
  font-size: 19px;
}

.big-stats strong {
  font-size: 16px;
}

.big-stats small {
  color: #9cb5bd;
  font-size: 8px;
}

.series-progress-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.progress-series-card {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  color: white;
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.progress-series-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.11);
}

.progress-series-card.active {
  background: white;
  border-color: white;
  color: var(--ink);
  box-shadow: 0 8px 0 rgba(4, 31, 43, 0.38);
}

.progress-series-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  font-size: 22px;
}

.progress-series-card.active .progress-series-icon { background: #fff1d5; }
.progress-series-card.annual.active .progress-series-icon { background: #dff5f4; }
.progress-series-card.logic.active .progress-series-icon { background: #eee7ff; }

.progress-series-copy {
  min-width: 0;
  display: grid;
}

.progress-series-copy small {
  color: #79d7db;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1.1px;
}

.progress-series-card.active .progress-series-copy small { color: var(--coral-dark); }
.progress-series-card.annual.active .progress-series-copy small { color: var(--teal-dark); }
.progress-series-card.logic.active .progress-series-copy small { color: #6f43ba; }

.progress-series-copy strong {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  white-space: nowrap;
}

.progress-series-copy > span {
  margin-top: 3px;
  color: #a9c2cb;
  font-size: 9px;
}

.progress-series-card.active .progress-series-copy > span { color: var(--muted); }

.progress-series-percent {
  font-size: 19px;
  font-weight: 950;
}

.series-progress-bar {
  height: 5px;
  grid-column: 1 / -1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.progress-series-card.active .series-progress-bar { background: #e8ecea; }

.series-progress-bar > span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--coral);
  border-radius: inherit;
  transition: width 240ms ease;
}

.progress-series-card.annual .series-progress-bar > span { background: var(--teal); }
.progress-series-card.logic .series-progress-bar > span { background: var(--purple); }

.progress-detail {
  margin-top: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  border-radius: 30px;
  position: relative;
  z-index: 1;
}

.progress-breakdown {
  padding: 18px;
}

.progress-breakdown .section-kicker { color: var(--teal-dark); }

.progress-breakdown h3,
.map-panel-heading h3 {
  margin: 5px 0 0;
  font-size: 24px;
  letter-spacing: -0.7px;
}

.progress-breakdown > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

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

.readiness-summary article {
  min-width: 0;
  padding: 12px 10px;
  display: grid;
  gap: 3px;
  background: #f6faf8;
  border: 1px solid #e5eee9;
  border-radius: 14px;
}

.readiness-summary span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.readiness-summary strong {
  font-size: 20px;
  line-height: 1;
}

.readiness-summary small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.3;
}

.next-step-card {
  margin-top: 12px;
  padding: 14px;
  display: grid;
  gap: 5px;
  background: #fff6dc;
  border: 1px solid #f2d58c;
  border-radius: 16px;
}

.next-step-card > span,
.stats-block-title span {
  color: var(--coral-dark);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.next-step-card strong {
  font-size: 17px;
  letter-spacing: -0.3px;
}

.next-step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.next-step-card a {
  width: max-content;
  margin-top: 5px;
  padding: 8px 11px;
  color: white;
  background: var(--coral);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.stats-block {
  margin-top: 16px;
}

.stats-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stats-block-title strong {
  font-size: 12px;
}

.stats-block-title span {
  color: var(--teal-dark);
}

.learning-subject-list,
.contest-stats-block .progress-subject-list {
  margin-top: 10px;
}

.learning-subject-row > b {
  min-width: 62px;
  padding: 5px 7px;
  color: var(--teal-dark);
  background: #e6f8f6;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
}

.progress-subject-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.progress-subject-row {
  width: 100%;
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #f7f8f5;
  border: 1px solid #eaeeea;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.progress-subject-row:hover {
  transform: translateX(3px);
  background: white;
}

.progress-subject-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #fff0e9;
  border-radius: 14px;
}

.progress-subject-row.teal .progress-subject-icon { background: #e5f7f7; }
.progress-subject-row.green .progress-subject-icon { background: #eaf7ea; }
.progress-subject-row.purple .progress-subject-icon { background: #f0e9ff; }

.progress-subject-icon img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.progress-subject-copy {
  min-width: 0;
  display: grid;
}

.progress-subject-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  white-space: nowrap;
}

.progress-subject-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.progress-subject-copy > span {
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
  background: #e5eae7;
  border-radius: 999px;
}

.progress-subject-copy i {
  width: 0;
  height: 100%;
  display: block;
  background: var(--coral);
  border-radius: inherit;
  transition: width 240ms ease;
}

.progress-subject-row.teal .progress-subject-copy i { background: var(--teal); }
.progress-subject-row.green .progress-subject-copy i { background: var(--green); }
.progress-subject-row.purple .progress-subject-copy i { background: var(--purple); }

.progress-subject-row > b {
  font-size: 12px;
}

.map-panel {
  min-width: 0;
  padding: 16px;
  background: #fff7e3;
  border-radius: 24px;
}

.map-panel-heading {
  margin: 0 2px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.map-panel-heading .section-kicker { color: var(--coral-dark); }

.map-series-picker {
  min-width: 190px;
  display: grid;
  gap: 4px;
}

.map-series-picker > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.map-series-picker select {
  min-height: 40px;
  padding: 0 34px 0 12px;
  color: var(--ink);
  background: white;
  border: 2px solid #f0ce7c;
  border-radius: 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.map-series-picker select:focus-visible {
  outline: 3px solid rgba(255, 178, 0, 0.3);
  outline-offset: 2px;
}

.map-card {
  width: 100%;
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
  background: #71cfd6;
  border: 6px solid white;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(21, 72, 81, 0.18);
}

.map-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.map-stop {
  position: absolute;
  z-index: 2;
  padding: 0;
  display: grid;
  gap: 3px;
  justify-items: center;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.map-stop > span {
  width: 74px;
  height: 74px;
  padding: 4px 5px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: white;
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 5px 0 rgba(23, 54, 75, 0.25), var(--soft-shadow);
  overflow: hidden;
}

.map-stop:hover > span { transform: scale(1.08); }
.map-stop.coral > span { border-color: var(--coral); }
.map-stop.teal > span { border-color: var(--teal); }
.map-stop.green > span { border-color: var(--green); }
.map-stop.purple > span { border-color: var(--purple); }

.map-stop > span img {
  width: 37px;
  height: 37px;
  margin-top: -1px;
  object-fit: contain;
}

.map-stop > span b {
  min-width: 38px;
  margin-top: 1px;
  padding: 2px 5px;
  background: #fff5d9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.map-stop strong {
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(23, 54, 75, 0.14);
  white-space: nowrap;
}

.map-stop strong { font-size: 9px; }

.stop-1 { left: 28%; top: 77%; }
.stop-2 { left: 36%; top: 45%; }
.stop-3 { left: 56%; top: 66%; }
.stop-4 { left: 74%; top: 48%; }

.map-finish {
  position: absolute;
  z-index: 3;
  left: 82%;
  top: 16%;
  display: grid;
  justify-items: center;
  color: var(--ink);
  font-size: 8px;
  transform: translate(-50%, -50%);
}

.map-finish span { font-size: 32px; filter: drop-shadow(0 4px 3px rgba(23, 54, 75, 0.18)); }
.map-finish strong { padding: 3px 7px; background: rgba(255, 255, 255, 0.94); border-radius: 999px; }

footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-top: 1px solid rgba(23, 54, 75, 0.11);
}

footer p {
  color: var(--muted);
  font-size: 11px;
}

footer > button {
  padding: 8px 11px;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(23, 54, 75, 0.16);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(12, 38, 51, 0.78);
  backdrop-filter: blur(10px);
  animation: fade-in 180ms ease-out;
}

.game-overlay[hidden] {
  display: none;
}

.game-shell {
  width: min(940px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: var(--cream);
  border: 7px solid white;
  border-radius: 30px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.game-header {
  min-height: 68px;
  padding: 11px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 250, 241, 0.95);
  border-bottom: 1px solid rgba(23, 54, 75, 0.09);
  backdrop-filter: blur(8px);
}

.close-button {
  width: 42px;
  height: 42px;
  color: var(--muted);
  background: white;
  border: 1px solid rgba(23, 54, 75, 0.12);
  border-radius: 13px;
  font-size: 25px;
  cursor: pointer;
}

.game-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
}

.game-brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 25px;
}

.game-brand-icon img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(23, 54, 75, 0.12));
}

.game-stars {
  padding: 9px 12px;
  background: #fff0c7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.quiz-panel,
.flash-panel,
.pairs-panel,
.result-panel {
  padding: 32px clamp(22px, 6vw, 70px) 45px;
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.quiz-progress-meta {
  justify-content: flex-end;
}

.quiz-progress-meta.has-previous {
  justify-content: space-between;
}

.quiz-previous-button {
  min-height: 36px;
  padding: 7px 12px;
  color: var(--teal-dark);
  background: white;
  border: 1px solid rgba(23, 54, 75, 0.14);
  border-radius: 11px;
  box-shadow: 0 3px 0 rgba(23, 54, 75, 0.08);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}

.quiz-previous-button:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
}

.quiz-track {
  height: 8px;
  margin: 14px 0 26px;
  background: #e6e7df;
}

.quiz-track span {
  background: var(--coral);
  transition: width 300ms ease;
}

.question-emoji {
  width: 66px;
  height: 66px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  font-size: 35px;
  transform: rotate(-3deg);
}

.source-label {
  margin: 14px 0 7px;
  color: var(--coral-dark);
  text-align: center;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.quiz-panel > h2 {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.24;
  letter-spacing: -0.8px;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
  gap: 22px;
}

.reading-passage {
  padding: 22px;
  position: sticky;
  top: 82px;
  background: #fffdf6;
  border: 2px solid #eadfc4;
  border-radius: 22px;
  box-shadow: 0 7px 0 #e8dcc3, var(--soft-shadow);
}

.reading-passage-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #ddcfaf;
}

.reading-passage-head span {
  color: var(--coral-dark);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 1px;
}

.reading-passage-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: -0.4px;
}

.reading-copy {
  padding: 4px 5px 4px 0;
}

.reading-copy p {
  margin: 14px 0 0;
  color: #344d5a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.62;
}

.reading-passage cite {
  display: block;
  margin-top: 15px;
  color: #71818a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  line-height: 1.4;
  text-align: right;
}

.reading-question {
  min-width: 0;
  padding: 10px 0 0;
}

.reading-question h2 {
  margin: 0 auto;
  text-align: center;
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.25;
  letter-spacing: -0.7px;
}

.reading-question .answer-grid {
  grid-template-columns: 1fr;
}

.reading-question .answer-grid button {
  min-height: 57px;
}

.reading-question .feedback-box {
  grid-template-columns: auto 1fr;
}

.reading-question .feedback-box > button {
  grid-column: 1 / 3;
}

.source-order-quiz .reading-layout {
  grid-template-columns: 1fr;
}

.source-order-quiz .reading-passage {
  position: static;
}

.source-order-task h2 {
  max-width: 760px;
  text-align: left;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.35;
  letter-spacing: -0.25px;
}

.source-image-quiz {
  padding-inline: clamp(18px, 4vw, 48px);
}

.source-task-sheet,
.source-image-flashcard {
  width: min(820px, 100%);
  margin: 0 auto;
}

.source-task-meta {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.source-task-meta span {
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.source-task-meta strong {
  color: var(--ink);
  font-size: 13px;
}

.source-task-figure {
  width: 100%;
  margin: 0 0 18px;
}

.source-task-figure figcaption {
  margin: 0 0 7px;
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.source-task-image-frame {
  width: 100%;
  display: block;
  overflow: hidden;
  background: white;
  border: 1px solid #e2ddd2;
  border-radius: 13px;
  box-shadow: var(--soft-shadow);
}

.source-task-image {
  width: 100%;
  height: auto;
  display: block;
}

.source-zoom-button {
  display: none;
  margin: 8px auto 0;
  padding: 9px 12px;
  border: 2px solid #ddcfaf;
  border-radius: 999px;
  background: #fffaf0;
  color: var(--brown);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 3px 0 #eadfc4;
}

.source-task-figure.is-zoomed .source-task-image-frame {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.source-task-figure.is-zoomed .source-task-image {
  width: auto;
  min-width: 680px;
  max-width: none;
}

.source-context-figure {
  margin-bottom: 22px;
}

.source-context-figure .source-task-image-frame {
  border-color: #ddcfaf;
  box-shadow: 0 5px 0 #e8dcc3, var(--soft-shadow);
}

.source-task-help,
.source-key-panel > p {
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.source-task-controls,
.source-self-check {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.source-task-controls button,
.source-self-check button,
.source-flip-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.source-self-check button:disabled {
  cursor: default;
  opacity: 0.55;
}

.source-key-panel {
  margin-top: 22px;
  padding: 18px;
  background: #e8f7ec;
  border: 2px solid #b9dfc1;
  border-radius: 20px;
  outline: none;
}

.source-key-panel .source-answer-figure {
  margin-bottom: 0;
}

.source-key-panel .source-task-image-frame {
  border-color: #8ac69a;
  box-shadow: none;
}

.source-image-flashcard {
  margin: 24px auto 22px;
  padding: 24px;
  background: white;
  border: 3px solid #eadfc4;
  border-radius: 26px;
  box-shadow: 0 10px 0 #e8dcc3, var(--shadow);
}

.source-image-flashcard.revealed {
  background: #e8f7ec;
  border-color: #a6dedb;
  box-shadow: 0 10px 0 #9ed6d3, var(--shadow);
}

.source-flip-button {
  margin: 0 auto;
  display: block;
  color: white;
  background: var(--ink);
}

.order-match-illustrations {
  width: 100%;
  margin: 20px auto 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
}

.order-match-illustration {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-match-illustration img {
  width: auto;
  max-width: 100%;
  height: clamp(70px, 9vw, 105px);
  display: block;
  object-fit: contain;
}

.order-match-list {
  width: 100%;
  display: grid;
  gap: 8px;
}

.order-match-row {
  width: 100%;
  min-height: 48px;
  padding: 7px 0;
  display: grid;
  grid-template-columns: 154px minmax(190px, 1fr) 154px;
  align-items: center;
  gap: 10px;
  border-top: 1px dashed #ebc9cb;
}

.order-match-row:last-child {
  border-bottom: 1px dashed #ebc9cb;
}

.task-pick-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.task-circle,
.task-choice > span {
  width: 29px;
  height: 29px;
  display: grid;
  flex: 0 0 29px;
  place-items: center;
  color: #ef6471;
  background: white;
  border: 1.5px solid #aeb6b5;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 850;
}

.task-statement {
  color: #303e45;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.task-choice {
  cursor: pointer;
}

.task-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.task-choice input:focus-visible + span {
  outline: 3px solid rgba(34, 164, 168, 0.35);
  outline-offset: 2px;
}

.task-choice input:checked + span {
  color: white;
  background: var(--teal);
  border-color: var(--teal-dark);
}

.task-choice input:disabled + span {
  cursor: default;
}

.task-circle.is-correct-answer,
.task-choice > span.is-correct-answer {
  color: white;
  background: var(--green);
  border-color: #477e2d;
}

.task-choice > span.is-wrong-answer {
  color: white;
  background: var(--coral);
  border-color: var(--coral-dark);
}

.order-match-row.interactive {
  padding: 9px 7px;
  border-right: 2px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 11px;
}

.order-match-row.interactive.correct {
  background: #eef8ed;
  border-color: #a8d59c;
}

.order-match-row.interactive.wrong {
  background: #fff2ee;
  border-color: #efb4a5;
}

.order-match-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.order-match-actions button {
  min-height: 42px;
  padding: 0 22px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.order-match-actions button:disabled {
  cursor: default;
  opacity: 0.5;
}

.question-tools {
  margin: 18px 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.question-tools button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted);
  background: white;
  border: 1px solid rgba(23, 54, 75, 0.12);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.hint-box {
  max-width: 690px;
  margin: 0 auto 15px;
  padding: 13px 16px;
  color: #775911;
  background: #fff1bd;
  border: 1px solid #efd277;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.answer-grid {
  max-width: 760px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.answer-grid button {
  min-height: 67px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: white;
  border: 2px solid #e4e7e5;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}

.answer-grid button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--teal);
}

.answer-grid button > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  background: #e7f7f7;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 950;
}

.answer-grid button.correct {
  background: #e8f8e8;
  border-color: var(--green);
}

.answer-grid button.wrong {
  background: #fff0ec;
  border-color: var(--coral);
}

.answer-grid button.correct > span { color: white; background: var(--green); }
.answer-grid button.wrong > span { color: white; background: var(--coral); }

.feedback-box {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 15px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
}

.feedback-box.success { background: #ddf4e1; }
.feedback-box.retry { background: #fff0d9; }
.feedback-box > span { font-size: 28px; }
.feedback-box strong { font-size: 12px; }
.feedback-box p { margin: 3px 0 0; color: #5d7470; font-size: 10px; line-height: 1.4; }
.feedback-box > button {
  min-height: 38px;
  padding: 0 14px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.result-panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.result-medal {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  background: #fff0bd;
  border: 8px solid white;
  border-radius: 50%;
  box-shadow: var(--shadow);
  font-size: 58px;
}

.result-panel .section-kicker { margin-top: 25px; }
.result-panel h2 { margin: 9px 0 8px; font-size: 36px; letter-spacing: -1.2px; }
.result-panel p { color: var(--muted); }
.path-series-prompt > p:not(.path-continuation-note) { max-width: 560px; line-height: 1.55; }
.result-stars { margin-top: 12px; padding: 12px 18px; background: #fff1bf; border-radius: 999px; font-weight: 950; }
.result-panel .path-continuation-note {
  max-width: 520px;
  margin: 18px 0 0;
  padding: 12px 16px;
  color: #315f4a;
  background: #e8f7ec;
  border: 1px solid #b9dfc1;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.5;
}
.result-actions { display: flex; gap: 12px; margin-top: 26px; }

.exercise-session-result {
  padding: 36px 20px 44px;
}

.exercise-session-result > p {
  max-width: 560px;
  margin: 4px 0 0;
  line-height: 1.5;
}

.exercise-session-stats {
  width: min(660px, 100%);
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.exercise-session-stats > span {
  padding: 13px 10px;
  display: grid;
  gap: 3px;
  background: #f6faf8;
  border: 1px solid #d8e8df;
  border-radius: 15px;
}

.exercise-session-stats strong {
  color: var(--teal-dark);
  font-size: 22px;
}

.exercise-session-stats small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.exercise-session-level-up {
  margin-top: 16px !important;
  padding: 11px 16px;
  color: #6a4d11 !important;
  background: #fff4c8;
  border: 1px solid #ead17b;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 850;
}

.exercise-session-type-list {
  width: min(660px, 100%);
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.exercise-session-type-row {
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: #fff8e9;
  border: 1px solid #ead7a9;
  border-radius: 13px;
  text-align: left;
}

.exercise-session-type-row > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 50%;
  font-weight: 950;
}

.exercise-session-type-row strong {
  font-size: 12px;
}

.exercise-session-type-row small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.exercise-session-type-row.is-confirmed {
  background: #eaf7ee;
  border-color: #b9dec4;
}

.exercise-session-type-row.is-confirmed > span {
  color: #27713d;
}

.exercise-session-actions {
  width: min(660px, 100%);
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.exercise-session-actions button {
  min-height: 44px;
}

.flash-panel {
  min-height: 650px;
  position: relative;
}

.flashcard {
  width: min(620px, 100%);
  min-height: 400px;
  margin: 30px auto 22px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: white;
  border: 3px solid #eadfc4;
  border-radius: 30px;
  box-shadow: 0 12px 0 #e8dcc3, var(--shadow);
  cursor: pointer;
  transition: transform 240ms ease, background 240ms ease;
}

.flash-reading {
  width: min(760px, 100%);
  margin: 22px auto 0;
  padding: 18px 20px;
  background: #fffdf6;
  border: 2px solid #eadfc4;
  border-radius: 18px;
  box-shadow: 0 5px 0 #e8dcc3;
}

.flash-reading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #ddcfaf;
}

.flash-reading > div span {
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.flash-reading p {
  margin: 10px 0 0;
  color: #344d5a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.55;
}

.flash-reading cite {
  display: block;
  margin-top: 10px;
  color: #71818a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  text-align: right;
}

.flash-reading + .flashcard {
  min-height: 320px;
  margin-top: 20px;
}

.flashcard.source-task-card {
  width: min(800px, 100%);
  min-height: 0;
  padding: 30px;
  justify-content: start;
}

.flashcard.source-task-card > strong {
  max-width: 100%;
  margin-top: 14px;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.35;
  text-align: left;
}

.source-task-card .order-match-illustrations {
  margin-top: 23px;
}

.source-task-card .order-match-list {
  max-width: 740px;
}

.source-task-solution {
  width: min(740px, 100%);
  margin-top: 18px;
  padding: 13px 15px;
  display: grid;
  gap: 5px;
  color: #216938;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #a6dedb;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.source-task-solution > b {
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.flashcard:hover { transform: rotate(-0.8deg) translateY(-3px); }
.flashcard.revealed { background: #e5f7f5; border-color: #a6dedb; box-shadow: 0 12px 0 #9ed6d3, var(--shadow); transform: rotate(0.8deg); }
.orthography-flash-panel {
  position: relative;
  overflow: hidden;
}
.flashcard.orthography-card {
  min-height: 470px;
  position: relative;
  justify-content: flex-start;
  cursor: default;
}
.flashcard.orthography-card:hover {
  transform: none;
}
.orthography-card .flash-emoji {
  margin: 16px 0 8px;
}
.orthography-instruction {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}
.exercise-support-hint {
  width: min(520px, 100%);
  padding: 10px 13px;
  display: grid;
  gap: 3px;
  color: #5e4a1f;
  background: #fff8dc;
  border: 1px solid #ead28b;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}
.exercise-support-hint strong {
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.flashcard .orthography-word {
  max-width: 100%;
  margin-top: 26px;
  display: flex;
  align-items: end;
  justify-content: center;
  color: var(--ink);
  font-size: clamp(42px, 8vw, 68px);
  font-weight: 1000;
  letter-spacing: 1px;
  line-height: 1.08;
}
.flashcard .multiplication-equation {
  gap: 0.2em;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.multiplication-equation .orthography-gap {
  width: auto;
  min-width: 1.25em;
}
.multiplication-equation .math-symbol-gap {
  min-width: 1.25em;
  padding-inline: 0.14em;
  color: var(--coral-dark);
}
.math-equation-with-unknowns {
  font-size: clamp(28px, 6vw, 52px) !important;
}
.math-equation-stack {
  display: grid;
  gap: 14px;
}
.math-equation-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  white-space: nowrap;
}
.math-difficulty {
  margin-right: 6px;
  padding: 3px 8px;
  display: inline-flex;
  color: #1f5b35;
  background: #e2f5e7;
  border: 1px solid #a7dcb5;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.25px;
}
.math-difficulty-medium {
  color: #76541c;
  background: #fff3d7;
  border-color: #efd18c;
}
.math-difficulty-hard {
  color: #8d352a;
  background: #ffebe6;
  border-color: #efb3a9;
}
.orthography-flash-panel .quiz-meta > span:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.exercise-session-goal {
  width: min(620px, calc(100% - 32px));
  margin: 14px auto -12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #31596b;
  background: #edf8fc;
  border: 1px solid #b9dce9;
  border-radius: 14px;
  text-align: center;
}
.exercise-session-goal span {
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.exercise-session-goal strong {
  font-size: 11px;
  line-height: 1.35;
}
.exercise-stage-badge {
  padding: 3px 8px;
  display: inline-flex;
  color: #245a75;
  background: #e7f4fb;
  border: 1px solid #a9d4e7;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.2px;
}
.exercise-stage-medium {
  color: #6d511f;
  background: #fff5db;
  border-color: #e9cf8f;
}
.exercise-stage-hard {
  color: #84372d;
  background: #ffebe7;
  border-color: #ecb6ad;
}
.exercise-progression-warning {
  color: #8d352a;
  font-size: 10px;
  font-weight: 900;
}
.math-answer-options button {
  max-width: 100%;
  font-size: clamp(16px, 3.5vw, 24px);
}
.flashcard.polish-language-card {
  width: min(700px, 100%);
  min-height: min(440px, calc(100dvh - 190px));
  margin: 16px auto 14px;
  padding: clamp(16px, 3vw, 24px);
  gap: clamp(8px, 1.6vh, 12px);
  justify-content: center;
  overflow: hidden;
}
.polish-language-card .flash-year {
  color: #6f8aa0;
}
.polish-exercise-question {
  max-width: min(620px, 100%);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #245a75;
  background: #e7f4fb;
  border: 1px solid #a9d4e7;
  border-radius: 999px;
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
}
.polish-exercise-icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}
.polish-sentence {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 4.1vw, 32px);
  font-weight: 800;
  line-height: 1.24;
  text-align: center;
}
.underlined-word {
  color: #7f3025;
  text-decoration-line: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
  text-decoration-skip-ink: none;
}
.polish-focus-word {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 1000;
  letter-spacing: 1px;
  line-height: 1.1;
}
.polish-language-options {
  width: min(520px, 100%);
  margin-top: 6px;
  gap: 8px;
}
.polish-language-options button {
  min-width: 88px;
  min-height: 48px;
  max-width: 100%;
  padding: 7px 13px;
  border-radius: 13px;
  box-shadow: 0 4px 0 #e8dcc3;
  font-size: clamp(14px, 2.4vw, 18px);
}
.polish-language-card .exercise-support-hint {
  width: min(560px, 100%);
  padding: 8px 11px;
  gap: 2px;
  font-size: 11px;
  line-height: 1.35;
}
.polish-language-card .exercise-support-hint strong {
  font-size: 9px;
}
.polish-language-card .orthography-feedback {
  margin-top: 6px;
  padding: 9px 12px;
  font-size: 12px;
}
.orthography-gap {
  width: calc((var(--gap-characters) * 0.72em) + 10px);
  min-width: 0.9em;
  min-height: 1em;
  margin: 0 3px;
  display: inline-grid;
  place-items: center;
  color: #216938;
  border-bottom: 5px solid var(--coral);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.orthography-gap.filled {
  color: #216938;
  background: #e2f5e7;
  border-color: var(--green);
  border-radius: 9px 9px 3px 3px;
}
.orthography-options {
  width: min(440px, 100%);
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.orthography-options button {
  min-width: 82px;
  min-height: 60px;
  padding: 8px 18px;
  color: var(--ink);
  background: #fffaf1;
  border: 2px solid #eadfc4;
  border-radius: 16px;
  box-shadow: 0 5px 0 #e8dcc3;
  font-size: 24px;
  font-weight: 1000;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.orthography-options button:hover:not(:disabled) {
  transform: translateY(-2px);
}
.orthography-options button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: none;
}
.orthography-options button.wrong {
  color: #9b2f22;
  background: #fff0ec;
  border-color: var(--coral);
  animation: orthography-shake 360ms ease;
}
.orthography-options button.correct {
  color: white;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 5px 0 #379750;
}
.orthography-options button:disabled {
  cursor: default;
}
.orthography-options button:disabled:not(.correct):not(.wrong) {
  opacity: 0.48;
}
.orthography-feedback {
  width: min(360px, calc(100% - 36px));
  margin-top: 28px;
  padding: 12px 16px;
  color: #8f2f23;
  background: #fff0ec;
  border: 2px solid #ffc1b2;
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}
.orthography-feedback[hidden] {
  display: none;
}
.orthography-feedback.is-visible {
  animation: orthography-popup 220ms ease-out;
}
.orthography-feedback.success {
  color: #216938;
  background: #e2f5e7;
  border-color: #a9ddb5;
}

.flashcard.orthography-card {
  width: min(700px, 100%);
  min-height: min(440px, calc(100dvh - 190px));
  margin: 16px auto 14px;
  padding: clamp(16px, 3vw, 24px);
  gap: clamp(8px, 1.6vh, 12px);
  justify-content: center;
  overflow: hidden;
}
.flashcard.orthography-card .flash-year {
  color: #6f8aa0;
}
.exercise-prompt {
  max-width: min(620px, 100%);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #245a75;
  background: #e7f4fb;
  border: 1px solid #a9d4e7;
  border-radius: 999px;
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}
.exercise-prompt-icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}
.flashcard.orthography-card .exercise-support-hint {
  width: min(560px, 100%);
  padding: 8px 11px;
  gap: 2px;
  font-size: 11px;
  line-height: 1.35;
}
.flashcard.orthography-card .exercise-support-hint strong {
  font-size: 9px;
}
.flashcard .orthography-word {
  margin-top: 4px;
  font-size: clamp(46px, 8.5vw, 76px);
  line-height: 1.02;
}
.math-equation-with-unknowns {
  font-size: clamp(32px, 6.4vw, 56px) !important;
}
.math-equation-stack {
  gap: 10px;
}
.polish-sentence {
  max-width: min(760px, 100%);
  margin: 4px 0 0;
  font-size: clamp(22px, 4.8vw, 38px);
  font-weight: 900;
  line-height: 1.22;
}
.polish-focus-word {
  margin: 2px 0 0;
  font-size: clamp(46px, 8vw, 70px);
  line-height: 1.04;
}
.orthography-options,
.polish-language-options {
  width: min(520px, 100%);
  margin-top: 8px;
  gap: 8px;
}
.orthography-options button,
.polish-language-options button {
  min-width: 88px;
  min-height: 48px;
  padding: 7px 13px;
  border-radius: 13px;
  box-shadow: 0 4px 0 #e8dcc3;
  font-size: clamp(16px, 3vw, 22px);
}
.math-answer-options button {
  font-size: clamp(16px, 3vw, 22px);
}
.orthography-feedback,
.polish-language-card .orthography-feedback {
  margin-top: 6px;
  padding: 9px 12px;
  font-size: 12px;
}
.star-reward {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.source-points-reward {
  position: fixed;
}
.star-reward[hidden] {
  display: none;
}
.star-reward > strong {
  position: absolute;
  left: 50%;
  top: 47%;
  z-index: 2;
  padding: 12px 17px;
  color: #7a5a15;
  background: #fff0bf;
  border: 2px solid #f0cf65;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 16px;
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
}
.star-reward > span {
  --burst-x: 0px;
  --burst-y: -30px;
  position: absolute;
  left: 50%;
  top: 48%;
  font-size: 30px;
  opacity: 0;
}
.star-reward > span:nth-of-type(1) { --burst-x: -92px; --burst-y: -28px; }
.star-reward > span:nth-of-type(2) { --burst-x: -48px; --burst-y: -82px; }
.star-reward > span:nth-of-type(3) { --burst-x: 0px; --burst-y: -104px; }
.star-reward > span:nth-of-type(4) { --burst-x: 52px; --burst-y: -78px; }
.star-reward > span:nth-of-type(5) { --burst-x: 96px; --burst-y: -24px; }
.star-reward.is-collecting > strong {
  animation: reward-label 1300ms ease-out both;
}
.star-reward.is-collecting > span {
  animation: collect-star 1200ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: calc(var(--star-index) * 70ms);
}
.flash-year { color: var(--coral-dark); font-size: 9px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.flash-emoji { margin: 20px 0; font-size: 55px; }
.flashcard strong { max-width: 520px; font-size: clamp(22px, 3vw, 31px); line-height: 1.25; }
.memory-flash-question {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(17px, 2.5vw, 22px);
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}
.flashcard strong.memory-flash-example {
  width: min(420px, 100%);
  margin-top: 16px;
  padding: 14px 18px;
  background: #fffaf1;
  border: 2px solid #eadfc4;
  border-radius: 15px;
  font-size: clamp(27px, 4vw, 38px);
}
.flash-correct-answer {
  width: min(520px, 100%);
  margin-top: 20px;
  padding: 12px 14px;
  display: grid;
  gap: 3px;
  color: #216938;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #a6dedb;
  border-radius: 13px;
}
.flash-correct-answer > span {
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.flash-correct-answer b {
  font-size: 18px;
  line-height: 1.3;
}
.flash-answer-examples {
  margin-top: 8px;
  padding-top: 8px;
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(33, 105, 56, 0.18);
}
.flash-answer-examples > span {
  color: #6b856e;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.flash-answer-examples i {
  font-size: 16px;
  font-style: normal;
  line-height: 1.3;
}
.flash-answer-examples i::before {
  content: "• ";
}
.flash-answer-details {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  text-align: left;
}
.flash-answer-bullets {
  display: grid;
  gap: 4px;
}
.flash-answer-bullets i,
.flash-answer-note {
  font-size: 16px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.35;
}
.flash-answer-bullets i::before {
  content: "- ";
}
.flash-answer-note code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(33, 105, 56, 0.1);
  color: #1e6738;
  font: inherit;
}
.flash-choices {
  width: min(520px, 100%);
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}
.flash-choice {
  min-height: 58px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffaf1;
  border: 1px solid #eadfc4;
  border-radius: 13px;
}
.flash-choice > span {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: var(--coral);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 950;
}
.flash-choice b {
  font-size: 12px;
  line-height: 1.3;
}
.flashcard small { max-width: 520px; margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.worked-solution {
  width: min(540px, 100%);
  display: grid;
  gap: 9px;
  color: #344d5a;
  text-align: left;
}
.pattern-worked-solution {
  width: min(540px, 100%);
  display: grid;
  gap: 11px;
  color: #344d5a;
  text-align: left;
}
.pattern-example,
.pattern-last-items {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: center;
  gap: 10px;
}
.pattern-example {
  padding: 13px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #bce3e3;
  border-radius: 13px;
}
.pattern-item {
  min-width: 62px;
  display: grid;
  justify-items: center;
  gap: 4px;
}
.pattern-item b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 7px;
  font-size: 10px;
}
.pattern-item-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}
.pattern-shape {
  width: 31px;
  height: 31px;
  display: block;
  background: var(--purple);
}
.pattern-shape.circle {
  background: var(--teal);
  border-radius: 50%;
}
.pattern-shape.square {
  background: var(--yellow);
  border-radius: 4px;
}
.pattern-shape.triangle {
  background: var(--purple);
  clip-path: polygon(50% 4%, 96% 94%, 4% 94%);
}
.pattern-symbol {
  height: 31px;
  display: grid;
  place-items: center;
  font-size: 27px;
  line-height: 1;
}
.pattern-item.is-target .pattern-shape {
  background: var(--coral);
  filter: drop-shadow(0 3px 0 rgba(223, 67, 46, 0.2));
}
.pattern-item.is-target .pattern-symbol {
  padding: 2px 5px;
  background: #ffe2d9;
  border-radius: 9px;
  box-shadow: 0 0 0 2px var(--coral);
}
.pattern-item.is-target b {
  background: var(--coral);
}
.pattern-fit-question {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.35;
  text-align: center;
}
.pattern-division {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 13px;
  color: var(--teal-dark);
  background: white;
  border: 1px solid #bce3e3;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 950;
}
.pattern-tally-board {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
}
.pattern-tally-group {
  min-width: 58px;
  padding: 9px 8px;
  display: grid;
  gap: 9px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px dashed #a8c9cc;
  border-radius: 10px;
}
.pattern-tally-group.is-last {
  border-style: solid;
  border-color: var(--coral);
  background: #fff7f3;
}
.pattern-tallies {
  min-height: 34px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 7px;
}
.pattern-tallies i {
  width: 3px;
  height: 28px;
  display: block;
  background: #66808d;
  border-radius: 999px;
}
.pattern-tallies i.is-target {
  width: 5px;
  height: 34px;
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 101, 71, 0.16);
}
.pattern-last-items {
  padding-top: 9px;
  border-top: 1px solid #f0c2b7;
  gap: 5px;
}
.pattern-last-items .pattern-item {
  min-width: 41px;
}
.pattern-last-items .pattern-shape {
  width: 24px;
  height: 24px;
}
.pattern-last-items .pattern-symbol {
  height: 25px;
  font-size: 22px;
}
.pattern-last-items .pattern-item-label {
  display: none;
}
.worked-label {
  margin-top: 5px;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.worked-lines {
  display: grid;
  gap: 5px;
}
.worked-equations {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.worked-equations > span {
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #bce3e3;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}
.worked-steps {
  display: grid;
  gap: 5px;
}
.worked-steps > span {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 7px;
}
.worked-steps i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 7px;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
}
.worked-steps b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}
.worked-answer {
  margin-top: 3px;
  padding: 9px 11px;
  color: #216938;
  background: #dff4e4;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}
.feedback-box .worked-solution {
  margin-top: 8px;
}
.flash-actions { display: flex; justify-content: center; gap: 12px; }
.flash-actions button { min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px; font-size: 12px; font-weight: 900; cursor: pointer; }
.flash-actions button:disabled { cursor: default; opacity: 0.62; }
.learn-button { color: #7a5a15; background: #fff0bf; box-shadow: 0 5px 0 #e3c567; }
.know-button { color: white; background: var(--green); box-shadow: 0 5px 0 #379750; }

.pairs-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.pairs-panel {
  height: min(650px, calc(100dvh - 126px));
  min-height: 0;
  padding: clamp(14px, 2.5vh, 22px) clamp(20px, 5vw, 54px) clamp(16px, 3vh, 26px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.game-shell:has(.pairs-panel),
#game-content:has(.pairs-panel) {
  overflow: hidden;
}

.pairs-heading h2 {
  max-width: 720px;
  margin: 0;
  padding: 6px 13px;
  color: #245a75;
  background: #e7f4fb;
  border: 1px solid #a9d4e7;
  border-radius: 999px;
  font-size: clamp(11px, 1.5vw, 14px);
  font-weight: 750;
  line-height: 1.25;
}

.pairs-heading p {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.pairs-heading .exercise-stage-badge {
  margin-top: 0;
}

.pairs-board {
  flex: 1;
  min-height: 0;
  margin-top: 12px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: white;
  border: 3px solid #eadfc4;
  border-radius: 25px;
  box-shadow: 0 8px 0 #e8dcc3, var(--soft-shadow);
  animation: fade-in 240ms ease-out;
}

.pair-column {
  min-height: 0;
  padding: 10px;
  display: grid;
  grid-template-rows: auto;
  grid-auto-rows: minmax(0, 1fr);
  gap: 7px;
  background: #fffaf1;
  border: 1px solid #efe3ca;
  border-radius: 18px;
}

.answers-column {
  background: #f0faf8;
  border-color: #cce8e3;
}

.pair-column h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

.pair-column button {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 7px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: white;
  border: 2px solid #e4e7e5;
  border-radius: 13px;
  box-shadow: 0 3px 0 rgba(23, 54, 75, 0.09);
  font-size: clamp(12px, 1.55vw, 15px);
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.pair-column button span { font-size: 24px; }
.pair-column button:hover:not(:disabled) { transform: translateY(-1px); }
.pair-column button.selected { color: white; background: var(--purple); border-color: var(--purple); box-shadow: 0 3px 0 #6740ad; transform: translateY(-1px); }
.pair-column button.matched { color: #367b49; background: #def3e4; border-color: var(--green); opacity: 0.65; }
.pair-column button:disabled { cursor: default; }
.pair-column button.leftover { border-style: dashed; opacity: 0.35; }
.answers-column button { justify-content: center; text-align: center; }
.pairs-finish {
  margin-top: 10px;
  padding: 9px 12px;
  display: grid;
  gap: 3px;
  color: #216938;
  text-align: center;
  background: #def3e4;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
  animation: orthography-popup 220ms ease-out;
}
.pairs-finish small { color: #4f7359; font-size: 10px; }
.pairs-reward > strong { font-size: 18px; }

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes orthography-popup {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes orthography-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

@keyframes reward-label {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  18%, 68% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(0.86); }
}

@keyframes collect-star {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(0deg); }
  26% { opacity: 1; transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) scale(1.25) rotate(120deg); }
  68% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + 230px), calc(-50% - 330px)) scale(0.3) rotate(300deg); }
}

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

@media (max-width: 980px) {
  .topnav { display: none; }
  .hero { padding-top: 0; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-art-card { width: 100%; margin: 0 auto; }
  .mission-strip { grid-template-columns: auto 1fr auto; }
  .mission-progress { grid-column: 2 / 4; grid-row: 2; }
  .series-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .series-card { min-height: 118px; }
  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .mode-grid { grid-template-columns: 1fr; }
  .letter-mode, .pairs-mode, .learning-mission-mode { grid-column: auto; grid-row: auto; }
  .mode-card { min-height: 260px; display: grid; grid-template-columns: 190px 1fr; column-gap: 22px; }
  .mode-art { height: 100%; grid-row: 1 / 6; }
  .mode-title { width: max-content; }
  .mode-cta { align-self: end; }
  .learning-dashboard,
  .contest-dashboard { grid-template-columns: 1fr; }
  .learning-dashboard-art img { min-height: 320px; max-height: 420px; }
  .progress-heading { display: block; }
  .big-stats { width: 100%; margin-top: 24px; }
  .progress-detail { grid-template-columns: 1fr; }
  .map-panel { order: -1; }
  .reading-layout { grid-template-columns: 1fr; }
  .reading-passage { position: static; }
}

@media (max-width: 680px) {
  .topbar { width: min(100% - 24px, 1180px); height: 68px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }
  .player-chip { padding-left: 10px; }
  .player-avatar { display: none; }
  .hero { width: min(100% - 28px, 1180px); min-height: auto; margin-top: 10px; }
  .hero h1 { font-size: 44px; letter-spacing: -2.4px; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { display: grid; }
  .hero-actions button { width: 100%; }
  .hero-trust { gap: 16px; justify-content: space-between; text-align: left; }
  .hero-trust span { font-size: 9px; }
  .hero-art-card { height: auto; border-width: 5px; border-radius: 25px; }
  .hero-art-card img, .hero-art-card::before { border-radius: 20px; }
  .speech-bubble { left: 12px; top: 12px; }
  .badge-stars { right: -10px; top: 100px; }
  .badge-level { left: -8px; bottom: 22px; }
  .series-section { width: min(100% - 28px, 960px); margin-top: 22px; padding: 20px 14px; border-radius: 27px; }
  .series-heading { display: block; }
  .series-heading > p { margin-top: 10px; }
  .series-grid { grid-template-columns: 1fr; gap: 10px; }
  .series-card { min-height: 0; padding: 12px 13px; display: grid; grid-template-columns: 1fr; }
  .series-copy > span { display: none; }
  .mission-strip { width: min(100% - 28px, 1080px); margin: 50px auto 80px; padding: 20px; grid-template-columns: auto 1fr; }
  .mission-strip > button { grid-column: 1 / 3; }
  .mission-progress { grid-column: 1 / 3; grid-row: auto; }
  .section, .modes-section, .progress-section, .learning-dashboard { width: min(100% - 28px, 1120px); margin-bottom: 80px; }
  .winner-dashboard { margin: 10px auto 36px; }
  .learning-dashboard { padding: 12px; border-radius: 27px; }
  .learning-map-panel { padding: 10px; border-radius: 22px; }
  .learning-map-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-map-categories.contest-map-series { grid-template-columns: 1fr; }
  .learning-map-categories button { min-height: 48px; }
  .learning-map-action { grid-template-columns: auto minmax(0, 1fr); }
  .learning-map-action > button { grid-column: 1 / -1; width: 100%; }
  .learning-map-stop > span { width: 46px; height: 46px; padding: 3px; border-width: 3px; }
  .learning-map-stop .learning-map-status-icon { width: 34px; height: 34px; }
  .learning-map-stop > strong { font-size: 9px; }
  .learning-dashboard-copy { padding: 18px 14px; border-radius: 22px; }
  .learning-subject-row { min-height: 106px; gap: 8px; }
  .learning-subject-result { min-width: 62px; }
  .learning-subject-result > strong { font-size: 11px; }
  .learning-dashboard-copy h1,
  .learning-dashboard-copy h2 { font-size: 36px; letter-spacing: -1.7px; }
  .learning-dashboard-art { padding: 7px; border-radius: 22px; }
  .learning-dashboard-art img { min-height: 260px; border-radius: 17px; }
  .learning-stat-grid { grid-template-columns: 1fr; }
  .contest-dashboard { padding: 9px; border-radius: 22px; }
  .contest-breakdown { padding: 18px 14px; border-radius: 22px; }
  .series-pick-heading { display: grid; align-items: start; }
  .series-pick-heading small { max-width: none; text-align: left; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .contest-series-picker { margin-top: 18px; }
  .subject-grid { grid-template-columns: 1fr; }
  .subject-card { min-height: 290px; }
  .modes-section { padding: 58px 18px 28px; }
  .modes-section::before { width: 92px; height: 92px; top: -38px; right: 18px; }
  .mode-card { min-height: 400px; display: flex; }
  .mode-art { height: 160px; }
  .progress-section { padding: 12px; }
  .progress-copy h2 { font-size: 34px; }
  .big-stats { gap: 6px; }
  .big-stats div { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .big-stats span { grid-row: auto; }
  .series-progress-grid { grid-template-columns: 1fr; }
  .progress-detail { padding: 9px; gap: 10px; border-radius: 22px; }
  .progress-breakdown { padding: 14px 8px; }
  .readiness-summary { grid-template-columns: 1fr; }
  .next-step-card a { width: 100%; text-align: center; }
  .stats-block-title { display: grid; gap: 3px; }
  .progress-subject-list { grid-template-columns: 1fr; }
  .learning-progress-overlay { padding: 0; place-items: stretch; }
  .learning-progress-dialog { width: 100%; max-height: 100vh; min-height: 100vh; border: 0; border-radius: 0; }
  .learning-progress-dialog-header { padding-left: 16px; }
  .learning-level-details { padding: 12px; }
  .learning-level-details-heading { align-items: stretch; flex-direction: column; }
  .learning-level-details-status { align-self: flex-start; }
  .learning-level-type { grid-template-columns: 20px minmax(0, 1fr); }
  .learning-level-type small { grid-column: 2; text-align: left; }
  .map-panel { padding: 9px; border-radius: 18px; }
  .map-panel-heading { align-items: stretch; flex-direction: column; }
  .map-panel-heading h3 { font-size: 18px; }
  .map-series-picker { width: 100%; min-width: 0; }
  .map-card { height: auto; border-width: 4px; border-radius: 17px; }
  .map-stop > span { width: 52px; height: 52px; padding: 2px 3px 3px; border-width: 3px; }
  .map-stop > span img { width: 27px; height: 27px; margin-top: 0; }
  .map-stop > span b { min-width: 30px; margin-top: 0; padding: 2px 3px; font-size: 9px; }
  .map-stop strong { max-width: 68px; padding: 2px 4px; font-size: 6px; }
  .map-finish span { font-size: 24px; }
  .map-finish strong { padding: 2px 4px; font-size: 6px; }
  footer { display: grid; justify-items: center; text-align: center; }
  .footer-brand { display: none; }
  .game-overlay { padding: 0; place-items: stretch; }
  .game-shell { max-height: 100vh; min-height: 100vh; border: 0; border-radius: 0; }
  .quiz-panel, .flash-panel, .pairs-panel, .result-panel { padding: 24px 16px 35px; }
  .exercise-session-stats { grid-template-columns: 1fr; }
  .exercise-session-type-row { grid-template-columns: 28px minmax(0, 1fr); }
  .exercise-session-type-row small { grid-column: 2; }
  .exercise-session-actions { grid-template-columns: 1fr; }
  .exercise-session-goal { align-items: flex-start; flex-direction: column; text-align: left; }
  .answer-grid { grid-template-columns: 1fr; }
  .feedback-box { grid-template-columns: auto 1fr; }
  .feedback-box > button { grid-column: 1 / 3; }
  .source-task-meta { display: grid; gap: 4px; }
  .source-task-image-frame { overflow-x: hidden; }
  .source-task-image { width: 100%; min-width: 0; max-width: 100%; }
  .source-zoom-button { display: inline-flex; align-items: center; justify-content: center; }
  .source-key-panel, .source-image-flashcard { padding: 14px; }
  .source-task-controls, .source-self-check { display: grid; }
  .source-task-controls button, .source-self-check button { width: 100%; }
  .flashcard { min-height: 380px; padding: 28px 20px; }
  .flashcard.source-task-card { min-height: 0; padding: 24px 14px; }
  .order-match-illustrations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .order-match-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 4px; }
  .task-statement { grid-row: 1; font-size: 14px; text-align: center; }
  .task-pick-group { gap: 12px; }
  .task-circle, .task-choice > span { width: 34px; height: 34px; flex-basis: 34px; }
  .flash-choices { grid-template-columns: 1fr; }
  .worked-equations { grid-template-columns: 1fr; }
  .flash-actions { display: grid; }
  .flash-actions button { width: 100%; }
  .pairs-panel {
    height: calc(100dvh - 68px);
    padding: 10px 8px 12px;
  }
  .pairs-heading { gap: 3px; }
  .pairs-heading .section-kicker { font-size: 9px; }
  .pairs-heading h2 { max-width: 94%; padding: 4px 9px; font-size: 10px; }
  .pairs-heading p { min-height: 13px; font-size: 9px; }
  .pairs-board {
    margin-top: 8px;
    padding: 7px;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 7px;
    border-width: 2px;
    border-radius: 18px;
    box-shadow: 0 5px 0 #e8dcc3;
  }
  .pair-column {
    padding: 6px;
    grid-template-columns: 1fr;
    gap: 5px;
    border-radius: 12px;
  }
  .pair-column h3 { font-size: 8px; letter-spacing: 0.5px; }
  .pair-column button {
    min-height: 0;
    padding: 4px 6px;
    justify-content: flex-start;
    text-align: left;
    flex-direction: row;
    gap: 4px;
    border-radius: 9px;
    box-shadow: 0 2px 0 rgba(23, 54, 75, 0.09);
    font-size: clamp(9px, 2.7vw, 12px);
    line-height: 1.12;
  }
  .pair-column button span { font-size: 15px; }
  .answers-column button { justify-content: center; text-align: center; }
  .pair-column button.extra-answer { display: none; }
  .pairs-finish { margin-top: 6px; padding: 6px 9px; }
  .result-panel h2 { font-size: 29px; }
  .result-actions { display: grid; width: 100%; }
  .reading-passage { padding: 18px; }
  .reading-passage-head { display: grid; }
  .reading-copy p { font-size: 14px; }
  .reading-question { padding-top: 8px; }
  .flash-reading { padding: 16px; }
  .flash-reading > div { display: grid; }
  .flash-reading p { font-size: 14px; }
}

@media (max-height: 650px) {
  .pairs-panel { padding-top: 7px; padding-bottom: 9px; }
  .pairs-heading { gap: 2px; }
  .pairs-heading h2 { padding-block: 3px; font-size: 10px; }
  .pairs-heading p { min-height: 12px; font-size: 9px; }
  .pairs-board { margin-top: 6px; padding: 7px; }
  .pair-column { padding: 6px; gap: 4px; }
  .pair-column button { padding-block: 3px; font-size: 11px; }
  .pair-column button.extra-answer { display: none; }
  .pairs-finish { position: absolute; right: 18px; bottom: 12px; left: 18px; z-index: 2; margin: 0; }
}
