:root {
  --black: #000;
  --navy-0: #12182A;
  --navy-1: #0A1020;
  --navy-2: #05070D;
  --gold: #C4A35A;
  --paper: #F5F5F7;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* Exact Xeneon Edge body background (ui/app.css body) */
  --xe-sky:
    radial-gradient(46% 90% at 12% 28%,rgba(94,92,230,0.34),transparent 68%),
    radial-gradient(40% 85% at 88% 62%,rgba(90,200,250,0.22),transparent 68%),
    radial-gradient(36% 70% at 58% 8%,rgba(180,80,200,0.10),transparent 70%),
    radial-gradient(50% 40% at 50% 108%,rgba(10,132,255,0.18),transparent 70%),
    radial-gradient(120% 80% at 50% -12%,#12182A 0%,#0A1020 42%,#05070D 72%,#000 100%);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #000;
  color: var(--paper);
}

body {
  min-height: 100dvh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  overflow-x: hidden;
  background: var(--xe-sky);
  color-scheme: dark;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--xe-sky);
  overflow: hidden;
}

/* Xeneon .starfield — same 168 stars, tiled once downward so a tall page is covered
   without enlarging the dots. Animation matches ui/app.css starDrift. */
.starfield-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.starfield {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2560px;
  height: 1440px;
  margin-left: -1280px;
  pointer-events: none;
  z-index: 0;
  animation: starDrift 90s linear infinite;
}

/* Xeneon .limb — thin Earth-horizon glow along the bottom of the viewport */
.limb {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  animation: limbDrift 48s ease-in-out infinite alternate;
}

.limb::before {
  content: "";
  position: absolute;
  left: -22%;
  width: 144%;
  bottom: -820px;
  height: 838px;
  border-radius: 50%;
  border-top: 1px solid rgba(210,235,255,0.58);
  background:
    radial-gradient(ellipse 70% 80% at 50% 72%, rgba(28,72,132,0.70) 0%, rgba(12,36,72,0.32) 38%, rgba(6,16,32,0.12) 58%, transparent 72%);
  box-shadow:
    0 -1px 0 rgba(230,245,255,0.28),
    0 -8px 26px rgba(120,190,255,0.28),
    0 -22px 70px rgba(60,140,230,0.16),
    inset 0 14px 42px rgba(80,150,220,0.18);
}

@keyframes limbDrift {
  from { transform: translate3d(-8px, 4px, 0); }
  to { transform: translate3d(10px, -6px, 0); }
}

@keyframes starDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-18px, 6px, 0); }
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  padding: calc(16px + var(--safe-top)) calc(18px + var(--safe-right)) 0 18px;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(196, 163, 90, 0.32);
  border-radius: 13px;
  background: rgba(247, 241, 232, 0.08);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(247, 241, 232, 0.14);
  border-color: rgba(196, 163, 90, 0.55);
  outline: none;
}

.menu-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.4);
}

.menu-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}

.menu-toggle-bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: #F7F1E8;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-open .menu-toggle-bars span:nth-child(1) { transform: translateY(5.25px) rotate(45deg); }
.menu-open .menu-toggle-bars span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle-bars span:nth-child(3) { transform: translateY(-5.25px) rotate(-45deg); }

.menu {
  position: absolute;
  top: calc(16px + var(--safe-top) + 54px);
  right: calc(18px + var(--safe-right));
  min-width: 188px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(247, 241, 232, 0.1);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(196, 163, 90, 0.35);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.menu[hidden] { display: none; }

.menu-link {
  display: block;
  padding: 14px 16px;
  border-radius: 11px;
  color: #F7F1E8;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: left;
}

.menu-link:hover,
.menu-link:focus-visible {
  background: rgba(196, 163, 90, 0.18);
  outline: none;
}

.stage {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(80px + var(--safe-top)) 24px calc(48px + var(--safe-bottom));
}

/* No cream card — the mark sits directly on the navy panel, like the Xeneon. */
.mark-stage {
  width: min(560px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* Sized on the wrapper so the shimmer overlay shares the artwork's exact box */
.emblem-wrap {
  position: relative;
  flex: none;
  width: min(520px, 86vw, 74vh, 640px);
  aspect-ratio: 1 / 1;
  line-height: 0;
}

.emblem {
  display: block;
  width: 100%;
  height: 100%;
  /* Same gold glow as Xeneon .launch-rsp-mark (ui/app.css) */
  filter: drop-shadow(0 0 8px rgba(255,190,70,0.45)) drop-shadow(0 0 14px rgba(255,190,70,0.22));
}

@media (max-width: 430px) {
  .stage {
    padding: calc(76px + var(--safe-top)) 14px calc(36px + var(--safe-bottom));
  }

  .mark-stage { width: 100%; }

  .emblem-wrap {
    width: min(360px, 90vw, 70vh);
  }

  .menu { min-width: min(210px, calc(100vw - 32px)); }
}

@media (max-height: 700px) and (max-width: 430px) {
  .emblem-wrap { width: min(340px, 88vw, 62vh); }
}

/* Ported as-is from the Xeneon Edge home dashboard (FOR-10 / shimmer-20261204).
   Overlay only; rest frame is the unaltered approved gold mark (beam parked off-canvas). */
.launch-rsp-shimmer{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  -webkit-mask-image:url("assets/rsp-mark-gold-mask.png");
  mask-image:url("assets/rsp-mark-gold-mask.png");
  -webkit-mask-size:100% 100%;
  mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-position:center;
}
.launch-rsp-shimmer-beam{
  position:absolute;
  top:-15%;
  height:130%;
  width:38%;
  left:-45%;
  background:linear-gradient(105deg,
    transparent 0%,
    transparent 32%,
    rgba(255,248,220,0) 40%,
    rgba(255,252,235,0.42) 50%,
    rgba(255,214,120,0.18) 58%,
    transparent 68%,
    transparent 100%);
  animation:rspGoldShimmer 8.5s ease-in-out infinite;
  will-change:transform;
  pointer-events:none;
}
@keyframes rspGoldShimmer{
  0%,76%{transform:translate3d(0,0,0)}
  100%{transform:translate3d(400%,0,0)}
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle-bars span { transition: none; }
  .launch-rsp-shimmer-beam{animation:none !important;opacity:0}
  .limb, .starfield { animation: none !important; }
}
