.rw-spells { color: #3b3025; font: 12px/1.5 Verdana, Arial, sans-serif; }
.rw-spells * { box-sizing: border-box; }
.rw-spells-hero { display: flex; align-items: center; gap: 16px; padding: 24px 20px; border: 1px solid #77633f; background: radial-gradient(ellipse at top right, #647052 0, transparent 65%), linear-gradient(120deg, #212e28, #374537); color: #f7edd7; box-shadow: inset 0 0 0 3px #ffffff0a; }
.rw-spells-sigil { display: grid; place-items: center; flex: 0 0 58px; height: 58px; border: 1px solid #bca069; border-radius: 50%; color: #f6d58d; font: 46px Georgia, serif; background: #ffffff08; }
.rw-spells .rw-spells-kicker { margin: 0 0 6px; color: #dfca9a; font-size: 9px; font-weight: bold; letter-spacing: .17em; }
.Content .BoxContent .rw-spells h1, html[data-relaxera-theme]:not([data-relaxera-theme="classic"]) .Content .BoxContent .rw-spells h1 { margin: 0 0 7px; color: #fff0cc; font: bold 29px/1.15 Georgia, serif; text-shadow: 0 2px 2px #0004; }
.rw-spells-hero p:last-child { margin: 0; max-width: 420px; color: #e1e2cf; font-size: 11px; }
.rw-spells-total { margin-left: auto; padding-left: 18px; border-left: 1px solid #d2c08d55; text-align: center; flex-shrink: 0; }
.rw-spells-total strong { display: block; color: #f5d68f; font: 36px/1.1 Georgia, serif; }
.rw-spells-total span { font-size: 9px; color: #e5dfcb; }
.rw-spells-controls { margin-top: 14px; padding: 15px; border: 1px solid #b9a780; background: linear-gradient(#f7efde, #eadebf); }
.rw-spells-filters { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 1fr) minmax(130px, 1fr); gap: 12px; }
.rw-spells-filters label { display: flex; flex-direction: column; gap: 5px; color: #514127; font-size: 10px; font-weight: bold; }
.rw-spells-filters input, .rw-spells-filters select { width: 100%; height: 36px; padding: 6px 9px; margin: 0; border: 1px solid #b8a782; border-radius: 2px; color: #352f25; background: #fffaf0; font: 11px Verdana, Arial, sans-serif; }
.rw-spells :is(input, select, button, summary):focus-visible { outline: 2px solid #315d70; outline-offset: 3px; }
.rw-spells-types { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.rw-spells-types button, .rw-spells-empty button { padding: 7px 10px; border: 1px solid #ac976d; border-radius: 3px; color: #574329; background: #f7f0df; cursor: pointer; font: bold 11px Verdana, Arial, sans-serif; }
.rw-spells-types button:hover { background: #e4d5b3; }
#rw-spell-library .rw-spells-types button[aria-pressed="false"] { color: #574329 !important; background: #f7f0df !important; }
#rw-spell-library .rw-spells-types button[aria-pressed="true"] { border-color: #354635; color: #fff3d6 !important; background: #3b4e3b !important; box-shadow: inset 0 -3px 0 #cfb275; }
.rw-spells-types button span { margin-left: 6px; opacity: .75; font-size: 10px; }
.rw-spells-list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 20px 0 9px; }
.Content .BoxContent .rw-spells h2 { margin: 0; color: #4e3b24; font: bold 21px Georgia, serif; }
.rw-spells-list-heading > span { color: #74654c; font-size: 10px; text-align: right; }
.rw-spells-table-wrap { overflow-x: auto; border: 1px solid #aa956e; }
.rw-spells-table { width: 100%; border-collapse: collapse; border-spacing: 0; font-size: 11px; text-align: left; }
.rw-spells-table th { padding: 11px 10px; border-bottom: 2px solid #9d8355; color: #f9edcf; background: #444d39; font-size: 10px; white-space: nowrap; }
.rw-spells-table td { padding: 11px 10px; border-bottom: 1px solid #d4c4a2; vertical-align: top; }
.rw-spells-table tbody tr { background: #f6efdd; }
.rw-spells-table tbody tr:nth-child(even) { background: #ece1c9; }
.rw-spells-table tbody tr:hover { background: #e5d7b6; }
.rw-spells-name { width: 38%; min-width: 185px; }
.rw-spells-name summary { cursor: pointer; color: #76512a; }
.rw-spells-spell-name { color: #463521; font: bold 14px/1.35 Georgia, serif; }
.rw-spells-words { display: block; padding-left: 14px; margin-top: 3px; color: #83622e; font: italic 12px Georgia, serif; }
.rw-spells-number { font-variant-numeric: tabular-nums; font-weight: bold; color: #51422d; }
.rw-spells-mana { color: #3d6072; }
.rw-spells-badge { display: inline-block; border: 1px solid #b9c4a6; border-radius: 10px; padding: 2px 7px; color: #42563b; background: #e0e7d3; font-size: 9px; white-space: nowrap; }
.rw-spells-type-2 { border-color: #c6b393; color: #765129; background: #eee0c5; }
.rw-spells-type-3 { border-color: #b9adc8; color: #635075; background: #e8dfef; }
.rw-spells-vocations { font-size: 10px; color: #6c604d; }
.rw-spells-vocations span { display: block; }
.rw-spells-details { display: flex; flex-direction: column; gap: 6px; padding: 10px 0 0 14px; color: #68583c; font-size: 10px; }
.rw-spells-item { display: flex; align-items: center; gap: 6px; }
.rw-spells-item img { object-fit: contain; image-rendering: pixelated; }
.rw-spells-empty { padding: 30px 15px; border: 1px solid #b9a780; border-top: 0; background: #f2e8d0; text-align: center; }
.rw-spells-empty strong { font: bold 19px Georgia, serif; }
.rw-spells [hidden] { display: none !important; }
.rw-spells-footnote { margin: 12px 0 0; color: #77674d; font-size: 10px; }
.rw-spells-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 700px) { .rw-spells-total { display: none; } .rw-spells-filters { grid-template-columns: 1fr 1fr; } .rw-spells-search { grid-column: 1 / -1; } .rw-spells-hero { padding: 18px 15px; } }

/* Compact grimoire: keep requirements available without large cards or tall vocation stacks. */
.rw-spells-hero{gap:10px;padding:10px 12px}.rw-spells-sigil{flex-basis:32px;height:32px;font-size:25px}.rw-spells .rw-spells-kicker{margin-bottom:2px;font-size:8px}
.Content .BoxContent .rw-spells h1,html[data-relaxera-theme]:not([data-relaxera-theme="classic"]) .Content .BoxContent .rw-spells h1{font-size:21px;margin-bottom:2px}.rw-spells-hero p:last-child{max-width:none;font-size:10px}.rw-spells-total strong{font-size:25px}.rw-spells-total{padding-left:12px}
.rw-spells-controls{margin-top:7px;padding:8px 10px}.rw-spells-filters{gap:8px;grid-template-columns:minmax(160px,1.6fr) minmax(120px,1fr) minmax(130px,1fr)}.rw-spells-filters label{gap:2px}.rw-spells-filters input,.rw-spells-filters select{height:29px;padding:3px 6px}
.rw-spells-types{margin-top:7px;gap:5px}.rw-spells-types button,.rw-spells-empty button{padding:4px 8px;font-size:10px}.rw-spells-list-heading{margin:10px 0 5px}.Content .BoxContent .rw-spells h2{font-size:16px}
.rw-spells-table th{padding:6px 8px}.rw-spells-table td{padding:6px 8px;vertical-align:middle}.rw-spells-spell-name{font-size:12px}.rw-spells-words{display:inline;margin-left:6px;padding:0;font-size:11px}.rw-spells-name{width:39%;min-width:185px}.rw-spells-vocations{font-size:10px;line-height:1.35;max-width:240px}.rw-spells-badge{padding:1px 5px;font-size:9px}.rw-spells-number small{font-size:10px;white-space:nowrap}.rw-spells-mana small{display:block;font-size:9px;font-weight:normal}.rw-spells-details{padding-top:6px;gap:4px}.rw-spells-empty{padding:16px 12px}.rw-spells-footnote{margin-top:7px}
@media(max-width:700px){.rw-spells-hero{padding:8px 10px}.rw-spells-sigil{display:none}.rw-spells-filters{grid-template-columns:1fr 1fr}.rw-spells-search{grid-column:1/-1}.rw-spells-words{display:block;margin-left:14px}.rw-spells-table td{padding:5px 6px}}

.rw-spells-name .rw-spells-spell-name { display:inline-block; padding:2px 0; text-decoration:underline; text-underline-offset:2px; }
.rw-spells-rune-label { font-size:10px; font-weight:normal; }
.rw-spells-name .rw-spells-words { display:block; margin-left:0; overflow-wrap:anywhere; }
.rw-spell-panel { margin-top:9px; padding:9px; border:1px solid #ac976d; background:#f3ead5; }
body .Content .BoxContent .rw-spell-panel h2 { margin:0 0 7px; }
.rw-spell-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(185px,100%),1fr)); gap:1px; margin:0; background:#d2c19a; }
.rw-spell-facts div { padding:5px 8px; background:#f7efdd; }
.rw-spell-facts dt { color:#6e5938; font-size:11px; }
.rw-spell-facts dd { margin:2px 0 0; font-weight:bold; }
.rw-spell-items { display:flex; flex-wrap:wrap; gap:6px 16px; padding:0; list-style:none; }
.rw-spell-items img { vertical-align:middle; image-rendering:pixelated; object-fit:contain; }
.rw-spell-teachers tbody th { border-bottom:1px solid #d4c4a2; background:transparent; color:#463521; }
.rw-spell-teachers tbody th small { display:block; font-weight:normal; }
.rw-spell-teachers :is(td,th) { vertical-align:top; }
@media(max-width:700px) {
    #rw-spell-library .rw-spells-vocations { display:none; }
    #rw-spell-library .rw-spells-name { min-width:95px; }
}
@media(max-width:480px) {
    #rw-spell-library .rw-spells-kind { display:none; }
    .rw-spell-teachers .rw-spells-table { min-width:420px; }
}

#rw-spell-library .rw-spells-hero {
  padding: 6px 9px;
  background: #344531;
}

.Content .BoxContent #rw-spell-library .rw-spells-hero h1 {
  margin: 0;
  color: #fff1ce;
  font-size: 18px;
}

#rw-spell-library .rw-spells-controls {
  margin-top: 4px;
  padding: 5px 7px;
  background: #e0cda8;
}

#rw-spell-library .rw-spells-filters {
  grid-template-columns: minmax(120px, 1.45fr) repeat(3, minmax(84px, 1fr));
  gap: 4px 6px;
}

#rw-spell-library .rw-spells-filters :is(input, select) {
  height: 27px;
  padding: 2px 4px;
}

#rw-spell-library .rw-spells-list-heading {
  margin: 5px 0 3px;
}

#rw-spell-library .rw-spells-table {
  line-height: 1.3;
}

#rw-spell-library .rw-spells-table th {
  padding: 5px 6px;
  background: #344531;
}

#rw-spell-library .rw-spells-table td {
  padding: 4px 6px;
}

#rw-spell-library .rw-spells-name {
  width: 36%;
  min-width: 112px;
}

#rw-spell-library .rw-spells-name .rw-spells-spell-name {
  display: inline;
  padding: 0;
  font-size: 12px;
}

#rw-spell-library .rw-spells-name .rw-spells-words {
  display: inline;
  margin-inline-start: 3px;
  color: #4e3d2b;
  font: 11px/1.3 Verdana, Arial, sans-serif;
}

@media (max-width: 620px) {
  #rw-spell-library .rw-spells-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #rw-spell-library .rw-spells-search {
    grid-column: 1 / -1;
  }

  #rw-spell-library .rw-spells-table :is(th, td) {
    padding-inline: 4px;
  }
}

#rw-spell-library .rw-spells-vocations {
  font-size: 11px;
  line-height: 1.25;
  color: #4e3d2b;
}

#rw-spell-library th.rw-spells-vocations {
  color: #f9edcf;
}


.rw-spell-page .rw-spell-rune-picture {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  height: 58px;
  border: 1px solid #b19a65;
  border-radius: 4px;
  background: #242e24;
}

.rw-spell-rune-picture img,
.rw-rune-variant img {
  object-fit: contain;
  image-rendering: pixelated;
}

.rw-rune-variant img {
  vertical-align: middle;
}

.rw-rune-supplies {
  margin: 8px 0 2px;
}

.rw-rune-supplies summary {
  cursor: pointer;
  font-weight: bold;
}

.rw-rune-supplies[open] summary {
  margin-bottom: 6px;
}

.rw-spell-teachers.rw-rune-shop .rw-spells-table {
  min-width: 0;
}

.rw-spell-npc-visuals {
  margin-top: 4px;
  font-size: 11px;
}

.rw-spell-npc-visuals summary {
  cursor: pointer;
  font-weight: normal;
}

.rw-spell-npc-pictures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(174px, 100%);
  gap: 4px;
  padding-top: 3px;
}

.rw-spell-npc-pictures a {
  min-width: 0;
  text-align: center;
}

.rw-spell-npc-pictures img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 4;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid #9d885a;
}

.rw-spell-npc-pictures span {
  display: block;
}
