
/* Leaflet GPU Hardware Acceleration */
.leaflet-pane,
.leaflet-tile-pane,
.leaflet-marker-pane,
.leaflet-overlay-pane {
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.leaflet-image-layer {
  image-rendering: auto;
  transform: translate3d(0, 0, 0);
}
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Montserrat:wght@300;400;500;600;700&family=MedievalSharp&display=swap');

:root {
  --bg-deep: #060814;
  --bg-surface: #0b1120;
  --bg-card: rgba(14, 22, 40, 0.85);
  --bg-card-hover: rgba(22, 34, 60, 0.95);
  
  --gold-100: #f5eed6;
  --gold-200: #e5cf92;
  --gold-300: #c8aa6e;
  --gold-400: #a98544;
  --gold-500: #785a28;
  --gold-glow: rgba(200, 170, 110, 0.45);

  --hex-teal: #00f0ff;
  --hex-teal-dark: #008b99;
  --hex-glow: rgba(0, 240, 255, 0.4);

  --void-purple: #c084fc;
  --void-deep: #7e22ce;
  --void-glow: rgba(192, 132, 252, 0.5);

  --crimson: #ef4444;
  --emerald: #10b981;
  --amber: #f59e0b;

  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-gold: #c8aa6e;
  --text-bright: #ffffff;

  --border-gold: rgba(200, 170, 110, 0.35);
  --border-gold-bright: rgba(200, 170, 110, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --font-serif: 'Cinzel', serif;
  --font-body: 'Montserrat', sans-serif;
  --font-runic: 'MedievalSharp', cursive;

  --sidebar-width: 480px;
  --bottombar-height: 120px;
  --topbar-height: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  user-select: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(6, 8, 20, 0.8);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-500);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-300);
}

/* Base App Layout */
#app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Top Navigation Bar */
.top-nav {
  height: var(--topbar-height);
  background: linear-gradient(180deg, rgba(6, 8, 20, 0.95) 0%, rgba(11, 17, 32, 0.85) 100%);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--gold-200);
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--gold-glow);
}

.brand-subtitle {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--hex-teal);
  text-transform: uppercase;
  font-weight: 600;
}

/* Realm Switcher Tabs */
.realm-switcher {
  display: flex;
  align-items: center;
  background: rgba(7, 12, 24, 0.8);
  padding: 4px;
  border-radius: 6px;
  border: 1px solid var(--border-gold);
  gap: 4px;
}

.realm-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.realm-btn:hover {
  color: var(--gold-100);
  background: rgba(200, 170, 110, 0.1);
  border-color: rgba(200, 170, 110, 0.3);
}

.realm-btn.active {
  background: linear-gradient(135deg, rgba(200, 170, 110, 0.25) 0%, rgba(120, 90, 40, 0.3) 100%);
  color: var(--gold-100);
  border-color: var(--gold-300);
  box-shadow: 0 0 12px var(--gold-glow);
  text-shadow: 0 0 8px var(--gold-glow);
}

/* Search and Action Tools */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  background: rgba(14, 22, 40, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 6px 12px 6px 32px;
  color: var(--text-main);
  font-size: 0.82rem;
  width: 170px;
  transition: all 0.3s ease;
  outline: none;
  font-family: var(--font-body);
}

.search-box input:focus {
  width: 240px;
  border-color: var(--hex-teal);
  box-shadow: 0 0 12px var(--hex-glow);
  background: rgba(14, 22, 40, 0.95);
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--gold-300);
  font-size: 0.85rem;
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 280px;
  max-height: 380px;
  overflow-y: auto;
  background: rgba(10, 15, 28, 0.96);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 2000;
  display: none;
}

.search-dropdown.active {
  display: block;
}

.search-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
}

.search-item:hover {
  background: rgba(200, 170, 110, 0.15);
}

.search-item-title {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--gold-200);
}

.search-item-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--hex-teal);
  text-transform: uppercase;
}

.nav-btn {
  background: rgba(14, 22, 40, 0.8);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-btn:hover {
  background: rgba(200, 170, 110, 0.2);
  color: var(--gold-100);
  border-color: var(--gold-300);
  box-shadow: 0 0 10px var(--gold-glow);
}

.nav-btn.active-tool {
  background: linear-gradient(135deg, #a855f7 0%, #6b21a8 100%);
  color: white;
  border-color: #d8b4fe;
  box-shadow: 0 0 14px var(--void-glow);
}

.btn-zoom-ashmorth {
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
  background: rgba(244, 63, 94, 0.1) !important;
}

.btn-zoom-ashmorth:hover {
  background: rgba(244, 63, 94, 0.25) !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.5) !important;
}

/* Map Viewport Area */
#map-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #050711;
}

#map {
  width: 100%;
  height: 100%;
  background: #050711;
}

.leaflet-container {
  background-color: #050711 !important;
  font-family: var(--font-body) !important;
}

/* High-Quality Map Image Rendering */
.leaflet-image-layer {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  filter: contrast(106%) saturate(108%) brightness(101%);
}

/* Floating Map Controls */
.map-floating-controls {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.map-control-btn {
  width: 36px;
  height: 36px;
  background: rgba(11, 17, 32, 0.88);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  color: var(--gold-200);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  transition: all 0.2s ease;
}

.map-control-btn:hover {
  background: rgba(200, 170, 110, 0.25);
  color: #fff;
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Filter Bar Floating Under Top Nav */
.filter-bar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(11, 17, 32, 0.88);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-gold);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
}

.filter-chip {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-chip:hover {
  color: var(--gold-100);
}

.filter-chip.active {
  background: rgba(200, 170, 110, 0.25);
  color: var(--gold-200);
  border-color: var(--gold-300);
}

/* Map Markers (Runeterra Pins) */
.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  contain: layout style;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.pin-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 30, 55, 0.95) 0%, rgba(6, 9, 18, 0.98) 100%);
  border: 2px solid var(--gold-300);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-200);
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pin-icon-wrap:hover, .custom-map-pin.active .pin-icon-wrap {
  transform: scale(1.3);
  border-color: var(--hex-teal);
  color: var(--hex-teal);
  box-shadow: 0 0 20px var(--hex-glow), inset 0 0 10px rgba(0, 240, 255, 0.4);
}

.pin-pulse-ring {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold-300);
  opacity: 0;
  pointer-events: none;
  display: none;
}

/* Only run GPU pulse animations on the active selected pin or capitals */
.custom-map-pin.active .pin-pulse-ring,
.custom-map-pin.pin-capital .pin-pulse-ring {
  display: block;
  animation: pinPulse 2.8s infinite ease-out;
}

@keyframes pinPulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

.pin-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  background: rgba(6, 9, 18, 0.92);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-serif);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-200);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  transition: all 0.2s ease;
}

.custom-map-pin:hover .pin-label {
  color: #fff;
  border-color: var(--hex-teal);
  box-shadow: 0 0 8px var(--hex-glow);
}

.leaflet-custom-divmicon {
  background: transparent !important;
  border: none !important;
}

.leaflet-container .leaflet-marker-pane .leaflet-marker-icon:hover,
.leaflet-container .leaflet-marker-pane .leaflet-marker-icon:has(.pin-session:hover),
.leaflet-container .leaflet-marker-pane .leaflet-marker-icon:has(.pin-session.active),
.leaflet-marker-icon:hover {
  z-index: 99999 !important;
}

/* Marker Types & Z-Index Hierarchy */
.pin-capital, .pin-city, .pin-magic, .pin-ruins, .pin-poi {
  position: relative;
  z-index: 500;
}

.pin-capital.active, .pin-city.active, .pin-magic.active, .pin-ruins.active, .pin-poi.active {
  z-index: 1000;
}

.pin-capital .pin-icon-wrap {
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.6);
}

.pin-magic .pin-icon-wrap {
  border-color: var(--hex-teal);
  color: var(--hex-teal);
  box-shadow: 0 0 14px var(--hex-glow);
}

.pin-ruins .pin-icon-wrap, .pin-void .pin-icon-wrap {
  border-color: var(--void-purple);
  color: var(--void-purple);
  box-shadow: 0 0 14px var(--void-glow);
}

.pin-session .pin-icon-wrap {
  background: radial-gradient(circle, #78350f 0%, #451a03 100%);
  border-color: #f59e0b;
  color: #fef3c7;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.8rem;
}

/* Voidsteel Corruption (Underneath all pins) */
.pin-void-seamless {
  position: relative;
  z-index: 10;
}

/* Session Pins (Underneath city pins by default) */
.pin-session {
  position: relative;
  z-index: 100;
}

.pin-session .pin-label {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.2;
  padding: 2px 7px;
  font-size: 0.65rem;
  letter-spacing: 0.2px;
  background: rgba(14, 8, 4, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transition: transform 0.18s ease, max-width 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Hovered or Active Session Pin (Elevated above city pins!) */
.custom-map-pin.pin-session:hover,
.custom-map-pin.pin-session.active {
  z-index: 99999 !important;
}

.custom-map-pin.pin-session:hover .pin-label,
.custom-map-pin.pin-session.active .pin-label {
  max-width: 320px;
  white-space: normal;
  overflow: visible;
  z-index: 100000 !important;
  background: rgba(10, 5, 2, 0.98);
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.95), 0 0 14px rgba(245, 158, 11, 0.65);
  transform: translateX(-50%) scale(1.08);
}

/* Slide-out Lore Dossier Panel */
.dossier-panel {
  position: absolute;
  top: var(--topbar-height);
  right: -520px;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  background: linear-gradient(180deg, rgba(8, 13, 26, 0.97) 0%, rgba(5, 8, 16, 0.98) 100%);
  border-left: 1px solid var(--border-gold);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dossier-panel.open {
  right: 0;
}

.dossier-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-gold);
  position: relative;
  background: radial-gradient(ellipse at top, rgba(200, 170, 110, 0.15) 0%, transparent 80%);
}

.dossier-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dossier-close-btn:hover {
  color: #fff;
  border-color: var(--gold-200);
  background: rgba(200, 170, 110, 0.2);
}

.dossier-realm-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--hex-teal);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.dossier-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-100);
  letter-spacing: 1px;
  text-shadow: 0 0 12px var(--gold-glow);
}

.dossier-subtitle {
  font-family: var(--font-runic);
  font-size: 0.9rem;
  color: var(--gold-300);
  margin-top: 0.25rem;
  font-style: italic;
}

.dossier-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.meta-pill {
  background: rgba(14, 22, 40, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 5px 8px;
}

.meta-pill-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.meta-pill-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dossier Navigation Tabs */
.dossier-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-gold);
  background: rgba(7, 11, 22, 0.6);
  padding: 0 1rem;
}

.dossier-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.dossier-tab-btn:hover {
  color: var(--gold-200);
}

.dossier-tab-btn.active {
  color: var(--gold-100);
  border-bottom-color: var(--gold-300);
  text-shadow: 0 0 8px var(--gold-glow);
}

/* Dossier Scrollable Content */
.dossier-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  line-height: 1.6;
  font-size: 0.88rem;
  color: var(--text-main);
}

.dossier-section-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-200);
  margin: 1.25rem 0 0.5rem 0;
  border-left: 3px solid var(--gold-300);
  padding-left: 0.5rem;
  letter-spacing: 1px;
}

.dossier-paragraph {
  margin-bottom: 0.75rem;
  color: #cbd5e1;
}

.dossier-quote-box {
  border-left: 3px solid var(--hex-teal);
  background: rgba(0, 240, 255, 0.05);
  padding: 0.6rem 0.85rem;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #e0f2fe;
  margin: 0.75rem 0;
}

.dossier-npc-card {
  background: rgba(14, 22, 42, 0.75);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
  transition: all 0.2s ease;
}

.dossier-npc-card:hover {
  background: rgba(22, 34, 60, 0.9);
  border-color: var(--gold-300);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dossier-npc-name {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-200);
  margin-bottom: 0.2rem;
}

.dossier-npc-role {
  font-size: 0.75rem;
  color: var(--hex-teal);
  margin-bottom: 0.35rem;
}

/* Dossier Session Tie Cards */
.dossier-sessions-header {
  margin-bottom: 0.85rem;
}

.dossier-sessions-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: -0.25rem;
}

.dossier-session-tie-card {
  background: rgba(14, 22, 42, 0.75);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dossier-session-tie-card:hover {
  background: rgba(24, 38, 70, 0.95);
  border-color: var(--gold-200);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px var(--gold-glow);
  transform: translateY(-2px);
}

.dossier-tie-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dossier-proximity-tag {
  font-size: 0.68rem;
  color: var(--hex-teal);
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.dossier-session-tie-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-100);
}

.dossier-session-tie-loc {
  font-size: 0.74rem;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dossier-session-tie-preview {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dossier-session-tie-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--gold-300);
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.4rem;
}

.dossier-session-tie-card:hover .dossier-session-tie-action {
  color: #fff;
}

.dossier-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(10, 15, 28, 0.6);
  border: 1px dashed var(--border-gold);
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.dossier-travel-note {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.74rem;
  color: #fde68a;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  line-height: 1.45;
}

.dossier-travel-note i {
  margin-top: 2px;
}

/* Bottom Campaign Session Timeline */
.timeline-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--bottombar-height);
  background: linear-gradient(0deg, rgba(5, 8, 18, 0.98) 0%, rgba(10, 16, 32, 0.95) 100%);
  border-top: 1px solid var(--border-gold);
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.7);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1.25rem;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-drawer.collapsed {
  transform: translateY(100%);
}

.timeline-drawer.open {
  transform: translateY(0);
}

.timeline-drawer-tab {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 16, 32, 0.96);
  border: 1px solid var(--border-gold);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 4px 18px;
  color: var(--gold-200);
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.6);
  transition: all 0.2s ease;
  z-index: 1051;
}

.timeline-drawer-tab:hover {
  background: #172554;
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 -6px 18px rgba(245, 158, 11, 0.4);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.timeline-title-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.timeline-badge {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border: 1px solid #f59e0b;
  color: #fef3c7;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.timeline-session-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--gold-100);
  font-weight: 600;
}

.timeline-session-location {
  font-size: 0.72rem;
  color: var(--hex-teal);
}

.timeline-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.timeline-btn {
  background: rgba(14, 22, 40, 0.8);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.timeline-btn:hover {
  background: rgba(200, 170, 110, 0.2);
  color: #fff;
  border-color: var(--gold-200);
}

/* Timeline Track Slider */
.timeline-track-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.timeline-slider {
  flex: 1;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  position: relative;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700 0%, #b45309 100%);
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.timeline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.timeline-quick-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 450px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 5, 12, 0.85);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: linear-gradient(180deg, #0d1527 0%, #060a14 100%);
  border: 1px solid var(--border-gold-bright);
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 20px var(--gold-glow);
  width: 92%;
  max-width: 960px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.modal-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: radial-gradient(ellipse at top, rgba(200, 170, 110, 0.15) 0%, transparent 80%);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold-100);
  letter-spacing: 1px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Calibrator Floating HUD */
.calibrator-hud {
  position: absolute;
  top: 80px;
  left: 20px;
  width: 320px;
  max-height: calc(100vh - 220px);
  background: rgba(10, 15, 28, 0.95);
  border: 1px solid #c084fc;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.35);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 2500;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: #e9d5ff;
  border-bottom: 1px solid rgba(192, 132, 252, 0.3);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.hud-coords-badge {
  background: rgba(192, 132, 252, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #f3e8ff;
}

.hud-pin-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 260px;
}

.hud-pin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hud-pin-item:hover {
  background: rgba(192, 132, 252, 0.25);
}

.hud-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.hud-btn {
  background: rgba(192, 132, 252, 0.2);
  border: 1px solid #c084fc;
  color: #f3e8ff;
  padding: 5px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  text-align: center;
}

.hud-btn:hover {
  background: rgba(192, 132, 252, 0.4);
}

/* =========================================================
   SESSION PLACER WIZARD & MAP INTERACTION STYLES
   ========================================================= */

/* Cursor in Placement Mode */
.session-placing-mode, 
.session-placing-mode .leaflet-interactive, 
.session-placing-mode .leaflet-container {
  cursor: crosshair !important;
}

/* Nav & Drawer Button Highlights */
.btn-place-sessions {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(180, 83, 9, 0.3) 100%);
  border-color: #f59e0b;
  color: #fbbf24;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.btn-place-sessions:hover, .btn-place-sessions.active-tool {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #050711;
  border-color: #fde68a;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7);
  text-shadow: none;
}

/* Floating Session Placer HUD */
.session-placer-hud {
  position: absolute;
  top: 76px;
  right: 20px;
  width: 390px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 190px);
  background: linear-gradient(180deg, rgba(12, 18, 36, 0.97) 0%, rgba(6, 9, 18, 0.98) 100%);
  border: 1px solid var(--gold-300);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85), 0 0 25px var(--gold-glow);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 2600;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: spSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sp-hud-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
  gap: 0.85rem;
}

/* Header */
.sp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 0.75rem;
}

.sp-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sp-icon-target {
  font-size: 1.3rem;
  color: var(--amber);
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.sp-header h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-100);
  letter-spacing: 0.5px;
}

.sp-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.sp-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sp-badge-step {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--amber);
  color: #fef3c7;
  font-size: 0.68rem;
  font-family: var(--font-serif);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.sp-close-btn {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sp-close-btn:hover {
  color: #fff;
  border-color: var(--crimson);
  background: rgba(239, 68, 68, 0.2);
}

/* Active Session Card */
.sp-session-card {
  background: rgba(18, 28, 54, 0.65);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.sp-session-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--amber);
}

.sp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sp-session-badge {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border: 1px solid #f59e0b;
  color: #fef3c7;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.sp-realm-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hex-teal);
  display: flex;
  align-items: center;
  gap: 4px;
}

.sp-session-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-100);
  line-height: 1.3;
}

.sp-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sp-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sp-meta-item i {
  color: var(--gold-300);
}

.sp-story-snippet {
  background: rgba(8, 12, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.45;
  display: flex;
  gap: 0.5rem;
}

.sp-quote-icon {
  color: var(--hex-teal);
  font-size: 0.75rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Placement Status */
.sp-placement-status {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.sp-placement-status.placed {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.sp-placement-status.pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.sp-pulse {
  animation: spPulseIcon 1.5s infinite ease-in-out;
}

@keyframes spPulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); color: #fff; }
}

/* Control Buttons Bar */
.sp-controls-bar {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 0.4rem;
}

.sp-btn {
  background: rgba(14, 22, 42, 0.85);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.sp-btn:hover:not(:disabled) {
  background: rgba(200, 170, 110, 0.25);
  border-color: var(--gold-200);
  color: #fff;
}

.sp-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sp-btn-primary {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(180, 83, 9, 0.4) 100%);
  border-color: #f59e0b;
  color: #fef3c7;
}

.sp-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #000;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.sp-btn-subtle {
  font-size: 0.7rem;
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Options Bar */
.sp-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 9, 18, 0.7);
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.sp-checkbox-label input {
  accent-color: var(--amber);
  cursor: pointer;
}

/* Mini Session Jump Strip */
.sp-strip-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sp-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.sp-progress-text {
  color: var(--gold-300);
  font-weight: 600;
}

.sp-strip-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  background: rgba(6, 9, 18, 0.85);
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.sp-strip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 2px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.sp-strip-btn:hover {
  background: rgba(200, 170, 110, 0.2);
  color: var(--gold-100);
  border-color: var(--gold-300);
}

.sp-strip-btn.placed {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.sp-strip-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  border-color: #fef3c7;
  color: #000;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
  transform: scale(1.08);
  z-index: 2;
}

.sp-btn-check {
  font-size: 0.5rem;
  color: #10b981;
}

/* Footer Actions */
.sp-footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 0.4rem;
  border-top: 1px solid var(--border-gold);
  padding-top: 0.75rem;
}

.sp-footer-btn {
  background: rgba(14, 22, 42, 0.8);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.sp-footer-btn:hover {
  background: rgba(200, 170, 110, 0.25);
  color: #fff;
  border-color: var(--gold-200);
}

.sp-footer-done {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald);
  color: #6ee7b7;
}

.sp-footer-done:hover {
  background: var(--emerald);
  color: #000;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Ripple Wave Animation on Placement */
.placement-pulse-ripple {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ripple-wave {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 3px solid #ffd700;
  background: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  animation: rippleExpand 1.1s cubic-bezier(0, 0.7, 0.1, 1) forwards;
}

@keyframes rippleExpand {
  0% {
    width: 10px;
    height: 10px;
    opacity: 1;
  }
  100% {
    width: 90px;
    height: 90px;
    opacity: 0;
    border-width: 1px;
  }
}

/* Floating Flash Toast */
.session-placer-toast {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10, 16, 32, 0.95);
  border: 1px solid var(--gold-300);
  color: var(--gold-100);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.8), 0 0 15px var(--gold-glow);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 3500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-placer-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   DM MODE & PLAYER VIEW SECURITY STYLES
   ============================================================ */

.btn-dm-mode {
  background: rgba(14, 22, 42, 0.9);
  border: 1px solid var(--border-gold);
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.btn-dm-mode:hover {
  color: var(--gold-200);
  border-color: var(--gold-300);
  background: rgba(24, 38, 70, 0.95);
}

.btn-dm-mode.dm-active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.3) 0%, rgba(200, 170, 110, 0.35) 100%);
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
  font-weight: 700;
}

/* DM Password Modal */
.dm-auth-dialog {
  max-width: 460px;
  background: linear-gradient(180deg, #0f172a 0%, #080d1a 100%);
  border: 1px solid var(--gold-300);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(200, 170, 110, 0.3);
}

.dm-auth-content {
  padding: 1.5rem;
}

.dm-auth-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.dm-input-group {
  display: flex;
  align-items: center;
  background: rgba(6, 10, 22, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.dm-input-icon {
  padding: 0 12px;
  color: var(--gold-300);
  font-size: 1rem;
}

.dm-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--gold-100);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 8px;
  outline: none;
}

.dm-unlock-submit-btn {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border: none;
  color: #0b1120;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.dm-unlock-submit-btn:hover {
  background: linear-gradient(135deg, var(--gold-200), var(--gold-300));
  box-shadow: 0 0 10px var(--gold-glow);
}

.dm-auth-error {
  margin-top: 0.75rem;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dm-auth-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dm-auth-hint code {
  color: var(--gold-200);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ============================================================
   DOSSIER DM SECRET & REDACTION CARDS
   ============================================================ */

.dossier-dm-secret-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(126, 34, 206, 0.2) 100%);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 6px;
  padding: 1rem;
  margin: 0.85rem 0;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.dm-secret-badge {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ef4444;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dossier-redacted-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0.65rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.dossier-quest-hook-card {
  background: linear-gradient(135deg, rgba(200, 170, 110, 0.12) 0%, rgba(11, 17, 32, 0.8) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  padding: 0.9rem;
  margin: 0.75rem 0;
}

.quest-hook-header {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: var(--gold-200);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.npc-secret-callout {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(220, 38, 38, 0.3);
  font-size: 0.8rem;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Session Cast & Adventurer Badges */
.dossier-sub-heading {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--gold-200);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dossier-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0.5rem;
}

.player-character-badge {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--hex-teal);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.session-clue-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  padding: 0.8rem;
  margin: 0.65rem 0;
}

.session-clue-header {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.session-threat-card {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
  padding: 0.8rem;
  margin: 0.65rem 0;
}

.session-threat-header {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: #f87171;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================
   LEYLINES SYSTEM & ARCHITECT (WORLD MAP)
   ======================================================== */
.btn-leylines {
  color: #d8b4fe !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  background: rgba(168, 85, 247, 0.12) !important;
}

.btn-leylines:hover, .btn-leylines.active-tool {
  background: rgba(168, 85, 247, 0.35) !important;
  border-color: #c084fc !important;
  box-shadow: 0 0 14px var(--void-glow) !important;
}

.leyline-glow {
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.9));
  pointer-events: none;
}

.leyline-core {
  cursor: pointer;
  filter: drop-shadow(0 0 5px rgba(216, 180, 254, 0.8));
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.leyline-core:hover {
  stroke: #fdf4ff !important;
  stroke-width: 6px !important;
}

.leyline-selected {
  stroke: #fdf4ff !important;
  stroke-width: 5px !important;
  animation: leylinePulse 1.5s infinite alternate ease-in-out;
}

@keyframes leylinePulse {
  0% { stroke-opacity: 0.8; filter: drop-shadow(0 0 6px #c084fc); }
  100% { stroke-opacity: 1.0; filter: drop-shadow(0 0 16px #f0abfc); }
}

.leyline-handle-icon {
  background: transparent !important;
  border: none !important;
}

.leyline-handle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #a855f7 0%, #581c87 100%);
  border: 2px solid #f0abfc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: grab;
  transition: transform 0.15s ease;
}

.leyline-handle:hover, .leyline-handle.active-handle {
  transform: scale(1.35);
  background: radial-gradient(circle, #f0abfc 0%, #7e22ce 100%);
  border-color: #ffffff;
  box-shadow: 0 0 16px #f0abfc;
}

.leyline-hud {
  border-color: rgba(168, 85, 247, 0.5) !important;
  background: rgba(13, 10, 28, 0.95) !important;
  box-shadow: 0 10px 30px rgba(88, 28, 135, 0.45) !important;
}

.leyline-tooltip {
  background: rgba(15, 10, 30, 0.95) !important;
  border: 1px solid #a855f7 !important;
  color: #f3e8ff !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.8), 0 0 10px rgba(168, 85, 247, 0.5) !important;
}

/* ========================================================
   VOIDSTEEL CORRUPTION VIEWER & PLACER (ASIMOV)
   ======================================================== */
.btn-corruption-tool {
  color: #d8b4fe !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  background: rgba(124, 58, 237, 0.16) !important;
}

.btn-corruption-tool:hover, .btn-corruption-tool.active-tool {
  background: rgba(124, 58, 237, 0.35) !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 14px var(--void-glow) !important;
}

.void-corr-icon-wrap {
  overflow: visible !important;
  pointer-events: none !important;
}

.pin-void-seamless {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto !important;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.pin-void-seamless:hover, .pin-void-seamless.active {
  transform: scale(1.08);
}

.corruption-seamless-svg {
  pointer-events: none;
  overflow: visible;
  filter: blur(1px);
}

.corruption-hud {
  border-color: rgba(168, 85, 247, 0.5) !important;
  background: rgba(15, 7, 26, 0.96) !important;
  box-shadow: 0 10px 30px rgba(88, 28, 135, 0.45) !important;
}

.corruption-hud select {
  background: #0d0617 !important;
  color: #e9d5ff !important;
  border: 1px solid #7c3aed !important;
  outline: none;
}

.corruption-hud input[type="range"] {
  accent-color: #a855f7 !important;
  outline: none;
}

/* ========================================================
   MEDIEVAL NOTICE BOARD & QUEST POSTINGS
   ======================================================== */
.btn-notice-board {
  color: #fef08a !important;
  border-color: rgba(234, 179, 8, 0.45) !important;
  background: rgba(202, 138, 4, 0.15) !important;
}

.btn-notice-board:hover {
  background: rgba(202, 138, 4, 0.35) !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.5) !important;
}

/* Notice Board Modal Frame */
.notice-board-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 2, 8, 0.92);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 10000 !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.notice-board-overlay.active, .notice-board-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.notice-board-wood-frame {
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  background: #1e110a linear-gradient(180deg, #2b170c 0%, #170b05 100%);
  border: 10px solid #3d2113;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 0 25px rgba(0,0,0,0.9);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  contain: content;
}

/* Wood Plaque Header */
.board-wood-header {
  background: #2f190e linear-gradient(180deg, #442414 0%, #201007 100%);
  padding: 0.95rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 3px solid #140a04;
  box-shadow: 0 4px 15px rgba(0,0,0,0.7);
  position: relative;
}

.board-title-plaque {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fef08a;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 0 12px rgba(234, 179, 8, 0.45);
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
}

.board-close-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #78350f;
  color: #fef3c7;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.board-close-btn:hover {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

/* Notice Board Primary Main Tabs */
.board-main-tabs-wrap {
  padding: 0.65rem 1.5rem 0.4rem 1.5rem;
  background: rgba(18, 9, 4, 0.95);
  border-bottom: 1px solid #3d1e0f;
  display: flex;
  justify-content: center;
  align-items: center;
}

.board-main-tabs {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
}

.board-main-tab {
  background: #24140a;
  border: 1px solid #5a3219;
  color: #e2cbb0;
  padding: 0.5rem 1.35rem;
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.board-main-tab:hover {
  background: #3d2010;
  color: #fff;
  border-color: #a16207;
}

.board-main-tab.active {
  background: linear-gradient(180deg, #92400e 0%, #451a03 100%);
  color: #fff;
  border-color: #fde047;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
  font-weight: 700;
  transform: translateY(-1px);
}

.guild-main-tab {
  background: rgba(180, 83, 9, 0.2);
  border-color: #b45309;
  color: #fef08a;
}

.guild-main-tab.active {
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%) !important;
  border-color: #fde047 !important;
  color: #fff !important;
}

/* Subtabs Filter Ribbons (Under Postings) */
.board-controls-bar {
  padding: 0.55rem 1.5rem 0.75rem 1.5rem;
  background: rgba(12, 6, 3, 0.85);
  border-bottom: 2px solid #28140a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.board-subtabs-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.board-subtab {
  background: #1c0e07;
  border: 1px solid #3d1c0b;
  color: #c4a47c;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.board-subtab:hover {
  background: #34190d;
  color: #fde047;
  border-color: #78350f;
}

.board-subtab.active {
  background: linear-gradient(180deg, #78350f 0%, #3d1a08 100%);
  color: #fef08a;
  border-color: #ca8a04;
  box-shadow: 0 0 8px rgba(202, 138, 4, 0.35);
  font-weight: 700;
}

.board-search-wrap {
  position: relative;
  min-width: 240px;
}

.board-search-wrap i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #a16207;
  font-size: 0.8rem;
}

.board-search-wrap input {
  width: 100%;
  padding: 0.4rem 0.8rem 0.4rem 2rem;
  background: #140b05;
  border: 1px solid #4a2814;
  border-radius: 4px;
  color: #fef3c7;
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
}

.board-search-wrap input:focus {
  border-color: #eab308;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.25);
}

/* Notice Board Canvas / Pinned Notes - High Performance Cork Board */
.notice-board-canvas {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 1.8rem;
  background-color: #3b2012;
  background-image: 
    radial-gradient(ellipse at center, rgba(74, 38, 20, 0.85) 0%, rgba(20, 10, 5, 0.98) 100%),
    repeating-linear-gradient(45deg, rgba(95, 50, 26, 0.15) 0px, rgba(95, 50, 26, 0.15) 2px, transparent 2px, transparent 8px);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
  contain: layout paint;
  will-change: scroll-position;
  -webkit-overflow-scrolling: touch;
}

.notice-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.8rem;
}

/* Pinned Parchment Note */
.parchment-note {
  background: #fdf6e2 linear-gradient(135deg, #fef9c3 0%, #fef08a 60%, #fde047 100%);
  color: #261608;
  padding: 1.25rem 1.1rem 1rem 1.1rem;
  border-radius: 2px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.5), 1px 2px 0 rgba(161, 98, 7, 0.2);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  border-left: 2px solid rgba(161, 98, 7, 0.2);
  border-top: 1px solid rgba(254, 240, 138, 0.8);
  transform: translateZ(0);
  contain: layout style;
  will-change: transform, box-shadow;
}

.parchment-note:hover {
  transform: rotate(0deg) scale(1.03) translateY(-3px) translateZ(0) !important;
  z-index: 20;
  box-shadow: 0 12px 28px rgba(0,0,0,0.7), 0 0 12px rgba(234, 179, 8, 0.25);
}

/* Pins, Nails, Wax Seals */
.note-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.pin-dagger {
  top: -12px;
  font-size: 1.3rem;
  transform: translateX(-50%) rotate(25deg);
}

.pin-wax-seal {
  top: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #b91c1c 0%, #7f1d1d 80%);
  border: 1px solid #ef4444;
  color: #fef08a;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.7);
}

.pin-nail {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #52525b;
  border: 1px solid #18181b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.pin-red-tack {
  top: -6px;
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  border-bottom: 1px dashed rgba(161, 98, 7, 0.35);
  padding-bottom: 0.3rem;
}

.note-category-badge {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(120, 53, 15, 0.12);
  color: #78350f;
}

.note-type-bounty .note-category-badge {
  background: rgba(185, 28, 28, 0.15);
  color: #991b1b;
}

.note-type-decree .note-category-badge {
  background: rgba(67, 56, 202, 0.15);
  color: #3730a3;
}

.note-date {
  font-size: 0.65rem;
  color: #78350f;
  font-style: italic;
}

.note-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #451a03;
  margin: 0.2rem 0 0.35rem 0;
  line-height: 1.25;
}

.note-location {
  font-size: 0.72rem;
  color: #92400e;
  font-weight: 600;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-summary {
  font-size: 0.75rem;
  line-height: 1.35;
  color: #3f2008;
  margin-bottom: 0.75rem;
  flex: 1;
}

.note-footer {
  background: rgba(254, 240, 138, 0.5);
  border: 1px solid rgba(161, 98, 7, 0.25);
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
}

.note-reward {
  color: #854d0e;
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-threat {
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 4px;
}

.note-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-read-note {
  background: #78350f;
  color: #fef3c7;
  border: 1px solid #451a03;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
  width: 100%;
  justify-content: center;
}

.btn-read-note:hover {
  background: #92400e;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* Expanded Quest Contract Modal Overlay */
.quest-detail-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.quest-detail-overlay.open {
  display: flex;
}

.quest-detail-dialog {
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  background: #fdf6e2 linear-gradient(135deg, #fef9c3 0%, #fef08a 70%, #fde047 100%);
  color: #261608;
  border: 4px solid #78350f;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.9), inset 0 0 20px rgba(161, 98, 7, 0.25);
  position: relative;
  overflow-y: auto;
  padding: 1.8rem 2rem;
  animation: contractUnfold 0.25s ease-out;
}

@keyframes contractUnfold {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1.0); opacity: 1; }
}

.quest-detail-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #78350f;
  border: 1px solid #451a03;
  color: #fef3c7;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.quest-detail-close:hover {
  background: #991b1b;
  color: #fff;
}

.contract-seal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
  border-bottom: 2px dashed rgba(161, 98, 7, 0.4);
  padding-bottom: 0.6rem;
}

.contract-crest {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.contract-category {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #78350f;
}

.contract-date {
  font-size: 0.75rem;
  color: #92400e;
  font-style: italic;
}

.contract-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: #451a03;
  margin: 0.2rem 0 0.5rem 0;
  line-height: 1.25;
}

.contract-poster, .contract-location {
  font-size: 0.8rem;
  color: #78350f;
  margin-bottom: 0.35rem;
}

.contract-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #261608;
  margin: 1rem 0;
  background: rgba(254, 240, 138, 0.4);
  padding: 0.75rem 1rem;
  border-left: 3px solid #78350f;
  border-radius: 0 4px 4px 0;
}

.detail-section {
  margin: 1rem 0;
}

.detail-section-title {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-objectives-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-objectives-list li {
  font-size: 0.8rem;
  color: #3f2008;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contract-terms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.term-box {
  background: rgba(254, 240, 138, 0.6);
  border: 1px solid rgba(161, 98, 7, 0.35);
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
}

.term-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 0.2rem;
}

.reward-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #854d0e;
}

.threat-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #b91c1c;
}

.contract-footer-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-contract-locate {
  flex: 1;
  background: #78350f;
  color: #fef3c7;
  border: 1px solid #451a03;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-contract-locate:hover {
  background: #92400e;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.btn-contract-close {
  background: transparent;
  color: #78350f;
  border: 1px solid #78350f;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-contract-close:hover {
  background: rgba(120, 53, 15, 0.15);
}

/* Pulsing Quest Location Map Beacon */
.quest-map-ping-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quest-ping-ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #eab308;
  animation: questPingPulse 1.4s infinite ease-out;
}

@keyframes questPingPulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.quest-ping-marker {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

/* ========================================================
   HIGH COUNCIL OF ARCHMAGES & RELATIONS MODAL
   ======================================================== */
.btn-archmages {
  color: #e9d5ff !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  background: rgba(147, 51, 234, 0.15) !important;
}

.btn-archmages:hover {
  background: rgba(147, 51, 234, 0.35) !important;
  border-color: #c084fc !important;
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.5) !important;
}

.archmages-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 2, 10, 0.92);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 10000 !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.archmages-overlay.active, .archmages-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.archmages-window-dialog {
  width: 100%;
  max-width: 1100px;
  max-height: 88vh;
  background: #0d0718 linear-gradient(180deg, #160b2b 0%, #090412 100%);
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 35px rgba(168, 85, 247, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.archmages-modal-header {
  background: #1a0d33 linear-gradient(180deg, #26134b 0%, #130926 100%);
  padding: 0.95rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 2px solid rgba(168, 85, 247, 0.3);
  position: relative;
}

.archmages-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f3e8ff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 0 12px rgba(192, 132, 252, 0.45);
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
}

.archmages-close-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #6b21a8;
  color: #f3e8ff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.archmages-close-btn:hover {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.archmages-tabs-bar {
  padding: 0.75rem 1.5rem;
  background: rgba(12, 6, 24, 0.9);
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.archmage-tab-btn {
  background: #1a0f30;
  border: 1px solid #4c1d95;
  color: #d8b4fe;
  padding: 0.45rem 1.2rem;
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.archmage-tab-btn:hover {
  background: #2e1065;
  color: #fff;
  border-color: #c084fc;
}

.archmage-tab-btn.active {
  background: linear-gradient(180deg, #7e22ce 0%, #4c1d95 100%);
  color: #fff;
  border-color: #d8b4fe;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.4);
  font-weight: 700;
}

.archmages-modal-body {
  padding: 1.25rem 1.5rem 1.75rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.archmages-intro-banner {
  background: rgba(19, 10, 38, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: #e9d5ff;
}

.intro-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.intro-text i {
  color: #c084fc;
  font-size: 1.1rem;
}

.archmages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.archmage-card {
  background: rgba(17, 9, 34, 0.92);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 8px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.archmage-card:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 8px 25px rgba(0,0,0,0.7), 0 0 15px rgba(168, 85, 247, 0.15);
}

.rank-one-card {
  background: rgba(22, 11, 44, 0.95);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 18px rgba(192, 132, 252, 0.25);
}

.archmage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.archmage-rank-badge {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 700;
  color: #d8b4fe;
  background: rgba(109, 40, 217, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 4px;
  padding: 2px 8px;
}

.gold-rank {
  color: #fef08a !important;
  background: rgba(234, 179, 8, 0.2) !important;
  border-color: #eab308 !important;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

.archmage-school-badge {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid currentColor;
  background: rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.archmage-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.archmage-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.archmage-race-tag {
  font-size: 0.75rem;
  color: #c4b5fd;
  display: flex;
  align-items: center;
  gap: 5px;
}

.archmage-domain-box {
  background: rgba(8, 4, 18, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #e9d5ff;
}

.domain-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.domain-icon {
  color: #c084fc;
  margin-top: 2px;
  font-size: 0.8rem;
}

/* Interactive Player Relations & Speculation */
.archmage-speculation-box {
  background: rgba(10, 5, 22, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.speculation-header {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fef08a;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.25);
  padding-bottom: 0.35rem;
}

.relations-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.relations-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.block-label {
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ally-label {
  color: #86efac;
}

.rival-label {
  color: #fca5a5;
}

.add-relation-select {
  background: #170b2e;
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
  font-size: 0.7rem;
  padding: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}

.add-relation-select:hover {
  border-color: #c084fc;
}

.relations-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 20px;
}

.relation-tag {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ally-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.rival-tag {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.tag-remove-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 0 0 2px;
  line-height: 1;
  opacity: 0.7;
}

.tag-remove-btn:hover {
  opacity: 1;
  color: #fff;
}

.empty-relation-hint {
  font-size: 0.68rem;
  color: #8b7ca6;
  font-style: italic;
}

.notes-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.notes-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #d8b4fe;
}

.save-indicator {
  font-size: 0.65rem;
  color: #86efac;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.save-indicator.visible {
  opacity: 1;
}

.archmage-player-notes {
  width: 100%;
  min-height: 52px;
  max-height: 120px;
  background: rgba(6, 2, 14, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  font-family: inherit;
  font-size: 0.72rem;
  color: #f3e8ff;
  resize: vertical;
  outline: none;
  line-height: 1.35;
}

.archmage-player-notes:focus {
  border-color: #c084fc;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.3);
}

/* ========================================================
   THE IRON CROWN CHRONICLE - ROYAL NEWSPAPER MODAL
   ======================================================== */
.btn-chronicle {
  color: #fed7aa !important;
  border-color: rgba(249, 115, 22, 0.45) !important;
  background: rgba(234, 88, 12, 0.15) !important;
}

.btn-chronicle:hover {
  background: rgba(234, 88, 12, 0.35) !important;
  border-color: #fb923c !important;
  box-shadow: 0 0 14px rgba(251, 146, 60, 0.5) !important;
}

.chronicle-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 2, 8, 0.92);
  /* GPU Optimized: backdrop-filter removed for smooth 60fps */
  z-index: 10000 !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.chronicle-overlay.active, .chronicle-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.chronicle-window-dialog {
  width: 100%;
  max-width: 1050px;
  max-height: 90vh;
  background: #18110b linear-gradient(180deg, #24170e 0%, #120a06 100%);
  border: 3px solid #543a23;
  border-radius: 10px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 35px rgba(180, 83, 9, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.chronicle-modal-header {
  background: #2a1c12 linear-gradient(180deg, #3d291a 0%, #1c120a 100%);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 2px solid #543a23;
  position: relative;
}

.chronicle-header-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fef08a;
  text-shadow: 0 2px 4px rgba(0,0,0,0.9);
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.chronicle-close-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #78350f;
  color: #fef3c7;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.chronicle-close-btn:hover {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.chronicle-modal-body {
  padding: 1.25rem 1.5rem 2rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.chronicle-issue-tabs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.chronicle-issue-tab {
  background: #2c1a0e;
  border: 1px solid #78350f;
  color: #fde68a;
  padding: 0.45rem 1.2rem;
  border-radius: 5px;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chronicle-issue-tab:hover {
  background: #451a03;
  color: #fff;
  border-color: #f59e0b;
}

.chronicle-issue-tab.active {
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
  color: #fff;
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
  font-weight: 700;
}

/* Authentic Newsprint Parchment Sheet */
.chronicle-paper-sheet {
  background: #f7eed8 linear-gradient(180deg, #faf3e0 0%, #eee1c4 100%);
  color: #1c1917;
  border: 2px solid #bda888;
  border-radius: 4px;
  padding: 2rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 0 40px rgba(180, 130, 70, 0.15);
  font-family: 'Cinzel', 'Times New Roman', serif;
  position: relative;
}

.chronicle-masthead {
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 3px double #44301f;
  padding-bottom: 0.85rem;
}

.masthead-topline {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: #78350f;
  letter-spacing: 0.8px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  border-bottom: 1px solid #bda888;
  padding-bottom: 0.35rem;
}

.masthead-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #1c120c;
  text-transform: uppercase;
  margin: 0.2rem 0;
  font-family: var(--font-serif);
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.masthead-tagline {
  font-size: 0.8rem;
  font-style: italic;
  color: #5c381e;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.masthead-rule-double {
  border-bottom: 2px solid #1c120c;
  margin-top: 0.5rem;
}

.chronicle-lead-section {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid #d4c0a5;
  border-radius: 3px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.lead-tag-badge {
  display: inline-block;
  background: #7f1d1d;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.lead-headline {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1c120c;
  line-height: 1.25;
  margin: 0 0 0.4rem 0;
  font-family: var(--font-serif);
}

.lead-subhead {
  font-size: 0.95rem;
  font-style: italic;
  color: #78350f;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.lead-story-body {
  column-count: 2;
  column-gap: 1.75rem;
  text-align: justify;
  font-family: Georgia, serif;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #292524;
}

.chronicle-lead-p {
  margin-bottom: 0.85rem;
}

.drop-cap-p::first-letter {
  font-size: 2.6rem;
  float: left;
  line-height: 0.8;
  padding: 4px 6px 0 0;
  font-family: var(--font-serif);
  font-weight: 800;
  color: #78350f;
}

.chronicle-section-separator {
  border-top: 1px solid #bda888;
  margin: 1.5rem 0;
}

.chronicle-articles-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
}

.chronicle-article-card {
  border-bottom: 1px dashed #bda888;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
}

.article-category-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #9a3412;
  letter-spacing: 0.8px;
  margin-bottom: 0.25rem;
}

.article-headline {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1c120c;
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
  font-family: var(--font-serif);
}

.article-body {
  font-family: Georgia, serif;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #292524;
  text-align: justify;
}

.chronicle-p {
  margin-bottom: 0.6rem;
}

.chronicle-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-left: 1px solid #d4c0a5;
  padding-left: 1.5rem;
}

.chronicle-sidebar-block {
  background: rgba(230, 215, 190, 0.45);
  border: 1px solid #c9b497;
  border-radius: 3px;
  padding: 0.85rem;
}

.sidebar-header {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #78350f;
  border-bottom: 1px solid #c9b497;
  padding-bottom: 0.35rem;
  margin: 0 0 0.6rem 0;
  font-family: var(--font-serif);
}

.notices-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.notice-item {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #292524;
  font-family: Georgia, serif;
}

.notice-item-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: #1c120c;
  margin-bottom: 2px;
}

.notice-item-text {
  margin: 0;
}

.chronicle-footer {
  text-align: center;
  border-top: 1px solid #bda888;
  padding-top: 0.85rem;
  font-size: 0.72rem;
  color: #78350f;
  font-family: var(--font-serif);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ========================================================
   ADVENTURER'S GUILD CHARTER & RANKS (NOTICE BOARD TAB)
   ======================================================== */
.guild-filter-tab {
  background: rgba(180, 83, 9, 0.25) !important;
  border-color: #f59e0b !important;
  color: #fef08a !important;
}

.guild-filter-tab.active {
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%) !important;
  color: #fff !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5) !important;
}

.notice-board-grid.guild-mode {
  display: block !important;
  width: 100% !important;
}

.guild-charter-sheet {
  background: #f4ead4 linear-gradient(180deg, #faf2e2 0%, #eee1c4 100%);
  color: #1c1917;
  border: 3px double #78350f;
  border-radius: 6px;
  padding: 2rem 2.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 0 35px rgba(180, 130, 70, 0.15);
  font-family: var(--font-serif);
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 0;
}

.guild-charter-header {
  text-align: center;
  border-bottom: 2px solid #78350f;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.guild-seal-icon {
  font-size: 2.2rem;
  color: #b45309;
  margin-bottom: 0.25rem;
}

.guild-charter-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #451a03;
  margin: 0;
}

.guild-charter-subtitle {
  font-size: 0.85rem;
  font-style: italic;
  color: #78350f;
  margin-top: 0.2rem;
}

.guild-standing-banner {
  background: #2b170c linear-gradient(135deg, #3d2113 0%, #1f0d05 100%);
  border: 2px solid #eab308;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fef3c7;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4), 0 0 12px rgba(234, 179, 8, 0.2);
}

.standing-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fde047;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.standing-rank {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0.2rem 0 0 0;
  text-shadow: 0 0 10px rgba(234, 179, 8, 0.6);
}

.standing-rule {
  font-size: 0.78rem;
  color: #fde68a;
  line-height: 1.4;
  max-width: 480px;
  background: rgba(0,0,0,0.3);
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  border-left: 3px solid #eab308;
}

.guild-tier-section {
  margin-bottom: 1.5rem;
}

.guild-tier-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #78350f;
  border-bottom: 1px solid #c9b497;
  padding-bottom: 0.35rem;
  margin: 0 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guild-ranks-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.guild-rank-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #d4c0a5;
  border-radius: 6px;
  padding: 0.75rem 1.15rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  transform: translateZ(0);
  contain: layout style;
  will-change: transform;
}

@media (max-width: 768px) {
  .guild-rank-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.guild-rank-card:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateX(4px) translateZ(0);
  border-color: #b45309;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.current-party-rank {
  background: #fff8eb linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 2px solid #eab308 !important;
  box-shadow: 0 6px 18px rgba(234, 179, 8, 0.4), 0 0 12px rgba(245, 158, 11, 0.3) !important;
  transform: scale(1.01) translateZ(0) !important;
  position: relative;
}

.rank-card-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 270px;
  flex-shrink: 0;
}

.rank-badge {
  font-size: 0.76rem;
  font-weight: 800;
  background: #451a03;
  color: #fde68a;
  padding: 3px 9px;
  border-radius: 4px;
  min-width: 60px;
  text-align: center;
}

.gold-rank-badge {
  background: #b45309 !important;
  color: #fff !important;
  border: 1px solid #fde047;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

.rank-title-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1c120c;
}

.current-rank-ribbon {
  font-size: 0.68rem;
  font-weight: 800;
  background: #78350f;
  color: #fef08a;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.6px;
  border: 1px solid #eab308;
  white-space: nowrap;
}

.rank-perk-text {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #292524;
  font-family: Georgia, serif;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.rank-perk-text i {
  color: #b45309;
  font-size: 0.85rem;
  margin-top: 1px;
}

.guild-charter-footer {
  text-align: center;
  border-top: 1px solid #c9b497;
  padding-top: 0.75rem;
  font-size: 0.72rem;
  color: #78350f;
  font-style: italic;
  margin-top: 0.5rem;
}

/* ========================================================
   THE LEGEND ARCHIVES & WEAVER'S TRUTHS MODAL
   ======================================================== */
.btn-legends {
  color: #67e8f9 !important;
  border-color: rgba(6, 182, 212, 0.45) !important;
  background: rgba(8, 145, 178, 0.15) !important;
}

.btn-legends:hover {
  background: rgba(8, 145, 178, 0.35) !important;
  border-color: #a5f3fc !important;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.5) !important;
}

.legends-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 2, 10, 0.93);
  z-index: 10000 !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.legends-overlay.active, .legends-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.legends-window-dialog {
  width: 100%;
  max-width: 1150px;
  height: 88vh;
  max-height: 850px;
  background: #11081a;
  border: 4px solid #6b21a8;
  border-radius: 8px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.95), 0 0 35px rgba(107, 33, 168, 0.4);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legends-modal-header {
  background: #200d33 linear-gradient(90deg, #2e104d 0%, #170726 100%);
  border-bottom: 2px solid #7e22ce;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legends-header-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f3e8ff;
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
}

.legends-header-title i {
  color: #c084fc;
}

.legends-close-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.legends-close-btn:hover {
  background: #dc2626;
  color: #fff;
  transform: scale(1.1);
}

.legends-modal-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar List */
.legends-sidebar {
  width: 330px;
  background: #0d0614 linear-gradient(180deg, #13091e 0%, #08030d 100%);
  border-right: 2px solid #4c1d95;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  gap: 0.5rem;
}

.legend-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(147, 51, 234, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.legend-sidebar-item:hover {
  background: rgba(147, 51, 234, 0.15);
  border-color: #a855f7;
  transform: translateX(3px);
}

.legend-sidebar-item.active {
  background: #3b0764 linear-gradient(90deg, #581c87 0%, #2e104d 100%);
  border-color: #c084fc;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}

.legend-sidebar-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #7e22ce;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #e9d5ff;
  flex-shrink: 0;
}

.legend-sidebar-item.active .legend-sidebar-icon {
  background: #7e22ce;
  color: #fff;
  border-color: #f3e8ff;
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.6);
}

.legend-sidebar-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.legend-sidebar-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f3e8ff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-sidebar-epithet {
  font-size: 0.72rem;
  color: #c084fc;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-truth-status-tag {
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 2px;
}

.tag-known {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid #eab308;
  color: #fef08a;
}

.tag-unknown {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid #a855f7;
  color: #e9d5ff;
}

/* Main Display Area */
.legends-content-display {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 2.25rem;
  background: #fbf5e8 linear-gradient(180deg, #fdf8ee 0%, #f4ebd6 100%);
  color: #1c1917;
  font-family: var(--font-serif);
}

.legend-grimoire-sheet {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.legend-grimoire-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 2px solid #78350f;
  padding-bottom: 1.25rem;
}

.grimoire-hero-icon {
  width: 58px;
  height: 58px;
  background: #3b1704 linear-gradient(135deg, #572206 0%, #290f02 100%);
  border: 2px solid #d97706;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fde68a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.grimoire-hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.grimoire-category-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #b45309;
}

.grimoire-legend-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #451a03;
  margin: 0;
  letter-spacing: 0.5px;
}

.grimoire-legend-epithet {
  font-size: 0.95rem;
  color: #78350f;
  font-style: italic;
}

/* Sections */
.legend-section-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #78350f;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #d4c0a5;
  padding-bottom: 0.35rem;
}

.legend-myth-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-text-paragraph {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #292524;
  margin: 0;
  text-align: justify;
}

/* Truth Cards */
.legend-truth-card {
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}

.known-truth-card {
  background: #fefce8 linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #ca8a04;
  box-shadow: 0 6px 20px rgba(202, 138, 4, 0.2);
}

.legend-truth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(202, 138, 4, 0.4);
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
}

.truth-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.truth-icon {
  color: #b45309;
  font-size: 1.1rem;
}

.truth-section-title {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #78350f;
}

.truth-status-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pill-revealed {
  background: #b45309;
  color: #fff;
  box-shadow: 0 0 8px rgba(180, 83, 9, 0.4);
}

.legend-truth-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legend-truth-paragraph {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #1c1917;
  margin: 0;
  text-align: justify;
}

.legend-truth-subheader {
  font-size: 0.95rem;
  font-weight: 800;
  color: #78350f;
  margin: 0.5rem 0 0.1rem 0;
}

.legend-truth-bullet {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #292524;
  padding-left: 0.5rem;
}

/* ========================================================
   SEALED WEAVER'S TRUTH WITH SCARY GLITCHING RUNE SCRIPT
   ======================================================== */
.sealed-truth-card {
  background: #080312 linear-gradient(135deg, #130624 0%, #04010a 100%) !important;
  border: 2px solid #9333ea !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 25px rgba(147, 51, 234, 0.35) !important;
  color: #e9d5ff;
}

.sealed-header {
  border-bottom-color: rgba(147, 51, 234, 0.4) !important;
}

.truth-icon-sealed {
  color: #c084fc;
  font-size: 1.1rem;
}

.sealed-header .truth-section-title {
  color: #f3e8ff;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.5);
}

.pill-sealed {
  background: #3b0764;
  border: 1px solid #a855f7;
  color: #f5d0fe;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.legend-sealed-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
}

.sealed-runic-glyph-seal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.15);
  border: 2px dashed #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e879f9;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  animation: glyphSpin 12s infinite linear;
}

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

/* Terrifying constantly mutating runic script */
.cryptic-cipher-word {
  font-family: "Courier New", monospace, serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 6px;
  color: #f5d0fe;
  text-shadow: 
    0 0 10px rgba(245, 208, 254, 0.9),
    0 0 20px rgba(192, 132, 252, 0.8),
    0 0 35px rgba(147, 51, 234, 0.7);
  margin: 0.75rem 0 1rem 0;
  user-select: none;
  display: inline-block;
  background: rgba(147, 51, 234, 0.15);
  padding: 0.4rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(216, 70, 239, 0.4);
  animation: cipherPulse 1.8s infinite ease-in-out;
}

@keyframes cipherPulse {
  0%, 100% {
    opacity: 0.88;
    filter: drop-shadow(0 0 6px #c084fc);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 14px #f472b6);
    transform: scale(1.03);
  }
}

.sealed-warning-note {
  font-size: 0.78rem;
  color: #d8b4fe;
  font-style: italic;
  line-height: 1.45;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.sealed-warning-note i {
  color: #f43f5e;
}



