@font-face {
  font-family: "Pix";
  src: url("../assets/PressStart2P-Regular.ttf") format("truetype");
  font-display: block;
}

:root {
  --pink: #ff3cc8;
  --cyan: #3cf0ff;
  --yellow: #ffd63c;
  --green: #4dff7a;
  --purple: #7a14be;
  --bg: #07000f;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: "Pix", "Courier New", monospace;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body { position: fixed; inset: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

.hidden { display: none !important; }

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* CRT scanlines over everything */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.22) 3px, rgba(0,0,0,0) 4px),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,.55) 100%);
}

/* ---------- power on + intro ---------- */
#power, #intro { background: #000; z-index: 50; }
.power-msg {
  font-size: 14px;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan), 0 0 16px var(--cyan);
  animation: blink 1.1s steps(1) infinite;
}
#intro-logo {
  max-width: 60vw;
  max-height: 76vh;
  opacity: 0;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- the hall ---------- */
#hall {
  background: var(--bg);
  justify-content: flex-start;
  padding-top: calc(var(--safe-top) + 8px);
  padding-bottom: calc(var(--safe-bottom) + 6px);
}

.room { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.room::before {
  /* dark back wall with a purple haze */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% 30%, rgba(122,20,190,.35), rgba(0,0,0,0) 70%),
    radial-gradient(ellipse 60% 30% at 15% 70%, rgba(255,60,200,.12), rgba(0,0,0,0) 70%),
    radial-gradient(ellipse 60% 30% at 85% 70%, rgba(60,240,255,.12), rgba(0,0,0,0) 70%),
    linear-gradient(#0a0016, #05000b 60%, #000);
}
.ceiling-lights {
  position: absolute; left: 0; right: 0; top: 0; height: 30%;
  background: repeating-linear-gradient(90deg, rgba(255,214,60,.06) 0 2px, transparent 2px 60px);
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}
.floor {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 34%;
  background:
    linear-gradient(rgba(255,60,200,.55) 2px, transparent 2px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(255,60,200,.55) 2px, transparent 2px) 0 0 / 40px 100%;
  transform: perspective(240px) rotateX(62deg);
  transform-origin: bottom;
  -webkit-mask-image: linear-gradient(transparent, #000 70%);
  mask-image: linear-gradient(transparent, #000 70%);
  opacity: .55;
  animation: floor-move 3s linear infinite;
}
@keyframes floor-move { to { background-position: 0 28px, 0 0; } }

.hall-top {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 2;
}

.neon-sign {
  font-size: clamp(14px, 5vw, 22px);
  font-weight: normal;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 0 4px var(--cyan), 0 0 10px var(--cyan), 0 0 22px var(--cyan);
  white-space: nowrap;
}
.neon-sign .flicker {
  color: #fff;
  text-shadow: 0 0 4px var(--pink), 0 0 10px var(--pink), 0 0 22px var(--pink);
  animation: flicker 6s infinite;
}
@keyframes flicker {
  0%, 18%, 20%, 50%, 52%, 100% { opacity: 1; }
  19%, 51% { opacity: .35; }
}

.icon-btn {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(255,214,60,.5), inset 0 0 6px rgba(255,214,60,.3);
  background: rgba(0,0,0,.4);
}
.icon-btn:active { transform: scale(.92); }
.mute-btn::before { content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--mute-icon) center / contain no-repeat; mask: var(--mute-icon) center / contain no-repeat; }
.mute-btn { --mute-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath d='M0 3h2v4H0zM2 3h1v4H2zM3 2h1v6H3zM4 1h1v8H4zM6 3h1v4H6zM8 2h1v6H8z'/%3E%3C/svg%3E"); }
.mute-btn.muted { --mute-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath d='M0 3h2v4H0zM2 3h1v4H2zM3 2h1v6H3zM4 1h1v8H4zM6 3h1v1H6zM9 3h1v1H9zM7 4h2v2H7zM6 6h1v1H6zM9 6h1v1H9z'/%3E%3C/svg%3E"); color: #888; border-color: #888; box-shadow: none; }

/* the row of cabinets: native swipe with snapping */
.cabinets {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 11vw;
  gap: 4vw;
}
.cabinets::-webkit-scrollbar { display: none; }

.cabinet {
  --c: var(--pink);
  --c2: var(--cyan);
  position: relative;
  flex: 0 0 78vw;
  max-width: 340px;
  height: min(96%, 158vw);
  max-height: 680px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  border-radius: 14px 14px 6px 6px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 12%, rgba(0,0,0,0) 88%, rgba(0,0,0,.55)),
    linear-gradient(var(--body, #2a0a44), #120020);
  border: 3px solid var(--c);
  box-shadow: 0 0 14px var(--c), 0 0 40px rgba(0,0,0,.6), inset 0 0 18px rgba(0,0,0,.7);
  padding: 8px 8px 10px;
  transition: transform .25s, opacity .25s, filter .25s;
  transform: scale(.9);
  opacity: .55;
  filter: saturate(.7);
}
.cabinet.current { transform: scale(1); opacity: 1; filter: none; }

.marquee {
  position: relative;
  flex: 0 0 auto;
  height: 22%;
  min-height: 70px;
  border-radius: 8px 8px 3px 3px;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.18), rgba(0,0,0,0) 70%), var(--marq, #1a0030);
  border: 2px solid var(--c2);
  box-shadow: 0 0 10px var(--c2), inset 0 0 14px rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 4px 8px;
}
.marquee canvas { height: 80%; image-rendering: pixelated; image-rendering: crisp-edges; flex: 0 0 auto; }
.marquee .title {
  font-size: clamp(11px, 4.2vw, 17px);
  line-height: 1.35;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 4px var(--c), 0 0 10px var(--c), 0 0 18px var(--c);
}
.cabinet.current .marquee { animation: marquee-glow 2.4s ease-in-out infinite; }
@keyframes marquee-glow { 50% { box-shadow: 0 0 18px var(--c2), inset 0 0 22px rgba(255,255,255,.25); } }

.cab-screen {
  position: relative;
  flex: 1 1 auto;
  margin: 8px 6px;
  border-radius: 18px / 14px;
  background: radial-gradient(ellipse at center, #0b1a22, #02070a 75%);
  border: 6px solid #0a0a0a;
  box-shadow: inset 0 0 22px rgba(60,240,255,.25), 0 0 0 2px #333;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  min-height: 0;
}
.cab-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
  border-radius: inherit;
}
.cab-tagline { font-size: 8px; color: var(--c2); text-align: center; line-height: 1.5; }
.scores-title { font-size: 10px; color: var(--yellow); text-shadow: 0 0 6px var(--yellow); margin-top: 6px; }
.scores {
  list-style: none;
  font-size: 10px;
  line-height: 2;
  width: 100%;
  max-width: 220px;
}
.scores li { display: flex; justify-content: space-between; color: #fff; }
.scores li .rank { color: var(--c); width: 3ch; }
.scores li .name { flex: 1; color: var(--c2); }
.scores li.empty { color: #555; }
.scores li.empty .name, .scores li.empty .rank { color: #555; }
.cab-insert {
  font-size: 10px;
  color: var(--yellow);
  text-shadow: 0 0 6px var(--yellow);
}
.cabinet.current .cab-insert { animation: blink 1s steps(1) infinite; }
.cab-oos {
  font-size: 10px;
  color: #ff5050;
  background: repeating-linear-gradient(45deg, #ffd63c 0 10px, #111 10px 20px);
  padding: 4px;
  transform: rotate(-6deg);
}
.cab-oos span { display: block; background: #111; padding: 6px 8px; }

.control-deck {
  flex: 0 0 auto;
  height: 15%;
  min-height: 56px;
  margin: 0 -4px;
  border-radius: 4px 4px 10px 10px;
  background: linear-gradient(#3a1060, #1c0530);
  border-top: 3px solid var(--c);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 14px;
}
.stick { position: relative; width: 26px; height: 26px; border-radius: 50%; background: #111; box-shadow: inset 0 2px 4px #000; }
.stick::before { content: ""; position: absolute; left: 10px; bottom: 12px; width: 6px; height: 20px; background: #ccc; border-radius: 3px; }
.stick::after { content: ""; position: absolute; left: 4px; bottom: 26px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset -3px -3px 0 rgba(0,0,0,.35); }
.cab-buttons { display: flex; gap: 10px; }
.cab-buttons i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), 0 0 8px var(--c); }
.cab-buttons i:nth-child(2) { background: var(--c2); box-shadow: inset -3px -3px 0 rgba(0,0,0,.35), 0 0 8px var(--c2); }
.cab-slot {
  width: 34px; height: 40px;
  border-radius: 4px;
  background: #222;
  border: 2px solid #555;
  display: flex; align-items: center; justify-content: center;
}
.cab-slot::before { content: ""; width: 4px; height: 20px; background: #000; box-shadow: 0 0 6px var(--yellow); border: 1px solid var(--yellow); }
.cabinet.current .cab-slot::before { animation: slot-glow 1s steps(1) infinite; }
@keyframes slot-glow { 50% { border-color: #ff3030; box-shadow: 0 0 8px #ff3030; } }

.hall-bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 0 2px;
}
.arrow-btn {
  width: 44px; height: 40px;
  font-size: 16px;
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan);
}
.arrow-btn:active { transform: scale(.88); }
.dots { display: flex; gap: 7px; }
.dots i { width: 8px; height: 8px; background: #333; }
.dots i.on { background: var(--pink); box-shadow: 0 0 6px var(--pink); }
.hall-credit { position: relative; z-index: 2; font-size: 7px; color: #6a5a80; padding-top: 4px; }

/* ---------- insert coin ---------- */
#coin { background: #000; z-index: 40; gap: 20px; padding: 20px; padding-bottom: calc(var(--safe-bottom) + 110px); }
.coin-back { position: absolute; left: 10px; top: calc(var(--safe-top) + 10px); }
.coin-title { font-size: 16px; text-align: center; line-height: 1.5; color: #fff; text-shadow: 0 0 6px var(--pink), 0 0 16px var(--pink); }
.coin-stage { position: relative; width: 150px; height: 170px; display: flex; align-items: flex-end; justify-content: center; }
.coin-sprite {
  position: absolute;
  left: 43px; top: 0;
  width: 64px; height: 64px;
  image-rendering: pixelated;
  background-size: 100% 100%;
  opacity: 0;
}
.coin-sprite.drop { animation: coin-drop .55s cubic-bezier(.5,0,.9,.6) forwards; }
@keyframes coin-drop {
  0% { transform: translateY(20px) scaleX(1); opacity: 1; }
  50% { transform: translateY(60px) scaleX(.4); opacity: 1; }
  100% { transform: translateY(95px) scaleX(.1) scaleY(.6); opacity: 0; }
}
.coin-slot {
  position: relative;
  width: 110px; height: 120px;
  background: linear-gradient(#4a4a4a, #222);
  border: 3px solid #777;
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s, box-shadow .12s;
}
.coin-slot.ready { animation: slot-pulse 1s ease-in-out infinite; }
@keyframes slot-pulse { 50% { box-shadow: 0 0 22px rgba(255,214,60,.7); } }
.coin-slot.over { transform: scale(1.08); box-shadow: 0 0 26px var(--yellow); border-color: var(--yellow); }
.slot-hole { width: 10px; height: 48px; background: #000; border: 2px solid var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.coin-slot.flash .slot-hole { border-color: #fff; box-shadow: 0 0 22px #fff, 0 0 40px var(--yellow); }
.slot-label { font-size: 8px; color: #aaa; }
.coin-msg { font-size: 12px; line-height: 1.6; text-align: center; color: var(--yellow); text-shadow: 0 0 8px var(--yellow); animation: blink .9s steps(1) infinite; }
.coin-credit { font-size: 12px; color: var(--green); text-shadow: 0 0 8px var(--green); }
.coin-free { position: absolute; bottom: calc(var(--safe-bottom) + 8px); right: 12px; font-size: 7px; color: #666; }
.coin-out { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 10px; line-height: 1.8; text-align: center; color: #ddd; }
.coin-out .neon-pink { font-size: 16px; }
.coin-timer { font-size: 22px; color: var(--cyan); text-shadow: 0 0 8px var(--cyan); }

/* the coin purse in the corner, and the coin you drag out of it */
.coin-purse {
  position: absolute;
  left: 14px; bottom: calc(var(--safe-bottom) + 18px);
  display: flex; align-items: center; gap: 10px;
}
.purse-coin {
  width: 72px; height: 72px;
  image-rendering: pixelated;
  background-size: 100% 100%;
  filter: drop-shadow(0 0 8px rgba(255,214,60,.6));
  touch-action: none;
  cursor: grab;
}
.purse-coin.empty { filter: grayscale(1) brightness(.4); }
.purse-count { font-size: 16px; color: var(--yellow); text-shadow: 0 0 8px var(--yellow); }
.drag-coin {
  position: fixed; z-index: 45;
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  image-rendering: pixelated;
  background-size: 100% 100%;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.7)) drop-shadow(0 0 10px rgba(255,214,60,.6));
}
.drag-coin.back { transition: left .25s ease-out, top .25s ease-out; }
/* a see-through coin that shows where to drag */
.coin-hint {
  position: fixed; z-index: 41;
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  image-rendering: pixelated;
  background-size: 100% 100%;
  pointer-events: none;
  opacity: 0;
}
.coin-hint.on { animation: coin-hint 1.8s ease-in-out infinite; }
@keyframes coin-hint {
  0% { left: var(--hx0); top: var(--hy0); opacity: 0; }
  15% { opacity: .55; }
  70% { left: var(--hx1); top: var(--hy1); opacity: .55; }
  100% { left: var(--hx1); top: var(--hy1); opacity: 0; }
}

/* coin counter in the hall */
.hall-coins {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: var(--yellow); text-shadow: 0 0 6px var(--yellow);
  padding-top: 8px;
}
.coin-ico {
  width: 18px; height: 18px;
  image-rendering: pixelated;
  background-size: 100% 100%;
  background-image: var(--coin-img);
}
.days-btn {
  margin-left: 10px;
  font-size: 8px;
  padding: 6px 8px;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(255,214,60,.4);
}
.days-btn:active { transform: scale(.94); }
.days-board { max-width: 280px; font-size: 10px; }
.days-board li .coins { display: flex; align-items: center; gap: 4px; }
.days-board li .coins .coin-ico { width: 12px; height: 12px; }
.days-board li .day { color: #888; width: 9ch; text-align: right; }
.days-board li.today .name, .days-board li.today span { color: var(--yellow); }
.today-line { font-size: 10px; color: var(--cyan); }
.hall-coins-note { font-size: 7px; color: #887; text-shadow: none; }
.coins-won { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--yellow); text-shadow: 0 0 8px var(--yellow); }
.coins-won .coin-ico { width: 24px; height: 24px; }
.overlay p.small-note { font-size: 7px; color: #888; }
.overlay p.coins-left { font-size: 8px; color: var(--yellow); margin-top: -8px; }
.pix-btn:disabled { background: #333; color: #777; border-bottom-color: #111; box-shadow: none; }

/* ---------- playing ---------- */
#play { background: #000; z-index: 30; justify-content: flex-start; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); }
.hud {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 2px solid #222;
  background: #050008;
}
.hud .icon-btn { width: 36px; height: 36px; }
.hud-score { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #fff; }
.hud-score .lbl { font-size: 7px; color: var(--pink); }
.stage { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; overflow: hidden; touch-action: none; }
.stage canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(0,0,0,.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 20px;
  text-align: center;
  overflow-y: auto;
}
/* centred when it fits, scrollable from the top when it doesn't (small phones) */
.overlay > :first-child { margin-top: auto; }
.overlay > :last-child { margin-bottom: auto; }
.overlay h2 { font-size: 20px; font-weight: normal; line-height: 1.4; }
.overlay p { font-size: 10px; line-height: 1.8; color: #ddd; max-width: 300px; }
.overlay ul { list-style: none; font-size: 10px; line-height: 2; color: #ddd; text-align: left; max-width: 300px; }
.overlay ul li::before { content: "\25B6  "; color: var(--yellow); }
.overlay ul.scores li::before { content: none; }
.neon-pink { color: #fff; text-shadow: 0 0 6px var(--pink), 0 0 16px var(--pink); font-weight: normal; }
.neon-cyan { color: #fff; text-shadow: 0 0 6px var(--cyan), 0 0 16px var(--cyan); }
.neon-yellow { color: #fff; text-shadow: 0 0 6px var(--yellow), 0 0 16px var(--yellow); }
.pix-btn {
  font-size: 12px;
  padding: 14px 18px;
  min-width: 200px;
  color: #000;
  background: var(--yellow);
  border-bottom: 4px solid #a07800;
  box-shadow: 0 0 12px rgba(255,214,60,.6);
}
.pix-btn.alt { background: #222; color: var(--cyan); border-bottom-color: #000; box-shadow: 0 0 0 2px var(--cyan); }
.pix-btn:active { transform: translateY(2px); border-bottom-width: 2px; }

.initials { display: flex; gap: 14px; }
.initials .slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.initials .slot button { width: 52px; height: 40px; font-size: 16px; color: var(--cyan); border: 2px solid var(--cyan); border-radius: 6px; }
.initials .slot button:active { background: rgba(60,240,255,.25); }
.initials .letter { font-size: 30px; width: 52px; text-align: center; padding: 6px 0; color: #fff; text-shadow: 0 0 8px var(--pink); border-bottom: 3px solid var(--pink); }
.initials .slot.active .letter { animation: blink .8s steps(1) infinite; }
.go-scores { font-size: 10px; }
.go-scores li.mine { color: var(--yellow); animation: blink .8s steps(1) infinite; }

/* ---------- about ---------- */
.modal { z-index: 60; background: rgba(0,0,0,.85); padding: 20px; }
.panel {
  max-width: 340px;
  border: 3px solid var(--pink);
  box-shadow: 0 0 16px var(--pink);
  background: #0a0014;
  padding: 22px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.panel h2 { font-size: 16px; }
.panel p { font-size: 10px; line-height: 1.8; }
.panel p.big { font-size: 12px; line-height: 2; }
.panel p.big .neon-cyan { font-size: 22px; }
.panel p.small { font-size: 8px; color: #aaa; }

/* ---------- NORMAL / ARCADE switch in the hall ---------- */
.mode-switch {
  position: relative; z-index: 2;
  display: flex; justify-content: center;
  margin-top: 8px;
}
.mode-opt {
  font-size: 9px;
  padding: 7px 12px;
  color: #888;
  border: 2px solid #444;
  background: rgba(0,0,0,.5);
}
.mode-opt:first-child { border-radius: 4px 0 0 4px; border-right: none; }
.mode-opt:last-child { border-radius: 0 4px 4px 0; }
.mode-opt.on { color: #000; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(60,240,255,.6); }
#mode-arcade.on { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 10px rgba(255,60,200,.6); }

/* ---------- Arcade mode: the control deck under the game ---------- */
.deck {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: calc(170px + var(--safe-bottom));
  padding: 14px 18px calc(var(--safe-bottom) + 12px);
  display: flex; align-items: center; justify-content: space-between;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 6px),
    linear-gradient(#3a1060, #1c0530 70%, #12021f);
  border-top: 4px solid var(--pink);
  box-shadow: 0 -6px 18px rgba(255,60,200,.35), inset 0 6px 10px rgba(0,0,0,.5);
  touch-action: none;
}
.deck::before {
  /* the screws in the corners of the panel */
  content: ""; position: absolute; left: 8px; right: 8px; top: 8px; height: 6px;
  background: radial-gradient(circle at 3px 3px, #888 2px, transparent 3px) left / 6px 6px no-repeat,
              radial-gradient(circle at 3px 3px, #888 2px, transparent 3px) right / 6px 6px no-repeat;
  pointer-events: none;
}
.deck-stick { width: 130px; height: 130px; display: flex; align-items: center; justify-content: center; }
.stick-base {
  position: relative;
  width: 124px; height: 124px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #2a2a2a, #0a0a0a 70%);
  box-shadow: inset 0 4px 10px #000, 0 0 0 4px #444, 0 0 0 7px #111, 0 6px 12px rgba(0,0,0,.6);
  touch-action: none;
}
.stick-shaft {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: #999; box-shadow: inset -2px -2px 0 #555;
}
.stick-knob {
  position: absolute; left: 50%; top: 50%;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9ae0, #ff3cc8 45%, #a0107a);
  box-shadow: 0 6px 0 #6a0a50, 0 10px 14px rgba(0,0,0,.6), 0 0 14px rgba(255,60,200,.5);
  transition: transform .06s linear;
  pointer-events: none;
}
.deck-buttons { display: flex; gap: 18px; align-items: center; }
.deck-buttons.three { gap: 10px; }
.deck-btn-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.deck-btn {
  --bc: #ff3c50;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.65), var(--bc) 40%, rgba(0,0,0,.35) 100%), var(--bc);
  box-shadow: 0 7px 0 rgba(0,0,0,.55), 0 0 0 4px #111, 0 0 0 6px #555, 0 0 16px var(--bc);
  touch-action: none;
  transition: transform .05s, box-shadow .05s;
}
.deck-buttons.three .deck-btn { width: 64px; height: 64px; }
.deck-btn.on { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 0 4px #111, 0 0 0 6px #555, 0 0 26px var(--bc), 0 0 40px var(--bc); filter: brightness(1.25); }
.deck-label { font-size: 8px; color: #ddd; letter-spacing: 1px; }

#play.arcade { padding-bottom: 0; }
.deck.nostick .deck-buttons { width: 100%; justify-content: space-around; }
.deck.nobuttons { justify-content: center; }

/* joystick sensitivity picker */
.hall-sens { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: 6px; }
.sens-row { display: flex; align-items: center; gap: 4px; }
.sens-label { font-size: 8px; color: #aaa; margin-right: 6px; }
.sens-opt { width: 28px; height: 26px; font-size: 9px; color: #888; border: 2px solid #444; border-radius: 3px; background: rgba(0,0,0,.5); }
.sens-opt.on { color: #000; background: var(--pink); border-color: var(--pink); box-shadow: 0 0 8px rgba(255,60,200,.6); }
.overlay .sens-row { margin: 4px 0; }

/* ---------- the coin shop ---------- */
.buy-btn { margin-left: 4px; color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 6px rgba(60,240,255,.4); }
.coin-out .pix-btn { margin-top: 6px; }
.shop-panel { border-color: var(--yellow); box-shadow: 0 0 16px var(--yellow); width: 100%; }
.shop-packs { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.shop-pack {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 14px 12px;
  border: 2px solid var(--yellow); border-radius: 6px;
  background: rgba(255,214,60,.08);
  color: #fff; font-size: 12px;
}
.shop-pack .coin-ico { width: 22px; height: 22px; flex-shrink: 0; }
.shop-pack .amt { color: var(--yellow); text-shadow: 0 0 6px var(--yellow); }
.shop-pack .lbl { font-size: 8px; color: #ccc; }
.shop-pack .tag { font-size: 7px; color: #000; background: var(--pink); padding: 3px 4px; border-radius: 3px; }
.shop-pack .price { margin-left: auto; font-size: 13px; color: #000; background: var(--yellow); padding: 6px 8px; border-radius: 4px; }
.shop-pack:active { transform: scale(.97); }
.shop-pack:disabled { opacity: .4; }
.shop-note { color: var(--cyan); }
.shop-toast {
  position: fixed; z-index: 90; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 70px); transform: translateX(-50%);
  width: min(320px, 90vw); padding: 14px 12px;
  background: #0a0014; border: 3px solid var(--yellow); box-shadow: 0 0 16px var(--yellow); border-radius: 6px;
  font-size: 12px; line-height: 1.8; text-align: center; color: var(--yellow);
}
.shop-toast span { font-size: 8px; color: #ddd; }
.shop-toast .coin-ico { display: inline-block; width: 16px; height: 16px; vertical-align: middle; }
.hall-coins { flex-wrap: wrap; row-gap: 4px; }
.hall-coins .days-btn { white-space: nowrap; }
.hall-coins-note { order: 5; flex-basis: 100%; text-align: center; }
.hall-coins-note:empty { display: none; }
