/* Standalone map chrome follows the authoritative home-page palette.
 * Globe imagery, geospatial lines, routes and the green RUH marker are unchanged.
 */
html[data-theme="dark"] {
  --world-ui-bg: #191919;
  --world-ui-ink: #c4bab0;
  --world-ui-muted: rgba(196, 186, 176, .68);
  --world-ui-border: rgba(196, 186, 176, .24);
  --world-ui-action: rgba(196, 186, 176, .035);
  --world-ui-hover: rgba(196, 186, 176, .12);
  --world-ui-glass: rgba(25, 25, 25, .84);
}

html[data-theme="light"] {
  --world-ui-bg: #c4bab0;
  --world-ui-ink: #242424;
  --world-ui-muted: rgba(36, 36, 36, .65);
  --world-ui-border: rgba(36, 36, 36, .20);
  --world-ui-action: rgba(255, 255, 255, .15);
  --world-ui-hover: rgba(255, 255, 255, .35);
  --world-ui-glass: rgba(196, 186, 176, .88);
}

html[data-theme],
html[data-theme] body,
html[data-theme] .world-standalone-shell,
html[data-theme] .world-standalone-loading,
html[data-theme] .world-standalone-access {
  background: var(--world-ui-bg);
  color: var(--world-ui-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

html[data-theme] .world-standalone-shell {
  grid-template-rows: 64px minmax(0, 1fr);
}

html[data-theme] .world-standalone-bar {
  padding: 0 clamp(14px, 2vw, 36px);
  border-bottom: 1px solid var(--world-ui-border);
  background: var(--world-ui-bg);
  color: var(--world-ui-ink);
}

.world-standalone-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.world-standalone-brand {
  flex: 0 0 auto;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -.085em;
  line-height: 1;
}

.world-standalone-divider {
  width: 1px;
  height: 29px;
  flex: 0 0 1px;
  background: var(--world-ui-border);
}

html[data-theme] .world-standalone-title .world-kicker {
  color: var(--world-ui-muted);
  font-size: 9px;
  letter-spacing: .14em;
}

html[data-theme] .world-standalone-title h1 {
  margin-top: 5px;
  color: var(--world-ui-ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .02em;
}

html[data-theme] .world-standalone-actions {
  gap: 7px;
}

html[data-theme] .world-standalone-actions a,
html[data-theme] .world-standalone-actions button,
html[data-theme] .world-standalone-actions input {
  height: 32px;
  border: 1px solid var(--world-ui-border);
  border-radius: 6px;
  background: var(--world-ui-action);
  color: var(--world-ui-ink);
  font-size: 10px;
  font-weight: 650;
  box-shadow: none;
}

html[data-theme] .world-standalone-actions a,
html[data-theme] .world-standalone-actions button {
  padding: 0 12px;
  transition: background-color .16s ease, border-color .16s ease;
}

html[data-theme] .world-standalone-actions input {
  width: 148px;
  padding: 0 11px;
  outline: none;
}

html[data-theme] .world-standalone-actions input::placeholder {
  color: var(--world-ui-muted);
  font-weight: 500;
}

html[data-theme] .world-standalone-actions a:hover,
html[data-theme] .world-standalone-actions button:hover {
  background: var(--world-ui-hover);
}

html[data-theme] .world-standalone-actions input:focus-visible,
html[data-theme] .world-standalone-actions a:focus-visible,
html[data-theme] .world-standalone-actions button:focus-visible {
  outline: 2px solid var(--world-ui-ink);
  outline-offset: 2px;
}

html[data-theme] .world-standalone-actions .world-home-link {
  width: 32px;
  flex: 0 0 32px;
  padding: 0;
}

html[data-theme] .world-origin,
html[data-theme] .world-hint,
html[data-theme] .world-recenter {
  border-color: var(--world-ui-border);
  background: var(--world-ui-glass);
  color: var(--world-ui-ink);
  backdrop-filter: blur(12px);
}

html[data-theme] .world-origin small,
html[data-theme] .world-hint {
  color: var(--world-ui-muted);
}

html[data-theme] .world-recenter:hover {
  background: var(--world-ui-hover);
}

html[data-theme] .world-recenter:focus-visible {
  outline-color: var(--world-ui-ink);
}

html[data-theme="dark"] .world-tooltip {
  border-color: var(--world-ui-border);
  background: rgba(25, 25, 25, .96);
  color: var(--world-ui-ink);
}

html[data-theme="dark"] .world-tooltip span {
  color: var(--world-ui-muted);
}

html[data-theme="dark"] .world-search-status.not-found {
  border-color: var(--world-ui-border);
  background: var(--world-ui-glass);
  color: var(--world-ui-ink);
}

@media (max-width: 760px) {
  html[data-theme] .world-standalone-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  html[data-theme] .world-standalone-bar {
    min-height: 64px;
    padding: 10px 14px;
    align-items: center;
  }

  .world-standalone-heading { gap: 10px; }
  .world-standalone-brand { font-size: 22px; }
  .world-standalone-divider { height: 25px; }
  html[data-theme] .world-standalone-actions input { width: 110px; }
}

@media (max-width: 440px) {
  html[data-theme] .world-standalone-bar { align-items: flex-start; }
  html[data-theme] .world-standalone-actions { gap: 5px; }
  html[data-theme] .world-standalone-actions a,
  html[data-theme] .world-standalone-actions button { padding: 0 8px; }
  html[data-theme] .world-standalone-actions .world-home-link { width: 32px; padding: 0; }
  html[data-theme] .world-standalone-title h1 { font-size: 12px; }
  html[data-theme] .world-standalone-title .world-kicker { font-size: 7px; }
}

/* A restrained peripheral veil dims distant stars while leaving the globe center untouched. */
html[data-theme="dark"] .world-standalone-stage::after {
  background: radial-gradient(ellipse 56% 75% at 50% 52%, transparent 48%, rgba(2,3,11,.28) 77%, rgba(2,3,11,.75) 100%);
}
/* Make the map legend readable without a heavy panel. */
html[data-theme="dark"] .world-hint {
  font-size: 10px;
  line-height: 1.5;
  color: #b7ada3;
  background: rgba(14, 14, 17, .88);
  border-color: rgba(196,186,176,.25);
  max-width: min(760px, calc(100% - 28px));
}
