:root {
  color-scheme: dark;
  --bg: #06080f;
  --bg-2: #0c1220;
  --panel: rgba(10, 18, 30, 0.82);
  --panel-strong: rgba(12, 22, 36, 0.92);
  --line: rgba(120, 180, 255, 0.18);
  --text: #dbe7f4;
  --muted: #9cb1c8;
  --accent: #67d4ff;
  --hot: #ff7a59;
  --temperate: #4fe1c2;
  --cold: #9cc8ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Share Tech Mono", "Courier New", monospace;
  color: var(--text);
  background: radial-gradient(circle at top, #121a2a, var(--bg) 60%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--sky-layer-1, none), var(--sky-layer-2, none);
  background-size: var(--sky-size-1, 900px 900px), var(--sky-size-2, 1400px 1400px);
  background-position: var(--sky-pos-1, 0 0), var(--sky-pos-2, 0 0);
  background-repeat: repeat;
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  padding: 32px 32px 48px;
  max-width: 1320px;
  margin: 0 auto;
}

h1,
h2,
.eyebrow,
.meta-title {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 2.5vw, 2.8rem);
}

h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

p {
  margin: 0;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.5;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  animation: float-in 0.8s ease both;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  font-size: 0.75rem;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.seed-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.seed-field label {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.seed-field input {
  width: 170px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(103, 212, 255, 0.35);
  background: rgba(10, 18, 30, 0.9);
  color: var(--text);
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.85rem;
}

.seed-field input:focus-visible {
  outline: 2px solid rgba(103, 212, 255, 0.6);
  outline-offset: 2px;
}

.btn {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(103, 212, 255, 0.6);
  background: linear-gradient(120deg, rgba(103, 212, 255, 0.2), transparent);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 20px rgba(103, 212, 255, 0.2);
}

.btn-secondary {
  font-size: 0.7rem;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(10, 18, 30, 0.7);
}

.system-id {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.system-id.seed-random {
  color: var(--muted);
  opacity: 0.75;
}

.share-output {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
  word-break: break-all;
  max-width: 280px;
  min-height: 18px;
}

.share-output.is-visible {
  color: var(--text);
}

.share-output a {
  color: var(--accent);
  text-decoration: none;
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 32px;
}

.viz,
.details,
.strip-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px rgba(4, 8, 16, 0.5);
  animation: float-in 0.9s ease both;
}

.details {
  background: var(--panel-strong);
  overflow: visible;
  position: relative;
  z-index: 1;
}

.strip-panel {
  position: sticky;
  top: 16px;
  z-index: 5;
  background: var(--bg-2);
  backdrop-filter: none;
}

.viz {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
}

.viz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.meta-group {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.meta {
  background: var(--panel-strong);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(103, 212, 255, 0.15);
  min-width: 180px;
}

.meta-controls {
  min-width: 260px;
  margin-left: auto;
}

.meta-controls-body {
  margin-top: 0;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.meta-controls .seed-field {
  position: relative;
}

.meta-controls .seed-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.meta-controls .seed-field input {
  width: 180px;
}

.meta-controls .btn {
  padding: 10px 16px;
  font-size: 0.75rem;
}

.meta--stars {
  width: 240px;
}

.meta--stars .meta-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-title {
  font-size: 0.65rem;
  color: var(--muted);
}

.meta-value {
  font-size: 1rem;
  margin-top: 6px;
}

.map-shell {
  background: radial-gradient(circle at center, rgba(103, 212, 255, 0.08), transparent 60%),
    var(--bg-2);
  border-radius: 18px;
  border: 1px solid rgba(103, 212, 255, 0.12);
  padding: 16px;
  height: clamp(520px, 70vh, 820px);
  position: relative;
  overflow: hidden;
}

#system-map {
  width: 100%;
  height: 100%;
}

#system-map [data-focus-id] {
  cursor: pointer;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.legend-shell {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
}

.legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(103, 212, 255, 0.3);
  background: rgba(9, 16, 26, 0.7);
  color: var(--muted);
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.legend-toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid rgba(103, 212, 255, 0.4);
}

.legend-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(103, 212, 255, 0.2);
  background: var(--panel-strong);
  box-shadow: 0 18px 30px rgba(4, 8, 16, 0.45);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
  min-width: 210px;
}

.legend-shell:hover .legend-popover,
.legend-shell:focus-within .legend-popover {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.legend-popover .legend {
  flex-direction: column;
  gap: 10px;
  font-size: 0.7rem;
}

.map-hud-stack {
  position: absolute;
  right: 18px;
  top: 18px;
  padding-top: 30px;
  z-index: 6;
  pointer-events: none;
}

.map-hud {
  position: relative;
  min-width: 200px;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(103, 212, 255, 0.25);
  background: rgba(9, 16, 26, 0.88);
  box-shadow: 0 14px 24px rgba(4, 8, 16, 0.4);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.map-hud-controls {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.map-hud-btn {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(103, 212, 255, 0.35);
  background: rgba(9, 16, 26, 0.88);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-hud-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(103, 212, 255, 0.2);
}

.map-hud-btn:focus-visible {
  outline: 2px solid rgba(103, 212, 255, 0.6);
  outline-offset: 2px;
}

.map-hud.is-empty {
  opacity: 0.65;
}

.map-hud-title {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.map-hud-line {
  color: var(--text);
  line-height: 1.35;
}

.map-hud-line + .map-hud-line {
  margin-top: 4px;
  color: var(--muted);
}

.map-hud-line--bullet {
  position: relative;
  padding-left: 12px;
  color: var(--text);
}

.map-hud-line--bullet::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.map-hud-divider {
  height: 1px;
  width: 100%;
  background: rgba(103, 212, 255, 0.2);
  margin: 8px 0;
}

.map-hud-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(103, 212, 255, 0.35);
  margin-bottom: 6px;
}

.map-hud-tip {
  margin-top: 6px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.strip {
  margin-top: 8px;
  --strip-padding-x: 16px;
  --strip-padding-bottom: 26px;
  padding: var(--strip-padding-x) var(--strip-padding-x)
    var(--strip-padding-bottom);
  border-radius: 14px;
  border: 1px solid rgba(120, 180, 255, 0.18);
  background: var(--bg-2);
  position: relative;
  overflow: visible;
  z-index: 3;
  --strip-dot-radius: 8px;
  --strip-line-y: 30px;
  --strip-sun-size: 46px;
  --strip-gas-size: 28px;
}

.strip-title {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.strip-line {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  min-height: 120px;
}

.strip-connector {
  position: absolute;
  left: calc(var(--strip-sun-size) / 2);
  right: 24px;
  top: var(--strip-line-y);
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 122, 89, 0.45),
    rgba(79, 225, 194, 0.45),
    rgba(156, 200, 255, 0.45)
  );
  z-index: 0;
}

.strip-sun-stack {
  position: relative;
  width: var(--strip-sun-size);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  z-index: 1;
}

.strip-sun {
  position: relative;
  width: var(--strip-sun-size);
  height: var(--strip-sun-size);
  border-radius: 50%;
  margin-top: calc(var(--strip-line-y) - (var(--strip-sun-size) / 2));
  background: radial-gradient(
    circle at 30% 30%,
    #ffffff,
    var(--sun-color, var(--accent)) 60%
  );
  box-shadow: 0 0 16px var(--sun-color, rgba(103, 212, 255, 0.6));
  cursor: pointer;
}

.strip-secondary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  min-height: 10px;
}

.strip-secondary.has-secondary::before {
  content: "";
  width: 1px;
  height: 12px;
  background: rgba(120, 180, 255, 0.25);
}

.strip-secondary-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    #ffffff,
    var(--sun-color, var(--accent)) 70%
  );
  box-shadow: 0 0 10px var(--sun-color, rgba(103, 212, 255, 0.45));
  cursor: pointer;
}

.strip-track {
  position: relative;
  flex: 1;
  overflow: visible;
  padding: 0 100px 0;
}

.strip-dots {
  position: relative;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 110px;
  padding: calc(var(--strip-line-y) - var(--strip-dot-radius)) 0 0;
  width: 100%;
}

.strip-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 18px;
  cursor: pointer;
}

.focus-dim {
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.focus-dim.is-dimmed {
  opacity: 0.18;
  filter: grayscale(35%);
}

.focus-dim.is-focused {
  opacity: 1;
  filter: none;
}

.orbit.focus-dim.is-dimmed {
  opacity: 0.1;
  animation: none;
}

.orbit.focus-dim.is-focused {
  opacity: 0.95;
}

.strip-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.strip-dot-label {
  position: absolute;
  bottom: calc(100% + 6px);
  top: auto;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  z-index: 4;
}

.strip-dot {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dot-color);
  border: 1px solid rgba(10, 18, 30, 0.8);
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 0 8px color-mix(in srgb, var(--dot-color) 50%, transparent);
}

.strip-dot--main {
  width: 24px;
  height: 24px;
}

.strip-body.is-selected .strip-dot--main {
  box-shadow: 0 0 14px rgba(103, 212, 255, 0.55);
}

.strip-body--belt.is-selected .strip-dot--main {
  box-shadow: none;
}

.strip-body--belt.is-selected .strip-dot--belt-cluster {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--dot-color) 55%, white 45%))
    drop-shadow(0 0 12px color-mix(in srgb, var(--dot-color) 35%, transparent));
}

.strip-body.is-selected .strip-dot-label {
  color: var(--accent);
}

.strip-dot--gas {
  width: var(--strip-gas-size);
  height: var(--strip-gas-size);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.strip-dot--rocky {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.strip-dot--belt {
  background: transparent;
  border: none;
  box-shadow: none;
}

.strip-dot--belt.strip-dot--main {
  width: 26px;
  height: 26px;
}

.strip-dot--belt-cluster {
  background: transparent;
  border: none;
  box-shadow: none;
}

.strip-belt-point {
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 50%);
  width: var(--br, 2px);
  height: var(--br, 2px);
  border-radius: 50%;
  background: color-mix(in srgb, var(--dot-color) 70%, white 30%);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px color-mix(in srgb, var(--dot-color) 45%, white 55%);
  opacity: 0.9;
}

.strip-dot--asteroid {
  background: transparent;
  border: none;
}

.strip-dot--asteroid::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--dot-color);
  border-radius: 3px;
}
.strip-dot--ring {
  background: transparent;
  border: 2px solid var(--dot-color);
}

.strip-dot--sub {
  width: 12px;
  height: 12px;
}

.strip-dot--hot {
  --dot-color: var(--hot);
}

.strip-dot--temperate {
  --dot-color: var(--temperate);
}

.strip-dot--cold {
  --dot-color: var(--cold);
}

.strip-band--hot {
  --dot-color: var(--hot);
}

.strip-band--temperate {
  --dot-color: var(--temperate);
}

.strip-band--cold {
  --dot-color: var(--cold);
}

.strip-subdots {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  margin-top: 4px;
}

.strip-body--subs .strip-subdots::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  bottom: 4px;
  width: 1px;
  background: rgba(120, 180, 255, 0.25);
  transform: translateX(-50%);
}

.strip-stem {
  display: none;
}

.strip-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--strip-gas-size) * 2.1);
  height: calc(var(--strip-gas-size) * 0.7);
  border: 2px solid color-mix(in srgb, var(--dot-color) 70%, white 30%);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(68deg);
  pointer-events: none;
}

.strip-ring--back {
  z-index: 1;
  opacity: 0.45;
  filter: blur(0.2px);
}

.strip-ring--front {
  z-index: 3;
  opacity: 0.85;
  clip-path: inset(50% 0 0 0);
  box-shadow: 0 0 6px color-mix(in srgb, var(--dot-color) 45%, white 55%);
}

.strip-dot--main.strip-dot--rocky::before,
.strip-dot--main.strip-dot--gas::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0) 60%
  );
  pointer-events: none;
}

.strip-dot--main.strip-dot--rocky::after,
.strip-dot--main.strip-dot--gas::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.45) 100%
  );
  pointer-events: none;
}

.strip-body--belt .strip-subdots {
  gap: 6px;
  margin-top: 6px;
}

.strip-body--belt .strip-subdots::before {
  background: linear-gradient(
    180deg,
    rgba(120, 180, 255, 0.5),
    rgba(120, 180, 255, 0)
  );
  width: 2px;
}

.strip-body--belt .strip-dot--asteroid {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--dot-color) 70%, white 30%);
  box-shadow: 0 0 6px color-mix(in srgb, var(--dot-color) 45%, white 55%);
}

.strip-body--belt .strip-dot--asteroid::before {
  display: none;
}

.strip-dot:focus-visible {
  outline: 2px solid rgba(103, 212, 255, 0.6);
  outline-offset: 2px;
}

.strip-dot .tooltip,
.strip-sun .tooltip,
.strip-secondary-dot .tooltip {
  z-index: 200;
  top: auto;
  bottom: calc(100% + 10px);
}

.strip-nav {
  position: absolute;
  left: var(--strip-padding-x);
  bottom: 12px;
  display: inline-flex;
  gap: 8px;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease;
}

.strip-nav-btn {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(103, 212, 255, 0.35);
  background: rgba(9, 16, 26, 0.88);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.strip-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(103, 212, 255, 0.2);
}

.strip-nav-btn:focus-visible {
  outline: 2px solid rgba(103, 212, 255, 0.6);
  outline-offset: 2px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch,
.legend-icon {
  width: 18px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.legend-swatch.hot {
  background: var(--hot);
}

.legend-swatch.temperate {
  background: var(--temperate);
}

.legend-swatch.cold {
  background: var(--cold);
}

.legend-icon.rocky {
  background: linear-gradient(120deg, #c6d4e2, #8fa2b8);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-icon.gas {
  background: linear-gradient(120deg, #7be0ff, #3bb1dd);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.legend-icon.belt {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px dashed rgba(230, 240, 255, 0.7);
  background: radial-gradient(
    circle,
    rgba(230, 240, 255, 0.9) 0 2px,
    transparent 3px
  );
}

.details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.details-header p {
  margin-top: 6px;
}

.details-tools {
  display: flex;
  align-items: flex-start;
}

.copy-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.copy-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  min-width: 70px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copy-status.is-visible {
  opacity: 1;
}

.copy-status.is-success::before {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  display: inline-block;
  margin-top: -1px;
}

.copy-status.is-error {
  color: var(--hot);
}

.copy-panel .btn {
  padding: 8px 14px;
  font-size: 0.7rem;
}

.detail-card {
  border: 1px solid rgba(120, 180, 255, 0.2);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(9, 16, 26, 0.82);
  margin-bottom: 14px;
  animation: card-in 0.5s ease both;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.detail-card.is-selected {
  border-color: rgba(103, 212, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(103, 212, 255, 0.2),
    0 18px 32px rgba(4, 8, 16, 0.5);
}

.detail-card.is-selected .card-title {
  color: var(--accent);
}

.detail-card:hover,
.detail-card:focus-within {
  z-index: 30;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.card-title {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: auto;
}

.detail-body {
  margin-top: 10px;
}

.chip {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(103, 212, 255, 0.3);
  color: var(--muted);
}

.chip.hot {
  color: var(--hot);
  border-color: rgba(255, 122, 89, 0.5);
}

.chip.temperate {
  color: var(--temperate);
  border-color: rgba(79, 225, 194, 0.5);
}

.chip.cold {
  color: var(--cold);
  border-color: rgba(156, 200, 255, 0.5);
}

.info-line {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.85rem;
  line-height: 1.35;
}

.info-label {
  min-width: 110px;
  color: var(--muted);
}

.info-value {
  color: var(--text);
}

.item-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.item-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 212, 255, 0.25);
  background: rgba(7, 14, 24, 0.85);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text);
  cursor: default;
  z-index: 2;
}

.tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
  background: #0e1a2a;
  border: 1px solid rgba(103, 212, 255, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 260px;
  max-width: 320px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  text-transform: none;
  letter-spacing: 0;
}

.item-chip:hover .tooltip,
.item-chip:focus-within .tooltip,
.strip-dot:hover .tooltip,
.strip-dot:focus-within .tooltip,
.strip-sun:hover .tooltip,
.strip-sun:focus-within .tooltip,
.strip-secondary-dot:hover .tooltip,
.strip-secondary-dot:focus-within .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.strip-panel.is-tooltip-muted .strip-dot .tooltip,
.strip-panel.is-tooltip-muted .strip-sun .tooltip,
.strip-panel.is-tooltip-muted .strip-secondary-dot .tooltip {
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  pointer-events: none;
}

.item-chip:hover,
.item-chip:focus-within,
.strip-dot:hover,
.strip-dot:focus-within,
.strip-sun:hover,
.strip-sun:focus-within,
.strip-secondary-dot:hover,
.strip-secondary-dot:focus-within {
  z-index: 20;
}

.item-chip:focus-visible {
  outline: 2px solid rgba(103, 212, 255, 0.6);
  outline-offset: 2px;
}

.tooltip-title {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.tooltip-row {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text);
}

.tooltip-row + .tooltip-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(103, 212, 255, 0.18);
}

.tooltip-label {
  min-width: 92px;
  color: var(--muted);
}

.tooltip-value {
  color: var(--text);
}

.sub-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(120, 180, 255, 0.12);
}

.star-section:first-of-type {
  border-top: none;
}

.star-section {
  border-radius: 12px;
  padding: 10px 12px;
}

.star-section.is-selected {
  background: rgba(7, 14, 24, 0.6);
  box-shadow: 0 0 0 1px rgba(103, 212, 255, 0.35);
}

.sub-title {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.mono {
  font-variant-ligatures: none;
  letter-spacing: 0.06em;
}

.orbit {
  fill: none;
  stroke-width: 1.6;
  opacity: 0.8;
  animation: orbit-pulse 6s ease-in-out infinite;
}

.orbit.is-selected {
  stroke-width: 2.4;
  opacity: 1;
  animation: none;
}

.shadow-line {
  stroke-linecap: round;
  pointer-events: none;
}

.orbit--hot {
  stroke: var(--hot);
}

.orbit--temperate {
  stroke: var(--temperate);
}

.orbit--cold {
  stroke: var(--cold);
}

.orbit--belt {
  stroke-dasharray: 2 10;
  stroke-width: 2;
  opacity: 0.7;
}

.belt-cloud {
  pointer-events: auto;
}

.belt-cloud--hot {
  --belt-color: var(--hot);
}

.belt-cloud--temperate {
  --belt-color: var(--temperate);
}

.belt-cloud--cold {
  --belt-color: var(--cold);
}

.asteroid-point {
  fill: var(--belt-color);
  fill: color-mix(in srgb, var(--belt-color) 60%, white 40%);
  opacity: 0.7;
}

.asteroid-point--major {
  opacity: 0.95;
}

.asteroid-major {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.belt-marker {
  pointer-events: none;
}

.satellites {
  opacity: 0.8;
}

.satellite-orbit {
  fill: none;
  stroke: var(--body-color);
  stroke: color-mix(in srgb, var(--body-color) 50%, white 50%);
  stroke-width: 1;
  opacity: 0.6;
}

.satellite-orbit--ring {
  stroke-width: 5;
  opacity: 0.8;
}

.satellite-orbit--empty {
  display: none;
}

.satellite-body {
  fill: var(--body-color);
  fill: color-mix(in srgb, var(--body-color) 70%, white 30%);
}

.satellite--small {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

.satellite--major {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.body {
  filter: drop-shadow(0 0 6px rgba(120, 180, 255, 0.35));
}

.body.is-selected .planet-core,
.body.is-selected .gas-core {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.2;
}

.planet-shade,
.planet-highlight,
.satellite-shade,
.satellite-highlight,
.asteroid-shade,
.asteroid-highlight {
  pointer-events: none;
}

.body--hot {
  --body-color: var(--hot);
}

.body--temperate {
  --body-color: var(--temperate);
}

.body--cold {
  --body-color: var(--cold);
}

.body--rocky .planet-core {
  fill: var(--body-color);
  fill: color-mix(in srgb, var(--body-color) 65%, white 35%);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.2;
}

.body--gas .gas-core {
  fill: var(--body-color);
  fill: color-mix(in srgb, var(--body-color) 55%, white 45%);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.2;
}

.body--belt .belt-marker--ring {
  fill: none;
  stroke: var(--body-color);
  stroke: color-mix(in srgb, var(--body-color) 60%, white 40%);
  stroke-dasharray: 2 3;
  stroke-width: 1.6;
  opacity: 0.9;
}

.body--belt .belt-marker--core {
  fill: var(--body-color);
  fill: color-mix(in srgb, var(--body-color) 45%, white 55%);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 0.6;
}

.body-label {
  font-size: 14px;
  fill: #000;
  letter-spacing: 0.12em;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.star-core {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
}

.scroll-top {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 24px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(103, 212, 255, 0.35);
  background: rgba(9, 16, 26, 0.88);
  color: var(--text);
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 20;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translate(-50%, -1px);
  box-shadow: 0 8px 16px rgba(103, 212, 255, 0.2);
}

.scroll-top:focus-visible {
  outline: 2px solid rgba(103, 212, 255, 0.6);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.repo-link {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.repo-link:hover {
  text-decoration: underline;
}

.star.is-selected .star-core {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.6));
}

.strip-sun.is-selected,
.strip-secondary-dot.is-selected {
  box-shadow: 0 0 16px rgba(103, 212, 255, 0.6);
}


@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orbit-pulse {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hero-info {
    align-items: flex-start;
  }

  .share-output,
  .system-id {
    text-align: left;
  }

  .seed-field {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 20px;
  }

  .map-shell {
    height: 420px;
  }
}
