[data-rd-navigation-hidden="true"] {
  display: none !important;
}

[data-rd-navigation] {
  --rd-navigation-slot: 138px;
  position: fixed;
  z-index: 10050;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  width: var(--rd-navigation-slot);
  height: 44px;
  pointer-events: none;
  font: 600 14px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-rd-navigation] a {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(147, 214, 233, 0.45);
  border-radius: 10px;
  background: rgba(9, 24, 36, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  color: #e8fbff;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

[data-rd-navigation] a:hover {
  border-color: #7de7f4;
  background: #123447;
  color: #ffffff;
}

[data-rd-navigation] a:focus-visible {
  outline: 3px solid #ffcf70;
  outline-offset: 3px;
}

[data-rd-navigation] svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

body[data-rd-navigation-active] .topbar {
  padding-left: max(156px, calc(env(safe-area-inset-left) + 156px)) !important;
}

body[data-rd-navigation-active] .hud {
  top: max(10px, env(safe-area-inset-top)) !important;
  right: auto !important;
  left: max(156px, calc(env(safe-area-inset-left) + 156px)) !important;
  max-width: calc(100vw - 164px);
  width: max-content;
  overflow: hidden;
}

body[data-rd-navigation-active] .hud #status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 600px) {
  body[data-rd-navigation-active] .topbar {
    padding-left: max(150px, calc(env(safe-area-inset-left) + 150px)) !important;
  }

  body[data-rd-navigation-active] .hud {
    left: max(150px, calc(env(safe-area-inset-left) + 150px)) !important;
    max-width: calc(100vw - 158px);
  }
}

@media (max-width: 390px) {
  body[data-rd-navigation-active] .hud #focusRobot,
  body[data-rd-navigation-active] .hud .count {
    display: none;
  }
}

@media (max-width: 350px) {
  [data-rd-navigation] {
    --rd-navigation-slot: 134px;
  }

  body[data-rd-navigation-active] .topbar {
    padding-left: max(146px, calc(env(safe-area-inset-left) + 146px)) !important;
  }

  body[data-rd-navigation-active] .hud {
    left: max(146px, calc(env(safe-area-inset-left) + 146px)) !important;
    max-width: calc(100vw - 154px);
  }
}

@media (max-width: 600px) {
  body[data-rd-navigation-active] #app > .topbar:has(> .brand) {
    padding: 68px clamp(12px, 4vw, 16px) 12px !important;
    flex-wrap: wrap;
    row-gap: 10px;
  }
  body[data-rd-navigation-active] .joint-panel {
    top: max(66px, calc(env(safe-area-inset-top) + 66px)) !important;
  }
}

@media (max-width: 600px) {
  html:has(body[data-rd-navigation-active] #app > .topbar > .brand),
  body[data-rd-navigation-active]:has(#app > .topbar > .brand) {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  body[data-rd-navigation-active]:has(#app > .topbar > .brand) .system-card-value {
    flex-wrap: nowrap;
    align-items: flex-start;
  }
  body[data-rd-navigation-active]:has(#app > .topbar > .brand) .system-card-value > strong {
    flex-basis: auto;
    max-width: 100%;
  }
}
