:root {
  --bg-deep: #0e1d2f;
  --bg-night: #111827;
  --parchment: #f1e4c7;
  --parchment-soft: #dcc9a2;
  --gold: #c7a458;
  --gold-bright: #f6d490;
  --blood: #8a2f2f;
  --ink: #101010;
  --text-main: #f5ead1;
  --text-muted: #d6c7aa;
  --card: rgba(16, 24, 36, 0.82);
  --card-border: rgba(210, 178, 107, 0.4);
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --max-width: 1180px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  font-family: "EB Garamond", serif;
  font-size: 1.15rem;
  line-height: 1.5;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(199, 164, 88, 0.11), transparent 42%),
    radial-gradient(circle at 82% 22%, rgba(138, 47, 47, 0.15), transparent 35%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 2px,
      transparent 2px,
      transparent 8px
    ),
    linear-gradient(160deg, var(--bg-night) 0%, var(--bg-deep) 56%, #1a1a23 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

main {
  width: min(var(--max-width), 92vw);
  margin: 0 auto;
  padding: calc(var(--header-height) + 1.2rem) 0 4rem;
}

.page-main {
  padding-top: calc(var(--header-height) + 1.5rem);
}

h1,
h2,
h3,
h4 {
  font-family: "Cinzel", serif;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0;
}

p {
  margin: 0;
}

.section {
  margin-top: 2.2rem;
  padding: 1.4rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(14, 20, 31, 0.78), rgba(22, 31, 45, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}

.section h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  color: var(--parchment);
  margin-bottom: 0.45rem;
}

.section-head {
  margin-bottom: 1rem;
}

.section-head p,
.page-intro p {
  color: var(--text-muted);
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
  color: var(--gold-bright);
  margin-bottom: 0.35rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  padding: 0.8rem min(4vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 60;
  background: linear-gradient(180deg, rgba(7, 11, 18, 0.92), rgba(7, 11, 18, 0.68));
  border-bottom: 1px solid rgba(210, 178, 107, 0.28);
  backdrop-filter: blur(8px);
}

.brand {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--parchment);
  white-space: nowrap;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-nav a {
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: all 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--parchment);
  border-color: rgba(210, 178, 107, 0.5);
  background: rgba(22, 33, 47, 0.8);
}

.foundry-pill {
  margin-left: 0.4rem;
  border: 1px solid rgba(246, 212, 144, 0.7);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  color: var(--parchment);
  background: linear-gradient(130deg, rgba(138, 47, 47, 0.45), rgba(199, 164, 88, 0.24));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.foundry-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(199, 164, 88, 0.2);
}

.search-toggle {
  margin-left: 0.5rem;
  border: 1px solid rgba(210, 178, 107, 0.5);
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.78);
  color: var(--parchment);
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.search-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(199, 164, 88, 0.2);
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 82;
  background: rgba(0, 0, 0, 0.64);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  padding: 10vh 1rem 1rem;
}

.search-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.search-dialog {
  width: min(760px, 100%);
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(210, 178, 107, 0.52);
  background: linear-gradient(160deg, rgba(9, 13, 22, 0.98), rgba(19, 28, 41, 0.94));
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.46);
  padding: 1rem;
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.search-head h2 {
  font-size: 1.2rem;
}

.search-close {
  border: 1px solid rgba(210, 178, 107, 0.48);
  background: rgba(8, 12, 20, 0.72);
  color: var(--parchment);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.search-input {
  width: 100%;
  margin-top: 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(210, 178, 107, 0.42);
  background: rgba(6, 10, 17, 0.82);
  color: var(--text-main);
  padding: 0.7rem 0.85rem;
  font-family: "EB Garamond", serif;
  font-size: 1.1rem;
}

.search-input:focus-visible {
  outline: 2px solid rgba(246, 212, 144, 0.55);
  outline-offset: 2px;
}

.search-help {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.search-results {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.45rem;
  max-height: min(56vh, 440px);
  overflow: auto;
}

.search-result {
  display: grid;
  gap: 0.12rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(210, 178, 107, 0.34);
  background: linear-gradient(145deg, rgba(8, 12, 20, 0.88), rgba(16, 24, 35, 0.74));
}

.search-result:hover {
  border-color: rgba(246, 212, 144, 0.72);
}

.search-kind {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(210, 178, 107, 0.48);
  padding: 0.1rem 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.search-result small {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-empty {
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(210, 178, 107, 0.45);
  background: rgba(6, 11, 17, 0.88);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--parchment);
  transition: transform 220ms ease;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 45;
}

body.nav-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.hero {
  position: relative;
  min-height: 78vh;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-top: 0.25rem;
  border: 1px solid rgba(210, 178, 107, 0.34);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 13, 22, 0.2) 0%, rgba(8, 12, 20, 0.86) 100%),
    radial-gradient(circle at 68% 20%, rgba(199, 164, 88, 0.2), transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-align: center;
  padding: 2.2rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  color: var(--parchment);
  text-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}

.tagline {
  margin: 0.85rem auto 0;
  max-width: 580px;
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  color: var(--text-main);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn,
.sound-toggle,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.62rem 1.25rem;
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn-primary {
  background: linear-gradient(130deg, #7f2e2e 0%, #aa4036 45%, #c7a458 100%);
  border-color: rgba(246, 212, 144, 0.65);
  color: #fff7e7;
}

.btn-primary:hover,
.sound-toggle:hover,
.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(199, 164, 88, 0.24);
}

.btn-ghost,
.sound-toggle {
  background: rgba(8, 12, 20, 0.68);
  border-color: rgba(210, 178, 107, 0.42);
  color: var(--parchment);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.module-card {
  border: 1px solid rgba(210, 178, 107, 0.38);
  border-radius: 12px;
  padding: 1rem;
  background: linear-gradient(150deg, rgba(8, 11, 18, 0.72), rgba(20, 29, 42, 0.52));
  transition: transform 200ms ease, border-color 200ms ease;
}

.module-card-icon {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.45rem;
  opacity: 0.7;
}

.module-card h3 {
  font-size: 1.05rem;
  color: var(--parchment);
  margin-bottom: 0.3rem;
}

.module-card p {
  color: var(--text-muted);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(246, 212, 144, 0.7);
}

/* ── Feature highlight card (Home) ───────────────────────── */
.feature-card--highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  margin-bottom: 0.9rem;
  padding: 1.15rem 1.3rem;
  border-radius: 12px;
  border: 1px solid var(--gold);
  background:
    linear-gradient(135deg, rgba(138, 47, 47, 0.18), rgba(199, 164, 88, 0.10) 60%, rgba(8, 11, 18, 0.72));
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.feature-card--highlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(199, 164, 88, 0.18);
}

.feature-badge {
  position: absolute;
  top: -0.55rem;
  right: 1rem;
  background: linear-gradient(130deg, #7f2e2e 0%, #c7a458 100%);
  color: #fff7e7;
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.feature-card-body {
  flex: 1;
  min-width: 0;
}

.feature-card-body h3 {
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  color: var(--parchment);
  margin-bottom: 0.3rem;
}

.feature-card-body p {
  color: var(--text-muted);
  font-size: 1rem;
}

.feature-arrow {
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.5;
  transition: opacity 200ms ease, transform 200ms ease;
  flex-shrink: 0;
}

.feature-card--highlight:hover .feature-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.callout {
  text-align: center;
  padding: 2rem 1.4rem;
}

.callout p {
  max-width: 660px;
  margin: 0.35rem auto 1rem;
}

.page-intro {
  margin-top: 0.2rem;
  padding: 1.2rem 0.2rem;
}

.page-intro h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--parchment);
  margin-bottom: 0.45rem;
}

.map-page-main {
  width: min(98vw, 1680px);
}

.map-focus-section {
  margin-top: 0.55rem;
  padding: 0.8rem;
}

.map-shell {
  border-radius: 12px;
  border: 1px solid rgba(210, 178, 107, 0.28);
  padding: 0.85rem;
  background: rgba(10, 16, 26, 0.55);
}

.map-toolbar {
  margin-bottom: 0.8rem;
}

.map-toolbar-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.map-toolbar-main h1 {
  font-size: clamp(1.6rem, 2.7vw, 2.3rem);
  color: var(--parchment);
  margin-bottom: 0.32rem;
}

.map-toolbar-main p {
  color: var(--text-muted);
}

.map-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.map-zoom-btn {
  border: 1px solid rgba(210, 178, 107, 0.5);
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.82);
  color: var(--parchment);
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  min-width: 36px;
  height: 36px;
  padding: 0 0.55rem;
  cursor: pointer;
}

.map-zoom-btn:hover,
.map-zoom-btn:focus-visible {
  border-color: rgba(246, 212, 144, 0.78);
  outline: none;
}

.map-zoom-value {
  min-width: 54px;
  text-align: right;
  color: var(--gold-bright);
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
}

.map-toolbar h2 {
  margin-bottom: 0.3rem;
}

.map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1094 / 815;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(210, 178, 107, 0.35);
  background: rgba(0, 0, 0, 0.26);
  cursor: grab;
}

.map-container:focus-visible {
  outline: 2px solid rgba(246, 212, 144, 0.68);
  outline-offset: 2px;
}

.map-container.is-dragging {
  cursor: grabbing;
}

.map-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: top left;
  transition: transform 140ms ease;
}

.region-layer {
  position: absolute;
  inset: 0;
  transform-origin: top left;
  transition: transform 140ms ease, opacity 180ms ease;
}

.region-layer.is-zoomed {
  opacity: 0;
  pointer-events: none;
}

.region-layer.has-active .map-region:not(.is-active) {
  opacity: 0.1;
}

.map-region {
  position: absolute;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--region-color) 72%, #ffffff 28%);
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--region-color) 68%, #ffffff 32%), transparent 62%),
    color-mix(in srgb, var(--region-color) 38%, transparent);
  opacity: 0.24;
  cursor: pointer;
  transition: opacity 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.map-region:hover,
.map-region:focus-visible {
  opacity: 0.48;
  outline: none;
  box-shadow: 0 0 26px color-mix(in srgb, var(--region-color) 70%, #ffffff 30%);
  filter: saturate(1.1);
}

.map-region.is-active {
  opacity: 0.56;
  box-shadow: 0 0 30px color-mix(in srgb, var(--region-color) 75%, #ffffff 25%);
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  transform-origin: top left;
  transition: transform 140ms ease;
}

.map-container.is-dragging img,
.map-container.is-dragging .region-layer,
.map-container.is-dragging .hotspot-layer {
  transition: none;
}

.hotspot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(246, 212, 144, 0.95);
  background: rgba(138, 47, 47, 0.75);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(246, 212, 144, 0.5);
  animation: pulse 2s infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, background 140ms ease;
}

.hotspot.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hotspot:hover,
.hotspot:focus-visible {
  outline: none;
  background: rgba(198, 70, 50, 0.95);
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-flex;
}

.status-ativo {
  background: #33c17f;
}

.status-destruido {
  background: #8a2f2f;
}

.status-lendario {
  background: #c7a458;
}

.status-desconhecido {
  background: #7d8799;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.toolbar label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  border: 1px solid rgba(210, 178, 107, 0.3);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(9, 14, 23, 0.65);
}

.toolbar select {
  background: transparent;
  color: var(--text-main);
  border: 0;
  font-family: "EB Garamond", serif;
  font-size: 1rem;
}

.toolbar option {
  color: #111;
}

.card-grid {
  display: grid;
  gap: 0.9rem;
}

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

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

.info-card {
  border: 1px solid rgba(210, 178, 107, 0.34);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(170deg, rgba(8, 11, 18, 0.84), rgba(19, 28, 40, 0.62));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.card-cover {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 5%;
  width: 100%;
}

.card-body {
  padding: 0.85rem;
  display: grid;
  gap: 0.35rem;
}

.card-body h3 {
  font-size: 1.1rem;
  color: var(--parchment);
}

.card-meta {
  color: var(--gold-bright);
  font-size: 0.95rem;
}

.card-tag {
  display: inline-flex;
  margin-top: 0.2rem;
  width: fit-content;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(210, 178, 107, 0.4);
  color: var(--text-muted);
  font-size: 0.86rem;
}

.empty-state {
  color: var(--text-muted);
}

.hidden {
  display: none;
}

.guild-list {
  display: grid;
  gap: 0.8rem;
}

.guild-card {
  border: 1px solid rgba(210, 178, 107, 0.34);
  border-radius: 12px;
  padding: 1rem;
  background: linear-gradient(150deg, rgba(8, 11, 18, 0.88), rgba(20, 29, 42, 0.58));
}

.guild-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.guild-main {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.guild-main img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(210, 178, 107, 0.4);
  object-fit: cover;
}

.guild-main h3 {
  font-size: 1.1rem;
}

.guild-main p {
  color: var(--gold-bright);
}

.guild-toggle {
  border: 1px solid rgba(210, 178, 107, 0.44);
  background: rgba(9, 14, 22, 0.8);
  color: var(--parchment);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  font-family: "Cinzel", serif;
  cursor: pointer;
}

.guild-details {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(210, 178, 107, 0.34);
  display: grid;
  gap: 0.45rem;
}

.guild-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.member-link {
  border: 1px solid rgba(210, 178, 107, 0.42);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  color: var(--text-main);
  background: rgba(6, 10, 17, 0.7);
}

.timeline-container {
  display: grid;
  gap: 1.2rem;
}

.timeline-era {
  border: 1px solid rgba(210, 178, 107, 0.3);
  border-radius: 12px;
  padding: 0.9rem;
  background: linear-gradient(160deg, rgba(7, 11, 18, 0.78), rgba(16, 25, 36, 0.62));
}

.timeline-era h2 {
  margin-bottom: 0.7rem;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(210, 178, 107, 0.5);
  margin-left: 0.7rem;
}

.timeline-item {
  position: relative;
  margin-left: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px dashed rgba(210, 178, 107, 0.2);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(199, 164, 88, 0.18);
}

.timeline-item h3 {
  font-size: 1.05rem;
  color: var(--parchment);
}

.timeline-item .meta {
  color: var(--gold-bright);
  font-size: 0.92rem;
}

.recaps-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 1rem;
}

.recap-list {
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.recap-item {
  border: 1px solid rgba(210, 178, 107, 0.34);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  background: rgba(8, 12, 20, 0.72);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.recap-item h3 {
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.recap-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.recap-item.active {
  border-color: rgba(246, 212, 144, 0.72);
  background: linear-gradient(145deg, rgba(138, 47, 47, 0.36), rgba(199, 164, 88, 0.22));
}

.recap-content {
  border: 1px solid rgba(210, 178, 107, 0.34);
  border-radius: 10px;
  background: linear-gradient(170deg, rgba(8, 12, 20, 0.82), rgba(19, 28, 40, 0.62));
  padding: 1rem;
  min-height: 360px;
}

.recap-meta {
  color: var(--gold-bright);
  margin-bottom: 0.35rem;
  font-size: 0.96rem;
}

.recap-summary {
  margin-bottom: 0.9rem;
  color: var(--text-muted);
}

.recap-markdown {
  display: grid;
  gap: 0.55rem;
}

.recap-markdown h2,
.recap-markdown h3 {
  margin-top: 0.4rem;
}

.recap-markdown ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.recap-markdown blockquote {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid rgba(210, 178, 107, 0.5);
  background: rgba(8, 12, 20, 0.65);
  color: var(--parchment-soft);
}

.relevancia-alta {
  background: linear-gradient(95deg, rgba(138, 47, 47, 0.2), transparent);
  border-radius: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}

.chip {
  border-color: rgba(210, 178, 107, 0.42);
  background: rgba(8, 12, 20, 0.68);
  color: var(--text-muted);
}

.chip.active {
  color: var(--parchment);
  border-color: rgba(246, 212, 144, 0.72);
  background: linear-gradient(130deg, rgba(138, 47, 47, 0.55), rgba(199, 164, 88, 0.35));
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(210, 178, 107, 0.44);
  padding: 0.12rem 0.55rem;
  width: fit-content;
  font-size: 0.84rem;
  margin-top: 0.2rem;
}

.raridade-comum {
  color: #9bc9ff;
}

.raridade-raro {
  color: #7fdd9d;
}

.raridade-epico {
  color: #f6d490;
}

.raridade-lendario {
  color: #ff8f70;
}

.raridade-artefato-divino {
  color: #ffd4f0;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 70;
  background: rgba(0, 0, 0, 0.6);
}

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

.modal-panel {
  width: min(640px, 92vw);
  max-height: 84vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(210, 178, 107, 0.5);
  background: linear-gradient(155deg, rgba(7, 11, 18, 0.96), rgba(20, 30, 44, 0.88));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
  padding: 1rem;
  position: relative;
}

.modal-panel {
  scrollbar-width: none;   /* Firefox */
  -ms-overflow-style: none; /* Edge legado/IE */
}

modal-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none; /* Chrome, Edge, Safari */
}

.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: 1px solid rgba(210, 178, 107, 0.42);
  background: rgba(7, 11, 18, 0.92);
  color: var(--parchment);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
}

.modal-content {
  display: grid;
  gap: 0.6rem;
}

.modal-content img {
  border-radius: 10px;
  border: 1px solid rgba(210, 178, 107, 0.35);
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.modal-content h2 {
  margin-top: 0.15rem;
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem 0 1.4rem;
  border-top: 1px solid rgba(210, 178, 107, 0.2);
  width: min(var(--max-width), 92vw);
  margin: 0 auto 0.6rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 460ms ease, transform 460ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(246, 212, 144, 0.5);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(246, 212, 144, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(246, 212, 144, 0);
  }
}

@media (max-width: 1024px) {
  .module-grid,
  .npc-grid,
  .artifact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .recaps-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 1.05rem;
  }

  .site-header {
    gap: 0.6rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .foundry-pill {
    display: none;
  }

  .search-toggle {
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: linear-gradient(170deg, rgba(7, 11, 18, 0.98), rgba(17, 26, 38, 0.92));
    border-left: 1px solid rgba(210, 178, 107, 0.28);
    transform: translateX(104%);
    transition: transform 220ms ease;
    padding: 5.4rem 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    z-index: 50;
  }

  body.nav-open .site-nav {
    transform: translateX(0);
  }

  .site-nav a {
    padding: 0.75rem 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(210, 178, 107, 0.2);
  }

  .hero {
    min-height: 68vh;
  }

  .hero-content {
    padding: 1.4rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .sound-toggle {
    width: 100%;
  }

  .module-grid,
  .npc-grid,
  .artifact-grid,
  .legend-grid {
    grid-template-columns: 1fr;
  }

  .feature-card--highlight {
    flex-direction: column;
    text-align: center;
  }

  .feature-arrow {
    display: none;
  }

  .guild-head {
    flex-direction: column;
    align-items: stretch;
  }

  .guild-main {
    align-items: flex-start;
  }

  .search-dialog {
    padding: 0.9rem;
  }

  .map-zoom-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .map-focus-section {
    padding: 0.55rem;
  }
}
