/* =========================================================
   LONILA INTERACTIVE MAP
   Phase 10 test — Redranova popup on Elaria marker
   ========================================================= */

:root {
  --background: #070b10;
  --panel: #0d131b;
  --border: rgba(217, 177, 99, 0.45);
  --gold: #d9b163;
  --gold-bright: #f1d18c;
  --text: #f4efe5;
  --muted: #a9b0ba;
  --shadow: rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, #15202b 0%, #090e14 34%, #05080c 100%);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

body { min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }

.site-header {
  padding: 26px 20px 18px;
  text-align: center;
  border-bottom: 1px solid rgba(217, 177, 99, 0.2);
  background: rgba(4, 8, 12, 0.68);
}

.title-group { max-width: 900px; margin: 0 auto; }

.eyebrow, .panel-kicker {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
}

h1 {
  margin: 0;
  color: var(--gold-bright);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 0 #000, 0 0 26px rgba(217, 177, 99, 0.18);
}

.tagline {
  margin: 5px 0 0;
  color: #d5d0c8;
  font-size: clamp(0.86rem, 1.8vw, 1.08rem);
  font-style: italic;
  letter-spacing: 0.06em;
}

.map-page {
  width: min(1800px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.map-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #04070a;
  box-shadow: 0 22px 70px var(--shadow);
}

.map-viewport {
  position: relative;
  width: 100%;
  height: min(76vh, 980px);
  min-height: 500px;
  overflow: hidden;
  background: radial-gradient(circle at center, #0d1821, #020406 76%);
  cursor: grab;
  touch-action: none;
  user-select: none;
  outline: none;
}

.map-viewport.is-dragging { cursor: grabbing; }
.map-viewport.coordinate-mode { cursor: crosshair; }

.map-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.world-map {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.location-marker {
  --marker-color: #f1d18c;
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  z-index: 4;
}

.location-marker__ring {
  position: absolute;
  inset: 3px;
  border: 2px solid var(--marker-color);
  border-radius: 50%;
  background: rgba(4, 8, 12, 0.76);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.65), 0 0 14px var(--marker-color);
}

.location-marker__symbol {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--marker-color);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-shadow:
    0 1px 2px #000,
    0 0 7px var(--marker-color);
  pointer-events: none;
}

.location-marker__label {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  min-width: max-content;
  padding: 6px 10px;
  border: 0;
  background: rgba(4, 8, 12, 0.72);
  color: var(--marker-color);
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  text-shadow: 0 2px 4px #000, 0 0 10px rgba(0,0,0,.9);
  pointer-events: none;
}

.location-marker__region {
  display: block;
  font-size: 21px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.09em;
  font-variant: small-caps;
}

.location-marker__nation {
  display: block;
  margin-top: 4px;
  color: #f4efe5;
  font-size: 13px;
  line-height: 1.1;
  font-style: italic;
  letter-spacing: 0.035em;
}

.location-marker:hover .location-marker__ring,
.location-marker:focus-visible .location-marker__ring,
.location-marker.is-selected .location-marker__ring {
  background: rgba(217, 177, 99, 0.22);
  box-shadow: 0 0 0 3px rgba(0,0,0,.7), 0 0 22px var(--marker-color);
}

.location-marker[data-nation="Astel"] { --marker-color: #e6ba55; }
.location-marker[data-nation="Lirael"] { --marker-color: #b9d8f4; }
.location-marker[data-nation="Xilvath"] { --marker-color: #e36446; }
.location-marker[data-nation="Morzhananda"] { --marker-color: #78ca60; }
.location-marker[data-nation="Seisha"] { --marker-color: #b994e5; }
.location-marker[data-nation="Zhǎng"] { --marker-color: #e4b973; }
.location-marker[data-nation="Redranova"] { --marker-color: #d3eaff; }


/* =========================================================
   DRAG-UP NATION / ROLEPLAY CHOICE SHEET
   ========================================================= */

.choice-backdrop[hidden],
.nation-choice-sheet[hidden] {
  display: none;
}

.choice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
}

.nation-choice-sheet {
  position: fixed;
  z-index: 850;
  left: 50%;
  bottom: 0;
  width: min(980px, 100%);
  max-height: min(78vh, 760px);
  transform: translateX(-50%);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(217, 177, 99, 0.46);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.035), transparent 80px),
    #0a0d12;
  box-shadow: 0 -24px 70px rgba(0,0,0,.72);
  animation: choiceSheetUp 180ms ease-out;
}

@keyframes choiceSheetUp {
  from { transform: translate(-50%, 26px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.choice-sheet__handle {
  width: 62px;
  height: 5px;
  margin: 10px auto 2px;
  border-radius: 999px;
  background: rgba(241, 209, 140, .5);
}

.choice-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px 18px 14px;
  border-bottom: 1px solid rgba(217, 177, 99, .18);
}

.choice-sheet__kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: .7rem;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.choice-sheet__title {
  margin: 0;
  color: var(--gold-bright);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 500;
}

.choice-sheet__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.035);
  color: #fff;
  font-size: 1.45rem;
  cursor: pointer;
}

.choice-sheet__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.choice-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 177, 99, .28);
  border-radius: 10px;
  background: #0d1117;
}

.choice-card__button,
.choice-card__link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.choice-card__button[disabled] {
  cursor: not-allowed;
  opacity: .64;
}

.choice-card__image-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070a;
}

.choice-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.choice-card__body {
  display: block;
  padding: 14px 15px 16px;
}

.choice-card__type {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.choice-card__name {
  display: block;
  color: #f2eadc;
  font-size: 1.08rem;
  line-height: 1.25;
}

.choice-card__note {
  display: block;
  margin-top: 6px;
  color: #9ea4ad;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .8rem;
  line-height: 1.4;
}

.choice-card__button:hover:not([disabled]),
.choice-card__button:focus-visible,
.choice-card__link:hover,
.choice-card__link:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: -2px;
}

body.choice-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .nation-choice-sheet {
    max-height: 86vh;
  }

  .choice-sheet__cards {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nation-choice-sheet {
    animation: none;
  }
}

/* =========================================================
   FULL-SCREEN NATION POSTER VIEWER
   This is intentionally OUTSIDE the world-map viewport.
   ========================================================= */

body.modal-open {
  overflow: hidden;
}

.nation-modal[hidden] {
  display: none;
}

.nation-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(2, 3, 5, 0.985);
  color: #f5eee4;
}

.nation-modal__topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(180, 42, 55, 0.72);
  background:
    linear-gradient(to bottom, rgba(255,255,255,.025), transparent),
    #08090c;
  box-shadow: 0 8px 28px rgba(0,0,0,.55);
}

.nation-modal__heading {
  min-width: 0;
}

.nation-modal__kicker {
  display: block;
  margin-bottom: 2px;
  color: #b94a51;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.nation-modal__title {
  display: block;
  overflow: hidden;
  color: #f3e8d7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2.3vw, 1.55rem);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nation-modal__instructions {
  color: #aaa29b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .78rem;
  white-space: nowrap;
}

.nation-modal__close {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: #161015;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.nation-modal__close:hover,
.nation-modal__close:focus-visible {
  border-color: #d76972;
  background: #4c141b;
  outline: none;
}

.nation-modal__scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: #8d313b #101216;
  scrollbar-width: auto;
  background:
    radial-gradient(circle at center, #171218 0%, #08090b 55%, #030405 100%);
}

/*
   The poster is NOT reduced to viewport width.
   It is intentionally displayed at a large reading size.
   The user scrolls across it just like a large document.
*/
.nation-poster-stage {
  width: max-content;
  min-width: 100%;
  min-height: 100%;
  padding: 24px;
}

.nation-poster-full {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  min-width: 1800px;
  object-fit: none;
  border: 1px solid rgba(180, 42, 55, .52);
  box-shadow: 0 20px 65px rgba(0,0,0,.7);
  user-select: none;
  -webkit-user-drag: none;
}

/* Additional lore under the complete poster, if desired later. */
.nation-poster-caption {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: #bdb6ad;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .9rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .nation-modal__topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 64px;
    padding: 8px 10px;
  }

  .nation-modal__instructions {
    display: none;
  }

  .nation-modal__close {
    width: 44px;
    height: 44px;
  }

  .nation-poster-stage {
    padding: 14px;
  }

  .nation-poster-full {
    min-width: 1400px;
  }
}

.map-toolbar {
  position: absolute;
  z-index: 20;
  top: 18px;
  right: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: calc(100% - 36px);
}

.map-button {
  width: 46px;
  min-height: 46px;
  border: 1px solid rgba(217, 177, 99, 0.65);
  border-radius: 6px;
  background: rgba(7, 12, 17, 0.92);
  color: var(--gold-bright);
  cursor: pointer;
}

.map-button--wide {
  width: auto;
  padding-inline: 14px;
  color: #e7e0d3;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-button[aria-pressed="true"] {
  color: #14100a;
  background: var(--gold-bright);
}

.map-help {
  position: absolute;
  z-index: 15;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 1px solid rgba(217, 177, 99, 0.25);
  border-radius: 5px;
  background: rgba(4, 8, 12, 0.78);
  color: rgba(244, 239, 229, 0.82);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  white-space: nowrap;
  pointer-events: none;
}

.coordinate-readout {
  position: absolute;
  z-index: 22;
  left: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(241, 209, 140, 0.72);
  border-radius: 6px;
  background: rgba(4, 8, 12, 0.93);
}

.coordinate-pin {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff4cf;
  border-radius: 50%;
  background: rgba(217, 177, 99, 0.9);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 10;
}

.nation-legend,

.nation-legend h2 {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: 1.2rem;
  font-weight: 500;
}

.legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.legend-item {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid rgba(217,177,99,.24);
  border-radius: 5px;
  background: rgba(4,8,12,.7);
  color: #e7e0d3;
  cursor: pointer;
}







/* =========================================================
   HOVER REGION OUTLINES
   SVG sits inside the transformed map stage.
   ========================================================= */

.region-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

.region-outline {
  fill: rgba(255, 255, 255, 0);
  stroke: rgba(255, 255, 255, 0);
  stroke-width: 0.34;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(255,255,255,.7));
  transition:
    stroke 150ms ease,
    fill 150ms ease,
    filter 150ms ease;
}

.region-outline.is-visible {
  stroke: rgba(255, 255, 255, 0.96);
  fill: rgba(255, 255, 255, 0.025);
  filter:
    drop-shadow(0 0 2px rgba(255,255,255,.92))
    drop-shadow(0 0 5px rgba(255,255,255,.32));
}

@media (prefers-reduced-motion: reduce) {
  .region-outline {
    transition: none;
  }
}



.location-marker:hover .location-marker__symbol,
.location-marker:focus-visible .location-marker__symbol,
.location-marker.is-selected .location-marker__symbol {
  transform: translate(-50%, -52%) scale(1.13);
  text-shadow:
    0 1px 2px #000,
    0 0 9px var(--marker-color),
    0 0 16px var(--marker-color);
}


/* =========================================================
   WORLD MAP / TIMELINE TABS
   ========================================================= */
.view-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 18px 16px;
}
.view-tab {
  border: 1px solid rgba(217,177,99,.38);
  background: rgba(8,12,17,.72);
  color: #c9c1b5;
  padding: 9px 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: .11em;
  text-transform: uppercase;
  cursor: pointer;
}
.view-tab:hover,
.view-tab.is-active {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(217,177,99,.1);
}
.timeline-page[hidden],
.map-page[hidden] { display: none !important; }

.timeline-page {
  min-height: calc(100vh - 150px);
  padding: 24px;
  background: #070b10;
  color: var(--text);
}
.timeline-shell {
  width: min(1600px, 100%);
  margin: 0 auto;
}
.timeline-heading {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 28px;
}
.timeline-heading h2 {
  margin: 3px 0 10px;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px,4vw,46px);
  letter-spacing: .08em;
}
.timeline-heading p { color: var(--muted); line-height: 1.6; }
.timeline-wip {
  display: inline-block;
  margin-top: 8px;
  color: #e7c777;
  font-size: 12px;
  letter-spacing: .15em;
}

.timeline-board {
  position: relative;
  min-width: 1120px;
  overflow: hidden;
  border: 1px solid rgba(217,177,99,.25);
  background:
    linear-gradient(90deg,
      rgba(109,74,145,.07) 0 34%,
      rgba(154,58,58,.07) 34% 52%,
      rgba(70,99,137,.07) 52% 82%,
      rgba(181,136,57,.07) 82% 100%),
    #090e14;
  box-shadow: 0 18px 55px rgba(0,0,0,.4);
}
.timeline-shell { overflow-x: auto; padding-bottom: 10px; }

.timeline-era {
  position: absolute;
  top: 0;
  height: 46px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #c9c2b7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: .13em;
}
.timeline-era--pre { left: 180px; width: calc((100% - 180px) * .34); }
.timeline-era--zero { left: calc(180px + (100% - 180px) * .34); width: calc((100% - 180px) * .18); color:#efb0a5; }
.timeline-era--post { left: calc(180px + (100% - 180px) * .52); width: calc((100% - 180px) * .30); }
.timeline-era--year { left: calc(180px + (100% - 180px) * .82); right: 0; color:#e7ca87; }

.timeline-axis {
  position:absolute;
  left: calc(180px + (100% - 180px) * .42);
  top: 46px;
  bottom: 0;
  width: 1px;
  background: rgba(237,113,93,.45);
  box-shadow: 0 0 10px rgba(237,113,93,.22);
}

.story-lane {
  --lane:#cbb27b;
  display:grid;
  grid-template-columns:180px 1fr;
  min-height: 190px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.story-lane:first-of-type { margin-top:46px; }
.story-lane--saint { --lane:#b887df; }
.story-lane--heir { --lane:#e3bb5d; }
.story-lane--debtor { --lane:#d15f55; }
.story-lane--villain { --lane:#8ea15b; }
.story-lane--extra { --lane:#d9a55b; }
.story-lane--dweller { --lane:#c7a06a; }
.story-lane--prodigy { --lane:#78b8e8; }

.story-lane__label {
  padding: 26px 18px;
  border-right: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.14);
}
.story-lane__label strong {
  display:block;
  color:var(--lane);
  font-family:Georgia,"Times New Roman",serif;
  font-size:15px;
  letter-spacing:.08em;
}
.story-lane__label span {
  display:block;
  margin-top:7px;
  color:#8f969f;
  font-size:11px;
  font-style:italic;
}
.story-lane__track {
  position:relative;
  min-height:190px;
}
.story-lane__track::before {
  content:"";
  position:absolute;
  left:3%;
  right:3%;
  top:50%;
  height:2px;
  background:linear-gradient(90deg,transparent,var(--lane) 7%,var(--lane) 93%,transparent);
  opacity:.5;
}
.story-node {
  position:absolute;
  left:var(--x);
  top:50%;
  transform:translate(-50%,-50%);
  width:150px;
  color:#eee7db;
  text-decoration:none;
  z-index:2;
  transition:transform .15s ease, filter .15s ease;
}
.story-node:hover,
.story-node:focus-visible {
  transform:translate(-50%,-50%) scale(1.06);
  outline:none;
  filter:drop-shadow(0 0 10px var(--lane));
}
.story-node::before {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:11px;
  height:11px;
  transform:translate(-50%,-50%);
  border:2px solid var(--lane);
  border-radius:50%;
  background:#090e14;
  box-shadow:0 0 8px var(--lane);
  z-index:3;
}
.story-node img {
  display:block;
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
  border:1px solid color-mix(in srgb, var(--lane) 70%, transparent);
  border-radius:5px;
  box-shadow:0 8px 22px rgba(0,0,0,.42);
}
.story-node span {
  display:block;
  margin-top:17px;
  text-align:center;
}
.story-node b {
  display:block;
  color:var(--lane);
  font-family:Georgia,"Times New Roman",serif;
  font-size:12px;
}
.story-node small {
  display:block;
  margin-top:3px;
  color:#9ca3ac;
  font-size:9px;
  line-height:1.25;
}
.story-node--anchor img {
  border-color:#ed715d;
  box-shadow:0 0 18px rgba(237,113,93,.25);
}
.story-node--anchor b { color:#ef8a79; }

@media (max-width: 700px) {
  .timeline-page { padding: 14px 8px; }
}


/* =========================================================
   ERA OF AWAKENING — TIMELINE POLISH
   ========================================================= */

.view-tab span {
  margin-right: 7px;
  opacity: .8;
}

.era-heading {
  position: relative;
  padding: 26px 20px 24px;
  border: 1px solid rgba(217,177,99,.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(217,177,99,.08), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,.018), transparent),
    rgba(7,11,16,.78);
  overflow: hidden;
}

.era-heading::before,
.era-heading::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-color: rgba(217,177,99,.22);
  pointer-events: none;
}
.era-heading::before {
  left: 10px;
  top: 10px;
  border-left: 1px solid;
  border-top: 1px solid;
}
.era-heading::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.era-heading__ornament {
  position: absolute;
  inset: -22px 0 auto;
  text-align: center;
  color: rgba(217,177,99,.08);
  font-size: 150px;
  line-height: 1;
  pointer-events: none;
}

.era-heading__title-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.era-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(217,177,99,.45);
  background: rgba(217,177,99,.07);
  color: var(--gold-bright);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
}

.era-heading__subtitle {
  margin: -2px 0 12px !important;
  color: #c9b98f !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  letter-spacing: .07em;
}

.era-heading__lore {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto !important;
  color: #b5b1aa !important;
  font-size: 14px;
  line-height: 1.75 !important;
}

.era-status {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px auto 0;
}

.era-status span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  color: #9ba1a9;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  letter-spacing: .04em;
}
.era-status b {
  color: #d7c18e;
  font-weight: 600;
}

.chronicle-subhead {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  width: fit-content;
  margin: 20px auto 0;
  padding-top: 15px;
  border-top: 1px solid rgba(217,177,99,.18);
}
.chronicle-subhead span {
  color: #a9966d;
  font-size: 9px;
  letter-spacing: .22em;
}
.chronicle-subhead strong {
  color: #eee4d1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: .1em;
}
.chronicle-subhead small {
  color: #8e949b;
  font-size: 10px;
  font-style: italic;
}

.timeline-board {
  margin-top: 22px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,.018), transparent 28%),
    linear-gradient(90deg,
      rgba(109,74,145,.07) 0 34%,
      rgba(154,58,58,.08) 34% 52%,
      rgba(70,99,137,.07) 52% 82%,
      rgba(181,136,57,.07) 82% 100%),
    #070b10;
}

.timeline-board::after {
  content: "♛    ⚔    ☠    ✦    ⚔    ♛";
  position: absolute;
  left: 210px;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.018);
  font-size: 76px;
  letter-spacing: .45em;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.timeline-era {
  height: 54px;
  align-content: center;
  gap: 1px;
  padding: 6px 8px;
}
.timeline-era strong {
  display: block;
  font-size: 10px;
  letter-spacing: .13em;
}
.timeline-era small {
  display: block;
  color: #717982;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8px;
  letter-spacing: .05em;
}

.timeline-era--zero {
  background: rgba(164,67,55,.06);
  border-left: 1px solid rgba(237,113,93,.25);
  border-right: 1px solid rgba(237,113,93,.25);
}
.timeline-era--zero strong {
  color: #f29b8c;
}

.timeline-axis {
  top: 54px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(237,113,93,.18),
    rgba(237,113,93,.82) 15%,
    rgba(237,113,93,.52) 85%,
    rgba(237,113,93,.14)
  );
  box-shadow:
    0 0 10px rgba(237,113,93,.25),
    0 0 24px rgba(237,113,93,.09);
}

.story-lane:first-of-type {
  margin-top: 54px;
}

.story-lane {
  position: relative;
  min-height: 205px;
}
.story-lane::after {
  content: "";
  position: absolute;
  left: 180px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
}

.story-lane__label {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 18px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.025), transparent),
    rgba(0,0,0,.16);
}

.lane-emblem {
  display: block;
  margin-bottom: 10px;
  color: var(--lane);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-style: normal;
  text-shadow: 0 0 9px color-mix(in srgb, var(--lane) 58%, transparent);
}

.story-lane__label strong {
  font-size: 14px;
  line-height: 1.15;
}
.story-lane__label span {
  margin-top: 5px;
  color: #b2aa9d;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .11em;
}
.story-lane__label small {
  display: block;
  margin-top: 6px;
  color: #777f88;
  font-size: 10px;
  font-style: italic;
}

.story-lane__track::before {
  height: 1px;
  opacity: .62;
  box-shadow: 0 0 9px color-mix(in srgb, var(--lane) 28%, transparent);
}

.story-node {
  width: 156px;
}
.story-node img {
  border-radius: 2px;
  filter: saturate(.9) brightness(.92);
  transition: filter .15s ease, border-color .15s ease;
}
.story-node:hover img,
.story-node:focus-visible img {
  filter: saturate(1.04) brightness(1.04);
}
.story-node span {
  margin-top: 19px;
}
.story-node b {
  font-size: 12px;
  letter-spacing: .02em;
}
.story-node small {
  margin-top: 4px;
  font-size: 9px;
}
.story-node::after {
  content: "OPEN STORY ↗";
  display: block;
  margin-top: 5px;
  color: transparent;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .12em;
  transition: color .15s ease;
}
.story-node:hover::after,
.story-node:focus-visible::after {
  color: #b7b1a8;
}

.concurrent-tag {
  display: block;
  width: fit-content;
  margin: 5px auto 0;
  padding: 2px 5px;
  border: 1px dashed color-mix(in srgb, var(--lane) 55%, transparent);
  color: color-mix(in srgb, var(--lane) 82%, white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 7px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.story-node:has(.concurrent-tag)::before {
  border-style: dashed;
}

.demon-undercurrent {
  position: relative;
  z-index: 2;
  padding: 12px 20px;
  overflow: hidden;
  border-top: 1px solid rgba(160,38,38,.22);
  border-bottom: 1px solid rgba(160,38,38,.22);
  background:
    repeating-linear-gradient(135deg, rgba(122,20,20,.035) 0 8px, transparent 8px 16px),
    rgba(33,5,8,.25);
  text-align: center;
}
.demon-undercurrent::before,
.demon-undercurrent::after {
  content: "☠";
  margin: 0 14px;
  color: rgba(178,59,59,.55);
}
.demon-undercurrent span {
  color: #9d5555;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  letter-spacing: .18em;
}

.timeline-legend {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: 24px;
  padding: 18px 22px 20px;
  background: rgba(4,7,10,.72);
}
.timeline-legend > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}
.timeline-legend strong {
  width: 100%;
  color: var(--gold-bright);
  font-size: 10px;
  letter-spacing: .15em;
}
.timeline-legend span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: #8f969e;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
}
.timeline-legend i {
  display: inline-block;
  width: 22px;
  height: 2px;
}
.legend-solid { background: #b9a26c; }
.legend-dotted {
  background: repeating-linear-gradient(90deg,#b9a26c 0 4px,transparent 4px 8px);
}
.legend-year {
  width: 2px !important;
  height: 17px !important;
  background: #ed715d;
  box-shadow: 0 0 7px rgba(237,113,93,.45);
}
.timeline-legend p {
  margin: 0;
  color: #737b84;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .era-status {
    display: grid;
  }
  .timeline-legend {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   WORLD ATLAS — ERA CHRONICLE PREVIEW
   Replaces the old developer coordinate panel.
   ========================================================= */

.chronicle-preview {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid rgba(217, 177, 99, 0.28);
  background:
    radial-gradient(circle at 5% 50%, rgba(217,177,99,.08), transparent 26%),
    linear-gradient(100deg, rgba(255,255,255,.018), transparent 55%),
    rgba(8, 12, 17, 0.82);
}

.chronicle-preview::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(217,177,99,.07);
  pointer-events: none;
}

.chronicle-preview__ornament {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(217,177,99,.28);
  border-radius: 50%;
  color: var(--gold-bright);
  background: rgba(217,177,99,.05);
  font-size: 27px;
  box-shadow:
    inset 0 0 18px rgba(217,177,99,.04),
    0 0 18px rgba(0,0,0,.28);
}

.chronicle-preview__content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.chronicle-preview h2 {
  margin: 0 0 7px;
  color: var(--gold-bright);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 500;
  letter-spacing: .03em;
}

.chronicle-preview__content > p:not(.panel-kicker) {
  max-width: 920px;
  margin: 0;
  color: #aeb4bc;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .88rem;
  line-height: 1.6;
}

.chronicle-preview__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 13px;
}

.chronicle-preview__meta span {
  color: #858d96;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .72rem;
}

.chronicle-preview__meta strong {
  margin-right: 5px;
  color: #cbb78a;
  font-weight: 600;
}

.chronicle-preview__button {
  position: relative;
  z-index: 1;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid rgba(217,177,99,.48);
  background:
    linear-gradient(to bottom, rgba(255,255,255,.035), transparent),
    rgba(19,16,10,.78);
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .8rem;
  letter-spacing: .07em;
  cursor: pointer;
  white-space: nowrap;
}

.chronicle-preview__button span {
  display: inline-block;
  margin-left: 7px;
  transition: transform .15s ease;
}

.chronicle-preview__button:hover,
.chronicle-preview__button:focus-visible {
  border-color: var(--gold-bright);
  background: rgba(217,177,99,.1);
  outline: none;
}

.chronicle-preview__button:hover span,
.chronicle-preview__button:focus-visible span {
  transform: translateX(3px);
}

@media (max-width: 760px) {
  .chronicle-preview {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }

  .chronicle-preview__ornament {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .chronicle-preview__button {
    grid-column: 1 / -1;
    width: 100%;
  }
}
