:root {
  color-scheme: light;
  --navy: #082f4b;
  --navy-2: #0a4a66;
  --teal: #0c9bad;
  --teal-dark: #076678;
  --aqua: #8ce8df;
  --lime: #a9e52d;
  --lime-dark: #4e8614;
  --yellow: #ffd34a;
  --yellow-dark: #a96008;
  --coral: #ff6b5f;
  --coral-dark: #a82e31;
  --paper: #fffef2;
  --muted: #587082;
  --beam-angle: 0deg;
  --hanger-angle: 0deg;
  font-family: "Avenir Next Rounded", "Trebuchet MS", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; min-width: 1100px; min-height: 700px; overflow: hidden; }
body { margin: 0; color: var(--navy); background: #063e59; }
button { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 4px solid #fff298; outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.lesson { height: 100%; padding: 12px; }
.lab-world {
  position: relative;
  height: 100%;
  min-height: 676px;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid #07374f;
  border-radius: 30px;
  background: #87ded6 url("./assets/lab-backdrop-01.webp") center / cover no-repeat;
  box-shadow: inset 0 0 85px rgba(4,54,72,.18), 0 10px 0 #032a3d, 0 28px 70px rgba(0,25,40,.35);
}
.world-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg,rgba(6,83,101,.62) 0 11%,rgba(118,224,213,.08) 42%,rgba(5,73,91,.42) 100%); }
.lab-bubbles { position: absolute; z-index: 0; inset: 0; pointer-events: none; }
.lab-bubbles i { position: absolute; width: 10px; height: 10px; border: 2px solid rgba(255,255,255,.78); border-radius: 50%; box-shadow: 0 0 10px rgba(86,242,230,.5); animation: bubble-drift 4s ease-in-out infinite alternate; }
.lab-bubbles i:nth-child(1) { left: 8%; top: 24%; }.lab-bubbles i:nth-child(2) { left: 19%; top: 60%; animation-delay: -1.2s; }
.lab-bubbles i:nth-child(3) { left: 46%; top: 14%; animation-delay: -2.2s; }.lab-bubbles i:nth-child(4) { right: 21%; top: 32%; animation-delay: -.5s; }
.lab-bubbles i:nth-child(5) { right: 8%; top: 64%; animation-delay: -3s; }.lab-bubbles i:nth-child(6) { left: 62%; top: 67%; animation-delay: -1.8s; }

.hud { position: absolute; z-index: 30; left: 20px; right: 20px; top: 16px; height: 70px; display: grid; grid-template-columns: 220px 1fr auto auto; align-items: center; gap: 14px; }
.mission-chip,.trial-track,.difficulty-card,.scoreboard { border: 2px solid rgba(255,255,255,.78); background: rgba(7,76,96,.91); box-shadow: inset 0 1px rgba(255,255,255,.18), 0 5px 0 rgba(4,45,62,.8); backdrop-filter: blur(10px); }
.mission-chip { height: 68px; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 7px; border-radius: 19px; color: white; }
.mission-chip img { width: 54px; height: 54px; object-fit: contain; border-radius: 13px; mix-blend-mode: multiply; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.mission-chip span,.trial-track > span,.difficulty-card span,.scoreboard span { color: #bcebea; font-size: 10px; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.mission-chip strong { display: block; margin-top: 3px; font-size: 16px; }
.trial-track { justify-self: center; min-width: 330px; height: 68px; display: grid; place-content: center; gap: 7px; padding: 6px 18px; border-radius: 19px; text-align: center; }
.trial-track > div { display: flex; align-items: center; }
.trial-track i { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid #83cbd0; border-radius: 50%; color: #b9e7e6; background: #07536a; font-size: 12px; font-style: normal; font-weight: 1000; transition: transform 160ms ease-out,background 160ms ease-out; }
.trial-track b { width: 38px; height: 4px; background: #2b8b98; }
.trial-track i.is-current { transform: scale(1.16); border-color: #fff09a; color: var(--navy); background: var(--yellow); box-shadow: 0 0 0 5px rgba(255,222,75,.18),0 0 18px rgba(255,222,75,.55); }
.trial-track i.is-complete { border-color: #eaffad; color: var(--navy); background: var(--lime); }
.trial-track i.is-complete { font-size: 0; }.trial-track i.is-complete::before { content: "✓"; font-size: 16px; }
.difficulty-card { width: 220px; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 9px 14px; border-radius: 17px; color: white; }
.difficulty-card span b { color: #fff19b; font-size: 15px; }.difficulty-card strong { font-size: 11px; }
.difficulty-card > i { grid-column: 1 / -1; height: 8px; overflow: hidden; border-radius: 999px; background: #075069; }
.difficulty-card > i b { display: block; width: 18%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--lime),var(--yellow),var(--coral)); transition: width 220ms ease-out; }
.scoreboard { height: 68px; display: flex; align-items: stretch; padding: 6px; border-radius: 19px; color: white; }
.scoreboard > div { min-width: 68px; display: grid; place-content: center; padding: 0 9px; text-align: center; }
.scoreboard > div + div { border-left: 1px solid rgba(215,249,247,.22); }
.scoreboard strong { display: block; margin-top: 2px; font-size: 21px; line-height: 1; }.scoreboard strong i { color: var(--yellow); font-size: 15px; font-style: normal; }

.game-grid { position: absolute; z-index: 5; left: 20px; right: 20px; top: 101px; bottom: 18px; display: grid; grid-template-columns: 230px minmax(740px,1fr); gap: 18px; }
.scientist-zone { position: relative; min-width: 0; display: flex; align-items: end; justify-content: center; border: 2px solid rgba(255,255,255,.7); border-radius: 26px; background: linear-gradient(180deg,rgba(238,255,250,.88),rgba(130,226,215,.82)); box-shadow: inset 0 0 38px rgba(255,255,255,.28),0 7px 0 rgba(4,68,82,.55); }
.speech { position: absolute; z-index: 4; left: 12px; right: 12px; top: 16px; min-height: 73px; display: grid; place-items: center; padding: 12px 14px; border: 3px solid var(--navy); border-radius: 18px; color: var(--navy); background: var(--paper); box-shadow: 0 6px 0 var(--navy); font-size: 14px; font-weight: 950; line-height: 1.25; text-align: center; }
.speech::after { position: absolute; left: 48px; bottom: -15px; width: 21px; height: 21px; content: ""; transform: rotate(45deg); border-right: 3px solid var(--navy); border-bottom: 3px solid var(--navy); background: var(--paper); }
.scientist { position: absolute; z-index: 2; left: 50%; bottom: 45px; width: 235px; height: 430px; object-fit: contain; transform: translateX(-50%); transform-origin: 50% 90%; mix-blend-mode: multiply; filter: drop-shadow(0 8px 8px rgba(2,54,69,.18)); }
.beaker-prop { position: absolute; z-index: 3; left: 50%; bottom: 2px; width: 150px; height: 105px; object-fit: contain; transform: translateX(-50%); mix-blend-mode: multiply; }

.play-panel { min-width: 0; display: grid; grid-template-rows: 92px minmax(310px,1fr) 188px; padding: 14px 16px 16px; border: 2px solid rgba(255,255,255,.84); border-radius: 26px; background: rgba(255,254,242,.94); box-shadow: inset 0 1px white,0 8px 0 rgba(5,70,84,.58),0 18px 42px rgba(3,56,72,.23); transition: box-shadow 180ms ease-out; }
.challenge-header { min-width: 0; display: grid; grid-template-columns: minmax(210px,1fr) auto 190px; align-items: center; gap: 18px; padding: 0 8px 10px; border-bottom: 2px solid #c4e5df; }
.challenge-header > div:first-child { min-width: 0; }.challenge-header > div:first-child > span { color: var(--coral-dark); font-size: 10px; font-weight: 1000; letter-spacing: .11em; text-transform: uppercase; }
.challenge-header h1 { margin: 3px 0 3px; overflow: hidden; font-size: 29px; line-height: 1; letter-spacing: -.035em; white-space: nowrap; text-overflow: ellipsis; }
.challenge-header p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }
.equation { min-width: 250px; padding: 9px 19px 11px; border: 3px solid var(--navy); border-radius: 16px; color: var(--navy); background: white; box-shadow: inset 0 -5px #dff4ef,0 5px 0 var(--navy); font-size: 33px; font-weight: 1000; line-height: 1; text-align: center; }
.equation em { color: #087fc0; font-family: Georgia, serif; font-style: italic; }.equation b { margin: 0 13px; color: var(--teal-dark); }.equation .constant { color: var(--yellow-dark); }.equation .negative { color: var(--coral-dark); }
.balance-status { min-height: 56px; display: grid; grid-template-columns: 15px 1fr; align-items: center; gap: 10px; padding: 8px 11px; border: 2px solid #6bbf8a; border-radius: 15px; background: #effff2; box-shadow: 0 4px 0 #a3d0ae; }
.balance-status > i { width: 13px; height: 13px; border: 3px solid white; border-radius: 50%; background: #39b563; box-shadow: 0 0 0 2px #39b563,0 0 10px #5ce98b; }
.balance-status strong,.balance-status span { display: block; }.balance-status strong { color: #17643a; font-size: 13px; }.balance-status span { margin-top: 2px; color: #4d715b; font-size: 9px; font-weight: 800; }
.balance-status[data-kind="tilted"] { border-color: #ed8c82; background: #fff1ee; box-shadow: 0 4px 0 #e3b1aa; }.balance-status[data-kind="tilted"] > i { background: var(--coral); box-shadow: 0 0 0 2px var(--coral),0 0 10px #ff9c91; }.balance-status[data-kind="tilted"] strong { color: var(--coral-dark); }

.scale-stage { position: relative; min-height: 310px; overflow: hidden; border: 2px solid #7fc8c2; border-radius: 20px; background: radial-gradient(circle at 50% 54%,rgba(255,255,255,.92),rgba(193,239,230,.7) 66%,rgba(80,179,180,.36)); box-shadow: inset 0 0 35px rgba(8,100,116,.14),0 4px 0 #91c9c3; }
.scale-stage::after { position: absolute; z-index: 0; left: 12%; right: 12%; bottom: -23%; height: 52%; content: ""; transform: perspective(360px) rotateX(64deg); border: 3px solid rgba(10,122,139,.19); border-radius: 50%; background: radial-gradient(circle,rgba(14,173,181,.2),transparent 66%); }
.scan-ring { position: absolute; z-index: 0; left: 50%; bottom: -88px; width: 470px; height: 170px; transform: translateX(-50%); border: 3px solid rgba(6,134,151,.2); border-radius: 50%; box-shadow: inset 0 0 0 12px rgba(83,214,203,.08),0 0 28px rgba(16,164,176,.18); }
.scale { position: absolute; z-index: 3; inset: 8px 24px 0; }
.stand { position: absolute; z-index: 4; left: 50%; bottom: 29px; width: 112px; height: 72%; transform: translateX(-50%); border: 5px solid var(--navy); border-bottom-width: 9px; border-radius: 48px 48px 10px 10px; background: linear-gradient(90deg,#08768f,#18b7ba 42%,#07849b); box-shadow: inset 10px 0 rgba(255,255,255,.18),0 7px 0 #042e4a; }
.pivot { position: absolute; z-index: 8; top: -22px; left: 50%; width: 68px; height: 68px; display: grid; place-items: center; transform: translateX(-50%); border: 7px solid var(--navy); border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 5px #ffef9d,0 5px 0 #052e49; }.pivot i { width: 20px; height: 20px; border: 4px solid #875010; border-radius: 50%; background: white; }
.level-light { position: absolute; top: 76px; left: 50%; width: 68px; height: 30px; display: flex; align-items: center; justify-content: space-around; transform: translateX(-50%); border: 2px solid var(--navy); border-radius: 9px; background: #052f4a; }.level-light i { width: 9px; height: 9px; border-radius: 50%; background: #527187; }.level-light i:nth-child(2) { height: 18px; border-radius: 4px; background: var(--lime); box-shadow: 0 0 10px #baff50; }
.balance[data-outcome="left-heavy"] .level-light i:first-child,.balance[data-outcome="right-heavy"] .level-light i:last-child { background: var(--coral); box-shadow: 0 0 10px #ff877e; }
.beam { position: absolute; z-index: 7; top: 48px; left: 7%; width: 86%; height: 28px; transform: rotate(var(--beam-angle)); transform-origin: 50% 50%; border: 4px solid var(--navy); border-radius: 10px; background: linear-gradient(180deg,#ffe881,#ffc22d 54%,#e89013); box-shadow: inset 0 5px rgba(255,255,255,.45),0 6px 0 #8c4a0b; transition: transform 520ms cubic-bezier(.2,.8,.2,1.15); }
.beam::before { position: absolute; inset: 6px 48%; content: ""; border-radius: 2px; background: #84500e; }
.hanger { position: absolute; top: 18px; width: 330px; height: 226px; transform: rotate(var(--hanger-angle)); transform-origin: 50% 0; transition: transform 520ms cubic-bezier(.2,.8,.2,1.15); }.hanger-left { left: -4%; }.hanger-right { right: -4%; }
.hanger > i { position: absolute; top: 0; width: 3px; height: 55%; transform-origin: top; background: var(--navy); }.hanger > i:first-child { left: 17%; transform: rotate(16deg); }.hanger > i:nth-child(2) { right: 17%; transform: rotate(-16deg); }
.pan { position: absolute; left: 0; right: 0; bottom: 0; height: 116px; border: 4px solid var(--navy); border-top-width: 8px; border-radius: 12px 12px 47% 47%; background: linear-gradient(180deg,#f7ffff,#c6f0e9); box-shadow: inset 0 -13px #9edbd3,0 8px 0 rgba(5,49,69,.3); }
.pan > span { position: absolute; left: 50%; bottom: -22px; min-width: 100px; padding: 4px 9px; transform: translateX(-50%); border-radius: 7px; color: white; background: var(--navy); font-size: 9px; font-weight: 1000; letter-spacing: .08em; text-align: center; }
.pieces { position: absolute; inset: 8px 11px 12px; display: flex; flex-wrap: wrap-reverse; align-content: flex-start; align-items: end; justify-content: center; gap: 5px; }
.piece { flex: 0 0 auto; display: grid; place-items: center; font-style: normal; font-weight: 1000; animation: piece-in 200ms ease-out both; }
.x-piece { width: 50px; height: 50px; border: 3px solid #053a6a; border-radius: 11px; color: white; background: linear-gradient(145deg,#1cbcff,#087bc8); box-shadow: inset 5px 5px rgba(255,255,255,.25),0 4px #053a6a,0 0 12px rgba(25,178,240,.42); font-family: Georgia, serif; font-size: 27px; font-style: italic; }
.unit-piece,.lift-piece { width: 29px; height: 29px; border: 2px solid #9b5c05; border-radius: 7px; color: #5c3800; background: var(--yellow); box-shadow: inset 3px 3px rgba(255,255,255,.4),0 3px #9b5c05; font-size: 11px; }.lift-piece { border-color: var(--coral-dark); color: white; background: var(--coral); box-shadow: inset 3px 3px rgba(255,255,255,.23),0 3px var(--coral-dark); }
.number-weight { min-width: 54px; height: 48px; padding: 0 10px; border: 3px solid #9b5c05; border-radius: 11px; color: #5b3500; background: var(--yellow); box-shadow: inset 4px 4px rgba(255,255,255,.34),0 4px #9b5c05; font-size: 21px; }.number-weight.is-negative { border-color: var(--coral-dark); color: white; background: var(--coral); box-shadow: 0 4px var(--coral-dark); }
.base { position: absolute; z-index: 3; left: 8%; right: 8%; bottom: 0; height: 37px; border: 4px solid var(--navy); border-radius: 11px; background: linear-gradient(180deg,#22b8bc,#087f96); box-shadow: inset 0 7px rgba(255,255,255,.15),0 6px #052f4a; text-align: center; }.base span { display: inline-block; margin-top: 8px; color: white; font-size: 9px; font-weight: 1000; letter-spacing: .12em; text-transform: uppercase; }
.operation-flight { position: absolute; z-index: 15; inset: 0; pointer-events: none; }.operation-flight b { position: absolute; top: 43%; min-width: 64px; padding: 9px; opacity: 0; border: 3px solid var(--navy); border-radius: 12px; color: var(--navy); background: var(--lime); box-shadow: 0 5px var(--navy); font-size: 19px; text-align: center; }.operation-flight b:first-child { left: 47%; }.operation-flight b:last-child { right: 47%; }.operation-flight.is-flying b:first-child { animation: fly-left 680ms ease-out; }.operation-flight.is-flying b:last-child { animation: fly-right 680ms ease-out; }
.highlight-both .pan { animation: pan-pulse 510ms ease-out 3; }.demo-left .beam { animation: demo-left 800ms ease-in-out; }.demo-right .beam { animation: demo-right 800ms ease-in-out; }
.celebration-burst { position: absolute; z-index: 20; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }.celebration-burst i { position: absolute; width: 12px; height: 12px; opacity: 0; border-radius: 3px; background: var(--yellow); animation: burst 760ms ease-out both; }.celebration-burst i:nth-child(2n) { background: var(--coral); }.celebration-burst i:nth-child(3n) { border-radius: 50%; background: var(--lime); }

.decision-card { min-width: 0; display: grid; grid-template-columns: 270px minmax(0,1fr); align-items: center; gap: 20px; padding: 13px 8px 0; }
.prompt-copy > span { color: var(--coral-dark); font-size: 9px; font-weight: 1000; letter-spacing: .11em; text-transform: uppercase; }.prompt-copy h2 { margin: 3px 0 5px; font-size: 24px; line-height: 1.04; letter-spacing: -.025em; }.prompt-copy p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.3; }
.decision-content { min-width: 0; display: flex; align-items: center; justify-content: center; }.move-options,.prediction-options,.value-options,.explain-options { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.move,.prediction,.value-options button,.explain-options button { position: relative; min-height: 92px; display: grid; align-items: center; gap: 9px; padding: 11px 13px; border: 3px solid #58afb4; border-radius: 16px; background: linear-gradient(180deg,#f9ffff,#d9f4ef); box-shadow: inset 0 2px white,0 6px 0 #167887; cursor: pointer; text-align: left; transition: transform 140ms ease-out,box-shadow 140ms ease-out,filter 140ms ease-out; }
.move { grid-template-columns: 69px 1fr; }.move b { min-height: 51px; display: grid; place-items: center; border: 3px solid var(--navy); border-radius: 12px; color: var(--navy); background: var(--lime); box-shadow: 0 3px var(--navy); font-size: 18px; }.move span { font-size: 13px; font-weight: 950; line-height: 1.2; }.move.is-risky { border-color: #ec8d84; background: linear-gradient(180deg,#fff8f5,#ffe1dc); box-shadow: inset 0 2px white,0 6px 0 #b34a45; }.move.is-risky b { color: white; background: var(--coral); }
.prediction { grid-template-columns: 52px 1fr; }.prediction b { width: 49px; height: 49px; display: grid; place-items: center; border: 3px solid var(--navy); border-radius: 50%; color: var(--navy); background: var(--yellow); font-size: 23px; }.prediction strong,.prediction small { display: block; }.prediction strong { font-size: 13px; }.prediction small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 750; }
.move:hover,.prediction:hover,.value-options button:hover,.explain-options button:hover { transform: translateY(-3px); filter: brightness(1.04); box-shadow: inset 0 2px white,0 9px 0 #167887; }.move.is-risky:hover { box-shadow: inset 0 2px white,0 9px 0 #b34a45; }
.value-options button { grid-template-columns: 54px 1fr; }.value-options b { width: 51px; height: 51px; display: grid; place-items: center; border: 3px solid var(--navy); border-radius: 13px; color: white; background: #0a91c6; box-shadow: 0 3px var(--navy); font-size: 23px; }.value-options span { font-size: 10px; font-weight: 850; line-height: 1.2; }
.explain-options button { display: block; font-size: 12px; font-weight: 950; text-align: center; }.explain-options small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.2; }
.test-button { width: min(520px,100%); min-height: 96px; display: grid; grid-template-columns: 64px 1fr; align-items: center; padding: 12px 28px; border: 3px solid var(--navy); border-radius: 18px; color: var(--navy); background: linear-gradient(180deg,#c5f452,#8fd221); box-shadow: inset 0 2px rgba(255,255,255,.55),0 8px var(--navy); text-align: left; }.test-button i { width: 56px; height: 56px; display: grid; place-items: center; border: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); font-size: 27px; font-style: normal; }.test-button small,.test-button strong { display: block; }.test-button small { font-size: 9px; font-weight: 1000; letter-spacing: .1em; text-transform: uppercase; }.test-button strong { margin-top: 2px; font-size: 23px; }
.watching { display: flex; align-items: center; gap: 15px; color: var(--teal-dark); font-size: 19px; font-weight: 1000; }.watching i { width: 18px; height: 18px; border: 3px solid white; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--teal-dark),0 0 16px rgba(117,220,49,.8); animation: sensor-pulse 520ms ease-in-out infinite alternate; }
.outcome-row { width: min(590px,100%); display: grid; grid-template-columns: 61px 1fr; align-items: center; gap: 16px; }.outcome-mark { width: 59px; height: 59px; display: grid; place-items: center; border: 3px solid var(--navy); border-radius: 50%; background: var(--yellow); box-shadow: 0 4px var(--navy); font-size: 27px; font-weight: 1000; }
.continue-button { min-height: 62px; padding: 0 22px; border: 3px solid var(--navy); border-radius: 15px; color: var(--navy); background: var(--lime); box-shadow: 0 6px var(--navy); font-weight: 1000; }.level-next { width: min(520px,100%); font-size: 16px; }
button:active { transform: translateY(4px) !important; box-shadow: 0 2px var(--navy) !important; }

.level-intro { position: fixed; z-index: 100; top: 50%; left: 50%; width: 540px; min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 38px 52px; transform: translate(-50%,-50%); border: 4px solid var(--navy); border-radius: 29px; background: rgba(255,254,241,.98); box-shadow: 0 14px 0 var(--navy),0 35px 90px rgba(0,34,52,.35); text-align: center; }
.level-intro::before { position: absolute; inset: 12px; content: ""; border: 3px dashed #83cfc6; border-radius: 18px; pointer-events: none; }.level-intro img { z-index: 1; width: 125px; height: 125px; margin-bottom: 7px; object-fit: contain; mix-blend-mode: multiply; }.level-intro > span { z-index: 1; color: var(--coral-dark); font-size: 10px; font-weight: 1000; letter-spacing: .13em; text-transform: uppercase; }.level-intro h2 { z-index: 1; margin: 7px 0 8px; font-size: 40px; line-height: 1; letter-spacing: -.04em; }.level-intro p { z-index: 1; max-width: 410px; margin: 0 0 22px; color: var(--muted); font-size: 15px; font-weight: 750; line-height: 1.4; }.level-intro button { z-index: 1; min-width: 240px; min-height: 57px; border: 3px solid var(--navy); border-radius: 15px; color: var(--navy); background: var(--lime); box-shadow: 0 7px var(--navy); font-weight: 1000; }
.toast { position: absolute; z-index: 90; left: 50%; bottom: 28px; max-width: 72%; padding: 11px 18px; opacity: 0; transform: translate(-50%,12px); border: 3px solid var(--navy); border-radius: 999px; color: var(--navy); background: var(--yellow); box-shadow: 0 5px var(--navy),0 12px 26px rgba(0,43,57,.25); pointer-events: none; font-size: 13px; font-weight: 950; transition: opacity 150ms ease-out,transform 150ms ease-out; }.toast.is-showing { opacity: 1; transform: translate(-50%,0); }
.lab-world.is-miss .play-panel { animation: gentle-shake 390ms ease-out; }.lab-world.is-celebrating .play-panel { box-shadow: inset 0 1px white,0 8px 0 rgba(5,70,84,.58),0 0 55px rgba(255,221,72,.52); }
.scientist.is-cheering { animation: scientist-cheer 680ms ease-out; }.scientist.is-thinking { animation: scientist-think 1.2s ease-in-out infinite alternate; }.scientist.is-oops { animation: scientist-oops 420ms ease-out; }

@keyframes bubble-drift { to { transform: translate(8px,-14px) scale(1.35); opacity: .35; } }
@keyframes piece-in { from { opacity: 0; transform: translateY(-12px) scale(.72) rotate(-7deg); } 70% { transform: translateY(2px) scale(1.08); } }
@keyframes fly-left { 0% { opacity: 1; transform: translate(0,0) rotate(0); } 100% { opacity: 0; transform: translate(-330px,-38px) rotate(-10deg); } }
@keyframes fly-right { 0% { opacity: 1; transform: translate(0,0) rotate(0); } 100% { opacity: 0; transform: translate(330px,-38px) rotate(10deg); } }
@keyframes pan-pulse { 50% { filter: drop-shadow(0 0 13px rgba(69,198,97,.75)); } }
@keyframes demo-left { 35%,70% { transform: rotate(-8deg); } }
@keyframes demo-right { 35%,70% { transform: rotate(8deg); } }
@keyframes sensor-pulse { to { transform: scale(1.28); filter: brightness(1.12); } }
@keyframes burst { 0% { opacity: 1; transform: translate(0,0) rotate(0) scale(.3); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--burst-x),var(--burst-y)) rotate(180deg) scale(1.15); } }
@keyframes gentle-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@keyframes scientist-cheer { 0%,100% { transform: translateX(-50%) translateY(0) rotate(0); } 36% { transform: translateX(-50%) translateY(-19px) rotate(-3deg) scale(1.04); } 65% { transform: translateX(-50%) translateY(-5px) rotate(3deg); } }
@keyframes scientist-think { to { transform: translateX(-50%) translateY(-5px) rotate(1deg); } }
@keyframes scientist-oops { 0%,100% { transform: translateX(-50%) rotate(0); } 30% { transform: translateX(calc(-50% - 4px)) rotate(-4deg); } 65% { transform: translateX(calc(-50% + 4px)) rotate(4deg); } }

@media (max-width: 1220px) {
  .hud { grid-template-columns: 205px 1fr auto; }.difficulty-card { position: absolute; left: 50%; top: 75px; transform: translateX(-50%); }.scoreboard > div { min-width: 61px; }.trial-track { min-width: 292px; }.trial-track b { width: 28px; }
  .game-grid { grid-template-columns: 195px minmax(740px,1fr); }.scientist { width: 208px; }.challenge-header { grid-template-columns: minmax(180px,1fr) auto 175px; }
}
@media (max-height: 790px) {
  .hud { top: 11px; height: 62px; }.mission-chip,.trial-track,.scoreboard { height: 62px; }.game-grid { top: 84px; bottom: 13px; }.play-panel { grid-template-rows: 82px minmax(290px,1fr) 166px; padding-top: 10px; }.challenge-header h1 { font-size: 26px; }.scale-stage { min-height: 290px; }.decision-card { padding-top: 8px; }.move,.prediction,.value-options button,.explain-options button { min-height: 82px; }.scientist { height: 370px; bottom: 38px; }.speech { min-height: 65px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
