/* Spell dossiers only: original descriptions remain untouched. */
.grimoire-detail-heading>p:last-of-type { display:none; }
.grimoire-detail-heading h1 { font-size:clamp(24px,3vw,36px); }
.spell-tools { display:flex;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap; }
.spell-tools .button { font-size:12px;min-height:44px; }
.spell-reading[aria-pressed="true"] { background:#174961;border-color:var(--cyan); }
.spell-dossier { --spell-accent:#78dfff; --spell-glow:120,223,255; padding:0;overflow:hidden;border:1px solid rgba(var(--spell-glow),.3);background:#071522;box-shadow:0 24px 70px #0005;animation:spell-reveal .45s ease-out both; }
.spell-dossier[data-school="abj"] { --spell-accent:#91c5ff;--spell-glow:145,197,255; }
.spell-dossier[data-school="con"] { --spell-accent:#c5a4ff;--spell-glow:197,164,255; }
.spell-dossier[data-school="div"] { --spell-accent:#f4d787;--spell-glow:244,215,135; }
.spell-dossier[data-school="enc"] { --spell-accent:#f2a9d6;--spell-glow:242,169,214; }
.spell-dossier[data-school="evo"] { --spell-accent:#ffb786;--spell-glow:255,183,134; }
.spell-dossier[data-school="ill"] { --spell-accent:#baaaff;--spell-glow:186,170,255; }
.spell-dossier[data-school="nec"] { --spell-accent:#99debd;--spell-glow:153,222,189; }
.spell-dossier[data-school="trs"] { --spell-accent:#8ae2dd;--spell-glow:138,226,221; }
.spell-dossier[data-school="uni"] { --spell-accent:#d1dcf1;--spell-glow:209,220,241; }
.spell-hero { position:relative;isolation:isolate;display:flex;align-items:center;gap:32px;padding:42px 36px;min-height:245px;background:radial-gradient(ellipse at 10% 50%,rgba(var(--spell-glow),.16),transparent 65%),linear-gradient(120deg,#102235,#081521); }
.spell-hero::before { content:"";position:absolute;inset:0;z-index:-1;background:repeating-linear-gradient(120deg,transparent 0 59px,rgba(var(--spell-glow),.035) 60px 61px);mask-image:linear-gradient(90deg,#000,transparent);pointer-events:none; }
.spell-hero::after { content:"";position:absolute;bottom:0;left:36px;right:36px;height:1px;background:linear-gradient(90deg,transparent,var(--spell-accent),transparent);opacity:.5; }
.spell-sigil { width:164px;height:164px;position:relative;display:grid;place-items:center;flex-shrink:0; }
.spell-sigil::before,.spell-sigil::after,.spell-orbit { content:"";position:absolute;border:1px solid rgba(var(--spell-glow),.4);border-radius:50%;inset:0;pointer-events:none; }
.spell-sigil::after { inset:9px;border-style:dashed;opacity:.45;transform:rotate(25deg); }
.spell-orbit { inset:-8px;border:2px solid transparent;border-top-color:var(--spell-accent);border-bottom-color:var(--spell-accent);transform:rotate(-30deg); }
.spell-sigil img { position:relative;width:112px;height:112px;object-fit:contain;border-radius:20px;box-shadow:0 0 35px rgba(var(--spell-glow),.2);background:#08121d; }
.spell-identity { min-width:0;flex:1; }
.spell-kicker { color:var(--spell-accent);font-size:11px;letter-spacing:2px;text-transform:uppercase;margin:0 0 13px; }
.spell-kicker span { opacity:.5;margin:0 10px; }
.spell-identity h2 { color:#f0f6ff;font-size:clamp(28px,3.2vw,48px);line-height:1.12;letter-spacing:-.8px;margin:0 0 20px;overflow-wrap:anywhere; }
.spell-classes { display:flex;gap:7px;flex-wrap:wrap; }
.spell-class { font-size:12px;padding:5px 10px;border:1px solid rgba(var(--spell-glow),.23);border-radius:4px;color:#d6e3ef;background:#09142077; }
.spell-rank { text-align:center;align-self:center;border-left:1px solid rgba(var(--spell-glow),.25);padding-left:26px;display:grid;gap:5px;flex-shrink:0; }
.spell-rank small,.spell-rank>span { font-size:10px;letter-spacing:2px;color:#a9bdcd; }
.spell-rank strong { font-size:76px;font-weight:400;line-height:1;color:var(--spell-accent);text-shadow:0 0 25px rgba(var(--spell-glow),.25); }
.spell-essentials { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:22px 36px;background:rgba(var(--spell-glow),.035);border-bottom:1px solid rgba(var(--spell-glow),.15); }
.spell-essentials>div { display:flex;align-items:center;gap:14px;min-width:0;padding:4px 18px;border-right:1px solid rgba(var(--spell-glow),.17); }
.spell-essentials>div:first-child { padding-left:0; }.spell-essentials>div:last-child { border:0; }
.spell-stat-icon { color:var(--spell-accent);font-size:28px;flex-shrink:0; }
.spell-essentials dt { color:#a5b8ca;font-size:11px;letter-spacing:1px;text-transform:uppercase; }
.spell-essentials dd { color:#e3eef7;font-size:15px;margin:6px 0 0;line-height:1.55;overflow-wrap:anywhere; }
.spell-body { display:grid;grid-template-columns:minmax(0,1fr) 280px; }
.spell-reading-pane { min-width:0;padding:30px 36px; }
.spell-section-label { display:flex;align-items:center;gap:12px;margin-bottom:22px; }
.spell-section-label>span { font-size:11px;letter-spacing:1px;color:var(--spell-accent);border:1px solid rgba(var(--spell-glow),.3);padding:4px 7px; }
.spell-section-label h3 { font-size:12px!important;letter-spacing:1.5px;text-transform:uppercase;color:#d3e0ed;margin:0; }
.spell-dossier .spell-description { margin-top:0;font-size:17px;line-height:1.9;color:#d2dfe9; }
.spell-dossier .spell-description+.spell-description { margin-top:28px; }
.spell-description p { margin:0 0 1.2em; }
.spell-dossier .spell-description strong { color:#eff7ff; }
.spell-dossier .spell-description a[href] { color:var(--spell-accent);text-decoration-color:rgba(var(--spell-glow),.45);border-radius:3px;transition:background .15s; }
.spell-dossier .spell-description a[href]:hover { background:rgba(var(--spell-glow),.12); }
.spell-dossier .spell-description h1,.spell-dossier .spell-description h2 { font-size:23px;color:var(--spell-accent); }
.spell-dossier .spell-description blockquote { border-left:2px solid var(--spell-accent);margin:20px 0;padding:10px 18px;background:rgba(var(--spell-glow),.05); }
.spell-sidebar { padding:30px 22px;background:#0c1b29;border-left:1px solid rgba(var(--spell-glow),.15);min-width:0; }
.spell-dossier .spell-facts { display:block;border:0;background:none; }
.spell-dossier .spell-facts>div { background:none;padding:13px 0;border-bottom:1px solid #ffffff0d; }
.spell-dossier .spell-facts>div:first-child { padding-top:0; }
.spell-dossier .spell-facts dt { font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:#9bb3c7; }
.spell-dossier .spell-facts dd { line-height:1.6;font-size:14px;color:#e1eaf1; }
.spell-origin { margin-top:30px;padding-top:22px;border-top:1px solid #ffffff15;color:#a9bfce;font-size:12px; }
.spell-origin>span { color:var(--spell-accent);font-size:10px;letter-spacing:2px;margin-right:12px; }.spell-origin>strong { font-weight:400; }
.spell-origin p { line-height:1.65;margin:12px 0 0; }
.spell-pagination { display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:20px 0 32px; }
.spell-neighbor { display:grid;gap:8px;border:1px solid #294359;background:#0c1b2bdd;padding:18px 22px;transition:border-color .2s,background .2s;min-width:0; }
.spell-neighbor:last-child { text-align:right; }.spell-neighbor small { color:#96b0c5;font-size:10px;letter-spacing:1px; }.spell-neighbor span { color:#e5f2fc;font-size:16px;overflow-wrap:anywhere; }
.spell-neighbor:hover { border-color:#79cee5;background:#122e42; }
.spell-dossier.is-reading .spell-body { grid-template-columns:minmax(0,1fr); }.spell-dossier.is-reading .spell-sidebar { display:none; }
.spell-dossier.is-reading .spell-reading-pane { max-width:850px;margin:auto;width:100%;box-sizing:border-box;padding:38px; }
.spell-dossier.is-reading .spell-description { font-size:19px;line-height:2; }
@keyframes spell-reveal { from { opacity:0;transform:translateY(10px); } to { opacity:1;transform:none; } }
@media(max-width:1100px) { .spell-body { grid-template-columns:minmax(0,1fr) 230px; }.spell-hero { gap:24px;padding:32px 24px; }.spell-sigil { width:130px;height:130px; }.spell-sigil img { width:90px;height:90px; }.spell-reading-pane { padding:26px; }.spell-rank { padding-left:18px; }.spell-rank strong { font-size:60px; } }
@media(max-width:820px) {
  .spell-body { display:flex;flex-direction:column; }.spell-sidebar { border-left:0;border-top:1px solid rgba(var(--spell-glow),.15);padding:24px; }
  .spell-dossier .spell-facts { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px; }.spell-dossier .spell-facts>div:first-child { padding-top:13px; }
  .spell-essentials { padding:20px 24px; }.spell-essentials>div { display:block;padding:0 12px; }.spell-stat-icon { display:none; }
  .spell-dossier.is-reading .spell-reading-pane { padding:24px; }
}
@media(max-width:540px) {
  .spell-hero { gap:18px;min-height:0;flex-wrap:wrap;padding:28px 20px; }.spell-sigil { width:92px;height:92px; }.spell-sigil img { width:66px;height:66px;border-radius:12px; }
  .spell-identity { flex-basis:calc(100% - 115px); }.spell-identity h2 { font-size:27px;margin-bottom:12px; }.spell-kicker { font-size:9px;letter-spacing:1px;line-height:1.7; }
  .spell-kicker span { margin:0 4px; }.spell-class { padding:4px 7px;font-size:10px; }
  .spell-rank { display:flex;align-items:center;gap:12px;border:0;border-top:1px solid rgba(var(--spell-glow),.2);padding:16px 0 0;width:100%;text-align:left; }.spell-rank strong { font-size:28px; }.spell-rank>span { margin-left:auto; }
  .spell-essentials { grid-template-columns:1fr;padding:8px 20px; }.spell-essentials>div,.spell-essentials>div:first-child { display:flex;border:0;border-bottom:1px solid #ffffff0d;padding:12px 0; }.spell-stat-icon { display:block;font-size:23px;width:25px; }
  .spell-essentials dd { margin-top:3px; }.spell-reading-pane { padding:24px 20px; }.spell-dossier .spell-description { font-size:16px;line-height:1.85; }
  .spell-neighbor { padding:14px; }.spell-neighbor span { font-size:14px; }.spell-neighbor small { font-size:9px; }
}
@media(prefers-reduced-motion:reduce) { .spell-dossier { animation:none; }.spell-neighbor,.spell-description a[href] { transition:none; } }
