/* ==========================================================================
   Y1 Game — Reset
   Modern, minimal normalisation. Loaded before tokens.css and main.css.
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky header height + breathing room for anchor targets */
  scroll-padding-top: 104px;
  /* Belt-and-braces: clip at the root so no descendant — including
     position:fixed elements, which escape a body-level clip — can ever
     force a horizontal scrollbar. */
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

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

img { height: auto; }

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

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

p,
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  text-wrap: balance;
}

ul[role='list'],
ol[role='list'] { list-style: none; }

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

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

/* Icons declare their own fill/stroke so both filled and outline sets work */
svg { flex-shrink: 0; }

:focus-visible {
  outline: 2px solid var(--ruby, #9B111E);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Remove focus ring for mouse users that still land focus on containers */
[tabindex='-1']:focus { outline: none; }

::selection {
  background: #9B111E;
  color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
