/* TRAIL hub keeps the existing day/night preference and location owners. */
:root {
  --hub-bg: var(--wx-bg);
  --hub-panel: var(--wx-panel-solid);
  --hub-panel-2: var(--wx-panel-soft);
  --hub-line: var(--wx-line-soft);
  --hub-line-strong: var(--wx-line);
  --hub-text: var(--wx-text);
  --hub-muted: var(--wx-muted);
  --hub-blue: var(--wx-action);
  --hub-action-text: var(--wx-action-text);
  --hub-green: var(--wx-success);
  --hub-input: var(--wx-input);
  --hub-hover: var(--wx-selected);
  --hub-active: var(--wx-selected);
  --hub-overlay: var(--wx-bg);
  --hub-bar: var(--wx-bg);
}

html[data-hub-theme="day"] {
  --hub-bg: #f4f1ec;
  --hub-panel: #fffdf9;
  --hub-panel-2: #eae4dc;
  --hub-line: #d0c4b8;
  --hub-line-strong: #8c786b;
  --hub-text: #28221e;
  --hub-muted: #695a50;
  --hub-blue: #9c3d15;
  --hub-action-text: #fff;
  --hub-green: #246347;
  --hub-input: #fff;
  --hub-hover: #f4ddcc;
  --hub-active: #efd0b9;
  --hub-overlay: #f4f1ec;
  --hub-bar: #fffdf9;
}

/* The globe hub owns the complete pre-game experience. */
#titleScreen { display: none; }
body.start-hub-open { overflow: hidden; background: var(--hub-bg); }
body.start-hub-open #envDebug { display: none; }
/* The account action participates in the toolbar layout, so it cannot
   float over search or appearance controls at intermediate widths. */
body.start-hub-open #appSignInBtn {
  display: block !important;
  position: static;
  flex: 0 1 auto;
  z-index: 10004;
  width: auto;
  min-height: 44px;
  height: auto;
  padding: 0 14px;
  color: var(--hub-text);
  background: transparent;
  border: 1px solid var(--hub-line);
  border-radius: 2px;
  box-shadow: none;
  font: 600 var(--wx-type-control)/1.3 var(--wx-font-ui);
  text-transform: uppercase;
}
body.start-hub-open #authFloatPanel { z-index: 10006; top: 64px; }

#globeSelectorScreen { color: var(--hub-text); background: var(--hub-bg); }
.tester-invitation {
  position: relative; box-sizing: border-box; width: 100%; min-width: 0;
  padding: 16px; border: 1px solid var(--hub-line-strong); border-radius: 2px;
  background: var(--hub-panel); color: var(--hub-text);
  font: .875em/1.5 var(--wx-font-ui);
}
.tester-invitation[hidden],
#analyticsConsentBanner:not([hidden]) ~ #globeSelectorScreen .tester-invitation { display: none; }
.tester-invitation .tester-invitation-label { margin: 0 35px 8px 0; font-size: .714286em; font-weight: 700; letter-spacing: .1em; color: var(--hub-muted); }
.tester-invitation h2 { margin: 0 24px 8px 0; font: 700 1.357143em/1.3 var(--wx-font-ui); }
.tester-invitation p { margin: 0 0 14px; }
.tester-invitation-close {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px;
  border: 0; border-radius: 9px; background: transparent; color: inherit; font: 26px/1 var(--wx-font-ui); cursor: pointer;
}
.tester-invitation-email { display: block; padding: 11px 12px; border-radius: 8px; background: var(--hub-blue); color: var(--hub-action-text); text-align: center; font-weight: 600; text-decoration: none; }
.tester-invitation small { display: block; margin-top: 10px; color: var(--hub-muted); font-size: .785714em; line-height: 1.5; }
.tester-invitation :focus-visible { outline: 3px solid var(--hub-blue); outline-offset: 3px; }
.tester-invitation button.tester-invitation-email { width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.tester-invitation button:disabled { opacity: .6; cursor: wait; }
.tester-invitation form[hidden], .tester-invitation [hidden] { display: none; }
.tester-invitation input[type="email"] { box-sizing: border-box; width: 100%; min-height: 44px; margin: 5px 0 12px; padding: 8px; border-radius: 6px; border: 1px solid var(--hub-line-strong); background: var(--hub-bg); color: var(--hub-text); font: inherit; }
.tester-invitation-consent { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: .857143em; }
.tester-invitation-consent input { flex: 0 0 auto; margin-top: 4px; }
.tester-invitation small a { color: inherit; text-decoration: underline; }
#globeSelectorScreen {
  --wx-bg: var(--hub-bg);
  --wx-panel: color-mix(in srgb, var(--hub-panel) 94%, transparent);
  --wx-panel-solid: var(--hub-panel);
  --wx-panel-soft: var(--hub-panel-2);
  --wx-line: var(--hub-line-strong);
  --wx-line-soft: var(--hub-line);
  --wx-text: var(--hub-text);
  --wx-muted: var(--hub-muted);
  --wx-blue: var(--hub-blue);
  --wx-green: var(--hub-green);
}
#globeSelectorScreen .globe-selector-shell {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 332px;
  grid-template-rows: 76px minmax(0, 1fr) 110px;
}
.globe-selector-brand,
.globe-selector-top,
.globe-app-rail,
.globe-destination-bar { background: var(--hub-bar); }
.globe-selector-side { background: var(--hub-panel); }
.globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-location-entry-pair,
.globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-search-feedback,
.globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-selector-stat,
.globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-selector-actions {
  display: none;
}
.globe-selector-stat,
.globe-selector-live-details,
.globe-selector-live-layer,
.globe-selector-city-item { background: var(--hub-panel-2); }
.globe-selector-field-label,
.globe-selector-live-loading,
.globe-selector-city-empty { color: var(--hub-muted); }
.globe-selector-row input,
.globe-mobile-search input { color: var(--hub-text); background: var(--hub-input); border-color: var(--hub-line); }
.globe-selector-mode-tab,
.globe-selector-city-tab,
#globeSelectorBackBtn { color: var(--hub-muted); background: var(--hub-panel-2); border-color: var(--hub-line); }
.globe-selector-mode-tab.active,
.globe-selector-city-tab.active { color: var(--hub-text); background: var(--hub-active); border-color: var(--hub-blue); }
#globeLocationSearchStatus { color: var(--hub-muted) !important; }
.globe-search-feedback { display: grid; gap: 6px; }
.globe-location-search-results {
  display: grid;
  gap: 5px;
  max-height: 190px;
  overflow: auto;
  padding: 2px;
}
.globe-location-search-results[hidden] { display: none; }
.globe-location-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  width: 100%;
  padding: 9px 10px;
  color: var(--hub-text);
  text-align: left;
  background: var(--hub-panel-2);
  border: 1px solid var(--hub-line);
  border-radius: 2px;
  cursor: pointer;
}
.globe-location-search-result:hover,
.globe-location-search-result[aria-selected="true"] { background: var(--hub-active); border-color: var(--hub-blue); }
.globe-location-search-result strong { overflow: hidden; font: 700 var(--wx-type-control)/1.4 var(--wx-font-ui); text-overflow: ellipsis; white-space: nowrap; }
.globe-location-search-result span { color: var(--hub-muted); font: 600 var(--wx-type-meta)/1.4 var(--wx-font-ui); }
.globe-location-search-result small { grid-column: 1 / -1; overflow: hidden; color: var(--hub-muted); font: 500 var(--wx-type-meta)/1.4 var(--wx-font-ui); text-overflow: ellipsis; white-space: nowrap; }
.globe-selector-brand {
  gap: 5px;
  padding: 0 8px;
  letter-spacing: 0;
  white-space: nowrap;
  font-size: 8px;
}
.globe-brand-mark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: var(--hub-blue);
  border: 2px solid currentColor;
  border-radius: 50%;
  font: 700 16px/1 var(--wx-font-ui);
}
.globe-selector-brand strong { margin-left: 2px; color: var(--hub-blue); }

.globe-selector-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 0 18px 0 24px;
}
.globe-hub-search {
  min-height: 44px;
  height: auto;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  color: var(--hub-muted);
  background: var(--hub-input);
  border: 1px solid var(--hub-line-strong);
}
.globe-hub-search > span { text-align: center; font: 24px/1 var(--wx-font-ui); }
.globe-hub-search input {
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  color: var(--hub-text);
  background: transparent;
  border: 0;
  outline: 0;
  font: 500 13px/1 var(--wx-font-ui);
}
.globe-hub-search input::placeholder { color: var(--hub-muted); opacity: 1; }
.globe-hub-search button {
  height: 100%;
  padding: 0 18px;
  color: var(--hub-text);
  background: var(--hub-panel-2);
  border: 0;
  border-left: 1px solid var(--hub-line);
  border-radius: 0;
  font: 700 var(--wx-type-control)/1.3 var(--wx-font-ui);
  text-transform: uppercase;
  cursor: pointer;
}
.globe-hub-search button:hover { background: var(--hub-hover); }
#globeLocationSearchBtn {
  min-height: var(--wx-control-height);
  padding: 10px 16px;
  color: var(--hub-action-text);
  background: var(--hub-blue);
  border: 1px solid var(--hub-blue);
  font: 650 var(--wx-type-control)/1.4 var(--wx-font-ui);
  text-transform: none;
}
#globeLocationSearchBtn:hover { filter: brightness(1.06); }
.globe-selector-hint {
  color: var(--hub-text);
  background: var(--hub-panel);
  font: 500 var(--wx-type-meta)/1.4 var(--wx-font-ui);
}

.globe-hub-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 0;
}
.globe-hub-tools button {
  width: 40px;
  min-height: 44px;
  height: auto;
  display: grid;
  place-items: center;
  color: var(--hub-text);
  background: transparent;
  border: 1px solid var(--hub-line);
  border-radius: 2px;
  font: 600 18px/1 var(--wx-font-ui);
  cursor: pointer;
}
.globe-hub-tools button:hover { color: var(--hub-text); background: var(--hub-hover); border-color: var(--hub-blue); }

.globe-app-rail button { letter-spacing: 0; }
.globe-app-rail button span { font-size: 23px; }

/* One viewport and a separate footer: metadata and world navigation never
   reserve an invisible band or paint over the interactive globe. */
.globe-selector-map {
  grid-column: 2;
  grid-row: 2 / 4;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}
.globe-selector-map > .globe-selector-stage {
  grid-area: 1 / 1;
  min-height: 0;
  padding: 0;
}
.globe-map-footer {
  grid-area: 2 / 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  min-height: 0;
  background: var(--hub-bg);
}
.globe-map-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 4px 12px 0;
  color: var(--hub-muted);
  font: 500 calc(10px * var(--wx-text-scale, 1))/1.4 var(--wx-font-ui);
}
.globe-map-meta .globe-selector-basemap-attribution,
.globe-map-meta output {
  position: static;
  inset: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
}
.globe-map-meta .globe-selector-basemap-attribution:hover { text-decoration: underline; }
.globe-map-meta .globe-selector-basemap-attribution:focus-visible { outline: 2px solid var(--wx-focus); outline-offset: 2px; }
.globe-map-footer .globe-destination-bar {
  position: static;
  grid-area: auto;
  flex: 0 0 auto;
  height: auto;
  min-height: 70px;
  padding: 0 18px;
  background: transparent;
  border-radius: 0;
}
.globe-selector-hint[hidden] { display: none !important; }
.globe-selector-stage {
  background-color: var(--wx-panel-solid);
  background-image: url('../assets/textures/universe/orion-nebula-nasa.jpg');
  background-position: center;
  background-size: cover;
  isolation: isolate;
}
.globe-selector-stage::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: color-mix(in srgb, var(--wx-panel-solid) 76%, transparent);
}
#globeSelectorCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.globe-selector-basemap-controls,
.globe-selector-basemap-attribution { z-index: 3; }
.globe-selector-zoom-controls { z-index: 3; }
.globe-selector-hint { z-index: 2; }

.globe-selector-side {
  padding: 18px 16px 16px;
  gap: 11px;
  min-height: 0;
  overflow-y: auto;
}
.globe-selector-side > * { flex-shrink: 0; }
.globe-launch-summary { display: grid; gap: 8px; }
.globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-launch-summary { display: none; }
.globe-selector-stat {
  position: relative;
  padding: 14px 12px;
  border-width: 0 0 1px;
  background: transparent;
}
.globe-save-favorite {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--hub-muted);
  background: transparent;
  border: 1px solid var(--hub-line);
  border-radius: 2px;
  font: 22px/1 var(--wx-font-ui);
  cursor: pointer;
}
.globe-save-favorite.saved { color: var(--wx-warning); }
.globe-save-favorite:disabled { opacity: 0.35; cursor: default; }
.globe-selector-stat-value,
#globeSelectorPlace { padding-right: 38px; }
.globe-selector-stat-value { margin-top: 7px; font: 700 17px/1.2 var(--wx-font-ui); }
.globe-selector-actions { position: static; display: block; padding: 0; background: transparent; border: 0; }
.globe-first-journey { display: grid; gap: 6px; }
.globe-first-journey button { display: grid; gap: 5px; width: 100%; min-height: 48px; padding: 10px; text-align: left; color: var(--hub-text); background: var(--hub-panel-2); border: 1px solid var(--hub-line); border-radius: 2px; cursor: pointer; font: .75em/1.4 var(--wx-font-ui); }
.globe-first-journey button:hover { border-color: var(--hub-blue); background: var(--hub-hover); }
.globe-first-journey button:focus-visible { outline: 2px solid var(--hub-blue); outline-offset: 2px; }
.globe-first-journey button:disabled { opacity: .65; cursor: wait; }
.globe-first-journey button[hidden] { display: none; }
.globe-first-journey small, #globeJourneyStatus { color: var(--hub-muted); }
.globe-first-journey small { font-size: .916667em; }
#globeJourneyStatus { font-size: .6875em; }
#globeJourneyStatus:empty { display: none; }
.globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-first-journey { display: none; }
#globeSelectorBackBtn { display: none; }
#globeSelectorStartBtn {
  width: 100%;
  min-height: 48px;
  font: 700 var(--wx-type-control)/1.4 var(--wx-font-ui);
  color: var(--hub-action-text);
  background: var(--hub-blue);
  text-transform: none;
}
.globe-location-entry-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  flex: 0 0 auto;
}
.globe-location-entry-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 54px;
  padding: 8px 9px;
  color: var(--hub-text);
  text-align: left;
  background: var(--hub-panel-2);
  border: 1px solid var(--hub-line-strong);
  border-radius: 2px;
  cursor: pointer;
}
.globe-location-entry-card:hover { background: var(--hub-hover); border-color: var(--hub-blue); }
.globe-location-entry-card:disabled { opacity: .68; cursor: wait; }
.globe-location-entry-card .location-entry-icon { color: var(--wx-action); font-size: 19px; }
.globe-location-entry-card .location-entry-copy strong {
  display: block;
  color: var(--hub-text);
  font: 750 10px/1.15 var(--wx-font-ui);
  letter-spacing: .01em;
}
.globe-location-entry-card .location-entry-copy small {
  display: block;
  margin-top: 4px;
  color: var(--hub-muted);
  font: 500 var(--wx-type-meta)/1.4 var(--wx-font-ui);
}
.globe-selector-live-gps-btn {
  width: auto;
  border-color: var(--wx-action);
  background: linear-gradient(135deg,color-mix(in srgb, var(--wx-selected) 34%, transparent),color-mix(in srgb, var(--wx-selected) 24%, transparent));
  box-shadow: none;
}
.globe-selector-live-gps-btn .location-entry-icon { color: var(--wx-action); }
.globe-selector-mode-tabs { margin-top: 0; }
.globe-selector-mode-panel { min-height: 0; }
.globe-mobile-search { display: none; }
.globe-selector-city-list {
  max-height: min(31vh, 250px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.globe-selector-city-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 4px 7px;
  color: var(--hub-text);
  border-bottom: 1px solid var(--hub-line);
}
.globe-selector-city-section strong { font-size: 10px; text-transform: uppercase; }
.globe-selector-city-section span { color: var(--hub-muted); font-size: 9px; text-align: right; }
.globe-selector-city-item[style*="background:#eef2ff"] {
  color: var(--hub-text) !important;
  background: var(--hub-active) !important;
  border-color: var(--hub-blue) !important;
}
.globe-selector-live-chip,
.globe-selector-live-filter,
.globe-selector-live-refresh,
.globe-selector-live-action-btn {
  color: var(--hub-text);
  background: var(--hub-panel-2);
  border-color: var(--hub-line);
}
.globe-selector-live-chip.active,
.globe-selector-live-filter.active { color: var(--hub-text); background: var(--hub-active); border-color: var(--hub-blue); }
.globe-selector-live-detail-card,
.globe-selector-live-list-item {
  color: var(--hub-text);
  background: var(--hub-panel-2);
  border-color: var(--hub-line);
}
.globe-selector-live-detail-copy,
.globe-selector-live-detail-meta { color: var(--hub-muted); }
.globe-selector-live-detail-heading { color: var(--hub-text); }
.deflock-live-detail .deflock-live-warning { color: var(--wx-warning); }
.globe-selector-live-layer-status.observed { color: var(--wx-success); }
.globe-selector-live-layer-status.current { color: var(--wx-success); }
.globe-selector-live-layer-status.derived { color: var(--wx-warning); }
.globe-selector-live-layer-status.reference { color: var(--wx-action); }
.globe-selector-live-layer-status.mixed { color: var(--wx-action); }

.globe-selector-street-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--hub-line);
  border-radius: 6px;
  background: var(--wx-panel-solid);
}
.globe-selector-street-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.globe-selector-street-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.globe-selector-street-thumb {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 8px;
  min-width: 0;
  min-height: 54px;
  padding: 5px;
  border: 1px solid var(--hub-line);
  border-radius: 6px;
  color: var(--hub-text);
  background: var(--hub-panel-2);
  text-align: left;
  cursor: pointer;
}
.globe-selector-street-thumb.active { border-color: var(--hub-blue); box-shadow: inset 0 0 0 1px var(--hub-blue); }
.globe-selector-street-thumb img {
  grid-row: 1 / 3;
  width: 52px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--wx-panel-solid);
}
.globe-selector-street-thumb span,
.globe-selector-street-thumb small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.globe-selector-street-thumb span { font-size: 10px; font-weight: 700; }
.globe-selector-street-thumb small { color: var(--hub-muted); font-size: 9px; }
.globe-selector-live-action-btn:is(a) { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.globe-legal-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--hub-line);
  color: var(--hub-muted);
  font: 500 10px/1.3 var(--wx-font-ui);
}
.globe-legal-strip a,
.globe-legal-strip button {
  min-height: 24px;
  padding: 4px 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.globe-legal-strip a:hover,
.globe-legal-strip button:hover { color: var(--hub-text); text-decoration: underline; }

.globe-destination-bar { padding: 0 18px; }
.globe-destination-bar button {
  gap: 0;
  padding: 0;
  letter-spacing: 0;
  overflow: visible;
}
.globe-destination-bar button {
  width: 70px;
  height: 70px;
  aspect-ratio: 1 / 1;
  justify-self: center;
  border-radius: 50%;
}
.globe-destination-bar button .destination-thumb {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  aspect-ratio: 1 / 1;
  display: block;
  box-sizing: border-box;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 3px solid color-mix(in srgb, var(--hub-muted) 45%, transparent);
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  box-shadow: 0 0 18px rgba(45,125,255,0.12);
}
.destination-thumb.earth { background-image: url('../assets/textures/ui-thumbnails/earth.jpg'); background-position: 28% 50%; }
.destination-thumb.moon { background-image: url('../assets/textures/ui-thumbnails/moon.jpg'); background-position: 38% 50%; }
.destination-thumb.mars { background-image: url('../assets/textures/ui-thumbnails/mars.jpg'); background-position: 42% 50%; }
.globe-destination-bar button .destination-thumb.space {
  background-image: url('../assets/textures/ui-thumbnails/space.jpg');
  background-size: cover;
}
#globeSelectorSpaceBtn { position: static; inset: auto; }
.destination-thumb.ocean { background-image: url('../assets/textures/ui-thumbnails/ocean-gameplay-20261104.png'); background-position: center; }
.globe-destination-bar button:hover .destination-thumb,
.globe-destination-bar button.active .destination-thumb {
  border-color: var(--hub-blue);
  box-shadow: 0 0 22px color-mix(in srgb, var(--hub-blue) 42%, transparent);
  transform: translateY(-2px) scale(1.04);
}
.globe-destination-bar button:hover,
.globe-destination-bar button.active { background: transparent; }

/* Existing working start panels are hosted here instead of on another page. */
.globe-hub-overlay {
  z-index: 20;
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) auto;
  color: var(--hub-text);
  background: var(--hub-overlay);
  border-left: 1px solid var(--hub-line);
}
.globe-hub-overlay[hidden] { display: none; }
.globe-hub-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--hub-panel);
  border-bottom: 1px solid var(--hub-line);
}
.globe-hub-overlay-header span {
  display: block;
  margin-bottom: 4px;
  color: var(--hub-blue);
  font: 600 9px/1 var(--wx-font-ui);
  text-transform: uppercase;
}
.globe-hub-overlay-header h2 { margin: 0; color: var(--hub-text); font: 700 20px/1 var(--wx-font-ui); letter-spacing: 0; }
.globe-hub-overlay-header button {
  width: 40px;
  min-height: 44px;
  height: auto;
  color: var(--hub-text);
  background: transparent;
  border: 1px solid var(--hub-line);
  border-radius: 2px;
  font: 300 28px/1 var(--wx-font-ui);
  cursor: pointer;
}
.globe-hub-panel-host {
  min-height: 0;
  overflow: auto;
  padding: 24px;
}
.globe-hub-panel-host .tab-content {
  position: static;
  inset: auto;
  width: min(1100px, 100%);
  height: auto;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  transform: none;
}
.globe-hub-panel-host .tab-content.active { display: block; }
.globe-hub-panel-host .hub-center-panel.active { display: block; }
.hub-library-panel {
  width: min(1100px, 100%);
  margin: 0 auto;
}
.hub-library-panel.active { display: grid; gap: 24px; }
.hub-library-section { display: grid; gap: 10px; }
.hub-library-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hub-line);
}
.hub-library-section > header strong { color: var(--hub-text); font-size: 14px; }
.hub-library-section > header span { color: var(--hub-muted); font-size: 10px; }
.hub-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.hub-library-grid button {
  min-width: 0;
  min-height: 58px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 10px 12px;
  color: var(--hub-text);
  text-align: left;
  background: var(--hub-panel-2);
  border: 1px solid var(--hub-line);
  border-radius: 2px;
  cursor: pointer;
}
.hub-library-grid button:hover,
.hub-library-grid button:focus-visible {
  background: var(--hub-hover);
  border-color: var(--hub-blue);
}
.hub-library-grid button strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-library-grid button span { color: var(--hub-muted); font-size: 10px; }
.hub-library-empty {
  margin: 0;
  padding: 14px;
  color: var(--hub-muted);
  background: var(--hub-panel-2);
  border: 1px solid var(--hub-line);
  font-size: 11px;
}
.globe-hub-panel-host .launch-switch-row { display: none; }
.globe-hub-panel-host .loc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.globe-hub-panel-host .loc,
.globe-hub-panel-host .mode,
.globe-hub-panel-host #customPanel,
.globe-hub-panel-host [style*="background:#f8fafc"],
.globe-hub-panel-host [style*="background: #f8fafc"] {
  color: var(--hub-text);
  background: var(--hub-panel-2);
  border-color: var(--hub-line);
}
.globe-hub-panel-host .loc:hover,
.globe-hub-panel-host .loc.sel,
.globe-hub-panel-host .mode:hover,
.globe-hub-panel-host .mode.sel { border-color: var(--hub-blue); background: var(--hub-hover); }
.globe-hub-panel-host .title-use-location-btn { color: var(--wx-text); background: var(--hub-blue); box-shadow: none; }
.globe-hub-panel-host input,
.globe-hub-panel-host select { color: var(--hub-text); background: var(--hub-input); border-color: var(--hub-line); }
.globe-hub-footer-host .title-footer {
  position: static;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: var(--hub-bar);
  border-top: 1px solid var(--hub-line);
}
.globe-hub-footer-host .title-share-row {
  position: static;
  width: auto;
  flex-direction: row;
  flex-wrap: nowrap;
  transform: none;
}
.globe-hub-footer-host .title-license { max-height: 30px; overflow: auto; }
.globe-hub-footer-host #shareExperienceStatus { display: none; }

body.start-hub-open #flowerChallengePanel {
  position: fixed;
  z-index: 10007;
  top: 92px;
  right: 24px;
  bottom: 24px;
  max-height: none;
}
.globe-hub-panel-host .flowerChallengeToggleBtn {
  position: static;
  width: auto;
  margin: 0 0 16px;
  padding: 10px 14px;
}

@media (max-width: 900px), (pointer: coarse) {
  .deflock-live-detail .globe-selector-live-detail-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 8px 0 calc(4px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(7, 16, 24, 0), var(--hub-panel-2) 24%);
  }
  .deflock-live-detail .globe-selector-live-action-btn { min-height: 44px; flex: 1 1 130px; }
  .globe-selector-street-list { grid-template-columns: 1fr; }
  body.start-hub-open #appSignInBtn { height: 36px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.start-hub-open #authFloatPanel { top: 106px; max-height: calc(100dvh - 118px); overflow-y: auto; }
  #globeSelectorScreen .globe-selector-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 62px minmax(250px, 1.3fr) minmax(180px, 1fr) auto;
    height: calc(100dvh - 68px - env(safe-area-inset-bottom));
    min-height: 0;
    overflow: auto;
    padding-bottom: 0;
  }
  .globe-selector-brand { grid-column: 1; grid-row: 1; padding-right: 55%; border-right: 0; }
  .globe-brand-mark { width: 22px; height: 22px; flex-basis: 22px; font-size: 15px; }
  .globe-selector-top {
    z-index: 3;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    min-height: 44px;
    padding: 0 10px;
    pointer-events: none;
  }
  .globe-hub-search { display: none; }
  .globe-hub-tools { pointer-events: auto; }
  .globe-hub-tools button { flex-shrink: 0; width: 36px; height: 36px; }
  .globe-hub-tools #globeHubShareBtn { display: none; }
  .globe-selector-map { display: contents; }
  .globe-selector-map > .globe-selector-stage { grid-column: 1; grid-row: 2; min-height: 0; }
  .globe-selector-map > .globe-map-footer { grid-column: 1; grid-row: 4; }
  .globe-map-footer .globe-destination-bar { min-height: 52px; padding: 0; }
  .globe-map-footer .globe-destination-bar button { width: 48px; height: 48px; }
  .globe-selector-side { grid-column: 1; grid-row: 3; border-left: 0; border-top: 1px solid var(--hub-line); }
  .globe-selector-side::before {
    display: none;
  }
  .globe-selector-side::after { display: none; }
  .globe-mobile-search {
    display: grid;
    order: -1;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 10px;
  }
  .globe-search-feedback { order: -1; }
  .globe-mobile-search input {
    min-width: 0;
    min-height: var(--wx-control-height);
    height: auto;
    font: 500 var(--wx-type-control)/1.35 var(--wx-font-ui);
    padding: 0 10px;
    color: var(--hub-text);
    background: var(--hub-input);
    border: 1px solid var(--hub-line);
    border-right: 0;
    border-radius: 0;
  }
  .globe-mobile-search button {
    padding: 0 14px;
    color: var(--wx-text);
    background: var(--wx-selected);
    border: 1px solid var(--hub-blue);
    border-radius: 0;
    font: 700 var(--wx-type-control)/1.35 var(--wx-font-ui);
    text-transform: uppercase;
  }
  .globe-selector-stat { padding-top: 8px; }
  .globe-selector-actions { display: flex; align-items: stretch; gap: 8px; }
  .globe-selector-actions #globeSelectorBackBtn { flex: 0 0 auto; }
  .globe-selector-city-list { max-height: 150px; }
  .globe-location-search-results { max-height: 136px; }
  .globe-destination-bar { grid-column: 1; grid-row: 4; padding: 0; }
  .globe-destination-bar button .destination-thumb { width: 38px; height: 38px; flex-basis: 38px; }
  .globe-selector-side:has(#globeSelectorLiveEarthPanel.active)::before,
  .globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-mobile-search,
  .globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-selector-stat,
  .globe-selector-side:has(#globeSelectorLiveEarthPanel.active) .globe-selector-actions {
    display: none;
  }
  .globe-app-rail { position: fixed; z-index: 8; inset: auto 0 0; height: calc(68px + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); flex-direction: row; border-right: 0; border-top: 1px solid var(--hub-line); }
  .globe-app-rail button { flex: 1; min-width: 0; min-height: 68px; padding: 5px 1px; gap: 4px; border-left: 0; border-bottom: 0; border-top: 3px solid transparent; font-size: .5625em; }
  .globe-app-rail button span { font-size: 19px; }
  .globe-app-rail button.active { border-left-color: transparent; border-top-color: var(--hub-blue); }
  .globe-hub-panel-host { padding: 14px; }
  .globe-hub-panel-host .loc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .globe-hub-footer-host .title-footer { grid-template-columns: 1fr; }
  .globe-hub-footer-host .title-share-row { display: none; }
  .globe-hub-footer-host .title-license { display: flex; font-size: 9px; }
}

/* Short landscape keeps the place and launch controls beside the globe.
   Both panes scroll within the area above the original navigation owner. */
@media (min-width: 621px) and (max-width: 900px) and (max-height: 520px),
       (min-width: 621px) and (pointer: coarse) and (max-height: 520px) {
  #globeSelectorScreen .globe-selector-shell {
    grid-template-columns: minmax(220px, .9fr) minmax(320px, 1.1fr);
    grid-template-rows: 62px minmax(0, 1fr);
  }
  .globe-selector-brand { grid-column: 1; grid-row: 1; padding-right: 0; }
  .globe-selector-top { grid-column: 2; grid-row: 1; }
  .globe-selector-map { display: grid; grid-column: 1; grid-row: 2; }
  .globe-selector-map > .globe-selector-stage { grid-area: 1 / 1; }
  .globe-selector-map > .globe-map-footer { grid-area: 2 / 1; }
  .globe-selector-side { grid-column: 2; grid-row: 2; min-height: 0; overflow-y: auto; padding: 10px; gap: 8px; border-top: 0; border-left: 1px solid var(--hub-line); }
  .globe-selector-side::before { display: none; }
  .globe-selector-zoom-controls { top: 8px; transform: none; }
}

@media (max-width: 620px) {
  .hub-library-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body.start-hub-open #appSignInBtn { max-width: 92px; padding: 0 8px; font-size: 8px; }
  .globe-selector-brand { padding-left: 8px; padding-right: 58%; font-size: 8px; }
  .globe-selector-top { padding-left: 10px; padding-right: 10px; }
  .globe-hub-tools { gap: 4px; }
  .globe-hub-tools button { width: 34px; height: 34px; font-size: 15px; }
  .globe-destination-bar button { gap: 0; font-size: 0; }
  .globe-destination-bar button .destination-thumb { width: 34px; height: 34px; flex-basis: 34px; }
  .globe-hub-panel-host .loc-grid { grid-template-columns: 1fr; }
}


/* The overlay keeps its viewport bounds across responsive grids and touch. */
@media (max-width: 900px), (pointer: coarse) {
  .globe-hub-overlay {
    position: fixed;
    z-index: 30;
    inset: 62px 0 68px;
    grid-template-rows: 60px minmax(0, 1fr) auto;
  }
}
