/* =========================================================================
   ENERGY MUSEUM — Theme & Design System
   Captures the sci-fi museum look from the mockups: deep-navy tech panels,
   cyan/gold accents, beveled metallic frames, glows. Pure CSS, no images
   required for the UI chrome (dioramas used only as content art).
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Backgrounds */
  --bg-0:        #060a16;
  --bg-1:        #0a1224;
  --bg-2:        #0e1a30;
  --panel:       rgba(14, 26, 48, 0.86);
  --panel-solid: #0e1a30;
  --panel-inset: rgba(6, 12, 26, 0.72);

  /* Accents */
  --cyan:        #35c6ff;
  --cyan-soft:   #8fe3ff;
  --blue:        #1f7fe5;
  --blue-deep:   #1450b4;
  --gold:        #ffb020;
  --gold-soft:   #ffd36b;
  --green:       #7ed321;
  --green-deep:  #4fae10;
  --red:         #ff4d4d;
  --red-deep:    #c62828;

  /* Frame metal */
  --steel-1:     #2a3852;
  --steel-2:     #16233c;
  --edge-light:  #40597f;

  /* Text */
  --ink:         #eaf3ff;
  --ink-dim:     #9fb4d4;
  --ink-faint:   #67809f;

  /* Fonts */
  --font-display: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-ui:      "Chakra Petch", "Segoe UI", system-ui, sans-serif;

  /* Station accent (overridden per-station via body[data-station]) */
  --accent:      var(--gold);
  --accent-soft: var(--gold-soft);

  /* Sizing */
  --radius:      16px;
  --radius-sm:   10px;
}

/* Per-station accent theming */
[data-station="solar"]      { --accent:#ffb020; --accent-soft:#ffd36b; }
[data-station="wind"]       { --accent:#31d6c8; --accent-soft:#8ef1e8; }
[data-station="hydro"]      { --accent:#3aa0ff; --accent-soft:#9fd0ff; }
[data-station="fossil"]     { --accent:#e0873a; --accent-soft:#f2c08a; }
[data-station="nuclear"]    { --accent:#b06bff; --accent-soft:#dcb8ff; }
[data-station="geothermal"] { --accent:#ff7a3a; --accent-soft:#ffb488; }
[data-station="biomass"]    { --accent:#7ed321; --accent-soft:#c1f28a; }

/* ---------- Reset ---------- */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, #14284a 0%, transparent 60%),
    radial-gradient(900px 600px at 50% 120%, #10203c 0%, transparent 60%),
    var(--bg-0);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
img { display:block; max-width:100%; }
button { font-family: inherit; cursor: pointer; color: inherit; }

/* =========================================================================
   Stage scaling — a fixed 1280x720 (16:9) design canvas scaled to the viewport
   ========================================================================= */
#stage-wrap {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
}
#stage {
  position: relative;
  width: 1280px; height: 720px;
  transform-origin: center center;
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 50% -5%, #16294c 0%, transparent 62%),
    radial-gradient(800px 520px at 15% 110%, #10203c 0%, transparent 60%),
    radial-gradient(800px 520px at 85% 110%, #121b38 0%, transparent 60%),
    var(--bg-1);
}

/* Screens fill the stage */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  animation: screen-in .45s cubic-bezier(.2,.8,.2,1) both;
}
/* Animate transform only — opacity stays 1 so content is never hidden even if
   the animation is throttled/frozen (headless renderers, reduced-motion, etc.). */
@keyframes screen-in {
  from { transform: translateY(10px) scale(.99); }
  to   { transform: none; }
}
.screen.leaving { animation: screen-out .3s ease both; }
@keyframes screen-out { to { opacity:0; transform: scale(1.02); } }

/* Fullscreen button */
#fullscreen-btn {
  position: fixed; right: 12px; bottom: 12px; z-index: 50;
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(14,26,48,.75); border: 1px solid var(--edge-light);
  color: var(--cyan-soft); font-size: 18px; line-height: 1;
  backdrop-filter: blur(4px);
  transition: transform .12s, background .2s;
}
#fullscreen-btn:hover { transform: translateY(-2px); background: rgba(31,111,229,.4); }

/* Rotate nudge (portrait phones only) */
#rotate-nudge {
  position: fixed; inset: 0; z-index: 100; display: none;
  place-items: center; text-align: center;
  background: var(--bg-0); color: var(--ink);
}
.rotate-inner { max-width: 300px; padding: 24px; }
.rotate-icon { font-size: 54px; margin-bottom: 12px; animation: rock 1.6s ease-in-out infinite; }
@keyframes rock { 0%,100%{transform:rotate(-12deg)} 50%{transform:rotate(12deg)} }
@media (max-width: 640px) and (orientation: portrait) {
  #rotate-nudge { display: grid; }
}

/* =========================================================================
   Shared chrome: panels, frames, headers
   ========================================================================= */

/* Beveled sci-fi panel/frame */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge-light);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(120,160,220,.25),
    inset 0 0 40px rgba(6,12,26,.6),
    0 8px 30px rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
/* Glowing corner accents used on framed modal screens */
.framed {
  position: absolute; inset: 14px;
  border-radius: 18px;
  padding: 18px 22px;
  background:
    linear-gradient(180deg, rgba(16,30,54,.92), rgba(9,17,34,.94));
  border: 2px solid var(--steel-1);
  box-shadow:
    inset 0 0 0 2px rgba(53,198,255,.10),
    inset 0 0 60px rgba(6,12,26,.7),
    0 10px 40px rgba(0,0,0,.55);
  display: flex; flex-direction: column;
}
.framed::before, .framed::after {
  content:""; position:absolute; width:60px; height:60px; pointer-events:none;
  border: 2px solid var(--cyan);
  filter: drop-shadow(0 0 6px rgba(53,198,255,.6));
  opacity: .8;
}
.framed::before { top:-2px; left:-2px; border-right:0; border-bottom:0; border-top-left-radius:18px; }
.framed::after  { bottom:-2px; right:-2px; border-left:0; border-top:0; border-bottom-right-radius:18px; }

/* Screen title chip (the hexagon-y header banner) */
.title-chip {
  align-self: center;
  margin: -6px 0 14px;
  padding: 8px 30px;
  background: linear-gradient(180deg, #12233f, #0c1830);
  border: 2px solid var(--steel-1);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(53,198,255,.15), 0 4px 16px rgba(0,0,0,.5);
  text-align: center;
}
.title-chip h1 {
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: .5px;
  font-size: 30px; line-height: 1;
  color: #eaf3ff; text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0,0,0,.4), 0 0 18px rgba(53,198,255,.35);
}
.title-chip .sub {
  display:block; margin-top:5px; font-size:14px; font-weight:600;
  color: var(--accent); letter-spacing:.4px;
}

/* Small pill/badge label */
.pill {
  display:inline-flex; align-items:center; gap:6px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(53,198,255,.12); border:1px solid rgba(53,198,255,.35);
  color: var(--cyan-soft); font-size:13px; font-weight:600;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  position: relative;
  display: inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 12px 26px; border:none; border-radius: 12px;
  font-family: var(--font-ui); font-weight: 700; font-size: 17px;
  letter-spacing: .3px; color: #fff;
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 0 #0c336f, 0 8px 18px rgba(0,0,0,.45);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #0c336f, 0 3px 8px rgba(0,0,0,.4); }
.btn:focus-visible { outline: 3px solid var(--cyan-soft); outline-offset: 2px; }
/* dark outline so light emoji (e.g. ⚡) stay legible against light button backgrounds
   — text-stroke doesn't affect colour-emoji glyphs, but drop-shadow does */
.btn-ico-after {
  filter: drop-shadow(1px 0 0 rgba(0,0,0,.55)) drop-shadow(-1px 0 0 rgba(0,0,0,.55))
          drop-shadow(0 1px 0 rgba(0,0,0,.55)) drop-shadow(0 -1px 0 rgba(0,0,0,.55));
}

.btn--lg { padding: 16px 46px; font-size: 22px; }
.btn--gold  { background: linear-gradient(180deg, #ffc24d, #f19a12); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 0 #a5620a, 0 8px 18px rgba(0,0,0,.45); color:#3a2600; }
.btn--green { background: linear-gradient(180deg, #8fe04a, #4fae10); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 0 #2f6d08, 0 8px 18px rgba(0,0,0,.45); color:#123; }
.btn--red   { background: linear-gradient(180deg, #ff6a5a, #c62828); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 0 #7c1818, 0 8px 18px rgba(0,0,0,.45); }
.btn--ghost {
  background: rgba(14,26,48,.7); border:1px solid var(--edge-light);
  box-shadow: inset 0 1px 0 rgba(120,160,220,.2); color: var(--ink);
}
.btn--sm { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity:.45; cursor: not-allowed; filter:grayscale(.4); }

/* Icon round button (close, settings) */
.icon-btn {
  width: 42px; height: 42px; border-radius: 10px; font-size: 18px;
  display: grid; place-items:center;
  background: rgba(14,26,48,.8); border:1px solid var(--edge-light); color: var(--cyan-soft);
  transition: transform .1s, background .2s;
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(31,111,229,.4); }

/* =========================================================================
   HUD (top bar: avatar, name, level, XP, energy)
   ========================================================================= */
.hud {
  position: absolute; top: 16px; left: 16px; right: 16px;
  display: flex; align-items: flex-start; gap: 12px; z-index: 20;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-profile {
  display:flex; align-items:center; gap:10px;
  padding: 8px 14px 8px 8px; border-radius: 14px;
  background: rgba(9,17,34,.8); border:1px solid var(--edge-light);
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
/* standalone profile card on the map screen (top-left) */
.map-profile { position:absolute; top:16px; left:16px; z-index:20; }
.hud-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex:none; overflow:hidden;
  display:grid; place-items:center; font-size: 24px;
  background: radial-gradient(circle at 40% 30%, #2a4a86, #12233f);
  border: 2px solid var(--cyan); box-shadow: 0 0 12px rgba(53,198,255,.5);
}
.hud-avatar .char-img { width:100%; height:100%; object-fit:cover; object-position:center top; }
/* character-select card portrait */
.char-card-avatar { width:132px; height:132px; margin:0 auto; display:grid; place-items:center; }
.char-card-avatar .char-img { width:132px; height:132px; object-fit:contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.char-card-avatar .char-emoji { font-size:70px; }
.hud-name { font-family: var(--font-display); font-weight:600; font-size:17px; line-height:1.05; }
.hud-lvl  { font-size: 12px; color: var(--gold-soft); font-weight:600; display:flex; align-items:center; }
.hud-title { margin-left: 7px; padding: 1px 8px; border-radius: 8px; font-size: 10.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.4px; color: var(--gold); background: rgba(255,176,32,.14);
  border:1px solid rgba(255,176,32,.4); }
.hud-xp.maxed > i { background: linear-gradient(90deg, var(--gold), #ffe08a); box-shadow: 0 0 10px var(--gold); }
.hud-xp {
  margin-top: 4px; width: 150px; height: 8px; border-radius: 5px;
  background: rgba(6,12,26,.9); overflow:hidden; border:1px solid rgba(120,160,220,.25);
}
.hud-xp > i { display:block; height:100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); box-shadow: 0 0 8px var(--cyan); }
.hud-xp-label { font-size: 11px; color: var(--ink-dim); margin-top:2px; }
.hud-energy {
  display:flex; align-items:center; gap:7px;
  padding: 7px 14px; border-radius: 12px; align-self:flex-start;
  background: rgba(9,17,34,.8); border:1px solid var(--edge-light); font-weight:700;
}
.hud-energy .bolt { color: var(--gold); filter: drop-shadow(0 0 6px var(--gold)); }
.hud-spacer { flex: 1; }

/* =========================================================================
   Dr. Watt mascot + speech bubble
   ========================================================================= */
.drwatt {
  display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none;
}
.drwatt-portrait {
  width: 150px; height: 176px; border-radius: 16px; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 45% 30%, #24457f 0%, #0d1c36 75%);
  border: 2px solid var(--cyan); box-shadow: 0 0 22px rgba(53,198,255,.4), inset 0 0 20px rgba(0,0,0,.5);
}
.drwatt-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.drwatt-emoji { font-size: 66px; }
.badge-big-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.badge-big-emoji { font-size: 78px; }
.drwatt-name { font-family: var(--font-display); font-weight:600; color: var(--gold); font-size:16px; }
.speech {
  position: relative; max-width: 260px;
  padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(20,36,64,.96), rgba(12,24,46,.96));
  border: 1px solid var(--cyan); color: var(--ink); font-size: 15px; line-height:1.35;
  box-shadow: 0 0 16px rgba(53,198,255,.25);
}
.speech b { color: var(--gold); }

/* =========================================================================
   Progress dots (1 of 5 …)
   ========================================================================= */
.progress-track {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.progress-dots { display:flex; gap:12px; align-items:center; }
.pdot {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(6,12,26,.9); border: 2px solid var(--steel-1);
  transition: all .25s;
}
.pdot.done { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.pdot.active { background: var(--cyan-soft); border-color: var(--cyan-soft); box-shadow: 0 0 14px var(--cyan); transform: scale(1.25); }
.progress-count {
  padding: 5px 18px; border-radius: 10px; font-weight:700; font-size:16px;
  background: rgba(9,17,34,.85); border:1px solid var(--steel-1);
}
.progress-count b { color: var(--cyan); }

/* =========================================================================
   Info / content cards used in exhibits
   ========================================================================= */
.info-col { width: 300px; flex: none; display:flex; flex-direction:column; gap:14px; }
.info-card {
  background: var(--panel-inset); border:1px solid rgba(53,198,255,.22);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.info-card h3 { font-family: var(--font-display); font-weight:600; font-size:19px; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
.info-card p  { color: var(--ink-dim); font-size:15px; line-height:1.4; }
.info-card .divider { height:1px; background: linear-gradient(90deg, transparent, rgba(53,198,255,.4), transparent); margin: 12px 0; }
.eq-label { color: var(--accent); font-weight:700; font-size:14px; letter-spacing:.3px; }
.eq-chain { color: var(--ink); font-size:15px; line-height:1.5; }

/* Feedback banner (Correct / info) */
.feedback {
  display:flex; align-items:center; gap:12px;
  margin-top: 14px; padding: 12px 18px; border-radius: 12px;
  font-size: 16px; font-weight:600;
  border: 1.5px solid var(--green); background: rgba(126,211,33,.12); color: #dff5b8;
  animation: pop .35s ease both;
}
.feedback .tick { color: var(--green); font-size:22px; }
.feedback.info { border-color: var(--cyan); background: rgba(53,198,255,.1); color: var(--cyan-soft); }
.feedback.bad  { border-color: var(--red); background: rgba(255,77,77,.12); color: #ffc9c9; }
@keyframes pop { from{transform:scale(.96); opacity:0} to{transform:none; opacity:1} }

/* =========================================================================
   Widget: drag-to-order (Energy Conversion Builder)
   ========================================================================= */
.dragrow { display:flex; align-items:center; gap:14px; justify-content:center; flex-wrap:wrap; margin: 8px 0 4px; }
.slot {
  position: relative; width: 190px; min-height: 130px; border-radius: 14px;
  border: 2px dashed rgba(53,198,255,.4); background: rgba(6,12,26,.5);
  display:grid; place-items:center; transition: border-color .15s, background .15s;
}
.slot.over { border-color: var(--cyan); background: rgba(53,198,255,.12); }
.slot.filled { border-style: solid; }
.slot .slot-idx { position:absolute; top:6px; left:10px; font-size:12px; color:var(--ink-faint); }
.arrow { font-size: 28px; color: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.tile {
  width: 178px; min-height: 118px; border-radius: 12px; padding: 12px;
  background: linear-gradient(180deg, #16294c, #0e1c36);
  border: 2px solid var(--cyan); color: var(--ink);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  text-align:center; font-weight:600; font-size:15px;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  touch-action: none; cursor: grab;
}
.tile .tile-ico { font-size: 34px; }
.tile.dragging { opacity:.6; cursor: grabbing; }
.tile.ghost { position: fixed; z-index: 999; pointer-events:none; margin:0; box-shadow: 0 12px 30px rgba(0,0,0,.6); }
.tilebank { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top: 12px; }
.tilebank-label { text-align:center; color: var(--ink-faint); font-size:13px; margin-bottom:6px; }

/* =========================================================================
   Widget: match pairs — two columns + connector lines drawn on correct match
   ========================================================================= */
.match2 { position: relative; width: 100%; max-width: 760px; margin: 0 auto; }
.match2-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.m2-line { stroke: var(--green); stroke-width: 4; stroke-linecap: round;
  filter: drop-shadow(0 0 5px var(--green)); animation: m2draw .35s ease both; }
@keyframes m2draw { from { opacity:0; } to { opacity:1; } }
.match2-cols { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 90px; }
.m2-col { display: flex; flex-direction: column; gap: 16px; }
.m2-col.left { flex: none; }
.m2-col.right { flex: 1; }
.m2-source {
  display: grid; place-items: center; width: 88px; height: 88px; border-radius: 14px;
  border: 2px solid var(--steel-1); background: rgba(6,12,26,.6); cursor: pointer;
  box-shadow: inset 0 0 18px rgba(0,0,0,.5); transition: border-color .15s, box-shadow .15s, transform .1s;
}
.m2-source:hover { border-color: var(--cyan); }
.m2-ico { font-size: 46px; line-height: 1; }
.m2-target {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 16px; min-height: 88px; border-radius: 14px; font-weight: 600; font-size: 16px;
  border: 2px solid var(--steel-1); background: rgba(9,17,34,.8); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.m2-target:hover { border-color: var(--cyan); }
.m2-source.selected, .m2-target.selected { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,176,32,.55); }
.m2-source.linked, .m2-target.linked { border-color: var(--green); background: rgba(126,211,33,.12); cursor: default; }
.m2-source.wrong, .m2-target.wrong { border-color: var(--red); animation: shake .35s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.m2-tick { color: var(--green); font-size: 20px; opacity: 0; transition: opacity .2s; }
.m2-target.linked .m2-tick { opacity: 1; }

/* =========================================================================
   Widget: fission (nuclear) — plant diagram + chain reaction
   ========================================================================= */
.fis-plant { display: flex; align-items: stretch; justify-content: center; gap: 8px; flex-wrap: nowrap; }
.fis-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px; border-radius: 12px; border: 1px solid var(--edge-light);
  background: rgba(9,17,34,.6); min-width: 96px;
}
.fis-box.reactor { min-width: 172px; }
.fis-cap { font-size: 12px; color: var(--ink-dim); font-weight: 600; text-align: center; }
.fis-stage { position: relative; flex: 1; display: grid; place-items: center; min-height: 118px; width: 100%; }
.fis-arrow { align-self: center; font-size: 24px; color: var(--accent); }
.fis-reactor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; place-items: center; padding: 6px; }
.fis-atom { position: relative; font-size: 30px; transition: transform .2s, opacity .2s; }
.fis-atom.fis-done { opacity: .45; transform: scale(.7); }
.fis-burst { position: absolute; inset: -6px; display: grid; place-items: center; color: var(--gold);
  font-size: 34px; filter: drop-shadow(0 0 8px var(--gold)); animation: burst .5s ease both; }
@keyframes burst { 0%{transform:scale(.3);opacity:0} 40%{opacity:1} 100%{transform:scale(1.8);opacity:0} }
.fis-neutrons { position: absolute; inset: 0; pointer-events: none; }
.fis-neutron { position: absolute; top: 50%; left: 4%; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, var(--cyan)); box-shadow: 0 0 10px var(--cyan);
  animation: neutron-fly .6s ease-in both; }
@keyframes neutron-fly { from { left: -6%; } to { left: 80%; } }
.fis-water { position: relative; width: 46px; height: 84px; border-radius: 6px; overflow: hidden;
  border: 2px solid #9fb4d4; background: rgba(6,12,26,.6); }
.fis-water > i { position: absolute; bottom: 0; left: 0; width: 100%; height: 10%;
  background: linear-gradient(180deg, #3a86ff, #1c4a86); transition: height .4s, background .4s; }
.fis-box.hot .fis-water > i { background: linear-gradient(180deg, #ff7a3a, #b5202a); }
.fis-steam { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 20px; opacity: 0; transition: opacity .3s; }
.fis-box.boiling .fis-steam { opacity: 1; animation: rise-steam 1.2s ease-in-out infinite; }
@keyframes rise-steam { 0%,100%{transform:translate(-50%,0);opacity:.5} 50%{transform:translate(-50%,-8px);opacity:1} }
.fis-turbine { font-size: 46px; }
.fis-turbine.spinning { animation: spin .6s linear infinite; }
.fis-bulb { font-size: 46px; filter: grayscale(1) brightness(.6); transition: filter .3s; }
.fis-bulb.lit { filter: none; animation: bulb-glow 1.4s ease-in-out infinite; }
@keyframes bulb-glow { 0%,100%{filter:drop-shadow(0 0 4px var(--gold))} 50%{filter:drop-shadow(0 0 16px var(--gold))} }
.fis-heat { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 14px; color: var(--ink-dim); font-weight: 600; }
.fis-heatbar { width: 260px; height: 12px; border-radius: 7px; background: rgba(6,12,26,.9); border: 1px solid var(--edge-light); overflow: hidden; }
.fis-heatbar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3a86ff, #ff7a3a, #b5202a); transition: width .4s; }

/* =========================================================================
   Widget: generator (bonus quest) — coil between magnets, crank to light bulb
   ========================================================================= */
/* --- real-time three.js scene (textbook AC-generator model) --- */
.gen3d-holder {
  width: 400px; height: 260px; border-radius: 16px; overflow: hidden;
  cursor: grab; touch-action: none;
  background: radial-gradient(75% 95% at 50% 42%, rgba(53,198,255,.08), rgba(6,12,26,.35) 75%);
  box-shadow: 0 0 0 1px var(--edge-light), 0 8px 22px rgba(0,0,0,.45);
  transition: box-shadow .2s;
}
.gen3d-holder canvas { display:block; }
.gen3d-holder:active { cursor: grabbing; }
.gen3d-holder:focus-visible { outline: 3px solid var(--cyan-soft); outline-offset: 3px; }
.gen3d-holder.live { box-shadow: 0 0 0 1px rgba(255,214,90,.55), 0 0 26px rgba(255,214,90,.4), 0 8px 22px rgba(0,0,0,.45); }
.gen-turns { text-align:center; font-family: var(--font-display); font-weight:700; font-size:18px; color: var(--gold-soft); }

/* =========================================================================
   Bonus quest — map node, intro art, finale
   ========================================================================= */
.bonus-node {
  position:absolute; left:50%; top:84%; transform:translate(-50%,-50%); z-index:6;
  width:96px; height:110px; padding:8px 6px 6px; border-radius:16px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:2px;
  background: rgba(9,17,34,.75); border:2px solid rgba(255,176,32,.65);
  box-shadow: 0 0 20px rgba(255,176,32,.35), 0 7px 20px rgba(0,0,0,.5);
  transition: transform .12s, box-shadow .15s;
}
.bonus-node:hover, .bonus-node:focus-visible {
  outline:none; transform:translate(-50%,-50%) scale(1.08);
  box-shadow: 0 0 32px rgba(255,176,32,.7), 0 7px 20px rgba(0,0,0,.5); z-index:7;
}
.bonus-node.locked { border-color: var(--steel-1); box-shadow: 0 7px 20px rgba(0,0,0,.5); }
.bonus-node.locked .bn-ico { filter: grayscale(1) brightness(.55); }
.bonus-node.done { border-color: rgba(126,211,33,.7); }
.bn-ico { width:58px; height:58px; -webkit-user-drag:none; }
.bn-name { font-family: var(--font-display); font-weight:700; font-size:13px; letter-spacing:.6px; color: var(--gold); }
.bonus-node.done .bn-name { color: var(--green); }
.bn-lock { position:absolute; top:4px; right:6px; font-size:15px; }
.bonus-big { width:150px; height:150px; margin:6px auto; filter: drop-shadow(0 0 24px rgba(255,176,32,.55)); animation: badge-spin .8s ease both; }
.legend-line { text-align:center; font-size:19px; margin:4px 0 10px; }
.legend-line b { color: var(--gold); font-family: var(--font-display); letter-spacing:.5px; }
.legend-msg { text-align:center; font-size:15.5px; color: var(--ink-dim); max-width:42ch; margin:4px auto 0; line-height:1.45; }
.legend-msg b { color: var(--gold-soft); }
/* finale: full-width title on top, then text-left / celebration-right */
.complete-frame { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; }
.complete-cols { display:flex; align-items:center; gap:34px; width:100%; max-width:1160px; }
.complete-left { flex:1 1 54%; display:flex; flex-direction:column; align-items:center; gap:10px; min-width:0; }
.complete-right { flex:1 1 46%; display:flex; align-items:center; justify-content:center; min-width:0; }
.celebrate-img { width:100%; max-width:540px; height:auto; filter: drop-shadow(0 10px 26px rgba(0,0,0,.5)); animation: badge-spin .55s ease both; }
@media (max-aspect-ratio: 5/4) { /* very narrow — stack */
  .complete-cols { flex-direction:column; gap:16px; }
  .celebrate-img { max-width:420px; }
}

/* =========================================================================
   Dr. Watt tip button + tip box
   ========================================================================= */
.tip-btn { margin-top: 10px; }
.tip-box {
  margin-top: 10px; max-width: 240px; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.35;
  background: rgba(53,198,255,.1); border: 1px solid var(--cyan); color: var(--cyan-soft);
  animation: pop .3s ease both;
}
.tip-box b { color: var(--gold); }

/* =========================================================================
   Widget: rotate-to-target (Face the Sun)
   ========================================================================= */
.rotate-stage {
  position: relative; flex:1; min-height: 300px; border-radius: 14px;
  background: radial-gradient(600px 300px at 50% 20%, rgba(53,198,255,.08), transparent 70%);
  display:grid; place-items:center; overflow:hidden;
}
.sun {
  position:absolute; top: 42px; left: 90px; font-size: 62px;
  filter: drop-shadow(0 0 20px var(--gold));
  animation: sun-pulse 2.4s ease-in-out infinite;
}
@keyframes sun-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
.rays { position:absolute; top:70px; left:120px; pointer-events:none; opacity:.85; }
.panel-rig { position: relative; width: 220px; height: 220px; display:grid; place-items:center; }
.panel-pivot {
  width: 150px; height: 96px; border-radius: 8px;
  background: repeating-linear-gradient(90deg, #1b2f6b 0 14px, #22409a 14px 16px),
              repeating-linear-gradient(0deg, transparent 0 20px, rgba(0,0,0,.35) 20px 22px);
  border: 3px solid #9fb4d4; box-shadow: 0 6px 16px rgba(0,0,0,.5);
  transform-origin: center bottom; transition: filter .2s; touch-action: none; cursor: grab;
}
.panel-pivot.aligned { box-shadow: 0 0 26px var(--gold), 0 6px 16px rgba(0,0,0,.5); }
.panel-base { position:absolute; bottom: 4px; width: 90px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53,198,255,.5), transparent 70%); }
.rotate-hint { position:absolute; bottom: 14px; left:50%; transform:translateX(-50%); color: var(--ink-dim); font-size:14px; }
.capture-meter {
  position:absolute; top: 16px; right: 16px; text-align:center;
  padding: 10px 14px; border-radius: 12px; background: rgba(9,17,34,.85); border:1px solid var(--steel-1);
}
.capture-meter .big { font-family: var(--font-display); font-size: 30px; font-weight:700; color: var(--gold); }
.capture-meter .lbl { font-size:12px; color: var(--ink-dim); }

/* =========================================================================
   Generated icon sprites inside the interactive widgets
   ========================================================================= */
.spr { display:block; object-fit:contain; -webkit-user-drag:none; user-select:none; pointer-events:none; }
.tile-ico .spr { width: 48px; height: 48px; }
.m2-ico .spr { width: 60px; height: 60px; }
.react-ico { filter: drop-shadow(0 0 16px var(--accent)); }
.react-ico .spr { width: 120px; height: 120px; }
.fis-atom .spr { width: 40px; height: 40px; }
.fis-turbine .spr { width: 58px; height: 58px; }
.fis-bulb .spr { width: 54px; height: 54px; }
.sun .spr { width: 76px; height: 76px; }

/* =========================================================================
   Widget: slider (Heat the Boiler / Wind Turns the Blades / Release the Water)
   ========================================================================= */
.react-wrap { height: 150px; display:grid; place-items:center; transition: transform .1s; }
.react-ico { font-size: 96px; line-height:1; filter: drop-shadow(0 0 18px var(--accent)); transition: opacity .1s; }
.sld-wrap { width: 540px; max-width: 84%; margin: 0 auto; }
.sld-track {
  position: relative; height: 28px; border-radius: 15px; cursor: pointer;
  background: linear-gradient(90deg, #1c4a86 0%, #2a5aa0 40%, #b5602a 75%, #b5202a 100%);
  border: 1px solid var(--edge-light);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.55), 0 0 14px rgba(53,198,255,.18);
}
.sld-track > i {
  position:absolute; left:0; top:0; height:100%; width:0; border-radius:15px; pointer-events:none;
  background: linear-gradient(90deg, rgba(143,227,255,.5), rgba(255,150,60,.55));
  box-shadow: 0 0 12px rgba(255,150,60,.4);
}
.sld-handle {
  position:absolute; top:50%; width:34px; height:34px; border-radius:50%;
  background: radial-gradient(circle at 40% 35%, #eaf3ff, #9fb4d4);
  border: 3px solid var(--cyan); transform: translate(-50%,-50%);
  box-shadow: 0 0 14px var(--cyan), 0 2px 6px rgba(0,0,0,.5); cursor: grab;
}
.sld-handle:active { cursor: grabbing; }
.sld-handle:focus-visible { outline: 3px solid var(--cyan-soft); outline-offset: 3px; }
.sld-labels { display:flex; justify-content:space-between; margin-top:10px; font-weight:700; font-size:15px; color: var(--ink-dim); }
.sld-hint { color: var(--ink-dim); font-size:14px; text-align:center; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* =========================================================================
   Rich slider scenes: dam (hydro), furnace (biomass/fossil), geo (geothermal)
   ========================================================================= */
.scene {
  position: relative; width: 540px; max-width: 88%; height: 200px; margin: 0 auto;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--edge-light);
  background: radial-gradient(120% 100% at 50% 0%, rgba(53,198,255,.08), transparent 60%),
              linear-gradient(180deg, rgba(10,20,40,.55), rgba(6,12,26,.78));
}
/* --- dam --- */
.scene-dam { display: flex; align-items: flex-end; }
.dm-res { width: 34%; height: 84%; margin-top: auto; background: linear-gradient(180deg, #4a94ff, #1c4a86); box-shadow: inset -6px 0 10px rgba(0,0,0,.25); }
.dm-wall { position: relative; width: 46px; height: 100%; z-index: 3; overflow: hidden; background: linear-gradient(90deg, #59657a, #39424f); border-right: 2px solid #2a323d; }
.dm-slot { position: absolute; left: -6px; bottom: 18%; width: 58px; height: 38px; background: #0a1220; overflow: hidden; }
.dm-jet { position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, #8fd3ff, #3a86ff); }
.dm-gate { position: absolute; left: 8px; bottom: 18%; width: 30px; height: 42px; z-index: 2; border-radius: 2px; background: linear-gradient(180deg, #d3ddea, #8a97a8); border: 1px solid #5b6676; transition: transform .18s; }
.dm-down { position: relative; flex: 1; height: 100%; }
.dm-gush {
  position: absolute; left: 0; bottom: 16%; width: 100%; height: 30px; z-index: 1;
  transform-origin: left center; opacity: 0; filter: blur(.6px); border-radius: 4px;
  background: repeating-linear-gradient(100deg, rgba(158,220,255,.95) 0 8px, rgba(74,148,255,.85) 8px 18px);
  background-size: 26px 100%; animation: gush .45s linear infinite;
  transition: opacity .2s, transform .2s;
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 78%, transparent 100%);
}
.dm-spray {
  position: absolute; right: 9%; bottom: 13%; width: 36px; height: 42px; z-index: 1; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 25% 60%, rgba(210,240,255,.95), rgba(210,240,255,0) 66%);
  filter: blur(1px); animation: gush-spray .5s ease-in-out infinite alternate; transition: opacity .2s;
}
@keyframes gush { to { background-position: 26px 0; } }
@keyframes gush-spray { from { transform: scale(.75); } to { transform: scale(1.2); } }
.dm-turbine { position: absolute; right: 12%; bottom: 14px; width: 58px; height: 58px; z-index: 2; }
.dm-turbine.spin { animation: spin 1s linear infinite; }
/* --- furnace --- */
.scene-furnace { display: grid; place-items: center; }
.fn-box { position: relative; width: 200px; height: 182px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.fn-smoke { position: absolute; top: 2px; width: 46px; height: 46px; opacity: 0; transition: opacity .2s, transform .2s; }
.fn-fuel { width: 80px; height: 80px; z-index: 2; margin-bottom: -8px; transition: filter .2s; }
.fn-fire { width: 132px; height: 46px; z-index: 1; transform-origin: bottom center; transition: transform .18s, opacity .2s; border-radius: 48% 48% 42% 42%; filter: blur(2px); background: radial-gradient(ellipse at 50% 100%, #ffe07a 0%, #ff9a2a 42%, #ff5a1a 68%, #b5202a 88%, transparent 100%); }
/* --- geothermal --- */
.scene-geo { display: grid; place-items: center; }
.geo-earth { position: relative; width: 210px; height: 210px; border-radius: 50%; margin-top: 42px; overflow: hidden;
  background: radial-gradient(circle at 50% 64%, #ff6a2a 0%, #b5401a 15%, #6b3a1a 33%, #2e5a2e 60%, #1e4a86 100%);
  box-shadow: 0 0 30px rgba(255,120,40,.22), inset 0 0 30px rgba(0,0,0,.4); }
.geo-core { position: absolute; left: 50%; top: 64%; width: 62px; height: 62px; transform: translate(-50%,-50%); border-radius: 50%; filter: blur(2px); background: radial-gradient(circle, #ffe07a, #ff5a1a 60%, transparent 76%); }
.geo-down, .geo-up { position: absolute; top: 6px; bottom: 44px; width: 14px; overflow: hidden; opacity: 0; }
.geo-down { left: calc(50% - 48px); } .geo-up { right: calc(50% - 48px); }
.geo-drop { position: absolute; left: 2px; top: 0; width: 9px; height: 12px; border-radius: 50%; background: linear-gradient(180deg, #8fd3ff, #3a86ff); animation: geo-fall 1.2s linear infinite; }
.geo-puff { position: absolute; left: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,255,255,0) 70%); animation: geo-rise 1.4s linear infinite; }
@keyframes geo-fall { from { transform: translateY(-14px); } to { transform: translateY(155px); } }
@keyframes geo-rise { from { transform: translateY(0) scale(.6); opacity: .9; } to { transform: translateY(-150px) scale(1.3); opacity: 0; } }

/* =========================================================================
   Quiz (Assessment) + Try Again
   ========================================================================= */
.quiz-grid { display:flex; gap: 16px; flex:1; }
.quiz-q { flex:1; display:flex; flex-direction:column; gap:10px; }
.quiz-q h4 { font-size:16px; font-weight:600; line-height:1.3; display:flex; gap:8px; }
.quiz-q .qnum { color: var(--cyan); font-weight:700; }
.opt {
  display:flex; align-items:center; gap:10px;
  padding: 11px 14px; border-radius: 10px; font-size:15px;
  border:1.5px solid var(--steel-1); background: rgba(9,17,34,.7);
  cursor:pointer; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--cyan); }
.opt .box { width:20px; height:20px; border-radius:50%; border:2px solid var(--ink-faint); flex:none; display:grid; place-items:center; }
.opt.multi .box { border-radius:6px; }
.opt.selected { border-color: var(--cyan); background: rgba(53,198,255,.1); }
.opt.selected .box { border-color: var(--cyan); background: var(--cyan); }
.opt.correct { border-color: var(--green); background: rgba(126,211,33,.14); color:#dff5b8; }
.opt.correct .box { border-color: var(--green); background: var(--green); }
.opt.wrong { border-color: var(--red); background: rgba(255,77,77,.14); color:#ffc9c9; }
.opt.wrong .box { border-color: var(--red); background: var(--red); }
.opt .box::after { content:"✓"; font-size:12px; color:#08131f; opacity:0; font-weight:900; }
.opt.selected .box::after, .opt.correct .box::after { opacity:1; }
.opt.wrong .box::after { content:"✕"; opacity:1; color:#fff; }

/* =========================================================================
   Badge popup + toast
   ========================================================================= */
.overlay {
  position:absolute; inset:0; z-index:40; display:grid; place-items:center;
  background: rgba(3,7,16,.72); backdrop-filter: blur(3px);
  animation: fade .25s both;
}
@keyframes fade { from{opacity:0} to{opacity:1} }
.badge-pop {
  width: 640px; max-width: 92%; text-align:center; padding: 30px;
  animation: pop .4s cubic-bezier(.2,1.2,.3,1) both;
}
.badge-pop h2 { font-family: var(--font-display); font-size: 34px; color: #fff; text-shadow: 0 0 18px var(--cyan); }
.badge-big {
  width: 150px; height: 150px; margin: 18px auto; border-radius: 50%; overflow: hidden;
  display:grid; place-items:center; font-size: 78px;
  background: radial-gradient(circle at 45% 35%, #2a4a86, #0d1c36);
  border: 4px solid var(--gold); box-shadow: 0 0 40px var(--gold), inset 0 0 24px rgba(0,0,0,.5);
  animation: badge-spin 1s ease both;
}
@keyframes badge-spin { from{transform:rotateY(180deg) scale(.5); opacity:0} to{transform:none; opacity:1} }
.badge-count { font-size:18px; color: var(--ink-dim); margin-bottom:6px; }
.badge-count b { color: var(--gold); font-family: var(--font-display); font-size:22px; }

.toast {
  position:absolute; bottom: 20px; left:50%; transform: translateX(-50%);
  padding: 10px 20px; border-radius: 12px; z-index:60;
  background: rgba(9,17,34,.95); border:1px solid var(--cyan); color: var(--cyan-soft);
  font-weight:600; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: toast-in .3s ease both;
}
@keyframes toast-in { from{opacity:0; transform:translate(-50%,10px)} to{opacity:1; transform:translate(-50%,0)} }

/* =========================================================================
   Badges gallery + Mission Complete
   ========================================================================= */
.badge-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 14px auto 4px; max-width: 940px;
}
.badge-card {
  padding: 14px 10px; border-radius: 14px; text-align: center;
  background: var(--panel-inset); border: 2px solid var(--steel-1);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .12s;
}
.badge-card.got { border-color: var(--accent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 0 22px rgba(0,0,0,.4); }
.badge-card.got:hover { transform: translateY(-3px); }
.badge-card-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing:.3px; text-transform: uppercase; }
.badge-card.got .badge-card-name { color: var(--accent-soft); }
.badge-card.locked .badge-card-name { color: var(--ink-faint); }
.badge-medal {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 45% 35%, #223c66, #0b1730);
  border: 3px solid var(--steel-1); overflow: hidden;
}
.badge-card.got .badge-medal { border-color: var(--accent); box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 0 16px rgba(0,0,0,.5); }
.badge-img { width: 100%; height: 100%; object-fit: cover; }
.badge-emoji { font-size: 48px; line-height: 1; }
.badge-card.locked .badge-medal { filter: grayscale(1) brightness(.6); }
.badge-status { font-size: 13px; font-weight: 600; }
.badge-card.got .badge-status { color: var(--accent-soft); }
.badge-card.locked .badge-status { color: var(--ink-faint); }

.complete-badges { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.cbadge {
  width: 62px; height: 62px; border-radius: 12px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 45% 35%, #223c66, #0b1730);
  border: 2px solid var(--accent, var(--gold));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent, var(--gold)) 40%, transparent);
  animation: badge-spin .8s ease both;
}
.complete-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px; border-radius: 12px; font-size: 18px;
  background: rgba(255,176,32,.12); border: 1.5px solid var(--gold); color: var(--gold-soft);
}
.complete-banner b { color: var(--gold); font-family: var(--font-display); }

/* =========================================================================
   Menu + Map + Overview specific
   ========================================================================= */
.menu { align-items:center; justify-content:center; text-align:center; overflow:hidden; }
.menu-bg {
  position:absolute; inset:0; background-size:cover; background-position:center;
  filter: blur(3px) brightness(.55) saturate(1.1); transform: scale(1.08);
}
.overview-hero {
  position:absolute; inset:0; background-size:cover; background-position:72% center;
  filter: blur(1px) brightness(.78) saturate(1.06); transform: scale(1.04);
}
.menu-scrim { position:absolute; inset:0;
  background: radial-gradient(700px 400px at 50% 40%, rgba(53,198,255,.14), transparent 70%),
              linear-gradient(180deg, rgba(6,10,22,.55), rgba(6,10,22,.85)); }
.menu-inner { position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; gap:18px; }
.game-title { font-family: var(--font-display); font-weight:700; line-height:.92; text-transform:uppercase; }
.game-title .l1 { font-size: 74px; color:#eef5ff; text-shadow: 0 3px 0 #0b1a36, 0 0 26px rgba(53,198,255,.5); letter-spacing:1px; }
.game-title .l2 { font-size: 74px; color: var(--gold); text-shadow: 0 3px 0 #6b3d05, 0 0 26px rgba(255,176,32,.5); letter-spacing:1px; }
.game-tag { font-size:19px; color: var(--cyan-soft); font-weight:600; margin-top:2px; }
.menu-btns { display:flex; gap:14px; margin-top:8px; }

/* Map — composed level-select: diorama nodes in a ring around a glowing hub */
.map2 { overflow: hidden; }
.map-scrim { position:absolute; inset:0; background:
  radial-gradient(620px 360px at 50% 50%, rgba(53,198,255,.10), transparent 70%),
  linear-gradient(180deg, rgba(6,10,22,.55), rgba(6,10,22,.78)); }
.station-node {
  position:absolute; transform: translate(-50%,-50%); z-index:5; padding:0; overflow:hidden;
  width: 134px; height: 128px; border-radius: 16px; cursor:pointer;
  border: 2px solid var(--steel-1); background: rgba(9,17,34,.7);
  box-shadow: 0 7px 20px rgba(0,0,0,.55); transition: transform .12s, box-shadow .15s, border-color .15s;
}
.station-node:hover, .station-node:focus-visible {
  outline:none; transform: translate(-50%,-50%) scale(1.08);
  border-color: var(--cyan); box-shadow: 0 0 28px rgba(53,198,255,.6); z-index:6;
}
.station-node.done { border-color: rgba(126,211,33,.6); }
.sn-art { position:absolute; inset:0; background-size:cover; background-position:center; }
.sn-no {
  position:absolute; top:6px; left:7px; z-index:2; width:22px; height:22px; border-radius:50%;
  display:grid; place-items:center; font-family:var(--font-display); font-weight:700; font-size:14px; color:#fff;
  background:rgba(6,12,26,.85); border:1px solid var(--cyan);
}
.sn-name {
  position:absolute; left:0; right:0; bottom:0; z-index:2; padding:6px 6px 5px; text-align:center;
  font-weight:700; font-size:12px; letter-spacing:.3px; text-transform:uppercase; color:#eaf3ff;
  background: linear-gradient(180deg, transparent, rgba(6,12,26,.94));
}
.sn-check {
  position:absolute; top:6px; right:7px; z-index:2; width:22px; height:22px; border-radius:50%;
  display:grid; place-items:center; font-size:13px; font-weight:800; color:#04210a;
  background:var(--green); box-shadow:0 0 10px var(--green);
}
.map-core { position:absolute; left:50%; top:53%; transform:translate(-50%,-50%); z-index:4; text-align:center; pointer-events:none; }
.map-core-orb {
  width:92px; height:92px; margin:0 auto 10px; border-radius:50%; display:grid; place-items:center; font-size:42px;
  background: radial-gradient(circle at 45% 35%, rgba(53,198,255,.5), rgba(11,23,48,.92));
  border:2px solid var(--cyan); animation: corepulse 2.4s ease-in-out infinite;
}
@keyframes corepulse {
  0%,100% { box-shadow: 0 0 28px rgba(53,198,255,.5), inset 0 0 20px rgba(53,198,255,.35); }
  50%     { box-shadow: 0 0 54px rgba(53,198,255,.85), inset 0 0 28px rgba(53,198,255,.5); }
}
.map-core-title { font-family:var(--font-display); font-weight:700; font-size:26px; color:#eef5ff; letter-spacing:1px; text-shadow:0 0 20px rgba(53,198,255,.5); }
.map-core-sub { font-size:13px; color:var(--cyan-soft); font-weight:600; margin-top:3px; }
.map-badges-btn2 { position:absolute; left:16px; bottom:16px; z-index:20; }

/* Overview hero */
.overview { padding: 0; overflow: hidden; }
.overview-scrim { position:absolute; inset:0; background: linear-gradient(90deg, rgba(6,10,22,.92) 0%, rgba(6,10,22,.55) 55%, rgba(6,10,22,.75) 100%); }
.overview-panel {
  position:relative; z-index:3; margin:auto; margin-left: 60px; align-self:center;
  width: 440px; max-width: 46%;
}

/* Generic exhibit two-column body */
.exhibit-body { flex:1; display:flex; gap: 18px; min-height:0; }
.exhibit-main { flex:1; display:flex; flex-direction:column; min-width:0; }
/* quiz page: instruction row spans the FULL panel width (so it centres like
   the title), with the questions + Dr. Watt in a row below, top-aligned */
.quiz-page { flex:1; display:flex; flex-direction:column; min-width:0; gap:14px; }
.quiz-row { flex:1; display:flex; gap:18px; align-items:flex-start; min-height:0; }
.exhibit-task-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.exhibit-task-head .pill { margin-left:auto; }
/* centred variant for full-width instruction rows (interactive + quiz pages).
   NOTE: deliberately NOT named "center" — that class already exists globally
   as a `display:grid` utility (see far below) and, at equal specificity, a
   same-named class collides and the later rule wins, silently turning this
   flex row into a 1-column grid (children stack instead of sitting centred
   side-by-side). "row-center" avoids the collision entirely; display:flex
   is re-asserted here too as a belt-and-braces guard. */
.exhibit-task-head.row-center { display:flex; justify-content:center; }
.exhibit-task-head.row-center .pill { margin-left:0; }
/* stacked variant (conversion builder): "YOUR TASK" label above the instruction, both centred */
.exhibit-task-head.stacked { display:flex; flex-direction:column; gap:4px; text-align:center; }
.exhibit-task-head.stacked .task-label { font-size:14px; letter-spacing:.3px; }
.exhibit-task-head.stacked .task-hint { margin-left:0; }

/* =========================================================================
   Admin (teacher) mode
   ========================================================================= */
.admin-gear {
  position:absolute; right:18px; bottom:18px; z-index:6;
  opacity:.45; transition:opacity .15s;
}
.admin-gear:hover, .admin-gear:focus-visible { opacity:1; }
.admin-pill {
  position:absolute; top:14px; left:14px; z-index:6;
  padding:4px 12px; border-radius:14px; font-size:12.5px; font-weight:700;
  color:var(--gold); background:rgba(255,176,32,.13); border:1px solid rgba(255,176,32,.5);
}
.admin-input {
  width:240px; max-width:80%; padding:10px 14px; border-radius:10px; text-align:center;
  font:inherit; font-size:16px; color:var(--ink);
  background:rgba(6,12,26,.8); border:2px solid var(--steel-1); outline:none;
}
.admin-input:focus { border-color:var(--cyan); box-shadow:0 0 10px rgba(53,198,255,.4); }
.admin-input.wrong { border-color:var(--red); animation: shake .35s; }
.task-hint { color: var(--ink); font-size:16px; margin-bottom:10px; }

/* Footer nav row inside framed screens */
.exhibit-foot {
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin-top: 14px; padding-top: 12px;
}

/* Advantages / disadvantages columns */
/* NOTE: classes deliberately avoid the "ad-" prefix — ad blockers' cosmetic
   filters (EasyList) hide elements with classes like .ad-item/.ad-col! */
.pc-wrap { flex:1; display:flex; flex-direction:column; gap:12px; min-width:0; }
.renew-tag {
  align-self:flex-start; display:flex; align-items:center; gap:8px;
  padding:6px 16px; border-radius:20px; font-weight:700; font-size:14px;
}
.renew-tag.yes { color:var(--green); background:rgba(126,211,33,.12); border:1px solid rgba(126,211,33,.5); }
.renew-tag.no  { color:#ff9269; background:rgba(255,120,80,.14); border:1px solid rgba(255,120,80,.5); }
.pc-grid { display:flex; gap:18px; flex:1; align-items:stretch; }
.pc-col { flex:1; display:flex; flex-direction:column; gap:12px; }
.pc-head { display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:600; font-size:22px; }
.pc-head.good { color: var(--green); }
.pc-head.bad  { color: var(--red); }
.pc-item {
  display:flex; align-items:center; gap:12px; padding: 14px 16px; border-radius: 12px;
  font-size:15px; line-height:1.35;   /* always visible — no animation dependency */
}
.pc-item .pc-ico { font-size: 26px; flex:none; }
.pc-col.good .pc-item { border:1.5px solid rgba(126,211,33,.5); background: rgba(126,211,33,.08); }
.pc-col.bad  .pc-item { border:1.5px solid rgba(255,120,80,.5); background: rgba(255,120,80,.08); }
@keyframes rise { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }

/* Utility */
.center { display:grid; place-items:center; text-align:center; }
.stack { display:flex; flex-direction:column; }
.row { display:flex; align-items:center; }
.gap8{gap:8px}.gap12{gap:12px}.gap16{gap:16px}
.mt8{margin-top:8px}.mt16{margin-top:16px}
.dim { color: var(--ink-dim); }
.hidden { display:none !important; }
