/* ============================================================
   GameHub — "Pocket Mode" landing: a Game Boy on a kid's desk.
   The scene is a fixed-size stage (landscape 1280×800, portrait
   820×1500) scaled to fit the window, so it's always one screen.
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #5a3a24; color: #f3e4c4; }
body { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none; }
@keyframes blink { 50% { opacity: 0; } }
.blink { animation: blink 1.1s steps(1) infinite; }

/* ---------- the desk (fills the window) ---------- */
.desk { position: fixed; inset: 0; width: 100%; height: 100%; }
.desk-fx { position: fixed; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, transparent 0 168px, rgba(30,14,6,.55) 168px 170px, rgba(255,220,180,.06) 170px 172px),
    radial-gradient(ellipse 55% 60% at 22% 18%, rgba(255,214,150,.38), transparent 70%),
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 55%, rgba(20,8,2,.6)); }
.view { position: fixed; inset: 0; overflow: hidden; transition: opacity .35s ease; }
#stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
body.in-game .view { opacity: 0; pointer-events: none; }

/* ---------- box art (shared with the Game Boy screen) ---------- */
.cover { position: relative; container-type: inline-size; aspect-ratio: 4 / 3; overflow: hidden; background: #111; }
.cover svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ttl { position: absolute; left: 0; right: 0; top: 5%; text-align: center; line-height: .95;
  -webkit-text-stroke: 1.5cqw var(--st); paint-order: stroke fill; text-shadow: 0 1cqw 0 var(--st); white-space: nowrap; }
.ttl small { display: block; font-family: "Press Start 2P"; font-size: 4cqw; letter-spacing: .3em; -webkit-text-stroke: 1cqw var(--st); margin-bottom: 1.6cqw; color: #e9b44c; }
.cv-breakout .ttl { font-family: "Bungee"; color: #fff6d8; --st: #151a3a; font-size: 14cqw; }
.cv-abby .ttl { font-family: "Shrikhand"; color: #fff6d8; --st: #8a2a2a; font-size: 14cqw; transform: rotate(-5deg); top: 3%; }
.cv-cuke .ttl { font-family: "Bungee"; color: #4f9f2f; --st: #fff6d8; font-size: 13cqw; transform: skewX(-9deg); }
.cv-dash .ttl { font-family: "Press Start 2P"; color: #e9b44c; --st: #121a2e; font-size: 9cqw; top: 8%; }
.cv-jack .ttl { font-family: "Bungee"; color: #ffb02e; --st: #3b1a0a; font-size: 12.5cqw; top: 3%; }
.cv-hyper .ttl { font-family: "Audiowide"; color: #fff; --st: #22164a; font-size: 12cqw; }

/* ---------- desk props ---------- */
.prop { position: absolute; pointer-events: none; }
.logo { padding: 9px; background: #fffdf6; border-radius: 24px; box-shadow: 0 6px 0 rgba(0,0,0,.08), 0 14px 22px rgba(0,0,0,.35); }
.logo-in { position: relative; overflow: hidden; background: #1b1b1b; border-radius: 17px; padding: 18px 30px 15px; text-align: center; }
.logo-in::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 1px, transparent 1px 18px), repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 1px, transparent 1px 18px); }
.logo h1 { position: relative; margin: 0; font: 400 50px/1 "Rubik Mono One"; color: #ece7dd; text-shadow: 4px 4px 0 #c8102e; display: flex; align-items: center; gap: 14px; }
.logo h1 span { font-size: 38px; background: #c8102e; color: #ece7dd; text-shadow: none; padding: 6px 11px 4px; transform: skewX(-9deg); box-shadow: 4px 4px 0 #ece7dd; }
.logo small { position: relative; display: block; margin-top: 11px; font: 9px "Press Start 2P"; color: #bcb8ae; letter-spacing: 4px; }
.logo::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 42px; height: 42px; border-radius: 0 0 24px 0;
  background: linear-gradient(135deg, transparent 50%, #e9e3d4 50%, #fffdf6 75%); box-shadow: -3px -3px 6px rgba(0,0,0,.18); }
.note { width: 232px; height: 168px; padding: 16px 14px 0; background: linear-gradient(160deg, #fff09a, #f7d94f); font: 15px/1.2 "Gochi Hand", cursive; color: #2b2a6b; box-shadow: 0 10px 16px rgba(0,0,0,.35); }
/* each row: game … best score, with a dotted leader between */
.note .nrow { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.note .nrow i { font-style: normal; }
.note .nrow::before { content: ""; order: 1; flex: 1; border-bottom: 2px dotted rgba(43,42,107,.45); transform: translateY(-4px); }
.note .nrow u { order: 2; text-decoration: none; }
.note .nrow.new u { color: #c8102e; }
.note .nrow.new::after { content: "NEW!"; order: 3; font-size: 13px; color: #c8102e; border: 2px solid #c8102e; border-radius: 50%; padding: 0 4px; transform: rotate(-9deg); }
.note.party { animation: noteParty .9s ease-in-out; }
@keyframes noteParty { 20% { rotate: -7deg; scale: 1.08; } 45% { rotate: 6deg; scale: 1.1; } 70% { rotate: -3deg; scale: 1.04; } }
.note::before { content: ""; position: absolute; top: -12px; left: 70px; width: 90px; height: 26px; background: rgba(255,255,255,.55); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.note b { display: block; font-weight: 400; font-size: 22px; color: #c8102e; text-decoration: underline wavy; margin-bottom: 2px; }
.ring { width: 130px; height: 130px; border-radius: 50%; border: 9px solid rgba(60,28,10,.18); box-shadow: inset 0 0 0 3px rgba(60,28,10,.08); }
.star { width: 78px; height: 78px; background: #fffdf6; clip-path: polygon(50% 0, 63% 35%, 100% 38%, 71% 61%, 80% 100%, 50% 79%, 20% 100%, 29% 61%, 0 38%, 37% 35%); filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
.star::after { content: ""; position: absolute; inset: 7px; background: #e9b44c; clip-path: inherit; }
.bolt { width: 54px; height: 86px; background: #fffdf6; clip-path: polygon(55% 0, 10% 55%, 45% 55%, 30% 100%, 90% 38%, 55% 38%, 75% 0); }
.bolt::after { content: ""; position: absolute; inset: 6px; background: #4aa3c8; clip-path: inherit; }
/* pokeable stickers: the star spins, the bolt zaps */
.prop.poke { pointer-events: auto; cursor: pointer; }
.star.spin { animation: starSpin .9s cubic-bezier(.2,.7,.2,1); }
@keyframes starSpin { 40% { scale: 1.35; } to { rotate: 720deg; } }
.bolt.jolt { animation: boltJolt .35s steps(2); }
@keyframes boltJolt { 25% { translate: -6px 3px; scale: 1.2; } 50% { translate: 5px -4px; } 75% { translate: -3px -2px; scale: 1.1; } }
body.zap .desk-fx { background: rgba(190, 235, 255, .35); }
body.zap .gb-led { background: #9be8ff; box-shadow: 0 0 12px #9be8ff; }
.hint { position: absolute; z-index: 30; font: 12px "Press Start 2P"; color: #fff3d6; letter-spacing: 2px; text-shadow: 2px 2px 0 #2a1608; white-space: nowrap; pointer-events: none; }

/* ---------- the pencil (pick it up and draw on anything) ---------- */
.pencil { position: absolute; z-index: 25; width: 300px; height: 20px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(#ffd23c 0 33%, #f2bb1d 33% 66%, #d99c0f 66%); box-shadow: 0 8px 10px rgba(0,0,0,.3); transform-origin: 340px 10px; }
.pencil::before { content: ""; position: absolute; left: -46px; top: 0; width: 46px; height: 20px; background: linear-gradient(90deg, #ff8fa3 0 55%, #b8b8bf 55%); border-radius: 6px 0 0 6px; }
.pencil::after { content: ""; position: absolute; right: -40px; top: 0; width: 40px; height: 20px; background: linear-gradient(90deg, #f0d2a8 0 70%, #2b2b2b 70%); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.pencil:hover { filter: brightness(1.08); }
.pencil.held, .crayon.held { z-index: 70; pointer-events: none; box-shadow: 0 26px 22px rgba(0,0,0,.35); }
/* crayons: a paper-wrapped stick with a blunt cone tip (drawing point at 174,11) */
.crayon { position: absolute; z-index: 25; width: 150px; height: 22px; border-radius: 4px 0 0 4px; cursor: pointer; background: var(--c); box-shadow: 0 6px 8px rgba(0,0,0,.3), inset 0 -5px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.25); }
.crayon::before { content: ""; position: absolute; left: 30px; top: 0; width: 84px; height: 22px; background: linear-gradient(rgba(255,253,246,.92), rgba(233,227,212,.92)); border-left: 4px solid rgba(0,0,0,.25); border-right: 4px solid rgba(0,0,0,.25); }
.crayon::after { content: ""; position: absolute; right: -24px; top: 0; width: 24px; height: 22px; background: var(--c); clip-path: polygon(0 0, 55% 18%, 100% 38%, 100% 62%, 55% 82%, 0 100%); filter: brightness(.86); }
.crayon:hover { filter: brightness(1.1); }
.pencil-spot { position: absolute; z-index: 24; width: 386px; height: 26px; border: 3px dashed rgba(255,243,214,.55); border-radius: 8px; display: none; pointer-events: none; }
body.drawing .pencil-spot { display: block; }
.eraser { position: absolute; z-index: 25; width: 74px; height: 42px; border-radius: 8px; cursor: pointer;
  background: linear-gradient(#ff9fb0, #f27a92); box-shadow: inset 0 -6px 0 #d95d77, 0 8px 10px rgba(0,0,0,.3); }
.eraser::after { content: "ERASE"; position: absolute; inset: 0; display: grid; place-items: center; font: 8px "Press Start 2P"; color: #8a2a40; letter-spacing: 1px; padding-bottom: 5px; }
.eraser.rub { animation: rub .45s ease-in-out; }
@keyframes rub { 20% { transform: translateX(-10px) rotate(var(--r)); } 40% { transform: translateX(10px) rotate(var(--r)); } 60% { transform: translateX(-8px) rotate(var(--r)); } 80% { transform: translateX(6px) rotate(var(--r)); } }
.ink { position: absolute; left: 0; top: 0; z-index: 15; pointer-events: none; }
.draw-catch { position: absolute; inset: 0; z-index: 65; display: none; cursor: crosshair; }
body.drawing .draw-catch { display: block; }

/* ---------- GAME BOY ---------- */
.gb { position: absolute; z-index: 10; width: 420px; background: #c9c5bc; padding: 24px 24px 30px; border-radius: 16px 16px 72px 16px;
  box-shadow: inset 0 -6px 0 #aaa69c, inset 0 3px 0 #e3e0d9, 0 30px 40px rgba(0,0,0,.45); }
.gb::before { content: ""; position: absolute; top: -12px; left: 74px; right: 74px; height: 14px; background: #a7a399; border-radius: 6px 6px 0 0; transition: box-shadow .2s, background .2s; }
.gb.hot::before { background: #e9b44c; box-shadow: 0 0 26px 8px rgba(255,210,110,.75); }
.gb.shake { animation: shake .32s ease-out; }
@keyframes shake { 20% { transform: translate(0, 7px) rotate(.6deg); } 50% { transform: translate(0, -3px) rotate(-.4deg); } 80% { transform: translate(0, 2px); } }
.gb-bezel { background: #5a5964; border-radius: 10px 10px 42px 10px; padding: 26px 32px 28px; position: relative; }
.gb-tag { position: absolute; top: 9px; left: 32px; right: 32px; display: flex; align-items: center; gap: 8px; font: 700 9px "Space Mono", monospace; letter-spacing: 1px; color: #b7b4c4; }
.gb-tag::before, .gb-tag::after { content: ""; height: 3px; flex: 1; background: linear-gradient(#8c1d4c 0 1px, transparent 1px 2px, #2c2f6e 2px 3px); }
.gb-led { position: absolute; left: 11px; top: 46%; width: 8px; height: 8px; border-radius: 50%; background: #4a1a1a; transition: background .2s; }
.gb-led.on { background: #e5352f; box-shadow: 0 0 8px #e5352f; }
.gb-screen { position: relative; aspect-ratio: 10 / 9; background: #9bbc0f; overflow: hidden; font-family: "Press Start 2P", monospace; color: #0f380f;
  box-shadow: inset 0 0 0 2px #7d9a0c, inset 0 4px 14px rgba(15,56,15,.35); }
.gb-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(0deg, rgba(15,56,15,.08) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(15,56,15,.08) 0 1px, transparent 1px 3px); }
.gl { position: absolute; inset: 0; display: none; }
.gl.show { display: block; }
.gl-boot { text-align: center; padding-top: 36%; font-size: 20px; line-height: 1.5; }
.gl-boot.show > div { animation: bootDrop 1.4s steps(12) both; }
.gl-boot small { display: block; font-size: 7px; margin-top: 10px; color: #306230; letter-spacing: 1px; }
@keyframes bootDrop { from { transform: translateY(-300%); } to { transform: translateY(0); } }
/* idle screen: pixel Max (canvas, 160×144 native) with crisp DOM text on top */
.gl-insert canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.idle-top { position: absolute; left: 0; right: 0; top: 9px; z-index: 2; text-align: center; font-size: 9px; letter-spacing: 1px; animation: blink 1.6s steps(1) infinite; }
.idle-coins { position: absolute; right: 9px; top: 30px; z-index: 2; display: none; align-items: center; gap: 5px; font-size: 9px; }
.idle-coins.show { display: flex; }
.idle-coins i { width: 9px; height: 11px; border: 2px solid #0f380f; background: #9bbc0f; }
.idle-say { position: absolute; z-index: 3; display: none; transform: translateX(-50%); padding: 5px 6px 4px; background: #0f380f; color: #9bbc0f; font-size: 8px; white-space: nowrap; }
.idle-say.show { display: block; }
.idle-say::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -4px; border: 4px solid transparent; border-top-color: #0f380f; border-bottom: 0; }
@keyframes bob { to { transform: translateY(-8px); } }
.gl-game { cursor: pointer; }
.gl-game .shot { position: absolute; inset: 0; filter: url(#gbify); }
.gl-game .cover { position: absolute; inset: 0; aspect-ratio: auto; }
.gl-game .cover .ttl { display: none; }
.gl-game canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gl-game .gbt { position: absolute; left: 0; right: 0; top: 6px; text-align: center; font-size: 13px; color: #9bbc0f; z-index: 2; text-shadow: 2px 0 #0f380f, -2px 0 #0f380f, 0 2px #0f380f, 0 -2px #0f380f; }
.gl-game .ps { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 9px; z-index: 2; }
.gl-game .ps span { background: #9bbc0f; padding: 4px 6px; }
.gl-go { background: #e8f5c8; }
.gl-go div { padding-top: 38%; text-align: center; font-size: 14px; line-height: 2; }
.gb-brand { margin: 16px 0 0 6px; font: italic 900 22px "Arial Black", sans-serif; color: #2c2f6e; letter-spacing: -.5px; }
.gb-brand span { font: 400 15px "Rubik Mono One"; margin-left: 4px; color: #8c1d4c; }
.gb-ctl { position: relative; height: 140px; margin-top: 16px; }
.gb-dpad { position: absolute; left: 14px; top: 14px; width: 92px; height: 92px; }
.gb-dpad i { position: absolute; background: #1f1e24; border-radius: 4px; box-shadow: 0 3px 0 #0d0d10; cursor: pointer; }
.gb-dpad i:nth-child(1) { left: 31px; top: 0; width: 30px; height: 31px; }
.gb-dpad i:nth-child(2) { left: 31px; bottom: 0; width: 30px; height: 31px; }
.gb-dpad i:nth-child(3) { left: 0; top: 31px; width: 31px; height: 30px; }
.gb-dpad i:nth-child(4) { right: 0; top: 31px; width: 31px; height: 30px; }
.gb-dpad i:nth-child(5) { left: 31px; top: 31px; width: 30px; height: 30px; border-radius: 0; box-shadow: none; cursor: default; }
.gb-ab { position: absolute; right: 8px; top: 10px; display: flex; gap: 18px; transform: rotate(-24deg); }
.gb-ab div { text-align: center; font: 700 12px "Space Mono", monospace; color: #2c2f6e; }
.gb-ab b { display: block; width: 46px; height: 46px; border-radius: 50%; background: #8c1d4c; box-shadow: 0 4px 0 #5a1031; margin-bottom: 6px; cursor: pointer; transition: transform .06s; }
.gb-ab b:active, .gb-dpad i:active, .gb-ss b:active { transform: translateY(3px); box-shadow: none; }
.gb-ss { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; gap: 22px; }
.gb-ss div { text-align: center; font: 700 10px "Space Mono", monospace; color: #2c2f6e; letter-spacing: 1px; }
.gb-ss b { display: block; width: 48px; height: 12px; border-radius: 8px; background: #8f8c96; transform: rotate(-24deg); margin: 0 auto 6px; cursor: pointer; }
.slot-target { position: absolute; z-index: 4; border: 3px dashed rgba(255,226,140,.8); border-radius: 8px 18px 8px 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#stage.dragging .slot-target, #stage.demo .slot-target { opacity: 1; animation: blink .9s steps(1) infinite; }

/* ---------- stickers on the Game Boy (one per game played) ---------- */
.stk, .stk-slot { position: absolute; z-index: 3; width: 46px; height: 46px; margin: -23px 0 0 -23px; pointer-events: none; rotate: var(--tilt, 0deg); }
.stk-slot { border: 2px dashed rgba(60, 56, 48, .28); border-radius: 50%; }
.stk svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); }
.stk.fly { animation: stkFly .66s cubic-bezier(.5,0,.8,.4) both; }
@keyframes stkFly { from { translate: var(--fx) var(--fy); scale: 4.2; rotate: -50deg; opacity: 0; } 18% { opacity: 1; } to { translate: 0 0; scale: 1; rotate: var(--tilt, 0deg); } }

/* ---------- cartridges ---------- */
.mc { position: absolute; left: 0; top: 0; z-index: 20; width: 160px; cursor: grab; touch-action: none;
  background: #bab6ad; padding: 16px 10px 10px; border-radius: 5px 18px 5px 5px; will-change: transform;
  box-shadow: inset 0 2px 0 #dcd8d0, inset 0 -3px 0 #9a968d, 0 8px 12px rgba(0,0,0,.35); }
.mc::before { content: ""; position: absolute; top: 5px; left: 12px; right: 24px; height: 6px; background: repeating-linear-gradient(90deg, #a29e95 0 3px, transparent 3px 6px); }
.mc .cover { border-radius: 3px; box-shadow: 0 0 0 2px #2a2a2a; pointer-events: none; }
.mc .mname { margin-top: 8px; font: 8px "Press Start 2P", monospace; color: #2c2f6e; text-align: center; letter-spacing: 1px; }
.mc .mupd { position: absolute; right: -14px; top: -12px; z-index: 2; padding: 6px 8px 5px; border-radius: 6px; pointer-events: none;
  font: 10px "Press Start 2P", monospace; letter-spacing: 0.5px; color: #3b0a14; background: #ffe23d; border: 2px solid #3b0a14;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.35); transform: rotate(9deg); animation: mupd 1s ease-in-out infinite; }
@keyframes mupd { 50% { transform: rotate(5deg) scale(1.14); background: #ff8a3c; } }
.mc canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.mc.anim { transition: transform .26s cubic-bezier(.3,.7,.3,1); }
.mc.sink { transition: transform .17s ease-in; }
.mc.homing { transition: transform .6s cubic-bezier(.3,1.25,.5,1); }
.mc.lift { cursor: grabbing; box-shadow: inset 0 2px 0 #dcd8d0, inset 0 -3px 0 #9a968d, 0 26px 30px rgba(0,0,0,.4); }
.mc.cur::after { content: "▼"; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); color: #fff3d6; font: 12px "Press Start 2P", monospace; text-shadow: 2px 2px 0 #2a1608; animation: blink .8s steps(1) infinite; }
.mc.slotted { cursor: pointer; }
/* "pick me!" — a little hop (the `translate` property stacks on the inline transform) */
.mc.hop { animation: cartHop .6s ease-out; }
@keyframes cartHop { 28% { translate: 0 -20px; } 52% { translate: 0 0; } 70% { translate: 0 -7px; } 100% { translate: 0 0; } }
/* the how-to demo: a ghost cartridge carried to the slot by a hand */
.mc.ghost { z-index: 58; opacity: 0; pointer-events: none; }
.mc.ghost::after { display: none; }
.demo-hand { position: absolute; left: 0; top: 0; z-index: 59; width: 58px; height: 64px; opacity: 0; pointer-events: none; filter: drop-shadow(0 8px 6px rgba(0,0,0,.35)); }
.demo-hand svg { display: block; width: 100%; height: 100%; transition: scale .15s; }
.demo-hand.show { opacity: 1; }
.demo-hand.grab svg { scale: .84; }

/* ---------- desk toys ---------- */
.ball { position: absolute; left: 0; top: 0; z-index: 26; width: 52px; height: 52px; border-radius: 50%; cursor: grab; touch-action: none; will-change: transform;
  background: radial-gradient(circle at 34% 30%, #ffd0c8 0 9%, #ff5a4e 28%, #c8102e 72%, #8a0b20 100%); box-shadow: 0 9px 9px rgba(0,0,0,.35); }
.ball.lift { cursor: grabbing; box-shadow: 0 22px 18px rgba(0,0,0,.35); }
.lamp-sw { position: absolute; z-index: 5003; width: 58px; height: 96px; padding: 8px 0; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: #f1ede2; box-shadow: inset 0 -5px 0 #cfcabd, inset 0 3px 0 #fffdf6, 0 8px 10px rgba(0,0,0,.35); }
.lamp-sw svg { width: 20px; height: 20px; fill: #c9a23a; stroke: #c9a23a; }
.lamp-sw .moon { fill: #9a96a8; stroke: none; }
.lamp-sw .rocker { width: 30px; height: 34px; border-radius: 6px; background: linear-gradient(#fffdf6 0 50%, #c9c4b6 50%); box-shadow: 0 0 0 2px #a9a498; transition: background .12s; }
body.night .lamp-sw .rocker { background: linear-gradient(#c9c4b6 0 50%, #fffdf6 50%); }
body.night .lamp-sw .sun { fill: #9a96a8; stroke: #9a96a8; }
body.night .lamp-sw .moon { fill: #ffe98a; filter: drop-shadow(0 0 5px #ffe98a); }
/* lights off: a sheet of darkness exactly the size of the window (placed in
   stage units by HubPlay.layout), with a soft see-through hole over the Game
   Boy screen. The glow-in-the-dark things sit above it. */
.dark-sheet { position: absolute; z-index: 5000; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(circle at var(--hx, 50%) var(--hy, 50%), transparent 0, transparent 150px, rgba(7, 9, 32, .8) 340px); }
body.night .dark-sheet { opacity: 1; }
body.in-game .dark-sheet { transition: none; }
body.night .gb-screen { box-shadow: inset 0 0 0 2px #7d9a0c, 0 0 60px 14px rgba(190, 235, 60, .5); }
body.night .star { z-index: 5002; filter: drop-shadow(0 0 14px #d9ff6a); }
body.night .star::after { background: #d9ff6a; }
body.night .ball { z-index: 5002; box-shadow: 0 0 22px 4px rgba(255, 110, 90, .75); }
body.night .ink { z-index: 5001; }
.mc.slotted::after { display: none; }

/* ---------- fx ---------- */
.puff { position: absolute; z-index: 40; width: 18px; height: 18px; margin: -9px; border-radius: 50%; background: #e8dcc6; pointer-events: none; animation: puff .8s ease-out forwards; }
@keyframes puff { to { transform: translate(var(--dx), var(--dy)) scale(2.6); opacity: 0; } }

/* ---------- Konami: the desk lamp goes disco ---------- */
body.rainbow .view { animation: rainbow 1.1s linear infinite; }
@keyframes rainbow { to { filter: hue-rotate(360deg); } }
