:root {
  color-scheme: light;
  --bg: #f7f8f8;
  --paper: #ffffff;
  --paper-soft: rgba(255, 255, 255, 0.8);
  --ink: #121820;
  --muted: #66717c;
  --quiet: #8d949d;
  --line: rgba(18, 24, 32, 0.13);
  --line-strong: rgba(18, 24, 32, 0.22);
  --gold: #b28a46;
  --gold-soft: rgba(178, 138, 70, 0.15);
  --teal: #1e6a78;
  --teal-bright: #20b2aa;
  --teal-soft: rgba(32, 178, 170, 0.14);
  --coral: #c96c5b;
  --green: #287d54;
  --shadow: 0 24px 70px rgba(18, 24, 32, 0.09);
  --max: 1180px;
  --radius: 8px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(32, 178, 170, 0.17), transparent 18rem),
    radial-gradient(circle at 82% 14%, rgba(178, 138, 70, 0.15), transparent 16rem),
    linear-gradient(135deg, #ffffff 0%, var(--bg) 52%, #eef4f3 100%);
  color: var(--ink);
}

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

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.runner-shell,
.site-footer {
  width: min(var(--max), calc(100% - 44px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
  font-size: 18px;
  color: #067d85;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 2px solid #078e92;
  border-radius: 999px;
  background:
    conic-gradient(from 35deg, transparent 0 12%, rgba(7, 142, 146, 0.88) 12% 17%, transparent 17% 38%, rgba(7, 142, 146, 0.88) 38% 43%, transparent 43% 68%, rgba(7, 142, 146, 0.88) 68% 73%, transparent 73% 100%),
    radial-gradient(circle at 50% 50%, #ffffff 0 40%, rgba(32, 178, 170, 0.12) 41% 100%);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.88);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: 7px 3px auto;
  height: 2px;
  border-radius: 999px;
  background: #078e92;
  content: "";
  transform: rotate(-35deg);
}

.brand-mark::after {
  inset: auto 4px 7px;
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--gold);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.runner-shell {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 36px) 0 42px;
}

.intro-panel,
.game-frame,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  box-shadow: var(--shadow);
}

.intro-panel {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 28px;
  align-items: end;
  padding: clamp(20px, 3vw, 32px);
}

.intro-panel::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 44%, rgba(32, 178, 170, 0.1) 44% 45%, transparent 45% 100%),
    radial-gradient(circle at 78% 24%, rgba(32, 178, 170, 0.18), transparent 15rem);
  content: "";
  pointer-events: none;
}

.intro-panel > * {
  position: relative;
  min-width: 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 650;
}

h1,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  color: #065b64;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 590;
  letter-spacing: 0;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.intro-panel p {
  max-width: 660px;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
}

.sponsor-slot {
  display: grid;
  min-height: 86px;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed rgba(30, 106, 120, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(32, 178, 170, 0.07), rgba(178, 138, 70, 0.06)),
    rgba(255, 255, 255, 0.62);
}

.sponsor-slot span,
.panel-heading span,
.hud-row span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sponsor-slot strong {
  font-size: 15px;
  font-weight: 680;
}

.sponsor-slot small,
.panel p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.game-frame {
  overflow: hidden;
  padding: clamp(14px, 2vw, 20px);
}

.hud-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.hud-row article {
  display: grid;
  min-height: 72px;
  place-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.84);
}

.hud-row strong {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 610;
  line-height: 1;
}

.canvas-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(18, 24, 32, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(238, 244, 243, 0.82)),
    var(--paper);
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 960 / 380;
  touch-action: manipulation;
}

.start-overlay {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: grid;
  max-width: 430px;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(18, 24, 32, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 44px rgba(18, 24, 32, 0.11);
  cursor: pointer;
  transition:
    opacity 180ms ease,
    transform 180ms var(--ease);
}

.start-overlay::after {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(30, 106, 120, 0.24);
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--teal);
  content: "Tap here or press Space";
  font-size: 12px;
  font-weight: 760;
}

.start-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.start-overlay span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.start-overlay strong {
  font-size: 22px;
  font-weight: 650;
}

.start-overlay p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.runner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.runner-actions button,
.skin-card {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms var(--ease);
}

.runner-actions button {
  padding: 0 16px;
  font-size: 14px;
  font-weight: 690;
}

.primary-action {
  background: var(--teal-soft) !important;
  color: var(--teal);
}

.runner-actions button:hover,
.runner-actions button:focus-visible,
.skin-card:hover,
.skin-card:focus-visible,
.skin-card.is-equipped {
  border-color: rgba(32, 178, 170, 0.42);
  box-shadow: 0 14px 28px rgba(18, 24, 32, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.side-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
}

.panel {
  padding: clamp(18px, 2.4vw, 24px);
}

.panel-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
}

.panel-heading strong {
  font-size: 20px;
  font-weight: 620;
}

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

.skin-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  text-align: left;
}

.skin-swatch {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(18, 24, 32, 0.12);
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.88), transparent 30%),
    linear-gradient(135deg, var(--skin-a), var(--skin-b));
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.3);
}

.skin-card strong {
  font-size: 14px;
  font-weight: 690;
}

.skin-card span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.mission-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.mission-list div {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.mission-list span {
  color: var(--muted);
  font-size: 13px;
}

.mission-list strong {
  color: var(--teal);
}

.site-footer {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 13px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms ease,
    transform 520ms var(--ease);
}

.js .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 880px) {
  .site-header,
  .runner-shell,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .intro-panel,
  .side-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .site-header {
    min-height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0 14px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 42px);
  }

  h1 span {
    display: block;
  }

  .hud-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .start-overlay {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .runner-actions button {
    flex: 1 1 130px;
  }

  .skin-grid {
    grid-template-columns: 1fr;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

/* Visual reference pass: premium game shell. */
body {
  background:
    linear-gradient(rgba(0, 159, 154, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 159, 154, 0.026) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(0, 159, 154, 0.13), transparent 22rem),
    radial-gradient(circle at 84% 16%, rgba(215, 154, 24, 0.12), transparent 20rem),
    #fbfdfd;
  background-size: 64px 64px, 64px 64px, auto, auto, auto;
}

.site-header {
  width: min(100%, 100%);
  padding-inline: max(32px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(14, 111, 120, 0.13);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 30px rgba(18, 24, 32, 0.04);
}

.brand {
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-color: rgba(215, 154, 24, 0.8);
  background:
    radial-gradient(circle at 50% 50%, #fff 0 34%, transparent 35%),
    conic-gradient(from 40deg, #009f9a, transparent 28%, #d79a18, transparent 72%, #009f9a);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.92), 0 12px 24px rgba(14, 111, 120, 0.12);
}

.brand-mark::after {
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  color: #009f9a;
  content: "Z";
  font-size: 20px;
  font-weight: 900;
}

.site-nav {
  gap: 18px;
  font-weight: 650;
}

.site-nav a {
  border-radius: 0;
  padding-inline: 4px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #009f9a;
}

.site-nav a::after {
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #009f9a;
}

.intro-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

h1 {
  font-weight: 850;
}

.game-frame,
.panel,
.sponsor-slot {
  border-color: rgba(14, 111, 120, 0.13);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(18, 24, 32, 0.075);
}

.hud-row {
  border-color: rgba(14, 111, 120, 0.13);
  background: rgba(14, 111, 120, 0.13);
}

.hud-row article {
  background: rgba(255, 255, 255, 0.94);
}

.canvas-wrap {
  border-color: rgba(14, 111, 120, 0.15);
  background:
    radial-gradient(circle at 26% 20%, rgba(255, 255, 255, 0.76), transparent 11rem),
    linear-gradient(135deg, #062437, #0d6974 62%, #0a1d2f);
}

.start-overlay {
  border-color: rgba(14, 111, 120, 0.14);
  background: rgba(255, 255, 255, 0.9);
}

.runner-actions button,
.skin-card {
  border-color: rgba(14, 111, 120, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.primary-action {
  background: linear-gradient(135deg, #00aaa4, #008d90) !important;
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 159, 154, 0.18);
}

.skin-swatch {
  border-radius: 8px;
}

canvas {
  min-height: 260px;
  touch-action: none;
  user-select: none;
}

.site-footer {
  width: min(100%, 100%);
  padding-inline: max(32px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(238, 247, 246, 0.72));
}

@media (max-width: 640px) {
  .site-header,
  .site-footer {
    padding-inline: 18px;
  }
}
