/* The Universal Map, univirsal.com/map. Deep-space noir, gold accent.
   Standalone stylesheet; ds/3 tokens are optional polish (vars have fallbacks). */

.umap-body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #07080c;
  color: #d8dee6;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#umap-app { position: fixed; inset: 0; background: #07080c; }
#umap-app.umap-fs:fullscreen { background: #07080c; }

#umap-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; outline: none; touch-action: none; cursor: grab;
}
#umap-canvas:active { cursor: grabbing; }
#umap-canvas:focus-visible { outline: 2px solid #cc9933; outline-offset: -2px; }

/* ---------- projected labels ---------- */
#umap-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.umap-label {
  position: absolute; left: 0; top: 0; max-width: 220px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #cfd6e0; white-space: nowrap; pointer-events: auto; cursor: pointer;
  text-shadow: 0 0 4px #07080c, 0 0 8px #07080c, 0 1px 2px #07080c;
  transition: color .12s ease;
}
.umap-label:hover, .umap-label.umap-selected { color: #e6b347; }
.umap-label b { font-weight: 600; color: #eef2f7; }
.umap-label.umap-k-galaxy   { font-size: 12px; letter-spacing: 0.18em; }
.umap-label.umap-k-power    { font-size: 12px; letter-spacing: 0.2em; }
.umap-label.umap-k-sector   { font-size: 10px; color: #b8a06a; }
.umap-label.umap-k-landmark { color: #e6b347; }
.umap-label.umap-k-satellite{ color: #7d8698; font-size: 10px; }
.umap-label.umap-k-star     { color: #efe6c8; }
.umap-label.umap-k-redacted { color: #9aa1ad; }
.umap-label.umap-k-redacted i {
  display: inline-block; width: 54px; height: 7px; margin-left: 6px;
  background: #07080c; border-top: 2px solid #cc9933; border-bottom: 2px solid #cc9933;
  vertical-align: middle;
}
.umap-label.umap-k-chart    { color: #6f7887; font-size: 10px; pointer-events: none; }

/* ---------- top bar ---------- */
#umap-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(7,8,12,0.92) 0%, rgba(7,8,12,0.55) 70%, rgba(7,8,12,0) 100%);
  pointer-events: none;
}
#umap-topbar > * { pointer-events: auto; }

#umap-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
#umap-brand-mark {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 50%, #e6b347 0%, #e6b347 22%, rgba(204,153,51,0.0) 30%),
              radial-gradient(circle at 50% 50%, rgba(230,179,71,0.55) 0%, rgba(230,179,71,0.0) 70%);
  border: 1px solid rgba(230,179,71,0.75);
  box-shadow: 0 0 12px rgba(230,179,71,0.35);
}
#umap-brand-text {
  display: flex; flex-direction: column; line-height: 1.25;
  font-size: 13px; font-weight: 600; letter-spacing: 0.3em; color: #eef2f7;
}
#umap-brand-sub {
  font-size: 9px; font-weight: 400; letter-spacing: 0.12em; color: #7d8698;
  text-transform: none; white-space: nowrap;
}

#umap-searchbox { position: relative; flex: 1 1 auto; max-width: 380px; margin-left: auto; }
#umap-search {
  width: 100%; box-sizing: border-box; padding: 8px 12px;
  background: rgba(10,12,18,0.8); border: 1px solid #2a2f3a; border-radius: 4px;
  color: #eef2f7; font: inherit; font-size: 13px; letter-spacing: 0.02em;
}
#umap-search::placeholder { color: #5d6575; }
#umap-search:focus { outline: none; border-color: #cc9933; box-shadow: 0 0 0 1px rgba(204,153,51,0.4); }
#umap-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: rgba(10,12,18,0.97); border: 1px solid #2a2f3a; border-radius: 4px;
  max-height: 330px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.umap-result { padding: 8px 12px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.umap-result[aria-selected="true"], .umap-result:hover { background: rgba(204,153,51,0.14); }
.umap-result .umap-result-kind {
  flex: none; font-size: 9px; letter-spacing: 0.16em; color: #8a93a8; width: 74px;
}
.umap-result .umap-result-name { font-size: 13px; color: #eef2f7; }
.umap-result .umap-result-name small { color: #8a93a8; font-size: 11px; }

#umap-actions { display: flex; gap: 8px; flex: none; }
#umap-actions button, #umap-panel-close, #umap-panel-focus, #umap-legend-head {
  font: inherit; font-size: 10px; letter-spacing: 0.18em; color: #cfd6e0;
  background: rgba(10,12,18,0.8); border: 1px solid #2a2f3a; border-radius: 4px;
  padding: 8px 12px; cursor: pointer; min-height: 34px;
}
#umap-actions button:hover, #umap-panel-close:hover, #umap-panel-focus:hover, #umap-legend-head:hover {
  border-color: #cc9933; color: #e6b347;
}
#umap-btn-help { width: 34px; padding: 8px 0; }

/* ---------- tier + scale ---------- */
#umap-tier {
  position: absolute; top: 64px; left: 0; right: 0; text-align: center; z-index: 10;
  pointer-events: none;
}
#umap-tier-text {
  font-size: 10px; letter-spacing: 0.42em; color: rgba(230,179,71,0.85);
  text-shadow: 0 0 8px #07080c;
}
#umap-scalebar {
  position: absolute; right: 16px; bottom: 14px; z-index: 10; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}
#umap-scalebar-label { font-size: 10px; letter-spacing: 0.14em; color: #a7b0bf; }
#umap-scalebar-bar {
  height: 5px; border-left: 1px solid #a7b0bf; border-right: 1px solid #a7b0bf;
  border-bottom: 1px solid #a7b0bf; background: rgba(167,176,191,0.25);
}

/* ---------- legend ---------- */
#umap-legend {
  position: absolute; left: 16px; bottom: 14px; z-index: 15; width: 252px;
  background: rgba(10,12,18,0.88); border: 1px solid #2a2f3a; border-radius: 4px;
  backdrop-filter: blur(6px);
}
#umap-legend-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  border: none; background: none; border-radius: 4px 4px 0 0; text-align: left;
}
#umap-legend-title { font-size: 10px; letter-spacing: 0.22em; color: #a7b0bf; }
#umap-legend-caret::before { content: "\25BE"; color: #8a93a8; }
#umap-legend.umap-collapsed #umap-legend-caret::before { content: "\25B8"; }
#umap-legend-body { padding: 2px 10px 10px; max-height: 46vh; overflow-y: auto; }
#umap-legend.umap-collapsed #umap-legend-body { display: none; }
.umap-legend-row {
  display: flex; align-items: center; gap: 9px; padding: 4px 2px; cursor: pointer;
  border-radius: 3px;
}
.umap-legend-row:hover { background: rgba(204,153,51,0.08); }
.umap-legend-row input { accent-color: #cc9933; width: 13px; height: 13px; margin: 0; flex: none; }
.umap-swatch {
  width: 18px; height: 11px; flex: none; border-radius: 2px;
  border-top-style: solid; border-bottom-style: solid; background-clip: padding-box;
}
.umap-swatch.umap-p-solid   { border-width: 2px 0; background: currentColor; opacity: .85; }
.umap-swatch.umap-p-dashed  { border-width: 2px 0; background: transparent; }
.umap-swatch.umap-p-dashed  { border-top-style: dashed; border-bottom-style: dashed; background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px); border: none; height: 4px; margin: 3.5px 0; }
.umap-swatch.umap-p-dotted  { border: none; height: 4px; margin: 3.5px 0; background: radial-gradient(circle, currentColor 1.6px, transparent 2px) repeat-x; background-size: 8px 4px; }
.umap-legend-name { font-size: 11.5px; color: #cfd6e0; flex: 1 1 auto; }
.umap-legend-count { font-size: 9.5px; color: #5d6575; }
.umap-legend-sep {
  margin: 8px 0 4px; font-size: 9px; letter-spacing: 0.22em; color: #5d6575;
  border-top: 1px solid #22262f; padding-top: 7px;
}

/* ---------- dossier panel ---------- */
#umap-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 360px; z-index: 25;
  background: rgba(9,11,16,0.94); border-left: 1px solid #2a2f3a;
  backdrop-filter: blur(10px); padding: 56px 22px 18px; overflow-y: auto;
  box-shadow: -18px 0 44px rgba(0,0,0,0.55);
}
#umap-panel-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
#umap-panel-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.umap-chip {
  font-size: 9px; letter-spacing: 0.18em; padding: 4px 8px; border-radius: 3px;
  border: 1px solid #2a2f3a; color: #cfd6e0;
}
.umap-chip.umap-chip-faction { border-color: currentColor; }
#umap-panel-title {
  margin: 4px 0 2px; font-size: 24px; font-weight: 600; letter-spacing: 0.04em; color: #eef2f7;
}
#umap-panel-epithet { margin: 0 0 14px; font-size: 12px; letter-spacing: 0.16em; color: #cc9933; text-transform: uppercase; }
#umap-panel-body table { width: 100%; border-collapse: collapse; margin: 12px 0; }
#umap-panel-body th, #umap-panel-body td {
  text-align: left; font-size: 12px; padding: 6px 8px 6px 0; vertical-align: top;
  border-bottom: 1px solid #1d2129;
}
#umap-panel-body th { color: #8a93a8; font-weight: 400; letter-spacing: 0.08em; width: 38%; }
#umap-panel-body td { color: #d8dee6; }
#umap-panel-body p.umap-blurb { font-size: 13px; line-height: 1.65; color: #c3cad5; margin: 12px 0; }
#umap-panel-body .umap-redbar {
  display: inline-block; width: 120px; height: 10px; background: #14161d;
  border-top: 2px solid #cc9933; border-bottom: 2px solid #cc9933;
}
#umap-panel-body a { color: #e6b347; text-decoration: none; border-bottom: 1px dotted rgba(230,179,71,0.5); }
#umap-panel-body a:hover { border-bottom-style: solid; }
#umap-panel-foot { margin-top: 16px; display: flex; gap: 8px; }

/* ---------- tooltip / help / live ---------- */
#umap-tooltip {
  position: absolute; z-index: 28; pointer-events: none; max-width: 240px;
  background: rgba(9,11,16,0.95); border: 1px solid #2a2f3a; border-radius: 4px;
  padding: 6px 10px; font-size: 11.5px; color: #d8dee6; letter-spacing: 0.04em;
}
#umap-tooltip b { color: #eef2f7; letter-spacing: 0.1em; }
#umap-tooltip small { display: block; color: #8a93a8; font-size: 10px; margin-top: 2px; letter-spacing: 0.14em; }

#umap-help {
  position: absolute; z-index: 40; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(430px, calc(100% - 32px)); background: rgba(9,11,16,0.97);
  border: 1px solid #2a2f3a; border-radius: 6px; padding: 22px 26px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.7);
}
#umap-help h2 { margin: 0 0 14px; font-size: 13px; letter-spacing: 0.3em; color: #e6b347; }
#umap-help dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 0; }
#umap-help dt { font-size: 11px; letter-spacing: 0.12em; color: #8a93a8; text-transform: uppercase; }
#umap-help dd { margin: 0; font-size: 12.5px; color: #cfd6e0; }
#umap-help-note { margin: 16px 0 0; font-size: 11px; line-height: 1.6; color: #77808f; border-top: 1px solid #1d2129; padding-top: 12px; }

#umap-live {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- fallbacks ---------- */
#umap-fallback, #umap-noscript {
  position: absolute; inset: 0; z-index: 50; overflow-y: auto; padding: 60px 24px;
  background: #07080c;
}
#umap-fallback h1, #umap-noscript h1 { font-size: 20px; letter-spacing: 0.24em; color: #e6b347; }
#umap-fallback p, #umap-noscript p, #umap-fallback li { font-size: 13px; line-height: 1.7; color: #b8c0cc; }
#umap-fallback dl { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; }
#umap-fallback dt { color: #e6b347; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
#umap-fallback dd { margin: 0; font-size: 12.5px; color: #b8c0cc; }
#umap-noscript a { color: #e6b347; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  #umap-brand-sub { display: none; }
  #umap-brand-text { font-size: 11px; letter-spacing: 0.2em; }
  #umap-searchbox { max-width: none; }
  #umap-actions button { padding: 8px 9px; }
  #umap-btn-full { display: none; }
  #umap-tier { top: 58px; }
}
@media (max-width: 767px) {
  #umap-topbar { flex-wrap: wrap; gap: 8px; padding: 10px; }
  #umap-searchbox { order: 3; flex-basis: 100%; max-width: none; }
  #umap-legend { width: 210px; }
  #umap-legend-body { max-height: 34vh; }
  #umap-scalebar { bottom: auto; top: 108px; }
  #umap-panel {
    top: auto; left: 0; right: 0; width: auto; max-height: 62vh;
    border-left: none; border-top: 1px solid #2a2f3a; border-radius: 10px 10px 0 0;
    padding: 40px 18px 14px;
  }
  #umap-panel::before {
    content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    width: 44px; height: 4px; border-radius: 2px; background: #2a2f3a;
  }
  #umap-panel-title { font-size: 20px; }
}

/* higher-contrast preference: stronger HUD borders and label weight */
@media (prefers-contrast: more) {
  .umap-label { font-weight: 600; }
  #umap-legend, #umap-panel, #umap-tooltip { border-color: #4a5262; }
}

/* reduced motion: no hover transitions on labels */
@media (prefers-reduced-motion: reduce) {
  .umap-label { transition: none; }
}
