:root {
  --bg-deep: #080c14;
  --bg-main: #0d121f;
  --bg-surface: #141c2e;
  --bg-surface-hover: #1c273e;
  --border-subtle: #24314c;
  --border-gold: #c69b35;
  --gold-primary: #e5b94c;
  --gold-hover: #fcd36a;
  --gold-muted: #8e7330;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 64px;
  --audio-height: 68px;
  --sidebar-width: 320px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* APP LAYOUT */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* TOPBAR */
.topbar {
  height: var(--header-height);
  background: rgba(13, 18, 31, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-crest {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #24314c, #141c2e);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(229, 185, 76, 0.2);
}

.crest-symbol {
  font-size: 1.25rem;
  color: var(--gold-primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-primary);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* SEARCH BOX */
.topbar-center {
  position: relative;
  width: 420px;
  max-width: 45vw;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(229, 185, 76, 0.25);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-size: 0.88rem;
  width: 100%;
  outline: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-height: 380px;
  overflow-y: auto;
  z-index: 100;
}

.search-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s;
}

.search-item:hover {
  background: var(--bg-surface-hover);
}

.search-item-title {
  font-weight: 600;
  color: var(--gold-primary);
  font-size: 0.9rem;
}

.search-item-theatre {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* TOPBAR BUTTONS */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
}

/* MAIN CONTAINER */
.main-container {
  display: flex;
  height: calc(100vh - var(--header-height) - var(--audio-height));
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-main);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 40;
}

.sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  color: var(--gold-muted);
  font-weight: 700;
}

.sidebar-nav {
  padding: 0.75rem 0.5rem 2rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-section {
  border-radius: 6px;
  overflow: hidden;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.nav-section-header:hover {
  background: var(--bg-surface);
}

.nav-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-section-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
}

.nav-section-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(229, 185, 76, 0.15);
  color: var(--gold-primary);
  border: 1px solid rgba(229, 185, 76, 0.3);
  font-family: var(--font-sans);
}

.nav-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.nav-section.open .nav-arrow {
  transform: rotate(90deg);
}

.nav-articles-list {
  display: none;
  padding-left: 1.25rem;
  margin-top: 0.2rem;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-section.open .nav-articles-list {
  display: flex;
}

.nav-item-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-align: left;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s;
  display: flex;
  align-items: center;
}

.nav-item-btn:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item-btn.active {
  color: var(--gold-primary);
  background: rgba(229, 185, 76, 0.12);
  border-left: 3px solid var(--gold-primary);
  font-weight: 600;
}

/* VIEWPORT & PANELS */
.viewport {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  position: relative;
  background: radial-gradient(circle at 50% 20%, #111a2c 0%, #080c14 80%);
}

.view-panel {
  width: 100%;
  min-height: 100%;
}

.hidden {
  display: none !important;
}

/* ARTICLE / CODEX READING VIEW */
.article-wrapper {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem 2rem;
}

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs .crumb.active {
  color: var(--gold-primary);
}

/* MARKDOWN STYLES */
.markdown-body {
  color: var(--text-main);
}

.markdown-body h1 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--gold-primary);
  border-bottom: 2px solid var(--border-gold);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.markdown-body h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold-hover);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
}

.markdown-body h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-bright);
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

.markdown-body p {
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.markdown-body blockquote {
  border-left: 4px solid var(--gold-primary);
  background: rgba(229, 185, 76, 0.08);
  padding: 1rem 1.4rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: #f1f5f9;
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 1.4rem;
  padding-left: 1.8rem;
}

.markdown-body li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  background: var(--bg-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.markdown-body th {
  background: #182236;
  color: var(--gold-primary);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-gold);
}

.markdown-body td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.markdown-body tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.markdown-body pre {
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
}

.markdown-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
  margin: 2.5rem 0;
}

/* ARTICLE FOOTER NAVIGATION */
.article-footer-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  gap: 1rem;
}

.footer-nav-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--gold-primary);
  padding: 0.85rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 48%;
  text-align: left;
}

.footer-nav-btn.next {
  text-align: right;
  margin-left: auto;
}

.footer-nav-btn .nav-direction {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-nav-btn .nav-dest-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-nav-btn:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(229, 185, 76, 0.25);
  transform: translateY(-1px);
}

.footer-nav-btn:hover:not(:disabled) .nav-dest-title {
  color: var(--gold-primary);
}

.footer-nav-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

/* MAP VIEW */
.map-view-header {
  padding: 1.25rem 2rem;
  background: rgba(13, 18, 31, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-title {
  font-family: var(--font-serif);
  color: var(--gold-primary);
  font-size: 1.4rem;
}

.view-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.map-controls {
  display: flex;
  gap: 0.5rem;
}

.map-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.15s;
}

.map-btn:hover {
  background: var(--gold-primary);
  color: #000;
}

.map-viewport {
  width: 100%;
  height: calc(100vh - var(--header-height) - var(--audio-height) - 90px);
  overflow: auto;
  position: relative;
  background: #05080e;
  cursor: grab;
}

.map-viewport:active {
  cursor: grabbing;
}

.map-stage {
  position: relative;
  display: inline-block;
  transform-origin: 0 0;
  transition: transform 0.1s ease-out;
}

.map-stage img {
  display: block;
  max-width: none;
  width: 2000px;
  height: auto;
}

.map-pins-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-pin:hover {
  transform: translate(-50%, -115%) scale(1.15);
  z-index: 10;
}

.pin-marker {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #fcd36a, #c69b35);
  border: 2px solid #ffffff;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 12px rgba(229, 185, 76, 0.6);
}

.pin-icon {
  transform: rotate(45deg);
  font-size: 14px;
  color: #000;
  font-weight: 900;
}

.pin-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 12, 20, 0.92);
  border: 1px solid var(--border-gold);
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  margin-top: 4px;
}

/* PIN DETAIL MODAL */
.pin-modal {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  width: 360px;
  max-width: 90vw;
  background: rgba(13, 18, 31, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  z-index: 30;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}

.pin-modal-card h3 {
  font-family: var(--font-serif);
  color: var(--gold-primary);
  font-size: 1.25rem;
  margin: 0.4rem 0;
}

.pin-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pin-desc {
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 1.2rem;
}

.btn-primary {
  background: linear-gradient(135deg, #c69b35, #e5b94c);
  color: #080c14;
  font-weight: 700;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 0.88rem;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* AUDIO BAR */
.audio-player-bar {
  height: var(--audio-height);
  background: rgba(10, 14, 23, 0.98);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 50;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c69b35, #e5b94c);
  border: none;
  color: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(229, 185, 76, 0.3);
  transition: transform 0.15s;
}

.play-btn:hover {
  transform: scale(1.06);
}

.track-info {
  display: flex;
  flex-direction: column;
}

.track-tag {
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--gold-primary);
  font-weight: 700;
}

.track-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
}

.player-center {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.track-dropdown {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  max-width: 320px;
}

.soundwave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.soundwave .bar {
  width: 3px;
  height: 6px;
  background: var(--gold-primary);
  border-radius: 2px;
  transition: height 0.15s;
}

.soundwave.playing .bar {
  animation: equalize 1s infinite alternate;
}

.soundwave.playing .bar:nth-child(1) { animation-delay: 0.1s; }
.soundwave.playing .bar:nth-child(2) { animation-delay: 0.3s; }
.soundwave.playing .bar:nth-child(3) { animation-delay: 0.2s; }
.soundwave.playing .bar:nth-child(4) { animation-delay: 0.4s; }
.soundwave.playing .bar:nth-child(5) { animation-delay: 0.15s; }

@keyframes equalize {
  0% { height: 4px; }
  100% { height: 18px; }
}

.player-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
}

.volume-slider {
  width: 100px;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

/* MOBILE RESPONSIVENESS */
.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .mobile-only {
    display: flex;
  }
  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 35;
  }
  .sidebar-backdrop.active {
    display: block;
  }
  .topbar-center {
    display: none;
  }
  .audio-player-bar .track-dropdown {
    display: none;
  }
}

/* SPELLS & RULES VIEW STYLES */
.spells-view-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem 2rem;
}

.spells-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.spells-tab-switch {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-bright);
}

.tab-btn.active {
  background: var(--gold-primary);
  color: #080c14;
}

.spells-filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.spells-search {
  flex: 1;
  min-width: 260px;
}

.spells-search input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  outline: none;
  font-size: 0.9rem;
}

.spells-search input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(229, 185, 76, 0.2);
}

.spells-selects {
  display: flex;
  gap: 0.75rem;
}

.spells-selects select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  outline: none;
  font-size: 0.85rem;
}

.level-chips-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.level-chips-container .chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.level-chips-container .chip:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.level-chips-container .chip.active {
  background: rgba(229, 185, 76, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  font-weight: 600;
}

.spells-count-bar {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.spells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.spell-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.spell-card:hover {
  border-color: rgba(229, 185, 76, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.spell-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.spell-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.spell-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-primary);
  line-height: 1.3;
}

.spell-title-eng {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-sans);
  font-weight: 400;
}

.spell-status-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.spell-badge-banned {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spell-badge-modified {
  background: rgba(229, 185, 76, 0.18);
  color: var(--gold-primary);
  border: 1px solid rgba(229, 185, 76, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spell-card.is-banned {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.05) 0%, var(--bg-surface) 100%);
}

.spell-card-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
  white-space: nowrap;
  font-weight: 600;
}

.spell-meta-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.spell-details-list {
  font-size: 0.82rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.6rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.spell-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.6;
}

.spell-desc p {
  margin-bottom: 0.6rem;
}

.spell-desc p:last-child {
  margin-bottom: 0;
}

.desc-heading {
  display: block;
  font-weight: 700;
  color: var(--gold-primary);
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
}

.spell-xartor-note {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(229, 185, 76, 0.08);
  border-left: 3px solid var(--gold-primary);
  border-radius: 4px;
  font-size: 0.82rem;
  color: #fef08a;
  line-height: 1.5;
}

.spell-xartor-note.banned {
  background: rgba(239, 68, 68, 0.12);
  border-left-color: #ef4444;
  color: #fca5a5;
}

.spell-xartor-note .note-title {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

/* QUICK CONDITIONS CARDS */
.quick-conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.condition-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
}

.condition-card h3 {
  font-family: var(--font-serif);
  color: var(--gold-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(229, 185, 76, 0.2);
  padding-bottom: 0.25rem;
}

.condition-card ul {
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.condition-card li {
  margin-bottom: 0.4rem;
}

/* SPELLS PAGINATION BAR */
.spells-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.page-size-selector select {
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  color: var(--gold-primary);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.page-size-selector select:focus {
  border-color: var(--gold-primary);
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  text-align: center;
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  background: rgba(229, 185, 76, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.page-btn.active {
  background: var(--gold-primary);
  color: #0d121f;
  border-color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(229, 185, 76, 0.35);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border-subtle);
}

.page-ellipsis {
  color: var(--text-muted);
  padding: 0 0.35rem;
  font-size: 0.9rem;
  user-select: none;
}
