/* ==========================================================================
   JUBAROO VALHEIM CARTOGRAPHER - BESPOKE NORSE UI SYSTEM
   High-end Dark Gold RPG Aesthetic matching Jubaroo.com
   ========================================================================== */

:root {
  --vh-gold-primary: #d4af37;
  --vh-gold-glow: #f5d77f;
  --vh-gold-dim: rgba(212, 175, 55, 0.4);
  --vh-bg-obsidian: rgba(10, 14, 22, 0.94);
  --vh-bg-card: rgba(16, 22, 34, 0.75);
  --vh-bg-hover: rgba(26, 36, 54, 0.85);
  --vh-border-card: rgba(212, 175, 55, 0.22);
  --vh-text-main: #f1f5f9;
  --vh-text-muted: #94a3b8;
  --vh-accent-red: #ef4444;
  --vh-accent-blue: #38bdf8;
  --vh-accent-green: #22c55e;
  --vh-font-heading: 'Cinzel', serif;
  --vh-font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --vh-font-mono: 'JetBrains Mono', monospace;
}

/* Ensure clean viewport canvas */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  font-family: var(--vh-font-body);
  background: #06090e !important;
  color: var(--vh-text-main);
  user-select: none;
}

#viewportCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
}

/* Hide legacy floating elements */
.floating-site-menu-container,
.site-menu-button,
.floating-site-corner-container,
#world-layer-menu,
#about-label,
.not-phone-only-button,
.phone-only-button {
  display: none !important;
}

/* Hide legacy offcanvas styles */
.offcanvas {
  display: none !important;
}

/* Subtle clean footer coordinate/seed overlay */
#bottom-overlay {
  position: absolute;
  bottom: 12px;
  right: 18px;
  left: auto !important;
  transform: none !important;
  z-index: 10;
  pointer-events: none;
}

#world-seed-label {
  font-family: var(--vh-font-mono);
  font-size: 13px;
  color: rgba(241, 245, 249, 0.7);
  background: rgba(10, 14, 22, 0.75);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* ==========================================================================
   SIDEBAR CONTAINER
   ========================================================================== */
.vh-sidebar {
  position: absolute;
  top: 14px;
  left: 14px;
  bottom: 14px;
  width: 360px;
  max-width: calc(100vw - 28px);
  background: var(--vh-bg-obsidian);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--vh-gold-dim);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(212, 175, 55, 0.12);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  pointer-events: auto;
}

.vh-sidebar.is-collapsed {
  transform: translateX(-400px);
  opacity: 0;
  pointer-events: none;
}

/* Floating Reopen Button */
.vh-sidebar-reopen-tab {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(20, 28, 42, 0.95), rgba(10, 14, 22, 0.98));
  border: 1px solid var(--vh-gold-primary);
  border-radius: 8px;
  color: var(--vh-gold-glow);
  font-family: var(--vh-font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.vh-sidebar-reopen-tab:hover {
  background: linear-gradient(135deg, rgba(30, 42, 64, 0.98), rgba(16, 22, 34, 1));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

/* Sidebar Header */
.vh-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--vh-border-card);
  background: rgba(14, 20, 30, 0.6);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.vh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vh-brand-rune {
  color: var(--vh-gold-primary);
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.5));
}

.vh-brand-text {
  display: flex;
  flex-direction: column;
}

.vh-brand-title {
  font-family: var(--vh-font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.vh-brand-sub {
  font-size: 10px;
  color: var(--vh-gold-primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

.vh-sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vh-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--vh-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vh-icon-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--vh-gold-dim);
  color: var(--vh-gold-glow);
}

/* Sidebar Body Scroll */
.vh-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vh-sidebar-body::-webkit-scrollbar {
  width: 6px;
}
.vh-sidebar-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.vh-sidebar-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}
.vh-sidebar-body::-webkit-scrollbar-thumb:hover {
  background: var(--vh-gold-primary);
}

/* Cards */
.vh-card {
  background: var(--vh-bg-card);
  border: 1px solid var(--vh-border-card);
  border-radius: 8px;
  padding: 12px;
}

.vh-card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vh-gold-primary);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Seed Inputs */
.vh-input-group {
  display: flex;
  gap: 6px;
}

.vh-input {
  flex: 1;
  background: rgba(6, 9, 14, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  padding: 8px 10px;
  color: #fff;
  font-family: var(--vh-font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vh-input:focus {
  border-color: var(--vh-gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.vh-btn-addon {
  background: rgba(26, 36, 54, 0.9);
  border: 1px solid var(--vh-border-card);
  border-radius: 6px;
  color: var(--vh-gold-glow);
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.vh-btn-addon:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--vh-gold-primary);
  color: #fff;
}

/* Row & Field helpers */
.vh-row {
  display: flex;
  gap: 8px;
}
.vh-col {
  flex: 1;
}
.vh-mt-2 {
  margin-top: 8px;
}

.vh-field-label {
  display: block;
  font-size: 10px;
  color: var(--vh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.vh-select-btn {
  width: 100%;
  text-align: left;
  background: rgba(6, 9, 14, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--vh-text-main);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.vh-select-btn::after {
  margin-left: 8px;
}

.vh-dropdown-menu {
  background: rgba(12, 17, 26, 0.98);
  border: 1px solid var(--vh-gold-dim);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  max-height: 240px;
  overflow-y: auto;
}

.vh-dropdown-menu .dropdown-item {
  color: var(--vh-text-main);
  font-size: 12px;
  padding: 6px 12px;
}
.vh-dropdown-menu .dropdown-item:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--vh-gold-glow);
}

/* Buttons */
.vh-btn {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
  font-family: var(--vh-font-body);
}

.vh-btn-block {
  width: 100%;
}

.vh-btn-gold {
  background: linear-gradient(135deg, #d4af37, #b89728);
  color: #0c1017;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
  letter-spacing: 0.05em;
}
.vh-btn-gold:hover {
  background: linear-gradient(135deg, #f5d77f, #d4af37);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.5);
  color: #000;
}

.vh-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--vh-text-main);
}
.vh-btn-secondary:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--vh-gold-dim);
  color: var(--vh-gold-glow);
}

/* Layer Segmented Control */
.vh-layer-segmented {
  display: flex;
  background: rgba(6, 9, 14, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
}

.vh-seg-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 6px 4px;
  color: var(--vh-text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.vh-seg-btn i {
  font-size: 12px;
}

.vh-seg-btn:hover {
  color: var(--vh-text-main);
  background: rgba(255, 255, 255, 0.04);
}

.vh-seg-btn.is-active {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--vh-gold-primary);
  color: var(--vh-gold-glow);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* POI Tabs */
.vh-poi-nav {
  margin-bottom: 8px;
}

.vh-poi-tabs {
  display: flex;
  border-bottom: 1px solid var(--vh-border-card);
}

.vh-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 10px;
  color: var(--vh-text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.vh-tab-btn:hover {
  color: var(--vh-text-main);
}

.vh-tab-btn.is-active {
  color: var(--vh-gold-glow);
  border-bottom-color: var(--vh-gold-primary);
  background: rgba(212, 175, 55, 0.05);
}

/* POI Search Box */
.vh-search-box {
  position: relative;
  margin-bottom: 8px;
}

.vh-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vh-text-muted);
  font-size: 11px;
  pointer-events: none;
}

.vh-search-box input {
  width: 100%;
  background: rgba(6, 9, 14, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  padding: 6px 28px 6px 28px;
  font-size: 12px;
  color: var(--vh-text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.vh-search-box input:focus {
  border-color: var(--vh-gold-primary);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.vh-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--vh-text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Preset Actions */
.vh-preset-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.vh-preset-label {
  font-size: 10px;
  color: var(--vh-text-muted);
  margin-right: 2px;
  text-transform: uppercase;
  font-weight: 700;
}

.vh-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--vh-text-muted);
  padding: 2px 8px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vh-pill:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--vh-gold-dim);
  color: var(--vh-gold-glow);
}

/* POI Tree / Accordion */
.vh-poi-tree {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vh-poi-tree::-webkit-scrollbar {
  width: 4px;
}
.vh-poi-tree::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 2px;
}

/* Group Card */
.vh-poi-group {
  background: rgba(10, 14, 22, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0 !important;
  height: auto !important;
}

.vh-poi-group-header {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.vh-poi-group-header:hover {
  background: rgba(212, 175, 55, 0.08);
}

.vh-poi-arrow {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vh-text-muted);
  font-size: 9px;
  cursor: pointer;
  border-radius: 3px;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.vh-poi-arrow:hover {
  color: var(--vh-gold-glow);
  background: rgba(255, 255, 255, 0.05);
}

.vh-poi-arrow.is-open {
  transform: rotate(90deg);
  color: var(--vh-gold-primary);
}

/* Category Item Layout */
.location-category-item {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  float: none !important;
  clear: both !important;
  padding: 3px 0 !important;
}

.location-category-cell {
  float: none !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
}

.location-category-cell.color-box,
.color-box {
  display: none !important;
}

/* Custom Norse POI Icon Badges */
.vh-poi-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  margin-right: 6px !important;
  font-size: 12px !important;
  vertical-align: middle !important;
  filter: drop-shadow(0 0 4px currentColor);
  flex-shrink: 0 !important;
  transition: transform 0.15s ease;
}

.location-category-item:hover .vh-poi-badge {
  transform: scale(1.18);
}

.vh-poi-sub-container .vh-poi-badge {
  font-size: 11px !important;
  width: 16px !important;
  height: 16px !important;
  margin-right: 5px !important;
}

.location-category-item .form-check {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  min-height: auto !important;
}

.location-category-item .form-check-input {
  float: none !important;
  margin: 0 4px 0 0 !important;
  cursor: pointer;
  width: 15px;
  height: 15px;
  background-color: rgba(10, 14, 22, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 3px;
  accent-color: var(--vh-gold-primary);
  flex-shrink: 0;
}

.location-category-item .form-check-input:checked {
  background-color: var(--vh-gold-primary);
  border-color: var(--vh-gold-primary);
}

.location-category-item .form-check-label {
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer;
  color: var(--vh-text-main) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

/* Sub-items Container */
.vh-poi-sub-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 6px 6px 20px;
  border-left: 2px solid rgba(212, 175, 55, 0.25);
  margin-left: 12px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0 0 4px 4px;
}

.vh-poi-sub-container .location-category-item {
  display: flex !important;
  padding: 2px 4px !important;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.vh-poi-sub-container .location-category-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.vh-poi-sub-container .form-check-label {
  font-size: 12px !important;
  color: #cbd5e1 !important;
}

/* Sidebar Footer */
.vh-sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--vh-border-card);
  background: rgba(6, 9, 14, 0.8);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vh-footer-note {
  font-family: var(--vh-font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--vh-gold-glow);
  letter-spacing: 0.04em;
}

.vh-footer-legal {
  font-size: 9px;
  color: var(--vh-text-muted);
}

/* Progress Bar Center Glow & Norse Card */
#progress-overlay {
  position: fixed !important;
  top: 24px !important;
  left: calc(50% + 140px) !important;
  transform: translateX(-50%) !important;
  z-index: 1080 !important;
  background: #090d14 !important;
  border: 1px solid var(--vh-gold-primary) !important;
  border-radius: 12px !important;
  padding: 14px 20px 16px !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 175, 55, 0.25) !important;
  width: 420px !important;
  max-width: calc(100vw - 340px) !important;
  box-sizing: border-box !important;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body:has(.vh-sidebar.is-collapsed) #progress-overlay,
.vh-sidebar.is-collapsed ~ #progress-overlay {
  left: 50% !important;
  max-width: 90vw !important;
}

@media (max-width: 992px) {
  #progress-overlay {
    left: 50% !important;
    width: 90vw !important;
    max-width: 420px !important;
  }
}

.vh-progress-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 10px !important;
}

.vh-progress-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.vh-progress-icon {
  color: var(--vh-gold-primary) !important;
  font-size: 13px !important;
  animation: vh-spin-pulse 3s infinite linear !important;
}

@keyframes vh-spin-pulse {
  0% { transform: rotate(0deg); opacity: 0.8; }
  50% { opacity: 1; }
  100% { transform: rotate(360deg); opacity: 0.8; }
}

#world-progress-label {
  font-family: var(--vh-font-display, 'Cinzel', serif) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--vh-gold-glow) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.vh-progress-percent {
  font-family: var(--vh-font-mono, 'JetBrains Mono', monospace) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--vh-gold-primary) !important;
  letter-spacing: 0.02em !important;
  flex-shrink: 0 !important;
  margin-left: 12px !important;
}

.vh-progress-track {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(212, 175, 55, 0.25) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  height: 8px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6) !important;
  margin: 0 !important;
}

#world-progress-bar {
  background: linear-gradient(90deg, #d4af37, #ffe082, #ffd700) !important;
  height: 100% !important;
  border-radius: 999px !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5) !important;
  transition: width 0.15s ease-out !important;
  color: transparent !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

/* Location details modal styling */
#locationIndexShow .modal-content {
  background: rgba(12, 17, 26, 0.98);
  border: 1px solid var(--vh-gold-primary);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.25);
  color: var(--vh-text-main);
}
#locationIndexShow .modal-header {
  border-bottom: 1px solid var(--vh-border-card);
}
#locationIndexShow .modal-footer {
  border-top: 1px solid var(--vh-border-card);
}
#locationIndexShow .btn-close {
  filter: invert(1);
}

/* Preferences modal styling */
#preferenceModal .modal-content {
  background: rgba(12, 17, 26, 0.98);
  border: 1px solid var(--vh-gold-primary);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  color: var(--vh-text-main);
}
#preferenceModal .modal-header,
#preferenceModal .modal-footer {
  border-color: var(--vh-border-card);
}


/* ==========================================================================
   LIVE COORDINATE & NAVIGATION HUD
   ========================================================================== */
.vh-coord-hud {
  position: relative;
  user-select: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.vh-coord-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vh-bg-obsidian);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--vh-gold-dim);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.12);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.vh-coord-pill:hover {
  border-color: var(--vh-gold-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(212, 175, 55, 0.25);
  transform: translateY(-1px);
}

.vh-coord-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  flex-shrink: 0;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.vh-coord-indicator.is-center {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.vh-coord-compass {
  color: var(--vh-gold-primary);
  font-size: 13px;
  transition: transform 0.2s;
}

.vh-coord-pill:hover .vh-coord-compass {
  transform: rotate(30deg);
}

.vh-coord-readout {
  font-family: var(--vh-font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  color: var(--vh-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

.vh-coord-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.vh-coord-dim {
  color: var(--vh-text-muted);
  font-size: 11px;
}

.vh-coord-sep {
  color: rgba(212, 175, 55, 0.45);
  margin: 0 2px;
}

.vh-coord-dist-item {
  color: var(--vh-gold-glow);
  font-weight: 600;
}

.vh-coord-dist-icon {
  font-size: 10px;
  margin-right: 3px;
  color: var(--vh-gold-primary);
}

.vh-coord-copy-btn {
  background: none;
  border: none;
  color: var(--vh-text-muted);
  padding: 2px 4px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  margin-left: 2px;
  transition: color 0.15s, background-color 0.15s;
}

.vh-coord-copy-btn:hover {
  color: var(--vh-gold-primary);
  background: rgba(212, 175, 55, 0.15);
}

.vh-coord-toast {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(13, 20, 31, 0.98);
  border: 1px solid var(--vh-gold-primary);
  border-radius: 6px;
  padding: 5px 12px;
  font-family: var(--vh-font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: var(--vh-gold-glow);
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 30;
}

.vh-coord-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RECENT SEEDS QUICK BAR
   ========================================================================== */
.vh-recent-seeds-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
}

.vh-recent-seeds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
}

.vh-recent-seeds-title {
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-weight: 600;
  color: rgba(212, 175, 55, 0.85);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.vh-recent-clear-btn {
  background: none;
  border: none;
  font-size: 10px;
  color: #ef4444;
  cursor: pointer;
  opacity: 0.75;
  padding: 0;
  transition: opacity 0.15s;
}

.vh-recent-clear-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

.vh-recent-seeds-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vh-recent-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #cbd5e1;
  font-family: var(--vh-font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.vh-recent-chip:hover {
  background: rgba(212, 175, 55, 0.16);
  border-color: var(--vh-gold-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.vh-recent-chip.is-active {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--vh-gold-primary);
  color: var(--vh-gold-glow);
  font-weight: 600;
}

@media (max-width: 600px) {
  .vh-coord-pill {
    padding: 4px 10px;
    gap: 6px;
  }
  .vh-coord-readout {
    font-size: 11px;
    gap: 4px;
  }
  .vh-coord-dist-item .vh-coord-dim {
    display: none;
  }
}

/* ==========================================================================
   PHASE 2: TACTICAL TOOLBAR & HUD WRAPPER
   ========================================================================== */
.vh-tactical-hud {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  pointer-events: none;
}

.vh-tactical-toolbar,
.vh-coord-hud {
  pointer-events: auto;
}

@media (max-width: 992px) {
  .vh-tactical-hud {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    top: 10px;
    right: 10px;
  }
}

.vh-tactical-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--vh-bg-obsidian);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--vh-gold-dim);
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.1);
}

.vh-tactical-btn {
  background: transparent;
  border: none;
  color: var(--vh-text-muted);
  font-family: var(--vh-font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease-out;
}

.vh-tactical-btn:hover {
  color: #ffffff;
  background: rgba(212, 175, 55, 0.16);
}

.vh-tactical-btn.is-active {
  color: var(--vh-gold-glow);
  background: rgba(212, 175, 55, 0.28);
  border: 1px solid var(--vh-gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.vh-pin-badge {
  background: var(--vh-gold-primary);
  color: #06090e;
  font-family: var(--vh-font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 2px;
}

/* ==========================================================================
   SVG OVERLAY & PINS CONTAINER
   ========================================================================== */
.vh-overlay-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.vh-pins-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

/* Individual Custom Pin Marker */
.vh-map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s ease-out;
  z-index: 5;
}

.vh-map-pin:hover {
  transform: translate(-50%, -105%) scale(1.15);
  z-index: 20;
}

.vh-map-pin-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(10, 14, 22, 0.95);
  border: 2px solid var(--vh-gold-primary);
  color: var(--vh-gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.4);
  position: relative;
}

.vh-map-pin-badge::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--vh-gold-primary);
}

.vh-map-pin-label {
  margin-top: 7px;
  background: rgba(10, 14, 22, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #f1f5f9;
  font-family: var(--vh-font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

/* ==========================================================================
   RULER CARD & VOYAGE ESTIMATES
   ========================================================================== */
.vh-ruler-card {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: rgba(10, 14, 22, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--vh-gold-primary);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 24px rgba(212, 175, 55, 0.2);
  z-index: 28;
  color: var(--vh-text-main);
  animation: vh-fade-slide-up 0.2s ease-out;
}

@keyframes vh-fade-slide-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.vh-ruler-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.vh-ruler-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--vh-gold-glow);
  letter-spacing: 0.04em;
}

.vh-icon-close-btn {
  background: none;
  border: none;
  color: var(--vh-text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}

.vh-icon-close-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.vh-ruler-body {
  padding: 12px 14px;
}

.vh-ruler-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.vh-ruler-stat {
  display: flex;
  flex-direction: column;
}

.vh-ruler-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--vh-text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.vh-ruler-val {
  font-family: var(--vh-font-mono, monospace);
  font-size: 14px;
  color: var(--vh-gold-glow);
}

.vh-ruler-voyage-title {
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-size: 11px;
  font-weight: 600;
  color: var(--vh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.vh-ruler-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.vh-travel-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vh-travel-icon {
  font-size: 14px;
  margin-bottom: 2px;
}

.vh-travel-name {
  font-size: 9px;
  color: var(--vh-text-muted);
  margin-bottom: 3px;
  white-space: nowrap;
}

.vh-travel-time {
  font-family: var(--vh-font-mono, monospace);
  font-size: 10px;
  color: #38bdf8;
  font-weight: 600;
}

.vh-ruler-hazard {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  font-size: 11px;
  color: #fca5a5;
  line-height: 1.35;
}

.vh-ruler-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 14px 12px;
}

/* ==========================================================================
   MODAL BACKDROP & BOX
   ========================================================================== */
.vh-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: vh-fade-in 0.15s ease-out;
}

@keyframes vh-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.vh-modal-box {
  background: rgba(13, 19, 29, 0.98);
  border: 1px solid var(--vh-gold-primary);
  border-radius: 12px;
  width: 400px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95), 0 0 24px rgba(212, 175, 55, 0.2);
  overflow: hidden;
  color: var(--vh-text-main);
}

.vh-modal-box--wide {
  width: 520px;
}

.vh-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(10, 14, 22, 0.6);
}

.vh-modal-title {
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--vh-gold-glow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.vh-modal-body {
  padding: 16px 18px;
}

.vh-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(10, 14, 22, 0.4);
}

/* Pin Icon Selector */
.vh-pin-icon-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.vh-pin-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 10px 4px;
  color: var(--vh-text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.vh-pin-icon-btn i {
  font-size: 16px;
}

.vh-pin-icon-btn span {
  font-size: 9px;
  white-space: nowrap;
}

.vh-pin-icon-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--vh-gold-primary);
  color: #fff;
}

.vh-pin-icon-btn.is-active {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--vh-gold-primary);
  color: var(--vh-gold-glow);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.vh-pin-coords-preview {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  font-family: var(--vh-font-mono, monospace);
  font-size: 12px;
  color: var(--vh-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vh-pin-coords-preview strong {
  color: var(--vh-gold-glow);
}

/* Waypoints Notebook List */
.vh-pinlist-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.vh-pinlist-scroll {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.vh-pinlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.vh-pinlist-item:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--vh-gold-primary);
}

.vh-pinlist-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vh-pinlist-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--vh-gold-primary);
  color: var(--vh-gold-glow);
  font-size: 12px;
}

.vh-pinlist-item-title {
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.vh-pinlist-item-sub {
  font-family: var(--vh-font-mono, monospace);
  font-size: 11px;
  color: var(--vh-text-muted);
}

.vh-pinlist-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pin Popover Inspector Card */
.vh-pin-inspect-card {
  position: fixed;
  background: rgba(10, 14, 22, 0.98);
  border: 1px solid var(--vh-gold-primary);
  border-radius: 10px;
  padding: 12px 14px;
  width: 250px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 16px rgba(212, 175, 55, 0.25);
  z-index: 35;
  color: var(--vh-text-main);
  animation: vh-fade-in 0.15s ease-out;
}

.vh-pin-inspect-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.vh-pin-inspect-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--vh-gold-primary);
  color: var(--vh-gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.vh-pin-inspect-info {
  flex: 1;
  min-width: 0;
}

.vh-pin-inspect-name {
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vh-pin-inspect-coords {
  font-family: var(--vh-font-mono, monospace);
  font-size: 11px;
  color: var(--vh-text-muted);
}

.vh-pin-inspect-dist {
  font-family: var(--vh-font-mono, monospace);
  font-size: 11px;
  color: var(--vh-gold-glow);
  margin-bottom: 10px;
}

.vh-pin-inspect-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vh-btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.vh-btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

@media (max-width: 600px) {
  .vh-tactical-hud {
    top: 8px;
    right: 8px;
    gap: 6px;
  }
  .vh-tactical-btn .vh-btn-text {
    display: none;
  }
  .vh-tactical-btn {
    padding: 5px 8px;
  }
  .vh-ruler-card {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* ==========================================================================
   PHASE 3: CODEX DOSSIER IN LOCATION MODAL
   ========================================================================== */
.vh-codex-dossier {
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 16px rgba(212, 175, 55, 0.05);
}

.vh-dossier-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.vh-dossier-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--vh-gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--vh-gold-glow);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 12px rgba(212, 175, 55, 0.25);
}

.vh-dossier-avatar img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.vh-dossier-meta {
  flex: 1;
  min-width: 0;
}

.vh-dossier-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.vh-tag {
  font-family: var(--vh-font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.vh-tag--gold {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid var(--vh-gold-primary);
  color: var(--vh-gold-glow);
}

.vh-tag--frost {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
}

.vh-tag--forest {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid #2ecc71;
  color: #86efac;
}

.vh-tag--hp {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.vh-tag--alert {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid #f59e0b;
  color: #fde047;
}

.vh-dossier-title {
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.vh-dossier-notes {
  margin: 0;
  font-size: 12px;
  color: var(--vh-text-muted);
  line-height: 1.45;
}

.vh-dossier-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.vh-dossier-tribute-box {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.07);
}

.vh-dossier-box-title {
  font-family: var(--vh-font-heading, 'Cinzel', serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--vh-gold-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vh-dossier-tribute-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #ffffff;
}

.vh-tribute-count {
  font-family: var(--vh-font-mono, monospace);
  font-weight: 800;
  color: var(--vh-gold-glow);
  background: rgba(212, 175, 55, 0.25);
  border: 1px solid var(--vh-gold-primary);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.vh-tribute-item {
  font-weight: 700;
  color: #f8fafc;
}

.vh-tribute-sub {
  color: var(--vh-text-muted);
  font-size: 11px;
}

.vh-dossier-combat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.vh-combat-col {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vh-combat-col--weak {
  border-color: rgba(239, 68, 68, 0.25);
}

.vh-combat-col--resist {
  border-color: rgba(56, 189, 248, 0.25);
}

.vh-combat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--vh-text-muted);
}

.vh-combat-col--weak .vh-combat-label {
  color: #f87171;
}

.vh-combat-col--resist .vh-combat-label {
  color: #38bdf8;
}

.vh-combat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.vh-combat-pill {
  font-family: var(--vh-font-mono, monospace);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.vh-combat-pill--weak {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-weight: 600;
}

.vh-combat-pill--resist {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}

.vh-combat-pill--immune {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

.vh-dossier-power {
  font-size: 12px;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.4;
}

.vh-dossier-drops {
  font-size: 11px;
  color: var(--vh-text-muted);
  line-height: 1.4;
}

.vh-trader-wares-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.vh-ware-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
}

.vh-coin-val {
  font-family: var(--vh-font-mono, monospace);
  color: var(--vh-gold-glow);
  font-weight: 700;
}

.vh-dossier-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
}


/* ==========================================================================
   PHASE 4: WORLD GEN INTELLIGENCE & SEED SCORECARD
   ========================================================================== */
.vh-tier-badge {
  background: var(--vh-gold, #d4af37) !important;
  color: #0b0f19 !important;
  font-weight: 800 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  letter-spacing: 0.5px;
}

/* Sidebar Mini Scorecard */
.vh-sidebar-scorecard {
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(20, 26, 40, 0.95), rgba(11, 15, 25, 0.98));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.vh-sidebar-scorecard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.vh-sidebar-scorecard-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--vh-font-title, 'Cinzel', serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--vh-gold, #d4af37);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.vh-sidebar-tier-pill {
  font-family: var(--vh-font-mono, monospace);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--vh-gold, #d4af37);
  color: var(--vh-gold-glow, #f3e5ab);
}

.vh-sidebar-scorecard-archetype {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.vh-sidebar-scorecard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.vh-sidebar-scorecard-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
}

.vh-sidebar-chip-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
}

.vh-sidebar-chip-val {
  font-family: var(--vh-font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
}

.vh-sidebar-scorecard-btn {
  width: 100%;
  padding: 7px 10px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 6px;
  color: var(--vh-gold-glow, #f3e5ab);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.vh-sidebar-scorecard-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--vh-gold, #d4af37);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Scorecard Full Modal */
.vh-scorecard-box {
  max-width: 820px !important;
  max-height: 88vh;
  overflow-y: auto;
}

.vh-scorecard-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--vh-gold, #d4af37);
}

.vh-scorecard-loading i {
  font-size: 2rem;
  margin-bottom: 12px;
}

.vh-scorecard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(20, 26, 40, 0.95), rgba(11, 15, 25, 0.98));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
}

.vh-scorecard-hero-details {
  flex: 1;
  min-width: 220px;
}

.vh-scorecard-seed-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.vh-scorecard-seed-tag {
  font-family: var(--vh-font-mono, monospace);
  font-size: 13px;
  font-weight: 700;
  color: var(--vh-gold-glow, #f3e5ab);
  background: rgba(212, 175, 55, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.vh-scorecard-archetype-title {
  font-family: var(--vh-font-title, 'Cinzel', serif);
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  margin: 4px 0 2px;
}

.vh-scorecard-archetype-desc {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.vh-scorecard-hero-score {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vh-score-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 2px solid var(--vh-gold, #d4af37);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
}

.vh-score-number {
  font-family: var(--vh-font-mono, monospace);
  font-size: 20px;
  font-weight: 800;
  color: var(--vh-gold-glow, #f3e5ab);
  line-height: 1;
}

.vh-score-max {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1;
  margin-top: 2px;
}

.vh-score-tier-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.vh-score-tier-pill {
  font-family: var(--vh-font-mono, monospace);
  font-size: 14px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.25);
  border: 1px solid var(--vh-gold, #d4af37);
  color: var(--vh-gold-glow, #f3e5ab);
  margin-bottom: 2px;
}

.vh-score-tier-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sections */
.vh-scorecard-section {
  margin-bottom: 20px;
}

.vh-scorecard-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--vh-font-title, 'Cinzel', serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--vh-gold, #d4af37);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Biome Bar */
.vh-biome-bar-wrap {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
}

.vh-biome-bar {
  display: flex;
  height: 18px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  margin-bottom: 12px;
  background: #020617;
}

.vh-biome-bar-segment {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}

.vh-biome-bar-segment:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 15, 25, 0.95);
  border: 1px solid var(--vh-gold);
  color: #f8fafc;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.vh-biome-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.vh-biome-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
}

.vh-biome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.vh-biome-pct {
  font-family: var(--vh-font-mono, monospace);
  font-weight: 700;
  color: #f1f5f9;
}

/* Scorecard Grid */
.vh-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.vh-scorecard-card-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.vh-scorecard-card-item:hover {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(20, 28, 48, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.vh-scorecard-poi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.vh-scorecard-poi-title {
  font-family: var(--vh-font-title, 'Cinzel', serif);
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vh-scorecard-poi-biome {
  font-size: 10px;
  color: var(--vh-gold, #d4af37);
  font-weight: 600;
  text-transform: uppercase;
}

.vh-scorecard-dist-box {
  margin: 6px 0;
}

.vh-scorecard-dist-val {
  font-family: var(--vh-font-mono, monospace);
  font-size: 14px;
  font-weight: 800;
  color: var(--vh-gold-glow, #f3e5ab);
}

.vh-scorecard-bearing {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 4px;
}

.vh-scorecard-coords {
  font-family: var(--vh-font-mono, monospace);
  font-size: 10px;
  color: #64748b;
  margin-bottom: 8px;
}

.vh-scorecard-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.vh-scorecard-action-btn {
  flex: 1;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 4px;
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.vh-scorecard-action-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--vh-gold, #d4af37);
  color: var(--vh-gold-glow, #f3e5ab);
}

/* Landmarks & Dungeons Row */
.vh-scorecard-landmarks-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.vh-landmark-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
}

.vh-landmark-box-title {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vh-landmark-box-val {
  font-family: var(--vh-font-mono, monospace);
  font-size: 15px;
  font-weight: 800;
  color: var(--vh-gold-glow, #f3e5ab);
}

.vh-landmark-box-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
}

/* Footer Actions */
.vh-scorecard-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  flex-wrap: wrap;
}
