*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
}

html {
  /* Puts 1rem = 10px, so the --fs-* scale in tokens.css (written as
     1.2rem/1.4rem/1.6rem/...) resolves to the clean 12/14/16/18px... values
     it was designed against (matches the artifact reference's 11-28px type
     scale) instead of 1.6x too large at the browser's 16px default. */
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-300);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: 1.15;
}

/* Page-title default. Most bare <h1>s across the app are a standard page
   header (Leaderboard "Top Players", Friends, Matches, Inventory, etc.) -
   the artifact's page-head pattern sizes those at 28px consistently. Hero
   sections that need something bigger (dashboard splash, marketing landing)
   set their own explicit font-size and aren't affected. */
h1 {
  font-size: var(--fs-600);
}
h2 {
  font-size: var(--fs-500);
}
h3 {
  font-size: var(--fs-400);
}
h4 {
  font-size: var(--fs-300);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: var(--space-2);
  z-index: var(--z-toast);
  background: #fff;
  color: #111;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-1);
  font-weight: var(--fw-bold);
}

.skip-link:focus-visible {
  left: var(--space-2);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-1);
}

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