/* Luna Terra Regional Sector Map v2.46.0
   Single hover dossier, one legend, right-click sector actions. */

/* Remove the four competing permanent information surfaces from the regional map. */
body.lt-sector-hex-map #selectedReadout,
body.lt-sector-hex-map .player-map-hint,
body.lt-sector-hex-map .lt-sector-info-panel,
body.lt-sector-hex-map .lt-sector-map-key{
  display:none!important;
}

/* The old Star Map lore/editor column is now an on-demand GM drawer only. */
body.lt-sector-hex-map .app>.panel{
  display:none!important;
}
body.lt-sector-hex-map:not(.lt-player-mode) .app{
  grid-template-columns:360px minmax(0,1fr)!important;
}
body.lt-sector-hex-map:not(.lt-player-mode) .app>.main{
  grid-column:2!important;
}
body.lt-sector-hex-map.lt-sector-editor-panel-open .app>.panel{
  display:block!important;
  position:fixed!important;
  z-index:92!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  width:min(390px,94vw)!important;
  border-left:1px solid var(--line2)!important;
  box-shadow:-18px 0 44px rgba(0,0,0,.58)!important;
  background:linear-gradient(180deg,rgba(7,19,31,.995),rgba(3,10,18,.995))!important;
}
body.lt-sector-hex-map .lt-sector-editor-close{
  position:sticky;
  top:0;
  z-index:3;
  width:100%;
  margin:0 0 10px;
  border:1px solid rgba(0,216,255,.34);
  background:#071725;
  color:#c9e7f7;
  padding:8px 10px;
  font:700 9px/1 Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  cursor:pointer;
}
body.lt-sector-hex-map .lt-sector-editor-close:hover{border-color:#00d8ff;color:#fff}

/* One unified legend, positioned like a map key rather than a floating status panel. */
body.lt-sector-hex-map .region-map-legend{
  left:12px!important;
  right:auto!important;
  top:72px!important;
  bottom:auto!important;
  min-width:205px!important;
  max-width:235px!important;
  padding:10px 11px!important;
  border:1px solid rgba(65,111,144,.52)!important;
  background:rgba(4,11,20,.94)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.42)!important;
  clip-path:polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,0 100%);
  pointer-events:none!important;
}
body.lt-sector-hex-map .region-map-legend .legend-title{
  margin:0 0 8px!important;
  color:#f1f7fb!important;
  font:700 11px/1 Consolas,monospace!important;
  letter-spacing:.1em!important;
}
body.lt-sector-hex-map .region-map-legend .legend-subtitle{
  margin:10px 0 6px!important;
  padding-top:8px;
  border-top:1px solid rgba(70,117,149,.28);
  color:#5fcde5!important;
  font:700 7px/1 Consolas,monospace!important;
  letter-spacing:.16em!important;
}
body.lt-sector-hex-map .lt-sector-legend-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 8px}
body.lt-sector-hex-map .lt-sector-legend-row{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  color:#b9ccd9;
  font:8px/1.2 Consolas,monospace;
}
body.lt-sector-hex-map .lt-sector-legend-row span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.lt-sector-hex-map .lt-sector-control-row{display:grid;grid-template-columns:10px minmax(0,1fr);align-items:center;gap:7px;margin:5px 0;color:#c9d8e2;font:8px/1.2 Consolas,monospace}
body.lt-sector-hex-map .lt-sector-control-swatch{width:10px;height:10px;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);box-shadow:0 0 7px currentColor}
body.lt-sector-hex-map .lt-sector-legend-note{margin-top:8px;padding-top:7px;border-top:1px solid rgba(70,117,149,.22);color:#6f8da1;font:7px/1.45 Consolas,monospace;text-transform:uppercase;letter-spacing:.08em}

/* Readable facility symbols inside the sector hexes. */
body.lt-sector-hex-map .lt-sector-station-row{gap:4px!important;min-height:20px!important}
body.lt-sector-hex-map .lt-sector-station-icon,
body.lt-sector-hex-map .lt-sector-station-more,
body.lt-sector-hex-map .lt-sector-legend-icon{
  width:20px!important;
  height:18px!important;
  display:grid;
  place-items:center;
  clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);
  background:#04121e;
  box-shadow:inset 0 0 0 1px #22dfff,0 0 6px rgba(0,216,255,.18);
  color:#8df3ff;
  font-size:0!important;
  line-height:1;
}
body.lt-sector-hex-map .lt-sector-station-icon::before,
body.lt-sector-hex-map .lt-sector-legend-icon::before{
  display:block;
  font:700 10px/1 Consolas,monospace;
  color:currentColor;
}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="shipyard"]::before,body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="shipyard"]::before{content:"▲"}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="wharf"]::before,body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="wharf"]::before{content:"⌂"}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="equipment"]::before,body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="equipment"]::before{content:"◇"}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="trading"]::before,body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="trading"]::before{content:"C"}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="hq"]::before,body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="hq"]::before{content:"✦"}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="pirate"]::before,body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="pirate"]::before{content:"×"}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="station"]::before,body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="station"]::before{content:"●"}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="trading"],
body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="trading"]{color:#ffd632;box-shadow:inset 0 0 0 1px #e9ba24,0 0 6px rgba(233,186,36,.18)}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="hq"],
body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="hq"]{color:#dc8cff;box-shadow:inset 0 0 0 1px #b66ad4,0 0 6px rgba(182,106,212,.18)}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="pirate"],
body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="pirate"]{color:#ff707e;box-shadow:inset 0 0 0 1px #d84d5b,0 0 6px rgba(216,77,91,.20)}
body.lt-sector-hex-map .lt-sector-station-icon[data-kind="equipment"],
body.lt-sector-hex-map .lt-sector-legend-icon[data-kind="equipment"]{color:#59efbd;box-shadow:inset 0 0 0 1px #25c99a,0 0 6px rgba(37,201,154,.18)}
body.lt-sector-hex-map .lt-sector-station-more{font:700 7px/1 Consolas,monospace!important;color:#a9c6d6}

/* Make the hover card the single quick-information surface. */
body.lt-sector-hex-map .lt-sector-hover-card{
  width:292px!important;
  border-color:color-mix(in srgb,var(--sector-hover-colour,#00d8ff) 72%,#31546a)!important;
  box-shadow:0 18px 40px rgba(0,0,0,.62),0 0 16px color-mix(in srgb,var(--sector-hover-colour,#00d8ff) 18%,transparent)!important;
}
body.lt-sector-hex-map .lt-sector-hover-station b{font-size:0!important}
body.lt-sector-hex-map .lt-sector-hover-station b::before{font:700 9px/1 Consolas,monospace}
body.lt-sector-hex-map .lt-sector-hover-station[data-kind="shipyard"] b::before{content:"▲"}
body.lt-sector-hex-map .lt-sector-hover-station[data-kind="wharf"] b::before{content:"⌂"}
body.lt-sector-hex-map .lt-sector-hover-station[data-kind="equipment"] b::before{content:"◇"}
body.lt-sector-hex-map .lt-sector-hover-station[data-kind="trading"] b::before{content:"C"}
body.lt-sector-hex-map .lt-sector-hover-station[data-kind="hq"] b::before{content:"✦"}
body.lt-sector-hex-map .lt-sector-hover-station[data-kind="pirate"] b::before{content:"×"}
body.lt-sector-hex-map .lt-sector-hover-station[data-kind="station"] b::before{content:"●"}

/* Right-click sector action menu. */
body.lt-sector-hex-map .lt-sector-context-menu{
  position:absolute;
  z-index:120;
  display:none;
  min-width:218px;
  padding:6px;
  border:1px solid rgba(62,115,149,.72);
  background:rgba(4,12,22,.985);
  box-shadow:0 18px 42px rgba(0,0,0,.64);
  clip-path:polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,0 100%);
}
body.lt-sector-hex-map .lt-sector-context-menu.open{display:block}
body.lt-sector-hex-map .lt-sector-context-head{padding:7px 8px 8px;border-bottom:1px solid rgba(69,116,148,.28);margin-bottom:5px}
body.lt-sector-hex-map .lt-sector-context-head strong{display:block;color:#f0f6fa;font:700 12px/1.2 Consolas,monospace}
body.lt-sector-hex-map .lt-sector-context-head span{display:block;margin-top:4px;color:#7394a8;font:7px/1 Consolas,monospace;text-transform:uppercase;letter-spacing:.12em}
body.lt-sector-hex-map .lt-sector-context-menu button{
  pointer-events:auto!important;
  width:100%;
  display:block;
  margin:0 0 3px;
  padding:8px 9px;
  border:1px solid transparent;
  background:#071725;
  color:#cbdce7;
  text-align:left;
  font:700 8px/1 Consolas,monospace;
  text-transform:uppercase;
  letter-spacing:.1em;
  cursor:pointer;
}
body.lt-sector-hex-map .lt-sector-context-menu button:hover{border-color:#00d8ff;color:#fff;background:rgba(0,216,255,.08)}

/* On-demand lore drawer opened from the sector context menu. */
body.lt-sector-hex-map .lt-sector-lore-drawer{
  position:absolute;
  z-index:86;
  top:72px;
  right:12px;
  bottom:12px;
  width:min(360px,calc(100% - 24px));
  display:none;
  overflow:auto;
  padding:14px;
  border:1px solid rgba(64,116,150,.62);
  background:linear-gradient(180deg,rgba(6,17,29,.99),rgba(3,10,18,.99));
  box-shadow:-14px 18px 42px rgba(0,0,0,.60);
  clip-path:polygon(0 0,calc(100% - 13px) 0,100% 13px,100% 100%,0 100%);
}
body.lt-sector-hex-map .lt-sector-lore-drawer.open{display:block}
body.lt-sector-hex-map .lt-sector-lore-close{position:absolute;right:8px;top:7px;border:0;background:transparent;color:#7899ac;font:20px/1 Consolas,monospace;cursor:pointer;pointer-events:auto!important}
body.lt-sector-hex-map .lt-sector-lore-close:hover{color:#fff}
body.lt-sector-hex-map .lt-sector-lore-kicker{color:var(--drawer-colour,#00d8ff);font:700 7px/1 Consolas,monospace;text-transform:uppercase;letter-spacing:.16em;margin-bottom:8px}
body.lt-sector-hex-map .lt-sector-lore-drawer h2{margin:0 32px 5px 0;color:#f4f8fb;font:700 20px/1.15 Consolas,monospace;text-transform:uppercase}
body.lt-sector-hex-map .lt-sector-lore-faction{display:flex;align-items:center;gap:7px;color:#a9c0ce;font:9px/1.3 Consolas,monospace;padding-bottom:11px;border-bottom:1px solid rgba(69,116,148,.28)}
body.lt-sector-hex-map .lt-sector-lore-faction i{width:9px;height:9px;background:var(--drawer-colour,#00d8ff);box-shadow:0 0 8px var(--drawer-colour,#00d8ff)}
body.lt-sector-hex-map .lt-sector-lore-section{padding-top:12px}
body.lt-sector-hex-map .lt-sector-lore-section h3{margin:0 0 7px;color:#5edcf0;font:700 8px/1 Consolas,monospace;text-transform:uppercase;letter-spacing:.14em}
body.lt-sector-hex-map .lt-sector-lore-copy{color:#c8d7e2;font:10px/1.65 Consolas,monospace;white-space:pre-wrap}
body.lt-sector-hex-map .lt-sector-lore-tags{display:flex;flex-wrap:wrap;gap:5px}
body.lt-sector-hex-map .lt-sector-lore-tags span{border:1px solid rgba(71,126,159,.38);padding:4px 6px;color:#9fbdcf;font:7px/1 Consolas,monospace;text-transform:uppercase}
body.lt-sector-hex-map .lt-sector-lore-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:14px}
body.lt-sector-hex-map .lt-sector-lore-actions button{pointer-events:auto!important}

@media(max-width:900px){
  body.lt-sector-hex-map .region-map-legend{top:70px!important;max-width:205px!important}
  body.lt-sector-hex-map .lt-sector-lore-drawer{left:8px;right:8px;top:auto;bottom:8px;width:auto;max-height:58%}
}
@media(max-width:680px){
  body.lt-sector-hex-map .region-map-legend{display:none!important}
  body.lt-sector-hex-map .lt-sector-context-menu{min-width:200px}
}
