/* =========================
   GLOBAL
   ========================= */
   body {
    margin: 0;
    background: radial-gradient(circle at top, #0f172a, #020617);
    color: white;
    font-family: "PT Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    height: 100vh;
    overflow: hidden;
  }

  /* =========================
     LOADING SCREEN
     ========================= */
  .loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0f172a, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
  }

  .loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
  }

  .loading-content {
    text-align: center;
    max-width: 400px;
    width: 90%;
  }

  .loading-logo {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
  }

  .loading-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
  }

  .loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
  }

  .loading-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
  }

  /* =========================
       SIDEBAR
       ========================= */
  #sidebar button {
    text-transform: none;
    transition: background-color 0.2s ease;
    font-size: 16px;
    font-family: "PT Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  }
  #sidebar button.selected {
    background: rgba(59, 130, 246, 0.3);
  }
  /* DEV TOOLS pinned at bottom of sidebar */
  /* =========================
       MAIN CONTENT CONTAINER
       ========================= */
  /* =========================
       PAGE PANELS
       ========================= */
  /* =========================
       MAP PAGE
       ========================= */
  /* =========================
       CINEMATIC ZOOM
       ========================= */
  @keyframes zoomOutCinematic {
  }
  @keyframes zoomInCinematic {
  }
  /* =========================
       MAP LAYERS
       ========================= */
  /* ZOOM2 BG */
  /* ZOOM1 layers */
  @keyframes starTwinkle {
  }
  @keyframes sunBreathe {
  }
  /* overlays */
  /* =========================
       PLANETS
       ========================= */
  /* =========================
       ZOOM EFFECT LAYER
       ========================= */
  @keyframes zoomWarpIn {
  }
  /* =========================
       INVENTORY UI
       ========================= */
  /* icons */
  /* Buff box */
  /* Crafting panel */
  /* Artifacts list */
  /* =========================
       BANK UI
       ========================= */
  /* =========================
       VESSEL UI
       ========================= */
  /* Fuel Dock */
  /* =========================
       PLANET PAGE
       ========================= */
  /* Disabled / Locked */
  /* =========================
       MODAL
       ========================= */
  /* Late fade for sun */
  @keyframes sunFadeLate {
  }
  @keyframes planetFadeLate {
  }
  /* ===== Mine button + progress bar (fix alignment) ===== */
  /* =======================
       RARITY DOT
       ======================= */
  @media (max-width: 1100px) {
  }
  /* =========================
       DASH GRID
       ========================= */
  /* =========================
       VESSEL IMAGE
       ========================= */
  /* =========================
       âœ… NEW: VESSEL SHOP BADGES
       ========================= */
  /* =========================
       NEW VESSEL SHOP LAYOUT
       (Fuel across top + vessel grid)
       ========================= */
  /* Fuel dock across top */
  /* Vessel grid: 3 columns on desktop, 2 on medium, 1 on mobile */
  /* Each vessel card should NOT be super wide anymore */
  /* Responsive breakpoints */
  @media (max-width: 1100px) {
  }
  @media (max-width: 760px) {
  }
  /* Fix vessel cards bleeding/overlapping */
  /* Make the grid always give enough vertical room */
  /* =========================
       âœ… VESSEL PAGE FIX: stop dash-grid row clipping
       ========================= */
  /* The vessel page should NOT use the 22px-row dash grid behavior */
  /* Make the vessel page shop layout control spacing */
  /* ✅ FINAL: Vessel image sizing (paste at VERY bottom) */
  /* ✅ Glow behind vessel PNG (Option #1) */
  /* âœ… FIX: stop vessel cards from overflowing into other columns */
  /* Make sure grid columns can shrink properly */
  /* Make each card allowed to shrink (prevents column overlap) */
  /* =========================
       âœ… TRAVEL OVERLAY (post-confirm travel)
       ========================= */
  /* =========================
       âœ… FIX: COMMS should NEVER push layout
       (take it out of flow + lock size)
       ========================= */
  /* Make likely travel UI containers "position:relative" so abs children anchor correctly */
  /* Target the comms box/card itself (broad selectors) */
  /* Keep the text wrapping INSIDE the fixed box */
  /* Optional: clamp to 3 lines for a super stable look */
  /* =========================
       âœ… LOCATION HUD (bottom-left)
       ========================= */
  /* Optional polish: slightly dim it when travel overlay is visible */
  /* =========================
       ARTIFACTS PAGE LAYOUT
       ========================= */
  /* Top bar spans full width */
  /* Left / Right panels */
  /* Make these look like your dash-cards */
  /* Scroll behavior */
  /* Equipped artifacts showcase grid - 4 columns */
  .artifact-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 8px;
    width: 100%;
  }
  .artifact-slot {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    transition: all 0.3s ease;
    overflow: hidden;
  }
  .artifact-slot.equipped {
    border-color: rgba(147, 197, 253, 0.5);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(15, 23, 42, 0.6));
    box-shadow: 0 0 20px rgba(147, 197, 253, 0.3),
        inset 0 0 20px rgba(147, 197, 253, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.4);
  }
  .artifact-slot.empty {
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(2, 6, 23, 0.6));
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0.6;
  }
  .artifact-slot-image {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
  }
  .artifact-icon {
    font-size: 48px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px currentColor);
    transition: transform 0.3s ease;
  }
  .artifact-slot.equipped:hover .artifact-icon {
    transform: scale(1.1) rotate(5deg);
  }
  .artifact-icon--warp {
    color: #fbbf24;
    text-shadow: 0 0 20px #fbbf24;
  }
  .artifact-icon--stealth {
    color: #34d399;
    text-shadow: 0 0 20px #34d399;
  }
  .artifact-icon--market {
    color: #a78bfa;
    text-shadow: 0 0 20px #a78bfa;
  }
  .artifact-icon--stabilization {
    color: #f472b6;
    text-shadow: 0 0 20px #f472b6;
  }
  .artifact-icon--blackhole {
    color: #6366f1;
    text-shadow: 0 0 20px #6366f1;
  }
  .artifact-icon--stabilized {
    color: #fbbf24;
    text-shadow: 0 0 20px #fbbf24;
  }
  .artifact-icon--empty {
    color: rgba(255, 255, 255, 0.15);
    font-size: 32px;
    filter: none;
  }
  .artifact-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse-glow 2s ease-in-out infinite;
    z-index: 1;
  }
  .artifact-glow--warp {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.6), transparent 70%);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
  }
  .artifact-glow--stealth {
    background: radial-gradient(circle, rgba(52, 211, 153, 0.6), transparent 70%);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.4);
  }
  .artifact-glow--market {
    background: radial-gradient(circle, rgba(167, 139, 250, 0.6), transparent 70%);
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.4);
  }
  .artifact-glow--stabilization {
    background: radial-gradient(circle, rgba(244, 114, 182, 0.6), transparent 70%);
    box-shadow: 0 0 30px rgba(244, 114, 182, 0.4);
  }
  .artifact-glow--blackhole {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.6), transparent 70%);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
  }
  .artifact-glow--stabilized {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.6), transparent 70%);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
  }
  @keyframes pulse-glow {
    0%, 100% {
      opacity: 0.3;
      transform: translate(-50%, -50%) scale(0.9);
    }
    50% {
      opacity: 0.6;
      transform: translate(-50%, -50%) scale(1.1);
    }
  }
  .artifact-slot-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
    text-align: center;
  }
  .artifact-slot.equipped .artifact-slot-label {
    color: rgba(255, 255, 255, 0.95);
  }
  .artifact-slot-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.3;
  }
  .artifact-slot.equipped .artifact-slot-subtitle {
    color: rgba(255, 255, 255, 0.65);
  }
  .artifact-slot-value {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 4px;
  }
  .artifact-slot.equipped .artifact-slot-value {
    color: #93c5fd;
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.5);
  }
  .artifact-slot-tier {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(147, 197, 253, 0.8);
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(147, 197, 253, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(147, 197, 253, 0.2);
  }
  /* Remove old buff-box--row styles */
  /* âœ… keep zoom2 bg fully hidden during zoom animations */
  /* =========================
       âœ… FIX (surgical): keep Cargo Hold narrow even when empty
       (does NOT change overall layout)
       ========================= */
  /* mobile: allow it to be full width */
  @media (max-width: 980px) {
  }
  /* Travel vessel FX */
  @keyframes travelVesselPulse {
  }
  /* =========================
       âœ… ANOMALIES
       ========================= */
  #app {
    display: flex;
    height: 100vh;
    overflow: hidden;
  }
  /* =========================
       SIDEBAR
       ========================= */
  #sidebar {
    width: 220px;
    background: linear-gradient(180deg, #0b1220, #020617);
    padding: 20px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
  }
  #sidebar::-webkit-scrollbar {
    display: none;
  }
  .logo {
    text-align: center;
    font-size: 22px;
    margin-bottom: 12px;
    flex-shrink: 0;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  
  .discord-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
    margin-left: 8px;
    margin-top: 8px;
  }
  
  .discord-logo-link:hover {
    transform: scale(1.15);
    opacity: 1;
  }
  
  .discord-logo-link svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  }
  #sidebar button {
    width: 100%;
    margin-bottom: 5px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
  }
  #sidebar button:hover {
    background: rgba(255,255,255,0.12);
  }

  /* ✅ User HUD container at bottom - NO SCROLL */
  #userHudContainer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.3);
  }
  /* DEV TOOLS pinned at bottom of sidebar */
  .dev-tools-sidebar {
    margin-top: auto;
    max-width: none;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 8px;
  }
  .dev-tools-sidebar .dev-title {
    font-size: 14px;
    font-weight: bold;
    opacity: 0.9;
  }
  .dev-tools-sidebar .dev-buttons {
    display: flex;
   
    flex-direction: column;
    gap: 5px;
    padding: 0px;
    margin-top: 2px;
    width: 100%;
  }
  .dev-tools-sidebar .dev-btn {
    font-size: 8px;
    width: 100%;
    text-align: left;
    padding: 2px 2px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.12);
    color: white;
  }
  .dev-tools-sidebar .dev-btn:hover {
    background: rgba(255,255,255,0.18);
  }
  /* =========================
       MAIN CONTENT CONTAINER
       ========================= */
  #content {
    flex: 1;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    padding: 12px;
    display: flex;
    flex-direction: column;
  }

  /* ✅ Scrollable pages container */
  .pages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* ✅ Google Sign-In HUD */
  #googleSignInHud {
    background: rgba(25, 35, 70, 0.98);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 12px;
    padding: 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 100;
  }

  #googleSignInHud.hidden {
    display: none;
  }

  #btnGoogleSignInHud {
    background: #4285f4;
    color: white;
    border: none;
    padding: 2px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    transition: background 0.2s;
    line-height: 1;
  }

  #btnGoogleSignInHud:hover {
    background: #357ae8;
  }

  /* ✅ Profile card content */
  .profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #E5E7EB;
    background-size: 200%;
    background-position: center 60%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
  }

  .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .profile-username {
    text-align: left;
    font-size: 14.5px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #profileHud {
    background: rgba(18, 24, 38, 0.96);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 12px;
    padding: 8px;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
    position: relative;
    cursor: pointer;
  }

  #profileHud.visible {
    display: flex;
  }

  #profileHud.hidden {
    display: none;
  }


  /* ✅ Settings overlay */
  #profileSettingsOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }

  #profileSettingsOverlay.visible {
    display: flex;
  }

  .profile-settings-card {
    background: linear-gradient(135deg, #0b1222, #070b16);
    border: 2px solid rgba(30, 64, 175, 0.5);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-sizing: border-box;
  }

  .profile-settings-card h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
  }

  .setting-group {
    margin-bottom: 18px;
  }

  .setting-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
  }

  .setting-group input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
  }

  .setting-group input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(255, 255, 255, 0.12);
  }


  .settings-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
  }

  .settings-buttons button {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
  }

  .settings-buttons .btn-save {
    background: #3b82f6;
    color: white;
  }

  .settings-buttons .btn-save:hover {
    background: #2563eb;
  }

  .settings-buttons .btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }

  .settings-buttons .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
  }
  /* =========================
       PAGE PANELS
       ========================= */
  #mapPage,
    #inventoryPage,
    #planetPage,
    #artifactsPage,
    #bankPage,
    #marketPage,
    #eventsPage,
    #vesselPage {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  #leaderboardPage {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  #inventoryPage,
    #planetPage,
    #artifactsPage,
    #bankPage,
    #marketPage,
    #eventsPage,
    #vesselPage {
    padding: 26px;
  }
  #inventoryPage > *,
    #planetPage > *,
    #bankPage > *,
    #marketPage > *,
    #eventsPage > *,
    #vesselPage > * {
    width: 100%;
    max-width: 980px;
  }
  #inventoryPage h2,
    #planetPage h2,
    #bankPage h2,
    #marketPage h2,
    #eventsPage h2,
    #vesselPage h2 {
    margin: 0 0 14px;
  }
  #bankPage p,
    #marketPage p,
    #vesselPage p {
    margin: 0 0 16px;
    opacity: 0.9;
  }
  /* =========================
       MAP PAGE
       ========================= */
  #mapPage {
    padding: 0;
    overflow: hidden;
  }
  .map-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: black;
    transform-origin: 50% 50%;
    contain: paint;
    transform: translateZ(0);
    will-change: transform, opacity;
  }
  /* =========================
       CINEMATIC ZOOM
       ========================= */
  @keyframes zoomOutCinematic {
    0% {
      transform: scale(1);
      opacity: 1;
    }
    45% {
      transform: scale(1.06);
      opacity: 0.92;
    }
    100% {
      transform: scale(5);
      opacity: 0.0;
    }
  }
  @keyframes zoomInCinematic {
    0% {
      transform: scale(1.22);
      opacity: 0.0;
    }
    55% {
      transform: scale(1.08);
      opacity: 0.92;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
  #mapCanvas.zooming-out::after,
  #mapCanvas.zooming-in::after {
    opacity: 0 !important;
  }
  /* =========================
       MAP LAYERS
       ========================= */
  .map-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    will-change: transform, opacity;
  }
  #mapCanvas.zooming-out .map-layer:not(.stars),
  #mapCanvas.zooming-in .map-layer:not(.stars) {
    transition: none !important;
  }


  /* ZOOM1 layers */
  @keyframes starTwinkle {
    0% {
      opacity: 0.88;
    }
    50% {
      opacity: 1;
    }
    100% {
      opacity: 0.88;
    }
  }
  .map-layer.stars {
    z-index: 0;
    animation: starTwinkle 12s ease-in-out infinite;
    will-change: opacity;
  }
  @keyframes sunBreathe {
  0%   { transform: translate(-50%, -50%) scale(1) translateZ(0); }
  50%  { transform: translate(-50%, -50%) scale(1.01) translateZ(0); }
  100% { transform: translate(-50%, -50%) scale(1) translateZ(0); }
}

.map-layer.sun {
  inset: auto;
  width: 1400px;
  height: 1400px;

  left: 35%;
  top: 30%;
  transform: translate(-50%, -50%) translateZ(0);

  object-fit: contain;
  z-index: 2;
  pointer-events: none;

  animation: sunBreathe 12s ease-in-out infinite;
  will-change: transform, opacity;

  opacity: .80;

}

.map-layer.rays {
  inset: auto;
  width: 1600px;
  height: 1600px;
  left: 28%;
  top: 20%;
  transform: translate(-50%, -50%) rotate(6deg) translate(0px, 0px) translateZ(0);
  object-fit: contain;
  z-index: 3;
  pointer-events: none;

  opacity: 0.25;
  filter: blur(0.8px) contrast(0.9);
  mix-blend-mode: screen;

  will-change: transform, opacity;
}

  #mapCanvas.zoom-2:not(.zooming-out):not(.zooming-in) .map-layer.stars,
  #mapCanvas.zoom-2:not(.zooming-out):not(.zooming-in) .map-layer.sun,
  #mapCanvas.zoom-2:not(.zooming-out):not(.zooming-in) .map-layer.rays {
    opacity: 0 ;
  }
  #mapCanvas.zoom-2:not(.zooming-out):not(.zooming-in) .map-layer.zoom2-bg {
    opacity: 1 !important;
    z-index: 5;
    
  }
  /* ZOOM2 BG */
  .map-layer.zoom2-bg {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: none !important;
    backface-visibility: hidden;
    transform: scale(1.3) translateZ(0);                                                  
  }
  #mapCanvas.zoom-2 .map-layer.zoom2-bg {
    opacity: 1;
    z-index: 5;
    filter: saturate(0.70) brightness(0.92) contrast(0.98);
    transform: scale(1.3) translateZ(0);  
  }

  /* ZOOM3 BG */
  .map-layer.zoom3-bg {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: none !important;
    backface-visibility: hidden;
  }
  #mapCanvas.zoom-3:not(.zooming-out):not(.zooming-in) .map-layer.zoom3-bg {
    opacity: 1 !important;
    z-index: 5;
  }
  #mapCanvas.zoom-3 .map-layer.zoom3-bg {
    opacity: 1;
    z-index: 5;
    filter: saturate(0.65) brightness(0.88) contrast(1.02);
  }
  /* Hide zoom2-bg in zoom-3 */
  #mapCanvas.zoom-3:not(.zooming-out):not(.zooming-in) .map-layer.zoom2-bg {
    opacity: 0 !important;
  }
  /* Hide zoom1 layers in zoom-3 */
  #mapCanvas.zoom-3:not(.zooming-out):not(.zooming-in) .map-layer.stars,
  #mapCanvas.zoom-3:not(.zooming-out):not(.zooming-in) .map-layer.sun,
  #mapCanvas.zoom-3:not(.zooming-out):not(.zooming-in) .map-layer.rays {
    opacity: 0 !important;
  }

  /* overlays */
  .map-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(6px);
    font-size: 14px;
    opacity: 0.95;
  }
  /* =========================
       PLANETS
       ========================= */
 .planet-node {
  position: absolute;
  transform: translate(-50%, -50%) translateZ(0);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 28px;

  /* ✅ remove the "white outline" glow */
  filter: none;

  transition: transform 0.18s ease, filter 0.18s ease, opacity 260ms ease;
  z-index: 9;
  will-change: transform, opacity;

  }
  .planet-node:hover {
  transform: translate(-50%, -50%) scale(1.18) translateZ(0);

  /* ✅ subtle hover lift, not a white outline */
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
}

  .planet-node.zoom2-only {
    opacity: 0;
    pointer-events: none;
  }
  #mapCanvas.zoom-2 .planet-node.zoom2-only {
    opacity: 1;
    pointer-events: auto;
  }
  #mapCanvas.zoom-1 .planet-node.zoom1-only {
    opacity: 1;
    pointer-events: auto;
  }
  #mapCanvas.zoom-2 .planet-node.zoom1-only {
    opacity: 0;
    pointer-events: none;
  }
  #mapCanvas.zoom-1 .planet-node.zoom2-only {
    opacity: 0;
    pointer-events: none;
  }

  /* =========================
     ZOOM 3 VISIBILITY RULES
     ========================= */
  .planet-node.zoom3-only {
    opacity: 0;
    pointer-events: none;
  }
  #mapCanvas.zoom-3 .planet-node.zoom3-only {
    opacity: 1;
    pointer-events: auto;
  }
  #mapCanvas.zoom-1 .planet-node.zoom3-only {
    opacity: 0;
    pointer-events: none;
  }
  #mapCanvas.zoom-2 .planet-node.zoom3-only {
    opacity: 0;
    pointer-events: none;
  }
  /* Hide zoom1 and zoom2 planets in zoom-3 */
  #mapCanvas.zoom-3 .planet-node.zoom1-only {
    opacity: 0;
    pointer-events: none;
  }
  #mapCanvas.zoom-3 .planet-node.zoom2-only {
    opacity: 0;
    pointer-events: none;
  }

  .planet-label {
    white-space: nowrap;
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
    text-align: left;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    opacity: 0;
    pointer-events: none;
  }
  .planet-label .planet-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
  }
  .planet-label .planet-distance {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
  }
  .planet-label .planet-status {
    margin-top: 6px;
    font-size: 12px;
  }
  .planet-node:hover .planet-label {
    opacity: 1;
  }
  .planet-node--img {
    font-size: 0;
    line-height: 0;
  }
  .planet-node--img .planet-img {
  width: var(--psz);
  height: var(--psz);
  object-fit: contain;
  display: block;
  pointer-events: none;

  /* ✅ softer, painterly "depth" shadow instead of a white rim */
  filter:
    drop-shadow(0 14px 24px rgba(0,0,0,0.45))
    drop-shadow(0 0 22px rgba(120, 170, 255, 0.14));

  transform: translateZ(0);
  will-change: transform, opacity;
}

  .planet-node--img:hover .planet-img {
  filter:
    drop-shadow(0 18px 30px rgba(0,0,0,0.50))
    drop-shadow(0 0 28px rgba(140, 190, 255, 0.18));
}

  .planet-node--img {
    --px: 50%;
    --py: 50%;
    --psz: 54px;
    left: var(--px);
    top: var(--py);
  }
  #earthNode {
    --px: 58%;
    --py: 70%;
    --psz: 305px;
  }
  #marsNode {
    --px: 78%;
    --py: 30%;
    --psz: 90px;
  }
  /* ✅ planet-specific atmospheric rim */
#earthNode .planet-img {
  filter:
    drop-shadow(0 14px 24px rgba(0,0,0,0.45))
    drop-shadow(0 0 22px rgba(120, 190, 255, 0.16)); /* cool blue */
}

#marsNode .planet-img {
  filter:
    drop-shadow(0 14px 24px rgba(0,0,0,0.45))
    drop-shadow(0 0 22px rgba(255, 170, 120, 0.14)); /* warm orange */
}

  #proximaNode {
    --px: 88%;
    --py: 83%;
    --psz: 300px;
  }
  #proximaNode .planet-label {
    left: auto;
    right: calc(100% + 8px);
  }
  #trappistNode {
    --px: 20%;
    --py: 58%;
    --psz: 150px;
  }
  #keplerNode {
    --px: 70%;
    --py: 40%;
    --psz: 100px;
  }
  #mapCanvas.zoom-2 .planet-node.zoom2-only {
    left: clamp(8%, var(--px), 92%);
    top: clamp(10%, var(--py), 90%);
  }

  /* =========================
     ZOOM 3 PLANETS (Deep Space)
     ========================= */
  #asteriaNode {
    --px: 25%;
    --py: 30%;
    --psz: 200px;
  }
  #asteriaNode .planet-img {
    filter:
      drop-shadow(0 14px 24px rgba(0,0,0,0.45))
      drop-shadow(0 0 22px rgba(180, 120, 255, 0.18)); /* purple glow */
  }
  #dagonNode {
    --px: 67%;
    --py: 70%;
    --psz: 140px;
  }
  #dagonNode .planet-img {
    filter:
      drop-shadow(0 14px 24px rgba(0,0,0,0.45))
      drop-shadow(0 0 22px rgba(100, 200, 180, 0.16)); /* teal glow */
  }
  #mapCanvas.zoom-3 .planet-node.zoom3-only {
    left: clamp(8%, var(--px), 92%);
    top: clamp(10%, var(--py), 90%);
  }

  /* =========================
       ZOOM EFFECT LAYER (Black starry space transition)
       ========================= */
  #zoomEffectLayer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    background:
      radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8) 0%, transparent 100%),
      radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.6) 0%, transparent 100%),
      radial-gradient(1px 1px at 40% 15%, rgba(255,255,255,0.7) 0%, transparent 100%),
      radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
      radial-gradient(1px 1px at 70% 25%, rgba(255,255,255,0.8) 0%, transparent 100%),
      radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.6) 0%, transparent 100%),
      radial-gradient(1px 1px at 15% 65%, rgba(255,255,255,0.7) 0%, transparent 100%),
      radial-gradient(1px 1px at 30% 80%, rgba(255,255,255,0.5) 0%, transparent 100%),
      radial-gradient(1px 1px at 50% 70%, rgba(255,255,255,0.8) 0%, transparent 100%),
      radial-gradient(1px 1px at 65% 85%, rgba(255,255,255,0.6) 0%, transparent 100%),
      radial-gradient(1px 1px at 80% 75%, rgba(255,255,255,0.7) 0%, transparent 100%),
      radial-gradient(1px 1px at 95% 40%, rgba(255,255,255,0.5) 0%, transparent 100%),
      radial-gradient(1.5px 1.5px at 20% 50%, rgba(255,255,255,0.9) 0%, transparent 100%),
      radial-gradient(1.5px 1.5px at 45% 30%, rgba(255,255,255,0.7) 0%, transparent 100%),
      radial-gradient(1.5px 1.5px at 75% 60%, rgba(255,255,255,0.8) 0%, transparent 100%),
      radial-gradient(1.5px 1.5px at 90% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
      radial-gradient(circle at top, #0f172a, #020617);
    transform: scale(1) translateZ(0);
    will-change: transform, opacity;
  }
  @keyframes blackSpaceFade {
    0% { opacity: 0; }
    30% { opacity: 0; } /* was 25% */
    50% { opacity: 1; } /* was 35% */
    55% { opacity: 1; } /* was 65% */
    70% { opacity: 0; } /* was 75% */
    100% { opacity: 0; }
  }
  #mapCanvas.zooming-out #zoomEffectLayer,
  #mapCanvas.zooming-in #zoomEffectLayer {
    animation: blackSpaceFade 1000ms linear forwards;
  }

  /* =========================
       ANOMALY FADE DURING ZOOM
       ========================= */
  @keyframes anomalyFadeOut {
    0% { opacity: 1; }
    15% { opacity: 0; }
    100% { opacity: 0; }
  }
  #mapCanvas.zooming-out .anomaly-node,
  #mapCanvas.zooming-in .anomaly-node {
    animation: anomalyFadeOut 1000ms linear forwards;
  }

  /* =========================
       ZOOM 1 LAYER ANIMATIONS (Stars, Sun, Rays)
       ========================= */
  .map-layer.stars {
    transform: scale(1.15) translateZ(0);
  }

  @keyframes zoom1LayerShrink {
    0% {
      opacity: 0.88;
      transform: scale(1.15) translateZ(0);
    }
    8% {
      opacity: 0.88;
      transform: scale(1.12) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: scale(1.0) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: scale(1.0) translateZ(0);
    }
  }
  @keyframes zoom1LayerGrow {
    0% {
      opacity: 0;
      transform: scale(1.0) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: scale(1.0) translateZ(0);
    }
    92% {
      opacity: 1;
      transform: scale(1.12) translateZ(0);
    }
    100% {
      opacity: 0.88;
      transform: scale(1.15) translateZ(0);
    }
  }

  @keyframes zoom1SunShrink {
    0% {
      opacity: 0.8;
      transform: translate(-50%, -50%) scale(1) translateZ(0);
    }
    8% {
      opacity: 0.8;
      transform: translate(-50%, -50%) scale(0.95) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.6) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.6) translateZ(0);
    }
  }
  @keyframes zoom1SunGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.6) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.6) translateZ(0);
    }
    92% {
      opacity: 0.8;
      transform: translate(-50%, -50%) scale(0.95) translateZ(0);
    }
    100% {
      opacity: 0.8;
      transform: translate(-50%, -50%) scale(1) translateZ(0);
    }
  }

  @keyframes zoom1RaysShrink {
    0% {
      opacity: 0.25;
      transform: translate(-50%, -50%) rotate(6deg) scale(1) translateZ(0);
    }
    8% {
      opacity: 0.25;
      transform: translate(-50%, -50%) rotate(6deg) scale(0.95) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) rotate(6deg) scale(0.6) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) rotate(6deg) scale(0.6) translateZ(0);
    }
  }
  @keyframes zoom1RaysGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) rotate(6deg) scale(0.6) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) rotate(6deg) scale(0.6) translateZ(0);
    }
    92% {
      opacity: 0.25;
      transform: translate(-50%, -50%) rotate(6deg) scale(0.95) translateZ(0);
    }
    100% {
      opacity: 0.25;
      transform: translate(-50%, -50%) rotate(6deg) scale(1) translateZ(0);
    }
  }

  /* =========================
       PLANET SHRINK/GROW ANIMATIONS (with convergence)
       ========================= */
  /* Earth shrink/grow */
  @keyframes earthShrink {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.92) translate(-0.8vw, -2vh) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-2vw, -5vh) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-2vw, -5vh) translateZ(0);
    }
  }
  @keyframes earthGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-2vw, -5vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-2vw, -5vh) translateZ(0);
    }
    92% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.92) translate(-0.8vw, -2vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }

  /* Mars shrink/grow */
  @keyframes marsShrink {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.92) translate(-2vw, 2vh) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-90%, -90%) scale(0.5) translate(-2vw, 5vh) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-90%, -90%) scale(0.4) translate(-3vw, 5vh) translateZ(0);
    }
  }
  @keyframes marsGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-2vw, 5vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-2vw, 5vh) translateZ(0);
    }
    92% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.92) translate(-1vw, 2vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }

  /* Proxima shrink/grow (zoom 2) */
  @keyframes proximaShrink {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.6) translate(-2.5vw, -2vh) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.4) translate(-2vw, -1.5vh) translateZ(0);
    }
    42% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  @keyframes proximaGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-28vw, -20vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-9vw, -10vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.89) translate(-2vw, -2.2vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  /* Proxima GROWS and spreads apart during zoom-in (2→1), fades out by 35% */
  @keyframes proximaZoomIn {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.15) translate(1vw, 0.8vh) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(3vw, 2.5vh) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(3vw, 2.5vh) translateZ(0);
    }
  }

  /* TRAPPIST shrink/grow (zoom 2) */
  @keyframes trappistShrink {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.6) translate(2vw, -0.5vh) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.4) translate(1.5vw, -0.3vh) translateZ(0);
    }
    42% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  @keyframes trappistGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(20vw, -12vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(15vw, -5vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.89) translate(3.3vw, -1.1vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  /* TRAPPIST GROWS and spreads apart during zoom-in (2→1), fades out by 35% */
  @keyframes trappistZoomIn {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.15) translate(-1.5vw, -0.5vh) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(-4vw, -1.5vh) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(-4vw, -1.5vh) translateZ(0);
    }
  }

  /* Kepler shrink/grow (zoom 2) */
  @keyframes keplerShrink {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.6) translate(-1.5vw, 0.8vh) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.4) translate(-1.2vw, 0.6vh) translateZ(0);
    }
    42% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  @keyframes keplerGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-18vw, 20vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.5) translate(-9vw, 10vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.89) translate(-2vw, 2.2vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  /* Kepler GROWS and spreads apart during zoom-in, fades out by 35% */
  /* Kepler GROWS and spreads apart during zoom-in (2→1), fades out by 35% */
  @keyframes keplerZoomIn {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.15) translate(1vw, -1vh) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(3vw, -3vh) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(3vw, -3vh) translateZ(0);
    }
  }

  /* =========================
       ZOOM 3 PLANET ANIMATIONS (Asteria-9, Dagon)
       ========================= */
  /* Asteria-9 shrink (zoom 2→3 direction, planet shrinks as we zoom out) */
  @keyframes asteriaShrink {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.6) translate(-2vw, -1.5vh) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.4) translate(-1.5vw, -1vh) translateZ(0);
    }
    42% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  /* Asteria-9 grow (zoom 2→3 direction, planet grows as we arrive) */
  @keyframes asteriaGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(3vw, 2vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(3vw, 2vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.1) translate(0.6vw, 0.4vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  /* Asteria-9 zoom-in (zoom 3→2, planet grows & spreads as we zoom back) */
  @keyframes asteriaZoomIn {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.15) translate(-1vw, -0.6vh) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(-3vw, -2vh) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(-3vw, -2vh) translateZ(0);
    }
  }

  /* Dagon shrink (zoom 2→3 direction) */
  @keyframes dagonShrink {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.6) translate(2vw, 1vh) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.4) translate(1.5vw, 0.7vh) translateZ(0);
    }
    42% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  /* Dagon grow (zoom 2→3 direction) */
  @keyframes dagonGrow {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(-4vw, -2vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(-4vw, -2vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.1) translate(-0.8vw, -0.4vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }
  /* Dagon zoom-in (zoom 3→2) */
  @keyframes dagonZoomIn {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.15) translate(1.2vw, 0.5vh) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(4vw, 2vh) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.6) translate(4vw, 2vh) translateZ(0);
    }
  }

  /* =========================
       ZOOM 2 BACKGROUND ANIMATIONS
       ========================= */
  @keyframes zoom2BgGrow {
    0% {
      opacity: 0;
      transform: scale(1.6) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: scale(1.6) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: scale(1.305) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: scale(1.3) translateZ(0);
    }
  }
  /* Zoom2 background GROWS during zoom-in (zooming into it), fades out by 35% */
  /* Zoom2 background GROWS during zoom-in (2→1), fades out by 55% */
  @keyframes zoom2BgZoomIn {
    0% {
      opacity: 1;
      transform: scale(1.3) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: scale(1.4) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: scale(1.6) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: scale(1.6) translateZ(0);
    }
  }
  /* Zoom2 background shrinks when going to zoom 3 */
  @keyframes zoom2BgShrink {
    0% {
      opacity: 1;
      transform: scale(1.3) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: scale(1.3) translateZ(0);
    }
    35% {
      opacity: 0;
      transform: scale(1.05) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: scale(1) translateZ(0);
    }
  }

  /* =========================
       ZOOM 3 BACKGROUND ANIMATIONS
       ========================= */
  /* Zoom3 background grows (entering zoom 3) */
  @keyframes zoom3BgGrow {
    0% {
      opacity: 0;
      transform: scale(1.3) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: scale(1.3) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: scale(1.05) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: scale(1) translateZ(0);
    }
  }
  /* Zoom3 background shrinks/grows during zoom-in (leaving zoom 3) */
  @keyframes zoom3BgZoomIn {
    0% {
      opacity: 1;
      transform: scale(1) translateZ(0);
    }
    8% {
      opacity: 1;
      transform: scale(1.1) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: scale(1.5) translateZ(0);
    }
    100% {
      opacity: 0;
      transform: scale(1.5) translateZ(0);
    }
  }

  /* =========================
       ZOOM 3→2 GROW FROM SMALL ANIMATIONS
       (zoom 2 elements appear small/far then grow to normal)
       ========================= */
  /* Zoom2 background grows from small during zoom 3→2 */
  @keyframes zoom2BgGrowFromSmall {
    0% {
      opacity: 0;
      transform: scale(1) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: scale(1) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: scale(1.25) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: scale(1.3) translateZ(0);
    }
  }

  /* Proxima grows from small/centered during zoom 3→2 */
  @keyframes proximaGrowFromSmall {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.4) translate(1vw, 0.8vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.4) translate(1vw, 0.8vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.95) translate(0.1vw, 0.1vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }

  /* TRAPPIST grows from small/centered during zoom 3→2 */
  @keyframes trappistGrowFromSmall {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.4) translate(-1.2vw, 0.3vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.4) translate(-1.2vw, 0.3vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.95) translate(-0.15vw, 0.05vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }

  /* Kepler grows from small/centered during zoom 3→2 */
  @keyframes keplerGrowFromSmall {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.4) translate(0.8vw, -1vh) translateZ(0);
    }
    55% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.4) translate(0.8vw, -1vh) translateZ(0);
    }
    90% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.95) translate(0.1vw, -0.12vh) translateZ(0);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1) translate(0, 0) translateZ(0);
    }
  }

  /* =========================
       ZOOM ANIMATION TRIGGERS
       ========================= */

  /* -------------------------
     ZOOM 1 → 2 (zooming-out)
     Earth/Mars shrink, zoom2-bg grows, Proxima/Trappist/Kepler grow
     ------------------------- */
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] .map-layer.stars {
    animation: zoom1LayerShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] .map-layer.sun {
    animation: zoom1SunShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] .map-layer.rays {
    animation: zoom1RaysShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] #earthNode {
    animation: earthShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] #marsNode {
    animation: marsShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] .map-layer.zoom2-bg {
    animation: zoom2BgGrow 1000ms linear both !important;
    filter: saturate(0.70) brightness(0.92) contrast(0.98);
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] #proximaNode {
    animation: proximaGrow 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] #trappistNode {
    animation: trappistGrow 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="1"][data-zoom-to="2"] #keplerNode {
    animation: keplerGrow 1000ms linear forwards !important;
  }

  /* -------------------------
     ZOOM 2 → 1 (zooming-in)
     zoom2-bg shrinks, Proxima/Trappist/Kepler shrink, Earth/Mars grow
     ------------------------- */
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] .map-layer.zoom2-bg {
    animation: zoom2BgZoomIn 1000ms linear both !important;
    filter: saturate(0.70) brightness(0.92) contrast(0.98);
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] #proximaNode {
    animation: proximaZoomIn 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] #trappistNode {
    animation: trappistZoomIn 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] #keplerNode {
    animation: keplerZoomIn 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] .map-layer.stars {
    animation: zoom1LayerGrow 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] .map-layer.sun {
    animation: zoom1SunGrow 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] .map-layer.rays {
    animation: zoom1RaysGrow 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] #earthNode {
    animation: earthGrow 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="2"][data-zoom-to="1"] #marsNode {
    animation: marsGrow 1000ms linear both !important;
  }

  /* -------------------------
     ZOOM 2 → 3 (zooming-out)
     Proxima/Trappist/Kepler shrink, zoom2-bg shrinks, zoom3-bg grows, Asteria/Dagon grow
     ------------------------- */
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] #proximaNode {
    animation: proximaShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] #trappistNode {
    animation: trappistShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] #keplerNode {
    animation: keplerShrink 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] .map-layer.zoom2-bg {
    animation: zoom2BgShrink 1000ms linear both !important;
    filter: saturate(0.70) brightness(0.92) contrast(0.98);
  }
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] .map-layer.zoom3-bg {
    animation: zoom3BgGrow 1000ms linear both !important;
    filter: saturate(0.65) brightness(0.88) contrast(1.02);
  }
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] #asteriaNode {
    animation: asteriaGrow 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] #dagonNode {
    animation: dagonGrow 1000ms linear forwards !important;
  }
  /* Keep zoom 1 layers hidden during zoom 2→3 */
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] .map-layer.stars,
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] .map-layer.sun,
  #mapCanvas.zooming-out[data-zoom-from="2"][data-zoom-to="3"] .map-layer.rays {
    opacity: 0 !important;
    animation: none !important;
  }

  /* -------------------------
     ZOOM 3 → 2 (zooming-in)
     Asteria/Dagon shrink, zoom3-bg shrinks, zoom2-bg grows, Proxima/Trappist/Kepler grow
     ------------------------- */
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] #asteriaNode {
    animation: asteriaZoomIn 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] #dagonNode {
    animation: dagonZoomIn 1000ms linear both !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] .map-layer.zoom3-bg {
    animation: zoom3BgZoomIn 1000ms linear both !important;
    filter: saturate(0.65) brightness(0.88) contrast(1.02);
  }
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] .map-layer.zoom2-bg {
    animation: zoom2BgGrowFromSmall 1000ms linear both !important;
    filter: saturate(0.70) brightness(0.92) contrast(0.98);
  }
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] #proximaNode {
    animation: proximaGrowFromSmall 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] #trappistNode {
    animation: trappistGrowFromSmall 1000ms linear forwards !important;
  }
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] #keplerNode {
    animation: keplerGrowFromSmall 1000ms linear forwards !important;
  }
  /* Keep zoom 1 layers hidden during zoom 3→2 */
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] .map-layer.stars,
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] .map-layer.sun,
  #mapCanvas.zooming-in[data-zoom-from="3"][data-zoom-to="2"] .map-layer.rays {
    opacity: 0 !important;
    animation: none !important;
  }



  /* =========================================
     ✅ MAP: Planet Ambient Overlay + Star Tone
     Paste at VERY BOTTOM of CSS
     ========================================= */
  
  /* Ensure mapCanvas can host overlay layers */
  #mapCanvas {
    position: relative;
  }
  
  /* Optional: slightly stronger tint during zoom 1 (helps “where am I?”) */
  #mapCanvas.zoom-1::after {
    opacity: calc(var(--planet-tint-strength, 0.55) + 0.08);
  }
  
  /* Star layer should smoothly shift (you weren’t feeling it because it’s subtle + no transition) */
  #mapCanvas .map-layer.stars {
    transition: filter 240ms ease;
    will-change: filter, opacity;
  }
  
  /* ---------------------------
     Planet colors (your 5)
     --------------------------- */
  
  /* Earth: cool blue */
  #mapCanvas[data-planet="earth"] {
    --planet-tint: rgba(120, 190, 255, 0.14);
    --planet-tint-strength: 0.99;
  }
  #mapCanvas[data-planet="earth"] .map-layer.stars {
    filter: saturate(1.06) brightness(1.02) contrast(1.03);
  }
  
  /* Mars: warm orange */
  #mapCanvas[data-planet="mars"] {
    --planet-tint: rgba(255, 155, 105, 0.16);
    --planet-tint-strength: 0.58;
  }
  #mapCanvas[data-planet="mars"] .map-layer.stars {
    filter: saturate(0.82) brightness(0.90) contrast(1.07);
  }
  
  /* Proxima Centauri b: darker pink / magenta */
  #mapCanvas[data-planet="proxima_centauri_b"] {
    --planet-tint: rgba(210, 90, 170, 0.17);
    --planet-tint-strength: 0.60;
  }
  #mapCanvas[data-planet="proxima_centauri_b"] .map-layer.stars {
    filter: saturate(0.92) brightness(0.92) contrast(1.10) hue-rotate(-6deg);
  }
  
  /* Kepler-186f: warm tan/gold (matches your photo vibe) */
  #mapCanvas[data-planet="kepler_186f"] {
    --planet-tint: rgba(210, 165, 95, 0.18);
    --planet-tint-strength: 0.60;
  }
  #mapCanvas[data-planet="kepler_186f"] .map-layer.stars {
    filter: saturate(0.86) brightness(0.93) contrast(1.08) hue-rotate(6deg);
  }
  
  /* TRAPPIST-1e: cool neutral / smoky (goes with darker rocky photo) */
  #mapCanvas[data-planet="trappist_1e"] {
    --planet-tint: rgba(120, 150, 200, 0.11);
    --planet-tint-strength: 0.56;
  }
  #mapCanvas[data-planet="trappist_1e"] .map-layer.stars {
    filter: saturate(0.78) brightness(0.90) contrast(1.12);
  }
  
  /* ✅ Ambient overlay (controls SIZE + intensity) */
  #mapCanvas::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
  
    background:
      radial-gradient(
        circle at 30% 30%,
        var(--planet-tint, rgba(120,190,255,0.14)),
        rgba(0,0,0,0) var(--tint-radius, 42%)   /* 👈 DIAMETER CONTROL */
      ),
      linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.14));
  
    mix-blend-mode: screen;
    opacity: var(--planet-tint-strength, 0.55);
    transition: opacity 240ms ease, background 240ms ease;
  }
  #mapCanvas[data-planet="earth"] {
    --planet-tint: rgba(120, 190, 255, 0.18);
    --planet-tint-strength: 0.68;  /* more obvious */
    --tint-radius: 90;            /* smaller diameter */
  }
  /* Late fade for sun */
  @keyframes sunFadeLate {
    0% {
      opacity: 1;
    }
    85% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }
  @keyframes planetFadeLate {
    0% {
      opacity: 1;
    }
    80% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }
  #mapCanvas.zooming-out .map-layer.sun {
    animation: sunFadeLate 1200ms linear forwards;
  }
  #mapCanvas.zooming-out .planet-node {
    animation: planetFadeLate 1200ms linear forwards;
  }

  /* Zoom-in: animations control zoom2 opacity (no !important needed now)
     zoom1 stays hidden via base rule until zoom finishes and class changes */
  /* =========================
       INVENTORY UI
       ========================= */
  .inv-section {
    margin-top: 14px;
    width: 100%;
    max-width: 1100px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px;
  }
  .inv-section-title {
    font-weight: 800;
    margin-bottom: 10px;
    opacity: 0.92;
  }
  .inv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    border-radius: 10px;
    margin: 10px 0;
  }
  /* icons */
  .shard-label {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .shard-icon-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .shard-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
  }
  .shard-icon-wrap .fallback-icon {
    display: none;
  }
  .shard-icon-wrap.missing .fallback-icon,
    .fallback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    font-size: 14px;
  }
  .small-muted {
    opacity: 0.7;
    font-size: 12px;
    margin-left: 6px;
  }
  /* Buff box */
  .buff-box {
    display: grid;
    gap: 10px;
  }
  .buff-row {
    display: flex;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    border-radius: 10px;
  }
  /* Crafting panel */
  .craft-panel {
    display: grid;
    gap: 12px;
  }
  .craft-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px;
  }
  .craft-title {
    font-size: 16px;
    font-weight: 800;
  }
  .craft-sub {
    margin-top: 6px;
    opacity: 0.8;
    font-size: 13px;
  }
  .craft-grid {
    margin-top: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .craft-cell {
    background: rgba(0,0,0,0.20);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px;
  }
  .craft-cell-title {
    font-weight: 800;
  }
  .craft-cell-sub {
    margin-top: 4px;
    opacity: 0.78;
    font-size: 12px;
  }
  .craft-progress {
    margin-top: 10px;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
  }
  .craft-progress-bar {
    height: 100%;
    width: 0%;
    background: rgba(34,197,94,0.55);
  }
  .craft-count {
    margin-top: 8px;
    opacity: 0.9;
  }
  .craft-btn {
    margin-top: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.10);
    color: white;
  }
  .craft-btn:hover {
    background: rgba(255,255,255,0.16);
  }
  .craft-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  
  /* =========================
       BANK UI
       ========================= */
  .bank-list {
    width: 100%;
    max-width: 820px;
    margin-top: 16px;
  }
  .bank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
  }
  .bank-name {
    font-size: 18px;
    font-weight: bold;
  }
  .bank-sub {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
  }
  .bank-sell {
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.10);
    color: white;
  }
  .bank-sell:hover {
    background: rgba(255,255,255,0.16);
  }
  .bank-sell:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  /* =========================
       VESSEL UI
       ========================= */
  .vessel-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    max-width: 980px;
  }
  .vessel-left {
    flex: 1;
    min-width: 360px;
  }
  #vesselPage .vessel-card {
    margin: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
    overflow: hidden;
  }
  .vessel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }
  .vessel-title {
    font-size: 20px;
    font-weight: bold;
  }
  .vessel-price {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
  }
  .vessel-buy {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.12);
    color: white;
  }
  .vessel-buy:hover {
    background: rgba(255,255,255,0.18);
  }
  .vessel-buy:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .vessel-stats {
    margin-top: 14px;
    display: grid;
    gap: 8px;
  }
  .vessel-stat {
    display: flex;
    justify-content: space-between;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    border-radius: 10px;
  }
  .vessel-stat span {
    opacity: 0.85;
  }
  .vessel-owned {
    margin-top: 12px;
    font-size: 13px;
    opacity: 0.85;
    text-align: center;
  }
  /* Fuel Dock */
  .fuel-dock {
    width: 320px;
    max-width: 100%;
    margin-top: 18px;
    margin-left: auto;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
  }
  .fuel-title {
    font-size: 18px;
    font-weight: bold;
  }
  .fuel-sub {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 6px;
  }
  .fuel-row {
    margin-top: 14px;
    display: grid;
    gap: 8px;
  }
  .fuel-row label {
    font-size: 13px;
    opacity: 0.85;
  }
  .fuel-row input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    color: white;
    outline: none;
  }
  .fuel-input-row select {
    width: 90px;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
    color: white;
    outline: none;
  }
  .fuel-quote {
    margin-top: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    border-radius: 10px;
  }
  .fuel-buy {
    width: 100%;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.12);
    color: white;
  }
  .fuel-buy:hover {
    background: rgba(255,255,255,0.18);
  }
  .fuel-buy:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .fuel-owned {
    margin-top: 12px;
    font-size: 13px;
    opacity: 0.85;
  }
  /* =========================
       PLANET PAGE
       ========================= */
  #planetPage {
    position: relative;
    overflow: hidden;
    --planet-bg: url("assets/mining_strips/sky.png");
    justify-content: flex-start;
  }
  /* Background strip */
  .mining-bg-strip {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 100%;
    object-fit: cover;
    object-position: right bottom;
    z-index: -2;
    pointer-events: none;
    user-select: none;
  }
  /* background layer */
  #planetPage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--planet-bg);
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    z-index: -2;
    pointer-events: none;
  }
  .planet-left,
  .planet-right {
    z-index: 2;
  }
  /* Foreground UI */
  .planet-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    padding: 24px;
  }
  #energyContainer {
    width: 300px;
    height: 18px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
  }
  #energyBar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
  }
  .energy-regen {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 6px;
  }
  #mineBtn {
    z-index: 2;
  }
  .shard-text {
    margin: 10px 0;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .shard-text.show {
    opacity: 1;
  }
  /* Cargo */
  .cargo-card {
    width: 100%;
    max-width: 820px;
    margin-top: 18px;
    background: rgb(20, 22, 37);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
  }
  .cargo-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .cargo-title {
    font-size: 16px;
    font-weight: bold;
  }
  .cargo-cap {
    font-size: 13px;
    opacity: 0.85;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 6px 10px;
    border-radius: 999px;
  }
  .cargo-sub {
    margin-top: 12px;
    font-size: 13px;
    opacity: 0.75;
  }
  .cargo-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 8px;
    /* SCROLLABLE */
    max-height: 240px; /*calc(100vh - 320px); */
    padding-right: 6px;  /* hide scrollbar */
    overflow-y: auto;   
    overflow-x: hidden;
  }
  .cargo-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    border-radius: 10px;
  }
  .cargo-list::-webkit-scrollbar {
    display: none;  /* hide scroll bar on Chrome, Safari */
  }
  .cargo-empty {
    opacity: 0.7;
  }
  /* Disabled / Locked */
  .blurred {
    filter: blur(0.18px);
    opacity: 0.90;
    pointer-events: none;
  }
  .ZiggieBtn {
    font-size: 12px;
    width: 20%;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    background: rgba(34,197,94,0.25);
    border: 1px solid rgba(34,197,94,0.45);
    max-width: 200px;
  }
  .ZiggieBtn:hover {
    background: rgba(34,197,94,0.35);
  }
  /* =========================
       MODAL
       ========================= */
  .modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
  }
  .modal-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  }
  .modal-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
  }
  .modal-text {
    margin-top: 10px;
    opacity: 0.9;
    line-height: 1.45;
  }
  .modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  .modal-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.12);
    color: white;
  }
  .modal-btn:hover {
    background: rgba(255,255,255,0.18);
  }
  .modal-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .modal-btn.primary {
    background: rgba(34,197,94,0.25);
    border: 1px solid rgba(34,197,94,0.45);
  }
  .modal-btn.primary:hover {
    background: rgba(34,197,94,0.35);
  }
  
  /* ===== Mine button + progress bar (fix alignment) ===== */
  #mineBtn {
    margin-bottom: 16px;
  }
  #mineProgress {
    left: 0;
    top: 0;
  }
  #mineBtn + * {
    margin-top: 14px;
  }
  /* =========================
       MINING AREA FIX
       ========================= */
  .mine-button-container {
    position: relative;
    width: 220px;
    margin-top: 18px;
    margin-bottom: 22px;
  }

  #mineBtn {
    position: relative;
    display: block;
    width: 100%;
    height: 46px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: white;
    border: none;
    cursor: pointer;
  }
  #mineProgress {
    position: absolute;
    inset: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, gold, orange);
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
  }
  #mineBtnText {
    position: relative;
    z-index: 1;
  }
  /* =======================
       RARITY DOT
       ======================= */
  .rarity-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 8px;
    flex-shrink: 0;
  }
  .drop-left {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .inv-left {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  @media (max-width: 1100px) {
    .vessel-layout {
      flex-wrap: wrap;
    }
    .vessel-left,
      .fuel-dock {
      width: 100%;
      max-width: 980px;
    }
    .fuel-dock {
      margin-left: 0;
    }
  }
  /* =========================
       DASH GRID
       ========================= */
  .dash {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 22px;
    gap: 14px;
    align-items: start;
  }
  .dash-card {
    grid-column: var(--x) / span var(--w);
    grid-row: var(--y) / span var(--h);
  }
  .dash--vessel {
    margin-top: 18px;
  }
  .dash-card > .vessel-card,
    .dash-card > .fuel-dock {
    width: 100%;
    max-width: none;
  }
  .dash-card {
    overflow: hidden;
  }
  .fuel-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }
  .fuel-input-row input {
    flex: 1;
    min-width: 0;
  }
  .fuel-input-row select {
    flex: 0 0 90px;
  }
  .dash-card .vessel-card,
    .dash-card .fuel-dock {
    width: 100% !important;
    max-width: none !important;
  }
  /* =========================
       VESSEL IMAGE
       ========================= */
  .vessel-media {
    margin-top: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  #vesselShopList {
    display: grid;
    gap: 18px;
  }
  /* =========================
       âœ… NEW: VESSEL SHOP BADGES
       ========================= */
  .vessel-pill-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
  }
  .vessel-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    opacity: 0.92;
  }
  .vessel-pill.active {
    background: rgba(34,197,94,0.18);
    border: 1px solid rgba(34,197,94,0.35);
  }
  .vessel-secondary-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.10);
    color: white;
  }
  .vessel-secondary-btn:hover {
    background: rgba(255,255,255,0.16);
  }
  .vessel-secondary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }
  /* =========================
       NEW VESSEL SHOP LAYOUT
       (Fuel across top + vessel grid)
       ========================= */
  .vessel-shop {
    width: 100%;
    max-width: 1100px;
    display: grid;
    gap: 18px;
  }
  .full-width {
    max-width: none !important;
    width: 100%;
  }
  /* Fuel dock across top */
  .fuel-dock--wide {
    width: 100%;
    max-width: none !important;
  }
  /* Vessel grid: 3 columns on desktop, 2 on medium, 1 on mobile */
  .vessel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 18px;
    width: 100%;
  }
  /* Each vessel card should NOT be super wide anymore */
  .vessel-card {
    max-width: none;
    width: 100%;
  }
  /* Responsive breakpoints */
  @media (max-width: 1100px) {
    .vessel-grid {
      grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
  }
  @media (max-width: 760px) {
    .vessel-grid {
      grid-template-columns: 1fr;
    }
  }
 /* Allow tooltips to escape the card */
#vesselPage .vessel-card {
  overflow: visible;
}

  /* Make the grid always give enough vertical room */
  .vessel-grid {
    align-items: stretch;
  }
  /* =========================
       âœ… VESSEL PAGE FIX: stop dash-grid row clipping
       ========================= */
  /* The vessel page should NOT use the 22px-row dash grid behavior */
  #vesselPage .dash {
    display: block !important;
    max-width: none !important;
    width: 100%;
  }
  /* Make the vessel page shop layout control spacing */
  #vesselPage .dash-card {
    overflow: visible !important;
    background: transparent;
    border: none;
    padding: 0;
  }
  /* âœ… FINAL: Vessel image sizing (paste at VERY bottom) */
  #vesselPage .vessel-media {
    width: 100%;
    margin-top: 12px;
    display: flex;
    justify-content: center;
  }
  /* âœ… Glow behind vessel PNG (Option #1) */
  #vesselPage .vessel-media {
    position: relative;
    z-index: 0;
  }
  #vesselPage .vessel-media::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(
        circle,
        rgba(90, 180, 255, 0.14),
        rgba(90, 180, 255, 0.06),
        transparent 70%
      );
    filter: blur(22px);
    z-index: 0;
    pointer-events: none;
  }
  #vesselPage .vessel-media .vessel-img {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.45));
  }
  #vesselPage .vessel-media img {
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    display: block;
  }
  /* âœ… FIX: stop vessel cards from overflowing into other columns */
  #vesselPage *, 
    #vesselPage *::before, 
    #vesselPage *::after {
    box-sizing: border-box;
  }
  /* Make sure grid columns can shrink properly */
  #vesselPage .vessel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Make each card allowed to shrink (prevents column overlap) */
  #vesselPage .vessel-grid > * {
    min-width: 0;
  }
  #vesselPage .vessel-card {
    min-width: 0;
    width: 100%;
  }
  /* =========================
       âœ… TRAVEL OVERLAY (post-confirm travel)
       ========================= */
  .travel-overlay {
    position: absolute;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    pointer-events: auto;
  }
  .travel-overlay-card {
    width: min(520px, 92vw);
    border-radius: 18px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 18px 44px rgba(0,0,0,0.45);
    display: grid;
    gap: 12px;
  }
  .travel-overlay-vessel {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.45))
        drop-shadow(0 0 18px rgba(110, 200, 255, 0.18))
        drop-shadow(0 0 42px rgba(110, 200, 255, 0.10));
  }
  .travel-overlay-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.2px;
    opacity: 0.95;
  }
  .travel-overlay-meta {
    display: grid;
    gap: 8px;
    margin-top: 4px;
  }
  .travel-overlay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
  }
  .travel-overlay-row .k {
    opacity: 0.78;
    font-weight: 700;
    font-size: 13px;
  }
  .travel-overlay-row .v {
    opacity: 0.95;
    font-size: 13px;
  }
  .travel-overlay-progress {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.12);
  }
  .travel-overlay-progress-bar {
    height: 100%;
    width: 0%;
    background: rgba(34,197,94,0.55);
    transition: width 200ms linear;
  }
  .travel-overlay-status {
    opacity: 0.85;
    font-size: 13px;
    padding: 6px 2px;
  }
  .travel-overlay-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 2px;
  }
  .travel-overlay-cancel {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.10);
    color: white;
    cursor: pointer;
  }
  .travel-overlay-cancel:hover {
    background: rgba(255,255,255,0.16);
  }
  /* =========================
       âœ… FIX: COMMS should NEVER push layout
       (take it out of flow + lock size)
       ========================= */
  /* Make likely travel UI containers "position:relative" so abs children anchor correctly */
  #travelOverlay,
    #travelHud,
    #travelUI,
    .travel-overlay,
    .travel-hud,
    .travel-ui,
    .travel-panel,
    .travel-card,
    .travel-wrap,
    .map-canvas {
    position: relative;
  }
  /* Target the comms box/card itself (broad selectors) */
  #commsBox,
    #commsPanel,
    #commsCard,
    .comms-box,
    .comms-panel,
    .comms-card,
    .travel-comms {
    position: absolute !important;
    left: 24px;
    bottom: 24px;
    width: 360px;
    max-width: 40vw;
    height: 128px;
    max-height: 128px;
    overflow: hidden;
    flex: 0 0 auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
  }
  /* Keep the text wrapping INSIDE the fixed box */
  #commsText,
    #commsQuote,
    .comms-text,
    .comms-quote {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
  }
  /* Optional: clamp to 3 lines for a super stable look */
  #commsText,
    #commsQuote,
    .comms-text,
    .comms-quote {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* =========================
       âœ… LOCATION HUD (bottom-left)
       ========================= */
  .location-hud {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 16px 40px rgba(0,0,0,0.40);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0.96;
    transform: translateZ(0);
    will-change: transform, opacity;
  }
  .location-hud::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 20%,
        rgba(255,255,255,0.10),
        rgba(255,255,255,0.00) 55%);
    pointer-events: none;
  }
  .location-hud__planet {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    overflow: hidden;
    flex: 0 0 auto;
  }
  .location-hud__planet img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
  }
  .location-hud__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
  }
  .location-hud__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 900;
    letter-spacing: 0.2px;
    font-size: 14px;
    opacity: 0.96;
  }
  .location-hud__pin {
    opacity: 0.9;
  }
  .location-hud__sub {
    font-size: 11px;
    opacity: 0.78;
  }
  /* ✅ Compact mode when traveling - smaller padding, centered fuel */
  .location-hud--compact {
    padding: 10px 16px !important;
    min-width: auto !important;
  }
  .location-hud--compact .location-hud__meta {
    min-width: auto !important;
  }
  .location-hud--compact .location-hud__fuel {
    justify-content: center;
  }
  /* Optional polish: slightly dim it when travel overlay is visible */
  #travelOverlay[style*="display: block"] ~ .location-hud,
    #travelOverlay[style*="display:flex"] ~ .location-hud {
    opacity: 0.35;
  }
  /* =========================
       ARTIFACTS PAGE LAYOUT
       ========================= */
  #artifactsPage {
    height: 100%;
  }
  .artifacts-layout {
    height: max-content;
    display: grid;
    grid-template-columns: 420px 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 18px;
    align-items: start;
  }
  /* Top bar spans full width */
  .artifacts-top {
    grid-column: 1 / -1;
  }
  .artifacts-mid {
    grid-column: 1 / -1;
  } 
  /* Left / Right panels */
  .artifacts-left {
    grid-column: 1;
    grid-row: 3;
  }
  .artifacts-right {
    grid-column: 2;
    grid-row: 3;
  }
  /* Make these look like your dash-cards */
  .artifacts-top,
    .artifacts-left,
    .artifacts-right {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  }
  /* Scroll behavior */
  .artifacts-left,
    .artifacts-right {
    overflow: auto;
    max-height: 100%;
  }
  /* Equipped artifacts should flow horizontally */
  .buff-box--row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch;
  }
  /* Artifacts list */
  .artifact-list {
    display: grid;
    gap: 10px;
  }
  .artifact-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px;
  }
  .artifact-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }
  .artifact-title {
    font-size: 16px;
    font-weight: 800;
  }
  .artifact-sub {
    margin-top: 6px;
    opacity: 0.82;
    font-size: 13px;
  }
  .artifact-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .artifact-btn {
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.10);
    color: white;
  }
  .artifact-btn:hover {
    background: rgba(255,255,255,0.16);
  }
  .artifact-btn.primary {
    background: rgba(34,197,94,0.25);
    border: 1px solid rgba(34,197,94,0.45);
  }
  .artifact-btn.primary:hover {
    background: rgba(34,197,94,0.35);
  }
  .artifact-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
  }
  .artifact-btn-delete {
    background: rgba(220, 38, 38, 0.15);
    color: rgba(248, 113, 113, 0.95);
    border: 1px solid rgba(220, 38, 38, 0.25);
    font-size: 0.9em;
  }
  .artifact-btn-delete:hover {
    background: rgba(220, 38, 38, 0.25);
    color: rgba(252, 165, 165, 1);
    border-color: rgba(220, 38, 38, 0.45);
  }
  .stat-box-grid {
    display: flex;
    gap: 1rem;
    width: 100%;
  }
  .stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 16px; /* Increased vertical padding */
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
  }
  .stat-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center; /* Center the text */
    flex: 1;
  }
  .stat-item-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
  }
  .stat-item-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
  }
  /* Optional: make each equipped item compact if your JS outputs big rows 
  .buff-box--row > * {
    flex: 0 0 auto;
  } */
  /* zoom2 bg now animates during zoom - controlled by keyframes */
  /* =========================
       âœ… FIX (surgical): keep Cargo Hold narrow even when empty
       (does NOT change overall layout)
       ========================= */
  #planetPage .planet-right {
    display: flex;
    justify-content: flex-start; 
  }
  #planetPage .cargo-card {
    margin-top: 0;
    width: 520px;
    max-width: 520px;
    flex: 0 0 520px;
  }
  /* mobile: allow it to be full width */
  @media (max-width: 980px) {
    #planetPage .cargo-card {
      width: 100%;
      max-width: 820px;
      flex: 0 0 auto;
    }
  }
  #mineProgress {
    will-change: width;
  }
  /* Travel vessel FX */
  #travelOverlayVesselImg.travel-overlay-vessel {
    transform: translateZ(0);
  }
  #travelOverlayVesselImg.travel-overlay-vessel {
    animation: travelVesselPulse 2.4s ease-in-out infinite;
  }
  @keyframes travelVesselPulse {
    0%, 100% {
      filter: drop-shadow(0 12px 28px rgba(0,0,0,0.45))
          drop-shadow(0 0 16px rgba(110, 200, 255, 0.18))
          drop-shadow(0 0 34px rgba(110, 200, 255, 0.10));
    }
    50% {
      filter: drop-shadow(0 14px 30px rgba(0,0,0,0.48))
          drop-shadow(0 0 22px rgba(110, 200, 255, 0.26))
          drop-shadow(0 0 52px rgba(110, 200, 255, 0.16));
    }
  }
  #travelOverlayVesselImg.travel-overlay-vessel {
    filter: drop-shadow(0 10px 100px rgba(0,0,0,0.45))
        drop-shadow(0 0 12px rgba(110, 200, 255, 0.10))
        drop-shadow(0 0 28px rgba(110, 200, 255, 0.06)) !important;
  }
  /* =========================
       âœ… ANOMALIES
       ========================= */
  .anomaly-node {
    position: absolute;
    transform: translate(-50%, -50%) translateZ(0);
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 12;
    filter: drop-shadow(0 0 12px rgba(140, 90, 255, 0.55));
    transition: transform 0.18s ease, filter 0.18s ease, opacity 260ms ease;
  }
  .anomaly-node:hover {
    transform: translate(-50%, -50%) scale(1.12) translateZ(0);
    filter: drop-shadow(0 0 18px rgba(160, 120, 255, 0.75));
  }
  .anomaly-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    pointer-events: none;
    display: block;
  }
  .anomaly-fallback {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    font-size: 28px;
    border-radius: 16px;
    background: rgba(160,120,255,0.10);
    border: 1px solid rgba(160,120,255,0.22);
  }
  .anomaly-label {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.60);
    border: 1px solid rgba(255,255,255,0.12);
    opacity: 0;
    pointer-events: none;
    font-size: 12px;
  }
  .anomaly-node:hover .anomaly-label {
    opacity: 1;
  }

  /* =========================
       ✅ CELESTIAL BOOSTS (Artifact Tab)
       ========================= */
  .artifacts-celestial-boosts {
    margin-top: 8px;
    margin-bottom: 4px;
    grid-column: 1 / -1;
  }
  .celestial-boosts-grid {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;            /* Firefox */
    -ms-overflow-style: none;         /* IE/Edge */
  }
  .celestial-boosts-grid::-webkit-scrollbar {
    display: none;                    /* Chrome/Safari */
  }
  .celestial-boost-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 10px;
    min-width: 0;
    flex: 1 1 0;
    min-width: 200px;
    text-align: left;
    white-space: nowrap;
  }
  .celestial-boost--pending {
    background: rgba(255, 180, 60, 0.08);
    border: 1px solid rgba(255, 180, 60, 0.22);
  }
  .celestial-boost--active {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.30);
  }
  .celestial-boost-mult {
    font-size: 15px;
    font-weight: 900;
    color: #ffb43c;
    flex-shrink: 0;
  }
  .celestial-boost--active .celestial-boost-mult {
    color: #22c55e;
  }
  .celestial-boost-planet {
    font-size: 11px;
    opacity: 0.8;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .celestial-boost-status-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
  }
  .celestial-boost-active-label {
    font-size: 11px;
    font-weight: 800;
    color: #22c55e;
    letter-spacing: 0.04em;
  }
  .celestial-boost-timer {
    font-size: 10px;
    opacity: 0.65;
    font-family: 'Courier New', monospace;
    flex-shrink: 0;
  }
  .celestial-boost-activate-btn {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 180, 60, 0.35);
    background: rgba(255, 180, 60, 0.15);
    color: white;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
  }
  .celestial-boost-activate-btn:hover {
    background: rgba(255, 180, 60, 0.30);
  }

  /* =========================
       ✅ CELESTIAL EVENT
       ========================= */
  .celestial-event-node {
    position: absolute;
    transform: translate(-50%, -50%) translateZ(0);
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 12;
    transition: transform 0.18s ease, filter 0.18s ease, opacity 260ms ease;
  }
  .celestial-event-node:hover {
    transform: translate(-50%, -50%) scale(1.12) translateZ(0);
  }
  .celestial-event-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    pointer-events: none;
    display: block;
    filter: drop-shadow(0 0 14px rgba(255, 180, 60, 0.55));
    animation: celestialPulse 3s ease-in-out infinite;
  }
  .celestial-event-node:hover .celestial-event-img {
    filter: drop-shadow(0 0 22px rgba(255, 200, 80, 0.80));
  }
  @keyframes celestialPulse {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(255, 180, 60, 0.55)); }
    50%      { filter: drop-shadow(0 0 22px rgba(255, 210, 90, 0.75)); }
  }
  .celestial-event-label {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.60);
    border: 1px solid rgba(255,180,60,0.18);
    opacity: 0;
    pointer-events: none;
    font-size: 12px;
    color: #ffb43c;
  }
  .celestial-event-node:hover .celestial-event-label {
    opacity: 1;
  }

  /* Timer text positioned below the PNG — free-floating, no background */
  .celestial-timer-badge {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.85);
    background: none;
    border: none;
    padding: 0;
    pointer-events: none;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  }

  /* Hide celestial node on zoom 2, zoom 3, and during transitions */
  #mapCanvas.zoom-2 .celestial-event-node,
  #mapCanvas.zoom-3 .celestial-event-node,
  #mapCanvas.zooming-out .celestial-event-node,
  #mapCanvas.zooming-in .celestial-event-node {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* ✅ Make the intercept zone readable without washing out text */
  .travel-intercept-zone {
    opacity: 1;
  }
  /* âœ… Make sure the actual progress UI sits above the danger zone */
  /* =========================
       âœ… INTERCEPT ZONE (NO JITTER)
       - Tape is STATIC (no shimmer)
       - Glow pulse is on a separate overlay
       ========================= */
  .travel-intercept-zone {
    position: absolute;
    left: 10%;
    width: 20%;
    top: 0;
    height: 100%;
    border-radius: 999px;
    pointer-events: none;
    background: repeating-linear-gradient(
        135deg,
        rgba(255,140,110,0.22) 0px,
        rgba(255,140,110,0.22) 10px,
        rgba(255,140,110,0.08) 10px,
        rgba(255,140,110,0.08) 20px
      );
    border-left: 1px solid rgba(255,160,130,0.55);
    border-right: 1px solid rgba(255,160,130,0.55);
    box-shadow: inset 0 0 0 1px rgba(255,160,130,0.18);
    transform: translateZ(0);
    backface-visibility: hidden;
  }
  /* glow overlay (THIS is what pulses, not the stripes) */
  .travel-intercept-zone::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255,120,90,0.22),
        rgba(255,120,90,0.08) 55%,
        rgba(255,120,90,0.00) 75%
      );
    filter: blur(10px);
    opacity: 0.90;
    transform: scale(0.98);
    will-change: transform, opacity;
  }
  /* slower + smoother pulse */
  /* Only pulse when JS adds .pulsing */
  .travel-intercept-zone.pulsing::after {
    animation: interceptGlowPulse 2.8s ease-in-out infinite;
  }
  @keyframes interceptGlowPulse {
    0%, 100% {
      opacity: 0.48;
      transform: scale(0.98);
    }
    50% {
      opacity: 0.72;
      transform: scale(1.03);
    }
  }
  /* keep progress UI above the zone */
  .travel-overlay-progress,
    .travel-overlay-progress-bar {
    position: relative;
    z-index: 5;
  }
  /* Planet tooltip status colors */
  .planet-label .planet-status {
    color: rgba(239, 68, 68, 0.90);
    font-weight: 700;
  }
  /* When JS adds the "discovered" class, turn it blue */
  .planet-label .planet-status.discovered {
    color: rgba(96, 165, 250, 0.95);
  }
  /* Home label (Earth only) */
  .planet-label .planet-status.home {
    color: rgba(34, 197, 94, 0.95);
    font-weight: 700;
  }
  .ZiggieBtn {
    font-size: 14px;
    width: 100%;
    text-align: center;
    padding: 2px 2px;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    background: rgba(34,197,94,0.25);
    border: 1px solid rgba(34,197,94,0.45);
  }
  .ZiggieBtn:hover {
    background: rgba(34,197,94,0.35);
  }
  /* =========================
       MARKET TERMINAL (VIDEO-GAME UI)
       ========================= */
  /* Buy button: action left, price right */
  #marketPage .mkt-btn--buy {
    width: 180px; /* 👈 SAME WIDTH FOR ALL BUY BUTTONS */
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  /* Left text */
  #marketPage .mkt-btn-action {
    font-size: 12.5px;
    font-weight: 700;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Right price (visual priority) */
  #marketPage .mkt-btn-price {
    font-size: 15px;
    font-weight: 900;
    color: rgba(255, 216, 107, 0.95); /* money color */
  }
      
  #marketPage {
    padding: 18px 18px 22px 18px;
  }
  #marketPage .market-terminal {
    width: 100%;
    min-height: calc(100vh - 120px);
    border-radius: 18px;
    padding: 18px;
    background: radial-gradient(1200px 500px at 20% 10%, rgba(82, 196, 255, 0.10), transparent 60%),
        radial-gradient(900px 500px at 90% 25%, rgba(255, 125, 90, 0.08), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
  }
  #marketPage .market-topbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
  }
  #marketPage .market-title {
    flex: 1;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
  }
  #marketPage .market-title-kicker {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
  }
  #marketPage .market-title-main {
    font-size: 28px;
    font-weight: 800;
    margin-top: 4px;
  }
  #marketPage .market-title-sub {
    font-size: 13px;
    opacity: 0.78;
    margin-top: 6px;
    max-width: 70ch;
  }
  #marketPage .market-wallet {
    width: 280px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  #marketPage .market-wallet-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.72;
  }
  #marketPage .market-wallet-value {
    font-size: 26px;
    font-weight: 900;
    margin-top: 4px;
  }
  #marketPage .market-wallet-sub {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.72;
  }
  #marketPage .market-earthonly {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 120, 95, 0.12);
    border: 1px solid rgba(255, 120, 95, 0.22);
    opacity: 0.95;
    margin-bottom: 14px;
  }
  @media (max-width: 1200px) {
    #marketPage .market-grid {
      grid-template-columns: 1fr;
    }
    #marketPage .market-wallet {
      width: 100%;
    }
    #marketPage .market-topbar {
      flex-direction: column;
    }
  }
  #marketPage .market-card {
    border-radius: 16px;
    padding: 14px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 260px;
  }
  #marketPage .market-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  #marketPage .market-card-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }
  #marketPage .market-card-chip {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(82, 196, 255, 0.10);
    border: 1px solid rgba(82, 196, 255, 0.18);
    opacity: 0.9;
  }
  #marketPage .market-item {
    display: flex;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
  }
  #marketPage .market-item-ico {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    font-weight: 900;
    opacity: 0.9;
  }
  #marketPage .market-item-body {
    flex: 1;
    min-width: 0;
  }
  #marketPage .market-item-name {
    font-size: 14px;
    font-weight: 800;
  }
  #marketPage .market-item-desc {
    font-size: 12px;
    opacity: 0.78;
    margin-top: 4px;
    line-height: 1.35;
  }
  #marketPage .market-item-meta {
    font-size: 12px;
    opacity: 0.78;
    margin-top: 8px;
  }
  #marketPage .market-dot {
    opacity: 0.55;
    margin: 0 6px;
  }
  #marketPage .market-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
  }
  #marketPage .mkt-btn {
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    color: inherit;
    cursor: pointer;
    font-weight: 700;
    transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
    min-width: 140px;
  }
  #marketPage .mkt-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
  }
  #marketPage .mkt-btn:active {
    transform: translateY(0px);
    filter: brightness(0.98);
  }
  #marketPage .mkt-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
  }
  #marketPage .mkt-btn--primary {
    background: linear-gradient(180deg, rgba(82,196,255,0.24), rgba(82,196,255,0.12));
    border-color: rgba(82, 196, 255, 0.28);
  }
  #marketPage .market-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  #marketPage .market-panel {
    border-radius: 14px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
  }
  #marketPage .market-panel-label {
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    opacity: 0.70;
  }
  #marketPage .market-panel-value {
    font-size: 16px;
    font-weight: 900;
    margin-top: 6px;
  }
  #marketPage .market-panel-sub {
    font-size: 12px;
    opacity: 0.78;
    margin-top: 4px;
    line-height: 1.35;
  }
  #marketPage .market-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  #marketPage .market-hint {
    font-size: 12px;
    opacity: 0.72;
  }
  #marketPage .market-energy-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  #marketPage .market-tierbar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    overflow: hidden;
  }
  #marketPage .market-tierbar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(82,196,255,0.85), rgba(0,0,0,0));
  }
  /* Market: side-by-side layout like Inventory */
  #marketPage .market-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    width: 100%;
  }
  /* Mobile */
  @media (max-width: 700px) {
    #marketPage .market-grid {
      grid-template-columns: 1fr;
    }
  }
  .vessel-stat span {
  opacity: 0.85;
}
/* =========================
   ✅ VESSEL EFFICIENCY TOOLTIP
   (for .tip-wrap / .tip-icon / .tip-box added in vessel.js)
   ========================= */

/* Make stat row an anchor for absolute tooltip positioning */
#vesselPage .vessel-stat {
  position: relative;
}

/* Info button styling */
#vesselPage .info-btn {
  margin-left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Tooltip base (hidden) */
#vesselPage .vessel-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 50px);   /* places it ABOVE the row */
  transform: translateX(-50%);
  width: min(520px, 92vw);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,0.82);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  z-index: 9999;

  display: none;               /* hidden until .open */
}

/* Show when open */
#vesselPage .vessel-tooltip.open {
  display: block;
}

/* Little arrow pointing down to the row */
#vesselPage .vessel-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: rgba(0,0,0,0.82);
  border-right: 1px solid rgba(255,255,255,0.14);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

/* Optional: tighten tooltip text */
#vesselPage .tooltip-title { font-weight: 900; margin-bottom: 6px; opacity: 0.95; }
#vesselPage .tooltip-line  { opacity: 0.88; margin-top: 4px; }
#vesselPage .tooltip-foot  { opacity: 0.70; margin-top: 8px; font-size: 12px; }
/* ✅ Vessel tooltip must not be clipped */
#vesselPage .vessel-card { overflow: visible !important; }
#vesselPage .vessel-stats { overflow: visible !important; }
#vesselPage .vessel-stat { overflow: visible !important; }

/* ✅ Make the efficiency row a positioning anchor */
#vesselPage .vessel-stat--eff { position: relative; }

/* ✅ Place tooltip centered and ABOVE the row */
#vesselPage .vessel-stat--eff .vessel-tooltip {
  left: 50%;
  bottom: calc(100% + 12px);
  top: auto;
  transform: translateX(-50%);
}
/* =========================
   ✅ VESSEL TOOLTIP — smaller, lighter, edge-safe
   Paste at VERY BOTTOM of CSS
   ========================= */

/* Make sure nothing clips the tooltip */
#vesselPage .vessel-card,
#vesselPage .vessel-stats,
#vesselPage .vessel-stat {
  overflow: visible !important;
}

/* Tooltip base */
#vesselPage .vessel-stat--eff { position: relative; }

#vesselPage .vessel-tooltip{
  /* sizing */
  width: 360px;
  max-width: min(360px, calc(100vw - 32px)); /* never exceed viewport */
  padding: 10px 12px;
  border-radius: 12px;

  /* lighter look */
  background: rgba(15, 23, 42, 0.90); /* less black */
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  /* text */
  color: rgba(255,255,255,0.92);
  font-size: 12px;
  line-height: 1.35;

  /* position above row */
  position: absolute;
  bottom: calc(100% + 12px);
  top: auto;

  /* default: centered */
  left: 50%;
  transform: translateX(-50%);

  z-index: 9999;
}

/* Title a bit smaller/tighter */
#vesselPage .tooltip-title{
  font-weight: 900;
  margin-bottom: 6px;
  opacity: 0.96;
  font-size: 13px;
}

#vesselPage .tooltip-line{
  margin-top: 4px;
  opacity: 0.88;
}

#vesselPage .tooltip-foot{
  margin-top: 8px;
  opacity: 0.70;
  font-size: 11px;
}

/* Arrow */
#vesselPage .vessel-tooltip::after{
  content:"";
  position:absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: rgba(15, 23, 42, 0.90);
  border-right: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

/* =========================
   ✅ EDGE SAFE: if the card is near edges,
   stop centering and anchor to the inside
   ========================= */

/* cards in LEFT column: anchor tooltip to left side of row */
#vesselPage .vessel-grid > :nth-child(3n + 1) .vessel-stat--eff .vessel-tooltip{
  left: 0;
  transform: none;
}
#vesselPage .vessel-grid > :nth-child(3n + 1) .vessel-stat--eff .vessel-tooltip::after{
  left: 26px; /* arrow aligns roughly under icon */
  transform: rotate(45deg);
}

/* cards in RIGHT column: anchor tooltip to right side of row */
#vesselPage .vessel-grid > :nth-child(3n) .vessel-stat--eff .vessel-tooltip{
  left: auto;
  right: 0;
  transform: none;
}
#vesselPage .vessel-grid > :nth-child(3n) .vessel-stat--eff .vessel-tooltip::after{
  left: auto;
  right: 26px;
  transform: rotate(45deg);
}

/* On 2-column layout (<=1100px), adjust edge rules */
@media (max-width: 1100px){
  #vesselPage .vessel-grid > :nth-child(2n + 1) .vessel-stat--eff .vessel-tooltip{
    left: 0;
    right: auto;
    transform: none;
  }
  #vesselPage .vessel-grid > :nth-child(2n + 1) .vessel-stat--eff .vessel-tooltip::after{
    left: 26px;
    right: auto;
    transform: rotate(45deg);
  }

  #vesselPage .vessel-grid > :nth-child(2n) .vessel-stat--eff .vessel-tooltip{
    right: 0;
    left: auto;
    transform: none;
  }
  #vesselPage .vessel-grid > :nth-child(2n) .vessel-stat--eff .vessel-tooltip::after{
    right: 26px;
    left: auto;
    transform: rotate(45deg);
  }
}

/* On mobile (1 column): just center again */
@media (max-width: 760px){
  #vesselPage .vessel-stat--eff .vessel-tooltip{
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  #vesselPage .vessel-stat--eff .vessel-tooltip::after{
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(45deg);
  }
}
.trophy-odds {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}
#missionsWrap {
  max-height: calc(100vh - 120px); /* adjust if you have headers */
  overflow-y: auto;
  padding-right: 6px; /* avoids scrollbar overlap */
}


/* Missions: fade/disable whole block once claimed */
.mission-card.is-claimed {
  opacity: 0.50;
  filter: grayscale(0.35) blur(0.35px);
}

.mission-card.is-claimed button {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}

/* Toast host */
#toastHost{
  position: fixed;
  left: 10px;
  bottom: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Toast */
.toast{
  pointer-events: none;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);

  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.show{
  opacity: 1;
  transform: translateY(0);
}

.toast.hide{
  opacity: 0;
  transform: translateY(8px);
}

.toast__msg{
  font-weight: 900;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.92);
}

/* Optional: "reward" vibe */
.toast--reward{
  border-color: rgba(34,197,94,0.28);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45),
              0 0 0 1px rgba(34,197,94,0.10) inset;
}

/* Rare shard toast - gold border */
.toast--rare{
  border-color: gold;
  box-shadow: 0 18px 50px rgba(0,0,0,0.45),
              0 0 0 1px rgba(255,215,0,0.15) inset;
}
/* Claim button always says Claim, but disabled looks "muted" */
.mission-claim:disabled {
  opacity: 0.35;
  filter: blur(0.1px) grayscale(0.2);
  cursor: not-allowed;
  transform: none;
}
.mission-claim:disabled {
  opacity: 0.42;
  filter: blur(0.2px) grayscale(0.15);
  cursor: not-allowed;
}


/* Make the $ feel heavy */
.market-balance .money-sign {
  font-size: 26px;     /* BIG $ */
  font-weight: 900;
  margin-right: 2px;
  vertical-align: -2px; /* tiny drop so it sits nice */
}

/* Make the number big too (optional but usually feels best) */
#balanceMarket {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.5px;
}
/* VESSELS PAGE — balance line */
#vesselPage .market-balance {
  font-size: 20px;     /* "Balance:" label */
  font-weight: 700;
}

/* BIG $ sign */
#vesselPage .money-sign {
  font-size: 26px;     /* tweak this */
  font-weight: 900;
  margin-right: 2px;
  vertical-align: -2px;
}

/* BIG number */
#vesselPage #balanceVessel {
  font-size: 21px;     /* tweak this */
  font-weight: 900;
  letter-spacing: 0.5px;
}
/* =========================
   ✅ INVENTORY SALE TOAST
   ========================= */

/* =========================
   ✅ INVENTORY SALE TOAST
   (stable across updateUI rerenders)
   ========================= */

.inv-sale-toast{
  margin-top: 8px;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.2px;

  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.28);
  color: rgba(255,255,255,0.95);

  pointer-events: none;

  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.inv-sale-toast--in{
  opacity: 1;
  transform: translateY(0);
}

.inv-sale-toast--out{
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 260ms ease, transform 260ms ease;
}
.inv-sale-toast-wrap{
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 6px;
  pointer-events: none;
}
#autoPayDebtBtn {
  display: none !important;
}

/* Make buttons feel "pressable" */
#marketPage button {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 90ms ease, filter 90ms ease, box-shadow 120ms ease;
}

#marketPage button:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(1.06);
}

.btn-ripple{
  position:absolute;
  border-radius:999px;
  pointer-events:none;
  transform:scale(0);
  opacity:.35;
  animation:btnRipple 420ms ease-out forwards;
  background:rgba(255,255,255,.85);
}
@keyframes btnRipple{ to{ transform:scale(3); opacity:0; } }

.btn-success-pop{ animation:btnSuccessPop 220ms ease-out; }
@keyframes btnSuccessPop{
  0%{ transform:translateY(1px) scale(.985); }
  60%{ transform:translateY(-1px) scale(1.02); }
  100%{ transform:translateY(0) scale(1); }
}

.btn-deny{ animation:btnDeny 180ms ease-in-out; }
@keyframes btnDeny{
  0%,100%{ transform:translateX(0); }
  25%{ transform:translateX(-3px); }
  75%{ transform:translateX(3px); }
}
#mineBtn.mine-btn--active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.12),
    transparent
  );
  animation: mineSweep 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes mineSweep {
  0%   { opacity: 0; }
  40%  { opacity: 1; }
  60%  { opacity: 1; }
  100% { opacity: 0; }
}
/* =========================
   ✅ MINING TOAST GUTTER (no overlap)
   ========================= */

.mine-button-container{
  width: 220px;
  margin-top: 18px;
  margin-bottom: 22px;

  /* stack: gutter (space) then button */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* This is REAL layout space now (not absolute) */
.mine-toast-gutter{
  height: 34px;         /* tweak */
  position: relative;   /* so #mineFloatLayer can be absolute inside */
  pointer-events: none;
  overflow: visible;
}

/* Button */
#mineBtn{
  position: relative;
  display: block;
  width: 100%;
  height: 46px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: white;
  border: none;
  cursor: pointer;
}

#mineProgress{
  position: absolute;
  inset: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, gold, orange);
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}

#mineBtnText{
  position: relative;
  z-index: 1;
}
/* =========================
   ✅ GLOBAL: kill horizontal jiggle everywhere
   Paste at VERY BOTTOM
   ========================= */
html, body {
  overflow-x: hidden;
}

/* Make widths predictable (prevents 100% + padding overflow) */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Your pages scroll vertically — make sure they NEVER scroll horizontally */
#content,
#mapPage,
#inventoryPage,
#planetPage,
#artifactsPage,
#bankPage,
#marketPage,
#vesselPage {
  overflow-x: hidden;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* 🔒 prevents white overscroll */
  background: radial-gradient(circle at top, #0f172a, #020617);
}


/* Travel overlay should NOT steal scroll */
#travelOverlay,
#travelHud,
.travel-overlay,
.travelHud {
  pointer-events: none;
}

/* Re-enable clicking for buttons INSIDE the overlay */
#travelOverlay button,
#travelHud button,
.travel-overlay button,
.travelHud button {
  pointer-events: auto;
}

/* =========================
   TROPHY SHARD (SIZE)
   ========================= */

/* =========================
   TROPHY SHARD — JEWEL GLINT (premium + subtle)
   Uses your vars: --trophyMask, --twBX, --twBY, --twX, --twY, --twRot, --twDelay
   ========================= */

.trophyShard{
  position: relative;
  overflow: visible;
  isolation: isolate;
}

/* keep the icon filling the trophy box */
.trophyShard img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* ---------- MAIN GLINT (random position) ---------- */
.trophyShard::before{
  content:"";
  position:absolute;
  inset:-6px;
  pointer-events:none;

  /* Core + tapered rays (conic gives “real” glint taper) */
  background:
    /* tiny hot core */
    radial-gradient(circle,
      rgba(255,255,255,0.52) 0%,
      rgba(255,255,255,0.22) 10%,
      rgba(255,255,255,0.08) 18%,
      rgba(255,255,255,0.00) 32%
    ),
    /* tapered 4-point star (asymmetric weights) */
    conic-gradient(from 20deg,
      rgba(255,255,255,0.00) 0deg,
      rgba(255,255,255,0.00) 38deg,
      rgba(255,255,255,0.85) 41deg,
      rgba(255,255,255,0.00) 44deg,

      rgba(255,255,255,0.00) 128deg,
      rgba(255,255,255,0.70) 131deg,
      rgba(255,255,255,0.00) 134deg,

      rgba(255,255,255,0.00) 218deg,
      rgba(255,255,255,0.80) 221deg,
      rgba(255,255,255,0.00) 224deg,

      rgba(255,255,255,0.00) 308deg,
      rgba(255,255,255,0.65) 311deg,
      rgba(255,255,255,0.00) 314deg,

      rgba(255,255,255,0.00) 360deg
    );

  /* 🔑 position comes from JS vars */
  background-position: var(--twBX, 63%) var(--twBY, 43%);
  background-repeat: no-repeat;

  /* IMPORTANT: conic needs a SQUARE size */
background-size: 18px 18px;

  opacity: 0;

  transform:
    translate3d(var(--twX, 0px), var(--twY, 0px), 0)
    scale(0.34)
    rotate(var(--twRot, 12deg));

  filter:
    blur(0px)
    drop-shadow(0 0 2px rgba(255,255,255,0.30))
    drop-shadow(0 0 5px rgba(255,255,255,0.18));

  -webkit-mask-image: var(--trophyMask);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-image: var(--trophyMask);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  mix-blend-mode: screen;

  animation: trophyMicroTwinkle 10.5s infinite;
  animation-delay: var(--twDelay, 0s);
}

/* ---------- SECONDARY GLINT (bottom-left, subtle) ---------- */
.trophyShard::after{
  content:"";
  position:absolute;
  inset:-6px;
  pointer-events:none;

  background:
    radial-gradient(circle,
      rgba(255,255,255,0.32) 0%,
      rgba(255,255,255,0.12) 12%,
      rgba(255,255,255,0.00) 30%
    ),
    conic-gradient(from -10deg,
      rgba(255,255,255,0.00) 0deg,
      rgba(255,255,255,0.00) 46deg,
      rgba(255,255,255,0.55) 49deg,
      rgba(255,255,255,0.00) 52deg,

      rgba(255,255,255,0.00) 226deg,
      rgba(255,255,255,0.45) 229deg,
      rgba(255,255,255,0.00) 232deg,

      rgba(255,255,255,0.00) 360deg
    );

  /* tweak this pair to position secondary glint */
  background-position: 37% 60%;
  background-repeat: no-repeat;
  background-size: 20px 20px;

  opacity: 0;

  transform:
    translate3d(var(--twX, 0px), var(--twY, 0px), 0)
    scale(0.30)
    rotate(calc(var(--twRot, 12deg) * -1));

  filter:
    blur(0px)
    drop-shadow(0 0 2px rgba(255,255,255,0.22))
    drop-shadow(0 0 4px rgba(255,255,255,0.14));

  -webkit-mask-image: var(--trophyMask);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-image: var(--trophyMask);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  mix-blend-mode: screen;

  animation: trophyMicroTwinkle 10.5s infinite;
  animation-delay: calc(var(--twDelay, 0s) + 2.2s);
}
.trophyShard .sunGlint{
  position:absolute;
  inset:-6px;
  pointer-events:none;

  background:
    /* hot core */
    radial-gradient(circle,
      rgba(255,255,255,0.75) 0%,
      rgba(255,255,255,0.35) 12%,
      rgba(255,255,255,0.12) 22%,
      rgba(255,255,255,0.00) 38%
    ),

    /* long diagonal streak */
    linear-gradient(135deg,
      rgba(255,255,255,0.00) 44%,
      rgba(255,255,255,0.85) 50%,
      rgba(255,255,255,0.00) 56%
    ),

    /* short perpendicular streak */
    linear-gradient(45deg,
      rgba(255,255,255,0.00) 48%,
      rgba(255,255,255,0.55) 50%,
      rgba(255,255,255,0.00) 52%
    );

  background-repeat: no-repeat;

  /* ⬇️ CHANGE THIS TO POSITION THE 3RD SPARKLE */
  background-position: 72% 28%;

  /* controls ray length */
  background-size: 28px 28px;

  opacity: 0;

  transform:
    translate3d(var(--twX, 0px), var(--twY, 0px), 0)
    scale(0.42)
    rotate(var(--twRot, 0deg));

  filter:
    blur(0px)
    drop-shadow(0 0 4px rgba(255,255,255,0.45))
    drop-shadow(0 0 10px rgba(255,255,255,0.25));

  -webkit-mask-image: var(--trophyMask);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-image: var(--trophyMask);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  mix-blend-mode: screen;

  animation: trophyMicroTwinkle 14s infinite;
  animation-delay: calc(var(--twDelay, 0s) + 4.8s);
}


/* ---------- Timing: long idle, smooth pop, smooth fade ---------- */
@keyframes trophyMicroTwinkle{
  0%, 80%{
    opacity: 0;
    transform:
      translate3d(var(--twX), var(--twY), 0)
      scale(0.30)
      rotate(var(--twRot));
  }

  84%{
    opacity: 0.55;
    transform:
      translate3d(var(--twX), var(--twY), 0)
      scale(0.48)
      rotate(var(--twRot));
  }

  87%{
    opacity: 1;
    transform:
      translate3d(var(--twX), var(--twY), 0)
      scale(0.62)
      rotate(var(--twRot));
  }

  91%{
    opacity: 0.55;
    transform:
      translate3d(var(--twX), var(--twY), 0)
      scale(0.50)
      rotate(var(--twRot));
  }

  96%{
    opacity: 0.12;
    transform:
      translate3d(var(--twX), var(--twY), 0)
      scale(0.40)
      rotate(var(--twRot));
  }

  100%{
    opacity: 0;
    transform:
      translate3d(var(--twX), var(--twY), 0)
      scale(0.30)
      rotate(var(--twRot));
  }
}

/* accessibility */
@media (prefers-reduced-motion: reduce){
  .trophyShard::before,
  .trophyShard::after{
    animation: none;
    opacity: 0;
  }
}

/* =========================
   ✅ ARTIFACT LIST SECTIONS
   ========================= */

.artifact-section{
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}

.artifact-section + .artifact-section{
  margin-top: 12px;
}

.artifact-section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;

  padding: 8px 10px;
  margin-bottom: 10px;

  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
}

.artifact-section-title{
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.92;
}

.artifact-section-count{
  font-size: 12px;
  font-weight: 800;
  opacity: 0.70;
}
/* =========================
   ✅ MINE BUTTON — PRIMARY ACTION (override-safe)
   Paste at VERY BOTTOM
   ========================= */

.mine-button-container #mineBtn{
border: 3px solid rgba(34,197,94,0.75);
  background: linear-gradient(180deg, rgba(34,197,94,0.18), rgba(0,0,0,0.18));
  border-radius: 12px;

  font-weight: 900;
  letter-spacing: 0.2px;

  box-shadow:
    0 6px 0 rgba(22, 101, 52, 0.90),          /* heavy bottom lip */
    0 14px 34px rgba(34,197,94,0.22),         /* glow */
    inset 0 0 18px rgba(34,197,94,0.18);      /* inner sheen */
}

.mine-button-container #mineBtn:hover{
  filter: brightness(1.06);
  box-shadow:
    0 6px 0 rgba(22, 101, 52, 0.92),
    0 18px 44px rgba(34,197,94,0.30),
    inset 0 0 22px rgba(34,197,94,0.22);
}

.mine-button-container #mineBtn:active{
  transform: translateY(3px);
  box-shadow:
    0 3px 0 rgba(22, 101, 52, 0.92),
    0 10px 24px rgba(34,197,94,0.22),
    inset 0 0 14px rgba(34,197,94,0.14);
}
/* ✅ Mine button: use an inset "fake border" so progress fills perfectly */
.mine-button-container #mineBtn{
  border: none !important;              /* remove real border */
  border-radius: 12px;

  background: linear-gradient(180deg, rgba(34,197,94,0.16), rgba(0,0,0,0.18));

  /* thinner outline (adjust 2px/3px here) */
  box-shadow:
    inset 0 0 0 3px rgba(34,197,94,0.72),  /* green outline (fake border) */
    0 6px 0 rgba(22,101,52,0.90),          /* bottom lip */
    0 14px 34px rgba(34,197,94,0.18),      /* glow */
    inset 0 0 18px rgba(34,197,94,0.14);   /* inner sheen */
}

/* ✅ Progress bar should go full-bleed now */
.mine-button-container #mineProgress{
  inset: 0 !important;     /* full coverage */
  height: 100%;
  border-radius: inherit;
}
/* =========================
   ✅ MINE BUTTON — LUXURY EMERALD (paste at VERY BOTTOM)
   ========================= */
.mine-button-container #mineBtn{
  border: none !important;
  border-radius: 12px;

  /* sleek emerald tint */
  background: linear-gradient(
    180deg,
    rgba(16, 185, 129, 0.16),   /* emerald-500 */
    rgba(0, 0, 0, 0.18)
  );

  box-shadow:
    inset 0 0 0 2px rgba(52, 211, 153, 0.58), /* emerald outline (lighter + thinner) */
    0 6px 0 rgba(6, 95, 70, 0.92),            /* deep emerald bottom lip */
    0 16px 40px rgba(16, 185, 129, 0.18),     /* soft glow */
    inset 0 0 18px rgba(52, 211, 153, 0.12);  /* inner sheen */
}

.mine-button-container #mineBtn:hover{
  filter: brightness(1.06);
  box-shadow:
    inset 0 0 0 2px rgba(110, 231, 183, 0.62),
    0 6px 0 rgba(6, 95, 70, 0.94),
    0 20px 52px rgba(16, 185, 129, 0.22),
    inset 0 0 22px rgba(110, 231, 183, 0.14);
}

.mine-button-container #mineBtn:active{
  transform: translateY(3px);
  box-shadow:
    inset 0 0 0 2px rgba(52, 211, 153, 0.55),
    0 3px 0 rgba(6, 95, 70, 0.94),
    0 12px 26px rgba(16, 185, 129, 0.18),
    inset 0 0 14px rgba(52, 211, 153, 0.10);
}
.tutorial-overlay{
  position:fixed;
  inset:0;
  z-index:99999;
}

.tutorial-dim{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.35);  /* was 0.65 */
  backdrop-filter: blur(2px);
}

.tutorial-spotlight{
  position:absolute;
  border-radius:14px;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,0.35), /* was 0.65 */
    0 0 22px rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.18);
  pointer-events:none;
}

.tutorial-card{
  position:absolute;
  min-width: 260px;
  max-width: 340px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(10,12,18,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}

.tutorial-title{ font-weight: 800; margin-bottom: 6px; }
.tutorial-text{ opacity: 0.9; line-height: 1.25; }

/* Compact centered card for single-line prompts like "Click on Earth" */
#tutorialCard.tutorial-cta {
  min-width: auto;
  max-width: none;
  width: auto;
  padding: 12px 24px;
  text-align: center;
}
#tutorialCard.tutorial-cta .tutorial-text:empty { display: none; }
#tutorialCard.tutorial-cta .tutorial-actions { display: none; }

.tutorial-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:10px;
}

.tutorial-btn{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: white;
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
}
.tutorial-btn.primary{
  background: rgba(34,197,94,0.22);
  border-color: rgba(34,197,94,0.45);
}
.tutorial-btn.ghost{
  background: transparent;
  border-color: transparent;
  opacity: 0.7;
}
/* ✅ Tutorial: pulsing glow on Earth to guide first click */
@keyframes tutorialEarthPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 12px rgba(34,197,94,0.7))
      drop-shadow(0 0 36px rgba(34,197,94,0.35));
  }
  50% {
    filter:
      drop-shadow(0 0 28px rgba(34,197,94,1))
      drop-shadow(0 0 70px rgba(34,197,94,0.55));
  }
}
.tutorial-earth-pulse .planet-img {
  animation: tutorialEarthPulse 1.4s ease-in-out infinite !important;
}

/* ✅ Tutorial: pulsing glow on sidebar buttons to guide navigation */
@keyframes tutorialSidebarPulse {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(34,197,94,0.5),
      0 0 24px rgba(34,197,94,0.25);
  }
  50% {
    box-shadow:
      0 0 18px rgba(34,197,94,0.9),
      0 0 48px rgba(34,197,94,0.45);
  }
}
.tutorial-sidebar-pulse {
  animation: tutorialSidebarPulse 1.4s ease-in-out infinite !important;
  border-color: rgba(34,197,94,0.6) !important;
}

/* Trophy shard container (the dark box) */
/* Trophy shard container (the dark box) */
.trophyShard{
  width: 80px;
  height: 80px;

  padding: 4px;
  box-sizing: border-box;

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

  border-radius: 14px;

  /* ✅ REQUIRED for shimmer */
  position: relative;
  overflow: visible;
}


/* Trophy shard image */
.trophyShard img.trophy-mini{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* =========================
   ✅ ARRIVAL TOAST (polished, matches your UI)
   Paste at VERY BOTTOM
   ========================= */
#arrivalToast{
  top: 16px;
  left: 55%;
transform: translateX(-50%) translateX(36px) translateY(-6px);

  /* match your toast + hud glass */
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

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

  /* subtle “sheen” like your hud cards */
  position: fixed;
  overflow: hidden;
}

#arrivalToast::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  background: radial-gradient(circle at 20% 20%,
    rgba(255,255,255,0.10),
    rgba(255,255,255,0.00) 55%);
}

/* tiny accent line on top (arrival = good) */
#arrivalToast::after{
  content:"";
  position:absolute;
  left: 10px;
  right: 10px;
  top: 7px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(52,211,153,0.00),
    rgba(52,211,153,0.55),
    rgba(110,231,183,0.00)
  );
  opacity: 0.9;
  pointer-events:none;
}

/* icon a touch brighter */
#arrivalToast .arrivalToast__icon{
  font-size: 16px;
  opacity: 0.95;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
}

/* make title feel “UI-label heavy” like you do elsewhere */
#arrivalToast .arrivalToast__title{
  font-weight: 900;
  letter-spacing: 0.2px;
  opacity: 0.96;
}

/* subtext slightly smaller + muted */
#arrivalToast .arrivalToast__sub{
  font-size: 13px;
  opacity: 0.78;
  margin-left: 6px;
}

/* animation: slightly smoother + less jumpy */
#arrivalToast.is-showing{
  display: inline-flex;
  animation: arrivalToastIn2 220ms ease-out forwards;
}
#arrivalToast.is-hiding{
  animation: arrivalToastOut2 260ms ease-in forwards;
}

@keyframes arrivalToastIn2{
  from { opacity: 0; transform: translateX(-50%) translateY(-14px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0px); }
}
@keyframes arrivalToastOut2{
  from { opacity: 1; transform: translateX(-50%) translateY(0px); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* =========================
   ✅ SCROLLBAR — match Inventory + Trophy Shards
   ========================= */

/* 1) Firefox */
#inventoryScroll,
#trophyShardsPanel {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.85) rgba(255,255,255,0.08); /* thumb, track */
}

/* 2) Chrome / Safari / Edge */
#inventoryScroll::-webkit-scrollbar,
#trophyShardsPanel::-webkit-scrollbar {
  width: 10px;
}

#inventoryScroll::-webkit-scrollbar-track,
#trophyShardsPanel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}

#inventoryScroll::-webkit-scrollbar-thumb,
#trophyShardsPanel::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.99);               /* black thumb */
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.08);   /* matches your glass borders */
}

#inventoryScroll::-webkit-scrollbar-thumb:hover,
#trophyShardsPanel::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.95);
}

/* ✅ Global scrollbar styling for entire page and sidebar */
/* 1) Firefox */
body,
html,
#nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.85) rgba(255,255,255,0.08); /* thumb, track */
}

/* 2) Chrome / Safari / Edge */
body::-webkit-scrollbar,
html::-webkit-scrollbar,
#nav::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track,
html::-webkit-scrollbar-track,
#nav::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb,
#nav::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.99);               /* black thumb */
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.08);   /* matches glass borders */
}

body::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover,
#nav::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.95);
}

/* ✅ Global Money HUD (thin overlay) */
.global-money-hud{
  position: fixed;
  top: 20px;
  right: 14px;
  z-index: 9999;

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

  height: 30px;              /* thin */
  padding: 0 10px;           /* thin */
  border-radius: 999px;

  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow: 0 10px 26px rgba(0,0,0,0.25);

  font-size: 14px;
  line-height: 1;
  color: rgba(255,255,255,0.92);

  pointer-events: none; /* ✅ can't block clicks */
}

.global-money-hud .gm-icon{
  opacity: 0.85;
  font-size: 15px;
}

#globalMoneyText{
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}
.global-money-hud{
  right: 180px;  /* adjust until it clears zoom */
  top: 25px;
}
/* ✅ Global Money HUD — more rectangular, matches your UI cards */
.global-money-hud{
  position: fixed;
  top: 20px;
  right: 22px;              /* keep your clearance from zoom */
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  height: 38px;
  padding: 0 15px;

  /* 👇 less round (your UI uses 12–16 a lot) */
  border-radius: 12px;

  /* match your card / overlay language */
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 40px rgba(0,0,0,0.40);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  color: rgba(255,255,255,0.92);
  font-size: 14px;
  line-height: 1;

  pointer-events: none; /* don’t block clicks */
  overflow: hidden;     /* needed for the subtle sheen */
}

/* subtle sheen like your toast/location hud */
.global-money-hud::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  background: radial-gradient(circle at 20% 20%,
    rgba(255,255,255,0.10),
    rgba(255,255,255,0.00) 55%);
}

.global-money-hud .gm-icon{
  opacity: 0.9;
  font-size: 16px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.35));
}

#globalMoneyText{
  position: relative;
  z-index: 1;
  font-weight: 900;                 /* matches your “heavy” UI */
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}
/* smooth */
#globalMoneyHud{
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ✅ Celestial Boost HUD (fixed, left of money HUD on map/mining) */
.celestial-boost-hud {
  position: fixed;
  top: 20px;
  right: 420px;              /* sits to the left of BH cooldown HUD (right:200px) */
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  height: 38px;
  padding: 0 14px;
  border-radius: 12px;

  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 180, 60, 0.30);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.40),
    0 0 16px rgba(255, 180, 60, 0.10);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;

  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.celestial-boost-hud::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 20% 20%,
    rgba(255, 180, 60, 0.08),
    rgba(255, 180, 60, 0.00) 55%);
}
#ceBoostHudText {
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

/* while scrolling */
#globalMoneyHud.hud-scrolling{
  opacity: 0.55;
}

.global-money-hud.hud-scrolling{
  opacity: 0.5;
  transform: translateY(-4px);
}
#sidebar .logo{
  font-size: 26px;       /* make it big */
  font-weight: 550;
  letter-spacing: 0.4px;

  white-space: nowrap;  /* 🔑 prevents wrapping */
  overflow: hidden;     /* safety */
  text-overflow: ellipsis;

  padding: 12px 14px;
  margin-bottom: 18px;

  display: flex;
  align-items: center;
  gap: 8px;
}
#sidebar .logo{
  white-space: nowrap;   /* ✅ PREVENTS STACKING */
}
#sidebar .logo{
  line-height: 1.1;
}
#marketPage .market-balance{
  display: none;
}

/* =========================
   MARKET PAGE LAYOUT
   ========================= */
#marketPage h2 {
  text-align: left;
}

.market-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
  max-width: none !important;
}

.market-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.market-food {
  grid-column: 1;
  grid-row: 1;
}

.market-tickets {
  grid-column: 2;
  grid-row: 1;
}

.market-upgrades {
  grid-column: 1 / -1;
  grid-row: 2;
}

.market-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.market-section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.market-section-desc {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 18px;
}

/* Food Items */
.market-items {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.market-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.2s, border-color 0.2s;
}

.market-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.market-item-info {
  flex: 1;
  min-width: 0;
}

.market-item-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.market-item-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  opacity: 0.75;
}

.market-stat {
  color: rgba(100, 200, 120, 0.9);
}

.market-stat-owned {
  opacity: 0.7;
}

.market-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Market Buttons */
.market-buy-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(100, 149, 237, 0.3), rgba(100, 149, 237, 0.15));
  border: 1px solid rgba(100, 149, 237, 0.4);
  color: white;
  transition: all 0.15s ease;
}

.market-buy-btn:hover {
  background: linear-gradient(135deg, rgba(100, 149, 237, 0.45), rgba(100, 149, 237, 0.25));
  border-color: rgba(100, 149, 237, 0.6);
  transform: translateY(-1px);
}

.market-buy-btn:active {
  transform: translateY(1px);
}

.market-buy-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
}

.market-buy-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.market-buy-btn.full-width {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
}

.market-buy-btn.upgrade {
  padding: 10px 18px;
  white-space: nowrap;
}

.market-buy-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Relic Tickets Section */
.market-ticket-shop {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.market-ticket-price {
  font-size: 14px;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.market-ticket-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.market-ticket-row label {
  font-size: 12px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-ticket-row input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.market-ticket-row input:focus {
  border-color: rgba(100, 149, 237, 0.5);
}

.market-ticket-total {
  background: rgba(100, 149, 237, 0.1);
  border: 1px solid rgba(100, 149, 237, 0.2);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
}

.market-ticket-owned {
  text-align: center;
  font-size: 14px;
  opacity: 0.85;
  padding: 16px 0;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Relic Info Section */
.market-relic-info {
  margin-top: 16px;
}

.market-relic-info-title {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.7;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-relic-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.market-relic-item + .market-relic-item {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.market-relic-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.market-relic-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.market-relic-meta {
  font-size: 12px;
  opacity: 0.6;
  text-align: right;
}

.market-relic-rate {
  font-size: 12px;
  opacity: 0.5;
  text-align: right;
  min-width: 90px;
  opacity: 0.5;
  margin-top: 2px;
}

/* Upgrades Section */
.market-upgrades-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.market-upgrade-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background 0.2s, border-color 0.2s;
}

.market-upgrade-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.market-upgrade-content {
  flex: 1;
  min-width: 0;
}

.market-upgrade-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.5;
  margin-bottom: 4px;
}

.market-upgrade-current {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.market-upgrade-stat {
  font-size: 12px;
  opacity: 0.7;
}

/* Market Page Responsive */
@media (max-width: 900px) {
  .market-layout {
    grid-template-columns: 1fr;
  }

  .market-food,
  .market-tickets,
  .market-upgrades {
    grid-column: 1;
  }

  .market-food { grid-row: 1; }
  .market-tickets { grid-row: 2; }
  .market-upgrades { grid-row: 3; }

  .market-upgrades-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .market-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .market-item-actions {
    justify-content: stretch;
  }

  .market-item-actions .market-buy-btn {
    flex: 1;
  }

  .market-upgrade-card {
    flex-direction: column;
    text-align: center;
  }

  .market-buy-btn.upgrade {
    width: 100%;
  }

  .market-section-desc {
    padding-left: 0;
  }
}

/* Hide balance line on Vessels page only */
#vesselPage .market-balance {
  display: none;
}
/* Hide top Missions page title */
#missionsPage .page-title {
  display: none;
}
/* BUY BUTTON PRESS FEEL */
#buyFuelBtn,
.vessel-buy {
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    filter 0.08s ease;
}

#buyFuelBtn:active,
.vessel-buy:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 4px 10px rgba(0,0,0,0.35);
  filter: brightness(0.95);
}
.buy-success {
  background: linear-gradient(
    135deg,
    rgba(34,197,94,0.9),
    rgba(22,163,74,0.9)
  );
  box-shadow: 0 0 18px rgba(34,197,94,0.45);
}
/* Fuel intake pulse */
.fuel-owned.fuel-intake {
  animation: fuelIntake 0.45s ease-out;
}

@keyframes fuelIntake {
  0% {
    box-shadow: 0 0 0 rgba(56,189,248,0);
    transform: scale(1);
  }
  35% {
    box-shadow: 0 0 22px rgba(56,189,248,0.55);
    transform: scale(1.025);
  }
  100% {
    box-shadow: 0 0 0 rgba(56,189,248,0);
    transform: scale(1);
  }
}
.updatesLink{
  color: #7dd3fc; /* soft sci-fi blue */
  font-weight: 600;
  text-decoration: none;
}

.updatesLink:hover{
  text-decoration: underline;
  opacity: 0.95;
}

/* Sidebar container */
#sidebar {
  padding: 14px 12px;
}

/* Base tab look (sleek) */
.sidebar-tab {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  margin: 6px 0;

  border-radius: 14px;         /* softer */
  background: transparent;      /* key: not blocky */
  border: 1px solid transparent;

  color: rgba(255,255,255,0.65);
  font-weight: 600;
  letter-spacing: 0.2px;

  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

/* Hover = gentle light */
.sidebar-tab:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

/* Active = pill highlight, not a giant card */
.sidebar-tab.active {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.96);
}

/* Optional: left accent bar like the example */
.sidebar-tab.active::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  margin-right: 6px;
  background: rgba(120, 220, 255, 0.9); /* tweak to your theme */
}

/* Optional: smaller subtitle under tab name (if you want it) */
.sidebar-tab .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}
/* Base */
.sidebar-tab{
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}

/* Hover */
.sidebar-tab:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

/* Active */
.sidebar-tab.active{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.12);
}
.sidebar-tab.active{
  box-shadow:
    0 10px 22px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.10);
  transform: translateY(-1px);
}
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000; /* Above loading screen (99999) */
}

.confirm-overlay.hidden {
  display: none;
}

.confirm-modal {
  background: radial-gradient(circle at top, #0f172a, #020617);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 20px 22px;
  width: 320px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.confirm-modal h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.confirm-modal p {
  font-size: 14px;
  opacity: 0.85;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.confirm-actions button {
  flex: 1;
  padding: 8px 0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
}

/* ✅ OFFLINE REWARDS SUMMARY POPUP */
.offline-rewards-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.offline-rewards-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.offline-rewards-modal {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  border: 2px solid rgba(59, 130, 246, 0.5);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 
    0 40px 100px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 40px rgba(59, 130, 246, 0.3);
  overflow: hidden;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.offline-rewards-header {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  padding: 16px 20px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  text-align: center;
}

.offline-rewards-header h2 {
  margin: 0;
  font-size: 22px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.offline-rewards-body {
  padding: 20px;
}

.reward-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.reward-stat.small-stat {
  font-size: 13px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.reward-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.reward-value {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.small-stat .reward-value {
  font-size: 14px;
}

.reward-distribution {
  margin: 14px 0;
  padding: 12px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.distribution-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.distribution-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shard-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 6px;
  font-size: 12px;
  color: #60a5fa;
}

.offline-rewards-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(59, 130, 246, 0.3);
  text-align: center;
}

.offline-rewards-footer button {
  padding: 10px 32px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.offline-rewards-footer button:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.offline-rewards-footer button:active {
  transform: translateY(0);
}






/* ✅ Hide Missions tab button in sidebar */
#sidebar button[onclick*="showPage('missions')"] {
  display: none !important;
}

/* ✅ Also hide the Missions page panel (extra safety) */
#missionsPage {
  display: none !important;
}

















/* =========================
   TROPHY SHARD BOX — PREMIUM BEZEL BORDERS
   Goals:
   ✅ borders classify rarity clearly
   ✅ less neon / less clash
   ✅ metallic/beveled “luxury” feel
   ✅ shard art remains the focus
   ========================= */

/* Box that owns the constant border ring */
.trophyShardBox{
  position: relative;
  border-radius: 12px;
  overflow: hidden;

  /* subtle dark face so the border doesn't fight the shard */
  background: rgba(6, 10, 20, 0.35);

  /* tiny inset to add depth to the tile itself */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 10px 20px rgba(0,0,0,0.35);
}

/* constant border ring (bezel) */
.trophyShardBox::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;

  /* thickness knob */
  padding: var(--rbW, 1.2px);

  /* 3-stop “metal” gradient:
     - highlight edge
     - mid tone
     - shadow edge
  */
  background: linear-gradient(
    135deg,
    var(--rbHi, rgba(255,255,255,0.35)) 0%,
    var(--rbMid, var(--rbA, transparent)) 45%,
    var(--rbLo, var(--rbB, transparent)) 100%
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;

  opacity: 1;
  transform: none;
  animation: none !important;

  /* "polished" without being loud */
  filter: saturate(1.03) brightness(1.03);
}

/* inner bevel + soft highlight (makes it feel premium) */
.trophyShardBox::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius: calc(12px - 1px);
  pointer-events:none;

  /* tiny specular highlight at top-left */
  background: radial-gradient(
    circle at 25% 20%,
    rgba(255,255,255,0.12),
    transparent 55%
  );

  /* inner edge definition */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.05),
    inset 0 -10px 18px rgba(0,0,0,0.35);
}

/* Make the inner span fill the box so sheen stays aligned */
.trophyShardBox .trophyShard{
  display:block;
  width:100%;
  height:100%;
}

/* Optional: a subtle tier aura (very low intensity, so it doesn't cheapen)
   Turn on by adding class "lux" like you already do. */
.trophyShardBox.lux{
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.05),
    inset 0 10px 20px rgba(0,0,0,0.35),
    0 0 14px var(--rbGlow, rgba(255,255,255,0.06));
}
.trophyShardBox.lux::after{
  filter: saturate(1.06) brightness(1.05);
}

/* =========================
   TIER PALETTE — tuned to be less neon + more “metal/gem bezel”
   Each tier sets:
   --rbHi  (highlight edge)
   --rbMid (main tone)
   --rbLo  (shadow edge)
   --rbGlow (soft aura)
   ========================= */

/* Fractured — graphite / gunmetal */
.trophyShardBox.tier-fractured{
  --rbHi: rgba(235,235,245,0.20);
  --rbMid: rgba(150,155,170,0.55);
  --rbLo: rgba(60,65,80,0.75);
  --rbGlow: rgba(170,175,190,0.06);
}

/* Clouded (~1 in 1k) — emerald steel (less “neon green”) */
.trophyShardBox.tier-clouded{
  --rbHi: rgba(210,255,230,0.22);
  --rbMid: rgba(70,190,125,0.72);
  --rbLo: rgba(15,90,60,0.85);
  --rbGlow: rgba(60,200,130,0.10);
}

/* Refined — sapphire alloy (deeper + calmer) */
.trophyShardBox.tier-refined{
  --rbHi: rgba(205,230,255,0.22);
  --rbMid: rgba(80,140,240,0.78);
  --rbLo: rgba(25,70,160,0.88);
  --rbGlow: rgba(90,150,255,0.12);
}

/* Primeval — ruby alloy (less hot red, more “deep ruby”) */
.trophyShardBox.tier-primeval{
  --rbHi: rgba(255,220,220,0.20);
  --rbMid: rgba(235,90,95,0.78);
  --rbLo: rgba(120,20,30,0.90);
  --rbGlow: rgba(255,90,90,0.10);
}

/* Pristine — warm gold (a bit richer/less yellow) */
.trophyShardBox.tier-pristine{
  --rbHi: rgba(255,245,210,0.26);
  --rbMid: rgba(235,185,95,0.82);
  --rbLo: rgba(120,80,25,0.90);
  --rbGlow: rgba(255,210,120,0.12);
}

/* Consummate — pearl silver (cool, premium, not pure white) */
.trophyShardBox.tier-consummate{
  --rbHi: rgba(255,255,255,0.30);
  --rbMid: rgba(220,230,245,0.75);
  --rbLo: rgba(130,150,175,0.85);
  --rbGlow: rgba(210,225,255,0.10);
}

/* Perfect — obsidian chrome (thicker + glossy) */
.trophyShardBox.tier-perfect{
  --rbW: 2.4px; /* thicker only here */
  --rbHi: rgba(255,255,255,0.14);
  --rbMid: rgba(25,25,32,0.95);
  --rbLo: rgba(0,0,0,0.98);
  --rbGlow: rgba(0,0,0,0.22);
}

/* Codex tier tags */
.codex-tier-tag {
  font-size: 8px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.codex-tier-tag.tier-fractured {
  background: rgba(155, 165, 184, 0.15);
  color: #9BA5B8;
  border: 1px solid rgba(155, 165, 184, 0.3);
}
.codex-tier-tag.tier-clouded {
  background: rgba(80, 217, 160, 0.15);
  color: #50D9A0;
  border: 1px solid rgba(80, 217, 160, 0.3);
}
.codex-tier-tag.tier-refined {
  background: rgba(91, 159, 255, 0.15);
  color: #5B9FFF;
  border: 1px solid rgba(91, 159, 255, 0.3);
}
.codex-tier-tag.tier-primeval {
  background: rgba(232, 93, 104, 0.15);
  color: #E85D68;
  border: 1px solid rgba(232, 93, 104, 0.3);
}
.codex-tier-tag.tier-pristine {
  background: rgba(244, 184, 85, 0.15);
  color: #F4B855;
  border: 1px solid rgba(244, 184, 85, 0.3);
}
.codex-tier-tag.tier-consummate {
  background: rgba(224, 232, 255, 0.15);
  color: #E0E8FF;
  border: 1px solid rgba(224, 232, 255, 0.3);
}
.codex-tier-tag.tier-perfect {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#blackHoleHud{
  position: fixed;
  top: 19px;
  right: 200px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  pointer-events: none;
}

#blackHoleHud .bh-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  opacity: 0.95;
}

#blackHoleHud .bh-label{ opacity: 0.85; }
#blackHoleHud .bh-value{ font-weight: 700; letter-spacing: 0.2px; }


.planet-locked {
  opacity: 0.35;
  filter: grayscale(0.7);
}

.planet-locked:hover .planet-label {
  opacity: 1; /* keep text readable on hover */
}

/* ===== Locked tooltip progress (map hover) — COMPACT ===== */
.planet-lockCard{
  margin-top: 8px;
  padding: 6px 6px;
  border-radius: 14px;
  background: rgba(0,0,0,0.40);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  max-width: 300px;          /* keeps it from getting huge */
}

.planet-lockTop{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* ✅ remove the lock emoji entirely */
.planet-lockIcon{
  display: none;
}
.planet-lockTitle{
  display: none;
}


.planet-lockSub{
  margin-top: 2px;
  opacity: 0.75;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.planet-lockBar{
  height: 9px;               /* slimmer bar */
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}

.planet-lockFill{
  height: 100%;
  width: 0%;
  border-radius: 999px;

  /* ✅ “lightsaber blue” */
  background: linear-gradient(
    90deg,
    rgba(56,189,248,0.98),
    rgba(34,211,238,0.98),
    rgba(59,130,246,0.98)
  );

  /* ✅ subtle glow */
  box-shadow:
    0 0 10px rgba(56,189,248,0.55),
    0 0 18px rgba(34,211,238,0.25);
}

.planet-lockNums{
  margin-top: 6px;
  opacity: 0.95;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.planet-lockReqPill{
  opacity: 0.72;
  font-weight: 800;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
}


/* =========================
   LEADERBOARD COMING SOON
   ========================= */
.leaderboard-coming {
  max-width: 520px;
  margin: 80px auto;
  text-align: center;
  opacity: 0.9;
}

.leaderboard-coming h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.leaderboard-main {
  font-size: 18px;
  margin-bottom: 12px;
}

.leaderboard-sub {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.4;
}

/* =========================
   LEADERBOARD TABS
   ========================= */
#leaderboardPage h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 28px;
}

.leaderboard-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 30px;
  padding: 0 20px;
}

.leaderboard-subtab {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.leaderboard-subtab:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.leaderboard-subtab.active {
  background: rgba(100, 149, 237, 0.2);
  border-color: rgba(100, 149, 237, 0.5);
  color: #fff;
}

.leaderboard-content {
  padding: 0;
  overflow-y: auto;
  height: 100%;
}

/* =========================
   TROPHY VAULT HOVER EFFECTS
   ========================= */
.trophy-item:hover .vault-preserve-btn {
  opacity: 1 !important;
}

.vault-preserve-btn:hover {
  background: rgba(100, 149, 237, 0.3) !important;
  border-color: rgba(100, 149, 237, 0.6) !important;
}

/* Codex modal vault button */
.codex-shard-card:hover .vault-preserve-btn-codex {
  opacity: 1 !important;
}

.vault-preserve-btn-codex {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 8px 14px;
  font-size: 12px;
  background: rgba(100, 149, 237, 0.2);
  border: 1px solid rgba(100, 149, 237, 0.4);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.vault-preserve-btn-codex:hover {
  background: rgba(100, 149, 237, 0.3) !important;
  border-color: rgba(100, 149, 237, 0.6) !important;
}

.codex-vault-badge {
  position: absolute;
  top: 50%;
  right: 50px;
  transform: translateY(-50%);
  padding: 6px 12px;
  font-size: 11px;
  background: rgba(100, 149, 237, 0.15);
  border: 1px solid rgba(100, 149, 237, 0.3);
  border-radius: 6px;
  color: rgba(100, 149, 237, 1);
}

/* =========================
   VAULT DISPLAY CASES (Clean Minimalist)
   ========================= */
.vault-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.vault-card--empty {
  background: linear-gradient(135deg, rgba(255,255,255,0.005) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  opacity: 0.5;
}

.vault-card--empty:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

.vault-card:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}

.vault-card__display {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 0 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 8px;
  position: relative;
  transition: filter 0.3s ease;
}

.vault-card:hover .vault-card__display {
  filter: blur(8px);
}

.vault-card__info {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
  padding: 0;
}

.vault-card__float {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.95);
  line-height: 1;
}

/* Overlay that appears over the shard on hover */
.vault-card__popup {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.7) 100%);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.vault-card:hover .vault-card__popup {
  opacity: 1;
  pointer-events: all;
}

.vault-popup__name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.3px;
}

.vault-popup__rarity {
  font-size: 9px;
  color: rgba(255,200,100,0.8);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.vault-popup__planet {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.2px;
}

.vault-popup__date {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.vault-popup__remove {
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(255,60,60,0.2);
  border: 1px solid rgba(255,60,60,0.4);
  border-radius: 3px;
  color: rgba(255,100,100,0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.vault-popup__remove:hover {
  background: rgba(255,60,60,0.35);
  border-color: rgba(255,60,60,0.6);
  color: rgba(255,130,130,0.95);
}

/* Legacy styles for compatibility */
.vault-display-case {
  display: none;
}

.vault-glass-frame {
  display: none;
}

.vault-shard-container {
  display: none;
}

.vault-underglow {
  display: none;
}

/* =========================
   LEADERBOARD ENTRIES
   ========================= */
.leaderboard-entry {
  transition: all 0.2s ease !important;
}

.leaderboard-entry:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.06) 100%) !important;
  border-color: rgba(255,255,255,0.15) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
  transform: translateY(-2px);
}

#shardTypeSelect:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.18) !important;
}

#shardTypeSelect:focus {
  outline: none;
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(100,150,255,0.4) !important;
  box-shadow: 0 0 0 2px rgba(100,150,255,0.1);
}

#shardTypeSelect option {
  background: #1a1a1a;
  color: rgba(255,255,255,0.9);
  padding: 8px;
}

#shardTypeSelect option:hover {
  background: rgba(255,255,255,0.1);
}

.vault-pedestal {
  display: none;
}

.vault-info {
  display: none;
}

.vault-rarity {
  display: none;
}

.vault-name {
  display: none;
}

.vault-remove-btn {
  display: none;
}


/* =========================
   OPERATIONS (STEP 1: layout only)
   ========================= */

#operationsPage {
  min-height: 100vh;
  padding: 28px 32px;
  background-image: url('assets/ui/operations-bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Two big panels side-by-side */
.ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;

  /* makes it feel centered + wide like your target */
  max-width: 1100px;
  margin: 60px auto 0;
}

/* mobile stack */
@media (max-width: 900px) {
  .ops-grid {
    grid-template-columns: 1fr;
  }
}

/* Your JS outputs .ops-card, so make it look like a real panel */
.ops-card {
  border-radius: 18px;
  padding: 24px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  position: relative;
  overflow: visible;
  margin-bottom: 20px;
}

/* Header styling for ops cards */
.ops-card-header {
  margin-bottom: 18px;
}

.ops-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Give the select card some structure */
.ops-select-card {
  display: flex;
  gap: 14px;
  align-items: center;

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

  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
}

.ops-thumb img {
  width: 70px;
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
}

.ops-meta .ops-name {
  font-weight: 800;
  font-size: 18px;
}

.ops-meta .ops-sub {
  opacity: 0.75;
  margin-top: 6px;
  font-size: 14px;
}

.ops-link-btn {
  margin-top: 10px;
  background: transparent;
  border: 0;
  color: #2563eb;
  cursor: pointer;
  padding: 0;
  font-weight: 700;
}
.ops-link-btn:hover {
  color: #3b82f6;
}

/* Operations info tooltips - float higher */
.ops-tooltip {
  top: 0 !important;
  transform: translateY(-100%) translateY(-8px);
}
.ops-tooltip > div:last-child {
  /* Move arrow to bottom instead of top */
  top: auto !important;
  bottom: -6px;
  transform: rotate(225deg);
}

/*OPERATIONS MORE STUFF 

/* --- OPS MENU MINIMUM STYLES (prevents ugly default buttons) --- */
.ops-menu-overlay{
  position: relative;
  margin-top: 10px;
  z-index: 100;
}

.ops-menu{
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  max-height: 45vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ops-menu-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.ops-menu-close{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
}

.ops-menu-list{
  display:flex;
  flex-direction:column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.ops-menu-item{
  display:flex;
  align-items:center;
  gap: 10px;
  width: 100%;
  text-align:left;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: #fff;
  cursor: pointer;
}

.ops-menu-item:hover{
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.30);
}

.ops-menu-thumb img{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.ops-menu-name{
  font-weight: 800;
}

.ops-menu-sub{
  display:block;
  opacity: 0.75;
  font-size: 13px;
  margin-top: 2px;
}



.ops-select-card--vessel:not(:has(img)) {
  padding-left: 18px;
}



/* Fuel supports line + bar inside planet card */
.ops-fuel-support{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.ops-fuel-support-line{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  opacity: 0.92;
  margin-bottom: 10px;
}

.ops-fuel-support-icon{
  width: 26px;
  display: inline-flex;
  justify-content: center;
  opacity: 0.9;
}

.ops-fuel-support-track{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
}

.ops-fuel-support-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 215, 100, 0.95); /* warm “fuel” vibe */
}


/* ✅ Operations big Start button */
.ops-start-btn{
  width: min(720px, 92%);
  height: 74px;
  margin-top: 40px;
  border-radius: 18px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.95);
  background: rgba(40,120,255,0.18);
  border: 2px solid rgba(90,170,255,0.60);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 0 30px rgba(90,170,255,0.25);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform .08s ease, filter .15s ease, opacity .15s ease;
}

.ops-start-btn:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.ops-start-btn:active{
  transform: translateY(0px) scale(0.99);
}

.ops-start-btn.is-disabled,
.ops-start-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}







































/* =========================
   ITCH BUILD — HIDE DEV UI
   ========================= */

.itch #sidebar button[onclick*="showPage('developer')"],
.itch #sidebar button[onclick*='showPage("developer")'],
.itch #sidebar button[onclick*="showPage(developer)"],
.itch #developerPage {
  display: none !important;
}


/* =========================
   OPERATIONS STATUS INDICATOR
   Global corner indicator when ops running
   ========================= */
.ops-status-indicator {
  position: fixed;
  top: 68px;               /* Below money HUD */
  right: 22px;
  z-index: 9998;

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

  height: 34px;
  padding: 0 14px;
  border-radius: 10px;

  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(59, 130, 246, 0.15);

  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.2px;

  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.ops-status-indicator .ops-status-icon {
  font-size: 14px;
}

.ops-status-indicator .ops-status-text {
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Active state - subtle pulsing border */
.ops-status-indicator.ops-status--active {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(34, 197, 94, 0.18);
  animation: ops-pulse 2s ease-in-out infinite;
}

/* Paused state - yellow/orange */
.ops-status-indicator.ops-status--paused {
  border-color: rgba(251, 191, 36, 0.60);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(251, 191, 36, 0.18);
  animation: none;
}

@keyframes ops-pulse {
  0%, 100% {
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.35),
      0 0 20px rgba(34, 197, 94, 0.15);
  }
  50% {
    box-shadow:
      0 8px 24px rgba(0, 0, 0, 0.35),
      0 0 28px rgba(34, 197, 94, 0.30);
  }
}


/* =========================
   OPERATIONS PAUSE/RESUME/STOP BUTTONS
   ========================= */

/* Pause button - amber/yellow */
.ops-start-btn.ops-pause-btn {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.60);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 30px rgba(251, 191, 36, 0.20);
}

.ops-start-btn.ops-pause-btn:hover {
  filter: brightness(1.12);
}

/* Resume button - green */
.ops-start-btn.ops-resume-btn {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.60);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 30px rgba(34, 197, 94, 0.20);
}

.ops-start-btn.ops-resume-btn:hover {
  filter: brightness(1.12);
}

/* Stop button - red/danger */
.ops-start-btn.ops-stop-btn {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.60);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 30px rgba(239, 68, 68, 0.20);
}

.ops-start-btn.ops-stop-btn:hover {
  filter: brightness(1.12);
}

/* Tutorial Checklist (Map Page) */
.tutorial-checklist {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 10px;
  pointer-events: none;
}

/* Pulse animation for tutorial missions highlight */
@keyframes tutorialMissionsPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(79, 172, 254, 0.4), inset 0 0 4px rgba(79, 172, 254, 0.1); border-color: rgba(79, 172, 254, 0.5); }
  50% { box-shadow: 0 0 20px rgba(79, 172, 254, 0.8), inset 0 0 8px rgba(79, 172, 254, 0.2); border-color: rgba(79, 172, 254, 0.9); }
}
.tutorial-missions-pulse .tutorial-mission {
  animation: tutorialMissionsPulse 1s ease-in-out infinite !important;
}

.tutorial-checklist.hidden {
  display: none;
}

.tutorial-mission {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transition: all 0.2s ease;
}

.tutorial-mission:hover {
  border-color: rgba(79, 172, 254, 0.4);
  box-shadow: 0 8px 24px rgba(79, 172, 254, 0.2);
}

.tutorial-mission.completed:hover {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
  transform: scale(1.02);
}

.tutorial-mission__checkbox {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: bold;
  user-select: none;
  flex-shrink: 0;
}

.tutorial-mission.completed .tutorial-mission__checkbox {
  color: #22c55e;
}

.tutorial-mission.completed .tutorial-mission__text {
  color: #22c55e;
}

.tutorial-mission__text {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  flex: 1;
}

.tutorial-mission__claim {
  width: 100%;
  font-size: 9px;
  font-weight: 500;
  color: #22c55e;
  text-align: center;
  padding: 2px 6px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  opacity: 0.9;
  letter-spacing: 0.3px;
}

/* =========================
   GLOBAL CHAT PANEL
   ========================= */

/* Chat toggle button (attached to left edge of chat panel) */
.chat-toggle-btn {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(59, 130, 246, 0.3);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 3px 0 0 3px;
  padding: 8px 4px;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.3s ease;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.5);
  width: 20px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle-btn:hover {
  background: rgba(59, 130, 246, 1);
  left: -22px;
}

.chat-arrow {
  color: white;
  font-size: 12px;
  display: block;
  transition: transform 0.3s ease;
  line-height: 1;
}

/* Rotate arrow when chat is open */
.chat-toggle-btn.open .chat-arrow {
  transform: rotate(180deg);
}

/* Chat panel (slides in from right) */
.global-chat-panel {
  position: fixed;
  right: -25%;
  top: 0;
  width: 25%;
  height: 100vh;
  background: rgba(10, 15, 30, 0.98);
  backdrop-filter: blur(10px);
  border-left: 2px solid rgba(59, 130, 246, 0.3);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* Open state - slides into view */
.global-chat-panel.open {
  right: 0;
}

/* Chat content container */
.chat-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
}

/* Chat header */
.chat-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.1);
}

.chat-header h3 {
  margin: 0;
  font-size: 18px;
  color: white;
  font-weight: 700;
}

/* Messages container */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.chat-placeholder {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

/* Coming soon message */
.chat-coming-soon {
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  padding: 0;
  background: none;
  border: none;
}

/* Individual message */
.chat-message {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  word-wrap: break-word;
}

.chat-message-user {
  font-weight: 700;
  color: #60a5fa;
  font-size: 12px;
  margin-bottom: 4px;
}

.chat-message-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.4;
}

.chat-message-time {
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  margin-top: 4px;
}

/* Input container */
.chat-input-container {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  color: white;
  font-size: 14px;
  font-family: "PT Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input:focus {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.chat-send-btn {
  background: rgba(59, 130, 246, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: "PT Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.chat-send-btn:hover {
  background: rgba(59, 130, 246, 1);
  border-color: rgba(59, 130, 246, 0.8);
}

.chat-send-btn:active {
  transform: scale(0.98);
}

/* Custom scrollbar for chat messages */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* =========================
   RELIC STYLING
   ========================= */
/* Default relic sizing */
.relic-box {
  width: 64px !important;
  height: 64px !important;
}

.relic-img {
  width: 72px !important;
  height: 72px !important;
}

.relic-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Per-relic sizing: Claw is bigger */
.relic-claw.relic-box {
  width: 72px !important;
  height: 72px !important;
  --rbW: 2px;
  padding: 4px;
}

.relic-claw.relic-img {
  width: 85px !important;
  height: 85px !important;
  --rbW: 2px;
  padding: 4px;
}

/* Per-relic sizing: Worship Stone - same container size as claw for consistent look */
.relic-worshipstone.relic-box {
  width: 72px !important;
  height: 72px !important;
  padding: 4px;
  background: transparent !important;
  box-shadow: none !important;
}

/* Remove border (::after pseudo-element) for worship stone in leaderboard/vault */
.relic-worshipstone.relic-box::after,
.relic-worshipstone.relic-box::before {
  display: none !important;
}

/* Worship stone ONLY in vault - bigger than default */
.relic-vault-card .relic-worshipstone.relic-box {
  width: 90px !important;
  height: 90px !important;
}

.relic-worshipstone.relic-img {
  width: 85px !important;
  height: 85px !important;
  padding: 4px;
}

/* Remove border for worship stone in codex (without changing size) */
.relic-worshipstone-codex {
  background: transparent !important;
  box-shadow: none !important;
}

.relic-worshipstone-codex::after,
.relic-worshipstone-codex::before {
  display: none !important;
}

.relic-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.02) 100%);
  border-color: rgba(255, 215, 0, 0.2);
}

.relic-card:hover {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

/* =========================
   EVENTS PAGE
   ========================= */
#eventsPage h2 {
  text-align: left;
  font-size: 22px;
}

.events-section {
  width: 100%;
  max-width: 980px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px 22px;
}

.events-section-header {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.events-section-body {
  width: 100%;
}

.events-placeholder {
  text-align: center;
  font-size: 14px;
  opacity: 0.5;
  padding: 20px 0;
}

/* Shard event countdown card */
.shard-event-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 16px 18px;
  text-align: center;
}

.shard-event-status {
  font-size: 16px;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.shard-event-timer {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  margin-top: 8px;
}

.shard-event-label {
  font-size: 13px;
  opacity: 0.6;
  margin-top: 6px;
}

/* Celestial event status card */
.ce-event-card {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.20);
  border-radius: 12px;
  padding: 16px 18px;
  text-align: center;
}

.ce-event-status {
  font-size: 16px;
  font-weight: 700;
  color: rgba(34, 197, 94, 0.9);
}

.ce-event-timer {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-top: 6px;
}

.ce-event-detail {
  font-size: 13px;
  opacity: 0.6;
  margin-top: 6px;
}

/* =========================
   EVENTS TAB GREEN GLOW
   ========================= */
@keyframes eventsGlowSweep {
  0%              { background-position: 0% 0%; }
  57.14%          { background-position: 100% 100%; }
  57.15%, 100%    { background-position: 0% 0%; }
}

#eventsTabBtn.events-active-glow {
  background-image: linear-gradient(
    135deg,
    transparent 0%,
    transparent 38%,
    rgba(34, 197, 94, 0.2) 44%,
    rgba(34, 197, 94, 0.3) 50%,
    rgba(34, 197, 94, 0.2) 56%,
    transparent 62%,
    transparent 100%
  );
  background-size: 400% 400%;
  animation: eventsGlowSweep 7s ease-in-out infinite;
}

/* =======================
   ✅ GLOBAL FEED PANEL — single-line horizontal scroll, bottom-right
   ======================= */

.global-feed-panel {
  position: fixed;
  bottom: 15px;
  right: 35px;
  max-width: 765px;
  height: 34px;
  z-index: 100;
  display: none;
  align-items: center;
  background: rgba(8, 10, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 17px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.gf-label {
  flex-shrink: 0;
  padding: 0 10px 0 12px;
  font-weight: 800;
  font-size: 11px;
  opacity: 0.6;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  height: 100%;
  display: flex;
  align-items: center;
}

.gf-track {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  padding: 0 10px;
  scrollbar-width: none;
}

.gf-track::-webkit-scrollbar {
  display: none;
}

.gf-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gf-item b {
  font-weight: 700;
  font-size: 11px;
}

.gf-meta {
  opacity: 0.35;
  font-size: 10px;
}

.gf-sep {
  opacity: 0.12;
  padding: 0 4px;
  font-size: 13px;
  flex-shrink: 0;
}

.gf-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.gf-loading {
  opacity: 0.4;
  font-style: italic;
  font-size: 11px;
}

/* ✅ Mobile: slightly smaller */
@media (max-width: 768px) {
  .global-feed-panel {
    max-width: calc(100vw - 16px);
    right: 8px;
    bottom: 8px;
    height: 30px;
    font-size: 11px;
  }
  .gf-icon {
    width: 14px;
    height: 14px;
  }
}
