:root {
  --ink: #1b2340;
  --cream: #e8f4ff;
  --pink: #ff7eb6;
  --yellow: #ffc43d;
  --teal: #3ccf9a;
  --purple: #8b5cf6;
  --orange: #ff8552;
  --lime: #b0e57c;
  --sky: #6aa9ff;
  --red: #e8435a;
  --paci: #24b8b0;
  --paci-lt: #7fe0d8;
  --hand: 'Patrick Hand', 'Comic Sans MS', 'Chalkboard SE', cursive;
  --fat: 'Sniglet', 'Patrick Hand', 'Comic Sans MS', cursive;
  --wob: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wob2: 18px 225px 18px 255px / 255px 18px 225px 18px;
  --boing: cubic-bezier(.2, 1.6, .4, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--hand);
  color: var(--ink);
  font-size: 19px;
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cpath d='M16 7l2.4 5 5.4.8-3.9 3.8.9 5.4-4.8-2.6-4.8 2.6.9-5.4-3.9-3.8 5.4-.8z' fill='%23ffc43d' fill-opacity='.45'/%3E%3Cpath d='M52 42a9 9 0 1 0 8 13a7 7 0 1 1-8-13z' fill='%23b49bff' fill-opacity='.32'/%3E%3Ccircle cx='50' cy='16' r='2.4' fill='%23ff7eb6' fill-opacity='.55'/%3E%3Ccircle cx='18' cy='52' r='2.2' fill='%236aa9ff' fill-opacity='.55'/%3E%3C/svg%3E");
  background-size: 72px 72px;
  overscroll-behavior: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  overflow-x: hidden;
}
#app { max-width: 520px; margin: 0 auto; position: relative; }
.screen {
  display: none; flex-direction: column;
  min-height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
}
.screen.active { display: flex; animation: screenIn .25s ease-out; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }

button { font-family: var(--hand); color: var(--ink); touch-action: manipulation; cursor: pointer; }
h1, h2, h3 { font-family: var(--fat); font-weight: 800; margin: 0; }
.pick, .chore-call, .progress span, .bub.big, .cut .q2 { font-weight: 800; }

/* ---------- doodle buttons ---------- */
.btn {
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: var(--wob);
  box-shadow: 4px 5px 0 var(--ink);
  padding: 12px 18px;
  font-size: 22px;
  line-height: 1.1;
  transition: transform .07s, box-shadow .07s;
}
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn.small { font-size: 18px; padding: 9px 12px; }
.btn.big { font-size: 26px; padding: 14px 24px; width: 100%; }
.c-sky { background: var(--sky); } .c-pink { background: var(--pink); }
.c-purple { background: var(--purple); color: #fff; } .c-lime { background: var(--lime); }
.c-red { background: var(--red); color: #fff; } .c-white { background: #fff; }
.c-orange { background: var(--orange); }
.icon-btn {
  width: 42px; height: 42px; flex: none;
  background: #fff; border: 3px solid var(--ink); border-radius: 50% 45% 50% 42%;
  font-size: 20px; box-shadow: 2px 3px 0 var(--ink);
}
.icon-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ---------- title ---------- */
.logo {
  text-align: center; font-size: clamp(44px, 13vw, 70px); line-height: 1; margin-top: 8px; font-weight: 800;
  filter: url(#wobble);
}
.logo i { display: inline-block; width: .28em; }
.logo span {
  display: inline-block; color: var(--c, var(--pink));
  -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill;
  text-shadow: 3px 4px 0 var(--ink);
  transform: rotate(var(--r, 0deg));
  animation: bob 2.2s ease-in-out infinite; animation-delay: var(--d, 0s);
}
.logo span:nth-child(1) { --c: var(--orange); --r: -8deg; --d: 0s; }
.logo span:nth-child(2) { --c: var(--yellow); --r: 6deg; --d: .1s; }
.logo span:nth-child(3) { --c: var(--sky); --r: -4deg; --d: .2s; }
.logo span:nth-child(4) { --c: var(--lime); --r: 8deg; --d: .3s; }
.logo span:nth-child(5) { --c: var(--pink); --r: -6deg; --d: .4s; }
.logo span:nth-child(6) { --c: var(--purple); --r: 5deg; --d: .5s; }
.logo span:nth-child(8) { --c: var(--red); --r: -10deg; --d: .6s; }
.logo span:nth-child(9) { --c: var(--yellow); --r: 7deg; --d: .7s; }
.logo span:nth-child(10) { --c: var(--teal); --r: 14deg; --d: .8s; }
@keyframes bob { 50% { translate: 0 -5px; } }
.tagline { text-align: center; margin: 6px 0 0; font-size: 19px; transform: rotate(-1.5deg); }
.title-art { width: 60%; max-width: 250px; margin: 0 auto; position: relative; }
.title-art svg { width: 100%; display: block; overflow: visible; }
.pick { font-family: var(--fat); font-size: 24px; margin: 4px 0 8px; text-align: center; }

.modes { display: grid; gap: 12px; }
.mode-btn {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 3.5px solid var(--ink); border-radius: var(--wob); box-shadow: 5px 6px 0 var(--ink);
  padding: 10px 14px; transition: transform .07s, box-shadow .07s;
}
.mode-btn:active { transform: translate(4px, 5px) !important; box-shadow: 1px 1px 0 var(--ink); }
.mode-btn:nth-child(1) { background: var(--yellow); transform: rotate(-.8deg); }
.mode-btn:nth-child(2) { background: var(--sky); border-radius: var(--wob2); transform: rotate(.7deg); }
.mode-btn:nth-child(3) { background: var(--lime); transform: rotate(-.5deg); }
.mode-ico { font-size: 40px; flex: none; filter: drop-shadow(2px 2px 0 var(--ink)); }
.mode-btn:hover .mode-ico { animation: wiggle .4s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.mode-txt { display: flex; flex-direction: column; }
.mode-txt b { font-family: var(--fat); font-weight: 800; font-size: 24px; }
.mode-txt small { font-size: 16px; line-height: 1.15; }
.mode-txt em { font-style: normal; font-size: 15px; margin-top: 4px; background: rgba(255,255,255,.6); border-radius: 10px; padding: 1px 8px; align-self: flex-start; border: 2px solid var(--ink); }
.menu-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 16px; }
.install { margin: 16px auto 0; }
.ios-hint { text-align: center; font-size: 17px; margin-top: 14px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 7px; }
.pill {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--wob);
  padding: 4px 10px; font-size: 17px; white-space: nowrap;
}
.pill b { font-family: var(--fat); font-weight: 800; }
.pill.paci-pill { background: var(--paci-lt); margin-left: auto; animation: cardIn .4s var(--boing); }
.pill.tablet-pill { background: #cfe3ff; animation: cardIn .4s var(--boing); }
.paci-pill + .tablet-btn, .paci-pill + .tablet-pill { margin-left: 0; }
.tablet-btn { margin-left: auto; font-family: var(--hand); font-size: 17px; background: #cfe3ff; box-shadow: 2px 3px 0 var(--ink); cursor: pointer; animation: cardIn .4s var(--boing); }
.tablet-btn[aria-disabled="true"] { opacity: .55; box-shadow: none; }
.tablet-btn .use { display: none; }
.tablet-btn.ready .use { display: inline; }
.topbar .pill { padding: 4px 8px; }
.tablet-btn.ready { background: var(--sky); animation: tabletReady 1s ease-in-out infinite; }
.tablet-btn:active { transform: translate(2px, 2px); box-shadow: none; }
@keyframes tabletReady { 50% { transform: rotate(-4deg) scale(1.08); } }
.pi { display: inline-block; width: 1.15em; height: 1em; vertical-align: -.15em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-27 -17 54 48'%3E%3Ccircle cx='0' cy='15' r='11' fill='none' stroke='%231b2340' stroke-width='8'/%3E%3Ccircle cx='0' cy='15' r='11' fill='none' stroke='%23b9f0e8' stroke-width='3.5'/%3E%3Cellipse rx='22' ry='13' fill='%2324b8b0' stroke='%231b2340' stroke-width='3.5'/%3E%3Ccircle r='5.5' fill='%23fff' stroke='%231b2340' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat center / contain; }
.pill.hurt { animation: hurt .5s; background: #ffd0d4; }
@keyframes hurt { 20%, 60% { transform: translateX(-4px) rotate(-3deg); } 40%, 80% { transform: translateX(4px) rotate(3deg); } }

/* ---------- prompt card ---------- */
.prompt {
  margin: 10px 0 6px; position: relative;
  background: #fff; border: 3px solid var(--ink); border-radius: var(--wob2);
  box-shadow: 4px 5px 0 var(--ink);
  padding: 8px 14px 8px 20px; transform: rotate(-1deg);
  min-height: 64px;
}
.prompt::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 10px;
  background: var(--stripe, var(--pink)); border-right: 3px solid var(--ink); border-radius: 14px 0 0 14px;
}
.prompt.pop { animation: cardIn .4s var(--boing); }
@keyframes cardIn { from { transform: rotate(-10deg) scale(.6); opacity: 0; } }
.prompt h3 { font-size: 21px; line-height: 1.1; }
.prompt p { margin: 2px 0 0; font-size: 17px; }

/* ---------- room ---------- */
.room-wrap { position: relative; margin-top: 4px; }
#room { width: 100%; display: block; border: 3.5px solid var(--ink); border-radius: 22px; box-shadow: 5px 6px 0 var(--ink); background: #fff; overflow: hidden; }
.room-wrap.shake { animation: shake .45s; }
@keyframes shake { 15% { translate: -7px 3px; } 30% { translate: 6px -4px; } 45% { translate: -5px -2px; } 60% { translate: 4px 4px; } 80% { translate: -2px 1px; } }

.obj { cursor: pointer; outline: none; }
.obj .hit { fill: transparent; }
.obj-art { transform-box: fill-box; transform-origin: 50% 100%; }
.searching .obj:not(.wrecked) .obj-art { animation: idleWob 2.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes idleWob { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(var(--tilt, 1deg)); } }
.searching .obj:not(.wrecked):hover .obj-art,
.searching .obj:not(.wrecked):focus-visible .obj-art { animation: hoverHop .5s ease-in-out infinite; }
@keyframes hoverHop { 50% { transform: translateY(-5px) scale(1.03); } }
.obj:focus-visible .hit { stroke: var(--pink); stroke-width: 4; stroke-dasharray: 8 6; }
.obj .obj-art.hop { animation: hop .75s var(--boing) !important; }
@keyframes hop {
  0% { transform: none; }
  25% { transform: translate(10px, -26px) rotate(9deg) scale(1.05, .95); }
  55% { transform: translate(-6px, -8px) rotate(-6deg); }
  100% { transform: none; }
}
.obj.wrecked { cursor: default; pointer-events: none; }
.obj.wrecked .obj-art { transform: rotate(var(--fall, -9deg)) translateY(4px); filter: saturate(.25) brightness(.9); }
.obj.wrecked .obj-art.smash { animation: smash .8s ease-in forwards; }
@keyframes smash {
  0% { transform: none; filter: none; }
  15% { transform: translate(-6px, 0) rotate(-5deg) scale(1.08, .92); }
  30% { transform: translate(6px, -12px) rotate(6deg); filter: none; }
  60% { transform: translate(0, 2px) rotate(calc(var(--fall, -9deg) * 1.4)) scale(1.04, .9); }
  100% { transform: rotate(var(--fall, -9deg)) translateY(4px); filter: saturate(.25) brightness(.9); }
}
.cracks { opacity: 0; }
.obj.wrecked .cracks { opacity: 1; }
.obj.wrecked .obj-art.smash ~ .cracks, .obj.wrecked .cracks.late { animation: fadeIn .3s .3s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.chair-art { transform-box: fill-box; transform-origin: 50% 100%; }
.chair-mad .chair-art { animation: rattle .18s linear infinite; }
@keyframes rattle { 25% { transform: rotate(-2.5deg) translateY(-2px); } 75% { transform: rotate(2.5deg); } }
.chair-mad .pej-leg { transform-box: fill-box; transform-origin: 50% 0; animation: kick .3s ease-in-out infinite alternate; }
.chair-mad .pej-leg.r { animation-delay: .15s; }
@keyframes kick { from { transform: rotate(-25deg); } to { transform: rotate(25deg); } }
.chair-mad .pej-arm, .title-pej .pej-arm { transform-box: fill-box; transform-origin: 100% 100%; animation: flail .22s ease-in-out infinite alternate; }
.chair-mad .pej-arm.r, .title-pej .pej-arm.r { transform-origin: 0% 100%; animation-delay: .11s; animation-direction: alternate-reverse; }
.title-pej { animation: titleBounce .45s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes titleBounce { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-9px) rotate(3deg) scale(1.02, .98); } }
.title-pej .pej-arm { animation-duration: .3s; }
.title-paci { animation: bob 1.6s ease-in-out infinite; }
@keyframes flail { from { transform: rotate(-30deg); } to { transform: rotate(20deg); } }
.chair-calm .pej-whole { animation: breathe 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes breathe { 50% { transform: scale(1.025, .975); } }
.paci { transform-box: fill-box; transform-origin: 50% 30%; animation: suck .55s ease-in-out infinite; }
@keyframes suck { 50% { transform: scale(.86) translateY(1px); } }
.tab-glow { animation: tabGlow .9s steps(3) infinite; }
@keyframes tabGlow { 50% { opacity: .1; } }
.tab-screen { animation: tabFlick 1.4s steps(2) infinite; }
@keyframes tabFlick { 50% { fill: #ffd3ec; } }
.tear { animation: tear .7s ease-in infinite; }
.tear.r { animation-delay: .35s; }
@keyframes tear { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(0, 22px); opacity: 0; } }
.zz { font-family: var(--fat); fill: var(--purple); animation: zz 2.4s ease-out infinite; }
.zz.b { animation-delay: .8s; } .zz.c { animation-delay: 1.6s; }
@keyframes zz { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(18px, -40px) scale(1.2); opacity: 0; } }
.steam-mad { animation: steam 1s ease-out infinite; transform-box: fill-box; }
.steam-mad.b { animation-delay: .5s; }
@keyframes steam { 0% { transform: translateY(0) scale(.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-26px) scale(1.2); opacity: 0; } }

.smoke { animation: smoke 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.smoke.b { animation-delay: .55s; } .smoke.c { animation-delay: 1.1s; }
@keyframes smoke { 0% { transform: translateY(0) scale(.4); opacity: 0; } 25% { opacity: .9; } 100% { transform: translateY(-40px) scale(1.5); opacity: 0; } }
.debris { transform-box: fill-box; transform-origin: center; }
.debris.fly { animation: debris .7s cubic-bezier(.3, .6, .5, 1) both; }
@keyframes debris { from { transform: translate(var(--fx, 0), -40px) rotate(200deg); opacity: 0; } 30% { opacity: 1; } }

/* reveals */
.reveal { transform-box: fill-box; transform-origin: 50% 100%; animation: popOut .55s var(--boing) both; }
@keyframes popOut { from { transform: translateY(26px) scale(.15); opacity: 0; } }
.reveal.leave { animation: popAway .35s ease-in forwards; }
@keyframes popAway { to { transform: translateY(14px) scale(.1); opacity: 0; } }
.reveal-pej .pej-whole { animation: giggle .18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes giggle { from { transform: rotate(-4deg) translateY(0); } to { transform: rotate(4deg) translateY(-4px); } }
.sparkle { animation: spin 3s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.zoom-off { animation: zoomOff .6s cubic-bezier(.5, -0.4, .8, .4) forwards !important; }
@keyframes zoomOff { to { transform: translate(var(--zx, 420px), -10px) rotate(25deg) scale(.7); opacity: 0; } }
.dust { animation: dust .7s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes dust { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6) translateY(-10px); opacity: 0; } }
.flash-ring { animation: ring .6s ease-out forwards; transform-box: fill-box; transform-origin: center; }
@keyframes ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

/* word bubbles */
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.bub {
  position: absolute; transform: translate(-50%, -100%);
  background: #fff; border: 3px solid var(--ink); border-radius: var(--wob);
  padding: 4px 12px; font-size: 18px; white-space: nowrap; box-shadow: 3px 3px 0 var(--ink);
  animation: bubIn 1.7s ease-out forwards;
}
.bub.big { font-family: var(--fat); font-size: 30px; background: var(--yellow); padding: 4px 16px; }
.bub.pinky { background: var(--pink); }
.bub.tealy { background: var(--paci-lt); }
.bub.skyey { background: var(--sky); }
.bub.limey { background: var(--lime); }
.bub.reddy { background: var(--red); color: #fff; }
@keyframes bubIn {
  0% { transform: translate(-50%, -60%) scale(.3) rotate(-10deg); opacity: 0; }
  15% { transform: translate(-50%, -100%) scale(1.1) rotate(3deg); opacity: 1; }
  25% { transform: translate(-50%, -100%) scale(1) rotate(-2deg); }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(1); opacity: 0; }
}
.suds { position: absolute; width: var(--s, 16px); height: var(--s, 16px); border-radius: 50%; border: 2.5px solid var(--ink); background: radial-gradient(circle at 35% 30%, #fff 0 25%, #c9f3ff 26%); transform: translate(-50%, -50%); animation: suds .8s ease-out forwards; }
@keyframes suds { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -40px))) scale(1); opacity: 0; } }

/* ---------- chore ---------- */
.status-row { display: grid; grid-template-columns: 46% 1fr; gap: 10px; margin-top: 10px; align-items: stretch; }
.monitor svg { width: 100%; display: block; overflow: visible; }
.monitor.breaking svg { animation: shake .3s infinite; }
.mon-static { opacity: 0; }
.loose .mon-static, .breaking .mon-static { opacity: 1; animation: staticFlick .12s steps(2) infinite; }
@keyframes staticFlick { 50% { transform: translateY(3px); } }
.mon-led { animation: blink 1s steps(2) infinite; }
.loose .mon-led, .breaking .mon-led { fill: var(--red); animation-duration: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.status {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--wob2); box-shadow: 4px 5px 0 var(--ink);
  padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; transform: rotate(1deg);
}
.status small { font-size: 16px; line-height: 1.1; }
.status b { font-family: var(--fat); font-weight: 800; font-size: 34px; line-height: 1; }
.status.loose { background: #ffd0d4; }
.status.loose b { color: var(--red); }
.status.urgent b { animation: pulse .5s ease-in-out infinite; display: inline-block; }
@keyframes pulse { 50% { transform: scale(1.15) rotate(-3deg); } }
.bar { height: 14px; border: 2.5px solid var(--ink); border-radius: 10px; background: #fff; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 100%; background: var(--lime); border-right: 2.5px solid var(--ink); transform-origin: left; }
.status.loose .bar i { background: var(--red); }
.status.urgent .bar i { background: var(--orange); }
.bar.fat { height: 22px; flex: 1; }
.bar.fat i { background: var(--sky); width: 0; transition: width .25s; }

.chore-call { font-family: var(--fat); font-size: 22px; text-align: center; margin: 12px 0 2px; transform: rotate(-1.5deg); }
.work-wrap { position: relative; touch-action: manipulation; cursor: pointer; }
#work { width: 100%; display: block; overflow: visible; }
.work-wrap.locked { pointer-events: none; }
.item { transform-box: fill-box; transform-origin: 50% 50%; }
.item.in { animation: itemIn .35s var(--boing) both; }
@keyframes itemIn { from { transform: translateX(-160px) rotate(-40deg) scale(.5); opacity: 0; } }
.item.out { animation: itemOut .4s ease-in forwards; }
@keyframes itemOut { 30% { transform: scale(1.12) rotate(-6deg); } to { transform: translate(150px, -40px) rotate(30deg) scale(.3); opacity: 0; } }
.item.bump { animation: bump .16s ease-out; }
@keyframes bump { 50% { transform: scale(.94, 1.05) rotate(-2deg); } }
.gunk { transform-box: fill-box; transform-origin: center; transition: transform .18s var(--boing), opacity .18s; }
.gunk.gone { transform: scale(0) rotate(90deg); opacity: 0; }
.tool { transition: transform .12s ease-out; }
.tool-inner { transform-box: fill-box; transform-origin: center; }
.tool-inner.scrub { animation: scrub .16s ease-in-out; }
@keyframes scrub { 25% { transform: translate(-10px, -4px) rotate(-14deg); } 75% { transform: translate(10px, 4px) rotate(14deg); } }
.fold { transform-box: fill-box; transform-origin: 50% 55%; transition: transform .22s var(--boing); }
.orbit { animation: spin 1.8s linear infinite; transform-box: view-box; transform-origin: 0 0; }
.wings { animation: buzz .08s linear infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes buzz { to { transform: scaleY(.4); } }
.drip { animation: drip 1.4s ease-in infinite; }
@keyframes drip { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(30px); opacity: 0; } }

.progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 19px; }
.progress span { white-space: nowrap; font-family: var(--fat); font-size: 22px; }

/* comic CRASH burst */
.burst {
  position: absolute; left: 50%; top: 42%; z-index: 30; pointer-events: none;
  font-family: var(--fat); font-weight: 800; font-size: 56px; color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 4px 5px 0 var(--ink);
  transform: translate(-50%, -50%);
  animation: burst 1.1s var(--boing) forwards;
}
.burst::before {
  content: ''; position: absolute; inset: -40px -50px; z-index: -1;
  background: var(--red);
  clip-path: polygon(50% 0, 60% 30%, 90% 8%, 72% 40%, 100% 50%, 72% 60%, 92% 92%, 60% 70%, 50% 100%, 40% 70%, 8% 92%, 28% 60%, 0 50%, 28% 40%, 10% 8%, 40% 30%);
  animation: spin 4s linear infinite;
}
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(.1) rotate(-30deg); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.15) rotate(6deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.3) rotate(-4deg); opacity: 0; } }

/* ---------- "it's too quiet" cut ---------- */
.cut {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #2b3466 0%, #1b2340 70%);
  color: #fff; text-align: center; padding: 30px; cursor: pointer;
}
.cut[hidden] { display: none; }
.cut .q1 { font-family: var(--hand); font-size: 34px; opacity: .9; }
.cut .q1 span { opacity: 0; animation: letter .05s forwards; }
@keyframes letter { to { opacity: 1; } }
.cut .q2 { font-family: var(--fat); font-size: 46px; color: var(--yellow); margin-top: 16px; opacity: 0; animation: q2 .6s var(--boing) 1.25s forwards; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 4px 0 #000; }
@keyframes q2 { from { transform: scale(.3) rotate(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cut .eyes { font-size: 40px; margin-bottom: 20px; animation: look 1.2s ease-in-out infinite; }
@keyframes look { 0%, 100% { transform: translateX(-14px); } 50% { transform: translateX(14px); } }
.cut .skip { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); font-size: 15px; opacity: .55; }
.cut .cricket { position: absolute; font-size: 22px; opacity: 0; animation: cricket 2.4s ease-in-out .3s infinite; }
@keyframes cricket { 0%, 100% { opacity: 0; } 30%, 60% { opacity: .6; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 160%); transition: transform .3s var(--boing), visibility .3s; visibility: hidden;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--wob); font-size: 19px;
  max-width: 92vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------- end ---------- */
#scr-end { justify-content: center; }
.end-card {
  background: #fff; border: 3.5px solid var(--ink); border-radius: var(--wob2); box-shadow: 6px 7px 0 var(--ink);
  padding: 18px 18px 20px; text-align: center; animation: cardIn .5s var(--boing);
}
.end-card.lose { background: #ffe0e3; }
.end-card h2 { font-size: 40px; line-height: 1; }
.end-card .sub { font-size: 19px; margin: 6px 0 4px; }
.end-art { width: 52%; max-width: 210px; margin: 4px auto 0; }
.end-art svg { width: 100%; display: block; overflow: visible; }
.stars { font-size: 46px; letter-spacing: 6px; margin: 4px 0; }
.stars span { display: inline-block; animation: starIn .5s var(--boing) both; filter: drop-shadow(2px 2px 0 var(--ink)); }
.stars span:nth-child(2) { animation-delay: .25s; } .stars span:nth-child(3) { animation-delay: .5s; }
.stars .off { filter: grayscale(1) opacity(.35); }
@keyframes starIn { from { transform: scale(0) rotate(-180deg); } }
.end-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 16px; }
.end-stats div { border: 2.5px solid var(--ink); border-radius: var(--wob); padding: 4px 6px; background: var(--cream); font-size: 15px; }
.end-stats b { display: block; font-family: var(--fat); font-weight: 800; font-size: 26px; }
.end-btns { display: grid; gap: 12px; }
.confetti { position: fixed; top: -20px; width: 12px; height: 16px; border: 2px solid var(--ink); z-index: 40; pointer-events: none; animation: confetti linear forwards; }
@keyframes confetti { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- how-to ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.page-head h2 { font-size: 34px; }
.paper { background: #fff; border: 3px solid var(--ink); border-radius: var(--wob2); box-shadow: 5px 6px 0 var(--ink); padding: 14px 18px; line-height: 1.3; }
.paper h3 { font-size: 24px; margin: 16px 0 4px; }
.paper p { margin: 6px 0; }
.paper ul { margin: 4px 0; padding-left: 22px; }
.score-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 17px; }
.score-table td { border: 2px solid var(--ink); padding: 4px 8px; }
.score-table tr:nth-child(odd) td { background: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  .logo span, .searching .obj .obj-art, .chair-mad .chair-art, .chair-mad .pej-leg, .chair-mad .pej-arm,
  .paci, .reveal-pej .pej-whole, .sparkle, .room-wrap.shake, .monitor.breaking svg, .status.urgent b,
  .title-art * { animation: none !important; }
}
