:root {
  --purple: #704cd9;
  --purple-hover: #8d6de6;
  --purple-dark: #5835ba;
  --purple-glow: rgba(112, 76, 217, 0.35);
  --bg-parchment: #f9f8f6;
  --bg-filter: rgba(0, 0, 0, 0.042);
  --text-main: #242527;
  --text-muted: #6c727a;
  --text-light: #8f959e;
  --border-card: #dedbd7;
  --border-input: #d1d5db;
  --row-open-bg: #eae8e3;
  --row-hover-bg: #f6f5f2;
  --nav-bg: #26282a;
  --nav-dark: #191a1c;
  --crimson: #e40712;
  --container-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-main);
  background-color: var(--bg-parchment);
  /* Subtle mottled parchment paper texture */
  background-image:
    radial-gradient(ellipse at 18% 22%, rgba(212, 204, 190, 0.16) 0%, transparent 52%),
    radial-gradient(ellipse at 82% 70%, rgba(205, 198, 185, 0.14) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

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

button,
input,
select {
  font-family: inherit;
}

/* ===========================
   TOP ANNOUNCEMENT & NAVBAR
   =========================== */
.top-promo-bar {
  background: #141517;
  color: #d6d9dc;
  font-size: 12px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid #2b2d30;
}

.top-promo-bar.is-hidden {
  display: none;
}

.promo-dismiss-btn {
  background: transparent;
  color: #e4e6e8;
  border: 1px solid #6b7075;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}

.promo-dismiss-btn:hover {
  border-color: #fff;
  color: #fff;
}

.site-header {
  background: var(--nav-bg);
  color: #fff;
  border-bottom: 1px solid #161719;
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.site-header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.brand-logo-top {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--crimson);
  text-transform: uppercase;
}

.brand-logo-bottom {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav-btn {
  background: transparent;
  border: none;
  color: #d4d7db;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.header-nav-btn:hover,
.header-nav-btn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search-btn {
  background: transparent;
  border: none;
  color: #d4d7db;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 3px;
}

.header-search-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.header-spellbook-btn {
  background: var(--crimson);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 7px 14px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: filter 0.15s;
}

.header-spellbook-btn:hover {
  filter: brightness(1.1);
}

.header-spellbook-btn.is-active {
  background: var(--purple);
}

.spellbook-count-pill {
  background: rgba(0, 0, 0, 0.28);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
}

/* ===========================
   MAIN PAGE CONTAINER
   =========================== */
.page-shell {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 18px 20px 56px;
  flex: 1;
}

/* Breadcrumbs + Top Action Buttons */
.sub-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.breadcrumb-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e4e2df;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.breadcrumb-b-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--crimson);
  color: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  border-radius: 2px;
}

.breadcrumb-link {
  color: var(--text-main);
  cursor: pointer;
}

.breadcrumb-link:hover {
  color: var(--purple);
}

.breadcrumb-sep {
  color: #b4b8be;
  font-weight: 400;
}

.breadcrumb-current {
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.action-pill-btn {
  background: #121316;
  color: #fff;
  border: 1px solid #35a7d6;
  box-shadow: 0 0 0 1px rgba(53, 167, 214, 0.25);
  border-radius: 2px;
  padding: 7px 14px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s, filter 0.15s;
}

.action-pill-btn.is-purple-edge {
  border-color: var(--purple);
  box-shadow: 0 0 8px rgba(112, 76, 217, 0.45);
}

.action-pill-btn:hover {
  filter: brightness(1.18);
}

/* Page Title & Purple Underline */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

h1.page-title {
  margin: 4px 0 8px;
  font-family: 'Roboto Condensed', Roboto, Helvetica, sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.purple-divider {
  height: 2px;
  background: var(--purple);
  width: 100%;
  border: none;
  margin: 0;
}

.purple-divider.is-thick {
  height: 3px;
}

/* ===========================
   FILTER PANEL
   =========================== */
.listing-filters {
  position: relative;
  margin-bottom: 30px;
}

.filter-container {
  background: var(--bg-filter);
  padding: 18px 20px 24px;
  border-radius: 0 0 3px 3px;
}

.filter-primary-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr 185px;
  gap: 14px;
  align-items: start;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  min-width: 0;
}

.filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-input,
.filter-select,
.ms-trigger {
  width: 100%;
  height: 38px;
  background: #fff;
  border: 1px solid #d5d7da;
  border-radius: 2px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-input::placeholder {
  color: #9ba0a7;
}

.filter-input:focus,
.filter-select:focus,
.ms-trigger:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(112, 76, 217, 0.18);
}

/* Custom Multi-Select Dropdown (mimics D&D Beyond Select2) */
.ms-wrapper {
  position: relative;
}

.ms-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.ms-trigger-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #9ba0a7;
}

.ms-trigger-text.has-selection {
  color: var(--text-main);
  font-weight: 500;
}

.ms-chevron {
  flex-shrink: 0;
  color: #777;
  font-size: 10px;
}

.ms-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  min-width: 205px;
  max-height: 270px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #c9ccd1;
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  z-index: 45;
  padding: 4px 0;
  display: none;
}

.ms-wrapper.is-open .ms-dropdown {
  display: block;
}

.ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-main);
  user-select: none;
}

.ms-option:hover {
  background: #f2eefc;
}

.ms-option input[type="checkbox"] {
  accent-color: var(--purple);
  margin: 0;
  cursor: pointer;
}

/* Filter CTA + Reset */
.filter-cta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding-top: 19px;
}

.btn-filter-spells {
  width: 100%;
  height: 38px;
  background: linear-gradient(to bottom, #845ff0, #704cd9);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(112, 76, 217, 0.25);
  transition: filter 0.15s;
}

.btn-filter-spells:hover {
  filter: brightness(1.08);
}

.btn-reset-filters {
  background: transparent;
  border: none;
  color: var(--purple);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-reset-filters:hover {
  text-decoration: underline;
}

/* Advanced Filters Drawer */
.advanced-filters-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.advanced-filters-panel.is-open {
  display: block;
}

.advanced-filters-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.components-toggle-group {
  display: flex;
  gap: 6px;
}

.comp-toggle-btn {
  width: 38px;
  height: 38px;
  background: #fff;
  border: 1px solid #d5d7da;
  border-radius: 2px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.12s;
}

.comp-toggle-btn:hover {
  border-color: var(--purple);
}

.comp-toggle-btn.is-active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.advanced-toggle-tab {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  background: #eceae7;
  border: none;
  border-radius: 0 0 4px 4px;
  padding: 6px 18px;
  color: var(--purple);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.07);
}

.advanced-toggle-tab:hover {
  background: #e4e1dc;
}

/* ===========================
   ACTIVE FILTER CHIPS & STATUS
   =========================== */
.results-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.active-chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #d5d2df;
  border-radius: 2px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
}

.active-filter-chip button {
  background: none;
  border: none;
  color: var(--purple);
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  font-size: 13px;
  line-height: 1;
}

.per-page-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.per-page-select {
  height: 26px;
  border: 1px solid #d5d7da;
  background: #fff;
  border-radius: 2px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--text-main);
}

/* ===========================
   SPELL LISTING TABLE HEADERS & ROWS
   =========================== */
.spell-grid-cols {
  display: grid;
  grid-template-columns: 54px 60px minmax(200px, 1.55fr) 115px 115px 145px 100px 135px 38px;
  align-items: center;
  gap: 10px;
}

.listing-header {
  padding: 8px 14px;
  font-family: 'Roboto Condensed', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-main);
  user-select: none;
}

.listing-header-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.listing-header-cell.is-sortable {
  cursor: pointer;
}

.listing-header-cell.is-sortable:hover {
  color: var(--purple);
}

.sort-arrows {
  display: inline-flex;
  flex-direction: column;
  font-size: 7px;
  line-height: 1;
  color: #b4b7bc;
}

.sort-arrows .up.is-active,
.sort-arrows .down.is-active {
  color: var(--purple);
}

/* Spell Card Container with Subtle Torn/Deckled Paper Bottom Edge */
.spell-listing {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spell-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-card);
  border-bottom: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.15s;
}

.spell-card::after {
  content: '';
  display: block;
  width: 100%;
  height: 5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='6' viewBox='0 0 120 6' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L120,0 L120,3 L112,2.1 L104,4.2 L95,2.5 L86,4.6 L78,2.2 L69,3.8 L59,2.4 L49,4.5 L40,2.1 L31,3.9 L21,2.3 L11,4.3 L4,2.4 L0,3.2 Z' fill='%23ffffff'/%3E%3Cpath d='M0,3.2 L4,2.4 L11,4.3 L21,2.3 L31,3.9 L40,2.1 L49,4.5 L59,2.4 L69,3.8 L78,2.2 L86,4.6 L95,2.5 L104,4.2 L112,2.1 L120,3' fill='none' stroke='%23d8d4cf' stroke-width='0.9'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 6px;
  position: relative;
  bottom: -4px;
  pointer-events: none;
}

.spell-card.is-open {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

/* Collapsed Row */
.spell-row {
  min-height: 73px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.14s;
}

.spell-row:hover {
  background-color: var(--row-hover-bg);
}

.spell-card.is-open .spell-row {
  background-color: var(--row-open-bg);
  border-bottom: 1px solid #d9d6cf;
}

.col-school {
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-level {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.col-name {
  min-width: 0;
}

.spell-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.spell-name-link {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-main);
  transition: color 0.12s;
}

.spell-name-link:hover,
.spell-row:hover .spell-name-link {
  color: var(--purple);
}

.spell-subline {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-cell {
  font-size: 13.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.col-cell-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-expand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.expand-toggle-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--purple);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.expand-toggle-btn:hover {
  background: rgba(112, 76, 217, 0.1);
}

/* Badges: Concentration [C], Ritual [R], UA */
.badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 10px;
  color: #fff;
  background: #242527;
  flex-shrink: 0;
  user-select: none;
}

.badge-concentration {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  transform: rotate(45deg);
  margin: 0 2px;
  font-size: 0;
}

.badge-concentration::after {
  content: 'C';
  font-size: 10px;
  transform: rotate(-45deg);
  display: block;
}

.badge-ritual {
  width: 15px;
  height: 15px;
  border-radius: 2px;
  border-left: 2px solid #595c61;
}

.badge-ua {
  background: #eceef1;
  border: 1px solid #cfd3d9;
  color: #555a61;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.range-aoe-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.aoe-svg,
.inline-meta-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #36383b;
  vertical-align: middle;
}

/* ===========================
   EXPANDED INLINE DRAWER
   =========================== */
.spell-drawer {
  display: none;
  padding: 20px 24px 20px;
  background: #fff;
}

.spell-card.is-open .spell-drawer {
  display: block;
  animation: drawerFadeIn 0.14s ease-out;
}

@keyframes drawerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 4x2 Stat Block Grid */
.ddb-statblock-spell {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 20px;
  margin-bottom: 18px;
}

.ddb-statblock-item-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-main);
  margin-bottom: 3px;
}

.ddb-statblock-item-value {
  font-size: 15px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Description Body Typography (High Readability) */
.more-info-body-description {
  padding: 18px 0 8px;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--text-main);
}

.more-info-body-description p {
  margin: 0 0 13px;
}

.more-info-body-description p:last-child {
  margin-bottom: 0;
}

.more-info-body-description ul,
.more-info-body-description ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.more-info-body-description li {
  margin-bottom: 6px;
}

.more-info-body-description table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 13.5px;
  border: 1px solid #dcd9d4;
}

.more-info-body-description th {
  background: #edeaf7;
  color: var(--text-main);
  font-weight: 700;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--purple);
}

.more-info-body-description td {
  padding: 7px 12px;
  border-bottom: 1px solid #e7e4df;
  vertical-align: top;
}

.more-info-body-description td:first-child,
.more-info-body-description th:first-child {
  white-space: nowrap;
}

.more-info-body-description tr:nth-child(even) td {
  background: #faf9f7;
}

.components-blurb {
  display: block;
  margin-top: 12px;
  font-style: italic;
  font-size: 13.5px;
  color: #494c50;
}

/* Drawer & Detail Footer */
.more-info-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #ece9e5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.more-info-footer-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  flex: 1;
}

.btn-view-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 175px;
  height: 36px;
  padding: 0 18px;
  background: linear-gradient(to bottom, #845ff0, #704cd9);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(112, 76, 217, 0.25);
}

.btn-view-details:hover {
  filter: brightness(1.08);
  color: #fff;
}

.footer-pills-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pills-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pills-group-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-right: 2px;
}

.meta-tag-pill {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #c9cdd2;
  background: #fafafa;
  border-radius: 2px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-main);
}

.meta-tag-pill.is-clickable {
  cursor: pointer;
}

.meta-tag-pill.is-clickable:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: #f5f1fd;
}

.spell-source-citation {
  font-style: italic;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

/* ===========================
   DEDICATED SPELL DETAIL VIEW
   =========================== */
.detail-view {
  display: none;
}

.detail-view.is-active {
  display: block;
}

.listing-view.is-hidden {
  display: none;
}

.detail-back-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-back-to-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #d5d7da;
  border-radius: 2px;
  padding: 6px 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-main);
  cursor: pointer;
}

.btn-back-to-list:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.btn-bookmark-spell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #d5d7da;
  border-radius: 2px;
  padding: 6px 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-main);
  cursor: pointer;
}

.btn-bookmark-spell.is-saved {
  background: #f3effc;
  border-color: var(--purple);
  color: var(--purple);
}

.spell-detail-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-card);
  border-top: 2px solid var(--purple);
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 28px 32px 26px;
}

.spell-detail-card::after {
  content: '';
  display: block;
  width: calc(100% + 64px);
  margin: 0 -32px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='6' viewBox='0 0 120 6' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L120,0 L120,3 L112,2.1 L104,4.2 L95,2.5 L86,4.6 L78,2.2 L69,3.8 L59,2.4 L49,4.5 L40,2.1 L31,3.9 L21,2.3 L11,4.3 L4,2.4 L0,3.2 Z' fill='%23ffffff'/%3E%3Cpath d='M0,3.2 L4,2.4 L11,4.3 L21,2.3 L31,3.9 L40,2.1 L49,4.5 L59,2.4 L69,3.8 L78,2.2 L86,4.6 L95,2.5 L104,4.2 L112,2.1 L120,3' fill='none' stroke='%23d8d4cf' stroke-width='0.9'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 6px;
  position: relative;
  bottom: -31px;
  pointer-events: none;
}

.detail-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: start;
}

.detail-content-col .more-info-body-description {
  font-size: 15px;
  line-height: 1.72;
}

.detail-aside-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 8px;
}

.detail-aside-school-label {
  margin-top: 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.detail-prev-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

/* ===========================
   PAGINATION
   =========================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #d5d7da;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, color 0.12s;
}

.page-btn:hover:not(:disabled):not(.is-active) {
  border-color: var(--purple);
  color: var(--purple);
}

.page-btn.is-active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.page-ellipsis {
  padding: 0 6px;
  color: var(--text-muted);
  font-weight: 700;
}

/* ===========================
   EMPTY STATE
   =========================== */
.empty-results-card {
  background: #fff;
  border: 1px solid var(--border-card);
  padding: 40px 24px;
  text-align: center;
  border-radius: 2px;
}

.empty-results-card h3 {
  margin: 0 0 8px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 22px;
}

.empty-results-card p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

/* ===========================
   RULES MODAL
   =========================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 19, 22, 0.65);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  background: #fff;
  width: 100%;
  max-width: 740px;
  max-height: 85vh;
  overflow-y: auto;
  border-top: 3px solid var(--purple);
  border-radius: 2px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  padding: 24px 28px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6e3df;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.modal-header h2 {
  margin: 0;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 24px;
}

.modal-close-btn {
  background: transparent;
  border: 1px solid #d5d7da;
  border-radius: 2px;
  width: 30px;
  height: 30px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal-close-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  font-size: 13.5px;
  line-height: 1.6;
}

.rules-block h4 {
  margin: 0 0 5px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  text-transform: uppercase;
  color: var(--purple-dark);
}

.rules-block p {
  margin: 0;
  color: #36393d;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer-notice {
  background: #08090a;
  color: #a6aab0;
  font-size: 12px;
  text-align: center;
  padding: 16px 20px;
}

.site-footer {
  background: var(--nav-bg);
  color: #c5c9ce;
  padding: 32px 20px;
}

.site-footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px 1fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-col h5 {
  margin: 0 0 10px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #9ba0a7;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 6px;
  font-size: 12.5px;
}

.footer-col a {
  color: #dfe2e6;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */
@media (max-width: 920px) {
  .filter-primary-row {
    grid-template-columns: 1fr 1fr;
  }

  .filter-cta-col {
    grid-column: 1 / -1;
    padding-top: 4px;
  }

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

  .spell-grid-cols {
    grid-template-columns: 48px 56px minmax(160px, 1.4fr) 95px 95px 120px 85px 115px 32px;
    gap: 6px;
  }
}

@media (max-width: 820px) {
  .detail-two-col {
    grid-template-columns: 1fr;
  }

  .detail-aside-col {
    order: -1;
  }

  .header-nav {
    display: none;
  }

  .listing-header {
    display: none;
  }

  .spell-grid-cols {
    grid-template-columns: 44px 52px 1fr 32px;
  }

  .spell-row .col-casting,
  .spell-row .col-duration,
  .spell-row .col-range,
  .spell-row .col-attack,
  .spell-row .col-effect {
    display: none;
  }

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

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .filter-primary-row,
  .advanced-filters-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   SUMMONING CREATURE TABLES & LINKS
   =========================== */
.monster-tooltip-link {
  color: #bc0f0f;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dotted rgba(188, 15, 15, 0.45);
  transition: color 0.12s, border-color 0.12s;
}

.monster-tooltip-link:hover {
  color: #e40712;
  border-bottom-color: #e40712;
  text-decoration: underline;
}

.summoning-creatures-section {
  margin-top: 18px;
}

.summoning-creatures-heading {
  margin: 0 0 8px !important;
  font-size: 14.5px;
  color: var(--text-main);
}

.more-info-body-description table.summoning-creatures-table {
  width: auto;
  min-width: 340px;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0;
  border: 1px solid #e2ded9;
}

.more-info-body-description table.summoning-creatures-table th {
  background: #f5f3f0;
  border-bottom: 1px solid #dcd7d0;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.more-info-body-description table.summoning-creatures-table th:first-child,
.more-info-body-description table.summoning-creatures-table td:first-child {
  text-align: center;
  vertical-align: middle;
  min-width: 68px;
  white-space: nowrap;
}

.more-info-body-description table.summoning-creatures-table td {
  padding: 8px 18px;
  border-bottom: 1px solid #ebe8e3;
  line-height: 1.55;
}

/* ===========================
   MONSTER HOVER TOOLTIP POPUP
   =========================== */
.monster-tooltip-popup {
  position: fixed;
  z-index: 250;
  width: 510px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  opacity: 1;
  isolation: isolate;
  border: 1px solid #d4d1cc;
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
  display: none;
  overflow: hidden;
  pointer-events: auto;
}

.monster-tooltip-popup.is-visible {
  display: block;
  animation: drawerFadeIn 0.1s ease-out;
}

.mt-header {
  min-height: 68px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #17191d 0%, #2c3138 62%, #191c20 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mt-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mt-header-thumb {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #101214;
  flex-shrink: 0;
}

.mt-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.mt-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
}

.mt-subtitle {
  font-size: 12px;
  font-style: italic;
  color: #c8cdd3;
  margin-top: 2px;
}

.mt-type-pill {
  background: #bc0f0f;
  border: 1px solid #f04141;
  color: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 3px 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.mt-body {
  padding: 12px 16px 14px;
  background: #ffffff;
}

.mt-byline {
  font-size: 13.5px;
  font-style: italic;
  color: var(--text-main);
  margin-bottom: 8px;
}

.mt-red-rule {
  border: none;
  height: 2px;
  background: #bc0f0f;
  margin: 8px 0;
}

.mt-red-rule.is-thick {
  height: 3px;
}

.mt-red-rule.is-thin {
  height: 1px;
  opacity: 0.65;
}

.mt-abilities-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
  padding: 4px 0;
}

.mt-ability-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

.mt-ability-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin-top: 2px;
}

.mt-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 0;
}

.mt-stat-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: 0.3px;
}

.mt-stat-val {
  font-size: 12.5px;
  color: var(--text-main);
  margin-top: 2px;
  word-break: break-word;
}

.mt-stat-val.is-green {
  color: #3f7a15;
}

.mt-stat-val.is-purple {
  color: var(--purple-dark);
}

.mt-footer-hint {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ece9e5;
  text-align: right;
}

.mt-open-detail-link {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #bc0f0f;
}

.mt-open-detail-link:hover {
  text-decoration: underline;
}

/* ===========================
   DEDICATED MONSTER DETAIL SCREEN
   =========================== */
.monster-detail-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-card);
  border-top: 2px solid #bc0f0f;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 28px 32px 26px;
}

.monster-detail-card::after {
  content: '';
  display: block;
  width: calc(100% + 64px);
  margin: 0 -32px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='6' viewBox='0 0 120 6' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L120,0 L120,3 L112,2.1 L104,4.2 L95,2.5 L86,4.6 L78,2.2 L69,3.8 L59,2.4 L49,4.5 L40,2.1 L31,3.9 L21,2.3 L11,4.3 L4,2.4 L0,3.2 Z' fill='%23ffffff'/%3E%3Cpath d='M0,3.2 L4,2.4 L11,4.3 L21,2.3 L31,3.9 L40,2.1 L49,4.5 L59,2.4 L69,3.8 L78,2.2 L86,4.6 L95,2.5 L104,4.2 L112,2.1 L120,3' fill='none' stroke='%23d8d4cf' stroke-width='0.9'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 120px 6px;
  position: relative;
  bottom: -31px;
  pointer-events: none;
}

.monster-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.mon-stat-block {
  position: relative;
  background: linear-gradient(180deg, #fdf6e3 0%, #f6ead0 100%);
  border: 1px solid #d4cfc3;
  box-shadow: 0 0 6px rgba(100, 95, 85, 0.32);
  padding: 20px 22px;
  font-size: 14px;
  line-height: 1.45;
  color: #24201c;
  column-count: 2;
  column-gap: 26px;
}

.mon-stat-block::before,
.mon-stat-block::after {
  content: '';
  position: absolute;
  left: -3px;
  right: -3px;
  height: 6px;
  background: linear-gradient(90deg, #9c7224, #e5c676 50%, #9c7224);
  border-top: 1px solid #593e10;
  border-bottom: 1px solid #593e10;
}

.mon-stat-block::before {
  top: -4px;
}

.mon-stat-block::after {
  bottom: -4px;
}

.mon-stat-block-top,
.mon-attributes-block,
.mon-abilities-block,
.mon-tidbits-block {
  break-inside: avoid;
}

.mon-stat-block-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #822000;
  line-height: 1.12;
  letter-spacing: 0.4px;
}

.mon-stat-block-meta {
  font-style: italic;
  font-size: 13.5px;
  margin-top: 2px;
}

.mon-tapered-rule {
  display: block;
  width: 100%;
  height: 5px;
  margin: 9px 0;
}

.mon-tidbit {
  color: #822000;
  line-height: 1.38;
  margin-bottom: 3px;
}

.mon-tidbit-label {
  font-weight: 700;
  margin-right: 4px;
}

.mon-abilities-block {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  text-align: center;
  padding: 4px 0;
  color: #4f1300;
}

.mon-ability-heading {
  font-weight: 700;
  font-size: 12.5px;
}

.mon-ability-score {
  font-size: 11.5px;
  white-space: nowrap;
  margin-top: 2px;
}

.mon-challenge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.mon-section-block {
  margin-top: 10px;
}

.mon-section-heading {
  margin: 0 0 8px;
  padding-bottom: 2px;
  border-bottom: 1px solid #822000;
  color: #822000;
  font-size: 20px;
  font-weight: 400;
  font-family: 'Roboto', Helvetica, sans-serif;
  break-after: avoid;
}

.mon-entry {
  margin: 0 0 9px;
  color: #24201c;
  font-size: 13.5px;
  line-height: 1.48;
  break-inside: avoid;
}

.monster-aside-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mon-artwork-wrap {
  width: 100%;
  background: #faf8f5;
  border: 1px solid #e4dfd8;
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.mon-artwork-img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  cursor: zoom-in;
}

.mon-artwork-fallback {
  width: 100%;
  height: 280px;
  background: #f3efea;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 700;
}

.mon-related-spells {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Artwork Lightbox */
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: #141518;
  padding: 14px;
  border-radius: 4px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  text-align: center;
}

.lightbox-img {
  max-width: 82vw;
  max-height: 78vh;
  border-radius: 4px;
  display: block;
}

.lightbox-caption {
  color: #e4e6e9;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 16px;
  margin-top: 10px;
}

.lightbox-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 1px solid #555;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
}

@media (max-width: 980px) {
  .monster-detail-grid {
    grid-template-columns: 1fr;
  }

  .monster-aside-col {
    order: -1;
    max-width: 380px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .mon-stat-block {
    column-count: 1;
  }
}

/* ===========================
   HEADER NAVIGATION TABS
   =========================== */
.header-nav-sep {
  color: #555961;
  margin: 0 4px;
  user-select: none;
}

.header-presets-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.header-nav-btn.is-sub {
  font-size: 12px;
  color: #b4b9c2;
  padding: 6px 10px;
}

.header-nav-btn.is-sub:hover,
.header-nav-btn.is-sub.is-active {
  color: #fff;
}

/* ===========================
   MONSTERS LISTING & FILTERS
   =========================== */
.crimson-divider {
  height: 2px;
  background: #bc0f0f;
  width: 100%;
  border: none;
  margin: 0;
}

.action-pill-btn.is-crimson-edge {
  border-color: #bc0f0f;
  box-shadow: 0 0 8px rgba(188, 15, 15, 0.45);
}

.monster-type-carousel-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.monster-type-carousel-viewport {
  flex: 1;
  overflow: hidden;
}

.monster-type-carousel {
  list-style: none;
  margin: 0;
  padding: 2px 4px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  justify-items: center;
}

.monster-type-item {
  width: 100%;
  display: flex;
  justify-content: center;
}

.monster-type-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.monster-type-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 50%;
  transition: border-color 0.14s, transform 0.14s;
}

.monster-type-btn:hover .monster-type-ring {
  transform: translateY(-2px);
  border-color: rgba(188, 15, 15, 0.45);
}

.monster-type-item.is-active .monster-type-ring {
  border-color: #bc0f0f;
}

.monster-type-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6b7178;
}

.monster-type-item.is-active .monster-type-label,
.monster-type-btn:hover .monster-type-label {
  color: var(--text-main);
}

.carousel-arrow-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  flex-shrink: 0;
}

.carousel-arrow-btn.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.carousel-arrow-circle {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #bc0f0f;
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(188, 15, 15, 0.3);
}

.carousel-arrow-btn:hover .carousel-arrow-circle {
  background: #d61818;
}

.carousel-arrow-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
}

.monster-filter-primary-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr 185px;
  gap: 14px;
  align-items: start;
}

.range-pair-inputs {
  display: flex;
  align-items: center;
  gap: 5px;
}

.range-pair-inputs .filter-input,
.range-pair-inputs .filter-select {
  min-width: 0;
  flex: 1;
}

.range-dash {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.monster-adv-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.btn-filter-monsters {
  width: 100%;
  height: 38px;
  background: linear-gradient(to bottom, #d61a1a, #bc0f0f);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(188, 15, 15, 0.25);
  transition: filter 0.15s;
}

.btn-filter-monsters:hover {
  filter: brightness(1.08);
}

.btn-reset-filters.is-crimson,
.advanced-toggle-tab.is-crimson,
.expand-toggle-btn.is-crimson,
.spell-name-link.is-crimson-hover:hover,
.monster-row:hover .spell-name-link.is-crimson-hover {
  color: #bc0f0f;
}

.expand-toggle-btn.is-crimson:hover {
  background: rgba(188, 15, 15, 0.09);
}

.active-filter-chip.is-crimson button {
  color: #bc0f0f;
}

.btn-view-details.is-crimson {
  background: linear-gradient(to bottom, #d61a1a, #bc0f0f);
  box-shadow: 0 2px 4px rgba(188, 15, 15, 0.25);
}

.page-btn.is-crimson:hover:not(:disabled):not(.is-active) {
  border-color: #bc0f0f;
  color: #bc0f0f;
}

.page-btn.is-crimson.is-active {
  background: #bc0f0f;
  border-color: #bc0f0f;
}

.meta-tag-pill.is-clickable.is-crimson:hover {
  border-color: #bc0f0f;
  color: #bc0f0f;
  background: #fdf2f2;
}

/* Monster Listing Grid & Rows */
.monster-grid-cols {
  display: grid;
  grid-template-columns: 52px 58px minmax(190px, 1.45fr) 125px 86px 132px 115px 95px 38px;
  align-items: center;
  gap: 10px;
}

.col-mon-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mon-row-thumb {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #d7d4ce;
  background: #f0ede8;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mon-row-thumb-fallback {
  font-weight: 700;
  color: var(--text-muted);
}

.badge-legendary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #242527;
  color: #fff;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.mon-subtype-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.mon-drawer-stat-wrap {
  margin-bottom: 18px;
}

@media (max-width: 1080px) {
  .monster-type-carousel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .monster-filter-primary-row {
    grid-template-columns: 1fr 1fr;
  }

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

  .monster-grid-cols {
    grid-template-columns: 46px 48px minmax(140px, 1.3fr) 100px 70px 100px 95px 75px 32px;
    gap: 6px;
  }
}

@media (max-width: 820px) {
  .monster-grid-cols {
    grid-template-columns: 46px 48px 1fr 32px;
  }

  .monster-row .col-mon-type,
  .monster-row .col-mon-size,
  .monster-row .col-mon-align,
  .monster-row .col-mon-hab,
  .monster-row .col-mon-tags {
    display: none;
  }

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

@media (max-width: 520px) {
  .monster-filter-primary-row,
  .monster-adv-grid {
    grid-template-columns: 1fr;
  }
}


