html, body {
  margin: 0;
  padding: 0;
  background: #000;
  color: #d9e5e2;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  touch-action: none;
}

body > canvas {
  display: block;
}

#app-shell {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  --hud-pad: clamp(14px, 2vw, 30px);
  --hud-line: rgba(116, 241, 255, 0.42);
  --hud-line-soft: rgba(122, 255, 216, 0.22);
  --hud-glass: rgba(5, 18, 22, 0.16);
  --hud-glass-strong: rgba(7, 22, 28, 0.28);
  --hud-amber: #ffd45d;
  --visor-w: min(100vw, calc(100vh * 1.333333));
  --visor-h: calc(var(--visor-w) * 0.75);
}

#desktop-hud {
  position: fixed;
  inset: 0;
  z-index: 22;
  color: #dff7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  pointer-events: none;
  text-shadow: 0 1px 0 #001018, 0 0 10px rgba(0, 206, 255, 0.58);
}

#desktop-hud::before,
#desktop-hud::after {
  content: "";
  position: absolute;
  left: var(--hud-pad);
  right: var(--hud-pad);
  pointer-events: none;
}

#desktop-hud::before {
  top: var(--hud-pad);
  bottom: var(--hud-pad);
  border: 1px solid rgba(92, 229, 255, 0.11);
  border-top-color: rgba(111, 240, 255, 0.32);
  border-bottom-color: rgba(115, 255, 206, 0.22);
  box-shadow:
    inset 0 0 40px rgba(0, 210, 255, 0.035),
    0 0 36px rgba(0, 210, 255, 0.035);
}

#desktop-hud::after {
  top: 50%;
  width: min(340px, 28vw);
  height: min(168px, 18vh);
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  border-top: 1px solid rgba(124, 255, 210, 0.16);
  border-bottom: 1px solid rgba(124, 255, 210, 0.13);
  opacity: 0.8;
}

#desktop-hud-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: var(--visor-w);
  height: var(--visor-h);
  transform: translate(-50%, -50%);
  opacity: 0.40;
  mix-blend-mode: screen;
  filter: saturate(0.88) brightness(1.34) contrast(0.92);
  image-rendering: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.hud-source-readout {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid var(--hud-line-soft);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(13, 40, 47, 0.30), rgba(3, 10, 13, 0.12));
  color: #5ee7ff;
  font-size: clamp(10px, 0.76vw, 13px);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  backdrop-filter: blur(5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(0, 213, 255, 0.12);
}

.hud-source-readout span {
  color: #f1f4f0;
  font-weight: 800;
  text-shadow: 0 1px 0 #000;
}

.hud-source-readout b {
  color: #05a7ff;
  font-weight: 800;
}

#hud-energy {
  left: var(--hud-pad);
  top: var(--hud-pad);
}

#hud-compass {
  left: 50%;
  top: calc(var(--hud-pad) + 2px);
  width: min(330px, 34vw);
  transform: translateX(-50%);
  justify-content: center;
  color: #00b7ff;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 900;
  border-color: rgba(91, 178, 255, 0.34);
  background:
    linear-gradient(90deg, transparent, rgba(13, 35, 70, 0.24) 18%, rgba(0, 13, 34, 0.38) 50%, rgba(13, 35, 70, 0.24) 82%, transparent);
}

#hud-compass::before,
#hud-compass::after {
  content: "";
  flex: 1;
  max-width: 43px;
  height: 1px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 120, 255, 0.9) 0 2px, transparent 2px 8px);
  box-shadow: 0 0 6px rgba(0, 132, 255, 0.9);
}

#date-readout {
  color: #00d2ff;
}

#hud-date {
  right: var(--hud-pad);
  top: var(--hud-pad);
}

#hud-video-dock {
  position: absolute;
  left: 50%;
  top: clamp(74px, 10vh, 118px);
  width: min(54vw, 700px);
  aspect-ratio: 20 / 9;
  transform: translateX(-50%);
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(91, 220, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(8, 34, 48, 0.18), rgba(0, 8, 12, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 28px rgba(0, 213, 255, 0.13);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease;
  backdrop-filter: blur(2px);
}

#hud-video-dock::before,
#hud-video-dock::after {
  content: "";
  position: absolute;
  width: 44px;
  height: 18px;
  border-color: rgba(121, 255, 230, 0.42);
  pointer-events: none;
}

#hud-video-dock::before {
  left: -1px;
  top: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

#hud-video-dock::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

body.video-active #hud-video-dock {
  opacity: 1;
  visibility: visible;
}

#hud-video-screen {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.54);
  image-rendering: auto;
}

#hud-video-menu {
  position: absolute;
  top: calc(var(--hud-pad) + 46px);
  left: var(--hud-pad);
  width: clamp(170px, 16vw, 250px);
  box-sizing: border-box;
  pointer-events: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#hud-video-menu:empty {
  display: none;
}

#hud-video-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 32px;
  box-sizing: border-box;
  padding: 6px 9px;
  border: 1px solid rgba(91, 220, 255, 0.24);
  border-left: 3px solid rgba(91, 220, 255, 0.42);
  border-radius: 4px;
  background:
    linear-gradient(120deg, rgba(0, 28, 48, 0.28), rgba(2, 9, 13, 0.10));
  color: rgba(228, 255, 250, 0.88);
  font: 850 11px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

#hud-video-toggle:hover {
  border-color: rgba(120, 245, 255, 0.45);
  background: rgba(0, 49, 68, 0.28);
}

#hud-video-toggle .count {
  color: rgba(96, 236, 255, 0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

#hud-video-list {
  display: none;
  margin-top: 5px;
  padding: 6px;
  border: 1px solid rgba(111, 216, 228, 0.16);
  border-radius: 4px;
  background:
    linear-gradient(140deg, rgba(4, 22, 28, 0.30), rgba(2, 7, 9, 0.12));
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(0, 213, 255, 0.08);
}

#hud-video-menu.open #hud-video-list {
  display: grid;
  gap: 5px;
}

.hud-video-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 27px;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid rgba(117, 224, 170, 0.14);
  border-radius: 4px;
  background: rgba(2, 12, 17, 0.16);
  color: rgba(232, 255, 250, 0.86);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: left;
  cursor: pointer;
}

.hud-video-option:hover,
.hud-video-option.active {
  border-color: rgba(255, 212, 93, 0.42);
  background: linear-gradient(90deg, rgba(255, 212, 93, 0.18), rgba(0, 43, 52, 0.12));
  color: #fff1b3;
}

.hud-video-option .meta {
  color: rgba(141, 244, 255, 0.70);
  font-size: 9px;
}

#hud-area-switcher {
  position: absolute;
  top: calc(var(--hud-pad) + 46px);
  right: var(--hud-pad);
  width: clamp(190px, 18vw, 278px);
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(117, 224, 170, 0.18);
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(8, 28, 31, 0.24), rgba(3, 9, 12, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 20px rgba(50, 255, 215, 0.08);
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

#hud-area-switcher:empty {
  display: none;
}

.hud-switch-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: rgba(210, 255, 246, 0.76);
  font: 800 10px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
}

.hud-switch-title span:last-child {
  color: rgba(96, 236, 255, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hud-area-options {
  display: grid;
  gap: 5px;
}

.hud-area-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid rgba(111, 216, 228, 0.16);
  border-left: 3px solid rgba(111, 216, 228, 0.26);
  border-radius: 4px;
  background: rgba(2, 12, 17, 0.18);
  color: rgba(228, 255, 250, 0.82);
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: left;
  cursor: pointer;
}

.hud-area-option:hover {
  border-color: rgba(120, 245, 255, 0.42);
  background: rgba(0, 49, 68, 0.28);
}

.hud-area-option.active {
  border-color: rgba(255, 212, 93, 0.52);
  border-left-color: rgba(255, 212, 93, 0.86);
  background: linear-gradient(90deg, rgba(255, 212, 93, 0.20), rgba(0, 43, 52, 0.16));
  color: #fff1b3;
}

.hud-area-option .key {
  color: rgba(117, 224, 170, 0.90);
}

.hud-area-option .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-area-option .area {
  color: rgba(141, 244, 255, 0.70);
  font-size: 10px;
}

#hud-report {
  position: absolute;
  left: var(--hud-pad);
  top: 50%;
  width: clamp(150px, 13vw, 230px);
  max-height: min(330px, 36vh);
  transform: translateY(-50%) perspective(700px) rotateY(5deg);
  display: flex;
  align-items: flex-start;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid rgba(141, 185, 255, 0.20);
  border-left: 3px solid rgba(145, 179, 255, 0.48);
  border-radius: 4px;
  background:
    linear-gradient(100deg, rgba(20, 37, 85, 0.24), rgba(1, 9, 20, 0.07));
  color: rgba(244, 248, 255, 0.90);
  font: 800 clamp(12px, 1.04vw, 18px)/1.10 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: 0 1px 0 #000, 0 0 9px rgba(68, 111, 255, 0.58);
  overflow: hidden;
  backdrop-filter: blur(3px);
  white-space: pre-line;
}

#hud-biochip {
  position: absolute;
  left: var(--hud-pad);
  bottom: var(--hud-pad);
  width: clamp(260px, 27vw, 420px);
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(112, 238, 255, 0.24);
  border-left: 3px solid rgba(84, 232, 255, 0.50);
  border-radius: 4px;
  background:
    linear-gradient(120deg, rgba(0, 31, 56, 0.28), rgba(2, 8, 15, 0.10));
  overflow: hidden;
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.18;
  backdrop-filter: blur(5px);
}

#hud-biochip b,
#hud-biochip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hud-biochip b {
  color: #f8f4ff;
  font-size: clamp(12px, 0.96vw, 15px);
  font-weight: 750;
}

#hud-biochip span {
  color: #54e8ff;
  font-size: clamp(10px, 0.78vw, 12px);
}

#hud-status-module {
  position: absolute;
  right: var(--hud-pad);
  bottom: var(--hud-pad);
  width: clamp(280px, 30vw, 470px);
  height: clamp(104px, 14vh, 150px);
  box-sizing: border-box;
  border: 1px solid rgba(255, 212, 93, 0.24);
  border-right: 3px solid rgba(255, 212, 93, 0.42);
  border-radius: 4px;
  background:
    linear-gradient(100deg, rgba(34, 20, 0, 0.16), rgba(0, 29, 35, 0.18));
  color: #d7fbff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.05;
  overflow: hidden;
  transform: perspective(700px) rotateY(-4deg);
  backdrop-filter: blur(5px);
}

#hud-status-module img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.14;
  image-rendering: auto;
  mix-blend-mode: screen;
}

#hud-module-title {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  color: var(--hud-amber);
  font: 850 clamp(12px, 0.96vw, 15px)/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  text-shadow: 0 1px 0 #00181d;
}

#hud-module-grid {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 40px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px 12px;
  font-size: clamp(10px, 0.78vw, 12px);
}

#hud-module-grid span {
  color: #70f7e7;
}

#hud-module-grid b {
  color: #f1ffd7;
  font-weight: 800;
  text-align: right;
}

#hud-module-meter {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 13px;
  height: 8px;
  border: 1px solid rgba(89, 255, 193, 0.56);
  background: rgba(0, 20, 45, 0.38);
}

#hud-module-meter span {
  display: block;
  width: 72%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 174, 255, 0.9), rgba(104, 255, 150, 0.95));
  box-shadow: 0 0 10px rgba(29, 255, 189, 0.8);
}

body.xr-active #desktop-hud {
  display: none;
}

.hud-panel {
  box-sizing: border-box;
  border: 1px solid rgba(111, 216, 228, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(9, 18, 19, 0.86), rgba(4, 9, 11, 0.72)),
    rgba(3, 7, 10, 0.78);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.panel-kicker,
.panel-heading span,
#asset-readout {
  color: #87a5a9;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-heading h2 {
  margin: 0;
  color: #e9f9f6;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
}

#overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  width: min(390px, calc(100vw - 420px));
  min-width: 300px;
  padding: 14px 16px 13px;
  pointer-events: none;
}

#overlay h1 {
  margin: 3px 0 11px;
  color: #fff8de;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
}

#overlay p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.42;
}

#telemetry-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

#telemetry-strip span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(117, 224, 170, 0.22);
  border-radius: 6px;
  background: rgba(10, 29, 28, 0.72);
  color: #c9fff0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#world-readout {
  color: #ffe16a;
}

#hint {
  color: #c9d8d5;
}

#status {
  color: #64d3e6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-height: 34px;
  overflow: hidden;
}

#asset-readout {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#vr-button-mount {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}

#vr-button-mount button,
#vr-button-mount a {
  min-width: 150px;
  min-height: 38px;
  font: 700 12px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 11px 18px;
  background: rgba(2, 6, 8, 0.72);
  color: #edf7f4;
  border: 1px solid rgba(255, 209, 90, 0.5);
  border-radius: 6px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

#vr-button-mount button:hover,
#vr-button-mount a:hover {
  background: rgba(19, 35, 31, 0.86);
}

#right-hud {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(354px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

@media (min-width: 981px) {
  #overlay {
    display: none;
  }

  #right-hud {
    top: calc(var(--hud-pad) + 184px);
    right: var(--hud-pad);
    bottom: auto;
    z-index: 26;
    width: clamp(190px, 17vw, 264px);
    gap: 0;
    opacity: 0.54;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  #right-hud:hover {
    opacity: 0.96;
    transform: translateY(1px);
  }

  #right-hud #scene-panel {
    display: none;
  }

  #right-hud .map-panel {
    padding: 8px;
    border-color: rgba(118, 242, 255, 0.16);
    background:
      linear-gradient(180deg, rgba(4, 22, 24, 0.18), rgba(2, 7, 9, 0.08));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 0 18px rgba(0, 213, 255, 0.08);
    backdrop-filter: blur(3px);
  }

  #right-hud .panel-heading {
    margin-bottom: 5px;
  }

  #right-hud .panel-heading h2 {
    font-size: 11px;
    color: rgba(230, 255, 249, 0.82);
  }

  #right-hud .panel-heading span {
    font-size: 9px;
    color: rgba(155, 228, 225, 0.65);
  }

  #right-hud #minimap {
    border-color: rgba(112, 238, 255, 0.14);
    background: rgba(0, 0, 0, 0.16);
    opacity: 0.76;
  }

  #vr-button-mount {
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 24;
    opacity: 0.42;
  }

  #vr-button-mount .vr-unsupported {
    display: none;
  }

  #vr-button-mount:hover {
    opacity: 0.92;
  }
}

.map-panel {
  flex: 0 0 auto;
  padding: 10px;
}

#minimap {
  display: block;
  width: 100%;
  height: auto;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(117, 224, 170, 0.24);
  border-radius: 6px;
  image-rendering: crisp-edges;
}

#scene-panel {
  min-height: 0;
  padding: 12px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
}

#scene-panel hr {
  flex: 0 0 auto;
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(135, 165, 169, 0.24);
  margin: 10px 0;
}

#scene-nav-list {
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
}

#scene-nav-list .nav-row {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 28px;
  color: #aebfbe;
  padding: 5px 8px;
  border: 1px solid rgba(111, 216, 228, 0.12);
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

#scene-nav-list .nav-row.cur {
  color: #fff8dc;
  border-color: rgba(255, 209, 90, 0.35);
  border-left-color: #ffd15a;
  background: linear-gradient(90deg, rgba(255, 209, 90, 0.18), rgba(255, 209, 90, 0.05));
}

#scene-nav-list .nav-row span:first-child {
  color: #75e0aa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

#scene-nav-list .nav-row .lbl {
  min-width: 0;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-heading {
  flex: 0 0 auto;
}

#scene-scrubber button {
  font: inherit;
  padding: 5px 11px;
  background: #2a2a2a;
  color: #e7e7e7;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
}
#scene-scrubber button:hover { background: #333; }

#inv-list {
  min-height: 0;
  list-style: none;
  margin: 0;
  padding: 0 3px 0 0;
  overflow-y: auto;
  scrollbar-color: rgba(100, 211, 230, 0.65) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

#inv-list li {
  margin: 0 0 7px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(184, 148, 255, 0.12);
  border-left: 3px solid #b894ff;
  border-radius: 6px;
}

#inv-list li .name {
  display: block;
  color: #d1b8ff;
  font-weight: 800;
  line-height: 1.25;
}

#inv-list li .desc {
  display: -webkit-box;
  margin-top: 4px;
  color: #bac7c4;
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

@media (max-width: 980px) {
  #desktop-hud {
    display: none;
  }

  #overlay {
    right: 16px;
    width: auto;
    min-width: 0;
  }

  #right-hud {
    top: auto;
    left: 16px;
    width: auto;
    max-height: 42vh;
    display: grid;
    grid-template-columns: minmax(220px, 0.82fr) minmax(260px, 1.18fr);
  }

  #scene-panel {
    max-height: 42vh;
  }
}

@media (max-width: 680px) {
  #overlay {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 10px 12px;
  }

  #overlay h1 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  #overlay p {
    margin-top: 6px;
  }

  #status,
  #asset-readout {
    display: none;
  }

  #vr-button-mount {
    display: none;
  }

  #right-hud {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 42vh;
    grid-template-columns: 1fr;
  }

  .map-panel {
    display: none;
  }

  #telemetry-strip {
    grid-template-columns: 1fr 1fr;
  }

  #frame-readout {
    display: none;
  }
}
