@font-face {
  font-family: "Quibble Display";
  src: url("assets/fonts/PixelOperatorHB.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Quibble Text";
  src: url("assets/fonts/PixelOperator.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Quibble Text", "Courier New", Courier, monospace;
  background: #04152e;
}

* { box-sizing: border-box; }

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

body { overflow-x: hidden; }

button, a { -webkit-tap-highlight-color: transparent; }

.landing {
  isolation: isolate;
  min-height: 100svh;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 44px 24px 74px;
  position: relative;
}

.game-background,
.vignette {
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.game-background {
  z-index: -2;
  background: #6f3e16 url("assets/landing-background-desert.png") center / cover no-repeat;
  filter: blur(4px) brightness(.68) saturate(.94);
  transform: scale(1.03);
}

.vignette {
  z-index: -1;
  background:
    radial-gradient(ellipse at center, rgba(2, 19, 45, .03) 12%, rgba(2, 16, 39, .23) 55%, rgba(2, 10, 29, .84) 100%),
    linear-gradient(180deg, rgba(1, 13, 34, .20), rgba(1, 12, 33, .44));
}

.hero {
  width: min(100%, 760px);
  display: grid;
  justify-items: center;
  gap: clamp(34px, 6vh, 62px);
  transform: translateY(-2vh);
}

.logo {
  margin: 0;
  display: grid;
  justify-items: center;
  color: #ffcd57;
  font-family: Impact, "Arial Black", "Courier New", sans-serif;
  font-size: clamp(3.2rem, 9.6vw, 8.8rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -.08em;
  line-height: .77;
  text-align: center;
  text-shadow:
    2px 2px 0 #d67b1e,
    4px 4px 0 #803210,
    6px 6px 0 #061534,
    8px 8px 0 rgba(0, 0, 0, .48);
  transform: skewX(-4deg);
  user-select: none;
}

.logo span:last-child {
  color: #31d5ff;
  margin-top: .14em;
  text-shadow:
    2px 2px 0 #0a8ec1,
    4px 4px 0 #075682,
    6px 6px 0 #061534,
    8px 8px 0 rgba(0, 0, 0, .48);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.button {
  --button-top: #124b7d;
  appearance: none;
  width: clamp(210px, 20vw, 270px);
  min-height: 66px;
  border: 3px solid #d6e3e5;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .13), transparent 38%),
    linear-gradient(180deg, var(--button-top), #0b284e);
  box-shadow:
    inset 0 0 0 3px #081934,
    inset 0 0 0 5px rgba(107, 192, 225, .35),
    0 4px 0 #041126,
    0 7px 0 rgba(0, 0, 0, .36);
  color: #fff1bd;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 900 clamp(1.25rem, 2vw, 1.55rem)/1 "Courier New", Courier, monospace;
  letter-spacing: -.06em;
  text-shadow: 2px 2px 0 #142543;
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
}

.button--play {
  --button-top: #13bfe8;
  border-color: #f8d16d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 37%),
    linear-gradient(180deg, #12bfea, #076aa7);
  box-shadow:
    inset 0 0 0 3px #07456f,
    inset 0 0 0 5px rgba(109, 239, 255, .54),
    0 4px 0 #032c57,
    0 7px 0 rgba(0, 0, 0, .42),
    0 0 20px rgba(30, 210, 255, .14);
}

.button:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-3px);
}

.button--play:hover:not(:disabled) {
  box-shadow:
    inset 0 0 0 3px #07456f,
    inset 0 0 0 5px rgba(145, 248, 255, .68),
    0 7px 0 #032c57,
    0 10px 0 rgba(0, 0, 0, .38),
    0 0 30px rgba(30, 210, 255, .37);
}

.button:active:not(:disabled),
.button.is-launching {
  filter: brightness(.68);
  transform: translateY(4px);
  box-shadow: inset 0 0 0 3px #061934, 0 1px 0 #031124;
}

.button:focus-visible {
  outline: 3px solid #fff5ac;
  outline-offset: 5px;
}

.button:disabled { cursor: wait; }

.copy-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

/* The supplied splash artwork is the visible interface. The semantic controls
   below are transparent hit areas aligned with the PLAY and COPY CA artwork. */
.landing--reference {
  display: block;
  padding: 0;
  background: #061229 url("assets/landing-animated-base.png") center / cover no-repeat;
}

.landing--reference .game-background,
.landing--reference .vignette {
  display: none;
}

.landing--reference .hero {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
}

.landing--reference .logo {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.landing--reference .actions {
  position: absolute;
  z-index: 2;
  top: 63.5%;
  left: 50%;
  width: auto;
  transform: translateX(-50%);
  gap: clamp(18px, 2vw, 30px);
}

.landing--reference .button {
  width: clamp(210px, 19vw, 276px);
  min-width: 210px;
  height: clamp(62px, 9vh, 84px);
  min-height: 62px;
  padding: 0;
  border: 3px solid #d6e3e5;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .13), transparent 38%),
    linear-gradient(180deg, #124b7d, #0b284e);
  box-shadow:
    inset 0 0 0 3px #081934,
    inset 0 0 0 5px rgba(107, 192, 225, .35),
    0 4px 0 #041126,
    0 7px 0 rgba(0, 0, 0, .36);
  color: #fff1bd;
  text-shadow: 2px 2px 0 #142543;
  animation: button-glow 3s ease-in-out infinite;
}

.landing--reference .button--play {
  border-color: #f8d16d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 37%),
    linear-gradient(180deg, #12bfea, #076aa7);
  box-shadow:
    inset 0 0 0 3px #07456f,
    inset 0 0 0 5px rgba(109, 239, 255, .54),
    0 4px 0 #032c57,
    0 7px 0 rgba(0, 0, 0, .42),
    0 0 20px rgba(30, 210, 255, .18);
}

.landing--reference .button--copy {
  animation-delay: .25s;
}

.landing--reference .button:hover:not(:disabled),
.landing--reference .button:focus-visible {
  animation-play-state: paused;
  filter: brightness(1.15);
  transform: translateY(-4px) scale(1.025);
}

.landing--reference .button:active:not(:disabled),
.landing--reference .button.is-launching {
  animation-play-state: paused;
  filter: brightness(.75);
  transform: translateY(3px) scale(.98);
  box-shadow: inset 0 0 0 3px #061934, 0 1px 0 #031124;
}

.landing--reference .button:focus-visible {
  outline: 3px solid #fff4a5;
  outline-offset: 5px;
}

.landing-logo-art {
  position: absolute;
  top: 20%;
  left: 50%;
  z-index: 1;
  width: min(49vw, 720px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 12px 4px rgba(1, 9, 29, .55));
  transform: translateX(-50%);
  animation: logo-enter 620ms cubic-bezier(.2, .9, .28, 1.25) both, logo-float 4.2s 720ms ease-in-out infinite;
  will-change: transform;
}

.username-control {
  position: absolute;
  z-index: 4;
  top: 55%;
  left: 50%;
  width: min(300px, 72vw);
  transform: translateX(-50%);
  text-align: center;
}

.username-control input {
  width: 100%;
  height: 55px;
  border: 3px solid #d8bd68;
  border-radius: 9px;
  outline: none;
  padding: 0 17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), transparent 46%),
    linear-gradient(180deg, #fff8db, #eadca8);
  box-shadow:
    inset 0 0 0 3px #071a35,
    inset 0 0 0 5px rgba(104, 219, 249, .33),
    0 4px 0 #03132b,
    0 7px 0 rgba(0,0,0,.34);
  color: #10284d;
  font: 900 18px/1 "Courier New", Courier, monospace;
  letter-spacing: .06em;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(255,255,255,.45);
  transition: transform 150ms ease, border-color 150ms ease, filter 150ms ease;
}

.username-control input::placeholder { color: rgba(54, 70, 87, .48); opacity: 1; }
.username-control input:hover { filter: brightness(1.08); }
.username-control input:focus {
  border-color: #fff1ad;
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 3px #071a35,
    inset 0 0 0 5px rgba(125, 238, 255, .6),
    0 6px 0 #03132b,
    0 10px 0 rgba(0,0,0,.32),
    0 0 20px rgba(49, 220, 255, .23);
}

.username-control.is-invalid input {
  border-color: #ff8e70;
  box-shadow:
    inset 0 0 0 3px #071a35,
    inset 0 0 0 5px rgba(255, 186, 127, .58),
    0 4px 0 #03132b,
    0 7px 0 rgba(0,0,0,.34),
    0 0 0 3px rgba(255, 126, 103, .34),
    0 0 22px rgba(255, 108, 83, .46);
  animation: username-invalid-pulse 680ms ease-in-out 2;
}
.username-feedback {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 15px);
  left: 50%;
  width: max-content;
  min-width: 224px;
  padding: 11px 15px 10px;
  border: 3px solid #ffc48e;
  border-radius: 4px;
  background: linear-gradient(180deg, #482957, #281b43);
  box-shadow: inset 0 0 0 2px #7a4169, 0 4px 0 #120b27;
  color: #fff2c5;
  font: 900 11px/1 "Courier New", Courier, monospace;
  letter-spacing: .09em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%) translateY(12px) scale(.9);
  transition: opacity 260ms ease-out, transform 300ms cubic-bezier(.18,.9,.28,1.25);
  will-change: opacity, transform;
  white-space: nowrap;
}
.username-feedback::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 15px;
  height: 15px;
  border-right: 3px solid #ffc48e;
  border-bottom: 3px solid #ffc48e;
  background: #281b43;
  transform: translateX(-50%) rotate(45deg);
}
.username-feedback strong,
.username-feedback small { display: block; position: relative; z-index: 1; }
.username-feedback strong { font-size: 14px; }
.username-feedback small { margin-top: 6px; color: #f8dca8; font-size: 9px; letter-spacing: .12em; }
.username-control.is-invalid .username-feedback {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

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

.shop-trigger {
  position: absolute;
  z-index: 2;
  top: 75.5%;
  left: 50%;
  min-width: 126px;
  min-height: 42px;
  transform: translateX(-50%);
  border: 2px solid rgba(249, 208, 107, .75);
  border-radius: 7px;
  background: rgba(4, 26, 57, .87);
  box-shadow: inset 0 0 0 2px rgba(91, 179, 216, .25), 0 3px 0 #041126;
  color: #fff1bd;
  cursor: pointer;
  font: 900 16px/1 "Courier New", Courier, monospace;
  letter-spacing: .04em;
  text-shadow: 2px 2px 0 #142543;
  transition: transform 150ms ease, filter 150ms ease;
}

.quick-actions {
  position: absolute;
  z-index: 2;
  top: 75.5%;
  left: 50%;
  display: flex;
  gap: 16px;
  transform: translateX(-50%);
}

.docs-note {
  position: absolute;
  z-index: 3;
  bottom: clamp(16px, 2.4vh, 28px);
  left: 50%;
  margin: 0;
  color: rgba(255, 244, 201, .48);
  font: 700 10px/1 "Courier New", Courier, monospace;
  letter-spacing: .13em;
  text-shadow: 1px 1px 0 rgba(4, 17, 39, .75);
  transform: translateX(-50%);
  white-space: nowrap;
}

.docs-note a {
  color: rgba(180, 229, 255, .7);
  text-underline-offset: 3px;
  transition: color 150ms ease, text-shadow 150ms ease;
}

.docs-note a:hover,
.docs-note a:focus-visible {
  color: #fff0ad;
  text-shadow: 0 0 9px rgba(255, 231, 151, .45);
}

/* Display face for names, headings and primary actions; the smaller pixel face
   remains on supporting copy so dense UI text stays readable. */
.landing--reference .button,
.shop-heading h2,
.shop-browser h3,
.shop-category,
.skin-card,
.run-panel h2,
.run-option,
.leaderboard-panel h2 {
  font-family: "Quibble Display", Impact, "Arial Black", sans-serif;
}

.username-control input,
.username-feedback,
.shop-kicker,
.docs-note,
.run-copy,
.leaderboard-note,
.leaderboard-list,
.shop-back {
  font-family: "Quibble Text", "Courier New", Courier, monospace;
}

.docs-note a:focus-visible {
  outline: 2px solid #fff0ad;
  outline-offset: 4px;
}

.quick-action {
  width: 82px;
  height: 58px;
  border: 3px solid #f1ce77;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), transparent 42%),
    linear-gradient(180deg, #1179b9, #083868);
  box-shadow: inset 0 0 0 3px #06213e, inset 0 0 0 5px rgba(96,222,255,.37), 0 4px 0 #041126, 0 7px 0 rgba(0,0,0,.37);
  color: #ffd256;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 160ms ease, filter 160ms ease;
}

.quick-action--shop {
  background:
    linear-gradient(180deg, rgba(255,255,255,.1), transparent 42%),
    linear-gradient(180deg, #1c4d7d, #0a2449);
  color: #fff1bd;
}

.quick-action svg { width: 34px; height: 34px; fill: currentColor; filter: drop-shadow(2px 2px 0 #082345); }
.quick-action:hover, .quick-action:focus-visible { filter: brightness(1.16); transform: translateY(-3px); }
.quick-action:focus-visible { outline: 3px solid #fff4a5; outline-offset: 4px; }

.shop-trigger:hover,
.shop-trigger:focus-visible {
  filter: brightness(1.16);
  transform: translateX(-50%) translateY(-3px);
}

.shop-trigger:focus-visible,
.skin-card:focus-visible,
.shop-close:focus-visible,
.shop-category:focus-visible,
.shop-back:focus-visible {
  outline: 3px solid #fff4a5;
  outline-offset: 3px;
}

.shop-modal {
  width: min(92vw, 740px);
  max-height: min(84vh, 720px);
  padding: 0;
  overflow: auto;
  border: 3px solid #f3ca63;
  border-radius: 14px;
  background: #061b38;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .68), inset 0 0 0 3px #0f4875;
  color: #fff1bd;
}

.shop-modal[open],
.run-modal[open],
.leaderboard-modal[open] { animation: shop-enter 280ms cubic-bezier(.18,.9,.28,1.18) both; }
.shop-modal::backdrop,
.run-modal::backdrop,
.leaderboard-modal::backdrop { background: rgba(1, 10, 28, .74); backdrop-filter: blur(4px); }
.shop-modal[open]::backdrop,
.run-modal[open]::backdrop,
.leaderboard-modal[open]::backdrop { animation: shop-backdrop-enter 240ms ease-out both; }

.shop-panel {
  padding: clamp(20px, 4vw, 34px);
  background:
    radial-gradient(circle at 50% 0, rgba(28, 166, 216, .16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 45%);
}

.shop-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.shop-kicker { margin: 0 0 5px; color: #57dfff; font: 700 12px/1 "Quibble Text", "Courier New", Courier, monospace; letter-spacing: .13em; }
.shop-heading h2, .shop-browser h3 { margin: 0; font-family: "Quibble Display", Impact, "Arial Black", sans-serif; letter-spacing: .02em; }
.shop-heading h2 { font-size: clamp(32px, 6vw, 46px); text-shadow: 3px 3px 0 #092849; }

.shop-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  animation: shop-browser-enter 220ms ease-out both;
}

.shop-categories[hidden],
.shop-browser[hidden] { display: none; }

.shop-category {
  min-height: 248px;
  border: 3px solid #4d7e9d;
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.11), transparent 35%),
    linear-gradient(180deg, #164a78, #071f40);
  box-shadow: inset 0 0 0 3px #09274a, inset 0 0 0 5px rgba(102, 221, 255, .2), 0 5px 0 #041126;
  color: #fff1bd;
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 17px;
  font: 900 18px/1 "Quibble Display", Impact, "Arial Black", sans-serif;
  letter-spacing: .02em;
  text-shadow: 2px 2px 0 #142543;
  transition: transform 170ms ease, filter 170ms ease, border-color 170ms ease;
}

.shop-category:hover,
.shop-category:focus-visible {
  border-color: #f3ca63;
  filter: brightness(1.16);
  transform: translateY(-4px);
}

.sprite-preview {
  display: block;
  width: 96px;
  height: 96px;
  background-image: url("game/tiles.png");
  background-repeat: no-repeat;
  background-size: 768px 576px;
  image-rendering: pixelated;
}

.sprite-preview--hero { background-position: 0 -384px; }
.sprite-preview--boomerang { background-position: 0 -480px; }
.shop-category-preview { transform: scale(1.2); }

.shop-browser:not([hidden]) { animation: shop-browser-enter 220ms ease-out both; }
.shop-browser-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.shop-browser h3 { color: #6be7ff; font-size: 22px; }

.shop-back {
  width: 38px;
  height: 34px;
  border: 2px solid #9dc6dc;
  border-radius: 7px;
  background: #10365e;
  box-shadow: inset 0 0 0 2px #072242, 0 3px 0 #041126;
  color: #fff1bd;
  cursor: pointer;
  font: 900 22px/1 "Quibble Text", "Courier New", Courier, monospace;
  transition: transform 150ms ease, filter 150ms ease;
}

.shop-back:hover,
.shop-back:focus-visible { filter: brightness(1.16); transform: translateX(-2px); }

.shop-close {
  width: 38px;
  height: 38px;
  border: 2px solid #9dc6dc;
  border-radius: 8px;
  background: #0b3159;
  color: #fff1bd;
  cursor: pointer;
  font: 900 29px/30px Arial, sans-serif;
}

.skin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.skin-card {
  position: relative;
  min-height: 176px;
  border: 2px solid #4d7e9d;
  border-radius: 10px;
  background: linear-gradient(180deg, #133c63, #081d3c);
  box-shadow: inset 0 0 0 2px rgba(115, 214, 255, .16), 0 4px 0 #041126;
  color: #fff1bd;
  cursor: pointer;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  gap: 8px;
  padding: 12px 12px 14px;
  font: 900 13px/1.2 "Quibble Display", Impact, "Arial Black", sans-serif;
  letter-spacing: .02em;
  transition: transform 150ms ease, filter 150ms ease, border-color 150ms ease;
}

.skin-card img { width: min(100%, 142px); height: 120px; object-fit: contain; image-rendering: pixelated; }
.skin-card .skin-preview { width: 96px; height: 96px; transform: scale(.92); }
.skin-card:hover { filter: brightness(1.15); transform: translateY(-3px); }
.skin-card.is-selected { border-color: #f3ca63; box-shadow: inset 0 0 0 2px rgba(255, 220, 106, .38), 0 4px 0 #041126, 0 0 18px rgba(42, 215, 255, .22); }
.skin-card.is-selected::after { content: "EQUIPPED"; color: #58e6ff; font-size: 10px; margin-top: -4px; }

.skin-card.is-locked {
  cursor: not-allowed;
  border-color: #536d81;
  filter: saturate(.45) brightness(.76);
}

.skin-card.is-locked:hover { filter: saturate(.58) brightness(.88); transform: none; }
.skin-card.is-locked::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: rgba(2, 13, 35, .2);
  pointer-events: none;
}

.skin-lock {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 13px;
  width: 24px;
  height: 20px;
  border: 3px solid #fff1bd;
  border-radius: 3px;
  background: #123964;
  box-shadow: 2px 2px 0 #06142d;
}

.skin-lock::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 17px;
  width: 12px;
  height: 12px;
  border: 3px solid #fff1bd;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.skin-unlock-hint {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 8px 9px;
  border: 2px solid #ffda72;
  border-radius: 3px;
  background: #1c294d;
  box-shadow: 3px 3px 0 #07142c;
  color: #fff1bd;
  font: 700 10px/1.2 "Quibble Text", "Courier New", monospace;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -42%) scale(.9);
  transition: opacity 150ms ease, transform 170ms ease;
}

.skin-card.is-locked:hover .skin-unlock-hint,
.skin-card.is-locked:focus-visible .skin-unlock-hint {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.skin-card.is-locked-nudge { animation: locked-nudge 280ms ease-in-out; }

.run-modal,
.leaderboard-modal {
  width: min(92vw, 560px);
  padding: 0;
  border: 3px solid #f3ca63;
  border-radius: 14px;
  background: #061b38;
  box-shadow: 0 20px 70px rgba(0,0,0,.68), inset 0 0 0 3px #0f4875;
  color: #fff1bd;
}

.run-panel,
.leaderboard-panel {
  position: relative;
  padding: clamp(24px,5vw,36px);
  background: radial-gradient(circle at 50% 0, rgba(28,166,216,.18), transparent 48%), linear-gradient(180deg, rgba(255,255,255,.05), transparent 45%);
}

.run-panel .shop-close { position: absolute; top: 16px; right: 16px; }
.run-panel h2 { margin: 3px 0 13px; font: 900 clamp(36px,7vw,52px)/1 "Quibble Display", Impact, "Arial Black", sans-serif; letter-spacing: .02em; text-shadow: 3px 3px 0 #092849; }
.run-copy { margin: 0 0 24px; color: #bde7f2; font: 700 12px/1.45 "Quibble Text","Courier New",Courier,monospace; letter-spacing: .02em; }
.run-actions { display: grid; gap: 12px; }
.run-action {
  min-height: 58px;
  border: 3px solid #f1ce77;
  border-radius: 9px;
  background: linear-gradient(180deg, #15bfe8, #076aa7);
  box-shadow: inset 0 0 0 3px #07456f, inset 0 0 0 5px rgba(109,239,255,.48), 0 4px 0 #032c57;
  color: #fff1bd;
  cursor: pointer;
  font: 900 18px/1 "Quibble Display", Impact, "Arial Black", sans-serif;
  letter-spacing: .02em;
  text-shadow: 2px 2px 0 #142543;
  transition: transform 150ms ease, filter 150ms ease;
}
.run-action--continue { background: linear-gradient(180deg, #254f7b, #0b284e); border-color: #a9cfe1; }
.run-action:hover, .run-action:focus-visible { filter: brightness(1.14); transform: translateY(-2px); }
.run-action:focus-visible { outline: 3px solid #fff4a5; outline-offset: 4px; }

.leaderboard-note { margin: -10px 0 14px; color: #8fdff0; font: 700 10px/1 "Quibble Text","Courier New",Courier,monospace; letter-spacing: .1em; }
.leaderboard-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.leaderboard-list li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 13px;
  border: 2px solid #3f7396;
  border-radius: 7px;
  background: linear-gradient(180deg, #123c63, #081d3c);
  box-shadow: inset 0 0 0 2px rgba(115,214,255,.12);
  font: 900 14px/1 "Quibble Text","Courier New",Courier,monospace;
}
.leaderboard-rank { color: #f7ce66; }
.leaderboard-name { overflow: hidden; text-overflow: ellipsis; color: #fff1bd; }
.leaderboard-level { color: #5ee5ff; }
.leaderboard-list .leaderboard-empty { display:block; padding:16px; color:#b9dce8; text-align:center; }

@keyframes logo-enter {
  from { opacity: 0; transform: translateX(-50%) translateY(2vh) scale(.86); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes logo-float {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-50%) translateY(-.42vh) scale(1.012); }
}

@keyframes button-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.055); }
}

@keyframes shop-enter {
  from { opacity: 0; transform: translateY(18px) scale(.955); filter: saturate(.72); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }
}

@keyframes shop-browser-enter {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes locked-nudge {
  0%, 100% { transform: translateX(0); }
  33% { transform: translateX(-5px); }
  66% { transform: translateX(5px); }
}

@keyframes shop-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes username-invalid-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16); }
}

@media (max-width: 560px) {
  .landing { padding: 36px 18px 76px; }
  .hero { gap: 39px; transform: translateY(-1vh); }
  .logo { font-size: clamp(3.15rem, 18vw, 4.65rem); }
  .actions { flex-direction: column; align-items: center; gap: 14px; }
  .button { width: min(100%, 250px); min-height: 60px; }

  .landing--reference .actions {
    top: 61.5%;
    flex-direction: column;
  gap: 14px;
}

  .landing--reference .button {
    width: min(67vw, 250px);
    height: 60px;
  }

  .landing-logo-art {
    top: 19%;
    width: min(92vw, 530px);
  }

  .username-control { top: 53%; width: min(76vw, 290px); }
  .username-control input { height: 52px; font-size: 16px; }

  .shop-trigger { top: 80%; }
  .quick-actions { top: 80%; }
  .quick-action { width: 74px; height: 54px; }
  .shop-categories,
  .skin-grid { grid-template-columns: 1fr; }
  .shop-category { min-height: 170px; }
  .skin-card { min-height: 156px; }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .landing-logo-art,
  .shop-modal[open],
  .shop-modal[open]::backdrop,
  .run-modal[open],
  .run-modal[open]::backdrop,
  .leaderboard-modal[open],
  .leaderboard-modal[open]::backdrop { transition: none; animation: none; }
}
