:root {
  --bg: #07090f;
  --bg-elev: #0e121c;
  --line: #1c2436;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #6fd4a8;
  --accent-dim: #3a8f6c;
  --warn: #e8b86a;
  --max: 42rem;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(7, 9, 15, 0.72) 0%, rgba(7, 9, 15, 0.88) 55%, rgba(7, 9, 15, 0.94) 100%),
    url("bg-lunar.jpg");
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

img, video, svg {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.55rem 0.85rem;
  background: var(--accent);
  color: #04140c;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  top: 0.75rem;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #9aebc4; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem max(1.25rem, env(safe-area-inset-right)) 3.5rem max(1.25rem, env(safe-area-inset-left));
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 15, 0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
}

.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem max(1.25rem, env(safe-area-inset-right)) 0.85rem max(1.25rem, env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
}

.brand {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  width: 2.65rem;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(14, 18, 28, 0.9);
  color: var(--text);
  cursor: pointer;
  place-items: center;
  flex-shrink: 0;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent-dim);
  outline: none;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 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; }

body.nav-open .nav-toggle-bars {
  background: transparent;
}

body.nav-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-size: 0.88rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

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

.hero-banner {
  width: 100%;
  margin: 0;
  background: #000;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  object-position: center center;
}

.mission-art {
  width: 100%;
  margin: 1.75rem 0 0;
  background: #000;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.mission-art-inset {
  margin: 1.5rem 0 2rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.mission-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 596;
  object-fit: cover;
  object-position: center center;
}

.world-panels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 1rem 0 2rem;
}

.world-panel {
  position: relative;
  margin: 0;
  height: 18rem;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  outline: none;
  cursor: default;
}

.world-panel img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  transition: transform 0.35s ease;
}

.world-panel-info {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 2.2rem 0.55rem 0.65rem;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 6, 12, 0.55) 28%, rgba(4, 6, 12, 0.94) 100%);
  color: var(--text);
  transition: padding 0.25s ease, background 0.25s ease;
}

.world-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.world-access {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.12rem;
}

.world-panel-info h3 {
  margin: 0.2rem 0 0.15rem;
  font-size: clamp(0.72rem, 1.5vw, 0.88rem);
  line-height: 1.2;
  color: var(--text);
}

.world-panel-info p {
  margin: 0;
  font-size: clamp(0.68rem, 1.3vw, 0.76rem);
  line-height: 1.35;
  color: #c5ccd8;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.28s ease, margin 0.28s ease;
}

.world-panel:hover img,
.world-panel:focus-visible img {
  transform: scale(1.05);
}

.world-panel:hover .world-panel-info,
.world-panel:focus-visible .world-panel-info {
  padding-top: 2.8rem;
  background: linear-gradient(180deg, transparent 0%, rgba(4, 6, 12, 0.72) 20%, rgba(4, 6, 12, 0.97) 100%);
}

.world-panel:hover .world-panel-info p,
.world-panel:focus-visible .world-panel-info p {
  max-height: 7rem;
  opacity: 1;
  margin-top: 0.3rem;
}

@media (max-width: 640px) {
  .world-panels {
    grid-template-columns: repeat(5, minmax(11.5rem, 72vw));
    overflow-x: auto;
    gap: 0.55rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .world-panel {
    height: 15.5rem;
    scroll-snap-align: start;
  }

  .world-panel-info h3 {
    font-size: 0.88rem;
  }

  .world-panel-info p {
    font-size: 0.78rem;
    max-height: 7rem;
    opacity: 1;
    margin-top: 0.3rem;
  }
}

.page-home .hero-lede {
  margin: 1.35rem 0 0.35rem;
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  color: var(--text);
}

.page-home .hero-fun {
  margin: 0.15rem 0 0.85rem;
  font-size: clamp(1.15rem, 2.8vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.page-home .hero-blurb {
  margin: 1.35rem 0 0;
  max-width: 38rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.15;
  margin: 1.75rem 0 0.6rem;
  letter-spacing: -0.02em;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

.meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 2rem 0 0.65rem;
  color: var(--text);
}

h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.4rem;
}

p, li { color: #c5ccd8; }

ul { padding-left: 1.2rem; }
li { margin: 0.35rem 0; }

.panel {
  background: rgba(14, 18, 28, 0.82);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  backdrop-filter: blur(6px);
}

.panel strong { color: var(--text); }

.facts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.facts li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.facts li:last-child { border-bottom: 0; }

.facts span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn:hover { border-color: var(--accent-dim); color: var(--accent); }

.btn-primary {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #04140c;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #04140c;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.app-store-badge img {
  display: block;
  height: 2.5rem;
  width: auto;
}

.app-store-badge[aria-disabled="true"] {
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background-color: #05070c;
  background-image:
    linear-gradient(180deg, rgba(7, 9, 15, 0.82) 0%, rgba(7, 9, 15, 0.55) 42%, rgba(7, 9, 15, 0.72) 100%),
    url("lunar-footer.webp");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-footer-inner {
  padding-top: 2rem;
  padding-bottom: 2.25rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-bottom: 0.75rem;
}

.site-footer p {
  color: #b7c0d0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}

.note {
  font-size: 0.88rem;
  color: var(--muted);
  border-left: 3px solid var(--warn);
  padding-left: 0.85rem;
  margin: 1.25rem 0;
}

.shot-carousel {
  position: relative;
  margin: 1.25rem 0 1.25rem;
  padding: 0 0.15rem;
}

.shot-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.35rem;
  padding: 0.35rem 0.2rem 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 1.1rem, #000 calc(100% - 1.1rem), transparent 100%);
}

.shot-carousel.is-start .shot-track {
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 1.1rem), transparent 100%);
}

.shot-carousel.is-end .shot-track {
  mask-image: linear-gradient(90deg, transparent 0, #000 1.1rem, #000 100%);
}

.shot-carousel.is-start.is-end .shot-track {
  mask-image: none;
}

.shot-track::-webkit-scrollbar {
  display: none;
}

.shot {
  margin: 0;
  flex: 0 0 clamp(8.5rem, 22vw, 11rem);
  scroll-snap-align: start;
}

.shot-frame {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  aspect-ratio: 9 / 19.5;
}

.shot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.shot figcaption {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.shot figcaption strong {
  font-size: 0.82rem;
  color: var(--text);
}

.shot figcaption span {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shot-nav {
  position: absolute;
  top: 28%;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 9, 15, 0.88);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.shot-nav:hover:not(:disabled) {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.shot-nav:disabled {
  opacity: 0.28;
  cursor: default;
}

.shot-nav-prev { left: -0.15rem; }
.shot-nav-next { right: -0.15rem; }

.shot-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0 0.35rem;
}

.shot-scroll {
  width: 100%;
}

.shot-scroll-track {
  position: relative;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(28, 36, 54, 0.95);
  border: 1px solid var(--line);
  cursor: pointer;
}

.shot-scroll-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 28%;
  min-width: 2.75rem;
  height: 0.55rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transform: translateY(-50%);
  cursor: grab;
  touch-action: none;
  box-shadow: 0 0 0 1px rgba(111, 212, 168, 0.12);
}

.shot-scroll-thumb:active {
  cursor: grabbing;
}

.shot-scroll-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shot-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shot-dot {
  width: 0.55rem;
  height: 0.55rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.shot-dot:hover {
  border-color: var(--accent-dim);
}

.shot-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.15);
}

.shot-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .shot {
    flex-basis: 9.25rem;
  }

  .shot-nav {
    top: 26%;
    width: 2.2rem;
    height: 2.2rem;
  }

  .shot-nav-prev { left: 0.1rem; }
  .shot-nav-next { right: 0.1rem; }

  .shot-scroll-thumb {
    min-width: 2.35rem;
    width: 34%;
  }
}

.studio-credo {
  margin: 0.75rem 0 1.35rem;
  padding: 0;
  border: 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.studio-credo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.coming-lede {
  margin: 0 0 1rem;
  color: #c5ccd8;
}

.coming-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0 0 2rem;
}

.coming-card {
  margin: 0;
  padding: 0.95rem 1.05rem 1.05rem;
  background: rgba(14, 18, 28, 0.82);
  border: 1px solid var(--line);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.coming-card h3 {
  margin: 0.25rem 0 0.4rem;
  font-size: 1.02rem;
  color: var(--text);
}

.coming-card p {
  margin: 0;
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .coming-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gimbal-diagram {
  margin: 1.25rem -0.5rem 2rem;
}

.gimbal-layout {
  display: grid;
  grid-template-columns: minmax(7.25rem, 9.5rem) minmax(0, 1fr) minmax(7.25rem, 9.5rem);
  gap: 0.35rem 0.5rem;
  align-items: stretch;
}

.gimbal-rail {
  position: relative;
  min-height: 100%;
}

.gimbal-stage {
  position: relative;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.gimbal-stage > img {
  display: block;
  width: 100%;
  height: auto;
}

.gimbal-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gimbal-line {
  stroke: rgba(111, 212, 168, 0.4);
  stroke-width: 0.4;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.gimbal-dot {
  fill: rgba(111, 212, 168, 0.6);
  transition: fill 0.2s ease, r 0.2s ease;
}

.gimbal-line.is-active {
  stroke: var(--accent);
  stroke-width: 0.7;
}

.gimbal-dot.is-active {
  fill: var(--accent);
}

.gimbal-callout {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--callout-top, 50%);
  z-index: 2;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(7, 9, 15, 0.92);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transform: translateY(-50%);
  font: inherit;
}

.gimbal-rail-right .gimbal-callout {
  text-align: right;
}

.gimbal-callout strong {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.1rem;
  font-weight: 600;
}

.gimbal-callout.is-active {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px rgba(111, 212, 168, 0.28);
  background: rgba(14, 28, 22, 0.95);
}

.gimbal-legend {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gimbal-legend p {
  margin: 0;
  font-size: 0.88rem;
  color: #c5ccd8;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--line);
  background: rgba(14, 18, 28, 0.55);
  border-radius: 0 4px 4px 0;
}

.gimbal-legend p.is-active {
  border-left-color: var(--accent);
  color: var(--text);
}

.gimbal-legend .world-access {
  display: inline;
  margin-right: 0.35rem;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

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

.upgrade-card {
  margin: 0;
  padding: 0.95rem 1.05rem 1.05rem;
  background: rgba(14, 18, 28, 0.82);
  border: 1px solid var(--line);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.upgrade-card h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.02rem;
  color: var(--text);
}

.upgrade-card p {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
}

.upgrade-card p:last-child {
  margin-bottom: 0;
}

.upgrade-lead {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 640px) {
  .upgrade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 900px) {
  .upgrade-grid:not(.craft-grid) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body {
    background-attachment: fixed;
  }
}

/* —— Tablet / compact desktop —— */
@media (max-width: 900px) {
  .world-panels {
    grid-template-columns: repeat(5, minmax(10.5rem, 1fr));
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .world-panel {
    min-width: 10.5rem;
    scroll-snap-align: start;
  }
}

/* —— Phone / small tablet —— */
@media (max-width: 780px) {
  .site-header .inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .nav-toggle {
    display: grid;
  }

  .nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.35rem 0 0.55rem;
    border-top: 1px solid var(--line);
    margin-top: 0.15rem;
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav a {
    display: block;
    padding: 0.72rem 0.15rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(28, 36, 54, 0.85);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .wrap {
    padding-top: 1.15rem;
    padding-bottom: 2.5rem;
  }

  .hero-banner img {
    aspect-ratio: 16 / 10;
    object-position: 18% center;
  }

  .mission-art img {
    aspect-ratio: 16 / 10;
  }

  .cta-row {
    gap: 0.65rem;
    align-items: stretch;
  }

  .btn {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
  }

  .app-store-badge {
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
  }

  .app-store-badge img {
    height: 2.5rem;
  }

  .gimbal-diagram {
    margin-left: 0;
    margin-right: 0;
  }

  .gimbal-layout {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .gimbal-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    min-height: 0;
  }

  .gimbal-rail-right {
    order: 3;
  }

  .gimbal-stage {
    order: 1;
  }

  .gimbal-rail-left {
    order: 2;
  }

  .gimbal-callout {
    position: static;
    transform: none;
    min-height: 3rem;
  }

  .gimbal-rail-right .gimbal-callout {
    text-align: left;
  }

  .gimbal-lines {
    display: none;
  }

  .gimbal-legend p {
    font-size: 0.84rem;
  }

  .site-footer-inner {
    padding-top: 1.5rem;
    padding-bottom: calc(1.75rem + env(safe-area-inset-bottom));
  }

  .site-footer nav {
    gap: 0.55rem 0.9rem;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 1rem;
  }

  .brand {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 8vw, 1.85rem);
    margin-top: 1.25rem;
  }

  .lede {
    font-size: 1rem;
  }

  .page-home .hero-lede {
    font-size: 1.05rem;
  }

  .facts li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .panel {
    padding: 0.85rem 0.9rem;
  }

  .cta-row .btn,
  .cta-row .app-store-badge {
    flex: 1 1 calc(50% - 0.65rem);
  }

  .cta-row .app-store-badge {
    display: inline-flex;
    justify-content: center;
  }

  .gimbal-rail {
    grid-template-columns: 1fr;
  }

  .world-panels {
    grid-template-columns: repeat(5, minmax(12rem, 78vw));
  }

  .world-panel {
    height: 16rem;
  }

  .coming-card,
  .upgrade-card {
    padding: 0.85rem 0.9rem 0.95rem;
  }
}

@media (max-width: 380px) {
  .cta-row .btn,
  .cta-row .app-store-badge {
    flex: 1 1 100%;
  }

  .nav-toggle {
    width: 2.45rem;
    height: 2.45rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
