:root {
  --ink: #321327;
  --shadow: #170715;
  --pink: #ff5ebc;
  --hot: #ff2f93;
  --rose: #ffd3ef;
  --cream: #fff8dc;
  --mint: #9df7d3;
  --lemon: #fff07a;
  --blue: #6bc6ff;
  --violet: #7b3ff2;
  --peach: #ffc0a8;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 240, 122, 0.88), transparent 16rem),
    radial-gradient(circle at 88% 14%, rgba(157, 247, 211, 0.72), transparent 17rem),
    linear-gradient(135deg, #ffadd9 0%, #ffd6ea 38%, #bdefff 72%, #fff3a2 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "VT323", "Courier New", monospace;
  letter-spacing: 0;
  overflow-x: hidden;
}

button {
  font: inherit;
}

.is-hidden {
  display: none !important;
}

.pixel-sky span,
.pixel-sky span::before,
.pixel-sky span::after {
  position: fixed;
  z-index: 0;
  width: 10px;
  height: 10px;
  background: #fff8fc;
  box-shadow: 10px 0 #fff8fc, -10px 0 #fff8fc, 0 10px #fff8fc, 0 -10px #fff8fc;
  animation: twinkle 2.8s steps(2, end) infinite;
  animation-delay: var(--d);
  image-rendering: pixelated;
}

.pixel-sky span {
  left: var(--x);
  top: var(--y);
}

.pixel-sky span::before,
.pixel-sky span::after {
  content: "";
  transform: scale(0.55);
}

.pixel-sky span::before {
  left: 54px;
  top: 30px;
}

.pixel-sky span::after {
  left: -42px;
  top: 62px;
}

main {
  position: relative;
  z-index: 1;
}

.slot-gate,
.arcade-room {
  min-height: 100vh;
  padding: clamp(16px, 3vw, 42px);
}

.slot-gate {
  display: grid;
  place-items: center;
}

.slot-machine {
  width: min(760px, 100%);
  border: 7px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 2px, transparent 2px 22px),
    linear-gradient(#ff7ccb, #ff4fb2 46%, #df348f);
  box-shadow: 0 18px 0 var(--shadow), 0 30px 58px rgba(50, 19, 39, 0.3);
}

.slot-top {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-bottom: 7px solid var(--ink);
  background: var(--lemon);
}

.slot-top h1,
.room-header h1 {
  margin: 0;
  font-family: "Press Start 2P", "Courier New", monospace;
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.slot-top h1 {
  text-align: center;
  font-size: clamp(1.1rem, 4vw, 2.5rem);
  color: var(--hot);
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 var(--blue);
}

.slot-light {
  width: 24px;
  height: 24px;
  border: 4px solid var(--ink);
  background: var(--mint);
  box-shadow: 0 0 0 4px #fff;
  animation: blink 1.1s steps(2, end) infinite;
}

.slot-screen {
  margin: clamp(16px, 4vw, 34px);
  padding: clamp(16px, 4vw, 32px);
  border: 7px solid var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(0deg, #ffd3ef 0 14px, #ffeaf7 14px 28px);
  text-align: center;
  box-shadow: inset 0 0 0 5px rgba(123, 63, 242, 0.18);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--violet);
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.68rem;
  line-height: 1.7;
  text-transform: uppercase;
}

.reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 16px);
  margin: 18px auto;
  max-width: 560px;
}

.reel {
  display: grid;
  place-items: center;
  min-height: clamp(100px, 20vw, 150px);
  border: 6px solid var(--ink);
  background: #fff8fc;
  color: var(--hot);
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(1.55rem, 8vw, 4.4rem);
  box-shadow: 0 8px 0 rgba(50, 19, 39, 0.9);
}

.reel.is-spinning {
  transform: translateY(3px);
  filter: saturate(1.35);
}

.slot-message,
.arcade-dialog p,
.arcade-dialog li {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  line-height: 1.08;
}

.big-button,
.icon-button,
.close-button,
.dialog-actions button,
.reward-tile,
.station {
  border: 4px solid var(--ink);
  color: var(--ink);
  background: var(--lemon);
  box-shadow: 0 6px 0 var(--shadow);
  cursor: pointer;
}

.big-button {
  min-height: 56px;
  padding: 12px 20px;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(0.72rem, 2.2vw, 1rem);
  text-transform: uppercase;
}

.big-button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.slot-base {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
  border-top: 7px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 22px),
    #ff91d2;
}

.slot-base p {
  margin: 0;
  justify-self: center;
  min-width: min(230px, 100%);
  padding: 10px 12px;
  border: 4px solid var(--ink);
  background: rgba(255, 248, 252, 0.94);
  box-shadow: 5px 5px 0 var(--shadow);
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.05;
}

.slot-base p span,
.slot-base p strong {
  display: block;
}

.slot-base p span {
  color: var(--violet);
}

.slot-base p strong {
  margin-top: 4px;
  color: var(--hot);
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.7rem;
}

.coin-slot {
  height: 42px;
  border: 5px solid var(--ink);
  background: linear-gradient(var(--shadow), var(--shadow)) center / 56px 10px no-repeat, #fff8fc;
}

.lever {
  justify-self: end;
  width: 36px;
  height: 72px;
  border: 5px solid var(--ink);
  background: var(--violet);
  position: relative;
}

.lever::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -28px;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border: 5px solid var(--ink);
  background: var(--hot);
}

.room-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto 16px;
}

.room-header h1 {
  font-size: clamp(1.25rem, 4vw, 3rem);
  color: var(--hot);
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 var(--mint);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 5px solid var(--ink);
  background: #2d1230;
  color: #fff8fc;
  box-shadow: 0 7px 0 var(--shadow);
}

.status-bar div {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 1.25rem;
}

.status-bar span {
  color: var(--mint);
}

.status-bar strong {
  color: var(--lemon);
  font-weight: 400;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.room-stage {
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-top: 42px;
}

.room-viewport {
  width: 100%;
  overflow: hidden;
  border: 7px solid var(--ink);
  box-shadow: 0 16px 0 var(--shadow), 0 28px 48px rgba(50, 19, 39, 0.28);
  scroll-behavior: smooth;
}

.room-nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 58px;
  height: 74px;
  transform: translateY(-50%);
  border: 5px solid var(--ink);
  background: var(--lemon);
  color: var(--violet);
  box-shadow: 0 7px 0 var(--shadow);
  cursor: pointer;
  font-size: 1.55rem;
}

.room-nav-left {
  left: -72px;
}

.room-nav-right {
  right: -72px;
}

.room-nav:active {
  transform: translateY(calc(-50% + 5px));
  box-shadow: 0 2px 0 var(--shadow);
}

.room-floor {
  position: relative;
  width: 2200px;
  height: 680px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.25), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.32) 0 2px, transparent 2px 34px),
    linear-gradient(#ffbee1 0 40%, #9df7d3 40% 43%, #7b3ff2 43% 100%);
}

.room-floor::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -16px;
  height: 48%;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.2) 75%) 0 0 / 58px 58px,
    linear-gradient(45deg, transparent 25%, rgba(255, 240, 122, 0.45) 25% 75%, transparent 75%) 29px 29px / 58px 58px;
  transform: perspective(420px) rotateX(54deg);
  transform-origin: bottom;
}

.wall-sign {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 5px solid var(--ink);
  background: var(--cream);
  box-shadow: 7px 7px 0 rgba(50, 19, 39, 0.9);
}

.wall-sign p,
.wall-sign span {
  margin: 0;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(0.75rem, 2vw, 1.1rem);
}

.wall-sign span {
  color: var(--hot);
}

.station {
  position: absolute;
  z-index: 3;
  width: clamp(122px, 16vw, 174px);
  min-height: clamp(150px, 20vw, 208px);
  padding: 10px;
  background: #fff8fc;
  text-align: center;
  transition: transform 140ms steps(2, end), filter 140ms;
}

.station:hover,
.station:focus-visible {
  transform: translateY(-8px);
  filter: saturate(1.18);
}

.station.completed {
  background: var(--mint);
}

.station.locked {
  filter: grayscale(0.55);
}

.station strong,
.station small {
  display: block;
}

.station strong {
  margin-top: 8px;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(0.58rem, 1.5vw, 0.74rem);
  line-height: 1.45;
}

.station small {
  margin-top: 6px;
  font-size: 1.1rem;
  color: var(--violet);
}

.cabinet-art {
  position: relative;
  display: block;
  height: 82px;
  border: 4px solid var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(90deg, #ffd3ef 0 16px, #fff0aa 16px 32px);
  image-rendering: pixelated;
  overflow: hidden;
}

.cabinet-art::before {
  content: attr(data-mark);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--hot);
  text-shadow: 3px 3px 0 #fff, 5px 5px 0 var(--blue);
}

.cabinet-art::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 8px;
  height: 5px;
  background: var(--ink);
  box-shadow: 0 -48px 0 rgba(255, 255, 255, 0.44);
}

.heart-art {
  background:
    radial-gradient(circle at 26% 34%, rgba(255, 47, 147, 0.22) 0 14px, transparent 15px),
    radial-gradient(circle at 74% 34%, rgba(255, 47, 147, 0.22) 0 14px, transparent 15px),
    #ffe4f5;
}

.letter-art {
  background:
    linear-gradient(32deg, transparent 46%, rgba(50, 19, 39, 0.28) 47% 52%, transparent 53%),
    linear-gradient(-32deg, transparent 46%, rgba(50, 19, 39, 0.28) 47% 52%, transparent 53%),
    #fff0aa;
}

.coupon-art {
  background:
    radial-gradient(circle at 18% 50%, #fff8fc 0 9px, transparent 10px),
    radial-gradient(circle at 82% 50%, #fff8fc 0 9px, transparent 10px),
    repeating-linear-gradient(90deg, #fff0aa 0 18px, #ffcfec 18px 36px);
}

.stitch-art {
  background:
    radial-gradient(circle at 28% 36%, #6bc6ff 0 18px, transparent 19px),
    radial-gradient(circle at 72% 36%, #6bc6ff 0 18px, transparent 19px),
    radial-gradient(circle at 50% 50%, #6bc6ff 0 30px, transparent 31px),
    #eaf8ff;
}

.stitch-art::before {
  color: #1689e8;
  text-shadow: 3px 3px 0 #fff, 5px 5px 0 #bdefff;
}

.memory-art {
  background:
    linear-gradient(var(--ink), var(--ink)) 18% 72% / 64% 5px no-repeat,
    radial-gradient(circle at 26% 34%, var(--hot) 0 9px, transparent 10px),
    radial-gradient(circle at 50% 28%, var(--mint) 0 9px, transparent 10px),
    radial-gradient(circle at 72% 44%, var(--lemon) 0 9px, transparent 10px),
    radial-gradient(circle at 44% 56%, var(--violet) 0 9px, transparent 10px),
    #fff8fc;
}

.whack-art {
  background:
    radial-gradient(circle at 22% 38%, #321327 0 13px, transparent 14px),
    radial-gradient(circle at 52% 58%, #321327 0 13px, transparent 14px),
    radial-gradient(circle at 78% 34%, #321327 0 13px, transparent 14px),
    #fff0aa;
}

.whack-art::before {
  font-size: 1.8rem;
}

.photo-art {
  background:
    linear-gradient(var(--ink), var(--ink)) 16% 18% / 68% 7px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 26% 34% / 48% 32% no-repeat,
    linear-gradient(#fff8fc, #fff8fc) 34% 42% / 32% 15% no-repeat,
    #ffd3ef;
}

.trophy-art {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 240, 122, 0.92) 0 24px, transparent 25px),
    linear-gradient(var(--ink), var(--ink)) 44% 64% / 12% 16% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 34% 78% / 32% 6px no-repeat,
    #fff8fc;
}

.trophy-art::before {
  color: var(--lemon);
  text-shadow: 3px 3px 0 var(--ink), 5px 5px 0 var(--hot);
}

.station-heart {
  left: 120px;
  top: 218px;
}

.station-mail {
  left: 390px;
  top: 145px;
}

.station-coupon {
  left: 690px;
  top: 226px;
}

.station-plush {
  left: 980px;
  top: 145px;
}

.station-whack {
  left: 1260px;
  top: 246px;
}

.station-photo {
  left: 1530px;
  top: 150px;
}

.station-memory {
  left: 1700px;
  top: 382px;
}

.station-final {
  left: 1940px;
  top: 236px;
}

.room-player {
  position: absolute;
  left: calc(var(--room-player-x, 170) * 1px);
  bottom: 128px;
  z-index: 4;
  width: 58px;
  height: 72px;
  transform: translateX(-50%);
  background:
    linear-gradient(var(--ink), var(--ink)) 15px 0 / 28px 7px no-repeat,
    linear-gradient(var(--peach), var(--peach)) 12px 8px / 34px 28px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 21px 20px / 5px 5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 34px 20px / 5px 5px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 10px 38px / 38px 28px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 15px 66px / 10px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 35px 66px / 10px 6px no-repeat;
  image-rendering: pixelated;
  transition: left 220ms steps(5, end);
}

.bow {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 24px;
  height: 18px;
  background:
    linear-gradient(var(--hot), var(--hot)) 0 3px / 10px 12px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 14px 3px / 10px 12px no-repeat,
    linear-gradient(var(--lemon), var(--lemon)) 10px 6px / 4px 7px no-repeat;
}

.arcade-dialog {
  width: min(650px, calc(100% - 28px));
  max-height: min(720px, calc(100vh - 28px));
  overflow: auto;
  border: 7px solid var(--ink);
  background: #fff8fc;
  color: var(--ink);
  box-shadow: 12px 12px 0 rgba(50, 19, 39, 0.9);
  padding: clamp(18px, 4vw, 28px);
}

.arcade-dialog::backdrop {
  background: rgba(50, 19, 39, 0.58);
}

.arcade-dialog h2 {
  margin: 0;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(0.92rem, 3vw, 1.35rem);
  line-height: 1.45;
}

.close-button {
  float: right;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.35rem;
}

.reward-list,
.coupon-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.reward-tile {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff0aa;
  text-align: left;
  font-size: 1.35rem;
}

.reward-tile strong {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
}

.coupon {
  border: 4px dashed var(--hot);
  background: #fff0aa;
  padding: 12px;
}

.coupon span {
  color: var(--violet);
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.68rem;
}

.coupon p {
  margin: 8px 0 0;
}

.coupon strong {
  display: block;
  margin-top: 8px;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
}

.coupon button {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 4px solid var(--ink);
  background: var(--mint);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--shadow);
  cursor: pointer;
  text-transform: uppercase;
}

.coupon button:disabled,
.coupon.is-redeemed {
  filter: saturate(0.65);
}

.plush-prize {
  width: 160px;
  height: 130px;
  margin: 18px auto;
  border: 5px solid var(--ink);
  background:
    linear-gradient(#6bc6ff, #6bc6ff) 10% 12% / 28% 44% no-repeat,
    linear-gradient(#6bc6ff, #6bc6ff) 62% 12% / 28% 44% no-repeat,
    linear-gradient(#6bc6ff, #6bc6ff) 26% 28% / 48% 54% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 39% 47% / 7% 8% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 55% 47% / 7% 8% no-repeat,
    linear-gradient(#bdefff, #bdefff) 42% 58% / 18% 10% no-repeat,
    #eaf8ff;
  image-rendering: pixelated;
}

.claw-game {
  position: relative;
  height: 300px;
  margin-top: 16px;
  overflow: hidden;
  border: 5px solid var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.28), transparent 40%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.34) 0 3px, transparent 3px 34px),
    #dff8ff;
}

.claw-game::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  border-top: 4px solid var(--ink);
  background: repeating-linear-gradient(90deg, #ffcfec 0 28px, #fff0aa 28px 56px);
}

.claw-rail {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 28px;
  height: 16px;
  border: 4px solid var(--ink);
  background: var(--violet);
}

.claw {
  position: absolute;
  left: calc(var(--claw-x, 50) * 1%);
  top: 24px;
  z-index: 4;
  width: 58px;
  height: 92px;
  transform: translateX(calc(-50% + var(--claw-wiggle, 0%)));
  transition: left 120ms steps(2, end);
}

.claw::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 8px;
  height: 54px;
  transform: translateX(-50%);
  background: var(--ink);
}

.claw span {
  position: absolute;
  left: 50%;
  top: 62px;
  width: 42px;
  height: 26px;
  transform: translateX(-50%);
  border: 5px solid var(--ink);
  border-top: 0;
  background:
    linear-gradient(var(--ink), var(--ink)) 4px 16px / 8px 22px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 24px 16px / 8px 22px no-repeat,
    var(--lemon);
}

.claw.is-dropping {
  transform: translateX(calc(-50% + var(--drop-drift, 0%)));
  animation: clawDrop 760ms steps(8, end) forwards;
}

.claw-item {
  position: absolute;
  left: calc(var(--item-x, 62) * 1%);
  bottom: 76px;
  z-index: 3;
  width: 72px;
  height: 62px;
  transform: translateX(-50%);
  image-rendering: pixelated;
}

.target-stitch {
  background:
    linear-gradient(#6bc6ff, #6bc6ff) 7% 8% / 28% 43% no-repeat,
    linear-gradient(#6bc6ff, #6bc6ff) 65% 8% / 28% 43% no-repeat,
    linear-gradient(#6bc6ff, #6bc6ff) 26% 25% / 48% 58% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 40% 44% / 7% 8% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 56% 44% / 7% 8% no-repeat,
    linear-gradient(#bdefff, #bdefff) 42% 58% / 18% 10% no-repeat;
}

.decoy-star {
  background:
    linear-gradient(var(--lemon), var(--lemon)) 42% 0 / 18% 22% no-repeat,
    linear-gradient(var(--lemon), var(--lemon)) 18% 24% / 64% 18% no-repeat,
    linear-gradient(var(--lemon), var(--lemon)) 30% 42% / 40% 20% no-repeat,
    linear-gradient(var(--lemon), var(--lemon)) 22% 62% / 20% 24% no-repeat,
    linear-gradient(var(--lemon), var(--lemon)) 58% 62% / 20% 24% no-repeat;
}

.decoy-candy {
  background:
    linear-gradient(var(--hot), var(--hot)) 28% 26% / 46% 46% no-repeat,
    linear-gradient(#fff8fc, #fff8fc) 38% 30% / 12% 38% no-repeat,
    linear-gradient(#fff8fc, #fff8fc) 56% 30% / 12% 38% no-repeat,
    linear-gradient(var(--mint), var(--mint)) 8% 38% / 20% 20% no-repeat,
    linear-gradient(var(--mint), var(--mint)) 74% 38% / 20% 20% no-repeat;
}

.decoy-bow {
  background:
    linear-gradient(var(--pink), var(--pink)) 4% 20% / 38% 54% no-repeat,
    linear-gradient(var(--pink), var(--pink)) 58% 20% / 38% 54% no-repeat,
    linear-gradient(var(--lemon), var(--lemon)) 42% 34% / 16% 26% no-repeat;
}

.claw-item.is-grabbed {
  animation: itemShake 180ms steps(2, end) infinite;
}

.claw-item.is-caught {
  animation: plushCaught 900ms steps(8, end) forwards;
}

.hold-meter {
  height: 24px;
  margin-top: 12px;
  border: 4px solid var(--ink);
  background: #fff8fc;
  box-shadow: inset 0 0 0 4px rgba(50, 19, 39, 0.12);
}

.hold-meter span {
  display: block;
  width: var(--hold-power, 0%);
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--hot) 0 18px, var(--lemon) 18px 36px);
  transition: width 80ms steps(3, end);
}

.prize-chute {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  width: 112px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 4px solid var(--ink);
  background: #fff8fc;
  color: var(--violet);
  font-size: 1.25rem;
  text-transform: uppercase;
}

.game-hint {
  min-height: 1.2em;
}

.memory-list {
  padding-left: 22px;
}

.whack-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 5px solid var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.3), transparent),
    repeating-linear-gradient(90deg, #ffcfec 0 26px, #fff0aa 26px 52px);
}

.heart-hole {
  position: relative;
  aspect-ratio: 1;
  min-height: 74px;
  border: 4px solid var(--ink);
  background:
    radial-gradient(circle at 50% 62%, #321327 0 26%, transparent 27%),
    #e7fff6;
  box-shadow: inset 0 -8px 0 rgba(50, 19, 39, 0.18), 0 5px 0 var(--shadow);
  cursor: pointer;
}

.heart-hole::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%) scale(0);
  background:
    linear-gradient(var(--hot), var(--hot)) 10px 0 / 10px 10px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 22px 0 / 10px 10px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 0 10px / 42px 10px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 5px 20px / 32px 10px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 16px 30px / 10px 10px no-repeat;
  image-rendering: pixelated;
}

.heart-hole.is-up::before {
  transform: translate(-50%, -58%) scale(1);
}

.heart-hole.is-bonked {
  background:
    radial-gradient(circle at 50% 62%, #321327 0 26%, transparent 27%),
    #fff0aa;
}

.whack-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 1.35rem;
}

.single-action {
  grid-template-columns: 1fr;
}

.photo-booth {
  margin-top: 16px;
}

.photo-preview {
  position: relative;
  overflow: hidden;
  border: 5px solid var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.24), transparent),
    #ffd3ef;
  aspect-ratio: 3 / 4;
}

.photo-preview video,
.photo-preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview video {
  transform: scaleX(-1);
  background: #321327;
}

.photo-preview canvas {
  display: none;
}

.photo-preview canvas.has-photo {
  display: block;
}

.photo-frame {
  position: absolute;
  inset: 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  pointer-events: none;
  border: 6px solid var(--ink);
  box-shadow: inset 0 0 0 8px var(--pink);
}

.photo-frame span,
.photo-frame strong,
.photo-frame small {
  margin: 10px;
  padding: 8px;
  border: 4px solid var(--ink);
  background: rgba(255, 248, 252, 0.92);
  text-align: center;
  font-family: "Press Start 2P", "Courier New", monospace;
  line-height: 1.55;
}

.photo-frame span {
  color: var(--hot);
  font-size: clamp(0.58rem, 2vw, 0.9rem);
}

.photo-frame strong {
  align-self: end;
  color: var(--violet);
  font-size: clamp(0.58rem, 2vw, 0.95rem);
}

.photo-frame small {
  color: var(--ink);
  font-size: clamp(0.48rem, 1.7vw, 0.7rem);
}

.photo-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-game {
  position: relative;
  height: 270px;
  margin-top: 16px;
  overflow: hidden;
  border: 5px solid var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.3), transparent),
    repeating-linear-gradient(90deg, rgba(123, 63, 242, 0.16) 0 18px, transparent 18px 36px),
    #ffd8ef;
}

.mini-game::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  border-top: 4px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--mint) 0 18px, #75e8c1 18px 36px);
}

.mini-score {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  padding: 4px 8px;
  border: 3px solid var(--ink);
  background: #fff8fc;
  font-size: 1.2rem;
}

.mini-player {
  position: absolute;
  bottom: 30px;
  left: calc(var(--player-x, 50) * 1%);
  z-index: 2;
  width: 42px;
  height: 34px;
  transform: translateX(-50%);
  background:
    linear-gradient(var(--ink), var(--ink)) 9px 0 / 24px 5px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 5px 5px / 32px 20px no-repeat,
    linear-gradient(#fff, #fff) 12px 10px / 6px 6px no-repeat,
    linear-gradient(#fff, #fff) 24px 10px / 6px 6px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 14px 22px / 14px 4px no-repeat;
}

.mini-heart {
  position: absolute;
  left: calc(var(--heart-x, 40) * 1%);
  top: calc(var(--heart-y, -10) * 1%);
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(var(--hot), var(--hot)) 8px 0 / 8px 8px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 16px 0 / 8px 8px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 0 8px / 32px 8px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 4px 16px / 24px 8px no-repeat,
    linear-gradient(var(--hot), var(--hot)) 12px 24px / 8px 8px no-repeat;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 74px 1fr 74px;
  gap: 10px;
  margin-top: 12px;
}

.dialog-actions button {
  min-height: 44px;
  padding: 8px 12px;
  background: var(--lemon);
  text-transform: uppercase;
}

#confetti {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

@keyframes blink {
  50% {
    filter: brightness(1.45);
  }
}

@keyframes twinkle {
  50% {
    opacity: 0.38;
    transform: translateY(5px);
  }
}

@keyframes clawDrop {
  0%,
  100% {
    top: 24px;
  }

  55%,
  72% {
    top: 142px;
  }
}

@keyframes plushCaught {
  0% {
    bottom: 76px;
  }

  60% {
    bottom: 180px;
  }

  100% {
    left: calc(100% - 70px);
    bottom: 16px;
  }
}

@keyframes itemShake {
  50% {
    transform: translateX(calc(-50% + 6px)) rotate(3deg);
  }
}

@media (max-width: 860px) {
  .arcade-room {
    padding: 10px;
  }

  .room-header {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .room-header h1 {
    font-size: clamp(1.05rem, 7vw, 1.85rem);
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 var(--mint);
  }

  .room-stage {
    padding-top: 50px;
  }

  .status-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 44px;
    align-items: center;
    width: 100%;
    gap: 8px;
    padding: 8px;
  }

  .status-bar div {
    display: grid;
    gap: 2px;
    font-size: 1.05rem;
  }

  .status-bar .icon-button {
    justify-self: end;
  }

  .room-floor {
    height: 560px;
    min-height: 0;
  }

  .wall-sign {
    width: min(420px, calc(100% - 68px));
    justify-content: center;
    gap: 9px;
    padding: 9px 10px;
  }

  .wall-sign p,
  .wall-sign span {
    font-size: clamp(0.56rem, 2.8vw, 0.82rem);
  }

  .station {
    width: 150px;
    min-height: 174px;
  }

  .station-heart {
    left: 120px;
    top: 166px;
  }

  .station-mail {
    right: auto;
    left: 390px;
    top: 118px;
  }

  .station-coupon {
    left: 690px;
    right: auto;
    top: 174px;
  }

  .station-plush {
    right: auto;
    left: 980px;
    top: 118px;
  }

  .station-whack {
    left: 1260px;
    top: 190px;
  }

  .station-photo {
    right: auto;
    left: 1530px;
    top: 120px;
    bottom: auto;
  }

  .station-memory {
    left: 1700px;
    top: 314px;
    bottom: auto;
  }

  .station-final {
    right: auto;
    left: 1940px;
    top: 184px;
    bottom: auto;
  }

  .room-player {
    bottom: 92px;
  }
}

@media (max-width: 540px) {
  .slot-base,
  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .slot-gate {
    padding: 14px;
    align-items: start;
  }

  .slot-top {
    grid-template-columns: 24px 1fr 24px;
    padding: 12px;
  }

  .slot-light {
    width: 18px;
    height: 18px;
  }

  .slot-top h1 {
    font-size: clamp(0.72rem, 5vw, 1rem);
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 var(--blue);
  }

  .slot-screen {
    margin: 10px;
    padding: 12px;
    border-width: 5px;
  }

  .reels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .reel {
    min-height: 78px;
    border-width: 4px;
    font-size: clamp(1rem, 8vw, 1.55rem);
  }

  .slot-message {
    font-size: 1.18rem;
  }

  .big-button {
    min-height: 48px;
    font-size: 0.68rem;
  }

  .slot-base {
    min-height: 80px;
    padding: 12px;
  }

  .slot-base p {
    min-width: 0;
    width: 100%;
  }

  .lever,
  .coin-slot {
    justify-self: center;
  }

  .room-floor {
    height: 560px;
    min-height: 0;
  }

  .room-nav {
    width: 48px;
    height: 58px;
  }

  .room-nav-left {
    left: -2px;
  }

  .room-nav-right {
    right: -2px;
  }

  .room-nav {
    opacity: 0.9;
  }

  .room-viewport {
    border-width: 5px;
  }

  .station {
    left: auto !important;
    right: auto !important;
    width: 160px;
    min-height: 174px;
    transform: none;
  }

  .station:hover,
  .station:focus-visible {
    transform: translateY(-8px);
  }

  .station-heart {
    left: 120px !important;
    top: 166px;
  }

  .station-mail {
    left: 390px !important;
    top: 118px;
  }

  .station-coupon {
    left: 690px !important;
    top: 174px;
  }

  .station-plush {
    left: 980px !important;
    top: 118px;
  }

  .station-whack {
    left: 1260px !important;
    top: 190px;
  }

  .station-photo {
    left: 1530px !important;
    top: 120px;
    bottom: auto;
  }

  .station-memory {
    left: 1700px !important;
    top: 314px;
    bottom: auto;
  }

  .station-final {
    left: 1940px !important;
    top: 184px;
    bottom: auto;
  }

  .room-player {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
