:root {
  color-scheme: dark;
  --ink: #effcff;
  --muted: #9bb8c5;
  --navy: #061827;
  --panel: rgba(7, 28, 42, .92);
  --panel-soft: rgba(12, 42, 56, .88);
  --cyan: #4fe4e5;
  --cyan-dark: #087c87;
  --amber: #ffad3e;
  --amber-dark: #a94d08;
  --lime: #a9e34b;
  --coral: #ff6d59;
  --metal: #efa943;
  --metalloid: #9edc65;
  --nonmetal: #55d5dc;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 1100px; height: 100%; margin: 0; }
body {
  overflow: hidden;
  color: var(--ink);
  background: #03111c url("./art/lab-backdrop-01.webp") center / cover no-repeat;
  font-family: ui-rounded, "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
}
button { color: inherit; font: inherit; }
button:focus-visible { outline: 4px solid #fff08a; outline-offset: 3px; }
[hidden] { display: none !important; }

.lab-shell {
  position: relative;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr) 220px;
  grid-template-rows: 72px minmax(0, 1fr);
  gap: 14px;
  width: min(1360px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 26px));
  margin: 13px auto;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(95, 219, 231, .28);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(3, 17, 29, .84), rgba(7, 30, 44, .64));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48), inset 0 0 80px rgba(36, 168, 185, .06);
  isolation: isolate;
}
.lab-shell::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .24; background-image: linear-gradient(rgba(79,228,229,.05) 1px, transparent 1px), linear-gradient(90deg,rgba(79,228,229,.05) 1px,transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(circle at 50% 45%, #000, transparent 85%); }

.lab-hud {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 270px;
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
  border: 1px solid rgba(89, 216, 223, .22);
  border-radius: 18px;
  background: rgba(3, 19, 31, .86);
  box-shadow: inset 0 -1px rgba(255,255,255,.04), 0 8px 24px rgba(0,0,0,.2);
}
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup small, .mission-strip span, .score-strip span, .analyser-title small { display: block; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.brand-lockup strong { display: block; margin-top: 1px; color: var(--cyan); font-size: 18px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.brand-orbit { position: relative; width: 40px; height: 40px; flex: 0 0 auto; border: 2px solid var(--cyan); border-radius: 50%; box-shadow: inset 0 0 16px rgba(79,228,229,.25), 0 0 18px rgba(79,228,229,.2); }
.brand-orbit::before, .brand-orbit::after { content: ""; position: absolute; left: 3px; right: 3px; top: 17px; height: 2px; border-radius: 50%; background: var(--amber); transform: rotate(38deg); }
.brand-orbit::after { transform: rotate(-38deg); }
.brand-orbit i { position: absolute; left: 14px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.mission-strip { min-width: 0; padding-left: 18px; border-left: 1px solid rgba(151,207,216,.22); }
.mission-strip span { color: var(--amber); }
.mission-strip b { display: block; margin-top: 3px; overflow: hidden; font-size: 18px; white-space: nowrap; text-overflow: ellipsis; }
.score-strip { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid rgba(101,190,197,.2); border-radius: 13px; background: rgba(9,40,52,.78); }
.score-strip div { padding: 7px 10px; text-align: center; }
.score-strip div + div { border-left: 1px solid rgba(101,190,197,.18); }
.score-strip strong { display: block; margin-top: 1px; color: #fff; font-size: 20px; line-height: 1; }

.scientist-bay, .analysis-bay, .mission-console {
  min-height: 0;
  border: 1px solid rgba(91, 207, 215, .25);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(7,28,42,.94), rgba(3,18,30,.91));
  box-shadow: 0 14px 32px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.04);
}
.scientist-bay { position: relative; overflow: hidden; }
.scientist-bay::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 11px; height: 60px; border-radius: 50%; background: radial-gradient(ellipse, rgba(49,215,221,.4), transparent 68%); filter: blur(3px); }
.scientist { position: absolute; z-index: 2; left: -32px; bottom: 75px; width: 230px; filter: drop-shadow(0 12px 16px rgba(0,0,0,.42)); transform-origin: 50% 90%; transition: transform 180ms ease-out, filter 180ms ease-out; }
.scientist.is-happy { animation: mascot-bounce 620ms cubic-bezier(.2,.9,.3,1); filter: drop-shadow(0 0 20px rgba(255,178,63,.55)); }
.scientist.is-concerned { animation: mascot-tilt 300ms ease-out; }
.speech-bubble { position: absolute; z-index: 5; left: 12px; right: 12px; top: 18px; min-height: 102px; padding: 15px 14px; border: 2px solid #65cad0; border-radius: 18px 18px 18px 5px; color: #16333d; background: #eafcff; box-shadow: 0 8px 0 rgba(4,106,117,.48); font-size: 13px; font-weight: 800; line-height: 1.4; }
.speech-bubble::after { content: ""; position: absolute; left: 17px; bottom: -14px; border: 8px solid transparent; border-top-color: #eafcff; border-left-color: #eafcff; }
.speech-bubble b { color: #bb530e; font-size: 1.12em; }
.lab-props { position: absolute; z-index: 3; left: 4px; bottom: 5px; width: 170px; filter: drop-shadow(0 7px 12px rgba(0,0,0,.4)); }

.mission-console { position: relative; display: grid; grid-template-rows: 47px auto minmax(0, 1fr) auto; min-width: 0; padding: 15px 18px 14px; overflow: hidden; }
.mission-console.is-miss { animation: console-shake 280ms ease-out; }
.mission-console.is-level-up { box-shadow: 0 0 0 2px var(--amber), 0 0 38px rgba(255,173,62,.4), inset 0 1px rgba(255,255,255,.08); }
.console-topline { display: flex; align-items: start; gap: 14px; min-width: 0; }
.mode-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; color: #c8f8fa; background: #0f4654; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.mode-chip b { display: grid; place-items: center; min-width: 28px; padding: 3px 6px; border-radius: 6px; color: #18343b; background: var(--cyan); }
.difficulty-meter { width: 190px; }
.difficulty-meter > span { display: flex; justify-content: space-between; color: #d1e8ed; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.difficulty-meter > i { display: block; height: 7px; margin: 4px 0 3px; overflow: hidden; border-radius: 10px; background: #173a45; }
.difficulty-meter > i b { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--amber)); transition: width 260ms ease-out; }
.difficulty-meter small { color: var(--muted); font-size: 10px; }
.legend { display: flex; align-items: center; gap: 11px; margin-left: auto; padding-top: 7px; color: #b7ced5; font-size: 10px; font-weight: 800; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 3px; box-shadow: 0 0 7px currentColor; }
.metal-dot::before { background: var(--metal); }.metalloid-dot::before { background: var(--metalloid); }.nonmetal-dot::before { background: var(--nonmetal); }

.clue-card { position: relative; align-self: start; margin: 4px auto 8px; padding: 9px 24px 10px; text-align: center; }
.clue-card::before, .clue-card::after { content: ""; position: absolute; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(transparent, var(--cyan), transparent); opacity: .55; }
.clue-card::before { left: 0; }.clue-card::after { right: 0; }
.clue-card > span { color: var(--amber); font-size: 10px; font-weight: 1000; letter-spacing: .18em; text-transform: uppercase; }
.clue-card h1 { margin: 3px 0 2px; font-size: clamp(21px, 2.3vw, 31px); line-height: 1.04; letter-spacing: -.025em; }
.clue-card p { margin: 0; color: var(--muted); font-size: 12px; }

.table-wrap { position: relative; align-self: center; min-height: 310px; padding: 22px 0 0 24px; }
.periodic-table { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); grid-template-rows: repeat(6, 49px); gap: 3px; width: 100%; }
.element-cell {
  position: relative;
  min-width: 0;
  min-height: 48px;
  padding: 4px 3px 3px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cell-color) 56%, #d9fcff 12%);
  border-radius: 7px;
  color: #efffff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--cell-color) 36%, #0b2531), color-mix(in srgb, var(--cell-color) 12%, #061923));
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 3px 0 rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform 130ms ease-out, filter 130ms ease-out, box-shadow 130ms ease-out, opacity 130ms ease-out;
}
.element-cell[data-category="metal"] { --cell-color: var(--metal); }
.element-cell[data-category="metalloid"] { --cell-color: var(--metalloid); }
.element-cell[data-category="nonmetal"] { --cell-color: var(--nonmetal); }
.element-cell span { position: absolute; left: 4px; top: 2px; color: #c7e8ec; font-size: 8px; font-weight: 800; }
.element-cell strong { display: block; margin-top: 5px; font-size: 18px; line-height: 1; }
.element-cell small { display: block; margin-top: 2px; overflow: hidden; color: #c6dade; font-size: 7px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.element-cell:hover { z-index: 3; transform: translateY(-3px) scale(1.07); filter: brightness(1.25); box-shadow: 0 6px 0 rgba(0,0,0,.3), 0 0 16px color-mix(in srgb, var(--cell-color) 65%, transparent); }
.element-cell:active { transform: translateY(2px) scale(.98); }
.element-cell.is-muted { opacity: .22; filter: grayscale(.35); }
.element-cell.is-selected { z-index: 4; transform: translateY(-3px) scale(1.12); border-color: white; box-shadow: 0 0 0 2px var(--amber), 0 0 25px var(--amber); }
.element-cell.is-target-pulse { z-index: 4; animation: target-pulse 620ms ease-in-out 2; }
.element-cell.is-group-focus, .element-cell.is-period-focus, .element-cell.is-category-focus { opacity: 1; filter: brightness(1.32); box-shadow: 0 0 14px color-mix(in srgb, var(--cell-color) 60%, transparent); }
.element-cell:disabled { cursor: default; }
.group-labels { position: absolute; left: 24px; right: 0; top: 0; display: grid; grid-template-columns: repeat(18, 1fr); gap: 3px; color: #7baab2; font-size: 8px; font-weight: 900; text-align: center; }
.group-labels b.is-focus { color: var(--amber); text-shadow: 0 0 9px var(--amber); }
.period-labels { position: absolute; left: 0; top: 22px; display: grid; grid-template-rows: repeat(6, 49px); gap: 3px; width: 20px; color: #7baab2; font-size: 9px; font-weight: 900; text-align: center; }
.period-labels b { display: grid; place-items: center; }.period-labels b.is-focus { color: var(--cyan); text-shadow: 0 0 9px var(--cyan); }

.group-panel { align-self: center; padding: 18px 0 12px; text-align: center; }
.group-panel p { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 800; }
.group-choices { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.group-choice { min-height: 44px; border: 1px solid #357682; border-radius: 9px; color: #dffcff; background: #103946; box-shadow: 0 4px 0 #061b24; font-size: 14px; font-weight: 1000; transition: 130ms ease-out; }
.group-choice:hover { transform: translateY(-2px); border-color: var(--cyan); background: #155563; box-shadow: 0 6px 0 #061b24, 0 0 12px rgba(79,228,229,.2); }
.group-choice:active { transform: translateY(3px); box-shadow: 0 1px 0 #061b24; }

.atom-forge { position: relative; align-self: center; display: grid; grid-template-columns: 120px minmax(230px, .8fr) minmax(260px, 1.1fr); grid-template-rows: 1fr auto; align-items: center; gap: 12px 16px; min-height: 330px; padding: 16px 20px; border: 1px solid rgba(79,228,229,.28); border-radius: 18px; background: radial-gradient(circle at 44% 48%, rgba(30,181,190,.18), transparent 33%), rgba(4,22,33,.7); box-shadow: inset 0 0 42px rgba(23,153,163,.08); }
.atom-readout { text-align: center; }
.atom-readout span, .charge-readout span { display: block; color: var(--amber); font-size: 10px; font-weight: 1000; letter-spacing: .13em; text-transform: uppercase; }
.atom-readout strong { display: block; margin: 3px 0; font-size: 54px; line-height: 1; }
.atom-readout small { color: var(--muted); font-size: 11px; }
.atom-model { position: relative; width: 240px; height: 240px; justify-self: center; }
.orbit { position: absolute; left: 20px; top: 80px; width: 200px; height: 78px; border: 2px solid rgba(79,228,229,.52); border-radius: 50%; box-shadow: 0 0 16px rgba(79,228,229,.14); }
.orbit-two { transform: rotate(60deg); }.orbit-one { transform: rotate(-60deg); }
.nucleus { position: absolute; z-index: 4; left: 75px; top: 75px; width: 90px; height: 90px; display: grid; place-content: center; border: 3px solid #ffe0a5; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd071, #db6f1d 62%, #713012); box-shadow: 0 0 32px rgba(255,157,49,.6), inset 0 0 0 8px rgba(116,44,10,.24); text-align: center; transition: transform 150ms ease-out; }
.nucleus span { font-size: 28px; font-weight: 1000; line-height: 1; }.nucleus small { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.electron-pip { position: absolute; z-index: 5; left: calc(50% + cos(var(--angle)) * var(--radius)); top: calc(50% + sin(var(--angle)) * var(--radius)); width: 23px; height: 23px; display: grid; place-items: center; transform: translate(-50%,-50%); border: 2px solid #bffcff; border-radius: 50%; color: #05303a; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); font-size: 9px; font-weight: 1000; animation: electron-pop 240ms ease-out both; }
.particle-controls { display: grid; gap: 10px; }
.particle-controls > div { display: grid; grid-template-columns: 40px minmax(95px,1fr) 38px 28px 38px; align-items: center; gap: 6px; min-height: 62px; padding: 8px 9px; border: 1px solid #285d68; border-radius: 13px; background: #0d3541; }
.particle { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 1000; }.particle.proton { color: #652800; background: var(--amber); box-shadow: 0 0 13px rgba(255,173,62,.4); }.particle.electron { color: #04333a; background: var(--cyan); box-shadow: 0 0 13px rgba(79,228,229,.4); }
.particle-controls p { margin: 0; }.particle-controls p b, .particle-controls p small { display: block; }.particle-controls p b { font-size: 12px; }.particle-controls p small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.particle-controls button { width: 38px; height: 38px; border: 1px solid #4c8790; border-radius: 10px; background: #174b57; box-shadow: 0 3px 0 #061a22; font-size: 20px; font-weight: 1000; }
.particle-controls button:hover { border-color: var(--cyan); filter: brightness(1.18); }.particle-controls button:active { transform: translateY(2px); box-shadow: 0 1px 0 #061a22; }
.particle-controls > div > strong { text-align: center; font-size: 19px; }
.stabilize { grid-column: 2 / 4; justify-self: end; min-width: 210px; min-height: 48px; border: 1px solid #ffcf7c; border-radius: 13px; color: #361a05; background: linear-gradient(#ffc15f, #f28d25); box-shadow: 0 6px 0 #8c3d09, 0 0 16px rgba(255,173,62,.22); font-size: 14px; font-weight: 1000; text-transform: uppercase; }
.stabilize:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #8c3d09, 0 0 22px rgba(255,173,62,.34); }.stabilize:active { transform: translateY(4px); box-shadow: 0 2px 0 #8c3d09; }

.action-dock { min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 7px; }
.action-dock:empty { min-height: 18px; }
.dock-button { min-width: 180px; min-height: 48px; padding: 9px 16px; border: 1px solid #5596a0; border-radius: 13px; color: #eaffff; background: #124754; box-shadow: 0 5px 0 #061b24; font-size: 13px; font-weight: 900; transition: 130ms ease-out; }
.dock-button:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 7px 0 #061b24, 0 0 14px rgba(79,228,229,.22); }
.dock-button:active { transform: translateY(3px); box-shadow: 0 2px 0 #061b24; }
.dock-button.primary { color: #402000; border-color: #ffd18d; background: linear-gradient(#ffc263,#ed8a27); box-shadow: 0 5px 0 #8b3a08; }

.analysis-bay { position: relative; display: flex; flex-direction: column; padding: 16px; overflow: hidden; }
.analyser-title { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; border-bottom: 1px solid rgba(116,188,197,.2); }
.analyser-title strong { display: block; margin-top: 2px; font-size: 13px; }
.live-light { width: 11px; height: 11px; border: 2px solid #d8ffe2; border-radius: 50%; background: #70e987; box-shadow: 0 0 12px #70e987; }
.element-card { position: relative; width: 132px; height: 150px; display: grid; place-content: center; justify-items: center; margin: 25px auto 18px; overflow: hidden; border: 2px solid #5b8e96; border-radius: 16px; background: linear-gradient(145deg, #154550, #082630); box-shadow: 0 8px 0 #03151c, inset 0 0 25px rgba(79,228,229,.08); }
.element-card::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(148,229,234,.16); border-radius: 11px; }
.element-card > span { position: absolute; left: 12px; top: 9px; color: var(--amber); font-size: 13px; font-weight: 1000; }
.element-card > strong { font-size: 56px; line-height: 1; text-shadow: 0 0 18px rgba(79,228,229,.35); }
.element-card > small { max-width: 108px; margin-top: 5px; overflow: hidden; color: #c7e4e8; font-size: 11px; font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
.element-card.is-revealed { animation: card-reveal 480ms cubic-bezier(.2,.9,.25,1); border-color: var(--amber); box-shadow: 0 8px 0 #5b2807, 0 0 24px rgba(255,173,62,.28); }
.element-facts { margin: 0; border-top: 1px solid rgba(112,181,190,.18); }
.element-facts div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid rgba(112,181,190,.15); }
.element-facts dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }.element-facts dd { margin: 0; font-size: 11px; font-weight: 900; text-transform: capitalize; }
.charge-readout { margin-top: 12px; padding: 11px; border: 1px solid #2e7180; border-radius: 12px; background: #0d3642; text-align: center; }
.charge-readout strong { display: block; margin: 3px 0; color: var(--cyan); font-size: 25px; }.charge-readout small { color: var(--muted); font-size: 9px; }
.atom-orb { width: 118px; margin: auto auto -10px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); animation: orb-float 3.2s ease-in-out infinite; }
.analyser-tip { min-height: 46px; margin: 5px 0 0; color: #a6c4cb; font-size: 11px; font-weight: 700; line-height: 1.45; text-align: center; }

.toast { position: absolute; z-index: 50; left: 50%; bottom: 24px; max-width: 600px; padding: 11px 18px; opacity: 0; transform: translate(-50%, 14px); border: 1px solid #7ceef0; border-radius: 999px; color: #eaffff; background: #06212b; box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 20px rgba(79,228,229,.16); pointer-events: none; font-size: 12px; font-weight: 900; text-align: center; transition: opacity 150ms ease-out, transform 150ms ease-out; }
.toast.is-showing { opacity: 1; transform: translate(-50%,0); }
.celebration { position: absolute; z-index: 45; left: 50%; top: 48%; width: 1px; height: 1px; pointer-events: none; }
.celebration span { position: absolute; left: 0; top: 0; min-width: 230px; padding: 11px 20px; opacity: 0; transform: translate(-50%,10px) scale(.7); border: 2px solid #ffe1a5; border-radius: 999px; color: #371a02; background: var(--amber); box-shadow: 0 8px 0 #8e3b06, 0 0 30px rgba(255,173,62,.6); font-size: 17px; font-weight: 1000; letter-spacing: .06em; text-align: center; }
.celebration i { position: absolute; width: 13px; height: 13px; opacity: 0; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 9px currentColor; }
.celebration i:nth-child(2n) { background: var(--amber); }.celebration i:nth-child(3n) { background: var(--lime); }
.celebration.is-active span { animation: celebration-label 850ms ease-out both; }
.celebration.is-active i { animation: particle-burst 760ms ease-out both; }
.celebration i:nth-child(1){--x:-190px;--y:-120px}.celebration i:nth-child(2){--x:170px;--y:-145px;animation-delay:40ms}.celebration i:nth-child(3){--x:230px;--y:40px;animation-delay:80ms}.celebration i:nth-child(4){--x:-220px;--y:60px;animation-delay:120ms}.celebration i:nth-child(5){--x:65px;--y:155px;animation-delay:160ms}.celebration i:nth-child(6){--x:-75px;--y:145px;animation-delay:200ms}

@keyframes mascot-bounce { 35% { transform: translateY(-11px) rotate(-2deg) scale(1.04); } 65% { transform: translateY(2px) rotate(1deg); } }
@keyframes mascot-tilt { 35% { transform: rotate(-4deg) translateX(-4px); } 70% { transform: rotate(3deg) translateX(3px); } }
@keyframes console-shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@keyframes target-pulse { 50% { transform: translateY(-3px) scale(1.13); border-color: white; box-shadow: 0 0 0 3px var(--cyan), 0 0 28px var(--cyan); } }
@keyframes electron-pop { from { opacity: 0; transform: translate(-50%,-50%) scale(.2); } }
@keyframes card-reveal { from { opacity: .3; transform: rotateY(70deg) scale(.8); } 70% { transform: rotateY(-8deg) scale(1.04); } }
@keyframes orb-float { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes celebration-label { 15%,70% { opacity: 1; transform: translate(-50%,-20px) scale(1); } 100% { opacity: 0; transform: translate(-50%,-40px) scale(.98); } }
@keyframes particle-burst { 0% { opacity: 0; transform: translate(0,0) rotate(0) scale(.2); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x),var(--y)) rotate(220deg) scale(1.25); } }

@media (max-height: 760px) {
  .lab-shell { height: calc(100vh - 16px); margin: 8px auto; grid-template-rows: 64px minmax(0,1fr); }
  .speech-bubble { min-height: 86px; font-size: 12px; }.scientist { bottom: 54px; }.lab-props { width: 145px; }
  .mission-console { padding-top: 10px; }.clue-card { padding-top: 4px; padding-bottom: 5px; }.clue-card h1 { font-size: 23px; }
  .periodic-table { grid-template-rows: repeat(6,44px); }.element-cell { min-height: 43px; }.period-labels { grid-template-rows: repeat(6,44px); }
  .element-card { margin-top: 12px; margin-bottom: 10px; height: 130px; }.atom-orb { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Clarity: the clue text already states the goal — drop the redundant nudge + filler tip. */
#clueNudge { display: none; }
.analyser-tip { display: none; }
/* One goal only: the clue card is the goal; the header kicker just repeats it. */
#missionKicker { display: none; }
/* Progressive disclosure: the analyser bay is empty ("?" / "—") until a cell is tapped.
   Keep it quiet and recessed until the child actually picks something, so entry isn't a wall of dead panels. */
.analysis-bay { transition: opacity 200ms ease-out, filter 200ms ease-out; }
.lab-shell:not(.has-pick) .analysis-bay { opacity: .4; filter: saturate(.55); }
.lab-shell:not(.has-pick) .element-facts,
.lab-shell:not(.has-pick) .charge-readout { visibility: hidden; }
