/* Centered pixel menu & modal — matches Nyan palette */
:root{
  --px-bg: #0b0f19;
  --px-edge: #5b67c7;     /* nyan blue border */
  --px-accent: #ff66cc;   /* nyan pink */
  --px-accent-2: #63f;    /* nyan blue */
  --px-accent-3: #ff0;    /* nyan yellow */
}
#topMenu{
  position: fixed; inset: 0 0 auto 0; z-index: 240;
  height: 70px; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(180deg, rgba(11,15,25,.96), rgba(11,15,25,.88));
  border-bottom: 2px solid var(--px-edge);
  box-shadow: 0 2px 0 #3a4a7a, 0 4px 0 rgba(0,0,0,.35);
  image-rendering: pixelated;
}
.pmenu{ list-style:none; display:flex; gap:12px; align-items:center; margin:0; padding:0; }
.pbtn{
  --bd:#39406b; --bg:#161b2f;
  display:inline-block; padding:10px 16px; text-decoration:none; color:#e8ecff; cursor:pointer; font-weight:700;
  background: var(--bg); border:0; border-radius:0;
  box-shadow: 0 0 0 2px var(--bd) inset, 0 3px 0 #0b0f19, 0 0 0 2px #0b0f19;
  transition: transform .06s ease, box-shadow .06s ease, background .06s ease;
}
.pbtn:hover{ box-shadow: 0 0 0 2px var(--px-accent-2) inset, 0 3px 0 #0b0f19, 0 10px 18px rgba(99,63,255,.28); }
.pbtn:active{ transform: translateY(2px); }
.pbtn.primary{ background:#1f2550; box-shadow: 0 0 0 2px #5b67c7 inset, 0 3px 0 #0b0f19; text-shadow: 0 0 6px rgba(255,102,204,.6); }

/* Push scene down under the menu */
.stage{ padding-top: 70px; }

/* Pixel Modal */
.pmodal{ position: fixed; inset:0; display:none; z-index: 260; }
.pmodal[aria-hidden="false"]{ display:block; }
.pbackdrop{ position:absolute; inset:0; background: rgba(3, 6, 15, .6); backdrop-filter: blur(2px); }
.pbox{
  position: relative; width: min(520px, 92vw);
  margin: 12vh auto 0; background: #111629; color: #e5e9ff;
  box-shadow: 0 0 0 3px #5b67c7, 0 0 0 6px #0b0f19, 0 16px 32px rgba(0,0,0,.45);
  image-rendering: pixelated; border: 2px solid #63f;
}
.phead{ display:flex; align-items:center; justify-content:space-between; padding: 10px 12px; background: #0b0f19; border-bottom: 2px solid #39406b; }
.phead h3{ margin:0; font-size: 16px; color:#fff; text-shadow: 0 0 6px rgba(255,102,204,.45); }
.pclose{ background:#1a1f35; color:#e5e9ff; border:0; padding:6px 10px; cursor:pointer; box-shadow: 0 0 0 2px #39406b inset; }
.pbody{ padding: 14px 16px; line-height:1.5; }
.pfoot{ padding: 10px 12px; display:flex; justify-content:flex-end; gap:8px; border-top:2px solid #39406b; }

/* Mobile compaction */
@media (max-width: 480px){
  #topMenu{ height: 64px; }
  .pmenu{ gap:8px; }
  .pbtn{ padding:8px 12px; font-weight:700; }
  .stage{ padding-top: 64px; }
}
