.spellbook { background: #131a17; }
.mast [aria-current] { color: var(--brass); text-decoration: underline; text-underline-offset: .45em; }
.book-cover { overflow: hidden; border-bottom: 1px solid #ac936044; background: #202821; }
.cover-layout { display: grid; grid-template-columns: 1fr 1.28fr; align-items: center; }
.cover-title { padding-block: clamp(2.4rem, 5vw, 5rem); }
.book-name, .school-subtitle, #filters label { color: var(--brass); font-size: .72rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
.book-cover h1 { font: normal clamp(4rem, 7.4vw, 7rem)/1.05 Georgia, serif; letter-spacing: -.055em; margin: .22rem 0 .6rem; }
.book-intro, .rules, .spell details p { color: #d2d5c8; }
.cover-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; align-self: stretch; transform: skewX(-9deg); border-inline: 1px solid #9b8254; padding-inline: .4rem; background: #141b17; }
.cover-art img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.book-body { padding-block: 2rem 4rem; }
#filters { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 1rem; }
#filters input, #filters select { width: 100%; min-width: 0; height: 44px; display: block; margin-top: .35rem; border: 1px solid #656e60; border-radius: 3px; background: #202821; color: var(--paper); padding: .45rem .7rem; font: 1rem "Segoe UI", sans-serif; }
#filters input::placeholder { color: #acb3a4; }
.result-line { display: flex; align-items: center; min-height: 2.7rem; gap: .8rem; color: var(--muted); font-size: .85rem; }
#clear { border: 0; padding: .25rem 0; color: var(--brass); text-decoration: underline; }
.school { margin-top: 1.8rem; --accent: #e6be78; }
.school[data-school="living-current"] { --accent: #b2cc8e; }
.school[data-school="signal-resonance"] { --accent: #c5a4e3; }
.school[data-school="innate"] { --accent: #9cc8c5; }
.school header { padding-bottom: .8rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1.1rem; border-bottom: 1px solid #a5a88b50; }
.school header h2 { font: normal clamp(2rem, 3.6vw, 3rem)/1.05 Georgia, serif; letter-spacing: -.045em; }
.school-subtitle { color: var(--accent); }
.spell-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; margin-top: 1rem; }
.spell { min-width: 0; padding: 1rem; border: 1px solid #727c683f; background: #1b231e; }
.spell-head { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; gap: .9rem; }
.spell-head img { width: 100%; height: auto; border: 1px solid #a5a88b55; border-radius: 3px; }
.spell h3 { font: normal 1.65rem/1.12 Georgia, serif; margin: .25rem 0; }
.spell-kind { color: var(--accent); font-size: .76rem; }
.spell-cost { font-size: .84rem; color: var(--muted); }
.rules, .limits { margin-top: .85rem; line-height: 1.5; font-size: .95rem; }
.limits { color: #becbb9; }
.spell summary { cursor: pointer; color: var(--accent); margin-top: .75rem; font-size: .86rem; }
.spell details p { margin-top: .35rem; font-size: .9rem; }
@media (max-width: 800px) {
  #filters { grid-template-columns: 1fr 1fr; }
  .cover-layout { grid-template-columns: 1.1fr 1fr; }
}
@media (max-width: 570px) {
  .spellbook .mast-inner { flex-direction: column; align-items: flex-start; padding-block: .7rem; gap: .25rem; }
  .spellbook nav { column-gap: 1.2rem; }
  .spellbook nav a { padding-block: .35rem; }
  .cover-layout { display: block; }
  .cover-title { padding-block: 1.75rem 1rem; }
  .cover-art { height: 88px; margin: 0 .5rem; }
  #filters { gap: .7rem; }
  #filters input, #filters select { padding-inline: .35rem; font-size: .95rem; }
  .book-body { padding-top: 1.2rem; }
}
