:root {
  --purple: #c950af;
  --teal: #00e6f6;
  --navy: #071324;
  --navy-light: #10233d;
  --panel: rgba(8, 24, 43, 0.92);
  --text: #f7fbff;
  --muted: #9eb1c7;
  --success: #57e389;
  --warning: #ffd166;
  --gradient: linear-gradient(120deg, var(--purple), var(--teal));
  --border: rgba(183, 221, 255, 0.14);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  --radius: 28px;
  --brand-background: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--navy);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    var(--brand-background),
    radial-gradient(circle at 78% 20%, rgba(0, 230, 246, 0.13), transparent 34%),
    radial-gradient(circle at 22% 76%, rgba(201, 80, 175, 0.16), transparent 42%),
    var(--navy);
  background-size: cover;
  background-position: center;
  font-family: "Manrope", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(0, 230, 246, 0.75);
  outline-offset: 3px;
}

.site-shell {
  position: relative;
  z-index: 2;
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 34px;
  display: flex;
  flex-direction: column;
}

.site-header,
.site-footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: none;
  width: auto;
  max-width: 220px;
  height: 46px;
  object-fit: contain;
}

.brand-logo.loaded {
  display: block;
}

.brand-logo.loaded + .brand-fallback {
  display: none;
}

.brand-fallback {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.brand-fallback strong {
  font-size: 23px;
  font-weight: 800;
}

.brand-fallback span {
  padding: 3px 6px;
  border-radius: 7px;
  color: #071324;
  background: var(--gradient);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.header-rebrand-button {
  min-height: 48px;
  padding: 6px 8px 6px 18px;
  border: 1px solid rgba(0, 230, 246, 0.25);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  background: rgba(7, 19, 36, 0.7);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  text-align: left;
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-rebrand-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 230, 246, 0.55);
  box-shadow: 0 14px 38px rgba(0, 230, 246, 0.1);
}

.header-rebrand-button > span:first-child {
  display: grid;
  gap: 1px;
}

.header-rebrand-button strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  line-height: 1.1;
}

.header-rebrand-button small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-rebrand-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #061322;
  background: var(--gradient);
  font-size: 16px;
}

.app-frame {
  flex: 1;
  display: flex;
  align-items: stretch;
}

.screen {
  display: none;
  width: 100%;
  min-height: min(760px, calc(100vh - 156px));
  padding: 44px 0;
  animation: screen-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.screen.active {
  display: grid;
}

.landing-screen {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: min(760px, calc(100vh - 156px));
  margin: 28px 0;
  padding: clamp(28px, 5vw, 68px);
  overflow: hidden;
  border: 1px solid rgba(183, 221, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(7, 19, 36, 0.2);
  box-shadow: var(--shadow);
}

.hero-map-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-map {
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-color: #ffffff;
  background-image: url("assets/Map.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(7, 19, 36, 0.82);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: #b5c8dc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 42px;
  height: 2px;
  border-radius: 4px;
  background: var(--gradient);
}

.eyebrow.centred {
  justify-content: center;
}

.landing-screen h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(58px, 6.4vw, 104px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.78;
}

.landing-screen h1 > span {
  display: block;
}

.gradient-text {
  padding: 0 0 12px;
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 0 24px rgba(0, 230, 246, 0.16));
}

.hero-subtitle {
  margin: 30px 0 0;
  color: #c0d0e0;
  font-size: clamp(17px, 1.6vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  position: relative;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.43;
}

.button-primary {
  color: #061322;
  background: var(--gradient);
  box-shadow: 0 14px 40px rgba(0, 230, 246, 0.12), 0 12px 34px rgba(201, 80, 175, 0.14);
}

.button-primary:hover:not(:disabled) {
  box-shadow: 0 17px 48px rgba(0, 230, 246, 0.22), 0 14px 42px rgba(201, 80, 175, 0.2);
}

.button-secondary {
  border: 1px solid rgba(210, 234, 255, 0.19);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
}

.button-large {
  min-height: 60px;
  padding: 0 30px;
  font-size: 16px;
}

.button-full {
  width: 100%;
}

.button-arrow {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 19, 36, 0.13);
  font-size: 17px;
}

.round-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 52px;
}

.round-preview article {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(11, 30, 51, 0.58);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.round-preview article:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 230, 246, 0.32);
}

.round-number {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  color: var(--teal);
  background: rgba(0, 230, 246, 0.08);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.round-preview strong,
.round-preview small {
  display: block;
}

.round-preview strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
}

.round-preview small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-leaderboard {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(7, 19, 36, 0.86);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.home-leaderboard .leaderboard-heading h2 {
  margin: 5px 0 0;
  font: 700 clamp(24px, 3vw, 34px)/1 "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.compact-list {
  margin-bottom: 0;
}

.leaderboard-loading,
.leaderboard-empty {
  display: block !important;
  padding: 22px 0 !important;
  color: var(--muted);
  text-align: center;
}

.hero-globe {
  position: relative;
  width: min(34vw, 480px);
  aspect-ratio: 1;
  border: 1px solid rgba(0, 230, 246, 0.24);
  border-radius: 50%;
  overflow: visible;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.13), transparent 16%),
    radial-gradient(circle at 48% 48%, rgba(18, 59, 88, 0.7), rgba(3, 16, 31, 0.97) 68%);
  box-shadow:
    inset -28px -20px 60px rgba(0, 0, 0, 0.44),
    inset 18px 16px 60px rgba(0, 230, 246, 0.07),
    0 0 90px rgba(0, 230, 246, 0.13);
  animation: globe-float 6s ease-in-out infinite;
}

.hero-globe::before,
.hero-globe::after,
.globe-grid::before,
.globe-grid::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(0, 230, 246, 0.16);
  border-radius: 50%;
}

.hero-globe::before {
  transform: scaleX(0.46);
}

.hero-globe::after {
  transform: scaleY(0.46);
}

.globe-grid::before {
  inset: 22% 6%;
}

.globe-grid::after {
  inset: 38% 2%;
}

.orbit-ring {
  position: absolute;
  width: min(42vw, 610px);
  aspect-ratio: 1;
  border: 1px solid rgba(201, 80, 175, 0.22);
  border-radius: 50%;
  transform: rotateX(66deg) rotateZ(-12deg);
  animation: orbit-spin 16s linear infinite;
}

.orbit-ring-two {
  width: min(38vw, 550px);
  border-color: rgba(0, 230, 246, 0.14);
  transform: rotateY(64deg) rotateZ(18deg);
  animation-duration: 22s;
  animation-direction: reverse;
}

.pin {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--purple);
  box-shadow: 0 0 25px rgba(201, 80, 175, 0.9);
  transform: rotate(-45deg);
  animation: pin-pop 2.4s ease-in-out infinite;
}

.pin-one { left: 25%; top: 32%; }
.pin-two { right: 22%; top: 48%; animation-delay: -0.7s; background: var(--teal); }
.pin-three { left: 44%; bottom: 20%; animation-delay: -1.3s; }

.score-float {
  position: absolute;
  right: -9%;
  top: 9%;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 17px;
  background: rgba(9, 26, 45, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: score-float 4s ease-in-out infinite;
}

.score-float small,
.score-float strong {
  display: block;
}

.score-float small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.score-float strong {
  margin-top: 2px;
  color: var(--teal);
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 34vw;
  max-width: 560px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.14;
  pointer-events: none;
}

.ambient-one {
  right: -10%;
  top: -12%;
  background: var(--teal);
  animation: ambient-move 12s ease-in-out infinite alternate;
}

.ambient-two {
  left: -12%;
  bottom: -16%;
  background: var(--purple);
  animation: ambient-move 16s ease-in-out infinite alternate-reverse;
}

.world-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.14;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(106, 180, 219, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 180, 219, 0.13) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(circle at 60% 42%, black, transparent 72%);
  animation: grid-drift 22s linear infinite;
}

.site-footer {
  min-height: 66px;
  border-top: 1px solid var(--border);
  color: rgba(172, 195, 217, 0.55);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Loading */
.loading-screen {
  place-items: center;
  align-content: center;
  text-align: center;
}

.loader-globe {
  position: relative;
  width: 90px;
  height: 90px;
  border: 2px solid rgba(0, 230, 246, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(0, 230, 246, 0.35) 49%, rgba(0, 230, 246, 0.35) 51%, transparent 52%),
    linear-gradient(transparent 48%, rgba(201, 80, 175, 0.35) 49%, rgba(201, 80, 175, 0.35) 51%, transparent 52%);
  box-shadow: 0 0 48px rgba(0, 230, 246, 0.12);
  animation: loader-spin 1.5s linear infinite;
}

.loader-globe::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid transparent;
  border-top-color: var(--purple);
  border-right-color: var(--teal);
  border-radius: 50%;
}

.loading-screen h2 {
  margin: 28px 0 5px;
  font: 700 32px/1 "Space Grotesk", sans-serif;
}

.loading-screen p {
  color: var(--muted);
}

/* Game */
.game-screen {
  align-content: start;
}

.game-topbar {
  min-height: 58px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.progress-copy {
  width: min(420px, 55vw);
}

.progress-copy > span {
  display: block;
  margin-bottom: 9px;
  color: #c5d5e5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 33.333%;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient);
  box-shadow: 0 0 20px rgba(0, 230, 246, 0.45);
  transition: width 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.running-score {
  white-space: nowrap;
}

.running-score span {
  margin-right: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.running-score strong {
  font: 700 29px/1 "Space Grotesk", sans-serif;
}

.running-score small {
  color: var(--muted);
  font-weight: 700;
}

.game-layout {
  min-height: 635px;
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  gap: 20px;
}

.challenge-card,
.map-card,
.capture-card,
.score-stage,
.rank-card,
.leaderboard-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.challenge-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.challenge-pill {
  display: inline-flex;
  min-height: 29px;
  padding: 0 12px;
  border: 1px solid rgba(0, 230, 246, 0.2);
  border-radius: 999px;
  align-items: center;
  color: var(--teal);
  background: rgba(0, 230, 246, 0.07);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.challenge-label {
  margin: 36px 0 7px;
  color: var(--muted);
  font-size: 13px;
}

.challenge-card h2 {
  margin: 0;
  font: 700 clamp(32px, 3.3vw, 53px)/0.98 "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
}

.challenge-description {
  margin: 19px 0 0;
  color: #c2d2e2;
  font-size: 14px;
  line-height: 1.65;
}

.tap-hint {
  margin: auto 0 0;
  padding-top: 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tap-hint span {
  display: inline-grid;
  width: 27px;
  height: 27px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: rgba(0, 230, 246, 0.08);
  font-size: 17px;
}

.landmark-image-wrap {
  position: relative;
  width: 100%;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #05111f;
}

.landmark-image-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.landmark-image-wrap a {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.62);
  font-size: 8px;
  text-decoration: none;
}

.map-card {
  position: relative;
  min-height: 635px;
  overflow: hidden;
  background: #0b2133;
}

.google-map,
.fallback-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fallback-map {
  display: none;
  cursor: crosshair;
  background:
    radial-gradient(circle at 55% 45%, rgba(26, 76, 100, 0.45), transparent 60%),
    #081b2b;
  touch-action: none;
}

.fallback-map.active {
  display: block;
}

.fallback-map .country-shape {
  fill: #17354b;
  stroke: rgba(126, 183, 211, 0.38);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  transition: fill 0.2s ease;
}

.fallback-map .correct-country {
  fill: rgba(0, 230, 246, 0.35);
  stroke: var(--teal);
}

.fallback-map .fallback-pin {
  fill: var(--purple);
  stroke: white;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px var(--purple));
}

.fallback-map .correct-pin {
  fill: var(--teal);
  stroke: white;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px var(--teal));
}

.fallback-map .answer-line {
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2;
  stroke-dasharray: 8 6;
  vector-effect: non-scaling-stroke;
}

.map-footer {
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 17px;
  z-index: 5;
  min-height: 70px;
  padding: 9px 10px 9px 19px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(4, 17, 31, 0.88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.map-footer > span {
  color: #c5d4e2;
  font-size: 12px;
  font-weight: 700;
}

.map-status {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 6;
  max-width: 70%;
  padding: 8px 13px;
  border-radius: 99px;
  color: #d7e6f3;
  background: rgba(4, 17, 31, 0.76);
  font-size: 10px;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.map-status.visible {
  opacity: 1;
}

.map-control {
  position: absolute;
  z-index: 5;
  top: 17px;
  right: 17px;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  cursor: pointer;
  color: white;
  background: rgba(4, 17, 31, 0.82);
  font-size: 22px;
  backdrop-filter: blur(10px);
}

/* Result / modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
}

.modal.open {
  display: grid;
}

.result-modal {
  place-items: end;
  pointer-events: none;
}

.result-modal .modal-backdrop {
  display: none;
}

.result-modal .result-panel {
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  pointer-events: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 230, 246, 0.12), transparent 38%),
    rgba(7, 19, 36, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 8, 17, 0.75);
  backdrop-filter: blur(13px);
  animation: fade-in 0.25s ease;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 38px;
  border: 1px solid rgba(0, 230, 246, 0.18);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 230, 246, 0.1), transparent 35%),
    var(--navy-light);
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.55);
  animation: modal-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-panel h2 {
  margin: 22px 0 26px;
  font: 700 clamp(32px, 5vw, 48px)/1 "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.05);
  font-size: 24px;
}

.instruction-steps {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.instruction-steps article {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.instruction-steps article > span {
  display: grid;
  flex: 0 0 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--teal);
  background: rgba(0, 230, 246, 0.08);
  font: 700 14px "Space Grotesk", sans-serif;
}

.instruction-steps strong,
.instruction-steps p {
  display: block;
}

.instruction-steps p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-tip {
  margin: 0 0 24px;
  color: #bfd0e0;
  font-size: 12px;
  line-height: 1.6;
}

.rebrand-panel {
  width: min(650px, 100%);
}

.rebrand-intro {
  max-width: 540px;
  margin: -8px 0 24px;
  color: #c7d6e4;
  font-size: 15px;
  line-height: 1.65;
}

.rebrand-supply-title {
  margin: 0 0 11px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rebrand-requirements {
  margin: 0 0 23px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.rebrand-requirements li {
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: #d8e4ee;
  font-size: 12px;
  font-weight: 750;
}

.rebrand-requirements li::before {
  content: "✓";
  display: grid;
  flex: 0 0 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #061322;
  background: var(--gradient);
  font-size: 12px;
  font-weight: 900;
}

.rebrand-note {
  margin: 0 0 24px;
  padding: 15px 17px;
  border-left: 2px solid var(--teal);
  border-radius: 0 14px 14px 0;
  color: #b9cad9;
  background: rgba(0, 230, 246, 0.045);
  font-size: 12px;
  line-height: 1.65;
}

.result-panel {
  width: min(430px, 100%);
  text-align: center;
}

.result-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 0 13px;
  border-radius: 99px;
  align-items: center;
  color: #061322;
  background: var(--success);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.points-earned {
  margin: 4px 0 15px;
}

.points-earned strong,
.points-earned span {
  display: block;
}

.points-earned strong {
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  font: 700 76px/0.9 "Space Grotesk", sans-serif;
  letter-spacing: -0.06em;
}

.points-earned span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.result-panel > p {
  margin: 0 0 24px;
  color: #bbccdc;
  font-size: 13px;
}

/* Final score and form */
.score-screen {
  grid-template-columns: minmax(0, 0.88fr) minmax(390px, 1.12fr);
  gap: 22px;
  align-items: stretch;
}

.score-stage,
.capture-card,
.rank-card,
.leaderboard-card {
  padding: clamp(28px, 4vw, 55px);
}

.score-stage,
.rank-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(0, 230, 246, 0.09), transparent 34%),
    var(--panel);
}

.score-stage h2,
.rank-card h2 {
  margin: 0;
  font: 700 clamp(34px, 4vw, 54px)/1 "Space Grotesk", sans-serif;
  letter-spacing: -0.05em;
}

.final-score {
  margin: 30px 0 12px;
  max-width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.final-score strong {
  display: inline-block;
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  flex: 0 1 auto;
  min-width: 0;
  padding-right: 0.08em;
  font: 700 clamp(72px, 8.2vw, 124px)/0.86 "Space Grotesk", sans-serif;
  letter-spacing: -0.055em;
}

.final-score span {
  color: var(--muted);
  font-weight: 800;
}

.score-verdict {
  color: #d4e1ed;
  font-size: 16px;
  font-weight: 700;
}

.round-score-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 30px;
}

.round-score-summary article {
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.round-score-summary small,
.round-score-summary strong {
  display: block;
}

.round-score-summary small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.round-score-summary strong {
  margin-top: 4px;
  font: 700 24px "Space Grotesk", sans-serif;
}

.capture-card h3 {
  margin: 19px 0 10px;
  font: 700 clamp(31px, 3.5vw, 47px)/1 "Space Grotesk", sans-serif;
  letter-spacing: -0.045em;
}

.capture-card > p {
  max-width: 620px;
  margin: 0;
  color: #b8cadb;
  font-size: 13px;
  line-height: 1.65;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 25px;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid label > span {
  color: #b9cada;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-grid em {
  margin-left: 5px;
  color: #6f879e;
  font-size: 8px;
  font-style: normal;
}

.form-wide {
  grid-column: 1 / -1;
}

.form-grid input:not([type="checkbox"]) {
  width: 100%;
  min-height: 51px;
  border: 1px solid rgba(211, 233, 255, 0.14);
  border-radius: 15px;
  color: var(--text);
  background: rgba(3, 14, 27, 0.64);
  padding: 0 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-grid input:not([type="checkbox"]):focus {
  border-color: rgba(0, 230, 246, 0.58);
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 230, 246, 0.07);
}

.quote-consent {
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 11px !important;
  padding: 13px 14px;
  border: 1px solid rgba(211, 233, 255, 0.14);
  border-radius: 15px;
  background: rgba(3, 14, 27, 0.42);
  cursor: pointer;
}

.quote-consent input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: var(--teal);
}

.quote-consent > span {
  color: #d2dfeb !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  line-height: 1.45;
  text-transform: none !important;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-error {
  min-height: 18px;
  margin: 12px 0 0 !important;
  color: #ff8e9a !important;
  font-size: 11px !important;
}

.privacy-copy {
  margin: 0 0 17px !important;
  color: #7790a7 !important;
  font-size: 9px !important;
}

.privacy-copy a {
  color: var(--teal);
}

.score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.score-actions .button {
  flex: 1 1 150px;
  text-decoration: none;
}

/* Rank and leaderboard */
.rank-number {
  margin: 28px 0 12px;
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  font: 700 clamp(110px, 14vw, 190px)/0.8 "Space Grotesk", sans-serif;
  letter-spacing: -0.09em;
}

.rank-screen,
.leaderboard-screen {
  place-items: center;
}

.rank-card,
.leaderboard-screen .leaderboard-card {
  width: min(760px, 100%);
}

.rank-actions,
.leaderboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.rank-actions .button,
.leaderboard-actions .button {
  min-width: 170px;
  text-decoration: none;
}

.rank-card > p:last-child {
  color: var(--muted);
}

.leaderboard-card {
  display: flex;
  flex-direction: column;
}

.leaderboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.leaderboard-heading span:first-child {
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaderboard-heading h2,
.leaderboard-heading h3 {
  margin: 5px 0 0;
  font: 700 clamp(26px, 3vw, 38px)/1 "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.leaderboard-icon {
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  border-radius: 16px;
  color: #061322;
  background: var(--gradient);
  font-size: 24px;
}

.leaderboard-list {
  margin: 27px 0;
  padding: 0;
  list-style: none;
}

.leaderboard-scroll {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(0, 230, 246, 0.55) rgba(255, 255, 255, 0.06);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.home-leaderboard .leaderboard-scroll {
  max-height: 336px;
}

.leaderboard-screen .leaderboard-scroll {
  max-height: 560px;
}

.leaderboard-scroll::-webkit-scrollbar {
  width: 7px;
}

.leaderboard-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.leaderboard-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(var(--purple), var(--teal));
}

.leaderboard-scroll:focus-visible {
  outline: 2px solid rgba(0, 230, 246, 0.7);
  outline-offset: 5px;
}

.leaderboard-scroll-hint {
  margin: -15px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.home-leaderboard .leaderboard-scroll-hint {
  margin-top: 10px;
}

.leaderboard-list li {
  min-height: 56px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
}

.leaderboard-list li.current-player {
  border: 1px solid rgba(0, 230, 246, 0.22);
  border-radius: 15px;
  background: rgba(0, 230, 246, 0.06);
}

.leaderboard-list .position {
  color: var(--muted);
  font: 700 13px "Space Grotesk", sans-serif;
}

.leaderboard-list .player-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-list .player-score {
  color: var(--teal);
  font: 700 18px "Space Grotesk", sans-serif;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.75; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes globe-float {
  0%, 100% { transform: translateY(-8px) rotate(-2deg); }
  50% { transform: translateY(11px) rotate(2deg); }
}

@keyframes orbit-spin {
  to { transform: rotateX(66deg) rotateZ(348deg); }
}

@keyframes score-float {
  0%, 100% { transform: translateY(-5px); }
  50% { transform: translateY(8px); }
}

@keyframes pin-pop {
  0%, 100% { opacity: 0.7; scale: 0.88; }
  50% { opacity: 1; scale: 1.12; }
}

@keyframes ambient-move {
  from { transform: translate3d(-4%, 0, 0) scale(0.9); }
  to { transform: translate3d(8%, 9%, 0) scale(1.15); }
}

@keyframes grid-drift {
  to { background-position: 70px 70px; }
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1050px) {
  .landing-screen {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 28px;
  }

  .round-preview {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-top: 35px;
  }

  .game-layout {
    grid-template-columns: minmax(240px, 285px) minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .site-shell {
    padding: 0 18px;
  }

  .site-header {
    min-height: 72px;
  }

  .site-footer span:last-child {
    display: none;
  }

  .screen {
    min-height: calc(100vh - 130px);
    padding: 30px 0;
  }

  .landing-screen {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 22px;
  }

  .hero-copy,
  .home-leaderboard {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .landing-screen h1 {
    font-size: clamp(61px, 17vw, 104px);
  }

  .home-leaderboard {
    width: 100%;
  }

  .leaderboard-scroll {
    touch-action: pan-y;
  }

  .home-leaderboard .leaderboard-scroll {
    max-height: min(312px, 44dvh);
  }

  .leaderboard-screen .leaderboard-scroll {
    max-height: min(520px, 56dvh);
  }

  .leaderboard-list li {
    min-height: 52px;
    padding-inline: 10px;
  }

  .round-preview {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }

  .round-preview article {
    display: block;
  }

  .round-preview .round-number {
    margin-bottom: 10px;
  }

  .game-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .challenge-card {
    min-height: 0;
    padding: 23px;
  }

  .challenge-label {
    margin-top: 24px;
  }

  .challenge-description {
    max-width: 620px;
  }

  .tap-hint {
    margin-top: 18px;
  }

  .landmark-image-wrap {
    max-width: 290px;
  }

  .map-card {
    min-height: 56vh;
  }

  .result-modal {
    align-items: end;
    justify-items: center;
    padding: 12px;
  }

  .result-modal .result-panel {
    width: min(520px, 100%);
    max-height: none;
    padding: 16px 18px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 16px;
    overflow: visible;
    text-align: left;
  }

  .result-modal .result-badge {
    grid-column: 1;
    justify-self: start;
  }

  .result-modal .result-panel h2 {
    grid-column: 1;
    margin: 0;
    font-size: clamp(21px, 4.5vw, 29px);
    line-height: 1.05;
  }

  .result-modal .points-earned {
    grid-column: 2;
    grid-row: 1 / 3;
    min-width: 76px;
    margin: 0;
    text-align: center;
  }

  .result-modal .points-earned strong {
    font-size: 52px;
  }

  .result-modal .points-earned span {
    margin-top: 4px;
    font-size: 9px;
  }

  .result-modal .result-panel > p,
  .result-modal #next-round-button {
    grid-column: 1 / -1;
  }

  .result-modal .result-panel > p {
    margin: 0;
  }

  .result-modal #next-round-button {
    min-height: 46px;
    margin-top: 4px;
  }

  .score-screen {
    grid-template-columns: 1fr;
  }

  .score-stage,
  .rank-card {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .site-shell {
    padding: 0 12px;
  }

  .brand-fallback strong {
    font-size: 19px;
  }

  .site-header {
    gap: 10px;
  }

  .brand-lockup {
    min-width: 0;
  }

  .brand-logo {
    max-width: 145px;
    height: 36px;
  }

  .header-rebrand-button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 4px 5px 4px 12px;
    gap: 8px;
  }

  .header-rebrand-button strong {
    font-size: 11px;
  }

  .header-rebrand-button small {
    display: none;
  }

  .header-rebrand-arrow {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .screen {
    padding: 22px 0;
  }

  .landing-screen {
    width: 100%;
    min-width: 0;
    margin: 12px 0;
    padding: 12px;
    gap: 14px;
  }

  .hero-copy {
    overflow: hidden;
    padding: 18px 16px;
    border-radius: 20px;
  }

  .home-leaderboard {
    padding: 18px 16px;
    border-radius: 20px;
  }

  .eyebrow {
    font-size: 9px;
  }

  .landing-screen h1 {
    font-size: clamp(43px, 14.8vw, 64px);
  }

  .hero-subtitle {
    margin-top: 20px;
    font-size: 15px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .button-large {
    min-height: 52px;
    width: 100%;
  }

  .round-preview {
    gap: 7px;
    margin-top: 25px;
  }

  .round-preview article {
    padding: 10px;
  }

  .round-preview small {
    display: none;
  }

  .round-number {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .game-topbar {
    margin-bottom: 12px;
  }

  .running-score span {
    display: none;
  }

  .game-layout {
    gap: 11px;
  }

  .challenge-card {
    padding: 18px;
    border-radius: 21px;
  }

  .challenge-label {
    margin-top: 18px;
  }

  .challenge-card h2 {
    font-size: 35px;
  }

  .challenge-description {
    margin-top: 11px;
    font-size: 12px;
  }

  .tap-hint {
    display: none;
  }

  .landmark-image-wrap {
    max-width: 100%;
  }

  .landmark-image-wrap img {
    aspect-ratio: 16 / 8;
  }

  .map-card {
    min-height: 55vh;
    border-radius: 21px;
  }

  .map-footer {
    left: 9px;
    right: 9px;
    bottom: 9px;
    min-height: 61px;
    padding-left: 14px;
  }

  .map-footer > span {
    max-width: 115px;
    font-size: 9px;
  }

  .map-footer .button {
    min-height: 44px;
    padding: 0 17px;
    font-size: 12px;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    padding: 28px 20px 20px;
    border-radius: 23px;
  }

  .rebrand-panel h2 {
    max-width: calc(100% - 34px);
    margin: 18px 0 20px;
    font-size: clamp(28px, 9vw, 38px);
  }

  .rebrand-intro {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .rebrand-requirements {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-bottom: 17px;
  }

  .rebrand-requirements li {
    min-height: 42px;
    padding-block: 8px;
  }

  .rebrand-note {
    margin-bottom: 18px;
    padding: 12px 14px;
  }

  .result-modal {
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
  }

  .result-modal .result-panel {
    padding: 13px 14px;
    border-radius: 19px;
    gap: 5px 11px;
  }

  .result-modal .result-panel h2 {
    font-size: clamp(18px, 5.5vw, 23px);
  }

  .result-modal .result-badge {
    min-height: 25px;
    padding-inline: 10px;
    font-size: 8px;
  }

  .result-modal .points-earned {
    min-width: 66px;
  }

  .result-modal .points-earned strong {
    font-size: 43px;
  }

  .result-modal #next-round-button {
    min-height: 42px;
    font-size: 12px;
  }

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

  .form-wide {
    grid-column: auto;
  }

  .score-stage,
  .capture-card,
  .rank-card,
  .leaderboard-card {
    padding: 27px 19px;
    border-radius: 22px;
  }

  .score-stage,
  .rank-card {
    min-height: 360px;
  }

  .final-score strong {
    font-size: clamp(68px, 20vw, 82px);
  }

  .rank-number {
    font-size: 120px;
  }
}

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