/* ===================================================
   GHOST SYNDICATE TOOLS — Main Stylesheet
   Star Citizen Companion — SC 4.7.1
   Theme: Command Terminal · Amber/Obsidian
   =================================================== */

:root {
  /* Backgrounds */
  --bg-dark:        #0c0a09;
  --bg-mid:         #111009;
  --bg-card:        rgba(18, 15, 8, 0.92);
  --bg-card-hover:  rgba(26, 21, 8, 0.96);
  --bg-glass:       rgba(12, 10, 9, 0.95);

  /* Accent — Amber / Gold */
  --accent:         #f59e0b;
  --accent-dim:     #b45309;
  --accent-light:   #fbbf24;
  --accent-glow:    rgba(245, 158, 11, 0.12);

  /* System colors (game-specific, intentionally different) */
  --stanton:        #00d4ff;
  --pyro:           #ff8c42;

  /* Status */
  --gold:           #fbbf24;
  --red:            #ef4444;
  --green:          #10b981;

  /* Text */
  --text-primary:   #fef3c7;
  --text-secondary: #a88b4a;
  --text-muted:     #8a7048;

  /* Borders */
  --border:         rgba(180, 83, 9, 0.25);
  --border-bright:  rgba(245, 158, 11, 0.5);

  /* Typography */
  --font-hud:   'Cinzel', serif;
  --font-body:  'Rajdhani', sans-serif;
  --font-mono:  'Share Tech Mono', monospace;

  /* Layout */
  --nav-h:      110px;
  --transition: 0.25s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 22px; }
body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
img { max-width: 100%; }

/* ===== CRT SCANLINES ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0,0,0,0) 50%, rgba(0,0,0,0.15) 50%),
    linear-gradient(90deg, rgba(255,60,0,0.02), rgba(0,0,0,0), rgba(255,180,0,0.02));
  background-size: 100% 4px, 4px 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0c0a09; }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== CONTAINER ===== */
.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.accent { color: var(--accent); }

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  min-height: var(--nav-h);
  background: rgba(12, 10, 9, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(180, 83, 9, 0.3);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 2px 30px rgba(0,0,0,0.7), 0 1px 0 rgba(245,158,11,0.1);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.logo-img {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245,158,11,0.45);
  box-shadow: 0 0 14px rgba(245,158,11,0.3), 0 0 28px rgba(245,158,11,0.12);
  flex-shrink: 0;
  transition: box-shadow var(--transition);
}
.logo-img:hover {
  box-shadow: 0 0 18px rgba(245,158,11,0.5), 0 0 36px rgba(245,158,11,0.2);
}
.logo-text-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.logo-text {
  font-family: var(--font-hud);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 1.2;
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.15rem;
  margin: 0;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-left: 3px solid transparent;
  font-family: var(--font-hud);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
  text-transform: uppercase;
}
.nav-link:hover {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(180,83,9,0.15) 0%, transparent 100%);
  border-left-color: var(--accent-dim);
}
.nav-link.active {
  color: var(--accent);
  background: linear-gradient(90deg, rgba(180,83,9,0.2) 0%, transparent 100%);
  border-left-color: var(--accent);
}
.nav-coming .badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  background: rgba(180,83,9,0.15);
  border: 1px solid rgba(180,83,9,0.4);
  border-radius: 2px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-social-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
  margin-right: 0.5rem;
}

.nav-social-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.45rem;
  border-radius: 3px;
  font-family: var(--font-hud);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.nav-social-btn svg { width: 13px; height: 13px; }
.nav-social-btn span { display: inline; }

.nav-social-dc  { color: #7289da; border-color: rgba(114,137,218,0.3); background: rgba(114,137,218,0.08); }
.nav-social-dc:hover  { background: rgba(114,137,218,0.2); border-color: rgba(114,137,218,0.6); }

.nav-social-yt  { color: #ff4444; border-color: rgba(255,68,68,0.3); background: rgba(255,68,68,0.08); }
.nav-social-yt:hover  { background: rgba(255,68,68,0.2); border-color: rgba(255,68,68,0.6); }

.nav-social-donate { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.nav-social-donate:hover { background: rgba(245,158,11,0.2); border-color: rgba(245,158,11,0.6); }

.nav-version {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   BOTTOM NAV (mobile only)
   ======================================== */
:root { --nav-bottom-h: 58px; }

.nav-bottom {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-bottom-h);
  background: rgba(10, 8, 7, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(180, 83, 9, 0.35);
  z-index: 1001;
  justify-content: space-around;
  align-items: stretch;
  /* Force GPU layer — fixes iOS Safari fixed positioning flicker */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  /* Safe area for notched iPhones */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 0.4rem 0.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease;
  position: relative;
}

.nav-bottom-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.nav-bottom-item:hover { color: var(--text-secondary); }

.nav-bottom-item.active {
  color: var(--accent);
}

.nav-bottom-item.active::after {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  display: none;
  min-height: 100vh;
  padding-top: var(--nav-h);
}
.section.active { display: block; }

/* ========================================
   HOME — Two-column full-viewport layout
   ======================================== */
.home-layout {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  padding: 2rem 3rem;
  gap: 2.5rem;
  overflow: hidden;
}

/* kept for JS compat */
.hero { display: none; }

/* Subtle background grid */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 60% 40%, rgba(180,83,9,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(245,158,11,0.04) 0%, transparent 60%);
}
/* Grid lines */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(180,83,9,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,83,9,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Stars element unused but kept for JS compat */
.stars { display: none; }
.nebula { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
}

/* Right column: modules */
.home-modules {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  border: 1px solid var(--border-bright);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  margin-bottom: 0.8rem;
  background: var(--accent-glow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-badge::before {
  content: '●';
  font-size: 0.5rem;
  animation: blink 1.5s step-end infinite;
  color: var(--green);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-logo-big {
  margin-bottom: 0.8rem;
  line-height: 1;
}
.hero-logo-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(245,158,11,0.55);
  box-shadow: 0 0 40px rgba(245,158,11,0.4), 0 0 80px rgba(245,158,11,0.18);
  animation: pulse-glow 4s ease-in-out infinite;
  display: block;
}

.hero-title {
  font-family: var(--font-hud);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-family: var(--font-hud);
  font-size: clamp(1rem, 2.5vw, 2rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent) 0%, var(--text-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0.75rem 0 1rem;
  line-height: 1.7;
  border-left: 2px solid var(--accent-dim);
  padding-left: 1rem;
}
.hero-desc strong {
  color: var(--accent);
  font-weight: 700;
}

.hero-stats {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.8rem 1.2rem;
  text-align: center;
  min-width: 110px;
  backdrop-filter: blur(8px);
  transition: all var(--transition);
  position: relative;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.stat-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 15px rgba(245,158,11,0.1);
}
.stat-num {
  display: block;
  font-family: var(--font-hud);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

/* Terminal emblem decoration */
.hero-ship {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ship-hologram {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.holo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent-dim);
  animation: rotate-ring var(--speed, 8s) linear infinite;
  opacity: 0.25;
}
.ring-1 { width: 280px; height: 280px; --speed: 20s; border-style: dashed; }
.ring-2 { width: 210px; height: 210px; --speed: 13s; animation-direction: reverse; }
.ring-3 { width: 140px; height: 140px; --speed: 8s; border-style: dotted; opacity: 0.4; }
.holo-core {
  font-size: 5rem;
  color: var(--accent);
  animation: pulse-glow 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(245,158,11,0.5)) drop-shadow(0 0 60px rgba(245,158,11,0.2));
  z-index: 1;
}
/* Hexagonal badge background */
.ship-hologram::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  background: rgba(180,83,9,0.06);
  border: 1px solid rgba(180,83,9,0.2);
  transform: rotate(45deg);
  border-radius: 8px;
}

@keyframes rotate-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: var(--accent);
  color: #0c0a09;
  font-family: var(--font-hud);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: all var(--transition);
  box-shadow: 0 0 20px rgba(245,158,11,0.3);
}
.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 35px rgba(245,158,11,0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-hud);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border-bright);
  border-radius: 3px;
  transition: all var(--transition);
}
.btn-ghost:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(245,158,11,0.15);
  transform: translateY(-1px);
}

.btn-icon { font-size: 0.9rem; }

/* ========================================
   SOCIAL LINKS (home hero)
   ======================================== */
.hero-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 3px;
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid;
}
.social-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}
.social-yt {
  color: #ff4444;
  border-color: rgba(255,68,68,0.45);
  background: rgba(255,68,68,0.08);
}
.social-yt:hover {
  background: rgba(255,68,68,0.18);
  border-color: #ff4444;
  box-shadow: 0 0 16px rgba(255,68,68,0.3);
  transform: translateY(-1px);
}
.social-dc {
  color: #7289da;
  border-color: rgba(114,137,218,0.45);
  background: rgba(114,137,218,0.08);
}
.social-dc:hover {
  background: rgba(114,137,218,0.18);
  border-color: #7289da;
  box-shadow: 0 0 16px rgba(114,137,218,0.3);
  transform: translateY(-1px);
}
.social-org {
  color: #e8a020;
  border-color: rgba(232,160,32,0.45);
  background: rgba(232,160,32,0.08);
}
.social-org:hover {
  background: rgba(232,160,32,0.18);
  border-color: #e8a020;
  box-shadow: 0 0 16px rgba(232,160,32,0.35);
  transform: translateY(-1px);
}

/* ========================================
   FEATURES / HOME MODULES
   ======================================== */
.section-title {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  text-align: left;
  text-transform: uppercase;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0.4rem 0 0;
  box-shadow: 0 0 8px rgba(245,158,11,0.5);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.feature-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.9rem 1rem;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover {
  border-color: rgba(180,83,9,0.6);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(245,158,11,0.08);
}
.feature-card:hover::before,
.feature-card:hover::after { opacity: 1; }
.feature-card.coming-soon { opacity: 0.55; cursor: default; }
.feature-card.coming-soon:hover { transform: none; box-shadow: none; border-color: var(--border); }
.feature-card.coming-soon:hover::before,
.feature-card.coming-soon:hover::after { opacity: 0; }

.feature-icon { font-size: 1.3rem; margin-bottom: 0.4rem; }
.feature-card h3 {
  font-family: var(--font-hud);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}
.feature-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.feature-link { font-size: 0.78rem; color: var(--accent); font-weight: 600; letter-spacing: 0.05em; }
.feature-coming {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: rgba(180,83,9,0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ========================================
   CRAFTING PAGE
   ======================================== */
.page-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.page-title {
  font-family: var(--font-hud);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  text-transform: uppercase;
}
.page-subtitle {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Controls */
.controls-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 1rem;
  flex: 1;
  min-width: 260px;
  transition: border-color var(--transition);
  backdrop-filter: blur(8px);
}
.search-box:focus-within {
  border-color: var(--accent-dim);
  box-shadow: 0 0 10px rgba(245,158,11,0.1);
}
.search-icon { color: var(--text-muted); font-size: 0.9rem; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  padding: 0.85rem 0;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-clear {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.2rem;
  line-height: 1;
  opacity: 0;
  transition: opacity var(--transition);
}
.search-clear.visible { opacity: 1; }
.search-clear:hover { color: var(--accent); }

.filters { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* Mission-only toggle button */
.btn-mission-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-mission-toggle:hover {
  border-color: var(--accent-dim);
  color: var(--text-primary);
}
.btn-mission-toggle.active {
  background: rgba(245,158,11,0.12);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(245,158,11,0.2);
}
.btn-mission-toggle .mission-toggle-icon { font-size: 0.9rem; }

.filter-select {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 0.92rem;
  padding: 0.65rem 1rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  backdrop-filter: blur(8px);
}
.filter-select:focus { border-color: var(--accent-dim); }
.filter-select option { background: #111009; }

/* Results bar */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.view-toggle { display: flex; gap: 0.5rem; }
.view-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition);
}
.view-btn.active, .view-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

/* Blueprint Grid */
.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}
.blueprint-grid.list-view {
  grid-template-columns: 1fr;
}

/* Blueprint Card */
.bp-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.bp-card:hover {
  border-color: rgba(180,83,9,0.55);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.5), 0 0 15px rgba(245,158,11,0.06);
}
.bp-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.bp-card:hover::after { opacity: 1; }


.bp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.bp-name {
  font-family: var(--font-hud);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  line-height: 1.35;
  flex: 1;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-mission-badge {
  flex-shrink: 0;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.35);
  color: var(--accent);
  font-size: 0.68rem;
  font-family: var(--font-mono);
  padding: 0.12rem 0.45rem;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bp-category {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.bp-cat-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-family: var(--font-mono);
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid;
  font-weight: 700;
  flex-shrink: 0;
}

.bp-ingredients {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}
.bp-ingredient {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  min-width: 0;
}
.ing-qty {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 2px;
  padding: 0.12rem 0.5rem;
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
}
.ing-name {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ing-slot {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
  flex-shrink: 0;
}

.bp-extra-ingredients { margin-top: 0.2rem; }
.bp-extra-ingredients.hidden { display: none; }

.bp-more-btn {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.2rem 0;
  background: none;
  border: none;
  border-top: 1px dashed rgba(245,158,11,0.2);
  color: var(--accent-dim);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}
.bp-more-btn:hover { color: var(--accent); }
.bp-more-btn.expanded { border-top-style: solid; }

.bp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
  flex-wrap: wrap;
}
.bp-time {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}
.bp-time .time-val { color: var(--gold); }
.bp-missions-label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.mission-tag {
  background: rgba(180,83,9,0.12);
  border: 1px solid rgba(180,83,9,0.35);
  color: var(--gold);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  overflow: hidden;
}
.mission-tag-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* System badges on cards */
.card-system-badge {
  font-size: 0.52rem;
  font-weight: 700;
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-system-stanton {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--stanton);
}
.card-system-pyro {
  background: rgba(255, 140, 66, 0.12);
  border: 1px solid rgba(255, 140, 66, 0.35);
  color: var(--pyro);
}
.card-system-nyx {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #a855f7;
}

/* List view */
.list-view .bp-card {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
}
.list-view .bp-header { margin-bottom: 0; }
.list-view .bp-category { margin-bottom: 0; align-self: center; }
.list-view .bp-footer { margin-top: 0; padding-top: 0; border-top: none; }
.list-view .bp-ingredient { display: none; }
.list-view .bp-ingredient:first-child { display: flex; }

/* Loading / Empty states */
.loading-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}
.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ========================================
   COMING SOON PAGES
   ======================================== */
.coming-soon-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  padding: 4rem 1.5rem;
}
.cs-icon { font-size: 3.5rem; opacity: 0.6; }
.coming-soon-page h2 {
  font-family: var(--font-hud);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.coming-soon-page p {
  color: var(--text-secondary);
  max-width: 480px;
  font-size: 0.95rem;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: min(700px, calc(100vw - 2rem));
  max-height: calc(100vh - 4rem);
  background: var(--bg-glass);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  z-index: 2001;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 50px rgba(245,158,11,0.08);
  backdrop-filter: blur(12px);
}
/* Top accent line on modal */
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: all var(--transition);
  z-index: 1;
}
.modal-close:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

.modal-content {
  padding: 2rem;
}

.modal-title {
  font-family: var(--font-hud);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  padding-right: 2.5rem;
  text-transform: uppercase;
}
.modal-category {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal-entity {
  font-size: 0.65rem;
  color: var(--accent-dim);
  margin-bottom: 1.5rem;
  word-break: break-all;
  font-family: var(--font-mono);
}

.modal-section-title {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 1.5rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.modal-ingredient-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(180,83,9,0.06);
  font-size: 1.1rem;
}
.modal-ingredient-row:last-child { border-bottom: none; }

.modal-qty {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 3px;
  padding: 0.25rem 0.7rem;
  min-width: 88px;
  text-align: center;
  white-space: nowrap;
}
.modal-res-name { flex: 1; color: var(--text-primary); font-weight: 500; }
.modal-slot { font-size: 0.88rem; color: var(--text-muted); font-style: italic; }
.modal-quality {
  font-size: 0.68rem;
  color: var(--gold);
  font-family: var(--font-mono);
}

/* Mission items in modal */
.modal-mission-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(180,83,9,0.1);
}
.modal-mission-item:last-child { border-bottom: none; }
.modal-mission-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.modal-contractor-badge {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.35);
  color: var(--accent);
  font-size: 0.65rem;
  font-family: var(--font-hud);
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: 2px;
  white-space: nowrap;
  text-transform: uppercase;
}
.modal-mission-name {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}
.modal-mission-titles {
  list-style: none;
  margin: 0.2rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.modal-mission-titles li {
  color: var(--text-primary);
  font-size: 0.88rem;
  padding: 0.2rem 0 0.2rem 1rem;
  position: relative;
}
.modal-mission-titles li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}
.modal-mission-pool {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}
.modal-weight {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--green);
}

/* System badges in mission items */
.mission-system-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.mission-system-stanton {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--stanton);
}
.mission-system-pyro {
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid rgba(255, 140, 66, 0.35);
  color: var(--pyro);
}
.mission-system-nyx {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #a855f7;
}

/* Difficulty badges */
.mission-diffs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.mission-diff-badge {
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  cursor: default;
  text-transform: uppercase;
}

/* Scrip table */
.mission-scrip-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.78rem;
}
.mission-scrip-table thead tr {
  background: rgba(245,158,11,0.06);
}
.mission-scrip-table th {
  text-align: left;
  padding: 0.25rem 0.6rem;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(245,158,11,0.15);
  font-family: var(--font-hud);
}
.mission-scrip-table td {
  padding: 0.22rem 0.6rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.mission-scrip-table td:first-child {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  width: 6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.scrip-unit {
  font-size: 0.65rem;
  color: var(--accent);
  opacity: 0.8;
}
.scrip-auec {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-style: italic;
}

.modal-no-data {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  padding: 0.5rem 0;
}

/* Craft time */
.modal-craft-time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--bg-glass);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(8px);
}
.footer-logo {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.footer-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.8rem;
}
.footer-link {
  color: var(--accent);
  text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.footer-link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link-btn:hover { color: var(--accent); }
.footer-sep { color: var(--border); font-size: 0.72rem; }
.footer-copy {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.6;
  margin-top: 0.4rem;
}

/* Donate button */
.social-donate { color: #009cde; }
.social-donate:hover {
  background: rgba(0,156,222,0.15);
  border-color: rgba(0,156,222,0.5);
  color: #009cde;
}

/* Legal modal */
.legal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.legal-overlay.open { opacity: 1; pointer-events: all; }
.legal-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(700px, 92vw);
  max-height: 80vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 2001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.legal-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%);
}
.legal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  gap: 0;
  flex-shrink: 0;
}
.legal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.9rem 1.2rem 0.7rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.legal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.legal-tab:hover:not(.active) { color: var(--text-primary); }
.legal-body {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.legal-body h2 {
  font-family: var(--font-hud);
  font-size: 0.88rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin: 1.2rem 0 0.4rem;
  text-transform: uppercase;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin-bottom: 0.7rem; }
.legal-body a { color: var(--accent); }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(245,158,11,0.4));
    opacity: 0.9;
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(245,158,11,0.7)) drop-shadow(0 0 40px rgba(245,158,11,0.3));
    opacity: 1;
  }
}

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

.bp-card { animation: fadeInUp 0.3s ease both; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .home-layout {
    grid-template-columns: 1fr 1fr;
    padding: 1.5rem 2rem;
    gap: 1.5rem;
  }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive nav: shrinks progressively, never disappears until true mobile ── */

/* Step 1 — 1280px: drop social text + logo subtitle */
@media (max-width: 1280px) {
  .logo-sub { display: none; }
  .nav-social-btn span { display: none; }
  .nav-social-btn { padding: 0.28rem 0.4rem; }
  .nav-version { font-size: 0.75rem; }
}

/* Step 2 — 1100px: compact link padding + smaller font */
@media (max-width: 1100px) {
  .nav-link { padding: 0.55rem 0.75rem; font-size: 0.8rem; letter-spacing: 0.07em; }
  .logo-img { width: 66px; height: 66px; }
  .logo-text { font-size: 1rem; }
  .nav-version { display: none; }
}

/* Step 3 — 950px: shrink further, hide social bar entirely */
@media (max-width: 950px) {
  .nav-link { padding: 0.45rem 0.45rem; font-size: 0.7rem; letter-spacing: 0.04em; }
  .nav-social-bar { display: none; }
  .logo-img { width: 54px; height: 54px; }
  .logo-text { font-size: 0.88rem; }
}

/* Step 4 — 750px: switch to bottom nav (phones) */
@media (max-width: 750px) {
  .nav-links { display: none !important; }
  .nav-hamburger { display: none !important; }
  .nav-social-bar { display: none; }
  .nav-bottom { display: flex; }
  .section { padding-bottom: calc(var(--nav-bottom-h) + 0.5rem); }
}

@media (max-width: 900px) {
  /* Home stacks vertically on tablet/mobile */
  .home-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2rem 1.5rem;
    gap: 2rem;
    text-align: center;
  }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-badge { text-align: center; }
  .hero-desc { text-align: left; }
  .hero-logo-img { width: 130px; height: 130px; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-social { justify-content: center; }
  .home-modules { text-align: left; }
  .section-title { text-align: center; }
  .section-title::after { margin: 0.4rem auto 0; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  /* Crafting controls */
  .controls-bar { flex-direction: column; }
  .search-box { min-width: unset; width: 100%; }
  .filters { width: 100%; }
  .filter-select { flex: 1; }

  .list-view .bp-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .list-view .bp-ingredient { display: flex; }
}

@media (max-width: 600px) {
  --nav-h: 80px;
  .logo-img { width: 56px; height: 56px; }
  .logo-text { font-size: 0.85rem; }
  .blueprint-grid { grid-template-columns: 1fr; }
  .stat-card { min-width: 80px; }
  .hero-stats { gap: 0.6rem; }
  .modal-ingredient-row { flex-wrap: wrap; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-logo-img { width: 110px; height: 110px; }
  .hero-title { font-size: 1.3rem; }
}

/* ========================================
   COMPARADOR TABS
   ======================================== */
.comp-tabs {
  display: flex;
  gap: 0.15rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.comp-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  font-family: var(--font-hud);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  bottom: -1px;
}
.comp-tab:hover { color: var(--text-primary); }
.comp-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.comp-badge {
  background: var(--accent);
  color: #0c0a09;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}
.comp-badge:empty,
.comp-badge[data-count="0"] { background: var(--bg-card); color: var(--text-muted); }

/* ========================================
   WIKELODATA PORTAL
   ======================================== */
.wikelo-portal {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 280px);
  padding: 3rem 0;
}
.wikelo-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3rem;
  max-width: 580px;
  width: 100%;
  text-align: center;
  position: relative;
  backdrop-filter: blur(12px);
}
.wikelo-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.wikelo-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
  animation: pulse-glow 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(245,158,11,0.5));
}
.wikelo-card h2 {
  font-family: var(--font-hud);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.wikelo-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.8rem;
}
.wikelo-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.wikelo-feat {
  background: var(--accent-glow);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== WIKELODATA ===== */
.wk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.wk-tab {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}
.wk-tab:hover {
  border-color: rgba(245,158,11,0.4);
  color: var(--text-primary);
}
.wk-tab.active {
  background: rgba(245,158,11,0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.wk-search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.wk-search-bar .search-box { flex: 1; }
.wk-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.wk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.wk-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.1rem 1.2rem;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.wk-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.wk-card:hover {
  border-color: rgba(180,83,9,0.5);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.5);
}
.wk-card:hover::after { opacity: 1; }
.wk-card-header { margin-bottom: 0.6rem; }
.wk-item-name {
  font-family: var(--font-hud);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-transform: uppercase;
  line-height: 1.3;
}
.wk-mission {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}
.wk-mission-icon { font-size: 0.8rem; }
.wk-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.wk-cost-list {
  list-style: none;
  margin: 0 0 0.6rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.wk-cost-item {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  line-height: 1.35;
}
.wk-bullet {
  color: var(--accent-dim);
  font-size: 0.65rem;
  flex-shrink: 0;
}
.wk-comps {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.wk-comps-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-hud);
  width: 100%;
  margin-bottom: 0.2rem;
}
.wk-comp-tag {
  font-size: 0.68rem;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-family: var(--font-mono);
}
/* Economy tables */
.wk-table-block {
  margin-bottom: 2rem;
}
.wk-table-title {
  font-family: var(--font-hud);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(245,158,11,0.2);
}
.wk-table-wrap { overflow-x: auto; }
.wk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.wk-table th {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wk-table td {
  padding: 0.55rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  line-height: 1.4;
}
.wk-table tr:hover td { background: rgba(255,255,255,0.03); }
.wk-table td:first-child { color: var(--text-primary); }

/* ===== HANGAR EJECUTIVO ===== */
:root {
  --hng-green: #4caf50;
  --hng-red:   #f44336;
}
.hng-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .hng-layout { grid-template-columns: 1fr; }
}

/* Status card */
.hng-status-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.hng-card-online {
  border-color: rgba(76,175,80,0.5);
  box-shadow: 0 0 30px rgba(76,175,80,0.12);
}
.hng-card-offline {
  border-color: rgba(244,67,54,0.4);
  box-shadow: 0 0 30px rgba(244,67,54,0.08);
}
.hng-status-label {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.hng-status-value {
  font-family: var(--font-hud);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
  transition: color 0.4s;
}
.hng-online  { color: var(--hng-green); text-shadow: 0 0 20px rgba(76,175,80,0.5); }
.hng-offline { color: var(--hng-red);   text-shadow: 0 0 20px rgba(244,67,54,0.4); }

.hng-countdown-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-hud);
  margin-bottom: 0.3rem;
}
.hng-countdown {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

/* Circles */
.hng-circles {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.hng-circle {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  transition: background 0.4s, border-color 0.4s;
}
.hng-cycle-info {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Alert button */
.hng-alert-btn {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hng-alert-btn:hover {
  border-color: rgba(245,158,11,0.4);
  color: var(--text-secondary);
}
.hng-alert-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
}
.hng-alert-btn.hng-alert-active {
  background: rgba(245,158,11,0.1);
  border-color: rgba(245,158,11,0.5);
  color: var(--accent);
}
.hng-alert-btn.hng-alert-active .hng-alert-icon {
  animation: hng-ring 1.5s ease infinite;
}
@keyframes hng-ring {
  0%,100% { transform: rotate(0deg); }
  10%      { transform: rotate(-15deg); }
  20%      { transform: rotate(15deg); }
  30%      { transform: rotate(-10deg); }
  40%      { transform: rotate(10deg); }
  50%      { transform: rotate(0deg); }
}
.hng-alert-status {
  margin-top: 0.4rem;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
  min-height: 1em;
}

/* Toast notification */
.hng-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(12,10,9,0.95);
  border: 1px solid rgba(245,158,11,0.6);
  color: var(--accent);
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.hng-toast.hng-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Schedule card */
.hng-schedule-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}
.hng-schedule-title {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(245,158,11,0.2);
}
.hng-table-wrap { overflow-x: auto; }
.hng-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.hng-table th {
  font-family: var(--font-hud);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hng-table td {
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
}
.hng-table tr:hover td { background: rgba(255,255,255,0.02); }
.hng-td-cycle {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  vertical-align: middle;
}
.hng-td-online  { color: var(--hng-green); font-family: var(--font-hud); letter-spacing: 0.06em; }
.hng-td-offline { color: var(--hng-red);   font-family: var(--font-hud); letter-spacing: 0.06em; }

/* =====================================================
   MINING MODULE STYLES
   ===================================================== */

/* --- Tabs --- */
.mn-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.mn-tab {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}
.mn-tab:hover {
  border-color: rgba(245,158,11,0.4);
  color: var(--text-primary);
}
.mn-tab.active {
  background: rgba(245,158,11,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Error state --- */
.mn-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  border-radius: 6px;
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* --- Section title --- */
.mn-section-title {
  font-family: var(--font-hud);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.2rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(245,158,11,0.2);
}
.mn-section-hint {
  font-size: 0.7rem;
  opacity: 0.55;
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}

/* =====================================================
   MINERALES TAB
   ===================================================== */

.mn-search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.mn-search-bar .search-box { flex: 1; }
.mn-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.mn-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.mn-table-wrap { overflow-x: auto; margin-bottom: 0.5rem; }
.mn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.mn-table thead { position: sticky; top: 0; z-index: 2; }
.mn-th {
  background: var(--bg-glass);
  font-family: var(--font-hud);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition);
}
.mn-th:hover { color: var(--text-primary); }
.mn-th.active { color: var(--accent); }
.mn-mineral-row td {
  padding: 0.45rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}
.mn-mineral-row:hover td { background: rgba(255,255,255,0.025); }
.mn-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
  flex-shrink: 0;
}
.mn-symbol {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}
.mn-price {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}
.mn-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.3rem;
}
.mn-explosive-tag { font-size: 0.8rem; }

/* Resistance / instability bars */
.mn-bar-wrap {
  display: inline-block;
  width: 60px;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  vertical-align: middle;
  overflow: hidden;
}
.mn-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Optimal window bar */
.mn-opt-bar { min-width: 120px; }
.mn-opt-track {
  position: relative;
  width: 120px;
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: visible;
}
.mn-opt-zone {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 3px;
  transition: left 0.3s, width 0.3s;
}
.mn-opt-label-min,
.mn-opt-label-max {
  position: absolute;
  top: 12px;
  font-size: 0.55rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}
.mn-opt-label-max { transform: translateX(-50%); }

/* Rarity badges */
.mn-rarity {
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
}
.mn-rarity-legendary { color: #ff6b35; border-color: rgba(255,107,53,0.4); background: rgba(255,107,53,0.1); }
.mn-rarity-epic      { color: #9b59b6; border-color: rgba(155,89,182,0.4); background: rgba(155,89,182,0.1); }
.mn-rarity-rare      { color: #3498db; border-color: rgba(52,152,219,0.4); background: rgba(52,152,219,0.1); }
.mn-rarity-uncommon  { color: #2ecc71; border-color: rgba(46,204,113,0.4); background: rgba(46,204,113,0.1); }
.mn-rarity-common    { color: var(--text-secondary); border-color: var(--border); background: transparent; }
.mn-rarity-abundant  { color: var(--text-muted); border-color: rgba(255,255,255,0.1); background: transparent; }

.mn-table-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
  font-family: var(--font-mono);
}

/* =====================================================
   LOCALIZACIONES TAB
   ===================================================== */

/* System sub-tabs */
.mn-sys-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.mn-sys-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all var(--transition);
}
.mn-sys-tab:hover { border-color: rgba(245,158,11,0.4); color: var(--text-primary); }
.mn-sys-tab.active { background: rgba(245,158,11,0.08); border-color: var(--accent); color: var(--text-primary); }
.mn-sys-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mn-sys-stanton { background: var(--stanton); box-shadow: 0 0 6px var(--stanton); }
.mn-sys-pyro    { background: var(--pyro);    box-shadow: 0 0 6px var(--pyro); }

/* Location grid */
.mn-loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.mn-loc-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  backdrop-filter: blur(6px);
  transition: border-color var(--transition), background var(--transition);
}
.mn-loc-card:hover {
  border-color: rgba(245,158,11,0.3);
  background: var(--bg-card-hover);
}
.mn-loc-header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.mn-loc-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1; }
.mn-loc-title-block { flex: 1; min-width: 0; }
.mn-loc-name {
  font-family: var(--font-hud);
  font-size: 0.88rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.mn-loc-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.mn-difficulty-badge {
  font-family: var(--font-hud);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.mn-diff-verylw  { color: #10b981; border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.08); }
.mn-diff-low     { color: #34d399; border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.06); }
.mn-diff-med     { color: #fbbf24; border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.08); }
.mn-diff-high    { color: #f97316; border-color: rgba(249,115,22,0.4); background: rgba(249,115,22,0.08); }
.mn-diff-veryhigh{ color: #ef4444; border-color: rgba(239,68,68,0.4);  background: rgba(239,68,68,0.08); }

.mn-mineral-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.mn-mineral-chip {
  font-size: 0.65rem;
  font-family: var(--font-hud);
  letter-spacing: 0.04em;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  border: 1px solid;
  background: rgba(0,0,0,0.3);
}
.mn-loc-notes {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

/* =====================================================
   SCAN VALUE BADGE (Minerales table)
   ===================================================== */
.mn-scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2em 0.55em;
  border-radius: 3px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.mn-scan-mult {
  font-size: 0.6rem;
  opacity: 0.7;
  font-weight: 400;
}
.mn-scan-na {
  color: var(--text-muted);
  font-size: 0.8rem;
}
/* Scan badge colours per rarity */
.mn-scan-legendary { color: #ff9500; background: rgba(255,149,0,0.1);   border-color: rgba(255,149,0,0.4); }
.mn-scan-epic      { color: #bf5af2; background: rgba(191,90,242,0.1);  border-color: rgba(191,90,242,0.4); }
.mn-scan-rare      { color: #00d4ff; background: rgba(0,212,255,0.08);  border-color: rgba(0,212,255,0.35); }
.mn-scan-uncommon  { color: #30d158; background: rgba(48,209,88,0.08);  border-color: rgba(48,209,88,0.35); }
.mn-scan-common    { color: #8e8e93; background: rgba(142,142,147,0.08);border-color: rgba(142,142,147,0.3); }

/* =====================================================
   ESCÁNER TAB
   ===================================================== */

/* Lookup box */
.mn-scan-lookup {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.6rem;
}
.mn-scan-lookup-label {
  font-family: var(--font-hud);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.mn-scan-lookup-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.mn-scan-input {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  width: 180px;
  outline: none;
  transition: border-color var(--transition);
}
.mn-scan-input:focus { border-color: rgba(245,158,11,0.6); }
.mn-scan-input-clear {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  transition: all var(--transition);
}
.mn-scan-input-clear:hover { border-color: var(--accent); color: var(--accent); }

/* Result area */
.mn-scan-result {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mn-scan-result-none {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.mn-scan-result-found {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.mn-scan-match-big {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 7px;
  border: 1px solid currentColor;
}
.mn-scan-match-name   { font-weight: 700; font-size: 0.95rem; }
.mn-scan-match-mult   { font-family: var(--font-mono); font-size: 0.8rem; opacity: 0.8; }
.mn-scan-match-rarity { font-size: 0.7rem; opacity: 0.65; }

/* Coloured match cards — reuse scan badge palette */
.mn-scan-result-legendary { color: #ff9500; background: rgba(255,149,0,0.1);   border-color: rgba(255,149,0,0.4); }
.mn-scan-result-epic      { color: #bf5af2; background: rgba(191,90,242,0.1);  border-color: rgba(191,90,242,0.4); }
.mn-scan-result-rare      { color: #00d4ff; background: rgba(0,212,255,0.08);  border-color: rgba(0,212,255,0.35); }
.mn-scan-result-uncommon  { color: #30d158; background: rgba(48,209,88,0.08);  border-color: rgba(48,209,88,0.35); }
.mn-scan-result-common    { color: #8e8e93; background: rgba(142,142,147,0.08);border-color: rgba(142,142,147,0.3); }
.mn-scan-result-special   { color: #f0b030; background: rgba(240,176,48,0.08); border-color: rgba(240,176,48,0.3); }

/* Close matches */
.mn-scan-result-close { gap: 0.3rem; }
.mn-scan-close-hint   { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.2rem; }
.mn-scan-close-item   { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.mn-scan-close-val    { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-primary); min-width: 55px; }
.mn-scan-close-diff   { font-size: 0.7rem; color: var(--text-muted); min-width: 38px; }

/* Section title */
.mn-scan-section { margin-bottom: 1.6rem; }
.mn-scan-section-title {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

/* Scanner table */
.mn-scan-table { width: 100%; }
.mn-scan-th {
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  text-align: center;
  white-space: nowrap;
}
.mn-scan-th-name { text-align: left; min-width: 130px; }
.mn-scan-th-lvl  { min-width: 72px; }

/* Category header row */
.mn-scan-cat-header td { padding: 0; }
.mn-scan-cat-title {
  padding: 0.4rem 0.7rem 0.3rem;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.mn-scan-cat-maxmult {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Mineral rows */
.mn-scan-mineral-row:hover { background: rgba(255,255,255,0.03); }
.mn-scan-mineral-name {
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Value cells */
.mn-scan-cell {
  padding: 0.38rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,0.04);
}
.mn-scan-cell-empty    { background: transparent; }
.mn-scan-cell-legendary{ color: #ff9500; background: rgba(255,149,0,0.06); }
.mn-scan-cell-epic     { color: #bf5af2; background: rgba(191,90,242,0.06); }
.mn-scan-cell-rare     { color: #00d4ff; background: rgba(0,212,255,0.05); }
.mn-scan-cell-uncommon { color: #30d158; background: rgba(48,209,88,0.05); }
.mn-scan-cell-common   { color: #8e8e93; }
.mn-scan-cell-special  { color: #f0b030; background: rgba(240,176,48,0.05); }
.mn-scan-special       { color: #f0b030; background: rgba(240,176,48,0.1); border-color: rgba(240,176,48,0.35); }

/* =====================================================
   LOCALIZACIONES — FILTERS
   ===================================================== */
.mn-loc-controls {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.mn-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.mn-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.mn-filter-label {
  font-size: 0.68rem;
  font-family: var(--font-hud);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.mn-filter-btns {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.mn-filter-btn {
  font-size: 0.72rem;
  font-family: var(--font-hud);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.mn-filter-btn:hover { border-color: rgba(245,158,11,0.4); color: var(--text-primary); }
.mn-filter-btn.active {
  background: rgba(245,158,11,0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* Mineral filter chips */
.mn-filter-minerals {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.mn-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.mn-filter-chip {
  font-size: 0.65rem;
  font-family: var(--font-hud);
  padding: 0.2em 0.6em;
  border-radius: 3px;
  border: 1px solid var(--chip-color, #888);
  background: rgba(0,0,0,0.3);
  color: var(--chip-color, #888);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  transition: all var(--transition);
  opacity: 0.65;
}
.mn-filter-chip:hover { opacity: 1; }
.mn-filter-chip.active {
  opacity: 1;
  background: color-mix(in srgb, var(--chip-color, #888) 18%, transparent);
  box-shadow: 0 0 6px color-mix(in srgb, var(--chip-color, #888) 40%, transparent);
}
.mn-filter-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mineral chips inside card — clickable */
.mn-mineral-chip {
  cursor: pointer;
  transition: opacity var(--transition), box-shadow var(--transition);
}
.mn-mineral-chip:hover { opacity: 0.85; }
.mn-mineral-chip.highlighted {
  box-shadow: 0 0 6px currentColor;
  opacity: 1;
}

/* Filter summary bar */
.mn-filter-summary {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.mn-filter-reset {
  font-size: 0.68rem;
  font-family: var(--font-hud);
  padding: 0.15em 0.55em;
  border: 1px solid rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.07);
  color: #ef4444;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
}
.mn-filter-reset:hover { background: rgba(239,68,68,0.15); }

/* Profit badge on location cards */
.mn-loc-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}
.mn-profit-badge {
  font-size: 0.75rem;
  line-height: 1;
}
.mn-profit-low { opacity: 0.3; }

/* No results */
.mn-no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem;
}

/* =====================================================
   RECURSOS TAB
   ===================================================== */

/* Nyx system color */
:root { --nyx: #a855f7; }

.mn-res-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Mineral selector chips panel */
.mn-res-mineral-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mn-res-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.mn-res-chip {
  font-size: 0.67rem;
  font-family: var(--font-hud);
  letter-spacing: 0.04em;
  padding: 0.22em 0.6em;
  border-radius: 4px;
  border: 1px solid;
  background: rgba(0,0,0,0.45);
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.55;
  white-space: nowrap;
}
.mn-res-chip:hover { opacity: 0.85; transform: translateY(-1px); }
.mn-res-chip.active { opacity: 1; transform: translateY(-1px); box-shadow: 0 0 7px currentColor; }

.mn-res-chip-legendary { color: #ff6b35; border-color: rgba(255,107,53,0.4); }
.mn-res-chip-legendary.active { background: rgba(255,107,53,0.12); }
.mn-res-chip-epic      { color: #9b59b6; border-color: rgba(155,89,182,0.4); }
.mn-res-chip-epic.active      { background: rgba(155,89,182,0.12); }
.mn-res-chip-rare      { color: #3498db; border-color: rgba(52,152,219,0.4); }
.mn-res-chip-rare.active      { background: rgba(52,152,219,0.12); }
.mn-res-chip-uncommon  { color: #2ecc71; border-color: rgba(46,204,113,0.4); }
.mn-res-chip-uncommon.active  { background: rgba(46,204,113,0.12); }
.mn-res-chip-common    { color: var(--text-secondary); border-color: var(--border); }
.mn-res-chip-common.active    { background: rgba(168,139,74,0.12); }

/* ── Controls row */
.mn-res-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ── Nyx system dot */
.mn-sys-nyx { background: var(--nyx); box-shadow: 0 0 5px var(--nyx); }

/* ── System badges on cards */
.mn-res-sys-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.1em 0.4em;
  border-radius: 2px;
  border: 1px solid;
}
.mn-res-sys-stanton { color: var(--stanton); border-color: rgba(0,212,255,0.35); background: rgba(0,212,255,0.07); }
.mn-res-sys-pyro    { color: var(--pyro);    border-color: rgba(255,140,66,0.35); background: rgba(255,140,66,0.07); }
.mn-res-sys-nyx     { color: var(--nyx);     border-color: rgba(168,85,247,0.35); background: rgba(168,85,247,0.07); }

.mn-res-method-badge {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* ── Mineral selected header */
.mn-res-mineral-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 0.7rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(245,158,11,0.15);
}
.mn-res-mineral-name {
  font-family: var(--font-hud);
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  flex: 1;
}
.mn-res-loc-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ── Location cards */
.mn-res-loc-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mn-res-loc-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  transition: border-color var(--transition), background var(--transition);
}
.mn-res-loc-card:hover {
  border-color: rgba(245,158,11,0.28);
  background: var(--bg-card-hover);
}

.mn-res-loc-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.mn-res-type-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 1.4rem;
  text-align: center;
  opacity: 0.8;
}
.mn-res-loc-info { flex: 1; min-width: 0; }
.mn-res-loc-name {
  font-family: var(--font-hud);
  font-size: 0.82rem;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mn-res-loc-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.18rem;
  flex-wrap: wrap;
}
.mn-res-conc-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
  min-width: 4rem;
  text-align: right;
}

/* ── Concentration bars */
.mn-res-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}
.mn-res-bar-sm { height: 4px; }

.mn-res-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}
.mn-res-bar-legendary { background: linear-gradient(90deg, #ff6b35, #ff9500); }
.mn-res-bar-epic      { background: linear-gradient(90deg, #9b59b6, #bf5af2); }
.mn-res-bar-rare      { background: linear-gradient(90deg, #3498db, #00d4ff); }
.mn-res-bar-uncommon  { background: linear-gradient(90deg, #2ecc71, #30d158); }
.mn-res-bar-common    { background: linear-gradient(90deg, #b45309, #f59e0b); }

/* ── Hotspots grid */
.mn-res-hotspot-header {
  font-family: var(--font-hud);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.mn-res-hs-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
}

.mn-res-hotspot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 0.7rem;
}

.mn-res-hotspot-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  transition: border-color var(--transition);
}
.mn-res-hotspot-card:hover { border-color: rgba(245,158,11,0.28); }

.mn-res-hotspot-minerals {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.45rem;
}
.mn-res-hotspot-mineral {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.mn-res-hs-name {
  font-family: var(--font-hud);
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  width: 138px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* inherits text color from mn-res-chip-* without border/bg */
  border: none !important;
  background: transparent !important;
  opacity: 0.85;
  cursor: default;
  padding: 0;
  transform: none !important;
  box-shadow: none !important;
}
.mn-res-hs-conc {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 3.2rem;
  text-align: right;
}

/* ── Loading state */
.mn-res-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .mn-res-hotspot-grid { grid-template-columns: 1fr; }
  .mn-res-hs-name { width: 100px; }
  .mn-res-conc-label { min-width: 3rem; }
}

/* =====================================================
   CONFIGURADOR TAB
   ===================================================== */

.mn-config-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .mn-config-layout { grid-template-columns: 1fr; }
}

/* Ship grid */
.mn-ship-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.mn-ship-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.mn-ship-card:hover {
  border-color: rgba(245,158,11,0.4);
  background: var(--bg-card-hover);
}
.mn-ship-card.selected {
  border-color: var(--accent);
  background: rgba(245,158,11,0.08);
  box-shadow: 0 0 12px rgba(245,158,11,0.12);
}
.mn-ship-icon { font-size: 1.4rem; margin-bottom: 0.2rem; }
.mn-ship-name {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.mn-ship-stats {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.mn-ship-note {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-style: italic;
}

/* Laser slots */
.mn-laser-slots {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.mn-laser-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mn-laser-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mn-slot-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 5px;
  padding: 0.6rem;
}
.mn-slot-label {
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.mn-module-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.mn-select {
  width: 100%;
  background: rgba(12,10,9,0.95);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a88b4a' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.5rem;
}
.mn-select:hover, .mn-select:focus {
  border-color: rgba(245,158,11,0.5);
  outline: none;
  color: var(--text-primary);
}
.mn-select-sm { font-size: 0.7rem; padding: 0.25rem 0.4rem; padding-right: 1.2rem; }
.mn-select option { background: #1a1208; color: var(--text-primary); }

/* Gadgets row */
.mn-gadget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Mineral/rock section */
.mn-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.mn-preset-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  line-height: 1.3;
}
.mn-preset-btn small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}
.mn-preset-btn:hover {
  border-color: rgba(245,158,11,0.4);
  color: var(--text-secondary);
}
.mn-preset-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245,158,11,0.08);
}
.mn-custom-mass {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.mn-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.mn-input {
  flex: 1;
  background: rgba(12,10,9,0.95);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  transition: border-color var(--transition);
}
.mn-input:focus {
  outline: none;
  border-color: rgba(245,158,11,0.5);
}

/* =====================================================
   RESULTS PANEL
   ===================================================== */

.mn-results-placeholder {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.mn-results-icon { font-size: 2.5rem; margin-bottom: 0.8rem; opacity: 0.5; }

.mn-results {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  backdrop-filter: blur(8px);
}

/* Verdict */
.mn-verdict {
  font-family: var(--font-hud);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid;
  margin-bottom: 1rem;
}
.mn-verdict-easy       { color: #10b981; border-color: rgba(16,185,129,0.5); background: rgba(16,185,129,0.1); }
.mn-verdict-medium     { color: #fbbf24; border-color: rgba(251,191,36,0.5); background: rgba(251,191,36,0.08); }
.mn-verdict-hard       { color: #f97316; border-color: rgba(249,115,22,0.5); background: rgba(249,115,22,0.08); }
.mn-verdict-critical   { color: #ef4444; border-color: rgba(239,68,68,0.5);  background: rgba(239,68,68,0.08); }
.mn-verdict-impossible { color: #ff2020; border-color: rgba(255,32,32,0.7);  background: rgba(255,32,32,0.13); font-weight: 700; }

/* Window meter */
.mn-window-meter-wrap { margin-bottom: 1rem; }
.mn-meter-label {
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.mn-window-meter {
  position: relative;
  width: 100%;
  height: 20px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.08);
}
.mn-window-zone {
  position: absolute;
  top: 0;
  height: 100%;
  border: 1px solid;
  border-radius: 3px;
}
.mn-window-cursor {
  position: absolute;
  top: -4px;
  width: 3px;
  height: calc(100% + 8px);
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255,255,255,0.6);
}
.mn-meter-tick {
  position: absolute;
  top: 22px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Throttle */
.mn-throttle-section { margin-bottom: 1rem; }
.mn-throttle-label {
  font-family: var(--font-hud);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.mn-throttle-gauge {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.25rem;
}
.mn-throttle-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}
.mn-throttle-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

/* Stats grid */
.mn-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
@media (max-width: 600px) {
  .mn-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.mn-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  text-align: center;
}
.mn-stat-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.mn-stat-label {
  font-family: var(--font-hud);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Tips */
.mn-tips {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: rgba(245,158,11,0.04);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 5px;
}
.mn-tips li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
  line-height: 1.4;
}
.mn-tips li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
}
