:root {
  color-scheme: dark;
  --night-950: #050607;
  --night-900: #080a0c;
  --night-800: #0e1114;
  --panel: rgba(8, 10, 12, .82);
  --panel-soft: rgba(12, 14, 16, .54);
  --line: rgba(168, 156, 120, .24);
  --line-strong: rgba(216, 208, 180, .38);
  --bone: #ebe2c4;
  --bone-2: #d8d0b4;
  --muted: rgba(216, 208, 180, .66);
  --faint: rgba(216, 208, 180, .42);
  --gold: #c8b98a;
  --gold-soft: #e8d7a7;
  --shadow: rgba(0, 0, 0, .58);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--night-950);
  color: var(--bone);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.58;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.lore-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  height: 2px;
  background: rgba(168,156,120,.08);
  pointer-events: none;
}

.lore-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(109,210,164,.9), rgba(232,215,167,.92));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(0,0,0,.9), transparent 31%, transparent 66%, rgba(0,0,0,.88)),
    linear-gradient(180deg, rgba(5,6,7,.34), rgba(5,6,7,.92)),
    url("/hdn-bg-ruins.png") center center / cover no-repeat;
  filter: contrast(1.05) saturate(.62) brightness(.48);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 24px 36px, rgba(235,226,196,.26) 0 1.1px, transparent 2px),
    radial-gradient(circle at 112px 96px, rgba(235,226,196,.16) 0 1px, transparent 2px),
    radial-gradient(circle at 170px 148px, rgba(235,226,196,.19) 0 1.1px, transparent 2px),
    radial-gradient(circle at 52px 164px, rgba(235,226,196,.14) 0 .9px, transparent 1.8px),
    radial-gradient(circle at 260px 72px, rgba(235,226,196,.12) 0 .9px, transparent 1.8px),
    radial-gradient(ellipse 58% 38% at 50% 0%, rgba(168,156,120,.1), transparent 64%);
  background-size: 220px 220px, 310px 310px, 420px 420px, 360px 360px, 520px 520px, auto;
  opacity: .82;
  animation: hdnSnowDrift 42s linear infinite;
}

@keyframes hdnSnowDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, center top; }
  to { background-position: 36px 220px, -28px 310px, 44px 420px, -22px 360px, 18px 520px, center top; }
}

a {
  color: var(--gold-soft);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

main {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: .8rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid rgba(168,156,120,.16);
  background: rgba(5,6,7,.78);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  color: var(--bone);
}

.brand:hover { text-decoration: none; }

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-title {
  display: block;
  font-family: Cinzel, serif;
  font-size: .88rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
}

.brand-sub {
  display: block;
  margin-top: .05rem;
  font-size: .62rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.toplinks {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  flex-wrap: wrap;
}

.toplinks a {
  border: 1px solid transparent;
  color: rgba(216,208,180,.74);
  padding: .48rem .72rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.toplinks a:hover {
  color: var(--bone);
  text-decoration: none;
  border-color: rgba(168,156,120,.28);
  background: rgba(168,156,120,.08);
}

.toplinks a[aria-current="page"] {
  color: var(--bone);
  border-bottom-color: var(--line-strong);
}

.lore-hero,
.lore-primer,
.city-band,
.chapters-wrap,
footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.4rem) clamp(1rem, 4vw, 2rem);
}

.lore-hero {
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy {
  position: relative;
  min-width: 0;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -12% 0;
  z-index: -1;
  background: radial-gradient(ellipse at 45% 46%, rgba(0,0,0,.6), rgba(0,0,0,.22) 55%, transparent 76%);
  filter: blur(24px);
}

.eyebrow,
.chapter-num {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(168,156,120,.28);
  background: rgba(8,10,12,.68);
  color: var(--gold-soft);
  padding: .35rem .72rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}

h1,
h2,
h3 {
  font-family: Cinzel, serif;
  color: var(--bone);
}

.lore-hero h1 {
  max-width: 880px;
  margin: 1rem 0 .9rem;
  font-size: clamp(2.7rem, 7vw, 6.5rem);
  line-height: .98;
  font-weight: 600;
  letter-spacing: .02em;
  text-shadow: 0 10px 34px rgba(0,0,0,.9), 0 0 20px rgba(168,156,120,.14);
  overflow-wrap: break-word;
}

.lore-hero p,
.lore-primer p,
.section-head p {
  max-width: 760px;
  color: rgba(235,226,196,.76);
  font-size: clamp(1rem, 1.45vw, 1.14rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .88rem 1.35rem;
  border: 1px solid rgba(168,156,120,.34);
  background: rgba(8,10,12,.76);
  color: var(--bone);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  border-color: rgba(232,215,167,.48);
  background: rgba(16,18,18,.88);
}

.btn-primary {
  background: linear-gradient(180deg, rgba(232,215,167,.96), rgba(176,139,74,.9));
  color: #11100b;
}

.hero-oath,
.primer-card,
.city-card,
.chapter-card,
.chapter-index {
  position: relative;
  border: 1px solid rgba(168,156,120,.14);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(168,156,120,.065), transparent 70%),
    linear-gradient(180deg, rgba(12,14,16,.54), rgba(5,6,7,.36));
  box-shadow: inset 0 1px 0 rgba(235,226,196,.045), 0 16px 38px rgba(0,0,0,.2);
  backdrop-filter: blur(6px);
  border-radius: 8px;
}

.hero-oath {
  min-height: 360px;
  display: grid;
  align-content: end;
  padding: 1.4rem;
  background:
    linear-gradient(180deg, rgba(5,6,7,.12), rgba(5,6,7,.86)),
    var(--hero-oath-image, url("/hdn-bg-ruins.png")) center / cover no-repeat;
  overflow: hidden;
}

.oath-kicker {
  color: var(--gold-soft);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero-oath p {
  margin: .65rem 0 0;
  font-family: Cinzel, serif;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.15;
  color: var(--bone);
  text-shadow: 0 6px 28px rgba(0,0,0,.9);
}

.lore-primer {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.35rem, 3vw, 2.4rem);
  align-items: start;
  padding-top: 1.5rem;
}

.primer-text h2,
.section-head h2 {
  margin: .8rem 0 .65rem;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
  font-weight: 600;
}

.primer-grid,
.city-grid {
  display: grid;
  gap: 1rem;
}

.primer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.primer-card,
.city-card {
  overflow: hidden;
  padding: 0;
}

.primer-card {
  display: flex;
  flex-direction: column;
  gap: .72rem;
  min-height: 178px;
  padding: clamp(1rem, 2vw, 1.25rem);
}

.primer-card .chapter-num {
  align-self: flex-start;
}

.city-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(.82) contrast(1.04) brightness(.74);
  border-bottom: 1px solid rgba(168,156,120,.14);
}

.city-card h3,
.city-card p {
  padding-left: 1rem;
  padding-right: 1rem;
}

.primer-card h3,
.city-card h3 {
  margin: .75rem 0 .4rem;
  font-size: 1.05rem;
  letter-spacing: .06em;
}

.primer-card h3 {
  margin: .1rem 0 0;
  line-height: 1.22;
}

.primer-card p,
.city-card p {
  margin: 0;
  color: var(--muted);
  font-size: .93rem;
}

.primer-card p {
  line-height: 1.5;
}

.primer-card .text-link {
  margin-top: auto;
}

.city-card p {
  padding-bottom: 1rem;
}

.text-link {
  display: inline-flex;
  margin-top: .8rem;
  color: var(--gold-soft);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.city-band {
  max-width: none;
  border-top: 1px solid rgba(168,156,120,.09);
  border-bottom: 1px solid rgba(168,156,120,.09);
  background: linear-gradient(180deg, rgba(5,6,7,.16), rgba(5,6,7,.34));
}

.city-band > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  margin-bottom: 1.35rem;
  text-align: center;
}

.align-left { text-align: left; }

.city-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chapters-wrap {
  max-width: 1480px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.chapter-index {
  position: sticky;
  top: 84px;
  padding: .9rem;
  max-height: calc(100svh - 104px);
  overflow: auto;
}

.index-title {
  margin-bottom: .7rem;
  color: var(--gold-soft);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.chapter-index nav {
  display: grid;
  gap: .15rem;
}

.chapter-search {
  display: grid;
  gap: .35rem;
  margin-bottom: .75rem;
}

.chapter-search span {
  color: var(--gold-soft);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.chapter-search input {
  width: 100%;
  border: 1px solid rgba(168,156,120,.18);
  border-radius: 4px;
  background: rgba(3,4,4,.44);
  color: var(--bone);
  padding: .55rem .62rem;
  outline: none;
  font: inherit;
  font-size: .82rem;
}

.chapter-search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px rgba(168,156,120,.08);
}

.chapter-index a {
  display: block;
  padding: .44rem .5rem;
  border: 1px solid transparent;
  color: rgba(216,208,180,.68);
  font-size: .78rem;
  line-height: 1.25;
}

.chapter-index a:hover {
  color: var(--bone);
  text-decoration: none;
  border-color: rgba(168,156,120,.18);
  background: rgba(168,156,120,.06);
}

.chapter-index a.is-active {
  color: var(--bone);
  border-color: rgba(109,210,164,.26);
  background: rgba(109,210,164,.07);
}

.chapter-list {
  display: grid;
  gap: 1.35rem;
}

.chapter-card {
  display: block;
  scroll-margin-top: 86px;
  overflow: hidden;
}

.chapter-card.no-image .chapter-image {
  display: none;
}

.chapter-image {
  position: relative;
  aspect-ratio: 16 / 8.2;
  min-height: 320px;
  max-height: 620px;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(168,156,120,.18), transparent 60%),
    linear-gradient(180deg, rgba(5,6,7,.28), rgba(5,6,7,.84)),
    url("/hdn-bg-ruins.png") center / cover no-repeat;
  border-bottom: 1px solid rgba(168,156,120,.14);
}

.chapter-image img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  filter: saturate(.86) contrast(1.06) brightness(.76);
}

.is-viewable {
  cursor: zoom-in;
}

.chapter-image:has(.is-viewable)::before,
.city-card:has(.is-viewable)::before,
.hero-oath.is-viewable::before {
  content: "Ampliar";
  position: absolute;
  right: .85rem;
  top: .85rem;
  z-index: 2;
  border: 1px solid rgba(168,156,120,.22);
  border-radius: 4px;
  background: rgba(3,4,4,.62);
  color: var(--gold-soft);
  padding: .28rem .5rem;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}

.chapter-image:hover::before,
.city-card:hover::before,
.hero-oath.is-viewable:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.chapter-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,6,7,.1), rgba(5,6,7,.12) 42%, rgba(5,6,7,.68)),
    radial-gradient(ellipse at 50% 50%, transparent 46%, rgba(0,0,0,.36) 100%);
  pointer-events: none;
}

.image-placeholder {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  color: rgba(235,226,196,.72);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.chapter-content {
  width: min(100%, 980px);
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(1.2rem, 3.4vw, 2.2rem);
}

.chapter-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: .8rem;
}

.chapter-kicker {
  color: var(--faint);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.chapter-content h2 {
  margin: 0 0 .8rem;
  font-size: clamp(1.6rem, 3.3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: .03em;
}

.chapter-subtitle {
  margin: 1.15rem 0 .45rem;
  color: var(--gold-soft);
  font-size: 1rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.chapter-content p,
.chapter-bullets {
  color: rgba(235,226,196,.75);
  font-size: 1rem;
}

.chapter-content p {
  margin: 0 0 .8rem;
}

.chapter-content p:last-child,
.chapter-bullets:last-child {
  margin-bottom: 0;
}

.chapter-bullets {
  margin: .35rem 0 1rem;
  padding-left: 1.05rem;
}

.chapter-bullets li + li {
  margin-top: .25rem;
}

.chapter-content strong {
  color: var(--bone);
  font-weight: 650;
}

.reveal-lite {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s ease, transform .42s ease;
}

.reveal-lite.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(0,0,0,.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.image-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-viewer img {
  max-width: min(96vw, 1280px);
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid rgba(168,156,120,.28);
  box-shadow: 0 24px 80px rgba(0,0,0,.72);
}

.image-viewer p {
  margin: .8rem 0 0;
  color: rgba(235,226,196,.78);
  font-family: Cinzel, serif;
  letter-spacing: .08em;
  text-align: center;
}

.image-viewer-close {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  top: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(168,156,120,.32);
  border-radius: 4px;
  background: rgba(5,7,6,.84);
  color: var(--bone);
  padding: .55rem .8rem;
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}

.viewer-open {
  overflow: hidden;
}

footer {
  color: var(--faint);
  text-align: center;
  font-size: .86rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.footer-disclaimer {
  max-width: 760px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toplinks {
    justify-content: flex-start;
  }

  .lore-hero,
  .lore-primer,
  .chapters-wrap {
    grid-template-columns: 1fr;
  }

  .lore-hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .chapter-index {
    position: static;
    max-height: none;
  }

  .chapter-index nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .brand-sub { display: none; }

  .toplinks {
    width: 100%;
    gap: .15rem;
  }

  .toplinks a {
    padding: .42rem .5rem;
    font-size: .66rem;
  }

  .lore-hero h1 {
    font-size: clamp(2.15rem, 12vw, 4.1rem);
  }

  .hero-actions .btn {
    width: min(100%, 330px);
  }

  .primer-grid,
  .city-grid,
  .chapter-card {
    grid-template-columns: 1fr;
  }

  .chapter-index {
    overflow: hidden;
  }

  .chapter-index nav {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
    padding-bottom: .2rem;
  }

  .chapter-index a {
    flex: 0 0 auto;
    max-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chapter-search {
    margin-bottom: .55rem;
  }

  .chapter-image {
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid rgba(168,156,120,.14);
  }

  .chapter-image img {
    height: 100%;
    min-height: 0;
  }

  .chapter-image::after {
    background:
      linear-gradient(180deg, rgba(5,6,7,.04), rgba(5,6,7,.08) 52%, rgba(5,6,7,.34)),
      radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0,0,0,.22) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition: none;
    animation: none;
  }

  .reveal-lite {
    opacity: 1;
    transform: none;
  }
}

/* HDN 2026-05-29: mismo lenguaje visual que K/housing in-game. */
:root {
  --night-950: #020303;
  --night-900: #050706;
  --night-800: #090b0a;
  --panel: rgba(6, 8, 7, .92);
  --panel-soft: rgba(7, 8, 8, .84);
  --line: rgba(168, 156, 120, .26);
  --line-strong: rgba(200, 184, 140, .68);
  --bone: #ebe2c4;
  --bone-2: #d8d0b4;
  --muted: rgba(216, 208, 180, .70);
  --faint: rgba(216, 208, 180, .46);
  --gold: #c8b98a;
  --gold-soft: #e8d7a7;
}

body { background:#020303; }

body::before {
  background:
    linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.24) 36%, rgba(0,0,0,.36) 68%, rgba(0,0,0,.82)),
    linear-gradient(180deg, rgba(1,2,2,.18), rgba(1,2,2,.70)),
    url("/hdn-bg-ruins.png") center center / cover no-repeat;
  filter: contrast(1.04) saturate(.62) brightness(.58);
}

body::after {
  background:
    radial-gradient(circle at 24px 36px, rgba(235,226,196,.24) 0 1px, transparent 2px),
    radial-gradient(circle at 112px 96px, rgba(235,226,196,.14) 0 1px, transparent 2px),
    radial-gradient(circle at 170px 148px, rgba(235,226,196,.18) 0 1px, transparent 2px),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.22) 100%);
  background-size:240px 240px,340px 340px,460px 460px,auto;
  opacity:.48;
  animation:hdnSnowDrift 44s linear infinite;
}

.topbar {
  background: rgba(3,4,4,.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
  box-shadow: 0 18px 44px rgba(0,0,0,.42);
}

.toplinks a {
  border:0;
  border-bottom:1px solid transparent;
  border-radius:0;
  color:var(--gold);
  letter-spacing:.20em;
}

.toplinks a:hover {
  background:transparent;
  border-bottom-color:var(--line-strong);
  color:var(--bone);
}

.eyebrow,
.chapter-num,
.chapter-pill,
.city-card span,
.quick-index a {
  border-radius:4px;
  clip-path:none;
}

.btn,
.lore-btn,
.quick-index a,
.chapter-pill {
  border-radius:4px;
  clip-path:none;
  background:rgba(5,7,6,.74);
  border:1px solid var(--line);
  color:var(--bone);
  box-shadow:none;
}

.btn:hover,
.lore-btn:hover,
.quick-index a:hover {
  background:rgba(216,193,122,.035);
  border-color:var(--line-strong);
}

.hero-oath,
.primer-card,
.city-card,
.chapter-card,
.chapter-index,
.lore-card,
.city-card,
.chapter,
.summary-card,
.timeline-card,
.rule-card {
  border-radius:4px;
  border:1px solid rgba(168,156,120,.18);
  background:linear-gradient(180deg, rgba(7,8,8,.60), rgba(3,4,4,.36));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03), 0 16px 34px rgba(0,0,0,.18);
  backdrop-filter:none;
}

.city-band {
  background:
    linear-gradient(90deg, rgba(2,3,3,.34), rgba(2,3,3,.10) 50%, rgba(2,3,3,.30)),
    rgba(2,3,3,.14);
}

.hero-oath {
  background:
    linear-gradient(180deg, rgba(5,6,7,.08), rgba(5,6,7,.66)),
    var(--hero-oath-image, url("/hdn-bg-ruins.png")) center / cover no-repeat;
}

.chapter-image img,
.city-card img {
  filter:saturate(.9) contrast(1.04) brightness(.84);
}

h1,h2,h3 {
  letter-spacing:.08em;
  text-shadow:0 2px 6px rgba(0,0,0,.9);
}

body::after {
  inset: -10vh -8vw;
  will-change: transform;
  animation: hdnSnowFloat 46s linear infinite;
}

@keyframes hdnSnowFloat {
  from { transform: translate3d(0, -4vh, 0); }
  to { transform: translate3d(18px, 6vh, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; transform: none; }
}

/* HDN 2026-05-30: tono visual más sobrio y estable en móvil. */
h1,
h2,
h3,
.brand-title,
.chapter-kicker,
.index-title,
.oath-kicker {
  letter-spacing: .035em;
}

.lore-hero p,
.lore-primer p,
.section-head p,
.chapter-content p,
.chapter-bullets,
.city-card p,
.primer-card p {
  text-wrap: pretty;
}

body::after {
  opacity: .34;
}

.hero-oath,
.primer-card,
.city-card,
.chapter-card,
.chapter-index {
  background: linear-gradient(180deg, rgba(7,8,8,.66), rgba(3,4,4,.42));
}

.hero-oath {
  background:
    linear-gradient(180deg, rgba(5,6,7,.08), rgba(5,6,7,.66)),
    var(--hero-oath-image, url("/hdn-bg-ruins.png")) center / cover no-repeat;
}

.chapter-card {
  content-visibility: auto;
  contain-intrinsic-size: 1px 1180px;
}

@media (max-width: 700px) {
  .chapter-index nav {
    scroll-behavior: auto;
  }
}

/* HDN 2026-05-30: capa final responsive para 1366x768 y zoom. */
@media (max-height: 820px) and (min-width: 900px) {
  .topbar {
    min-height: 56px;
    padding: .55rem clamp(.9rem, 2.2vw, 1.35rem);
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .brand-title {
    font-size: .78rem;
  }

  .brand-sub {
    font-size: .56rem;
  }

  .toplinks a {
    padding: .4rem .52rem;
    font-size: .64rem;
    letter-spacing: .14em;
  }

  .lore-hero {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
    gap: 1rem;
    padding: 1.25rem clamp(.9rem, 2.2vw, 1.35rem) 1.45rem;
  }

  .lore-hero h1 {
    margin: .72rem 0 .55rem;
    font-size: clamp(2.15rem, 4.9vw, 4.05rem);
    line-height: 1;
  }

  .lore-hero p,
  .lore-primer p,
  .section-head p {
    font-size: .97rem;
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: .95rem;
    gap: .55rem;
  }

  .btn {
    min-height: 38px;
    padding: .58rem .82rem;
    font-size: .64rem;
  }

  .hero-oath {
    min-height: 230px;
    padding: 1rem;
  }

  .hero-oath p {
    font-size: clamp(1.1rem, 2.1vw, 1.6rem);
  }

  .lore-primer,
  .city-band,
  .chapters-wrap,
  footer {
    padding: 2rem clamp(.9rem, 2.2vw, 1.35rem);
  }

  .primer-text h2,
  .section-head h2 {
    font-size: clamp(1.55rem, 3vw, 2.2rem);
  }

  .primer-grid,
  .city-grid {
    gap: .75rem;
  }

  .primer-card,
  .city-card {
    padding: .95rem;
  }

  .chapters-wrap {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 1rem;
  }

  .chapter-index {
    top: 68px;
    max-height: calc(100svh - 84px);
    padding: .65rem;
  }

  .chapter-index a {
    padding: .34rem .42rem;
    font-size: .72rem;
  }

  .chapter-list {
    gap: 1rem;
  }

  .chapter-image {
    min-height: 230px;
    aspect-ratio: 16 / 7.2;
  }

  .chapter-image img {
    min-height: 230px;
  }

  .chapter-content {
    padding: 1.15rem;
  }
}

@media (max-width: 1180px) {
  .lore-hero,
  .lore-primer,
  .chapters-wrap {
    grid-template-columns: 1fr;
  }

  .lore-hero {
    min-height: auto;
    padding-top: 1.65rem;
  }

  .chapter-index {
    position: static;
    max-height: none;
  }

  .chapter-index nav {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
  }

  .chapter-index a {
    flex: 0 0 auto;
    max-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
