/* ==========================================================================
   NEXT GEN — CLASSIC THEME (Bright • Punchy • Futuristic)
   Single-file stylesheet for the whole site
   ========================================================================== */

/* ===============================
   Table of contents (high level)
   ===============================
   1) Theme tokens
   2) Reset & base
   3) Header / nav
   4) Hero + badges
   5) Buttons + actions
   6) Layout, grids & cards (marketing + index pages)
   7) Lesson / mission content cards
   8) Reading UI (mini-book, story questions, optional tools)
   9) Video shell (optional)
   10) Tracing pad
   11) Drag & drop
   12) MCQ quiz cards
   13) Math interactions (tap grids, sliders, number line, tools)
   14) Overlays & modals (mission mode, sound pad, number chart, locks)
   15) Footer
*/

/* ===============================
   Theme tokens
   =============================== */
:root{
  /* Light base */
  --bg1:#eef3ff;            /* very light blue */
  --bg2:#f8fbff;            /* almost white */
  --text:#0b1030;           /* deep navy text */
  --muted:#44507a;          /* secondary copy */
  --line:rgba(11,16,48,.10);/* hairline */

  /* Neon-ish accent set */
  --acc-1:#3e75ff;          /* electric blue */
  --acc-2:#00d4ff;          /* cyan */
  --acc-3:#a855f7;          /* violet */
  --acc-4:#22c55e;          /* green */
  --acc-5:#ff8b6b;          /* coral */

  /* Surfaces */
  --card:#ffffff;
  --card-soft:#fbfdff;
  --card-line:rgba(11,16,48,.12);
  --glass:rgba(255,255,255,.75);
  --shadow:0 10px 28px rgba(8,13,40,.10), 0 2px 8px rgba(8,13,40,.06);

  /* Buttons */
  --btn:#3e75ff;
  --btn-text:#ffffff;

  /* Status */
  --ok:#0a8f3c;
  --warn:#b26b00;
  --err:#c73333;
  --info:#0b56ff;

  /* Radius */
  --r-sm:10px;
  --r-md:14px;
  --r-lg:18px;
  --r-xl:22px;
}

/* ===============================
   Reset & base
   =============================== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: Inter, ui-sans-serif, system-ui, Arial, sans-serif;
  color:var(--text);
  line-height:1.6;
  /* Dark futuristic background only (cards stay light) */
  background:linear-gradient(135deg,#020617,#0b3a6b 45%,#020617);
  background-size:250% 250%;
  animation:nextgenDarkSky 26s ease-in-out infinite;
  background-attachment:fixed;
}
@keyframes nextgenDarkSky{
  0%{background-position:0% 0%}
  50%{background-position:100% 100%}
  100%{background-position:0% 0%}
}
img{max-width:100%;height:auto}
.container{
  max-width:1180px;
  margin:0 auto;
  padding:24px 16px 64px;
}

/* ===============================
   Header / Nav (glass)
   =============================== */
.header{
  position:sticky;
  top:0;
  z-index:60;
  background:var(--glass);
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  max-width:1180px;
  margin:0 auto;
  padding:10px 16px;
}
.brand{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:800;
  color:var(--text);
}
.brand img{width:28px;height:28px}

/* Burger + links */
.burger{
  display:none;
  background:linear-gradient(180deg,#fff,#f4f7ff);
  color:#0b56ff;
  border:1px solid rgba(11,16,48,.12);
  padding:8px 10px;
  border-radius:var(--r-sm);
  font-weight:800;
}
.burger:hover{box-shadow:var(--shadow)}
.nav-links{
  display:flex;
  gap:10px;
  align-items:center;
}
.nav-links a{
  color:#0b1030;
  text-decoration:none;
  padding:8px 10px;
  border-radius:var(--r-sm);
  border:1px solid transparent;
  font-weight:600;
}
.nav-links a:hover{
  background:linear-gradient(180deg,#fff,#f4f7ff);
  border-color:var(--line);
  box-shadow:var(--shadow);
}
@media(max-width:860px){
  .burger{display:block}
  .nav-links{
    display:none;
    position:absolute;
    top:58px;
    left:0;
    right:0;
    background:var(--glass);
    backdrop-filter:saturate(140%) blur(8px);
    padding:12px 16px;
    border-bottom:1px solid var(--line);
  }
  .nav-links.open{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
  }
  .nav-links a{width:100%}
}

/* ===============================
   Hero (bright card)
   =============================== */
.hero{
  background:linear-gradient(180deg,#ffffffd9,#f7faffcc);
  border:1px solid var(--card-line);
  border-radius:var(--r-xl);
  padding:24px;
  margin-top:16px;
  box-shadow:var(--shadow);
  position:relative;
}
.hero:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  border-top:6px solid var(--acc-1);
  pointer-events:none;
}
.hero h1{
  margin:0 0 6px;
  font-size:clamp(24px,3.4vw,42px);
}
.hero .lead{
  margin:6px 0 10px;
  color:var(--muted);
}
.badges{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* ===============================
   Buttons
   =============================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  background:linear-gradient(180deg,var(--btn),#2f5df0);
  color:#ffffff;
  font-weight:800;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 6px 16px rgba(62,117,255,.28);
}
.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(62,117,255,.32);
}
.btn.secondary{
  background:linear-gradient(180deg,#ffffff,#f4f7ff);
  color:#0b1030;
  border:1px solid var(--card-line);
  box-shadow:var(--shadow);
}
.btn.safe{
  background:#fff;
  border:1px solid var(--card-line);
  color:var(--text);
  border-radius:12px;
  padding:10px 14px;
}
.btn.primary{
  background:linear-gradient(180deg,#7fc8ff,#4fa3ff);
  color:#0b1030;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  padding:10px 14px;
  font-weight:700;
}
.btn.ghost{
  background:#fff;
  border:1px solid var(--card-line);
  color:var(--text);
  border-radius:12px;
  padding:8px 12px;
}
.btn:focus-visible{
  outline:3px solid rgba(11,86,255,.28);
  outline-offset:2px;
}
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* ===============================
   Grids & Cards (home/levels)
   =============================== */
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:16px;
  margin-top:18px;
}
.card{
  grid-column:span 12;
  border:1px solid var(--card-line);
  border-radius:var(--r-lg);
  padding:16px;
  box-shadow:var(--shadow);
  background:
    radial-gradient(240px 160px at 20% 0%, rgba(62,117,255,.12), transparent 60%),
    radial-gradient(200px 140px at 100% 20%, rgba(0,212,255,.10), transparent 60%),
    linear-gradient(180deg,var(--card),var(--card-soft));
}
@media(min-width:680px){.card{grid-column:span 6}}
@media(min-width:980px){.card{grid-column:span 4}}
.card h3{
  margin:0 0 6px;
  font-size:1.12rem;
  color:var(--text);
}
.card p{
  margin:0 0 10px;
  color:var(--muted);
}

/* Two-column content layout */
.layout{
  display:grid;
  gap:16px;
  grid-template-columns:1fr;
}
@media(min-width:1100px){
  .layout{grid-template-columns:280px 1fr}
}
.toc-toggle{
  display:inline-block;
  background:linear-gradient(180deg,#fff,#f4f7ff);
  color:#0b1030;
  border:1px solid var(--card-line);
  padding:8px 12px;
  border-radius:var(--r-sm);
  margin:6px 0;
  box-shadow:var(--shadow);
}
.toc{
  display:none;
  background:linear-gradient(180deg,#ffffff,#f6f9ff);
  border:1px solid var(--card-line);
  border-radius:var(--r-md);
  padding:12px;
  box-shadow:var(--shadow);
}
.toc.open{display:block}
@media(min-width:1100px){
  .toc{
    display:block;
    position:sticky;
    top:80px;
    max-height:calc(100vh - 120px);
    overflow:auto;
  }
}
.toc a{
  display:block;
  padding:8px 10px;
  border-radius:8px;
  color:#1a2a72;
  text-decoration:none;
  border:1px solid transparent;
  font-weight:600;
}
.toc a:hover{
  background:linear-gradient(180deg,#fff,#f4f7ff);
  border-color:var(--card-line);
}
.toc .minor{
  padding-left:22px;
  font-size:.95rem;
  color:#4e5fa0;
}

/* Subjects & lesson grid */
.subject{
  background:linear-gradient(180deg,#ffffff,#f6f9ff);
  border:1px solid var(--card-line);
  border-radius:var(--r-lg);
  padding:16px;
  margin-top:14px;
  box-shadow:var(--shadow);
}
.subject h2{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 8px;
}
.subject h2::before{
  content:"";
  width:12px;
  height:12px;
  border-radius:50%;
  background:conic-gradient(
    from 180deg at 50% 50%,
    var(--acc-1),
    var(--acc-2),
    var(--acc-3),
    var(--acc-4),
    var(--acc-5),
    var(--acc-1)
  );
  box-shadow:0 0 0 4px rgba(62,117,255,.08);
}
.lesson-grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:12px;
  margin:10px 0 4px;
}
.lesson-card{
  grid-column:span 12;
  background:linear-gradient(180deg,#ffffff,#f4f7ff);
  border:1px solid var(--card-line);
  border-radius:12px;
  padding:10px 12px;
  text-decoration:none;
  color:var(--text);
  display:flex;
  gap:10px;
  align-items:center;
  box-shadow:var(--shadow);
  transition:transform .15s ease, box-shadow .15s ease;
}
.lesson-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(8,13,40,.16);
}
.lesson-num{
  min-width:34px;
  height:34px;
  border-radius:10px;
  background:linear-gradient(180deg,var(--acc-1),#2f5df0);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
}
.lesson-title{flex:1}
@media(min-width:680px){.lesson-card{grid-column:span 6}}
@media(min-width:980px){.lesson-card{grid-column:span 4}}

/* ===============================
   Lesson content cards
   =============================== */
.section-card{
  background:linear-gradient(180deg,#ffffff,#f6f9ff);
  color:var(--text);
  border:1px solid var(--card-line);
  border-radius:var(--r-md);
  box-shadow:var(--shadow);
  padding:16px 16px 14px;
  margin:14px 0;
}
.section-card h2{margin:4px 0 8px}
.section-card p,
.section-card li,
.section-card label{
  color:var(--text);
}
.lead-note{color:#4e5fa0}

/* Shared layout inside lessons */
.practice-flex{
  display:flex;
  gap:16px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.mini-flex{
  display:grid;
  grid-template-columns:1fr 420px;
  gap:16px;
  align-items:start;
}
@media(max-width:900px){
  .mini-flex{grid-template-columns:1fr}
}

/* ===============================
   Reading mini-book shell + pager
   (open book: left & right page)
   =============================== */
.reader-wrap{
  flex:1;
  min-width:260px;
  max-width:520px;
  border:1px solid var(--card-line);
  border-radius:var(--r-lg);
  background:
    radial-gradient(260px 160px at 10% 0%, rgba(62,117,255,.10), transparent 60%),
    radial-gradient(220px 160px at 100% 10%, rgba(0,212,255,.08), transparent 60%),
    linear-gradient(180deg,var(--card),var(--card-soft));
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}
.reader-head{
  padding:10px 12px;
  border-bottom:1px solid var(--card-line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.reader-head h3{
  margin:0;
  font-size:1rem;
}

/* Shell that JS targets */
.mini-book{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px 12px 12px;
}

/* FIXED viewport for pages */
.mini-book-pages{
  position:relative;
  width:90%;
  max-width:480px;
  aspect-ratio:4/3;
  margin:0 auto;
}

/* Each "page" is a full spread in that viewport */
.mini-book-page{
  position:absolute;
  inset:0;
  display:none;
}
.mini-book-page.is-active{display:block}

/* Inner open-book visual */
.book-spread{
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(90deg,#fdfdfd 0%,#ffffff 50%,#fdfdfd 100%);
  box-shadow:0 8px 20px rgba(8,13,40,.12);
  border:1px solid rgba(11,16,48,.12);
  position:relative;
}
.book-spread::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  width:2px;
  transform:translateX(-1px);
  background:linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.02));
  opacity:.6;
}
.book-page{
  padding:14px 16px 16px;
  font-size:1rem;
  line-height:1.5;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(148,163,184,.16) 0,
      rgba(148,163,184,.16) 1px,
      transparent 1px,
      transparent 21px
    ),
    radial-gradient(80px 60px at 0 0, rgba(129,140,248,.16), transparent 70%),
    #fefeff;
  position:relative;
}
.book-page.left{
  border-right:1px solid rgba(15,23,42,.10);
}
.book-page.right{
  border-left:1px solid rgba(15,23,42,.06);
}
.book-page p{
  margin:4px 0 0;
}
.page-num{
  position:absolute;
  bottom:6px;
  right:10px;
  font-size:.75rem;
  color:rgba(15,23,42,.55);
}

/* NAV: dots + counter */
.mini-book-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:4px;
}
.mini-book-dots{
  display:flex;
  gap:6px;
  align-items:center;
  justify-content:center;
}
.mini-book-dot{
  min-width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid var(--card-line);
  background:#fff;
  font-size:.8rem;
  cursor:pointer;
  padding:0 6px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .08s ease;
}
.mini-book-dot:hover{
  transform:translateY(-1px);
  box-shadow:0 3px 8px rgba(15,23,42,.20);
}
.mini-book-dot[aria-pressed="true"]{
  background:linear-gradient(180deg,#3e75ff,#2f5df0);
  color:#fff;
  border-color:rgba(0,0,0,.16);
  box-shadow:0 4px 10px rgba(62,117,255,.35);
}
.mini-book-page-counter,
.mini-book-counter{
  font-size:.85rem;
  color:var(--muted);
}

/* ===============================
   Optional sight-word box
   =============================== */
.sight-box{
  border:1px solid var(--card-line);
  border-radius:12px;
  padding:12px;
  background:#fafbff;
}
.sight-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 0;
}
.sight-chip{
  border:1px solid var(--card-line);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-weight:700;
}

/* ===============================
   Reading Practice — Story Understanding
   =============================== */
.sound-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px;
  margin-top:10px;
}
.sound-card{
  background:#fff;
  border:1px solid var(--card-line);
  border-radius:12px;
  padding:10px 12px;
  box-shadow:var(--shadow);
}
.sound-q{
  font-weight:600;
  margin-bottom:8px;
}
.choice-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.choice-chip{
  border:1px solid var(--card-line);
  border-radius:999px;
  padding:8px 12px;
  background:#fff;
  cursor:pointer;
  font-size:.95rem;
  line-height:1.3;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .08s ease;
}
.choice-chip:hover{
  background:linear-gradient(180deg,#ffffff,#f4f7ff);
  border-color:var(--card-line);
  box-shadow:var(--shadow);
  transform:translateY(-1px);
}
.choice-chip[aria-pressed="true"]{
  background:linear-gradient(180deg,#3e75ff,#2f5df0);
  color:#fff;
  border-color:rgba(0,0,0,.12);
  box-shadow:0 6px 16px rgba(62,117,255,.30);
}
.sound-result{
  margin-top:6px;
  font-weight:700;
}
.sound-explain{
  margin-top:4px;
  font-size:.95rem;
  color:#394362;
}

/* ===============================
   Video shell (for commented mini-lesson)
   =============================== */
.video-wrap{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--card-line);
  box-shadow:0 4px 12px rgba(0,0,0,.06);
  background:#000;
}
.video-wrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

/* ===============================
   Tracing Pad (visuals; JS handles drawing)
   =============================== */
.trace-pad{
  border:1px solid var(--card-line);
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff,#f7f9ff);
  width:100%;            /* was 640px */
  max-width:100%;        /* allow full width of the content column */
  box-shadow:0 16px 40px rgba(11,86,255,.10),0 4px 14px rgba(0,0,0,.08);
  margin:16px 0 0;       /* was margin-left:auto; */
  overflow:hidden;
  backdrop-filter:saturate(1.2);
}

.trace-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid var(--card-line);
  background:linear-gradient(180deg,#f0f6ff,#e8f0ff);
}

.trace-controls{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

.trace-canvas-wrap{
  padding:12px;
  background:radial-gradient(1200px 400px at 50% -200px,#ffffff,#f4f7ff);
}

#trace{
  width:100%;
  height:auto;          /* let the intrinsic canvas height win */
  display:block;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  touch-action:none;
}

#tracePrint{
  display:none;
  max-width:100%;
  border:1px solid #000;
  border-radius:8px;
  background:#fff;
}

.trace-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border-top:1px solid var(--card-line);
  padding:10px;
  background:#f9fbff;
}

.trace-tip{
  font-size:12px;
  color:var(--muted);
}

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

.color-dot{
  width:28px;
  height:28px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.2);
  cursor:pointer;
  transition:transform .15s ease, outline-color .15s ease;
}

.color-dot[aria-checked="true"]{
  outline:3px solid rgba(11,86,255,.25);
}

.color-dot:focus-visible{
  outline:3px solid rgba(11,86,255,.35);
}

.size-wrap{
  display:flex;
  align-items:center;
  gap:8px;
}

.size-wrap input{
  width:120px;
}
/* Make Tracing Pad text readable inside overlays */
.trace-head,
.trace-head * {
  color: #0f172a;              /* dark navy text */
}

.trace-footer,
.trace-footer * {
  color: #0f172a;
}

/* Optional: make the "Tracing Pad" label a bit stronger */
.trace-head h3,
.trace-head .trace-title {
  font-weight: 700;
}

/* ===============================
   Drag & Drop (touch-friendly)
   =============================== */
#dragdrop{
  touch-action:pan-y;
  -ms-touch-action:pan-y;
}
.dd-bank,
.dd-targets{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.dd-chip{
  border:1px solid var(--card-line);
  background:#fff;
  border-radius:999px;
  padding:10px 14px;
  cursor:grab;
  user-select:none;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  touch-action:none;
}
.dd-chip.dragging{
  opacity:.9;
  box-shadow:0 8px 18px rgba(0,0,0,.18);
}
.dd-slot{
  min-width:56px;
  min-height:44px;
  border:2px dashed rgba(0,0,0,.22);
  border-radius:12px;
  padding:6px 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  transition:
    box-shadow .15s ease,
    border-color .15s ease,
    background-color .15s ease;
}
.dd-slot.active{
  border-color:rgba(11,86,255,.45);
  box-shadow:0 0 0 3px rgba(11,86,255,.18) inset;
  background:#f4f8ff;
}
.dd-slot.correct{
  border-color:rgba(13,160,64,.35);
  box-shadow:0 0 0 3px rgba(13,160,64,.18) inset;
}
.dd-slot .dd-chip[data-punct="true"]{margin-left:-6px}
.dd-sentence{
  margin:10px 0;
  padding:12px;
  border:1px solid var(--card-line);
  border-radius:12px;
  background:#fafbff;
  position:relative;
}
.dd-result{
  font-weight:700;
  margin-top:6px;
}

/* ===============================
   MCQ (quiz items) — Kids Friendly Upgrade
   =============================== */

.q {
  background: #f7faff; /* soft blue tint */
  border: 2px solid #d9e6ff; /* subtle border */
  border-radius: 14px;
  padding: 16px 18px;
  margin: 16px 0;
  color: var(--text);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.q h4 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #234a8b; /* NGL dark blue */
}

/* Answer options */
.q label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 2px solid #e8efff;
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 16px;
}

/* Radio stylings */
.q input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #3E75FF; /* NGL blue */
  cursor: pointer;
}

/* Hover & focus */
.q label:hover {
  background: #f0f6ff;
  border-color: #c8daff;
}

/* Selected look — bold + blue */
.q input[type="radio"]:checked + span,
.q input[type="radio"]:checked ~ span,
.q label:has(input[type="radio"]:checked) {
  font-weight: 700;
  color: #3E75FF;
  background: #eef4ff;
  border-color: #bcd0ff;
}

/* Correct/Incorrect border states (JS adds classes) */
.q.correct {
  border-color: #4CAF50 !important;
  background: #f2fff4; /* soft green */
}

.q.incorrect {
  border-color: #e57373 !important;
  background: #fff2f2; /* soft red */
}

/* Result text */
.q .result {
  margin-top: 10px;
  font-weight: 700;
  font-size: 15px;
}

.q .explain {
  margin-top: 6px;
  font-size: 0.95em;
  color: #394362;
}

/* Mobile polish */
@media (max-width: 480px) {
  .q {
    padding: 14px;
  }
  .q label {
    padding: 10px 12px;
    font-size: 15px;
  }
}

/* ===============================
   Footer
   =============================== */
.footer{
  border-top:1px solid var(--line);
  margin-top:26px;
}
.footer .inner{
  max-width:1180px;
  margin:0 auto;
  padding:16px;
  color:#ffffff;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:space-between;
}
.footer a{
  color:#ffffff;
  text-decoration:none;
}
.footer a:hover{text-decoration:underline}

/* ===============================
   Math — Tap grid & slider styles
   =============================== */

.tap-grid-block{
  margin-top:8px;
}
.tap-grid-block h3{
  margin-bottom:4px;
}

/* Flexible generic tap grid */
.tap-grid{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:8px 0 4px;
}

/* 10×10 100-chart version */
.tap-100-grid{
  display:grid;
  grid-template-columns:repeat(10,minmax(24px,1fr));
  gap:4px;
}
.tap-100-grid .tap-cell{
  font-size:0.8rem;
  padding:4px 6px;
}

/* Base tap cell button */
.tap-grid .tap-cell{
  border:1px solid var(--line);
  border-radius:8px;
  padding:6px 10px;
  background:#ffffff;
  cursor:pointer;
  font-size:.9rem;
  font-weight:600;
  min-width:40px;
  text-align:center;
  transition:background .15s ease,border-color .15s ease,transform .1s ease;
}
.tap-grid .tap-cell:focus-visible{
  outline:2px solid var(--acc-1);
  outline-offset:2px;
}
.tap-grid .tap-cell.is-selected{
  background:rgba(62,117,255,.18);
  border-color:var(--acc-1);
  transform:translateY(-1px);
}

/* Result text under tap grid */
.tap-result{
  margin-top:4px;
  font-size:.85rem;
}
.tap-result.ok{color:var(--acc-4)}
.tap-result.error{color:var(--acc-5)}

/* Slider question block (generic) */
.slider-q{
  margin-top:16px;
  padding-top:10px;
  border-top:1px dashed var(--line);
}
.slider-q input[type="range"]{
  width:100%;
  max-width:640px;
  display:block;
  margin:12px 0;
}
.slider-value{
  font-size:.9rem;
}

/* Visual feedback when checked */
.slider-q.correct .slider-value{
  color:var(--acc-4);
  font-weight:600;
}
.slider-q.incorrect .slider-value{
  color:var(--acc-5);
  font-weight:600;
}

/* Number-line specific sliders: wider + ticks */
.number-line-q input[type="range"]{
  max-width:680px;
  margin:10px 0 4px;
}
.number-line-q .number-line-track{
  max-width:680px;
  margin:0 auto;
}
.number-line-q .number-line-scale{
  position:relative;
  display:flex;
  justify-content:space-between;
  font-size:.8rem;
  margin:2px 0 0;
}
.number-line-q .number-line-scale span{
  position:relative;
  padding-top:10px;
}
.number-line-q .number-line-scale span::before{
  content:"";
  position:absolute;
  left:50%;
  top:0;
  width:2px;
  height:8px;
  transform:translateX(-50%);
  background:var(--line);
}
.number-line-q .slider-value{
  font-size:.8rem;
  color:var(--muted);
  margin-top:2px;
}
/* ===============================
   Math — Real number line (tap)
   =============================== */
.numberline-q {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.numberline {
  position: relative;
  max-width: 640px;
  margin: 12px 0 4px;
  padding: 18px 4px 4px;
}

.numberline-track {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 24px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.numberline-ticks {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0;
  width: 100%; /* make ticks fill the line evenly */
}

.nl-tick {
  position: relative;
  background: none;
  border: none;
  padding: 0 2px;
  cursor: pointer;
  font: inherit;
  text-align: center;
  color: var(--text);
  flex: 1 1 0;  /* equal spacing for all ticks */
  min-width: 0; /* allow shrink on small screens */
}

.nl-stick {
  display: block;
  width: 2px;
  height: 14px;
  margin: 0 auto 4px;
  background: var(--text);
  border-radius: 999px;
}

.nl-label {
  font-size: 0.8rem;
  display: block;
  word-wrap: break-word;
}

.nl-tick:focus-visible {
  outline: 2px solid var(--acc-1);
  outline-offset: 2px;
}

/* States */
.nl-tick.is-selected .nl-stick {
  background: var(--acc-1);
}

.nl-tick.is-correct .nl-stick {
  background: var(--acc-4);
}

.nl-tick.is-wrong .nl-stick {
  background: var(--acc-5);
}

.numberline-result {
  font-size: 0.9rem;
  margin-top: 4px;
}

.numberline-q.correct .numberline-result {
  color: var(--acc-4);
  font-weight: 600;
}

.numberline-q.incorrect .numberline-result {
  color: var(--acc-5);
  font-weight: 600;
}

/* Mobile tweaks so it never goes wider than screen */
@media (max-width: 600px) {
  .numberline {
    max-width: 100%;
    padding: 18px 0 4px;
  }
  .numberline-track {
    left: 0;
    right: 0;
  }
  .nl-label {
    font-size: 0.7rem;
  }
}
/* ===============================
   Math — Bead bar (abacus style)
   =============================== */

.bead-bar{
  display:inline-flex;
  gap:4px;
  align-items:center;
  padding:4px 6px;
  border-radius:999px;
  border:1px solid var(--card-line);
  background:rgba(255,255,255,.9);
  margin:4px 0 2px;
}

/* Only real beads are circles */
.bead-bar .bead-a,
.bead-bar .bead-b{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:50%;
  border:1px solid rgba(11,16,48,.2);
  box-shadow:0 0 0 1px rgba(255,255,255,.7) inset;
}

/* First addend = coral */
.bead-a{
  background:var(--acc-5); /* #ff8b6b */
}

/* Second addend = blue */
.bead-b{
  background:var(--acc-1); /* #3e75ff */
}

/* Middle is just a plus sign, not a bead */
.bead-plus{
  display:inline-block;
  margin:0 4px;
  font-weight:700;
  line-height:1;
  border:none;
  background:transparent;
  box-shadow:none;
  width:auto;
  height:auto;
}
.faded {
  opacity: .45;
  filter: grayscale(.6);
}
/* Bigger calendar cards for Lesson 102 Practice 2 */
.tap-grid.cal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 6px;
  justify-content: flex-start;
}

.tap-grid.cal-grid .tap-cell {
  flex: 0 0 140px;    /* card width */
  padding: 4px;       /* tight padding around SVG */
}

/* Make the SVG fill the card */
.tap-grid.cal-grid .tap-cell svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ===============================
   DnD cards — Calendar style
   =============================== */

.calendar-dd .dd-sentence {
  background:#f1f5ff;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
}

/* Month / event cards */
.calendar-dd .dd-bank,
.calendar-dd .dd-targets {
  gap:12px;
}

.calendar-dd .dd-chip {
  min-width:110px;
  min-height:70px;
  padding:10px 14px;
  border-radius:16px;
  background:
    radial-gradient(140px 90px at 10% 0%, rgba(62,117,255,.10), transparent 60%),
    linear-gradient(180deg,#ffffff,#f4f7ff);
  box-shadow:0 8px 18px rgba(15,23,42,.16);
  font-size:1.1rem;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* Slightly larger slots to match */
.calendar-dd .dd-slot {
  min-width:110px;
  min-height:70px;
  border-radius:16px;
}

/* ===============================
   Thank-you note vertical lines
   =============================== */

/* ONLY applies to lessons using: <section id="dragdrop" class="note-dd"> */
#dragdrop.note-dd .dd-targets {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 6px;
}

#dragdrop.note-dd .dd-slot {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}
/* ---------- Tiny mobile polish ---------- */
@media (max-width:380px){
  .hero{ padding:18px; }
  .hero h1{ font-size:20px; } /* cleaned stray NBSP */
}
/* Greeting card slots: full-width lines inside the card */
.card-text-flow {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
}

.card-text-flow .dd-slot{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  margin-bottom:0;
  justify-content:flex-start;
  text-align:left;
}
/* Simple layout for the sound pad */
.sound-pad-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.sound-pad-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sound-pad-grid .sound-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #3E75FF;
  background: #ffffff;
  font-size: 20px;
  font-family: "Patrick Hand", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  transition: transform 0.05s ease-out, box-shadow 0.05s ease-out, background-color 0.1s;
}

.sound-pad-grid .sound-btn:focus-visible {
  outline: 2px solid #3E75FF;
  outline-offset: 2px;
}

.sound-pad-grid .sound-btn.is-playing {
  background-color: #e0ecff;
  box-shadow: 0 0 0 2px rgba(62,117,255,0.25);
  transform: translateY(1px);
}
/* ===============================
   Mini-lesson visual frame
   =============================== */
.mini-visual {
  flex: 1;
  min-width: 260px;
}

.mini-visual-frame {
  margin-top: 8px;
  border-radius: 16px;
  border: 1px solid var(--card-line);
  background: #f5f6ff;
  box-shadow: var(--shadow);
  padding: 8px;
  display: inline-block;
  max-width: 280px;
}

.mini-visual-frame svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
/* ===============================
   SOUND PAD — FULL CLEAN VERSION
   =============================== */

/* Modal backdrop */
.soundpad-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  padding: 10px;
}

.soundpad-modal[aria-hidden="false"] {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Modal box */
.soundpad-content {
  background: #ffffff;
  width: 90%;
  max-width: 500px;        /* smaller than old 600px */
  padding: 16px;           /* tighter */
  border-radius: 10px;
  max-height: 90vh;
  overflow-y: auto;
}

.soundpad-content h2 {
  margin-top: 0;
  font-size: 22px;
}

.soundpad-content h3 {
  margin: 12px 0 6px;
  font-size: 16px;
}

/* Close button */
.close-soundpad {
  background: transparent;
  border: none;
  font-size: 26px;
  position: absolute;
  top: 10px;
  right: 14px;
  cursor: pointer;
}

/* ===============================
   Sound Grid — compact layout
   =============================== */
.soundpad-content .sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

/* Buttons in the grid */
.soundpad-content .sound-btn {
  padding: 6px 4px;           /* smaller */
  font-size: 16px;            /* smaller */
  line-height: 1.2;
  border-radius: 6px;
  background: #eef2ff;
  border: 1px solid #c4c9ff;
  cursor: pointer;
}

.soundpad-content .sound-btn:hover {
  background: #e0e6ff;
}

/* Even more compact on tiny devices */
@media (max-width: 480px) {
  .soundpad-content .sound-grid {
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 4px;
  }
  .soundpad-content .sound-btn {
    padding: 4px 2px;
    font-size: 14px;
  }
}

/* ===============================
   SOUNDPAD BUTTON
   =============================== */
.soundpad-floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #3E75FF;
  color: #ffffff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 9000;
}

.soundpad-floating:hover,
.soundpad-floating:focus {
  background: #315dcc;
  transform: translateY(-1px);
}

.soundpad-floating:active {
  transform: translateY(1px) scale(0.97);
}

/* Smaller floating button on mobile */
@media (max-width: 480px) {
  .soundpad-floating {
    right: 10px;
    bottom: 10px;
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
}

/* DO NOT SHOW MODAL OR FLOATING BUTTON IN PRINT */

.pad-icon {
  display:inline-flex;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#3E75FF;
  color:white;
  font-size:11px;
  align-items:center;
  justify-content:center;
  margin:0 4px;
}
.pad-icon::before {
  content:"🔊";
  line-height:1;
  font-size:12px;
}
.lesson-audio.pill {
  background: #1e90ff;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  margin-right: 8px;
  transition: 0.2s;
}

.lesson-audio.pill:hover {
  background: #0070d4;
}
button.lesson-audio.is-playing {
  background-color: #3e75ff !important;
  color: #fff !important;
  transform: scale(0.96);
}
/* ===============================
   NUMBER CHART BUTTON
   =============================== */
.numberchart-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  padding: 20px;
}

.numberchart-modal[aria-hidden="false"] {
  display: flex;
  justify-content: center;
  align-items: center;
}

.numberchart-content {
  background: #ffffff;
  width: 95%;
  max-width: 520px;        /* bigger modal */
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
  position: relative;
}

.numberchart-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #eee;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.numberchart-svg-wrap svg {
  width: 100%;
  max-height: none;
  height: auto;
  display: block;
  margin-top: 12px;
}

/* Modern pill (if you still use a text button somewhere) */
.modern-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(to bottom right, #3e75ff, #5c8dff);
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.modern-pill:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

.modern-pill:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* Floating Number Chart button (global math tool) */
.numberchart-floating-btn {
  position: fixed;
  right: 16px;
  bottom: 80px; /* adjust if needed vs Sound Pad button */
  z-index: 9500;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  cursor: pointer;

  background: linear-gradient(145deg, #10b981, #22c55e);
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.numberchart-floating-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}

.numberchart-floating-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}
/* Label above the doodle arrow */
.numberchart-label {
  position: fixed;
  right: 58px;        /* align with arrow */
  bottom: 170px;      /* above the arrow */
  font-size: 15px;
  font-weight: 700;
  background: #fff;
  color: #111;
  padding: 4px 10px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 9600;
  pointer-events: none;
  animation: arrowShowThenFade 4s forwards;
}

/* Doodle arrow pointing at the number chart button */
.numberchart-arrow {
  position: fixed;
  right: 70px;   /* moved LEFT */
  bottom: 110px; /* vertical stays good */
  width: 56px;
  height: 56px;
  z-index: 9600;
  pointer-events: none;
  animation: arrowShowThenFade 4s forwards;
}

.numberchart-arrow svg {
  width: 100%;
  height: 100%;
}

/* Friendly bounce + fade-out */
@keyframes arrowShowThenFade {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  10% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-4px) scale(1.03);
  }
  60% {
    transform: translateY(0) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
}


/* ===============================
   Mission Overlays (Blueprint style, full-width card)
   =============================== */

.mission-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.98));
  z-index: 3000;
  backdrop-filter: blur(6px);
}

.mission-overlay.is-active {
  display: flex;
}

/* Main panel = as big as a section-card on desktop */
.mission-panel {
  position: relative;
  width: 100%;
  max-width: 1120px;                   /* wider – similar to your container */
  max-height: calc(100vh - 96px);      /* tall, but keeps a small margin */
  margin: auto;
  padding: 24px 26px 20px;
  border-radius: 22px;
  overflow: hidden;
  color: #e5e7eb;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.35), transparent 55%),
    linear-gradient(135deg, #020617, #1d4ed8);
  box-shadow:
    0 28px 80px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(148, 163, 184, 0.45);
  display: flex;
  flex-direction: column;
}

/* subtle grid inside panel */
.mission-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.20;
  background-image:
    linear-gradient(to right, rgba(30, 64, 175, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 64, 175, 0.4) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.mission-panel > * {
  position: relative;
  z-index: 1;
}

/* Close button */
.mission-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.5);
}

.mission-close:hover,
.mission-close:focus-visible {
  background: rgba(30, 64, 175, 0.95);
  box-shadow:
    0 0 0 3px rgba(129, 140, 248, 0.9),
    0 10px 25px rgba(15, 23, 42, 0.85);
  outline: none;
}

/* HEADER / BODY / FOOTER LAYOUT */

.mission-header {
  padding-right: 46px; /* space for close button */
  margin-bottom: 14px;
}

.mission-header h2 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.mission-progress {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #c7d2fe;
}

.mission-progress-text {
  margin-bottom: 4px;
}

.mission-progress-bar {
  width: 100%;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  height: 6px;
  overflow: hidden;
}

.mission-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #a3e635);
}

/* BODY: scrollable content area */
.mission-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* When we clone a full section-card (Mini / Guided Practice) we want it scrollable */
.mission-content {
  margin-top: 6px;
  padding-right: 4px;                  /* room for scrollbar */
  max-height: calc(100vh - 160px);     /* header + footer + margins */
  overflow-y: auto;
}

/* nicer, thicker scrollbar for accessibility (where supported) */
.mission-content::-webkit-scrollbar {
  width: 10px;
}
.mission-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
.mission-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.8);
  border-radius: 999px;
}
.mission-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.9) rgba(15, 23, 42, 0.4);
}

/* Typography inside mission content */
.mission-content h2,
.mission-content h3 {
  color: #e5e7eb;
}

.mission-content p,
.mission-content li {
  color: #e5e7eb;
  font-size: 0.98rem;
  line-height: 1.5;
}

.mission-content .lead-note {
  color: #c7d2fe;
}

/* Question & choices (Mission Mode) */

.mission-question-text {
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 600;
  color: #f9fafb;
}

.mission-choices {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* pill-style choices – higher contrast */
.mission-choice-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(37, 99, 235, 0.92));
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.4;
  color: #f9fafb;
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    border-color 120ms ease-out,
    background-color 120ms ease-out,
    opacity 120ms ease-out;
}

.mission-choice-btn::before {
  content: "●";
  font-size: 0.75rem;
  color: #bfdbfe;
}

/* hover / focus */
.mission-choice-btn:hover,
.mission-choice-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.75);
  border-color: #93c5fd;
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* states */
.mission-choice-btn.correct {
  border-color: #4ade80;
  background:
    linear-gradient(135deg, rgba(22, 163, 74, 0.95), rgba(21, 128, 61, 0.95));
}

.mission-choice-btn.incorrect {
  border-color: #f97373;
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.94), rgba(185, 28, 28, 0.95));
}

.mission-choice-btn.disabled {
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
}

/* Feedback text */
.mission-feedback {
  min-height: 1.4em;
  font-size: 0.92rem;
  color: #e5e7eb;
}

/* FOOTER buttons */
.mission-footer {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* tweak buttons inside panel – keep your base .btn styles */
.mission-footer .btn {
  min-width: 120px;
  font-size: 0.98rem;
}

/* ========== Responsive tweaks ========== */

@media (max-width: 768px) {
  .mission-overlay {
    padding: 12px;
  }

  .mission-panel {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;              /* full-screen sheet on small screens */
  }

  .mission-header h2 {
    font-size: 1.1rem;
  }

  .mission-question-text {
    font-size: 1rem;
  }

  .mission-content {
    max-height: calc(100vh - 150px);
  }
}
/* ------------ Mission completion badge + text ------------ */
.mission-complete-wrap {
  margin-top: 16px;
  max-width: 720px;
  font-size: 0.98rem;
}

.mission-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1.15rem;        /* make Galaxy Ace bigger */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(15, 23, 42, 0.6);
}

.mission-tier-badge-icon {
  font-size: 1.4rem;
}

.mission-tier-badge-text {
  text-transform: uppercase;
}

.mission-tier-badge--ace {
  background: linear-gradient(135deg, #fde047, #f97316);
  color: #111827;
}

.mission-tier-badge--star {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #f9fafb;
}

.mission-tier-badge--cadet {
  background: linear-gradient(135deg, #4b5563, #1f2937);
  color: #e5e7eb;
}

.mission-tier-text {
  margin-top: 10px;
  color: #e5e7eb;
}

.mission-tier-hint {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* ------------ Permanent frame + starfield ------------ */
.mission-panel--celebrate {
  position: relative;
  overflow: hidden;
}

.mission-panel--tier-1 {
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.mission-panel--tier-2 {
  border: 1px solid #38bdf8;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.3);
}

.mission-panel--tier-3 {
  border: 2px solid #a3e635;
  box-shadow: 0 0 28px rgba(190, 242, 100, 0.4);
}

.mission-panel--tier-3::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle at top,
    rgba(190, 242, 100, 0.35),
    transparent 55%);
  opacity: 1;              /* stays visible */
  pointer-events: none;
  z-index: -1;
}

/* Starfield overlay */
.mission-starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.mission-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #f9fafb;
  opacity: 0;
  animation: missionStarTwinkle 4s ease-in-out infinite;
}

@keyframes missionStarTwinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.6);
  }
  40%, 60% {
    opacity: 0.8;
    transform: scale(1.6);
  }
}

/* ==========================
   Mission Hero (UPDATED — rank meta removed)
   Keeps: identity strip + mission progress bar
   Removes: "Cadet Rank 3" + stars + rank progress bar
   ========================== */

.hero-mission {
  position: relative;
  margin-bottom: 18px;
  padding: 18px 22px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.35), transparent 55%),
    linear-gradient(135deg, #020617, #1d4ed8);
  color: #f9fafb;
  box-shadow:
    0 20px 55px rgba(15, 23, 42, 0.75),
    0 0 0 1px rgba(148, 163, 184, 0.35);
  overflow: hidden;
}

/* subtle blueprint grid */
.hero-mission::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.25) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-mission > * {
  position: relative;
  z-index: 1;
}

/* Top row: chips + right-side actions */
.hero-mission-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.hero-mission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.6);
  backdrop-filter: blur(6px);
}

/* small pill buttons in the top-right (Back / Reset) */
.hero-mission-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at top, #0f172a, #1d4ed8);
  color: #e5edff;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.65),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  text-decoration: none;
}

.hero-top-btn.ghost {
  background: radial-gradient(circle at top, #111827, #020617);
  border-color: rgba(148, 163, 184, 0.9);
  color: #e5e7eb;
}

/* Main layout: two columns */
.hero-mission-main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: stretch;
}

/* LEFT SIDE */
.hero-mission-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Rank row (now: identity strip only) */
.hero-mission-rank {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* In-hero identity strip alignment (scoped to hero only) */
.hero-mission .tactoc-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-mission .tactoc-avatar,
.hero-mission .tactoc-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-mission .tactoc-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Shared avatar circle style used by your fallback */
.hero-avatar-circle {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: radial-gradient(circle at 30% 20%, #ffffff, #c4d7ff);
  box-shadow:
    0 0 0 3px rgba(129, 140, 248, 0.9),
    0 0 30px rgba(59, 130, 246, 0.75);
}

/* Title + location */
.hero-mission-header h1 {
  margin: 4px 0 2px;
  font-size: 1.8rem;
  letter-spacing: 0.02em;
}

.hero-mission-location {
  margin: 0;
  font-size: 0.88rem;
  color: #dbeafe;
}

.hero-location-accent {
  font-weight: 600;
}

/* Objective line */
.hero-mission-objective {
  margin: 4px 0 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

/* Mission progress (KEEP — this is the real mission progress bar) */
.hero-mission-progress {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.hero-mission-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.78rem;
  color: #c7d2fe;
}

.hero-progress-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-progress-value {
  font-weight: 600;
}

.hero-mission-progress-bar {
  margin-top: 6px;
  width: 100%;
  height: 6px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  overflow: hidden;
}

.hero-mission-progress-fill {
  width: 20%; /* JS updates this */
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
}

/* Status row: badge + text */
.hero-mission-status {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-mission-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 244, 0.7);
  background: rgba(15, 23, 42, 0.85);
  color: #e5f0ff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6);
}

/* Not started */
.hero-mission-tier--none {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 244, 0.5);
}

/* Tier 1 – Space Cadet */
.hero-mission-tier--tier-1 {
  background: radial-gradient(circle at 30% 0%, #1d4ed8, #020617);
  border-color: rgba(129, 140, 248, 0.9);
}

/* Tier 2 – Star Explorer */
.hero-mission-tier--tier-2 {
  background: radial-gradient(circle at 30% 0%, #38bdf8, #1e293b);
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Tier 3 – Galaxy Ace */
.hero-mission-tier--tier-3 {
  background: linear-gradient(90deg, #facc15, #fb923c);
  border-color: rgba(250, 204, 21, 0.95);
  color: #111827;
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.7),
    0 0 22px rgba(250, 204, 21, 0.75);
}

.hero-mission-status-text {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Mobile tightening */
@media (max-width: 640px) {
  .hero-mission {
    padding: 16px 16px 18px;
  }

  .hero-mission-header h1 {
    font-size: 1.55rem;
  }

  .hero-mission-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-mission-top-actions {
    align-self: stretch;
    justify-content: flex-start;
  }

  .hero-mission-main {
    grid-template-columns: 1fr;
  }
}

/* ==========================
   Hero mission actions (game hub style)
   ========================== */

.hero-mission-actions {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 640px;
}

/* Base look for all hero buttons */
.hero-mission-actions .btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  height: 54px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  box-shadow:
    0 10px 25px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(148, 163, 184, 0.32);
  transform: translateY(0);
  transition:
    transform 140ms ease-out,
    box-shadow 140ms ease-out,
    background 160ms ease-out,
    border-color 160ms ease-out;
  text-align: center;
}

/* Little “glow bar” at top of buttons */
.hero-mission-actions .btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.24),
    transparent 50%
  );
  opacity: 0.55;
  pointer-events: none;
}

/* Hover / focus “lift” */
.hero-mission-actions .btn:hover,
.hero-mission-actions .btn:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.65),
    0 0 0 1px rgba(191, 219, 254, 0.9);
  outline: none;
}

/* Primary action: Start Mission — full-width, strongest color */
.hero-mission-actions .btn.primary {
  grid-column: 1 / -1; /* span full row */
  background: linear-gradient(135deg, #60a5fa, #38bdf8);
  border: 1px solid rgba(191, 219, 254, 0.8);
  color: #0b1120;
}

.hero-mission-actions .btn.primary:hover,
.hero-mission-actions .btn.primary:focus-visible {
  background: linear-gradient(135deg, #93c5fd, #38bdf8);
}

/* “Tool” buttons: Briefing + Training */
.hero-mission-actions .btn:not(.primary):not(.safe) {
  background: radial-gradient(circle at top, #1d4ed8, #0f172a);
  border: 1px solid rgba(129, 140, 248, 0.8);
  color: #e5e7eb;
}

/* Safe / navigation buttons: Back + Reset */
.hero-mission-actions .btn.safe {
  background: radial-gradient(circle at top, #22c55e, #14532d);
  border: 1px solid rgba(187, 247, 208, 0.85);
  color: #022c22;
}

/* On very small screens, keep them nicely stacked */
@media (max-width: 640px) {
  .hero-mission-actions {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .hero-mission-actions .btn {
    width: 100%;
  }
}

/* RIGHT SIDE : Orbit / stats */

.hero-mission-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* keep stats card down */
  align-items: stretch;            /* stats stays full width */
  gap: 16px;
}

/* Center the orbit itself and push it down a bit from the buttons */
.hero-orbit-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, rgba(248, 250, 252, 0.18), transparent 55%);
  box-shadow:
    0 0 40px rgba(59, 130, 246, 0.75),
    inset 0 0 30px rgba(15, 23, 42, 0.9);
  overflow: hidden;

  margin: 40px auto 0;             /* <— centers horizontally + adds space from top buttons */
}

.hero-orbit-ring {
  position: absolute;
  inset: 24px;
  border-radius: 999px;
  border: 1px dashed rgba(191, 219, 254, 0.45);
}

.hero-orbit-ring.orbit-2 {
  inset: 46px;
  border-style: solid;
  border-color: rgba(129, 140, 248, 0.65);
}

.hero-orbit-planet {
  position: absolute;
  inset: 64px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #eff6ff, #4f46e5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #020617;
  text-align: center;
}

.hero-orbit-number {
  font-size: 1.8rem;
  font-weight: 700;
}

.hero-orbit-label {
  margin-top: 2px;
  font-size: 0.75rem;
}

.hero-orbit-marker {
  position: absolute;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.8);
}

.marker-ones {
  top: 20%;
  left: 10%;
}

.marker-tens {
  bottom: 16%;
  right: 8%;
}

/* Stats card */

.hero-mission-stats {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.hero-stat-label {
  color: #c7d2fe;
}

.hero-stat-value {
  font-weight: 500;
}
.hero-orbit-note{
  margin: 0 auto;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.35;
}

/* Responsive */

@media (max-width: 960px) {
  .hero-mission-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-mission-right {
    order: -1;
  }

  .hero-orbit-wrap {
    width: 150px;
    height: 150px;
  }
}

/* ===============================
   Briefing / Training inside mission overlays
   =============================== */

/* Remove the normal white card look when a section-card is shown in a mission panel */
.mission-panel .section-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Let the blueprint panel control typography colors */
.mission-panel .section-card h2,
.mission-panel .section-card h3,
.mission-panel .section-card p,
.mission-panel .section-card li,
.mission-panel .section-card .lead-note {
  color: inherit;
}

/* Optional: tighten layout a bit for overlays */
.mission-panel .section-card .mini-flex {
  align-items: flex-start;
}

.mission-panel .section-card .mini-points,
.mission-panel .section-card .mini-visual {
  background: transparent;
  box-shadow: none;
}
/* FORCE briefing/training content to full brightness inside overlays */
.mission-panel .section-card,
.mission-panel .section-card * {
  opacity: 1 !important;
  color: #e5e7eb !important;
}

/* Keep tracing pad UI dark on light background inside overlays */
.mission-panel .trace-pad,
.mission-panel .trace-pad * {
  color: #111 !important;
}

/* Specific fixes for tip text and emphasis */
.mission-panel .trace-pad .trace-tip,
.mission-panel .trace-pad .trace-tip em,
.mission-panel .trace-pad .trace-tip strong {
  color: #111 !important;
}

/* Dropdowns and labels must stay readable */
.mission-panel .trace-pad select,
.mission-panel .trace-pad label {
  color: #111 !important;
}
/* ============================================
   Mission Overlay — Visual Polish & Animations
   ============================================ */

.mission-overlay {
  background:
    radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,0.99));
  backdrop-filter: blur(10px);
}

/* Panel look (matches your hero brand) */
.mission-panel {
  background:
    radial-gradient(circle at top left, #1e3a8a, #020617);
  border-radius: 24px;
  box-shadow:
    0 26px 70px rgba(15,23,42,0.85),
    0 0 0 1px rgba(148,163,253,0.38);
  color: #e5e7eb;
  transform: translateY(0);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

/* Correct / incorrect overlay flashes */
.mission-overlay.mission-correct .mission-panel {
  animation: missionCorrectPulse 0.45s ease-out;
  box-shadow:
    0 0 0 1px rgba(34,197,94,0.65),
    0 26px 70px rgba(15,23,42,0.9);
}

.mission-overlay.mission-incorrect .mission-panel {
  animation: missionIncorrectShake 0.3s ease-out;
  box-shadow:
    0 0 0 1px rgba(248,113,113,0.7),
    0 26px 70px rgba(15,23,42,0.9);
}

@keyframes missionCorrectPulse {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-2px) scale(1.01); }
  60%  { transform: translateY(1px) scale(0.998); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes missionIncorrectShake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(5px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* Progress bars (overlay + hero) */
.mission-progress-bar,
.hero-mission-progress-bar {
  background: rgba(15,23,42,0.85);
  border-radius: 999px;
  overflow: hidden;
}

.mission-progress-fill,
.hero-mission-progress-fill {
  height: 6px;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #a3e635);
  box-shadow: 0 0 16px rgba(34,197,94,0.6);
  width: 0;
  transition: width 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Question text + feedback */
.mission-question-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.mission-feedback {
  margin-top: 14px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 1.2em;
}

.mission-feedback-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.mission-feedback-icon--correct {
  background: rgba(22,163,74,0.15);
  color: #bbf7d0;
}

.mission-feedback-icon--incorrect {
  background: rgba(239,68,68,0.18);
  color: #fecaca;
}

/* MCQ buttons inside mission */
.mission-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mission-choice-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,253,0.4);
  background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,0.9));
  color: #e5e7eb;
  font-size: 0.98rem;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease,
    opacity 0.15s ease;
}

.mission-choice-btn:hover:not(.disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15,23,42,0.7);
  border-color: rgba(129,140,248,0.8);
}

.mission-choice-btn.disabled {
  cursor: default;
  opacity: 0.9;
}

.mission-choice-btn.correct {
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-color: rgba(134,239,172,0.9);
  box-shadow: 0 0 20px rgba(34,197,94,0.7);
  color: #022c22;
}

.mission-choice-btn.incorrect {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
  border-color: rgba(252,165,165,0.9);
  box-shadow: 0 0 20px rgba(248,113,113,0.7);
  color: #111827;
}

/* Drag & drop inside mission overlay */
.mission-panel .dd-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
  justify-content: center;
}

.mission-panel .dd-slot {
  min-width: 44px;
  min-height: 40px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(148,163,253,0.5);
  background: radial-gradient(circle at top, rgba(15,23,42,0.8), rgba(15,23,42,0.95));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.9);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.12s ease;
}

.mission-panel .dd-slot.active {
  border-color: rgba(129,140,248,1);
  box-shadow:
    0 0 0 1px rgba(129,140,248,0.7),
    0 0 20px rgba(129,140,248,0.55);
  transform: translateY(-1px);
}

.mission-panel .dd-slot.correct {
  border-style: solid;
  border-color: rgba(34,197,94,0.9);
  box-shadow:
    0 0 0 1px rgba(34,197,94,0.7),
    0 0 18px rgba(34,197,94,0.6);
}

.mission-panel .dd-slot .dd-chip {
  border-radius: 999px;
  padding: 6px 12px;
  background: linear-gradient(135deg,#38bdf8,#6366f1);
  color: #0b1120;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(15,23,42,0.8);
}

/* ghost chip while dragging already uses .drag-ghost styles in JS */

/* Make number lines a bit brighter inside mission */
.mission-panel .numberline-track {
  background: linear-gradient(to right, rgba(148,163,253,0.2), rgba(148,163,253,0.5));
}

.mission-panel .nl-tick .nl-stick {
  background: rgba(191,219,254,0.85);
}

.mission-panel .nl-tick.is-selected .nl-stick {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,0.9);
}
/* ============================================
   Mission Overlay — Remove white card from DnD
   ============================================ */

.mission-panel .dd-sentence {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

.mission-panel .dd-sentence p {
  display: none !important; /* hide duplicate prompt inside the cloned block */
}

.mission-panel .dd-targets,
.mission-panel .dd-bank {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.mission-panel .dd-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.mission-panel .dd-chip {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0b1120;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15,23,42,0.8);
}
/* Overall question area */
.mission-body {
  margin-top: 20px;
}

.mission-question-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f9fbff;
  margin-bottom: 14px;
}

.mission-choices {
  margin-top: 8px;
}

/* -------------------------------
   1) Drag & Drop inside mission
   ------------------------------- */

/* Make the sentence look like a soft card but keep your dark theme */
.mission-choices .dd-sentence {
  background: rgba(8, 17, 40, 0.9);           /* deep navy */
  border-radius: 18px;
  padding: 16px 18px 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.mission-choices .dd-sentence p {
  color: #e5ecff;
  font-weight: 500;
}

/* Slot row */
.mission-choices .dd-targets {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Empty slots clearly visible */
.mission-choices .dd-slot {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px dashed rgba(248, 250, 252, 0.7);
  background: radial-gradient(circle at 30% 20%, #111827, #020617);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.8);
}

/* Dropped chip on slot */
.mission-choices .dd-slot .dd-chip {
  border-radius: 999px;
}

/* Bank row */
.mission-choices .dd-bank {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Chips: brighter and tappable-looking */
.mission-choices .dd-chip {
  background: linear-gradient(145deg, #2563eb, #0ea5e9);
  color: #ffffff;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: 0 10px 22px rgba(15, 118, 255, 0.45);
}

/* Result text under DnD */
.mission-choices .dd-result,
.mission-choices .dd-explain {
  margin-top: 8px;
  font-size: 0.9rem;
}

.mission-choices .dd-result {
  font-weight: 600;
}

/* -------------------------------
   2) Number lines inside mission
   ------------------------------- */

.mission-choices .numberline {
  margin-top: 10px;
  padding: 16px 16px 10px;
  border-radius: 16px;
  background: radial-gradient(circle at top, #0b1120, #020617);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.mission-choices .numberline-track {
  background: rgba(148, 163, 184, 0.8);      /* line */
}

.mission-choices .nl-tick {
  color: inherit;
}

.mission-choices .nl-stick {
  background: rgba(248, 250, 252, 0.9);      /* tick line */
}

.mission-choices .nl-label {
  color: #e5ecff;                            /* numbers under ticks */
  font-weight: 600;
}

/* Selected / correct / wrong ticks clearer on dark bg */
.mission-choices .nl-tick.is-selected .nl-stick {
  transform: scaleY(1.15);
}

.mission-choices .nl-tick.is-correct .nl-stick {
  background: #22c55e;
}
.mission-choices .nl-tick.is-wrong .nl-stick {
  background: #ef4444;
}

/* -------------------------------
   3) Slider questions inside mission
   ------------------------------- */

.mission-choices .slider-q {
  margin-top: 10px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: radial-gradient(circle at top, #020617, #020617);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

/* Make the slider itself stand out */
.mission-choices .slider-q input[type="range"] {
  width: 100%;
}

/* “Current: 0” – bigger and high contrast */
.mission-choices .slider-value {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #facc15; /* warm yellow */
}

/* -------------------------------
   4) Feedback text
   ------------------------------- */

.mission-feedback {
  margin-top: 14px;
}

.mission-feedback-icon {
  margin-right: 6px;
}

.mission-feedback-icon--correct {
  color: #22c55e;
}

.mission-feedback-icon--incorrect {
  color: #ef4444;
}
/* Mission overlay: inline slider styling */
.mission-overlay .mission-inline-slider {
  margin-top: 24px;
}

.mission-overlay .mission-inline-slider input[type="range"] {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 8px;
}

.mission-overlay .mission-slider-value {
  font-weight: 700;
  font-size: 1rem;
  color: #ffd966; /* or your --ok color */
}
/* ==========================================================
   Blueprint Page Kit (shared across Home / Levels / basic pages)
   ========================================================== */

/* Dark space background helper (opt-in per page via data-page) */
/* HERO */
.bp-hero{
  border-radius: 24px;
  padding: 18px 22px 18px;
  color: #f9fafb;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129,140,248,0.25), transparent 55%),
    linear-gradient(135deg, #020617, #1d4ed8);
  box-shadow:
    0 20px 55px rgba(15,23,42,0.70),
    0 0 0 1px rgba(148,163,184,0.30);
  overflow: hidden;
  position: relative;
  margin-top: 12px;
}
.bp-hero::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:0.16;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.25) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events:none;
}
.bp-hero > *{ position:relative; z-index:1; }

.bp-hero-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}

.bp-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.bp-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(15,23,42,0.65);
  border: 1px solid rgba(148,163,184,0.55);
  color: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
}

.bp-hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.bp-hero-title{
  margin: 8px 0 8px;
  font-size: clamp(32px, 4.4vw, 54px);
  letter-spacing: .2px;
}

.bp-hero-lead{
  margin: 0;
  max-width: 78ch;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  font-size: 1rem;
}

.bp-pillrow{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.bp-pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.90);
  font-weight: 800;
  font-size: 0.82rem;
}

/* SECTIONS */
.bp-section{ margin-top: 20px; }
.bp-section--tight{ margin-top: 16px; }

.bp-section-head h2{
  margin: 0 0 6px;
  font-size: 1.5rem;
  color: #f9fafb;
}
.bp-muted{
  margin: 0;
  color: rgba(229,231,235,0.90);
  line-height: 1.65;
}

/* GRID */
.bp-grid{
  margin-top: 14px;
  display:grid;
  gap:14px;
}
.bp-grid--3{ grid-template-columns: repeat(12, 1fr); }
.bp-grid--3 > *{ grid-column: span 4; }
.bp-grid--4{ grid-template-columns: repeat(12, 1fr); }
.bp-grid--4 > *{ grid-column: span 3; }

@media (max-width: 980px){
  .bp-grid--3 > *{ grid-column: span 6; }
  .bp-grid--4 > *{ grid-column: span 6; }
}
@media (max-width: 640px){
  .bp-grid--3 > *{ grid-column: span 12; }
  .bp-grid--4 > *{ grid-column: span 12; }
}

/* CARD */
.bp-card{
  border-radius: 18px;
  padding: 16px 18px;
  color: #e5e7eb;
  background: radial-gradient(circle at top left, #1e3a8a, #020617);
  border: 1px solid rgba(148,163,253,0.28);
  box-shadow:
    0 18px 50px rgba(15,23,42,0.55),
    0 0 0 1px rgba(15,23,42,0.85);
  position: relative;
  overflow:hidden;
}
.bp-card::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:0.16;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.25) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events:none;
}
.bp-card > *{ position:relative; z-index:1; }
.bp-card h3{
  margin: 0 0 6px;
  color:#f9fafb;
  font-size: 1.05rem;
}
.bp-card p{
  margin: 0;
  color: rgba(229,231,235,0.92);
  line-height: 1.6;
}

.bp-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.70);
  border: 1px solid rgba(148,163,184,0.55);
  color: #c7d2fe;
  font-weight: 900;
  font-size: 0.78rem;
}

/* CTA rows */
.bp-cta-row{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.bp-cta{
  border-radius: 22px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}
.bp-cta h2{ margin: 0 0 6px; color:#f9fafb; }
/* Levels page spacing (kept minimal so the shared kit stays reusable) */
body[data-page="levels"] .bp-levels{ padding-bottom: 28px; }
body[data-page="levels"] .bp-galaxy-grid{ margin-top: 10px; }
body[data-page="levels"] .bp-galaxy-card .bp-cta-row{ margin-top: 12px; }

/* =====================================================
   Galaxy Map (Reusable)
   Page: data-page="galaxy-1" (and future galaxy pages)
===================================================== */

body[data-page^="galaxy-"]{
  min-height:100vh;
  background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,0.99));
}

.galaxy-map-wrap{ padding: 18px 0 22px; }

.galaxy-map-hero{
  border-radius: 24px;
  padding: 18px 18px 14px;
  color:#e5e7eb;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.20), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129,140,248,0.18), transparent 55%),
    linear-gradient(135deg, rgba(2,6,23,0.92), rgba(30,58,138,0.65));
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow:
    0 26px 70px rgba(15,23,42,0.55),
    0 0 0 1px rgba(15,23,42,0.85);
  overflow:hidden;
  position:relative;
}
.galaxy-map-hero::before{
  content:"";
  position:absolute; inset:0;
  opacity:0.12;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.25) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events:none;
}
.galaxy-map-hero > *{ position:relative; z-index:1; }

.gm-top{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.gm-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.gm-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  background: rgba(15,23,42,0.70);
  border: 1px solid rgba(148,163,184,0.50);
  color: #c7d2fe;
  white-space: nowrap;
}
.gm-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.gm-title{
  margin: 6px 0 6px;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  letter-spacing: .01em;
  color:#f9fafb;
}
.gm-lead{
  margin: 0 0 10px;
  color: rgba(229,231,235,.92);
  line-height: 1.55;
  max-width: none;
  width: 100%;
}

/* MAP */
.gm-map{
  position: relative;
  margin-top: 6px;
  height: min(64vh, 540px);
  min-height: 400px;
  border-radius: 22px;
  background: radial-gradient(circle at center, rgba(56,189,248,0.10), rgba(2,6,23,0.0) 60%);
  overflow:hidden;
}

.gm-ring{
  position:absolute;
  inset: 10%;
  border-radius: 999px;
  border: 1px dashed rgba(148,163,184,0.18);
  opacity: .55;
  pointer-events:none;
}
.gm-ring.r2{ inset: 22%; opacity:.40; }
.gm-ring.r3{ inset: 34%; opacity:.28; }

.gm-paths{
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity: .9;
}
.gm-path{
  fill: none;
  stroke: rgba(148,163,184,0.22);
  stroke-width: 1.35;
  stroke-dasharray: 3 7;
  vector-effect: non-scaling-stroke;
}
.gm-path.glow{
  stroke: rgba(56,189,248,0.10);
  stroke-width: 3.5;
  stroke-dasharray: none;
  filter: blur(0.6px);
  opacity: .8;
}
.gm-path-active{
  stroke: rgba(56,189,248,0.55);
  stroke-width: 1.6;
  stroke-dasharray: 2 6;
}

/* HUB point (invisible, used as travel origin) */
.gm-hub{
  position:absolute;
  left: 50%;
  top: 70%;
  width: 1px;
  height: 1px;
  transform: translate(-50%, -50%);
  pointer-events:none;
}

/* Avatar (travels) */
.gm-avatar{
  position:absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  width: clamp(36px, 4vw, 52px);
  aspect-ratio: 1 / 1;
  display:flex;
  align-items:center;
  justify-content:center;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 6;
  pointer-events:none;
  will-change: transform;
}
.gm-avatar .emoji{
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,0.55));
}
.gm-avatar .gm-avatar-label{
  position:absolute;
  bottom: -8px;
  transform: translateY(100%);
  font-weight: 900;
  font-size: 0.95rem;
  color: rgba(229,231,235,0.95);
  text-shadow: 0 12px 26px rgba(0,0,0,0.45);
  white-space: nowrap;
}
.gm-avatar.is-traveling .emoji{
  animation: avatarGlow 900ms ease-in-out infinite;
}
@keyframes avatarGlow{
  0%,100%{ filter: drop-shadow(0 14px 26px rgba(0,0,0,0.50)); }
  50%{ filter: drop-shadow(0 18px 30px rgba(56,189,248,0.28)); }
}

/* Stations */
.gm-node{
  position:absolute;
  width: 160px;
  max-width: 40vw;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap: 8px;
  text-decoration:none;
  color: inherit;
  border-radius: 16px;
  padding: 6px;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: transform .18s ease;
  user-select:none;
  z-index: 3;
}

/* Never move any station on hover */
.gm-node:hover{ transform: none; }
.gm-node.pos-tech:hover{ transform: translateX(-50%); } /* keep tech locked */

.gm-node:focus{
  outline: 3px solid rgba(56,189,248,0.55);
  outline-offset: 4px;
  border-radius: 16px;
}

.gm-station{
  width: 82px;
  height: 82px;
  display:grid;
  place-items:center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(56,189,248,0.32), transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(129,140,248,0.28), transparent 55%),
    rgba(15,23,42,0.68);
  border: 1px solid rgba(148,163,184,0.42);
  box-shadow: 0 16px 34px rgba(0,0,0,0.38);
  position: relative;
  overflow: hidden;
}
.gm-station svg{ width: 70px; height: 70px; display:block; opacity: .98; }
.gm-station .core-emoji{
  position:absolute;
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.35));
}

.gm-node h3{
  margin: 0;
  font-size: 1.06rem;
  color: #f9fafb;
  letter-spacing: .01em;
  text-shadow: 0 10px 22px rgba(0,0,0,0.40);
}
.gm-node p{
  margin: 0;
  font-size: .88rem;
  line-height: 1.35;
  color: rgba(219,234,254,0.92);
  text-shadow: 0 10px 22px rgba(0,0,0,0.35);
  max-width: 18ch;
}

/* Subtle pulse only */
.gm-node .gm-station::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:999px;
  border: 1px solid rgba(56,189,248,0.0);
  opacity: 0;
  transform: scale(0.94);
  pointer-events:none;
}
.gm-node:hover .gm-station::after{
  opacity: .9;
  border-color: rgba(56,189,248,0.25);
  transform: scale(1.02);
  transition: all .18s ease;
}

/* Positions (Galaxy 1 layout) */
.pos-writing{  top: 18%; left: 14%; }
.pos-reading{  top: 20%; right: 12%; }
.pos-math{     top: 56%; right: 4%;  }
.pos-science{  bottom: 10%; right: 18%; }
.pos-social{   bottom: 10%; left: 18%; }
.pos-sel{      top: 62%; left: 4%; }
.pos-tech{     top: 9%; left: 50%; transform: translateX(-50%); }

/* Mobile layout */
@media (max-width: 860px){
  .gm-map{
    height: auto;
    min-height: 0;
    padding: 14px 10px 10px;
  }
  .gm-ring{ display:none; }
  .gm-paths{ display:none; }

  .gm-hub{ display:none; }

  .gm-avatar{
    position: static;
    transform: none !important;
    margin: 6px auto 18px;
  }
  .gm-node{
    position: static;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 12px;
  }
  .gm-node p{ max-width: 34ch; }
  .pos-tech{ transform: none; }
  .gm-node.pos-tech:hover{ transform: none; }
}
/* =========================================================
   STATION PATH (Duolingo-style) — shared styles (ALL stations)
   Applies on pages where body[data-page^="station-"]
   ========================================================= */

body[data-page^="station-"]{
  min-height:100vh;
  background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,0.99));
}

/* ===============================
   Blueprint Hero (station header)
   =============================== */
.st-hero-wrap{
  max-width:1120px;
  margin: 18px auto 14px;
  padding: 0 16px;
}

.st-hero{
  position:relative;
  border-radius: 26px;
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.20), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129,140,248,0.18), transparent 55%),
    linear-gradient(135deg, rgba(2,6,23,0.92), rgba(30,58,138,0.62));
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: 0 26px 70px rgba(15,23,42,0.55), 0 0 0 1px rgba(15,23,42,0.85);
  overflow:hidden;
}

.st-hero::before{
  content:"";
  position:absolute; inset:0;
  opacity:0.12;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.25) 1px, transparent 1px);
  background-size:32px 32px;
  pointer-events:none;
}

.st-hero > *{ position:relative; z-index:1; }

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

.st-hero-chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.st-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(148,163,184,0.28);
  color: rgba(229,231,235,0.96);
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 12px 26px rgba(0,0,0,0.22);
  white-space: nowrap;
}

.st-hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}

.st-hero-title{
  margin: 14px 0 0;
  font-size: clamp(1.9rem, 2.7vw, 2.6rem);
  color:#f9fafb;
  letter-spacing:.01em;
  font-weight: 980;
}

.st-hero-sub{
  margin: 8px 0 0;
  color: rgba(229,231,235,.92);
  line-height: 1.55;
  max-width: 92ch;
  font-size: 1.05rem;
}

/* ===============================
   Station Map
   =============================== */
.dl-map-wrap{
  max-width: 1120px;
  margin: 0 auto 26px;
  padding: 0 16px 18px;
}

.dl-map{
  position: relative;
  border-radius: 26px;
  background: rgba(2,6,23,0.40);
  border: 1px solid rgba(148,163,184,0.22);
  box-shadow: 0 18px 54px rgba(0,0,0,0.36);
  overflow: hidden;
  padding: 18px 10px 26px;
}

.dl-map::before{
  content:"";
  position:absolute; inset:0;
  opacity:0.10;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,.10), rgba(255,255,255,0) 22%),
    radial-gradient(circle at 78% 34%, rgba(255,255,255,.08), rgba(255,255,255,0) 24%),
    radial-gradient(circle at 42% 76%, rgba(255,255,255,.08), rgba(255,255,255,0) 22%);
  pointer-events:none;
}

.dl-stage{
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 70px 32px 40px; /* prevents mobile clipping */
  min-height: 820px; /* JS extends */
}

/* SVG path */
.dl-path{
  position:absolute;
  inset:0;
  z-index: 1;
  pointer-events:none;
  opacity: .95;
}
.dl-path .track-glow{
  fill:none;
  stroke: rgba(56,189,248,0.14);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dl-path .track{
  fill:none;
  stroke: rgba(148,163,184,0.26);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dl-path .track-active{
  fill:none;
  stroke: rgba(56,189,248,0.50);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2 9;
  opacity: .85;
}

/* Nodes */
.dl-node{
  position:absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  user-select:none;
}
.dl-node a{
  display:block;
  text-decoration:none;
  color: inherit;
}

.dl-coin{
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 28% 28%, rgba(255,255,255,0.22), transparent 52%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,0.14), transparent 55%),
    rgba(15,23,42,0.72);
  border: 1px solid rgba(148,163,184,0.32);
  box-shadow: 0 22px 44px rgba(0,0,0,0.38);
  position: relative;
}
.dl-coin .ico{
  font-size: 30px;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.35));
}

/* BIG PLANET milestone */
.dl-planet{
  width: 158px;
  height: 158px;
  border-radius: 999px;
  border: 2px solid rgba(56,189,248,0.55);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.26), transparent 52%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,0.22), transparent 60%),
    rgba(15,23,42,0.78);
  box-shadow:
    0 34px 92px rgba(0,0,0,0.58),
    0 0 0 10px rgba(56,189,248,0.10);
  animation: planetPulse 3.8s ease-in-out infinite;
}
.dl-planet .ico{ font-size: 48px; }

@keyframes planetPulse{
  0%,100%{
    box-shadow:
      0 34px 92px rgba(0,0,0,0.58),
      0 0 0 10px rgba(56,189,248,0.10);
  }
  50%{
    box-shadow:
      0 40px 112px rgba(0,0,0,0.68),
      0 0 0 16px rgba(56,189,248,0.18);
  }
}

/* Planet title pill (side) */
.dl-planet-title{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  font-weight: 980;
  font-size: 1.18rem;
  color:#f9fafb;
  background: rgba(15,23,42,0.58);
  border: 1px solid rgba(148,163,184,0.26);
  padding: 10px 14px;
  border-radius: 16px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.42);
  white-space: nowrap;
  max-width: min(420px, 62vw);
  overflow: hidden;
  text-overflow: ellipsis;
  will-change: transform, left;
}

.dl-label{
  position:absolute;
  left: 50%;
  bottom: -10px;
  transform: translate(-50%, 100%);
  font-weight: 950;
  font-size: .95rem;
  color: rgba(229,231,235,0.92);
  text-shadow: 0 14px 28px rgba(0,0,0,0.45);
  white-space: nowrap;
}
.dl-label small{
  display:block;
  font-weight: 800;
  font-size: .80rem;
  opacity: .86;
  margin-top: 2px;
  max-width: 46ch;
  overflow:hidden;
  text-overflow: ellipsis;
}

/* States */
.is-done .dl-coin{
  border-color: rgba(16,185,129,0.40);
  box-shadow: 0 22px 44px rgba(0,0,0,0.38), 0 0 0 1px rgba(16,185,129,0.10);
}
.is-current .dl-coin{
  border-color: rgba(56,189,248,0.55);
  box-shadow: 0 22px 44px rgba(0,0,0,0.38), 0 0 0 1px rgba(56,189,248,0.12);
}
.is-locked{
  opacity: .50;
  filter: saturate(.85);
}

/* Avatar */
.dl-avatar{
  position:absolute;
  z-index: 20;
  width: 62px;
  height: 62px;
  display:grid;
  place-items:center;
  transform: translate(-50%, -50%);
  pointer-events:none;
  will-change: transform, left, top;
}
.dl-avatar .emoji{
  font-size: 56px;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,0.55));
}

/* Toast */
.dl-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(560px, calc(100% - 24px));
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(2,6,23,0.86);
  border: 1px solid rgba(148,163,184,0.32);
  color: rgba(229,231,235,0.96);
  box-shadow: 0 18px 50px rgba(0,0,0,0.38);
  display:none;
  z-index: 9999;
  text-align:center;
}
.dl-toast.is-on{ display:block; }
.dl-toast strong{ color:#e0e7ff; }

/* Star burst overlay */
.starburst{
  position: fixed;
  inset: 0;
  pointer-events:none;
  z-index: 9998;
  display:none;
}
.starburst.is-on{ display:block; }
.star{
  position:absolute;
  left: 50%;
  top: 40%;
  font-size: 18px;
  opacity: 0;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,0.55));
  animation: starPop 900ms ease-out forwards;
}
@keyframes starPop{
  0%{ transform: translate(-50%,-50%) scale(0.35); opacity:0; }
  18%{ opacity: 1; }
  100%{ transform: translate(var(--dx), var(--dy)) scale(1.25); opacity:0; }
}

/* Mobile tuning */
@media (max-width: 860px){
  .dl-stage{ padding: 64px 22px 36px; }
  .dl-coin{ width: 76px; height: 76px; }
  .dl-planet{ width: 134px; height: 134px; }
  .dl-planet .ico{ font-size: 44px; }
  .dl-label{ font-size: .92rem; }
  .dl-label small{ display:none; }
  .dl-planet-title{ font-size: 1.05rem; max-width: 68vw; }
}
@media (max-width: 420px){
  .dl-stage{ padding: 60px 16px 34px; }
  .dl-planet-title{ max-width: 72vw; }
}
/* ===============================
   Auth pages (login + dashboard)
   Append to /assets/nextgen.css
   =============================== */

.bp-auth-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:18px;
  align-items:start;
  margin-top:18px;
}
@media (max-width: 860px){
  .bp-auth-grid{ grid-template-columns:1fr; }
}

.bp-auth-hero{ padding:20px 22px; }
.bp-auth-card{ padding:18px; }

.bp-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 12px;
}
.bp-tab{
  appearance:none;
  border:1px solid var(--line, rgba(255,255,255,.12));
  background:transparent;
  color:inherit;
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:800;
  opacity:.86;
}
.bp-tab.is-active{
  background:rgba(110,168,255,.18);
  border-color:rgba(110,168,255,.35);
  opacity:1;
}

.bp-form{ margin:0; }
.bp-label{
  display:block;
  margin:10px 0 6px;
  font-weight:800;
  font-size:13px;
  color:var(--muted, rgba(255,255,255,.70));
}
.bp-input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line, rgba(255,255,255,.12));
  background:rgba(0,0,0,.18);
  color:inherit;
  outline:none;
}
.bp-input:focus{
  border-color:rgba(110,168,255,.45);
  box-shadow:0 0 0 4px rgba(110,168,255,.18);
}

.bp-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

.bp-msg{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line, rgba(255,255,255,.12));
  background:rgba(255,255,255,.05);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space:pre-wrap;
  word-break:break-word;
}
.bp-msg.ok{
  background:rgba(34,197,94,.15);
  border-color:rgba(34,197,94,.28);
}
.bp-msg.bad{
  background:rgba(239,68,68,.16);
  border-color:rgba(239,68,68,.28);
}

.bp-tiny{ font-size:12px; }

.bp-details{
  border-radius:16px;
}
.bp-details-summary{
  cursor:pointer;
  font-weight:900;
}
.bp-pre{
  margin:12px 0 0;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line, rgba(255,255,255,.12));
  background:rgba(0,0,0,.18);
  overflow:auto;
}
/* ===============================
   Typed Confirm Modal — Dashboard style skin
   Applies to Mission Reset typed modal DOM:
   #typedConfirmBackdrop.tc-typed-backdrop > .tc-typed
   =============================== */

.tc-typed-backdrop{
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;                 /* hidden by default */
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at center, rgba(2,6,23,.55), rgba(2,6,23,.92)),
    rgba(2,6,23,.86);
  backdrop-filter: blur(10px);
}

.tc-typed-backdrop.is-on{
  display: flex;
}

.tc-typed{
  width: 100%;
  max-width: 620px;
  border-radius: 26px;
  padding: 22px 22px 18px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129,140,248,.18), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.78));
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    0 28px 80px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.06) inset;
  color: #fff;
}

.tc-typed-header{
  padding: 0;
  border: 0;
}

.tc-typed-pill{
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .2px;
  color: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(2,6,23,.45);
  box-shadow:
    0 10px 24px rgba(0,0,0,.24),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.tc-typed-header h3{
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}

.tc-typed-body{
  padding: 0;
  line-height: 1.45;
}

.tc-typed-body p{
  margin: 0;
  color: rgba(255,255,255,.90);
  font-size: 16px;
}

.tc-typed-row{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 0;
}

.tc-typed-row label{
  color: rgba(255,255,255,.92);
  font-weight: 900;
  min-width: 90px;
}

.tc-typed-input{
  flex: 1 1 320px;
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(2,6,23,.55);
  color: #fff;
  font-weight: 900;
  outline: none;
  box-shadow:
    0 10px 24px rgba(0,0,0,.28),
    0 0 0 1px rgba(255,255,255,.06) inset;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tc-typed-input:focus{
  border-color: rgba(56,189,248,.85);
  box-shadow:
    0 0 0 4px rgba(56,189,248,.20),
    0 12px 26px rgba(0,0,0,.30);
}

.tc-typed .tc-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0;
}

/* Buttons: follow your global .btn if present, otherwise decent fallback */
.tc-typed .btn{
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(2,6,23,.45);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 12px 26px rgba(0,0,0,.30),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.tc-typed .btn.primary{
  border-color: rgba(56,189,248,.40);
  background: rgba(56,189,248,.12);
}

.tc-typed .btn.danger{
  border-color: rgba(248,113,113,.40);
  background: rgba(248,113,113,.10);
}

.tc-typed .btn:disabled{
  opacity: .55;
  cursor: not-allowed;
}

/* =========================================================
   DASHBOARD — FINAL CLEAN CSS (single block)
   Paste ONCE in /assets/nextgen.css
   ========================================================= */

body[data-page="dashboard"] .bp-pillrow--dash{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

body[data-page="dashboard"] .bp-pill--select{
  display: flex;
  gap: 8px;
  align-items: center;
}

body[data-page="dashboard"] .bp-pill-label{
  font-weight: 900;
  opacity: .9;
}

body[data-page="dashboard"] .bp-input--pill{
  padding: 8px 10px;
  border-radius: 999px;
  max-width: 320px;
}

/* Optional: Hide hero Add kid button if you prefer only the Add-a-kid form below */
body[data-page="dashboard"] #addKidQuickBtn{
  display: none !important;
}

/* ---------------------------------
   Kids cards + ACTIVE highlight
   --------------------------------- */
body[data-page="dashboard"] .kid-card{
  position: relative;
  overflow: hidden;
}

/* Prevent any old pseudo-element rocket (double rocket fix) */
body[data-page="dashboard"] .kid-card.is-active::after{
  content: none !important;
  display: none !important;
}

body[data-page="dashboard"] .kid-card.is-active{
  border-color: rgba(56,189,248,.78) !important;
  box-shadow:
    0 22px 60px rgba(0,0,0,.45),
    0 0 0 2px rgba(56,189,248,.22) inset,
    0 0 0 1px rgba(255,255,255,.10);
}

body[data-page="dashboard"] .kid-badge.is-active{
  background: rgba(56,189,248,.22) !important;
  border-color: rgba(56,189,248,.70) !important;
  color: #fff !important;
  box-shadow: 0 10px 26px rgba(56,189,248,.22);
}

body[data-page="dashboard"] .kid-actions{
  margin-top: 12px;
}

/* Single rocket badge (HTML element exists, only shown when active) */
body[data-page="dashboard"] .kid-rocket{
  display: none;
}

body[data-page="dashboard"] .kid-card.is-active .kid-rocket{
  display: block;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 30% 30%, rgba(56,189,248,.35), rgba(2,6,23,.10) 62%),
    linear-gradient(180deg, rgba(30,41,59,.72), rgba(15,23,42,.86));
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  z-index: 3;
  pointer-events: none;
}

body[data-page="dashboard"] .kid-card.is-active .kid-rocket::before{
  content: "";
  position: absolute;
  inset: 10px;
  background: url("/assets/icon-192.png") center/contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.40));
}

/* ---------------------------------
   Progress actions layout
   --------------------------------- */
body[data-page="dashboard"] .dash-actions{
  margin-top: 14px;
}

body[data-page="dashboard"] .dash-actions-grid{
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 0.95fr;
  gap: 12px;
}

@media (max-width: 980px){
  body[data-page="dashboard"] .dash-actions-grid{
    grid-template-columns: 1fr;
  }
}

body[data-page="dashboard"] .dash-mini{
  padding: 14px 14px 12px;
}

body[data-page="dashboard"] .dash-mini-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

body[data-page="dashboard"] .dash-mini-title{
  font-weight: 950;
  color: #fff;
}

body[data-page="dashboard"] .dash-mini-muted{
  margin-top: 6px;
}

body[data-page="dashboard"] .dash-mini-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

body[data-page="dashboard"] .dash-mini-foot{
  margin-top: 10px;
}

body[data-page="dashboard"] .bp-input--select{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(2,6,23,.25);
  color: #fff;
  font-weight: 900;
}

/* Stations list (Continue card) */
body[data-page="dashboard"] .dash-stations{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

body[data-page="dashboard"] .dash-station-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(2,6,23,.18);
}

body[data-page="dashboard"] .dash-station-title{
  font-weight: 950;
  color: #fff;
}

body[data-page="dashboard"] .dash-station-meta{
  margin-top: 2px;
  font-size: 13px;
  opacity: .92;
}

/* Reset pickers */
body[data-page="dashboard"] .dash-reset-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 520px){
  body[data-page="dashboard"] .dash-reset-row{
    grid-template-columns: 1fr;
  }
}

body[data-page="dashboard"] .dash-reset-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ---------------------------------
   Progress table
   --------------------------------- */
body[data-page="dashboard"] .dash-table-wrap{
  overflow: auto;
  margin-top: 14px;
}

body[data-page="dashboard"] .dash-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 10px 10px;
  min-width: 920px;
}

body[data-page="dashboard"] .dash-table th{
  text-align: left;
  font-weight: 950;
  opacity: .95;
}

body[data-page="dashboard"] .dash-td{
  vertical-align: top;
}

body[data-page="dashboard"] .dash-td--galaxy{
  font-weight: 950;
}

body[data-page="dashboard"] .dash-cell{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(2,6,23,.18);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="dashboard"] .dash-cell-left{
  font-weight: 900;
  opacity: .92;
}

body[data-page="dashboard"] .dash-cell-right{
  font-weight: 950;
}

/* ---------------------------------
   Modals (shared for dashboard)
   --------------------------------- */
body[data-page="dashboard"] .tactoc-modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at center, rgba(2,6,23,.55), rgba(2,6,23,.92)),
    rgba(2,6,23,.86);
  backdrop-filter: blur(10px);
}

body[data-page="dashboard"] .tactoc-modal-backdrop.is-on{
  display: flex;
}

body[data-page="dashboard"] .tactoc-modal{
  width: 100%;
  max-width: 620px;
  border-radius: 26px;
  padding: 22px 22px 18px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129,140,248,.18), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.78));
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    0 28px 80px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.06) inset;
  color: #fff;
}

body[data-page="dashboard"] .tactoc-modal h3{
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}

body[data-page="dashboard"] .tactoc-modal .bp-muted{
  color: rgba(255,255,255,.90) !important;
  font-size: 16px;
}

body[data-page="dashboard"] .tactoc-modal-row{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

body[data-page="dashboard"] .tactoc-modal-row label{
  color: rgba(255,255,255,.92);
  font-weight: 900;
  min-width: 90px;
}

body[data-page="dashboard"] .tactoc-modal select,
body[data-page="dashboard"] .tactoc-modal input{
  flex: 1 1 320px;
  min-width: 260px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(2,6,23,.55);
  color: #fff;
  font-weight: 900;
  outline: none;
  box-shadow:
    0 10px 24px rgba(0,0,0,.28),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

body[data-page="dashboard"] .tactoc-modal select:focus,
body[data-page="dashboard"] .tactoc-modal input:focus{
  border-color: rgba(56,189,248,.85);
  box-shadow:
    0 0 0 4px rgba(56,189,248,.20),
    0 12px 26px rgba(0,0,0,.30);
}

body[data-page="dashboard"] .tactoc-modal-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-end;
}

body[data-page="dashboard"] .tactoc-modal select option{
  background: #0b1224;
  color: #fff;
}
/* =========================================================
   DASHBOARD + STATION INDEX PAYWALL — CLEAN CSS (paste once)
   ========================================================= */

/* Hide hero "Add kid" button (you already have Add-a-kid section below) */
body[data-page="dashboard"] #addKidQuickBtn{ display:none !important; }

/* ---------- Active kid highlight + single rocket ---------- */
body[data-page="dashboard"] .kid-card{ position:relative; overflow:hidden; }

body[data-page="dashboard"] .kid-card.is-active{
  border-color: rgba(56,189,248,.78) !important;
  box-shadow:
    0 22px 60px rgba(0,0,0,.45),
    0 0 0 2px rgba(56,189,248,.22) inset,
    0 0 0 1px rgba(255,255,255,.10);
}

/* Kill any old pseudo-rocket to avoid double rockets */
body[data-page="dashboard"] .kid-card.is-active::after{
  content:none !important;
  display:none !important;
}

body[data-page="dashboard"] .kid-badge.is-active{
  background: rgba(56,189,248,.22) !important;
  border-color: rgba(56,189,248,.70) !important;
  color:#fff !important;
  box-shadow: 0 10px 26px rgba(56,189,248,.22);
}

body[data-page="dashboard"] .kid-rocket{ display:none; }
body[data-page="dashboard"] .kid-card.is-active .kid-rocket{
  display:block;
  position:absolute;
  top:14px;
  right:14px;
  width:56px;
  height:56px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 30% 30%, rgba(56,189,248,.35), rgba(2,6,23,.10) 62%),
    linear-gradient(180deg, rgba(30,41,59,.72), rgba(15,23,42,.86));
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  z-index:3;
  pointer-events:none;
}
body[data-page="dashboard"] .kid-card.is-active .kid-rocket::before{
  content:"";
  position:absolute;
  inset:10px;
  background: url("/assets/icon-192.png") center/contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.40));
}

/* ---------- Dashboard actions grid (Continue / Export / Reset) ---------- */
body[data-page="dashboard"] .dash-actions-grid{
  display:grid;
  grid-template-columns: 1.15fr 0.95fr 0.95fr;
  gap:12px;
}
@media (max-width: 980px){
  body[data-page="dashboard"] .dash-actions-grid{ grid-template-columns: 1fr; }
}
body[data-page="dashboard"] .dash-stations{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}
body[data-page="dashboard"] .dash-station-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(2,6,23,.18);
}
body[data-page="dashboard"] .dash-station-title{ font-weight:950; color:#fff; }
body[data-page="dashboard"] .dash-station-meta{ margin-top:2px; font-size:13px; opacity:.92; }

/* ---------- Modals (shared) ---------- */
body[data-page="dashboard"] .tactoc-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:5000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:
    radial-gradient(circle at center, rgba(2,6,23,.55), rgba(2,6,23,.92)),
    rgba(2,6,23,.86);
  backdrop-filter: blur(10px);
}
body[data-page="dashboard"] .tactoc-modal-backdrop.is-on{ display:flex; }

body[data-page="dashboard"] .tactoc-modal{
  width:100%;
  max-width:620px;
  border-radius:26px;
  padding:22px 22px 18px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129,140,248,.18), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.78));
  border:1px solid rgba(255,255,255,.22);
  box-shadow:
    0 28px 80px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.06) inset;
  color:#fff;
}
body[data-page="dashboard"] .tactoc-modal h3{
  margin:10px 0 8px;
  font-size:28px;
  line-height:1.15;
  letter-spacing:.2px;
  color:#fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}
body[data-page="dashboard"] .tactoc-modal .bp-muted{
  color: rgba(255,255,255,.90) !important;
  font-size:16px;
}
body[data-page="dashboard"] .tactoc-modal-row{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:14px;
}
body[data-page="dashboard"] .tactoc-modal-row label{
  color: rgba(255,255,255,.92);
  font-weight:900;
  min-width:90px;
}
body[data-page="dashboard"] .tactoc-modal select,
body[data-page="dashboard"] .tactoc-modal input{
  flex: 1 1 320px;
  min-width:260px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(2,6,23,.55);
  color:#fff;
  font-weight:900;
  outline:none;
  box-shadow:
    0 10px 24px rgba(0,0,0,.28),
    0 0 0 1px rgba(255,255,255,.06) inset;
}
body[data-page="dashboard"] .tactoc-modal select:focus,
body[data-page="dashboard"] .tactoc-modal input:focus{
  border-color: rgba(56,189,248,.85);
  box-shadow:
    0 0 0 4px rgba(56,189,248,.20),
    0 12px 26px rgba(0,0,0,.30);
}
body[data-page="dashboard"] .tactoc-modal-actions{
  display:flex;
  gap:10px;
  margin-top:14px;
  justify-content:flex-end;
}
body[data-page="dashboard"] .tactoc-modal select option{
  background:#0b1224;
  color:#fff;
}

/* ===============================
   STATION LOCK OVERLAY (v2.2)
   - Matches Dashboard rings: Monthly = blue, Yearly = gold
   - Plan cards are DISPLAY-ONLY (no hand cursor, no click affordance)
   - Readable text + glass panel + responsive
   Copy/paste this whole block and REMOVE any older .tactoc-lock CSS blocks.
   =============================== */

.tactoc-lock{
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: none;                 /* shown via .is-on */
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at center, rgba(2,6,23,.55), rgba(2,6,23,.92)),
    rgba(2,6,23,.88);
  backdrop-filter: blur(10px);
}
.tactoc-lock.is-on{ display:flex; }

/* Prevent scrolling behind overlay */
body.has-lock{ overflow:hidden; }

.tactoc-lock__panel{
  width: 100%;
  max-width: 1120px;
  border-radius: 30px;
  padding: 24px 24px 18px;
  color: #fff;

  background:
    radial-gradient(circle at top left, rgba(56,189,248,.14), transparent 55%),
    radial-gradient(circle at bottom right, rgba(129,140,248,.16), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.78));

  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    0 28px 80px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.tactoc-lock__title{
  margin: 10px 0 8px;
  font-size: 40px;
  line-height: 1.12;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}
@media (max-width: 700px){
  .tactoc-lock__title{ font-size: 34px; }
}

.tactoc-lock__lead{
  color: rgba(255,255,255,.88) !important;
  font-size: 16px;
  max-width: 86ch;
}

/* Prices grid */
.tactoc-lock__prices{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 860px){
  .tactoc-lock__prices{ grid-template-columns: 1fr; }
}

/* Plan cards (supports button OR div OR a) */
.tactoc-lock__plan,
.tactoc-lock__prices > *{
  position: relative;
  appearance: none;
  width: 100%;
  text-align: left;
  border-radius: 22px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 18% 18%, rgba(56,189,248,.08), transparent 55%),
    radial-gradient(circle at 82% 60%, rgba(129,140,248,.08), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.22), rgba(2,6,23,.26));
  box-shadow:
    0 18px 54px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.08);

  /* display-only (no hand / no hover hint) */
  cursor: default !important;
  user-select: none;

  /* readable text */
  color: rgba(255,255,255,.92);
}
.tactoc-lock__plan *{ color: inherit; }
.tactoc-lock__prices > * *{ color: inherit; }

/* Absolutely no hover effects that feel clickable */
.tactoc-lock__plan:hover,
.tactoc-lock__prices > *:hover{
  transform: none !important;
  filter: none !important;
}

/* Typography inside plan */
.tactoc-lock__planName{
  font-weight: 950;
  font-size: 20px;
  letter-spacing: .2px;
}
.tactoc-lock__planPrice{
  margin-top: 6px;
  font-weight: 980;
  font-size: 44px;
  line-height: 1;
}
.tactoc-lock__planPrice span{
  font-size: 16px;
  opacity: .85;
  font-weight: 900;
  margin-left: 6px;
}
.tactoc-lock__planMeta{
  margin-top: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.78) !important;
  opacity: 1 !important;
}

/* ===============================
   Rings (ALWAYS ON)
   - Monthly = Blue
   - Yearly  = Gold
   Works with:
     data-plan="monthly/yearly"
     OR data-plan-card="monthly/yearly"
     OR fallback: first card monthly, second yearly
   =============================== */

/* MONTHLY (blue ring) */
.tactoc-lock__plan[data-plan="monthly"],
.tactoc-lock__plan[data-plan-card="monthly"],
.tactoc-lock__prices > *:nth-child(1){
  border: 2px solid rgba(99,179,255,.55) !important;
  box-shadow:
    0 0 0 1px rgba(99,179,255,.18) !important,
    0 26px 110px rgba(29,78,216,.22) !important,
    0 18px 60px rgba(0,0,0,.36) !important,
    inset 0 1px 0 rgba(255,255,255,.10) !important;

  background:
    radial-gradient(circle at 18% 18%, rgba(56,189,248,.14), transparent 55%),
    radial-gradient(circle at 82% 60%, rgba(129,140,248,.14), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.22), rgba(2,6,23,.26)) !important;
}

/* YEARLY (gold ring) */
.tactoc-lock__plan[data-plan="yearly"],
.tactoc-lock__plan[data-plan-card="yearly"],
.tactoc-lock__prices > *:nth-child(2){
  border: 2px solid rgba(250,204,21,.55) !important;
  box-shadow:
    0 0 0 1px rgba(250,204,21,.18) !important,
    0 26px 110px rgba(250,204,21,.22) !important,
    0 18px 60px rgba(0,0,0,.36) !important,
    inset 0 1px 0 rgba(255,255,255,.10) !important;

  background:
    radial-gradient(circle at 18% 18%, rgba(250,204,21,.12), transparent 55%),
    radial-gradient(circle at 82% 60%, rgba(129,140,248,.14), transparent 60%),
    linear-gradient(180deg, rgba(15,23,42,.22), rgba(2,6,23,.26)) !important;
}

/* Actions */
.tactoc-lock__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 16px;
}
@media (max-width: 640px){
  .tactoc-lock__actions{ justify-content: stretch; }
  .tactoc-lock__actions .btn{ flex: 1 1 auto; }
}

/* Message + fine print */
.tactoc-lock__msg{
  margin-top: 10px;
}
.tactoc-lock__fine{
  margin-top: 10px;
  color: rgba(255,255,255,.72) !important;
}

/* ===============================
   Dashboard Billing Cards — overlay style + Monthly/Yearly rings (v2.4)
   Copy/paste this whole block (replaces any previous billing-grid/billing-plan CSS)
   Includes: optional premium Yearly glow (last rule)
   =============================== */

.billing-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:16px;
}
@media (max-width: 760px){
  .billing-grid{ grid-template-columns:1fr; }
}

/* Base plan card (dark glass) */
.billing-plan{
  position:relative;
  overflow:hidden;
  border-radius:22px;
  padding:18px 18px 16px;

  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, .14), transparent 55%),
    radial-gradient(circle at 82% 60%, rgba(129, 140, 248, .12), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, .35), rgba(2, 6, 23, .58));

  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 22px 70px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.08);

  color: rgba(255,255,255,.92);
}

.billing-plan::after{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  background: radial-gradient(circle at 12% 10%, rgba(255,255,255,.10), transparent 38%);
  opacity:.65;
}

/* Monthly = blue ring */
.billing-plan[data-plan-card="monthly"]{
  border: 2px solid rgba(99, 179, 255, .45) !important;
  box-shadow:
    0 26px 90px rgba(29, 78, 216, .25),
    0 18px 60px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.10) !important;
}

/* Yearly = gold ring + warm accent */
.billing-plan[data-plan-card="yearly"]{
  border: 2px solid rgba(250, 204, 21, .45) !important;
  box-shadow:
    0 26px 90px rgba(250, 204, 21, .18),
    0 18px 60px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.10) !important;

  background:
    radial-gradient(circle at 18% 18%, rgba(250, 204, 21, .12), transparent 55%),
    radial-gradient(circle at 82% 60%, rgba(129, 140, 248, .12), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, .35), rgba(2, 6, 23, .58)) !important;
}

/* Top row */
.billing-plan__top{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  position:relative;
  z-index:1;
}
.billing-plan__name{
  font-weight:900;
  letter-spacing:.2px;
  font-size:18px;
}
.billing-plan__price{
  font-weight:950;
  font-size:40px;
  line-height:1;
}
.billing-plan__per{
  font-weight:800;
  font-size:14px;
  opacity:.80;
  margin-left:6px;
}

/* Feature list */
.billing-plan__list{
  position:relative;
  z-index:1;
  margin:8px 0 14px;
  padding:0 0 0 18px;
  color: rgba(255,255,255,.78);
  font-size:14px;
}
.billing-plan__list li{ margin:8px 0; }

/* Button */
.billing-plan__btn{
  position:relative;
  z-index:1;
  width:100%;
  justify-content:center;
  border-radius:16px;
  padding:12px 14px;
}

/* Hide the plan grid when user has a plan */
#billingPlanGrid[hidden]{ display:none !important; }

/* Optional premium glow for Yearly (subtle) — overrides Yearly shadow only */
.billing-plan[data-plan-card="yearly"]{
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, .18),
    0 26px 110px rgba(250, 204, 21, .22),
    0 18px 60px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.10) !important;
}
/* ==========================
   Tactoc Identity Strip (clean + consistent, desktop + mobile)
   Updated: bigger avatar everywhere + nicer mobile sizing
   Fix: force rank/name color so “Recruit” stays readable everywhere
   ========================== */
:root{
  --tt-avatar: 84px;        /* bigger on dashboard + default */
  --tt-avatar-hero: 84px;   /* mission hero */
  --tt-rank-icon: 28px;

  /* NEW: readable rank text everywhere */
  --tt-rank-text: rgba(255,255,255,0.92);
}

/* Mobile: still smaller, but NOT tiny */
@media (max-width: 420px){
  :root{
    --tt-avatar: 72px;        /* was 60 */
    --tt-avatar-hero: 72px;   /* was 60 */
  }
}

.tactoc-identity{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

/* ---------- Avatar ---------- */
.tactoc-avatar{
  width: var(--tt-avatar);
  height: var(--tt-avatar);
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  overflow:hidden;
  flex: 0 0 auto;
}

.hero-mission .tactoc-avatar{
  width: var(--tt-avatar-hero);
  height: var(--tt-avatar-hero);
}

.tactoc-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:999px;
}

/* Emoji fallback */
.tactoc-avatar-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: calc(var(--tt-avatar) * 0.56); /* bigger than before */
  line-height:1;
}

.hero-mission .tactoc-avatar-fallback{
  font-size: calc(var(--tt-avatar-hero) * 0.56);
}

/* ---------- Rank pill ---------- */
.tactoc-rank{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);

  /* NEW: prevent dark inherited text on mission hero */
  color: var(--tt-rank-text);
}

.tactoc-rank img{
  display:block;
  width: var(--tt-rank-icon);
  height: var(--tt-rank-icon);
  flex: 0 0 auto;
}

.tactoc-rank-name{
  font-weight:800;
  line-height:1;
  white-space:nowrap;

  /* NEW: keep readable everywhere */
  color: var(--tt-rank-text);
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

/* Slightly tighter in mission hero */
.hero-mission .tactoc-rank{
  padding:5px 9px;
}
.hero-mission .tactoc-rank-name{
  font-size:14px;
}

/* Optional: keep badges strip aligned nicely if present */
.tactoc-badges{
  display:flex;
  gap:6px;
  overflow:auto;
  padding:4px 2px;
  max-width:360px;
}
/* =========================================================
   Tactoc — Mission pages (no-inline CSS helpers)
   Add this block near the END of /assets/nextgen.css
   ========================================================= */

/* ---------- Utilities ---------- */
.mt-10{ margin-top:10px; }
.mt-20{ margin-top:20px; }

/* ---------- Auth nav (fail-open default) ---------- */
/* Default: show Sign in, hide My account (prevents blank nav if JS is late) */
.nav a[data-auth-show]{ display:none; }
.nav a[data-auth-hide]{ display:inline-flex; }
body[data-auth="true"] .nav a[data-auth-show]{ display:inline-flex; }
body[data-auth="true"] .nav a[data-auth-hide]{ display:none; }

/* Keep logout form hidden (JS can still submit it) */
#logout-form{ display:none; }

/* ---------- Mission hero identity assets ---------- */
/* Hidden until nextgen.js sets content (avatar/rank icon) */
#ttHeroAvatar,
#ttHeroRankIcon{ display:none; }

/* ---------- Mission overlay / conditional blocks ---------- */
#missionExercises{ display:none; }
#missionRetryBtn{ display:none; }

/* ---------- Color palette dots (replaces inline background styles) ---------- */
button.color-dot[data-color="ink"]{ background:#111; }
button.color-dot[data-color="blue"]{ background:#0b56ff; }
button.color-dot[data-color="pink"]{ background:#ff5ca8; }
button.color-dot[data-color="orange"]{ background:#ff9b00; }
button.color-dot[data-color="yellow"]{ background:#ffd400; }
button.color-dot[data-color="green"]{ background:#2cbf6d; }
/* Prevent flash: hide movable sections ONLY when they are direct children of .container.
   After JS moves them into the overlay, this rule no longer matches → they show normally. */
body[data-page^="mission-"] .container > section.section-card[data-lesson-part="mini"],
body[data-page^="mission-"] .container > section.section-card[data-lesson-part="practice"]{
  display:none !important;
}
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }
