*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Nunito", "Baloo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 700;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg, #1a1a24);
  color: var(--ink, #ffffff);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

/* Every tap target is at least this big. Small fingers, moving targets. */
.big-btn, .banner-btn, .undo-btn, .shop-tab, .buy-row, .product-chip {
  min-height: 52px;
  min-width: 52px;
}

img { display: block; max-width: 100%; }

/* A `display` rule on a class beats the browser default for [hidden], which
   silently un-hides every modal and banner in the game. Put this back. */
[hidden] { display: none !important; }

code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.fatal {
  display: grid;
  place-content: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
  line-height: 1.6;
}

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