:root {
  --sky: #bfeeff;
  --sky-light: #edfaff;
  --turquoise: #4ad8c4;
  --lavender: #a7a1ff;
  --yellow: #ffd85b;
  --coral: #ff7e78;
  --violet: #7868d8;
  --deep: #18355f;
  --ink: #15304f;
  --white: #ffffff;
  --led-off: #dcebf2;
  --led-on: #ff6d79;
  --shadow: 0 18px 45px rgba(45, 87, 128, .14);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.85) 0 4px, transparent 5px),
    radial-gradient(circle at 84% 12%, rgba(255,216,91,.45) 0 5px, transparent 6px),
    linear-gradient(145deg, #eafaff 0%, #d5f4fb 55%, #f1edff 100%);
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
}
button, a { font: inherit; }
button { cursor: pointer; }

.app-shell { height: 100vh; display: grid; grid-template-rows: 76px minmax(0,1fr) 82px; }
.topbar, .bottombar { display: flex; align-items: center; position: relative; z-index: 10; }
.topbar { justify-content: space-between; padding: 12px 34px; border-bottom: 1px solid rgba(24,53,95,.08); background: rgba(255,255,255,.48); backdrop-filter: blur(12px); }
.header-actions { display:flex;align-items:center;gap:8px; }
.fullscreen-toggle { min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:1px solid rgba(24,53,95,.12);border-radius:22px;background:var(--white);color:var(--ink);font-weight:800;box-shadow:0 8px 20px rgba(45,87,128,.08); }
.fullscreen-toggle span:first-child { font-size:20px; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: none; color: var(--ink); text-align: left; }
.brand strong { display:block; font-size:18px; letter-spacing:.08em; }
.brand small { display:block; color:var(--violet); font-size:9px; letter-spacing:.28em; margin-top:4px; }
.brand-pixels { width:42px;height:42px;border-radius:12px;background:var(--white);box-shadow:var(--shadow);display:grid;grid-template-columns:repeat(2,8px);grid-template-rows:repeat(2,8px);place-content:center;gap:5px; }
.brand-pixels i { width:8px;height:8px;border-radius:2px;background:var(--turquoise); }
.brand-pixels i:nth-child(2), .brand-pixels i:nth-child(3) { background:var(--lavender); }
.brand-pixels i:last-child { background:var(--yellow); }
.mission-progress { display:flex;gap:8px; }
.progress-dot { width:11px;height:11px;border:0;border-radius:50%;background:#b9cddb;transition:.2s; }
.progress-dot.active { width:28px;border-radius:8px;background:var(--violet); }
.progress-dot.complete { background:var(--turquoise); }
.sound-toggle { min-width:86px;height:44px;border:1px solid rgba(24,53,95,.12);border-radius:22px;background:var(--white);color:var(--ink);display:flex;align-items:center;justify-content:center;gap:8px;font-weight:800;box-shadow:0 8px 20px rgba(45,87,128,.08); }
.sound-toggle.off { opacity:.58; }

.stage { min-height: 0; overflow: auto; position: relative; padding: 24px 46px; }
.scene { min-height: 100%; max-width: 1320px; margin: auto; animation: appear .45s ease both; }
@keyframes appear { from { opacity:0;transform:translateY(12px); } to { opacity:1;transform:none; } }
.scene-grid { display:grid;grid-template-columns:minmax(0,.95fr) minmax(440px,1.05fr);align-items:center;gap:44px; }
.scene-center { display:grid;place-items:center;text-align:center; }
.eyebrow { color:var(--violet);font-size:12px;font-weight:900;letter-spacing:.18em;text-transform:uppercase;margin-bottom:12px; }
h1 { font-size:clamp(44px,5vw,72px);line-height:.98;letter-spacing:-.055em;margin:0 0 20px;max-width:720px; }
h2 { font-size:clamp(36px,4vw,58px);line-height:1.02;letter-spacing:-.04em;margin:8px 0 16px; }
h3 { font-size:20px;margin:7px 0; }
p { line-height:1.55; }
.subtitle { font-size:clamp(18px,1.7vw,23px);line-height:1.5;max-width:650px;color:#55708c;margin:0 0 24px; }
.accent { color:var(--violet); }
.lead { font-size:20px;color:#55708c;max-width:620px; }

.pixi { position:relative;width:320px;height:320px;margin:auto;display:grid;place-items:center; }
.pixi-shadow { position:absolute;bottom:18px;width:220px;height:34px;border-radius:50%;background:rgba(63,91,128,.12); }
.pixi-body { position:absolute;width:190px;height:220px;border-radius:48px 48px 55px 55px;background:var(--lavender);border:8px solid var(--white);box-shadow:0 24px 35px rgba(79,76,145,.18);animation:float 3.2s ease-in-out infinite; }
.pixi-head { position:absolute;top:22px;width:150px;height:112px;border-radius:42px;background:#8edced;border:8px solid var(--white);z-index:2;box-shadow:inset 0 -8px rgba(70,170,192,.15); }
.pixi-eye { position:absolute;top:48px;width:18px;height:24px;border-radius:10px;background:var(--deep); }
.pixi-eye.left { left:52px; }.pixi-eye.right { right:52px; }
.pixi-smile { position:absolute;left:50%;top:82px;width:38px;height:18px;transform:translateX(-50%);border-bottom:6px solid var(--deep);border-radius:0 0 30px 30px; }
.pixi-antenna { position:absolute;top:-26px;left:50%;width:8px;height:36px;transform:translateX(-50%) rotate(-8deg);border-radius:8px;background:var(--coral); }
.pixi-antenna:before { content:"";position:absolute;top:-8px;left:-7px;width:22px;height:22px;border-radius:50%;background:var(--yellow);border:5px solid var(--white); }
.pixi-arm { position:absolute;top:166px;width:55px;height:28px;border-radius:20px;background:var(--lavender);border:6px solid var(--white);z-index:-1; }
.pixi-arm.left { left:-30px;transform:rotate(28deg); }.pixi-arm.right { right:-30px;transform:rotate(-28deg); }
.pixi-leg { position:absolute;top:230px;width:38px;height:42px;border-radius:8px 8px 18px 18px;background:var(--violet);border:5px solid var(--white); }
.pixi-leg.left { left:80px; }.pixi-leg.right { right:80px; }
.pixi-spark { position:absolute;color:var(--yellow);font-size:28px;font-weight:900;animation:twinkle 2s infinite; }
.pixi-spark.a { left:-8px;top:45px; }.pixi-spark.b { right:-2px;bottom:58px;animation-delay:-1s; }
@keyframes float { 50% { transform:translateY(-10px) } }
@keyframes twinkle { 50% { transform:rotate(20deg) scale(.65);opacity:.55 } }

.primary-button, .next-button { border:0;border-radius:18px;background:var(--violet);color:white;font-weight:900;padding:14px 20px;box-shadow:0 12px 24px rgba(120,104,216,.22); }
.primary-button:hover, .next-button:hover { transform:translateY(-2px); }
.pixel-button { border:1px solid rgba(24,53,95,.1);border-radius:16px;background:rgba(255,255,255,.82);color:var(--ink);font-weight:800;padding:12px 14px;box-shadow:0 8px 18px rgba(45,87,128,.07);transition:.18s; }
.pixel-button:hover { transform:translateY(-3px);border-color:var(--lavender); }

.mission-map { width:100%;max-width:1180px;min-height:100%;display:grid;grid-template-rows:auto 1fr auto;gap:18px;text-align:center; }
.mission-map h2 { margin:4px 0 4px; }
.map-track { display:grid;grid-template-columns:repeat(5,1fr);align-items:center;gap:14px;position:relative; }
.map-track:before { content:"";position:absolute;left:8%;right:8%;top:50%;height:5px;border-radius:5px;background:#cce7ef;z-index:0; }
.mission-card { position:relative;z-index:1;min-height:270px;border:0;border-radius:28px;padding:18px 14px;background:rgba(255,255,255,.88);box-shadow:var(--shadow);color:var(--ink);transition:.2s; }
.mission-card:hover:not(:disabled) { transform:translateY(-8px); }
.mission-card:disabled { opacity:.48;filter:saturate(.45);cursor:not-allowed; }
.mission-card.complete { box-shadow:0 18px 45px rgba(74,216,196,.22); }
.mission-number { display:grid;place-items:center;margin:0 auto 12px;width:45px;height:45px;border-radius:50%;background:var(--sky-light);color:var(--violet);font-weight:900; }
.mission-card:nth-child(1) .mission-number { background:#d9f7ef;color:#369b8b; }
.mission-card:nth-child(2) .mission-number { background:#fff2c6; }
.mission-card:nth-child(3) .mission-number { background:#eeeaff; }
.mission-card:nth-child(4) .mission-number { background:#ffe8e5; }
.mission-card:nth-child(5) .mission-number { background:#dff1ff; }
.mission-card h3 { font-size:17px;line-height:1.2; }
.mission-card p { font-size:13px;color:#668099;margin:8px 0; }
.mission-icon { height:70px;display:grid;place-items:center;font-size:40px; }
.stars-row { height:24px;color:var(--yellow);letter-spacing:3px;font-size:18px; }

.micro-board-wrap { position:relative;width:min(520px,88%);aspect-ratio:1.55;margin:auto;border-radius:28px;background:linear-gradient(145deg,#3172a8,#1c4c7b);border:8px solid #e8f7fa;box-shadow:var(--shadow); }
.micro-board-wrap:after { content:"micro:bit";position:absolute;right:18px;bottom:10px;color:#b7e7ed;font-size:12px;font-weight:900; }
.hotspot { position:absolute;z-index:4;border:3px solid white;border-radius:50%;width:48px;height:48px;background:var(--yellow);color:var(--ink);font-weight:900;box-shadow:0 8px 20px rgba(24,53,95,.18); }
.hotspot.matrix { left:44%;top:24%; }.hotspot.a { left:9%;bottom:12%; }.hotspot.b { right:9%;bottom:12%; }.hotspot.processor { right:20%;top:25%; }
.led-matrix { display:grid;grid-template-columns:repeat(5,24px);grid-template-rows:repeat(5,24px);gap:7px; }
.micro-board-wrap .led-matrix { position:absolute;left:50%;top:42%;transform:translate(-50%,-50%); }
.led { width:24px;height:24px;border-radius:50%;background:#17395d;border:2px solid rgba(255,255,255,.08); }
.led.on { background:var(--led-on);box-shadow:0 0 10px #ffb0b6,0 0 18px rgba(255,109,121,.5);animation:ledPulse 1.2s ease-in-out infinite alternate; }
@keyframes ledPulse { to { filter:brightness(1.25); } }
.board-button { position:absolute;bottom:-26px;width:82px;height:38px;border:7px solid #e8ecec;border-radius:24px;background:var(--yellow);color:var(--ink);font-weight:900; }
.board-button.a { left:14%; }.board-button.b { right:14%; }
.component-panel { border-radius:24px;background:rgba(255,255,255,.82);padding:20px;box-shadow:var(--shadow);min-height:190px; }
.component-panel.correct { border:3px solid var(--turquoise); }
.two-card-row { display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:14px; }
.info-card { border-radius:18px;background:var(--sky-light);padding:14px;text-align:left; }
.info-card strong { color:var(--violet); }

.puzzle-layout { display:grid;grid-template-columns:minmax(330px,.8fr) minmax(350px,1fr);gap:32px;align-items:center;max-width:1080px;margin:auto; }
.led-panel { border-radius:30px;background:rgba(255,255,255,.86);box-shadow:var(--shadow);padding:28px; }
.editable-grid { display:grid;grid-template-columns:repeat(5,52px);grid-template-rows:repeat(5,52px);gap:9px;justify-content:center; }
.pixel { width:52px;height:52px;border:0;border-radius:12px;background:var(--led-off);box-shadow:inset 0 -4px rgba(24,53,95,.05);transition:.12s; }
.pixel.on { background:var(--led-on);box-shadow:0 0 10px rgba(255,109,121,.4),inset 0 -5px rgba(196,63,79,.12);transform:scale(.94); }
.pattern-row { display:flex;gap:8px;flex-wrap:wrap;margin-top:16px;justify-content:center; }
.pattern-button { border:1px solid rgba(24,53,95,.1);border-radius:14px;background:white;padding:9px 12px;color:var(--ink);font-weight:800; }
.pattern-button.active { border:2px solid var(--violet);background:#f2efff; }
.reveal-panel { text-align:left; }
.row-reveal { display:grid;grid-template-columns:38px 1fr;gap:8px;margin:8px 0;align-items:center; }
.row-reveal button { width:38px;height:38px;border:0;border-radius:10px;background:var(--yellow);font-weight:900; }
.row-preview { display:flex;gap:5px;height:28px; }
.row-preview i { width:28px;height:28px;border-radius:7px;background:var(--led-off); }
.row-preview i.on { background:var(--led-on); }
.guess-options { display:flex;flex-wrap:wrap;gap:8px;margin-top:14px; }
.guess-button { border:2px solid transparent;border-radius:14px;background:white;padding:12px 16px;font-weight:900; }
.guess-button.correct { border-color:var(--turquoise);background:#eafff9; }.guess-button.wrong { border-color:var(--coral);background:#fff1f0; }
.feedback { min-height:46px;margin-top:12px;border-radius:14px;background:#fff8dc;padding:10px 14px;font-weight:800;color:#6a5a31; }

.makecode-layout { display:grid;grid-template-columns:240px 1fr 270px;gap:12px;height:430px;width:min(1120px,100%);margin:20px auto 0;text-align:left; }
.makecode-zone { border-radius:22px;background:rgba(255,255,255,.88);box-shadow:var(--shadow);padding:16px; }
.zone-title { color:var(--violet);font-weight:900;font-size:12px;text-transform:uppercase;letter-spacing:.12em;margin-bottom:12px; }
.toolbox-block { margin:7px 0;padding:10px;border-radius:10px;background:#eef7ff;font-weight:800;font-size:13px; }
.workspace { height:290px;border:2px dashed #d9e5eb;border-radius:14px;padding:14px;background:#fbfdff; }
.code-block { width:max-content;max-width:100%;border-radius:9px;padding:11px 13px;margin:8px 0;font-weight:800;color:white;box-shadow:0 5px 10px rgba(24,53,95,.12); }
.code-block.base { background:var(--violet); }.code-block.heart { background:#2aaac3; }
.simulator { display:grid;place-items:center;height:290px; }
.simulator .micro-board-wrap { width:230px;transform:scale(.68); }
.makecode-link { display:inline-flex;margin-top:16px;text-decoration:none;border-radius:14px;padding:12px 16px;background:var(--yellow);color:var(--ink);font-weight:900; }

.quiz-cards { display:grid;grid-template-columns:repeat(3,1fr);gap:12px; }
.quiz-card { min-height:145px;border:2px solid transparent;border-radius:20px;background:white;padding:16px;font-weight:800;box-shadow:0 10px 25px rgba(45,87,128,.08); }
.quiz-card.correct { border-color:var(--turquoise);background:#edfff9; }.quiz-card.wrong { border-color:var(--coral);background:#fff1ef; }

.project-layout { display:grid;grid-template-columns:minmax(340px,.75fr) minmax(500px,1.25fr);gap:30px;align-items:center;width:min(1120px,100%);margin:auto; }
.step-list { display:grid;gap:8px; }
.step { display:grid;grid-template-columns:42px 1fr;align-items:center;text-align:left;border-radius:15px;background:rgba(255,255,255,.82);padding:8px 12px;font-weight:800;box-shadow:0 7px 18px rgba(45,87,128,.06); }
.step-number { width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:var(--yellow); }
.project-preview { border-radius:30px;background:rgba(255,255,255,.88);box-shadow:var(--shadow);padding:24px;text-align:center; }
.heart-stage { height:270px;display:grid;place-items:center; }
.heart-matrix { width:250px;height:250px;display:grid;grid-template-columns:repeat(5,44px);grid-template-rows:repeat(5,44px);gap:6px; }
.heart-matrix .led { width:44px;height:44px; }
.timeline { display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;color:#668099;font-weight:800; }
.timeline-chip { padding:8px 11px;border-radius:10px;background:#edf1ff;color:var(--violet); }.timeline-chip.big { background:#ffe8eb;color:#b84d5a; }
.prediction-box { margin-top:16px;border-radius:18px;background:#fff8dc;padding:12px; }

.editor-layout { display:grid;grid-template-columns:minmax(380px,.9fr) minmax(320px,.7fr);gap:30px;align-items:center;width:min(1040px,100%);margin:auto; }
.editor-panel { border-radius:30px;background:rgba(255,255,255,.88);box-shadow:var(--shadow);padding:22px; }
.editor-panel .editable-grid { grid-template-columns:repeat(5,46px);grid-template-rows:repeat(5,46px); }
.editor-panel .pixel { width:46px;height:46px; }
.example-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:10px; }
.example-button { min-height:78px;border:1px solid rgba(24,53,95,.1);border-radius:16px;background:white;font-weight:900; }
.show-leds { margin-top:12px;border-radius:14px;background:#edf8ff;border:1px solid #c8e8f3;padding:12px;font-family:monospace;color:#4d6680; }

.reward { text-align:center;max-width:900px;margin:auto; }
.badge { width:210px;height:210px;margin:18px auto;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,var(--yellow),#fff0a6);border:14px solid white;box-shadow:0 20px 45px rgba(213,173,63,.24);animation:badgeIn .8s cubic-bezier(.2,.8,.2,1); }
.badge-inner { width:150px;height:150px;border:3px dashed var(--violet);border-radius:50%;display:grid;place-items:center;font-size:54px; }
@keyframes badgeIn { from { transform:scale(.2) rotate(-20deg);opacity:0 } to { transform:scale(1) rotate(0);opacity:1 } }
.reward-stars { font-size:30px;color:var(--yellow);letter-spacing:8px;margin:12px 0; }
.completed-list { display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:16px 0; }
.completed-pill { border-radius:16px;background:white;padding:8px 12px;font-weight:800;box-shadow:0 8px 18px rgba(45,87,128,.08); }

.future-grid { display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-top:20px; }
.future-card { border-radius:20px;background:rgba(255,255,255,.86);padding:16px 10px;box-shadow:var(--shadow);font-weight:800; }
.future-card span { display:block;font-size:30px;margin-bottom:8px; }

.bottombar { justify-content:space-between;padding:10px 34px;border-top:1px solid rgba(24,53,95,.08);background:rgba(255,255,255,.48);backdrop-filter:blur(12px); }
.back-button { width:48px;height:48px;border:1px solid rgba(24,53,95,.12);border-radius:15px;background:white;color:var(--ink);font-size:20px;font-weight:900; }
.back-button:disabled { opacity:.35; }
.next-button { min-width:150px; }
.pixi-tip { display:flex;align-items:center;gap:10px;font-weight:800;color:#55708c; }
.pixi-mini { width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--lavender);color:white;border:4px solid white; }
.confetti { position:fixed;inset:0;pointer-events:none;z-index:100; }
.confetti i { position:absolute;top:-20px;width:10px;height:18px;border-radius:3px;animation:fall 2.8s ease-in forwards; }
@keyframes fall { to { transform:translateY(110vh) rotate(720deg); } }

@media (max-width: 980px) {
  .stage { padding:18px 22px; }
  .scene-grid, .project-layout, .editor-layout, .puzzle-layout { grid-template-columns:1fr; }
  .map-track { grid-template-columns:repeat(5,minmax(150px,1fr));overflow-x:auto;padding:10px; }
  .makecode-layout { grid-template-columns:160px 1fr 220px; }
  .pixi { transform:scale(.78); }
  .future-grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-height: 760px) {
  .app-shell { grid-template-rows:64px minmax(0,1fr) 68px; }
  .topbar { padding-top:8px;padding-bottom:8px; }
  .bottombar { padding-top:8px;padding-bottom:8px; }
  .stage { padding-top:12px;padding-bottom:12px; }
  .mission-card { min-height:230px; }
  .pixi { transform:scale(.82); }
  .makecode-layout { height:360px; }
  .workspace, .simulator { height:250px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important; }
}

.map-four { grid-template-columns:repeat(4,1fr); }
.map-four:before { left:12%;right:12%; }
.map-note, .small-note { color:#668099;font-size:14px;line-height:1.45; }
.small-note { margin:12px 0 0; }
.board-demo { display:grid;place-items:center;gap:22px; }
.board-demo .micro-board-wrap { width:min(520px,88%); }
.micro-board-wrap[hidden], .micro-back[hidden] { display:none; }
.micro-board-wrap .hotspot.matrix { left:44%;top:24%;width:42px;height:42px; }
.micro-board-wrap .board-button { z-index:3; }
.hotspot.active, .board-button.active { outline:4px solid var(--turquoise); }
.hotspot.processor { position:absolute;right:35%;top:36%;width:74px;height:74px;background:#253d63;color:white;border-radius:12px; }
.micro-back { position:relative;width:min(520px,88%);aspect-ratio:1.55;border:8px solid white;border-radius:28px;background:linear-gradient(145deg,#d9e4ed,#bccbd9);box-shadow:var(--shadow);display:grid;place-items:center; }
.micro-back:before { content:"";width:120px;height:110px;border:8px solid #71869a;border-radius:12px;background:repeating-linear-gradient(90deg,#8397a8 0 5px,#d2dce4 5px 9px); }
.back-label { position:absolute;top:15px;left:18px;color:#577087;font-size:11px;font-weight:900;letter-spacing:.1em; }
.chip-label { position:absolute;bottom:15px;color:#577087;font-size:13px;font-weight:800; }
.flip-board { justify-self:center; }
.discover-count { margin-top:12px;color:var(--violet);font-weight:900; }
.component-panel.correct { border:3px solid var(--turquoise); }
.phase-two { max-width:1200px;text-align:center; }
.phase-two .lead { max-width:820px;margin:0 auto 14px; }
.makecode-layout { grid-template-columns:1fr 1fr 1fr;max-width:1120px;height:325px;margin:14px auto; }
.makecode-zone { padding:13px; }
.makecode-zone p { color:#668099;font-size:13px;margin:7px 0 0; }
.makecode-zone .workspace { height:205px;padding:12px; }
.phase-two .simulator { height:205px; }
.phase-two .simulator .led-matrix { grid-template-columns:repeat(5,22px);grid-template-rows:repeat(5,22px);gap:6px; }
.phase-two .simulator .led { width:22px;height:22px; }
.first-light { max-width:1120px;margin:12px auto;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:18px;border-radius:18px;background:#fff8dc;padding:14px 18px;text-align:left;font-weight:800; }
.small-quiz { gap:8px; }
.small-quiz .quiz-card { min-height:60px;padding:10px;font-size:14px; }
.phase-two .makecode-link { margin:5px auto; }
.phase-two .feedback { max-width:900px;margin:10px auto; }
.code-sequence { border-radius:20px;background:#f4f2ff;padding:14px; }
.code-block.loop { background:#49af72; }
.sequence-inner { margin-left:20px;padding:4px 14px;border-left:4px solid #78c58e; }
.code-block.pause { background:#ffb84e;color:#503b16; }
.heart-stage .led-matrix { grid-template-columns:repeat(5,42px);grid-template-rows:repeat(5,42px);gap:7px; }
.heart-stage .led { width:42px;height:42px; }
.prediction-choices { display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:8px; }
.done-check { display:block;margin-top:14px;padding:12px;border-radius:14px;background:#effff9;font-weight:800;text-align:left; }
.done-check input { width:20px;height:20px;vertical-align:middle;accent-color:var(--violet); }
.homework-grid { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0;text-align:center; }
.homework-grid>div { padding:10px;border-radius:16px;background:white;box-shadow:0 8px 18px rgba(45,87,128,.07); }
.homework-grid .led-matrix { grid-template-columns:repeat(5,17px);grid-template-rows:repeat(5,17px);gap:4px;margin:9px auto 0; }
.homework-grid .led { width:17px;height:17px; }
.frame-controls { display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:12px; }
.frame-controls .pattern-button { padding:8px 10px;font-size:13px; }
.finish-actions { display:flex;flex-wrap:wrap;gap:8px;margin:12px 0; }
.finish-actions .pixel-button,.finish-actions .primary-button { flex:1; }
.badge-star { position:absolute;font-size:28px;transform:translate(22px,-28px); }
.final-message { font-weight:800;color:#55708c;margin:18px auto;max-width:720px; }
.pixel:focus-visible, button:focus-visible, a:focus-visible { outline:3px solid var(--violet);outline-offset:3px; }

@media (max-width: 980px) {
  .map-four { grid-template-columns:repeat(2,minmax(210px,1fr)); }
  .map-four:before { display:none; }
  .first-light { grid-template-columns:1fr; }
  .phase-two .makecode-layout { grid-template-columns:1fr 1fr 1fr;height:auto; }
  .phase-two .makecode-zone { min-width:0; }
  .phase-two .makecode-zone .workspace { height:205px; }
  .heart-stage .led-matrix { grid-template-columns:repeat(5,32px);grid-template-rows:repeat(5,32px); }
  .heart-stage .led { width:32px;height:32px; }
}
@media (max-width: 650px) {
  .app-shell { grid-template-rows:64px minmax(0,1fr) 68px; }
  .topbar { padding:8px 12px; }
  .brand strong { font-size:14px; }
  .brand-pixels { width:34px;height:34px; }
  .mission-progress { gap:5px; }
  .progress-dot { width:8px;height:8px; }
  .progress-dot.active { width:18px; }
  .header-actions { gap:5px; }
  .fullscreen-toggle { min-height:38px;padding:0 9px;font-size:12px; }
  .sound-toggle { min-width:58px;height:38px; }
  .stage { padding:16px 14px; }
  .map-four { grid-template-columns:1fr 1fr;gap:8px; }
  .mission-card { min-height:205px;padding:12px 9px;border-radius:20px; }
  .mission-card h3 { font-size:14px; }
  .mission-card p { font-size:12px; }
  .mission-icon { height:42px;font-size:28px; }
  .mission-number { width:34px;height:34px;margin-bottom:5px; }
  .scene-grid { grid-template-columns:1fr;gap:18px; }
  .board-demo .micro-board-wrap,.micro-back { width:min(430px,94%); }
  .makecode-layout,.phase-two .makecode-layout { grid-template-columns:1fr; }
  .phase-two .makecode-layout { height:auto; }
  .phase-two .makecode-zone .workspace,.phase-two .simulator { height:155px; }
  .first-light { margin-top:18px; }
  .project-layout,.editor-layout { grid-template-columns:1fr; }
  .editable-grid { grid-template-columns:repeat(5,42px);grid-template-rows:repeat(5,42px);gap:7px; }
  .pixel { width:42px;height:42px; }
  .heart-stage .led-matrix { grid-template-columns:repeat(5,25px);grid-template-rows:repeat(5,25px);gap:5px; }
  .heart-stage .led { width:25px;height:25px; }
  .bottombar { padding:8px 12px; }
  .pixi-tip { font-size:12px;max-width:55%; }
  .next-button { min-width:120px;padding:12px;font-size:13px; }
  .homework-grid .led-matrix { grid-template-columns:repeat(5,14px);grid-template-rows:repeat(5,14px);gap:3px; }
  .homework-grid .led { width:14px;height:14px; }
}

@media print {
  body { overflow:visible;background:white; }
  .topbar,.bottombar,.editor-panel,.finish-actions,.eyebrow,.final-message { display:none !important; }
  .app-shell { height:auto;display:block; }
  .stage { overflow:visible;padding:0; }
  .scene { display:block !important; }
  .editor-layout { display:block; }
  .homework-grid { grid-template-columns:1fr 1fr; }
  .homework-grid>div { box-shadow:none;border:1px solid #777; }
  .homework-grid .led { border:1px solid #555; }
  .homework-grid .led.on { background:#555 !important; }
}

/* Storybook opening and illustrated mission map */
.welcome-scene {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:100%;
  padding:clamp(22px,3.8vw,48px);
  border:1px solid rgba(255,255,255,.2);
  border-radius:36px;
  color:#fff;
  background:
    radial-gradient(ellipse at 74% 44%,rgba(87,86,184,.58),transparent 35%),
    radial-gradient(ellipse at 15% 100%,rgba(25,126,164,.45),transparent 38%),
    linear-gradient(125deg,#142343 0%,#1d2551 52%,#342b68 100%);
  box-shadow:0 28px 80px rgba(39,44,106,.28),inset 0 1px rgba(255,255,255,.2);
}
.welcome-scene:before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  opacity:.45;
  background-image:
    radial-gradient(circle,#fff 1px,transparent 1.8px),
    radial-gradient(circle,rgba(255,222,131,.9) 1px,transparent 2px);
  background-size:73px 71px,117px 103px;
  background-position:10px 20px,48px 35px;
  mask-image:linear-gradient(90deg,transparent 0%,#000 38%,#000 100%);
}
.welcome-copy { position:relative;z-index:2;max-width:620px; }
.hero-kicker { color:#b7ecff;font-size:12px;font-weight:900;letter-spacing:.18em; }
.kicker-star { color:#ffda69;font-size:18px;margin:0 6px; }
.welcome-scene h1 {
  margin:16px 0 0;
  color:#fff;
  font-size:clamp(62px,7.2vw,98px);
  line-height:.77;
  letter-spacing:-.08em;
  text-shadow:0 8px 0 rgba(5,14,39,.2);
}
.welcome-scene h1 span {
  display:inline-block;
  padding:10px 15px 16px 7px;
  color:#ffdc67;
  -webkit-text-stroke:1px rgba(255,255,255,.22);
}
.hero-subtitle { margin:12px 0 8px;font-size:clamp(21px,2.4vw,30px);font-weight:800;letter-spacing:-.03em;color:#e3e7ff; }
.hero-subtitle strong { color:#66e8d0; }
.hero-story { max-width:490px;margin:0;color:#d4def5;font-size:clamp(15px,1.3vw,17px);line-height:1.45; }
.hero-story span { color:#ff9e86;font-weight:1000;letter-spacing:.05em; }
.hero-story strong { color:#fff; }
.welcome-scene .hero-cta {
  display:flex;
  align-items:center;
  gap:20px;
  margin-top:18px;
  padding:7px 8px 7px 23px;
  border:2px solid rgba(255,255,255,.5);
  border-radius:18px;
  background:linear-gradient(135deg,#ff9b72,#ff6d82);
  box-shadow:0 9px 0 #b94469,0 18px 34px rgba(255,111,125,.3);
  color:white;
  font-size:15px;
  letter-spacing:.06em;
  transition:transform .18s,box-shadow .18s;
}
.welcome-scene .hero-cta b {
  display:grid;
  width:40px;height:40px;
  place-items:center;
  border-radius:12px;
  background:rgba(255,255,255,.2);
  font-size:23px;
}
.welcome-scene .hero-cta:hover { transform:translateY(-3px);box-shadow:0 12px 0 #b94469,0 22px 38px rgba(255,111,125,.32); }
.hero-promises { display:flex;flex-wrap:wrap;gap:14px;margin-top:16px;color:#c3cee9;font-size:12px;font-weight:800; }
.hero-promises span:first-child { color:#7de5cd; }.hero-promises span:nth-child(2){color:#ffe27d}.hero-promises span:last-child{color:#ffa992}
.hero-world { position:relative;min-height:400px;display:grid;place-items:center; }
.hero-moon { position:absolute;width:min(34vw,380px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 34% 28%,#4c6ec7,#343871 57%,#222950 75%);box-shadow:0 0 0 1px rgba(255,255,255,.15),0 0 70px rgba(127,123,255,.32),inset -30px -20px 60px rgba(9,17,46,.42); }
.hero-moon:before,.hero-moon:after { content:"";position:absolute;width:24px;height:24px;border-radius:7px;background:rgba(111,224,217,.2);box-shadow:42px 95px rgba(255,216,91,.18),-55px 175px rgba(255,133,141,.2); }
.hero-moon:before { top:22%;right:19%; }.hero-moon:after { bottom:22%;left:18%;width:13px;height:13px; }
.hero-ring { position:absolute;width:min(45vw,500px);height:min(17vw,190px);border:2px solid rgba(139,224,255,.35);border-radius:50%;transform:rotate(-25deg);box-shadow:0 0 18px rgba(111,223,248,.12); }
.hero-ring:after { content:"";position:absolute;left:8%;top:5%;width:100%;height:100%;border:1px solid rgba(255,223,125,.2);border-radius:50%; }
.hero-orbit { position:absolute;width:250px;height:250px;border:1px dashed rgba(255,255,255,.28);border-radius:50%;animation:orbit 20s linear infinite; }
.hero-orbit i { position:absolute;top:15px;left:38px;color:#ffdf75;font-size:25px;font-style:normal;text-shadow:0 0 15px #ffdf75; }
.orbit-two { width:330px;height:330px;animation-duration:28s;animation-direction:reverse; }.orbit-two i { top:auto;bottom:15px;left:auto;right:35px;color:#75efdc; }
@keyframes orbit { to { transform:rotate(360deg); } }
.hero-pixel { position:absolute;width:11px;height:11px;border-radius:3px;background:#ffe279;box-shadow:0 0 16px currentColor;animation:pixelDrift 3s ease-in-out infinite alternate; }
.hero-pixel.p1 { top:13%;left:19%;color:#ffe279; }.hero-pixel.p2 { top:20%;right:12%;color:#79e5da;background:#79e5da;animation-delay:-.8s; }
.hero-pixel.p3 { bottom:18%;left:12%;color:#ff9a91;background:#ff9a91;animation-delay:-1.6s; }.hero-pixel.p4 { bottom:10%;right:27%;color:#b4a2ff;background:#b4a2ff; }
.hero-pixel.p5 { top:47%;left:7%;width:7px;height:7px;color:#fff;background:#fff;animation-delay:-.5s; }.hero-pixel.p6 { top:12%;right:33%;width:6px;height:6px;color:#ff9a91;background:#ff9a91; }
@keyframes pixelDrift { to { transform:translate(8px,-13px) rotate(45deg); } }
.hero-board { position:absolute;z-index:1;right:4%;top:13%;width:154px;height:173px;display:grid;align-content:center;justify-items:center;gap:12px;border:5px solid #d5faff;border-radius:23px;background:linear-gradient(145deg,#3477a8,#174365);box-shadow:0 16px 38px rgba(7,14,39,.38),inset 0 2px rgba(255,255,255,.25);transform:rotate(9deg);animation:boardFloat 4s ease-in-out infinite; }
.hero-board:after { content:"";position:absolute;bottom:-17px;left:27px;width:30px;height:21px;border-radius:0 0 10px 10px;border:5px solid #d5faff;border-top:0;background:#ffce62; }
.hero-board .led-matrix { grid-template-columns:repeat(5,13px);grid-template-rows:repeat(5,13px);gap:4px; }
.hero-board .led { width:13px;height:13px;border-radius:4px;background:#182e51; }
.hero-board .led.on { background:#ff7f8a;box-shadow:0 0 9px #ff8e9a; }
.hero-board>span { color:#c2f4ee;font-size:8px;font-weight:1000;letter-spacing:.1em; }
@keyframes boardFloat { 50% { transform:rotate(5deg) translateY(-9px); } }
.hero-pixi { z-index:2;transform:scale(1.13) translate(-4%,-1%); }
.hero-pixi .pixi-body { z-index:1;background:#8275e8;box-shadow:0 25px 55px rgba(10,18,55,.35),inset 0 2px rgba(255,255,255,.25); }
.hero-pixi .pixi-body:before { content:"";position:absolute;left:50%;top:128px;width:62px;height:34px;transform:translateX(-50%);border:4px solid rgba(255,255,255,.76);border-radius:11px;background:linear-gradient(90deg,#ffdf6c 0 25%,#ff8b89 25% 50%,#77e4d4 50% 75%,#9ee3ff 75%);box-shadow:0 4px 0 rgba(68,59,157,.22); }
.hero-pixi .pixi-head { z-index:2;background:#80e2e8; }
.hero-pixi .pixi-eye { width:13px;height:19px;border-radius:10px; }
.hero-pixi .pixi-eye.left { left:47px; }.hero-pixi .pixi-eye.right { right:47px; }
.hero-pixi .pixi-smile { top:79px;width:33px;height:16px; }
.hero-pixi .pixi-arm { z-index:0; }
.hero-pixi .pixi-arm.left { left:31px; }.hero-pixi .pixi-arm.right { right:31px; }
.hero-pixi .pixi-spark { text-shadow:0 0 16px currentColor; }
.pixi-speech { position:absolute;z-index:4;right:4%;bottom:8%;padding:11px 15px;border:2px solid white;border-radius:17px 17px 4px 17px;background:#fff;color:#344373;font-size:13px;font-weight:900;box-shadow:0 8px 20px rgba(8,15,39,.2);transform:rotate(-4deg); }
.pixi-speech span { font-size:17px; }

.mission-map { position:relative;isolation:isolate;max-width:1320px;padding:12px 0 0; }
.mission-map:before { content:"";position:absolute;z-index:-1;left:3%;right:3%;top:33%;height:37%;border-radius:50%;background:linear-gradient(90deg,rgba(80,211,198,.13),rgba(174,151,255,.12),rgba(255,195,112,.15));filter:blur(30px); }
.map-heading .eyebrow { color:#5c58b8;letter-spacing:.22em; }
.map-heading h2 { color:#243b65;font-size:clamp(36px,4.2vw,56px); }
.map-heading p { margin:0;color:#657e99;font-size:16px; }
.map-four { gap:18px; }
.map-four:before { left:7%;right:7%;top:36%;height:7px;background:repeating-linear-gradient(90deg,#bdc8ed 0 17px,transparent 17px 26px);box-shadow:0 2px 0 rgba(255,255,255,.8); }
.mission-card {
  overflow:hidden;
  min-height:345px;
  padding:12px 13px 15px;
  border:2px solid rgba(255,255,255,.9);
  border-radius:27px;
  background:linear-gradient(160deg,rgba(255,255,255,.98),rgba(247,251,255,.88));
  box-shadow:0 18px 38px rgba(63,80,136,.15),0 4px 0 rgba(114,118,184,.12);
  transform:translateY(var(--card-rise,0));
}
.mission-card:nth-child(even) { --card-rise:12px; }
.mission-card:hover:not(:disabled) { transform:translateY(calc(var(--card-rise,0px) - 7px)) rotate(-1deg);box-shadow:0 25px 44px rgba(66,78,144,.2); }
.mission-card:after { content:"";position:absolute;inset:auto 0 0;height:6px;background:var(--card-color,#67d6c3); }
.mission-card:nth-child(1) { --card-color:#4bcdb5; }
.mission-card:nth-child(2) { --card-color:#ffb653; }
.mission-card:nth-child(3) { --card-color:#8879ec; }
.mission-card:nth-child(4) { --card-color:#ff827f; }
.mission-card:nth-child(1) .mission-number { color:#228b77;background:#ddfaf1; }
.mission-card:nth-child(2) .mission-number { color:#a16a18;background:#fff2d6; }
.mission-card:nth-child(3) .mission-number { color:#5f51be;background:#eeebff; }
.mission-card:nth-child(4) .mission-number { color:#bb5156;background:#ffebea; }
.mission-number { position:absolute;z-index:2;top:15px;left:15px;width:37px;height:37px;margin:0;border:2px solid white;box-shadow:0 4px 12px rgba(22,39,73,.14);font-size:12px; }
.mission-landscape { position:relative;display:block;height:138px;margin:-12px -13px 13px;overflow:hidden;border-radius:24px 24px 18px 18px;background:linear-gradient(180deg,#99e5ed,#d8fbf2); }
.landscape-2 { background:linear-gradient(180deg,#a4d8ff,#e6f5ff); }
.landscape-3 { background:linear-gradient(180deg,#8987ed,#d8caff); }
.landscape-4 { background:linear-gradient(180deg,#ffbd91,#ffe9a7); }
.landscape-sun { position:absolute;right:17%;top:17px;width:35px;height:35px;border-radius:50%;background:#ffe575;box-shadow:0 0 28px rgba(255,230,121,.8); }
.landscape-hill { position:absolute;left:-10%;bottom:-65px;width:78%;height:145px;border-radius:50% 50% 0 0;transform:rotate(-8deg);background:#50c9ad; }
.landscape-2 .landscape-hill { background:#55aee0; }
.landscape-3 .landscape-hill { background:#6969ca; }
.landscape-4 .landscape-hill { background:#fc887d; }
.landscape-hill.hill-back { left:41%;bottom:-79px;width:83%;height:153px;opacity:.72;background:#75dec5;transform:rotate(9deg); }
.landscape-2 .landscape-hill.hill-back { background:#77c7ed; }
.landscape-3 .landscape-hill.hill-back { background:#aaa1f4; }
.landscape-4 .landscape-hill.hill-back { background:#ffd26e; }
.landscape-character { position:absolute;z-index:2;left:50%;bottom:18px;width:66px;height:66px;display:grid;place-items:center;border:4px solid white;border-radius:21px;background:#fff8dc;color:#ee8b53;font-size:33px;font-style:normal;box-shadow:0 9px 14px rgba(33,47,83,.18);transform:translateX(-50%) rotate(-5deg); }
.landscape-2 .landscape-character { background:#fff;color:#f27370; }
.landscape-3 .landscape-character { background:#fff;color:#7468d6; }
.landscape-4 .landscape-character { background:#fff;color:#ee806d; }
.landscape-star { position:absolute;right:23%;bottom:25px;color:white;font-size:23px;font-style:normal;text-shadow:0 0 10px white; }
.mission-caption { display:block;margin:0 0 4px;color:#8796b0;font-size:9px;font-weight:1000;letter-spacing:.2em; }
.mission-card h3 { margin:4px 0 6px;font-size:17px; }
.mission-card p { margin:0 auto 9px;min-height:37px;color:#667c96;font-size:13px;line-height:1.45; }
.mission-card .stars-row { color:#f2b83f;font-size:15px;letter-spacing:4px; }
.map-footer { display:flex;align-items:center;justify-content:center;gap:11px;margin:7px auto 0;padding:10px 19px;border:1px solid rgba(255,255,255,.9);border-radius:18px;background:rgba(255,255,255,.72);color:#607893;font-size:13px;box-shadow:0 9px 23px rgba(62,86,131,.08); }
.map-footer-pixi { width:30px;height:30px;display:grid;place-items:center;border-radius:10px;background:#8275e8;color:white;font-weight:1000; }
.map-footer strong { color:#4e4b9d; }.map-stars { margin-left:12px;color:#edb640;font-size:20px;letter-spacing:4px; }

@media (max-width: 980px) {
  .welcome-scene { padding:28px; }
  .hero-world { min-height:350px; }
  .hero-moon { width:min(42vw,320px); }
  .mission-card { min-height:320px; }
}
@media (max-width: 650px) {
  .welcome-scene { grid-template-columns:1fr;gap:0;min-height:100%;padding:27px 22px;border-radius:25px; }
  .welcome-scene h1 { font-size:clamp(66px,18vw,92px); }
  .hero-kicker { font-size:9px;letter-spacing:.11em; }
  .hero-subtitle { margin-top:14px;font-size:20px; }
  .hero-story { font-size:15px; }
  .hero-promises { gap:8px;font-size:10px; }
  .hero-world { min-height:270px;margin-top:-3px; }
  .hero-moon { width:240px; }
  .hero-ring { width:290px;height:100px; }
  .hero-orbit { width:190px;height:190px; }.orbit-two { width:245px;height:245px; }
  .hero-pixi { transform:scale(.76) translateY(-5%); }
  .hero-board { top:4%;right:6%;transform:scale(.72) rotate(9deg); }
  .pixi-speech { right:0;bottom:1%;font-size:11px; }
  .mission-map { padding-top:4px; }
  .map-heading h2 { font-size:33px; }
  .map-heading p { font-size:13px; }
  .map-four { grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;overflow:visible;padding:2px; }
  .mission-card { min-height:285px;padding-bottom:12px; }
  .mission-card:nth-child(even) { --card-rise:5px; }
  .mission-landscape { height:105px; }
  .landscape-character { width:54px;height:54px;font-size:27px; }
  .mission-card h3 { font-size:14px; }
  .mission-card p { font-size:12px; }
  .map-footer { align-items:flex-start;font-size:11px;padding:9px 10px; }
  .map-stars { display:none; }
}
@media (min-width: 651px) and (max-height: 600px) {
  .app-shell { grid-template-rows:54px minmax(0,1fr) 58px; }
  .topbar { padding:5px 20px; }
  .bottombar { padding:5px 20px; }
  .stage { padding:6px 20px; }
  .welcome-scene { grid-template-columns:minmax(0,1.1fr) minmax(240px,.9fr);gap:8px;padding:8px 26px; }
  .welcome-scene h1 { margin-top:7px;font-size:clamp(48px,6.6vw,65px); }
  .welcome-scene h1 span { padding:4px 8px 8px 4px; }
  .hero-kicker { font-size:9px; }
  .hero-subtitle { margin:7px 0 4px;font-size:18px; }
  .hero-story { font-size:13px;line-height:1.32; }
  .welcome-scene .hero-cta { margin-top:10px;padding:5px 6px 5px 15px;font-size:12px; }
  .welcome-scene .hero-cta b { width:32px;height:32px; }
  .hero-promises { gap:8px;margin-top:9px;font-size:9px; }
  .hero-world { min-height:250px; }
  .hero-world .hero-pixi { width:250px;height:250px;transform:scale(.72); }
  .hero-board { transform:scale(.75) rotate(9deg); }
}

.objectives-scene { max-width:1100px;display:grid;align-content:center;justify-items:center;text-align:center;padding:18px 0; }
.objectives-scene h2 { margin:3px 0 7px; }
.objectives-intro { margin:0 0 18px;color:#607893; }
.objectives-grid { width:100%;display:grid;grid-template-columns:repeat(5,1fr);gap:10px; }
.objective-card { min-height:130px;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;text-align:left;padding:14px;border:1px solid white;border-radius:20px;background:rgba(255,255,255,.82);box-shadow:0 10px 24px rgba(58,75,125,.09); }
.objective-card>span { color:var(--violet);font-size:11px;font-weight:1000;letter-spacing:.1em; }
.objective-card strong { display:block;font-size:15px;line-height:1.25; }
.objective-card small { display:block;margin-top:5px;color:#6b819a;font-size:12px;line-height:1.35; }
.objective-card>b { align-self:flex-end;color:#edb640;font-size:17px; }
.classroom-route { display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin:18px 0;padding:13px;border-radius:16px;background:rgba(255,255,255,.64);color:#516a87;font-size:12px; }
.classroom-route strong { flex-basis:100%;color:#4e4b9d;font-size:13px; }
.classroom-route span { padding:5px 8px;border-radius:10px;background:white;font-weight:700; }
.classroom-route i { color:var(--violet);font-style:normal;font-weight:900; }
.objectives-start { margin-top:3px; }
.usb-hotspot { position:absolute;top:-16px;left:50%;z-index:5;transform:translateX(-50%);padding:5px 11px;border:3px solid white;border-radius:9px 9px 4px 4px;background:#ffca58;color:#4e421b;font-size:11px;font-weight:1000;box-shadow:0 5px 12px rgba(24,53,95,.2); }
.thinking-check { margin-top:13px;padding:12px;border-radius:15px;background:#fff8df;text-align:left;font-size:14px; }
.thinking-check strong { color:#6b592a; }
.inline-feedback { min-height:20px;margin-top:8px;color:#526d88;font-size:13px;font-weight:700; }
.challenge-label { display:inline-block;margin-right:5px;padding:5px 8px;border-radius:8px;background:#fff0bf;color:#7a5a10;font-size:10px;font-weight:1000;letter-spacing:.08em; }
.block-lesson { display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:1120px;margin:12px auto;text-align:left; }
.block-explainer { display:flex;align-items:center;gap:14px;padding:10px 14px;border-radius:16px;background:#fff;box-shadow:0 8px 18px rgba(45,87,128,.07); }
.block-explainer .code-block { flex:none; }
.block-explainer p { margin:0;color:#5d748d;font-size:13px; }
.block-explainer p strong { color:var(--ink); }
.code-block.loop { background:#49af72; }
.block-prediction { max-width:1120px;margin:12px auto;text-align:left; }
.block-prediction>strong { color:#6a592b; }
.icon-picker[hidden] { display:none; }
.icon-picker { margin:12px auto; }
.icon-picker .pattern-row { justify-content:flex-start; }
.first-light p { margin:5px 0 0;color:#627891;font-size:13px; }
.pause-lesson { display:grid;gap:7px;margin:12px 0; }
.pause-lesson>div { display:grid;grid-template-columns:135px 1fr;gap:10px;align-items:center;padding:9px 12px;border-radius:13px;background:#f5f2ff;color:#617791;font-size:13px; }
.pause-lesson strong { color:#554aa4; }
.done-check input:disabled { cursor:not-allowed; }
.editor-instruction { max-width:500px;color:#607893;font-size:14px; }
.challenge-levels { display:grid;gap:5px;margin-top:12px;color:#657b94;font-size:12px;font-weight:800; }
.challenge-levels span { padding:7px 10px;border-radius:10px;background:rgba(255,255,255,.8); }
.quiz-scene { position:relative;max-width:850px;display:grid;align-content:center;justify-items:center;text-align:center;padding:20px 0; }
.quiz-mascot { position:absolute;top:15px;right:4%;width:48px;height:48px;display:grid;place-items:center;border:4px solid white;border-radius:16px;background:var(--lavender);color:white;font-size:22px;font-weight:1000;box-shadow:var(--shadow); }
.quiz-scene h2 { max-width:720px;margin:15px 0 22px; }
.quiz-progress { display:flex;gap:7px;margin:5px 0; }
.quiz-progress span { width:29px;height:8px;border-radius:9px;background:#d6e0e9; }
.quiz-progress .current { background:var(--violet); }.quiz-progress .passed { background:var(--turquoise); }
.quiz-options { width:min(660px,100%);display:grid;grid-template-columns:repeat(3,1fr);gap:12px; }
.quiz-option { min-height:106px;display:grid;align-content:center;justify-items:center;gap:8px;padding:14px;border:2px solid white;border-radius:20px;background:#fff;box-shadow:0 12px 25px rgba(54,73,125,.1);color:var(--ink);font-weight:900;transition:.18s; }
.quiz-option:hover:not(:disabled) { transform:translateY(-4px);border-color:#b6aaff; }
.quiz-option>span { width:31px;height:31px;display:grid;place-items:center;border-radius:11px;background:#f0edff;color:#6558bf; }
.quiz-option.correct { border-color:#4bcdb5;background:#eafff6; }.quiz-option.correct>span { background:#4bcdb5;color:white; }
.quiz-option.wrong { border-color:#ff827f;background:#fff0ef; }
.quiz-option:disabled { cursor:default; }
.quiz-feedback { width:min(660px,100%);min-height:60px;margin-top:18px;padding:14px;border-radius:16px;background:#fff8df;color:#65572e;line-height:1.5; }
.quiz-feedback strong { margin-right:4px; }
.quiz-result { min-height:100%;display:grid;align-content:center;justify-items:center;text-align:center; }
.score-orb { width:156px;height:156px;display:flex;align-items:center;justify-content:center;gap:4px;margin:12px;border:10px solid white;border-radius:50%;background:linear-gradient(145deg,#ffe880,#ffc669);box-shadow:0 18px 40px rgba(213,173,63,.24);color:#53436c; }
.score-orb strong { font-size:66px;line-height:1; }.score-orb span { align-self:center;margin-top:24px;font-weight:900; }
.quiz-result h2 { margin:9px 0; }.quiz-result>p { max-width:550px;color:#607893; }
.quiz-result-actions { display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:14px; }
.quiz-score-line { color:#617791; }
.quiz-score-line strong { color:#6255bd; }

@media (max-width: 980px) {
  .objectives-grid { grid-template-columns:repeat(3,1fr); }
  .objectives-scene { align-content:start; }
  .first-light { grid-template-columns:1fr; }
  .block-explainer { align-items:flex-start;flex-direction:column; }
}
@media (max-width: 650px) {
  .objectives-grid { grid-template-columns:1fr 1fr; }
  .objective-card { min-height:114px;padding:10px; }
  .objective-card strong { font-size:13px; }
  .objective-card small { font-size:11px; }
  .classroom-route { gap:5px;font-size:10px; }
  .classroom-route span { padding:4px 6px; }
  .block-lesson { grid-template-columns:1fr; }
  .pause-lesson>div { grid-template-columns:1fr;gap:3px; }
  .quiz-options { grid-template-columns:1fr; }
  .quiz-option { min-height:68px;grid-template-columns:35px 1fr;justify-items:start;text-align:left; }
  .quiz-option>span { grid-row:1; }
  .quiz-mascot { top:0;right:0;width:38px;height:38px; }
}
@media print {
  @page { margin:14mm; }
  html,body { height:auto; }
  .homework-grid { break-inside:avoid; }
  .homework-grid .led { print-color-adjust:exact;-webkit-print-color-adjust:exact; }
  .homework-grid .led:not(.on) { background:white !important; }
  .homework-grid .led.on { background:#444 !important; }
  .scene.editor-layout>div:last-child { color:#111; }
  .scene.editor-layout>div:last-child p { color:#222; }
}
.print-workspace { display:none; }
.print-workspace>strong { display:block;margin:12px 0;color:#333; }
.print-workspace>div { display:inline-grid;justify-items:center;gap:7px;width:47%;margin:1%;padding:10px;border:1px solid #bbb;border-radius:10px; }
.print-workspace>div>span { font-weight:800; }
.print-workspace .led-matrix { grid-template-columns:repeat(5,24px);grid-template-rows:repeat(5,24px);gap:4px; }
.print-workspace .led { width:24px;height:24px;border:1px solid #777;background:white; }
.print-workspace .led.on { background:#444; }

html.presentation-mode, html.presentation-mode body { width:100%;height:100%; }
html.presentation-mode .app-shell { height:100dvh;grid-template-rows:58px minmax(0,1fr) 58px; }
html.presentation-mode .topbar { padding:5px 24px; }
html.presentation-mode .bottombar { padding:5px 24px; }
html.presentation-mode .stage { overflow:hidden;padding:8px 24px; }
html.presentation-mode .scene { height:100%;min-height:0; }
html.presentation-mode .scene-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px; }
html.presentation-mode .scene-grid h2 { font-size:clamp(30px,3vw,42px);margin:4px 0 8px; }
html.presentation-mode .scene-grid .lead { font-size:16px;line-height:1.35; }
html.presentation-mode .component-panel { min-height:0;padding:12px; }
html.presentation-mode .component-panel h3 { margin:2px 0 5px; }
html.presentation-mode .component-panel p { margin:5px 0;font-size:14px;line-height:1.35; }
html.presentation-mode .two-card-row { gap:8px;margin-top:8px; }
html.presentation-mode .info-card { padding:8px;font-size:13px; }
html.presentation-mode .thinking-check { margin-top:8px;padding:8px;font-size:13px; }
html.presentation-mode .board-demo { gap:12px; }
html.presentation-mode .board-demo .micro-board-wrap, html.presentation-mode .board-demo .micro-back { width:min(440px,82%); }
html.presentation-mode .phase-two { display:flex;flex-direction:column;justify-content:center; }
html.presentation-mode .phase-two h2 { margin:2px 0 5px;font-size:clamp(30px,3vw,42px); }
html.presentation-mode .phase-two .eyebrow { margin-bottom:5px; }
html.presentation-mode .phase-two .lead { margin:0 auto 5px;font-size:14px;line-height:1.3; }
html.presentation-mode .phase-two .makecode-layout { flex:none;height:145px;margin:5px auto;gap:8px; }
html.presentation-mode .phase-two .makecode-zone { padding:7px;overflow:hidden; }
html.presentation-mode .phase-two .zone-title { margin-bottom:4px;font-size:10px; }
html.presentation-mode .phase-two .makecode-zone p { margin:3px 0 0;font-size:11px;line-height:1.2; }
html.presentation-mode .phase-two .makecode-zone .workspace, html.presentation-mode .phase-two .simulator { height:82px;padding:6px; }
html.presentation-mode .phase-two .workspace .code-block { margin:3px 0;padding:6px 8px;font-size:11px; }
html.presentation-mode .phase-two .first-light { min-height:0;margin:5px auto;padding:7px 10px;gap:8px;font-size:13px; }
html.presentation-mode .phase-two .small-quiz .quiz-card { min-height:40px;padding:6px;font-size:11px; }
html.presentation-mode .phase-two .block-lesson { gap:8px;margin:5px auto; }
html.presentation-mode .phase-two .block-explainer { align-items:center;flex-direction:row;gap:8px;padding:6px 8px; }
html.presentation-mode .phase-two .block-explainer .code-block { margin:0;padding:7px 8px;font-size:12px; }
html.presentation-mode .phase-two .block-explainer p { font-size:11px;line-height:1.25; }
html.presentation-mode .phase-two .block-prediction { margin:5px auto;padding:7px;font-size:12px; }
html.presentation-mode .phase-two .prediction-choices { margin-top:4px; }
html.presentation-mode .phase-two .pixel-button { padding:7px 9px;font-size:12px; }
html.presentation-mode .phase-two .inline-feedback { min-height:14px;margin-top:3px;font-size:11px; }
html.presentation-mode .phase-two .makecode-link { margin:3px auto;padding:7px 10px;font-size:12px; }
html.presentation-mode .phase-two .small-note { margin:2px 0 0;font-size:11px; }
html.presentation-mode .project-layout { grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:18px; }
html.presentation-mode .project-layout h2 { margin:3px 0 8px;font-size:clamp(30px,3vw,42px); }
html.presentation-mode .project-layout .subtitle { margin:0 0 8px;font-size:15px;line-height:1.35; }
html.presentation-mode .code-sequence { padding:7px; }
html.presentation-mode .code-block { margin:4px 0;padding:7px 9px;font-size:13px; }
html.presentation-mode .sequence-inner { padding:2px 10px; }
html.presentation-mode .pause-lesson { gap:4px;margin:6px 0; }
html.presentation-mode .pause-lesson>div { grid-template-columns:115px 1fr;gap:7px;padding:6px 8px;font-size:11px; }
html.presentation-mode .project-preview { padding:12px; }
html.presentation-mode .heart-stage { height:145px; }
html.presentation-mode .heart-stage .led-matrix { grid-template-columns:repeat(5,25px);grid-template-rows:repeat(5,25px);gap:4px; }
html.presentation-mode .heart-stage .led { width:25px;height:25px; }
html.presentation-mode .timeline { gap:4px;font-size:11px; }
html.presentation-mode .timeline-chip { padding:5px 7px; }
html.presentation-mode .prediction-box { margin-top:7px;padding:8px;font-size:12px; }
html.presentation-mode .project-preview .pixel-button { padding:7px 9px;font-size:11px; }
html.presentation-mode .project-preview .feedback { min-height:0;margin-top:5px;padding:6px 8px;font-size:11px; }
html.presentation-mode .confirmationStatus { min-height:0;margin-top:4px;font-size:11px; }
html.presentation-mode .done-check { margin-top:5px;padding:7px;font-size:12px; }
html.presentation-mode .editor-layout { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px; }
html.presentation-mode .editor-panel { padding:12px; }
html.presentation-mode .editor-panel h2 { margin:3px 0 6px;font-size:clamp(30px,3vw,42px); }
html.presentation-mode .editor-instruction { margin:4px 0;font-size:12px;line-height:1.3; }
html.presentation-mode .editor-panel .editable-grid { grid-template-columns:repeat(5,34px);grid-template-rows:repeat(5,34px);gap:5px; }
html.presentation-mode .editor-panel .pixel { width:34px;height:34px; }
html.presentation-mode .frame-controls { margin-top:6px; }
html.presentation-mode .frame-controls .pattern-button, html.presentation-mode .editor-panel .pattern-button { padding:6px 8px;font-size:11px; }
html.presentation-mode .editor-layout h3 { margin:4px 0;font-size:16px; }
html.presentation-mode .editor-layout>div:last-child>p { margin:5px 0;font-size:12px;line-height:1.3; }
html.presentation-mode .homework-grid { margin:5px 0;gap:6px; }
html.presentation-mode .homework-grid>div { padding:5px; }
html.presentation-mode .homework-grid .led-matrix { grid-template-columns:repeat(5,12px);grid-template-rows:repeat(5,12px);gap:2px;margin:4px auto 0; }
html.presentation-mode .homework-grid .led { width:12px;height:12px; }
html.presentation-mode .show-leds { margin-top:5px;padding:6px;font-size:11px; }
html.presentation-mode .editor-layout .thinking-check { margin-top:5px;padding:6px;font-size:11px; }
html.presentation-mode .editor-layout .thinking-check .pixel-button { padding:6px 8px;font-size:10px; }
html.presentation-mode .editor-layout .inline-feedback { min-height:0;margin-top:3px;font-size:10px; }
html.presentation-mode .finish-actions { margin:5px 0; }
html.presentation-mode .finish-actions .pixel-button, html.presentation-mode .finish-actions .primary-button { padding:7px 9px;font-size:11px; }
html.presentation-mode .editor-layout .feedback { min-height:0;margin:5px 0;padding:6px 8px;font-size:11px; }
html.presentation-mode .challenge-levels { grid-template-columns:repeat(3,1fr);gap:4px;margin-top:5px;font-size:9px; }
html.presentation-mode .challenge-levels span { padding:5px; }
html.presentation-mode .objectives-scene { justify-content:center;padding:8px 0; }
html.presentation-mode .objectives-scene h2 { font-size:clamp(34px,4vw,48px); }
html.presentation-mode .objective-card { min-height:105px;padding:10px; }
html.presentation-mode .classroom-route { margin:10px 0;padding:8px; }
html.presentation-mode .mission-map { gap:8px;padding:4px 0; }
html.presentation-mode .map-heading h2 { font-size:clamp(34px,4vw,48px); }
html.presentation-mode .map-four { gap:10px; }
html.presentation-mode .mission-card { min-height:0;padding:10px 8px; }
html.presentation-mode .mission-landscape { height:90px;margin:-7px -7px 8px; }
html.presentation-mode .mission-number { width:34px;height:34px;margin-bottom:5px; }
html.presentation-mode .mission-card h3 { margin:4px 0;font-size:14px; }
html.presentation-mode .mission-card p { margin:4px 0;font-size:11px; }
html.presentation-mode .map-footer { padding:7px 10px; }
html.presentation-mode .quiz-scene { padding:8px 0; }
html.presentation-mode .quiz-scene h2 { margin:8px 0 12px;font-size:clamp(30px,3.8vw,46px); }
html.presentation-mode .quiz-option { min-height:78px;padding:9px; }
html.presentation-mode .quiz-feedback { min-height:0;margin-top:8px;padding:9px; }
html.presentation-mode .score-orb { width:120px;height:120px; }
html.presentation-mode .score-orb strong { font-size:52px; }

@media (max-height: 620px) {
  html.presentation-mode .app-shell { grid-template-rows:48px minmax(0,1fr) 48px; }
  html.presentation-mode .topbar, html.presentation-mode .bottombar { padding:3px 16px; }
  html.presentation-mode .stage { padding:4px 16px; }
  html.presentation-mode .phase-two .makecode-layout { height:125px; }
  html.presentation-mode .phase-two .makecode-zone .workspace, html.presentation-mode .phase-two .simulator { height:68px; }
  html.presentation-mode .heart-stage { height:110px; }
  html.presentation-mode .editor-panel .editable-grid { grid-template-columns:repeat(5,29px);grid-template-rows:repeat(5,29px);gap:4px; }
  html.presentation-mode .editor-panel .pixel { width:29px;height:29px; }
}
@media print {
  .print-workspace { display:block;break-inside:avoid;margin-top:18px;color:#111; }
  .print-workspace .led.on { background:#444 !important; }
  .print-workspace .led:not(.on) { background:white !important; }
}

html.presentation-mode .phase-two {
  display:grid;
  grid-template-rows:auto auto auto auto auto auto auto;
  align-content:center;
  justify-items:stretch;
  gap:8px;
  width:min(1220px,100%);
  height:100%;
  text-align:center;
}
html.presentation-mode .phase-two .eyebrow { margin:0; }
html.presentation-mode .phase-two h2 { margin:0;font-size:clamp(34px,3.4vw,48px); }
html.presentation-mode .phase-two .lead { max-width:860px;margin:0 auto 2px;font-size:15px;line-height:1.35; }
html.presentation-mode .phase-two .makecode-layout {
  width:100%;
  height:clamp(130px,21vh,158px);
  margin:0;
  gap:12px;
}
html.presentation-mode .phase-two .makecode-zone {
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:10px;
  border:1px solid rgba(120,104,216,.1);
  border-radius:20px;
  overflow:visible;
  text-align:left;
}
html.presentation-mode .phase-two .zone-title { margin:0 0 5px;font-size:11px; }
html.presentation-mode .phase-two .simulator {
  flex:1;
  min-height:0;
  height:auto;
  padding:2px;
  border-radius:14px;
  background:#f3f9ff;
}
html.presentation-mode .phase-two .simulator .led-matrix { grid-template-columns:repeat(5,14px);grid-template-rows:repeat(5,14px);gap:4px; }
html.presentation-mode .phase-two .simulator .led { width:14px;height:14px;background:#dcebf2;border:0; }
html.presentation-mode .phase-two .simulator .led.on { background:var(--led-on); }
html.presentation-mode .phase-two .makecode-zone p { margin:4px 0 0;font-size:12px;line-height:1.2; }
html.presentation-mode .phase-two .toolbox-block { margin:3px 0;padding:6px 9px;border-radius:9px;font-size:12px; }
html.presentation-mode .phase-two .workspace { flex:1;min-height:0;height:auto;padding:7px;background:#fbfdff; }
html.presentation-mode .phase-two .workspace .code-block { margin:3px 0;padding:7px 9px;font-size:12px; }
html.presentation-mode .phase-two .first-light {
  width:100%;
  min-height:0;
  margin:0;
  padding:9px 13px;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  gap:14px;
  border:1px solid rgba(233,187,68,.22);
  border-radius:18px;
}
html.presentation-mode .phase-two .first-light-copy { min-width:0; }
html.presentation-mode .phase-two .first-light-heading { display:flex;align-items:center;flex-wrap:wrap;gap:7px; }
html.presentation-mode .phase-two .first-light-heading .challenge-label { margin:0;font-size:10px; }
html.presentation-mode .phase-two .first-light-copy>p { margin:5px 0 0;color:#435b76;font-size:14px;line-height:1.25; }
html.presentation-mode .phase-two .small-quiz { grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
html.presentation-mode .phase-two .small-quiz .quiz-card {
  min-width:0;
  min-height:48px;
  padding:8px;
  border:1px solid rgba(24,53,95,.08);
  border-radius:14px;
  font-size:12px;
  line-height:1.2;
  box-shadow:0 5px 12px rgba(45,87,128,.07);
}
html.presentation-mode .phase-two .block-lesson { width:100%;margin:0;gap:10px; }
html.presentation-mode .phase-two .block-explainer { min-width:0;padding:9px 11px; }
html.presentation-mode .phase-two .block-explainer .code-block { flex:none;margin:0;padding:8px 10px;font-size:12px; }
html.presentation-mode .phase-two .block-explainer p { font-size:12px;line-height:1.3; }
html.presentation-mode .phase-two .block-prediction {
  width:min(720px,100%);
  margin:0 auto;
  padding:9px 12px;
  border:1px solid rgba(233,187,68,.22);
  text-align:center;
  font-size:13px;
}
html.presentation-mode .phase-two .block-prediction .prediction-choices { margin-top:6px; }
html.presentation-mode .phase-two .block-prediction .pixel-button { padding:8px 12px;font-size:12px; }
html.presentation-mode .phase-two .block-prediction .inline-feedback { min-height:0;margin-top:4px;font-size:12px; }
html.presentation-mode .phase-two .icon-picker { grid-template-columns:minmax(0,1fr) auto; }
html.presentation-mode .phase-two .icon-picker .pattern-row { margin:0;gap:6px; }
html.presentation-mode .phase-two .icon-picker .pattern-button { padding:8px 10px;font-size:12px; }
html.presentation-mode .phase-two-actions { display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.8fr);align-items:center;gap:12px; }
html.presentation-mode .phase-two-access { display:flex;align-items:center;justify-content:center;gap:12px;min-width:0; }
html.presentation-mode .phase-two .makecode-link { flex:none;margin:0;padding:9px 13px;border-radius:13px;font-size:13px; }
html.presentation-mode .phase-two .small-note { margin:0;font-size:12px;line-height:1.3;text-align:left; }
html.presentation-mode .phase-two .feedback { min-height:0;margin:0;padding:9px 12px;border-radius:14px;font-size:13px;line-height:1.25;text-align:center; }
