/* ==========================================================================
   NEXT GEN — CLASSIC THEME (Bright • Punchy • Futuristic)
   Single-file stylesheet for the whole site
   ========================================================================== */

/* ===============================
   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}

/* ===============================
   Print helpers (white paper, hide UI, show all mini-book pages)
   =============================== */
@media print{
  *{box-shadow:none !important}
  @page{margin:12mm}
  body{
    background:#fff !important;
    color:#000 !important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .mini-video{display:none !important}
  .header,
  [role="navigation"],
  .footer,
  .badges .btn,
  .btn{
    display:none !important;
  }
  .hero{
    box-shadow:none !important;
    border:none !important;
  }
  .trace-pad{display:none !important}
  #tracePrint{display:block !important}

  /* Make mini-book pages stack for print */
  .mini-book-pages{
    position:static !important;
    width:100% !important;
    max-width:none !important;
    aspect-ratio:auto !important;
    margin:0 !important;
    height:auto !important;
  }
  .mini-book-page{
    position:static !important;
    display:block !important;
    margin:0 0 12px !important;
  }

  /* Hide on-screen mini-book UI in print */
  .mini-book-nav,
  .mini-book-controls,
  .mini-book-prev,
  .mini-book-next,
  .mini-book-dots,
  .mini-book-page-counter,
  .mini-book-counter{
    display:none !important;
  }
}

/* ===============================
   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-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-btn:focus-visible {
  outline: 2px solid #3E75FF;
  outline-offset: 2px;
}

.sound-btn.is-playing {
  background-color: #e0ecff;
  box-shadow: 0 0 0 2px rgba(62,117,255,0.25);
  transform: translateY(1px);
}
/* ================================================
   Assessment & Exit Ticket — Progress + Badge
   ================================================ */

/* Container for the progress module */
.checklist-progress {
  margin-bottom:12px;
}

.checklist-progress-bar {
  width:100%;
  height:12px;
  background:#e5e9f5;
  border-radius:999px;
  overflow:hidden;
  margin:6px 0 10px;
}

.checklist-progress-fill {
  height:100%;
  width:0%;
  background:#3E75FF;
  border-radius:999px;
  transition:width .35s ease;
}

/* Percentage text */
.checklist-progress-text {
  font-weight:700;
  font-size:0.9rem;
  color:#3E75FF;
  margin-bottom:4px;
}

/* Completion badge */
.checklist-badge {
  display:none;
  background:#3E75FF;
  color:#fff;
  padding:6px 10px;
  border-radius:999px;
  font-size:0.82rem;
  font-weight:700;
  width:max-content;
  box-shadow:var(--shadow);
  margin-bottom:10px;
  animation:badge-pop .35s ease-out;
}

@keyframes badge-pop {
  0% { transform:scale(.5); opacity:0; }
  80% { transform:scale(1.15); opacity:1; }
  100% { transform:scale(1); }
}
/* ===============================
   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
   =============================== */
.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

/* Buttons in the grid */
.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;
}

.sound-btn:hover {
  background: #e0e6ff;
}

/* Even more compact on tiny devices */
@media (max-width: 480px) {
  .sound-grid {
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 4px;
  }
  .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 */
@media print {
  .soundpad-floating,
  .soundpad-modal {
    display: none !important;
  }
}
.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);
  }
}

@media print {
  .numberchart-modal,
  .numberchart-floating-btn,
  .numberchart-arrow,
  .numberchart-label {
    display: none !important;
  }
}
/* ===============================
   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 (dashboard)
   ========================== */

.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;                  /* tighter */
  align-items: stretch;
}

/* LEFT SIDE */

.hero-mission-left {
  display: flex;
  flex-direction: column;
  gap: 12px;                  /* slightly tighter */
}

/* Rank row */

.hero-mission-rank {
  display: flex;
  align-items: center;
  gap: 12px;
}

.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);
}

.hero-rank-meta {
  flex: 1;
  min-width: 0;
}

.hero-rank-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-rank-stars {
  font-size: 0.85rem;
  margin-top: 2px;
}

.hero-rank-bar {
  margin-top: 6px;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  overflow: hidden;
}

.hero-rank-bar-fill {
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #a3e635);
}

.hero-rank-caption {
  margin-top: 4px;
  font-size: 0.78rem;
  color: #c7d2fe;
}

/* Title + location */

.hero-mission-header h1 {
  margin: 4px 0 2px;
  font-size: 1.8rem;          /* a touch smaller */
  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 */

.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 can update 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 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: 220px;
  height: 220px;
  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: 66px 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;
}

/* Responsive */

@media (max-width: 960px) {
  .hero-mission-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-mission-right {
    order: -1;
  }

  .hero-orbit-wrap {
    width: 190px;
    height: 190px;
  }
}

/* ===============================
   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 */
}
