:root { --map-panel: rgba(7,14,27,.88); --map-border: rgba(125,211,252,.24); --map-text:#e8eefb; --map-muted:#9fb1d1; --map-accent:#f4b840; }
html:has(.map-page), body.map-page { height:100%; overflow:hidden; }
body.map-page { margin:0; background:#02040a; color:var(--map-text); }
body.map-page::before, body.map-page::after { content:none; }
.map-app { position:fixed; inset:0; background:radial-gradient(circle at 50% 45%,#0b1730 0,#030712 48%,#000 100%); }
#map-canvas { width:100%; height:100%; display:block; outline:none; touch-action:none; }
#map-canvas:focus-visible { box-shadow:inset 0 0 0 2px var(--map-accent); }
.map-panel { position:fixed; z-index:12; padding:14px; border:1px solid var(--map-border); border-radius:12px; background:var(--map-panel); box-shadow:0 16px 45px rgba(0,0,0,.35); backdrop-filter:blur(12px); color:var(--map-text); }
.map-tools { left:16px; top:104px; width:min(330px,calc(100vw - 32px)); display:grid; gap:12px; }
.map-field { display:grid; gap:5px; color:var(--map-muted); font-size:.78rem; letter-spacing:.04em; }
.map-field input,.map-field select,.map-actions button { min-height:40px; border:1px solid rgba(255,255,255,.16); border-radius:8px; background:rgba(255,255,255,.07); color:var(--map-text); padding:8px 10px; font:inherit; }
.map-field select option { color:#101827; background:white; }
.map-field input:focus,.map-field select:focus,.map-actions button:focus-visible { outline:2px solid var(--map-accent); outline-offset:2px; }
.map-filter-row { display:grid; grid-template-columns:1fr auto; align-items:end; gap:10px; }
.map-check { min-height:40px; display:flex; align-items:center; gap:7px; color:var(--map-muted); font-size:.78rem; }
.map-check input { width:18px; height:18px; accent-color:var(--map-accent); }
.map-actions { display:flex; flex-wrap:wrap; gap:8px; }
.map-actions button { cursor:pointer; flex:1 1 130px; }
.map-actions button:hover { border-color:var(--map-accent); background:rgba(244,184,64,.12); }
.map-status { min-height:1.3em; margin:0; color:var(--map-muted); font-size:.78rem; }
.map-status[data-kind="error"] { color:#ff9c9c; }
.map-details { right:16px; top:104px; width:min(320px,calc(100vw - 32px)); max-height:calc(100vh - 136px); overflow:auto; }
.map-details__eyebrow { color:var(--map-accent); font-size:.68rem; letter-spacing:.13em; text-transform:uppercase; }
.map-details h1 { margin:6px 0 12px; font-size:1.2rem; overflow-wrap:anywhere; }
.map-details dl { margin:0; display:grid; gap:8px; }
.map-details dl div { display:flex; justify-content:space-between; gap:14px; border-top:1px solid rgba(255,255,255,.08); padding-top:7px; }
.map-details dt { color:var(--map-muted); font-size:.74rem; }
.map-details dd { margin:0; text-align:right; font:.73rem/1.35 monospace; }
.map-factions { margin-top:14px; padding-top:11px; border-top:1px solid rgba(255,255,255,.12); }
.map-factions h2 { margin:0 0 9px; color:var(--map-accent); font-size:.74rem; letter-spacing:.06em; text-transform:uppercase; }
.map-factions__empty { margin:0; color:var(--map-muted); font-size:.72rem; line-height:1.4; }
.map-factions__empty[hidden] { display:none; }
.map-factions__list { display:grid; gap:9px; margin:0; padding:0; list-style:none; }
.map-factions__list li>div:first-child { display:flex; justify-content:space-between; gap:10px; color:var(--map-text); font-size:.72rem; line-height:1.3; }
.map-factions__list li span { min-width:0; overflow-wrap:anywhere; }
.map-factions__list li .map-faction__name--andromeda { color:#6ff69a; }
.map-factions__list li strong { flex:none; color:#fff; font:700 .7rem monospace; }
.map-faction__track { height:4px; margin-top:4px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.09); }
.map-faction__track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4fc3f7,#f4b840); box-shadow:0 0 7px rgba(79,195,247,.45); }
.map-hud { right:16px; bottom:16px; max-width:min(470px,calc(100vw - 32px)); font:.72rem/1.45 monospace; }
.map-hud p { margin:8px 0 0; color:var(--map-muted); }
.map-legend { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; color:var(--map-muted); }
.map-legend>span { display:inline-flex; align-items:center; gap:5px; }
.legend-dot { width:8px; height:8px; border-radius:50%; box-shadow:0 0 8px currentColor; }
.legend-dot--home { color:#55f28b; background:currentColor; }.legend-dot--hot { color:#b9cdff; background:currentColor; }.legend-dot--sun { color:#ffdf69; background:currentColor; }.legend-dot--cool { color:#ff7048; background:currentColor; }.legend-dot--exotic { color:#b78cff; background:currentColor; }.legend-dot--unknown { color:#a6acc4; background:currentColor; }
.map-tooltip { position:fixed; z-index:20; opacity:0; pointer-events:none; transform:translate(12px,12px); padding:7px 9px; border-radius:7px; background:rgba(3,8,18,.95); border:1px solid var(--map-border); font:.75rem monospace; transition:opacity .1s; }
.map-tooltip.is-visible { opacity:1; }
.map-labels { position:fixed; inset:0; pointer-events:none; z-index:8; overflow:hidden; }
.map-label { position:absolute; transform:translate(10px,-50%); padding:2px 5px; border-radius:5px; background:rgba(3,8,18,.72); border:1px solid rgba(255,255,255,.12); color:#eef6ff; font:.68rem monospace; white-space:nowrap; }
.map-label--reference { color:#9be7ff; border-color:rgba(125,211,252,.45); }
.map-label--region { color:#ffd58a; border-color:rgba(255,183,77,.5); }
.map-label--home { color:#6ff69a; border-color:rgba(85,242,139,.35); }.map-label--selected { color:#ffd16d; border-color:rgba(244,184,64,.5); }.map-label--home.map-label--selected { color:#6ff69a; border-color:rgba(85,242,139,.55); }
@media (max-width:760px) { .map-tools { top:86px; left:8px; width:calc(100vw - 16px); padding:10px; }.map-details { top:auto; right:8px; bottom:84px; left:8px; width:auto; max-height:36vh; padding:10px; }.map-hud { left:8px; right:8px; bottom:8px; max-width:none; padding:9px; }.map-hud p { display:none; } }
@media (prefers-reduced-motion:reduce) { .map-tooltip { transition:none; } }
