/* Existing Companion presentation, reused for the local edition preview. */
/* Font Awesome 4.2.0 by Dave Gandy: font SIL OFL 1.1, CSS MIT.
   Original font and license files are preserved in source-2024. */
.fa{display:inline-block;font: 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.fa-bookmark:before{content:"\f02e"}
.fa-users:before{content:"\f0c0"}
.fa-flask:before{content:"\f0c3"}
.fa-magic:before{content:"\f0d0"}
.fa-puzzle-piece:before{content:"\f12e"}
.fa-unlock-alt:before{content:"\f13e"}
.fa-archive:before{content:"\f187"}
.fa-university:before{content:"\f19c"}
@font-face{font-family:FontAwesome;src:url(/static/icons.638419274cb545d0.woff2) format("woff2");font-weight:normal;font-style:normal;font-display:swap;}
html { scrollbar-gutter:stable; }
#site-header { display:flex; gap:20px; align-items:center; padding:12px 24px; background:#162d4a; color:white; position:relative; z-index:1000; font:15px/1.4 system-ui,sans-serif; }
#site-header a { color:#fff; text-decoration:none; white-space:nowrap; }
#site-header .logo { display:inline-flex; align-items:center; gap:8px; font-size:18px; font-weight:600; letter-spacing:-.4px; }
#site-header .logo img { display:block; width:36px; height:36px; flex:none; object-fit:contain; }
.search-wrap { display:flex; flex:1; gap:6px; margin:0; max-width:560px; position:relative; }
.search-wrap input { width:100%; min-width:80px; padding:7px 10px; border:1px solid #adc1d6; border-radius:4px; color:#182639; background:#fff; font:inherit; }
.search-wrap > button { display:none; }
#site-header .source-link { margin-left:auto; font-size:13px; }
#navigation { display:flex; flex-wrap:wrap; justify-content:center; gap:4px; padding:10px 20px; background:#fff; border-bottom:1px solid #dce4ef; font:14px/1.5 system-ui,sans-serif; }
#navigation a { padding:5px 10px; color:#1c4e8c; text-decoration:none; border-radius:5px; white-space:nowrap; }
#navigation a:hover { background:#eef3fa; text-decoration:none; }
#navigation a[aria-current="page"] { background:#1c4987; color:#fff; }
#navigation a:focus-visible { outline:3px solid #e8b34f; outline-offset:2px; }
@media(max-width:600px) { #navigation { gap:1px; padding:8px; } #navigation a { padding:5px 8px; font-size:13px; } }
#search-results { position:absolute; top:calc(100% + 6px); left:0; right:0; max-height:min(420px,55dvh); overflow-y:auto; overscroll-behavior:contain; margin:0; padding:5px; border:1px solid #b4c6d9; border-radius:8px; background:#fff; color:#172b44; box-shadow:0 12px 30px #10243c33; font:15px/1.4 system-ui,sans-serif; text-align:left; }
#search-results[hidden] { display:none; }
#search-results #search-status { margin:0; padding:8px 10px; color:#52657b; font-size:12px; }
#search-options a { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 10px; min-height:44px; box-sizing:border-box; border-radius:4px; color:#172b44; white-space:normal; text-decoration:none; }
#search-options a:hover, #search-options a[aria-selected="true"] { background:#e4edf7; color:#123f70; }
#search-options span { overflow-wrap:anywhere; }
#search-options small { flex-shrink:0; color:#52657b; font-size:11px; text-transform:capitalize; }
.search-wrap input:focus-visible { outline:2px solid #a9d5ff; outline-offset:2px; }
#main-content { margin-left:0 !important; }
[data-search-feature] { scroll-margin-top:24px; }
#side-bar, #top-bar, #login-status, #account-topbutton, #page-options-container, #extrac-div-1, #extrac-div-2 { display:none !important; }
.collapsible-block-link { cursor:pointer; }
.yui-navset .yui-nav { display:flex; flex-wrap:wrap; gap:5px; list-style:none; padding:0; border-bottom:1px solid #b4c6d9; }
.yui-navset .yui-nav a { display:block; padding:8px 13px; background:#e8eef5; border-radius:4px 4px 0 0; }
.yui-navset .yui-nav .selected a { background:#244f80; color:#fff; }
.yui-navset .yui-content > [hidden] { display:none !important; }
table { max-width:100%; }
.feature-disclosure { margin:8px 0; border:1px solid #d7e0ec; border-radius:6px; background:#fff; }
.feature-disclosure > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; color:#20334c; cursor:pointer; list-style:none; font-size:15px; line-height:1.4; }
.feature-disclosure > summary::-webkit-details-marker { display:none; }
.feature-disclosure > summary::after { content:''; flex:none; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); margin:0 3px 4px; }
.feature-disclosure[open] > summary::after { transform:rotate(225deg); margin-top:5px; margin-bottom:0; }
.feature-disclosure > summary:hover { background:#edf3fa; }
.feature-disclosure > summary:focus-visible { outline:3px solid #e8b34f; outline-offset:2px; }
.companion-site #page-content .feature-disclosure > summary > :is(h1,h2,h3,h4,h5,h6), .spell-reader-content .feature-disclosure > summary > :is(h1,h2,h3,h4,h5,h6) { margin:0; font-size:16px; line-height:1.4; }
.feature-body { padding:2px 12px 12px; }
.feature-body > :last-child { margin-bottom:0; }
.companion-site { background:#f3f6fb !important; }
.companion-site .container-wrap-wrap, .companion-site .container-wrap, .companion-site .content-wrap { background:transparent !important; margin-top:0 !important; padding-top:0 !important; }
.companion-site .content-wrap > .container.content { top:0; width:100%; max-width:1000px; margin:0 auto; padding:20px 28px; background:transparent; border:0; border-radius:0; box-shadow:none; }
.companion-site .main-content-wrap { padding:0 15px; }
.companion-site .main-content { margin:0; padding:20px 24px; border:1px solid #d7e0ec; border-radius:8px; box-shadow:none; background:#fff; }
.companion-site .main-content .page-title { margin:0 0 12px; padding:0; border:0; background:none; color:#20334c; font:600 24px/1.3 system-ui,sans-serif; }
.companion-site .main-content .page-title span { height:auto; margin:0; padding:0; background:none; }
.companion-site .page-title::before, .companion-site .page-title::after { display:none; }
.companion-site .breadcrumbs { margin:0 0 16px; padding:0; font-size:13px; }
.companion-site .main-content .class-title { display:flex; align-items:center; gap:8px; }
.companion-site .class-back { display:inline-flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; border-radius:5px; color:#315374; text-decoration:none; font:24px/1 system-ui,sans-serif; }
.companion-site .class-back:hover { background:#e7eef8; text-decoration:none; }
.companion-site .class-back:focus-visible { outline:3px solid #e8b34f; outline-offset:2px; }
.companion-site .main-content #page-content { font-size:15px; line-height:1.65; }
.companion-site .main-content #page-content h1, .companion-site .main-content #page-content h2 { font-size:21px; line-height:1.3; margin:20px 0 10px; }
.companion-site .main-content #page-content h3, .companion-site .main-content #page-content h4, .companion-site .main-content #page-content h5 { font-size:17px; line-height:1.4; margin:18px 0 8px; }
.companion-site .footer-wrap { margin:0; padding:12px 20px; background:transparent; }
.companion-site .footer { width:100%; max-width:1000px; padding:0; font-size:12px; line-height:1.5; }
.companion-site .class-art-credit { display:block; margin-top:4px; text-align:center; color:#667a92; font:12px/1.5 system-ui,sans-serif; }
/* Replace decorative wiki heading endcaps with the shared plain headings. */
.companion-site #page-content :is(h1,h2,h3,h4,h5,h6) { background-image:none !important; padding-left:0; padding-right:0; }
.companion-site #toc.page-outline { float:none; clear:both; width:auto; max-width:100%; margin:0 0 16px; padding:0; border:1px solid #d7e0ec; border-radius:6px; background:#f3f6fb; color:#20334c; text-align:left; font:14px/1.5 system-ui,sans-serif; }
.page-outline > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; box-sizing:border-box; padding:11px 14px; cursor:pointer; font-weight:600; list-style:none; }
.page-outline > summary::-webkit-details-marker { display:none; }
.page-outline > summary::after { content:''; flex:none; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); margin:0 3px 4px; }
.page-outline[open] > summary::after { transform:rotate(225deg); margin-top:5px; margin-bottom:0; }
.page-outline > summary:focus-visible { outline:3px solid #e8b34f; outline-offset:2px; }
.page-outline nav { max-height:min(50vh,360px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:0 10px 10px; }
.companion-site #toc.page-outline ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 12px; margin:0; padding:0; list-style:none; }
.page-outline li { min-width:0; }
.page-outline li.outline-subitem { padding-left:12px; }
.page-outline a { display:block; padding:7px 4px; overflow-wrap:anywhere; }
@media(max-width:650px) { .companion-site #toc.page-outline ul { grid-template-columns:minmax(0,1fr); } }
@media(max-width:650px) { .companion-site .content-wrap > .container.content { padding:16px; } .companion-site .main-content { padding:16px; } .companion-site .main-content .page-title { font-size:22px; } }
@media(max-width:650px) { #site-header { flex-wrap:wrap; gap:10px; padding:12px; } .search-wrap { order:3; flex-basis:100%; max-width:none; } #page-content { overflow-wrap:anywhere; } .wiki-content-table { display:block; overflow-x:auto; } }
.companion-site :is(.group-tabs button,#navigation a,.category-card,.entry-grid a,.spell-school-option,#spell-school-toggle,.feature-disclosure > summary) { transition:background-color 140ms ease-out,border-color 140ms ease-out,color 140ms ease-out; }
.feature-disclosure { box-sizing:border-box; }
.feature-disclosure > summary::after { transition:transform 180ms ease-out; }
@media (hover:hover) {
  .entry-grid a:hover { background:#eaf1fb; border-color:#83a6d3; }
}
@media (prefers-reduced-motion:reduce) {
  .companion-site :is(.group-tabs button,#navigation a,.category-card,.entry-grid a,.spell-school-option,#spell-school-toggle,.feature-disclosure > summary), .feature-disclosure > summary::after { transition:none; }
}
#class-subclasses { margin:8px 0 18px; }
.subclass-buttons { display:flex; flex-wrap:wrap; gap:6px; }
.subclass-buttons button { padding:7px 12px; border:1px solid #cbd8e8; border-radius:6px; background:#fff; color:#315374; font:inherit; font-size:14px; cursor:pointer; transition:background-color 140ms,color 140ms; }
.subclass-buttons button[aria-pressed="true"] { background:#1c4987; border-color:#1c4987; color:#fff; }
.subclass-buttons button:focus-visible { outline:3px solid #e8b34f; outline-offset:2px; }
#subclass-description { margin:8px 0 0; color:#52647d; font-size:13px; }
.subclass-badge { margin-left:auto; padding:2px 7px; border-radius:4px; background:#e5edf8; color:#315374; font-size:11px; white-space:nowrap; }
[data-integrated-subclass] { border-left:3px solid #7297c5; }
[data-integrated-subclass][hidden] { display:none; }
@media(prefers-reduced-motion:reduce) { .subclass-buttons button { transition:none; } }
.subclass-badge { max-width:40%; white-space:normal; text-align:center; }
#link-preview { position:fixed; z-index:1500; box-sizing:border-box; display:flex; flex-direction:column; overflow:hidden; border:1px solid #afc3de; border-radius:9px; background:#fff; color:#303e50; box-shadow:0 10px 35px #162d4a33; font:14px/1.55 system-ui,sans-serif; }
#link-preview[hidden] { display:none; }
#link-preview-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid #d7e0ec; background:#f3f6fb; }
#link-preview-title { color:#1c4e8c; font-size:16px; font-weight:600; text-decoration:none; }
#link-preview-header button { padding:0; min-width:30px; min-height:30px; border:0; background:transparent; color:#315374; font-size:24px; cursor:pointer; }
#link-preview-body { padding:12px 14px; overflow:auto; overscroll-behavior:contain; min-height:0; overflow-wrap:anywhere; }
#link-preview-body p { margin:0 0 10px; }
#link-preview-body :is(h1,h2,h3,h4,h5,h6) { font-size:15px; margin:12px 0 8px; }
#link-preview-body a { color:#1c4e8c; }
#link-preview-body table { display:block; max-width:100%; overflow:auto; border-collapse:collapse; font-size:13px; }
#link-preview-body :is(th,td) { padding:5px; border:1px solid #d7e0ec; }
#link-preview-body :is(ul,ol) { padding-left:20px; }
#link-preview :focus-visible { outline:2px solid #1c4987; outline-offset:2px; }
#link-preview-body img { max-width:100%; height:auto; }
/* A quiet, slim scrollbar inside reference previews. */
#link-preview-body { scrollbar-width:thin; scrollbar-color:#90a8c5 transparent; }
#link-preview-body::-webkit-scrollbar { width:7px; height:7px; }
#link-preview-body::-webkit-scrollbar-track { background:transparent; }
#link-preview-body::-webkit-scrollbar-thumb { background:#90a8c5; border:1px solid #fff; border-radius:12px; }
#link-preview-body::-webkit-scrollbar-thumb:hover { background:#607fa5; }
#link-preview-body::-webkit-scrollbar-button { display:none; width:0; height:0; }
#link-preview-body::-webkit-scrollbar-corner { background:transparent; }
@media(forced-colors:active) { #link-preview-body { scrollbar-color:auto; } }
/* Shared theme surfaces. Dark mode also covers fetched reader/preview content. */
:root { color-scheme:light; }
:root[data-theme="dark"] { color-scheme:dark; background:#101822; }
#site-header #theme { margin-left:auto; flex:none; display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0; border:1px solid #637994; border-radius:7px; background:transparent; color:#eff6ff; font:0/1 system-ui,sans-serif; cursor:pointer; }
#theme::before { content:'☾'; font:25px/1 system-ui,sans-serif; }
html[data-theme="dark"] #theme::before { content:'☀'; }
#site-header #theme:hover { background:#304963; }
#theme:focus-visible { outline:3px solid #e8b34f; outline-offset:3px; }
html[data-theme="dark"] body { background:#101822 !important; color:#dce5f0 !important; }
html[data-theme="dark"] #site-header { background:#111f30; }
html[data-theme="dark"] :where(#navigation,.main-content,.category-card,.entry-grid a,.spell-reader-card,.feature-disclosure,.cantrip-option,.empty-category,#search-results,#link-preview,#spell-school-panel,.spell-school-option,.group-tabs button,.subclass-buttons button) { background:#1a2635 !important; border-color:#37485f !important; color:#dce5f0 !important; }
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,.page-title,.spell-reader-content,.feature-disclosure > summary,.category-card .fa,#search-options a) { color:#dce5f0 !important; }
html[data-theme="dark"] a { color:#91c1ff; }
html[data-theme="dark"] :is(.entry-grid a,#navigation a,.class-back,#spell-reader-back,#species-reader-back,#spell-school-toggle,#spell-school-clear,#link-preview-title,#link-preview-body a,#link-preview-header button) { color:#91c1ff !important; }
html[data-theme="dark"] :is(.entry-count,.spell-filter-label,.spell-school-hint,.spell-empty,.directory-footer,.footer,.breadcrumbs,#subclass-description,#search-status,#search-options small,#spell-school-panel legend) { color:#a6b6cb !important; }
html[data-theme="dark"] :is(.group-tabs,.yui-nav,.page-tags,hr) { border-color:#37485f !important; }
html[data-theme="dark"] :is(#link-preview-header,.subclass-badge,.yui-navset .yui-nav a,blockquote,pre,code) { background:#233347 !important; color:#c4d7ef !important; border-color:#37485f !important; }
html[data-theme="dark"] :is(.search-wrap input,input[type="search"]) { background:#1a2635; color:#e4edf8; border-color:#526b8b; }
html[data-theme="dark"] input::placeholder { color:#a6b6cb; }
html[data-theme="dark"] :where(.entry-grid a:hover,.category-card:hover,#navigation a:hover,.group-tabs button:not(:disabled):hover,.subclass-buttons button:hover,.feature-disclosure > summary:hover,#search-options a:hover,#search-options a[aria-selected="true"],.class-back:hover,#spell-reader-back:hover,#species-reader-back:hover,#spell-school-toggle:hover) { background:#293e57 !important; border-color:#6e95c4 !important; }
html[data-theme="dark"] :is(.group-tabs button[aria-selected="true"],.group-tabs button[aria-pressed="true"],.subclass-buttons button[aria-pressed="true"],#navigation a[aria-current="page"],.yui-navset .yui-nav .selected a) { background:#305d92 !important; border-color:#6797d2 !important; color:#fff !important; }
html[data-theme="dark"] :is(.entry-grid a[aria-current="true"],.spell-school-option:has(input:checked),.cantrip-option button) { background:#263f60 !important; border-color:#6797d2 !important; color:#dceaff !important; }
html[data-theme="dark"] .group-tabs button:disabled { background:#161f2a !important; color:#7d8a9c !important; border-color:#29374a !important; }
html[data-theme="dark"] :is(th,td) { border-color:#3a4b60 !important; }
html[data-theme="dark"] :is(table,tbody,tr,td) { background:#1a2635 !important; color:#dce5f0 !important; }
html[data-theme="dark"] :is(th,thead) { background:#263f60 !important; color:#e4edf8 !important; }
html[data-theme="dark"] tr:nth-child(even), html[data-theme="dark"] tr:nth-child(even) > td { background:#202e3f !important; }
html[data-theme="dark"] #link-preview-body { scrollbar-color:#617e9f transparent; }
html[data-theme="dark"] #link-preview-body::-webkit-scrollbar-thumb { background:#617e9f; border-color:#1a2635; }
html[data-theme="dark"] :focus-visible { outline-color:#a9cfff; }


/* Legacy tab panels and image-backed headings need their own dark surfaces. */
html[data-theme="dark"] .yui-navset .yui-content { background:#1a2635 !important; border-color:#37485f !important; box-shadow:none; }
html[data-theme="dark"] .companion-site #toc.page-outline { background:#233347; border-color:#37485f; color:#dce5f0; }
html[data-theme="dark"] .class-art-credit { color:#a6b6cb; }
html[data-theme="dark"] #page-content :is(h1,h2,h3,h4,h5,h6) { background-image:none !important; }
/* Keep wide tables inside a keyboard-accessible scroll region. */
.table-scroll { max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; margin:12px 0; scrollbar-width:thin; }
.table-scroll:focus-visible { outline:2px solid #6c97cc; outline-offset:3px; }
.table-scroll > table { display:table !important; width:100%; margin:0 !important; }
@media(max-width:650px) {
  .companion-site .main-content-wrap { padding:0; }
  .companion-site .content-wrap > .container.content { padding:12px; }
  .companion-site .main-content { min-width:0; padding:14px; }
  .table-scroll[data-wide-table] > table { min-width:var(--table-min-width,600px); }
  .table-scroll :is(th,td) { white-space:normal; overflow-wrap:normal; }
  .table-scroll th { font-size:13px; }
  .table-scroll td { font-size:14px; }
  .table-scroll { scrollbar-color:#839bb8 transparent; }
  .spell-reader-heading a { white-space:normal; }
  .spell-reader-title-group { max-width:100%; }
  .spell-reader-title-group h2 { overflow-wrap:anywhere; }
  .yui-navset .yui-content { padding:8px; min-width:0; }
}

@media(max-width:650px) {
  .table-scroll[data-wide-table]::before { content:'Swipe table to see all columns'; display:block; position:sticky; left:0; width:fit-content; margin-bottom:6px; color:#65758b; font:12px/1.4 system-ui,sans-serif; }
  html[data-theme="dark"] .table-scroll[data-wide-table]::before { color:#a6b6cb; }
}
/* Hide the returning directory until its entrance effects are installed. */
/* Keep destination articles hidden until their entrance animation is ready too. */
html[data-return-entry] :is(.directory-main,#main-content,.main-content) { visibility:hidden; }
/* External SVG masks inherit text color, including dark/selected states. */
.class-symbol { display:inline-block; background-color:currentColor; -webkit-mask:var(--class-symbol) center / contain no-repeat; mask:var(--class-symbol) center / contain no-repeat; }
.entry-grid .class-card .class-symbol { color:inherit; margin-left:0; flex:0 0 36px; }
@media(max-width:600px) { .entry-grid .class-card .class-symbol { flex-basis:30px; } }
.companion-site .class-mention { display:inline; white-space:nowrap; color:inherit; font-size:inherit; font-weight:inherit; }
.companion-site .class-mention > span.class-mention-icon { display:inline-block; background-color:currentColor; width:1.15em; height:1.15em; max-width:none; margin:0 .22em 0 0; padding:0; border:0; vertical-align:-.2em; object-fit:contain; }
@media (max-width:600px) { .companion-site .class-mention > span.class-mention-icon { width:1.05em; height:1.05em; } }

/* Phone improvements are inert above 600px, including their extra controls. */
.mobile-only { display:none !important; }
.mobile-reader-title-group, .mobile-level-strip, #spell-class-options { display:contents; }
@media(max-width:600px) {
  .mobile-only { display:inline-flex !important; }
  .mobile-hide { display:none !important; }
  .companion-site .search-wrap input { font-size:16px; min-height:44px; box-sizing:border-box; }
  .companion-site #site-header #theme { width:44px; height:44px; }
  .companion-site .content-wrap > .container.content { box-sizing:border-box; }
  .companion-site .content-wrap > .container.content > .row { margin-left:0; margin-right:0; }
  .companion-site .main-content-wrap, .companion-site .main-content { box-sizing:border-box; max-width:100%; }
  .companion-site .mobile-reader-title-group { display:flex; align-items:center; gap:8px; min-width:0; }
  .companion-site :is(#spell-reader-back,#species-reader-back,.class-back,.mobile-reader-back) {
    display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px;
    flex:none; padding:0; border:0; border-radius:6px; background:transparent; color:#315374; font:24px/1 system-ui,sans-serif; cursor:pointer;
  }
  .companion-site .mobile-reader-return, .companion-site .mobile-class-jumps a {
    align-items:center; justify-content:center; min-height:44px; box-sizing:border-box; padding:8px 12px;
    border:1px solid #cbd8e8; border-radius:6px; background:#fff; color:#1c4e8c; font:14px/1.4 system-ui,sans-serif; cursor:pointer; text-decoration:none;
  }
  .companion-site .mobile-reader-return { margin-top:16px; }
  .companion-site .mobile-class-jumps { display:flex !important; gap:8px; margin:0 0 12px; }
  .companion-site .mobile-class-jumps a { display:inline-flex; }
  .companion-site :is(#spell-reader-full,#feat-reader-full,#background-reader-full) { display:none; }
  .companion-site :is(#spell-reader,#feat-reader,#background-reader):has([role="status"]:not([hidden])) .spell-reader-heading a { display:inline; }
  .companion-site .spell-filter-heading { gap:8px; align-items:stretch; }
  .companion-site .spell-filter-heading > .spell-filter-label { display:none; }
  .companion-site #mobile-class-toggle, .companion-site #spell-school-toggle {
    display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:44px; box-sizing:border-box;
    padding:7px 10px; border:1px solid #cbd8e8; border-radius:6px; background:#fff; font:14px/1.35 system-ui,sans-serif; color:#315374; text-align:left; cursor:pointer;
  }
  .companion-site #mobile-class-toggle { flex:1 1 48%; }
  .companion-site #mobile-class-toggle::after { content:'▾'; }
  .companion-site #mobile-class-toggle[aria-expanded="true"]::after { transform:rotate(180deg); }
  .companion-site #spell-school-filters { flex:1 1 52%; }
  .companion-site #spell-school-toggle { width:100%; height:100%; }
  .companion-site #spell-class-options { display:none; }
  .companion-site #spell-class-options[data-open] { display:flex; flex-wrap:wrap; gap:6px; width:100%; padding-top:4px; }
  .companion-site #spell-class-options button { min-height:44px; }
  .companion-site .spell-class-filters { margin-bottom:10px; }
  .companion-site .spell-school-option { min-height:44px; }
  .companion-site #spell-school-clear { min-height:44px; padding:8px; }
  .companion-site .mobile-level-strip { display:flex; align-items:flex-start; gap:5px; border-bottom:1px solid #cbd8e8; margin-bottom:16px; }
  .companion-site .spell-level-tabs { flex:1; min-width:0; margin:0; padding-bottom:8px; border:0; scrollbar-width:thin; }
  .companion-site .spell-level-tabs button { min-height:44px; }
  .companion-site .mobile-level-more { align-items:center; justify-content:center; flex:none; width:44px; height:44px; border:1px solid #cbd8e8; border-radius:6px; background:#fff; color:#315374; font:26px/1 system-ui,sans-serif; cursor:pointer; }
  .companion-site .mobile-level-more:disabled { visibility:hidden; }
  .companion-site .feat-type-tabs { gap:6px; margin-bottom:12px; padding-bottom:12px; }
  .companion-site .feat-type-tabs button { min-height:44px; padding:6px 10px; }
  .companion-site .table-scroll[data-wide-table] tr > :first-child:not([colspan]) { position:sticky; left:0; z-index:1; width:110px; max-width:130px; overflow-wrap:anywhere; box-shadow:1px 0 #cbd8e8; }
  .companion-site .table-scroll[data-mobile-row-key="level"] tr > :first-child:not([colspan]) { width:52px; min-width:52px; max-width:52px; box-sizing:border-box; padding-left:6px; padding-right:6px; white-space:nowrap; overflow-wrap:normal; }
  .companion-site .table-scroll[data-mobile-price] tr > :last-child:not([colspan]) { width:90px; max-width:90px; }
  .companion-site .table-scroll[data-wide-table] tr > td:first-child { background:#fff !important; }
  .companion-site .table-scroll[data-wide-table] tr:nth-child(even) > td:first-child { background:#f3f6fb !important; }
  html[data-theme="dark"] .companion-site :is(.mobile-reader-back,.mobile-reader-return,.mobile-class-jumps a,#mobile-class-toggle,#spell-school-toggle,.mobile-level-more) { background:#1a2635; color:#91c1ff; border-color:#37485f; }
  html[data-theme="dark"] .companion-site .mobile-level-strip { border-color:#37485f; }
  html[data-theme="dark"] .companion-site .table-scroll[data-wide-table] tr > td:first-child { background:#1a2635 !important; }
  html[data-theme="dark"] .companion-site .table-scroll[data-wide-table] tr:nth-child(even) > td:first-child { background:#202e3f !important; }
}

body.local-navigation { margin:0; min-height:100vh; display:flex; flex-direction:column; background:#f3f6fb; color:#20334c; font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif; }
.local-navigation * { box-sizing:border-box; }
.local-navigation a { color:#1c4e8c; }
.local-navigation a:focus-visible, .local-navigation button:focus-visible, .category-group:focus-visible { outline:3px solid #e8b34f; outline-offset:4px; }
.directory-header { background:#1c4987; color:#fff; }
.directory-header > div { max-width:1000px; margin:auto; padding:21px 28px; }
.directory-header .site-name { display:block; color:#fff; text-decoration:none; font-size:27px; font-weight:500; line-height:1.2; }
.directory-header span { display:block; margin-top:7px; color:#d9e6f7; font-size:13px; letter-spacing:1.5px; }
.directory-main { width:100%; max-width:1000px; margin:0 auto; padding:20px 28px; }
.home-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.category-card { min-height:88px; padding:14px 12px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:8px; text-align:center; color:#173f75 !important; text-decoration:none; border:1px solid #d7e0ec; border-radius:10px; background:white; font-size:17px; font-weight:500; transition:background .15s,border-color .15s; }
.category-card .fa { font-size:35px; color:#303a46; }
.category-card:hover { background:#eaf1fb; border-color:#83a6d3; }
#navigation { display:flex; flex-wrap:wrap; justify-content:center; gap:4px; padding:10px 20px; background:#fff; border-bottom:1px solid #dce4ef; }
#navigation a { padding:5px 10px; text-decoration:none; border-radius:5px; font-size:14px; }
#navigation a:hover { background:#eef3fa; }
#navigation a[aria-current="page"] { background:#1c4987; color:#fff; }
.directory-title { display:flex; gap:16px; justify-content:space-between; align-items:center; margin-bottom:16px; }
.directory-title h1 { display:flex; align-items:center; gap:10px; font-size:24px; font-weight:600; margin:0; line-height:1.3; }
.directory-title h1 .fa { font-size:25px; }
.reference-link { font-size:14px; white-space:nowrap; }
.group-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 16px; padding-bottom:10px; border-bottom:1px solid #cbd8e8; }
.group-tabs button { padding:7px 12px; border:1px solid #cbd8e8; border-radius:6px; background:#fff; color:#315374; font:inherit; font-size:14px; line-height:1.35; cursor:pointer; }
.group-tabs button:hover { background:#e7eef8; border-color:#83a6d3; }
.group-tabs button[aria-selected="true"] { background:#1c4987; border-color:#1c4987; color:#fff; }
.group-tabs button:disabled { background:#edf0f4; border-color:#dce2ea; color:#8a95a5; cursor:not-allowed; }
.spell-class-filters { margin-bottom:16px; padding-bottom:0; border-bottom:0; }
.spell-filter-label { flex-basis:100%; font-size:13px; font-weight:600; color:#52647d; }
.spell-filter-heading { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; }
.spell-filter-heading .spell-filter-label { flex-basis:auto; flex-shrink:0; }
.spell-level-tabs { flex-wrap:nowrap; overflow-x:auto; }
.spell-level-tabs button { flex:1 0 auto; padding:9px 12px; white-space:nowrap; }
#spell-school-filters { min-width:0; margin:0; }
#spell-school-toggle { display:flex; align-items:center; gap:8px; max-width:100%; padding:0; border:0; border-radius:3px; background:transparent; color:#315374; font:inherit; font-size:13px; line-height:1.5; cursor:pointer; }
#spell-school-toggle::after { content:'\25be'; margin-left:auto; }
#spell-school-toggle[aria-expanded="true"]::after { transform:rotate(180deg); }
#spell-school-toggle:hover { background:#e7eef8; border-color:#83a6d3; }
#spell-school-panel { position:absolute; top:calc(100% + 6px); right:0; z-index:20; width:340px; max-width:100%; max-height:65vh; overflow-y:auto; margin:0; padding:12px; border:1px solid #cbd8e8; border-radius:8px; background:#fff; box-shadow:0 8px 24px #20334c26; }
#spell-school-panel legend { float:left; width:100%; padding:0; font-size:13px; font-weight:600; color:#52647d; }
.spell-school-hint { clear:both; margin:0 0 8px; color:#667a92; font-size:12px; }
.spell-school-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.spell-school-option { display:flex; align-items:center; gap:7px; min-height:40px; padding:7px; border:1px solid #cbd8e8; border-radius:6px; background:#fff; color:#315374; font-size:13px; cursor:pointer; }
.spell-school-option input { margin:0; accent-color:#1c4987; }
.spell-school-option:has(input:checked) { color:#173f75; background:#dce8f8; border-color:#83a6d3; }
.spell-school-option:focus-within { outline:3px solid #e8b34f; outline-offset:2px; }
#spell-school-clear { margin-top:8px; padding:6px 0; border:0; background:none; color:#1c4e8c; text-decoration:underline; font:inherit; font-size:13px; cursor:pointer; }
#spell-school-filters[hidden], #spell-school-panel[hidden], #spell-school-clear[hidden], #spell-no-results[hidden] { display:none; }
.spell-class-filters button { padding:7px 12px; font-size:14px; }
.spell-class-filters button[aria-pressed="true"] { background:#1c4987; border-color:#1c4987; color:#fff; }
.spell-class-filters[hidden], .entry-grid li[hidden], .spell-empty[hidden] { display:none; }
.spell-empty { color:#52647d; padding:16px 0; }
.cantrip-option { max-width:620px; padding:16px 18px; border:1px solid #d7e0ec; border-radius:8px; background:#fff; color:#52647d; }
.cantrip-option[hidden] { display:none; }
.cantrip-option p { margin:0 0 12px; }
.cantrip-option button { padding:8px 12px; border:1px solid #a9c1e0; border-radius:6px; background:#eaf1fb; color:#173f75; font:inherit; font-size:14px; cursor:pointer; }
.cantrip-option button:hover { background:#dce8f8; }
#spell-list[hidden], #spell-reader[hidden], #spell-reader-status[hidden] { display:none; }
.spell-reader-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; margin-bottom:16px; }
.spell-reader-heading a { font-size:14px; white-space:nowrap; }
.spell-reader-title-group { display:flex; align-items:center; gap:8px; min-width:0; }
#spell-reader-back { display:inline-flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; padding:0; border:0; border-radius:5px; background:transparent; color:#315374; font:24px/1 system-ui,sans-serif; cursor:pointer; }
#spell-reader-back:hover { background:#e7eef8; }
#background-reader { margin-top:24px; }
#background-reader[hidden], #background-reader-status[hidden] { display:none; }
#background-reader-title { margin:0; font-size:23px; line-height:1.3; }
#background-reader-title:focus { outline:none; }
.entry-grid a[aria-current="true"] { border-color:#1c4987; background:#e7eef8; }
.spell-reader-card { padding:24px; border:1px solid #d7e0ec; border-radius:10px; background:#fff; overflow-wrap:anywhere; }
#spell-reader-title { margin:0; font-size:23px; line-height:1.25; color:#20334c; }
#spell-reader-title:focus { outline:none; }
.spell-reader-content { color:#303e50; font-size:15px; line-height:1.65; }
.spell-reader-content p { margin:0 0 16px; }
.spell-reader-content h3, .spell-reader-content h5 { font-size:17px; margin:24px 0 12px; }
.spell-reader-content ul { padding-left:24px; }
.spell-reader-content table { display:block; max-width:100%; overflow-x:auto; border-collapse:collapse; margin:16px 0; font-size:14px; }
.spell-reader-content th, .spell-reader-content td { padding:9px 12px; border:1px solid #d7e0ec; text-align:left; vertical-align:top; }
.spell-reader-content th { background:#eaf1fb; color:#173f75; }
#spell-reader-status { color:#52647d; }
@media(max-width:600px) { .spell-reader-card { padding:18px; } #spell-reader-title { font-size:22px; } }
.feat-type-tabs { gap:8px; margin-bottom:16px; padding-bottom:16px; border-bottom:2px solid #cbd8e8; }
.feat-type-tabs button { font-weight:600; }
[id^="feat-setting-"][role="tablist"], .category-group > .group-tabs { border-bottom:0; padding-bottom:0; margin-bottom:20px; }
.category-group > .group-tabs button { padding:7px 12px; font-size:14px; }
.category-group > .group-tabs button[aria-selected="true"] { color:#173f75; background:#dce8f8; border-color:#a9c1e0; }
.category-group[hidden] { display:none; }
.category-group h2 { font-size:16px; font-weight:600; margin:0 0 10px; }
.entry-count { color:#667a92; font-size:13px; font-weight:400; margin-left:7px; }
.entry-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; list-style:none; padding:0; margin:0; }
.entry-grid li { min-width:0; }
.entry-grid a { min-height:44px; height:100%; display:flex; gap:12px; align-items:center; justify-content:space-between; padding:8px 11px; border:1px solid #d7e0ec; border-radius:6px; background:#fff; text-decoration:none; overflow-wrap:anywhere; }
.entry-grid a:hover { border-color:#83a6d3; background:#eaf1fb; }
.entry-grid a > span { color:#8ba1bc; font-size:20px; }
.directory-footer { margin-top:auto; padding:15px 20px; text-align:center; color:#65758b; font-size:12px; }
.empty-category { background:#fff; border:1px solid #d7e0ec; border-radius:8px; padding:24px; color:#52647d; }
@media(min-width:850px) { .entry-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:600px) { .directory-main { padding:20px 16px; } .directory-header > div { padding:18px 16px; } .home-grid { gap:9px; } .category-card { min-height:105px; padding:14px 7px; font-size:15px; } .category-card .fa { font-size:29px; } .entry-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .directory-title { flex-wrap:wrap; gap:8px; } .directory-title h1 { font-size:24px; } #navigation { gap:1px; padding:8px; } #navigation a { padding:5px 8px; font-size:13px; } }
@media(max-width:350px) { .home-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .entry-grid { grid-template-columns:1fr; } }

#feat-reader { margin-top:24px; }
#feat-reader[hidden], #feat-reader-status[hidden] { display:none; }
#feat-reader-title { margin:0; font-size:23px; line-height:1.3; }
#feat-reader-title:focus { outline:none; }
#species-reader { margin-top:24px; }
#species-reader[hidden], #species-reader-status[hidden] { display:none; }
#species-reader-title { margin:0; font-size:23px; line-height:1.3; }
#species-reader-title:focus { outline:none; }
#species-reader-back { display:inline-flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; padding:0; border:0; border-radius:5px; background:transparent; color:#315374; font:24px/1 system-ui,sans-serif; cursor:pointer; }
#species-reader-back:hover { background:#e7eef8; }


.entry-grid a.class-card { justify-content:flex-start; gap:9px; }
.class-card .class-portrait { width:36px; height:36px; object-fit:contain; flex:0 0 36px; }
.entry-grid .class-card > .class-label { color:inherit; font-size:inherit; min-width:0; }
.class-card > [aria-hidden="true"] { margin-left:auto; flex:none; }
@media(max-width:600px) { .entry-grid a.class-card { gap:7px; padding:7px 9px; } .class-card .class-portrait { width:30px; height:30px; flex-basis:30px; } }
