.arcade-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 8%, rgba(197, 155, 91, 0.2), transparent 28rem),
    #082d23;
  color: #f8f3e9;
}

.arcade-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.arcade-body .brand__text strong,
.arcade-body .brand__text small { color: #fff; }

.arcade-home {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding: 0.35rem 0;
}

.arcade-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 90px;
}

.arcade-intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}

.arcade-intro h1 {
  margin: 10px 0 0;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.arcade-intro h1 em { color: #d6a85f; font-weight: 400; }
.arcade-intro > p { max-width: 35rem; color: rgba(255,255,255,.72); font-size: 1.05rem; line-height: 1.7; }

.game-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.game-choice {
  appearance: none;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 4px;
  background: rgba(255,255,255,.05);
  color: #fff;
  padding: 22px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.game-choice:hover { transform: translateY(-2px); border-color: rgba(214,168,95,.65); }
.game-choice.is-active { background: #d6a85f; color: #082d23; border-color: #d6a85f; }
.game-choice span { font-size: .75rem; font-weight: 800; letter-spacing: .14em; opacity: .72; }
.game-choice strong { font-size: 1.08rem; }
.game-choice small { font-size: .85rem; opacity: .72; }

.arcade-game {
  background: #f5ede0;
  color: #102f27;
  border-radius: 6px;
  padding: clamp(20px, 4vw, 50px);
}

.arcade-game__heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 30px;
}

.arcade-game__heading > div { display: flex; align-items: baseline; gap: 14px; }
.arcade-game__heading span { color: #a66c2e; font-weight: 800; font-size: .8rem; letter-spacing: .12em; }
.arcade-game__heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.arcade-game__heading p { margin: 0; color: #52655f; line-height: 1.6; }

.arcade-game .game__play-area { padding: 0; background: transparent; }
.arcade-game .game__canvas-wrap { border: 1px solid rgba(11,53,41,.18); }

.memory-toolbar,
.reflex-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.memory-toolbar > div,
.reflex-stats > div {
  min-width: 110px;
  padding: 13px 16px;
  background: #e8dcc9;
  display: grid;
  gap: 2px;
}

.memory-toolbar span,
.reflex-stats span { font-size: .68rem; font-weight: 800; letter-spacing: .12em; color: #6f7e79; }
.memory-toolbar strong,
.reflex-stats strong { font-size: 1.2rem; }
.memory-toolbar .button { margin-left: auto; }

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 18px;
}

.memory-card {
  position: relative;
  overflow: hidden;
  appearance: none;
  border: 0;
  aspect-ratio: 1.18;
  min-height: 130px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(214,168,95,.16), transparent 38%),
    #0b3529;
  color: transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.memory-card::before {
  content: "SAN JOSSE";
  color: #d6a85f;
  font: 800 .78rem/1 sans-serif;
  letter-spacing: .14em;
}

.memory-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background-image: url('./assets/coffee-memory-sprites.png');
  background-size: 300% 200%;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity .2s ease, transform .25s ease;
}

.memory-card__face strong {
  color: #fff;
  font-size: .78rem;
  letter-spacing: .02em;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(5, 28, 22, .78);
  text-shadow: 0 1px 8px rgba(0,0,0,.65);
}

.memory-card.is-open,
.memory-card.is-matched { box-shadow: 0 10px 25px rgba(11,53,41,.17), inset 0 0 0 2px #d6a85f; transform: translateY(-2px); }
.memory-card.is-open::before,
.memory-card.is-matched::before { display: none; }
.memory-card.is-open .memory-card__face,
.memory-card.is-matched .memory-card__face { opacity: 1; transform: scale(1); }

.reflex-pad {
  position: relative;
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 5px;
  background: #c8b9a4;
  color: #16382f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  cursor: pointer;
  padding: 30px;
  transition: background .15s ease, color .15s ease;
}

.reflex-pad span { font-size: .75rem; font-weight: 900; letter-spacing: .16em; }
.reflex-pad strong { font-size: clamp(1.5rem, 4vw, 3.2rem); }
.reflex-pad.is-waiting { background: #714234; color: #fff; }
.reflex-pad.is-ready { background: #149c68; color: #fff; }
.reflex-pad.is-early { background: #a94336; color: #fff; }
.reflex-start {
  min-width: 190px;
  margin-top: 26px;
  box-shadow: 0 14px 35px rgba(11,53,41,.22);
}
.reflex-start[hidden] { display: none; }

.wheel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.wheel-stage {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto;
  filter: drop-shadow(0 24px 35px rgba(6, 37, 29, .2));
}

#drink-wheel {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
}

.wheel-pointer {
  position: absolute;
  z-index: 3;
  top: -4px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 42px solid #d6a85f;
  transform: translateX(-50%);
  filter: drop-shadow(0 5px 4px rgba(6, 37, 29, .3));
}

.wheel-spin {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: clamp(96px, 18vw, 138px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 8px solid #f7f0e5;
  border-radius: 50%;
  background: #0b3529;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-content: center;
  gap: 4px;
  box-shadow: 0 12px 30px rgba(6, 37, 29, .3);
  transition: transform .2s ease, background .2s ease;
}

.wheel-spin:hover { transform: translate(-50%, -50%) scale(1.04); background: #154b3c; }
.wheel-spin:disabled { cursor: wait; opacity: .82; }
.wheel-spin span { font-size: .65rem; font-weight: 800; letter-spacing: .16em; }
.wheel-spin strong { font-size: clamp(1rem, 3vw, 1.35rem); }

.wheel-result {
  padding: clamp(24px, 4vw, 42px);
  border-left: 1px solid rgba(11, 53, 41, .18);
}

.wheel-result > p:first-child,
.wheel-result > span {
  color: #7c8b85;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.wheel-result h3 {
  min-height: 2.2em;
  margin: 18px 0;
  color: #0b3529;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: .96;
  letter-spacing: -.055em;
}

.wheel-result > p:not(:first-child) { color: #66756f; line-height: 1.6; }
.wheel-result .button { margin-top: 18px; }
.wheel-result .button[hidden] { display: none; }

.arcade-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.62);
}

.arcade-footer a { color: #fff; }

.game-promo {
  background: #0b3529;
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 90px;
  padding-bottom: 90px;
}

.game-promo h2 { margin: 10px 0 18px; font-size: clamp(2.8rem, 6vw, 5.8rem); line-height: .95; letter-spacing: -.06em; }
.game-promo h2 em { color: #d6a85f; font-weight: 400; }
.game-promo p { color: rgba(255,255,255,.72); }
.game-promo .button { flex: 0 0 auto; }

@media (max-width: 760px) {
  .arcade-header { min-height: 84px; width: min(100% - 28px, 1180px); }
  .arcade-header .brand__text small { display: block; }
  .arcade-shell { width: min(100% - 24px, 1180px); padding: 42px 0 64px; }
  .arcade-intro, .arcade-game__heading { grid-template-columns: 1fr; gap: 18px; }
  .arcade-intro { margin-bottom: 30px; }
  .game-picker { grid-template-columns: 1fr; }
  .game-choice { padding: 16px 18px; grid-template-columns: auto 1fr; align-items: center; }
  .game-choice small { grid-column: 2; }
  .arcade-game { padding: 16px; }
  .arcade-game__heading > div { align-items: center; }
  .memory-toolbar { display: grid; grid-template-columns: repeat(3, 1fr); }
  .memory-toolbar > div { min-width: 0; padding: 10px; }
  .memory-toolbar .button { grid-column: 1 / -1; margin: 0; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .memory-card { min-height: 100px; }
  .reflex-pad { min-height: 240px; }
  .wheel-layout { grid-template-columns: 1fr; }
  .wheel-result { border-left: 0; border-top: 1px solid rgba(11, 53, 41, .18); text-align: center; }
  .wheel-result h3 { min-height: 0; }
  .game-promo { align-items: flex-start; flex-direction: column; padding-top: 64px; padding-bottom: 64px; }
}

@media (max-width: 430px) {
  .arcade-home { font-size: .85rem; }
  .arcade-header .brand__text strong { font-size: .8rem; }
  .arcade-intro h1 { font-size: 3.15rem; }
  .memory-card { min-height: 82px; }
  .memory-card__face { padding: 8px; }
  .memory-card__face strong { font-size: .65rem; }
  .reflex-stats { display: grid; grid-template-columns: 1fr 1fr; }
}
