.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.galaxy-map-card{
  padding:14px;
}

.galaxy-kicker{
  font-size:11px;
  color:var(--accent2);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:900;
  margin-bottom:4px;
}

.galaxy-map-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.galaxy-map-sub{
  font-size:13px;
  color:var(--muted);
}

.galaxy-legend{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}

.galaxy-legend-item{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  color:var(--text);
  font-weight:800;
  white-space:nowrap;
}

.galaxy-legend-dot{
  width:11px;
  height:11px;
  border-radius:999px;
  display:inline-block;
  box-shadow:0 0 10px rgba(255,255,255,.14);
}

.galaxy-legend-dot.free{ background:#5aa7ff; }
.galaxy-legend-dot.owned{ background:#ffd36b; }
.galaxy-legend-dot.current{ background:#63ff9b; }
.galaxy-legend-dot.trade{ background:#d38bff; }
.galaxy-legend-dot.event{ background:#ff9d3f; }

.star-map-viewport{
  position:relative;
  height:640px;
  border-radius:22px;
  border:1px solid rgba(43,67,136,.8);
  overflow:hidden;
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.07) 0, transparent 2px),
    radial-gradient(circle at 70% 30%, rgba(255,255,255,.05) 0, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,.05) 0, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.04) 0, transparent 2px),
    linear-gradient(180deg, #01040b 0%, #040812 100%);
  background-size:170px 170px, 210px 210px, 190px 190px, 250px 250px, auto;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.star-map-viewport.dragging{
  cursor:grabbing;
}

.star-map-stage{
  position:absolute;
  width:1600px;
  height:1600px;
  transform-origin:0 0;
  will-change:transform;
}

.star-map-disc{
  position:absolute;
  left:95px;
  top:95px;
  width:1410px;
  height:1410px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.03);
  background:
    radial-gradient(circle at 50% 50%, rgba(35,55,120,.045) 0%, rgba(13,20,47,.03) 42%, rgba(5,8,18,.01) 78%, transparent 100%);
  box-shadow:
    inset 0 0 60px rgba(72,110,255,.03),
    0 0 28px rgba(0,0,0,.14);
  pointer-events:none;
}

.star-node{
  position:absolute;
  width:46px;
  height:46px;
  margin-left:-23px;
  margin-top:-23px;
  border:0;
  border-radius:999px;
  cursor:pointer;
  padding:0;
  z-index:2;
  background:transparent;
  transition:transform .12s ease, filter .12s ease;
  touch-action:none;
}

.star-node::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:14px;
  height:14px;
  margin-left:-7px;
  margin-top:-7px;
  border-radius:999px;
  box-shadow:0 0 10px rgba(125,211,252,.35);
  background:radial-gradient(circle, #ecf6ff 0%, #7dc0ff 42%, #2b65ff 100%);
}

.star-node:hover{
  transform:scale(1.10);
  filter:brightness(1.12);
}

.star-node.owned::before{
  background:radial-gradient(circle, #fff4c7 0%, #ffd36b 42%, #d88b19 100%);
  box-shadow:0 0 12px rgba(255,211,107,.35);
}

.star-node.current::before{
  background:radial-gradient(circle, #effff4 0%, #7effac 42%, #1ea95d 100%);
  box-shadow:0 0 14px rgba(107,255,159,.48);
}

.star-node.trade::before{
  width:16px;
  height:16px;
  margin-left:-8px;
  margin-top:-8px;
  background:radial-gradient(circle, #f9ebff 0%, #d38bff 45%, #7b2dff 100%);
  box-shadow:0 0 15px rgba(211,139,255,.42);
}

.star-node.selected{
  outline:2px solid rgba(255,255,255,.85);
  outline-offset:2px;
}

.galaxy-detail-card{
  margin-top:14px;
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
}

.galaxy-detail-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}

.galaxy-detail-name{
  font-size:28px;
  font-weight:900;
  color:var(--text);
  line-height:1.05;
}

.galaxy-detail-sub{
  margin-top:6px;
  font-size:14px;
  color:var(--muted);
  line-height:1.45;
}

.galaxy-detail-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}

.galaxy-detail-stat{
  background:rgba(8,14,35,.52);
  border:1px solid rgba(34,48,90,.72);
  border-radius:14px;
  padding:12px;
}

.galaxy-detail-stat-label{
  font-size:11px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:900;
  margin-bottom:6px;
}

.galaxy-detail-stat-value{
  font-size:18px;
  font-weight:900;
  color:var(--text);
}

.galaxy-planet-overview{
  margin-top:0;
}

.galaxy-planet-overview-title{
  font-size:15px;
  font-weight:900;
  color:var(--text);
  margin-bottom:10px;
}

.galaxy-planet-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.galaxy-planet-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(52,79,156,.54);
  background:linear-gradient(180deg,rgba(12,25,63,.88),rgba(8,16,39,.95));
  transition:
    transform .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    background .18s ease;
}

.galaxy-planet-row.current{
  border-color:rgba(87,255,152,.82);
  box-shadow:0 0 0 1px rgba(87,255,152,.16);
}

.galaxy-planet-main{
  min-width:0;
}

.galaxy-planet-name{
  font-size:15px;
  font-weight:900;
  color:var(--text);
  line-height:1.15;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}

.galaxy-planet-sub{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}

.galaxy-planet-meta{
  text-align:right;
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:12px;
  font-weight:800;
  color:var(--text);
  white-space:nowrap;
  align-self:center;
}

.galaxy-inline-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:56px;
  padding:3px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.galaxy-inline-badge.current{
  background:rgba(24,165,88,.18);
  color:#6bff9f;
  border:1px solid rgba(24,165,88,.45);
}

.galaxy-detail-note{
  margin-top:14px;
  font-size:13px;
  color:var(--muted);
  line-height:1.45;
}

.galaxy-detail-empty{
  padding:4px 0;
}

@media (max-width: 900px){
  .star-map-viewport{
    height:520px;
  }

  .galaxy-detail-grid{
    grid-template-columns:1fr;
  }

  .galaxy-planet-row{
    grid-template-columns:1fr;
  }

  .galaxy-planet-meta{
    text-align:left;
    white-space:normal;
    justify-content:flex-start;
  }
}

@media (max-width: 640px){
  .star-map-viewport{
    height:420px;
  }

  .galaxy-detail-name{
    font-size:22px;
  }

  .galaxy-legend{
    justify-content:flex-start;
  }
}