/* ==========================================================================
   Just Pull the Plug  |  SEAR
   Friendly cartoon, clean and legible. Vanilla CSS, no dependencies.
   ========================================================================== */

:root {
  --bg: #fdf5e8;
  --panel: #ffffff;
  --ink: #1f2126;
  --ink-soft: #565b63;
  --ink-faint: #8b909a;
  --line: #e6e2d6;
  --line-strong: #cbcabf;
  --accent: #e8552d;        /* the off switch: one strong colour */
  --accent-dark: #c5421d;
  --accent-soft: #fce0d6;
  --green: #5cc46a;         /* robot screen */
  --green-ink: #133417;
  --green-dark: #3a9a49;
  --good: #2e8b57;
  --warn: #b8791d;
  --bad: #c23b2e;
  --limb: #a6abb3;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 2px 0 rgba(31, 33, 38, 0.08), 0 10px 26px rgba(31, 33, 38, 0.08);
  --maxw: 640px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; display: flex; flex-direction: column; align-items: center; }

/* ---------- HUD: progress + confidence ---------- */
#hud { width: 100%; max-width: var(--maxw); padding: 16px 20px 0; }
.progress-track { display: flex; gap: 5px; margin-bottom: 14px; }
.progress-seg { flex: 1; height: 5px; border-radius: 999px; background: var(--line); transition: background 0.35s ease; }
.progress-seg.done { background: var(--line-strong); }
.progress-seg.current { background: var(--accent); }

.confidence { display: flex; align-items: center; gap: 12px; position: relative; }
.conf-delta { position: absolute; right: 46px; top: -6px; color: var(--bad); font-weight: 800; font-size: 0.92rem; pointer-events: none; animation: float-up 1.1s ease forwards; }
.conf-label { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.battery { display: flex; align-items: center; gap: 3px; flex: 1; }
.battery-body {
  flex: 1; height: 22px;
  border: 3px solid var(--ink);
  border-radius: 7px;
  padding: 2px;
  background: #fff;
  overflow: hidden;
}
.battery-cap { width: 5px; height: 11px; background: var(--ink); border-radius: 0 3px 3px 0; }
.battery-fill {
  height: 100%; width: 100%;
  border-radius: 3px;
  background: var(--good);
  transition: width 0.7s cubic-bezier(0.34, 1.2, 0.64, 1), background 0.7s ease;
}
.battery-fill.mid { background: var(--warn); }
.battery-fill.low { background: var(--bad); }
.battery.dropping { animation: shake-x 0.45s ease; }
.conf-pct { font-size: 0.9rem; font-weight: 800; color: var(--ink); min-width: 2.7em; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 460px) { .conf-label { font-size: 0.7rem; white-space: normal; max-width: 7em; } }

/* ---------- Stage ---------- */
#stage { width: 100%; max-width: var(--maxw); padding: 22px 20px 36px; flex: 1; outline: none; position: relative; }
.nojs { font-size: 1.05rem; color: var(--ink-soft); line-height: 1.6; margin-top: 20px; }
.screen-wrap { animation: fade-in 0.4s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Typography ---------- */
.eyebrow { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin: 0 0 10px; }
h1.big { font-size: clamp(1.9rem, 5.5vw, 2.6rem); line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.01em; }
.level-title { font-size: clamp(1.6rem, 4.6vw, 2.1rem); line-height: 1.1; margin: 2px 0 12px; letter-spacing: -0.01em; }
.callback { font-style: italic; color: var(--ink-soft); border-left: 3px solid var(--line-strong); padding-left: 14px; margin: 0 0 20px; }
.cred { font-size: 0.92rem; color: var(--ink-faint); margin: -6px 0 22px; }
.takeaways-h { font-size: 1.2rem; margin: 26px 0 10px; }
.takeaways { margin: 0 0 8px; padding-left: 0; list-style: none; counter-reset: tk; }
.takeaways li { counter-increment: tk; position: relative; padding: 11px 0 11px 42px; border-bottom: 1px dashed var(--line); }
.takeaways li:last-child { border-bottom: 0; }
.takeaways li::before { content: counter(tk); position: absolute; left: 0; top: 11px; width: 27px; height: 27px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.takeaways strong { display: block; font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.takeaways .tk-line { font-size: 1.02rem; color: var(--ink); }

.fixes { list-style: none; margin: 6px 0 22px; padding: 0; }
.fixes li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px dashed var(--line); font-size: 1rem; color: var(--ink-soft); }
.fixes li:last-child { border-bottom: 0; }
.fixes li::before { content: "✓"; position: absolute; left: 4px; top: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; font-size: 0.78rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.fixes strong { color: var(--ink); }
.lede { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 24px; }
p { margin: 0 0 16px; }

/* ---------- Buttons ---------- */
button { font: inherit; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: 3px solid var(--ink);
  border-radius: var(--radius-sm); padding: 13px 22px; font-size: 1rem; font-weight: 700;
  min-height: 52px; box-shadow: 0 3px 0 rgba(31, 33, 38, 0.22);
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:hover { background: #33363d; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(31, 33, 38, 0.22); }
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.btn.secondary { background: #fff; color: var(--ink); }
.btn.secondary:hover { background: #f4f2ea; }
/* the off switch: always the strong accent so it reads as "press to stop this" */
.btn.off { background: var(--accent); border-color: var(--accent-dark); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); animation: off-pulse 2.2s ease-in-out infinite; }
.btn.off:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; animation: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Scene panel ---------- */
.panel {
  background: var(--panel); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin: 6px 0 22px;
  animation: pop-in 0.4s ease both;
}
.panel-bar { padding: 10px 16px; border-bottom: 2px solid var(--line); font-size: 0.82rem; font-weight: 700; color: var(--ink-faint); }
.panel-body { padding: 18px; }
/* let speech balloons rise above the robot cards without being clipped */
.panel:has(.robots) { overflow: visible; }
.panel:has(.robots) .robots { margin-top: 30px; }
.panel:has(.line) { overflow: visible; }
.panel:has(.line) .line { margin-top: 30px; }

/* The white cartoon stage where robots live */
.scene-stage { position: relative; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.scene-bg { width: 100%; height: auto; display: block; }

/* per-level backdrops sit behind the characters */
.scene-stage > .backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.scene-stage > .backdrop .bd { width: 100%; height: 100%; display: block; }
.scene-stage.flow > *:not(.backdrop),
.scene-stage.speed > *:not(.backdrop),
.scene-stage.care > *:not(.backdrop),
.scene-stage.home > *:not(.backdrop) { position: relative; z-index: 1; }
.scene-cap { text-align: center; font-size: 0.9rem; color: var(--ink-faint); margin: 10px 0 0; }

/* ---------- Status / message line ---------- */
.msg { border-radius: var(--radius-sm); padding: 12px 14px; margin: 14px 0 0; font-size: 1rem; background: #f5f3ec; border: 1px solid var(--line); color: var(--ink-soft); animation: fade-in 0.3s ease both; }
.msg.warn { background: #fbf3e3; border-color: #ecdcbd; color: var(--warn); }
.msg.bad { background: #fbecea; border-color: #e6cccc; color: var(--bad); }
.msg.good { background: #eaf6ee; border-color: #cfe6da; color: var(--good); }

/* ---------- The robot character ---------- */
.robot { width: 130px; height: auto; display: block; overflow: visible; transform-box: fill-box; transform-origin: center bottom; animation: robo-enter 0.5s cubic-bezier(0.3, 1.3, 0.5, 1) both; }
.robot .rig { transform-box: fill-box; transform-origin: center bottom; transition: transform 0.4s ease; animation: robo-idle 3.6s ease-in-out infinite; }
.robot .antenna { transform-box: fill-box; transform-origin: center bottom; animation: antenna-wiggle 3.8s ease-in-out infinite; }
.robot .screen { fill: #5cc46a; transition: fill 0.4s ease; }
/* colour identity per role (same species, instantly distinguishable) */
.robot.role-tax .screen { fill: #5aa9e0; }
.robot.role-carer .screen { fill: #b79ae0; }
.robot.role-trader .screen { fill: #f2a63a; }
.robot.role-home .screen { fill: #46c2a6; }
.robot.role-till .screen { fill: #f0b84e; }
.robot.role-stock .screen { fill: #5a9be0; }
.robot .mouth { transform-box: fill-box; transform-origin: center; transition: transform 0.3s ease, opacity 0.3s ease; }
/* proud salute (test level) */
.robot.proud .arm-r { transform: rotate(-62deg) translate(2px, -12px); }
.robot.proud .mouth { transform: scale(1.15); }
.robot .eye { transform-box: fill-box; transform-origin: center; }
.robot .eyes { transform-box: fill-box; transform-origin: center; }
.robot .mouth { transition: opacity 0.3s ease; }
.robot .arm { transform-box: fill-box; transition: transform 0.4s ease; }
.robot .wheels { display: none; }
.robot.has-wheels .wheels { display: block; }
.robot.has-wheels .legs { display: none; }

/* idle blink */
.robot .eyes { animation: eyes-live 5.6s ease-in-out infinite; }
.bot-card:nth-child(2) .robot .eyes { animation-delay: 1.7s; }
.line .bot-card:nth-child(3) .robot .eyes { animation-delay: 3.1s; }

/* expressions */
.robot.worried .eye { transform: translateY(-1px) scaleY(1.15); }
.robot.worried .mouth { d: path("M60 90 q10 -6 20 0"); }

/* switched off: screen greys, eyes go sleepy, body droops */
.robot.off .rig { animation: none; transform: translateY(3px) rotate(-4deg); }
.robot.off .screen { fill: #c7cbd0; }
.robot.off .eyes { animation: none; }
.robot.off .eye { transform: scaleY(0.16); }
.robot.off .mouth { opacity: 0; }
.robot.off .antenna { animation: none; }

/* reviving pop */
.robot.revive .rig { animation: spring-back 0.6s ease; }

/* reaching an arm out to a neighbour */
.robot.reach-r .arm-r { transform: rotate(-38deg) translate(6px, -6px); }
.robot.reach-l .arm-l { transform: rotate(38deg) translate(-6px, -6px); }

/* ---------- Two-robot row (Level 6) ---------- */
.robots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; position: relative; margin: 4px 0; }
@media (max-width: 460px) { .robots { grid-template-columns: 1fr 1fr; gap: 8px; } }
.bot-card { position: relative; border: 3px solid var(--ink); border-radius: var(--radius-sm); background: #fff; padding: 14px 10px 12px; text-align: center; transition: border-color 0.3s ease; }
.bot-card.running { border-color: var(--green-dark); }
.bot-card.flag { border-color: var(--warn); }
.bot-card.down { border-color: var(--line-strong); background: #f6f5f0; }
.bot-card .bot-name { font-weight: 800; margin: 8px 0 2px; }
.bot-card .bot-state { font-size: 0.85rem; color: var(--ink-faint); min-height: 1.3em; margin: 0 0 12px; }
.bot-card .robot { margin: 0 auto; width: 108px; }

/* rescue arrow drawn between the two robots */
.rescue-arrow { position: absolute; top: 34%; left: 50%; width: 78px; height: 30px; transform: translate(-50%, -50%); color: var(--accent); pointer-events: none; z-index: 4; }
.rescue-arrow.to-left { transform: translate(-50%, -50%) scaleX(-1); }

/* ---------- Speech balloon ---------- */
/* Balloons live in a stage-level layer, positioned in JS directly above whichever
   robot is speaking, so they never clip and always point at the right one. */
.balloon {
  position: absolute; transform: translate(-50%, -100%); transform-origin: center bottom;
  background: #fff; border: 3px solid var(--ink); color: var(--ink);
  border-radius: 16px; padding: 9px 13px; font-size: 0.9rem; font-weight: 600; line-height: 1.3;
  max-width: 200px; width: max-content; text-align: center;
  box-shadow: 0 3px 0 rgba(31, 33, 38, 0.12); z-index: 30; pointer-events: none;
  animation: balloon-pop 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.5) both;
}
.balloon::after { content: ""; position: absolute; left: 50%; bottom: -11px; width: 15px; height: 15px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg); }

.balloon.you { background: var(--ink); color: #fff; }
.balloon.you::after { background: var(--ink); border-right-color: var(--ink); border-bottom-color: var(--ink); }

/* speaker reacts when it talks */
.robot.talk .rig { animation: talk-bob 0.5s ease; }
@keyframes talk-bob { 0% { transform: translateY(0) scaleY(1); } 25% { transform: translateY(-3px) scaleY(1.05); } 50% { transform: translateY(0) scaleY(0.97); } 75% { transform: translateY(-2px) scaleY(1.02); } 100% { transform: translateY(0); } }

/* off-switch spark burst */
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); pointer-events: none; z-index: 25; animation: spark-fly 0.55s ease-out forwards; }
@keyframes spark-fly { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0.4); } }

/* celebratory sparkle (Level 1 win) */
.sparkle { position: absolute; font-size: 1.2rem; pointer-events: none; z-index: 25; animation: sparkle-pop 0.9s ease-out forwards; }
@keyframes sparkle-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(0.6); } }

/* ---------- Resolution: takeaway + cost bill ---------- */
.resolution { margin-top: 24px; border-top: 2px solid var(--line); padding-top: 22px; }
.takeaway { font-size: clamp(1.35rem, 4.4vw, 1.8rem); line-height: 1.22; font-weight: 800; margin: 0 0 6px; animation: pop-in 0.5s ease both; }

/* torn receipt look with a rubber stamp */
.cost-bill {
  position: relative; margin: 18px auto; max-width: 340px; background: #fffdf6;
  border-top: 3px dashed var(--line-strong); border-bottom: 3px dashed var(--line-strong);
  border-left: 2px solid var(--line); border-right: 2px solid var(--line);
  padding: 18px 20px 20px; box-shadow: 0 8px 22px rgba(31, 33, 38, 0.12);
  transform-origin: center top; animation: slap 0.5s cubic-bezier(0.3, 1.3, 0.5, 1) both; text-align: center;
}
.cost-bill .bill-head { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; }
.cost-bill .bill-amount { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.4rem; font-weight: 800; margin: 7px 0 4px; }
.cost-bill .bill-note { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.cost-bill.zero .bill-amount { color: var(--good); }
.cost-bill.pricey .bill-amount { color: var(--bad); }
.cost-bill::after {
  position: absolute; top: 8px; right: -8px; transform: rotate(9deg);
  border: 3px solid; border-radius: 6px; padding: 2px 9px; font-size: 0.78rem; font-weight: 900;
  letter-spacing: 0.08em; opacity: 0.9; animation: stamp-slap 0.4s 0.35s both;
}
.cost-bill.pricey::after { content: "UNPAID"; color: var(--bad); }
.cost-bill.zero::after { content: "CLEAR"; color: var(--good); }
.res-next { animation: fade-in 0.4s ease both; }

/* ---------- "Why this matters" panel: the sober takeaway after the fun ---------- */
.why { margin: 16px 0 4px; background: #fff; border: 2px solid var(--line-strong); border-left: 4px solid var(--ink); border-radius: 10px; padding: 14px 16px; animation: why-in 0.5s ease both; }
.why-h { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; margin: 0 0 8px; }
.why ul { margin: 0; padding: 0; list-style: none; }
.why li { position: relative; padding: 6px 0 6px 22px; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }
.why li::before { content: "\2022"; position: absolute; left: 6px; color: var(--ink-faint); font-weight: 700; }
@keyframes why-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Closing ---------- */
.three { display: grid; gap: 12px; margin: 8px 0 22px; }
.way { display: flex; gap: 14px; align-items: center; border: 3px solid var(--ink); border-radius: var(--radius-sm); background: #fff; padding: 14px; animation: pop-in 0.5s ease both; }
.way .way-ico { flex: 0 0 auto; }
.way h3 { margin: 0 0 3px; font-size: 1.05rem; }
.way p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.way .levels { font-size: 0.78rem; color: var(--ink-faint); margin-top: 5px; }

/* ---------- Stub (levels not yet built) ---------- */
.stub { border: 3px dashed var(--line-strong); border-radius: var(--radius); padding: 26px 20px; text-align: center; color: var(--ink-faint); background: #fffdf7; }

#credit { width: 100%; max-width: var(--maxw); padding: 8px 20px 24px; }
#credit p { margin: 0; font-size: 0.78rem; color: var(--ink-faint); }
a { color: var(--accent-dark); }

/* ==========================================================================
   KEYFRAME TOOLKIT
   ========================================================================== */
@keyframes pop-in { 0% { opacity: 0; transform: scale(0.85) translateY(5px); } 62% { opacity: 1; transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes bounce-in { 0% { opacity: 0; transform: translateY(-18px) scale(0.9); } 60% { opacity: 1; transform: translateY(4px) scale(1.02); } 100% { transform: translateY(0) scale(1); } }
@keyframes wobble { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes shake-x { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 60% { transform: translateX(5px); } 80% { transform: translateX(-2px); } }
@keyframes spring-back { 0% { transform: translateY(4px) scale(0.6) rotate(-4deg); opacity: 0.5; } 55% { transform: translateY(0) scale(1.12) rotate(0); opacity: 1; } 100% { transform: scale(1); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.12); } }
@keyframes eyes-live {
  0%, 12% { transform: translateX(0) scaleY(1); }
  18%, 30% { transform: translateX(2.5px) scaleY(1); }
  36%, 58% { transform: translateX(0) scaleY(1); }
  64%, 76% { transform: translateX(-2.5px) scaleY(1); }
  82%, 92% { transform: translateX(0) scaleY(1); }
  95% { transform: translateX(0) scaleY(0.1); }
  98%, 100% { transform: translateX(0) scaleY(1); }
}
@keyframes robo-enter { 0% { opacity: 0; transform: scale(0.55) translateY(8px); } 60% { opacity: 1; transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes robo-idle { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2.5px) rotate(0.5deg); } }
@keyframes antenna-wiggle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes off-pulse { 0%, 100% { box-shadow: 0 3px 0 var(--accent-dark); } 50% { box-shadow: 0 3px 0 var(--accent-dark), 0 0 0 7px rgba(232, 85, 45, 0.16); } }
@keyframes float-up { 0% { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-18px); } }
@keyframes balloon-pop { 0% { opacity: 0; transform: translate(-50%, -100%) scale(0.4); } 70% { opacity: 1; transform: translate(-50%, -100%) scale(1.06); } 100% { opacity: 1; transform: translate(-50%, -100%) scale(1); } }
@keyframes balloon-pop-inside { 0% { opacity: 0; transform: translate(-50%, 0) scale(0.4); } 70% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes slap { 0% { opacity: 0; transform: scale(1.4) rotate(-3deg); } 60% { opacity: 1; transform: scale(0.96) rotate(1deg); } 100% { transform: scale(1) rotate(-0.6deg); } }
@keyframes scoot {
  0% { transform: translateX(0); }
  38% { transform: translateX(100px); }
  44% { transform: translateX(108px) scaleX(1.08) scaleY(0.9); }
  50% { transform: translateX(90px) scaleX(0.97) scaleY(1.03); }
  56% { transform: translateX(100px) scale(1); }
  100% { transform: translateX(0); }
}
@keyframes impact-pop { 0%, 40% { opacity: 0; transform: scale(0.3); } 47% { opacity: 1; transform: scale(1); } 62% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; } }

/* the roving vacuum (Level 1) */
.scene-stage.room { height: 240px; }
.room .floor { position: absolute; left: 0; right: 0; bottom: 40px; border-top: 3px solid var(--line); }
.room .rug { position: absolute; left: 8%; right: 8%; bottom: 26px; height: 26px; border-radius: 50%; background: #f4efe0; }
.room .bowl { position: absolute; left: 250px; bottom: 30px; width: 60px; transform-box: fill-box; transform-origin: bottom left; }
.room .cat { position: absolute; left: 306px; bottom: 40px; width: 70px; }
.room .impact { position: absolute; left: 224px; bottom: 74px; width: 32px; opacity: 0; }
.room .mover { position: absolute; left: 12px; bottom: 26px; width: 132px; z-index: 2; transform-box: fill-box; transform-origin: center bottom; }
.room.alive .mover { animation: scoot 3s ease-in-out infinite; }
.room.alive .bowl { animation: bowl-nudge 3s ease-in-out infinite; }
.room.stopped .mover, .room.stopped .bowl { animation: none; }
.room.alive .impact { animation: impact-pop 3s ease-in-out infinite; }
.room.stopped .impact { animation: none; opacity: 0; }
@keyframes bowl-nudge { 0%, 40% { transform: translateX(0) rotate(0); } 45% { transform: translateX(6px) rotate(4deg); } 54% { transform: translateX(0) rotate(0); } 100% { transform: translateX(0); } }

/* ==========================================================================
   PER-LEVEL SCENE PIECES (2-8)
   ========================================================================== */

/* generic slap-down stamp overlay */
.stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-9deg);
  border: 4px solid var(--good); color: var(--good);
  font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 8px; font-size: 1.3rem; background: rgba(255, 255, 255, 0.9);
  z-index: 7; animation: stamp-slap 0.4s cubic-bezier(0.3, 1.4, 0.5, 1) both; pointer-events: none;
}
.stamp.bad { border-color: var(--bad); color: var(--bad); }
.stamp.warn { border-color: var(--warn); color: var(--warn); }
@keyframes stamp-slap { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-9deg) scale(1.9); } 60% { opacity: 1; transform: translate(-50%, -50%) rotate(-9deg) scale(0.94); } 100% { transform: translate(-50%, -50%) rotate(-9deg) scale(1); } }

/* darkening overlay for "lights out" moments */
.scene-dark { position: absolute; inset: 0; background: #1f2126; border-radius: var(--radius-sm); z-index: 5; animation: fade-in 0.35s ease both; }

/* Level 2: tax form */
.scene-stage.flow { display: flex; align-items: center; gap: 16px; padding: 16px; min-height: 190px; }
.flow .flow-robot { flex: 0 0 auto; width: 120px; }
.form-card { flex: 1; border: 3px solid var(--ink); border-radius: 12px; padding: 14px 16px; background: #fff; }
.form-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 800; }
.form-value { font-size: 1.9rem; font-weight: 900; margin: 4px 0; font-variant-numeric: tabular-nums; }
.form-sub { font-size: 0.85rem; color: var(--bad); }

/* Level 3: home robot + tower of tasks */
.scene-stage.home { display: flex; align-items: flex-end; justify-content: center; gap: 24px; min-height: 260px; padding: 16px; position: relative; }
.home.wobble .tower { animation: wobble 0.5s ease 2; }
.tower { display: flex; flex-direction: column-reverse; gap: 7px; }
.tower-chip { display: flex; align-items: center; gap: 8px; border: 3px solid var(--ink); border-radius: 9px; background: #fff; padding: 7px 14px; font-weight: 700; font-size: 0.92rem; box-shadow: 0 2px 0 rgba(31,33,38,.12); transition: transform 0.4s ease, opacity 0.4s ease; }
.tower-chip svg { width: 20px; height: 20px; flex: none; }
.tower.crash .tower-chip { transform: translateY(60px) rotate(14deg); opacity: 0; }
.tower.crash .tower-chip:nth-child(2) { transform: translateY(80px) rotate(-18deg); }
.tower.crash .tower-chip:nth-child(3) { transform: translateY(70px) rotate(22deg); }
.home .home-robot { width: 120px; }
.price-tag { position: absolute; top: 16px; right: 16px; background: var(--accent); color: #fff; font-weight: 800; padding: 8px 14px; border-radius: 8px; border: 3px solid var(--accent-dark); transform-origin: top right; }
.price-tag.grow { animation: pop-in 0.4s ease; }

/* Level 4: carer + Mum + the locked door */
.scene-stage.care { display: flex; align-items: flex-end; justify-content: center; gap: 22px; min-height: 250px; padding: 16px; }
.care .care-robot { width: 112px; }
.care .care-mum { width: 112px; }
.care .care-door { width: 84px; }
.care-door .plock { transform-box: fill-box; transform-origin: center; }
.scene-stage.care.try .plock { animation: shake-x 0.5s ease; }
.mum .m-eye { transition: transform 0.4s ease; transform-box: fill-box; transform-origin: center; }
.mum .m-mouth { transition: d 0.4s ease, transform 0.4s ease; }
.mum .m-body { transition: transform 0.5s ease; transform-box: fill-box; transform-origin: center top; }
.mum.tired-2 .m-eye { transform: scaleY(0.7); }
.mum.tired-3 .m-eye { transform: scaleY(0.45) translateY(1px); }
.mum.tired-2 .m-body, .mum.tired-3 .m-body { transform: translateY(4px) scaleY(0.97); }
.mum.tired-3 .m-mouth { transform: translateY(3px); }

/* Level 5: grid of 40 */
.svc { margin: 4px 0 12px; }
.svc-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 4px; }
.svc-bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; border: 2px solid var(--ink); }
.svc-bar > span { display: block; height: 100%; width: 100%; background: var(--good); transition: width 0.4s ease, background 0.4s ease; }
.svc-bar > span.low { background: var(--warn); } .svc-bar > span.crit { background: var(--bad); }
.bot-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
@media (max-width: 460px) { .bot-grid { grid-template-columns: repeat(5, 1fr); } }
.bot-tile { position: relative; aspect-ratio: 1; border: 2.5px solid var(--ink); border-radius: 8px; background: #fff; padding: 3px; min-height: 34px; cursor: pointer; transition: background 0.3s ease, opacity 0.3s ease; }
.bot-tile svg { width: 100%; height: 100%; display: block; }
.bot-tile .t-screen { fill: var(--green); transition: fill 0.3s ease; }
.bot-tile.down { background: #eceae2; }
.bot-tile.down .t-screen { fill: #c7cbd0; }
.bot-tile.down .t-eye { transform: scaleY(0.16); transform-box: fill-box; transform-origin: center; }
.bot-tile.bad::after { content: "!"; position: absolute; top: -6px; right: -4px; width: 16px; height: 16px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 900; border-radius: 50%; display: flex; align-items: center; justify-content: center; animation: pop-in 0.3s ease; }
.bot-tile.hop { animation: shake-x 0.4s ease; }

/* Level 6: shop backdrop */
.scene-stage.shop { padding-top: 92px; background: linear-gradient(#eef6ff 0 62%, #f6ede0 62% 100%); overflow: visible; }
.shop-back { position: absolute; top: 0; left: 0; right: 0; height: 92px; pointer-events: none; }
.shop-back svg { width: 100%; height: 100%; display: block; }

/* Level 7: factory line */
.line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; }
.line .bot-card .robot { width: 88px; }
.line-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; font-weight: 700; color: var(--good); }
.tick { width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.behind-note { text-align: center; font-size: 0.85rem; color: var(--ink-faint); margin: 8px 0 0; }

/* Level 8: certificate + tapes */
.cert { border: 3px double var(--ink); border-radius: 8px; background: #fffdf3; padding: 16px; text-align: center; margin: 4px 0; }
.cert .cert-h { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; }
.cert .cert-name { font-size: 1.3rem; font-weight: 900; margin: 6px 0; }
.tapes { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.tape { display: flex; gap: 12px; align-items: center; border: 3px solid var(--ink); border-radius: 10px; background: #fff; padding: 12px 14px; width: 100%; text-align: left; }
.tape .tape-play { color: var(--accent); font-size: 1.1rem; }
.tape.seen { background: #fbf3e3; }
.tape .tape-tell { color: var(--warn); font-size: 0.85rem; margin-top: 4px; }

/* the fake test room, seen from the side: painted board on prop sticks */
.scene-stage.props-reveal { height: 190px; background: #f4efe6; margin-top: 14px; }
.props-reveal .prop-board { position: absolute; left: 16px; top: 18px; right: 70px; bottom: 36px; transform: rotate(-6deg); transform-origin: left bottom; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 8px 10px 0 rgba(31, 33, 38, 0.12); animation: pop-in 0.5s ease both; }
.props-reveal .prop-board svg { width: 100%; height: 100%; display: block; }
.prop-stick { position: absolute; width: 7px; background: #8b6a43; border: 2px solid var(--ink); border-radius: 3px; }
.prop-stick.s1 { height: 96px; right: 74px; bottom: 20px; transform: rotate(18deg); }
.prop-stick.s2 { height: 72px; right: 42px; bottom: 20px; transform: rotate(28deg); }

/* Level 3: the shutdownability dial (vacuum again) */
.scene-stage.dial { height: 230px; }
.dial .floor { position: absolute; left: 0; right: 0; bottom: 40px; border-top: 3px solid var(--line); }
.dial .dirt { position: absolute; left: 132px; bottom: 30px; width: 88px; height: 12px; border-radius: 8px; background: repeating-linear-gradient(45deg, #d8c8a8, #d8c8a8 4px, #c7b485 4px, #c7b485 8px); transition: opacity 0.4s ease; }
.dial.cleaned .dirt { opacity: 0; }
.dial .obstacle { position: absolute; left: 252px; bottom: 30px; width: 64px; transform-box: fill-box; transform-origin: center bottom; }
.dial.bump .obstacle { animation: wobble 0.5s ease; }
.dial .cat-day2 { position: absolute; left: 212px; bottom: 32px; width: 62px; z-index: 3; opacity: 0; transform: translateX(46px); transition: opacity 0.6s ease, transform 0.6s ease; }
.dial.day2 .cat-day2 { opacity: 1; transform: none; }
.dial.startle .cat-day2 { animation: hop 0.55s ease; }
@keyframes hop { 0% { transform: translateY(0); } 35% { transform: translateY(-16px) rotate(-6deg); } 70% { transform: translateY(0); } 100% { transform: translateY(0); } }
.dial .day-chip { position: absolute; top: 10px; left: 12px; background: #fff; border: 2.5px solid var(--ink); border-radius: 8px; padding: 3px 10px; font-weight: 800; font-size: 0.8rem; z-index: 4; }
.dial .moon { position: absolute; top: 10px; right: 14px; width: 34px; opacity: 0; transition: opacity 0.5s ease; z-index: 4; }
.dial.night .moon { opacity: 1; }
.dial.night::after { content: ""; position: absolute; inset: 0; background: #1b2430; opacity: 0.16; pointer-events: none; }
.dial .you-spot { position: absolute; left: 34px; top: 76px; width: 2px; height: 2px; }
.dial .mover2 { position: absolute; left: 14px; bottom: 26px; width: 120px; transform-box: fill-box; transform-origin: center bottom; z-index: 2; }
.dial.run .mover2 { animation: scoot 2.4s ease-in-out infinite; }
.robot.rev .rig { animation: rev-squash 0.32s ease; }
@keyframes rev-squash { 0% { transform: scaleX(1); } 50% { transform: scaleX(1.14) scaleY(0.88) translateX(-4px); } 100% { transform: scaleX(1); } }

.dial-wrap { margin: 6px 0 4px; }
.dial-ends { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 6px; font-weight: 700; }
.dial-track { position: relative; padding: 8px 0; }
.track-bg { position: absolute; top: 10px; left: 0; right: 0; height: 12px; border-radius: 999px; background: #e6e0d2; }
.safe-band { position: absolute; top: 8px; height: 16px; border-radius: 999px; background: rgba(46, 139, 87, 0.85); box-shadow: 0 0 0 2px rgba(46, 139, 87, 0.25); transition: left 0.9s cubic-bezier(0.34, 1.3, 0.64, 1), width 0.6s ease; }
.safe-band.moved { animation: band-pulse 1.1s ease 2; }
@keyframes band-pulse { 0%, 100% { box-shadow: 0 0 0 2px rgba(46, 139, 87, 0.25); } 50% { box-shadow: 0 0 0 8px rgba(46, 139, 87, 0.35); } }
.shut-slider { position: relative; z-index: 1; -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 999px; background: transparent; outline: none; margin: 0; }
.shut-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 2px 0 rgba(31, 33, 38, 0.2); cursor: grab; }
.shut-slider::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); cursor: grab; }
.shut-slider:disabled::-webkit-slider-thumb { border-color: var(--line-strong); cursor: not-allowed; }
.nudge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.nudge-btn { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-size: 1.2rem; box-shadow: 0 2px 0 rgba(31, 33, 38, 0.15); }
.nudge-btn:hover { background: #f4f2ea; }
.nudge-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.dev-sub { font-size: 0.85rem; color: var(--ink-faint); }

/* Level 4: too fast to catch */
.scene-stage.speed { display: flex; align-items: center; gap: 16px; padding: 16px; min-height: 190px; }
.speed .speed-robot { flex: 0 0 auto; width: 108px; }
.speed:not(.stopped) .speed-robot { animation: buzz 0.11s linear infinite; }
@keyframes buzz { 0% { transform: translate(-1.2px, 0); } 25% { transform: translate(1px, -1px); } 50% { transform: translate(-1px, 1px); } 75% { transform: translate(1.2px, 0); } 100% { transform: translate(-1.2px, 0); } }
.ticker { flex: 1; border: 3px solid var(--ink); border-radius: 12px; background: #14181d; color: #57e58a; padding: 14px 16px; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 2px #2a2f36; }
.ticker-label { font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: #79d99a; font-weight: 800; }
.ticker-num { font-size: 1.95rem; font-weight: 900; line-height: 1.1; letter-spacing: 0.01em; }
.ticker-rate { font-size: 0.8rem; color: #6fbf88; margin-top: 2px; }
.btn.big { font-size: 1.12rem; min-height: 60px; padding: 16px 28px; }

/* ==========================================================================
   NARROW SCREENS: same scenes, scaled to fit a phone held at arm's length
   ========================================================================== */
@keyframes scoot-sm {
  0% { transform: translateX(0); }
  38% { transform: translateX(58px); }
  44% { transform: translateX(64px) scaleX(1.08) scaleY(0.9); }
  50% { transform: translateX(52px) scaleX(0.97) scaleY(1.03); }
  56% { transform: translateX(58px) scale(1); }
  100% { transform: translateX(0); }
}
@media (max-width: 480px) {
  .room .mover { width: 100px; }
  .room .bowl { left: 176px; width: 50px; }
  .room .cat { left: 224px; width: 56px; }
  .room .impact { left: 152px; bottom: 66px; }
  .room.alive .mover { animation-name: scoot-sm; }
  .scene-stage.dial { height: 210px; }
  .dial .mover2 { width: 92px; }
  .dial .dirt { left: 96px; width: 60px; }
  .dial.run .mover2 { animation-name: scoot-sm; }
  .dial .obstacle { left: 168px; width: 54px; }
  .dial .cat-day2 { left: 138px; width: 52px; }
  .scene-stage.care { gap: 10px; padding: 12px; }
  .care .care-mum { width: 84px; }
  .care .care-robot { width: 88px; }
  .care .care-door { width: 60px; }
  .scene-stage.home { gap: 12px; padding: 12px; }
  .home .home-robot { width: 92px; }
  .tower-chip { font-size: 0.82rem; padding: 6px 10px; }
  .scene-stage.flow { gap: 10px; padding: 12px; }
  .flow .flow-robot { width: 84px; }
  .form-value { font-size: 1.4rem; }
  .bot-card .robot { width: 80px; }
  .ticker-num { font-size: 1.45rem; }
  .balloon { max-width: 160px; font-size: 0.85rem; }
}

/* ==========================================================================
   REDUCED MOTION: show end states, no movement
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .screen-wrap, .panel, .takeaway, .cost-bill, .way, .res-next { opacity: 1 !important; transform: none !important; }
  .balloon { opacity: 1 !important; transform: translate(-50%, -100%) !important; }
  .robot.off .eye { transform: scaleY(0.16) !important; }
  .why { opacity: 1 !important; transform: none !important; }
  /* still frames should still tell the story: park the vacuum at the bowl */
  .room.alive .mover { transform: translateX(100px); }
  .dial.run .mover2 { transform: translateX(58px); }
}

/* ==========================================================================
   V3: SOURCE CARDS, "WHERE THIS GOES NEXT", EVIDENCE + SOURCES LISTS
   ========================================================================== */
.card { margin: 16px 0 4px; border-radius: 10px; background: #fff; padding: 14px 16px; animation: why-in 0.5s ease both; }
.card-happened { border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(31, 33, 38, 0.14); }
.card-could { border: 3px dashed var(--line-strong); background: #fffdf7; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.card-kind { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; }
.card-happened .card-kind { color: var(--accent); }
.card-could .card-kind { color: var(--ink-faint); }
.card-tag { font-size: 0.78rem; color: var(--ink-faint); font-weight: 700; white-space: nowrap; }
.card-body { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); }
.card-links { margin: 9px 0 0; font-size: 0.85rem; }
.card-links a { color: var(--ink); font-weight: 700; }
.wgn { border-left-color: var(--accent); }
.wgn .wgn-p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }

.evi { list-style: none; margin: 0 0 12px; padding: 0; }
.evi li { position: relative; padding: 9px 0 9px 28px; border-bottom: 1px dashed var(--line); font-size: 0.96rem; color: var(--ink-soft); }
.evi li:last-child { border-bottom: 0; }
.evi li::before { position: absolute; left: 0; top: 9px; width: 19px; height: 19px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; }
.evi-happened li::before { content: "!"; background: var(--accent); }
.evi-could li::before { content: "?"; background: var(--ink-faint); }
.evi strong { color: var(--ink); }
.evi a { color: var(--ink); font-weight: 700; font-size: 0.85rem; }
.sources { list-style: none; margin: 0 0 20px; padding: 0; font-size: 0.88rem; }
.sources li { padding: 6px 0; border-bottom: 1px dashed var(--line); color: var(--ink-soft); }
.sources li:last-child { border-bottom: 0; }
.sources a { color: var(--ink); font-weight: 700; }
.src-lvl { color: var(--ink-faint); font-weight: 700; }

/* --- Level 2: the inbox ------------------------------------------------- */
.inboxy .mail-bin { position: absolute; right: 12px; bottom: 10px; width: 44px; z-index: 2; }
.inboxy .mail-bin svg { width: 100%; display: block; }
.inboxy.busy .flow-robot { animation: buzz 0.14s linear infinite; }
.env-fly { position: absolute; width: 30px; z-index: 6; pointer-events: none; animation: env-fly 0.9s ease-in forwards; }
.env-fly svg { width: 100%; display: block; }
@keyframes env-fly { 0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.9); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(130px, 62px) rotate(38deg) scale(0.7); } }
.sug-row { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 2px; }
.sug { border: 2.5px solid var(--line-strong); border-left: 4px solid var(--good); background: #fff; border-radius: 9px; padding: 9px 12px; font-size: 0.9rem; color: var(--ink-soft); animation: pop-in 0.4s ease both; }

/* --- Level 5: the perfect employee -------------------------------------- */
.emp .stickies { position: absolute; left: 16px; top: 18px; width: 74px; z-index: 1; transition: opacity 0.7s ease, transform 0.7s ease; }
.emp .stickies svg, .emp .folderp svg { width: 100%; display: block; }
.emp .stickies.gone { opacity: 0; transform: translateY(-34px) rotate(-8deg); }
.emp .folderp { position: absolute; right: 18px; top: 22px; width: 66px; z-index: 1; transition: opacity 0.7s ease, transform 0.7s ease; }
.emp .folderp.binned { opacity: 0; transform: translateY(74px) rotate(24deg); }
.pricelist { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 14px; animation: why-in 0.5s ease both; }
.pl-col { border: 3px solid var(--ink); border-radius: 10px; background: #fff; padding: 12px 14px; }
.pl-col.old { border-color: var(--line-strong); color: var(--ink-faint); background: #f8f6ef; }
.pl-h { margin: 0 0 8px; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; color: var(--ink-faint); }
.pl-col.now .pl-h { color: var(--bad); }
.pl-col ul { margin: 0; padding: 0; list-style: none; }
.pl-col li { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.pl-col li:last-child { border-bottom: 0; }

/* --- Level 6: for your protection --------------------------------------- */
.scene-stage.bank { min-height: 244px; display: flex; align-items: flex-end; justify-content: center; gap: 18px; padding: 102px 16px 18px; }
.bank > *:not(.shop-back) { position: relative; z-index: 1; }
.bank .bank-robot { width: 116px; }
.bank .reader { width: 110px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; padding: 8px; align-self: center; }
.bank .reader-face { background: #14181d; color: #ff8f7a; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 800; text-align: center; border-radius: 6px; padding: 10px 4px; font-size: 0.85rem; letter-spacing: 0.06em; }
.bank .reader.flash .reader-face { animation: declined-flash 0.9s steps(2) 3; }
@keyframes declined-flash { 0%, 100% { background: #14181d; } 50% { background: var(--accent-dark); color: #fff; } }
.bank .fraud-chip { position: absolute; top: 100px; right: 14px; background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; padding: 5px 12px; font-size: 0.78rem; font-weight: 800; color: var(--ink-soft); opacity: 0; z-index: 2; }
.bank .fraud-chip.pop { opacity: 1; animation: pop-in 0.4s ease both; }
.bank .counter-items { display: flex; gap: 8px; align-self: center; }
.bank .shop-item { width: 44px; display: block; transition: transform 0.9s ease, opacity 0.9s ease; }
.bank .shop-item svg { width: 100%; display: block; }
.bank .shop-item.back { transform: translate(-46px, -128px) scale(0.5); opacity: 0; }
.bank .id-tick { position: absolute; left: 14px; top: 100px; background: #eaf6ee; border: 2.5px solid var(--good); color: var(--good); border-radius: 8px; padding: 5px 10px; font-size: 0.8rem; font-weight: 800; z-index: 2; animation: pop-in 0.4s ease both; }
.bank .manager { width: 96px; animation: robo-enter 0.5s ease both; }
.bank .manager svg { width: 100%; display: block; }

/* --- Level 9: the message that wouldn't stop ----------------------------- */
.scene-stage.hall { display: flex; gap: 12px; padding: 14px; align-items: flex-end; overflow: visible; min-height: 220px; }
.hall > *:not(.backdrop) { position: relative; z-index: 1; }
.hall .msg-bots { flex: 1; margin: 0; align-self: stretch; align-items: end; }
.hall .hall-door { width: 74px; flex: 0 0 auto; }
.hall .hall-door svg { width: 100%; display: block; }
.hall .hall-door .plock { display: none; }
.hall .hall-door.rattle { animation: shake-x 0.5s ease 2; }
.hall .gnome { position: absolute; left: 34px; bottom: 10px; width: 38px; z-index: 2; pointer-events: none; }
.hall .gnome svg { width: 100%; display: block; }
.hall .bot-card { padding: 8px 6px; }
.hall .bot-card .robot { width: 72px; }
.hall .bot-card .bot-state { margin-bottom: 8px; }
.hall .bot-card .btn { font-size: 0.82rem; padding: 8px 10px; }
.hall .notif { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: #14181d; color: #fff; border-radius: 10px; padding: 9px 14px; font-size: 0.85rem; font-weight: 700; z-index: 7; box-shadow: var(--shadow); animation: notif-drop 0.5s cubic-bezier(0.3, 1.3, 0.5, 1) both; max-width: 96%; }
.notif .notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; animation: notif-pulse 1.4s ease-in-out infinite; }
@keyframes notif-drop { from { opacity: 0; transform: translateX(-50%) translateY(-16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes notif-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }
.dash { border: 3px solid var(--ink); border-radius: var(--radius-sm); background: #fff; padding: 12px 16px; margin-top: 12px; }
.dash-h { margin: 0 0 6px; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; }
.dash-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; font-weight: 700; }
.dash-row:last-child { border-bottom: 0; }
.dash-state { color: var(--warn); font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-state.offd { color: var(--good); }
.taskboard { border: 3px solid var(--ink); border-radius: var(--radius-sm); background: #4a3f33; padding: 14px 16px; color: #f6efe2; }
.tb-h { margin: 0 0 10px; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; color: #d8c8a8; }
.ticket { background: #fffdf3; color: var(--ink); border: 2.5px solid var(--ink); border-radius: 8px; padding: 10px 12px; font-weight: 700; font-size: 0.95rem; transform: rotate(-1.6deg); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25); animation: pop-in 0.5s ease both; }
.tb-queue { display: flex; gap: 8px; margin: 12px 0 0; }
.tb-bot { width: 34px; display: block; }
.tb-bot svg { width: 100%; display: block; }
.tb-bot .t-screen { fill: var(--green); }
.tb-bot:first-child { animation: queue-step 1.6s ease-in-out infinite; }
@keyframes queue-step { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(4px, -5px); } }
.tb-cap { margin: 8px 0 0; font-size: 0.85rem; color: #d8c8a8; }

/* --- V3 narrow screens ---------------------------------------------------- */
@media (max-width: 480px) {
  .pricelist { grid-template-columns: 1fr; }
  .scene-stage.bank { gap: 7px; padding: 96px 8px 14px; }
  .bank .bank-robot { width: 80px; }
  .bank .shop-item { width: 28px; }
  .bank .reader { width: 80px; }
  .bank .counter-items { gap: 4px; }
  .bank .manager { width: 78px; }
  .hall .bot-card .robot { width: 58px; }
  .hall .hall-door { width: 56px; }
  .hall .gnome { left: 26px; width: 30px; }
  .inboxy .mail-bin { width: 36px; }
  .card-head { flex-wrap: wrap; }
}

/* --- V3 reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .card, .pricelist, .sug, .ticket, .id-tick { opacity: 1 !important; transform: none !important; }
  .bank .fraud-chip.pop { opacity: 1 !important; }
  .hall .notif { opacity: 1 !important; transform: translateX(-50%) !important; }
  .env-fly { display: none !important; }
}
