:root {
  --nv-shell-ink: #173f3a;
  --nv-shell-accent: #5f3c91;
  --nv-shell-focus: #ffb43b;
}

.nv-game-toolbar {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) auto auto;
  z-index: 10000;
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(23, 63, 58, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 28px rgba(31, 25, 54, .18);
}

.nv-game-toolbar button,
.nv-game-dialog button,
.nv-game-dialog a {
  min-width: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font: 700 1rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}

.nv-game-toolbar button {
  padding: 0 14px;
  color: var(--nv-shell-ink);
  background: #f2f7f6;
}

.nv-game-toolbar button:hover { background: #e2efec; }
.nv-game-toolbar button:focus-visible,
.nv-game-dialog button:focus-visible,
.nv-game-dialog a:focus-visible {
  outline: 4px solid var(--nv-shell-focus);
  outline-offset: 3px;
}

.nv-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(31, 18, 55, .72);
  backdrop-filter: blur(5px);
}

.nv-game-overlay[aria-hidden="false"] { display: grid; }

.nv-game-dialog {
  width: min(520px, 100%);
  box-sizing: border-box;
  padding: 34px;
  border-radius: 28px;
  color: var(--nv-shell-ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  text-align: center;
}

.nv-game-dialog h2 { margin: 0 0 10px; font: 750 2rem/1.15 system-ui, sans-serif; }
.nv-game-dialog p { margin: 0 0 24px; font: 400 1.1rem/1.55 system-ui, sans-serif; }
.nv-game-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nv-game-actions button,
.nv-game-actions a {
  display: grid;
  place-items: center;
  padding: 14px 18px;
  text-decoration: none;
}
.nv-game-resume { color: #fff; background: #26776a; }
.nv-game-dashboard { color: #fff; background: var(--nv-shell-accent); }
.nv-game-restart { color: var(--nv-shell-ink); background: #edf4f2; }
.nv-game-exit { color: #722c2c; background: #fff0f0; }

.nv-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

@media (max-width: 620px) {
  .nv-game-toolbar { left: 10px; right: 10px; justify-content: center; }
  .nv-game-toolbar button { flex: 1; padding: 0 8px; font-size: .9rem; }
  .nv-game-dialog { padding: 26px 20px; }
  .nv-game-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
