.gaa-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 300px);
  justify-content: center;
  gap: 24px;
  padding: 8px 0 32px;
}

.gaa-game-card {
  position: relative;
  min-height: 240px;
  background: var(--color-white);
  border: 2px solid var(--color-fg);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--color-fg);
  overflow: hidden;
  color: var(--color-fg);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.gaa-game-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-fg);
}

.gaa-game-card .art {
  flex: 1;
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background: var(--color-purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gaa-game-card .art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 0.4s;
}

.gaa-game-card .art .ad {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Descendants default to pointer-events:auto and would still steal clicks. */
.gaa-game-card .art .ad * {
  pointer-events: none;
}

.gaa-game-card .art.show-ad > img { opacity: 0; }
.gaa-game-card .art.show-ad .ad {
  opacity: 1;
  pointer-events: auto;
}

.gaa-game-card .art.show-ad .ad * {
  pointer-events: auto;
}

.gaa-game-card .meta {
  padding: 12px 14px 14px;
  background: var(--color-white);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gaa-game-card h2 {
  margin: 0;
  flex: 1 1 100%;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: transparent;
}

.gaa-game-card .soon {
  position: static;
  background: transparent;
  display: inline-flex;
  font-size: 11px;
  pointer-events: none;
}

.gaa-xp-card {
  background: var(--color-white);
  border: 2px solid var(--color-fg);
  border-radius: 16px;
  box-shadow: var(--shadow-gold);
  padding: 16px 18px;
  margin: 8px 0 24px;
}

.gaa-xp-card .gaa-label {
  margin: 0 0 8px;
}

.gaa-xp-track {
  height: 14px;
  border: 2px solid var(--color-fg);
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-white);
}

.gaa-xp-fill {
  height: 100%;
  width: 28%;
  background: var(--color-gold);
}

.gaa-xp-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.gaa-xp-meta strong {
  color: var(--color-purple);
  font-weight: 500;
}

.gaa-game-stage {
  position: relative;
  min-height: calc(100vh - var(--nav-height-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 80px;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  body[data-game] .gaa-game-stage {
    min-height: 0;
    height: calc(100dvh - var(--nav-height-bottom));
    max-height: calc(100dvh - var(--nav-height-bottom));
    overflow: hidden;
    overscroll-behavior: none;
    padding-bottom: 16px;
  }

  body[data-game='ad-battle'] .gaa-game-stage {
    min-height: calc(100vh - var(--nav-height-bottom));
    height: auto;
    max-height: none;
    overflow: visible;
    padding-bottom: 80px;
  }

  body[data-game='skip-ads'] .gaa-skip-stage,
  body[data-game='skip-ad-vanced'] .gaa-skip-stage {
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
  }

  body[data-game='ad-counter'] .gaa-counter-stage,
  body[data-game='memory-ads'] .gaa-memory-stage {
    height: auto;
    max-height: none;
  }

  body[data-game='adverse'] .gaa-adverse-stage,
  body[data-game='guess-the-ad'] .gaa-guess-stage,
  body[data-game='guess-the-ad-2'] .gaa-game-stage,
  body[data-game='club-ads'] .gaa-club-stage {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body[data-game='minesweeper-ads'] .gaa-ms-board {
    flex: 1 1 auto;
    min-height: 0;
    max-width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body[data-game='tom-and-ads'] .gaa-tom-stage {
    min-height: 0;
    overflow: hidden;
  }

  body[data-game='snake-ads'] .gaa-snake-stage {
    min-height: 0;
  }

  body[data-game='scratch-ads'] .gaa-game-stage {
    touch-action: none;
  }
}

body[data-game] .gaa-toast {
  border-radius: 2px;
  padding: 14px 16px;
  line-height: 1.4;
  text-align: center;
  width: max-content;
  max-width: min(calc(100vw - 24px), 26rem);
  box-sizing: border-box;
}

body[data-game] .gaa-modal {
  border-radius: 2px;
}

body[data-game="minesweeper-ads"] .gaa-score-hud {
  display: none !important;
}

.gaa-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--color-gold);
  border: 2px solid var(--color-fg);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--color-fg);
}

.gaa-coin {
  width: min(78vmin, 360px);
  height: min(78vmin, 360px);
  perspective: 1200px;
  flex-shrink: 0;
}

.gaa-coin-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s ease-out;
}

.gaa-coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid var(--color-fg);
  backface-visibility: hidden;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--color-fg);
}

.gaa-coin-face.front { background: var(--color-gold); }
.gaa-coin-face.front .gaa-ad-slot,
.gaa-coin-face.front iframe {
  border-radius: 0;
}
.gaa-coin-face.back {
  background: var(--color-gold);
  transform: rotateY(180deg);
}

.gaa-coin-medal {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-gold);
  position: relative;
}

.gaa-coin-tails {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

body[data-game="coin-flip"] .gaa-game-stage {
  justify-content: center;
}

body[data-game="coin-flip"] .gaa-game-hint {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(50vh + (var(--gaa-coin-medal) + 32px) / 2 + 16px);
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  width: min(calc(100vw - 24px), 28rem);
}

body[data-game="coin-flip"] {
  --gaa-coin-ad-w: 300px;
  --gaa-coin-ad-h: 250px;
  --gaa-coin-medal: calc(hypot(var(--gaa-coin-ad-w), var(--gaa-coin-ad-h)) + 20px);
}

body[data-game="coin-flip"] .gaa-coin {
  position: fixed;
  left: 50vw;
  top: 50vh;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: calc(var(--gaa-coin-medal) + 32px);
  height: calc(var(--gaa-coin-medal) + 32px);
}

body[data-game="coin-flip"] .gaa-coin-medal {
  width: var(--gaa-coin-medal);
  height: var(--gaa-coin-medal);
  border: 6px solid var(--color-fg);
  box-sizing: border-box;
}

body[data-game="coin-flip"] .gaa-coin-face.front .gaa-ad-slot {
  position: absolute;
  left: 50%;
  top: 50%;
  outline: none;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

body[data-game="coin-flip"] .gaa-counter {
  position: fixed;
  top: calc(var(--gaa-lb-bottom, 52px) + 8px);
  left: 50%;
  right: auto;
  width: max-content;
  transform: translateX(-50%);
  z-index: calc(var(--z-chrome) - 1);
  max-width: min(var(--leaderboard-width), calc(100vw - 24px));
  text-align: center;
  white-space: nowrap;
}

body[data-game="coin-flip"] #flip {
  position: fixed;
  left: 50vw;
  bottom: calc(var(--nav-height-bottom) + 16px);
  transform: translateX(-50%);
  z-index: 2;
}

body[data-game="coin-flip"] #flip:hover,
body[data-game="coin-flip"] #flip:active {
  transform: translateX(-50%) scale(1.04);
}

.gaa-skip-stage {
  width: 100%;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.gaa-skip-frame {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
  overflow: hidden;
}

.gaa-skip-frame .gaa-skip-slot,
.gaa-skip-stage #ad-slot {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: var(--nav-height-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0;
  background: var(--color-bg);
  pointer-events: none;
}

.gaa-skip-frame .gaa-skip-slot .gaa-ad-slot,
.gaa-skip-frame .gaa-skip-slot iframe,
.gaa-skip-frame .gaa-skip-slot video {
  margin: 0;
  flex-shrink: 0;
  pointer-events: auto;
}

.gaa-skip-frame .gaa-skip-slot video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gaa-skip-click {
  position: absolute;
  inset: 0;
  z-index: 6;
  cursor: pointer;
  pointer-events: auto;
  background: transparent;
}

.gaa-skip-hud {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-height-bottom) + 12px);
  transform: translateX(-50%);
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}

.gaa-skip-hud .gaa-skip-info {
  pointer-events: auto;
}

.gaa-skip-hud .gaa-counter.flash {
  animation: gaa-counter-flash 280ms ease-out;
}

.gaa-skip-hint {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 40;
  margin: 0;
  width: min(90%, 28rem);
  max-width: min(90%, 28rem);
  padding: 8px 12px;
  text-align: center;
  line-height: 1.35;
  color: var(--color-fg);
  background: var(--color-white);
  border: 2px solid var(--color-fg);
  box-shadow: 2px 2px 0 var(--color-fg);
  pointer-events: none;
}

@keyframes gaa-counter-flash {
  0% { background: var(--color-gold); }
  40% { background: var(--color-purple-light); }
  100% { background: var(--color-gold); }
}

.gaa-skip-info,
.gaa-ms-info {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  padding: 0;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.gaa-skip {
  position: absolute;
  z-index: 20;
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gaa-skip.visible {
  display: inline-flex;
  pointer-events: auto;
}

.gaa-skip[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.gaa-skip.hit {
  animation: gaa-skip-hit 180ms ease-out;
}

@keyframes gaa-skip-hit {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); background: var(--color-purple-light); }
  100% { transform: scale(1); }
}

.gaa-skip-plus {
  position: absolute;
  z-index: 22;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-purple);
  line-height: 1;
  animation: gaa-float-plus 600ms ease-out forwards;
}

@keyframes gaa-float-plus {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-28px); }
}

.gaa-score-plus {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 30;
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--color-gold);
  -webkit-text-stroke: 4px var(--color-fg);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--color-fg);
  animation: gaa-score-plus 800ms ease-out forwards;
}

@keyframes gaa-score-plus {
  from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to { opacity: 0; transform: translate(-50%, -48px) scale(1.15); }
}

.gaa-game-stage #ad-video {
  display: block;
  margin: 0 auto;
  max-width: none;
}

.gaa-ad-card {
  position: absolute;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  min-height: 0;
  width: auto;
}

.gaa-ad-card .x {
  position: absolute;
  top: 4px;
  right: 4px;
}

body[data-game='ad-blocker'] .gaa-ad-card {
  z-index: 3;
  touch-action: manipulation;
}

body[data-game='ad-blocker'] .gaa-ad-card iframe,
body[data-game='ad-blocker'] .gaa-ad-card .gaa-ad-slot [role="link"] {
  pointer-events: none;
}

body[data-game='ad-blocker'] .gaa-blocker-hit {
  position: absolute;
  inset: 0;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-game='ad-blocker'] .gaa-ad-card .x {
  top: -12px;
  right: -12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  line-height: 1;
  font-size: 22px;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: none;
}

body[data-game='ad-blocker'] .gaa-ad-card .x:hover,
body[data-game='ad-blocker'] .gaa-ad-card .x:active {
  transform: none;
}

body[data-game='ad-counter'] {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: 0;
  overscroll-behavior: none;
}

body[data-game='ad-counter'] .gaa-counter-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--nav-height-bottom);
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
  align-items: stretch;
  justify-content: flex-start;
}

body.gaa-lb-open[data-game='ad-counter'] .gaa-counter-stage,
body.gaa-lb-open[data-game='ad-counter'] .gaa-game-stage {
  padding-top: 0 !important;
}

body[data-game='ad-counter'] .gaa-counter-ads {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

body[data-game='ad-counter'] .gaa-counter-ads .gaa-ad-card {
  position: absolute !important;
  overflow: hidden;
  pointer-events: auto;
}

body[data-game='ad-counter'] .gaa-counter-ads .gaa-ad-card img,
body[data-game='ad-counter'] .gaa-counter-ads .gaa-ad-card video {
  object-fit: contain;
}

body[data-game='ad-counter'] .gaa-counter {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  white-space: nowrap;
  width: max-content;
  max-width: calc(100vw - 16px);
}

.gaa-counter-prompt {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}

.gaa-counter-prompt[hidden] {
  display: none;
}

.gaa-counter-guess-label {
  font-family: var(--font-body);
  font-size: 16px;
  text-align: center;
}

body[data-game='ad-counter'] #guess {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  min-height: 44px;
  margin: 0;
  padding: 8px 4px;
  text-align: center;
  box-sizing: border-box;
  -moz-appearance: textfield;
  appearance: textfield;
}

body[data-game='ad-counter'] #guess::-webkit-outer-spin-button,
body[data-game='ad-counter'] #guess::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gaa-memory-board {
  display: grid;
  grid-template-columns: repeat(var(--mem-cols, 3), var(--mem-w, 125px));
  grid-template-rows: repeat(var(--mem-rows, 4), var(--mem-h, 125px));
  justify-content: center;
  align-content: center;
  width: 100%;
  max-width: none;
  flex: 1;
  min-height: 0;
  gap: var(--mem-gap, 8px);
  overflow: hidden;
}

.gaa-memory-board.is-bot {
  pointer-events: none;
}

body[data-game='memory-ads'] .gaa-memory-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--nav-height-bottom);
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  min-height: 0 !important;
  padding: 8px !important;
  margin: 0;
  overflow: hidden;
  gap: 8px;
  align-items: stretch;
  justify-content: flex-start;
}

body[data-game='memory-ads'] .gaa-memory-stage .gaa-counter {
  flex-shrink: 0;
  align-self: center;
}

body.gaa-lb-open[data-game='memory-ads'] .gaa-memory-stage,
body.gaa-lb-open[data-game='memory-ads'] .gaa-game-stage {
  padding-top: 8px !important;
}

body[data-game='memory-ads'] .mem {
  width: var(--mem-w, 125px);
  height: var(--mem-h, 125px);
  padding: 0;
  margin: 0;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  cursor: pointer;
  border: var(--outline-thick) solid var(--color-fg);
  background: var(--color-gold);
  color: var(--color-fg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
}

body[data-game='memory-ads'] .mem:hover,
body[data-game='memory-ads'] .mem:active {
  transform: none;
}

body[data-game='memory-ads'] .mem[aria-disabled='true'] {
  background: var(--color-gold);
  color: var(--color-fg);
  border-color: var(--color-fg);
  cursor: default;
  opacity: 1;
}

body[data-game='memory-ads'] .mem img,
body[data-game='memory-ads'] .mem iframe,
body[data-game='memory-ads'] .mem .gaa-ad-slot,
body[data-game='memory-ads'] .mem .gaa-ad-fallback,
body[data-game='memory-ads'] .mem [role='link'] {
  width: 100%;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: cover;
  display: block;
  border-radius: 0;
  pointer-events: none;
}

.gaa-scratch {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color-fg);
  border-radius: 16px;
  box-shadow: var(--shadow-sticker);
}

.gaa-scratch canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.gaa-dpad {
  display: grid;
  grid-template-columns: 44px 44px 44px;
  grid-template-rows: 44px 44px 44px;
  gap: 4px;
}

.gaa-dpad .up { grid-column: 2; grid-row: 1; }
.gaa-dpad .left { grid-column: 1; grid-row: 2; }
.gaa-dpad .right { grid-column: 3; grid-row: 2; }
.gaa-dpad .down { grid-column: 2; grid-row: 3; }

.gaa-chase-stage {
  position: relative;
  min-height: calc(100dvh - var(--nav-height-bottom));
  justify-content: flex-start;
  gap: 10px;
  touch-action: none;
}

.gaa-chase-hud {
  display: flex;
  gap: var(--btn-gap);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.gaa-chase-board {
  position: relative;
  display: inline-block;
  line-height: 0;
  border: 2px solid var(--color-fg);
  background: var(--color-white);
  overflow: visible;
  box-sizing: content-box;
}

.gaa-chase-exit-mark {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateY(-50%);
  pointer-events: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(16px, 4vw, 22px);
  line-height: 1;
  color: #6B2FD9;
  white-space: nowrap;
  padding: 6px 10px 6px 8px;
  background: #F5C800;
  border: 2px solid #0A0A0A;
  box-shadow: 3px 3px 0 #0A0A0A;
}

.gaa-chase-exit-mark[hidden] {
  display: none !important;
}

.gaa-chase-exit-arrow {
  font-size: 1.25em;
  line-height: 1;
  font-weight: 700;
}

.gaa-chase-exit-text {
  letter-spacing: 0.02em;
}

.gaa-chase-board canvas {
  position: relative;
  z-index: 0;
  display: block;
  max-width: none;
  width: auto;
  height: auto;
}

.gaa-chase-ad {
  position: absolute !important;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  box-sizing: border-box;
  background: var(--color-gold);
  outline: 2px solid var(--color-fg);
}

.gaa-chase-ad.gaa-ad-slot {
  outline: 2px solid var(--color-fg);
  background: var(--color-gold);
}

.gaa-chase-ad .gaa-ad-label {
  display: none;
}

.gaa-chase-ad .gaa-ad-fallback {
  width: 100%;
  height: 100%;
}

.gaa-chase-ad-mark {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(10px, 40%, 18px);
  color: var(--color-fg);
}

.gaa-chase-ad iframe,
.gaa-chase-ad img,
.gaa-chase-ad video,
.gaa-chase-ad a,
.gaa-chase-ad [role="link"],
.gaa-chase-ad .gaa-ad-art {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none;
  object-fit: cover;
  display: block;
}

@media (max-width: 767px) {
  body[data-game="ad-chase"] .gaa-chase-stage {
    padding: 8px 8px 12px;
    gap: 8px;
    min-height: 0;
    height: calc(100dvh - var(--nav-height-bottom));
    justify-content: flex-start;
    overflow: hidden;
  }

  body[data-game="ad-chase"] .gaa-chase-hud .gaa-counter {
    font-size: 11px;
    padding: 6px 10px;
  }

  body[data-game="ad-chase"] .gaa-dpad {
    display: none;
  }
}

@media (min-width: 768px) {
  body[data-game="ad-chase"] .gaa-chase-stage {
    padding: 16px 16px 24px;
    justify-content: center;
  }

  body[data-game="ad-chase"] .gaa-dpad {
    position: absolute;
    right: 16px;
    bottom: 24px;
    z-index: 4;
  }
}

.gaa-guess-stage,
.gaa-battle-stage,
.gaa-ms-stage,
.gaa-adverse-stage {
  justify-content: flex-start;
  padding-top: 24px;
}

body.gaa-lb-collapsed[data-game="adverse"] .gaa-adverse-stage {
  padding-top: max(24px, calc(var(--gaa-lb-bottom, 52px) + 8px));
}

.gaa-ms-stage {
  overflow-x: auto;
}

@media (max-width: 767px) {
  .gaa-ms-stage {
    padding-top: 8px;
    padding-bottom: 16px;
    gap: 8px;
  }

  .gaa-ms-toolbar #medium,
  .gaa-ms-toolbar #hard {
    display: none;
  }

  .gaa-ms-info {
    display: inline-flex;
  }
}

.gaa-guess-slot {
  flex-shrink: 0;
  max-width: 100%;
}

.gaa-guess-prompt,
.gaa-guess-choices {
  width: min(100%, 360px);
  text-align: center;
}

.gaa-guess-choices {
  display: flex;
  flex-direction: column;
  gap: var(--btn-gap);
}

.gaa-guess-right { background: #43A047; }
.gaa-guess-wrong { background: #E53935; color: #fff; }

.gaa-snake-stage {
  position: relative;
  min-height: calc(100dvh - var(--nav-height-bottom));
  justify-content: flex-start;
  gap: 10px;
  touch-action: none;
}

@media (max-width: 767px) {
  body[data-game="snake-ads"] .gaa-dpad {
    display: none;
  }
}

.gaa-snake-stage canvas {
  display: block;
  border: 2px solid var(--color-fg);
  background: #0A0A0A;
  max-width: 100%;
}

.gaa-snake-stage canvas.gaa-snake-ads-layer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

.gaa-snake-board {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}

.gaa-snake-food {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: auto;
}

@media (max-width: 767px) {
  .gaa-snake-food {
    max-width: 125px;
    max-height: 125px;
  }
}

.gaa-tom-stage {
  min-height: 100dvh;
  overflow: visible;
}

.gaa-tom-swipe {
  display: none;
}

@media (max-width: 767px) {
  .gaa-tom-swipe {
    display: inline;
  }
}

.gaa-hint-mobile {
  display: none;
}

@media (max-width: 767px) {
  .gaa-hint-desktop {
    display: none;
  }
  .gaa-hint-mobile {
    display: inline;
  }
}

.gaa-game-hint {
  position: relative;
  z-index: 40;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: min(100%, 36rem);
  max-width: calc(100% - 24px);
  margin: 8px auto;
  padding: 8px 12px;
  text-align: center;
  line-height: 1.35;
  color: var(--color-fg);
  background: var(--color-white);
  border: 2px solid var(--color-fg);
  box-shadow: 2px 2px 0 var(--color-fg);
  pointer-events: none;
}

.gaa-game-hint.gaa-muted {
  color: var(--color-fg);
}

body[data-game='ad-counter'] .gaa-game-hint {
  margin-top: 56px;
  align-self: center;
}

.gaa-skip-hint.gaa-muted,
.gaa-tom-hint.gaa-muted {
  color: var(--color-fg);
}

.gaa-tom-hint {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 51;
  margin: 0;
  width: min(calc(100vw - 24px), 28rem);
  max-width: min(calc(100vw - 24px), 28rem);
  padding: 8px 12px;
  text-align: center;
  line-height: 1.35;
  color: var(--color-fg);
  background: var(--color-white);
  border: 2px solid var(--color-fg);
  box-shadow: 2px 2px 0 var(--color-fg);
  pointer-events: none;
}

.gaa-snail {
  position: fixed;
  width: 56px;
  height: 32px;
  z-index: 50;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 45%, #6B2FD9 0 7px, transparent 8px),
    radial-gradient(circle at 38% 50%, #EDE5FF 0 11px, #F5C800 12px 16px, transparent 17px),
    linear-gradient(#F5C800, #F5C800);
  border: 2px solid var(--color-fg);
  border-radius: 20px 22px 16px 16px;
}

.gaa-tom-chaser {
  position: fixed !important;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  box-sizing: border-box;
  background: #F5C800;
}

body[data-game='tom-and-ads'] .gaa-dpad {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height-bottom) + 12px);
  transform: translateX(-50%);
  z-index: 60;
  pointer-events: none;
}

body[data-game='tom-and-ads'] .gaa-dpad button {
  pointer-events: auto;
}

@media (max-width: 767px) {
  body[data-game='tom-and-ads'] .gaa-dpad {
    display: none;
  }

  body[data-game='tom-and-ads'] .gaa-tom-stage {
    touch-action: none;
  }
}

.gaa-battle-ring {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gaa-battle-vs {
  font-family: var(--font-display);
  font-size: 20px;
  align-self: center;
}

.gaa-battle-played {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
}

.gaa-battle-name {
  max-width: 300px;
  line-height: 1.3;
}

.gaa-battle-slot {
  flex-shrink: 0;
}

.gaa-battle-who {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gaa-battle-hand {
  display: flex;
  flex-direction: column;
  gap: var(--btn-gap);
  width: min(100%, 360px);
}

.gaa-battle-pick {
  width: 100%;
  white-space: normal;
}

.gaa-ms-toolbar {
  display: flex;
  gap: var(--btn-gap);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.gaa-ms-info {
  display: none;
  align-items: center;
  justify-content: center;
}

.gaa-ms-board {
  flex-shrink: 0;
}

.gaa-ms-grid {
  display: grid;
  gap: 4px;
  place-content: center;
}

.gaa-ms-cell {
  width: var(--ms-w, 28px);
  height: var(--ms-h, 28px);
  min-width: var(--ms-w, 28px);
  min-height: var(--ms-h, 28px);
  margin: 0;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  box-shadow: none;
  transform: none;
}

.gaa-ms-cell:hover,
.gaa-ms-cell:active {
  transform: none;
}

.gaa-ms-cell.is-open {
  background: var(--color-purple-light);
  overflow: hidden;
}

.gaa-ms-cell.is-open:hover,
.gaa-ms-cell.is-open:active {
  background: var(--color-purple-light);
  transform: none;
}

.gaa-ms-cell.is-flag {
  background: var(--color-gold);
}

.gaa-ms-cell.is-flag:hover,
.gaa-ms-cell.is-flag:active {
  background: var(--color-gold);
  transform: none;
}

.gaa-ms-cell.is-bomb {
  background: #E53935;
  color: #fff;
  animation: gaa-ms-boom 0.4s linear 4;
}

.gaa-lose-cover,
.gaa-ms-cover {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-consent) + 2);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--color-white);
  color: var(--color-fg);
  border: 2px solid var(--color-fg);
  box-shadow: var(--shadow-gold);
  overflow: hidden;
}

.gaa-lose-cover-head,
.gaa-ms-cover-head {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 40px 4px;
}

.gaa-lose-cover-head .close,
.gaa-ms-cover-head .close {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.gaa-lose-cover-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
}

.gaa-lose-cover-ad {
  overflow: hidden;
}

.gaa-ms-cover-ads {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: auto;
  overflow: hidden;
}

.gaa-ms-cover-ad {
  position: absolute;
  overflow: hidden;
}

.gaa-jet-stage {
  position: relative;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  touch-action: none;
}

.gaa-jet-player {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 36px;
  height: 36px;
  background: var(--color-gold);
  border: 3px solid var(--color-fg);
  box-shadow: 3px 3px 0 var(--color-fg);
  pointer-events: none;
  will-change: transform;
}

.gaa-jet-ad {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
  will-change: transform;
  overflow: hidden;
  border: 2px solid var(--color-fg);
  background: var(--color-white);
}

@keyframes gaa-ms-boom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.gaa-club-stage {
  background: #0A0A0A;
  color: #FFFFFF;
  gap: 12px;
}

.gaa-club-kicker,
.gaa-club-code,
.gaa-club-lives {
  text-align: center;
  max-width: 360px;
}

.gaa-club-code {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-gold);
}

.gaa-club-door {
  min-height: 160px;
}

.gaa-club-controls {
  display: flex;
  flex-direction: column;
  gap: var(--btn-gap);
  width: min(100%, 320px);
}

.gaa-adverse-lead {
  max-width: 360px;
  text-align: center;
}

.gaa-adverse-days {
  font-family: var(--font-display);
  margin: 0;
}

.gaa-adverse-garden {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 2px solid var(--color-fg);
  border-radius: 16px;
  background: var(--color-white);
  width: min(100%, 360px);
}

.gaa-adverse-yard {
  position: relative;
  width: 100%;
  height: 220px;
  touch-action: none;
  overflow: hidden;
}

.gaa-adverse-garden.is-fleeing .gaa-adverse-yard,
.gaa-adverse-garden.is-hatching .gaa-adverse-yard {
  overflow: visible;
}

.gaa-egg {
  position: absolute;
  left: 50%;
  top: 48px;
  width: 88px;
  height: 112px;
  margin-left: -44px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  cursor: grab;
  z-index: 2;
  user-select: none;
  background: transparent;
  border: none;
}

.gaa-egg-half {
  position: absolute;
  inset: 0;
  border: 3px solid var(--color-fg);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #F5C800 13% 100%);
  pointer-events: none;
}

.gaa-egg-half-left { clip-path: inset(0 50% 0 0); }
.gaa-egg-half-right { clip-path: inset(0 0 0 50%); }

.gaa-egg-inside {
  position: absolute;
  inset: 14px 10px 18px;
  border: 2px solid var(--color-fg);
  background: var(--color-gold);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.7);
  z-index: 1;
  pointer-events: none;
}

.gaa-egg-inside img,
.gaa-egg-inside .gaa-ad {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gaa-egg-label {
  position: relative;
  z-index: 4;
  pointer-events: none;
}

.gaa-egg-cracks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.gaa-egg-cracks path {
  fill: none;
  stroke: var(--color-fg);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.gaa-egg-cracks path.is-on {
  opacity: 1;
}

.gaa-egg-cracks path.is-pop {
  animation: gaa-crack-pop 420ms ease-out;
}

@keyframes gaa-crack-pop {
  0% { opacity: 0; stroke-width: 0; }
  60% { opacity: 1; stroke-width: 3.4; }
  100% { opacity: 1; stroke-width: 2.2; }
}

.gaa-egg.is-hatching {
  cursor: default;
  z-index: 6;
}

.gaa-egg.is-hatching .gaa-egg-label {
  opacity: 0;
}

.gaa-egg.is-hatching .gaa-egg-inside {
  opacity: 1;
  transform: scale(1);
  transition: opacity 400ms ease, transform 700ms ease;
}

.gaa-egg.is-hatching .gaa-egg-half-left {
  animation: gaa-hatch-left 1.2s ease-in forwards;
}

.gaa-egg.is-hatching .gaa-egg-half-right {
  animation: gaa-hatch-right 1.2s ease-in forwards;
}

.gaa-egg.is-hatching .gaa-egg-cracks {
  animation: gaa-hatch-cracks 1.2s ease-in forwards;
}

@keyframes gaa-hatch-left {
  0% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-4px, -6px) rotate(-8deg); }
  100% { transform: translate(-42px, 18px) rotate(-38deg); }
}

@keyframes gaa-hatch-right {
  0% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(4px, -4px) rotate(8deg); }
  100% { transform: translate(44px, 22px) rotate(42deg); }
}

@keyframes gaa-hatch-cracks {
  0%, 40% { opacity: 1; }
  100% { opacity: 0; }
}

.gaa-egg.is-held {
  cursor: grabbing;
  z-index: 4;
}

.gaa-egg.has-legs::before,
.gaa-egg.has-legs::after {
  content: '';
  position: absolute;
  bottom: -18px;
  width: 10px;
  height: 22px;
  background: var(--color-fg);
  border-radius: 4px;
  transform-origin: top center;
}

.gaa-egg.has-legs::before {
  left: 22px;
  animation: gaa-leg-walk 0.18s infinite alternate ease-in-out;
}

.gaa-egg.has-legs::after {
  right: 22px;
  animation: gaa-leg-walk 0.18s infinite alternate-reverse ease-in-out;
}

@keyframes gaa-leg-walk {
  from { transform: rotate(-22deg) translateY(0); }
  to { transform: rotate(18deg) translateY(5px); }
}

.gaa-egg.is-fleeing {
  animation: gaa-egg-flee 1.8s ease-in forwards;
}

@keyframes gaa-egg-flee {
  0% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-8px, -6px) rotate(-8deg); }
  30% { transform: translate(12px, -4px) rotate(10deg); }
  100% { transform: translate(140vw, 12px) rotate(24deg); }
}

.gaa-egg-shake { animation: gaa-egg-shake 500ms ease-out; }
.gaa-egg-splash { animation: gaa-egg-splash 400ms ease-out; }

@keyframes gaa-egg-shake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-16deg) translateX(-4px); }
  40% { transform: rotate(16deg) translateX(4px); }
  60% { transform: rotate(-12deg); }
  80% { transform: rotate(12deg); }
}

@keyframes gaa-egg-splash {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

.gaa-watering-can {
  position: absolute;
  left: 16px;
  bottom: 12px;
  width: 72px;
  height: 54px;
  cursor: grab;
  z-index: 3;
  user-select: none;
  touch-action: none;
}

.gaa-watering-can.is-held {
  cursor: grabbing;
  z-index: 5;
}

.gaa-watering-can.is-pouring {
  transform: rotate(-28deg);
}

.gaa-watering-can svg {
  width: 100%;
  height: 100%;
  display: block;
}

.gaa-water-drops {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}

.gaa-water-drops span {
  position: absolute;
  width: 6px;
  height: 10px;
  background: #4FC3F7;
  border-radius: 50%;
  animation: gaa-drip 500ms linear infinite;
}

@keyframes gaa-drip {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(36px); opacity: 0; }
}

.gaa-care-meters {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.gaa-care-meters label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gaa-care-track {
  display: block;
  flex: 1 1 100%;
  height: 12px;
  border: 2px solid var(--color-fg);
  background: var(--color-purple-light);
  overflow: hidden;
}

.gaa-care-fill {
  display: block;
  height: 100%;
  width: 0;
  background: #4FC3F7;
}

.gaa-care-fill-shake {
  background: var(--color-gold);
}

.gaa-adverse-album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.gaa-ad-flip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.gaa-ad-flip-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease-move, ease);
}

.gaa-ad-flip.is-found .gaa-ad-flip-inner {
  transform: rotateY(180deg);
}

.gaa-ad-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 2px solid var(--color-fg);
  overflow: hidden;
}

.gaa-ad-flip-back {
  background: #9aa0a6;
}

.gaa-ad-flip-front {
  transform: rotateY(180deg);
  background: var(--color-gold);
}

.gaa-ad-flip-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gaa-ad-flip-meta {
  font-size: 12px;
  line-height: 1.3;
}

.gaa-adverse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--btn-gap);
  justify-content: center;
}

.gaa-adverse-panel {
  width: min(100%, 360px);
  text-align: left;
}

.gaa-adverse-panel h2 {
  margin: 0 0 8px;
  font-size: 16px;
}


body[data-game="guess-the-ad-2"] .gaa-game-stage {
  justify-content: flex-start;
  padding-top: 32px;
}

.gta2-ad {
  margin: 4px 0 8px;
}

.gta2-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 720px;
}

.gta2-body input {
  width: min(100%, 360px);
}

.gta2-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
}

.gta2-answers .gaa-card,
.gta2-answers button.gaa-card {
  min-width: 160px;
  max-width: 280px;
  margin: 0;
  text-align: center;
}

.gta2-standings {
  text-align: center;
}

.gta2-standings ol {
  display: inline-block;
  text-align: left;
  margin: 8px 0;
}

.gta2-plist {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.gta2-status {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gaa-egg.is-fleeing,
  .gaa-egg.has-legs::before,
  .gaa-egg.has-legs::after,
  .gaa-egg.is-hatching .gaa-egg-half-left,
  .gaa-egg.is-hatching .gaa-egg-half-right,
  .gaa-egg.is-hatching .gaa-egg-cracks,
  .gaa-egg-shake,
  .gaa-egg-splash,
  .gaa-egg-cracks path.is-pop,
  .gaa-water-drops span,
  .gaa-ad-flip-inner {
    animation: none;
    transition: none;
  }
}

@media (max-width: 767px) {
  body[data-game="coin-flip"] .gaa-counter {
    left: 50%;
    right: auto;
    width: max-content;
    max-width: calc(100vw - 16px);
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 8px 12px;
  }
}
