/* /play — the Arcade: cabinets, high scores and the Prize Counter. Owned by the arcade agent. */

/* ── header + ticket wallet ─────────────────────────────────────────────── */
.arcade-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: clamp(36px, 6vw, 80px); padding-bottom: 8px; }
.arcade-title h1 { margin-bottom: .15em; }
.arcade-title .lede { margin-bottom: 0; }
.wallet {
  --tilt: -4deg;
  display: inline-flex; align-items: center; gap: .45em; padding: 14px 26px 14px 18px; text-decoration: none;
  background: var(--molten); color: #1A1208; border: 4px solid var(--outline); border-radius: 18px;
  box-shadow: 0 6px 0 #B9851A, 0 12px 26px rgba(0, 0, 0, .25);
  transform: rotate(var(--tilt)); transition: transform .3s var(--spring);
  -webkit-mask: radial-gradient(circle 11px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 11px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.wallet:hover { color: #1A1208; transform: rotate(0deg) scale(1.05); }
.wallet-ticket { width: 44px; height: 28px; flex: none; }
.wallet-n { font: 700 clamp(2rem, 1.6rem + 1.6vw, 2.8rem)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.wallet-l { font: 700 .8rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .14em; align-self: flex-end; margin-bottom: .45em; }
.wallet.is-bump { animation: pc-bump .6s var(--spring); }
.no-js .wallet, .no-js .pc-wallet { display: none; }
.how-tix { display: flex; align-items: center; gap: .6em; margin-top: 18px; margin-bottom: 0; color: var(--fg-muted); font-size: var(--step--1); }
.how-tix svg { width: 30px; height: 19px; flex: none; }
.how-tix b { color: var(--fg); }
@keyframes pc-bump { 0% { transform: rotate(var(--tilt, 0)) scale(1); } 30% { transform: rotate(var(--tilt, 0)) scale(1.18, .9); } 60% { transform: rotate(var(--tilt, 0)) scale(.95, 1.08); } 100% { transform: rotate(var(--tilt, 0)) scale(1); } }

/* ── the cabinets ───────────────────────────────────────────────────────── */
.cabinets { padding-block: 28px 12px; }
.cab-row { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.cab-card {
  --c: #FF6B1A; --c2: #FFC23D;
  position: relative; display: flex; flex-direction: column; color: #FFF3DF;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #0D1120), color-mix(in srgb, var(--c) 38%, #0D1120) 60%, #1B2238);
  border: 4px solid var(--outline); border-radius: 26px 26px 14px 14px; padding: 10px 10px 0;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .35), 0 18px 30px rgba(0, 0, 0, .18);
  transition: transform .35s var(--spring), box-shadow .3s;
}
.cab-card:hover, .cab-card:focus-within { transform: translateY(-6px) rotate(-.8deg); box-shadow: 0 14px 0 rgba(0, 0, 0, .3), 0 26px 40px rgba(0, 0, 0, .25); }
.cab-card:nth-child(even):hover, .cab-card:nth-child(even):focus-within { transform: translateY(-6px) rotate(.8deg); }
.cc-marquee {
  text-align: center; padding: 10px 12px 9px; border: 3px solid var(--outline); border-radius: 16px;
  background: linear-gradient(180deg, #1B1030, #10091F); box-shadow: inset 0 0 18px color-mix(in srgb, var(--c2) 45%, transparent);
}
.cc-kicker { display: block; font: 700 .66rem/1 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: #FFF3DF; opacity: .75; margin-bottom: 4px; }
.cc-title { margin: 0; font: 700 1.5rem/1.05 var(--font-display); color: var(--c2); text-shadow: 0 0 10px color-mix(in srgb, var(--c2) 60%, transparent), 0 3px 0 #000; }
.cc-screen {
  position: relative; display: block; margin: 10px 4px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #232A48, #0B0E1A 80%); border: 4px solid var(--outline);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .06), inset 0 0 26px rgba(0, 0, 0, .8);
}
.cc-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 4px); }
.cc-art { position: absolute; inset: 6% 6% 16%; width: 88%; height: 78%; overflow: visible; }
.cc-insert { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font: 400 .56rem/1 var(--font-pixel); letter-spacing: .08em; color: var(--c2); text-transform: uppercase; animation: cc-blink 2s steps(1) infinite; }
.cab-card:hover .cc-insert { color: #FFF3DF; }
.cc-body { flex: 1; display: flex; flex-direction: column; padding: 4px 8px 14px; background: #1B2238; border-radius: 12px 12px 0 0; border: 3px solid var(--outline); border-bottom: 0; margin: 0 -2px; }
.cc-blurb { font-size: .95rem; line-height: 1.4; color: #D9D6E6; margin: 10px 0 8px; }
.cc-controls, .cc-best { font-size: .85rem; margin: 0 0 6px; color: #B7B9CC; }
.cc-controls span, .cc-best span { font: 700 .66rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .14em; color: var(--c2); margin-right: .4em; }
.cc-best b { font: 700 1.05rem/1 var(--font-display); color: #FFF3DF; }
.cc-actions { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cc-play { --btn-bg: var(--c2); --btn-edge: color-mix(in srgb, var(--c2) 55%, #000); }
.cc-full { font: 600 .85rem/1 var(--font-display); color: #B7B9CC; }
.cc-full:hover { color: var(--c2); }
.cc-base { height: 16px; margin: 0 -10px; background: #10152A; border-top: 3px solid var(--outline); border-radius: 0 0 10px 10px; position: relative; }
.cc-base i { position: absolute; bottom: -8px; width: 26px; height: 8px; background: var(--outline); border-radius: 0 0 6px 6px; }
.cc-base i:first-child { left: 18px; } .cc-base i:last-child { right: 18px; }
.cab-soon { filter: saturate(.7); }
.cab-soon .cc-screen { opacity: .75; }
.cab-soon .cc-controls { margin-top: auto; }
/* attract loops (end state in calm mode) */
.cc-spin { animation: cc-rot 7s linear infinite; }
.cc-spin-r { animation: cc-rot-r 5s linear infinite; }
.cc-hammer { transform-origin: 109px 58px; animation: cc-tap 1.6s var(--ease-out) infinite; }
.cc-sparks { opacity: 0; animation: cc-spk 1.6s ease-out infinite; transform-origin: 80px 56px; }
.cc-rain > * { animation: cc-fall 2.4s linear infinite; }
.cc-rain > :nth-child(2) { animation-delay: -.8s; } .cc-rain > :nth-child(3) { animation-delay: -1.6s; } .cc-rain > :nth-child(4) { animation-delay: -1.2s; }
.cc-cru { animation: cc-slide 3s ease-in-out infinite alternate; }
.cc-hop { transform-origin: 84px 64px; animation: cc-hopper 1.4s var(--ease-out) infinite; }
.cc-flame { transform-origin: 80px 88px; animation: cc-flick .5s ease-in-out infinite alternate; }
.cc-dot { animation: cc-walk 4s ease-in-out infinite; }
.cc-glow { animation: cc-glow 1.6s ease-out infinite; }
@keyframes cc-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }
@keyframes cc-rot { to { transform: rotate(360deg); } }
@keyframes cc-rot-r { to { transform: rotate(-360deg); } }
@keyframes cc-tap { 0%, 40% { transform: rotate(0); } 55% { transform: rotate(-26deg); } 62% { transform: rotate(4deg); } 75%, 100% { transform: rotate(0); } }
@keyframes cc-spk { 0%, 54% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1); } 90%, 100% { opacity: 0; transform: scale(1.8); } }
@keyframes cc-glow { 0%, 54% { fill: #FFB22E; } 60% { fill: #FFF3B0; } 100% { fill: #FFB22E; } }
@keyframes cc-fall { 0% { transform: translateY(-10px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(46px); opacity: 0; } }
@keyframes cc-slide { from { transform: translateX(-22px); } to { transform: translateX(22px); } }
@keyframes cc-hopper { 0%, 100% { transform: translateY(0) scale(1.06, .94); } 40% { transform: translateY(-12px) rotate(-6deg) scale(.96, 1.04); } 70% { transform: translateY(0) rotate(4deg); } }
@keyframes cc-flick { from { transform: scale(1, 1); } to { transform: scale(.9, 1.12); } }
@keyframes cc-walk { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(0, -30px); } 60% { transform: translate(50px, -30px); } 80% { transform: translate(70px, -40px); } }
html.calm .cc-insert { animation: none; }
/* while a game is open in the cabinet, the page behind it holds still */
.is-behind *, .is-behind *::before, .is-behind *::after { animation-play-state: paused !important; }

/* ── high scores ────────────────────────────────────────────────────────── */
.scores { padding-block: clamp(40px, 6vw, 80px) 10px; }
.scores-head h2 { display: flex; align-items: center; gap: .35em; margin-bottom: .2em; }
.scores-head h2 svg { width: .8em; height: .8em; color: var(--molten); }
.boards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-top: 18px; }
.board-card { --c: #FF6B1A; background: var(--panel); border: 3px solid var(--line); border-radius: var(--r-lg); padding: 16px 16px 12px; box-shadow: 0 5px 0 rgba(0, 0, 0, .12); display: flex; flex-direction: column; }
.board-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.board-card h3 { font-size: 1.2rem; margin: 0; }
.board-card h3::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: .45em; vertical-align: .12em; box-shadow: 0 0 0 2px var(--outline); }
.board-switch { display: flex; gap: 4px; }
.board-switch button { border: 2px solid var(--line); background: transparent; color: var(--fg-muted); border-radius: 99px; padding: .28em .7em; font: 600 .74rem/1 var(--font-display); }
.board-switch button[aria-pressed="true"] { background: var(--steam); color: var(--outline); border-color: var(--outline); }
.no-js .board-switch { display: none; }
.hs-list { list-style: none; margin: 0 0 10px; padding: 0; font-variant-numeric: tabular-nums; }
.hs-list li { display: grid; grid-template-columns: 1.8em 3.4em 1fr; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 9px; font: 600 1rem/1.2 var(--font-display); }
.hs-list li:nth-child(odd) { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.hs-list li:first-child .hs-rank { background: var(--molten); color: var(--outline); }
.hs-rank { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--panel-2); font-size: .8rem; }
.hs-name { letter-spacing: .12em; }
.hs-score { text-align: right; }
.hs-list li.hs-empty { display: block; background: none; color: var(--fg-muted); font: 400 .95rem/1.4 var(--font-body); padding: 6px 2px; }
.hs-list.is-loading { opacity: .5; }
.board-play { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: .3em; font: 600 .9rem/1 var(--font-display); text-decoration: none; }
.board-play svg { width: 1em; height: 1em; transition: transform .25s var(--spring); }
.board-play:hover svg { transform: translateX(4px); }

/* ── the Prize Counter ──────────────────────────────────────────────────── */
.prize-counter { padding-block: clamp(48px, 7vw, 96px) clamp(60px, 8vw, 110px); }
.pc-sign { text-align: center; max-width: 640px; margin: 0 auto 24px; }
.pc-sign h2 { margin-bottom: .25em; }
.pc-layout {
  display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start;
  background: linear-gradient(180deg, #2C3450, #232A40); color: #FFF3DF;
  border: 4px solid var(--outline); border-radius: var(--r-xl); padding: clamp(16px, 2.6vw, 30px);
  box-shadow: 0 10px 0 #7A4A2A, 0 12px 0 var(--outline), 0 30px 50px rgba(0, 0, 0, .25); position: relative;
}
.pc-layout::before { /* the brass rail along the counter's edge */
  content: ''; position: absolute; left: 16px; right: 16px; bottom: -14px; height: 8px; border-radius: 6px; background: linear-gradient(90deg, #8A6A30, #E0C07A, #8A6A30); border: 2px solid var(--outline);
}
.pc-preview { position: sticky; top: calc(var(--head-h) + 16px); text-align: center; }
.pc-stage {
  position: relative; height: 260px; border-radius: 22px; border: 3px solid var(--outline); overflow: hidden;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 194, 61, .3), transparent 60%), linear-gradient(180deg, #1B2238, #151B2E);
}
.pc-stage::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: #3A2A1E; border-top: 3px solid var(--outline); }
.pc-pivot { position: absolute; left: 50%; bottom: 22px; width: 150px; height: 255px; transform: translateX(-62%); z-index: 1; overflow: visible; }
.pv-body { transform-origin: 60px 150px; animation: pv-idle 2.6s ease-in-out infinite; }
.pc-pivot.is-hop .pv-body { animation: pv-hop .6s var(--spring); }
.pv-hat { transition: opacity .15s; }
.pv-hat.is-none { opacity: 0; }
.pv-hat.is-try { opacity: .88; }
.pv-hat use { transform-box: fill-box; transform-origin: 50% 90%; }
.pc-pivot.is-hop .pv-hat use { animation: pv-hat-pop .5s var(--spring); }
@keyframes pv-idle { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, .98); } }
@keyframes pv-hop { 0% { transform: translateY(0) scale(1.1, .9); } 40% { transform: translateY(-26px) scale(.94, 1.06); } 70% { transform: translateY(0) scale(1.06, .94); } 100% { transform: none; } }
@keyframes pv-hat-pop { 0% { transform: translateY(-30px) scale(.6); } 60% { transform: translateY(4px) scale(1.1); } 100% { transform: none; } }
.jar-mini.pc-jar { position: absolute; right: 18px; bottom: 30px; z-index: 1; }
.pc-wearing { margin: 12px 0 6px; font: 600 1rem/1.3 var(--font-display); color: #FFF3DF; min-height: 2.6em; }
.pc-wallet { display: inline-flex; align-items: center; gap: .5em; font: 600 1rem/1 var(--font-display); }
.pc-wallet .tix { font-size: 1.5rem; color: var(--molten); }
.pc-wallet .muted { color: #B7B9CC; }
.pc-nojs { background: rgba(255, 194, 61, .12); border: 2px dashed rgba(255, 194, 61, .5); border-radius: 12px; padding: .7em 1em; }
.pc-shelf-h { font-size: 1.25rem; margin: 6px 0 12px; color: var(--molten); display: flex; align-items: center; gap: .5em; }
.pc-shelf-h::after { content: ''; flex: 1; height: 3px; border-radius: 3px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .15) 0 8px, transparent 8px 14px); }
.pc-grid { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
.pc-grid:last-child { margin-bottom: 0; }
.prize {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 10px 12px;
  background: #1B2238; border: 3px solid var(--outline); border-radius: 18px; box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  transition: transform .3s var(--spring), box-shadow .3s, border-color .2s;
}
.prize:hover, .prize:focus-within { transform: translateY(-4px) rotate(-1deg); }
.prize-art { width: 100%; height: 86px; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(ellipse at 50% 90%, rgba(255, 255, 255, .08), transparent 70%), #151B2E; position: relative; }
.prize-art > svg { width: 84%; height: 76px; overflow: visible; transition: transform .35s var(--spring); }
.prize:hover .prize-art > svg { transform: scale(1.1) rotate(-4deg); }
.prize-name { margin: 4px 0 0; font: 600 1rem/1.15 var(--font-display); }
.prize-blurb { margin: 0; font-size: .8rem; line-height: 1.3; color: #B7B9CC; }
.prize-price { margin: 2px 0 6px; }
.tix { display: inline-flex; align-items: center; gap: .3em; font: 700 1rem/1 var(--font-display); color: var(--molten); font-variant-numeric: tabular-nums; }
.tix svg { width: 1.6em; height: 1em; flex: none; }
.prize-btn { margin-top: auto; width: 100%; white-space: nowrap; padding-inline: .5em; }
.prize-btn[disabled] { opacity: .5; }
.no-js .prize-btn { display: none; }
.prize.is-poor .prize-price .tix { color: #B7B9CC; }
.prize.is-poor .prize-btn { --btn-bg: #39425F; --btn-fg: #D9D6E6; --btn-edge: #232A40; }
.prize.is-owned .prize-price { visibility: hidden; }
.prize.is-owned .prize-btn { --btn-bg: var(--steam); --btn-edge: #238C84; }
.prize.is-on { border-color: var(--molten); box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 0 3px rgba(255, 194, 61, .35), 0 0 26px rgba(255, 194, 61, .3); }
.prize.is-on .prize-btn { --btn-bg: transparent; --btn-fg: #FFF3DF; --btn-edge: transparent; border-color: #5E6991; box-shadow: none; }
.prize.is-on::before {
  content: attr(data-on-label); position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-3deg); z-index: 2;
  background: var(--molten); color: var(--outline); border: 2px solid var(--outline); border-radius: 99px; padding: .2em .7em; font: 700 .7rem/1.2 var(--font-display); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.prize.is-nope { animation: pc-nope .4s ease-in-out; }
.prize.is-bought { animation: pc-bought .7s var(--spring); }
@keyframes pc-nope { 20%, 60% { transform: translateX(-6px) rotate(-1deg); } 40%, 80% { transform: translateX(6px) rotate(1deg); } }
@keyframes pc-bought { 0% { transform: scale(1); } 30% { transform: scale(1.12) rotate(-3deg); } 60% { transform: scale(.96) rotate(2deg); } 100% { transform: none; } }
.hat-prop { transform-box: fill-box; transform-origin: 50% 50%; }
.prize:hover .hat-prop, .pv-hat .hat-prop { animation: hat-prop .5s linear infinite; }
@keyframes hat-prop { from { transform: scaleX(1); } 50% { transform: scaleX(-1); } to { transform: scaleX(1); } }

/* mini jars (the counter's preview and the jar-skin cards; skins are in prizes.css) */
.jar-mini { position: relative; display: inline-block; width: 52px; height: 65px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.jar-mini::before { content: ''; position: absolute; left: 8px; right: 8px; bottom: 5px; top: 18px; border-radius: 10px 10px 14px 14px; background: radial-gradient(ellipse at 50% 80%, rgba(255, 194, 61, .6), rgba(255, 107, 26, .3) 55%, transparent 80%); filter: blur(2px); }
.jar-mini .jar-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.jar-mini .jar-sparks { position: absolute; left: 10px; right: 10px; bottom: 7px; top: 20px; overflow: hidden; border-radius: 8px 8px 12px 12px; }
.jar-mini .jar-sparks i { position: absolute; width: 6px; height: 7px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 50% 65%, #FFF3DF, #FFC23D 45%, #FF6B1A 80%); box-shadow: 0 0 5px #FFC23D; }
.jar-mini .jar-count { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%) scale(.8); background: var(--outline); color: var(--cream); border-radius: 99px; padding: 3px 7px; font: 700 .72rem/1 var(--font-display); white-space: nowrap; border: 2px solid var(--molten); }
.jar-mini .jar-count span { opacity: .7; }
.prize-jar .prize-art .jar-mini { transform: scale(1.1); }

@media (max-width: 860px) {
  .pc-layout { grid-template-columns: 1fr; }
  .pc-preview { position: relative; top: 0; display: grid; grid-template-columns: 1fr; }
  .pc-stage { height: 220px; }
  .pc-pivot { height: 215px; width: 128px; }
}
@media (max-width: 520px) {
  .arcade-head { align-items: flex-start; }
  .wallet { padding: 10px 20px 10px 14px; }
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .prize-art { height: 74px; }
  .prize-btn { font-size: .85rem; padding-inline: .5em; }
}
