/* ==========================================================================
   STARQUEST 11+ — DUOLINGO-STYLE MOBILE-FIRST UI & GRAPHICS STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@600;700;800&display=swap');

:root {
  --bg-page: #f4f1fb;
  --text-main: #1e1b4b;
  --text-muted: #64748b;
  --duo-pink: #ec4899;
  --duo-purple: #7c3aed;
  --duo-teal: #0d9488;
  --duo-amber: #f59e0b;
  --duo-green: #22c55e;
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
}

h1, h2, h3, h4, .duo-btn {
  font-family: 'Fredoka', sans-serif;
}

/* Mobile-First Shell */
.app-shell {
  max-width: 780px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 84px;
}

/* Top Bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #e2e8f0;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.child-switcher-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-bottom-width: 4px;
  border-radius: 999px;
  padding: 5px 14px 5px 8px;
  cursor: pointer;
  transition: transform 0.1s;
}

.child-switcher-pill:active {
  transform: translateY(2px);
}

.child-avatar {
  font-size: 26px;
  background: #fdf2f8;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f472b6;
}

.child-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.child-info strong {
  font-size: 15px;
  color: #1e1b4b;
}

.child-info small {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 700;
}

.stat-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-pill {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-bottom-width: 3px;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-pill.streak { border-color: #fed7aa; color: #ea580c; background: #fff7ed; }
.stat-pill.xp { border-color: #fde68a; color: #d97706; background: #fffbeb; }
.stat-pill.gems { border-color: #bae6fd; color: #0284c7; background: #f0f9ff; }

/* Main Content */
.app-main {
  flex: 1;
  padding: 16px;
}

.tab-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tactile Duolingo 3D Buttons */
.duo-btn {
  border: none;
  border-radius: 16px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: #7c3aed;
  border-bottom: 4px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.08s, filter 0.12s;
}

.duo-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}

.duo-btn:active:not(:disabled) {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.duo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.duo-btn-purple { background: #7c3aed; }
.duo-btn-pink { background: #ec4899; }
.duo-btn-teal { background: #10b981; }
.duo-btn-gold { background: #f59e0b; color: #fff; }
.duo-btn-outline {
  background: #ffffff;
  color: #334155;
  border: 2px solid #cbd5e1;
  border-bottom-width: 4px;
}

.duo-btn-lg {
  padding: 14px 24px;
  font-size: 17px;
  border-radius: 18px;
}

.duo-btn-check-ready {
  background: #22c55e;
}

.duo-btn-next {
  background: #7c3aed;
}

/* Placement CTA Banner */
.placement-cta-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2.5px solid #f59e0b;
  border-bottom-width: 5px;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.badge-new {
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
  margin-bottom: 4px;
}

.placement-cta-text h3 {
  font-size: 18px;
  margin-bottom: 3px;
}

.placement-cta-text p {
  font-size: 13.5px;
  color: #475569;
  max-width: 460px;
}

/* Year Tier Selector Scroll */
.year-selector-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.year-chip {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-bottom-width: 4px;
  border-radius: 999px;
  padding: 7px 15px;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}

.year-chip.active {
  background: #7c3aed;
  border-color: #5b21b6;
  color: #ffffff;
}

/* Unit Header Banner */
.unit-banner {
  color: #ffffff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.22);
}

.unit-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.unit-stage-badge {
  background: rgba(255, 255, 255, 0.22);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 6px;
}

.unit-banner h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.unit-banner p {
  font-size: 13.5px;
  opacity: 0.92;
}

.guidebook-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #4f46e5;
  border: none;
  border-bottom: 3px solid rgba(0, 0, 0, 0.2);
  border-radius: 14px;
  padding: 9px 14px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.workbook-pills-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 14px;
  padding-bottom: 4px;
}

.wb-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 6px 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.wb-pill.selected {
  background: #ffffff;
  color: #1e1b4b;
  border-color: #ffffff;
  font-weight: 700;
}

/* Locked Gate Card */
.locked-gate-card {
  background: #fffbeb;
  border: 3px dashed #f59e0b;
  border-radius: 20px;
  padding: 18px;
  text-align: center;
}

.locked-gate-icon {
  font-size: 38px;
  margin-bottom: 6px;
}

.locked-gate-card h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.locked-gate-card p {
  font-size: 14px;
  color: #475569;
  max-width: 520px;
  margin: 0 auto 14px auto;
}

.locked-gate-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Winding Path Nodes */
.path-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.print-pack-link {
  background: #fdf2f8;
  color: #db2777;
  border: 2px solid #f472b6;
  border-radius: 12px;
  padding: 7px 13px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}

.winding-path {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.path-node-card {
  background: #ffffff;
  border: 3px solid #cbd5e1;
  border-bottom-width: 6px;
  border-radius: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.12s;
}

.path-node-card.node-left {
  margin-right: 18px;
}

.path-node-card.node-right {
  margin-left: 18px;
}

.path-node-card.node-locked {
  opacity: 0.65;
}

.node-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #ffffff;
  flex-shrink: 0;
  border-bottom: 5px solid rgba(0, 0, 0, 0.22);
}

.node-details {
  flex: 1;
}

.node-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.node-day-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  display: inline-block;
}

.node-stars {
  font-size: 12px;
  font-weight: 800;
  color: #059669;
}

.node-reward {
  font-size: 12px;
  font-weight: 800;
  color: #0284c7;
}

.node-details h4 {
  font-size: 18px;
  margin-bottom: 2px;
}

.node-details p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}

.node-btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-action-btn {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-bottom-width: 3px;
  border-radius: 12px;
  padding: 8px 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.checkpoint-castle-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 3px solid #f59e0b;
  border-bottom-width: 6px;
  border-radius: 22px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.castle-icon {
  font-size: 44px;
}

/* Skills & Adaptive Focus Lab */
.section-hero {
  background: #ffffff;
  border: 2.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.section-hero h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.section-hero p {
  font-size: 13.5px;
  color: #475569;
  max-width: 500px;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-card {
  background: #ffffff;
  border: 3px solid;
  border-bottom-width: 6px;
  border-radius: 20px;
  padding: 16px;
}

.skill-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.skill-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-title-wrap {
  flex: 1;
}

.skill-title-wrap h3 {
  font-size: 17px;
  margin-bottom: 3px;
}

.status-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
}

.status-excelling { background: #dcfce7; color: #15803d; }
.status-ontrack { background: #e0f2fe; color: #0369a1; }
.status-struggling { background: #fef3c7; color: #b45309; }

.skill-level-badge {
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 12px;
}

.skill-desc {
  font-size: 13px;
  color: #475569;
  margin-bottom: 10px;
}

.accuracy-bar-wrap {
  margin-bottom: 12px;
}

.acc-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.acc-track {
  height: 12px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.acc-fill {
  height: 100%;
  border-radius: 99px;
}

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

/* Guidebooks & Concept Explainers */
.guidebooks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.explainer-card, .explainer-hero-card {
  background: #ffffff;
  border: 3px solid;
  border-bottom-width: 6px;
  border-radius: 22px;
  overflow: hidden;
}

.explainer-card-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.explainer-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explainer-summary {
  font-size: 15px;
  line-height: 1.5;
  color: #1e293b;
}

.explainer-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.exp-step-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 12px;
}

.exp-step-box strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #1e1b4b;
}

.exp-step-box p {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.worked-example-box {
  background: #ecfdf5;
  border: 2px solid #6ee7b7;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 14px;
}

.exam-tip-banner {
  background: #fffbeb;
  border: 2px solid #fcd34d;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #92400e;
}

.explainer-start-row {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* Interactive Lesson Arena */
.lesson-shell {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.lesson-topbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.close-lesson-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 10px;
  padding: 6px 12px;
  font-weight: 800;
  cursor: pointer;
}

.progress-bar-outer {
  flex: 1;
  height: 16px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-inner {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.explainer-stage-container {
  padding: 16px;
  flex: 1;
}

.question-arena {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.q-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.q-pill-badge {
  font-size: 12.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
}

.tts-mini-btn {
  background: #f5f3ff;
  color: #6d28d9;
  border: 2px solid #c4b5fd;
  border-radius: 99px;
  padding: 4px 11px;
  font-family: 'Fredoka', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.q-prompt-text {
  font-size: 20px;
  line-height: 1.35;
}

/* Visual Component Styles */
.vis-card {
  border-radius: 18px;
  padding: 14px;
  border: 2.5px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.vis-pink { background: #fdf2f8; border-color: #f472b6; }
.vis-purple { background: #f5f3ff; border-color: #c4b5fd; }
.vis-teal { background: #f0fdfa; border-color: #5eead4; }
.vis-amber { background: #fffbeb; border-color: #fcd34d; }
.vis-sky { background: #f0f9ff; border-color: #7dd3fc; }

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

.cupcake-pill {
  background: #fff;
  border: 3px solid #ec4899;
  border-radius: 16px;
  padding: 8px 16px;
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.cupcake-pill.mystery {
  border-style: dashed;
  color: #ec4899;
}

.cupcake-target {
  background: #ec4899;
  color: #fff;
  border-radius: 16px;
  padding: 8px 16px;
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.vis-plus {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  font-weight: 700;
}

.vis-caption {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  text-align: center;
}

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

.doubles-tray {
  background: #fff;
  border: 2px solid #f472b6;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 22px;
}

.story-math-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.story-math-step {
  background: #fff;
  border: 2px solid #fbcfe8;
  border-radius: 12px;
  padding: 8px;
  text-align: center;
}

.sm-label { font-size: 12px; font-weight: 800; color: #be185d; }
.sm-emojis { font-size: 18px; margin: 4px 0; }
.sm-eq { font-family: 'Fredoka'; font-size: 15px; font-weight: 700; }

/* Pyramid */
.pyr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.pyr-row { display: flex; gap: 6px; }
.pyr-brick {
  width: 60px;
  height: 38px;
  background: #fff;
  border: 3px solid #d97706;
  border-radius: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pyr-top { background: #fdf2f8; border-color: #ec4899; color: #ec4899; }

/* Story & Word Slots */
.story-passage-box { align-items: stretch; }
.story-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 13px;
  color: #6d28d9;
}
.story-text-body {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15.5px;
  line-height: 1.5;
}

.word-slots-row {
  display: flex;
  gap: 6px;
}
.letter-slot {
  width: 38px;
  height: 42px;
  background: #fff;
  border: 2.5px solid #8b5cf6;
  border-radius: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot-mystery {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #d97706;
}

.sparkle-target-pill {
  background: #7c3aed;
  color: #fff;
  padding: 5px 16px;
  border-radius: 99px;
  font-family: 'Fredoka', sans-serif;
  font-size: 17px;
}
.sparkle-pairs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 320px;
}
.sparkle-pair-row {
  background: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.broken-sentence-pill {
  background: #fff;
  border: 2.5px dashed #ef4444;
  border-radius: 12px;
  padding: 10px 16px;
  font-family: 'Fredoka', sans-serif;
  font-size: 19px;
}

.odd-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}
.odd-item-card {
  background: #fff;
  border: 2px solid #2dd4bf;
  border-radius: 12px;
  padding: 8px;
  text-align: center;
}
.odd-emoji { font-size: 26px; }
.odd-label { font-size: 13px; font-weight: 800; }

.caterpillar-chain {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.cat-head { font-size: 32px; }
.cat-seg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #0d9488;
  font-family: 'Fredoka', sans-serif;
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cat-mystery {
  background: #fef3c7;
  border-color: #f59e0b;
}

.cypher-key-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.cypher-cell {
  background: #fff;
  border: 2px solid #d97706;
  border-radius: 10px;
  padding: 4px 10px;
  text-align: center;
}
.cy-letter { font-weight: 800; font-size: 14px; color: #b45309; }
.cy-num { font-family: 'Fredoka'; font-size: 16px; }
.cypher-code-banner {
  background: #fff;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 16px;
}

.nvr-seq-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.nvr-seq-item {
  font-size: 24px;
  background: #fff;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid #fcd34d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rot-box {
  width: 52px;
  height: 52px;
  background: #fff;
  border: 2.5px solid #d97706;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka';
  font-size: 22px;
  font-weight: 700;
}

.matrix-2x2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  border: 2.5px solid #d97706;
}
.matrix-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mirror-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 10px 18px;
  border-radius: 14px;
}
.mirror-side { font-size: 28px; }
.mirror-line {
  border-left: 3px dashed #ec4899;
  padding-left: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #ec4899;
}

.uk-coin {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #64748b;
  background: #e2e8f0;
}
.coin-2p, .coin-1p {
  background: #fed7aa;
  border-color: #b45309;
}

.logic-cols {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logic-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.logic-pill {
  background: #fff;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 5px 12px;
  font-weight: 800;
  font-size: 14px;
}

/* Multiple Choice Option Cards */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
}

.option-card {
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-bottom-width: 5px;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  transition: transform 0.08s, border-color 0.12s;
}

.option-card.opt-selected {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #5b21b6;
}

.option-card.opt-correct {
  border-color: #16a34a;
  background: #dcfce7;
  color: #14532d;
}

.option-card.opt-wrong {
  border-color: #dc2626;
  background: #fee2e2;
  color: #7f1d1d;
}

.option-card.opt-eliminated {
  opacity: 0.35;
  text-decoration: line-through;
}

.opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 14px;
  flex-shrink: 0;
}

/* Hints Bar */
.hints-bar {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hints-buttons-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hint-btn {
  background: #fffbeb;
  color: #b45309;
  border: 2px solid #fcd34d;
  border-bottom-width: 3px;
  border-radius: 12px;
  padding: 7px 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hint-btn.hint-unlocked {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.hint-reveal-box {
  background: #ffffff;
  border-left: 4px solid #f59e0b;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Lesson Bottom Bar */
.lesson-bottom-bar {
  border-top: 2px solid #e2e8f0;
  padding: 14px 20px;
  background: #ffffff;
}

.lesson-bottom-bar.bar-correct {
  background: #dcfce7;
  border-color: #86efac;
}

.lesson-bottom-bar.bar-wrong {
  background: #fee2e2;
  border-color: #fca5a5;
}

.bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bar-tip {
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
}

.feedback-text strong {
  font-size: 16px;
  display: block;
}

.feedback-text p {
  font-size: 13.5px;
  margin-top: 2px;
}

/* Summary Celebration Card */
.summary-card {
  margin: auto;
  padding: 28px 20px;
  text-align: center;
  max-width: 480px;
}

.summary-trophy {
  font-size: 68px;
  margin-bottom: 10px;
}

.summary-sub {
  color: #475569;
  margin: 8px 0 20px 0;
}

.summary-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.sum-stat-box {
  background: #f8fafc;
  border: 2.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sum-stat-box span {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.sum-stat-box strong {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
}

/* Family Tab */
.children-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.child-profile-card {
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-bottom-width: 5px;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.child-profile-card.active-profile {
  border-color: #7c3aed;
  background: #faf5ff;
}

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

.cp-avatar {
  font-size: 36px;
}

.active-tag {
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
}

.cp-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 800;
  color: #475569;
}

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

.printable-pack-card {
  background: #fdf2f8;
  border: 2.5px solid #f472b6;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: #ffffff;
  border-top: 2px solid #e2e8f0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
}

.nav-tab-btn {
  flex: 1;
  max-width: 170px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: #64748b;
  font-family: 'Fredoka', sans-serif;
}

.nav-tab-btn.active {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

.nav-icon { font-size: 20px; }
.nav-label { font-size: 12px; font-weight: 700; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 22px;
  border: 3px solid #cbd5e1;
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 16px 18px;
}

.child-select-row {
  width: 100%;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}

.child-select-row.selected {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
}

.sq-toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1b4b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 13.5px;
  z-index: 90;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}


/* ==========================================================================
   IN-APP INTERACTIVE SHEET MODE, TYPE-IN INPUTS & PROGRESS DASHBOARD STYLES
   ========================================================================== */

.wb-progress-pill {
  background: #f5f3ff;
  color: #6d28d9;
  border: 2px solid #c4b5fd;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
}

.node-inprog {
  font-size: 12px;
  font-weight: 800;
  color: #d97706;
  background: #fffbeb;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1.5px solid #fcd34d;
}

.node-task-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.node-task-bar {
  flex: 1;
  height: 9px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.node-task-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.25s ease;
}

.node-task-count {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}

/* Type-in Answer Input */
.type-in-answer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.type-in-answer-row label {
  font-size: 13px;
  font-weight: 800;
  color: #475569;
}

.type-in-input {
  flex: 1;
  min-width: 170px;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.type-in-input:focus {
  outline: none;
  border-color: #7c3aed;
}

/* Interactive Digital Sheet Mode */
.interactive-sheet-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.isheet-banner {
  border: 3px solid;
  border-radius: 20px;
  padding: 16px;
}

.isheet-banner h2 {
  font-size: 22px;
  margin: 4px 0;
}

.isheet-banner p {
  font-size: 13.5px;
  color: #475569;
}

.isheet-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.isheet-task-card {
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-bottom-width: 5px;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.isheet-task-card.task-card-correct {
  border-color: #22c55e;
  background: #f0fdf4;
}

.isheet-task-card.task-card-wrong {
  border-color: #f59e0b;
  background: #fffbeb;
}

.isheet-task-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.isheet-prompt {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.isheet-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.isheet-feedback-pill {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
}

.isheet-feedback-pill.ok {
  background: #dcfce7;
  color: #15803d;
}

.isheet-feedback-pill.retry {
  background: #fef3c7;
  color: #b45309;
}

.retry-mini-btn {
  background: #ffffff;
  border: 2px solid #f59e0b;
  border-radius: 8px;
  padding: 4px 10px;
  font-weight: 800;
  cursor: pointer;
}

.isheet-explanation-box {
  background: #ffffff;
  border-left: 4px solid #10b981;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #065f46;
}

.isheet-finish-bar {
  background: #f8fafc;
  border: 3px solid #cbd5e1;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Progress Dashboard & Activity Log */
.progress-dashboard-card {
  background: #ffffff;
  border: 3px solid #c4b5fd;
  border-bottom-width: 6px;
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.pd-metric-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.pd-metric-box span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.pd-metric-box strong {
  font-family: 'Fredoka', sans-serif;
  font-size: 24px;
  color: #1e1b4b;
}

.pd-week-tracker h4, .pd-activity-section h4 {
  font-size: 16px;
  margin-bottom: 10px;
}

.pd-days-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
}

.pd-day-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-day-card.completed {
  background: #f0fdf4;
  border-color: #86efac;
}

.pd-day-card.in-progress {
  background: #fffbeb;
  border-color: #fcd34d;
}

.pd-day-top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}

.pd-day-status {
  font-weight: 800;
}

.pd-day-subj {
  font-size: 12px;
  font-weight: 800;
}

.pd-day-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.activity-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-log-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
}

.activity-log-row.log-correct {
  border-left: 4px solid #22c55e;
}

.activity-log-row.log-wrong {
  border-left: 4px solid #f59e0b;
}

.log-info strong {
  font-size: 13.5px;
  display: block;
}

.log-info p {
  font-size: 12.5px;
  color: #475569;
  margin: 2px 0;
}

.log-info small {
  font-size: 11.5px;
  color: #64748b;
}

.empty-log-msg {
  font-size: 13px;
  color: #64748b;
  font-style: italic;
}


/* ==========================================================================
   LUNALEARN BRAND HEADER PILL
   ========================================================================== */
.topbar-left-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid #3730a3;
  border-bottom-width: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2);
}

.brand-logo-pill small {
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.24);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .brand-logo-pill small {
    display: none;
  }
}
