/*!
 * Peep Arcade — shared game-card / fullscreen-shell / HUD styles.
 * Matches the site's own design tokens (--dp-*) from dp-site.css/dpsite.css.
 */

.pa-root { margin: 46px auto 8px; max-width: 960px; }

.pa-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 960 / 440;
  border-radius: var(--dp-radius, 18px);
  overflow: hidden;
  background: var(--dp-hero-soft, linear-gradient(155deg, #e2fbef 0%, #dff5ff 46%, #eef1ff 100%));
  border: 1px solid var(--dp-line, #d9efe8);
  box-shadow: 0 30px 70px -40px rgba(16, 40, 60, .45);
  outline: none;
}
.pa-shell.pa-is-fullscreen,
.pa-shell:fullscreen,
.pa-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  max-width: none;
}

/* ---- attract state (idle card, no game loop running) ----
   `:not([hidden])` matters here: a bare `.pa-attract{display:flex}` rule
   ties with the UA `[hidden]{display:none}` rule on specificity and (being
   an author rule) wins by source order regardless of the `hidden` attribute
   — silently defeating .hidden=true/false toggling in JS. Scope it out. */
.pa-attract:not([hidden]) {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 24px;
}
.pa-attract-peep { width: 118px; height: 124px; margin-bottom: 4px; }
.pa-attract-peep svg { display: block; width: 100%; height: 100%; }
.pa-attract-peep.pa-bob { animation: pa-float 3.2s ease-in-out infinite; }
.pa-attract h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 26px;
  margin: 0;
  color: var(--dp-ink, #0f1c28);
}
.pa-attract p { margin: 0; color: var(--dp-ink-soft, #3c5060); font-size: 15.5px; }
.pa-play {
  display: inline-block;
  border: 0;
  cursor: pointer;
  background: var(--dp-grad, linear-gradient(120deg, #3ee3b0 0%, #1cc6ec 40%, #4d8bd4 72%, #1ec990 100%));
  color: #06202b;
  font-weight: 800;
  font-family: "Montserrat", sans-serif;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 16px;
  box-shadow: 0 16px 34px -14px rgba(18, 176, 216, .7);
  margin-top: 4px;
}
.pa-play:hover { filter: brightness(1.06); }
.pa-instructions { font-size: 13.5px; color: var(--dp-ink-soft, #3c5060); opacity: .85; }
.pa-best { font-size: 13px; font-weight: 700; color: var(--dp-primary-dark, #0f93b6); min-height: 1em; }

/* ---- play state (canvas + DOM peep + HUD) ---- */
.pa-stage { position: absolute; inset: 0; background: #0b1520; }
.pa-canvas { display: block; }
.pa-peep-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pa-peep { position: absolute; transform-origin: center bottom; will-change: transform; }

.pa-hud {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.pa-score {
  pointer-events: auto;
  background: rgba(8, 20, 30, .55);
  color: #eafcff;
  font-weight: 800;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.pa-hud-btns { display: flex; gap: 8px; pointer-events: auto; }
.pa-mute, .pa-close {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(8, 20, 30, .55);
  color: #eafcff;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.pa-mute:hover, .pa-close:hover { background: rgba(8, 20, 30, .8); }

.pa-hud-instructions {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  color: rgba(234, 252, 255, .75);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(8, 20, 30, .4);
  padding: 5px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
}

.pa-gameover:not([hidden]) {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(8, 20, 30, .72);
  color: #fff;
  text-align: center;
  padding: 24px;
}
.pa-gameover h3 { font-family: "Montserrat", sans-serif; font-size: 24px; margin: 0; }
.pa-gameover p { margin: 0; font-weight: 700; color: #eafcff; }
.pa-gameover .pa-play { margin-top: 2px; }

@keyframes pa-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  .pa-attract-peep.pa-bob { animation: none; }
}

@media (max-width: 640px) {
  .pa-attract h3 { font-size: 21px; }
  .pa-attract-peep { width: 92px; height: 96px; }
  .pa-hud-instructions { font-size: 11px; }
}
