:root {
  --bg-0: #0f1115;
  --bg-1: #171b22;
  --bg-2: #1f2631;
  --panel: rgba(28, 34, 44, 0.75);
  --line: rgba(201, 168, 95, 0.25);
  --gold: #c9a85f;
  --gold-2: #f2d28b;
  --text: #f3f4f6;
  --muted: #a5adba;
  --danger: #d75f4a;
  --info: #58a6ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(201,168,95,0.12), transparent 70%),
    radial-gradient(900px 500px at 10% 110%, rgba(88,166,255,0.10), transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 50%, #0b0d12 100%);
  background-attachment: fixed;
}

.site-title,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: 'MedievalSharp', cursive;
  color: var(--gold-2);
  text-shadow: 0 2px 14px rgba(201,168,95,0.2);
}

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
}

.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
}

.stats-card {
  background: linear-gradient(140deg, rgba(201,168,95,0.12), rgba(31,38,49,0.88));
  border: 1px solid var(--line);
}

.stat-pill {
  background: rgba(13, 17, 23, 0.65);
  border: 1px solid rgba(201, 168, 95, 0.2);
  border-radius: .9rem;
  padding: .75rem;
  text-align: center;
}

.stat-pill span {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-2);
}

.stat-pill small {
  color: var(--muted);
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .08em;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: .75rem;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #a9781c);
  margin-top: .35rem;
  box-shadow: 0 0 0 4px rgba(201,168,95,0.14);
}

.timeline-content {
  border-left: 1px solid rgba(201,168,95,0.18);
  padding-left: .85rem;
}

.char-card {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.char-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,168,95,0.45);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}

.ability-box {
  background: rgba(16, 21, 29, 0.7);
  border: 1px solid rgba(88,166,255,0.2);
}

.navbar {
  backdrop-filter: blur(10px);
  background: rgba(16, 20, 27, 0.92) !important;
}

.brand-logo {
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(201, 168, 95, 0.25);
}

.nav-link.btn {
  border-radius: 999px;
}

.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,0.02);
}

.page-link {
  background: rgba(16, 20, 27, 0.7);
  border-color: rgba(201,168,95,0.25);
  color: var(--gold-2);
}

.page-link:hover {
  background: rgba(201,168,95,0.16);
  color: #fff;
}

#main-nav,
.panel-card,
.hero-section .container > .row > * {
  animation: riseIn .5s ease both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 991.98px) {
  .hero-title { font-size: 2.2rem; }
}

@media (max-width: 575.98px) {
  .hero-title { font-size: 1.9rem; }
  .timeline-item { grid-template-columns: 16px 1fr; }
}

.map-card {
  overflow: hidden;
}

.world-map-viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 420px;
  border: 1px solid rgba(201, 168, 95, 0.28);
  border-radius: .8rem;
  overflow: hidden;
  background: rgba(10, 14, 20, 0.92);
  cursor: grab;
}

.world-map-viewport.is-dragging {
  cursor: grabbing;
}

.world-map-stage {
  position: relative;
  transform-origin: top left;
  will-change: transform;
  user-select: none;
}

.world-map-image {
  width: 100%;
  height: auto;
  display: block;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  padding: 0;
  color: #fff;
  text-align: center;
  z-index: 3;
}

.map-pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  background: #f0c46a;
  box-shadow: 0 0 0 4px rgba(240, 196, 106, 0.2);
}

.map-pin-label {
  display: block;
  margin-top: .3rem;
  padding: .15rem .45rem;
  border-radius: .4rem;
  background: rgba(12, 17, 25, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: .74rem;
  line-height: 1.1;
  white-space: nowrap;
}

.map-pin.is-current .map-pin-dot {
  background: #58a6ff;
  box-shadow: 0 0 0 5px rgba(88, 166, 255, 0.28), 0 0 20px rgba(88, 166, 255, 0.55);
}

.fog-blob {
  position: absolute;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,18,26,0.88) 0%, rgba(8,11,16,0.98) 60%);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 2;
}

.map-info-panel {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: .75rem;
  padding: .85rem 1rem;
  background: rgba(10, 14, 20, 0.58);
}

.map-region-list {
  margin: 0;
  padding-left: 1rem;
}

.map-region-list li {
  margin-bottom: .25rem;
  color: var(--text);
}
