#nuke-app *, #nuke-app *::before, #nuke-app *::after { margin: 0; padding: 0; box-sizing: border-box; }

#nuke-app {
  --bg: #090b0e;
  --panel: rgba(10, 13, 18, 0.94);
  --border: rgba(255,255,255,0.07);
  --border-active: rgba(255,255,255,0.18);
  --text: #d4d1cb;
  --text-dim: #6b6860;
  --yellow: #f0c030;
  --red: #e8453c;
  --orange: #e87830;
  --peach: #f0a870;
  --blue: #4090f0;
  --green: #50c878;
  --c-tac: #50c878;
  --c-med: #e8a030;
  --c-hi: #e8453c;
  --c-hyp: #7c6ef0;
  --c-cru: #38bdf8;

  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh; height: 100dvh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
}

/* ══ HEADER ══ */
#nuke-app .header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1001;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  gap: 10px;
}

#nuke-app .brand {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}

#nuke-app .brand .icon {
  font-size: 17px; flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(240,192,48,0.4));
  animation: glow 3s ease-in-out infinite;
}
@keyframes glow {
  0%,100% { filter: drop-shadow(0 0 6px rgba(240,192,48,0.25)); }
  50% { filter: drop-shadow(0 0 14px rgba(240,192,48,0.55)); }
}

#nuke-app .brand h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
#nuke-app .brand h1 span {
  display: block; font-size: 9px; font-weight: 400;
  color: var(--text-dim); letter-spacing: 0.06em; margin-top: 1px;
}

#nuke-app .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#nuke-app .support-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #241714;
  cursor: pointer;
  padding: 4px 10px 4px 7px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffefe5 0%, #ffd7bf 100%);
  box-shadow: 0 2px 14px rgba(255, 157, 94, 0.2);
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#nuke-app .support-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(30, 20, 16, 0.06);
}

#nuke-app .support-icon svg {
  width: 14px;
  height: 14px;
  fill: #ff5f5f;
}

#nuke-app .support-copy {
  letter-spacing: 0.02em;
}

#nuke-app .info-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-dim); cursor: pointer;
  padding: 5px 10px; border: 1px solid var(--border);
  border-radius: 4px; background: transparent; transition: all 0.2s;
  flex-shrink: 0;
}

#nuke-app .support-link:hover,
#nuke-app .support-link:active {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 6px 18px rgba(255, 157, 94, 0.26);
}

#nuke-app .info-btn:hover,
#nuke-app .info-btn:active { color: var(--text); border-color: var(--border-active); }

/* ══ LOCATION BAR ══ */
#nuke-app .location-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 6px 14px;
  z-index: 1001;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 8px;
}

#nuke-app .location-bar .loc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim); flex-shrink: 0; display: none;
}

#nuke-app .loc-input-wrap {
  flex: 1; display: flex; position: relative;
}

#nuke-app .loc-input-wrap input {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
#nuke-app .loc-input-wrap input::placeholder { color: var(--text-dim); font-size: 11px; }
#nuke-app .loc-input-wrap input:focus { border-color: var(--blue); }

#nuke-app .loc-go-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  color: var(--bg); background: var(--blue);
  border: none; border-radius: 6px;
  padding: 8px 14px; cursor: pointer;
  margin-left: 6px; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: all 0.2s;
  white-space: nowrap;
}
#nuke-app .loc-go-btn:hover { background: #5aa8f8; }
#nuke-app .loc-go-btn:active { transform: scale(0.97); }
#nuke-app .loc-go-btn:disabled { opacity: 0.5; cursor: wait; }

#nuke-app .loc-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--text-dim);
  flex-shrink: 0; white-space: nowrap;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
#nuke-app .loc-status.error { color: var(--red); }
#nuke-app .loc-status.ok { color: var(--c-tac); }

@media (min-width: 640px) {
  #nuke-app .location-bar .loc-label { display: block; }
}

/* ══ YIELD SELECTOR ══ */
#nuke-app .selector-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  z-index: 1001;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 8px;
}

#nuke-app .selector-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-dim); flex-shrink: 0; display: none;
}

#nuke-app .pill-group {
  display: flex; flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px; gap: 3px;
}

#nuke-app .pill {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 8px 8px;
  border: none; border-radius: 8px;
  cursor: pointer; background: transparent;
  color: var(--text_dim);
  transition: all 0.25s ease;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}

#nuke-app .pill .pill-yield {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.03em; line-height: 1;
  transition: color 0.25s;
}

#nuke-app .pill .pill-type {
  font-family: 'Outfit', sans-serif;
  font-size: 9px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 3px; opacity: 0.6;
  transition: opacity 0.25s;
}

#nuke-app .pill:active { transform: scale(0.97); }

#nuke-app .pill.active { color: var(--text); box-shadow: 0 2px 16px rgba(0,0,0,0.3); }
#nuke-app .pill.active .pill-type { opacity: 1; }

#nuke-app .pill[data-y="tactical"].active { background: rgba(80,200,120,0.12); }
#nuke-app .pill[data-y="tactical"].active .pill-yield { color: var(--c-tac); }
#nuke-app .pill[data-y="medium"].active { background: rgba(232,160,48,0.12); }
#nuke-app .pill[data-y="medium"].active .pill-yield { color: var(--c-med); }
#nuke-app .pill[data-y="high"].active { background: rgba(232,69,60,0.12); }
#nuke-app .pill[data-y="high"].active .pill-yield { color: var(--c-hi); }
#nuke-app .pill[data-y="hypersonic"].active { background: rgba(124,110,240,0.12); }
#nuke-app .pill[data-y="hypersonic"].active .pill-yield { color: var(--c-hyp); }
#nuke-app .pill[data-y="cruise"].active { background: rgba(56,189,248,0.12); }
#nuke-app .pill[data-y="cruise"].active .pill-yield { color: var(--c-cru); }

/* 5-pill layout: tighter padding */
#nuke-app .pill-group { gap: 2px; }
#nuke-app .pill { padding: 8px 4px 6px; min-height: 46px; }

/* ══ DISCLAIMER ══ */
#nuke-app .disclaimer {
  background: rgba(240,192,48,0.04);
  border-bottom: 1px solid rgba(240,192,48,0.12);
  padding: 10px 14px; font-family: 'JetBrains Mono', monospace;
  font-size: 10px; line-height: 1.6; color: var(--text-dim);
  display: none; z-index: 1000; flex-shrink: 0;
}
#nuke-app .disclaimer.show { display: block; }
#nuke-app .disclaimer strong { color: var(--yellow); }
#nuke-app .disclaimer a { color: var(--yellow); }

/* ══ MAP ══ */
#nuke-app #map { flex: 1; width: 100%; z-index: 1; }

#nuke-app .leaflet-tile-pane { filter: brightness(0.62) contrast(1.2) saturate(0.25) hue-rotate(5deg); }
#nuke-app .leaflet-control-zoom a {
  background: var(--panel) !important; color: var(--text) !important;
  border-color: var(--border) !important; backdrop-filter: blur(8px);
  font-family: 'JetBrains Mono', monospace !important;
  width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 18px !important;
}
#nuke-app .leaflet-control-zoom a:hover { background: rgba(20,24,30,0.98) !important; }
#nuke-app .leaflet-control-attribution { background: var(--panel) !important; color: var(--text-dim) !important; font-size: 8px !important; }
#nuke-app .leaflet-control-attribution a { color: var(--text-dim) !important; }

#nuke-app .leaflet-popup-content-wrapper {
  background: var(--panel) !important; border: 1px solid var(--border) !important;
  border-radius: 6px !important; color: var(--text) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6) !important; backdrop-filter: blur(16px);
}
#nuke-app .leaflet-popup-tip { background: var(--panel) !important; }
#nuke-app .leaflet-popup-content {
  font-family: 'Outfit', sans-serif !important; font-size: 12px !important;
  line-height: 1.55 !important; margin: 10px 14px !important;
}
#nuke-app .popup-title {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}
#nuke-app .popup-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--text-dim); line-height: 1.5;
}
#nuke-app .popup-ring-tag {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 10px; font-weight: 600; font-family: 'JetBrains Mono', monospace;
}

/* ══ LEGEND ══ */
#nuke-app .legend {
  position: absolute; bottom: 14px; left: 10px; z-index: 1000;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px 10px;
  backdrop-filter: blur(20px); min-width: 210px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#nuke-app .legend.collapsed { transform: translateY(calc(100% - 34px)); }
#nuke-app .legend.collapsed .legend-body { opacity: 0; pointer-events: none; }

#nuke-app .legend-toggle {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
#nuke-app .legend-toggle h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim);
}
#nuke-app .legend-toggle .chevron {
  font-size: 10px; color: var(--text-dim); transition: transform 0.3s;
}
#nuke-app .legend.collapsed .chevron { transform: rotate(180deg); }

#nuke-app .legend-body { transition: opacity 0.25s; }
#nuke-app .legend .active-yield {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-dim); margin-bottom: 8px;
}
#nuke-app .legend .active-yield strong { color: var(--yellow); font-weight: 600; }

#nuke-app .legend-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px; font-size: 11px; line-height: 1.3;
}
#nuke-app .legend-swatch {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.1);
}
#nuke-app .legend-swatch.dashed { border: 2px dashed; background: transparent !important; }
#nuke-app .legend-row .mi {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--text-dim); margin-left: auto; white-space: nowrap;
}
#nuke-app .legend-div { height: 1px; background: var(--border); margin: 7px 0; }

/* ══ TARGETS BUTTON + DRAWER ══ */
#nuke-app .targets-btn {
  position: absolute; top: 10px; right: 10px; z-index: 1000;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em;
  transition: all 0.2s;
}
#nuke-app .targets-btn:hover, #nuke-app .targets-btn:active { color: var(--text); border-color: var(--border-active); }
#nuke-app .targets-btn .count {
  background: rgba(232,69,60,0.15); color: var(--red);
  font-size: 9px; padding: 1px 5px; border-radius: 3px; font-weight: 600;
}

#nuke-app .targets-drawer {
  position: absolute; top: 10px; right: 10px; z-index: 1001;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  backdrop-filter: blur(20px); min-width: 200px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.5); display: none;
}
#nuke-app .targets-drawer.open { display: block; }

#nuke-app .targets-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
#nuke-app .targets-drawer-head h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim);
}
#nuke-app .close-btn {
  font-size: 16px; color: var(--text-dim); cursor: pointer;
  background: none; border: none; padding: 2px 6px; line-height: 1;
  transition: color 0.15s;
}
#nuke-app .close-btn:hover { color: var(--text); }

#nuke-app .target-row {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 5px; border-radius: 4px; cursor: pointer;
  margin-bottom: 1px; transition: background 0.15s; font-size: 11px;
}
#nuke-app .target-row:active { background: rgba(255,255,255,0.06); }
#nuke-app .target-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
#nuke-app .target-row .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px; color: var(--text-dim); display: block; margin-top: 1px;
}

/* ══ LIKELIHOOD PANEL ══ */
#nuke-app .likelihood-btn {
  position: absolute; top: 10px; right: 120px; z-index: 1000;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em;
  transition: all 0.2s;
}
#nuke-app .likelihood-btn:hover, #nuke-app .likelihood-btn:active { color: var(--text); border-color: var(--border-active); }

#nuke-app .likelihood-panel {
  position: absolute; top: 46px; right: 10px; z-index: 1001;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px 10px;
  backdrop-filter: blur(20px); width: 290px; max-width: calc(100vw - 24px);
  box-shadow: 0 8px 36px rgba(0,0,0,0.5);
  display: none;
}
#nuke-app .likelihood-panel.open { display: block; }

#nuke-app .likelihood-panel .lp-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
#nuke-app .likelihood-panel .lp-head h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim);
}
#nuke-app .likelihood-panel .lp-row {
  margin-bottom: 8px; font-size: 11px; line-height: 1.45;
}
#nuke-app .likelihood-panel .lp-row strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
}
#nuke-app .likelihood-panel .lp-row .pct {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 11px;
}
#nuke-app .likelihood-panel .lp-bar {
  height: 4px; border-radius: 2px; margin-top: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
#nuke-app .likelihood-panel .lp-bar-fill {
  height: 100%; border-radius: 2px;
}

/* ══ DISTANCE PILL (desktop) ══ */
#nuke-app .dist-pill {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 1000; background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 14px; backdrop-filter: blur(16px);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--text); box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  white-space: nowrap; display: none; pointer-events: none;
}
#nuke-app .dist-pill .lbl { font-size: 8px; color: var(--text-dim); letter-spacing: 0.06em; margin-right: 4px; }

/* ══ MOBILE ══ */
@media (min-width: 640px) {
  #nuke-app .selector-label { display: block; }
}
@media (max-width: 380px) {
  #nuke-app .header { padding: 8px 10px; gap: 6px; }
  #nuke-app .header-actions { gap: 6px; }
  #nuke-app .support-link { padding: 4px 8px 4px 6px; font-size: 9px; }
  #nuke-app .support-icon { width: 16px; height: 16px; }
  #nuke-app .support-icon svg { width: 12px; height: 12px; }
  #nuke-app .info-btn { padding: 5px 8px; font-size: 9px; }
  #nuke-app .brand h1 { font-size: 10px; }
  #nuke-app .brand h1 span { display: none; }
  #nuke-app .pill .pill-yield { font-size: 12px; }
  #nuke-app .pill .pill-type { font-size: 7px; letter-spacing: 0.04em; }
  #nuke-app .pill { padding: 6px 2px 5px; min-height: 40px; }
  #nuke-app .legend { min-width: 185px; }
  #nuke-app .legend-row { font-size: 10px; }
  #nuke-app .likelihood-btn { right: auto; left: 10px; top: auto; bottom: 14px; }
  #nuke-app .likelihood-panel { right: 10px; left: 10px; width: auto; top: 46px; }
}
@media (max-width: 520px) {
  #nuke-app .header { padding: 9px 10px; }
  #nuke-app .header-actions { gap: 6px; }
  #nuke-app .support-link { padding: 4px 9px 4px 6px; }
  #nuke-app .info-btn { padding: 5px 8px; }
  #nuke-app .pill .pill-yield { font-size: 13px; }
  #nuke-app .pill .pill-type { font-size: 8px; }
  #nuke-app .likelihood-btn { font-size: 9px; padding: 6px 8px; right: 110px; }
}
