/* THE DAILY PIXEL ARCADE - a dark hall with neon light, colours of the paper (violet, yellow, red) */
:root {
  --ink: #0b0716; --night: #120a24; --violet: #a855f7; --pink: #ec4899; --cyan: #22d3ee; --yel: #facc15; --red: #ef4444;
  --txt: #f5f0ff; --dim: #b9a8d9;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--ink); color: var(--txt); }
body { font-family: 'VT323', monospace; font-size: 22px; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
img, canvas { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
button { font: inherit; color: inherit; }

/* ───────── the hall and its camera ───────── */
.hall { position: fixed; inset: 0; overflow: hidden; background: #07040f; cursor: grab; touch-action: none; }
.hall.dragging { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; width: 1280px; height: 360px; transform-origin: 0 0; will-change: transform; }
.world.move { transition: transform .95s cubic-bezier(.65, 0, .25, 1); }
.room { position: absolute; left: 0; top: 0; width: 640px; height: 360px; pointer-events: none; }
.room-b { left: 640px; transform: scaleX(-1); } /* the same hall, mirrored: the join is invisible */
.sign { position: absolute; left: 480px; top: 26px; width: 320px; height: 24px; pointer-events: none; animation: neon 7s infinite; }
@keyframes neon { 0%, 61%, 63.5%, 100% { opacity: 1; } 62% { opacity: .55; } 63% { opacity: .9; } }
.dust { position: absolute; left: 0; top: 0; width: 1280px; height: 360px; pointer-events: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, transparent 55%, #000a 100%),
  repeating-linear-gradient(0deg, #0000 0 2px, #0000001a 2px 3px); }

/* cabinets: 100 x 200 sprites standing on the carpet */
.cab { position: absolute; width: 100px; height: 200px; border: 0; background: none; cursor: pointer; transition: transform .25s, filter .25s; outline: none; }
.cab::before { /* the shadow on the floor */
  content: ''; position: absolute; left: 6px; right: 6px; bottom: -5px; height: 12px; border-radius: 50%;
  background: radial-gradient(ellipse, #000c, #0000 70%); }
.cab::after { /* light of the screen on the carpet */
  content: ''; position: absolute; left: -30px; right: -30px; bottom: -22px; height: 30px; border-radius: 50%;
  background: radial-gradient(ellipse, var(--glow, #a855f7) 0, #0000 70%); opacity: .22; mix-blend-mode: screen; transition: opacity .3s; }
.cab img { position: absolute; inset: 0; width: 100px; height: 200px; }
.cab canvas { position: absolute; }
.cab .scr { box-shadow: 0 0 6px 1px var(--glow, #a855f7); }
.cab:hover, .cab:focus-visible { transform: translateY(-3px); filter: brightness(1.18) drop-shadow(0 0 6px var(--glow)); }
.cab:hover::after, .cab:focus-visible::after { opacity: .45; }
.cab .tag { position: absolute; left: 50%; bottom: 206px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-family: 'Press Start 2P'; font-size: 5px; line-height: 1; padding: 3px 4px; color: var(--ink); background: var(--yel);
  opacity: 0; transition: opacity .2s; }
.cab:hover .tag, .cab:focus-visible .tag { opacity: 1; }
.cab.soon img { filter: saturate(.75) brightness(.85); }

/* ───────── the 3D hall (arcade3d.js): a low-resolution 3D picture scaled up without smoothing ───────── */
.hall3d { display: none; position: fixed; inset: 0; background: #07040f; cursor: grab; touch-action: none; }
body.h3d .hall3d { display: block; }
body.h3d .hall { display: none; }
.hall3d.dragging { cursor: grabbing; }
.hall3d.pointing { cursor: pointer; }
.h3d-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.hall3d .vignette { z-index: 1; }
.h3d-tag { position: fixed; z-index: 2; transform: translate(-50%, calc(-100% - 14px)); white-space: nowrap; pointer-events: none;
  font-family: 'Press Start 2P'; font-size: 10px; line-height: 1; padding: 6px 8px; color: var(--ink); background: var(--yel); box-shadow: 0 0 12px #facc1588; }

/* ───────── top bar ───────── */
.bar { position: fixed; left: 0; right: 0; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px; pointer-events: none; transition: opacity .4s; }
.bar > *, .bar-r > * { pointer-events: auto; }
.bar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
body.zoomed .bar .back, body.zoomed #fxBtn, body.zoomed #viewBtn { opacity: 0; pointer-events: none; }
.abtn { display: inline-flex; align-items: center; gap: 6px; font-family: 'Press Start 2P'; font-size: 9px; line-height: 1.3; padding: 9px 11px; cursor: pointer;
  color: var(--txt); background: #1b1033e6; border: 2px solid var(--violet); box-shadow: 0 0 10px #a855f766, inset 0 0 8px #a855f733; text-decoration: none; }
/* master volume (next to the sound button): a small pixel slider, like the paper's */
#volBar { -webkit-appearance: none; appearance: none; width: 84px; height: 12px; margin: 0 6px; cursor: pointer; border: 0;
  background: linear-gradient(to right, var(--yel, #facc15) var(--v, 80%), #3b3466 var(--v, 80%)); box-shadow: 0 0 0 3px #0b0716, 0 0 0 5px #ffffff33; }
#volBar::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 20px; background: #e2e8f0; border: none; box-shadow: inset -2px -2px 0 #0000004d, 0 0 0 3px #0b0716; }
#volBar::-moz-range-thumb { width: 12px; height: 20px; background: #e2e8f0; border: none; border-radius: 0; box-shadow: inset -2px -2px 0 #0000004d, 0 0 0 3px #0b0716; }
#volBar::-moz-range-track { background: transparent; }
#volBar:focus-visible { outline: 3px solid var(--violet, #8b5cf6); outline-offset: 4px; }
@media (max-width: 420px) { #volBar { width: 56px; } }
.abtn:hover, .abtn:focus-visible { background: var(--violet); color: #fff; outline: none; }
.abtn.hot { border-color: var(--yel); box-shadow: 0 0 12px #facc1588; }
.abtn.hot:hover { background: var(--yel); color: var(--ink); }
.wallet { display: inline-flex; align-items: center; gap: 8px; font-family: 'Press Start 2P'; font-size: 12px; padding: 7px 12px;
  background: #1b1033e6; border: 2px solid var(--yel); box-shadow: 0 0 12px #facc1555; color: var(--yel); }
.wallet.bump { animation: bump .45s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }
.coin { display: inline-block; width: 18px; height: 18px; background: url(img/arcade/coin.png) center / contain no-repeat; image-rendering: pixelated; }
.free { font-family: 'Press Start 2P'; font-size: 8px; padding: 8px 10px; color: var(--ink); background: var(--yel); box-shadow: 0 0 14px #facc15aa; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 4px #facc1544; } }
.hint { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 15; pointer-events: none;
  font-family: 'Press Start 2P'; font-size: 9px; line-height: 1.5; text-align: center; padding: 8px 12px; color: var(--txt); background: #0b0716cc;
  border: 2px solid #a855f777; transition: opacity .4s; white-space: nowrap; }
body.h3d .hint { white-space: normal; width: max-content; max-width: calc(100vw - 24px); }
body.zoomed .hint { opacity: 0; }

/* ───────── the coin door ───────── */
.door { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 64px 12px 16px; background: radial-gradient(ellipse at 50% 45%, #2a0f1fcc, #07040ff2 70%);
  animation: fadein .45s ease-out; overflow: auto; }
.door[hidden] { display: none; }
.door.out { animation: fadeout .35s ease-in forwards; }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.door-box { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(440px, 100%); }
.door-title { font-family: 'Press Start 2P'; font-size: 15px; line-height: 1.4; text-align: center; color: var(--yel); text-shadow: 0 0 10px #facc1599, 3px 3px 0 #000; }
.door-plate { position: relative; width: min(300px, 74vw, 46vh); aspect-ratio: 1; animation: zoomin .55s cubic-bezier(.2, .8, .3, 1); }
@keyframes zoomin { from { transform: scale(.6); } }
.door-plate > img:first-child { width: 100%; height: 100%; box-shadow: 0 0 0 4px #000, 0 20px 50px #000; }
.slot { position: absolute; left: 35%; top: 23%; width: 20%; height: 27%; border: 0; border-radius: 30%; background: transparent; cursor: pointer;
  box-shadow: 0 0 0 0 #ff6a2a00; animation: slotglow 1.6s ease-in-out infinite; }
@keyframes slotglow { 50% { box-shadow: 0 0 26px 6px #ff6a2a88; } }
.slot:focus-visible { outline: 3px solid var(--yel); }
.door.used .slot { animation: none; }
.hand-coin { position: absolute; left: 50%; bottom: -14%; width: 26%; transform: translateX(-50%); cursor: pointer; filter: drop-shadow(0 6px 6px #000a);
  animation: hover 1.4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translate(-50%, -8%); } }
.hand-coin.drop { animation: coin-in .75s cubic-bezier(.5, 0, .7, 1) forwards; }
/* the coin rises to the slot, turns on its side and slides in */
@keyframes coin-in {
  0% { transform: translate(-50%, 0) scale(1, 1); }
  45% { transform: translate(-50%, -262%) scale(.85, .85); }
  65% { transform: translate(-50%, -262%) scale(.12, .85); opacity: 1; }
  100% { transform: translate(-50%, -236%) scale(.12, .3); opacity: 0; }
}
.door.used .hand-coin { cursor: default; }
.door-msg { margin-top: 34px; min-height: 2.4em; text-align: center; font-size: 22px; line-height: 1.1; color: var(--txt); }
.door-msg b { font-family: 'Press Start 2P'; font-size: 11px; color: var(--yel); }
.door-msg a { color: var(--yel); }
.door-scores { width: 100%; }

/* high score tables */
.hs { width: 100%; font-family: 'Press Start 2P'; font-size: 9px; line-height: 1; }
.hs-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.hs-tabs button { flex: 1; font-family: 'Press Start 2P'; font-size: 8px; padding: 7px 4px; cursor: pointer; color: var(--dim); background: #1b1033; border: 2px solid #3b2a63; }
.hs-tabs button.on { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.hs ol { list-style: none; counter-reset: r; }
.hs li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 6px; counter-increment: r; color: var(--txt); }
.hs li:nth-child(odd) { background: #ffffff0a; }
.hs li::before { content: counter(r) '.'; width: 2.6em; color: var(--dim); }
.hs li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs li.me { color: var(--yel); }
.hs li:nth-child(1)::before { color: var(--yel); }
.hs .hs-none { font-family: 'VT323'; font-size: 20px; color: var(--dim); padding: 6px; }
.hs .hs-me { margin-top: 8px; font-family: 'VT323'; font-size: 20px; color: var(--yel); }

/* ───────── playing ───────── */
.play { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 12px;
  background: radial-gradient(ellipse at 50% 50%, #1a1030, #050309 75%); animation: fadein .3s ease-out; }
.play[hidden] { display: none; }
.crt { position: relative; height: min(calc(100vh - 24px), calc((100vw - 24px) * 4 / 3)); height: min(calc(100dvh - 24px), calc((100vw - 24px) * 4 / 3)); aspect-ratio: 3 / 4;
  border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 6px #120c1f, 0 0 0 10px #2a1d44, 0 0 40px 6px #a855f755; }
.crt canvas { width: 100%; height: 100%; touch-action: none; }
/* the pinball is a long table: the screen becomes 1:2 */
.crt.tall { height: min(calc(100vh - 24px), calc((100vw - 24px) * 2)); height: min(calc(100dvh - 24px), calc((100vw - 24px) * 2)); aspect-ratio: 1 / 2; }
.crt::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 14px;
  background: repeating-linear-gradient(0deg, #0000 0 2px, #00000026 2px 4px), radial-gradient(ellipse at 50% 50%, #0000 60%, #0008 100%); }
.over { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; text-align: center; background: #07040fd9; animation: fadein .4s ease-out; overflow: auto; }
.over[hidden] { display: none; }
.over h3 { font-family: 'Press Start 2P'; font-size: clamp(14px, 4.5vh, 22px); color: var(--red); text-shadow: 0 0 12px #ef444499, 3px 3px 0 #000; }
.over .big { font-family: 'Press Start 2P'; font-size: clamp(20px, 6.5vh, 34px); color: var(--yel); text-shadow: 3px 3px 0 #000; }
.over .rec { font-family: 'Press Start 2P'; font-size: 10px; color: var(--ink); background: var(--yel); padding: 6px 8px; animation: pulse 1.2s infinite; }
.over .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.over .hs { max-width: 300px; }
.play-x { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 45; }
.play-side { width: 260px; align-self: center; font-size: 21px; line-height: 1.15; color: var(--dim); }
.play-side h2 { font-family: 'Press Start 2P'; font-size: 13px; line-height: 1.4; color: var(--yel); margin-bottom: 10px; }
.play-side p { margin-bottom: 12px; }
.play-side kbd { font-family: 'Press Start 2P'; font-size: 9px; padding: 3px 5px; border: 2px solid var(--dim); color: var(--txt); }
.flash { position: fixed; inset: 0; z-index: 50; pointer-events: none; background: #fff; opacity: 0; }
.flash.on { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 0; } 30% { opacity: .7; } 100% { opacity: 0; } }

/* phones and narrow windows */
@media (max-width: 860px) { .play-side { display: none; } }
@media (max-width: 560px) {
  .abtn { font-size: 8px; padding: 8px 8px; }
  .wallet { font-size: 10px; padding: 6px 9px; }
  .hint { font-size: 8px; }
  .door-title { font-size: 12px; }
}
/* "fewer effects": no flicker, no dust, softer zoom */
body.calm .sign, body.calm .free, body.calm .slot, body.calm .hand-coin { animation: none; }
body.calm .dust { display: none; }
@media (prefers-reduced-motion: reduce) {
  .sign, .free, .slot, .hand-coin:not(.drop) { animation: none; }
  .world.move { transition-duration: .5s; }
}
/* the language flags: above the bar on phones, hidden while zoomed or playing */
@media (max-width: 899px), (max-height: 559px) {
  html:not(.langs-off) .bar { top: 50px; }
  html.langs-off .bar { top: 22px; }
  html:not(.langs-off) body, html.langs-off body { padding-top: 0 !important; }
  .langbar { z-index: 25; }
}
body.zoomed .langbar, body.zoomed .lang-tab { display: none !important; }
@media (max-width: 560px) { #fxBtn, .free { display: none; } }
.hall { background: radial-gradient(ellipse at 50% 60%, #1a0f2e, #07040f 70%); }

/* arrows to walk along the hall */
.pan { position: fixed; top: 50%; z-index: 18; width: 44px; height: 64px; transform: translateY(-50%); cursor: pointer;
  font-family: 'Press Start 2P'; font-size: 14px; color: var(--txt); background: #1b1033cc; border: 2px solid var(--violet); box-shadow: 0 0 12px #a855f766; transition: opacity .3s; }
.pan:hover, .pan:focus-visible { background: var(--violet); outline: none; }
.pan-l { left: 68px; } .pan-r { right: 10px; }
html.langs-off .pan-l { left: 10px; }
.pan[hidden], body.zoomed .pan { display: none; }
@media (max-width: 899px), (max-height: 559px) { .pan-l { left: 6px; } .pan-r { right: 6px; } .pan { width: 36px; height: 52px; font-size: 11px; } }

/* ───────── the other corners (arcade-extras.js): a panel over the room ───────── */
.corner { overflow-y: auto; place-items: start center; }
.corner-box { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(560px, 100%); margin: 0 auto; padding-bottom: 20px; animation: zoomin .45s cubic-bezier(.2, .8, .3, 1); }
.corner-body { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; font-family: 'VT323'; font-size: 21px; line-height: 1.15; text-align: center; color: var(--txt); }
.corner-body [hidden] { display: none !important; }
.corner-body .abtn[disabled] { opacity: .45; cursor: default; }
.corner-body .coin { width: 14px; height: 14px; vertical-align: -2px; }
.cx-msg { max-width: 460px; }
.cx-msg a { color: var(--yel); }
.cx-note { font-size: 18px; color: var(--dim); }
.cx-odds { font-family: 'Press Start 2P'; font-size: 8px; line-height: 1.6; color: var(--cyan); }
.cx-count { font-family: 'Press Start 2P'; font-size: 8px; color: var(--dim); }
.cx-h { font-family: 'Press Start 2P'; font-size: 10px; color: var(--yel); margin-top: 6px; }
.cx-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cx-tabs { width: min(320px, 100%); }
.cx-host { display: flex; align-items: center; gap: 10px; text-align: left; background: #1b1033cc; border: 2px solid #3b2a63; padding: 8px 12px 8px 6px; }
.cx-host img { width: 72px; height: 72px; image-rendering: pixelated; flex: none; }
/* stickers and plushes */
.cx-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; }
.cx-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px 3px; background: #1b1033; border: 2px solid #3b2a63; }
.cx-card img { width: 100%; max-width: 64px; aspect-ratio: 1; image-rendering: pixelated; }
.cx-card .q { display: grid; place-items: center; width: 100%; max-width: 64px; aspect-ratio: 1; font-family: 'Press Start 2P'; font-size: 16px; color: #3b2a63; }
.cx-card figcaption { font-family: 'Press Start 2P'; font-size: 6px; line-height: 1.5; color: var(--txt); }
.cx-card figcaption small { display: block; font-size: 5px; color: var(--dim); }
.cx-card.r-common { border-color: #64748b; }
.cx-card.r-rare { border-color: var(--cyan); box-shadow: 0 0 8px #22d3ee55; }
.cx-card.r-legend { border-color: var(--red); background: linear-gradient(#2a0f1f, #1b1033); box-shadow: 0 0 10px #ef444466; }
.cx-card.r-plush { border-color: var(--pink); }
.cx-card.miss { border-color: #2a1d48; box-shadow: none; background: #120a24; }
.cx-card.fresh { width: 150px; animation: zoomin .6s cubic-bezier(.2, 1.6, .4, 1); }
.cx-card.fresh img { max-width: 128px; }
.cx-card.fresh figcaption { font-size: 9px; }
.cx-card.fresh figcaption small { font-size: 7px; }
.cx-new { font-family: 'Press Start 2P'; font-size: 9px; color: var(--ink); background: var(--yel); padding: 6px 8px; }
.cx-new.r-rare { background: var(--cyan); }
.cx-new.r-legend { background: var(--red); color: #fff; }
/* the capsule machine */
.cx-gacha { position: relative; width: 150px; }
.cx-gacha .globe { position: relative; width: 150px; height: 130px; border-radius: 50% 50% 8px 8px; background: #ffffff14; border: 4px solid #e2e8f0; overflow: hidden; }
.cx-gacha .globe i { position: absolute; left: var(--x); top: var(--y); width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(var(--c) 50%, #f8fafc 50%); border: 2px solid #0b0716; }
.cx-gacha .base { position: relative; height: 70px; background: var(--red); border: 4px solid #7f1d1d; border-top: none; }
.cx-gacha .knob { position: absolute; left: 50%; top: 12px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: #f8fafc; border: 4px solid #0b0716; }
.cx-gacha .knob::after { content: ""; position: absolute; left: 9px; top: -2px; width: 4px; height: 26px; background: #0b0716; }
.cx-gacha .chute { position: absolute; left: 50%; bottom: 6px; width: 40px; height: 16px; margin-left: -20px; background: #0b0716; }
.cx-gacha.turn .knob { animation: knob 1s ease-in-out; }
.cx-gacha.turn .globe i { animation: shake .25s linear 4; }
@keyframes knob { to { transform: rotate(360deg); } }
@keyframes shake { 50% { transform: translate(2px, -3px); } }
.cx-reveal:empty { display: none; }
.cx-reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; }
/* shop */
.cx-shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.cx-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; background: #1b1033; border: 2px solid #3b2a63; }
.cx-item img { width: 56px; height: 56px; image-rendering: pixelated; }
.cx-item b { font-family: 'Press Start 2P'; font-size: 7px; color: var(--txt); }
.cx-item .abtn { font-size: 7px; padding: 7px 6px; }
.cx-item .own { font-family: 'Press Start 2P'; font-size: 7px; color: var(--ink); background: #4ade80; padding: 5px 6px; }
.cx-frame { display: block; width: 40px; height: 56px; border: 6px solid; }
.f-gold { border-color: var(--yel); background: #5b3a00; }
.f-neon { border-color: var(--pink); background: #1b1033; box-shadow: inset 0 0 0 3px var(--cyan); }
.f-snow { border-color: #dbeafe; background: #1e3a8a; }
/* claw */
.cx-claw { width: min(340px, 86vw); aspect-ratio: 200 / 210; border: 4px solid var(--pink); box-shadow: 0 0 16px #ec489966; background: #12082a; }
.cx-pad .abtn { min-width: 56px; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.cx-pad[hidden] { display: none; }
.cx-win { font-family: 'Press Start 2P'; font-size: 11px; line-height: 1.8; color: var(--yel); }
.cx-win img { width: 48px; height: 48px; image-rendering: pixelated; vertical-align: middle; }
/* jukebox */
.cx-songs { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 5px; }
.cx-songs button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; cursor: pointer; font: inherit; text-align: left; color: var(--txt); background: #1b1033; border: 2px solid #3b2a63; }
.cx-songs button:hover, .cx-songs button:focus-visible { border-color: var(--yel); outline: none; }
.cx-songs .n { font-family: 'Press Start 2P'; font-size: 9px; color: var(--pink); }
.cx-songs .t { flex: 1; font-family: 'Press Start 2P'; font-size: 9px; }
.cx-songs .t em { font-style: normal; font-size: 7px; color: #fff; background: var(--red); padding: 2px 4px; }
.cx-songs .p { font-family: 'Press Start 2P'; font-size: 7px; color: var(--yel); white-space: nowrap; }
.cx-songs li.on button { border-color: var(--yel); background: #2a1a4d; box-shadow: 0 0 10px #facc1544; }
/* missions */
.cx-miss { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.cx-miss li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t b" "bar b"; align-items: center; gap: 4px 10px; padding: 8px 10px; text-align: left; background: #1b1033; border: 2px solid #3b2a63; }
.cx-miss li.ok { border-color: #4ade80; }
.cx-miss .t { grid-area: t; }
.cx-miss .bar { grid-area: bar; display: block; height: 6px; background: #0b0716; }
.cx-miss .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #4ade80); }
.cx-miss .v { display: none; }
.cx-miss .abtn, .cx-miss .got { grid-area: b; }
.cx-miss .abtn { font-size: 7px; padding: 8px 7px; }
.cx-miss .got { font-family: 'Press Start 2P'; font-size: 7px; color: #4ade80; }
.cx-bonus { font-family: 'Press Start 2P'; font-size: 8px; line-height: 1.8; color: var(--dim); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cx-bonus.ok { color: #4ade80; }
.cx-toast { position: fixed; left: 50%; top: 70px; z-index: 60; transform: translateX(-50%); font-family: 'Press Start 2P'; font-size: 10px; padding: 10px 14px; color: var(--ink); background: #4ade80; box-shadow: 0 0 18px #4ade8099, 4px 4px 0 #000; pointer-events: none; }
.cx-toast.out { opacity: 0; transition: opacity .4s; }
/* photo booth */
.cx-pick { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center; }
.cx-pick > b { font-family: 'Press Start 2P'; font-size: 8px; color: var(--yel); min-width: 64px; }
.cx-chip { padding: 2px; cursor: pointer; background: #1b1033; border: 2px solid #3b2a63; color: var(--txt); }
.cx-chip img { display: block; width: 36px; height: 36px; image-rendering: pixelated; }
.cx-chip.txt { font-family: 'Press Start 2P'; font-size: 7px; padding: 8px 7px; }
.cx-chip.on { border-color: var(--yel); box-shadow: 0 0 8px #facc1588; }
.cx-chip[disabled] { opacity: .45; cursor: default; }
.cx-strip { min-height: 40px; display: grid; place-items: center; }
.cx-strip img { height: min(48vh, 460px); width: auto; image-rendering: pixelated; box-shadow: 0 10px 30px #000; animation: zoomin .5s ease-out; }
.cx-count3 { font-family: 'Press Start 2P'; font-size: 48px; color: var(--yel); text-shadow: 4px 4px 0 #000; }
@media (max-width: 520px) {
  .cx-grid { grid-template-columns: repeat(4, 1fr); }
  .cx-shop { grid-template-columns: repeat(2, 1fr); }
  .corner-body { font-size: 19px; }
}

/* ── CARDS: 4 rarities, doubles, the press, the legendary card ── */
.cx-card { --rc: #64748b; border-color: var(--rc); }
.cx-card .art { display: block; width: 100%; max-width: 64px; aspect-ratio: 1; }
.cx-card .art img { width: 100%; height: 100%; max-width: none; object-fit: contain; image-rendering: pixelated; display: block; }
.cx-card .gem { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--rc); box-shadow: 0 0 0 1px #0b0716; }
.cx-card .dup { position: absolute; top: 2px; left: 2px; font-family: 'Press Start 2P'; font-size: 6px; padding: 2px 3px; color: var(--ink); background: var(--yel); }
.cx-card.r-common { --rc: #94a3b8; }
.cx-card.r-rare { --rc: var(--cyan); box-shadow: 0 0 8px #22d3ee55; }
.cx-card.r-epic { --rc: #c084fc; background: linear-gradient(#26103d, #1b1033); box-shadow: 0 0 10px #a855f766; }
.cx-card.r-legend { --rc: #facc15; background: linear-gradient(160deg, #3b2a06, #1b1033 60%); box-shadow: 0 0 14px #facc1588; }
.cx-card.miss { border-color: #2a1d48; box-shadow: none; background: #120a24; }
.cx-card.miss .gem { opacity: .8; }
.cx-card.r-legend .art { aspect-ratio: 3 / 4; max-width: 72px; }
.cx-card.r-legend .art img { object-fit: cover; }
.cx-card.r-legend.miss .q { aspect-ratio: 3 / 4; max-width: 72px; color: #5b4a12; }
.cx-card.r-legend figcaption { color: #fde68a; }
.cx-card.fresh .art { max-width: 128px; }
.cx-card.fresh.r-legend { width: 190px; }
.cx-card.fresh.r-legend .art { max-width: 176px; }
.cx-card.fresh .gem { width: 10px; height: 10px; top: 5px; right: 5px; }
.cx-card.fresh .dup { display: none; }

/* the legendary card: gold frame, moving holographic shine, sparkles, 3D tilt that follows the pointer */
.cx-card[data-holo] {
  transform: perspective(500px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .15s ease-out; transform-style: preserve-3d;
  border: 3px solid transparent;
  background: linear-gradient(160deg, #3b2a06, #1b1033 60%) padding-box, linear-gradient(135deg, #fef08a, #ca8a04, #fde68a, #a16207, #fef9c3) border-box;
  animation: legglow 2.4s ease-in-out infinite;
}
.cx-card[data-holo] .art { position: relative; overflow: hidden; outline: 2px solid #a16207; }
.cx-card[data-holo] .art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  background: linear-gradient(115deg, transparent 25%, #ff6ad5aa 38%, #fde047aa 46%, #5eead4aa 54%, #a78bfaaa 62%, transparent 75%);
  background-size: 250% 250%; background-position: var(--mx, 0%) var(--my, 0%);
  animation: holo 3.5s linear infinite;
}
.cx-card[data-holo]:hover .art::after { animation: none; opacity: .75; }
.cx-card[data-holo] .art::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(#fff 1px, transparent 1.5px), radial-gradient(#fde68a 1px, transparent 1.5px);
  background-size: 23px 29px, 31px 19px; background-position: 3px 5px, 13px 11px;
  animation: twinkle 1.6s steps(2) infinite;
}
@keyframes holo { 0% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } 100% { background-position: 0% 0%; } }
@keyframes twinkle { 50% { opacity: .25; } }
@keyframes legglow { 50% { box-shadow: 0 0 26px #facc15cc, 0 0 6px #fff8; } }

/* rarity colours in texts */
.cx-h .gem, .cx-odds-t .gem { display: inline-block; width: 7px; height: 7px; margin-right: 6px; transform: rotate(45deg); background: var(--rc, #94a3b8); vertical-align: 1px; }
.r-common { --rc: #94a3b8; } .r-rare { --rc: #22d3ee; } .r-epic { --rc: #c084fc; } .r-legend { --rc: #facc15; }
.cx-h.r-common, .cx-h.r-rare, .cx-h.r-epic, .cx-h.r-legend { color: var(--rc); }
.cx-grid.one { grid-template-columns: minmax(0, 170px); justify-content: center; }
.cx-grid.one .cx-card.r-legend .art, .cx-grid.one .cx-card.r-legend .q { max-width: 156px; }
.cx-grid.one .cx-card figcaption { font-size: 8px; }
.cx-grid.one .cx-card figcaption small { font-size: 6px; }
.cx-new.r-epic { background: #c084fc; }
.cx-new.r-legend { background: linear-gradient(90deg, #fde68a, #facc15, #fde68a); color: var(--ink); }
.cx-new.dbl { background: #334155; color: #e2e8f0; }

/* odds table */
.cx-odds-box { width: min(460px, 100%); text-align: left; background: #1b1033cc; border: 2px solid #3b2a63; padding: 6px 10px; }
.cx-odds-box summary { cursor: pointer; font-family: 'Press Start 2P'; font-size: 8px; color: var(--cyan); list-style: none; text-align: center; }
.cx-odds-box summary::-webkit-details-marker { display: none; }
.cx-odds-h { font-family: 'Press Start 2P'; font-size: 7px; color: var(--dim); margin: 8px 0 4px; }
.cx-odds-t { width: 100%; border-collapse: collapse; font-size: 17px; }
.cx-odds-t td { padding: 3px 4px; border-top: 1px solid #3b2a63; white-space: nowrap; }
.cx-odds-t td:first-child { font-family: 'Press Start 2P'; font-size: 7px; color: var(--rc); }
.cx-odds-t b { color: var(--yel); }

/* what came out + the press */
.cx-pulled { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cx-pulled.many .cx-card.fresh { width: 104px; }
.cx-pulled.many .cx-card.fresh .art { max-width: 86px; }
.cx-pulled.many .cx-card.fresh.r-legend { width: 120px; }
.cx-pulled.many .cx-new { font-size: 6px; padding: 4px 5px; }
.cx-pull { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: zoomin .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.cx-pull:nth-child(2) { animation-delay: .12s; } .cx-pull:nth-child(3) { animation-delay: .24s; } .cx-pull:nth-child(4) { animation-delay: .36s; } .cx-pull:nth-child(5) { animation-delay: .48s; }
.cx-pull.burst { position: relative; }
.cx-pull.burst::before {
  content: ""; position: absolute; left: 50%; top: 45%; width: 340px; height: 340px; margin: -170px 0 0 -170px; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(#facc1555 0 10deg, transparent 10deg 20deg); border-radius: 50%;
  -webkit-mask: radial-gradient(#000 30%, transparent 70%); mask: radial-gradient(#000 30%, transparent 70%);
  animation: rays 6s linear infinite;
}
@keyframes rays { to { transform: rotate(360deg); } }
.cx-reveal { position: relative; isolation: isolate; }
.cx-fuse { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px; background: #1b1033cc; border: 2px dashed #3b2a63; }
.cx-item .lock { font-family: 'Press Start 2P'; font-size: 6px; line-height: 1.6; color: var(--yel); }
.cx-frame.f-oro { border-color: #facc15; background: #1b1033; box-shadow: inset 0 0 0 2px #a16207; }
.cx-packart { display: block; width: 44px; height: 56px; background: linear-gradient(135deg, #a855f7, #ec4899 50%, #facc15); border: 3px solid #0b0716; box-shadow: 4px -4px 0 #22d3ee, 8px -8px 0 #facc15; }
@media (prefers-reduced-motion: reduce) {
  .cx-card[data-holo], .cx-card[data-holo] .art::after, .cx-card[data-holo] .art::before, .cx-pull.burst::before { animation: none; }
}
@media (max-width: 520px) {
  .cx-pulled.many .cx-card.fresh { width: 92px; }
}
.cx-toast.gold { background: linear-gradient(90deg, #fde68a, #facc15, #fde68a); box-shadow: 0 0 24px #facc15aa; }

/* while the 3D hall loads: no flash of the old flat hall, just a bouncing coin */
html.load3d .hall { visibility: hidden; }
html.load3d body::after {
  content: ""; position: fixed; left: 50%; top: 50%; z-index: 5; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  background: url(img/arcade/coin.png) center / contain no-repeat; image-rendering: pixelated; animation: load3d .6s ease-in-out infinite alternate;
}
@keyframes load3d { to { transform: translateY(-14px); } }
