/* ---------- game switcher ---------- */
#scene { position: absolute; inset: 0; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: #e6e7eb; }
.seg button { flex: 1; padding: 9px 8px; border-radius: 9px; font: 600 13px/1 var(--ui); color: #4a4d55; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
#tabbar { position: sticky; top: 0; z-index: 30; padding: calc(6px + env(safe-area-inset-top)) 12px 6px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: 0 .5px 0 rgba(0, 0, 0, .12); }
#tabbar .track { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: #eef0f3; }
#tabbar button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border-radius: 8px; font: 600 13px/1 var(--ui); color: #6b6e76; -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s, transform .15s; }
#tabbar button svg { width: 18px; height: 18px; flex: none; }
#tabbar button.on { background: #fff; color: var(--red); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
#tabbar button:active { transform: scale(.97); }
body.framed #tabbar { display: none; }  /* the side panel has the switch; keep the mock phone clean */

/* ---------- claw machine ---------- */
.g-claw .back img, .g-claw .statusbar img { filter: invert(1); }
.g-claw .statusbar span { color: #fff; }
.g-claw .sound svg path { stroke: #fff; }
.g-claw .sound svg path:first-child { fill: #fff; }
.claw-bg { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 95%, #6c0002 0%, #2a0000 45%, #0d0000 75%); }
.machine { position: absolute; left: -29px; top: 0; width: 443px; height: 411px; transform-origin: 222px 0; }
.machine .cabinet { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.marquee { position: absolute; left: 107px; top: 101px; width: 230px; height: 34px; text-align: center; font: 800 21px/34px var(--ui); letter-spacing: 4.41px; padding-left: 4.41px; color: transparent; background: linear-gradient(180deg, rgba(247, 226, 182, .2), rgba(217, 175, 102, .2)); -webkit-background-clip: text; background-clip: text; text-shadow: 1px 1px 2px rgba(0, 0, 0, .25); transition: filter .4s; }
.g-claw.playing .marquee { background-image: linear-gradient(180deg, rgba(255, 240, 200, .75), rgba(230, 180, 90, .75)); filter: drop-shadow(0 0 4px rgba(255, 190, 90, .55)); }
.marquee.lit { background-image: linear-gradient(180deg, #fffbe8, #ffd36b) !important; filter: drop-shadow(0 0 7px rgba(255, 214, 120, .95)) !important; animation: marq .28s steps(2) 8; }
@keyframes marq { 50% { opacity: .55; } }
.interior { position: absolute; left: 136px; top: 146px; width: 173px; height: 198px; overflow: hidden; border-radius: 2px; }
.interior .box { position: absolute; inset: 0; width: 100%; height: 100%; }
.lamp { position: absolute; top: 4px; width: 34px; height: 5px; border-radius: 2px; background: #ffe9bb; box-shadow: 0 0 8px 3px rgba(255, 205, 130, .7), 0 8px 26px 10px rgba(255, 160, 80, .22); }
.lamp.l1 { left: 30px; }
.lamp.l2 { left: 109px; }
.interior.party .lamp { animation: party .22s steps(2) infinite; }
.interior.party .lamp.l2 { animation-delay: .11s; }
@keyframes party { 50% { opacity: .25; } }
.rail { position: absolute; left: 6px; right: 6px; top: 0; height: 4px; background: linear-gradient(#c9c9d0, #5c5c64); box-shadow: 0 2px 3px rgba(0, 0, 0, .45); z-index: 150; }
.pile { position: absolute; inset: 0; }
.p-item { position: absolute; filter: brightness(var(--b)) drop-shadow(0 2px 1.5px rgba(40, 0, 0, .5)); }
.p-item .in { position: relative; width: 100%; height: 100%; transform: rotate(var(--r)) scaleY(var(--t)); }
.p-coin img { width: 100%; height: 100%; display: block; }
.p-gift .in { border-radius: 3px; background: linear-gradient(90deg, transparent 41%, #ffd34d 41% 59%, transparent 59%), linear-gradient(#ff3a3a, #c4061a 55%, #8e0010); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), inset 0 -2px 3px rgba(0, 0, 0, .3); }
.p-gift i { position: absolute; left: 0; right: 0; top: 41%; height: 18%; background: linear-gradient(#ffe68a, #d99a14); }
.p-gift .in::after { content: ""; position: absolute; left: 50%; top: -4px; width: 9px; height: 6px; margin-left: -4.5px; border-radius: 50% 50% 2px 2px; border: 2px solid #ffd34d; border-bottom: 0; }
.p-ball .in { border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fffbe2 0 9%, #ffdc5a 32%, #d48c00 70%, #7e4600 100%); }
.sheen { position: absolute; left: 0; right: 0; top: 128px; bottom: 0; z-index: 172; pointer-events: none; mix-blend-mode: overlay; background: linear-gradient(100deg, transparent 30%, rgba(255, 244, 200, .7) 50%, transparent 70%) no-repeat; background-size: 55% 100%; -webkit-mask: linear-gradient(transparent, #000 30%); mask: linear-gradient(transparent, #000 30%); animation: sheen 3.8s ease-in-out infinite; }
@keyframes sheen { 0%, 35% { background-position: -130% 0; } 85%, 100% { background-position: 250% 0; } }
.twinkle { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; z-index: 168; pointer-events: none; background: radial-gradient(circle, #fff 0 1.5px, rgba(255, 236, 160, .55) 2.5px, transparent 7px); }
.twinkle::before, .twinkle::after { content: ""; position: absolute; left: 50%; top: 0; width: 1.6px; height: 100%; margin-left: -.8px; border-radius: 1px; background: linear-gradient(transparent, #fff 40%, #fff 60%, transparent); }
.twinkle::after { transform: rotate(90deg); }
.chute { position: absolute; left: 2px; top: 160px; width: 38px; height: 40px; z-index: 200; border: 1.4px solid rgba(255, 255, 255, .55); border-bottom: 0; border-radius: 3px 3px 0 0; background: linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .06)); display: grid; place-items: end center; }
.chute span { font: 700 5.5px/1 var(--ui); letter-spacing: 1px; color: rgba(255, 255, 255, .85); margin-bottom: 5px; }
.rig { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 180; }
.mount { position: absolute; left: -13px; top: 2px; width: 26px; height: 13px; border-radius: 3px; background: linear-gradient(#ff5050, #b40010); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), 0 2px 4px rgba(0, 0, 0, .45); }
.rod { position: absolute; left: -2px; top: 14px; width: 4px; background: linear-gradient(90deg, #8a5a12, #ffe7a3, #b9781a); }
.claw-wrap { position: absolute; left: -25px; top: 14px; width: 50px; height: 46px; transform-origin: 25px 0; }
.claw-svg { display: block; overflow: visible; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.glass { position: absolute; inset: 0; z-index: 300; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, .11) 34%, rgba(255, 255, 255, 0) 42%), linear-gradient(115deg, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .07) 64%, rgba(255, 255, 255, 0) 70%); box-shadow: inset 0 0 0 1px rgba(255, 200, 150, .25), inset 0 12px 22px rgba(255, 170, 90, .16), inset 0 -16px 20px rgba(60, 0, 0, .35); }

.capsule { position: absolute; left: 0; top: 0; width: 30px; height: 30px; }
.cap-halo { position: absolute; inset: -9px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 140, .5), rgba(255, 230, 140, 0) 68%); animation: halo 1.6s ease-in-out infinite; }
.capsule.aim .cap-halo { inset: -14px; background: radial-gradient(circle, rgba(255, 244, 180, .95), rgba(255, 244, 180, 0) 70%); }
.capsule.held .cap-halo { opacity: .5; }
.cap-top, .cap-bot { position: absolute; left: 0; width: 30px; height: 15px; }
.cap-top { top: 0; border-radius: 15px 15px 0 0; background: radial-gradient(circle at 35% 45%, rgba(255, 255, 255, .95) 0 9%, var(--c1) 36%, var(--c2) 100%); box-shadow: inset 0 2px 3px rgba(255, 255, 255, .45); }
.cap-bot { top: 15px; border-radius: 0 0 15px 15px; background: radial-gradient(circle at 40% 0%, #fff 0 25%, #e9e3dc 70%, #c4bab1 100%); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .18); }
.cap-band { position: absolute; left: 0; right: 0; top: 13.5px; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, .2); }
.cap-q { position: absolute; left: 0; right: 0; top: 3.5px; text-align: center; font: 8px/1 var(--pixel); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.fx-capsule { margin: -15px 0 0 -15px; z-index: 3; }

.door { position: absolute; left: 150px; top: 356px; width: 36px; height: 22px; border-radius: 4px; overflow: hidden; background: linear-gradient(#140101, #3a0505); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .8), 0 0 0 1.5px rgba(255, 190, 90, .6), 0 0 8px rgba(255, 120, 60, .35); }
.door .flap { position: absolute; inset: 2px; border-radius: 2px; background: linear-gradient(rgba(255, 255, 255, .26), rgba(255, 255, 255, .05)); transform-origin: 50% 0; }
.drop-btn { position: absolute; left: 287px; top: 354px; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transform-origin: 50% 100%; background: radial-gradient(circle at 40% 30%, #fff6d0, #ffcf3f 35%, #d68a00 80%); box-shadow: 0 3px 0 #7a3d00, 0 0 10px rgba(255, 190, 60, .6); animation: btnglow 1.4s ease-in-out infinite; }
.drop-btn span { font: 800 5.5px/1 var(--ui); letter-spacing: .4px; color: #7a2a00; }
@keyframes btnglow { 50% { box-shadow: 0 3px 0 #7a3d00, 0 0 18px rgba(255, 210, 90, .95); } }
.claw-pill { position: absolute; left: 161px; top: 257px; z-index: 6; }

.aimline { position: absolute; left: -1px; top: 0; width: 2px; z-index: 176; pointer-events: none; transition: opacity .2s; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .5) 0 4px, transparent 4px 8px); }
.aimline::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 14px; height: 5px; margin-left: -7px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.aimline.on { background: repeating-linear-gradient(to bottom, #ffe27a 0 4px, transparent 4px 8px); filter: drop-shadow(0 0 3px rgba(255, 220, 120, .95)); }
.aimline.on::after { background: rgba(255, 226, 122, .85); box-shadow: 0 0 8px rgba(255, 220, 120, .9); }
.fx-word { margin: -6px 0 0 -40px; width: 80px; text-align: center; z-index: 4; font: 10px/1.2 var(--pixel); color: #fff; text-shadow: 0 2px 0 #9a0018, 0 0 8px rgba(0, 0, 0, .5); }
.fx-word.good { color: #ffe27a; text-shadow: 0 2px 0 #8a4a00, 0 0 10px rgba(255, 200, 80, .8); }
