.r-spell-directory,
.r-spell-detail,
.r-spell-not-found {
  --spell-navy: #07192b;
  --spell-navy-soft: #0b2944;
  --spell-gold: #d6a64f;
  --spell-gold-light: #f0d18a;
  --spell-border: rgba(105, 75, 39, 0.24);
  --spell-paper: rgba(255, 250, 240, 0.82);
  --spell-muted: #6d6257;
  display: grid;
  width: 100%;
  min-width: 0;
  gap: clamp(0.9rem, 2vw, 1.25rem);
  color: var(--r-ink, #372d25);
  font-family: var(--r-font-ui, Arial, sans-serif);
}

.r-spell-directory *,
.r-spell-directory *::before,
.r-spell-directory *::after,
.r-spell-detail *,
.r-spell-detail *::before,
.r-spell-detail *::after,
.r-spell-not-found *,
.r-spell-not-found *::before,
.r-spell-not-found *::after {
  box-sizing: border-box;
}

.r-spell-directory [hidden],
.r-spell-detail [hidden],
.r-spell-not-found [hidden] {
  display: none !important;
}

.r-spell-eyebrow {
  display: block;
  color: var(--spell-gold);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  line-height: 1.35;
  text-transform: uppercase;
}

.r-spell-directory__hero,
.r-spell-detail__hero {
  position: relative;
  isolation: isolate;
  min-width: 0;
  border: 1px solid rgba(214, 166, 79, 0.55);
  border-radius: var(--r-radius-lg, 14px);
  overflow: hidden;
  color: #fff8e8;
  background:
    radial-gradient(circle at 88% 12%, rgba(240, 209, 138, 0.2), transparent 13rem),
    linear-gradient(135deg, #04111f, var(--spell-navy-soft));
  box-shadow: 0 16px 34px rgba(3, 10, 19, 0.2);
}

.r-spell-directory__hero::after,
.r-spell-detail__hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -4rem;
  bottom: -7rem;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(240, 209, 138, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(240, 209, 138, 0.035), 0 0 0 4rem rgba(240, 209, 138, 0.02);
}

.r-spell-directory__hero {
  display: flex;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.r-spell-directory__hero > div:first-child {
  min-width: 0;
  max-width: 42rem;
}

.r-spell-directory__hero h1,
.r-spell-detail__identity h1,
.r-spell-not-found h1 {
  margin: 0.2rem 0 0;
  font-family: var(--r-font-display, Georgia, serif);
  line-height: 1.08;
}

.r-spell-directory__hero h1 {
  color: #fff8e8;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.r-spell-directory__hero p {
  max-width: 38rem;
  margin: 0.55rem 0 0;
  color: rgba(255, 248, 232, 0.73);
  font-size: 0.9rem;
  line-height: 1.55;
}

.r-spell-directory__total {
  display: grid;
  min-width: 7rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(240, 209, 138, 0.36);
  border-radius: var(--r-radius-md, 10px);
  place-items: center;
  background: rgba(2, 10, 19, 0.42);
}

.r-spell-directory__total strong {
  color: var(--spell-gold-light);
  font: 700 clamp(1.7rem, 4vw, 2.3rem)/1 var(--r-font-status, Georgia, serif);
}

.r-spell-directory__total span {
  margin-top: 0.25rem;
  color: rgba(255, 248, 232, 0.7);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.r-spell-filters,
.r-spell-results,
.r-spell-section,
.r-spell-not-found {
  min-width: 0;
  border: 1px solid var(--spell-border);
  border-radius: var(--r-radius-lg, 14px);
  background: var(--spell-paper);
  box-shadow: var(--r-shadow-card, 0 8px 22px rgba(43, 29, 17, 0.11));
}

.r-spell-filters {
  display: grid;
  padding: clamp(0.85rem, 2vw, 1.1rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 0.75rem;
}

.r-spell-filter {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
}

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

.r-spell-filter label,
.r-spell-instructor-search label,
.r-spell-not-found label {
  color: var(--r-ink-soft, #5f544a);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.r-spell-search-control,
.r-spell-select-control,
.r-spell-instructor-search > div,
.r-spell-not-found form > div {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.r-spell-search-control > i,
.r-spell-instructor-search > div > i,
.r-spell-not-found form > div > i {
  position: absolute;
  z-index: 1;
  left: 0.85rem;
  color: #9a681d;
  pointer-events: none;
}

.r-spell-filter input,
.r-spell-filter select,
.r-spell-instructor-search input,
.r-spell-not-found input {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  border: 1px solid rgba(105, 83, 61, 0.36);
  border-radius: var(--r-radius-sm, 8px);
  color: var(--r-ink, #372d25);
  background: #fffdf8;
  box-shadow: inset 0 1px 2px rgba(47, 33, 21, 0.06);
  font: 700 0.78rem/1 var(--r-font-ui, Arial, sans-serif);
}

.r-spell-filter input,
.r-spell-instructor-search input,
.r-spell-not-found input {
  padding: 0 2.65rem 0 2.4rem;
}

.r-spell-filter select {
  padding: 0 2.4rem 0 0.75rem;
  appearance: none;
  cursor: pointer;
}

.r-spell-filter input:focus,
.r-spell-filter select:focus,
.r-spell-instructor-search input:focus,
.r-spell-not-found input:focus {
  border-color: #b98132;
  outline: 2px solid rgba(185, 129, 50, 0.2);
  outline-offset: 1px;
  background: #fff;
}

.r-spell-search-control button {
  position: absolute;
  z-index: 2;
  right: 0;
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: var(--r-ink-soft, #5f544a);
  background: transparent;
  cursor: pointer;
}

.r-spell-search-control button:hover,
.r-spell-search-control button:focus-visible {
  color: var(--r-ink, #372d25);
  background: rgba(214, 166, 79, 0.17);
}

.r-spell-select-control > i {
  position: absolute;
  right: 0.8rem;
  color: #9a681d;
  pointer-events: none;
}

.r-spell-filters__actions {
  display: flex;
  min-width: 0;
  grid-column: span 2;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.r-spell-button {
  display: inline-flex;
  min-height: 44px;
  margin: 0;
  padding: 0.55rem 1rem;
  border: 1px solid #b77a24;
  border-radius: var(--r-radius-sm, 8px);
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #24180d;
  background: linear-gradient(180deg, #f2d287, #dda94e);
  box-shadow: 0 5px 12px rgba(139, 90, 29, 0.19);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.r-spell-button:hover,
.r-spell-button:focus-visible {
  color: #24180d;
  background: linear-gradient(180deg, #f8dda0, #e4b45e);
  text-decoration: none;
  transform: translateY(-1px);
}

.r-spell-button--secondary {
  border-color: rgba(105, 83, 61, 0.36);
  color: var(--r-ink, #372d25);
  background: #fffaf0;
  box-shadow: none;
}

.r-spell-filter-reset {
  display: inline-flex;
  min-height: 44px;
  padding: 0.45rem;
  align-items: center;
  gap: 0.4rem;
  color: #765224;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.r-spell-filter-reset:hover,
.r-spell-filter-reset:focus-visible {
  color: #4e310e;
  text-decoration: underline;
}

.r-spell-directory.is-enhanced .r-spell-filter-submit {
  display: none;
}

.r-spell-results {
  display: grid;
  padding: clamp(0.75rem, 2vw, 1rem);
  gap: 0.75rem;
}

.r-spell-results__header,
.r-spell-section__header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.r-spell-results__header {
  padding: 0.1rem 0.2rem;
}

.r-spell-results__header h2,
.r-spell-section__header h2 {
  margin: 0.15rem 0 0;
  color: var(--r-ink, #372d25);
  font-family: var(--r-font-display, Georgia, serif);
}

.r-spell-results__header h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.r-spell-results__header output {
  flex: 0 0 auto;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(185, 129, 50, 0.3);
  border-radius: 999px;
  color: #6b4718;
  background: rgba(214, 166, 79, 0.13);
  font-size: 0.7rem;
  font-weight: 850;
}

.r-spell-table-region,
.r-spell-offer-table-region {
  max-width: 100%;
  border: 1px solid var(--spell-border);
  border-radius: var(--r-radius-md, 10px);
  overflow-x: auto;
  background: #fffdf8;
  scrollbar-color: #c59645 #eee0c7;
  scrollbar-width: thin;
}

.r-spell-table-region:focus-visible,
.r-spell-offer-table-region:focus-visible {
  outline: 2px solid #b98132;
  outline-offset: 2px;
}

.r-spell-table,
.r-spell-offer-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  color: var(--r-ink, #372d25);
  background: transparent;
}

.r-spell-table {
  min-width: 49rem;
}

.r-spell-table caption,
.r-spell-offer-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.r-spell-table thead,
.r-spell-offer-table thead {
  color: #fff8e8;
  background: var(--spell-navy);
}

.r-spell-table th,
.r-spell-table td,
.r-spell-offer-table th,
.r-spell-offer-table td {
  border: 0;
  border-bottom: 1px solid rgba(105, 75, 39, 0.16);
  box-shadow: none;
  text-align: left;
  vertical-align: middle;
}

.r-spell-table thead th,
.r-spell-offer-table thead th {
  padding: 0.75rem 0.65rem;
  color: #fff8e8;
  background: transparent;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.r-spell-table tbody th,
.r-spell-table tbody td,
.r-spell-offer-table tbody th,
.r-spell-offer-table tbody td {
  padding: 0.58rem 0.65rem;
  color: var(--r-ink, #372d25);
  background: transparent;
  font-size: 0.74rem;
  line-height: 1.4;
}

.r-spell-table tbody tr:nth-child(odd),
.r-spell-offer-table tbody tr:nth-child(odd) {
  background: rgba(235, 217, 187, 0.46);
}

.r-spell-table tbody tr:hover,
.r-spell-offer-table tbody tr:hover {
  background: rgba(214, 166, 79, 0.18);
}

.r-spell-identity {
  display: flex;
  min-width: 12rem;
  align-items: center;
  gap: 0.65rem;
  color: #1f527a;
  text-decoration: none;
}

.r-spell-identity__icon,
.r-spell-detail__portrait {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  border: 1px solid rgba(240, 209, 138, 0.32);
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(214, 166, 79, 0.13), transparent 58%),
    linear-gradient(150deg, #0b2944, #04111f);
}

.r-spell-identity__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9px;
}

.r-spell-identity__icon img,
.r-spell-detail__portrait img {
  position: relative;
  z-index: 2;
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  image-rendering: pixelated;
}

.r-spell-image-fallback {
  position: absolute;
  z-index: 1;
  display: grid;
  color: var(--spell-gold-light);
  place-items: center;
}

.r-spell-identity__icon.is-missing img,
.r-spell-detail__portrait.is-missing img {
  display: none;
}

.r-spell-identity > span:last-child {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.r-spell-identity strong {
  font-size: 0.79rem;
}

.r-spell-identity code {
  color: #786858;
  font: 650 0.65rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: normal;
}

.r-spell-identity:hover strong,
.r-spell-identity:focus-visible strong {
  color: #7a4e12;
  text-decoration: underline;
}

.r-spell-type,
.r-spell-access,
.r-spell-detail__tags > span {
  display: inline-flex;
  width: fit-content;
  min-height: 1.65rem;
  padding: 0.23rem 0.48rem;
  border: 1px solid rgba(105, 83, 61, 0.24);
  border-radius: 999px;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 850;
  white-space: nowrap;
}

.r-spell-type--instant {
  border-color: rgba(74, 119, 161, 0.34);
  color: #315f86;
  background: #e8f1f8;
}

.r-spell-type--rune {
  border-color: rgba(118, 77, 145, 0.3);
  color: #684180;
  background: #f2eafa;
}

.r-spell-type--conjuring {
  border-color: rgba(154, 104, 29, 0.3);
  color: #805410;
  background: #fbf0d8;
}

.r-spell-access--premium {
  border-color: rgba(180, 121, 30, 0.31);
  color: #7b4d0c;
  background: #fff0cc;
}

.r-spell-access--free {
  border-color: rgba(62, 127, 82, 0.27);
  color: #2d7041;
  background: #e8f5eb;
}

.r-spell-vocations {
  display: block;
  min-width: 7rem;
  max-width: 12rem;
  color: var(--spell-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.r-spell-table__action {
  text-align: right !important;
}

.r-spell-table__action a {
  display: inline-flex;
  min-height: 44px;
  padding: 0.4rem 0.55rem;
  align-items: center;
  gap: 0.35rem;
  color: #7a4e12;
  font-size: 0.66rem;
  font-weight: 850;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.r-spell-table__action a:hover,
.r-spell-table__action a:focus-visible {
  text-decoration: underline;
}

.r-spell-empty,
.r-spell-empty-note {
  display: grid;
  padding: 1.3rem;
  place-items: center;
  color: var(--spell-muted);
  text-align: center;
}

.r-spell-empty > span,
.r-spell-empty-note > i {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.55rem;
  border: 1px solid rgba(185, 129, 50, 0.3);
  border-radius: 50%;
  place-items: center;
  color: #9a681d;
  background: rgba(214, 166, 79, 0.14);
}

.r-spell-empty strong {
  color: var(--r-ink, #372d25);
}

.r-spell-empty p,
.r-spell-empty-note p {
  margin: 0.3rem 0 0.8rem;
}

.r-spell-noscript {
  margin: 0;
  padding: 0.75rem;
  border-left: 3px solid #b98132;
  color: var(--spell-muted);
  background: rgba(214, 166, 79, 0.12);
  font-size: 0.75rem;
}

/* Spell details */
.r-spell-detail__navigation {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.r-spell-detail__navigation a {
  display: inline-flex;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  align-items: center;
  gap: 0.4rem;
  color: #6f4816;
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: none;
}

.r-spell-detail__navigation a:hover,
.r-spell-detail__navigation a:focus-visible {
  color: #432b0d;
  text-decoration: underline;
}

.r-spell-detail__siblings {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.25rem;
}

.r-spell-detail__siblings a {
  max-width: 13rem;
}

.r-spell-detail__siblings span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r-spell-detail__hero {
  display: grid;
  padding: clamp(1.15rem, 3vw, 1.8rem);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 1.6rem);
}

.r-spell-detail__portrait {
  width: clamp(6.5rem, 16vw, 8.5rem);
  aspect-ratio: 1;
  border-radius: var(--r-radius-lg, 14px);
}

.r-spell-detail__portrait .r-spell-image-fallback {
  font-size: 2rem;
}

.r-spell-detail__identity {
  min-width: 0;
}

.r-spell-detail__identity h1 {
  color: #fff8e8;
  font-size: clamp(1.75rem, 5vw, 2.7rem);
}

.r-spell-detail__tags {
  display: flex;
  margin-top: 0.65rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.r-spell-detail__tags > span:not(.r-spell-type):not(.r-spell-access) {
  border-color: rgba(240, 209, 138, 0.25);
  color: rgba(255, 248, 232, 0.85);
  background: rgba(2, 10, 19, 0.32);
}

.r-spell-incantation {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.9rem;
  padding: 0.45rem 0.5rem 0.45rem 0.7rem;
  border: 1px solid rgba(240, 209, 138, 0.27);
  border-radius: var(--r-radius-md, 10px);
  align-items: center;
  gap: 0.65rem;
  background: rgba(2, 10, 19, 0.48);
}

.r-spell-incantation > span {
  color: rgba(255, 248, 232, 0.57);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.r-spell-incantation code {
  min-width: 0;
  color: var(--spell-gold-light);
  font: 750 0.86rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}

.r-spell-incantation button {
  display: inline-flex;
  min-height: 44px;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(240, 209, 138, 0.25);
  border-radius: 7px;
  align-items: center;
  gap: 0.35rem;
  color: #fff8e8;
  background: rgba(240, 209, 138, 0.08);
  font-size: 0.64rem;
  font-weight: 800;
  cursor: pointer;
}

.r-spell-incantation button:hover,
.r-spell-incantation button:focus-visible,
.r-spell-incantation button.is-copied {
  border-color: rgba(240, 209, 138, 0.55);
  background: rgba(240, 209, 138, 0.18);
}

.r-spell-detail__primary-stats {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.r-spell-detail__primary-stats > div {
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--spell-border);
  border-radius: var(--r-radius-md, 10px);
  background: rgba(255, 250, 240, 0.84);
  box-shadow: var(--r-shadow-card, 0 8px 22px rgba(43, 29, 17, 0.1));
}

.r-spell-detail__primary-stats dt {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--spell-muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.r-spell-detail__primary-stats dt i {
  color: #a66c18;
}

.r-spell-detail__primary-stats dd {
  margin: 0.35rem 0 0;
  color: var(--r-ink, #372d25);
  font: 750 clamp(1.15rem, 3vw, 1.55rem)/1.1 var(--r-font-status, Georgia, serif);
}

.r-spell-detail__primary-stats dd small {
  color: var(--spell-muted);
  font: 750 0.58rem/1 var(--r-font-ui, Arial, sans-serif);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.r-spell-detail__layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.85fr);
  align-items: start;
  gap: 1rem;
}

.r-spell-section {
  display: grid;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  align-content: start;
  gap: 0.9rem;
}

.r-spell-section__header > i {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  border: 1px solid rgba(185, 129, 50, 0.25);
  border-radius: 50%;
  place-items: center;
  color: #9a681d;
  background: rgba(214, 166, 79, 0.13);
}

.r-spell-section__header h2 {
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.r-spell-section--description > p {
  margin: 0;
  color: #54483e;
  font-size: 0.82rem;
  line-height: 1.68;
}

.r-spell-empty-copy {
  color: var(--spell-muted) !important;
  font-style: italic;
}

.r-spell-vocation-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.r-spell-vocation-list li {
  display: inline-flex;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(65, 112, 151, 0.25);
  border-radius: 999px;
  align-items: center;
  gap: 0.3rem;
  color: #315f86;
  background: #eaf2f8;
  font-size: 0.66rem;
  font-weight: 800;
}

.r-spell-property-list {
  display: grid;
  margin: 0;
  border-top: 1px solid rgba(105, 75, 39, 0.16);
}

.r-spell-property-list > div {
  display: flex;
  min-width: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(105, 75, 39, 0.13);
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.r-spell-property-list dt {
  color: var(--spell-muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.r-spell-property-list dd {
  margin: 0;
  color: var(--r-ink, #372d25);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: right;
}

.r-spell-property-list dd.is-negative {
  color: #8b2c28;
}

.r-spell-rune__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, auto);
  align-items: center;
  gap: 1rem;
}

.r-spell-rune__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.r-spell-rune__facts > div {
  display: grid;
  padding: 0.7rem;
  border: 1px solid rgba(105, 75, 39, 0.18);
  border-radius: var(--r-radius-sm, 8px);
  gap: 0.2rem;
  background: rgba(235, 217, 187, 0.3);
}

.r-spell-rune__facts span {
  color: var(--spell-muted);
  font-size: 0.62rem;
  font-weight: 750;
}

.r-spell-rune__facts strong {
  color: var(--r-ink, #372d25);
  font-size: 1rem;
}

.r-spell-rune__item-link {
  display: flex;
  min-width: 13rem;
  min-height: 4rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(185, 129, 50, 0.32);
  border-radius: var(--r-radius-md, 10px);
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: #6d4613;
  background: #fff6e1;
  text-decoration: none;
}

.r-spell-rune__item-link span {
  display: grid;
  gap: 0.15rem;
}

.r-spell-rune__item-link small {
  color: var(--spell-muted);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.r-spell-rune__item-link:hover,
.r-spell-rune__item-link:focus-visible {
  border-color: #b98132;
  color: #432b0d;
  transform: translateY(-1px);
}

.r-spell-instructors__header p {
  margin: 0.35rem 0 0;
  color: var(--spell-muted);
  font-size: 0.74rem;
}

.r-spell-section-count {
  display: grid;
  min-width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(185, 129, 50, 0.32);
  border-radius: 50%;
  place-items: center;
  color: #72490e;
  background: #f1cd83;
  font-size: 0.75rem;
  font-weight: 900;
}

.r-spell-instructor-search {
  display: grid;
  padding: 0.75rem;
  border: 1px solid rgba(105, 75, 39, 0.17);
  border-radius: var(--r-radius-md, 10px);
  grid-template-columns: minmax(12rem, 1fr) auto;
  align-items: end;
  gap: 0.35rem 0.75rem;
  background: rgba(235, 217, 187, 0.24);
}

.r-spell-instructor-search label {
  grid-column: 1 / -1;
}

.r-spell-instructor-search output {
  padding-bottom: 0.75rem;
  color: var(--spell-muted);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.r-spell-offer-table tbody tr.r-spell-offer-row--best-price {
  background: #edf8f0;
}

.r-spell-offer-row--best-price > :first-child {
  box-shadow: inset 3px 0 #5a9d70;
}

.r-spell-offer-table th a {
  color: #1f527a;
  font-weight: 850;
  text-decoration: none;
}

.r-spell-offer-table th a:hover,
.r-spell-offer-table th a:focus-visible {
  color: #7a4e12;
  text-decoration: underline;
}

.r-spell-offer-professions {
  color: var(--spell-muted);
  font-size: 0.68rem;
}

.r-spell-offer-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.r-spell-offer-price strong {
  color: #4e4338;
  white-space: nowrap;
}

.r-spell-offer-price > span {
  display: inline-flex;
  padding: 0.2rem 0.38rem;
  border: 1px solid #9fc9aa;
  border-radius: 999px;
  align-items: center;
  gap: 0.24rem;
  color: #1f5d34;
  background: #d7eedc;
  font-size: 0.57rem;
  font-weight: 850;
  white-space: nowrap;
}

.r-spell-detail__footer {
  display: flex;
  justify-content: center;
}

/* Not found */
.r-spell-not-found {
  min-height: 25rem;
  padding: clamp(1.3rem, 4vw, 2.4rem);
  place-items: center;
  align-content: center;
  text-align: center;
}

.r-spell-not-found__icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  border: 1px solid rgba(185, 129, 50, 0.35);
  border-radius: 50%;
  place-items: center;
  color: #9a681d;
  background: rgba(214, 166, 79, 0.14);
  font-size: 1.4rem;
}

.r-spell-not-found h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.r-spell-not-found p {
  max-width: 34rem;
  margin: 0.55rem auto 0;
  color: var(--spell-muted);
  line-height: 1.55;
}

.r-spell-not-found form {
  display: grid;
  width: min(100%, 36rem);
  gap: 0.4rem;
  text-align: left;
}

.r-spell-not-found form > div {
  gap: 0.5rem;
}

.r-spell-not-found form .r-spell-button {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .r-spell-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .r-spell-filters__actions {
    grid-column: auto;
  }

  .r-spell-detail__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .r-spell-directory__hero {
    align-items: stretch;
  }

  .r-spell-directory__total {
    min-width: 5.5rem;
  }

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

  .r-spell-filter--search,
  .r-spell-filters__actions {
    grid-column: 1 / -1;
  }

  .r-spell-table-region,
  .r-spell-offer-table-region {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  .r-spell-table,
  .r-spell-offer-table,
  .r-spell-table tbody,
  .r-spell-offer-table tbody {
    display: block;
    min-width: 0;
  }

  .r-spell-table thead,
  .r-spell-offer-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .r-spell-table tbody,
  .r-spell-offer-table tbody {
    display: grid;
    gap: 0.65rem;
  }

  .r-spell-table tbody tr,
  .r-spell-offer-table tbody tr {
    display: grid;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--spell-border);
    border-radius: var(--r-radius-md, 10px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.85rem;
    background: #fffdf8;
    box-shadow: 0 5px 13px rgba(57, 39, 22, 0.08);
  }

  .r-spell-table tbody tr:nth-child(odd),
  .r-spell-offer-table tbody tr:nth-child(odd),
  .r-spell-table tbody tr:hover,
  .r-spell-offer-table tbody tr:hover {
    background: #fffdf8;
  }

  .r-spell-table tbody th,
  .r-spell-table tbody td,
  .r-spell-offer-table tbody th,
  .r-spell-offer-table tbody td {
    display: grid;
    min-width: 0;
    padding: 0;
    border: 0;
    gap: 0.18rem;
  }

  .r-spell-table tbody th::before,
  .r-spell-table tbody td::before,
  .r-spell-offer-table tbody th::before,
  .r-spell-offer-table tbody td::before {
    content: attr(data-label);
    color: var(--spell-muted);
    font-size: 0.56rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .r-spell-table tbody th:first-child,
  .r-spell-offer-table tbody th:first-child {
    grid-column: 1 / -1;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(105, 75, 39, 0.14);
  }

  .r-spell-table tbody th:first-child::before,
  .r-spell-offer-table tbody th:first-child::before {
    display: none;
  }

  .r-spell-table__action {
    display: flex !important;
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .r-spell-table__action::before {
    display: none;
  }

  .r-spell-table__action a {
    min-height: 40px;
  }

  .r-spell-vocations {
    max-width: none;
  }

  .r-spell-detail__hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .r-spell-detail__portrait {
    width: 6.5rem;
  }

  .r-spell-rune__content {
    grid-template-columns: 1fr;
  }

  .r-spell-rune__item-link {
    min-width: 0;
  }

  .r-spell-offer-table tbody tr.r-spell-offer-row--best-price {
    border-color: #8fbd9b;
    background: #edf8f0;
    box-shadow: inset 3px 0 #5a9d70;
  }

  .r-spell-offer-row--best-price > :first-child {
    box-shadow: none;
  }
}

@media (max-width: 540px) {
  .r-spell-directory,
  .r-spell-detail,
  .r-spell-not-found {
    gap: 0.75rem;
  }

  .r-spell-directory__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1rem;
    gap: 0.75rem;
  }

  .r-spell-directory__hero p {
    grid-column: 1 / -1;
    font-size: 0.78rem;
  }

  .r-spell-directory__total {
    min-width: 4.8rem;
    padding: 0.65rem;
  }

  .r-spell-filters {
    padding: 0.75rem;
    grid-template-columns: 1fr;
  }

  .r-spell-filter--search,
  .r-spell-filters__actions {
    grid-column: auto;
  }

  .r-spell-filters__actions {
    justify-content: stretch;
  }

  .r-spell-filters__actions > * {
    flex: 1 1 0;
  }

  .r-spell-results {
    padding: 0.6rem;
  }

  .r-spell-results__header {
    align-items: flex-end;
  }

  .r-spell-results__header output {
    max-width: 48%;
    text-align: center;
  }

  .r-spell-detail__navigation {
    align-items: stretch;
  }

  .r-spell-detail__siblings {
    justify-content: flex-end;
  }

  .r-spell-detail__siblings a {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .r-spell-detail__siblings span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .r-spell-detail__hero {
    padding: 1rem;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .r-spell-detail__portrait {
    width: 6.5rem;
    margin: 0 auto;
  }

  .r-spell-detail__tags {
    justify-content: center;
  }

  .r-spell-incantation {
    width: 100%;
    justify-content: center;
  }

  .r-spell-incantation > span {
    display: none;
  }

  .r-spell-detail__primary-stats {
    grid-template-columns: 1fr;
  }

  .r-spell-detail__primary-stats > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .r-spell-detail__primary-stats dd {
    margin: 0;
    text-align: right;
  }

  .r-spell-section {
    padding: 0.9rem;
  }

  .r-spell-rune__facts {
    grid-template-columns: 1fr;
  }

  .r-spell-instructor-search {
    grid-template-columns: 1fr;
  }

  .r-spell-instructor-search label {
    grid-column: auto;
  }

  .r-spell-instructor-search output {
    padding: 0;
  }

  .r-spell-offer-table tbody tr {
    grid-template-columns: 1fr;
  }

  .r-spell-offer-table tbody th:first-child {
    grid-column: auto;
  }

  .r-spell-offer-price {
    justify-content: flex-start;
  }

  .r-spell-not-found form > div {
    display: grid;
  }

  .r-spell-not-found form > div > i {
    top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .r-spell-button,
  .r-spell-rune__item-link {
    transition: none;
  }
}
