/*
 * style.css: the look of Ayden's Ballpark.
 *
 *   1. Colors and type         7. The Big Screen (videos)
 *   2. Basics                  8. Cards and photos
 *   3. Top bar and menu        9. Baseball and skiing
 *   4. Hero and scoreboard    10. Roblox, twin, footer
 *   5. The game               11. Base runner and toast
 *   6. Player card            12. Less motion
 *
 * To change a color, change it once in :root below.
 * The night game only swaps the "roles" block; the paint colors stay the same.
 */

/* ==========================================================================
   1. Colors and type
   ========================================================================== */

:root {
  /* Paint colors */
  --sky-1: #4fb3f6;
  --sky-2: #d8f0ff;
  --grass-1: #3f9b3a;
  --grass-2: #368c34;
  --wall: #1c5c36;
  --board: #14432a;        /* scoreboard green */
  --board-deep: #0b2a1a;
  --chalk: #fffdf5;
  --paper: #fbf6e6;
  --clay: #c9713d;         /* infield dirt */
  --clay-deep: #a2552a;    /* dirt that white text can sit on */
  --clay-dark: #5c2c12;
  --bulb: #ffc928;         /* the one hot accent */
  --stitch: #d2412c;
  --banner: #b93422;
  --ink: #12301f;
  --navy: #0d1f33;
  --wood: #9a6a3a;

  /* Roles. These flip when the stadium lights come on. */
  --sky-top: var(--sky-1);
  --sky-bottom: var(--sky-2);
  --field-a: var(--grass-1);
  --field-b: var(--grass-2);
  --bg: var(--paper);
  --on-bg: var(--ink);
  --on-bg-soft: #3c5a49;
  --accent-on-bg: var(--clay-deep);
  --pin: rgba(18, 48, 31, 0.06);
  --bg-alt: #cfeaff;
  --on-alt: var(--ink);
  --on-alt-soft: #2f4d5e;
  --accent-on-alt: var(--board);
  --snow: #f4fbff;
  --peak: #7fa3c7;
  --flake: #a9cdea;
  --clay-bg: var(--clay-deep);
  --lamp: #dfe7ea;
  --glow: 0;
  --cloud: #ffffff;
  --cloud-alpha: 0.92;
  --sun: #ffd84d;
  --sun-halo: rgba(255, 216, 77, 0.3);

  /* Cards stay cream, day and night. */
  --card: var(--chalk);
  --on-card: var(--ink);
  --on-card-soft: #4a6657;

  /* What a section uses for its own text. Each section sets these. */
  --fg: var(--on-bg);
  --fg-soft: var(--on-bg-soft);
  --accent: var(--accent-on-bg);

  --font-display: "Alfa Slab One", Rockwell, "Rockwell Nova", "Roboto Slab", Georgia, serif;
  --font-body: Barlow, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-led: Doto, "Courier New", Courier, monospace;

  --radius: 16px;
  --bar-h: 60px;
}

html[data-theme="night"] {
  color-scheme: dark;
  --sky-top: #050d21;
  --sky-bottom: #1c2f5d;
  --field-a: #2c7d35;
  --field-b: #25702e;
  --bg: var(--navy);
  --on-bg: #f6f1df;
  --on-bg-soft: #b9c8d7;
  --accent-on-bg: var(--bulb);
  --pin: rgba(255, 255, 255, 0.045);
  --bg-alt: #132b4d;
  --on-alt: #f6f1df;
  --on-alt-soft: #c3d2e2;
  --accent-on-alt: var(--bulb);
  --snow: #1a3357;
  --peak: #3a5a86;
  --flake: #ffffff;
  --clay-bg: #6f3a1e;
  --lamp: #fff6b8;
  --glow: 1;
  --cloud: #9fb2d6;
  --cloud-alpha: 0.26;
  --sun: #f3f0dc;
  --sun-halo: rgba(243, 240, 220, 0.16);
}

/* ==========================================================================
   2. Basics
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--on-bg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 2rem;
  font-size: clamp(2rem, 7vw, 3.1rem);
}

img,
svg,
canvas {
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -90px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bulb);
  color: var(--ink);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

/* A two-tone focus ring, so it shows on light and on dark. */
:focus {
  outline: 3px solid #ffd84d;
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid #ffd84d;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--board-deep);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  position: relative;
  padding: 56px 0;
  overflow: hidden;
  color: var(--fg);
  transition: background-color 0.5s ease, color 0.5s ease;
}

.section__head {
  max-width: 46rem;
  margin: 0 auto 28px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-family: var(--font-led);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lede {
  margin-top: 10px;
  font-size: 1.15rem;
}

/* Section backgrounds */
.section--paper {
  --fg: var(--on-bg);
  --fg-soft: var(--on-bg-soft);
  --accent: var(--accent-on-bg);
  background-color: var(--bg);
  background-image: repeating-linear-gradient(90deg, var(--pin) 0, var(--pin) 2px, transparent 2px, transparent 34px);
}

.section--board {
  --fg: var(--chalk);
  --fg-soft: #cfe3d4;
  --accent: var(--bulb);
  background: var(--board);
  border-top: 6px solid var(--bulb);
  border-bottom: 6px solid var(--bulb);
}

.section--clay {
  --fg: var(--chalk);
  --fg-soft: #ffe9d6;
  --accent: var(--chalk);
  background-color: var(--clay-bg);
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0, rgba(0, 0, 0, 0.08) 2px, transparent 2px, transparent 16px);
}

.section--sky {
  --fg: var(--on-alt);
  --fg-soft: var(--on-alt-soft);
  --accent: var(--accent-on-alt);
  background: var(--bg-alt);
}

.section--snow {
  --fg: var(--on-alt);
  --fg-soft: var(--on-alt-soft);
  --accent: var(--accent-on-alt);
  --peaks-h: 84px;
  padding-top: calc(var(--peaks-h) + 20px);
  background: var(--snow);
}

/* Mown grass. White body text is hard to read on it, so words go on signs. */
.field {
  --fg: var(--chalk);
  --fg-soft: #cfe3d4;
  --accent: var(--bulb);
  background-color: var(--field-a);
  background-image: repeating-linear-gradient(90deg, var(--field-a) 0, var(--field-a) 72px, var(--field-b) 72px, var(--field-b) 144px);
}

.sign {
  --fg: var(--chalk);
  --fg-soft: #cfe3d4;
  --accent: var(--bulb);
  padding: 18px 18px 20px;
  border: 3px solid var(--board-deep);
  border-radius: var(--radius);
  background: var(--board);
  color: var(--chalk);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 22px;
  border: 3px solid var(--board-deep);
  border-radius: 999px;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--board-deep);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--board-deep);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--board-deep);
}

/* A button's own shadow would hide the dark half of the focus ring, so put it back. */
.btn:focus-visible {
  box-shadow: 0 0 0 7px var(--board-deep);
}

.btn--bulb {
  background: var(--bulb);
}

.btn--chalk {
  background: var(--chalk);
}

.btn--small {
  min-height: 44px;
  padding: 6px 18px;
  font-size: 0.95rem;
}

.btn--big {
  min-height: 58px;
  padding: 10px 30px;
  font-size: 1.25rem;
}

/* "TBD" and "??" tags for things that are not filled in yet */
.tbd {
  display: inline-block;
  padding: 0 9px;
  border: 2px dashed currentColor;
  border-radius: 999px;
  font-size: 0.86em;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* A row of scoreboard bulbs */
.bulbs {
  height: 14px;
  background-image: radial-gradient(circle, var(--bulb) 4px, transparent 4.6px);
  background-position: center;
  background-size: 22px 14px;
  background-repeat: space no-repeat;
  animation: twinkle 1.8s linear infinite;
}

.bulbs--alt {
  animation-delay: -0.9s;
}

html[data-theme="night"] .bulbs {
  filter: drop-shadow(0 0 5px rgba(255, 201, 40, 0.9));
}

@keyframes twinkle {
  0%,
  49.9% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0.4;
  }
}

/* ==========================================================================
   3. Top bar and menu
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: var(--bar-h);
  padding: 6px 12px;
  border-bottom: 4px solid var(--bulb);
  background: var(--board);
  color: var(--chalk);
}

/* The name, the lights switch and the menu button always share one row.
   On a very small screen the name wraps onto two lines; no button gets pushed off. */
.topbar__row {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  margin-right: auto;
  color: var(--chalk);
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand__ball {
  flex: none;
}

.brand__text {
  min-width: 0;
}

/* The stadium lights switch */
.lights {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px;
  border: 2px solid rgba(255, 253, 245, 0.55);
  border-radius: 999px;
  background: var(--board-deep);
  color: var(--chalk);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.lights__icon {
  flex: none;
}

.lights__lamp {
  fill: var(--board-deep);
  transition: fill 0.3s ease;
}

.lights[aria-pressed="true"] .lights__lamp {
  fill: #f0a800;
}

.lights__text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.lights__knob {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #5d7566;
  transition: background-color 0.25s ease;
}

.lights__knob::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--chalk);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.lights[aria-pressed="true"] .lights__knob {
  background: var(--bulb);
}

.lights[aria-pressed="true"] .lights__knob::after {
  background: var(--board-deep);
  transform: translateX(16px);
}

/* The menu button (only when JavaScript is on, and only on smaller screens) */
.nav-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 11px;
  border: 2px solid rgba(255, 253, 245, 0.55);
  border-radius: 12px;
  background: transparent;
  color: var(--chalk);
  font-weight: 700;
  cursor: pointer;
}

.js .nav-toggle {
  display: inline-flex;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle__text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.nav {
  flex: 1 0 100%;
}

.js .nav {
  display: none;
}

.js .nav.is-open {
  display: block;
}

.nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 0 4px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--chalk);
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover {
  background: rgba(255, 253, 245, 0.14);
}

/* A very narrow screen: the switch alone is enough, so the little lamp icon steps aside. */
@media (max-width: 339px) {
  .lights__icon {
    display: none;
  }
}

@media (min-width: 440px) {
  .brand {
    font-size: 1.1rem;
  }

  .nav-toggle {
    position: relative;
  }

  .nav-toggle__text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
  }
}

@media (min-width: 620px) {
  .topbar {
    padding: 6px 20px;
  }

  .lights__text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
  }

  .nav ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1240px) {
  .topbar {
    flex-wrap: nowrap;
  }

  .topbar__row {
    flex: 1 1 auto;
  }

  .js .nav-toggle {
    display: none;
  }

  .nav,
  .js .nav {
    display: block;
    flex: 0 1 auto;
  }

  .nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    padding: 0;
  }

  .nav a {
    padding: 6px 10px;
    font-size: 0.95rem;
    white-space: nowrap;
  }
}

/* ==========================================================================
   4. Hero and scoreboard
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
}

.hero__sky {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

/* Glow from the light towers. Only shows at night. */
.hero__sky::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    radial-gradient(ellipse 46% 60% at 8% 10%, rgba(255, 246, 184, 0.34), transparent 70%),
    radial-gradient(ellipse 46% 60% at 92% 10%, rgba(255, 246, 184, 0.34), transparent 70%);
  opacity: var(--glow);
  transition: opacity 0.6s ease;
}

.stars {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image:
    radial-gradient(circle, #ffffff 1px, transparent 1.5px),
    radial-gradient(circle, #ffffff 1.2px, transparent 1.7px),
    radial-gradient(circle, #ffe9a8 1px, transparent 1.5px);
  background-position: 12px 18px, 70px 60px, 150px 30px;
  background-size: 130px 110px, 190px 170px, 240px 150px;
  opacity: var(--glow);
  transition: opacity 0.6s ease;
}

/* The sun by day, the moon by night */
.sun {
  position: absolute;
  top: 20px;
  right: 22%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 10px var(--sun-halo), 0 0 44px var(--sun-halo);
  transition: background-color 0.6s ease, box-shadow 0.6s ease;
}

.cloud {
  --s: 1;
  position: absolute;
  left: 0;
  width: 120px;
  height: 34px;
  border-radius: 999px;
  background: var(--cloud);
  opacity: var(--cloud-alpha);
  animation: drift 70s linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  top: -24px;
  left: 18px;
  width: 52px;
  height: 52px;
}

.cloud::after {
  top: -16px;
  left: 58px;
  width: 38px;
  height: 38px;
}

.cloud--1 {
  top: 38px;
  animation-delay: -22s;
}

.cloud--2 {
  --s: 0.7;
  top: 104px;
  animation-duration: 96s;
  animation-delay: -60s;
}

.cloud--3 {
  --s: 0.55;
  top: 168px;
  animation-duration: 124s;
  animation-delay: -100s;
}

@keyframes drift {
  from {
    transform: translateX(-170px) scale(var(--s));
  }
  to {
    transform: translateX(110vw) scale(var(--s));
  }
}

.hero__stage {
  position: relative;
  z-index: 1;
  padding: 18px 10px 0;
}

/* Light towers. The racks peek over the scoreboard. */
.tower {
  position: absolute;
  top: 12px;
  bottom: 0;
  width: 60px;
}

.tower--l {
  left: 3%;
}

.tower--r {
  right: 3%;
}

.tower svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.tower__rack {
  fill: #33424a;
  stroke: #1b262c;
  stroke-width: 3;
}

.lamp {
  fill: var(--lamp);
  transition: fill 0.4s ease;
}

.tower__pole {
  position: absolute;
  top: 36px;
  bottom: 0;
  left: 50%;
  width: 8px;
  margin-left: -4px;
  background: #4a5a62;
}

html[data-theme="night"] .tower svg {
  filter: drop-shadow(0 0 10px rgba(255, 246, 184, 0.95)) drop-shadow(0 0 34px rgba(255, 246, 184, 0.55));
}

.scoreboard {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 46px auto 0;
  padding: 10px 12px 16px;
  border: 4px solid var(--board-deep);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--board);
  color: var(--chalk);
  text-align: center;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 245, 0.1);
}

.scoreboard__tag {
  margin-top: 8px;
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scoreboard__name {
  margin: 2px 0 12px;
  color: var(--chalk);
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-size: clamp(2.2rem, 10.5vw, 4.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 var(--board-deep);
}

/* The line score: real facts in the boxes, ?? where we do not know yet */
.linescore {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.linescore > div {
  padding: 5px 2px 6px;
  border-radius: 6px;
  background: var(--board-deep);
}

.linescore dt {
  color: #cfe3d4;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.linescore dd {
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
}

.linescore dd.is-unknown {
  color: #e6d08a;
}

.linescore__runs {
  grid-column: span 2;
  box-shadow: inset 0 0 0 2px var(--bulb);
}

.linescore .linescore__runs dd {
  color: var(--chalk);
}

.scoreboard__note {
  margin: 10px 0 12px;
  color: #dcebdf;
  font-size: 0.95rem;
}

/* Outfield wall, warning track, and the grass under it */
.hero__wall {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 46px;
  border-top: 6px solid var(--bulb);
  background: var(--wall);
  color: rgba(255, 253, 245, 0.9);
  font-family: var(--font-led);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.hero__field {
  position: relative;
  z-index: 2;
  padding: 28px 16px 52px;
  border-top: 12px solid var(--clay);
  text-align: center;
}

.hero__intro {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

@media (min-width: 700px) {
  .hero__stage {
    padding: 26px 20px 0;
  }

  .tower {
    top: 16px;
    width: 92px;
  }

  .tower--l {
    left: max(3%, calc(50% - 540px));
  }

  .tower--r {
    right: max(3%, calc(50% - 540px));
  }

  .tower__pole {
    top: 56px;
    width: 10px;
    margin-left: -5px;
  }

  .scoreboard {
    margin-top: 70px;
    padding: 12px 20px 20px;
  }

  .linescore {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
  }

  .linescore dt {
    font-size: 0.8rem;
  }

  .linescore dd {
    font-size: 2.1rem;
  }

  .sun {
    top: 26px;
    width: 64px;
    height: 64px;
  }

  .hero__wall {
    height: 56px;
    font-size: 1.5rem;
  }

  .hero__field {
    padding: 36px 20px 64px;
  }
}

/* ==========================================================================
   5. The game
   ========================================================================== */

.game {
  max-width: 780px;
  margin: 0 auto;
  padding: 12px;
  border: 4px solid var(--board-deep);
  border-radius: 20px;
  background: var(--board);
  color: var(--chalk);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.2);
}

.game__hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
  text-align: center;
}

.game__hud > div {
  padding: 5px 2px 6px;
  border-radius: 8px;
  background: var(--board-deep);
}

.game__hud dt {
  color: #cfe3d4;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game__hud dd {
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

/* The canvas fills this box. The box sets the shape. */
.game__stage {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  max-height: 62vh;
  border-radius: 12px;
  background: var(--wall);
  aspect-ratio: 1 / 1;
}

.game__stage canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@supports not (aspect-ratio: 1 / 1) {
  .game__stage {
    height: 0;
    min-height: 0;
    max-height: none;
    padding-top: 100%;
  }
}

.game__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(11, 42, 26, 0.86);
  color: var(--chalk);
  text-align: center;
}

/* Centered when there is room. On a tiny screen with a long message it starts at the top
   and can be scrolled, so the words and the button are never cut off. */
.game__overlay > :first-child {
  margin-top: auto;
}

.game__overlay > :last-child {
  margin-bottom: auto;
}

.game__overlay-title {
  color: var(--bulb);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-size: clamp(1.5rem, 6.5vw, 1.9rem);
  line-height: 1.1;
}

.game__overlay-text {
  max-width: 26rem;
  margin: 10px 0 18px;
  font-size: 1.05rem;
  font-weight: 500;
}

.game__result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2em;
  margin: 10px 0 8px;
  padding: 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

/* One box for each pitch */
.game__tracker {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 12px;
}

.game__tracker li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--board-deep);
  color: #a9c4b0;
  font-size: 0.72rem;
  font-weight: 700;
}

.game__tracker li.is-now {
  border-color: var(--bulb);
  color: var(--chalk);
}

.game__tracker li.is-hr {
  background: var(--bulb);
  color: var(--ink);
}

.game__tracker li.is-hit {
  background: var(--chalk);
  color: var(--ink);
}

.game__tracker li.is-foul {
  background: var(--clay-deep);
  color: #ffffff;
}

.game__tracker li.is-strike {
  background: var(--banner);
  color: #ffffff;
}

.swing-btn {
  display: block;
  width: 100%;
  min-height: 72px;
  border: 4px solid var(--board-deep);
  border-radius: 18px;
  background: var(--banner);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 0 var(--board-deep), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.swing-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--board-deep);
}

.swing-btn:disabled {
  background: #5d7566;
  color: #dfe9e2;
  cursor: not-allowed;
}

.game__how {
  margin-top: 12px;
  color: #dcebdf;
  font-size: 0.98rem;
  text-align: center;
}

@media (min-width: 620px) {
  .game {
    padding: 16px;
  }

  .game__stage {
    max-height: 70vh;
    aspect-ratio: 16 / 10;
  }

  .game__hud dd {
    font-size: 1.7rem;
  }

  .game__tracker li {
    height: 36px;
    font-size: 0.9rem;
  }

  @supports not (aspect-ratio: 1 / 1) {
    .game__stage {
      padding-top: 62.5%;
    }
  }
}

/* ==========================================================================
   6. Player card (About me)
   ========================================================================== */

.about {
  display: grid;
  gap: 26px;
}

.about__head {
  text-align: center;
}

.playercard {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  overflow: hidden;
  border: 8px solid var(--chalk);
  border-radius: 18px;
  background: var(--card);
  color: var(--on-card);
  box-shadow: 0 0 0 3px var(--board-deep), 0 14px 28px rgba(0, 0, 0, 0.28);
  transform: rotate(-1.5deg);
}

.playercard__photo {
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: #cfeaff;
}

.playercard__photo img,
.playercard__photo svg {
  display: block;
  width: 100%;
  height: auto;
}

.playercard__photo img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.cap-letter,
.pennants__letter {
  font-family: var(--font-display);
}

.playercard__banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: var(--banner);
  color: #ffffff;
}

.playercard__name {
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

.playercard__num {
  font-family: var(--font-led);
  font-size: 1.5rem;
  font-weight: 900;
}

.stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.stats th,
.stats td {
  padding: 7px 14px;
  border-bottom: 2px dotted #d9d2bd;
  text-align: left;
  vertical-align: baseline;
}

.stats th {
  color: var(--on-card-soft);
  font-weight: 600;
}

.stats td {
  font-weight: 700;
  text-align: right;
}

.stats tr:last-child th,
.stats tr:last-child td {
  border-bottom: 0;
}

.playercard__foot {
  padding: 6px 10px;
  background: var(--board);
  color: var(--chalk);
  font-family: var(--font-led);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.about__text .lede {
  margin-top: 0;
}

.about__text p + p {
  margin-top: 10px;
}

.about__sub {
  margin-top: 24px;
  font-size: 1.3rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 2px solid var(--board-deep);
  border-radius: 999px;
  background: var(--card);
  color: var(--on-card);
  font-weight: 700;
}

@media (min-width: 860px) {
  .about {
    grid-template-columns: 360px minmax(0, 1fr);
    /* the two empty rows share the spare height, so the words sit level with the middle of the card */
    grid-template-rows: 1fr auto auto 1fr;
    align-items: start;
    column-gap: 56px;
    row-gap: 16px;
  }

  .about__head {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
  }

  .playercard {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .about__text {
    grid-column: 2;
    grid-row: 3;
  }
}

/* ==========================================================================
   7. The Big Screen (videos)
   ========================================================================== */

.bigscreen {
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 12px 12px;
  border: 4px solid #06180e;
  border-radius: 20px;
  background: var(--board-deep);
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.25);
}

.bigscreen .bulbs {
  margin-bottom: 10px;
}

.bigscreen .bulbs--alt {
  margin: 12px 0 0;
}

.screen {
  overflow: hidden;
  border: 3px solid #000000;
  border-radius: 10px;
  background: #000000;
}

/* 16:9 box. Nothing from YouTube loads until a video is picked. */
.screen__media {
  position: relative;
  height: 0;
  padding-top: 56.25%;
  background: #000000;
}

.screen__media > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* A vertical video: a tall box in the middle of the screen */
.screen__media--short {
  height: 460px;
  height: min(70vh, 640px);
  padding-top: 0;
}

.screen__media--short > * {
  left: 50%;
  width: 259px;
  width: calc(min(70vh, 640px) * 9 / 16);
  max-width: 100%;
  transform: translateX(-50%);
}

.screen__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--chalk);
  text-align: center;
}

.poster {
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
  cursor: pointer;
}

.poster:focus-visible {
  outline-offset: -6px;
  box-shadow: none;
}

.poster__img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.poster:hover .poster__img {
  transform: scale(1.03);
}

.poster__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border: 4px solid var(--board-deep);
  border-radius: 50%;
  background: var(--bulb);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
}

.poster__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent var(--board-deep);
  transform: translate(-50%, -50%);
}

.poster__label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(11, 42, 26, 0.92);
  color: var(--chalk);
  font-size: 0.95rem;
  font-weight: 700;
}

.bigscreen__info {
  padding: 14px 4px 2px;
  color: var(--chalk);
}

.bigscreen__now {
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bigscreen__title {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.bigscreen__meta {
  margin-top: 4px;
  color: #cfe3d4;
  font-weight: 600;
}

.bigscreen__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.videos__more {
  margin: 40px 0 12px;
  font-size: 1.6rem;
  text-align: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.filter {
  min-height: 44px;
  padding: 6px 16px;
  border: 2px solid rgba(255, 253, 245, 0.6);
  border-radius: 999px;
  background: transparent;
  color: var(--chalk);
  font-weight: 700;
  cursor: pointer;
}

.filter[aria-pressed="true"] {
  border-color: var(--bulb);
  background: var(--bulb);
  color: var(--ink);
}

.videolist {
  display: grid;
  gap: 12px;
}

/* A grid, so the picture sits at the top of the card. (A plain button
   would center its insides when a neighbor makes the row taller.) */
.videocard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--board-deep);
  color: var(--chalk);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.videocard:hover {
  border-color: var(--bulb);
  transform: translateY(-2px);
}

.videocard__in {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: start;
}

.videocard__thumb {
  position: relative;
  display: block;
  height: 0;
  padding-top: 56.25%;
  background: #000000;
}

.videocard__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.videocard__len {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.videocard__body {
  display: block;
  min-width: 0;
  padding: 8px 12px 10px;
}

.videocard__tag {
  display: block;
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.videocard__title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.videolist__empty {
  grid-column: 1 / -1;
  padding: 16px;
  color: #cfe3d4;
  font-weight: 600;
  text-align: center;
}

@media (min-width: 620px) {
  .bigscreen {
    padding: 14px 18px 18px;
  }

  .videolist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .videocard__in {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 920px) {
  .videolist {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   8. Cards and photos
   ========================================================================== */

.favline {
  margin-top: 10px;
  font-weight: 700;
}

.cards-layout {
  display: grid;
  gap: 30px;
  align-items: start;
}

.shelf-title {
  margin-bottom: 14px;
  font-size: 1.4rem;
  text-align: center;
}

/* A wooden shelf. Each row of frames sits on its own ledge. */
.shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 26px;
}

.shelf li {
  padding: 0 9px 12px;
  border-bottom: 12px solid var(--wood);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
}

.frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 3px dashed var(--on-card-soft);
  border-radius: 10px;
  background: var(--card);
  color: var(--on-card);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  aspect-ratio: 5 / 7;
}

.frame span + span {
  margin-top: 6px;
}

@supports not (aspect-ratio: 1 / 1) {
  .frame {
    min-height: 190px;
  }
}

.pull img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--chalk);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.pull figcaption {
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

/* Snapshots: every gallery photo is a 3:4 portrait in a white frame */
.snaps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 14px;
}

.snaps--solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 280px;
  margin: 0 auto;
}

.snap {
  padding: 8px 8px 0;
  border-radius: 6px;
  background: var(--chalk);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.snap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  background: #d9e3dc;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.snap figcaption {
  padding: 8px 4px 10px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.snaps li:nth-child(odd) .snap {
  transform: rotate(-1.2deg);
}

.snaps li:nth-child(even) .snap {
  transform: rotate(1deg);
}

/* An empty frame that only finishes the three-across row stays off the phone shelf. */
.shelf .shelf__wide {
  display: none;
}

@media (min-width: 560px) {
  .shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shelf .shelf__wide {
    display: block;
  }

  .shelf .shelf__narrow {
    display: none;
  }
}

@media (min-width: 600px) {
  /* auto-fit, not auto-fill: empty columns fold away, so two photos sit in the middle. */
  .snaps {
    grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
    justify-content: center;
    gap: 24px;
  }

  .snaps--solo {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 820px) {
  .cards-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 44px;
  }

  .cards-layout--solo {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   9. Baseball and skiing
   ========================================================================== */

/* The boxes size themselves to their words, so a long one ("Shortstop") is never cut.
   On a phone: two boxes in a row and the last one full width. On a big screen: all five in a row. */
.statline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 820px;
  margin: 0 auto 30px;
  text-align: center;
}

.statline > div {
  flex: 1 1 120px;
  padding: 8px 6px 10px;
  border: 2px solid rgba(255, 253, 245, 0.35);
  border-radius: 12px;
  background: var(--clay-dark);
}

.statline dt {
  color: #ffe9d6;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.statline dd {
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.15;
}

.statline dd.is-unknown {
  color: #f1dca0;
}

/* Off-season: mountains across the top, snow under them */
.peaks {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: var(--peaks-h);
  background: linear-gradient(var(--sky-top), var(--bg-alt));
}

.peaks__far {
  fill: var(--peak);
}

.peaks__cap {
  fill: #ffffff;
}

.peaks__near {
  fill: var(--snow);
}

.snowfall {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, var(--flake) 2px, transparent 2.6px),
    radial-gradient(circle, var(--flake) 3px, transparent 3.6px);
  background-position: 20px 0, 90px 40px;
  background-size: 120px 140px, 210px 230px;
  opacity: 0.8;
  animation: snow 16s linear infinite;
}

/* Each layer moves by whole tiles, so the loop has no jump. */
@keyframes snow {
  to {
    background-position: 20px 280px, 300px 500px;
  }
}

.section--snow .wrap {
  position: relative;
  z-index: 1;
}

@media (min-width: 700px) {
  .section--snow {
    --peaks-h: 124px;
  }
}

@media (min-width: 1100px) {
  .section--snow {
    --peaks-h: 164px;
  }
}

/* ==========================================================================
   10. Roblox, twin, footer
   ========================================================================== */

.roblox__grid {
  display: grid;
  gap: 22px;
  max-width: 860px;
  margin: 0 auto;
}

/* A ticket stub with my username on it */
.ticket {
  padding: 18px 22px 20px;
  border: 3px solid var(--board-deep);
  border-top: 14px solid var(--banner);
  border-radius: 14px;
  background: var(--card);
  color: var(--on-card);
  text-align: center;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18);
}

.ticket__label {
  color: var(--on-card-soft);
  font-family: var(--font-led);
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticket__name {
  margin: 8px 0;
  padding: 6px 0 8px;
  border-top: 3px dashed #cfc8b2;
  border-bottom: 3px dashed #cfc8b2;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-size: clamp(1.45rem, 7vw, 2.2rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ticket__name a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--board);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.ticket__hint {
  color: var(--on-card-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.lineup-box {
  padding: 18px 18px 20px;
  border: 3px solid var(--board-deep);
  border-radius: 14px;
  background: var(--board);
  color: var(--chalk);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18);
}

.lineup-title {
  margin-bottom: 10px;
  color: var(--bulb);
  font-size: 1.3rem;
  text-align: center;
}

.lineup {
  display: grid;
  gap: 8px;
  counter-reset: slot;
}

.lineup li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 12px;
  border-radius: 10px;
  background: var(--board-deep);
  font-weight: 700;
  counter-increment: slot;
}

.lineup li::before {
  content: counter(slot);
  flex: none;
  width: 1.4em;
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.safety {
  max-width: 860px;
  margin: 24px auto 0;
  padding: 14px 18px;
  border: 3px solid var(--board-deep);
  border-radius: 14px;
  background: var(--card);
  color: var(--on-card);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.safety__badge {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--bulb);
  color: var(--ink);
  font-family: var(--font-led);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 760px) {
  .roblox__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

.twin {
  text-align: center;
}

.pennants {
  display: block;
  width: 230px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 10px;
}

.twin .lede {
  max-width: 30rem;
  margin: 10px auto 24px;
}

.footer {
  padding: 34px 0 124px;
  border-top: 6px solid var(--bulb);
  background: var(--board-deep);
  color: #dcebdf;
  font-size: 0.98rem;
  text-align: center;
}

.footer p {
  max-width: 40rem;
  margin: 0 auto;
}

.footer__top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 14px;
  color: var(--bulb);
  font-weight: 700;
}

/* ==========================================================================
   11. Base runner and toast
   ========================================================================== */

/* A little diamond in the corner. The runner moves as you scroll. */
.runner {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 40;
  width: 76px;
  padding: 6px 6px 4px;
  border: 3px solid var(--board-deep);
  border-radius: 14px;
  background: var(--board);
  color: var(--chalk);
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

html:not(.js) .runner {
  display: none;
}

/* Out of the way while a round of the game is on */
body.is-playing .runner {
  opacity: 0;
}

.runner svg {
  display: block;
  width: 100%;
  height: auto;
}

.runner__dirt {
  fill: var(--clay);
}

.runner__grass {
  fill: var(--grass-1);
}

.runner__line {
  fill: none;
  stroke: var(--chalk);
  stroke-width: 2;
}

.runner__base {
  fill: var(--chalk);
  stroke: var(--board-deep);
  stroke-width: 1.5;
  transition: fill 0.2s ease;
}

.runner__base.is-on {
  fill: var(--bulb);
}

.runner__dot {
  fill: var(--stitch);
  stroke: var(--chalk);
  stroke-width: 2.5;
}

.runner__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.runner__label b {
  color: var(--bulb);
  font-family: var(--font-led);
  font-size: 1rem;
  font-weight: 900;
}

.runner.is-scored {
  animation: runner-pop 0.9s ease;
}

@keyframes runner-pop {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.25) rotate(-4deg);
  }
  60% {
    transform: scale(0.96) rotate(3deg);
  }
  100% {
    transform: scale(1);
  }
}

.toast {
  position: fixed;
  bottom: 116px;
  left: 50%;
  z-index: 70;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: 3px solid var(--board-deep);
  border-radius: 999px;
  background: var(--bulb);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 860px) {
  .section {
    padding: 84px 0;
  }

  .section--snow {
    padding-top: calc(var(--peaks-h) + 36px);
  }

  .runner {
    right: 18px;
    bottom: 18px;
    width: 96px;
  }

  .footer {
    padding-bottom: 60px;
  }

  .toast {
    bottom: 32px;
  }
}

/* ==========================================================================
   12. Less motion
   The game still works: the pitch and the timing ring keep moving,
   but the extras (clouds, bulbs, snow, pops) hold still.
   ========================================================================== */

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

  .cloud,
  .bulbs,
  .snowfall,
  .runner.is-scored {
    animation: none !important;
  }

  /* Parked clouds, spread across the sky */
  .cloud {
    transform: scale(var(--s));
  }

  .cloud--1 {
    left: 14%;
  }

  .cloud--2 {
    left: 56%;
  }

  .cloud--3 {
    left: 80%;
  }

  .btn:hover,
  .videocard:hover,
  .poster:hover .poster__img {
    transform: none;
  }
}
