:root {
  color-scheme: dark;
  --bg: #050607;
  --glass: rgba(2, 5, 6, 0.42);
  --glass-strong: rgba(3, 6, 7, 0.82);
  --line: rgba(218, 242, 241, 0.22);
  --text: #f4fbf9;
  --muted: #9aa9a6;
  --green: #8aff9f;
  --amber: #ffd66e;
  --red: #ff5f5f;
  --cyan: #80e8ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

#sim {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100vh;
  filter: contrast(1.04) saturate(1.06);
}

#realityFrame {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: #111;
  transition: opacity 260ms ease;
}

body.reality-map #realityFrame {
  opacity: 1;
}

#boot,
#hud {
  position: fixed;
  inset: 0;
}

#boot {
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(18rem, 0.72fr) minmax(34rem, 1fr);
  align-items: center;
  gap: 2.2rem;
  padding: clamp(1.5rem, 4.8vw, 4rem);
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(2, 4, 5, 0.06), rgba(2, 4, 5, 0.72)),
    linear-gradient(90deg, rgba(2, 4, 5, 0.88), rgba(2, 4, 5, 0.24) 64%, transparent);
}

#boot.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.intro {
  max-width: 48rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(3.2rem, 6.2vw, 7rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subtitle {
  max-width: 42rem;
  margin: 1.15rem 0 0;
  color: #c9d7d3;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.75;
}

.start-panel {
  width: 100%;
  max-width: 62rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.map-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.aircraft-selector,
.gameplay-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.map-card,
.aircraft-card,
.gameplay-card {
  min-height: 5.6rem;
  padding: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.map-card span,
.aircraft-card span,
.gameplay-card span {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.map-card strong,
.aircraft-card strong,
.gameplay-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 900;
}

.map-card small,
.aircraft-card small,
.gameplay-card small,
.map-card em {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.map-card em {
  color: rgba(150, 255, 170, 0.72);
  font-style: normal;
}

.map-card.active,
.aircraft-card.active,
.gameplay-card.active {
  border-color: rgba(255, 214, 110, 0.9);
  background: rgba(255, 214, 110, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 110, 0.35), 0 14px 46px rgba(0, 0, 0, 0.22);
}

.control-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1.25rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.control-grid strong {
  color: var(--text);
  font-weight: 760;
}

.start-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.15rem;
  padding: 0.85rem 0 0;
  background: linear-gradient(180deg, rgba(5, 6, 7, 0), rgba(5, 6, 7, 0.94) 24%);
}

.start-actions button,
.button-row button,
.panel-tab {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 820;
}

.boot-status {
  grid-column: 1 / -1;
  margin: 0 0 0.2rem;
  color: rgba(238, 247, 243, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06rem;
  text-transform: uppercase;
}

#startButton {
  min-width: 13rem;
  height: 3.15rem;
  background: #eef7f3;
  color: #07100d;
}

#startButton:disabled {
  cursor: wait;
  opacity: 0.62;
}

#connectBootButton {
  min-width: 10rem;
  height: 3.15rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

#hud {
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

#hud.active {
  opacity: 1;
}

#hud::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.08) 100%);
  mix-blend-mode: soft-light;
}

#signalLossOverlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--signal-noise, 0);
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

#signalLossOverlay::before,
#signalLossOverlay::after {
  content: "";
  position: absolute;
  inset: -8%;
}

#signalLossOverlay::before {
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(128, 232, 255, 0.08) 0 2px, rgba(255, 80, 80, 0.05) 2px 4px, transparent 4px 11px);
  filter: contrast(1.8);
  transform: translateX(calc(var(--signal-jitter, 0) * 1px));
}

#signalLossOverlay::after {
  background:
    radial-gradient(circle at 50% 50%, transparent 32%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(180deg, transparent 0 46%, rgba(255, 255, 255, 0.18) 49%, transparent 53% 100%);
}

#signalLossOverlay b {
  position: absolute;
  left: 50%;
  top: 42%;
  padding: 0.58rem 0.9rem;
  border: 1px solid rgba(255, 95, 95, 0.68);
  border-radius: 4px;
  background: rgba(6, 6, 7, 0.72);
  color: #fff;
  font-size: clamp(0.8rem, 1.4vw, 1.15rem);
  font-weight: 920;
  letter-spacing: 0.16rem;
  opacity: 0;
  text-shadow: 0 0 14px rgba(255, 95, 95, 0.8);
  transform: translate(-50%, -50%);
}

body.signal-weak #signalValue,
body.signal-weak #bitrateValue,
body.signal-weak #latencyValue,
body.signal-weak #djiBitrateValue {
  color: var(--amber);
}

body.signal-lost #signalValue,
body.signal-lost #bitrateValue,
body.signal-lost #latencyValue,
body.signal-lost #djiBitrateValue {
  color: var(--red);
}

body.signal-lost #signalLossOverlay b {
  opacity: 1;
}

body.clean-hud .osd-top,
body.clean-hud .osd-bottom,
body.clean-hud .dji-side-menu,
body.clean-hud .dji-camera-strip,
body.clean-hud .dji-camera-params,
body.clean-hud .dji-right-status,
body.clean-hud .dji-bottom-osd,
body.clean-hud .dji-warnings,
body.clean-hud .dji-bottom-marker,
body.clean-hud .dji-home-button,
body.clean-hud .dji-more-button,
body.clean-hud .dji-back-button,
body.clean-hud .dji-left-cards,
body.clean-hud .dji-radar-panel,
body.clean-hud .dji-photo-panel,
body.clean-hud .dji-camera-actions,
body.clean-hud .micro-readouts,
body.clean-hud #homePointIndicator,
body.clean-hud .panel-tab,
body.clean-hud .touch-controls {
  opacity: 0;
}

body.info-hidden .dji-camera-strip,
body.info-hidden .dji-camera-params,
body.info-hidden .dji-photo-panel,
body.info-hidden .dji-camera-actions,
body.info-hidden .dji-right-status,
body.info-hidden #returnHomeButton {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.info-hidden .dji-bottom-osd,
body.info-hidden .osd-bottom {
  opacity: 1;
  visibility: visible;
}

.dji-rails {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dji-rails::before,
.dji-rails::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(3.4rem, 7.1vw, 6.8rem);
  background: rgba(0, 0, 0, 0.88);
  transition: opacity 160ms ease, visibility 160ms ease;
}

.dji-rails::before {
  left: 0;
}

.dji-rails::after {
  right: 0;
}

.dji-home-button,
.dji-more-button {
  position: absolute;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  border: 0;
  background: transparent;
  color: #fff;
  pointer-events: auto;
  cursor: pointer;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.dji-home-button,
.dji-side-menu,
.dji-camera-strip,
.dji-camera-params,
.dji-right-status,
.dji-warnings {
  transition: opacity 160ms ease, visibility 160ms ease;
}

body:not(.dji-chrome-open) .dji-rails::before,
body:not(.dji-chrome-open) .dji-rails::after,
body:not(.dji-chrome-open) .dji-home-button,
body:not(.dji-chrome-open) .dji-side-menu,
body:not(.dji-chrome-open) .dji-camera-strip,
body:not(.dji-chrome-open) .dji-camera-params,
body:not(.dji-chrome-open) .dji-right-status,
body:not(.dji-chrome-open) .dji-warnings {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dji-home-button {
  left: clamp(0.55rem, 2.7vw, 2rem);
  top: 1.4rem;
}

.dji-home-button span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.35rem;
  height: 1.1rem;
  border: 3px solid currentColor;
  border-top: 0;
  transform: translate(-50%, -34%);
}

.dji-home-button span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.74rem;
  width: 1.08rem;
  height: 1.08rem;
  border-left: 3px solid currentColor;
  border-top: 3px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.dji-more-button {
  right: clamp(0.65rem, 2.7vw, 2rem);
  top: 1.25rem;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.08rem;
}

.dji-side-menu {
  position: absolute;
  left: clamp(4.5rem, 14.6vw, 15rem);
  top: 6.4rem;
  z-index: 2;
  display: grid;
  width: 9.2rem;
  padding: 0.38rem;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(15, 18, 20, 0.86), rgba(16, 18, 20, 0.74));
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.dji-menu-item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.45rem;
  min-height: 7rem;
  border: 2px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-weight: 850;
}

.dji-menu-item.active {
  border-color: #ffd000;
  color: #ffd000;
  background: rgba(0, 0, 0, 0.32);
}

.dji-menu-item i {
  position: relative;
  display: block;
  width: 2rem;
  height: 2rem;
}

.signal-icon {
  background: linear-gradient(90deg, transparent 0 15%, currentColor 15% 30%, transparent 30% 43%, currentColor 43% 58%, transparent 58% 70%, currentColor 70% 85%, transparent 85%);
  clip-path: inset(28% 0 6% 0);
}

.album-icon {
  border: 3px solid currentColor;
}

.album-icon::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  bottom: 0.25rem;
  height: 0.75rem;
  background: currentColor;
  clip-path: polygon(0 100%, 38% 35%, 58% 60%, 76% 25%, 100% 100%);
}

.transfer-icon::before,
.transfer-icon::after {
  content: "";
  position: absolute;
  left: 0.1rem;
  right: 0.1rem;
  height: 0.28rem;
  background: currentColor;
}

.transfer-icon::before {
  top: 0.55rem;
  transform: skewX(-35deg);
}

.transfer-icon::after {
  bottom: 0.55rem;
  transform: skewX(35deg);
}

.settings-icon {
  border: 0.5rem solid currentColor;
  border-radius: 50%;
}

.settings-icon::after {
  content: "";
  position: absolute;
  inset: 0.34rem;
  border-radius: 50%;
  background: rgba(6, 7, 8, 0.9);
}

.dji-camera-strip {
  position: absolute;
  left: 50%;
  top: 3.5rem;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 4rem) 9.1rem;
  grid-template-rows: 4rem 1.6rem;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem 0.9rem;
  border-radius: 5px;
  background: rgba(31, 34, 36, 0.84);
  box-shadow: 0 18px 72px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  transform: translateX(-50%);
}

.camera-icon-button,
.capture-toggle button {
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
}

.camera-icon-button {
  width: 4rem;
  height: 4rem;
}

.camera-icon-button.active,
.capture-toggle button.active {
  border-color: #ffd000;
  box-shadow: inset 0 0 0 1px rgba(255, 208, 0, 0.28);
}

.brightness-control {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  gap: 0.65rem;
  height: 4rem;
  padding: 0 0.8rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
}

.brightness-control span {
  color: #fff;
  font-size: 1.55rem;
}

.brightness-control i {
  display: block;
  height: 1.55rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.brightness-control b {
  display: block;
  width: 66%;
  height: 100%;
  background: #f3f3f3;
}

.dji-camera-strip > strong {
  grid-column: 1 / -1;
  justify-self: center;
  color: #f4f4f4;
  font-size: 1rem;
  font-weight: 850;
}

.dji-camera-params {
  position: absolute;
  left: 50%;
  bottom: 6.25rem;
  z-index: 2;
  display: grid;
  grid-template-columns: 8.5rem repeat(6, minmax(6.8rem, auto));
  align-items: stretch;
  max-width: min(calc(100vw - 15rem), 78rem);
  min-height: 4.8rem;
  border-radius: 4px;
  background: rgba(25, 25, 25, 0.78);
  color: #fff;
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transform: translateX(-50%);
}

.dji-camera-params > div {
  display: grid;
  align-content: center;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.dji-camera-params > div:first-child {
  border-left: 0;
}

.dji-camera-params span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
  font-weight: 820;
}

.dji-camera-params span b {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  color: rgba(0, 0, 0, 0.78);
  font-size: 0.68rem;
}

.dji-camera-params strong {
  font-size: 1rem;
  font-weight: 850;
}

.capture-toggle {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.42rem !important;
  border: 2px solid #ffd000 !important;
  border-radius: 5px;
  padding: 0.5rem !important;
}

.capture-toggle button {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  font-size: 1rem;
}

.dji-right-status {
  position: absolute;
  right: clamp(5.4rem, 11.8vw, 15rem);
  top: 33%;
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: 0.55rem;
  color: #fff;
  font-size: 0.96rem;
  font-style: italic;
  font-weight: 900;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.85);
}

.dji-right-status span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dji-right-status b {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.osd-top {
  position: absolute;
  top: 0.62rem;
  left: 1.1rem;
  right: 1.1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 0.8rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.osd-cluster {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: #dce9e5;
  font-size: clamp(0.68rem, 1.45vw, 0.86rem);
  font-weight: 820;
  letter-spacing: 0.02rem;
}

.osd-cluster.center {
  justify-content: center;
  max-width: min(48vw, 34rem);
}

.osd-cluster.right {
  justify-content: flex-end;
}

.osd-cluster span,
.osd-cluster strong {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0 0.24rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.osd-cluster.center strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-dot {
  width: 0.52rem;
  min-height: 0.52rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--red) !important;
  box-shadow: 0 0 14px rgba(255, 95, 95, 0.65);
}

#flightMode {
  color: var(--green);
}

#sourceValue {
  color: var(--amber);
}

#reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7rem;
  height: 7rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(244, 251, 249, 0.12);
  border-radius: 50%;
  opacity: 0.94;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.45));
}

#reticle::before,
#reticle::after,
#reticle i::before,
#reticle i::after {
  content: "";
  position: absolute;
  background: rgba(244, 251, 249, 0.78);
  box-shadow: 0 0 10px rgba(128, 232, 255, 0.36);
}

#reticle::before {
  left: 50%;
  top: -0.7rem;
  width: 1px;
  height: 1.75rem;
}

#reticle::after {
  left: 50%;
  bottom: -0.7rem;
  width: 1px;
  height: 1.75rem;
}

#reticle i::before {
  top: 50%;
  left: -0.7rem;
  width: 1.75rem;
  height: 1px;
}

#reticle i::after {
  top: 50%;
  right: -0.7rem;
  width: 1.75rem;
  height: 1px;
}

#droneCenterPoint {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.52rem;
  height: 0.52rem;
  border: 1px solid rgba(244, 251, 249, 0.92);
  border-radius: 50%;
  background: rgba(8, 12, 13, 0.42);
  box-shadow: 0 0 0 2px rgba(128, 232, 255, 0.08), 0 0 18px rgba(244, 251, 249, 0.28);
  transform: translate(-50%, -50%);
}

#droneCenterPoint::before,
#droneCenterPoint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(244, 251, 249, 0.8);
  transform: translate(-50%, -50%);
}

#droneCenterPoint::before {
  width: 1.65rem;
  height: 1px;
}

#droneCenterPoint::after {
  width: 1px;
  height: 1.65rem;
}

#centerHeadingValue {
  position: absolute;
  left: 50%;
  top: calc(50% + 1.25rem);
  color: rgba(244, 251, 249, 0.72);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.06rem;
  transform: translateX(-50%);
}

#horizonLine {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(42rem, 62vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72) 18%, rgba(255, 255, 255, 0.72) 82%, transparent);
  transform: translate(-50%, -50%);
  transform-origin: center;
  opacity: 0.78;
}

#homePointIndicator {
  position: absolute;
  left: 50%;
  bottom: 5.45rem;
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  color: rgba(244, 251, 249, 0.86);
  font-size: 0.66rem;
  font-weight: 850;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.78);
  transform: translateX(-50%);
  transition: left 120ms linear;
}

#homePointIndicator span {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid rgba(244, 251, 249, 0.55);
  border-radius: 50%;
  background: rgba(4, 8, 9, 0.2);
}

#homePointIndicator.behind span {
  border-color: rgba(255, 214, 110, 0.78);
  color: var(--amber);
}

#homePointIndicator b {
  font-size: 0.58rem;
  white-space: nowrap;
}

.osd-bottom {
  position: absolute;
  left: 50%;
  bottom: 0.78rem;
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: 1.05rem;
  transform: translateX(-50%);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

.osd-bottom div {
  min-width: 4.65rem;
  padding: 0.25rem 0.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
}

.osd-bottom span,
.micro-readouts span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08rem;
}

.osd-bottom strong {
  display: block;
  margin-top: 0.08rem;
  color: var(--text);
  font-size: 0.98rem;
}

.dji-bottom-osd {
  position: absolute;
  left: 50%;
  bottom: 2.35rem;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto auto minmax(22rem, auto);
  align-items: end;
  gap: 1.15rem;
  color: #fff;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.88);
  transform: translateX(-50%);
  pointer-events: none;
}

.mode-tile {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  background: #fff;
  color: #151515;
  font-size: 1.65rem;
  font-style: italic;
  font-weight: 950;
  transform: skewX(-10deg);
}

.dji-speed-block {
  display: grid;
  gap: 0.1rem;
  min-width: 7.6rem;
  font-style: italic;
  font-weight: 900;
}

.dji-speed-block span {
  font-size: 0.9rem;
}

.dji-speed-block strong {
  font-size: 1.08rem;
}

.dji-link-block {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.mini-battery {
  display: inline-grid;
  place-items: center;
  min-width: 2.9rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-radius: 3px;
  font-style: italic;
}

.mini-battery::after {
  content: "";
  width: 0.18rem;
  height: 0.55rem;
  margin-right: -0.35rem;
  border-radius: 0 2px 2px 0;
  background: currentColor;
}

.warning-dot {
  color: #ff3044;
  font-size: 1.25rem;
  font-style: normal;
  line-height: 1;
}

.goggle-battery {
  position: relative;
  padding-left: 2rem;
  font-size: 1.25rem;
  font-style: italic;
}

.goggle-battery::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.55rem;
  height: 0.78rem;
  border: 2px solid currentColor;
  border-radius: 1rem 1rem 0.45rem 0.45rem;
  transform: translateY(-50%);
}

.dji-warnings {
  position: absolute;
  right: clamp(5.6rem, 14.6vw, 19rem);
  bottom: 12.2rem;
  z-index: 2;
  display: grid;
  gap: 0.45rem;
  width: min(25rem, 34vw);
  color: #fff;
  font-size: 0.96rem;
  font-weight: 840;
  pointer-events: none;
}

.dji-warnings div {
  padding: 0.75rem 0.9rem;
  border-radius: 4px;
  background: rgba(21, 21, 23, 0.86);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.dji-warnings .amber {
  border-left: 4px solid #f3a32a;
  color: #f3a32a;
}

.dji-bottom-marker {
  position: absolute;
  left: 50%;
  bottom: 2.1rem;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.12rem;
  pointer-events: none;
  transform: translateX(-50%);
}

.dji-bottom-marker::before {
  content: "";
  width: 1.55rem;
  height: 1.55rem;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: rgba(120, 120, 120, 0.18);
}

.dji-bottom-marker span {
  width: 0;
  height: 0;
  border-left: 0.55rem solid transparent;
  border-right: 0.55rem solid transparent;
  border-top: 0.78rem solid #ffd000;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65));
}

.micro-readouts {
  position: absolute;
  right: 1rem;
  top: 4rem;
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85);
}

.micro-readouts b {
  color: var(--text);
  font-size: 0.9rem;
}

.touch-controls {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 5.8rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.stick {
  position: relative;
  width: clamp(7rem, 15vw, 10rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 48%),
    rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.05), 0 10px 36px rgba(0, 0, 0, 0.25);
  opacity: 0.58;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.stick span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(244, 251, 249, 0.7);
  box-shadow: 0 0 18px rgba(128, 232, 255, 0.32);
  transform: translate(-50%, -50%);
}

.stick b {
  position: absolute;
  left: 50%;
  bottom: -1.6rem;
  color: rgba(244, 251, 249, 0.72);
  font-size: 0.68rem;
  letter-spacing: 0.08rem;
  white-space: nowrap;
  transform: translateX(-50%);
}

.stick.active {
  opacity: 0.9;
}

.panel-tab {
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 2.9rem;
  height: 2.4rem;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  pointer-events: auto;
  transform: translateY(-50%);
}

.info-toggle {
  position: absolute;
  right: 1rem;
  top: calc(50% - 3.1rem);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 3.45rem;
  height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(6, 12, 15, 0.58);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  pointer-events: auto;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.info-toggle[aria-pressed="true"] {
  border-color: rgba(255, 216, 58, 0.75);
  color: #ffd83a;
  background: rgba(18, 15, 4, 0.66);
}

.controller-panel {
  position: absolute;
  right: 1rem;
  top: 5.4rem;
  width: min(26rem, calc(100vw - 2rem));
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass-strong);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  transform: translateX(calc(100% + 1.4rem));
  transition: transform 180ms ease;
}

body.setup-open .controller-panel {
  transform: translateX(0);
}

.panel-title {
  display: grid;
  gap: 0.25rem;
}

.panel-title > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.panel-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-close {
  height: 1.8rem;
  padding: 0 0.7rem;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
}

.panel-close:hover {
  border-color: rgba(128, 232, 255, 0.55);
}

.panel-title span,
.panel-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.axis-bars {
  display: grid;
  gap: 0.48rem;
  margin-top: 0.85rem;
}

.axis-bars label {
  display: grid;
  grid-template-columns: 3rem 1fr;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}

meter {
  width: 100%;
  height: 0.65rem;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.button-row button {
  height: 2.35rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.mode-row button {
  height: 2.55rem;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
}

.mode-row button.active {
  border-color: rgba(102, 230, 118, 0.78);
  background: rgba(102, 230, 118, 0.2);
  color: #ecfff0;
}

.button-row button:hover,
.mode-row button:hover,
.panel-tab:hover,
#connectBootButton:hover {
  border-color: rgba(128, 232, 255, 0.55);
}

.panel-note {
  margin: 0.75rem 0 0;
}

.tune-section {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.section-title {
  margin-bottom: 0.5rem;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
}

.tune-section label {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  align-items: center;
  gap: 0.65rem;
  margin: 0.38rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.tune-section input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.preset-row,
.bind-grid,
.invert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.bind-grid,
.invert-grid {
  grid-template-columns: repeat(2, 1fr);
}

.preset-row button,
.bind-grid button,
.invert-grid button,
.wide-panel-button {
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  font-weight: 760;
}

.wide-panel-button {
  width: 100%;
  margin-top: 0.55rem;
}

.primary-panel-button {
  border-color: rgba(150, 255, 170, 0.42);
  background: rgba(95, 255, 135, 0.13);
  color: #dffff0;
}

.wide-panel-button.active {
  border-color: var(--amber);
  color: var(--amber);
}

.bind-grid button.binding {
  border-color: var(--amber);
  color: var(--amber);
}

.invert-grid button.active {
  border-color: rgba(255, 214, 110, 0.78);
  background: rgba(255, 214, 110, 0.14);
  color: var(--amber);
}

.hud-mode-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.hud-mode-button,
.flight-core-button,
.weather-button,
#ghostToggleButton,
#ghostExportButton,
#ghostImportButton,
#repairPanelButton,
#deepRepairButton {
  height: 2.1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  font-weight: 780;
}

.hud-mode-button.active,
.flight-core-button.active,
.weather-button.active,
#ghostToggleButton.active {
  border-color: rgba(102, 230, 118, 0.78);
  background: rgba(102, 230, 118, 0.16);
  color: #ecfff0;
}

.hidden-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.calibration-wizard {
  position: absolute;
  right: 1.2rem;
  top: 5rem;
  z-index: 8;
  display: none;
  width: min(25rem, calc(100vw - 2.4rem));
  padding: 1rem;
  border: 1px solid rgba(255, 214, 110, 0.42);
  border-radius: 8px;
  background: rgba(5, 10, 13, 0.88);
  color: var(--text);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  backdrop-filter: blur(18px);
}

.repair-panel,
.map-loading-overlay {
  position: absolute;
  z-index: 8;
  display: none;
  border: 1px solid rgba(128, 232, 255, 0.32);
  border-radius: 8px;
  background: rgba(5, 10, 13, 0.86);
  color: var(--text);
  box-shadow: 0 22px 90px rgba(0, 0, 0, 0.46);
  pointer-events: auto;
  backdrop-filter: blur(18px);
}

.repair-panel {
  left: 1.2rem;
  bottom: 8.8rem;
  width: min(23rem, calc(100vw - 2.4rem));
  padding: 1rem;
}

body.repair-open .repair-panel {
  display: grid;
  gap: 0.8rem;
}

.repair-panel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.repair-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.repair-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.repair-panel button {
  min-height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font-weight: 820;
}

.map-loading-overlay {
  left: 50%;
  top: 5.1rem;
  width: min(26rem, calc(100vw - 2rem));
  padding: 0.9rem;
  transform: translateX(-50%);
}

body.map-loading .map-loading-overlay {
  display: grid;
  gap: 0.55rem;
}

.map-loading-overlay span {
  display: block;
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.map-loading-overlay span b {
  display: block;
  width: var(--map-load-progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 160ms ease;
}

.map-loading-overlay em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

body.signal-weak #sim {
  filter: contrast(1.08) saturate(0.96);
}

body.signal-lost #sim {
  filter: contrast(1.16) saturate(0.62);
}

body.calibration-open .calibration-wizard {
  display: grid;
  gap: 0.85rem;
}

.calibration-wizard > div:first-child,
.calibration-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.calibration-wizard button {
  height: 2.1rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font-weight: 820;
}

.calibration-wizard p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.calibration-bars {
  display: grid;
  gap: 0.45rem;
}

.calibration-bars span {
  display: grid;
  grid-template-columns: 4.8rem 1fr;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}

body.hud-clean .osd-top,
body.hud-clean .dji-side-menu,
body.hud-clean .dji-camera-strip,
body.hud-clean .dji-camera-params,
body.hud-clean .dji-right-status,
body.hud-clean .dji-left-cards,
body.hud-clean .dji-radar-panel,
body.hud-clean .dji-photo-panel,
body.hud-clean .dji-camera-actions,
body.hud-clean .dji-warnings,
body.hud-clean .micro-readouts,
body.hud-clean #homePointIndicator {
  opacity: 0;
  visibility: hidden;
}

body.hud-racing .dji-photo-panel,
body.hud-racing .dji-camera-actions,
body.hud-racing .dji-camera-strip,
body.hud-racing .dji-camera-params,
body.hud-racing .dji-left-cards,
body.hud-racing .dji-right-status {
  opacity: 0;
  visibility: hidden;
}

body.hud-training .dji-warnings,
body.hud-training .dji-left-cards,
body.hud-training .dji-radar-panel {
  opacity: 1;
  visibility: visible;
}

.osd-top {
  top: 0;
  left: 0;
  right: 0;
  min-height: 3.8rem;
  padding: 0.66rem 1.55rem;
  align-items: center;
  background: linear-gradient(180deg, rgba(5, 13, 18, 0.94), rgba(5, 13, 18, 0.78));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.osd-cluster {
  gap: 0.72rem;
  font-size: clamp(0.78rem, 1.35vw, 1rem);
}

.osd-cluster span,
.osd-cluster strong,
.osd-cluster button {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.86);
}

.top-brand-image {
  display: block;
  width: clamp(8.5rem, 12.6vw, 11.2rem);
  height: 2.35rem;
  object-fit: contain;
  object-position: left center;
  border-radius: 2px;
  filter: drop-shadow(0 1px 10px rgba(0, 0, 0, 0.62));
}

.top-icon-button,
.mode-chip,
.gps-chip {
  height: 2rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
}

.top-icon-button {
  width: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.mode-chip,
.gps-chip {
  min-width: 5.2rem;
  padding: 0 1rem;
  font-weight: 900;
}

.mode-chip {
  background: rgba(255, 255, 255, 0.06);
}

.gps-chip {
  background: linear-gradient(180deg, #2ac56f, #149654);
}

#flightMode {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  background: #fff;
  color: #111;
  font-size: 1.25rem;
  font-style: italic;
  transform: skewX(-10deg);
}

.record-dot {
  display: none !important;
}

#voltageValue {
  margin-left: -0.55rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.dji-side-menu,
.dji-camera-strip,
.dji-camera-params,
.dji-right-status,
.dji-home-button {
  display: none;
}

.dji-rails::before,
.dji-rails::after {
  display: none;
}

.dji-back-button {
  position: absolute;
  left: 1.15rem;
  top: 5.2rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 12, 15, 0.62);
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.dji-left-cards {
  position: absolute;
  left: 1.15rem;
  top: 11.5rem;
  z-index: 2;
  display: grid;
  gap: 0.75rem;
  width: 13.2rem;
  pointer-events: auto;
}

.left-info-card,
.left-round-button {
  border: 0;
  color: #fff;
  cursor: pointer;
  background: rgba(11, 18, 22, 0.72);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.left-info-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.12rem 0.55rem;
  min-height: 4.1rem;
  padding: 0.82rem;
  border-radius: 6px;
  text-align: left;
}

.left-info-card i {
  grid-row: 1 / 3;
  width: 2rem;
  height: 2rem;
}

.left-info-card span,
.left-info-card strong {
  min-width: 0;
  white-space: nowrap;
}

.left-info-card span {
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
}

.left-info-card strong {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

.left-info-card em {
  grid-row: 1 / 3;
  align-self: center;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #2cff88;
  box-shadow: 0 0 12px rgba(44, 255, 136, 0.85);
}

.rth-icon {
  position: relative;
  border: 2px solid #2bd073;
  border-radius: 50%;
}

.rth-icon::before,
.rth-icon::after,
.safe-icon::before,
.safe-icon::after,
.left-round-button i::before,
.left-round-button i::after {
  content: "";
  position: absolute;
}

.rth-icon::before {
  width: 0.75rem;
  height: 0.75rem;
  margin: 0.5rem;
  border-left: 3px solid #fff;
  border-top: 3px solid #fff;
  transform: rotate(-45deg);
}

.safe-icon {
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 3px;
}

.safe-icon::before {
  left: 0.45rem;
  top: 0.32rem;
  width: 0.8rem;
  height: 1.15rem;
  border: 2px solid #fff;
  border-top: 0;
}

.safe-icon::after {
  right: 0.22rem;
  bottom: 0.22rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #2cff88;
}

.left-round-button {
  position: relative;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 8px;
}

.left-round-button i::before {
  left: 0.8rem;
  top: 1.15rem;
  width: 1.6rem;
  height: 1.6rem;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(-25deg);
}

.left-round-button i::after {
  left: 1.76rem;
  top: 0.72rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #fff;
}

.dji-radar-panel {
  position: absolute;
  left: 1rem;
  bottom: 2rem;
  z-index: 2;
  width: 18.8rem;
  pointer-events: auto;
}

.radar-scope {
  position: relative;
  width: 8.8rem;
  aspect-ratio: 1;
  margin: 0 0 0 1rem;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 16%, rgba(255, 255, 255, 0.14) 17% 18%, transparent 19% 34%, rgba(255, 255, 255, 0.14) 35% 36%, transparent 37% 54%, rgba(255, 255, 255, 0.14) 55% 56%, transparent 57%),
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.2) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255, 255, 255, 0.2) 50%, transparent 51%),
    rgba(12, 16, 18, 0.62);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.26);
}

.radar-scope span {
  position: absolute;
  left: 50%;
  top: 0.4rem;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  transform: translateX(-50%);
}

#radarAircraftNeedle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 0.6rem solid transparent;
  border-right: 0.6rem solid transparent;
  border-bottom: 2rem solid #42aaff;
  filter: drop-shadow(0 0 6px rgba(66, 170, 255, 0.85));
  transform: translate(-50%, -56%);
  transform-origin: 50% 70%;
}

#radarHomeDot {
  position: absolute;
  right: 0.55rem;
  bottom: 1.85rem;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #ffd92f;
  color: #111;
  font-size: 0.62rem;
  font-weight: 950;
}

.radar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 0.65rem;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(8, 12, 14, 0.72);
  backdrop-filter: blur(12px);
}

.radar-actions button {
  height: 3.05rem;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.radar-actions button:last-child {
  border-right: 0;
}

.radar-actions button.active {
  color: #2cff88;
}

body.map-hidden .dji-radar-panel {
  opacity: 0;
  visibility: hidden;
}

.dji-photo-panel {
  position: absolute;
  right: 9.2rem;
  top: 10.6rem;
  z-index: 2;
  width: 13.6rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: rgba(6, 13, 17, 0.74);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.photo-setting-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 3.1rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.photo-setting-row:last-child {
  border-bottom: 0;
}

.photo-setting-row span {
  display: grid;
  place-items: center;
  min-height: 1.8rem;
  border-radius: 3px;
  background: #fff;
  color: #111;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 0.9;
}

.photo-setting-row strong {
  display: grid;
  gap: 0.18rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
}

.photo-setting-row small {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 760;
}

.settings-row {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  min-height: 2.6rem;
  color: #fff;
  font-size: 1.35rem;
}

.dji-camera-actions {
  position: absolute;
  right: 2.2rem;
  top: 15rem;
  z-index: 2;
  display: grid;
  gap: 1.15rem;
  pointer-events: auto;
}

.dji-camera-actions button {
  display: grid;
  place-items: center;
  width: 3.9rem;
  height: 3.9rem;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 13, 16, 0.68);
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.record-button::before {
  content: "";
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  background: #f10014;
  box-shadow: 0 0 18px rgba(241, 0, 20, 0.45);
}

body.recording .record-button::before {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 5px;
}

#reticle {
  width: 4.7rem;
  height: 4.7rem;
  border-color: rgba(255, 255, 255, 0.7);
}

#reticle::before,
#reticle::after {
  height: 1.1rem;
}

#reticle i::before,
#reticle i::after {
  width: 1.2rem;
}

#horizonLine {
  width: min(52rem, 58vw);
}

.osd-bottom {
  display: none;
}

.dji-bottom-osd {
  grid-template-columns: auto auto auto minmax(16rem, auto);
  bottom: 2.3rem;
}

.dji-warnings {
  right: 1.5rem;
  bottom: 7.4rem;
  width: min(26rem, 38vw);
}

.micro-readouts {
  right: 2.2rem;
  top: 4.7rem;
}

@media (max-width: 780px) {
  #boot {
    padding: 1rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 1rem;
  }

  h1 {
    font-size: clamp(2.4rem, 14vw, 4.1rem);
    line-height: 0.9;
  }

  .subtitle {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .start-panel {
    margin-top: 0;
    padding-bottom: 1rem;
  }

  .map-selector,
  .aircraft-selector {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
  }

  .map-card,
  .aircraft-card {
    min-height: 4.05rem;
    padding: 0.68rem;
  }

  .map-card small,
  .aircraft-card small {
    font-size: 0.72rem;
  }

  .control-grid {
    display: none;
  }

  .start-actions {
    position: sticky;
    bottom: 0;
    padding: 0.65rem 0 0.25rem;
    background: linear-gradient(180deg, transparent, rgba(5, 6, 7, 0.88) 28%);
  }

  #startButton,
  #connectBootButton {
    flex: 1 1 12rem;
  }

  .osd-top {
    left: 0.55rem;
    right: 0.55rem;
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .osd-cluster {
    justify-content: center;
    flex-wrap: wrap;
  }

  .osd-cluster.right {
    justify-content: center;
  }

  .micro-readouts {
    display: none;
  }

  .touch-controls {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 5rem;
  }

  .osd-bottom {
    width: calc(100vw - 1rem);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .osd-bottom div {
    min-width: 0;
    padding: 0.32rem;
  }

  .osd-bottom strong {
    font-size: 0.85rem;
  }

  .controller-panel {
    top: auto;
    bottom: 1rem;
    right: 0.7rem;
    left: 0.7rem;
    width: auto;
  }

  .dji-rails::before,
  .dji-rails::after {
    width: 3.2rem;
  }

  .dji-side-menu,
  .dji-camera-strip,
  .dji-camera-params,
  .dji-right-status {
    display: none;
  }

  .dji-bottom-osd {
    width: calc(100vw - 7rem);
    grid-template-columns: auto 1fr 1fr;
    gap: 0.65rem;
    bottom: 2rem;
  }

  .dji-link-block {
    grid-column: 1 / -1;
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
  }

  .dji-warnings {
    right: 3.6rem;
    bottom: 8.2rem;
    width: min(24rem, calc(100vw - 7.2rem));
    font-size: 0.78rem;
  }
}

@media (pointer: fine) {
  .touch-controls {
    display: none;
  }
}

.dji-chrome-open .dji-side-menu {
  display: grid;
}

.dji-chrome-open .dji-camera-strip,
.dji-chrome-open .dji-camera-params,
.dji-chrome-open .dji-right-status {
  display: grid;
}

.dji-system-panel {
  position: absolute;
  left: clamp(15rem, 27vw, 28rem);
  top: 6.4rem;
  z-index: 3;
  display: none;
  width: min(35rem, calc(100vw - 34rem));
  max-height: min(62vh, 38rem);
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(8, 13, 16, 0.86), rgba(9, 11, 13, 0.78));
  box-shadow: 0 20px 76px rgba(0, 0, 0, 0.42);
  color: #fff;
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.dji-system-panel header {
  display: grid;
  gap: 0.18rem;
  padding: 0.1rem 0.15rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dji-system-panel header span {
  color: #ffd000;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.16rem;
  text-transform: uppercase;
}

.dji-system-panel header strong {
  font-size: 1.18rem;
  font-weight: 900;
}

.dji-system-panel header em {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 760;
}

.dji-panel-view {
  display: none;
  padding-top: 0.9rem;
}

.dji-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
}

.dji-status-grid > div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.68rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
}

.dji-status-grid span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
}

.dji-status-grid strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.92rem;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dji-panel-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 0.85rem;
}

.dji-panel-actions button {
  min-height: 2.55rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 208, 0, 0.5);
  border-radius: 4px;
  background: rgba(255, 208, 0, 0.08);
  color: #ffe27a;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.dji-panel-actions button:hover {
  border-color: #ffd000;
  background: rgba(255, 208, 0, 0.16);
}

body[data-dji-panel="status"] .dji-system-panel,
body[data-dji-panel="album"] .dji-system-panel,
body[data-dji-panel="transmission"] .dji-system-panel {
  display: grid;
}

body[data-dji-panel="status"] .dji-panel-view[data-panel-view="status"],
body[data-dji-panel="album"] .dji-panel-view[data-panel-view="album"],
body[data-dji-panel="transmission"] .dji-panel-view[data-panel-view="transmission"] {
  display: block;
}

body:not([data-dji-panel="camera"]) .dji-camera-strip,
body:not([data-dji-panel="camera"]) .dji-camera-params,
body:not([data-dji-panel="camera"]) .dji-photo-panel,
body:not([data-dji-panel="camera"]) .dji-camera-actions,
body:not([data-dji-panel="camera"]) .dji-right-status {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body:not(.dji-chrome-open) .dji-system-panel,
body.clean-hud .dji-system-panel,
body.hud-clean .dji-system-panel,
body.hud-racing .dji-system-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .dji-system-panel {
    left: 12.2rem;
    width: min(32rem, calc(100vw - 18rem));
  }
}

@media (max-width: 780px) {
  .dji-chrome-open .dji-side-menu,
  .dji-chrome-open .dji-camera-strip,
  .dji-chrome-open .dji-camera-params,
  .dji-chrome-open .dji-right-status {
    display: none;
  }

  .dji-system-panel {
    left: 0.8rem;
    right: 0.8rem;
    top: 5.1rem;
    width: auto;
    max-height: 58vh;
    overflow: auto;
  }

  .dji-status-grid {
    grid-template-columns: 1fr;
  }
}
