.atlas-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,310px);
  gap:14px;
  align-items:stretch;
}
.atlas-map-frame{
  position:relative;
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(195,222,216,.2);
  background:#09232b;
  box-shadow:inset 0 0 90px rgba(3,14,19,.28);
}
.atlas-map-canvas{
  width:100%;
  height:auto;
  aspect-ratio:4 / 3;
  min-height:520px;
  max-height:820px;
  background:
    radial-gradient(ellipse at 50% 48%,rgba(28,100,106,.28),transparent 62%),
    repeating-radial-gradient(ellipse at 48% 46%,transparent 0 90px,rgba(174,214,205,.055) 91px 92px,transparent 93px 142px),
    #09232b;
  cursor:grab;
}
.atlas-map-canvas:active{cursor:grabbing}
.atlas-map-toolbar{
  position:absolute;
  z-index:750;
  top:14px;
  right:14px;
  left:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  pointer-events:none;
}
.atlas-map-caption,.atlas-map-controls{pointer-events:auto}
.atlas-map-caption{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:9px 12px;
  border:1px solid rgba(195,222,216,.18);
  background:rgba(5,18,24,.84);
  color:#d6dfd9;
  font:800 10px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.12em;
}
.atlas-map-caption i{width:7px;height:7px;border-radius:50%;background:var(--yellow);box-shadow:0 0 12px rgba(232,174,106,.62)}
.atlas-map-controls{display:flex;gap:6px}
.atlas-map-controls button{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid rgba(195,222,216,.25);
  border-radius:2px;
  background:rgba(5,18,24,.9);
  color:var(--text);
  font-size:20px;
  line-height:1;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
.atlas-map-controls button:last-child{font-size:16px;color:var(--yellow)}
.atlas-map-controls button:hover,.atlas-map-controls button:focus-visible{border-color:var(--yellow);background:#142f35;color:var(--yellow);outline:none}
.atlas-map-footer{
  position:absolute;
  z-index:740;
  right:0;
  bottom:0;
  left:0;
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:10px 14px;
  border-top:1px solid rgba(195,222,216,.13);
  background:linear-gradient(90deg,rgba(5,18,24,.92),rgba(5,18,24,.74));
  color:#b6c7c3;
  font:11px ui-monospace,SFMono-Regular,Menlo,monospace;
  pointer-events:none;
}
.atlas-sidebar{
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:20px 18px;
  border:1px solid var(--line);
  background:linear-gradient(160deg,rgba(16,39,46,.96),rgba(7,22,28,.97));
}
.atlas-sidebar-heading{display:flex;align-items:end;justify-content:space-between;gap:12px}
.atlas-sidebar-heading .kicker{margin:0 0 8px;font-size:9px}
.atlas-sidebar-heading h2,.atlas-sidebar-heading h3{margin:0;color:var(--text);font-family:"Arial Narrow",Bahnschrift,"Segoe UI",sans-serif;font-size:24px;line-height:1.05;letter-spacing:-.025em}
.atlas-sidebar-heading>[data-atlas-count]{flex:0 0 auto;padding:5px 8px;border:1px solid rgba(131,200,208,.2);color:var(--blue);font:10px ui-monospace,SFMono-Regular,Menlo,monospace}
.atlas-sidebar-intro{margin:13px 0 16px;color:var(--muted);font-size:13px;line-height:1.55}
.atlas-locations{display:grid;gap:7px}
.atlas-location{
  display:grid;
  grid-template-columns:10px minmax(0,1fr);
  align-items:center;
  gap:11px;
  width:100%;
  min-width:0;
  padding:10px 9px;
  border:1px solid rgba(195,222,216,.11);
  background:rgba(4,18,23,.4);
  color:var(--text);
  text-align:left;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.atlas-location:hover,.atlas-location:focus-visible{transform:translateX(2px);border-color:rgba(131,200,208,.42);background:rgba(131,200,208,.08);outline:none}
.atlas-location-mark,.atlas-legend-dot{display:block;width:9px;height:9px;border:2px solid #56cdbc;border-radius:50%;box-shadow:0 0 12px rgba(86,205,188,.28)}
.atlas-location-capital .atlas-location-mark,.atlas-legend-capital{border-color:var(--yellow);background:var(--yellow);box-shadow:0 0 12px rgba(232,174,106,.4)}
.atlas-location-owned .atlas-location-mark,.atlas-legend-owned{border-color:var(--blue);background:var(--blue);box-shadow:0 0 12px rgba(131,200,208,.32)}
.atlas-location-free .atlas-location-mark,.atlas-legend-free{border-color:var(--green);background:var(--green);box-shadow:0 0 12px rgba(86,205,188,.32)}
.atlas-location-copy{display:grid;gap:4px;min-width:0}
.atlas-location-copy strong{overflow:hidden;color:#e4e8df;font-size:13px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.atlas-location-copy small{overflow:hidden;color:var(--muted);font-size:10px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.atlas-legend{display:grid;gap:8px;margin-top:17px;padding-top:15px;border-top:1px solid var(--line)}
.atlas-legend span{display:flex;align-items:center;gap:9px;color:#becdca;font-size:11px}
.atlas-legend-dot{width:8px;height:8px;flex:0 0 auto}
.atlas-legend-boundary{display:block;width:14px;height:9px;flex:0 0 auto;border:1.5px dashed #83c8d0;background:rgba(131,200,208,.13)}
.atlas-legend-route,.atlas-legend-active-route{display:block;width:16px;height:0;flex:0 0 auto;border-top:2px dashed #83c8d0}
.atlas-legend-active-route{border-color:#e8ae6a}
.atlas-privacy-note{margin:17px 0 0;color:#88a5a6;font-size:11px;line-height:1.55}
.atlas-details-link{margin-top:auto;padding-top:17px;color:var(--yellow);font-size:12px;font-weight:800;text-underline-offset:4px}
.atlas-error{grid-column:1/-1}
.leaflet-container{font:12px "Segoe UI",Arial,sans-serif;color:var(--text)}
.leaflet-image-layer{filter:saturate(.82) brightness(.84) contrast(1.03)}
.atlas-marker{border:0;background:transparent}
.atlas-marker-core{
  position:absolute;
  top:4px;
  left:4px;
  width:12px;
  height:12px;
  border:2px solid #e5f5ef;
  border-radius:50%;
  background:#56cdbc;
  box-shadow:0 0 0 5px rgba(86,205,188,.2),0 0 22px rgba(86,205,188,.85);
  transition:transform .16s ease,box-shadow .16s ease;
}
.atlas-marker:hover .atlas-marker-core{transform:scale(1.2)}
.atlas-marker-capital .atlas-marker-core{background:var(--yellow);box-shadow:0 0 0 6px rgba(232,174,106,.22),0 0 24px rgba(232,174,106,.95)}
.atlas-marker-owned .atlas-marker-core{background:var(--blue);box-shadow:0 0 0 5px rgba(131,200,208,.2),0 0 22px rgba(131,200,208,.8)}
.atlas-tooltip{
  padding:6px 8px;
  border:1px solid rgba(195,222,216,.25);
  border-radius:2px;
  background:rgba(5,18,24,.9);
  box-shadow:0 8px 20px rgba(0,0,0,.28);
  color:#eaf0e9;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
}
.atlas-tooltip::before{display:none}
.atlas-tooltip-capital{border-color:rgba(232,174,106,.55);color:#f1c38e}
.atlas-tooltip-owned{border-color:rgba(131,200,208,.5);color:#b9e5e8}
.atlas-route-line{filter:drop-shadow(0 0 4px rgba(131,200,208,.52))}
.atlas-route-line-active{filter:drop-shadow(0 0 7px rgba(232,174,106,.85));animation:atlas-route-glow 2s ease-in-out infinite alternate}
.atlas-region{vector-effect:non-scaling-stroke;transition:fill-opacity .16s ease,opacity .16s ease}
.atlas-region:hover{fill-opacity:.3!important;opacity:1}
.atlas-popup{display:grid;gap:7px;min-width:170px;padding:2px;color:#172a2c}
.atlas-popup-kicker{color:#8f6740;font:800 9px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.12em}
.atlas-popup-title{font-size:16px;line-height:1.25}
.atlas-popup-status{width:max-content;padding:4px 7px;border:1px solid rgba(86,205,188,.34);border-radius:2px;background:rgba(86,205,188,.1);color:#16776b;font-size:11px;font-weight:800}
.atlas-popup-status-owned{border-color:rgba(71,145,158,.32);background:rgba(131,200,208,.15);color:#286a73}
.atlas-popup-status-capital{border-color:rgba(190,129,58,.34);background:rgba(232,174,106,.18);color:#8b5a21}
.atlas-popup-owner,.atlas-popup-port,.atlas-popup-coords{color:#566c6d;font-size:11px;line-height:1.4}
.leaflet-popup-content-wrapper{border:1px solid rgba(195,222,216,.28);border-radius:3px;background:#f1efe7;box-shadow:0 12px 30px rgba(0,0,0,.36)}
.leaflet-popup-content{margin:12px 14px}
.leaflet-popup-tip{background:#f1efe7}
@keyframes atlas-route-glow{from{opacity:.68}to{opacity:1}}

@media(max-width:920px){
  .atlas-layout{grid-template-columns:1fr}
  .atlas-map-canvas{aspect-ratio:4 / 3;min-height:480px;max-height:760px}
  .atlas-sidebar{padding:18px}
}
@media(max-width:480px){
  .atlas-map-canvas{height:auto;min-height:340px;max-height:500px;aspect-ratio:1 / 1}
  .atlas-map-toolbar{top:10px;right:10px;left:10px}
  .atlas-map-caption{padding:8px 9px;font-size:8px;letter-spacing:.08em}
  .atlas-map-controls{gap:4px}
  .atlas-map-controls button{width:34px;height:34px}
  .atlas-map-footer{padding:8px 10px;font-size:9px}
  .atlas-map-footer span:last-child{display:none}
}
