html,
body {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body.mobile-panel-mode {
  position: relative;
  --mobile-top-fixture-offset: calc(max(8px, env(safe-area-inset-top)) + 58px);
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

body.mobile-panel-mode #globe-canvas,
body.mobile-panel-mode .stars {
  display: none;
  pointer-events: none;
}

body.mobile-panel-mode .brand,
body.mobile-panel-mode .mobile-panel-ear,
body.mobile-panel-mode .landing-zones {
  display: none !important;
}

body.mobile-panel-mode .profile-hub-strip {
  position: fixed;
  top: env(safe-area-inset-top);
  right: max(8px, env(safe-area-inset-right));
  left: auto;
  width: auto;
  max-width: calc(100vw - 16px);
  margin: 0;
  border-radius: 999px;
  padding: 0.24rem 0.28rem;
  z-index: 12;
  backdrop-filter: blur(10px);
}

body.mobile-panel-mode .profile-hub-strip-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
}

body.mobile-panel-mode .profile-hub-dropdown-menu > summary,
body.mobile-panel-mode .profile-hub-controls .profile-launch-btn {
  width: 44px;
  height: 44px;
}

body.mobile-panel-mode .profile-hub-controls .profile-map-entry-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  gap: 0;
}

body.mobile-panel-mode .profile-hub-controls .profile-map-entry-label {
  display: none;
}

body.mobile-panel-mode .profile-hub-dropdown-panel {
  left: auto;
  right: 0;
  width: min(284px, calc(100vw - 18px));
  max-height: min(60vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem;
  border-radius: 12px;
}

body.mobile-panel-mode .profile-hub-grid {
  grid-template-columns: 1fr;
  gap: 0.34rem;
}

body.mobile-panel-mode .profile-hub-overflow-btn {
  border-radius: 10px;
  padding: 0.44rem 0.5rem;
}

body.mobile-panel-mode .profile-hub-overflow-btn strong {
  font-size: 0.76rem;
  line-height: 1.2;
}

body.mobile-panel-mode .profile-hub-overflow-btn span {
  margin-top: 0.1rem;
  font-size: 0.64rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mobile-panel-mode .profile-banner,
body.mobile-panel-mode .social-modal,
body.mobile-panel-mode .world-news-hud,
body.mobile-panel-mode .world-markets-hud,
body.mobile-panel-mode .user-orbit-card {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  transform: none;
  margin: 0 auto 12px;
  width: calc(100vw - 20px);
  max-width: 560px;
  border-radius: 16px;
}

body.mobile-panel-mode .profile-banner {
  margin-top: max(8px, env(safe-area-inset-top));
}

body.mobile-panel-mode .social-modal.mobile-collapsed,
body.mobile-panel-mode .world-news-hud.mobile-collapsed {
  transform: none;
  opacity: 1;
}

body.mobile-panel-mode .social-modal {
  resize: none;
  min-width: 0;
  min-height: 0;
  max-width: 560px;
  max-height: none;
  overflow: visible;
}

body.mobile-panel-mode .world-markets-hud {
  display: block;
}

body.mobile-panel-mode .world-markets-hud::before {
  display: none;
}

body.mobile-panel-mode .social-modal-card,
body.mobile-panel-mode .world-news-hud,
body.mobile-panel-mode .world-markets-hud,
body.mobile-panel-mode .profile-banner {
  background:
    radial-gradient(130% 130% at -8% -20%, rgba(112, 200, 255, 0.16), transparent 58%),
    rgba(6, 14, 24, 0.88);
  border-color: rgba(120, 194, 232, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

@media (max-width: 560px) {
  .profile-feed-preferences {
    grid-template-columns: 1fr;
  }

  body.mobile-panel-mode .profile-banner,
  body.mobile-panel-mode .social-modal,
  body.mobile-panel-mode .world-news-hud,
  body.mobile-panel-mode .world-markets-hud,
  body.mobile-panel-mode .user-orbit-card {
    width: calc(100vw - 16px);
    max-width: none;
    border-radius: 12px;
  }

  body.mobile-panel-mode .profile-hub-strip {
    width: auto;
    max-width: calc(100vw - 16px);
    border-radius: 999px;
  }

  body.mobile-panel-mode .profile-hub-dropdown-panel {
    width: min(272px, calc(100vw - 14px));
    max-height: min(56vh, 360px);
  }
}
