:root {
  color-scheme: dark;
  --ink: #f6fbff;
  --muted: #aab7c8;
  --glass: rgba(5, 10, 18, 0.68);
  --glass-strong: rgba(7, 14, 24, 0.86);
  --line: rgba(255, 255, 255, 0.16);
  --accent: #65f3ff;
}

* {
  box-sizing: border-box;
}

html,
body,
#app,
#scene-root {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #03050a;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#hud {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: clamp(14px, 2vw, 24px);
  pointer-events: none;
}

.hud-cluster {
  width: min(360px, calc(100vw - 28px));
  padding: 14px 16px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.5vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.status-row span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

#touch-orb {
  position: fixed;
  left: clamp(14px, 2vw, 24px);
  bottom: clamp(14px, 2vw, 24px);
  z-index: 4;
  min-width: min(220px, calc(100vw - 28px));
  min-height: 52px;
  border: 1px solid rgba(111, 244, 255, 0.54);
  border-radius: 8px;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(117, 245, 255, 0.98), rgba(20, 151, 216, 0.98));
  color: #02131a;
  box-shadow:
    0 18px 44px rgba(17, 181, 225, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: auto;
}

#touch-orb:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.84);
  outline-offset: 3px;
}

#touch-orb:active {
  transform: translateY(1px);
}

#VRButton {
  right: clamp(14px, 2vw, 24px) !important;
  bottom: clamp(14px, 2vw, 24px) !important;
  left: auto !important;
  min-width: 146px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  background: var(--glass-strong) !important;
  color: var(--ink) !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34) !important;
}

@media (max-width: 560px) {
  #hud {
    padding-bottom: 84px;
  }

  .hud-cluster {
    padding: 12px 13px 13px;
  }

  #touch-orb {
    right: 14px;
    width: auto;
  }

  #VRButton {
    bottom: 82px !important;
  }
}
