/* ==========================================================================
   THE VESSELS — a separate experience from the Rihla platform.
   Deep-ocean science fiction: abyssal blues, instrument cyan, ember orange.
   Deliberately NOT the Islamic-architecture theme; the two are kept apart
   until a decision is made about merging them.
   No depiction of any living being anywhere — story is told in writing.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Amiri:wght@400;700&display=swap');

:root {
  --abyss:      #04080f;
  --deep:       #071322;
  --hull:       #0e1f33;
  --panel:      rgba(14, 31, 51, 0.78);
  --line:       rgba(86, 190, 214, 0.22);
  --cyan:       #56bed6;
  --cyan-bright:#8fe4f5;
  --ember:      #ff8a3d;
  --ember-soft: #ffb877;
  --text:       #dfeaf2;
  --muted:      #7d93a6;
  /* Three roles, not one. Inter + Space Grotesk is the default pairing every
     generated site ships with, which is why it reads as machine-made.
       display - the story's own voice: a serif with real character
       head    - interface chrome: engineered, plain, gets out of the way
       mono    - the small readouts, like markings on an instrument */
  --font-display: 'Fraunces', Georgia, serif;
  --font-head:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-arabic:  'Amiri', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--abyss);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* deep-water light shafts + drifting particles */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(86,190,214,0.16), transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 110%, rgba(255,138,61,0.07), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, var(--abyss) 60%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(143,228,245,.7), transparent),
    radial-gradient(1px 1px at 70% 35%, rgba(143,228,245,.5), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(143,228,245,.6), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(143,228,245,.4), transparent),
    radial-gradient(1.5px 1.5px at 25% 88%, rgba(143,228,245,.5), transparent);
  background-repeat: no-repeat;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateY(0); opacity:.3 } to { transform: translateY(-22px); opacity:.65 } }

.hidden { display: none !important; }

.v-screen { min-height: 100vh; padding: 1.2rem; max-width: 760px; margin: 0 auto; animation: rise .5s ease-out; }
/* The archipelago and the islands are looked at, not read — they get the room
   the artwork needs rather than the column width that suits prose. */
#v-map.v-screen, #v-island.v-screen { max-width: 1180px; }
.v-center { display: grid; place-items: center; text-align: center; }
@keyframes rise { from { opacity:0; transform: translateY(14px) } to { opacity:1; transform:none } }

/* ---------- buttons ---------- */
.v-btn {
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.6rem; border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; letter-spacing: .04em; transition: all .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
.v-btn.sm { padding: .45rem .95rem; font-size: .78rem; }
.v-btn-primary {
  background: linear-gradient(180deg, var(--ember-soft), var(--ember));
  color: #2a1206; box-shadow: 0 0 22px rgba(255,138,61,.32);
}
.v-btn-primary:hover { filter: brightness(1.08); box-shadow: 0 0 30px rgba(255,138,61,.5); transform: translateY(-1px); }
.v-btn-ghost {
  background: rgba(86,190,214,.07); border-color: var(--line); color: var(--cyan-bright);
}
.v-btn-ghost:hover { background: rgba(86,190,214,.16); border-color: var(--cyan); }
.v-btn-subtle {
  background: rgba(4,10,20,.6); border: 1px solid var(--line); color: var(--text);
  font-size: .82rem; padding: .6rem 1.1rem; border-radius: 999px; backdrop-filter: blur(6px);
}
.v-btn-subtle:hover { border-color: var(--cyan); color: #fff; background: rgba(86,190,214,.12); transform: translateY(-1px); }

/* ---------- title ---------- */
.title-inner { position: relative; z-index: 2; width: 100%; max-width: 580px; margin: 0 auto; }
.title-kicker { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .42em; color: var(--muted); }
.title-main {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 15vw, 6rem);
  line-height: .92; letter-spacing: -.015em; margin: 1rem 0;
  font-optical-sizing: auto; font-variation-settings: 'SOFT' 20, 'WONK' 1;
  background: linear-gradient(180deg, #fff 10%, var(--cyan) 60%, #2b6f85 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(86,190,214,.28);
}
.title-sub { color: var(--muted); font-size: .95rem; line-height: 2; margin-bottom: 2.2rem; }
.title-sub em { color: var(--cyan); font-style: normal; }
.title-deep {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(86,190,214,.10), transparent 55%);
  animation: pulse 6s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity:.5 } to { opacity:1 } }
.title-actions { display: flex; flex-direction: column; align-items: center; gap: .7rem; margin-bottom: 1.2rem; }
.title-secondary-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
#continue-btn { margin: 0; }

/* ---------- story ---------- */
/* ---------- story: cinematic ----------
   The clip is the screen, not an illustration inside a card. Every control
   floats over it and the prose behaves like a subtitle track — one line at a
   time, timed to the narration — so the picture is never competing with a wall
   of text for the same space. */
.v-cinema {
  position: fixed; inset: 0; z-index: 40;
  display: grid; grid-template-rows: auto 1fr auto auto;   /* bar · title · caption · controls */
  background: #000; overflow: hidden;
  animation: rise .5s ease-out;
}

/* the media fills the viewport and is cropped, never letterboxed */
.v-cinema .story-figure {
  position: absolute; inset: 0; margin: 0; border: 0; border-radius: 0;
  box-shadow: none; background: #000; z-index: 0;
  display: block; overflow: hidden;
}
.v-cinema .story-figure img,
.v-cinema .story-figure video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* keeps white text legible over a bright frame without dimming the whole image */
.cine-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4,8,15,.72) 0%, rgba(4,8,15,0) 24%),
    linear-gradient(0deg,   rgba(4,8,15,.88) 0%, rgba(4,8,15,.30) 34%, rgba(4,8,15,0) 58%);
}

/* Cleared below the global SOUND pill (fixed, top-right, z-95) so the skip and
   full-story controls never sit underneath it. */
.cine-top {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  gap: .6rem; flex-wrap: wrap;
  padding: 3.6rem 1.2rem 1rem;
}
.cine-bottom {
  position: relative; z-index: 3;
  padding: 0 1.2rem 1.2rem;
  width: 100%; max-width: 900px; margin: 0 auto;
}

.v-cinema .story-chapter {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .28em;
  color: var(--cyan-bright); text-transform: uppercase; font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}
.story-meta-actions { display: flex; align-items: center; gap: .6rem; }

/* floating pill controls, quiet until hovered */
/* Sized for a thumb, not a mouse. These float over a moving picture, so they
   need real weight to read at a glance -- and 44px is the smallest target a
   finger hits reliably. */
.story-toggle-btn, .story-skip {
  background: rgba(4,10,20,.62); border: 1px solid rgba(143,228,245,.35);
  color: var(--cyan-bright); font-family: var(--font-mono);
  font-size: .84rem; letter-spacing: .06em; padding: .72rem 1.4rem;
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; cursor: pointer; transition: all .15s;
  backdrop-filter: blur(8px);
}
.story-toggle-btn:hover, .story-skip:hover {
  background: rgba(86,190,214,.22); border-color: var(--cyan); color: #fff;
}

/* the chapter name sits in the dead centre band, above the caption */
.v-cinema .story-title {
  position: relative; z-index: 3; align-self: end;
  font-family: var(--font-display); font-weight: 700; font-optical-sizing: auto;
  font-size: clamp(1.5rem, 4.6vw, 2.6rem); line-height: 1.12; letter-spacing: -.01em;
  color: #fff; letter-spacing: .01em; text-align: center;
  margin: 0 auto .6rem; padding: 0 1.2rem; max-width: 900px;
  text-shadow: 0 3px 24px rgba(0,0,0,.95);
}

/* ---- the subtitle track ---- */
.v-cinema .story-body {
  position: relative; z-index: 3; align-self: end;
  width: 100%; max-width: 820px; margin: 0 auto 1rem; padding: 0 1.2rem;
  min-height: 5.2em;                 /* reserved so lines do not shunt the layout */
  display: flex; flex-direction: column; justify-content: flex-end;
  text-align: center; pointer-events: none;
}
/* Every direct child is one caption. vessels.js adds .is-cap-on to the one whose
   turn it is; the rest are laid over each other so they never take extra height. */
.v-cinema .story-body > * {
  grid-area: 1 / 1;
  opacity: 0; transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
  margin: 0;
}
.v-cinema .story-body.is-stacked { display: grid; align-items: end; }
.v-cinema .story-body > .is-cap-on { opacity: 1; transform: none; }

.v-cinema .story-body p,
.v-cinema .story-beat {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-size: clamp(1.1rem, 2.7vw, 1.5rem); line-height: 1.45;
  color: #fff; font-weight: 500; letter-spacing: .002em;
  text-shadow: 0 2px 16px rgba(0,0,0,.95), 0 0 40px rgba(0,0,0,.7);
}
.v-cinema .story-body p.lead, .v-cinema .story-beat.lead { font-weight: 600; }

/* the richer blocks keep their own identity but sit on the same track */
.v-cinema .story-quote {
  margin: 0; border-left: 0; border-top: 1px solid rgba(255,138,61,.5);
  border-bottom: 1px solid rgba(255,138,61,.5);
  background: rgba(10,6,2,.55); backdrop-filter: blur(6px);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
}
.v-cinema .story-highlight, .v-cinema .story-list, .v-cinema .vessel-pair {
  background: rgba(4,10,20,.6); backdrop-filter: blur(8px); margin: 0;
  text-align: left;
}
.v-cinema .story-closing { margin: 0; }

/* when there is no narration to time against, the text simply reads as a page */
.v-cinema .story-body.is-static { display: block; text-align: left; overflow-y: auto; max-height: 46vh; pointer-events: auto; }
.v-cinema .story-body.is-static > * { position: static; opacity: 1; transform: none; margin-bottom: .9rem; }

.v-cinema .narr-bar { margin: 0 0 .7rem; }
/* The nav is now just a progress cue and the offer of the longer version. */
.v-cinema .story-nav { margin: 0; display: flex; align-items: center;
  justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.v-cinema .story-nav .story-toggle-btn { margin-left: auto; }
.v-cinema .story-dots span { background: rgba(255,255,255,.3); }
.v-cinema .story-dots span.on { background: var(--ember); box-shadow: 0 0 10px var(--ember); }

@media (max-width: 520px) {
  .cine-top { padding: 3.2rem .8rem .7rem; }
  .cine-bottom { padding: 0 .8rem .9rem; }
  .v-cinema .story-body { min-height: 6em; padding: 0 .8rem; }
}

.story-quote {
  margin: 1.4rem 0; padding: 1.2rem 1.3rem; border-left: 2px solid var(--ember);
  background: rgba(255,138,61,.07); font-style: italic; color: var(--ember-soft); font-size: 1.02rem;
}
.story-highlight {
  margin: 1.4rem 0; padding: 1.2rem; border: 1px solid rgba(255,138,61,.35);
  border-radius: 6px; background: rgba(255,138,61,.06);
}
.story-highlight h4 { font-family: var(--font-mono); color: var(--ember); margin-bottom: .5rem; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.story-list { margin: 1.2rem 0; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 6px; background: rgba(86,190,214,.05); }
.story-list h4 { font-family: var(--font-mono); color: var(--cyan); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: .6rem; }
.story-list ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.story-list li { padding: .28rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-size: .84rem; color: var(--cyan-bright); }

.vessel-pair { display: grid; gap: .9rem; margin: 1.3rem 0; }
.vessel-card { padding: 1.2rem; border: 1px solid var(--line); border-radius: 6px; background: rgba(86,190,214,.05); }
.vessel-card.inner { border-color: rgba(255,138,61,.4); background: rgba(255,138,61,.06); }
.vessel-card h4 { font-family: var(--font-head); font-size: 1.05rem; color: var(--cyan); margin-bottom: .1rem; }
.vessel-card.inner h4 { color: var(--ember); }
.vessel-card .vsub { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.story-closing { text-align: center; font-family: var(--font-head); color: var(--cyan-bright); font-size: 1.05rem; margin-top: 1.4rem; line-height: 1.9; }

.story-nav { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1.8rem; }
.story-dots { display: flex; gap: .4rem; }
.story-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(86,190,214,.22); transition: all .25s; }
.story-dots span.on { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* ---------- deck ---------- */
.deck-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem;
}
.deck-id { display: flex; align-items: center; gap: .7rem; }
.deck-vessel { font-size: 1.5rem; color: var(--cyan); }
.deck-name { font-family: var(--font-head); font-weight: 600; font-size: .98rem; }
.deck-stage { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.deck-flame {
  display: flex; align-items: center; gap: .4rem; cursor: pointer;
  background: rgba(255,138,61,.1); border: 1px solid rgba(255,138,61,.35);
  border-radius: 999px; padding: .35rem .9rem; color: var(--ember-soft);
  font-family: var(--font-head); font-weight: 600;
}
.flame-icon { font-size: 1.05rem; animation: flicker 2.6s ease-in-out infinite alternate; }
@keyframes flicker { from { opacity:.75; transform: scale(.96) } to { opacity:1; transform: scale(1.06) } }

.flame-bar-wrap { margin-bottom: 1.4rem; }
.flame-bar { height: 6px; background: rgba(86,190,214,.12); border-radius: 999px; overflow: hidden; }
.flame-fill {
  height: 100%; width: 10%; border-radius: 999px;
  background: linear-gradient(90deg, var(--ember), var(--ember-soft));
  box-shadow: 0 0 14px rgba(255,138,61,.6); transition: width .7s cubic-bezier(.2,1,.3,1);
}
.flame-caption { font-size: .74rem; color: var(--muted); margin-top: .45rem; }

.deck-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.2rem; margin-bottom: 1.4rem; }
.deck-hero h3 { font-family: var(--font-head); color: var(--cyan); margin-bottom: .5rem; }
.deck-hero p { font-size: .93rem; color: var(--muted); }
.deck-heading { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: .2rem; }
.deck-note { font-size: .84rem; color: var(--muted); margin-bottom: 1rem; }

.mission-grid { display: grid; gap: .7rem; padding-bottom: 3rem; }
.mission-tile {
  display: flex; align-items: center; gap: .9rem; text-align: left;
  padding: 1rem 1.1rem; border-radius: 6px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  transition: all .16s; font-family: var(--font-body);
}
.mission-tile:hover { border-color: var(--cyan); transform: translateX(3px); }
.mission-tile .mt-icon { font-size: 1.5rem; }
.mission-tile .mt-name { font-family: var(--font-head); font-weight: 600; font-size: .95rem; }
.mission-tile .mt-sub { font-size: .78rem; color: var(--muted); }
.mission-tile .mt-count { margin-left: auto; font-size: .72rem; color: var(--cyan); white-space: nowrap; }

/* ---------- mission screen ---------- */
.mission-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem 1.3rem; margin-top: 2rem; }
.mc-back { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .82rem; margin-bottom: .8rem; }
.mc-back:hover { color: var(--cyan); }
.mc-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--cyan); margin-bottom: .3rem; }
.mc-intro { font-size: .88rem; color: var(--muted); font-style: italic; margin-bottom: 1.3rem; }
.mc-q { font-size: 1.05rem; margin-bottom: 1.1rem; line-height: 1.6; }
.mc-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.mc-reflect { width: 100%; min-height: 110px; padding: .9rem; border-radius: 6px; background: rgba(4,8,15,.6); border: 1px solid var(--line); color: var(--text); font-family: var(--font-body); font-size: .95rem; resize: vertical; }
.mc-reflect:focus { outline: none; border-color: var(--cyan); }
.mc-progress { font-size: .74rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.mc-done { text-align: center; padding: 1.5rem 0; }
.mc-done .big { font-size: 2.4rem; }

/* ---------- modal + toast ---------- */
.v-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(2,5,10,.85); backdrop-filter: blur(6px); padding: 1rem; }
.v-modal-card { background: var(--hull); border: 1px solid var(--line); border-radius: 8px; padding: 2rem 1.6rem; max-width: 420px; text-align: center; animation: rise .35s ease-out; }
.v-modal-icon { font-size: 3rem; }
.v-modal-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--cyan); margin: .6rem 0 .8rem; }
.v-modal-body { color: var(--text); font-size: .93rem; margin-bottom: 1.4rem; }
.toast-container { position: fixed; top: 1.2rem; right: 1.2rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; }
.toast { background: rgba(14,31,51,.96); border: 1px solid var(--cyan); border-radius: 4px; padding: .7rem 1.1rem; font-size: .86rem; animation: rise .3s ease-out; }

@media (min-width: 640px) { .vessel-pair { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   Journey nodes — story / event / lesson woven into one path
   ========================================================================== */
.node-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; padding-bottom:.7rem; border-bottom:1px solid var(--line); }
.node-chapter { font-family:var(--font-mono); font-size:.7rem; letter-spacing:.24em; text-transform:uppercase; color:var(--muted); }
.node-flame { background:rgba(255,138,61,.1); border:1px solid rgba(255,138,61,.35); color:var(--ember-soft); border-radius:999px; padding:.25rem .8rem; font-family:var(--font-head); font-weight:600; font-size:.85rem; cursor:pointer; }
.node-kind { font-family:var(--font-mono); font-size:.7rem; letter-spacing:.24em; text-transform:uppercase; color:var(--cyan); margin-bottom:.4rem; }
.node-title { font-family:var(--font-display); font-size:1.5rem; font-weight:700; color:#fff; margin-bottom:1rem; }
.btn-wide { width:100%; margin-top:1.4rem; }
.v-btn.sm { padding:.35rem .8rem; font-size:.78rem; margin-top:.5rem; }

/* event */
.is-event { border-color:rgba(255,138,61,.3); }
.event-situation p { margin-bottom:.9rem; font-size:1rem; }
.event-prompt { font-family:var(--font-head); color:var(--ember-soft); font-size:1.02rem; margin:1.2rem 0 1rem; }
.event-choices { display:grid; gap:.6rem; }
.event-choice {
  text-align:left; padding:1rem 1.1rem; border-radius:6px; cursor:pointer;
  background:rgba(86,190,214,.05); border:1px solid var(--line); color:var(--text);
  font-family:var(--font-body); font-size:.95rem; line-height:1.5; transition:all .15s;
}
.event-choice:hover { border-color:var(--ember); background:rgba(255,138,61,.08); transform:translateX(3px); }
.event-chosen { font-size:.85rem; color:var(--muted); margin-bottom:1rem; }
.event-chosen em { color:var(--cyan-bright); font-style:normal; }
.event-outcome p { margin-bottom:.9rem; }
.flame-delta { display:inline-block; padding:.35rem .9rem; border-radius:999px; font-family:var(--font-head); font-weight:600; font-size:.88rem; margin:.6rem 0; }
.flame-delta.up { background:rgba(255,138,61,.14); border:1px solid rgba(255,138,61,.4); color:var(--ember-soft); }
.flame-delta.down { background:rgba(120,140,160,.12); border:1px solid rgba(120,140,160,.35); color:var(--muted); }
.event-reflect { margin-top:1rem; padding:1rem; border-left:2px solid var(--cyan); background:rgba(86,190,214,.06); font-style:italic; color:var(--cyan-bright); font-size:.93rem; }

/* lesson */
.is-lesson { border-color:rgba(86,190,214,.35); }
.lesson-intro p { margin-bottom:.9rem; font-size:1.02rem; }
.cp-progress { display:flex; align-items:center; justify-content:space-between; gap:.6rem; font-size:.76rem; color:var(--muted); padding:.5rem .8rem; border:1px solid var(--line); border-radius:6px; margin-bottom:.9rem; }
.cp-dots { display:flex; gap:.3rem; }
.cp-dots i { width:9px; height:9px; border-radius:50%; background:rgba(86,190,214,.2); transition:all .3s; }
.cp-dots i.on { background:var(--ember); box-shadow:0 0 8px var(--ember); }
.cp-msgs { display:flex; flex-direction:column; gap:.7rem; max-height:48vh; overflow-y:auto; margin-bottom:.9rem; }
.cp-msg { display:flex; gap:.6rem; align-items:flex-start; animation:rise .25s ease-out; }
.cp-who { flex:0 0 auto; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-size:.7rem; margin-top:.2rem; }
.cp-msg.ai .cp-who { background:rgba(86,190,214,.18); color:var(--cyan); }
.cp-msg.me .cp-who { background:rgba(255,138,61,.18); color:var(--ember); }
.cp-msg > span:last-child { padding:.65rem .9rem; border-radius:6px; font-size:.93rem; line-height:1.6; background:rgba(86,190,214,.06); border:1px solid var(--line); }
.cp-msg.me > span:last-child { background:rgba(255,138,61,.07); border-color:rgba(255,138,61,.25); }
.cp-msg.typing > span:last-child { opacity:.5; letter-spacing:.3em; }
.cp-msg.err > span:last-child { border-color:var(--ember); color:var(--ember-soft); }
.cp-input { display:flex; gap:.5rem; align-items:flex-end; }
.cp-text { flex:1; padding:.7rem .9rem; border-radius:6px; background:rgba(4,8,15,.6); border:1px solid var(--line); color:var(--text); font-family:var(--font-body); font-size:.94rem; resize:vertical; }
.cp-text:focus { outline:none; border-color:var(--cyan); }
.cp-win { text-align:center; padding:1.2rem; border-radius:6px; background:rgba(255,138,61,.09); border:1px solid rgba(255,138,61,.4); }
.cp-win strong { color:var(--ember-soft); font-family:var(--font-head); }
.cp-win p { font-size:.86rem; color:var(--muted); margin:.4rem 0 .9rem; }
.cp-skip { text-align:center; padding:.9rem; font-size:.85rem; color:var(--muted); border-top:1px dashed var(--line); margin-top:.5rem; }
.cp-skip .v-btn { display:block; margin:.7rem auto 0; }

/* consolidation */
.cons-intro { color:var(--muted); font-style:italic; text-align:center; margin-bottom:1.2rem; font-size:.92rem; }
.cons-section { padding:1rem 1.1rem; margin-bottom:.7rem; border-radius:6px; background:rgba(86,190,214,.05); border:1px solid var(--line); border-left:2px solid var(--cyan); }
.cons-section h4 { font-family:var(--font-head); color:var(--cyan); font-size:.98rem; margin-bottom:.35rem; }
.cons-section p { font-size:.93rem; margin-bottom:.5rem; }
.cons-closing { margin-top:1rem; padding:1.1rem; border-radius:6px; text-align:center; background:rgba(255,138,61,.07); border:1px solid rgba(255,138,61,.3); font-size:.95rem; }
.cons-full { margin-top:1rem; padding-top:1rem; border-top:1px dashed var(--line); }
.verse-card { text-align:center; padding:1rem; margin:.7rem 0; border-radius:6px; background:rgba(4,8,15,.5); border:1px solid var(--line); }
.verse-surah { font-size:.75rem; color:var(--ember-soft); letter-spacing:.08em; }
.arabic { font-family:'Amiri',serif; font-size:1.6rem; line-height:2.3; margin:.5rem 0; color:#fff; }
.verse-tr { font-size:.88rem; color:var(--muted); font-style:italic; }


/* sound toggle */
.sound-btn {
  position: static;
  background: rgba(14,31,51,.85); border: 1px solid var(--line); color: var(--cyan);
  border-radius: 999px; padding: .35rem .9rem; cursor: pointer;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .18em;
  backdrop-filter: blur(6px); transition: all .18s ease;
}
.sound-btn.muted { color: var(--muted); opacity: .65; }
.sound-btn:hover { border-color: var(--cyan); }

/* narration */
.narrate-btn {
  background: rgba(86,190,214,.08); border: 1px solid var(--line); color: var(--cyan-bright);
  border-radius: 999px; padding: .35rem 1rem; font-size: .8rem; cursor: pointer;
  font-family: var(--font-mono); margin-bottom: 1rem;
}
.narrate-btn:hover { background: rgba(86,190,214,.18); }

/* ==========================================================================
   Archipelago + island screens
   ========================================================================== */
.map-top { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:1.2rem 0 1rem; border-bottom:1px solid var(--line); margin-bottom:1.2rem; }
.map-heading { font-family:var(--font-display); font-size:1.5rem; font-weight:700; color:#fff; }
.map-sub { font-size:.85rem; color:var(--muted); }

.island-grid { display:grid; gap:1.1rem; padding-bottom:3rem; }
.island-card {
  display:flex; gap:1.2rem; align-items:center; text-align:left; padding:1.1rem;
  background:var(--panel); border:1px solid var(--line); border-radius:8px;
  cursor:pointer; color:var(--text); transition:all .18s; font-family:var(--font-body);
}
.island-card:hover:not(.locked) { border-color:var(--cyan); transform:translateY(-2px); }
.island-card.locked { opacity:.45; cursor:not-allowed; filter:grayscale(.5); }
.island-thumb { flex:0 0 auto; width:132px; height:132px; border-radius:8px; overflow:hidden; background:rgba(4,8,15,.6); }
.island-thumb img { width:100%; height:100%; object-fit:cover; }
.island-card-name { font-family:var(--font-display); font-weight:600; font-size:1.2rem; color:#fff; }
.island-card-sub { font-size:.85rem; color:var(--muted); margin-bottom:.35rem; }
.island-card-state { font-size:.75rem; color:var(--cyan); letter-spacing:.06em; }

.island-top { display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:.9rem 0; }
.island-titles { text-align:center; flex:1; }
.island-name { font-family:var(--font-head); font-weight:600; font-size:1rem; color:#fff; }
.island-sub { font-size:.75rem; color:var(--muted); }

.island-stage { position:relative; width:100%; max-width:min(960px, 88vh); margin:0 auto; aspect-ratio:1/1; }
.island-art { width:100%; height:100%; object-fit:contain; display:block; border-radius:10px; }
.island-art.missing { background:radial-gradient(circle at 50% 45%, #2c6b58, #0b2233 70%); }
.island-nodes { position:absolute; inset:0; }

.isl-node {
  position:absolute; transform:translate(-50%,-50%);
  display:flex; flex-direction:column; align-items:center; gap:.25rem;
  background:none; border:none; cursor:pointer; padding:0;
}
.isl-node .nd-mark {
  display:grid; place-items:center; border-radius:50%;
  font-family:var(--font-head); font-weight:700; color:#04121c;
  background:linear-gradient(180deg,var(--cyan-bright),var(--cyan));
  border:2px solid rgba(255,255,255,.55);
  box-shadow:0 4px 14px rgba(0,0,0,.55);
  transition:transform .15s;
}
.isl-node.nd-big .nd-mark { width:46px; height:46px; font-size:1rem; }
.isl-node.nd-small .nd-mark {
  width:28px; height:28px; font-size:.7rem;
  background:linear-gradient(180deg,var(--ember-soft),var(--ember)); color:#2a1206;
}
.isl-node:hover:not(:disabled) .nd-mark { transform:scale(1.12); }
.isl-node.current .nd-mark { animation:ndPulse 1.8s infinite; }
@keyframes ndPulse {
  0%   { box-shadow:0 0 0 0 rgba(143,228,245,.65), 0 4px 14px rgba(0,0,0,.55); }
  70%  { box-shadow:0 0 0 14px rgba(143,228,245,0), 0 4px 14px rgba(0,0,0,.55); }
  100% { box-shadow:0 0 0 0 rgba(143,228,245,0), 0 4px 14px rgba(0,0,0,.55); }
}
.isl-node.done .nd-mark { background:linear-gradient(180deg,#9ad9b8,#3f9e78); color:#06231a; }
.isl-node.locked .nd-mark { background:rgba(120,140,160,.5); color:rgba(255,255,255,.6); border-color:rgba(255,255,255,.2); }
.isl-node:disabled { cursor:not-allowed; }
.nd-label {
  font-size:.62rem; letter-spacing:.06em; color:#eaf6ff; white-space:nowrap;
  background:rgba(4,10,20,.72); padding:.1rem .45rem; border-radius:999px;
  border:1px solid rgba(143,228,245,.28);
}
.isl-node.nd-small .nd-label { font-size:.55rem; opacity:.8; }
.island-hint { text-align:center; font-size:.78rem; color:var(--muted); margin:1rem auto 3rem; max-width:44ch; }

.mc-back { background:none; border:none; color:var(--muted); cursor:pointer; font-size:.82rem; font-family:var(--font-body); }
.mc-back:hover { color:var(--cyan); }
.mc-intro { font-size:.86rem; color:var(--muted); font-style:italic; margin-bottom:1rem; }
.mc-q { font-size:1.05rem; line-height:1.6; margin-bottom:1.1rem; }
.mc-actions { display:flex; gap:.7rem; flex-wrap:wrap; }
.is-task { border-color:rgba(255,138,61,.3); }

@media (min-width:640px)  { .island-grid { grid-template-columns:1fr 1fr; } }
@media (min-width:1040px) { .island-grid { grid-template-columns:repeat(3, 1fr); } }

/* ---------- narration bar (auto-plays; this only steers it) ---------- */
.narr-bar {
  display: flex; align-items: center; gap: .8rem;
  margin: 0 0 1.2rem; padding: .55rem .8rem;
  background: rgba(4,10,20,.55); border: 1px solid var(--line); border-radius: 999px;
}
.narr-play, .narr-speed {
  background: rgba(86,190,214,.14); border: 1px solid var(--line); color: var(--cyan-bright);
  border-radius: 999px; padding: .6rem 1.15rem; min-height: 40px; cursor: pointer;
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .06em; white-space: nowrap;
}
.narr-play:hover, .narr-speed:hover { background: rgba(86,190,214,.22); }
.narr-speed { min-width: 4rem; text-align: center; }
.narr-track { flex: 1; height: 3px; background: rgba(86,190,214,.16); border-radius: 999px; overflow: hidden; }
.narr-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--cyan-bright)); transition: width .25s linear; }

.island-error {
  padding: 1.4rem; border: 1px solid var(--ember); border-radius: 8px;
  background: rgba(255,138,61,.08); color: var(--ember-soft);
  font-size: .9rem; line-height: 1.7; text-align: center;
}
.island-error code { display: inline-block; margin: .5rem 0; font-size: .8rem; opacity: .85; }
.island-error .v-btn { margin-top: .8rem; }

/* ---------- chapter illustration ---------- */
/* The artwork carries this screen — it is deliberately the largest thing on it.
   It breaks out of the frame's padding so the picture spans the full card rather
   than sitting inside the text column, and it is never height-capped: a cap
   cropped the 3:2 stills on desktop, which made the visuals smaller, not larger. */
.story-figure {
  position: relative; margin: 0 -1.6rem 1.5rem; border-radius: 0; overflow: hidden;
  border: 1px solid rgba(86,190,214,.3); border-left: 0; border-right: 0;
  background: rgba(4,10,20,.6);
  box-shadow: 0 12px 30px rgba(0,0,0,.6), 0 0 20px rgba(86,190,214,.1);
  display: flex; align-items: center; justify-content: center;
}
.story-figure img { display: block; width: 100%; height: auto; }
.story-figure video { display: block; width: 100%; height: auto; will-change: opacity; }
.story-figure { background-repeat: no-repeat; }

/* video sound toggle overlay button — hidden per design instruction */
.video-sound-toggle { display: none !important; }

/* ---------- map top actions ---------- */
.map-top-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* ---------- about modal ---------- */
.about-modal-card {
  max-width: 720px; width: 95%; max-height: 88vh; display: flex; flex-direction: column;
  padding: 1.8rem 1.6rem; text-align: left; position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.about-close-btn {
  position: absolute; top: 1.2rem; right: 1.2rem; background: none; border: 1px solid var(--line);
  color: var(--muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 1rem; transition: all .15s;
}
.about-close-btn:hover { color: #fff; border-color: var(--cyan); background: rgba(86,190,214,.15); }
.about-header { margin-bottom: 1.2rem; padding-right: 2.5rem; }
.about-kicker { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .35em; color: var(--cyan); text-transform: uppercase; margin-bottom: .2rem; }
.about-title { font-family: var(--font-display); font-size: 1.6rem; color: #fff; margin-bottom: .2rem; }
.about-subtitle { font-size: .9rem; color: var(--muted); font-style: italic; }

/* Wrap rather than scroll. Flex items shrink by default, so these buttons were
   being squashed narrower than their own labels while nowrap kept the text on
   one line -- which is what made the last tab look like a crushed box. Letting
   them keep their natural width and fall onto a second line is also more
   discoverable than a horizontal scroll with a hidden scrollbar. */
.about-nav-tabs {
  display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .7rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.about-tab-btn {
  flex: 0 0 auto;                       /* never squeeze below the label */
  background: rgba(86,190,214,.06); border: 1px solid var(--line); color: var(--muted);
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .05em;
  padding: .6rem 1rem; min-height: 40px;
  border-radius: 6px; cursor: pointer; white-space: nowrap; transition: all .16s;
}
.about-tab-btn:hover { color: #fff; background: rgba(86,190,214,.14); border-color: var(--cyan); }
.about-tab-btn.active {
  background: rgba(86,190,214,.2); border-color: var(--cyan); color: var(--cyan-bright);
  box-shadow: 0 0 12px rgba(86,190,214,.25);
}

.about-tab-body {
  flex: 1; overflow-y: auto; padding-right: .5rem; line-height: 1.7; font-size: .95rem; color: var(--text);
}
.about-tab-body h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--cyan); margin: 1.2rem 0 .5rem; }
.about-tab-body h3:first-child { margin-top: 0; }
.about-tab-body h4 { font-family: var(--font-head); font-size: 1rem; color: #fff; margin: 1rem 0 .3rem; }
.about-tab-body p { margin-bottom: .9rem; }
.about-quote-box {
  padding: 1rem 1.2rem; border-left: 3px solid var(--cyan); background: rgba(86,190,214,.07);
  border-radius: 0 6px 6px 0; margin: 1rem 0; font-style: italic; color: #eaf6ff;
}
.about-quote-box.ember { border-left-color: var(--ember); background: rgba(255,138,61,.07); color: var(--ember-soft); }
.about-card-grid { display: grid; gap: .8rem; margin: 1.2rem 0; }
@media (min-width: 540px) { .about-card-grid { grid-template-columns: 1fr 1fr; } }
.about-subcard {
  padding: 1rem; border: 1px solid var(--line); border-radius: 6px; background: rgba(4,10,20,.4);
}
.about-subcard h4 { color: var(--cyan-bright); margin-top: 0; font-size: .95rem; }
.about-subcard.ember h4 { color: var(--ember); }
.about-subcard p { font-size: .88rem; margin-bottom: 0; color: var(--muted); }

.about-ladder { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.ladder-step {
  display: flex; align-items: flex-start; gap: .8rem; padding: .7rem .9rem;
  border: 1px solid var(--line); border-radius: 6px; background: rgba(86,190,214,.04);
}
.ladder-num {
  font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--cyan);
  background: rgba(86,190,214,.15); padding: .2rem .55rem; border-radius: 4px; line-height: 1;
}
.ladder-content h5 { font-family: var(--font-head); font-size: .92rem; color: #fff; margin: 0 0 .2rem; }
.ladder-content p { font-size: .84rem; color: var(--muted); margin: 0; }

.about-footer { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); text-align: right; }

/* ---------- summary sticker card (mid-lesson) ---------- */
.summary-sticker {
  background: var(--panel); border: 1px solid rgba(86,190,214,.4); border-radius: 8px;
  padding: 1.5rem; margin-top: 1.2rem; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: beatFadeIn .4s ease-out;
}
.summary-sticker-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.summary-badge {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .2em; color: var(--cyan);
  text-transform: uppercase; background: rgba(86,190,214,.12); padding: .25rem .65rem; border-radius: 999px;
  border: 1px solid var(--line);
}
.summary-readmore-btn {
  background: none; border: 1px solid var(--line); color: var(--cyan-bright);
  font-size: .76rem; padding: .25rem .65rem; border-radius: 999px; cursor: pointer; transition: all .16s;
}
.summary-readmore-btn:hover { background: rgba(86,190,214,.2); border-color: var(--cyan); }
.summary-title { font-family: var(--font-display); font-size: 1.4rem; color: #fff; margin-bottom: .6rem; }
.summary-text { font-size: 1.02rem; line-height: 1.65; color: var(--text); margin-bottom: 1.2rem; }

.summary-drawer {
  background: rgba(4,10,20,.6); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.1rem; margin-bottom: 1.2rem; font-size: .92rem; line-height: 1.7;
}
.summary-drawer h4 { font-family: var(--font-head); color: var(--cyan); font-size: .9rem; margin-bottom: .4rem; }
.summary-verse { margin-top: .8rem; padding: .6rem .8rem; border-left: 2px solid var(--ember); background: rgba(255,138,61,.06); }
.summary-verse .ar { font-family: var(--font-arabic); font-size: 1.15rem; color: #fff; margin-bottom: .3rem; text-align: right; }
.summary-verse .en { font-size: .85rem; color: var(--ember-soft); font-style: italic; }

.recall-gate {
  border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.2rem;
}
.recall-gate-prompt { font-family: var(--font-head); font-size: .92rem; color: var(--ember-soft); margin-bottom: .6rem; }
.recall-input {
  width: 100%; min-height: 80px; padding: .8rem; border-radius: 6px;
  background: rgba(4,8,15,.7); border: 1px solid var(--line); color: var(--text);
  font-family: var(--font-body); font-size: .95rem; resize: vertical; margin-bottom: .8rem;
}
.recall-input:focus { outline: none; border-color: var(--cyan); }
.recall-feedback { padding: .7rem .9rem; border-radius: 6px; font-size: .88rem; margin-bottom: .8rem; line-height: 1.6; }
.recall-feedback.success { background: rgba(86,190,214,.12); border: 1px solid var(--cyan); color: var(--cyan-bright); }
.recall-feedback.hint { background: rgba(255,138,61,.1); border: 1px solid var(--ember); color: var(--ember-soft); }
/* Shown only when the vessel is unreachable, so a network fault cannot trap the
   student on the summary card. Deliberately quiet — it is an exit, not a reward. */
.recall-skip { margin-top: .8rem; }

/* ---------- end-of-lesson assessment quiz ---------- */
.quiz-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.8rem 1.6rem; margin-top: 1rem; box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.quiz-kicker { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .25em; color: var(--cyan); text-transform: uppercase; }
.quiz-counter { font-size: .8rem; color: var(--muted); }
.quiz-progress-bar { height: 4px; background: rgba(86,190,214,.14); border-radius: 999px; overflow: hidden; margin-bottom: 1.4rem; }
.quiz-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--ember)); transition: width .3s ease; }
.quiz-q-title { font-size: 1.15rem; color: #fff; font-weight: 500; line-height: 1.6; margin-bottom: 1.3rem; }
.quiz-options { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.4rem; }
.quiz-opt-btn {
  text-align: left; padding: .85rem 1.1rem; border-radius: 6px; background: rgba(86,190,214,.05);
  border: 1px solid var(--line); color: var(--text); font-family: var(--font-body); font-size: .95rem;
  cursor: pointer; transition: all .16s;
}
.quiz-opt-btn:hover:not(:disabled) { background: rgba(86,190,214,.15); border-color: var(--cyan); color: #fff; transform: translateX(3px); }
.quiz-opt-btn.correct { background: rgba(46,160,67,.2); border-color: #3fb950; color: #3fb950; }
.quiz-opt-btn.wrong { background: rgba(248,81,73,.2); border-color: #f85149; color: #f85149; }
.quiz-feedback { padding: .8rem 1rem; border-radius: 6px; font-size: .9rem; line-height: 1.6; margin-bottom: 1rem; }
.quiz-feedback.correct { background: rgba(46,160,67,.1); border: 1px solid #3fb950; color: #7ee787; }
.quiz-feedback.wrong { background: rgba(248,81,73,.1); border: 1px solid #f85149; color: #ff7b72; }

.quiz-complete-card { text-align: center; padding: 2rem 1.4rem; }
.quiz-score-circle {
  width: 90px; height: 90px; border-radius: 50%; border: 3px solid var(--cyan);
  display: grid; place-items: center; margin: 0 auto 1.2rem; font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700; color: var(--cyan-bright);
  background: rgba(86,190,214,.1); box-shadow: 0 0 25px rgba(86,190,214,.3);
}
.quiz-reward-flame {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem 1rem; border-radius: 999px;
  background: rgba(255,138,61,.12); border: 1px solid var(--ember); color: var(--ember-soft);
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; margin: 1rem 0 1.5rem;
}

/* ---------- About: the three vessel beats ----------
   Numbered and separated so the sequence reads as a sequence: the Ark, then its
   modern continuation, then the deeper meaning. */
.vessel-beat {
  position: relative; padding: 1.1rem 0 1.1rem 2.6rem; margin: .4rem 0;
  border-top: 1px solid var(--line);
}
.vessel-beat:first-of-type { border-top: 0; }
.vessel-beat-step {
  position: absolute; left: 0; top: 1.15rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  border: 1px solid var(--ember); color: var(--ember);
  font-family: var(--font-mono); font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
}
.vessel-beat-ar {
  font-family: var(--font-arabic); direction: rtl;
  color: var(--cyan); font-size: 1.15rem; margin-bottom: .2rem;
}
.vessel-beat h3 { margin-bottom: .4rem; }
.about-ayah {
  margin: 1rem 0 .2rem; padding: 1rem 1.1rem; text-align: center;
  border-top: 1px solid rgba(255,138,61,.35); border-bottom: 1px solid rgba(255,138,61,.35);
  background: rgba(255,138,61,.05);
}
.about-ayah-ar {
  font-family: var(--font-arabic); direction: rtl;
  font-size: 1.2rem; line-height: 2.1; color: var(--ember-soft); margin-bottom: .5rem;
}
.about-ayah-ref { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.about-analogy {
  margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--muted); line-height: 1.65; font-style: normal;
}

/* ---------- Inner Flame: the six qualities ----------
   One number to chase, six to reflect on. Bars are relative to the student's own
   strongest quality, not to the 1000 cap, so early progress is still visible. */
.fq-wrap { margin-top: 1.4rem; text-align: left; }
.fq-total {
  font-family: var(--font-display); font-size: 2rem; color: var(--ember);
  text-align: center; margin-bottom: 1.1rem; line-height: 1;
}
.fq-total span { display: block; font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: .4rem; }
.fq-row { display: grid; grid-template-columns: 8.6rem 1fr 2.2rem; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.fq-name { font-size: .8rem; color: var(--text); }
.fq-bar { height: 6px; background: rgba(86,190,214,.14); border-radius: 999px; overflow: hidden; }
.fq-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ember), var(--ember-soft)); transition: width .6s ease; }
.fq-num { font-size: .8rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.fq-foot { margin-top: .9rem; font-size: .8rem; color: var(--muted); text-align: center; }
@media (max-width: 420px) { .fq-row { grid-template-columns: 7rem 1fr 2rem; gap: .5rem; } .fq-name { font-size: .74rem; } }

/* The end of the story: the frame holds and the student chooses to leave. */
.v-cinema .story-endnote {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(255,138,61,.35);
  font-size: clamp(.95rem, 2.2vw, 1.15rem); line-height: 1.6;
  color: var(--ember-soft); white-space: pre-line;
  text-shadow: 0 2px 14px rgba(0,0,0,.95);
}
.story-end-cta { animation: rise .5s ease-out; box-shadow: 0 0 34px rgba(255,138,61,.5); }

/* Back and Continue carry the story, so they are not the small variant here. */
.v-cinema .story-nav .v-btn.sm {
  font-size: .92rem; padding: .8rem 1.6rem; min-height: 46px; border-radius: 999px;
}
.v-cinema .story-nav { gap: 1rem; }
@media (max-width: 520px) {
  .story-toggle-btn, .story-skip { font-size: .8rem; padding: .66rem 1.1rem; }
  .v-cinema .story-nav .v-btn.sm { font-size: .88rem; padding: .72rem 1.2rem; }
}

@media (max-width: 560px) {
  .about-modal-card { width: 100%; max-width: none; max-height: 92vh; padding: 1.4rem 1.1rem; border-radius: 8px; }
  .about-tab-btn { font-size: .74rem; padding: .5rem .75rem; }
}

/* ==========================================================================
   Seeker / Character Selection
   ========================================================================== */
.title-seeker-select {
  margin: 1.1rem auto 1.6rem; display: flex; flex-direction: column; align-items: center; gap: .4rem;
}
.seeker-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.seeker-pill {
  display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1.1rem;
  border-radius: 999px; background: rgba(86,190,214,.08); border: 1px solid var(--line);
  cursor: pointer; transition: all .2s ease;
}
.seeker-pill:hover {
  background: rgba(86,190,214,.18); border-color: var(--cyan); transform: translateY(-1px);
}
.seeker-avatar-icon { font-size: 1.1rem; }
.seeker-name-text { font-family: var(--font-head); font-weight: 600; font-size: .88rem; color: #fff; }
.seeker-switch-hint { font-size: .72rem; color: var(--cyan); letter-spacing: .05em; }

.character-grid { display: grid; gap: 1.2rem; margin: 1.4rem 0; }
@media (min-width: 540px) { .character-grid { grid-template-columns: 1fr 1fr; } }
.character-card {
  background: rgba(4,10,20,.6); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.4rem; text-align: center; cursor: pointer; transition: all .25s ease;
  position: relative;
}
.character-card:hover {
  border-color: var(--cyan); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(86,190,214,.2);
}
.character-card.is-active {
  border-color: var(--ember); background: rgba(255,138,61,.08);
  box-shadow: 0 0 25px rgba(255,138,61,.3);
}
.character-emblem {
  position: relative; width: 80px; height: 80px; margin: 0 auto 1rem;
  display: grid; place-items: center;
}
.char-svg { width: 100%; height: 100%; }
.char-badge-icon { position: absolute; font-size: 1.8rem; }
.character-card h3 { font-family: var(--font-display); font-size: 1.15rem; color: #fff; margin-bottom: .2rem; }
.char-role { font-family: var(--font-mono); font-size: .72rem; color: var(--cyan); letter-spacing: .1em; margin-bottom: .6rem; }
.char-desc { font-size: .84rem; color: var(--muted); line-height: 1.5; margin-bottom: 1rem; }
.char-select-btn { width: 100%; }
.character-card.is-active .char-select-btn {
  background: var(--ember); color: #2a1206; border-color: var(--ember); font-weight: 700;
}

/* ==========================================================================
   200-Point Flame HUD & Status
   ========================================================================== */
.flame-hud-btn {
  background: rgba(4,10,20,.7); border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .9rem; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .84rem; font-weight: 600; color: #fff;
  cursor: pointer; transition: all .2s ease; backdrop-filter: blur(8px);
}
.flame-hud-btn:hover { transform: translateY(-1px); border-color: var(--ember); }
.flame-hud-btn .flame-icon { font-size: 1.1rem; transition: transform .3s ease; }
.flame-hud-btn:hover .flame-icon { transform: scale(1.2); }

/* Dynamic Flame Health States */
.flame-hud-btn.flame-radiant {
  border-color: #ffd700; color: #fff;
  box-shadow: 0 0 16px rgba(255,215,0,.45);
  background: radial-gradient(circle at center, rgba(255,215,0,.15), rgba(4,10,20,.8));
}
.flame-hud-btn.flame-steady {
  border-color: var(--ember); color: #fff;
  box-shadow: 0 0 14px rgba(255,138,61,.3);
}
.flame-hud-btn.flame-caution {
  border-color: #ff9800; color: var(--ember-soft);
  box-shadow: 0 0 10px rgba(255,152,0,.25);
}
.flame-hud-btn.flame-locked {
  border-color: #56bed6; color: #8fe4f5;
  background: rgba(86,190,214,.12);
  box-shadow: 0 0 14px rgba(86,190,214,.35);
  animation: lockPulse 2s infinite alternate;
}
@keyframes lockPulse {
  from { box-shadow: 0 0 6px rgba(86,190,214,.2); }
  to { box-shadow: 0 0 20px rgba(86,190,214,.6); }
}

/* ==========================================================================
   Motivating Parents' Gift Ticker (Archipelago Map)
   ========================================================================== */
.parent-gift-ticker {
  background: linear-gradient(90deg, rgba(255,138,61,.12), rgba(86,190,214,.10));
  border: 1px solid rgba(255,138,61,.35); border-radius: 6px;
  padding: .65rem 1.1rem; margin: 0 0 1.2rem; display: flex; align-items: center;
  justify-content: space-between; gap: .8rem; cursor: pointer; transition: all .2s ease;
}
.parent-gift-ticker:hover {
  background: linear-gradient(90deg, rgba(255,138,61,.22), rgba(86,190,214,.18));
  border-color: var(--ember); transform: translateY(-1px);
}
.pgt-icon { font-size: 1.2rem; }
.pgt-text { font-family: var(--font-head); font-size: .88rem; font-weight: 600; color: #fff; flex: 1; }
.pgt-link { font-family: var(--font-mono); font-size: .78rem; color: var(--cyan-bright); letter-spacing: .05em; }

/* ==========================================================================
   Flame Renewal Chamber Modal
   ========================================================================== */
.renewal-modal-card {
  max-width: 620px; border-color: var(--ember);
  box-shadow: 0 0 45px rgba(255,138,61,.3);
  position: relative; overflow: hidden;
}
.renewal-header { text-align: center; margin-bottom: 1.4rem; position: relative; z-index: 2; }
.renewal-lock-icon { font-size: 2.2rem; display: block; margin-bottom: .4rem; }
.renewal-title { font-family: var(--font-display); font-size: 1.6rem; color: #fff; margin: .3rem 0; }
.renewal-subtitle { font-size: .92rem; color: var(--muted); line-height: 1.6; }
.renewal-mission-card {
  background: rgba(4,10,20,.7); border: 1px solid var(--line); border-radius: 8px;
  padding: 1.4rem; margin-bottom: 1.2rem;
}
.renewal-kind { font-family: var(--font-mono); font-size: .72rem; color: var(--cyan); letter-spacing: .15em; text-transform: uppercase; margin-bottom: .6rem; }
.renewal-q-text { font-size: 1.05rem; font-weight: 500; color: #fff; line-height: 1.6; margin-bottom: 1.2rem; }
.renewal-options { display: flex; flex-direction: column; gap: .65rem; }
.renewal-opt-btn {
  text-align: left; padding: .8rem 1rem; border-radius: 6px; background: rgba(86,190,214,.05);
  border: 1px solid var(--line); color: var(--text); font-family: var(--font-body); font-size: .92rem;
  cursor: pointer; transition: all .16s;
}
.renewal-opt-btn:hover { background: rgba(86,190,214,.15); border-color: var(--cyan); color: #fff; transform: translateX(3px); }
.renewal-opt-btn.correct { background: rgba(46,160,67,.2); border-color: #3fb950; color: #7ee787; }
.renewal-success-box {
  text-align: center; padding: 1.8rem; background: rgba(46,160,67,.12);
  border: 1px solid #3fb950; border-radius: 8px; margin-top: 1rem;
}

/* ==========================================================================
   Parent Portal Modal
   ========================================================================== */
.parent-modal-card { max-width: 680px; }
.parent-portal-content { display: flex; flex-direction: column; gap: 1.2rem; margin: 1.2rem 0; }
.parent-card {
  background: rgba(4,10,20,.6); border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem;
}
.parent-card h3 { font-family: var(--font-head); font-size: 1.05rem; color: #fff; margin-bottom: .4rem; }
.pledge-options { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 .6rem; }
.pledge-btn {
  background: rgba(86,190,214,.06); border: 1px solid var(--line); border-radius: 6px;
  padding: .5rem 1rem; font-family: var(--font-mono); font-size: .95rem; font-weight: 600;
  color: var(--text); cursor: pointer; transition: all .16s;
}
.pledge-btn:hover { border-color: var(--cyan); color: #fff; }
.pledge-btn.is-active {
  background: linear-gradient(180deg, var(--ember-soft), var(--ember)); color: #2a1206;
  border-color: var(--ember); box-shadow: 0 0 15px rgba(255,138,61,.4); font-weight: 700;
}
.pledge-summary { font-size: .9rem; color: var(--muted); margin-top: .4rem; }
.progress-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; }
.p-stat {
  background: rgba(86,190,214,.04); border: 1px solid var(--line); border-radius: 6px;
  padding: .8rem; text-align: center;
}
.p-stat-val { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--cyan-bright); }
.p-stat-lbl { font-size: .72rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

/* ==========================================================================
   Official Certificate View
   ========================================================================== */
.cert-modal-card { max-width: 720px; padding: 1.4rem; background: #071322; }
.cert-frame {
  background: #fdfbf7; color: #1b1a16; padding: 2.2rem; border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6); position: relative;
}
.cert-border {
  border: 3px double #a8822a; padding: 2rem 1.6rem; text-align: center;
  position: relative;
}
.cert-kicker { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .35em; color: #a8822a; margin-bottom: .5rem; }
.cert-title { font-family: var(--font-arabic, serif); font-size: 2.1rem; font-weight: 700; color: #1b1a16; letter-spacing: .02em; }
.cert-subtitle { font-family: var(--font-head); font-size: .95rem; color: #4f4838; margin-bottom: .8rem; font-style: italic; }
.cert-divider { color: #a8822a; font-size: .9rem; letter-spacing: .5em; margin-bottom: 1.4rem; }
.cert-body-text { font-size: 1.05rem; line-height: 1.7; color: #2d2a22; max-width: 50ch; margin: 0 auto 1.8rem; }
.cert-meta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid #e8dfcc;
  border-bottom: 1px solid #e8dfcc; padding: 1rem 0; margin-bottom: 1.8rem;
}
.cert-val { font-family: var(--font-arabic, serif); font-size: 1.4rem; font-weight: 700; color: #1d5a56; }
.cert-lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: #8b8471; }
.cert-foot {
  display: flex; justify-content: space-between; align-items: flex-end; font-size: .82rem;
  color: #4f4838; padding-top: .8rem;
}
.cert-stamp {
  border: 2px solid #a8822a; border-radius: 50%; width: 70px; height: 70px;
  display: grid; place-items: center; font-size: .62rem; font-weight: 700;
  color: #a8822a; text-transform: uppercase; transform: rotate(-8deg);
}

/* ==========================================================================
   TOP HUD BAR & ROLE SWITCHER
   ========================================================================== */
.top-hud-bar {
  position: fixed; top: 1rem; left: 1rem; right: 1rem; z-index: 95;
  display: flex; justify-content: space-between; align-items: center; pointer-events: none; gap: .8rem;
}
.top-hud-bar > * { pointer-events: auto; }
.top-hud-right {
  display: flex; align-items: center; gap: .6rem; pointer-events: auto;
}

.role-pill-btn {
  background: rgba(14, 31, 51, 0.85); border: 1px solid var(--line); color: #fff;
  border-radius: 999px; padding: .35rem .95rem; cursor: pointer;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: .45rem; backdrop-filter: blur(8px);
  transition: all .18s;
}
.role-pill-btn:hover { border-color: var(--cyan); background: rgba(86, 190, 214, .15); }
.role-pill-icon { font-size: .95rem; }
.role-pill-switch { color: var(--cyan); font-size: .7rem; margin-left: .2rem; }

.title-role-bar {
  display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.4rem;
}

/* ==========================================================================
   ROLE SELECTION MODAL & CARDS
   ========================================================================== */
.role-modal-card { max-width: 840px; width: 95%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; margin: 1.4rem 0 1rem; }
.role-card {
  background: rgba(4, 10, 20, 0.65); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.3rem; text-align: left; cursor: pointer; transition: all .2s ease;
  display: flex; flex-direction: column; position: relative;
}
.role-card:hover, .role-card.is-active {
  border-color: var(--cyan); transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(86, 190, 214, 0.2);
}
.role-icon-box {
  width: 48px; height: 48px; border-radius: 12px; background: rgba(86, 190, 214, .12);
  border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.6rem;
  margin-bottom: .8rem;
}
.role-badge {
  font-family: var(--font-mono); font-size: .66rem; color: var(--cyan-bright);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .4rem; font-weight: 600;
}
.role-badge.parent-badge { color: var(--ember-soft); }
.role-badge.teacher-badge { color: #ffd700; }
.role-card h3 { font-family: var(--font-head); font-size: 1.1rem; color: #fff; margin-bottom: .4rem; }
.role-desc { font-size: .84rem; color: var(--muted); line-height: 1.5; margin-bottom: .8rem; flex: 1; }
.role-features { list-style: none; font-size: .78rem; color: var(--text); margin-bottom: 1.1rem; line-height: 1.6; }
.role-features li { margin-bottom: .2rem; color: var(--muted); }

/* ==========================================================================
   AI CHECKPOINT CHAT: MICROPHONE, LIVE SPEECH TRANSCRIPTION & HINTS
   ========================================================================== */
.cp-speech-preview {
  background: rgba(86, 190, 214, 0.12); border: 1px solid var(--cyan);
  border-radius: 8px; padding: .65rem .9rem; margin-bottom: .6rem;
  font-size: .88rem; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  animation: rise .2s ease;
}
.speech-live-text { flex: 1; font-style: italic; color: var(--cyan-bright); word-break: break-word; }
.speech-waves { display: inline-flex; align-items: center; gap: 3px; height: 16px; flex-shrink: 0; }
.speech-wave-bar {
  width: 3px; height: 100%; background: var(--cyan-bright); border-radius: 2px;
  animation: waveBar .6s ease-in-out infinite alternate;
}
.speech-wave-bar:nth-child(2) { animation-delay: .15s; }
.speech-wave-bar:nth-child(3) { animation-delay: .3s; }
.speech-wave-bar:nth-child(4) { animation-delay: .45s; }
@keyframes waveBar { from { height: 4px; } to { height: 16px; } }

.cp-toolbar-row {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem;
}
.cp-input-group {
  display: flex; gap: .5rem; align-items: flex-end; width: 100%;
}
/* The field is the bordered shell; the textarea inside it is bare. That lets the
   microphone sit within the input it dictates into, rather than as a third slab
   competing with the box and the Send button. */
.cp-field {
  position: relative; flex: 1; display: flex; min-width: 0;
  background: rgba(4, 8, 15, .6); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .16s, box-shadow .16s;
}
.cp-field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(86, 190, 214, .12); }
.cp-field .cp-text {
  flex: 1; min-width: 0; background: transparent; border: 0; border-radius: 8px;
  padding: .7rem 3.1rem .7rem .9rem;   /* right pad keeps text clear of the mic */
  resize: none;
}
.cp-field .cp-text:focus { outline: none; border: 0; }

.cp-mic-btn {
  position: absolute; right: .4rem; bottom: .4rem;
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  cursor: pointer; transition: color .16s, background .16s, border-color .16s;
}
.cp-mic-btn:hover:not(:disabled) {
  color: var(--cyan-bright); background: rgba(86, 190, 214, .14); border-color: rgba(86, 190, 214, .4);
}
.cp-mic-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cp-mic-btn:disabled { opacity: .3; cursor: not-allowed; }
.cp-mic-btn .cp-icon-stop { display: none; }
.cp-mic-btn.is-listening {
  color: #ff6b6b; background: rgba(255, 82, 82, .16); border-color: rgba(255, 82, 82, .55);
  animation: micPulse 1.6s infinite;
}
.cp-mic-btn.is-listening .cp-icon-mic { display: none; }
.cp-mic-btn.is-listening .cp-icon-stop { display: block; }
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255, 82, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0); }
}

.cp-hint-btn {
  background: rgba(255, 215, 0, 0.1); border: 1px solid rgba(255, 215, 0, 0.35); color: #ffd700;
  border-radius: 6px; padding: .4rem .85rem; font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .18s; display: inline-flex; align-items: center; gap: .35rem;
}
.cp-hint-btn:hover {
  background: rgba(255, 215, 0, 0.22); border-color: #ffd700; transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
}
.cp-hint-drawer {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(86, 190, 214, 0.05));
  border: 1px solid rgba(255, 215, 0, 0.35); border-radius: 8px; padding: .9rem 1.1rem;
  margin-bottom: .8rem; animation: rise .25s ease-out;
}
.hint-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.hint-badge { font-family: var(--font-mono); font-size: .72rem; color: #ffd700; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hint-close-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .9rem; }
.hint-text { font-size: .92rem; line-height: 1.6; color: #fdfbf7; }

.msg-speak-btn {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: .9rem;
  padding: 0 .3rem; opacity: .7; transition: all .15s; margin-left: auto;
}
.msg-speak-btn:hover { opacity: 1; color: var(--cyan-bright); }

/* ==========================================================================
   OFFICIAL STUDENT & PARENT REPORT CARD SYSTEM
   ========================================================================== */
.report-modal-card { max-width: 780px; width: 95%; max-height: 90vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.8rem; }
.report-card-container { display: flex; flex-direction: column; gap: 1.2rem; }
.report-header-box {
  border-bottom: 2px solid var(--line); padding-bottom: 1.2rem; display: flex;
  justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.report-academy-title { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .25em; color: var(--cyan); text-transform: uppercase; margin-bottom: .2rem; }
.report-doc-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #fff; }
.report-grade-badge {
  background: linear-gradient(135deg, rgba(86,190,214,.15), rgba(255,138,61,.12));
  border: 2px solid var(--cyan); border-radius: 10px; padding: .6rem 1.2rem; text-align: center;
  box-shadow: 0 0 20px rgba(86,190,214,.2); min-width: 110px;
}
.report-grade-val { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--cyan-bright); line-height: 1; }
.report-grade-lbl { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); text-transform: uppercase; margin-top: .2rem; }

.report-meta-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem;
  background: rgba(4,10,20,.6); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1.1rem;
}
.report-meta-item strong { display: block; font-family: var(--font-head); font-size: 1.05rem; color: #fff; }
.report-meta-item span { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Progress Gauges ("Progress Thingy") */
.progress-thingy-container {
  background: rgba(4,10,20,.6); border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem;
}
.progress-thingy-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.progress-thingy-title { font-family: var(--font-head); font-size: .95rem; font-weight: 600; color: #fff; }
.progress-thingy-val { font-family: var(--font-mono); font-size: .88rem; font-weight: 700; color: var(--cyan-bright); }

.multi-progress-bar { height: 10px; background: rgba(86,190,214,.12); border-radius: 999px; overflow: hidden; position: relative; margin-bottom: .6rem; }
.multi-progress-fill { height: 100%; border-radius: 999px; transition: width .6s ease; }
.fill-academic { background: linear-gradient(90deg, var(--cyan), var(--cyan-bright)); }
.fill-flame { background: linear-gradient(90deg, var(--ember), var(--ember-soft)); }
.fill-gold { background: linear-gradient(90deg, #e3b341, #ffd700); }

.competencies-table {
  width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .88rem;
}
.competencies-table th { text-align: left; padding: .6rem .8rem; background: rgba(86,190,214,.08); color: var(--cyan-bright); font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.competencies-table td { padding: .7rem .8rem; border-bottom: 1px solid rgba(86,190,214,.08); color: var(--text); }
.competencies-table tr:hover td { background: rgba(86,190,214,.04); }
.badge-mastered { background: rgba(46,160,67,.2); color: #7ee787; padding: .2rem .55rem; border-radius: 4px; font-size: .74rem; font-weight: 600; font-family: var(--font-mono); }
.badge-progress { background: rgba(227,179,65,.18); color: #f2cc60; padding: .2rem .55rem; border-radius: 4px; font-size: .74rem; font-weight: 600; font-family: var(--font-mono); }

.report-remarks-box {
  background: rgba(4,10,20,.6); border: 1px solid rgba(255,138,61,.3); border-radius: 8px; padding: 1.1rem;
}
.report-remarks-box h4 { font-family: var(--font-head); font-size: .95rem; color: var(--ember-soft); margin-bottom: .4rem; }
.report-remarks-text { font-size: .92rem; color: #dfeaf2; font-style: italic; line-height: 1.6; }

.report-modal-actions {
  display: flex; gap: .8rem; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap;
}

/* ==========================================================================
   TEACHER DASHBOARD & GRADEBOOK
   ========================================================================== */
.teacher-modal-card { max-width: 840px; width: 95%; max-height: 90vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.8rem; }
.teacher-dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; flex-wrap: wrap; gap: 1rem; }
.teacher-header-badge { background: rgba(255,215,0,.1); border: 1px solid rgba(255,215,0,.3); border-radius: 8px; padding: .45rem .9rem; text-align: right; }
.teacher-header-badge span { display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; }
.teacher-header-badge strong { font-family: var(--font-mono); font-size: .88rem; color: #ffd700; }

.teacher-nav-tabs { display: flex; gap: .5rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: 1.2rem; }
.teacher-tab-btn {
  background: rgba(86,190,214,.06); border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: .45rem .95rem; font-family: var(--font-mono); font-size: .8rem;
  cursor: pointer; transition: all .16s;
}
.teacher-tab-btn:hover, .teacher-tab-btn.active {
  background: rgba(86,190,214,.18); border-color: var(--cyan); color: #fff;
}

.class-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.class-stat-card { background: rgba(4,10,20,.6); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; text-align: center; }
.class-stat-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--cyan-bright); }
.class-stat-lbl { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.teacher-remark-editor { display: flex; flex-direction: column; gap: .8rem; background: rgba(4,10,20,.6); border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem; }
.teacher-remark-editor textarea {
  background: rgba(4,8,15,.7); border: 1px solid var(--line); border-radius: 6px;
  color: #fff; padding: .8rem; font-family: var(--font-body); font-size: .92rem; min-height: 90px;
}
.teacher-remark-editor textarea:focus { outline: none; border-color: var(--cyan); }
.teacher-remark-editor textarea::placeholder { color: var(--muted); opacity: .8; }

/* Says plainly that the Hub reports one browser's learner, not a class. It has to
   read as a standing limitation, not a dismissible toast. */
.teacher-preview-notice {
  background: rgba(255,138,61,.08); border: 1px solid rgba(255,138,61,.35);
  border-left: 3px solid var(--ember); border-radius: 8px;
  padding: .8rem 1rem; margin-bottom: 1.1rem;
  font-size: .84rem; line-height: 1.55; color: #e8d9cc;
}
.teacher-preview-notice strong { color: var(--ember); }

.report-remarks-text.is-empty { font-style: normal; color: var(--muted); }

/* ==========================================================================
   DAILY FLAME & SIDE QUESTS (MUHASABAH SYSTEM)
   ========================================================================== */
.daily-quests-hud-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255,138,61,.12); border: 1px solid rgba(255,138,61,.45);
  color: #fff; padding: .35rem .75rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: .78rem; cursor: pointer;
  transition: all .2s ease;
}
.daily-quests-hud-btn:hover {
  background: rgba(255,138,61,.25); border-color: var(--ember-bright);
  box-shadow: 0 0 12px rgba(255,138,61,.3); transform: translateY(-1px);
}
.daily-quests-hud-btn strong { color: var(--ember-bright); }
.dq-fire-icon { font-size: .95rem; animation: emberPulse 2.4s infinite ease-in-out; }

.daily-quests-modal-card {
  max-width: 880px; width: 95%; max-height: 90vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.8rem; box-shadow: 0 12px 40px rgba(0,0,0,.7);
}

.dq-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1.2rem; flex-wrap: wrap; gap: 1rem;
}
.dq-stats-badge {
  display: flex; gap: .7rem; align-items: center;
}
.dq-streak-item {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(4,10,20,.7); border: 1px solid var(--line);
  border-radius: 8px; padding: .4rem .75rem;
}
.dq-streak-item .dq-stat-icon { font-size: 1.15rem; }
.dq-streak-item .dq-stat-val {
  font-family: var(--font-mono); font-size: .92rem; font-weight: 700;
  color: var(--cyan-bright); line-height: 1.1;
}
.dq-streak-item .dq-stat-lbl {
  font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}

.dq-progress-container {
  background: rgba(4,10,20,.6); border: 1px solid var(--line);
  border-radius: 10px; padding: .85rem 1.1rem; margin-bottom: 1.2rem;
}
.dq-progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; margin-bottom: .45rem; font-family: var(--font-mono);
}
.dq-progress-title { color: #fff; font-weight: 600; }
.dq-progress-ratio { color: var(--ember-bright); }
.dq-progress-bar {
  width: 100%; height: 8px; background: rgba(255,255,255,.08);
  border-radius: 999px; overflow: hidden; position: relative;
}
.dq-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--cyan), var(--ember));
  border-radius: 999px; transition: width .4s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 10px rgba(255,138,61,.5);
}

.dq-nav-tabs {
  display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .6rem;
  margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); scrollbar-width: thin;
}
.dq-tab-btn {
  white-space: nowrap; background: rgba(86,190,214,.05); border: 1px solid var(--line);
  color: var(--muted); border-radius: 6px; padding: .42rem .85rem;
  font-family: var(--font-mono); font-size: .78rem; cursor: pointer; transition: all .16s;
}
.dq-tab-btn:hover {
  background: rgba(86,190,214,.14); color: #fff; border-color: rgba(86,190,214,.35);
}
.dq-tab-btn.active {
  background: rgba(255,138,61,.18); border-color: var(--ember); color: #fff;
  box-shadow: 0 0 8px rgba(255,138,61,.2);
}

.dq-quest-body {
  display: flex; flex-direction: column; gap: 1rem; min-height: 220px;
}

.dq-card {
  background: rgba(4,10,20,.65); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.15rem 1.3rem; transition: all .2s ease;
  position: relative; overflow: hidden;
}
.dq-card:hover {
  border-color: rgba(86,190,214,.4); background: rgba(4,10,20,.82);
}
.dq-card.is-special {
  border-color: rgba(255,138,61,.5);
  background: linear-gradient(135deg, rgba(255,138,61,.08), rgba(4,10,20,.8));
}
.dq-card.is-completed {
  border-color: rgba(126,231,135,.4);
  background: rgba(126,231,135,.04);
}

.dq-card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .65rem; flex-wrap: wrap; gap: .5rem;
}
.dq-cat-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--cyan); font-family: var(--font-mono);
}
.dq-pts-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 999px;
  background: rgba(255,138,61,.12); color: var(--ember-bright);
  border: 1px solid rgba(255,138,61,.3);
}
.dq-card.is-special .dq-pts-badge {
  background: rgba(255,215,0,.15); color: #ffd700;
  border-color: rgba(255,215,0,.45); box-shadow: 0 0 8px rgba(255,215,0,.25);
}

.dq-q-text {
  font-size: 1.02rem; font-weight: 600; color: #fff; line-height: 1.45;
  margin-bottom: .8rem;
}

/* Dua Box Styling */
.dq-dua-box {
  background: rgba(2,6,12,.75); border: 1px solid rgba(86,190,214,.2);
  border-radius: 8px; padding: 1.1rem; margin-bottom: .9rem;
}
.dq-arabic {
  font-family: 'Amiri', 'Traditional Arabic', 'Scheherazade', serif;
  font-size: 1.35rem; line-height: 1.8; direction: rtl; text-align: right;
  color: #f7e7c4; margin-bottom: .6rem; word-spacing: 2px;
}
.dq-translit {
  font-family: var(--font-mono); font-size: .84rem; color: var(--cyan-bright);
  line-height: 1.4; margin-bottom: .45rem; font-style: italic;
}
.dq-translat {
  font-size: .88rem; color: #d0d7de; line-height: 1.45;
}
.dq-verify-prompt {
  font-size: .88rem; color: var(--ember-bright); margin-top: .6rem;
  font-weight: 600;
}

/* Reflection Box Styling */
.dq-reflect-box {
  display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem;
}
.dq-reflect-area {
  background: rgba(2,6,12,.75); border: 1px solid var(--line);
  border-radius: 6px; color: #fff; padding: .65rem .85rem;
  font-family: var(--font-body); font-size: .9rem; resize: vertical; min-height: 60px;
}
.dq-reflect-area:focus { outline: none; border-color: var(--cyan); }

.dq-actions {
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .8rem;
}
.dq-btn-yes {
  background: rgba(126,231,135,.15); border: 1px solid rgba(126,231,135,.45);
  color: #7ee787; border-radius: 6px; padding: .42rem .95rem;
  font-family: var(--font-mono); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .16s;
}
.dq-btn-yes:hover {
  background: rgba(126,231,135,.28); border-color: #7ee787;
  box-shadow: 0 0 10px rgba(126,231,135,.3); transform: translateY(-1px);
}
.dq-btn-ghost {
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--muted); border-radius: 6px; padding: .42rem .85rem;
  font-family: var(--font-mono); font-size: .8rem; cursor: pointer; transition: all .16s;
}
.dq-btn-ghost:hover {
  background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2);
}
.dq-btn-na {
  background: transparent; border: 1px dashed var(--line);
  color: var(--muted); border-radius: 6px; padding: .42rem .75rem;
  font-family: var(--font-mono); font-size: .76rem; cursor: pointer; transition: all .16s;
}
.dq-btn-na:hover {
  border-color: var(--muted); color: #d0d7de;
}

.dq-completed-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .82rem; color: #7ee787;
  background: rgba(126,231,135,.1); padding: .35rem .75rem; border-radius: 6px;
  border: 1px solid rgba(126,231,135,.3);
}

@media (max-width: 600px) {
  .daily-quests-modal-card { padding: 1.2rem; }
  .dq-header { flex-direction: column; }
  .dq-stats-badge { width: 100%; justify-content: space-between; }
  .dq-actions { width: 100%; }
  .dq-actions button { flex: 1; text-align: center; }
}

@media print {
  body * { visibility: hidden; }
  #v-student-report-modal, #v-student-report-modal * { visibility: visible; }
  #v-student-report-modal { position: absolute; left: 0; top: 0; width: 100%; background: #fff; color: #000; }
  .report-modal-actions, .about-close-btn { display: none !important; }
}


