/* Portrait cabinet on desktop and phones; colour stays behind readable controls. */
body{background:#130d30;isolation:isolate}
.neon-atmosphere{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at 12% 20%,#6a19ad88,transparent 50%),radial-gradient(ellipse at 88% 80%,#005d8277,transparent 50%),#130d30}
.neon-atmosphere i{position:absolute;width:65vmax;height:65vmax;border-radius:50%;filter:blur(65px);opacity:.3;background:radial-gradient(circle,#f338b4,transparent 65%);animation:neon-drift 22s ease-in-out infinite alternate;will-change:transform}
.neon-atmosphere i:nth-child(1){left:-35vmax;top:-25vmax}
.neon-atmosphere i:nth-child(2){right:-35vmax;top:15%;background:radial-gradient(circle,#1fdde1,transparent 65%);animation-delay:-9s;animation-duration:27s}
.neon-atmosphere i:nth-child(3){left:0;bottom:-40vmax;background:radial-gradient(circle,#9e52ff,transparent 65%);animation-delay:-15s}
.neon-atmosphere i:nth-child(4){right:5%;bottom:-50vmax;background:radial-gradient(circle,#fa9c32,transparent 65%);animation-duration:31s}
.machine{max-width:650px;padding-left:28px;padding-right:28px}
.marquee{box-shadow:0 0 16px #e65df766,inset 0 0 20px #56ffbd33;border-color:#f9cf6c;animation:marquee-glow 5s ease-in-out infinite alternate}
.marquee em{color:#fff2b6;text-shadow:0 0 8px #ffad42,0 0 20px #ec3bc4,3px 3px #62234d;animation:letter-glow 4s ease-in-out infinite alternate}
.marquee-star{color:#ffb7ef;animation:star-turn 12s linear infinite}
.screen{background-color:#09241f;background-image:linear-gradient(155deg,#28351d88,#09241f22 50%,#164a4844),url('../arcade/background.png')}
.selector,.round,.result{height:580px;min-height:580px}
.selector{padding:28px 18px}
.select-heading{font-size:26px}
.game-preview>img{max-width:80%;width:260px}
.preview-art{height:190px}.preview-art img{height:175px;width:115px}
.game-picker{gap:8px}.game-tile{padding:12px 5px}.game-tile b{font-size:17px}.game-tile small{font-size:11px}
.round{padding:30px 18px 18px}.round-title{width:240px;margin-bottom:18px}
.question{font-size:22px;line-height:1.25;max-width:350px;margin:14px auto 24px}
.unity-stats{gap:10px;margin-bottom:30px}.best-display,.score-display{min-width:0;padding:9px 7px;gap:7px}
.stat-label{font-size:12px}.best-display b,.score-display b{font-size:30px}
.best-display>img,.score-display>img{width:28px;height:28px}.unity-stats #lives{gap:4px}.heart{width:23px;height:22px}
.comparison{gap:30px}.portrait{height:200px}.portrait img{height:195px;width:135px}
.job h3{font-size:22px;line-height:1.1;min-height:48px;margin:8px 0}.salary{font-size:34px}.vs{font-size:24px}
.control-deck{padding-left:20px;padding-right:20px;gap:12px;--start-width:130px;--start-height:50px}
.start-button{font-size:16px;letter-spacing:0}.control-label{font-size:12px}
.arcade-button:not(:disabled){animation:button-glow 4s ease-in-out infinite alternate}
.arcade-button.pink:not(:disabled){animation-delay:-2s}
.start-button:not(:disabled){animation:start-glow 4s ease-in-out infinite alternate}
.arcade-button:hover:not(:disabled){filter:brightness(1.15)}
.arcade-paused .neon-atmosphere i,.arcade-paused .marquee,.arcade-paused .marquee em,.arcade-paused .marquee-star,.arcade-paused .arcade-button,.arcade-paused .start-button{animation-play-state:paused!important}
@keyframes neon-drift{to{transform:translate(15vmax,-8vmax) scale(1.15)}}
@keyframes marquee-glow{to{box-shadow:0 0 24px #f963b977,inset 0 0 25px #6df2d244;border-color:#bcf5df}}
@keyframes letter-glow{to{text-shadow:0 0 14px #ffe091,0 0 32px #f445c7,3px 3px #62234d}}
@keyframes star-turn{to{transform:rotate(360deg)}}
@keyframes button-glow{to{box-shadow:0 5px 0 #301626,0 0 15px #ffdc6a55}}
@keyframes start-glow{to{box-shadow:0 0 18px #f9bc5155}}
/* Visible arcade motion: travelling lights, pixel sparks and a neon room grid. */
.neon-atmosphere{background:radial-gradient(ellipse at 15% 30%,#9c168e66,transparent 60%),radial-gradient(ellipse at 85% 65%,#087ba66b,transparent 60%),#100b28}
.neon-atmosphere:before{content:'';position:absolute;inset:35% -50% -80%;background-image:linear-gradient(#e841e24d 2px,transparent 2px),linear-gradient(90deg,#39dcec55 2px,transparent 2px);background-size:90px 90px;transform:perspective(450px) rotateX(58deg);transform-origin:center top;animation:grid-travel 3s linear infinite;mask-image:linear-gradient(transparent,#000 25%)}
.neon-atmosphere i{opacity:.65;animation-duration:9s}
.neon-atmosphere i:nth-child(2){animation-duration:11s}.neon-atmosphere i:nth-child(4){animation-duration:13s}
.room-lights{top:0;height:1290px}
.room-lights i{top:170px;animation:beam-sway 4s ease-in-out infinite alternate;transform-origin:top center;opacity:.8}
/* Extend only the upper end; preserve each beam's original lower endpoint. */
.room-lights i:before{content:'';position:absolute;left:0;bottom:100%;width:100%;height:150vh;background:inherit;box-shadow:inherit}
.room-lights i:nth-child(even){top:240px;animation-delay:-2s}
.room-lights i:nth-child(n+3){animation-direction:alternate-reverse}
.marquee{animation:marquee-glow 2.5s ease-in-out infinite alternate}
.marquee:before{content:'';position:absolute;inset:3px;border:3px dotted #fff09a;pointer-events:none;opacity:.9}
.marquee:after{background:linear-gradient(110deg,transparent 35%,#fff4 50%,transparent 65%);transform:translateX(-130%);animation:marquee-sweep 3.5s ease-in-out infinite}
.marquee em{display:inline-flex;animation:none;letter-spacing:1px}
.marquee em span{display:inline-block;animation:letter-bounce 2.8s ease-in-out infinite;color:#ffe17c}
.marquee em span:nth-child(2){animation-delay:.12s}.marquee em span:nth-child(3){animation-delay:.24s}.marquee em span:nth-child(4){animation-delay:.36s}.marquee em span:nth-child(5){animation-delay:.48s}.marquee em span:nth-child(6){animation-delay:.6s}
.side-rail{background:repeating-linear-gradient(0deg,#ffb82e 0 12px,#de2b98 12px 24px,#39e3e6 24px 36px,#3f284a 36px 48px);background-size:100% 96px;animation:rail-chase 2s linear infinite;box-shadow:0 0 16px #e35be577}
.right-rail{animation-direction:reverse}
.screen-aura{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;background:radial-gradient(ellipse at 0 60%,#153f8055,transparent 65%),radial-gradient(ellipse at 100% 20%,#7c267a44,transparent 65%)}
.screen-aura i{position:absolute;left:8%;bottom:-20px;width:5px;height:5px;background:#45e9dd;box-shadow:0 0 9px #45e9dd;animation:pixel-rise 7s linear infinite}
.screen-aura i:nth-child(2){left:22%;animation-delay:-4s;background:#ffcd45}.screen-aura i:nth-child(3){left:36%;animation-delay:-2s;background:#ee62c9}.screen-aura i:nth-child(4){left:49%;animation-delay:-6s}.screen-aura i:nth-child(5){left:63%;animation-delay:-1s;background:#ffcd45}.screen-aura i:nth-child(6){left:78%;animation-delay:-5s;background:#ee62c9}.screen-aura i:nth-child(7){left:91%;animation-delay:-3s}.screen-aura i:nth-child(8){left:15%;animation-delay:-6.5s}
.selector,.round,.result{position:relative;z-index:1}
.round-title{animation:title-glow 3s ease-in-out infinite alternate}
.arcade-button:not(:disabled){animation:button-beacon 1.8s ease-in-out infinite alternate}
.start-button:not(:disabled){animation:start-beacon 1.6s ease-in-out infinite alternate}
.screen.reward-active{border-color:#72ffcf;box-shadow:0 0 0 5px #080d0c,0 0 35px #31eab87a,inset 0 0 45px #31eab833}
.screen.damage-active{border-color:#ff6593;box-shadow:0 0 0 5px #080d0c,0 0 35px #f12f7c80,inset 0 0 45px #f12f7c33}
@keyframes grid-travel{to{background-position:0 90px,0 90px}}
@keyframes beam-sway{from{transform:rotate(-18deg)}to{transform:rotate(8deg)}}
@keyframes marquee-sweep{0%,25%{transform:translateX(-130%)}80%,100%{transform:translateX(130%)}}
@keyframes letter-bounce{0%,40%,100%{transform:translateY(0);color:#ffe17c;text-shadow:0 0 8px #ffad42}20%{transform:translateY(-6px);color:#fff8dc;text-shadow:0 0 14px #f445c7,0 0 25px #f445c7}}
@keyframes rail-chase{to{background-position:0 96px}}
@keyframes pixel-rise{0%{transform:translate(0,0);opacity:0}15%{opacity:.5}80%{opacity:.5}100%{transform:translate(14px,-650px);opacity:0}}
@keyframes title-glow{to{filter:drop-shadow(0 0 9px #ffb63788) saturate(1.35)}}
@keyframes button-beacon{to{filter:brightness(1.15);box-shadow:0 5px 0 #301626,0 0 20px #ffdd7a99}}
@keyframes start-beacon{to{filter:brightness(1.12);box-shadow:0 0 22px #f9bc5199}}
.arcade-paused .neon-atmosphere:before,.arcade-paused .room-lights i,.arcade-paused .marquee:after,.arcade-paused .marquee em span,.arcade-paused .side-rail,.arcade-paused .screen-aura i,.arcade-paused .round-title{animation-play-state:paused!important}
@media(max-width:600px){
 .neon-atmosphere i{filter:blur(45px)}.neon-atmosphere i:nth-child(n+3){display:none}
 .machine{max-width:430px;padding-left:15px;padding-right:15px}
 .selector,.round,.result{height:520px;min-height:520px}
 .selector{padding:28px 10px}.preview-art{height:160px}.preview-art img{height:150px;width:95px}
 .select-heading{font-size:23px}.game-preview>img{width:220px}.game-tile b{font-size:14px}.game-tile small{font-size:11px}
 .round{padding:25px 10px 20px}.round-title{width:205px}.question{font-size:18px;max-width:265px;margin:13px auto 20px}
 .unity-stats{gap:6px;margin-bottom:22px}.best-display,.score-display{padding:7px 4px;gap:4px}.stat-label{font-size:10px}.best-display b,.score-display b{font-size:25px}.best-display>img,.score-display>img{width:20px;height:20px}.heart{width:18px;height:17px}.unity-stats #lives{gap:2px}
 .comparison{gap:22px}.portrait{height:170px}.portrait img{height:165px;width:105px}.job h3{font-size:clamp(12px,3.8vw,17px);min-height:45px;overflow-wrap:normal}.salary{font-size:27px}.vs{font-size:20px}
 .control-deck{padding-left:12px;padding-right:12px;gap:8px;--start-width:91px;--start-height:48px}.start-button{font-size:13px}.control-label{font-size:10px}
}
@media(max-width:359px){.salary{font-size:23px}.control-deck{--start-width:78px}.start-button{font-size:11px}.portrait img{width:90px}.question{font-size:17px}}
@media(prefers-reduced-motion:reduce){.neon-atmosphere i,.marquee,.marquee em,.marquee-star,.arcade-button:not(:disabled),.start-button:not(:disabled){animation:none!important;will-change:auto}}

@media(prefers-reduced-motion:reduce){.neon-atmosphere:before,.room-lights i,.marquee:after,.marquee em span,.side-rail,.screen-aura i,.round-title{animation:none!important}.screen-aura i{display:none}.marquee:after{display:none}}

/* Milestones are brief overlays, not extra steps between rounds. */
.celebration-confetti{position:absolute;inset:0;overflow:hidden;z-index:12;pointer-events:none;border-radius:inherit}
.celebration-confetti i{position:absolute;top:-18px;width:7px;height:12px;animation:confetti-fall 1.7s ease-in forwards}
.streak-celebration{position:absolute;top:46%;left:50%;width:88%;z-index:13;pointer-events:none;text-align:center;padding:20px 8px;border:2px solid #ffe083;border-radius:8px;background:linear-gradient(130deg,#65105ff2,#292060f2);box-shadow:0 0 35px #ff4ea67a;transform:translate(-50%,-50%);animation:streak-pop .4s ease-out}
.streak-celebration span,.streak-celebration small{display:block;color:#90fff0;font:18px Pixel,monospace;letter-spacing:2px}
.streak-celebration b{display:block;color:#ffe279;font:32px Pixel,monospace;margin:10px 0;text-shadow:2px 3px #8c2c67}
.result.new-record{padding-top:25px;background:radial-gradient(ellipse at 50% 25%,#ac6a264d,transparent 75%)}
.record-badge{color:#ffe279;font:25px Pixel,monospace;letter-spacing:1px}
.record-badge b{display:block}.record-trophy{width:80px;height:80px;image-rendering:pixelated;filter:drop-shadow(0 0 12px #ffc74788);animation:trophy-arrival .65s ease-out,trophy-float 3s .65s ease-in-out infinite}
.result.new-record h2{font-size:28px;margin:15px 0}.result.new-record .result-label{margin:12px 0}.result.new-record .final-score{font-size:88px;margin:8px 0 14px}
@keyframes confetti-fall{0%{opacity:0;transform:translate(0,0) rotate(0)}10%{opacity:1}100%{opacity:0;transform:translate(var(--drift),640px) rotate(var(--spin))}}
@keyframes streak-pop{from{opacity:0;transform:translate(-50%,-50%) scale(.75)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes trophy-arrival{from{opacity:0;transform:translateY(20px) scale(.6) rotate(-12deg)}to{opacity:1;transform:none}}
@keyframes trophy-float{50%{transform:translateY(-7px) rotate(5deg)}}
@media(max-width:600px){.streak-celebration b{font-size:25px}.streak-celebration span,.streak-celebration small{font-size:15px}.record-badge{font-size:21px}.record-trophy{width:65px;height:65px}.result.new-record h2{font-size:25px}.result.new-record .final-score{font-size:78px}}
.arcade-paused .record-trophy{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.streak-celebration,.record-trophy,.celebration-confetti i{animation:none!important}.celebration-confetti{display:none}}

/* Each new challenger gets a short introduction once its real portrait is ready. */
.challenger .portrait{position:relative;isolation:isolate}
.challenger-intro{position:absolute;top:-18px;left:50%;transform:translateX(-50%);z-index:3;width:max-content;max-width:155px;padding:5px 8px;background:#132e3af5;border:1px solid #79f5e1;border-radius:4px;color:#baffef;font:14px Pixel,monospace;letter-spacing:1px;text-align:center;pointer-events:none}
.challenger-arrival .challenger-intro{animation:challenger-label-in .35s ease-out both}
.challenger-arrival .portrait:before{content:'';position:absolute;inset:0 -8px -5px;z-index:-1;border-radius:50%;background:radial-gradient(ellipse,#4dedc777,transparent 70%);animation:challenger-spotlight 1.2s ease-out both;pointer-events:none}
@keyframes challenger-label-in{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes challenger-spotlight{0%{opacity:0;transform:scale(.7)}30%{opacity:1;transform:scale(1.05)}100%{opacity:0;transform:scale(1.1)}}
@media(max-width:600px){.challenger-intro{font-size:11px;padding:4px 5px;letter-spacing:0;top:-17px;max-width:125px}}
@media(max-width:359px){.challenger-intro{font-size:10px;max-width:100px}}
@media(prefers-reduced-motion:reduce){.challenger-arrival .challenger-intro,.challenger-arrival .portrait:before{animation:none!important}.challenger-arrival .portrait:before{display:none}}

.cabinet-options{display:flex;align-items:center;gap:14px}
.bezel-top #auto-rounds{min-height:44px;padding:6px 4px;font:14px Pixel,monospace;letter-spacing:.5px;color:#a9ffe6}
.bezel-top #auto-rounds[aria-pressed=false]{color:#ffe17b}
.bezel-top #auto-rounds:focus-visible{outline:2px solid #fff;outline-offset:2px}
.bezel-top #sound{min-width:44px;min-height:44px;text-align:center}
@media(max-width:600px){.cabinet-options{gap:6px}.bezel-top #auto-rounds{font-size:12px;letter-spacing:0}}

/* Ambient motion can be paused independently of gameplay and round timing. */
.bezel-top #ambient-motion{min-height:44px;padding:6px 4px;font:14px Pixel,monospace;letter-spacing:.5px;color:#a9ffe6;white-space:nowrap}
.bezel-top #ambient-motion[aria-pressed=false]{color:#ffe17b}
.bezel-top #ambient-motion:focus-visible{outline:2px solid #fff;outline-offset:2px}
.ambient-paused :is(.neon-atmosphere i,.room-lights i,.marquee,.marquee em,.marquee em span,.marquee-star,.side-rail,.screen-aura i,.round-title,.arcade-button,.start-button,.preview-art img){animation-play-state:paused!important}
.ambient-paused .neon-atmosphere:before,.ambient-paused .marquee:after{animation-play-state:paused!important}
.ambient-paused .record-trophy{animation:none!important;transform:none}
@media(max-width:600px){.cabinet-options{gap:4px}.bezel-top #ambient-motion{font-size:12px;letter-spacing:0}}
@media(max-width:359px){.bezel-top #auto-rounds,.bezel-top #ambient-motion{font-size:10px;padding:6px 2px}.cabinet-options{gap:2px}}
