/* base.css - reset and platform defaults. Owner: L6 (mobile-developer). Tokens come from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;                 /* the page never scrolls (mobile-spec 2) */
  overscroll-behavior: none;        /* no pull-to-refresh, no rubber band, no back-swipe chaining */
  background: var(--c-paper);
  font-family: var(--font-ui);
  color: var(--c-ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;      /* iOS long-press callout */
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;       /* no double-tap zoom; Pointer Events still fire */
}

/* Child areas: the game owns every gesture. */
.stage, .tray, .tray-strip, .hud, .hold, .tile, .tray-arrow, .entity, .fixture {
  touch-action: none;
}

img, svg, canvas { -webkit-user-drag: none; user-drag: none; max-width: none; }
svg, canvas { display: block; }

button {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* Grown-ups areas may select and scroll their own content. */
.gate, .settings { touch-action: pan-y; user-select: text; -webkit-user-select: text; overscroll-behavior: contain; }

:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: var(--focus-width) solid var(--c-focus);
  outline-offset: var(--focus-offset);
  box-shadow: 0 0 0 calc(var(--focus-offset) + var(--focus-width) + 2px) var(--c-focus-halo);
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
