/* AI Arcade — page shell + cabinet grid + shared game UI */
.page-arcade { background: #fff; }
.page-arcade .adc-share { display: none !important; }

.arcade-wrap {
  position: relative;
  overflow: hidden;
  color: #0b1220;
  padding-bottom: clamp(48px, 7vw, 96px);
  background: #fff;
}
.arcade-wrap::before { display: none; }
.arcade-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(8px, 2vw, 20px) clamp(16px, 4vw, 32px) 0;
  position: relative;
  z-index: 1;
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
  margin-top: clamp(8px, 2vw, 18px);
}
.cab {
  position: relative;
  border-radius: 18px;
  padding: 20px 18px 18px;
  background: #fff;
  border: 1px solid #e6e6ef;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.cab--live { cursor: pointer; }
.cab--live:hover {
  transform: translateY(-4px);
  border-color: #cfd5e0;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .14);
}
.cab-screen {
  height: 108px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  position: relative;
  overflow: hidden;
}
.cab-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(15, 23, 42, .04) 0 2px, transparent 2px 4px);
  pointer-events: none;
}
.cab-name { font-size: 18px; font-weight: 800; color: #0b1220; margin: 14px 0 4px; }
.cab-desc { font-size: 13px; line-height: 1.48; color: #44506a; min-height: 56px; }
.cab-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.cab-btn--play {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 4px 14px rgba(29, 78, 216, .28);
}
.cab-btn--play:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cab-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 1;
  background: #16a34a;
  color: #fff;
}

/* ── Shared game chrome ── */
.arcade-game { display: none; max-width: 720px; margin: clamp(12px, 2vw, 24px) auto 0; }
.arcade-game.is-on { display: block; }
.ag-back {
  background: none;
  border: none;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 14px;
  font-family: inherit;
  padding: 0;
}
.ag-back:hover { color: #1d4ed8; }
.ag-hud {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ag-hud .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #677085;
}
.ag-hud .val { font-size: 22px; font-weight: 900; color: #0b1220; line-height: 1; margin-top: 3px; }
.ag-lives { font-size: 18px; letter-spacing: 2px; margin-top: 3px; }
.ag-timerbar { height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-bottom: 16px; }
.ag-timerbar > i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #2563eb, #e0218a); transition: width .06s linear; }
.ag-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: clamp(24px, 4vw, 38px) 24px;
  text-align: center;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.ag-statement { font-size: clamp(18px, 2.8vw, 24px); font-weight: 700; line-height: 1.4; color: #0b1220; }
.ag-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.ag-actions--triple { grid-template-columns: 1fr; }
.ag-btn {
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  transition: transform .1s ease, filter .1s ease;
  text-align: left;
}
.ag-btn:hover { filter: brightness(1.06); }
.ag-btn:active { transform: scale(.97); }
.ag-btn:disabled { opacity: .55; cursor: default; }
.ag-btn--hype { background: linear-gradient(120deg, #ff2d9a, #f59e0b); color: #fff; text-align: center; }
.ag-btn--real { background: linear-gradient(120deg, #06b6d4, #16a34a); color: #fff; text-align: center; }
.ag-btn--ghost { background: #f1f5f9; color: #0b1220; border: 1px solid #e2e8f0; }
.ag-btn--pick { background: #fff; border: 2px solid #e2e8f0; color: #0b1220; font-size: 14px; font-weight: 700; line-height: 1.45; padding: 14px 16px; }
.ag-btn--pick:hover { border-color: #3b82f6; }
.ag-btn--pick.is-correct { border-color: #16a34a; background: #f0fdf4; }
.ag-btn--pick.is-wrong { border-color: #dc2626; background: #fef2f2; }
.ag-feedback { margin-top: 14px; min-height: 52px; text-align: center; font-size: 14px; line-height: 1.5; }
.ag-feedback .verdict { font-weight: 900; font-size: 16px; display: block; margin-bottom: 3px; }
.ag-feedback .verdict.ok { color: #16a34a; }
.ag-feedback .verdict.no { color: #dc2626; }
.ag-feedback .why { color: #51607a; }
.ag-over {
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: clamp(28px, 4vw, 42px) 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.ag-over .tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #2563eb; }
.ag-over .big {
  font-size: clamp(44px, 9vw, 62px);
  font-weight: 900;
  background: linear-gradient(120deg, #ff2d9a, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin: 8px 0 2px;
}
.ag-over h3 { font-size: 19px; font-weight: 800; color: #0b1220; margin: 4px 0 0; }
.ag-over .sub { color: #51607a; font-size: 14px; margin-top: 8px; }
.ag-over .hi { color: #2563eb; font-family: var(--font-mono); font-size: 13px; margin-top: 10px; }
.ag-over-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* Token Snake */
.ag-snake-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.ag-snake-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; font-family: var(--font-mono); font-size: 12px; color: #51607a; }
.ag-snake-meta b { color: #0b1220; }
#snake-canvas { display: block; width: 100%; max-width: 400px; margin: 0 auto; border-radius: 12px; background: #0b1220; touch-action: none; }
.ag-snake-hint { text-align: center; font-size: 12px; color: #677085; margin-top: 10px; }

/* Model Match */
.ag-match-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 520px) { .ag-match-grid { grid-template-columns: repeat(3, 1fr); } }
.ag-match-card {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  transition: transform .12s, border-color .12s;
  user-select: none;
}
.ag-match-card.is-flipped,
.ag-match-card.is-matched { background: #fff; color: #0b1220; border-color: #cbd5e1; font-size: 11px; }
.ag-match-card.is-matched { border-color: #16a34a; background: #f0fdf4; opacity: .85; }
.ag-match-card:not(.is-flipped):not(.is-matched) .ag-match-label { display: none; }
.ag-match-card:not(.is-flipped):not(.is-matched) { font-size: 28px; }
.ag-match-card:not(.is-flipped):not(.is-matched)::after { content: "?"; }

/* Claude Whack */
.ag-whack-panel {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
.ag-whack-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}
@media (max-width: 520px) {
  .ag-whack-board { grid-template-columns: repeat(3, 1fr); max-width: 340px; }
}
.ag-whack-hole {
  aspect-ratio: 1.05;
  background: #e2e8f0;
  border-radius: 50% 50% 44% 44%;
  position: relative;
  overflow: hidden;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ag-whack-hole::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, #f8fafc, #94a3b8 85%);
}
.ag-whack-mole {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -110%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: bottom .14s ease-out;
  z-index: 1;
  pointer-events: none;
}
.ag-whack-mole.is-up { bottom: 6%; }
.ag-whack-mole.is-whacked {
  transform: scale(0.6);
  opacity: 0;
  transition: transform .12s ease, opacity .12s ease;
}
.ag-claude-face {
  width: 78%;
  max-width: 72px;
  height: auto;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, .22));
  user-select: none;
  -webkit-user-drag: none;
}
.ag-whack-cursor-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.ag-whack-cursor-meter-wrap { flex: 1 1 160px; min-width: 140px; }
.ag-whack-cursor-meter-wrap .lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #677085;
  margin-bottom: 6px;
}
.ag-whack-cursor-meter {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.ag-whack-cursor-meter > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1a1a1a, #2563eb);
  transition: width .2s ease;
}
.ag-whack-cursor-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 800;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  background: #1a1a1a;
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .2);
  transition: transform .12s, opacity .12s, filter .12s;
}
.ag-whack-cursor-btn:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
.ag-whack-cursor-btn:disabled { opacity: .45; cursor: default; }
.ag-whack-cursor-btn-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: #141414;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.ag-whack-cursor-btn-icon::after {
  content: "";
  position: absolute;
  left: 5px; top: 4px;
  border: 6px solid transparent;
  border-left-color: #fff;
  border-right-width: 0;
}
.ag-whack-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-radius: 18px;
  overflow: hidden;
}
.ag-whack-burst.is-on { background: rgba(255,255,255,.72); }
.ag-whack-cursor-clone {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #141414;
  box-shadow: 0 8px 20px rgba(15,23,42,.35);
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  animation: whack-cursor-strike .55s ease-out forwards;
}
.ag-whack-cursor-clone::after {
  content: "";
  position: absolute;
  left: 10px; top: 8px;
  border: 10px solid transparent;
  border-left-color: #fff;
  border-right-width: 0;
}
@keyframes whack-cursor-strike {
  0% { transform: translate(-50%, -80%) scale(0.4); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
.ag-whack-hole.is-hit { animation: whack-hole-hit .35s ease; }
@keyframes whack-hole-hit {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(0.92); filter: brightness(1.15); }
}

/* Benchmark Boss */
.ag-bench-versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 16px; }
.ag-bench-card { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px; padding: 16px; text-align: center; }
.ag-bench-card .name { font-weight: 900; font-size: 16px; color: #0b1220; }
.ag-bench-card .bench { font-family: var(--font-mono); font-size: 11px; color: #677085; margin-top: 4px; }
.ag-bench-card .score { font-size: 28px; font-weight: 900; color: #2563eb; margin-top: 8px; }
.ag-bench-card.is-hidden .score { filter: blur(8px); user-select: none; }
.ag-bench-vs { font-weight: 900; color: #94a3b8; font-size: 14px; }
.ag-bench-q { text-align: center; font-weight: 800; font-size: 15px; color: #0b1220; margin-bottom: 12px; }

/* Cursor Chase (Pac-Man) */
.ag-chase-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
#chase-canvas {
  display: block;
  width: 100%;
  max-width: 399px;
  margin: 0 auto;
  border-radius: 12px;
  background: #0b1220;
  touch-action: none;
}
.cab-screen--chase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
}
.cab-chase-icon { width: 36px; height: 36px; border-radius: 8px; position: relative; flex-shrink: 0; }
.cab-chase-icon--cursor { background: #1a1a1a; box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.cab-chase-icon--cursor::after {
  content: "";
  position: absolute;
  left: 9px; top: 8px;
  width: 0; height: 0;
  border: 9px solid transparent;
  border-left-color: #fff;
  border-right-width: 0;
  transform: rotate(-20deg);
}
.cab-chase-icon--claude {
  background: transparent;
  border-radius: 0;
  background-image: url('../brand/claude-mark.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: none;
}
.cab-chase-icon--claude::before { display: none; }
.ag-chase-dpad {
  display: none;
  grid-template-columns: 48px 48px 48px;
  grid-template-rows: 48px 48px;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.ag-chase-dpad button {
  width: 48px; height: 48px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 18px;
  cursor: pointer;
  color: #0b1220;
}
.ag-chase-dpad button:nth-child(1) { grid-column: 2; }
.ag-chase-dpad button:nth-child(2) { grid-column: 1; grid-row: 2; }
.ag-chase-dpad button:nth-child(3) { grid-column: 3; grid-row: 2; }
.ag-chase-dpad button:nth-child(4) { grid-column: 2; grid-row: 2; }
@media (max-width: 520px) {
  .ag-chase-dpad { display: grid; }
}
