:root {
  --void: #02030a;
  --void-soft: #060713;
  --gold: #d7b739;
  --gold-soft: rgba(215, 183, 57, 0.22);
  --cyan: #00e7ff;
  --cyan-soft: rgba(0, 231, 255, 0.24);
  --green: #00f58a;
  --text: #eff5f8;
  --muted: rgba(210, 222, 228, 0.46);
  --panel: rgba(5, 7, 17, 0.78);
  --panel-strong: rgba(4, 6, 15, 0.92);
  --line: rgba(215, 183, 57, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--void);
  color: var(--text);
  overflow: hidden;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 45%, rgba(24, 34, 52, 0.68), transparent 48%),
    radial-gradient(circle at 18% 82%, rgba(215, 183, 57, 0.16), transparent 32%),
    #02030a;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: radial-gradient(circle at center, #111525 0%, #02030a 70%);
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

.boot.hide {
  opacity: 0;
  visibility: hidden;
}

.boot-noise,
.scan-lines,
.space-vignette {
  pointer-events: none;
}

.boot-noise,
.scan-lines {
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 231, 255, 0.028) 3px 4px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.boot-mark {
  color: var(--gold);
  font-size: clamp(42px, 10vw, 110px);
  line-height: 1;
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  text-shadow: 0 0 24px rgba(215, 183, 57, 0.16);
}

.boot-sequence {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-align: center;
  padding: 0 24px;
}

.osiris-live {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 52% 48%, rgba(26, 39, 54, 0.6), transparent 44%),
    radial-gradient(circle at 90% 18%, rgba(215, 183, 57, 0.07), transparent 28%),
    linear-gradient(180deg, #01020a 0%, #040512 62%, #02030a 100%);
}

.globe-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.globe-canvas:active {
  cursor: grabbing;
}

.space-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(2, 3, 10, 0.96) 0%, rgba(2, 3, 10, 0.62) 16%, transparent 34%, transparent 66%, rgba(2, 3, 10, 0.82) 100%),
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(0, 0, 0, 0.16) 60%, rgba(0, 0, 0, 0.72) 100%);
}

.scan-lines {
  z-index: 4;
  opacity: 0.18;
}

.live-header {
  position: absolute;
  z-index: 8;
  left: max(24px, env(safe-area-inset-left));
  right: max(24px, env(safe-area-inset-right));
  top: max(26px, env(safe-area-inset-top));
  pointer-events: none;
}

.brand-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(14px, 4vw, 34px);
}

.live-header h1 {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  font-size: clamp(42px, 9vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.36em;
  text-shadow: 0 0 18px rgba(215, 183, 57, 0.14);
}

.live-header p {
  margin: 0;
  color: rgba(218, 222, 228, 0.20);
  letter-spacing: 0.38em;
  font-size: clamp(12px, 2vw, 22px);
  white-space: nowrap;
}

.support-pill {
  pointer-events: auto;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 10, 21, 0.78);
  box-shadow: inset 0 0 20px rgba(215, 183, 57, 0.06), 0 0 22px rgba(0, 0, 0, 0.28);
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.system-copy {
  margin-top: 22px;
  color: rgba(196, 207, 216, 0.13);
  font-size: 10px;
  letter-spacing: 0.28em;
  line-height: 1.7;
  max-width: 86ch;
}

.telemetry-card,
.event-card {
  position: absolute;
  z-index: 7;
  border: 1px solid rgba(0, 231, 255, 0.13);
  background: linear-gradient(180deg, rgba(5, 7, 17, 0.78), rgba(3, 4, 11, 0.56));
  backdrop-filter: blur(10px);
  box-shadow: 0 0 32px rgba(0, 231, 255, 0.06), inset 0 0 26px rgba(0, 231, 255, 0.025);
}

.telemetry-card {
  top: max(146px, calc(env(safe-area-inset-top) + 116px));
  left: max(24px, env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  gap: 11px 18px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.telemetry-card strong,
#zulu {
  color: var(--cyan);
}

.event-card {
  left: max(24px, env(safe-area-inset-left));
  bottom: calc(128px + env(safe-area-inset-bottom));
  display: grid;
  gap: 5px;
  width: min(330px, calc(100vw - 48px));
  padding: 14px 16px;
}

.event-kicker {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.22em;
}

.event-card strong {
  color: var(--cyan);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.event-card span:last-child {
  color: rgba(210, 222, 228, 0.45);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.floating-actions {
  position: absolute;
  z-index: 9;
  left: max(24px, env(safe-area-inset-left));
  bottom: calc(192px + env(safe-area-inset-bottom));
  display: flex;
  gap: 16px;
}

.floating-actions button {
  position: relative;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(215, 183, 57, 0.22);
  border-radius: 18px;
  background: rgba(7, 9, 20, 0.88);
  box-shadow: 0 0 26px rgba(0, 0, 0, 0.36), inset 0 0 22px rgba(0, 231, 255, 0.03);
  color: var(--gold);
}

.floating-actions button:nth-child(2) {
  color: var(--green);
}

.pin-icon,
.orbit-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.pin-icon::before {
  content: "⌖";
  font-size: 38px;
}

.orbit-icon::before {
  content: "✣";
  font-size: 36px;
  transform: rotate(45deg);
}

.bottom-nav {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: max(12px, env(safe-area-inset-bottom));
  margin: 0 auto;
  width: min(100vw, 860px);
  min-height: 86px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid rgba(215, 183, 57, 0.20);
  border-radius: 24px;
  background: rgba(5, 7, 17, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.34), inset 0 0 26px rgba(215, 183, 57, 0.035);
  overflow: hidden;
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: rgba(216, 218, 222, 0.38);
  display: grid;
  place-content: center;
  gap: 7px;
  cursor: pointer;
  letter-spacing: 0.12em;
}

.bottom-nav button.active {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 231, 255, 0.42);
}

.nav-icon {
  font-size: 28px;
  line-height: 1;
}

.bottom-nav small {
  font-size: 10px;
}

@media (max-width: 760px) {
  .live-header {
    left: max(24px, env(safe-area-inset-left));
    right: max(24px, env(safe-area-inset-right));
    top: max(26px, env(safe-area-inset-top));
  }

  .brand-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .live-header h1 {
    font-size: clamp(40px, 11vw, 54px);
    letter-spacing: 0.34em;
  }

  .live-header p {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 12px;
    letter-spacing: 0.28em;
    color: rgba(218, 222, 228, 0.18);
    overflow: hidden;
    text-overflow: clip;
  }

  .support-pill {
    align-self: start;
    padding: 8px 11px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .system-copy {
    margin-top: 22px;
    font-size: 9px;
    letter-spacing: 0.25em;
    opacity: 0.78;
  }

  .telemetry-card {
    display: none;
  }

  .event-card {
    display: none;
  }

  .floating-actions {
    left: max(24px, env(safe-area-inset-left));
    bottom: calc(144px + env(safe-area-inset-bottom));
    gap: 14px;
  }

  .floating-actions button {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .bottom-nav {
    width: calc(100vw - 2px);
    min-height: 82px;
    border-radius: 20px 20px 12px 12px;
  }

  .nav-icon {
    font-size: 24px;
  }

  .bottom-nav small {
    font-size: 8px;
  }
}

@media (max-width: 390px) {
  .live-header h1 { font-size: 38px; }
  .support-pill { font-size: 9px; padding: 7px 9px; }
  .system-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .boot,
  .boot.hide {
    transition: none;
  }
}
