html, body {
      margin: 0;
      padding: 0;
      overflow-x: hidden;
    }
.site-footer {
  overflow: hidden;
}
    body {
      background-color: #20a7db;
      margin: auto;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      Roboto, Helvetica, Arial, sans-serif;
      color: #e5e7eb;
      max-width: 100%;
    }
    pre { background: #f4f4f4; padding: 16px; border-radius: 8px; overflow-x: auto; }
    .row { display: flex; gap: 12px; }

    #contrails {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      z-index: 0;
      pointer-events: none;
    }

    .panel{
    width: 100%;
    max-width: 900px;
    margin-top: 70px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 28px 32px 32px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }


    .panel h1 {
      margin: 0 0 6px;
      font-size: 1.8rem;
      font-weight: 800;
      letter-spacing: 0.3px;
    }

    .subtitle {
      margin: 0 0 22px;
      font-size: 0.95rem;
      color: #9ca3af;
    }

    .row {
      display: flex;
      gap: 12px;
      align-items: center;
    }

.analyze-row{
  display: flex;
  gap: 10px;
  align-items: center;
}

.sim-dropdown-pill{
  min-width: 220px;
  height: 56px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  border: none;
  border-radius: 14px;
  cursor: pointer;

  font-size: 0.98rem;
  font-weight: 800;
  color: #020617;

  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  box-shadow: 0 10px 24px rgba(56,189,248,0.28);
}

.sim-dropdown-label{
  white-space: nowrap;
}

.sim-dropdown-caret{
  font-size: 1.05rem;
  line-height: 1;
}


.analyze-row{
  display: flex;
  gap: 10px;
  align-items: center;
}

.sim-dropdown-btn{
  width: 44px;
  height: 30px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  color: #38bdf8;
  background: #000;
  box-shadow: 0 10px 24px rgba(56,189,248,0.28);
}

.sim-dropdown-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sim-dropdown-grid label{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.sim-dropdown-grid label span{
  font-weight: 700;
  color: #e5e7eb;
}

.sim-dropdown-grid select,
.sim-dropdown-grid input,
.sim-dropdown-actions button{
  background: rgba(2,6,23,0.72);
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 10px;
  padding: 8px 10px;
}

.sim-dropdown-actions{
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
}

.sim-dropdown-actions button{
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 1100px){
  .sim-dropdown-pill{
    min-width: 0;
    width: 100%;
  }

  .sim-dropdown-grid{
    grid-template-columns: 1fr;
  }
}

    /* Wrap input for clear button */
.location-wrap{
  position: relative;
  flex: 1;
  display: flex;
}

/* Add right padding so text doesn't overlap X */
#location{
  padding-right: 44px;
}

/* Clear (X) button */
.clear-location{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);

  width: 28px;
  height: 28px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.15rem;
  font-weight: 700;

  cursor: pointer;
  border: none;

  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(6px);

  color: #e5e7eb;

  transition: all 0.18s ease;
}



    #location {
      flex: 1;
      padding: 14px 16px;
      font-size: 1rem;
      color: #e5e7eb;
      background: #020617;
      border: 1px solid #1e293b;
      border-radius: 10px;
      outline: none;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    #location::placeholder { color: #64748b; }

    #location:focus {
      border-color: #38bdf8;
      box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
    }

    .location-analyze {
      padding: 14px 18px;
      font-size: 1rem;
      font-weight: 600;
      color: #020617;
      background: linear-gradient(135deg, #38bdf8, #0ea5e9);
      border: none;
      border-radius: 10px;
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
      width: 150px;
    }

    .location-analyze:hover {
      transform: translateY(-1px);
      box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
    }

    .location-analyze:active { transform: translateY(0); opacity: 0.9; }

    .status {
      margin-top: 14px;
      min-height: 1.2em;
      font-size: 0.9rem;
      color: #93c5fd;
    }
    
    .forecast-card{
      position: relative;
      overflow: visible; /* allow full content */
    }

    .forecast-share-btn {
      width: 48px;
      height: 48px;
      border: none;
      border-radius: 12px;
      cursor: pointer;

      display: flex;
      align-items: center;
      justify-content: center;

      background: linear-gradient(135deg, #38bdf8, #0ea5e9);
      color: #020617;

      box-shadow: 0 8px 20px rgba(56,189,248,0.35);
    }

    .forecast-share-btn:hover{
      transform: translateY(-1px);
    }

    .forecast-share-icon{
      width: 24px;
      height: 24px;
    }


    .output-box::-webkit-scrollbar { width: 8px; }
    .output-box::-webkit-scrollbar-thumb { background: #334155; border-radius: 6px; }

    .img-loader{
      position:absolute;
      inset:0;
      display:flex;
      align-items:center;
      justify-content:center;
      flex-direction:column;
      gap:10px;
      background: rgba(2, 6, 23, 0.55);
      border-radius: 12px;
      border: 1px solid #1e293b;
      backdrop-filter: blur(6px);
    }

    .spinner{
      width:44px;
      height:44px;
      border:4px solid rgba(229,231,235,0.25);
      border-top-color: rgba(229,231,235,0.95);
      border-radius:50%;
      animation: spin 0.9s linear infinite;
    }

    .loader-text{
      font-size:0.95rem;
      color:#e5e7eb;
    }
        /* ---------- Google Places Autocomplete (matches site style) ---------- */
    /* The dropdown container */
    .pac-container {
      background: #020617;                 /* same as your input/output */
      border: 1px solid #1e293b;
      border-radius: 12px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
      overflow: hidden;
      margin-top: 8px;
      font-family: inherit;
      z-index: 99999 !important;           /* make sure it appears above map/panel */
    }

    /* Individual suggestion rows */
    .pac-item {
      padding: 10px 14px;
      color: #e5e7eb;
      font-size: 0.95rem;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      cursor: pointer;
      line-height: 1.25;
    }

    /* Hover + keyboard selection */
    .pac-item:hover,
    .pac-item-selected {
      background: rgba(56, 189, 248, 0.14);  /* your cyan accent */
    }

    /* Main matched query text */
    .pac-item-query {
      color: #e5e7eb;
      font-weight: 650;
    }

    /* Matched substring highlight */
    .pac-matched {
      color: #38bdf8;                       /* your cyan */
      font-weight: 700;
    }

    /* Secondary address text (smaller, softer) */
    .pac-item span:not(.pac-item-query):not(.pac-matched) {
      color: #9ca3af;
    }

    /* Optional: make the left icon less bright on dark backgrounds */
    .pac-icon {
      filter: brightness(0.9) contrast(1.1);
      opacity: 0.9;
    }

    /* Keep Google branding intact (don’t hide .pac-logo) */
    .pac-logo:after {
      filter: brightness(1.15);
      opacity: 0.95;
    }

        /* ---------- Forecast timeline slider ---------- */
    .timeline{
      margin-top:16px;
      padding:14px 14px 12px 14px;
      border-radius:12px;
      border:1px solid #1e293b;
      background:rgba(2,6,23,0.75);
      box-shadow:0 10px 30px rgba(0,0,0,0.35);
    }
    .timeline-header{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      margin-bottom:6px;
    }
    .timeline-title{
      font-weight:700;
      letter-spacing:0.2px;
      color:#e5e7eb;
      font-size: 0.95rem;
    }
    .timeline-label{
      color:#fff;
      font-size:0.9rem;
      text-align:right;
    }
    #timelineSlider{
      width:100%;
      accent-color:#38bdf8;
    }
    .timeline-meta{
      display:flex;
      justify-content:space-between;
      color:#94a3b8;
      font-size:0.78rem;
      margin-top:4px;
    }
    #timelineSlider:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }


    .timeline-days{
      position: relative;
      height: 22px;
      margin-top: 4px;
      color: #fff;
      font-size: 0.78rem;
    }

    .timeline-day{
      position: absolute;
      transform: translateX(-50%);
      white-space: nowrap;
      text-align: center;
    }

    .timeline-day::before{
      content:"";
      position:absolute;
      top:-6px;
      left:50%;
      width:1px;
      height:6px;
      background:rgba(148,163,184,0.4);
      transform:translateX(-50%);
    }

    /* if labels get too close, we hide text but keep the tick */
    .timeline-day.tick-only{
      color: transparent;
    }
    .timeline-day.tick-only::before{
      background: rgba(148,163,184,0.55);
    }


    .timeline-hours {
      position: relative;
      height: 16px;
      margin-top: 2px;
      font-size: 0.62rem;
      color: #fff;
    }

    .timeline-hour::before {
      content: "";
      position: absolute;
      top: -4px;
      left: 50%;
      width: 1px;
      height: 3px;
      background: #fff;
      transform: translateX(-50%);
    }

    .timeline-hour {
      position: absolute;
      transform: translateX(-50%);
      white-space: nowrap;
    }

    .timeline-hour.tick-only {
      opacity: 0.4;
    }

    .timeline-hour::before {
      content: "";
      position: absolute;
      top: -6px;
      left: 50%;
      width: 1px;
      height: 4px;
      background: #fff;
      transform: translateX(-50%);
    }

    /* ===== Output: make it more visible + premium ===== */
    .output-box{
      padding: 18px 18px 20px;
      background: rgba(2, 6, 23, 0.35);
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 18px;
      box-shadow: 0 14px 35px rgba(0,0,0,0.25);
      color: #e5e7eb;

      /* KEY FIX */
      max-height: 80vh;   /* adjust if needed */
      overflow-y: auto;
    }
    .fc-badge {
      margin-top: 10px;
      width: fit-content;
    }

    .fc-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
    }

    .fc-left {
      flex: 1;
      min-width: 0;
    }

    .fc-right {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-shrink: 0;
    }

    /* Headline area */
    .fc-title{
      font-size: 1.55rem !important;
      font-weight: 900 !important;
      letter-spacing: 0.2px;
      line-height: 1.2;
      color: #f8fafc;
      text-shadow: 0 2px 10px rgba(0,0,0,0.25);
    }

    .fc-sub{
      font-size: 0.98rem !important;
      color: rgba(226,232,240,0.75) !important;
      margin-top: 6px !important;
    }

    /* Top badge */
    .badge{
      font-size: 0.95rem !important;
      padding: 8px 12px !important;
      border: 1px solid rgba(255,255,255,0.14) !important;
      box-shadow: 0 10px 20px rgba(0,0,0,0.20);
      backdrop-filter: blur(8px);
    }

    /* Card */
    .forecast-card{
      background: linear-gradient(180deg, rgba(15, 23, 42, 0.70), rgba(2, 6, 23, 0.50));
      border: 1px solid rgba(148, 163, 184, 0.20);
      border-radius: 20px;
      padding: 18px 18px 16px;
    }

    /* Probability text colors */
    .kpi .lbl.prob-mid { color: #f59e0b !important; }     /* Moderate (orange) */
    .kpi .lbl.prob-high,
    .kpi .lbl.prob-vhigh { color: #ef4444 !important; }   /* High / Very high (red) */

    /* Badge text color too */
    .badge.mid { color: #f59e0b !important; }
    .badge.high,
    .badge.vhigh { color: #ef4444 !important; }

    /* KPI blocks: clearer separation */
    .kpis{
      margin-top: 14px !important;
      gap: 12px 14px !important;
    }

    .kpi{
      background: rgba(2, 6, 23, 0.55) !important;
      border: 1px solid rgba(148, 163, 184, 0.18) !important;
      border-radius: 14px !important;
      padding: 12px 12px 11px !important;
    }

    .kpi .k{
      font-size: 0.82rem !important;
      color: rgba(226,232,240,0.72) !important;
      margin-bottom: 6px !important;
    }

    .kpi .v{
      gap: 10px !important;
    }

    .kpi .lbl{
      font-size: 1.05rem !important;
      font-weight: 900 !important;
      color: #93c5fd !important;
    }

    .kpi .pct{
      font-size: 1.05rem !important;
      font-weight: 900 !important;
      color: #f8fafc !important;
    }
    

    /* Section header for "Other likely clouds" */
    .cloud-list{
      margin-top: 14px !important;
      padding-top: 12px;
      border-top: 1px solid rgba(148,163,184,0.14);
      color: rgba(226,232,240,0.85) !important;
    }

    .cloud-list strong{
      display: inline-block;
      font-size: 1.05rem;
      color: #f8fafc;
      margin-bottom: 6px;
    }

    /* Chips: more pop */
    .cloud-chip{
      background: rgba(56, 189, 248, 0.10) !important;
      border: 1px solid rgba(56, 189, 248, 0.22) !important;
      color: #e5e7eb !important;
      font-weight: 850 !important;
      padding: 7px 12px !important;
      margin: 8px 10px 0 0 !important;
      box-shadow: 0 10px 18px rgba(0,0,0,0.18);
    }

    /* Why line: more readable */
    .mini{
      margin-top: 14px !important;
      padding-top: 12px;
      border-top: 1px solid rgba(148,163,184,0.14);
      font-size: 0.98rem !important;
      line-height: 1.45 !important;
      color: rgba(226,232,240,0.88) !important;
    }

    .mini strong{
      color: #f8fafc !important;
    }

    /* Optional: tighten huge empty space if your output-box was tall */
    .output-box:empty{
      min-height: 0 !important;
      padding: 0 !important;
      border: none !important;
      background: transparent !important;
      box-shadow: none !important;
    }


    .map-layers{
      display:flex;
      gap:14px;
      flex-wrap:wrap;
      margin-top:10px;
      padding:10px 12px;
      border-radius:12px;
      border:1px solid #1e293b;
      background:rgba(2,6,23,0.55);
      color:#e5e7eb;
      font-size:0.92rem;
    }
    .map-layers label{
      display:flex;
      align-items:center;
      gap:8px;
      user-select:none;
    }


    .cloud-list{
      margin-top:10px;
      color:#cbd5e1;
      font-size:0.9rem;
    }
    .cloud-chip{
      display:inline-block;
      margin:6px 6px 0 0;
      padding:6px 10px;
      border-radius:999px;
      border:1px solid rgba(148,163,184,0.18);
      background: rgba(2,6,23,0.35);
      color:#e5e7eb;
      font-weight:650;
      font-size:0.85rem;
    }

        /* WHY BOX — contained, aligned, readable */
    .why-box{
      margin-top: 16px;
      padding: 14px 16px;
      border-radius: 14px;
      background: rgba(2, 6, 23, 0.55);
      border: 1px solid rgba(148,163,184,0.18);
    }

    .why-title{
      font-size: 0.8rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: rgba(226,232,240,0.75);
      margin-bottom: 6px;
    }

    .why-text{
      font-size: 0.95rem;
      line-height: 1.45;
      color: rgba(226,232,240,0.92);
    }

/* ============================= */
/* SHARE SECTION (Upgraded UI)  */
/* ============================= */

.share-section {
  margin-top: 20px;
  padding: 22px 24px;
  border-radius: 20px;

  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.65),
    rgba(2, 6, 23, 0.55)
  );

  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255,255,255,0.04);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Title */
.share-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #f1f5f9;
}

/* Subtext */
.share-sub {
  font-size: 0.85rem;
  color: rgba(226,232,240,0.65);
  margin-top: 4px;
}

.share-btn.icon-only {
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-icon {
  width: 22px;
  height: 22px;
}

/* Button */
.share-btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;

  font-weight: 700;
  font-size: 0.95rem;
  color: #020617;

  background: linear-gradient(135deg, #38bdf8, #0ea5e9);

  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
  transition: all 0.2s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(56, 189, 248, 0.55);
}

.share-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}


/* ===== Share modal (full styling) ===== */
.share-modal{
  position: fixed;
  inset: 0;
  display: none;                 /* IMPORTANT: hidden by default */
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  z-index: 5000;
}

.share-modal.open{
  display: flex;                 /* show when opened */
}

.share-modal .sheet{
  width: min(560px, 92vw);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.60);
  padding: 14px;
}

#sharePreview{
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(2,6,23,0.45);
}

.share-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.share-actions button,
.share-actions a{
  appearance: none;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2, 6, 23, 0.55);
  color: #e5e7eb;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.share-actions button:hover,
.share-actions a:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
}

#shareNativeBtn{
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;
  border: none;
}

#shareClose{
  opacity: 0.9;
}

.share-section:hover {
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(56, 189, 248, 0.15),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}


.overlay-map-card{
  margin-top:16px;
  border-radius:16px;
  border:1px solid #1e293b;
  background: rgba(2,6,23,0.55);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  overflow:hidden;
}

.overlay-map-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,0.06);
}

.overlay-title{
  font-weight:800;
  color:#e5e7eb;
  letter-spacing:0.2px;
}

.overlay-toggles{
  display:flex;
  gap:14px;
  color:#e5e7eb;
  font-size:0.9rem;
}

.overlay-toggles label{
  display:flex;
  align-items:center;
  gap:8px;
  user-select:none;
}

.overlay-map-wrap{
  position:relative;
  width:100%;
  aspect-ratio: 16 / 9;   /* keeps a predictable box height */
  background:#0b1220;
}

#overlayBaseImg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

#simMap{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#overlayCanvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.timeline-slider-wrap{
  position: relative;
}

#timelineHeatbar{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.95;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset;
}

#timelineSlider{
  position: relative;
  z-index: 2;
  width: 100%;
  accent-color:#38bdf8;
  height: 18px;
  margin: 0;
}

#timelineSlider::-webkit-slider-runnable-track{
  height: 6px;
  border-radius: 999px;
}

#timelineSlider::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  border: none;
  margin-top: -4px;
}

#timelineSlider::-moz-range-track{
  height: 6px;
  border-radius: 999px;
}

#timelineSlider::-moz-range-thumb{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  border: none;
}

.row{
  align-items: center;
  gap: 14px;
}

.location-wrap{
  flex: 1;
}

/* Desktop input + button alignment */
@media (min-width: 1024px){

  .row{
    display:flex;
    align-items:center;
    gap:12px;
  }

  .location-wrap{
    display:flex;
    align-items:center;
    flex:1;
  }

  .location-wrap input{
    height:56px;
    padding:0 16px;
    font-size:16px;
    line-height:56px;
    border-radius:12px;
    box-sizing:border-box;
  }

  .location-analyze{
    height:56px;
    padding:0 22px;
    font-size:16px;
    border-radius:12px;
  }

  .save-fab{
    height:56px;
    width:56px;
    border-radius:12px;
  }

}


/* Desktop: true 2-column symmetric layout */
@media (min-width: 1024px){

  body {
    background: #1A2C43;
  }

  .container:not(.map-layout){
    max-width: 1320px;
  }

  .panel{
    max-width: 1320px;
  }

  /* Make columns equal width + equal “feel” */
  .panel-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: stretch;
    margin-top: 75px;
  }

  /* Give both columns the same card styling */
  .panel-left,
  .panel-right{
    min-width: 0;
    background: rgba(2,6,23,0.35);
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  }

  /* Keep right side visible but not “huge header gap” */
  .panel-right{
    position: sticky;
    top: 86px;
    align-self: start;
    height: fit-content;
  }

  /* Keep left column proportions nice */
  #map{
    height: 280px !important;
  }

  /* ✅ IMPORTANT: Make the red bookmark behave like a normal button in the row on desktop */
  .save-fab{
    position: static !important;
    top: auto !important;
    right: auto !important;

    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 18px 30px rgba(255, 59, 59, 0.25);
    flex: 0 0 auto;
  }

  /* Ensure the input row lines up cleanly */
  .row{
    align-items: center;
    gap: 12px;
  }

  /* Optional: keep Analyze a consistent desktop size */
  .location-analyze{
    height: 56px;
  }
}

/* Tighten heading/subtitle spacing on DESKTOP only */
@media (min-width: 1024px){
  .panel-left h1 {
    margin: 0 0 4px;
  }

  .subtitle {
    margin: 0 0 12px;
  }
}

.panel{ position: relative; } /* important so the button anchors to the card */

.save-fab{
  position: absolute;
  top: 32px;
  right: 32px;

  display:flex;
  align-items:center;
  gap:12px;

  padding: 14px 20px;
  border-radius: 10px;

  border: none;
  cursor: pointer;

  color: #0b1220;
  font-weight: 800;
  font-size: 1.15rem;

  background: #ff3b3b;
  box-shadow: 0 18px 30px rgba(255, 59, 59, 0.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;

  z-index: 99;
}

.save-fab:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 38px rgba(255, 59, 59, 0.32);
}

.save-fab:active{ transform: translateY(0); opacity: 0.92; }

.save-fab-icon{
  width: 24px;
  height: 24px;
  fill: currentColor;
}



/* ==============================
   SAVED LOCATIONS DRAWER (Premium)
   ============================== */

.saved-open{
  position: absolute;
  top: 32px;
  right: 138px;

  padding: 12px 16px;
  border-radius: 14px;

  font-weight: 800;
  letter-spacing: .02em;

  background: rgba(2,6,23,0.55);
  border: 1px solid rgba(148,163,184,0.22);
  color: #e5e7eb;

  backdrop-filter: blur(8px);
  transition: all .18s ease;

  cursor: pointer;
}
.saved-open:hover{
  border-color: rgba(56,189,248,0.45);
  box-shadow: 0 12px 30px rgba(56,189,248,0.18);
}

/* Backdrop */
.saved-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.65);
  backdrop-filter: blur(10px);
  z-index: 9000;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.saved-backdrop.open{
  opacity: 1;
  pointer-events: auto;
}

/* Drawer (LEFT) */
.saved-drawer{
  position: fixed;
  top: 0;
  left: 0;              /* ✅ left side */
  right: auto;
  height: 100vh;
  width: min(380px, 94vw);

  background: linear-gradient(180deg, rgba(15,23,42,0.95), rgba(2,6,23,0.98));
  border-right: 1px solid rgba(148,163,184,0.18); /* ✅ border on right now */
  box-shadow: 40px 0 90px rgba(0,0,0,0.55);

  z-index: 10000;
  transform: translateX(-110%);  /* ✅ hidden off the left */
  transition: transform .25s cubic-bezier(.22,.61,.36,1);

  display:flex;
  flex-direction: column;
}
.saved-drawer.open{
  transform: translateX(0);
}

/* Header */
.saved-drawer-head{
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);

  display:flex;
  align-items:center;
  justify-content: space-between;
}

.saved-drawer-title{
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .04em;
  color: #e5e7eb;
  text-transform: uppercase;
}

.saved-close{
  border:none;
  background: rgba(255,255,255,0.05);
  color:#cbd5e1;
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor:pointer;
  transition: all .15s ease;
}
.saved-close:hover{
  background: rgba(56,189,248,0.15);
  color:#e5e7eb;
}

/* List */
.saved-drawer-list{
  padding: 18px;
  overflow-y: auto;
  display:flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

/* Item */
.saved-item{
  padding: 16px 18px;
  border-radius: 18px;

  background: rgba(15,23,42,0.65);
  border: 1px solid rgba(148,163,184,0.18);

  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;

  cursor:pointer;
  transition: all .18s ease;
}
.saved-item:hover{
  border-color: rgba(56,189,248,0.45);
  box-shadow: 0 18px 35px rgba(56,189,248,0.12);
  transform: translateY(-2px);
}

/* Name */
.saved-item-name{
  font-weight: 900;
  color:#f1f5f9;
  font-size: .98rem;
  line-height: 1.2;
}

/* Coordinates */
.saved-item-sub{
  margin-top: 6px;
  color:#94a3b8;
  font-size: .8rem;
  letter-spacing: .02em;
}

/* Remove button */
.saved-remove{
  border:none;
  background: rgba(255,255,255,0.04);
  color:#94a3b8;
  font-weight:700;
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
  transition: all .15s ease;
}
.saved-remove:hover{
  background: rgba(239,68,68,0.15);
  color:#f87171;
}

/* Footer */
.saved-drawer-foot{
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display:flex;
  justify-content:flex-end;
}

.saved-clear{
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2,6,23,0.65);
  color:#e5e7eb;
  font-weight:800;
  transition: all .15s ease;
}
.saved-clear:hover{
  border-color: rgba(239,68,68,0.45);
  box-shadow: 0 14px 28px rgba(239,68,68,0.12);
}


/* ===== Sleek Navbar ===== */
.topbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;

  padding: 14px 0;
  background: rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148,163,184,0.14);
}

.topbar-inner{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 24px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.brand-logo {
  height: 28px;
  width: auto;
  border-radius: 6px;
}

.brand-mark{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;

  border-radius: 12px;
  background: rgba(56,189,248,0.14);
  border: 1px solid rgba(56,189,248,0.22);
  box-shadow: 0 16px 34px rgba(56,189,248,0.10);
  font-weight: 900;

  line-height: 1;
  flex: 0 0 auto;
}

.brand-text{
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 1.5rem;
}

.brand-text .tm{
  font-size: 0.55em;
  vertical-align: super;
  margin-left: 2px;
  font-weight: 600;
  opacity: 0.85;
}

.topbar-nav{
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 18px;
  border-radius: 10px;

  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-decoration: none;

  color: #fff;

  background: rgba(56,189,248,0.14);

  border: 1px solid rgba(56,189,248,0.35);

  box-shadow:
    0 8px 22px rgba(56,189,248,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.04);

  backdrop-filter: blur(6px);

  transition: 
    transform .15s ease,
    box-shadow .2s ease,
    background .2s ease,
    border-color .2s ease;

  white-space: nowrap;
}


.topbar-link:hover{
  transform: translateY(-1px);
  border-color: rgba(56,189,248,0.45);
  box-shadow: 0 18px 40px rgba(56,189,248,0.14);
}

.topbar-link:active{
  transform: translateY(0);
  opacity: 0.92;
}
.topbar-btn {
  padding: 10px 18px;
  border-radius: 10px;

  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;

  color: #fff;

  background: rgba(56,189,248,0.14);
  border: 1px solid rgba(148,163,184,0.25);

  backdrop-filter: blur(6px);

  cursor: pointer;
  transition: 
    transform .15s ease,
    box-shadow .2s ease,
    border-color .2s ease;
}

.topbar-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56,189,248,0.45);
  box-shadow: 0 14px 30px rgba(56,189,248,0.15);
}

.topbar-btn:active {
  transform: translateY(0);
  opacity: 0.92;
}

/* Hide hamburger on desktop */
.hamburger {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #e5e7eb;
  cursor: pointer;
}

/* Hamburger menu drawer items (reuse saved drawer styling) */
.menu-item{
  text-decoration: none;
  color: inherit;
}

.menu-item-btn{
  width: 100%;
  text-align: left;
  background: none;
}

/* Mobile layout */
@media (max-width: 1100px) {

  .topbar-nav {
    position: absolute;
    top: 64px;
    right: 16px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148,163,184,0.2);
    border-radius: 14px;
    padding: 14px;
    flex-direction: column;
    gap: 12px;
    display: none;
  }

  .topbar-nav.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  /* Hide normal nav layout on mobile */
  .topbar-nav a,
  .topbar-nav button {
    width: 100%;
  }
}


@media (max-width: 920px){
    .panel {
        border-radius: 0px;
        padding: 28px 10px 10px;
        margin-top: 104px;
    }
    .container {
      padding-top: 16px;
    }
    .brand-text{
        font-size: 1.35rem;
    }
    .hamburger {
        font-size: 2rem;
    }
    .save-fab{
        position: relative;
        top:0%;
        right: 0%;
        
    }
    #location {
        padding: 16px 16px;
    }
    .location-analyze {
        display: none !important;
    }
    .panel-left h1 {
      margin: 0 0 4px;
      font-weight: 800;
    }

    .subtitle {
      margin: 0 0 12px;
    }
}
@media (max-width: 920px){
  .panel{
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .saved-drawer{
    box-shadow: none !important;
  }
  .brand-text  {
    font-size: 1.1rem;
  }
  .brand-mark{
    width: 32px;
    height: 32px;
    font-size: 25px;
    line-height: 1;
  }
  .info-close {
    font-size: 25px;
  }
}

/* ===========================
   Mobile full-screen menu
   =========================== */
.mobile-menu{
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 10000;

  transform: translateY(-100%);
  transition: transform .25s ease;
}

.mobile-menu.open{
  transform: translateY(0);
}

.mobile-menu-inner{
  padding: 28px 24px;
  max-width: 520px;
  margin: 0 auto;
}

.mobile-menu-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.mobile-menu-title{
  font-weight: 800;
  font-size: 1.1rem;
  color: #0f172a;
}

.mobile-menu-close{
  background: rgba(0,0,0,0.05);
  border: none;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s ease;
}

.mobile-menu-close:hover{
  background: rgba(0,0,0,0.1);
}

/* ==============================
   MOBILE FULLSCREEN MENU (FIXED)
   ============================== */

.mobile-menu-item{
  display: block;
  width: 100%;
  box-sizing: border-box;   /* ✅ prevents overflow */
  
  padding: 16px 18px;
  margin: 0;

  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.18);

  background: rgba(2,6,23,0.04);
  color: #0f172a;

  font-size: 1rem;
  font-weight: 700;
  text-align: left;

  text-decoration: none;
  cursor: pointer;

  transition: all .15s ease;
}

.mobile-menu-item + .mobile-menu-item{
  margin-top: 14px;
}

.mobile-menu-item:hover{
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.35);
}


/* ===== Footer (old layout + no overflow) ===== */
.site-footer{
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;

  /* keep it consistent with your site */
  background: #070F22;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 18px 0;
}

.footer-inner{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
  box-sizing: border-box;

  /* ✅ restores the old layout */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap; /* ✅ prevents overflow */
}

.footer-left{
  color: rgba(226,232,240,0.65);
  font-size: 13px;
}

.footer-links{
  display: flex;         /* ✅ required */
  gap: 18px;
  flex-wrap: wrap;       /* ✅ prevents overflow */
  row-gap: 10px;
}

.footer-links a{
  font-size: 13px;
  color: rgba(226,232,240,0.75);
  text-decoration: none;
  white-space: nowrap;   /* keeps each link on one line */
  max-width: 100%;
  transition: color 0.2s ease;
}

.footer-links a:hover{
  color: #38bdf8;
}

/* Mobile: stack cleanly */
@media (max-width: 640px){
  .site-footer{ padding-left: 14px; padding-right: 14px; }

  .footer-inner{
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links{
    justify-content: center;
  }

  /* Avoid the fixed version label colliding with the footer on small screens */
  .bottom-nav{
    position: static !important;
    margin: 10px 0 0 !important;
    justify-content: center !important;
  }
}
@media (min-width: 920px){
    .site-footer{
        background: #070F22;
    }
    .footer-links a:hover {
        color: #38bdf8;
    }
}




.saved-actions{
  display:flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.saved-bell{
  border:none;
  background: rgba(255,255,255,0.04);
  color:#94a3b8;
  font-weight:800;
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
  transition: all .15s ease;
  display:flex;
  align-items:center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}
.saved-bell:hover{
  background: rgba(56,189,248,0.14);
  color:#e5e7eb;
}
.saved-bell.on{
  background: rgba(56,189,248,0.18);
  color:#e5e7eb;
  border: 1px solid rgba(56,189,248,0.35);
}
.bell-icn{ font-size: 14px; line-height: 1; }
.bell-txt{ font-size: 12px; }



/* ===== Info modal (real-photo popups) ===== */
.info-btn{
  margin-left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.25);
  background: rgba(2,6,23,0.55);
  color: #e5e7eb;
  font-weight: 800;
  font-size: 15px;
  line-height: 16px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-btn:hover{ transform: translateY(-1px); }

.info-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  z-index: 6000; /* above share modal */
}

.info-modal.open{ display: flex; }

.info-sheet{
  width: min(520px, 92vw);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.60);
  padding: 14px;
  position: relative;
}

.info-close{
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2,6,23,0.55);
  color: #e5e7eb;
  cursor: pointer;
  font-weight: 800;
}

.info-media img{
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(2,6,23,0.45);
}

.info-copy{ margin-top: 10px; }
.info-title{
  font-size: 1rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 6px;
}
.info-text{
  font-size: 0.9rem;
  color: rgba(226,232,240,0.75);
  line-height: 1.35;
}






/* ===== Menu drawer buttons (Learn More / Saved Locations) ===== */
/* ===== Menu drawer buttons (Learn More / Saved Locations) ===== */
.menu-item{
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 20px;
  border-radius: 20px;

  text-decoration: none;
  color: #f1f5f9;

  /* Stronger contrast background */
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.9),
    rgba(30, 41, 59, 0.9)
  );

  border: 1.5px solid rgba(56, 189, 248, 0.35);

  box-shadow:
    0 8px 24px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.04);

  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.menu-item + .menu-item{
  margin-top: 18px;
}

.menu-item .saved-name{
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* Hover / tap feedback */
.menu-item:hover{
  transform: translateY(-2px);
  border-color: rgba(56,189,248,0.65);
  box-shadow:
    0 14px 36px rgba(0,0,0,0.45),
    0 0 0 1px rgba(56,189,248,0.25);
}

.menu-item:active{
  transform: translateY(0);
  background: rgba(15,23,42,0.95);
}

/* Make button behave like link */
.menu-item-btn{
  width: 100%;
  text-align: left;
  cursor: pointer;
}

/* Accessibility focus ring */
.menu-item:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px rgba(56,189,248,0.4),
    0 14px 36px rgba(0,0,0,0.45);
}



/* show only on mobile, via .open */
@media (max-width: 1100px){
  .mobile-menu.open{ display: block; }
}





/* ==============================
   MOBILE RESTORE (keep old look)
   Put this at VERY END of style.css
   ============================== */
@media (max-width: 920px){

  /* Force single-column stack on mobile (like before) */
  .panel-grid{
    display: block !important;
    margin-top: 0 !important;
  }

  /* Remove the desktop “two equal cards” styling on mobile */
  .panel-left,
  .panel-right{
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  /* Restore the original rounded card + spacing on mobile */
  .container{
    padding: 90px 10px 10px;
    background: rgba(15, 23, 42, 0.85);
  }

  .panel{
    border-radius: 26px !important;
    padding: 34px 22px 22px !important;
  }
}


/* Legal pages only: stop the extra top gap */
.legal-page .container{
  align-items: flex-start;
}

.legal-page .panel{
  margin-top: 70px;
}

@media (max-width: 920px){
  .legal-page .container{
    padding: 90px 10px 10px;
  }

  .legal-page .panel{
    margin-top: 0 !important;
  }
}





.sim-card .sim-controls{
  display: none !important;
}
.status{
  display: none !important;
}


.sim-card{
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(15,23,42,0.72), rgba(2,6,23,0.60));
  border: 1px solid rgba(148,163,184,0.18);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.sim-head{
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.sim-title{
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}

.sim-sub{
  margin-top: 4px;
  font-size: 0.9rem;
  color: rgba(226,232,240,0.72);
}

.sim-controls{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.sim-controls label{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.sim-controls select,
.sim-controls input,
.sim-controls button{
  background: rgba(2,6,23,0.72);
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 10px;
  padding: 8px 10px;
}

.sim-controls button{
  cursor: pointer;
  font-weight: 700;
}

.sim-wrap{
  margin-top: 16px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(125,211,252,0.18), transparent 35%),
    linear-gradient(180deg, #0f172a 0%, #1e3a5f 40%, #3b82f6 100%);
  border: 1px solid rgba(148,163,184,0.18);
  position: relative;
}

#contrailSimCanvas{
  width: 100%;
  height: 100%;
  display: block;
}


#overlayBaseImg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

#overlayCanvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 2;
}

.map-layout{
  position: relative;
  width: 100%;
  height: calc(100vh - 132px - 56px);
  min-height: 0;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(148,163,184,0.14);
  box-sizing: border-box;
}

.container.map-layout{
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  align-items: stretch;
  justify-content: center;
  min-height: calc(100vh);
}

.map-bg-layer{
  position: absolute;
  inset: 0;
  z-index: 1;
}

.sim-wrap-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  margin: 0;
  background: #020617;
}

.sim-wrap-bg #overlayBaseImg,
.sim-wrap-bg #overlayCanvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sim-wrap-bg #overlayBaseImg{
  object-fit: cover;
}

.sim-wrap-bg #overlayCanvas{
  pointer-events: none;
}

.map-bg-dim{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(2,6,23,0.08), rgba(2,6,23,0.18)),
    radial-gradient(circle at center, rgba(2,6,23,0.01), rgba(2,6,23,0.10));
  z-index: 2;
  pointer-events: none;
}

.overlay-ui{
  position: relative;
  z-index: 3;
  height: 100%;
  min-height: 0;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 24px;

  /* keep overlays inside the cover and below the navbar */
  padding: 84px 24px 24px;
  box-sizing: border-box;
}

.search-overlay-card,
.output-overlay-card,
.timeline-overlay{
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(148,163,184,0.16);
  box-shadow: 0 18px 50px rgba(0,0,0,0.22);
}

.search-overlay-card{
  width: 420px;
  max-width: 32vw;
  border-radius: 24px;
  padding: 24px;
}

.output-overlay-card{
  position: relative; /* REMOVE absolute */
  width: 400px;
  max-width: 40vw;

  margin-left: auto; /* forces right side */

  border-radius: 24px;
  padding: 16px;
}

.timeline-overlay{
  position: absolute;
  bottom: 5px;
  transform: none;

  width: 70vw;
  max-width: 100%;

  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;

  padding: 10px 14px 10px;
  box-sizing: border-box;
}

.timeline-slider-wrap{
  position: relative;
  padding-top: 12px;
  width: 100%;
  box-sizing: border-box;
}

#timelineSlider,
#timelineHeatbar,
.timeline-hours,
.timeline-days,
.timeline-meta{
  width: 100%;
  box-sizing: border-box;
}

.output-overlay-card #output{
  margin: 0;
}

.sim-code-dock{
  position: absolute;
  left: 24px;
  bottom: 175px;
  width: 325px;
  opacity: 1;
  pointer-events: auto;
  z-index: 4;
}

@media (max-width: 1100px){
  .search-overlay-card{
    width: min(100%, 620px);
  }

  .output-overlay-card{
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 20px;
  }

  .timeline-overlay{
    width: calc(100% - 24px);
  }

  .overlay-ui{
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 140px;
  }
}

@media (max-width: 1100px){
  .map-layout{
    min-height: calc(100vh - 92px);
  }

  .overlay-ui{
    min-height: calc(100vh - 92px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 10px 0 140px;
  }

  .search-overlay-card,
  .output-overlay-card {
    border-radius: 18px;
  }

  .search-overlay-card{
    width: 95%;
    max-width: 95%;
    padding: 12px;
    margin: 0;
  }

  .search-overlay-card h1{
    margin-bottom: 4px;
    font-size: 0.92rem;
    line-height: 1.08;
  }

  .search-overlay-card .subtitle{
    margin-bottom: 6px;
    font-size: 0.72rem;
    line-height: 1.28;
  }

  .search-overlay-card .row{
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .search-overlay-card .location-wrap{
    flex: 1;
    min-width: 0;
  }

  .search-overlay-card h1,
  .search-overlay-card .subtitle{
    display: none;
  }

  .search-overlay-card #location,
  .search-overlay-card .location-wrap input{
    height: 42px;
    padding: 0 12px;
    padding-right: 38px;
    font-size: 0.9rem;
    line-height: 42px;
    border-radius: 10px;
  }

  .search-overlay-card .clear-location{
    width: 22px;
    height: 22px;
    right: 8px;
    font-size: 0.95rem;
  }

  .search-overlay-card .analyze-stack{
    grid-column: 1 / 2;
    min-width: 0;
    margin-top: 6px;
  }

  .search-overlay-card .analyze-row{
    display: block;
  }

  .search-overlay-card .location-analyze{
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .search-overlay-card .status{
    margin-top: 8px;
    font-size: 0.74rem;
    min-height: 1em;
  }

  .search-overlay-card .sim-dropdown-btn,
  .search-overlay-card .sim-dropdown-pill{
    width: 100%;
    height: 38px;
    margin-top: 6px;
    padding: 0 12px;
    font-size: 0.86rem;
    border-radius: 10px;
  }

  .save-fab{
    width: 44px;
    height: 44px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 🔥 Fix icon size ONLY on mobile */
  .save-fab-icon{
    width: 60%;
    height: 60%;
  }

  .timeline-overlay{
    left: 50%;
    right: auto;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    transform: translateX(-50%);
    padding: 12px 10px 14px;
  }
}

@media (max-width: 1100px){
  .timeline{
    padding: 8px 12px 10px 12px;
  }
}




@media (max-width: 1100px){

  .sim-dropdown-wrap{
    position: relative;
    margin-top: 6px;
    width: 100%;
  }

  .search-overlay-card .sim-dropdown-btn,
  .search-overlay-card .sim-dropdown-pill{
    width: 100%;
    height: 38px;
    margin-top: 0;
    padding: 0 12px;
    font-size: 0.86rem;
    border-radius: 10px;
  }

  .sim-dropdown-wrap .sim-dropdown-panel{
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    z-index: 60;
  }

  .sim-dropdown-wrap .sim-dropdown-grid{
    grid-template-columns: 1fr;
  }
}







/* ===== Compact search overlay card ===== */
.search-overlay-card{
  padding: 18px 18px 16px;
  border-radius: 18px;
}

.search-overlay-card h1{
  margin: 0 0 6px;
  font-size: 1.08rem;
  line-height: 1.12;
  font-weight: 800;
}

.search-overlay-card .subtitle{
  margin: 0 0 12px;
  font-size: 0.82rem;
  line-height: 1.3;
  color: #9ca3af;
}

.search-overlay-card .row{
  gap: 10px;
  align-items: center;
}

.search-overlay-card .location-wrap{
  flex: 1 1 auto;
  min-width: 0;
}

.search-overlay-card #location,
.search-overlay-card .location-wrap input{
  height: 46px;
  padding: 0 14px;
  padding-right: 40px;
  font-size: 0.95rem;
  line-height: 46px;
  border-radius: 10px;
}

.search-overlay-card .clear-location{
  width: 24px;
  height: 24px;
  right: 8px;
  font-size: 1rem;
}

.search-overlay-card .location-analyze{
  height: 46px;
  min-width: 118px;
  width: 118px;
  padding: 0 16px;
  font-size: 0.95rem;
  border-radius: 10px;
}

.search-overlay-card .status{
  margin-top: 10px;
  font-size: 0.82rem;
  min-height: 1em;
}

.search-overlay-card .sim-dropdown-btn,
.search-overlay-card .sim-dropdown-pill{
  margin-top: 8px;
  height: 38px;
  min-width: 0;
  width: 220px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.search-overlay-card .sim-dropdown-caret{
  font-size: 0.9rem;
}

/* Desktop-specific compactness */
@media (min-width: 1024px){
  .search-overlay-card{
    width: 500px;
    padding: 16px 16px 14px;
  }

  .search-overlay-card h1{
    font-size: 0.98rem;
    margin-bottom: 4px;
  }

  .search-overlay-card .subtitle{
    font-size: 0.78rem;
    margin-bottom: 10px;
  }

  .search-overlay-card #location,
  .search-overlay-card .location-wrap input,
  .search-overlay-card .location-analyze,
  .search-overlay-card .save-fab{
    height: 42px;
  }

  .search-overlay-card .location-wrap input{
    line-height: 42px;
    font-size: 0.92rem;
  }

  .search-overlay-card .location-analyze{
    width: 108px;
    min-width: 108px;
    font-size: 0.92rem;
  }

  .search-overlay-card .save-fab{
    width: 45px;
    flex-shrink: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .search-overlay-card .save-fab-icon{
    width: 60%;
    height: 60%;
  }

  .search-overlay-card .sim-dropdown-btn,
  .search-overlay-card .sim-dropdown-pill{
    height: 34px;
    width: 190px;
    font-size: 0.84rem;
  }
}


/* hidden by default on desktop */
.mobile-only{
  display: none;
}

.pin-map-modal{
  display: none;
}

@media (max-width: 1100px){
  #timelineSlider{
    height: 34px;          /* bigger touch target */
    margin: 2px 0 6px;
    accent-color: #38bdf8;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
  }

  #timelineSlider::-webkit-slider-runnable-track{
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
  }

  #timelineSlider::-webkit-slider-thumb{
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #38bdf8;
    border: 2px solid rgba(255,255,255,0.9);
    margin-top: -9px;
    box-shadow: 0 4px 12px rgba(56,189,248,0.35);
  }

  #timelineSlider::-moz-range-track{
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
  }

  #timelineSlider::-moz-range-thumb{
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #38bdf8;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(56,189,248,0.35);
  }
}

/* MOBILE ONLY */
@media (max-width: 1100px){

  .mobile-only{
    display: inline-flex;
  }

  .pin-fab{
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: #ffffff;
    background: #000;
    box-shadow: 0 10px 24px rgba(56,189,248,0.28);
  }

  .pin-fab-icon{
    width: 20px;
    height: 20px;
  }

  .pin-map-modal{
    position: fixed;
    inset: 0;
    display: none;
    z-index: 7000;
  }

  .pin-map-modal.open{
    display: block;
  }

  .pin-map-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
  }

  .pin-map-sheet{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 94vw;
    height: min(72vh, 560px);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148,163,184,0.18);
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  }

  .pin-map-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .pin-map-title{
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
  }

  .pin-map-close{
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 10px;
    background: rgba(2,6,23,0.65);
    color: #e5e7eb;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
  }

  .pin-map-body{
    height: calc(100% - 61px);
  }

  #pinMapMount{
    width: 100%;
    height: 100%;
  }

  /* hide old dock on mobile only */
  .sim-code-dock{
    display: none;
  }
}

/* hidden by default on desktop */
.forecast-chip-row,
.forecast-chip,
.forecast-sandbox-btn,
.forecast-sheet-backdrop,
.forecast-sheet-close{
  display: none;
}

@media (max-width: 1100px){

  .output-overlay-card{
    display: none;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 10px 0 18px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
  }

  .output-overlay-card.mobile-sheet-open{
    display: block;
  }

  .output-overlay-card #output{
    max-height: calc(100vh - 500px);
    overflow-y: auto;
    margin: 0;
  }

  .forecast-sheet-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 6400;
    display: none;
  }

  .forecast-sheet-backdrop.open{
    display: block;
  }

  .forecast-sheet-close{
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 10px;
    background: rgba(2,6,23,0.65);
    color: #e5e7eb;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    z-index: 2;
  }

  .forecast-chip{
    display: flex;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    max-width: auto;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,0.16);
    background: linear-gradient(180deg, rgba(15,23,42,0.82), rgba(2,6,23,0.82));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
      0 18px 50px rgba(0,0,0,0.28),
      inset 0 0 0 1px rgba(255,255,255,0.04);
    z-index: 6300;
    cursor: pointer;
    text-align: left;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    flex: 1;
  }

  .forecast-chip-main{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.15;
    color: #f8fafc;
  }

  .forecast-chip-main .chip-label{
    color: rgba(248,250,252,0.96);
    flex: 1;
    min-width: 0;
  }

  .forecast-chip-main .chip-pct{
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0.01em;
  }

  .forecast-chip-main .chip-pct.low{
    color: #7dd3fc;
  }

  .forecast-chip-main .chip-pct.mid{
    color: #facc15;
  }

  .forecast-chip-main .chip-pct.high{
    color: #f97316;
  }

  .forecast-chip-main .chip-pct.vhigh{
    color: #ef4444;
    text-shadow: 0 2px 8px rgba(239,68,68,0.25);
  }

  .forecast-chip-sub{
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(226,232,240,0.72);
    line-height: 1.2;
  }

  .forecast-chip-row{
    display: flex;
    position: absolute;
    left: 50%;
    bottom: 130px;
    transform: translateX(-50%);
    width: 95%;
    max-width: 95%;
    align-items: center;
    gap: 12px;
    z-index: 6300;
    margin-bottom: 14px;
    margin-top: 4px;
  }

  .forecast-sandbox-btn {
    width: 48px;
    height: 48px;

    border-radius: 14px;
    border: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;

    box-shadow: 0 6px 16px rgba(56,189,248,0.25);

    /* 👇 makes it visually secondary */
    opacity: 0.9;
    transform: scale(0.92);

    transition: all 0.18s ease;
  }

  .forecast-sandbox-btn:active {
    transform: scale(0.88);
  }

  .forecast-sandbox-icon {
    width: 20px;
    height: 20px;
  }

  .forecast-chip {
    flex: 1;
  }

  .sim-code-dock{
    display: none;
  }

  .timeline-overlay{
    z-index: 6200;
  }
}


.sandbox-overlay-card{
  display: none;
}

.sandbox-overlay-card.open{
  display: block;
}

.sandbox-output{
  height: 100%;
}

.sandbox-controls-panel{
  display: flex;
  flex-direction: column;
  gap: 0px;
  height: 100%;
}

.sandbox-panel-title{
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #f8fafc;
  line-height: 1.1;
  margin: 0 0 2px;
  margin-bottom: 10px;
}

.sandbox-controls-inline{
  display: block !important;
  position: relative;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sandbox-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 14px;
  row-gap: 12px;
  align-items: end;
}

.sandbox-controls-inline label{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sandbox-controls-inline label span{
  font-size: 0.84rem;
  font-weight: 800;
  color: #f3f4f6;
}

.sandbox-slider-wrap{
  width: 100%;
  display: flex;
  align-items: center;
}

.sandbox-controls-inline input[type="range"]{
  width: 88%;
  margin: 0;
  accent-color: #1f86ff;
}

.sandbox-controls-inline .wind-dir-field .sandbox-slider-wrap,
.sandbox-controls-inline .wind-speed-field .sandbox-slider-wrap{
  justify-content: flex-start;
}

.sandbox-controls-inline .spread-field .sandbox-slider-wrap,
.sandbox-controls-inline .persist-field .sandbox-slider-wrap{
  justify-content: flex-end;
}

.sandbox-actions{
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.sandbox-actions button{
  min-width: 86px;
  padding: 9px 12px;
  border-radius: 12px;
}

.sandbox-inline-close-btn{
  margin-left: auto;
  min-width: 42px !important;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 1100px){
  .sandbox-overlay-card{
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 225px;
    width: auto;
    height: auto;
    max-height: none;
    transform: none;
    z-index: 6550;

    padding: 14px 18px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(12, 20, 40, 0.72), rgba(5, 10, 25, 0.72));
    border: 1px solid rgba(148,163,184,0.12);
    box-shadow:
      0 12px 26px rgba(0,0,0,0.24),
      inset 0 0 0 1px rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .sandbox-grid{
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    row-gap: 0px;
  }

  .sandbox-controls-inline label{
    gap: 5px;
  }
}

.sandbox-controls-inline select,
.sandbox-controls-inline input,
.sandbox-controls-inline .sim-dropdown-actions button{
  font-size: 0.92rem;
}

.sandbox-controls-inline .sim-dropdown-grid label span{
  font-size: 0.78rem;
}

.sandbox-controls-inline .sim-dropdown-actions button{
  padding: 8px 10px;
}

.sandbox-controls-inline input[type="range"]{
  width: 100%;
}


/* ---- FORCE GRID ORDER (MOBILE + DESKTOP) ---- */

.sandbox-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Row 1 */
.wind-dir-field{
  grid-column: 1;
  grid-row: 2;
}

.spread-field{
  grid-column: 2;
  grid-row: 2;
}

/* Row 2 */
.wind-speed-field{
  grid-column: 1;
  grid-row: 3;
}

.persist-field{
  grid-column: 2;
  grid-row: 3;
}

/* Actions row */
.sandbox-actions{
  grid-column: 1 / -1;
  grid-row: 4;
}

.sandbox-slider-wrap{
  width: 100%;
  display: flex;
  align-items: center;
}

.sandbox-controls-inline input[type="range"]{
  width: 88%;
  margin: 0;
  accent-color: #1f86ff;
}

.sandbox-controls-inline .wind-dir-field .sandbox-slider-wrap,
.sandbox-controls-inline .wind-speed-field .sandbox-slider-wrap{
  justify-content: flex-start;
}

.sandbox-controls-inline .spread-field .sandbox-slider-wrap,
.sandbox-controls-inline .persist-field .sandbox-slider-wrap{
  justify-content: flex-end;
}

/* WebKit */
.sandbox-controls-inline input[type="range"]::-webkit-slider-runnable-track{
  height: 8px;
  border-radius: 999px;
}

.sandbox-controls-inline input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: -5px;
}

/* Firefox */
.sandbox-controls-inline input[type="range"]::-moz-range-track{
  height: 8px;
  border-radius: 999px;
}

.sandbox-controls-inline input[type="range"]::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
}






    @keyframes spin{ to { transform: rotate(360deg); } }
