:root {
  --gold: #f0d28f;
  --gold-strong: #f2c66d;
  --gold-soft: #fff0be;
  --blue: #73b8ff;
  --bg: #07111f;
  --bg-deep: #030812;
  --panel: rgba(13, 32, 58, 0.94);
  --panel-strong: rgba(9, 24, 46, 0.98);
  --panel-soft: rgba(23, 49, 86, 0.78);
  --line: rgba(240, 210, 143, 0.26);
  --line-blue: rgba(115, 184, 255, 0.24);
  --text: #edf4ff;
  --muted: #aebfd5;
  --green: #c4ef83;
  --red: #ff876f;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.44);
}

@media (max-width: 1020px) {
  .codex-hero,
  .codex-tactical,
  .boss-spell-effect-grid {
    grid-template-columns: 1fr;
  }

  .codex-portrait {
    min-height: 132px;
  }
}

@media (max-width: 680px) {
  .codex-hero {
    padding: 18px;
  }

  .seo-crosslinks-panel {
    padding: 18px;
  }

  .codex-resistances,
  .codex-drop-list,
  .boss-spell-effect-grid {
    grid-template-columns: 1fr;
  }

  .codex-heading h3 {
    font-size: 34px;
  }

  .boss-spells-heading {
    display: grid;
  }

  .boss-spell-tabs {
    padding-left: 0;
  }

  .boss-spell-titlebar,
  .boss-spell-effect-grid {
    grid-template-columns: 1fr;
  }

  .boss-tactical-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .boss-tactical-actions {
    justify-items: start;
  }

  .boss-tactical-mode {
    justify-content: flex-start;
  }

  .boss-tactical-board {
    min-height: 390px;
  }

  .boss-tactical-grid {
    transform: scale(0.72);
    transform-origin: top center;
  }

  .boss-tactical-monster {
    top: 101px;
    width: 68px;
    height: 68px;
    left: calc(50% - 34px);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 6%, rgba(240, 210, 143, 0.12), transparent 24%),
    radial-gradient(circle at 84% 24%, rgba(72, 153, 255, 0.14), transparent 28%),
    linear-gradient(rgba(5, 12, 24, 0.88), rgba(3, 8, 18, 0.96)),
    url("../textura.png");
  background-size: auto, auto, auto, 1024px 1024px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}

a {
  color: inherit;
}

button,
select,
input {
  font: inherit;
}

.dungeon-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}

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

.atlas-hero,
.dungeon-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.atlas-hero {
  background:
    linear-gradient(90deg, rgba(5, 13, 27, 0.92), rgba(7, 16, 31, 0.50) 42%, rgba(7, 16, 31, 0.08)),
    url("../assets/img/mazmorras/atlas-hero.png") center/cover;
}

.atlas-hero .hero-emblem {
  display: none;
}

.dungeon-hero {
  background:
    linear-gradient(90deg, rgba(5, 13, 27, 0.86), rgba(7, 16, 31, 0.62) 54%, rgba(7, 16, 31, 0.22)),
    var(--hero-image) center/cover;
}

.atlas-hero::before,
.dungeon-hero::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(240, 210, 143, 0.16);
  border-radius: 22px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-family: "Cinzel", serif;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  text-transform: uppercase;
  color: #fff4cd;
}

/* En páginas de detalle de mazmorra reducimos el font-size para que títulos
   largos no rompan la proporción del hero (ajusta a ~2 líneas máximo) */
.dungeon-page .hero-content h1 {
  font-size: clamp(22px, 3.2vw, 44px);
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 24px;
  color: #d8e3f2;
  font-size: 17px;
  line-height: 1.65;
}

.hero-emblem {
  position: absolute;
  right: clamp(28px, 8vw, 95px);
  top: 70px;
  width: 172px;
  height: 172px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 210, 143, 0.18);
  border-radius: 50%;
  color: var(--gold-strong);
  font-size: 76px;
  background: radial-gradient(circle, rgba(240, 210, 143, 0.2), rgba(10, 24, 45, 0.54) 54%, transparent 74%);
  filter: drop-shadow(0 0 32px rgba(240, 210, 143, 0.18));
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 900;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions-spaced {
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 12px;
  padding: 11px 15px;
  border: 1px solid rgba(240, 210, 143, 0.38);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 226, 150, 0.7);
}

.btn-gold {
  color: #181006;
  background: linear-gradient(180deg, #ffe08a, #c99134);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.btn-blue {
  color: var(--text);
  background: rgba(70, 137, 217, 0.18);
  border-color: rgba(115, 184, 255, 0.36);
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
}

.filter-search {
  grid-column: span 2;
}

.filter-panel span {
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-panel select {
  width: 100%;
  min-height: 47px;
  padding: 0 14px;
  color: #dcecff;
  border: 1px solid var(--line-blue);
  border-radius: 14px;
  background: rgba(13, 35, 64, 0.92);
  outline: none;
}

.filter-panel input {
  width: 100%;
  min-height: 47px;
  padding: 0 16px;
  color: #dcecff;
  border: 1px solid var(--line-blue);
  border-radius: 14px;
  background: rgba(13, 35, 64, 0.92);
  outline: none;
}

.filter-panel input::placeholder {
  color: rgba(220, 236, 255, 0.62);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 44px 0 18px;
}

.section-heading h2 {
  margin: 6px 0 0;
  font-family: "Cinzel", serif;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.section-heading p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  text-align: right;
}

.seo-crosslinks-panel{
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(13, 32, 58, 0.92), rgba(6, 16, 31, 0.96));
  box-shadow: var(--shadow);
}

.seo-crosslinks-heading{
  margin-top: 0;
}

.seo-crosslinks-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.seo-crosslink-card{
  display: block;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(240, 210, 143, 0.18);
  background: linear-gradient(180deg, rgba(23, 49, 86, 0.72), rgba(6, 16, 31, 0.95));
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.seo-crosslink-card:hover{
  transform: translateY(-2px);
  border-color: rgba(240, 210, 143, 0.38);
  box-shadow: 0 18px 34px rgba(0,0,0,0.32);
}

.seo-crosslink-card strong{
  display: block;
  margin-bottom: 8px;
  color: var(--gold-soft);
  font-family: "Cinzel", serif;
}

.seo-crosslink-card span{
  display: block;
  color: var(--muted);
  line-height: 1.6;
}

.monster-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  max-width: 560px;
  padding: 14px 16px;
  border: 1px solid rgba(115, 184, 255, 0.18);
  border-radius: 12px;
  background: rgba(4, 14, 28, 0.66);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.monster-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dcecff;
  font-size: 11px;
  font-weight: 800;
}

.monster-legend span:nth-child(1) i { color: #ff7770; }
.monster-legend span:nth-child(2) i { color: #ffd972; }
.monster-legend span:nth-child(3) i { color: #9eea83; }
.monster-legend span:nth-child(4) i { color: #d5a05b; }
.monster-legend span:nth-child(5) i { color: #7be4c0; }
.monster-legend span:nth-child(6) i { color: #ff765e; }
.monster-legend span:nth-child(7) i { color: #75cfff; }
.monster-legend span:nth-child(8) i { color: #e4e9f5; }

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  gap: 18px;
}

.mini-stack {
  display: grid;
  gap: 18px;
}

.feature-card,
.dungeon-card,
.route-card,
.future-panel,
.summary-card,
.room-card,
.monster-card,
.loot-card,
.achievement-card,
.strategy-panel,
.boss-panel {
  border: 1px solid var(--line-blue);
  background: linear-gradient(180deg, rgba(16, 43, 80, 0.96), rgba(8, 24, 46, 0.98));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.feature-card {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 22px;
  border-color: var(--line);
  border-radius: 20px;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(6, 13, 25, 0.12), rgba(6, 13, 25, 0.94)),
    var(--card-image) center/cover;
}

.feature-card.small {
  min-height: 146px;
}

.feature-card h3,
.dungeon-card h3,
.route-card h3,
.room-card h3,
.monster-card h3,
.loot-card h3,
.boss-panel h2,
.strategy-panel h3 {
  font-family: "Cinzel", serif;
  color: var(--gold-soft);
}

.feature-card h3 {
  margin: 12px 0 8px;
  font-size: 31px;
  text-transform: uppercase;
}

.feature-card.small h3 {
  font-size: 22px;
}

.feature-card p {
  margin: 0 0 14px;
  color: #dbe8f8;
  line-height: 1.5;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(115, 184, 255, 0.28);
  background: #0b203c;
  color: #cfe5ff;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.chip.complete,
.status-pill.complete {
  border-color: rgba(196, 239, 131, 0.44);
  color: #e2ffae;
  background: rgba(196, 239, 131, 0.1);
}

.chip.gold,
.status-pill.progress {
  border-color: rgba(240, 210, 143, 0.42);
  color: var(--gold-soft);
  background: rgba(240, 210, 143, 0.1);
}

.chip.danger {
  border-color: rgba(255, 135, 111, 0.42);
  color: #ffd1c9;
  background: rgba(255, 135, 111, 0.1);
}

.dungeon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dungeon-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dungeon-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 210, 143, 0.46);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.4), 0 0 28px rgba(240, 210, 143, 0.08);
}

.card-image {
  min-height: 142px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #08172d;
}

.card-image img {
  display: block;
  width: 100%;
  height: 142px;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.dungeon-card:hover .card-image img {
  transform: scale(1.045);
}

.dungeon-body {
  padding: 16px;
}

.dungeon-body h3 {
  margin: 0 0 9px;
  font-size: 21px;
  text-transform: uppercase;
}

.dungeon-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0;
  color: var(--muted);
  font-size: 13px;
}

.dungeon-meta b {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.card-link-btn {
  display: inline-block;
  margin-top: 14px;
}

.link-btn {
  white-space: nowrap;
  border: 1px solid rgba(240, 210, 143, 0.34);
  background: rgba(240, 210, 143, 0.13);
  color: var(--gold-soft);
  border-radius: 999px;
  padding: 8px 11px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.route-card {
  padding: 18px;
  border-radius: 18px;
}

.route-card h3 {
  margin: 12px 0 10px;
  font-size: 22px;
  text-transform: uppercase;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.steps span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.future-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  align-items: center;
  margin-top: 44px;
  padding: 22px;
  border-radius: 20px;
}

.future-panel h2 {
  margin: 8px 0 0;
  font-family: "Cinzel", serif;
  color: var(--gold-soft);
}

.future-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.future-grid span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: #dcecff;
  font-weight: 800;
}

.empty-state {
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(240, 210, 143, 0.08);
  color: var(--gold-soft);
  text-align: center;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.summary-card {
  min-height: 96px;
  padding: 14px;
  border-radius: 16px;
}

.summary-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.summary-card b {
  display: block;
  color: var(--gold-soft);
  font-size: 20px;
}

.dungeon-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.room-list {
  display: grid;
  gap: 14px;
}

.room-card {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 45, 82, 0.82), rgba(8, 24, 46, 0.96));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 210, 143, 0.4);
  box-shadow: 0 0 28px rgba(240, 210, 143, 0.08);
}

.room-shot {
  position: relative;
  overflow: hidden;
  min-height: 185px;
  border: 1px solid rgba(240, 210, 143, 0.2);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.room-shot img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 185px;
  object-fit: cover;
}

.room-shot button {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: white;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
}

.room-card h3 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.room-card p,
.strategy-panel p,
.boss-panel p,
.monster-card p,
.loot-card p,
.achievement-card p {
  color: var(--muted);
  line-height: 1.55;
}

.side-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 12px;
}

.side-block {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(6, 17, 32, 0.76);
}

.side-block h3 {
  margin: 0 0 12px;
  font-family: "Cinzel", serif;
  color: var(--gold-soft);
  text-transform: uppercase;
}

.mini-list {
  display: grid;
  gap: 9px;
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.mini-list b {
  color: var(--text);
  text-align: right;
}

.side-stats {
  display: grid;
  gap: 10px;
}

.side-stats .summary-card {
  min-height: auto;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.side-stats .summary-card span {
  font-size: 12px;
}

.side-stats .summary-card b {
  font-size: 16px;
  line-height: 1.25;
}

.monster-grid,
.loot-grid,
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Fila jefe + botín: card del jefe a la izquierda, loot a la derecha */
.boss-loot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 16px;
  align-items: start;
}

.boss-loot-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.boss-loot-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  padding-bottom: 10px;
  padding-top: 14px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.boss-loot-title i {
  margin-right: 6px;
  opacity: 0.8;
}

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

/* Modo 2 monstruos: los 2 últimos quedan a la izquierda, 3 loot a la derecha */
.boss-loot-row[data-two-monsters] {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}
.boss-loot-row[data-two-monsters] [data-boss-monster] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.boss-loot-row[data-two-monsters] .loot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.monster-card,
.loot-card,
.achievement-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 17px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

/* Loot card: layout horizontal — icono izquierda, datos derecha */
.loot-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 10px;
  row-gap: 3px;
  padding: 12px;
  align-items: start;
  border-radius: 14px;
}

.loot-card .loot-image {
  grid-column: 1;
  grid-row: 1 / 5;
  width: 48px;
  height: 48px;
  margin: 0;
  align-self: center;
}

.loot-card h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
}

.loot-card > p {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 12px;
}

.loot-card .drop-list {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
}

.loot-card .link-btn {
  grid-column: 2;
  grid-row: 4;
  justify-self: start;
  margin: 4px 0 0;
  padding: 4px 12px;
  font-size: 12px;
}

.monster-tactical-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-color: rgba(115, 184, 255, 0.32);
  background:
    radial-gradient(circle at 50% 18%, rgba(115, 184, 255, 0.18), transparent 34%),
    radial-gradient(circle at 18% 2%, rgba(240, 210, 143, 0.08), transparent 20%),
    radial-gradient(circle at 50% 12%, rgba(115, 184, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(8, 28, 52, 0.98), rgba(5, 16, 31, 0.98));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  isolation: isolate;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.monster-tactical-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.34;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
    linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  background-size: 42px 42px, auto;
  pointer-events: none;
}

.monster-tactical-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 210, 143, 0.58);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.44), 0 0 32px rgba(115, 184, 255, 0.14);
}

.monster-tactical-card:nth-child(3) {
  border-color: rgba(240, 210, 143, 0.42);
  background:
    radial-gradient(circle at 50% 12%, rgba(240, 210, 143, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(40, 31, 12, 0.86), rgba(8, 16, 29, 0.98));
}

.monster-tactical-card:nth-child(4) {
  border-color: rgba(160, 110, 255, 0.42);
  background:
    radial-gradient(circle at 50% 12%, rgba(160, 110, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(27, 18, 58, 0.86), rgba(8, 16, 29, 0.98));
}

.monster-level-pill {
  position: absolute;
  top: 11px;
  right: 12px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(240, 210, 143, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--gold-soft);
  font-size: 10px;
  font-weight: 900;
}

.monster-portrait {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 30px 18px 12px;
}

.monster-portrait img {
  position: relative;
  z-index: 2;
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 8px rgba(177, 223, 255, 0.35))
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.48));
  transition: transform 0.22s ease, filter 0.22s ease;
}

.monster-tactical-card:hover .monster-portrait img {
  transform: scale(1.04);
  filter:
    drop-shadow(0 0 11px rgba(240, 210, 143, 0.3))
    drop-shadow(0 16px 20px rgba(0, 0, 0, 0.5));
}

.boss-feature-card {
  border-color: rgba(240, 210, 143, 0.44);
  background:
    radial-gradient(circle at 50% 8%, rgba(240, 210, 143, 0.16), transparent 30%),
    radial-gradient(circle at 16% 22%, rgba(115, 184, 255, 0.16), transparent 28%),
    radial-gradient(circle at 84% 20%, rgba(255, 118, 94, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(8, 29, 54, 0.98), rgba(4, 13, 27, 0.98));
}

.boss-feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background:
    linear-gradient(90deg, rgba(240, 210, 143, 0.14), transparent 24%, transparent 76%, rgba(115, 184, 255, 0.12)),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.07), transparent 24%);
  pointer-events: none;
}

.boss-feature-top {
  display: grid;
  grid-template-columns: minmax(520px, 1.3fr) minmax(220px, 260px) minmax(260px, 0.9fr);
  gap: 22px;
  align-items: center;
  min-height: 258px;
  padding: 26px 32px 20px;
}

.boss-feature-info,
.boss-feature-stats {
  min-width: 0;
}

.boss-feature-card .boss-feature-info h3 {
  max-width: none;
  margin: 4px 0 14px;
  color: #fff7d0;
  font-family: "Cinzel", serif;
  font-size: clamp(34px, 4.25vw, 56px);
  line-height: 0.86;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(240, 210, 143, 0.22);
}

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

.boss-threat-list span {
  padding: 7px 10px;
  border: 1px solid rgba(240, 210, 143, 0.2);
  border-radius: 999px;
  background: rgba(240, 210, 143, 0.08);
  color: #f4d789;
  font-size: 12px;
  font-weight: 950;
}

.boss-feature-portrait {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
}

.boss-feature-portrait .monster-halo {
  width: 238px;
  height: 238px;
  background: radial-gradient(circle, rgba(115, 184, 255, 0.28), rgba(115, 184, 255, 0.08) 48%, transparent 72%);
}

.boss-feature-portrait .monster-rune {
  width: 200px;
  height: 200px;
  border-color: rgba(240, 210, 143, 0.28);
}

.boss-feature-portrait img {
  position: relative;
  z-index: 2;
  width: min(230px, 100%);
  height: 230px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 16px rgba(240, 210, 143, 0.22))
    drop-shadow(0 22px 24px rgba(0, 0, 0, 0.58));
}

.boss-feature-stats {
  justify-self: stretch;
  padding: 16px;
  border: 1px solid rgba(115, 184, 255, 0.18);
  border-radius: 14px;
  background: rgba(3, 12, 25, 0.54);
}

.boss-feature-stats h4 {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-family: "Cinzel", serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.boss-feature-stats .monster-stat-row {
  grid-template-columns: 1fr;
  gap: 10px;
}

.boss-feature-stats .monster-stat-row span {
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 13px;
}

.boss-feature-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 14px;
  padding: 0 12px 2px;
}

.boss-feature-card .monster-resistances span {
  min-height: 50px;
}

.boss-feature-card .drop-list {
  margin-bottom: 0;
}

.boss-loot-row[data-two-monsters] .boss-feature-card {
  min-height: 100%;
}

.boss-loot-row[data-two-monsters] .boss-feature-top,
.boss-loot-row[data-two-monsters] .boss-feature-bottom {
  grid-template-columns: 1fr;
}

.boss-loot-row[data-two-monsters] .boss-feature-top {
  gap: 16px;
  min-height: 0;
  padding: 24px 24px 18px;
  text-align: center;
}

.boss-loot-row[data-two-monsters] .boss-feature-info {
  order: 1;
}

.boss-loot-row[data-two-monsters] .boss-feature-portrait {
  order: 2;
}

.boss-loot-row[data-two-monsters] .boss-feature-stats {
  order: 3;
}

.boss-loot-row[data-two-monsters] .boss-feature-card .boss-feature-info h3 {
  max-width: none;
  font-size: clamp(34px, 3.5vw, 52px);
  line-height: 0.94;
}

.monster-halo,
.monster-rune {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.monster-halo {
  width: 108px;
  height: 108px;
  z-index: 0;
  background: radial-gradient(circle, rgba(115, 184, 255, 0.22), rgba(115, 184, 255, 0.08) 44%, transparent 68%);
  filter: blur(1px);
}

.monster-rune {
  width: 86px;
  height: 86px;
  z-index: 1;
  border: 1px solid rgba(240, 210, 143, 0.18);
  box-shadow: inset 0 0 18px rgba(115, 184, 255, 0.12), 0 0 20px rgba(115, 184, 255, 0.08);
}

.monster-rune::before,
.monster-rune::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(115, 184, 255, 0.12);
  transform: rotate(45deg);
}

.monster-rune::after {
  inset: 20px;
  border-color: rgba(240, 210, 143, 0.1);
  transform: rotate(0deg);
}

.monster-nameplate {
  margin: 0;
  padding: 15px 13px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(3, 12, 25, 0.55);
  text-align: center;
}

.monster-nameplate h3 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.tactical-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(240, 210, 143, 0.22);
  border-radius: 999px;
  background: rgba(240, 210, 143, 0.08);
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 900;
}

.monster-stat-row {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.8fr;
  gap: 8px;
}

.monster-stat-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  line-height: 1.15;
}

.monster-stat-row i {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #ff7770;
  background: rgba(255, 119, 112, 0.11);
}

.monster-stat-row span:nth-child(2) i {
  color: #ffd972;
  background: rgba(255, 217, 114, 0.1);
}

.monster-stat-row span:nth-child(3) i {
  color: #9eea83;
  background: rgba(158, 234, 131, 0.1);
}

.monster-stat-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  margin-left: -3px;
  white-space: nowrap;
}

.monster-card-block {
  padding: 13px;
}

.monster-card-block h4 {
  margin: 0 0 10px;
  color: var(--gold-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.monster-resistances {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.monster-resistances span {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 56px;
  padding: 7px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
}

.monster-resistances i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.res-tierra i { color: #d5a05b; }
.res-aire i { color: #7be4c0; }
.res-fuego i { color: #ff765e; }
.res-agua i { color: #75cfff; }
.res-neutral i { color: #e4e9f5; }

.monster-resistances .is-strong b {
  color: #c9f5a0;
}

.monster-resistances .is-weak b {
  color: #ff9a78;
}

.monster-drop-block {
  padding-top: 4px;
}

.monster-full-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  margin: auto 12px 13px;
  padding: 9px 11px;
  border: 1px solid rgba(240, 210, 143, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(39, 76, 124, 0.9), rgba(10, 31, 61, 0.96));
  color: var(--gold-soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.monster-full-btn i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 210, 143, 0.2);
  border-radius: 50%;
}

.monster-tactical-card:hover .monster-full-btn {
  border-color: rgba(240, 210, 143, 0.48);
  background: linear-gradient(180deg, rgba(58, 108, 169, 0.98), rgba(13, 42, 82, 0.98));
  box-shadow: 0 0 20px rgba(115, 184, 255, 0.14);
}

.monster-card:hover,
.loot-card:hover,
.achievement-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 210, 143, 0.36);
}

.monster-image,
.loot-image,
.achievement-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid rgba(240, 210, 143, 0.2);
  border-radius: 15px;
  background: radial-gradient(circle, rgba(240, 210, 143, 0.18), rgba(255, 255, 255, 0.04));
}

.monster-image img,
.loot-image img {
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
}

.achievement-icon {
  color: #1a2a11;
  font-size: 24px;
  border-radius: 8px;
  border-color: rgba(34, 73, 22, 0.65);
  background: #7fbf27;
}

.achievement-icon img {
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
}

.achievement-points {
  display: inline-flex;
  align-self: flex-start;
  margin: 2px 0 8px;
  padding: 4px 9px;
  border: 1px solid rgba(240, 210, 143, 0.3);
  border-radius: 999px;
  background: rgba(240, 210, 143, 0.12);
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}

.monster-card h3,
.loot-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.monster-card p,
.loot-card p,
.achievement-card p {
  margin: 0 0 10px;
  font-size: 13px;
}

.characteristics-box {
  overflow: hidden;
  margin: 10px 0 12px;
  border: 1px solid rgba(115, 184, 255, 0.18);
  border-radius: 12px;
  background: rgba(4, 14, 28, 0.48);
}

.characteristics-box h4 {
  margin: 0;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(115, 184, 255, 0.16);
  color: var(--gold-soft);
  font-family: "Cinzel", serif;
  font-size: 14px;
  text-transform: uppercase;
}

.characteristics-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
}

.characteristics-grid > div {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
}

.characteristics-grid > div + div {
  border-left: 1px solid rgba(115, 184, 255, 0.14);
}

.characteristics-grid span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.characteristics-grid b {
  color: var(--gold-soft);
}

.characteristics-grid i {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #bfe0ff;
  font-size: 10px;
}

.drop-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.drop-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(240, 210, 143, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.035));
  color: #dcecff;
  font-size: 12px;
  font-weight: 800;
}

.drop-pill img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.drop-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-pill b {
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 950;
}

.monster-link-btn {
  align-self: flex-start;
  margin-top: auto;
  cursor: pointer;
}

.strategy-panel,
.boss-panel {
  padding: 20px;
  border-radius: 20px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.strategy-tip {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.strategy-tip strong {
  color: var(--gold-soft);
}

.strategy-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(240, 210, 143, 0.12);
  color: var(--gold-soft);
  font-weight: 900;
}

.boss-panel {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 18px;
  border-color: rgba(255, 135, 111, 0.28);
}

.boss-panel h2 {
  margin: 0 0 10px;
  text-transform: uppercase;
}

.boss-notes {
  display: grid;
  gap: 10px;
}

.boss-notes div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(1, 5, 12, 0.82);
}

.lightbox.is-open {
  display: grid;
}

.lightbox-content {
  width: min(980px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.lightbox.is-open .lightbox-content {
  animation: codex-pop 0.22s ease both;
}

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

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-header b {
  color: var(--gold-soft);
}

.lightbox-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-blue);
  border-radius: 10px;
  background: rgba(115, 184, 255, 0.1);
  color: var(--text);
  cursor: pointer;
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #020712;
}

.monster-modal-content {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.loot-modal-content {
  position: relative;
  width: min(500px, 100%);
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(240, 210, 143, 0.12), transparent 28%),
    radial-gradient(circle at 74% 18%, rgba(115, 184, 255, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(8, 26, 50, 0.98), rgba(3, 10, 23, 0.98));
}

.monster-modal-content::before,
.loot-modal-content::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px),
    linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  background-size: 46px 46px, auto;
  pointer-events: none;
}

.monster-modal-content .lightbox-header,
.loot-modal-content .lightbox-header {
  position: relative;
  z-index: 2;
  background: rgba(2, 8, 18, 0.38);
}

.monster-modal-body,
.loot-modal-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.monster-modal-body {
  overflow: auto;
}

.loot-modal-body {
  grid-template-columns: 130px 1fr;
  align-items: start;
  gap: 14px;
  padding: 16px;
}

.loot-modal-body .mini-list div {
  justify-content: flex-start;
  gap: 6px;
}

.loot-modal-body .mini-list b {
  text-align: left;
}

.monster-modal-portrait,
.loot-modal-portrait {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(240, 210, 143, 0.22);
  border-radius: 18px;
  background: radial-gradient(circle, rgba(240, 210, 143, 0.16), rgba(255, 255, 255, 0.04));
}

.loot-modal-portrait {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(240, 210, 143, 0.2), rgba(240, 210, 143, 0.05) 55%, transparent 75%);
  border: 1px solid rgba(240, 210, 143, 0.28);
}

.monster-modal-portrait img,
.loot-modal-portrait img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent;
}

.loot-modal-portrait img {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 10px rgba(240, 210, 143, 0.35));
}

.monster-modal-body h3,
.loot-modal-body h3 {
  margin: 8px 0 12px;
  font-family: "Cinzel", serif;
  color: var(--gold-soft);
  font-size: 28px;
}

.loot-modal-body h3 {
  font-size: 20px;
  margin: 4px 0 10px;
}

.monster-modal-body h4,
.loot-modal-body h4 {
  margin: 18px 0 10px;
  color: var(--gold-soft);
}

.codex-hero {
  position: relative;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  min-height: 218px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid rgba(240, 210, 143, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 50%, rgba(115, 184, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(7, 24, 47, 0.92), rgba(4, 12, 27, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.22);
}

.codex-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 210, 143, 0.12), transparent 68%);
  pointer-events: none;
}

.codex-portrait {
  position: relative;
  min-height: 194px;
  display: grid;
  place-items: center;
}

.codex-portrait img {
  position: relative;
  z-index: 3;
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: none;
}

.codex-hero.is-boss-monster .codex-portrait img {
  mix-blend-mode: screen;
  filter: contrast(1.18) saturate(1.18) brightness(0.96);
}

.codex-aura,
.codex-rune {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.codex-aura {
  width: 220px;
  height: 220px;
  z-index: 1;
  background: radial-gradient(circle, rgba(115, 184, 255, 0.26), rgba(115, 184, 255, 0.08) 48%, transparent 72%);
  filter: blur(1px);
}

.codex-rune {
  width: 184px;
  height: 184px;
  z-index: 2;
  border: 1px solid rgba(240, 210, 143, 0.22);
  box-shadow: inset 0 0 24px rgba(115, 184, 255, 0.13), 0 0 26px rgba(115, 184, 255, 0.12);
}

.codex-rune::before,
.codex-rune::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(115, 184, 255, 0.14);
  transform: rotate(45deg);
}

.codex-rune::after {
  inset: 28px;
  border-color: rgba(240, 210, 143, 0.12);
  transform: rotate(0deg);
}

.codex-heading h3 {
  margin: 8px 0 14px;
  font-family: "Cinzel", serif;
  color: var(--gold-soft);
  font-size: clamp(32px, 5vw, 50px);
  letter-spacing: 0.035em;
  line-height: 0.95;
  text-transform: uppercase;
}

.codex-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.codex-badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(115, 184, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #dcecff;
  font-size: 12px;
  font-weight: 900;
}

.codex-badges i {
  color: var(--gold-soft);
}

.codex-tactical {
  display: grid;
  grid-template-columns: 0.74fr 1.26fr;
  gap: 14px;
}

.codex-panel {
  padding: 16px;
  border: 1px solid rgba(115, 184, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(11, 31, 57, 0.82), rgba(5, 16, 31, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 32px rgba(0, 0, 0, 0.18);
}

.codex-panel h4 {
  margin: 0 0 13px;
  color: var(--gold-soft);
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.codex-core-stats {
  display: grid;
  gap: 10px;
}

.codex-core-stats span {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.codex-core-stats i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 119, 112, 0.12);
  color: #ff7770;
}

.codex-core-stats span:nth-child(2) i {
  background: rgba(255, 217, 114, 0.12);
  color: #ffd972;
}

.codex-core-stats span:nth-child(3) i {
  background: rgba(158, 234, 131, 0.12);
  color: #9eea83;
}

.codex-core-stats b {
  color: var(--text);
  font-size: 15px;
}

.codex-core-stats small {
  color: var(--muted);
  font-weight: 900;
}

.codex-resistances {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.codex-resistances span {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-height: 86px;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.codex-resistances .res-tierra {
  border-color: rgba(213, 160, 91, 0.34);
  background: linear-gradient(180deg, rgba(213, 160, 91, 0.18), rgba(213, 160, 91, 0.055));
}

.codex-resistances .res-aire {
  border-color: rgba(123, 228, 192, 0.34);
  background: linear-gradient(180deg, rgba(123, 228, 192, 0.18), rgba(123, 228, 192, 0.055));
}

.codex-resistances .res-fuego {
  border-color: rgba(255, 118, 94, 0.34);
  background: linear-gradient(180deg, rgba(255, 118, 94, 0.18), rgba(255, 118, 94, 0.055));
}

.codex-resistances .res-agua {
  border-color: rgba(117, 207, 255, 0.34);
  background: linear-gradient(180deg, rgba(117, 207, 255, 0.18), rgba(117, 207, 255, 0.055));
}

.codex-resistances .res-neutral {
  border-color: rgba(228, 233, 245, 0.28);
  background: linear-gradient(180deg, rgba(228, 233, 245, 0.14), rgba(228, 233, 245, 0.045));
}

.codex-resistances span:hover,
.codex-drop-list .drop-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 210, 143, 0.34);
  box-shadow: 0 0 20px rgba(115, 184, 255, 0.1);
}

.codex-resistances i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.065);
}

.codex-resistances .res-tierra i,
.codex-resistances .res-tierra b {
  color: #d5a05b;
}

.codex-resistances .res-aire i,
.codex-resistances .res-aire b {
  color: #7be4c0;
}

.codex-resistances .res-fuego i,
.codex-resistances .res-fuego b {
  color: #ff765e;
}

.codex-resistances .res-agua i,
.codex-resistances .res-agua b {
  color: #75cfff;
}

.codex-resistances .res-neutral i,
.codex-resistances .res-neutral b {
  color: #e4e9f5;
}

.codex-resistances b {
  font-size: 11px;
}

.codex-resistances strong {
  color: #c9f5a0;
  font-size: 12px;
}

.codex-resistances .is-weak strong {
  color: #ff9a78;
}

.codex-loot-actions {
  display: grid;
  gap: 14px;
}

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

.codex-drop-list .drop-pill {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.boss-spells-section {
  margin: 22px 0 34px;
  padding: 22px;
  border: 1px solid rgba(240, 210, 143, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(240, 210, 143, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(11, 31, 57, 0.94), rgba(4, 14, 29, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.boss-spells-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 14px;
}

.boss-spells-heading::before {
  content: "\f6d9";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(240, 210, 143, 0.38);
  transform: rotate(45deg);
  color: var(--gold-soft);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  background: rgba(240, 210, 143, 0.08);
}

.boss-spells-heading::before {
  line-height: 1;
}

.boss-spells-heading h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.boss-spell-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 14px 56px;
}

.boss-spell-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 11px;
  border: 1px solid rgba(115, 184, 255, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.boss-spell-tabs button.is-active,
.boss-spell-tabs button:hover {
  border-color: rgba(240, 210, 143, 0.42);
  background: rgba(240, 210, 143, 0.12);
  color: var(--gold-soft);
}

.boss-spell-icon,
.boss-spell-fallback-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(240, 210, 143, 0.24);
  border-radius: 6px;
  background: radial-gradient(circle, rgba(240, 210, 143, 0.18), rgba(115, 184, 255, 0.08));
  flex: 0 0 auto;
}

.boss-spell-icon img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  background: transparent;
}

.boss-spell-fallback-icon {
  color: var(--gold-soft);
}

.boss-spell-display {
  display: none;
  border: 1px solid rgba(115, 184, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(3, 12, 27, 0.72);
  overflow: hidden;
}

.boss-spell-display.is-active {
  display: block;
}

.boss-spell-stage {
  min-height: 220px;
  padding: 20px;
}

.boss-spell-titlebar {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.boss-spell-titlebar .boss-spell-icon,
.boss-spell-titlebar .boss-spell-fallback-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.boss-spell-titlebar .boss-spell-icon img {
  width: 52px;
  height: 52px;
}

.boss-spell-titlebar h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
}

.boss-spell-stats,
.boss-spell-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.boss-spell-stats span,
.boss-spell-flags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: #e8f2ff;
  font-size: 12px;
  font-weight: 850;
}

.boss-spell-stats i {
  color: var(--gold-soft);
}

.boss-spell-level-pane {
  display: none;
}

.boss-spell-level-pane.is-active {
  display: grid;
  gap: 14px;
}

.boss-spell-effect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.boss-spell-effects {
  min-height: 70px;
}

.boss-spell-effects b {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-soft);
  font-size: 13px;
}

.boss-spell-effects ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 11px 14px 11px 28px;
  border-top: 1px solid rgba(240, 210, 143, 0.18);
  background: rgba(2, 8, 18, 0.55);
  color: #e8f2ff;
  font-size: 13px;
  line-height: 1.42;
}

.boss-tactical-view {
  margin-top: 16px;
  border: 1px solid rgba(115, 184, 255, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 38%, rgba(115, 184, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(3, 12, 27, 0.88), rgba(2, 8, 18, 0.92));
  overflow: hidden;
}

.boss-tactical-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(240, 210, 143, 0.16);
}

.boss-tactical-toolbar h3 {
  margin: 0 0 3px;
  color: var(--gold-soft);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.boss-tactical-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.boss-tactical-toolbar small {
  display: inline-block;
  margin-top: 5px;
  color: rgba(237, 244, 255, 0.72);
  font-size: 12px;
  font-weight: 750;
}

.boss-tactical-actions {
  display: grid;
  justify-items: end;
  gap: 9px;
}

.boss-tactical-mode {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.boss-tactical-mode button[hidden] {
  display: none;
}

.boss-tactical-direction {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(115, 184, 255, 0.18);
  border-radius: 10px;
  background: rgba(2, 8, 18, 0.34);
}

.boss-tactical-direction[hidden] {
  display: none;
}

.boss-tactical-direction span {
  color: rgba(237, 244, 255, 0.74);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.boss-tactical-direction div {
  display: grid;
  grid-template-columns: repeat(4, 30px);
  gap: 5px;
}

.boss-tactical-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(240, 210, 143, 0.32);
  border-radius: 8px;
  background: rgba(240, 210, 143, 0.1);
  color: var(--gold-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.boss-tactical-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 210, 143, 0.52);
  background: rgba(240, 210, 143, 0.16);
}

.boss-tactical-direction button {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-color: rgba(115, 184, 255, 0.22);
  background: rgba(115, 184, 255, 0.08);
  color: #dcecff;
}

.boss-tactical-direction button.is-active {
  border-color: rgba(240, 210, 143, 0.72);
  background: linear-gradient(180deg, rgba(240, 210, 143, 0.28), rgba(183, 128, 43, 0.2));
  color: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 184, 0.16), 0 0 14px rgba(240, 210, 143, 0.12);
}

.boss-tactical-mode button.is-active {
  border-color: rgba(115, 184, 255, 0.54);
  background: rgba(115, 184, 255, 0.16);
  color: #edf7ff;
  box-shadow: inset 0 0 0 1px rgba(176, 220, 255, 0.12);
}

.boss-tactical-mode [data-tactical-toggle-player].is-active {
  border-color: rgba(240, 210, 143, 0.42);
  background: rgba(240, 210, 143, 0.12);
  color: var(--gold-soft);
}

.boss-tactical-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.boss-tactical-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dcecff;
  font-size: 12px;
  font-weight: 850;
}

.boss-tactical-legend i {
  width: 18px;
  height: 12px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.boss-tactical-legend .is-range {
  background: rgba(115, 184, 255, 0.56);
}

.boss-tactical-legend .is-area {
  background: rgba(92, 172, 149, 0.88);
}

.boss-tactical-legend .is-player {
  background: rgba(112, 203, 255, 0.9);
}

.boss-tactical-legend .is-danger {
  background: rgba(255, 112, 96, 0.9);
}

.boss-tactical-board {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 43%, rgba(240, 210, 143, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(9, 24, 46, 0.54), rgba(1, 5, 12, 0.34));
}

.boss-tactical-grid {
  position: absolute;
  inset: 16px 0 0;
}

.tactical-cell {
  position: absolute;
  width: 54px;
  height: 28px;
  padding: 0;
  appearance: none;
  cursor: pointer;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: rgba(154, 144, 94, 0.72);
  border: 1px solid rgba(2, 8, 18, 0.26);
  transition: background 0.16s ease, filter 0.16s ease, transform 0.16s ease;
}

.tactical-cell:hover {
  transform: translateY(-2px);
  filter: brightness(1.12);
}

.tactical-cell:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}

.tactical-cell.is-range {
  background: rgba(85, 150, 176, 0.82);
  filter: drop-shadow(0 0 6px rgba(115, 184, 255, 0.24));
}

.tactical-cell.is-area,
.tactical-cell.is-caster-area {
  background: rgba(92, 172, 149, 0.88);
  filter: drop-shadow(0 0 8px rgba(92, 172, 149, 0.28));
}

.tactical-cell.is-caster {
  background: rgba(115, 184, 255, 0.52);
}

.tactical-cell.is-target-cell {
  background: rgba(226, 188, 89, 0.94);
  filter: drop-shadow(0 0 9px rgba(240, 210, 143, 0.34));
}

.tactical-cell.is-player-cell {
  box-shadow: inset 0 0 0 2px rgba(220, 244, 255, 0.65);
}

.tactical-cell.is-player-danger {
  box-shadow: inset 0 0 0 2px rgba(255, 230, 210, 0.86), 0 0 18px rgba(255, 112, 96, 0.42);
}

.boss-tactical-view.has-final-room .boss-tactical-toolbar h3::after {
  content: "Sala final";
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(240, 210, 143, 0.28);
  border-radius: 999px;
  background: rgba(240, 210, 143, 0.08);
  color: var(--gold-soft);
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.boss-tactical-board.has-final-room {
  min-height: 820px;
  background:
    radial-gradient(circle at 50% 38%, rgba(240, 210, 143, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(3, 8, 14, 0.96), rgba(0, 3, 8, 0.98));
}

.boss-tactical-grid.is-final-room-map {
  --tactical-map-center: 8%;
  --tactical-zoom: 1.12;
  inset: 20px 0 0;
  transform: scale(var(--tactical-zoom));
  transform-origin: 8% 32px;
  transition: transform 0.12s ease;
}

.boss-tactical-grid.is-final-room-map .tactical-cell {
  width: 64px;
  height: 32px;
  border-color: rgba(13, 18, 16, 0.42);
  background: rgba(151, 143, 94, 0.84);
}

.boss-tactical-grid.is-final-room-map .tactical-cell:hover {
  transform: none;
  filter: brightness(1.04);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-cell-shade-a {
  background: rgba(160, 153, 104, 0.94);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-cell-shade-b {
  background: rgba(120, 114, 76, 0.96);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-start-enemy {
  background: rgba(60, 152, 42, 0.94);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-start-enemy.is-cell-shade-b {
  background: rgba(42, 122, 32, 0.96);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-start-player {
  background: rgba(204, 42, 50, 0.94);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-start-player.is-cell-shade-b {
  background: rgba(158, 28, 36, 0.96);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.has-room-prop {
  cursor: default;
  box-shadow: inset 0 0 0 1px rgba(12, 16, 14, 0.28);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.has-room-prop:hover {
  filter: none;
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-range {
  background: rgba(88, 156, 184, 0.86);
  filter: drop-shadow(0 0 6px rgba(115, 184, 255, 0.24));
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-range.is-cell-shade-b {
  background: rgba(64, 124, 150, 0.9);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-area,
.boss-tactical-grid.is-final-room-map .tactical-cell.is-caster-area {
  background: rgba(96, 179, 156, 0.9);
  filter: drop-shadow(0 0 8px rgba(92, 172, 149, 0.28));
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-area.is-cell-shade-b,
.boss-tactical-grid.is-final-room-map .tactical-cell.is-caster-area.is-cell-shade-b {
  background: rgba(68, 145, 125, 0.94);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-caster {
  background: rgba(115, 184, 255, 0.52);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-caster.is-cell-shade-b {
  background: rgba(93, 164, 232, 0.56);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-target-cell {
  background: rgba(226, 188, 89, 0.94);
  filter: drop-shadow(0 0 9px rgba(240, 210, 143, 0.34));
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-player-cell {
  box-shadow: inset 0 0 0 2px rgba(220, 244, 255, 0.65);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-player-danger {
  box-shadow: inset 0 0 0 2px rgba(255, 230, 210, 0.86), 0 0 18px rgba(255, 112, 96, 0.42);
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-room-blocked,
.boss-tactical-grid.is-final-room-map .tactical-cell.is-room-hole {
  cursor: default;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.9);
  filter: none;
}

.boss-tactical-grid.is-final-room-map .tactical-cell.is-room-blocked:hover,
.boss-tactical-grid.is-final-room-map .tactical-cell.is-room-hole:hover,
.boss-tactical-grid.is-final-room-map .tactical-cell.has-room-prop:hover {
  transform: none;
  filter: none;
}

.tactical-obstacle {
  position: absolute;
  z-index: 7;
  width: 64px;
  height: 48px;
  pointer-events: none;
  overflow: visible;
  filter: drop-shadow(0 8px 5px rgba(0, 0, 0, 0.28));
}

.tactical-obstacle polygon,
.tactical-obstacle polyline {
  vector-effect: non-scaling-stroke;
}

.tactical-obstacle-top {
  fill: rgba(102, 98, 71, 0.94);
  stroke: rgba(235, 225, 170, 0.42);
  stroke-width: 1;
}

.tactical-obstacle-left {
  fill: rgba(74, 71, 53, 0.96);
  stroke: rgba(235, 225, 170, 0.24);
  stroke-width: 1;
}

.tactical-obstacle-right {
  fill: rgba(53, 52, 40, 0.97);
  stroke: rgba(235, 225, 170, 0.2);
  stroke-width: 1;
}

.tactical-obstacle-edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1;
}

.boss-tactical-legend .is-start-enemy {
  background: rgba(55, 145, 38, 0.92);
}

.boss-tactical-legend .is-start-player {
  background: rgba(188, 33, 42, 0.9);
}

.boss-tactical-grid.is-final-room-map .boss-tactical-monster {
  width: 86px;
  height: 86px;
}

.boss-tactical-grid.is-final-room-map .boss-tactical-player {
  width: 56px;
  height: 56px;
}

.boss-tactical-monster {
  position: absolute;
  left: calc(50% - 42px);
  top: 149px;
  z-index: 8;
  width: 84px;
  height: 84px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.56));
  transition: left 0.2s ease, top 0.2s ease, transform 0.2s ease;
}

.boss-tactical-player {
  position: absolute;
  z-index: 9;
  width: 58px;
  height: 58px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 8px rgba(112, 203, 255, 0.28));
  transition: left 0.18s ease, top 0.18s ease, filter 0.16s ease, transform 0.16s ease;
}

.boss-tactical-player.is-in-zone {
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 12px rgba(240, 210, 143, 0.5));
}

.boss-tactical-player.is-danger {
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 15px rgba(255, 112, 96, 0.72));
}

[data-tactical-player-status].is-in-zone {
  color: var(--gold-soft);
}

[data-tactical-player-status].is-danger {
  color: #ffb7a8;
}

.codex-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 226, 150, 0.5);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffe08a, #c99134);
  color: #181006;
  text-decoration: none;
  font-weight: 950;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.codex-primary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3), 0 0 28px rgba(240, 210, 143, 0.18);
}

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

.modal-more-btn {
  margin-top: 18px;
}

.craft-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.craft-list span {
  padding: 8px 10px;
  border: 1px solid rgba(115, 184, 255, 0.22);
  border-radius: 999px;
  background: rgba(115, 184, 255, 0.08);
  color: #dcecff;
  font-size: 12px;
  font-weight: 800;
}

footer {
  margin-top: 44px;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid rgba(240, 210, 143, 0.34);
  background: linear-gradient(to top, #050a10, #0b1320);
}

footer p {
  margin: 6px 0;
  color: #9ba7b7;
  font-size: 13px;
}

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

@media (max-width: 1020px) {
  .filter-panel,
  .dungeon-grid,
  .seo-crosslinks-grid,
  .route-grid,
  .future-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-search {
    grid-column: span 2;
  }

  .featured-grid,
  .dungeon-layout,
  .boss-panel,
  .boss-loot-row,
  .boss-loot-row[data-two-monsters] {
    grid-template-columns: 1fr;
  }

  .boss-loot-row[data-two-monsters] [data-boss-monster] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boss-loot-row[data-two-monsters] .loot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-stats,
  .monster-grid,
  .loot-grid,
  .achievement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monster-legend {
    justify-content: flex-start;
    max-width: none;
    margin-top: 12px;
  }

  .side-panel {
    position: static;
  }

  .hero-emblem {
    opacity: 0.26;
  }

  .boss-feature-top,
  .boss-feature-bottom {
    grid-template-columns: 1fr;
  }

  .boss-feature-top {
    gap: 14px;
    padding: 22px 18px;
    text-align: center;
  }

  .boss-threat-list {
    justify-content: center;
  }

  .boss-feature-stats .monster-stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dungeon-page {
    width: min(100% - 20px, 1180px);
    padding-top: 22px;
  }

  .atlas-hero,
  .dungeon-hero {
    min-height: 310px;
    padding: 24px;
    border-radius: 22px;
  }

  .hero-emblem {
    display: none;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .filter-panel,
  .dungeon-grid,
  .seo-crosslinks-grid,
  .route-grid,
  .future-grid,
  .quick-stats,
  .monster-grid,
  .loot-grid,
  .achievement-grid,
  .strategy-grid,
  .room-card {
    grid-template-columns: 1fr;
  }

  .filter-search {
    grid-column: auto;
  }

  .boss-loot-row[data-two-monsters] .loot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boss-feature-card .boss-feature-info h3 {
    font-size: 34px;
  }

  .boss-feature-portrait img {
    width: 126px;
    height: 126px;
  }

  .boss-feature-stats .monster-stat-row,
  .boss-feature-card .monster-resistances,
  .boss-loot-row[data-two-monsters] [data-boss-monster] {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 8px;
    text-align: left;
  }


  .room-shot,
  .room-shot img {
    min-height: 218px;
  }

  .monster-modal-body,
  .loot-modal-body {
    grid-template-columns: 1fr;
  }

  .loot-modal-portrait {
    width: 100px;
    height: 100px;
  }

  .loot-modal-portrait img {
    width: 68px;
    height: 68px;
  }

  .modal-drop-list {
    grid-template-columns: 1fr;
  }

  .boss-tactical-board.has-final-room {
    min-height: 560px;
  }

  .boss-tactical-grid.is-final-room-map {
    --tactical-map-center: 10%;
    --tactical-zoom: 0.68;
    transform: scale(var(--tactical-zoom));
    transform-origin: top center;
  }
}
