:root {
  --bg-deep: #0b1026;
  --bg-panel: rgba(20, 30, 66, 0.92);
  --bg-card: rgba(30, 44, 92, 0.95);
  --border-glow: rgba(96, 165, 250, 0.45);
  --gold: #fbbf24;
  --gold-bright: #fde047;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --rose: #f43f5e;
  --purple: #a855f7;
  --text-white: #f8fafc;
  --text-soft: #cbd5e1;
  --font-display: 'Fredoka', 'Nunito', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 50% 10%, #1e295d 0%, #0b1026 65%, #060918 100%);
  color: var(--text-white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Starfield background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 40px 60px, #fff, transparent),
    radial-gradient(2px 2px at 140px 180px, #fde047, transparent),
    radial-gradient(2.5px 2.5px at 260px 90px, #38bdf8, transparent),
    radial-gradient(1.5px 1.5px at 340px 260px, #fff, transparent),
    radial-gradient(2px 2px at 480px 120px, #f472b6, transparent);
  background-size: 520px 340px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

/* Top Navigation Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-panel);
  border: 2px solid var(--border-glow);
  border-radius: 22px;
  padding: 12px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.brand-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.5);
}

.brand-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  color: var(--gold-bright);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.brand-title p {
  font-size: 0.88rem;
  color: var(--cyan);
  font-weight: 700;
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(251, 191, 36, 0.45);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--gold-bright);
}

.btn-hud {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid var(--cyan);
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-hud:hover {
  background: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

/* Hero Banner on World Map */
.map-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(88, 28, 135, 0.85));
  border: 3px solid var(--gold);
  border-radius: 26px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.hero-mascot {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 3px solid var(--cyan);
  object-fit: cover;
  background: #fff;
}

.hero-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  color: #fff;
  margin-bottom: 6px;
}

.hero-copy p {
  color: #e2e8f0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.rule-callout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.25);
  border: 1.5px solid #34d399;
  color: #a7f3d0;
  font-weight: 800;
  font-size: 0.9rem;
}

/* 6-World Progression Grid */
.worlds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.world-card {
  position: relative;
  background: var(--bg-card);
  border: 3px solid rgba(148, 163, 184, 0.35);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.world-card.unlocked {
  border-color: var(--cyan);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.2);
  cursor: pointer;
}

.world-card.unlocked:hover {
  transform: translateY(-5px);
  border-color: var(--gold-bright);
  box-shadow: 0 14px 36px rgba(251, 191, 36, 0.3);
}

.world-card.mastered {
  border-color: var(--emerald);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.28);
}

.world-card.locked {
  opacity: 0.72;
  filter: grayscale(0.35);
}

.world-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.world-planet-img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  object-fit: cover;
  background: #fff;
  border: 3px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.world-meta h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  color: var(--gold-bright);
  margin-bottom: 3px;
}

.world-meta .world-sub {
  font-size: 0.92rem;
  color: var(--cyan);
  font-weight: 800;
}

.world-principle-pill {
  background: rgba(15, 23, 42, 0.78);
  border-left: 4px solid var(--gold);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #f1f5f9;
  font-weight: 700;
}

.world-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.accuracy-badge {
  font-weight: 900;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.accuracy-badge.pass {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #6ee7b7;
}

.btn-play-world {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s;
}

.btn-play-world:hover {
  transform: scale(1.04);
}

.btn-play-world.locked-btn {
  background: rgba(71, 85, 105, 0.7);
  color: #cbd5e1;
  box-shadow: none;
}

/* Trophy & Franklin Gadget Bar */
.trophy-strip {
  background: var(--bg-panel);
  border: 2px solid rgba(251, 191, 36, 0.4);
  border-radius: 22px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.trophy-strip h3 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 1.2rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rewards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.reward-slot {
  background: rgba(15, 23, 42, 0.8);
  border: 2px dashed rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.reward-slot.earned {
  border-style: solid;
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.16), rgba(15, 23, 42, 0.9));
}

.reward-slot img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
}

.reward-slot.locked img {
  filter: grayscale(1) brightness(0.35);
}

.reward-slot span {
  font-size: 0.84rem;
  font-weight: 800;
  color: #e2e8f0;
}

/* ============================================================================
   MISSION STAGE & INTERACTIVE MANIPULATIVES
   ============================================================================ */
.mission-stage {
  background: var(--bg-panel);
  border: 3px solid var(--cyan);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

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

.progress-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.prog-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(148, 163, 184, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
}

.prog-dot.active {
  border-color: var(--gold-bright);
  background: rgba(251, 191, 36, 0.28);
  transform: scale(1.12);
}

.prog-dot.correct {
  background: var(--emerald);
  border-color: #6ee7b7;
  color: #064e3b;
}

.prog-dot.wrong {
  background: var(--rose);
  border-color: #fda4af;
  color: #fff;
}

/* Coach Banner inside Mission */
.coach-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.coach-banner img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.prompt-box {
  flex: 1;
}

.prompt-box h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  color: #fff;
  line-height: 1.3;
}

.prompt-sub {
  color: var(--gold-bright);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 4px;
}

.btn-speak {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(251, 191, 36, 0.2);
  color: var(--gold-bright);
  font-size: 1.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.2s;
}

.btn-speak:hover {
  transform: scale(1.1);
  background: rgba(251, 191, 36, 0.4);
}

/* Interactive Manipulative Workspace */
.manipulative-canvas {
  background: rgba(11, 16, 38, 0.85);
  border: 2px solid rgba(148, 163, 184, 0.28);
  border-radius: 22px;
  padding: 24px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
}

/* 1. TEN-FRAME WIDGET */
.tenframe-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.tenframe-row-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--gold-bright);
  background: rgba(251, 191, 36, 0.15);
  border: 1.5px solid var(--gold);
  padding: 4px 14px;
  border-radius: 999px;
}

.tenframe-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  background: #1e293b;
  padding: 14px;
  border-radius: 20px;
  border: 4px solid var(--cyan);
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.tf-cell {
  aspect-ratio: 1;
  background: rgba(15, 23, 42, 0.95);
  border: 3px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.tf-cell.top-row {
  border-color: rgba(251, 191, 36, 0.65);
}

.tf-cell:hover {
  transform: scale(1.05);
}

.tf-cell.filled-gold {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35), rgba(15, 23, 42, 0.95));
  border-color: var(--gold-bright);
}

.tf-cell.filled-blue {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35), rgba(15, 23, 42, 0.95));
  border-color: var(--cyan);
}

.tf-cell-num {
  position: absolute;
  top: 4px;
  left: 7px;
  font-size: 0.75rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.45);
}

.tenframe-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 2. COMET HOP NUMBER LINE & TEEN PLACE VALUE */
.comet-line-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 8px;
}

.comet-stone {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.95);
  border: 3px solid var(--purple);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 900;
  color: #fff;
  position: relative;
}

.comet-stone.start-stone {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-color: var(--gold-bright);
}

.comet-stone.filled-stone {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #a7f3d0;
}

.comet-stone.active-slot {
  border: 3px dashed var(--gold-bright);
  background: rgba(251, 191, 36, 0.15);
  animation: pulseGlow 1.3s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.hop-arrow {
  font-size: 1.3rem;
  color: var(--gold-bright);
  font-weight: 900;
}

.number-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 660px;
}

.num-key {
  min-width: 64px;
  height: 60px;
  padding: 0 14px;
  border-radius: 16px;
  border: 2.5px solid var(--cyan);
  background: rgba(30, 41, 59, 0.95);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}

.num-key:hover {
  background: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
}

/* Teen Place Value Box */
.teen-builder-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.place-card {
  background: rgba(30, 41, 59, 0.95);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 16px 22px;
  text-align: center;
  min-width: 170px;
}

.place-card h4 {
  color: var(--gold-bright);
  font-size: 1rem;
  margin-bottom: 8px;
}

.ten-rod-grid {
  display: grid;
  grid-template-columns: repeat(5, 24px);
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
}

.rod-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--gold);
  display: inline-block;
}

.ones-dot {
  background: var(--cyan);
}

.big-place-digit {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
}

/* 3. TOUCH COUNT GROUPS & PART-PART-WHOLE */
.groups-arena {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.critter-group-box {
  background: rgba(30, 41, 59, 0.9);
  border: 2.5px solid var(--emerald);
  border-radius: 20px;
  padding: 16px;
  min-width: 230px;
  text-align: center;
}

.critter-group-box h4 {
  font-size: 0.95rem;
  color: #a7f3d0;
  margin-bottom: 12px;
}

.critter-items {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.critter-btn {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.9);
  font-size: 2rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, border-color 0.2s;
}

.critter-btn.counted {
  border-color: var(--gold-bright);
  background: rgba(251, 191, 36, 0.25);
  transform: scale(1.08);
}

.critter-count-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--gold);
  color: #0f172a;
  font-weight: 900;
  font-size: 0.85rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Part-Part-Whole Diagram */
.ppw-diagram {
  width: 100%;
  max-width: 440px;
  border: 3px solid var(--cyan);
  border-radius: 20px;
  overflow: hidden;
  background: #1e293b;
}

.ppw-parts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 3px solid var(--cyan);
}

.ppw-part-cell {
  padding: 16px;
  text-align: center;
  border-right: 1.5px solid var(--cyan);
}

.ppw-part-cell:last-child {
  border-right: none;
}

.ppw-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  font-weight: 800;
}

.ppw-num {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 900;
  color: #fff;
}

.ppw-whole-row {
  padding: 18px;
  text-align: center;
  background: rgba(251, 191, 36, 0.14);
}

/* 4. ZERO VS ALL BLASTER GRID */
.blaster-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 520px;
}

.blaster-item {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.95);
  border: 2.5px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  position: relative;
  cursor: pointer;
}

.blaster-item.crossed::after {
  content: '❌';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  background: rgba(244, 63, 94, 0.28);
  border-radius: 14px;
}

.equation-giant {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--gold-bright);
  background: rgba(15, 23, 42, 0.9);
  padding: 10px 26px;
  border-radius: 18px;
  border: 2px solid rgba(251, 191, 36, 0.5);
}

/* 5. STORY DECODER & ACROSS + DOWN TRANSFORMER */
.story-card {
  background: rgba(30, 41, 59, 0.95);
  border: 2.5px solid var(--gold);
  border-radius: 20px;
  padding: 18px 22px;
  max-width: 680px;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #fff;
  font-weight: 700;
}

.across-down-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.format-panel {
  background: rgba(15, 23, 42, 0.92);
  border: 2.5px solid var(--cyan);
  border-radius: 18px;
  padding: 16px 24px;
  text-align: center;
}

.format-panel h4 {
  color: var(--gold-bright);
  margin-bottom: 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.vertical-math-stack {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.vertical-math-stack .v-line {
  border-bottom: 4px solid var(--gold-bright);
  padding-bottom: 4px;
  margin-bottom: 4px;
  width: 100%;
  text-align: right;
}

/* 6. BALANCE SCALE ARENA */
.scale-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.scale-beam {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 480px;
  padding: 16px 24px;
  background: linear-gradient(90deg, #38bdf8, #fbbf24, #f472b6);
  border-radius: 18px;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-beam.tip-right {
  transform: rotate(7deg);
}

.scale-beam.tip-left {
  transform: rotate(-7deg);
}

.scale-pan {
  background: #0f172a;
  border: 3px solid #fff;
  border-radius: 16px;
  padding: 12px 20px;
  text-align: center;
  min-width: 150px;
}

.scale-pan .pan-expr {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--gold-bright);
}

.scale-pan .pan-val {
  font-size: 0.9rem;
  color: var(--cyan);
  font-weight: 800;
}

/* Multiple-Choice Answer Buttons */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  width: 100%;
}

.option-btn {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  padding: 18px 20px;
  border-radius: 20px;
  border: 3px solid rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.95);
  color: #fff;
  cursor: pointer;
  transition: transform 0.14s, border-color 0.2s, background 0.2s;
}

.option-btn:hover {
  transform: translateY(-3px);
  border-color: var(--gold-bright);
  background: rgba(56, 189, 248, 0.22);
}

.option-btn.correct-choice {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #a7f3d0;
}

.option-btn.wrong-choice {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  border-color: #fda4af;
}

/* Feedback & Coach Drawer */
.feedback-card {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 20px;
  border: 2.5px solid var(--gold);
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.feedback-card.good {
  border-color: var(--emerald);
}

.feedback-card.coach {
  border-color: var(--gold-bright);
}

/* Digit Reversal Helper Card */
.digit-helper-modal, .result-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 24, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-box {
  background: #141e42;
  border: 3px solid var(--gold);
  border-radius: 28px;
  padding: 28px;
  max-width: 640px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .map-hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}
