/* Inner pages: rules, FAQ, donate, downloads and small helpers used by page views. */
.center { text-align: center; }
.grow { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.minor2 { display: flex; justify-content: space-between; font-weight: 900; font-size: 14px; }
.minor2 a { text-decoration: none; }
.pform.narrow { max-width: 420px; }
.pform .kv { padding: 0; }
.errs { margin: 6px 0 0; padding-left: 18px; }
.kv b.small { font-size: 16px; }
.kv b.on { color: #1f7a2e; }
.kv b.off { color: #9a3b2a; }

/* a news article inside the page parchment (archive) does not need a second card */
.page-body .news-article { clip-path: none; filter: none; box-shadow: none; background: none; }
.page-body .news-article .nh { margin: 0; }

/* tickers and featured article on the home page */
.tick summary { display: grid; grid-template-columns: 32px 92px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 6px; list-style: none; cursor: pointer; border-bottom: 1px dashed #b08a5588; }
.tick summary::-webkit-details-marker { display: none; }
.tick summary img { width: 32px; height: 32px; image-rendering: pixelated; }
.tick summary time { color: var(--ink-soft); font-weight: 700; font-size: 13px; }
.tick summary span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tick-b { padding: 8px 6px 10px 48px; }
.featured-b { display: flex; gap: 18px; align-items: flex-start; }
.featured-b > img { flex: none; border: 2px solid var(--ink-line); }

/* rules */
.rl { display: grid; gap: 8px; margin: 0; padding: 6px 28px 6px 54px; font-size: 16px; color: var(--ink); }
.rl li::marker { font-family: var(--font-display); font-weight: 900; color: var(--link); }
.rl.hot li { font-weight: 700; }
.rl.hot li::marker { color: #c0392b; }

/* FAQ */
.faq { padding: 6px 24px 0; }
.faq details { border-bottom: 1px solid #b08a5566; }
.faq summary { display: flex; align-items: center; gap: 10px; padding: 12px 4px; list-style: none; cursor: pointer; font-weight: 900; font-size: 17px; color: var(--ink-strong); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ''; flex: none; width: 8px; height: 8px; background: #e8901f; transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::before { transform: rotate(135deg); background: var(--link); }
.faq summary:hover { color: var(--link); }
.faq p { margin: 0 0 14px 22px; color: var(--ink); }

/* donate: how it works */
.steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; padding: 8px 24px 0; }
.steps div { min-width: 130px; padding: 12px 16px; text-align: center; background: #fff8e6aa; border: 2px solid #b08a5566; border-radius: 4px; }
.steps b { display: flex; align-items: center; justify-content: center; gap: 6px; font: 900 26px var(--font-display); color: var(--link); }
.steps b img { width: 32px; height: 32px; image-rendering: pixelated; }
.steps small { font-weight: 800; color: var(--ink-soft); }
.steps i { font-style: normal; font-size: 28px; font-weight: 900; color: #c98612; }
.parch > p.pb { margin: 10px 0 0; }

/* donate: amounts */
.amts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; padding: 8px 24px 4px; }
.amt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border: 2px solid var(--ink-line); border-radius: 4px; background: #fff8e6; font: inherit; cursor: pointer; }
.amt b { font: 900 20px var(--font-display); color: var(--ink-strong); }
.amt small { font-weight: 800; color: var(--ink-soft); }
.amt[aria-pressed=true] { border-color: var(--link); background: var(--ice); box-shadow: inset 0 0 0 1px var(--link); }
.amt[aria-pressed=true] b { color: var(--link); }

/* donate: Store teaser in the client's grey */
.cwin { color: #dcdcdc; font: 12px/1.45 var(--font-game); background: #3f3f3f var(--tex-panel) 0 0 / 240px 240px; border: 1px solid; border-color: #7d7d7d #1c1c1c #1c1c1c #7d7d7d; box-shadow: 0 0 0 1px #000, 0 14px 30px #0009; }
.cwin .ct { height: 20px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #000; background: #2a2a2a var(--tex-panel) 0 0 / 240px 240px; background-blend-mode: multiply; font-weight: 700; font-size: 11px; color: #bcbcbc; }
.inset { background: #2b2b2b var(--tex-panel) 0 0 / 240px 240px; background-blend-mode: multiply; border: 1px solid; border-color: #1c1c1c #7d7d7d #7d7d7d #1c1c1c; }
.cbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 24px; padding: 0 12px; background: #4a4a4a; border: 1px solid; border-color: #8a8a8a #1b1b1b #1b1b1b #8a8a8a; color: #e8e8e8; font: 700 11.5px var(--font-game); text-shadow: 1px 1px 0 #000; }
.cbtn.on { background: #353535; border-color: #1b1b1b #8a8a8a #8a8a8a #1b1b1b; }
.cbtn.green { background: #1f5a2a; border-color: #5ec06a #0b2a10 #0b2a10 #5ec06a; }
.shopwin { margin: 8px 24px 0; }
.sbody { display: grid; grid-template-columns: 190px 1fr; gap: 8px; padding: 8px; }
.scats { display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.scat { justify-content: flex-start; min-height: 30px; padding: 0 6px; }
.scat img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.slist { position: relative; display: grid; gap: 6px; min-height: 300px; padding: 6px; }
.soff { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 6px; filter: blur(2px); opacity: .75; }
.sic { display: grid; place-items: center; width: 52px; height: 52px; font: 900 20px var(--font-game); color: #888; }
.sn { font-weight: 700; color: #ccc; }
.sp, .spts { display: flex; align-items: center; gap: 6px; padding: 2px 8px; font-weight: 700; }
.sp img, .spts img { width: 16px; height: 16px; image-rendering: pixelated; }
.slock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; background: #1a1a1acc; }
.slock img { width: 64px; height: 64px; image-rendering: pixelated; }
.slock b { font-size: 15px; color: var(--gold-text); text-shadow: 1px 1px 0 #000; }
.slock span { color: #ddd; }
.sfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px 8px; }

/* downloads (system/pages/downloads.php markup) */
.furias-downloads .intro { font-size: 16px; }
.furias-download-cards { display: grid; gap: 24px; margin: 20px 0; }
.furias-download-cards[hidden] { display: none; }
/* Platform tabs are links without JavaScript (?platform=) and switch in place with it. */
.furias-platform-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; border-bottom: 2px solid #b48a39; }
.furias-platform-tabs a { min-width: 120px; padding: 10px 22px; border: 1px solid #b08a5588; border-bottom: 0; border-radius: 6px 6px 0 0; background: #efe2c3; color: var(--ink-soft); font-weight: 800; text-align: center; text-decoration: none; }
.furias-platform-tabs a:hover { color: var(--link); }
.furias-platform-tabs a[aria-selected="true"] { background: #fff8e6; color: var(--link); border-color: #b48a39; box-shadow: inset 0 3px 0 #b48a39; }
.furias-platform-tabs a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.furias-platform-tabs + .furias-download-cards { margin-top: 0; padding-top: 20px; }
.furias-download-card { min-width: 0; padding: 24px; border: 1px solid #b08a5588; border-top: 4px solid #b48a39; border-radius: 6px; background: #fff8e6c9; box-shadow: 0 3px 10px #39230014; }
.furias-download-card > header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.furias-download-icon { flex: 0 0 64px; width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; }
.furias-format { display: grid; place-items: center; flex: 0 0 58px; height: 58px; background: var(--window); color: var(--gold-light); border: 2px solid #b48a39; border-radius: 4px; font: 900 17px var(--font-body); }
.aac .furias-download-card h2 { margin: 4px 0 0; font-size: 25px; }
.aac .furias-download-card h3 { margin: 22px 0 10px; font-size: 18px; }
.furias-download-action { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 18px 2px; }
.furias-download-action > span { font-size: 13px; color: var(--ink-soft); }
.furias-download-action .btn { min-height: 46px; text-align: center; padding: 10px 18px; }
.furias-download-notice { margin: 18px 0 !important; padding: 12px 14px; background: #e7eff7; border-left: 3px solid #2f6fc4; font-size: 13px; line-height: 1.6; }
.furias-download-guide { padding-left: 24px; margin: 0; }
.furias-download-guide li { padding-left: 5px; margin: 10px 0; }
.furias-download-guide li::marker { color: var(--link); font-weight: 900; }
.furias-download-card code { overflow-wrap: anywhere; }
.furias-download-card .furias-checksum { margin-top: 18px; font-size: 12px; }
.furias-download-card .furias-vt { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.furias-download-card .furias-vt a { font-weight: 800; }
@media (max-width: 640px) { .furias-platform-tabs a { flex: 1 1 0; min-width: 0; padding: 10px 12px; } .furias-download-card { padding: 18px 14px; } .furias-download-card > header { gap: 12px; } .furias-download-action .btn { width: 100%; } .aac .furias-download-card h2 { font-size: 22px; } }
.furias-release { display: flex; align-items: center; gap: 22px; margin: 10px 0 16px; padding: 16px; background: #fff8e6aa; border: 2px solid #b08a5566; border-radius: 4px; }
.furias-release-icon { flex: none; width: 96px; height: 96px; image-rendering: pixelated; }
.furias-release h2 { margin: 2px 0 4px; font-size: 26px; color: var(--ink-strong); }
.furias-eyebrow { font-weight: 900; font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); }
.furias-button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 10px; padding: 0 22px; border: 2px solid; border-color: #c8f5b8 #1d5e1d #1d5e1d #c8f5b8; border-radius: 4px; background: linear-gradient(#6fd45a, #3fa33a 50%, #2a8427); color: #fff; font: 900 16px var(--font-body); text-decoration: none; text-shadow: 0 1px 0 #1d5e1d; box-shadow: 0 0 0 2px var(--night); }
.furias-button:hover { color: #fff; filter: brightness(1.08); }
.furias-unavailable { display: inline-block; margin-top: 10px; padding: 8px 14px; border: 2px dashed var(--ink-line); border-radius: 4px; font-weight: 800; color: var(--ink-soft); }
.furias-release-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.furias-steps { display: grid; gap: 12px; margin: 8px 0 16px; padding: 0; list-style: none; }
.furias-steps li { display: flex; gap: 14px; align-items: flex-start; }
.furias-step-number { flex: none; font: 900 22px var(--font-display); color: var(--link); }
.furias-steps p { margin: 2px 0 0; }
.furias-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--ice); border: 2px solid #2f6fc4; border-radius: 4px; }
.furias-checksum { margin-top: 14px; }
.furias-checksum code { display: block; overflow-wrap: anywhere; padding: 8px; background: #fff8e6; border: 1px solid var(--ink-line); }

@media (max-width: 640px) {
  .sbody { grid-template-columns: 1fr; }
  .furias-release, .featured-b { flex-direction: column; text-align: center; }
}

/* character search (views/characters.form.html.twig) */
.pform.char-search { grid-template-columns: 1fr auto; align-items: end; max-width: 620px; }

/* guild list (views/guilds.list.html.twig) */
.glist { display: grid; gap: 12px; padding: 6px 0 4px; }
.gcard { display: flex; align-items: flex-start; gap: 14px; padding: 14px; background: #fff8e6aa; border: 1px solid #b08a5566; border-radius: 4px; }
.gcard > img {
  flex: none; width: 64px; height: 64px; padding: 8px; object-fit: contain; image-rendering: pixelated;
  background: var(--window) var(--tex-stone) 0 0 / 96px 96px; background-blend-mode: soft-light;
  border: 2px solid; border-color: var(--gold-light) var(--gold-dark) var(--gold-dark) var(--gold-light);
}
.aac .gcard h3 { margin: 0; font: 900 19px var(--font-display); color: var(--link); }
.gcard h3 a { color: inherit; text-decoration: none; }
.gcard p { margin: 4px 0 0; font-size: 15px; }

/* experience table (views/furias.exptable.html.twig) */
.pform.xp-form { grid-template-columns: 1fr 1fr; max-width: 620px; }
.kv.xp-out { max-width: 620px; margin: 4px auto 0; }
.xgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 6px 24px 4px; }
.xgrid .tt { font-size: 13px; }
.xgrid .tt td { padding: 3px 8px; }
@media (max-width: 900px) { .xgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pform.char-search, .pform.xp-form { grid-template-columns: 1fr; } }
/* server information (views/furias.serverinfo.html.twig): rate cards, stage ranges, world facts */
.si-rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 6px 24px 4px; list-style: none; }
.si-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px 14px; text-align: center; background: #fff8e6aa; border: 1px solid #b08a5566; border-top: 3px solid var(--gold-line); border-radius: 4px; box-shadow: 0 2px 6px #3a24101a; }
.si-icon { display: grid; place-items: center; width: 68px; height: 68px; flex: none; background: var(--tex-slot) 0 0 / 68px 68px; border-radius: 3px; box-shadow: 0 0 0 1px #3a241055, 0 3px 6px #3a241033; image-rendering: pixelated; }
.si-icon img { width: 64px; height: 64px; image-rendering: pixelated; }
.si-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.si-body small { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.si-body b { font: 900 24px/1.15 var(--font-display); color: var(--link); white-space: nowrap; }
.si-body > span { font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.si-perk { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 24px 0; font-size: 14px; font-weight: 700; color: var(--ink-strong); }
.si-perk img { flex: none; image-rendering: pixelated; }
.parch > p.si-lead { max-width: 640px; margin: -8px auto 10px; padding: 0 24px; font-size: 14.5px; }
:is(.aac, .pgmain, main) .tt.si-stages > * > tr > :is(th, td) { text-align: center; }
.si-stages tbody th { padding: 6px 10px; background: transparent; border-bottom: 1px solid #b08a5544; text-shadow: none; }
.si-stages td.num { font-size: 15px; }
.si-rate { --hot: #d0571a; --calm: #4f6578; display: inline-block; min-width: 46px; padding: 3px 10px; border-radius: 999px; background: color-mix(in oklab, var(--hot) calc(var(--heat, 0) * 100%), var(--calm)); color: #fff; font: 900 15px var(--font-body); text-shadow: 0 1px 0 #0006; box-shadow: inset 0 -2px 0 #0003; }
.si-stages tr.si-base td { color: var(--ink-strong); font-weight: 900; }
/* one panel per progression: XP and skills side by side, magic level (three vocations) full width */
.si-stage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; padding: 2px 24px 4px; }
.si-stage-wide { grid-column: 1 / -1; }
.si-stage-panel { min-width: 0; }
.si-stage-panel .twrap { margin: 0; }
:is(.aac, .pgmain, main) .si-stage-h { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 6px; font: 900 17px var(--font-display); color: var(--link); }
.si-stage-h img { flex: none; image-rendering: pixelated; }
.si-stage-note { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-soft); text-align: center; }
.si-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 6px 24px 4px; list-style: none; }
.si-facts li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 12px 8px; text-align: center; background: #fff8e6aa; border: 1px solid #b08a5566; border-radius: 4px; }
.si-facts img { flex: none; width: 32px; height: 32px; image-rendering: pixelated; }
.si-facts span { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.si-facts small { font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.si-facts b { max-width: 100%; font: 900 18px var(--font-display); color: var(--link); overflow-wrap: anywhere; }
/* columns follow the section width (the side menu narrows it), not the window */
.si-sec { container-type: inline-size; }
@container (max-width: 760px) { .si-rates, .si-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 520px) { .si-stage-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .si-rates, .si-facts { gap: 8px; padding: 6px 12px 4px; }
  .si-card { gap: 8px; padding: 12px 8px; }
  .si-body > span { font-size: 12.5px; }
  .si-icon { width: 52px; height: 52px; background-size: 52px 52px; }
  .si-icon img { width: 48px; height: 48px; }
  .si-body b { font-size: 19px; }
  .si-perk { margin: 10px 12px 0; justify-content: flex-start; text-align: left; }
  .parch > p.si-lead { padding: 0 12px; }
  .si-stage-grid { gap: 14px; padding: 2px 12px 4px; }
  .twrap:has(.si-vocs) { overflow: visible; }
  .si-facts li { padding: 10px 6px; }
  .si-facts b { font-size: 16px; }
  /* vocation table: one card per vocation */
  :is(.aac, .pgmain, main) .tt.si-vocs, :is(.aac, .pgmain, main) .tt.si-vocs > tbody { display: block; border: 0; background: none; }
  :is(.aac, .pgmain, main) .tt.si-vocs > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  :is(.aac, .pgmain, main) .tt.si-vocs > tbody > tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; margin-bottom: 8px; padding: 10px 12px; background: #fff8e6; border: 1px solid #b08a5566; border-radius: 4px; }
  :is(.aac, .pgmain, main) .tt.si-vocs > tbody > tr:nth-child(n) > td { display: flex; flex-direction: column; gap: 1px; padding: 0; border: 0; background: none; text-align: left; font-size: 15px; }
  :is(.aac, .pgmain, main) .tt.si-vocs > tbody > tr:nth-child(n) > td:first-child { grid-column: 1 / 2; grid-row: 1; }
  :is(.aac, .pgmain, main) .tt.si-vocs > tbody > tr:nth-child(n) > td.si-promo { grid-column: 2 / -1; grid-row: 1; justify-content: center; }
  :is(.aac, .pgmain, main) .tt.si-vocs > tbody > tr > td[data-label]::before { content: attr(data-label); font-weight: 700; font-size: 12px; color: var(--ink-soft); }
  .tt.si-vocs img.hd { margin: -8px 0 -6px -6px; }
}

/* account overview (account.management.html.twig) */
.acc-page { display: flex; flex-direction: column; gap: 22px; }
.acc-page .note { margin: 0; }
.acc-hero .nh b { flex: 1; }
.acc-badge { padding: 2px 10px; border: 1px solid #ffffff44; border-radius: 999px; background: #0b1d36aa; font: 800 11.5px var(--font-body); color: var(--ice-soft); text-shadow: none; }
.acc-badge.prem { border-color: var(--gold-light); color: var(--gold-text); }
.acc-note { align-items: center; }
.acc-note > span { flex: 1; }
.acc-note form { margin: 0; flex: none; }
.actions form { margin: 0; display: contents; }
.who > span { display: flex; flex-direction: column; }
.who small { font-weight: 700; font-size: 12px; }
.tt .acc-deleted td { opacity: .75; }
.acc-edit { font-size: 13px; }
.acc-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 6px 24px 4px; }
.acc-dl > div { min-width: 0; padding: 10px 12px; background: #fff8e6aa; border: 1px solid #b08a5566; border-radius: 4px; }
.acc-dl dt { font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.acc-dl dd { margin: 2px 0 0; overflow-wrap: anywhere; font-weight: 800; font-size: 15px; color: var(--ink-strong); }
.acc-dl dd small { display: block; font-weight: 700; font-size: 12.5px; color: var(--ink-soft); }
.acc-logs { margin: 14px 24px 0; border-top: 1px solid #b08a5566; }
.acc-logs summary { display: flex; align-items: center; gap: 10px; padding: 12px 0 8px; list-style: none; cursor: pointer; font: 900 13px var(--font-display); letter-spacing: .12em; color: var(--link); }
.acc-logs summary::-webkit-details-marker { display: none; }
.acc-logs summary::before { content: ''; width: 7px; height: 7px; background: #e8901f; transform: rotate(45deg); transition: transform .2s; }
.acc-logs[open] summary::before { transform: rotate(135deg); background: var(--link); }
.acc-logs .twrap { margin: 0; max-height: 320px; overflow: auto; }
@media (max-width: 640px) { .acc-dl { grid-template-columns: 1fr; } .acc-note { flex-wrap: wrap; } }

/* ===== character and creature profiles ===== */
.char-card, .mon-card, .house-page { display: block; }
.char-head {
  position: relative; display: flex; align-items: center; gap: 18px; margin: 0 0 6px; padding: 14px 16px; border-radius: 4px;
  border: 2px solid; border-color: var(--gold-light) var(--gold-dark) var(--gold-dark) var(--gold-light);
  background: var(--window) var(--tex-stone) 0 0 / 96px 96px; background-blend-mode: soft-light; box-shadow: 0 0 0 1px var(--night), 0 10px 22px #0005;
}
.char-portrait {
  flex: none; width: 112px; height: 112px; display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, #ffffff40, #0b1d3600 68%), #3a2414 url("../assets/generated/scenes/floor-8.png") center / 360px;
  box-shadow: inset 0 0 0 2px #ffe08a88, inset 0 0 18px #000a, 0 4px 10px #0007;
}
.char-portrait img { width: 88px; height: 88px; image-rendering: pixelated; object-fit: contain; filter: drop-shadow(0 3px 2px #000a); }
.char-id { min-width: 0; }
.aac .char-id h2 { margin: 0; font: 900 26px var(--font-display); color: #fff; text-shadow: 0 2px 0 #000, 0 0 10px #000; }
.char-sub { margin: 2px 0 6px; font: 800 14px var(--font-body); color: var(--gold-light); text-shadow: 0 1px 0 #000; }
.char-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.char-admin { position: absolute; right: 12px; top: 10px; font: 800 12px var(--font-body); color: var(--gold-light); }
.char-dl { padding-left: 0; padding-right: 0; }
.char-comment { margin: 12px 0 0; padding: 12px 16px; background: #fff8e6; border: 1px solid #b08a5566; border-radius: 4px; font-style: italic; color: var(--ink-strong); }
.char-when { width: 140px; white-space: nowrap; }
.aac h3.ph { margin: 18px 0 6px; font-size: 14px; }
.char-head .pill { background: #0b1d36aa; color: #e4f1ff; border-color: #ffffff44; }
.char-head .pill.on { background: #1f6a28; color: #fff; border-color: #6fd45a; }
.char-head .pill.gold { background: #ffc847; color: #2a1a00; border-color: #fff4c4; }
.char-head .pill.off { background: #8a2f20; color: #fff; border-color: #f0a090; }

/* ===== bestiary ===== */
.best-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; }
.best-tools .tabs { padding: 0; }
.best-search input, .best-sort, .sp-voc select {
  min-height: 38px; padding: 6px 12px; border: 2px solid; border-color: #8a6a3a #f6e7c2 #f6e7c2 #8a6a3a; border-radius: 3px;
  background: #fff8e6; color: #1a2333; font: 700 14px var(--font-body);
}
.best-search input { width: 230px; }
.best-count { margin: 0 0 8px; }
.best-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.best-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 10px 6px 8px; text-align: center; text-decoration: none;
  background: #fff8e6aa; border: 1px solid #b08a5566; border-radius: 4px; transition: transform .15s var(--ease), box-shadow .15s, border-color .15s;
}
.best-card:hover, .best-card:focus-visible { transform: translateY(-2px); border-color: var(--gold-dark); box-shadow: 0 6px 14px #3a241033; }
.best-card.boss { border-color: #c0392b88; background: #fbe4dfaa; }
.best-pic { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #3a241022, transparent 70%); }
.best-pic img { width: 64px; height: 64px; image-rendering: pixelated; object-fit: contain; }
.best-card .gt { font-size: 12px; white-space: normal; line-height: 1.2; }
.best-stats { display: flex; gap: 8px; font: 800 11.5px var(--font-body); color: var(--ink-soft); }
.ico { display: inline-block; width: 8px; height: 8px; margin-right: 3px; border-radius: 1px; }
.ico.hp { background: #c00000; }
.ico.xp { background: #d99a1c; }
.mon-voice { margin: 6px 0 0; }
.mon-voice .gt, .mon-voices .gt { white-space: normal; font-size: 13px; }
.mon-kv { margin-top: 8px; }
.mon-elems { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.mon-elem { display: grid; grid-template-columns: 90px 1fr 54px; align-items: center; gap: 8px; font-weight: 800; font-size: 13.5px; }
.mon-elem .bar { height: 8px; padding: 1px; background: #3a241022; border-radius: 4px; }
.mon-elem .bar i { display: block; height: 100%; border-radius: 3px; }
.mon-elem.res .bar i { background: #2f8a1f; }
.mon-elem.weak .bar i { background: #c0392b; }
.mon-elem b { text-align: right; }
.mon-immune { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* Creature information is a stack of independent cards. */
.element-table-wrap { max-width:100%; overflow-x:auto; }
.aac .monster-elements table.element-table { width:100%; margin:0; table-layout:fixed; }
.aac .monster-elements .element-table thead th:first-child { width:35%; }
.aac .monster-elements .element-table thead th:nth-child(2) { width:25%; }
.element-name { display:flex; align-items:center; gap:9px; font-size:14px; font-weight:800; }
.element-art { display:grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border:1px solid #b7c8cf; border-radius:3px; background:#e8f2f8; }
.element-art img { display:block; width:18px; height:18px; object-fit:contain; image-rendering:pixelated; }
.element-status { display:inline-block; padding:4px 7px; border:1px solid #a4937d; border-radius:5px; background:linear-gradient(#f8f2e8,#ded5c6); color:#4a443b; font-size:11px; font-weight:800; line-height:1.35; white-space:nowrap; box-shadow:inset 0 1px #fff9; }
.element-effect { font-weight:800; }
.element-weak .element-status { color:#9f3023; border-color:#b55742; background:linear-gradient(#fff0e8,#efc6b7); }
.aac .monster-elements table.element-table .element-weak .element-effect { color:#9f3023; }
.element-resistant .element-status { color:#285b2c; border-color:#6c9452; background:linear-gradient(#eff5df,#cfdfb8); }
.aac .monster-elements table.element-table .element-resistant .element-effect { color:#285b2c; }
.element-immune .element-status { color:#185a86; border-color:#4789b0; background:linear-gradient(#ebf7ff,#b8dbef); }
.aac .monster-elements table.element-table .element-immune .element-effect { color:#185a86; }
.aac .monster-elements .element-note { position:relative; display:flex; align-items:center; gap:8px; margin:18px 0 0; font-size:12px; color:#715634; }
.element-other { margin-top:18px; padding-top:16px; border-top:1px solid #ad812f; }
.aac .element-other h4 { display:flex; align-items:center; gap:12px; margin:0 0 12px; color:#19394c; font:700 21px/1.3 Georgia,serif; }
.element-other h4::after { content:''; flex:1; height:1px; background:#b79961; }
.element-other ul { display:flex; flex-wrap:wrap; gap:7px; list-style:none; margin:0; padding:0; }
.element-other li { padding:6px 12px; border:1px solid #a88a56; border-radius:16px; background:#fff8e7; color:#513b20; font-size:12px; font-weight:700; box-shadow:inset 0 1px #fff; }
@media(max-width:520px) {
 .aac .monster-elements table.element-table > :is(thead,tbody) > tr > :is(th,td) { padding:8px 4px; font-size:11px; }
 .aac .monster-elements .element-table thead th:first-child { width:40%; }
 .aac .monster-elements .element-table thead th:nth-child(2) { width:27%; }
 .element-name { gap:5px; font-size:11px; }
 .element-name > span:last-child { white-space:nowrap; }
 .element-art { width:24px; height:24px; flex-basis:24px; }
 .element-art img { width:18px; height:18px; }
 .element-status { padding:3px; font-size:9px; }
}
.mon-voices { display: grid; gap: 4px; margin: 0; padding: 8px 12px; list-style: none; background: #1d1d1d; border-radius: 4px; }
.mon-loot { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.mon-loot li { display: grid; grid-template-columns: 38px 1fr; column-gap: 8px; align-items: center; padding: 6px; background: #fff8e6aa; border: 1px solid #b08a5566; border-radius: 4px; }
.mon-loot .slot { grid-row: span 2; position: relative; width: 38px; height: 38px; display: grid; place-items: center; background: #2b2b2b; border: 1px solid; border-color: #1c1c1c #6a6a6a #6a6a6a #1c1c1c; }
.mon-loot .slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.mon-loot .slot i { position: absolute; right: 1px; bottom: 0; font: 700 10px var(--font-game); font-style: normal; color: #fff; text-shadow: var(--outline); }
.mon-loot .nm { font-weight: 800; font-size: 13px; line-height: 1.2; }
.mon-loot small { font-weight: 800; font-size: 12px; }
.mon-loot .r-common small { color: #6b5a3e; }
.mon-loot .r-uncommon small { color: #1f6a28; }
.mon-loot .r-semi small { color: #1d4f9c; }
.mon-loot .r-rare small { color: #7a2fa0; }
.mon-loot .r-vrare small { color: #b8650a; }
.mon-loot .r-rare, .mon-loot .r-vrare { background: #fff3d6; border-color: #d99a1c88; }
.mon-back { margin-top: 14px; }

/* ===== spellbook ===== */
.spellbook .note { margin-bottom: 12px; }
.sp-voc { margin: 0; }
.sp-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.sp-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) 210px; gap: 14px; align-items: center; padding: 10px 12px; background: #fff8e6aa; border: 1px solid #b08a5566; border-radius: 4px; }
.sp-card[hidden] { display: none; }
.sp-card { align-items: start; }
.sp-learn { min-width: 0; }
.sp-learn > details { margin-top: 10px; }
.npc-offers { padding: 0; list-style: none; display: grid; gap: 8px; }
.npc-offers > li { padding: 10px; background: #fff8e6; border: 1px solid #b08a5555; border-radius: 3px; }
.npc-offers > li > div { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.npc-offers strong { color: #865500; white-space: nowrap; }
.npc-location { margin-top: 7px; }
.npc-location summary { color: #205ca3; cursor: pointer; font-weight: 700; }
.npc-map { position: relative; margin: 8px 0; background: #12181c; border: 2px solid #a98645; }
.npc-map img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.npc-map-image { position: relative; }
.npc-map-pin { position: absolute; top: 50.52%; left: 50.39%; transform: translate(-50%,-50%); color: #fff; font: bold 24px monospace; text-shadow: 0 0 2px #000, 2px 2px #c22; }
.npc-map figcaption { min-height: 32px; padding: 5px; color: #fff3d5; font-size: 11px; overflow-wrap: anywhere; }
.item-heading { display: flex; align-items: center; gap: 16px; margin: 18px 0; }
.item-heading img, .item-grid img { image-rendering: pixelated; object-fit: contain; }
.item-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 10px; }
.item-grid a { display: flex; flex-direction: column; align-items: center; padding: 12px; gap: 7px; min-height: 128px; text-align: center; background: #fff8e6; border: 1px solid #b08a5588; border-radius: 3px; }
.item-grid a:hover { border-color: #205ca3; background: #fffdf3; }
.item-grid small { color: #735a39; }
.item-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.item-pages { display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 20px; }
.item-search { flex-wrap: wrap; gap: 8px; }
.item-search input { min-width: 150px; flex: 1; }
@media (max-width: 700px) { .sp-card { grid-template-columns: 42px minmax(0,1fr); } .sp-learn { grid-column: 1 / -1; border-top: 1px solid #b08a5555; padding-top: 10px; } }
.sp-icon {
  position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 4px; color: #ffe08a;
  background: #2b2b2b; border: 1px solid; border-color: #1c1c1c #7d7d7d #7d7d7d #1c1c1c; box-shadow: inset 0 0 10px #000a;
}
.sp-icon.k1 { background: #1f3d63; }
.sp-icon img { width: 32px; height: 32px; image-rendering: pixelated; }
.sp-icon i { position: absolute; right: 2px; bottom: 1px; font: 700 10px var(--font-game); font-style: normal; color: #fff; text-shadow: var(--outline); }
.aac .sp-main h3 { margin: 0; font: 900 16px var(--font-display); color: var(--ink-strong); }
.sp-kind { margin-left: 6px; font: 800 11px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.sp-words { margin: 2px 0 4px; }
.sp-words .gt { font-size: 13px; }
.sp-req { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 13px; color: var(--ink-soft); }
.sp-req b { color: var(--ink-strong); }
.sp-req .prem { font-weight: 900; color: #b8650a; }
.sp-req .reag { display: inline-flex; align-items: center; gap: 3px; }
.sp-vocs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.sp-vocs span { padding: 1px 8px; border-radius: 999px; background: #1d4f9c14; font: 800 11.5px var(--font-body); color: var(--link); }
.sp-learn { align-self: stretch; padding: 6px 0 6px 14px; border-left: 1px dashed #b08a5588; font-size: 13px; }
.sp-learn > small { display: block; font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.sp-npc { margin: 2px 0 0; font-size: 14px; }
.sp-price { display: flex; align-items: center; gap: 4px; margin: 2px 0 0; font-size: 14px; color: #8a5a00; }
.sp-learn details { margin-top: 4px; }
.sp-learn summary { cursor: pointer; font-weight: 800; font-size: 12.5px; color: var(--link); }
.sp-learn details ul { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; }
@media (max-width: 760px) {
  .sp-card { grid-template-columns: 48px 1fr; }
  .sp-learn { grid-column: 1 / -1; border-left: 0; border-top: 1px dashed #b08a5588; padding: 8px 0 0; }
}

/* ===== houses ===== */
.house-towns .tab { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.house-row { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.house-row small { display: block; font-weight: 700; font-size: 12px; color: var(--ink-soft); }
.house-thumb { flex: none; width: 56px; height: 42px; overflow: hidden; border-radius: 3px; background: #0c0c0c; border: 1px solid #3a2410; }
.house-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.houses-table td { padding-top: 6px; padding-bottom: 6px; }
.house-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 4px;
  border: 2px solid; border-color: var(--gold-light) var(--gold-dark) var(--gold-dark) var(--gold-light);
  background: var(--window) var(--tex-stone) 0 0 / 96px 96px; background-blend-mode: soft-light; box-shadow: 0 0 0 1px var(--night);
}
.aac .house-head h2 { margin: 0; font: 900 24px var(--font-display); color: #fff; text-shadow: 0 2px 0 #000; }
.house-head p { margin: 0; }
.house-preview { margin: 12px 0 10px; text-align: center; }
.house-preview img { max-width: 100%; max-height: 460px; image-rendering: pixelated; border: 2px solid #3a2410; border-radius: 3px; box-shadow: 0 0 0 1px #ffe08a66, 0 10px 22px #0006; }
.house-preview figcaption { margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.house-bid { max-width: 420px; }

/* ===== guilds: crest frame when a guild has no logo ===== */
.gcard > img.no-logo { padding: 10px; object-fit: contain; }

/* ===== classic character sheet: framed tables with a caption bar and label | value rows ===== */
.sheet { margin: 18px 0 0; border: 1px solid #5a3f1c; border-radius: 3px; background: #fff8e6cc; box-shadow: 0 0 0 1px #ffe08a55 inset, 0 6px 14px #3a241022; overflow: hidden; }
.aac .sheet-cap {
  margin: 0; padding: 7px 14px; font: 700 13px var(--font-game); letter-spacing: .02em; text-transform: none; color: #fff; text-shadow: var(--outline);
  background: var(--window) var(--tex-stone) 0 0 / 96px 96px; background-blend-mode: soft-light; border-bottom: 2px solid var(--night);
  box-shadow: inset 0 1px 0 #8fb8ea66;
}
.sheet-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.aac .sheet-table th, .aac .sheet-table td { padding: 8px 14px; border-bottom: 1px solid #b08a5544; vertical-align: top; text-align: left; background: none; }
.aac .sheet-table tbody tr:nth-child(even) > * { background: #e9d6a833; }
.aac .sheet-table tbody tr:last-child > * { border-bottom: 0; }
.aac .sheet-table tbody th { width: 34%; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.aac .sheet-table tbody th.when { width: 150px; font-weight: 700; font-variant-numeric: tabular-nums; }
.aac .sheet-table td { color: var(--ink); }
.aac .sheet-table td b.on { color: #1f6a28; }
.aac .sheet-table td b.off, .aac .sheet-table small.off { color: #8a2f20; }
.aac .sheet-table td.empty { color: var(--ink-soft); font-style: italic; text-align: center; }
.aac .sheet-table td.char-comment { font-style: italic; white-space: normal; }
.aac .sheet-list thead th { padding: 6px 14px; font: 700 12px var(--font-game); color: var(--ink-soft); border-bottom: 1px solid #b08a5588; background: #e9d6a855; }
.aac .sheet-list .num { text-align: right; }
.aac .sheet-list tr.me td { background: #ffe9a855; }
.sheet-list .idx { color: var(--ink-soft); font-weight: 700; }
.char-card + .aac-block { margin-top: 22px; }
@media (max-width: 640px) { .aac .sheet-table tbody th { width: 40%; white-space: normal; } }

/* ===== lost account ===== */
.lost-form { max-width: 460px; }
.lost-modes { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.lost-mode { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; cursor: pointer; background: #fff8e6; border: 2px solid var(--ink-line); border-radius: 4px; transition: border-color .15s, background .15s; }
.lost-mode input { margin-top: 3px; accent-color: var(--link); }
.lost-mode b { display: block; font-size: 14.5px; color: var(--ink-strong); }
.lost-mode small { display: block; font-size: 12.5px; color: var(--ink-soft); }
.lost-mode:has(input:checked) { border-color: var(--link); background: var(--ice); }
.lost .note { margin: 6px 0 12px; }

/* Donation acknowledgement and original pixel payment symbols. */
.donation-terms { padding: 0 24px 24px; }
.donation-terms h3 { margin: 1.25rem 0 .35rem; }
.donation-terms p { line-height: 1.65; }
.donation-consent { display: flex; align-items: flex-start; gap: .65rem; margin-top: 1.5rem; }
.donation-consent input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 20px; margin-top: .2rem; }
.payment-pixel { image-rendering: pixelated; vertical-align: middle; flex-shrink: 0; }

/* One package selection, followed by the payment method. */
.payment-environment { margin: 0; padding: 7px 12px; border: 1px solid #c9a75b; background: #fff3ce; color: #62451d; font-size: 12px; text-align: center; }
.payment-checkout { max-width: 540px; padding: 10px 24px 24px; gap: 18px; }
.payment-packages { min-width: 0; margin: 0; padding: 0; border: 0; }
.payment-packages .amts { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
.package-option { position: relative; cursor: pointer; }
.package-option input, .payment-packages .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.package-option .amt { height: 100%; border-radius: 2px; }
.package-option input:checked + .amt { background: #15385e; border-color: #d5a442; box-shadow: inset 0 0 0 1px #ffe3a0; }
.package-option input:checked + .amt b { color: #ffdb78; }
.package-option input:checked + .amt small { color: #fff3d3; }
.package-option input:focus-visible + .amt { outline: 3px solid #2363aa; outline-offset: 3px; }
.payment-heading { margin: 2px 0 -4px; text-align: center; font: 800 16px var(--font-display); color: var(--ink-strong); }
.payment-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 380px; width: 100%; margin: 0 auto; }
.payment-tile { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-width: 0; padding: 10px; border: 3px solid; border-color: #d5b16c #785026 #785026 #d5b16c; background: #102945 var(--tex-stone); color: #ffe1a0; box-shadow: inset 0 0 0 2px #061628, 0 3px 0 #4f341e; cursor: pointer; font: inherit; }
.payment-tile img { width: 80px; height: 80px; image-rendering: pixelated; }
.payment-tile strong { font: 800 16px var(--font-display); }
.payment-tile small { font-size: 11px; color: #e0e8ef; }
.payment-tile:hover:not(:disabled) { border-color: #ffe3a0; background-color: #1b4063; transform: translateY(-2px); }
.payment-tile:focus-visible { outline: 3px solid #2363aa; outline-offset: 4px; }
.payment-tile:disabled { cursor: default; opacity: .65; }
.payment-caption { text-align: center; margin: 0; color: var(--ink-soft); font-size: 12px; }
.pix-panel { margin: 0 24px 24px; padding: 20px; border: 2px solid #af8c4c; background: #fff9e9; text-align: center; }
.pix-panel h3 { margin: 0 0 12px; }
.pix-qr { display: block; max-width: 100%; height: auto; margin: 0 auto 16px; background: white; }
.pix-panel label { display: block; font-size: 13px; font-weight: 700; }
.pix-panel textarea { display: block; width: 100%; resize: none; margin: 8px 0 14px; font: 12px monospace; padding: 8px; background: white; color: #24384b; border: 1px solid #bba176; }
.pix-panel [role=status] { margin-bottom: 0; font-size: 13px; font-weight: 700; }
@media (max-width: 480px) {
  .payment-checkout { padding: 8px 14px 20px; }
  .payment-methods { gap: 10px; }
  .payment-tile { gap: 4px; padding: 8px 3px; }
  .payment-tile img { width: 64px; height: 64px; }
  .payment-tile strong { font-size: 14px; }
  .package-option .amt b { font-size: 18px; }
  .package-option .amt small { font-size: 11px; }
  .pix-panel { margin: 0 14px 20px; padding: 12px; }
}

/* Spell catalogue: vertical cards keep teachers clear of the lesson header. */
.sp-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:16px; }
.sp-card { grid-template-columns:52px minmax(0,1fr); gap:16px; align-content:start; padding:18px; }
.sp-learn { grid-column:1/-1; border-left:0; border-top:1px solid #b08a5555; padding:14px 0 0; }
.spell-art { display:block; width:32px; height:32px; background-image:url('../assets/spell-icons.png'); image-rendering:pixelated; }
.npc-map-dialog { width:min(720px,92vw); max-height:90vh; overflow:auto; padding:20px; border:2px solid #ad8546; background:#fff4d8; color:#362515; }
.npc-map-dialog::backdrop { background:#061326bd; }
.npc-map-dialog .npc-map { width:100%; margin:16px 0 0; }
.npc-map-dialog .npc-map-image { width:100%; }

.sp-list.spell-compact { display:flex; flex-direction:column; gap:8px; }
.spell-compact .sp-card { display:block; padding:0; }
.spell-compact .sp-card[hidden] { display:none; }
.spell-compact .sp-card > :not(.spell-open) { display:none; }
.spell-open { width:100%; display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:16px; align-items:center; padding:14px; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.spell-open:hover { background:#edc97833; }
.spell-open:focus-visible { outline:3px solid #245b9e; outline-offset:2px; }
.spell-row-level { font-weight:bold; color:#725530; white-space:nowrap; }
.spell-detail-dialog > div { display:grid; grid-template-columns:52px minmax(0,1fr); gap:18px; margin-top:18px; }
.spell-detail-dialog .sp-learn { grid-column:1/-1; }
.spell-detail-dialog .npc-offers { max-height:none; }
@media(max-width:480px){.spell-open{gap:10px;padding:10px}.spell-open .sp-kind{display:none}}

/* Merchant catalogue: light display cards, with a compact ledger alternative. */
.item-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,175px),1fr)); gap:18px; }
.item-grid li { background:linear-gradient(145deg,#fffaf0,#f0dfb9); border:1px solid #c6ab76; border-radius:8px; box-shadow:0 3px 7px #61431c20; overflow:hidden; transition:transform .15s,box-shadow .15s; }
.item-grid li:hover { transform:translateY(-3px); box-shadow:0 6px 14px #61431c30; border-color:#9a712e; }
.item-grid a { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:22px 14px 18px; gap:10px; color:#433019; text-align:center; min-height:190px; text-decoration:none; }
.item-grid a:hover { background:transparent; }
/* Every card fills its grid row; role badges sit on the bottom edge so they
   line up across a row whatever the name length. */
.item-grid li { display:flex; }
.item-grid li > a { flex:1 1 auto; min-width:0; }
.item-grid a > .town-roles { margin-top:auto; }
/* Role icons are 32px badges, not card portraits: drop the portrait padding
   and halo that made them overflow to the right of their badge. */
.item-grid .town-role img { padding:0; background:none; filter:none; }
.item-grid img { width:64px; height:64px; padding:12px; box-sizing:content-box; background:radial-gradient(ellipse,#d7bf8755,transparent 70%); border:0; image-rendering:pixelated; filter:drop-shadow(2px 4px 2px #65451c35); }
.item-grid b { font:700 17px Georgia,serif; text-transform:capitalize; }
.item-grid small { color:#80663e; font-size:11px; border-top:1px solid #c5ac7644; padding-top:8px; width:100%; }
.item-view-tools { display:flex; justify-content:flex-end; gap:5px; margin:12px 0; }
.item-view-tools .btn { background:#f6ecd5; color:#624c29; border:1px solid #bda170; box-shadow:none; padding:8px 14px; height:auto; font:700 13px Arial; text-shadow:none; }
.item-view-tools .btn[aria-pressed="true"] { background:#173957; color:#ffe1a1; border-color:#173957; }
[data-item-cards][hidden],[data-item-table][hidden] { display:none!important; }
.item-table-wrap { overflow-x:auto; border:1px solid #c6ab76; border-radius:6px; }
.item-catalogue-table { width:100%; border-collapse:collapse; background:#fff8e7; }
.item-catalogue-table th { background:#173957; color:#ffe1a1; text-align:left; padding:12px; }
.item-catalogue-table td { padding:10px 12px; border-bottom:1px solid #dfcfaa; }
.item-catalogue-table tr:nth-child(even) { background:#f3e7cd; }
.item-catalogue-table td:first-child a { display:flex; gap:14px; align-items:center; color:#433019; text-decoration:none; }
.item-catalogue-table img { image-rendering:pixelated; object-fit:contain; }
@media(max-width:540px){.item-catalogue-table td:last-child,.item-catalogue-table th:last-child{display:none}}
.item-detail-dialog { padding:0; border-radius:8px; }
.item-modal-header { margin:0 0 20px; }
.item-modal-header > div { flex:1; }
.item-detail-dialog .item-library > :not(.item-modal-header) { margin-left:20px; margin-right:20px; }
.item-detail-dialog .npc-offers { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:10px; padding:0; }
.item-detail-dialog .npc-offers li { display:grid; grid-template-columns:64px minmax(0,1fr); gap:8px; }
.item-detail-dialog .npc-offers li[hidden] { display:none; }
.item-detail-dialog .npc-offers li > div { display:flex; flex-direction:column; gap:8px; align-items:start; }
.item-detail-dialog .npc-location { grid-column:2; }
/* Parchment spell cards and shared catalogue dialogs. */
.spellbook .sp-list.spell-compact { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr)); gap:28px 24px; padding-top:14px; }
.spellbook .spell-compact .sp-card { border:0; background:none; box-shadow:none; overflow:visible; }
.spellbook .spell-open.btn { position:relative; display:flex; flex-direction:column; justify-content:center; gap:12px; min-height:206px; height:auto; white-space:normal; line-height:1.3; padding:30px 22px; border:1px solid #bd9c60; border-radius:3px; background:#f2dfb1 url('../assets/generated/ui/parchment.png') center/cover; box-shadow:inset 0 0 28px #a2702333,0 5px 8px #44321c30; color:#49351d; text-shadow:none; text-align:center; }
.spellbook .spell-open::before,.spellbook .spell-open::after { content:''; position:absolute; left:-7px; right:-7px; height:13px; border:1px solid #ac874e; border-radius:6px; background:linear-gradient(#b88e4e,#f9e7bd 40%,#d2ad6b 80%,#a67d40); box-shadow:0 2px 3px #533b1c30; }
.spellbook .spell-open::before { top:-6px; }.spellbook .spell-open::after { bottom:-6px; }
.spellbook .spell-open .sp-icon { width:48px; height:48px; flex:none; border-radius:50%; box-shadow:0 0 0 2px #c5a266,0 3px 5px #57380f40; }
.spellbook .spell-open .sp-main h3 { display:block; margin:0 0 5px; font:700 19px Georgia,serif; }
.spellbook .spell-open .sp-kind { display:block; margin:5px 0; font:700 10px Arial; letter-spacing:1px; color:#87652e; }
.spellbook .spell-open .sp-words { font-style:italic; }
.spellbook .spell-row-level { border-top:1px solid #ac874e55; padding-top:10px; font-size:12px; }
.spell-detail-dialog { padding:0; border:2px solid #b89048; border-radius:8px; }
.spell-detail-dialog > div { display:block; margin:0; }
.spell-modal-header,.location-modal-header,.item-modal-header { display:flex; gap:18px; align-items:center; padding:20px 24px; background:#173957; color:#fff1cf; border-bottom:3px solid #b89048; }
.spell-modal-header .sp-main,.location-modal-header > div,.item-modal-header > div { flex:1; }
.spell-modal-header h3,.location-modal-header h3,.item-modal-header h3 { margin:0; color:#ffe1a1; font:700 24px var(--font-display,Georgia,serif); }
.spell-modal-header .sp-kind { color:#d4e0e7; }.spell-modal-header .sp-req b {color:#fff1cf}
.spell-modal-header .sp-vocs span { background:#ffffff18; color:#e4edf5; }
.spell-detail-dialog .sp-learn { padding:22px; border:0; }
.spell-detail-dialog select,.item-detail-dialog select { width:100%; padding:10px; margin-bottom:16px; }
.spell-detail-dialog .npc-offers { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:10px; max-height:none; padding:0; }
.spell-detail-dialog .npc-offers li { display:grid; grid-template-columns:64px minmax(0,1fr); gap:8px; padding:14px; border:1px solid #dbc395; border-radius:5px; background:#fffaf0; }
.spell-detail-dialog .npc-offers li[hidden] { display:none; }
.teacher-outfit { object-fit:contain; image-rendering:pixelated; grid-row:span 2; }
.spell-detail-dialog .npc-location { grid-column:2; }
.teacher-price { display:flex; align-items:center; gap:5px; color:#906116; }
.location-detail-dialog { padding:0; border-radius:8px; }.location-detail-dialog > div {padding:18px}
.location-modal-header p {margin:7px 0 0;color:#d4e0e7}
.npc-map-dialog .spell-modal-close { flex:0 0 36px; width:36px; height:36px; padding:0; border:1px solid #ffffff44; border-radius:4px; background:#ffffff12; color:white; box-shadow:none; font:24px Arial; text-shadow:none; cursor:pointer; }
.gold-coin-motion { display:inline-block; width:20px; height:20px; background-size:96px 96px; background-position:100% 100%; background-repeat:no-repeat; image-rendering:pixelated; animation:gold-turn 2.8s ease-in-out infinite; vertical-align:middle; }
@keyframes gold-turn {0%,30%,100%{transform:rotateY(0)}65%{transform:rotateY(180deg)}}
@media(prefers-reduced-motion:reduce){.gold-coin-motion{animation:none}}
.spellbook .sp-list[hidden],.spell-table-wrap[hidden],.spell-table-wrap tr[hidden] {display:none!important}
.spell-table-open.btn {display:flex;align-items:center;gap:12px;background:transparent;border:0;box-shadow:none;color:#433019;text-shadow:none;height:auto;padding:0;text-align:left;white-space:normal}
.spell-table-open .sp-icon {flex:0 0 40px;width:40px;height:40px}
/* Bestiary: field-guide specimens, distinct from spell scrolls and item cards. */
.bestiary .best-grid {grid-template-columns:repeat(auto-fill,minmax(min(100%,175px),1fr));gap:18px}
.bestiary .best-card {position:relative;padding:18px 12px 14px;gap:12px;background:linear-gradient(#f9efdb,#e9d6ad);border:1px solid #b69a68;border-radius:7px;box-shadow:0 3px 7px #432e1d22;overflow:hidden}
.bestiary .best-card.boss {border-color:#9f5644;background:linear-gradient(#f8eadd,#e9c7ac)}
.bestiary .best-pic {width:100%;height:108px;border-radius:4px;background:radial-gradient(ellipse at bottom,#6c816e66,transparent 68%),linear-gradient(#203a37,#132320);border:1px solid #a58b59;box-shadow:inset 0 0 15px #0007}
.bestiary .best-pic img {width:96px;height:96px;filter:drop-shadow(2px 4px 2px #0008)}
.best-name {font:700 18px Georgia,serif;color:#44331e;line-height:1.2}
.bestiary .best-stats {display:flex;justify-content:center;flex-wrap:wrap;gap:12px;color:#6e5432;font-size:12px}
.best-discover {border-top:1px solid #ad946055;padding-top:10px;width:100%;color:#285474;font-size:11px;font-weight:700}
.bestiary-intro,.hunt-note {color:#785e3b;line-height:1.6;margin:12px 0 20px}
.hunt-summary {font-size:12px;color:#6f5633}
.hunt-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:12px}
.hunt-place {padding:14px;background:#fff9eb;border:1px solid #dbc294;border-radius:5px}
.hunt-place-heading {display:flex;gap:10px;justify-content:space-between;color:#254b63;align-items:start}
.hunt-place-heading span {white-space:nowrap;font-size:11px;background:#ede0be;padding:4px 6px;border-radius:3px;color:#72522e}
.hunt-place p {font-size:12px;color:#80663e;margin:10px 0}
.mon-card .mon-kv {padding:12px;border:1px solid #c7ab74;border-radius:6px;background:#fff6df}
/* Shared full-page catalogue details and ledger tables. */
.catalogue-detail {min-width:0;max-width:100%;overflow-wrap:anywhere}
.catalogue-back {margin:0 0 18px}
.catalogue-detail .spell-modal-header,.catalogue-detail .item-modal-header {border-radius:6px;margin:0 0 20px;min-width:0}
.catalogue-detail header .sp-icon {flex:0 0 48px}
.catalogue-detail header .sp-main,.catalogue-detail header > div {min-width:0}
.catalogue-detail .sp-learn {border:0;padding:0}
.catalogue-detail .npc-offers {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:12px;max-height:none;padding:0;list-style:none}
.catalogue-detail .npc-offers li {display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;padding:14px;background:#fff9ec;border:1px solid #dbc294;border-radius:5px;min-width:0}
.catalogue-detail .npc-offers li > div {min-width:0;display:flex;flex-direction:column;align-items:start;gap:8px}
.catalogue-detail .npc-offers .npc-location {grid-column:2}
.catalogue-detail .npc-offers li.catalogue-empty,.catalogue-detail .npc-offers li:not([data-city]) {display:block;grid-column:1/-1;line-height:1.6}
.catalogue-detail .npc-offers li[hidden] {display:none}
.catalogue-city {display:flex;flex-direction:column;gap:7px;font-weight:bold;margin:16px 0}
.catalogue-city select {width:100%;max-width:100%;min-width:0;box-sizing:border-box;padding:10px}
.catalogue-detail .item-sources {display:flex;flex-wrap:wrap;gap:8px;line-height:1.6}
.catalogue-detail .item-sources a {padding:5px 9px;border:1px solid #ccb17d;border-radius:4px;background:#fff7df}
.item-catalogue-table td:first-child a {display:flex;align-items:center;gap:14px;font-weight:normal}
.item-catalogue-table td:first-child a > span {display:flex;flex-direction:column;gap:4px}
.item-catalogue-table td:first-child small {font-size:12px;color:#80663e}
.item-catalogue-table .sp-icon {flex:0 0 40px;width:40px;height:40px}
.item-catalogue-table td:last-child {white-space:nowrap}
.spell-open.btn {text-decoration:none}
/* Detail-page wayfinding and readable blue headers. */
.catalogue-breadcrumb {display:flex;align-items:center;gap:12px;margin:0 0 20px;color:#6f5736;font-size:13px;line-height:1.5}
.catalogue-breadcrumb ol {display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;list-style:none;padding:0;margin:0;min-width:0}
.catalogue-breadcrumb li {display:flex;align-items:center;gap:10px}
.catalogue-breadcrumb li+li::before {content:'›';color:#9e7e47;font-size:18px}
.catalogue-breadcrumb a {color:#1c557f;font-weight:700;text-decoration:none}
.catalogue-breadcrumb a:hover {text-decoration:underline;color:#123b61}
.catalogue-breadcrumb [aria-current] {color:#6f5736}
.catalogue-breadcrumb .catalogue-back-arrow {display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border:1px solid #bb9d64;border-radius:50%;background:#fff4d9;font:22px Georgia;text-decoration:none}
.aac.catalogue-detail .spell-modal-header h3,.aac.catalogue-detail .item-modal-header h3 {color:#ffe6ac;font-size:25px;line-height:1.25;margin:0 0 9px;text-shadow:0 1px 1px #071b2a}
.aac.catalogue-detail .spell-modal-header .sp-kind {display:block;color:#c7dfef;font-size:11px;letter-spacing:.8px;margin-top:6px}
.aac.catalogue-detail .spell-modal-header .sp-words {margin:10px 0 14px}
.aac.catalogue-detail .spell-modal-header .sp-words .gt {color:#fff2cc;text-shadow:none;font:italic 700 17px Georgia,serif}
.aac.catalogue-detail .spell-modal-header .sp-req,.aac.catalogue-detail .spell-modal-header .sp-req span,.aac.catalogue-detail .spell-modal-header .sp-req b {color:#e8f1f7;font-size:14px;text-shadow:none}
.aac.catalogue-detail .spell-modal-header .sp-req {display:flex;flex-wrap:wrap;gap:12px}
/* Consistent library detail stack: wayfinding, blue spotlight, information parchment. */
.aac.catalogue-detail {padding:0;background:none;border:0;box-shadow:none}
.catalogue-detail > .parch {margin-top:18px}
.catalogue-detail .catalogue-detail-body {padding:24px;min-width:0}
.catalogue-detail > header {margin:0!important;align-items:flex-start!important;border:1px solid #c39d53;border-bottom:3px solid #b58b3d;border-radius:5px;box-shadow:0 4px 9px #071a2d55;background:#173957;padding:24px;color:#eff5fa}
.catalogue-detail > header > .sp-icon,.catalogue-detail > header > img,.catalogue-detail > header > .char-portrait {align-self:flex-start;margin:0;flex-shrink:0}
.catalogue-detail > .mon-head .char-portrait {width:88px;height:88px;border-radius:5px;border:1px solid #ffffff33;background:#102b42}
.catalogue-detail > .mon-head .char-portrait img {width:80px;height:80px;object-fit:contain;position:static;transform:none}
.catalogue-detail > .mon-head h2 {color:#ffe6ac}
.catalogue-detail > .mon-head .char-sub {color:#d9e8f2}
.catalogue-detail .catalogue-breadcrumb {padding:12px 16px;margin:0 0 16px;background:#102d46;border:1px solid #b79857;border-radius:4px;box-shadow:0 2px 5px #06172740;font-size:14px;line-height:1.6;color:#f5e6c6}
.catalogue-detail .catalogue-breadcrumb a {color:#ffdc8c;font-weight:700}
.catalogue-detail .catalogue-breadcrumb a:hover {color:#fff4d7;text-decoration:underline}
.catalogue-detail .catalogue-breadcrumb [aria-current] {color:#f1f5f7;font-weight:600}
.catalogue-detail .catalogue-breadcrumb li+li::before {color:#b9ccda}
.catalogue-detail .catalogue-breadcrumb .catalogue-back-arrow {width:28px;height:28px;flex-basis:28px;border:0;border-right:1px solid #ffffff33;border-radius:0;background:none;box-shadow:none;font:24px Arial;padding-right:12px;margin-right:2px}
@media(max-width:540px){.catalogue-detail > header{padding:18px;gap:14px}.catalogue-detail .catalogue-detail-body{padding:18px}.catalogue-detail .catalogue-breadcrumb{font-size:12px;padding:10px}}

/* Scoped spellbook filter prototype. */
.spellbook .spell-filter-panel{margin:22px 0 26px;padding:18px;background:#fff9ed;border:1px solid #c9ac75;border-radius:8px;box-shadow:0 3px 10px #5c3a1812}
.spellbook .spell-filter-panel .best-tools{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(160px,1fr);gap:16px;margin:0 0 16px;align-items:end}
.spellbook .spell-filter-panel .best-search{grid-column:1;grid-row:1;display:grid;gap:7px;min-width:0}
.spellbook .spell-filter-panel .sp-voc{grid-column:2;grid-row:1;display:grid;gap:7px;min-width:0}
.spellbook .spell-field-label{font:700 12px var(--font-body);color:#71542d;text-align:left}
.spellbook .spell-filter-panel input,.spellbook .spell-filter-panel select{width:100%;min-width:0;box-sizing:border-box;height:44px;padding:10px 12px;border:1px solid #bea574;border-radius:5px;background:#fffdf7;color:#253b48;font-size:14px;box-shadow:none}
.spellbook .spell-filter-panel :is(input,select,button):focus-visible{outline:3px solid #2776aa;outline-offset:3px}
.spellbook .spell-filter-panel .tabs{display:flex;gap:6px;margin:0;padding:0 0 16px;justify-content:flex-start;flex-wrap:wrap;border-bottom:1px solid #dccca9}
.spellbook .spell-filter-panel .tab{flex:1;padding:9px 10px;min-height:40px;border:1px solid transparent;border-radius:5px;background:#eee5d2;color:#5a4528;box-shadow:none;text-shadow:none;font:700 12px var(--font-body);white-space:nowrap}
.spellbook .spell-filter-panel .tab:hover{background:#e3d3ae}
.spellbook .spell-filter-panel .tab[aria-pressed=true]{background:#173957;color:#fff0c7;border-color:#173957;box-shadow:inset 0 -3px #bd9346}
.spellbook .spell-filter-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:14px}
.spellbook .spell-results{font-size:12px;color:#725936}
.spellbook .spell-filter-footer .item-view-tools{display:flex;gap:2px;margin:0;padding:3px;border:1px solid #d3bf98;border-radius:6px;background:#eee5d2}
.spellbook .spell-filter-footer .item-view-tools .btn{padding:7px 10px;border:0;border-radius:3px;background:transparent;color:#644e31;box-shadow:none;text-shadow:none;font-size:12px;min-height:32px}
.spellbook .spell-filter-footer .item-view-tools .btn[aria-pressed=true]{background:#fffdf5;color:#173957;box-shadow:0 1px 4px #51381126}
@media(max-width:480px){.spellbook .spell-filter-panel{padding:14px}.spellbook .spell-filter-panel .best-tools{grid-template-columns:1fr}.spellbook .spell-filter-panel .sp-voc{grid-column:1;grid-row:2}.spellbook .spell-filter-panel .tab{flex:1 1 40%}.spellbook .spell-filter-footer{flex-wrap:wrap}}

.spellbook .spell-filter-panel .tabs{justify-content:center;border:0;padding-bottom:0}
.spellbook .spell-filter-panel .tab{flex:0 1 auto;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.spellbook .spell-filter-panel .tab img{object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.spellbook .spell-filter-panel{margin-bottom:0}
.spellbook .spell-filter-footer{padding:8px 2px;margin-bottom:0}
@media(max-width:540px){.spellbook .spell-filter-panel .tab{flex:1 1 40%}}

.spellbook .sp-list.spell-compact{margin-top:6px;padding-top:6px}

.spellbook .spell-filter-panel .tabs{gap:5px}
.spellbook .spell-filter-panel .tab{padding:8px 7px;font-size:11px;gap:4px}
.spellbook .spell-filter-panel .tab img{width:20px;height:20px}

/* Shared catalogue controls and parchment chapter titles. */
.aac .ph {position:relative;margin:0 0 24px;padding:22px 12px 27px;text-align:center;line-height:1.5}
.aac .ph::after {content:'';position:absolute;bottom:5px;left:12%;right:12%;height:7px;background:linear-gradient(90deg,transparent,#aa7e3b 25%,#d8b26c 50%,#aa7e3b 75%,transparent) center/100% 1px no-repeat;opacity:.8}
.catalogue-filters {display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin:20px 0 0;padding:18px;background:#fff9ed;border:1px solid #c9ac75;border-radius:8px;box-shadow:0 3px 10px #5c3a1812}
.catalogue-filters > label,.catalogue-filters > .pf {display:flex;flex:1 1 150px;flex-direction:column;gap:7px;min-width:0;font:700 12px var(--font-body);color:#71542d}
.catalogue-filters input,.catalogue-filters select,.catalogue-city select {box-sizing:border-box;width:100%;min-width:0;height:44px;padding:10px 12px;border:1px solid #bea574;border-radius:5px;background:#fffdf7;color:#253b48;font-size:14px;box-shadow:none}
.catalogue-filters .tabs,.catalogue-filters .chips {display:flex;justify-content:center;flex-wrap:wrap;gap:6px;width:100%;margin:0}
.catalogue-filters :is(.tab,.chip) {padding:9px 12px;border:1px solid transparent;border-radius:5px;background:#eee5d2;color:#5a4528;text-shadow:none;box-shadow:none;font:700 12px var(--font-body)}
.catalogue-filters :is(.tab,.chip)[aria-current=page] {background:#173957;color:#fff0c7;border-color:#173957;box-shadow:inset 0 -3px #bd9346}
.catalogue-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 2px;margin:0 0 6px;font-size:12px;color:#725936}
.catalogue-toolbar p {margin:0}.catalogue-toolbar .item-view-tools {margin:0;padding:3px;border:1px solid #d3bf98;border-radius:6px;background:#eee5d2;gap:2px}
.catalogue-toolbar .item-view-tools .btn {padding:7px 10px;border:0;border-radius:3px;background:transparent;color:#644e31;box-shadow:none;text-shadow:none;font-size:12px;min-height:32px}
.catalogue-toolbar .item-view-tools .btn[aria-pressed=true] {background:#fffdf5;color:#173957;box-shadow:0 1px 4px #51381126}
[data-catalogue-cards][hidden],[data-catalogue-table][hidden],.rpg-select-popup[hidden],select[hidden]{display:none!important}
.catalogue-detail > header h2,.catalogue-detail > header h3{color:#ffe6ac!important;margin-top:0}.catalogue-detail > header .char-sub{color:#e8f1f7}
.house-gallery {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:18px;list-style:none;padding:6px 0;margin:0}
.house-estate{display:block;overflow:hidden;border:1px solid #b89657;border-radius:6px;background:#fff8e8;box-shadow:0 3px 8px #63401d20;text-decoration:none;color:#4b351d}
.house-estate:hover{border-color:#79571f;box-shadow:0 5px 13px #63401d38}
.estate-image{position:relative;height:160px;background:#14252d;overflow:hidden;display:grid;place-items:center}
.estate-image>img{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}.estate-image>img.estate-key{width:48px;height:48px;object-fit:contain}
.estate-image .pill{position:absolute;bottom:9px;left:10px}.estate-info{padding:16px}.estate-info h3{font:700 19px Georgia,serif;margin:8px 0!important;color:#4b351d}.estate-info small{font-size:11px;color:#80613b}.estate-info p{font-size:12px;margin:8px 0}.estate-more{display:block;margin-top:14px;font-size:12px;color:#1c557f}
.house-filters>label{flex-basis:130px}.house-page .house-head>div{flex:1}.char-card.catalogue-detail>.parch{margin-top:18px}
/* Searchable selector shared by spell types and other catalogue filters. */
.rpg-select {position:relative;width:100%;min-width:0;text-align:left}
.aac .rpg-select .rpg-select-trigger.btn {display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:9px 12px;background:#fffdf7;color:#253b48;border:1px solid #bea574;border-radius:5px;box-shadow:none;text-shadow:none;font:600 13px var(--font-body);text-align:left;white-space:normal}
.rpg-select-trigger>span:not(.select-chevron){flex:1}.select-chevron{color:#8b6836;width:16px;height:16px;flex:0 0 16px;transition:transform .15s ease}.rpg-select-trigger[aria-expanded=true] .select-chevron{transform:rotate(180deg)}.rpg-select img{object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.rpg-select-popup {position:absolute;z-index:50;top:calc(100% + 7px);left:0;width:100%;min-width:210px;max-width:min(360px,80vw);padding:9px;box-sizing:border-box;background:#fff9e9;border:1px solid #ae8746;border-radius:7px;box-shadow:0 10px 28px #1a243655}
.rpg-select-popup input {width:100%;height:38px!important;margin:0 0 7px!important;padding:8px 10px!important;font:13px var(--font-body)}
.rpg-select-options{max-height:240px;overflow:auto;overscroll-behavior:contain}.rpg-select-option{display:flex;align-items:center;gap:9px;min-height:38px;padding:7px 9px;border-radius:4px;font:600 13px var(--font-body);color:#49371d;cursor:pointer}.rpg-select-option[aria-selected=true]{background:#173957;color:#fff0c7}.rpg-select-option:hover,.rpg-select-option.is-focused{background:#e9d8b4;color:#302718}.rpg-select-popup p{font-size:12px;color:#705936;padding:8px}
.rpg-select-trigger:focus-visible,.rpg-select-popup input:focus-visible{outline:3px solid #2776aa;outline-offset:2px}
.spellbook .spell-filter-panel .best-tools{grid-template-columns:1fr 1fr;margin:0}
.spellbook .spell-filter-panel .best-search{grid-column:1/-1;grid-row:1}
.spellbook .spell-filter-panel .sp-voc{grid-column:1;grid-row:2}
.spellbook .spell-type-field{grid-column:2;grid-row:2;display:grid;gap:7px;font:700 12px var(--font-body);color:#71542d;min-width:0}
.catalogue-city{padding:16px;background:#fff9ed;border:1px solid #c9ac75;border-radius:7px;margin:0 0 22px}
@media(max-width:480px){.catalogue-filters{padding:14px}.spellbook .spell-filter-panel .best-tools{grid-template-columns:1fr}.spellbook .spell-filter-panel .sp-voc{grid-row:2}.spellbook .spell-type-field{grid-column:1;grid-row:3}.rpg-select-popup{min-width:0;max-width:100%}.catalogue-toolbar{flex-wrap:wrap}.aac .ph{padding-top:20px}}

.aac .ph{background:linear-gradient(90deg,transparent,#aa7e3b 25%,#d8b26c 50%,#aa7e3b 75%,transparent) center bottom 5px/76% 1px no-repeat}
.aac .ph::after{position:static;left:auto;right:auto;bottom:auto;width:8px;height:8px;background:#e8901f;transform:rotate(45deg);opacity:1}

/* Keep informational notices clear of adjacent catalogue tables. */
.catalogue-detail-body > .item-table-wrap + .note{margin-top:20px}

/* Medieval frames for filter desks, avoiding flat application panels. */
.catalogue-city,.catalogue-filters,.spellbook .spell-filter-panel {position:relative;border:1px solid #97733d;border-radius:2px;background:linear-gradient(90deg,#92652a12,transparent 12%,transparent 88%,#92652a12),var(--tex-parchment,#f5e6c3);box-shadow:inset 0 0 0 3px #fff4d377,inset 0 0 22px #a3783c22,0 3px 5px #50321024;padding:20px}
.catalogue-city::before,.catalogue-filters::before,.spellbook .spell-filter-panel::before {content:'';position:absolute;inset:5px;pointer-events:none;border:1px solid #b18b4e77;background:linear-gradient(#8f6935,#8f6935) left top/12px 2px no-repeat,linear-gradient(#8f6935,#8f6935) right bottom/12px 2px no-repeat,linear-gradient(#8f6935,#8f6935) left top/2px 12px no-repeat,linear-gradient(#8f6935,#8f6935) right bottom/2px 12px no-repeat}
.catalogue-city{font-family:var(--font-display,Georgia,serif);font-size:13px;color:#65451e;letter-spacing:.03em}
.aac .rpg-select .rpg-select-trigger.btn,.catalogue-filters input,.spellbook .spell-filter-panel input,.pf input,.pf select,.pf textarea {border-radius:3px;background:#fffaf0;border-color:#ab8954;box-shadow:inset 0 1px 3px #70502412}
.rpg-select-popup{border-radius:3px;background:#fff5df;border-color:#99713c;box-shadow:0 8px 22px #34230d55,inset 0 0 0 3px #e8d3a6}
/* Override legacy AAC input specificity so catalogue searches match selectors. */
.aac .catalogue-filters input[type=search] {appearance:none;box-sizing:border-box;width:100%;min-width:0;height:44px;min-height:44px;margin:0;padding:9px 12px;border:1px solid #ab8954;border-radius:3px;background:#fffaf0;color:#253b48;box-shadow:inset 0 1px 3px #70502412;font:600 13px var(--font-body)}
.aac .catalogue-filters input[type=search]:focus-visible {outline:3px solid #2776aa;outline-offset:2px}
/* Auction desk: framed deed, key emblem, ledger facts and signed bid form. */
.house-auction{margin:28px 0 20px;border:1px solid #8c6835;border-radius:3px;background:#fff5df;box-shadow:0 4px 12px #51341425,inset 0 0 0 4px #e8d3a6;overflow:visible}
.auction-banner{display:flex;align-items:center;gap:15px;padding:20px;background:linear-gradient(110deg,#243a43,#182a32);border-bottom:3px double #b48b47;color:#f7e2af}
.aac .auction-banner h3{margin:0;color:#ffe3a2;font:700 24px var(--font-display,Georgia,serif);text-shadow:0 2px 1px #0008}
.auction-banner p{margin:5px 0 0;color:#e0d1b0;font-size:12px}.auction-banner>div:nth-child(2){flex:1;min-width:0}
.auction-emblem{display:grid;place-items:center;flex:0 0 62px;height:62px;border:3px double #ba9250;background:#10212a;box-shadow:inset 0 0 12px #0006;transform:rotate(-4deg)}
.auction-emblem img{image-rendering:pixelated;transform:rotate(4deg)}.auction-scroll{image-rendering:pixelated;opacity:.9}
.auction-body{padding:22px;background:linear-gradient(90deg,#a3753010,transparent 12%,transparent 88%,#a3753010)}
.auction-body>p:first-child{margin-top:0}.house-auction .kv{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}.house-auction .house-bid{max-width:none;padding:20px 0 8px;margin:20px 0 0;border-top:1px solid #cab17c}
.house-auction .pf label{font-size:13px;color:#65451e}.auction-amount{display:flex;align-items:stretch;gap:8px}.aac .house-auction .auction-amount input{flex:1;min-width:0;width:100%;padding:10px 12px}.auction-amount>span{display:flex;align-items:center;padding:0 12px;background:#e8d5ac;border:1px solid #ab8954;border-radius:3px;font-weight:700;color:#65451e}.house-bid small{display:block;margin-top:7px;line-height:1.5}
.auction-clock{display:grid;gap:5px;padding:16px;margin-bottom:18px;border:1px solid #a78449;border-left:4px solid #ae751a;background:#fff8e7}.auction-clock small{font-weight:700;color:#76511f}.auction-clock strong{font-size:20px;color:#244c66;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.auction-clock span{font-size:12px;color:#655236}.auction-guide{margin-top:20px;padding-top:18px;border-top:1px solid #d4bc8d}.auction-guide h4{margin:0 0 14px;font-size:18px}.auction-guide ol{padding-left:24px;margin:0;display:grid;gap:14px}.auction-guide li::marker{font-weight:800;color:#9b6518}.auction-guide p{font-size:13px;line-height:1.6;margin:5px 0 0;color:#655236}.auction-example{padding:14px;margin-top:18px;background:#f2e4c5;border:1px solid #d4bc8d;border-radius:4px}.auction-guide .auction-delivery{margin-top:14px}
@media(max-width:480px){.auction-banner{padding:16px;gap:12px}.auction-body{padding:16px}.auction-emblem{flex-basis:48px;height:48px}.auction-scroll{display:none}.aac .auction-banner h3{font-size:20px}}

/* Keep character search compact and within its own profile parchment. */
.character-search-section{margin-top:22px;padding:24px;box-sizing:border-box}
.char-search.catalogue-filters{max-width:none;margin:0;display:grid;grid-template-columns:minmax(0,1fr) auto}
.char-search.catalogue-filters .pf label{flex:none;margin:0}
@media(max-width:480px){.character-search-section{padding:18px}.char-search.catalogue-filters{grid-template-columns:1fr}}
.aac .char-search.catalogue-filters{padding:20px;box-sizing:border-box}

/* Vocation eligibility from the configured teaching offer. */
.teacher-vocations{display:flex;flex-wrap:wrap;gap:4px;margin:7px 0}.teacher-vocations span{font:700 11px var(--font-body);line-height:1.4;color:#173957;background:#e8dfc7;border:1px solid #c9b787;border-radius:3px;padding:2px 6px}
/* Wiki catalogues: real tables and GET filters, with contained scrolling on small screens. */
.wiki-library { min-width: 0; }
.wiki-library .wiki-intro { margin: 10px 0 18px; color: #5d503c; line-height: 1.6; }
.wiki-library .wiki-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid #bfa678; }
.wiki-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #bda477; border-radius: 3px; background: #efe3c8; color: #4d3c24; text-decoration: none; font-size: 13px; font-weight: 700; }
.wiki-tabs a:hover { background: #e4d0a4; }
.wiki-tabs a[aria-current] { color: #ffe4a6; background: #192e40; border-color: #a67c36; box-shadow: inset 0 -2px #c99b47; }
.wiki-tabs small { opacity: .75; font-variant-numeric: tabular-nums; }
.wiki-library :is(a,input,select,button,[tabindex]):focus-visible { outline: 2px solid #236c9b; outline-offset: 3px; }
.wiki-results { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin: 18px 0 9px; font-size: 13px; color: #4e412e; }
.wiki-results strong { color: #192e40; }
.wiki-results span { margin-left: auto; font-size: 11px; color: #6b5b43; }
.wiki-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #aa9062; border-radius: 3px; scrollbar-color: #b69a65 #e6d7b7; }
.wiki-library .wiki-table { width: 100%; min-width: 740px; margin: 0; border-collapse: collapse; font-size: 12px; line-height: 1.4; color: #342b20; }
.wiki-library .wiki-table :is(th,td) { padding: 10px 9px; text-align: left; vertical-align: middle; border: 0; border-bottom: 1px solid #d1c09c; }
.wiki-library .wiki-table thead th { background: #1d3345; color: #f8dfab; font-size: 11px; white-space: nowrap; font-weight: 700; }
.wiki-table thead a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.wiki-table thead a:hover { color: #fff; text-decoration: underline; }
.wiki-library .wiki-table tbody tr { background: #f3e9d1; }
.wiki-library .wiki-table tbody tr:nth-child(even) { background: #eaddbd; }
.wiki-library .wiki-table tbody tr:hover, .wiki-library .wiki-table tbody tr:focus-within { background: #e3d09f; }
.wiki-table tbody tr:last-child :is(th,td) { border-bottom: 0; }
.wiki-library .wiki-table .wiki-name { display: flex; align-items: center; gap: 10px; min-width: 155px; color: #315d78; font-size: 13px; font-weight: 700; text-decoration: none; }
.wiki-table .wiki-name:hover { text-decoration: underline; }
.wiki-name > img, .wiki-icon { flex: 0 0 32px; width: 32px; height: 32px; image-rendering: pixelated; }
.wiki-icon { display: grid; place-items: center; color: #b07726; }
.wiki-table small, .wiki-facts small { display: block; font-size: 10px; font-weight: 400; }
.wiki-words { color: #795f35; font-style: italic; margin-top: 3px; }
.wiki-vocations { display: flex; flex-direction: column; gap: 1px; font-size: 11px; }
.wiki-muted { color: #76674f; }
.wiki-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wiki-account { display: inline-block; font-size: 10px; color: #596248; }
.wiki-account.is-premium { color: #855511; font-weight: 700; }
.wiki-footnote { color: #6b5b43; font-size: 11px; line-height: 1.7; margin: 12px 0; }
.wiki-empty { padding: 32px !important; text-align: center !important; color: #6b5b43; }
.wiki-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); gap: 1px; background: #c7b08a; border: 1px solid #c7b08a; }
.wiki-facts > div { padding: 12px; background: #f1e5c9; }
.wiki-facts dt { color: #736040; font-size: 11px; margin-bottom: 5px; }
.wiki-facts dd { margin: 0; color: #302a23; font-weight: 700; }
@media (max-width: 600px) {
  .wiki-tabs a { padding: 8px 10px; }
  .wiki-results span { width: 100%; margin-left: 0; }
}

/* Auction timer and private escrow summary use existing game sprites. */
.auction-clock{display:flex;align-items:center;gap:18px;padding:20px;border:3px double #d7ad59;background:linear-gradient(135deg,#18364b,#0d2436);box-shadow:inset 0 0 0 2px #081b29,0 3px 0 #6d4c24}
.auction-clock-art{display:grid;place-items:center;flex:0 0 68px;height:76px;background:#0a1d2a;border:1px solid #6f603b;box-shadow:inset 0 0 14px #0008}
.auction-clock-art img{image-rendering:pixelated;animation:auction-hourglass 6s steps(1,end) infinite}
.auction-clock-copy{display:grid;gap:7px;min-width:0}.auction-clock-copy small{color:#eac679;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.auction-clock-copy strong{color:#fff1bc;font:700 clamp(18px,2.4vw,26px)/1.3 Consolas,monospace;text-shadow:2px 2px #000}.auction-clock-copy>span{color:#c1d2da;font-size:12px}
@keyframes auction-hourglass{0%,85%{transform:rotate(0)}90%,100%{transform:rotate(180deg)}}
.auction-my-bid{margin:18px 0;border:2px solid #b39455;background:linear-gradient(120deg,#fff9e8,#f2e2b9);box-shadow:inset 0 0 0 2px #fff6dd;padding:18px}.auction-my-bid header{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.auction-my-bid header img{image-rendering:pixelated;flex-shrink:0}.auction-my-bid header>div{display:grid;gap:3px;flex:1}.auction-my-bid header small{font-weight:700;font-size:12px;color:#71542b}.auction-my-bid header strong{font:700 27px/1.2 Georgia,serif;color:#4a351b}.auction-my-bid header strong span{font:700 13px var(--font-body)}.auction-bid-state{padding:5px 10px;background:#e5efd3;border:1px solid #6a853d;color:#365b23;border-radius:3px;font-size:12px;font-weight:800}.is-outbid .auction-bid-state{background:#f7dfcb;color:#8b421e;border-color:#bb7448}.auction-bid-character{margin:10px 0 14px;font-weight:700;font-size:13px}.auction-bid-character span{font-weight:400;color:#796342}.auction-reserve{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid #d4bc8d;border-bottom:1px solid #d4bc8d;padding:12px 0}.auction-reserve>span{display:grid;gap:4px;font-size:11px;color:#796342;flex:1;min-width:95px}.auction-reserve b{font-size:14px;color:#49381e;white-space:nowrap}.auction-reserve i{font-style:normal;color:#987339}.auction-bid-hint{font-size:12px;line-height:1.5;margin:12px 0 0;color:#6a5534}
@media(max-width:480px){.auction-clock{padding:14px;gap:12px}.auction-clock-art{flex-basis:44px;height:60px}.auction-clock-art img{width:48px;height:48px}.auction-clock-copy strong{font-size:18px}.auction-my-bid{padding:14px}.auction-reserve{gap:8px}.auction-reserve>span{min-width:75px}.auction-reserve i{display:none}}
@media(prefers-reduced-motion:reduce){.auction-clock-art img{animation:none}}

.auction-amount>span img{display:block;image-rendering:pixelated}

/* Quest rows must not inherit the white links used by column headings. */
.quest-library .quest-table { min-width: 580px; table-layout: fixed; }
.quest-library .quest-table thead th:nth-child(1) { width: 34%; }
.quest-library .quest-table thead th:nth-child(2) { width: 10%; }
.quest-library .quest-table thead th:nth-child(3) { width: 12%; }
.quest-library .quest-table thead th:nth-child(4) { width: 44%; }

.quest-library .quest-table tbody th { font-family: var(--font-body); font-weight: 400; text-align: left; }
.quest-library .quest-table tbody th a { color: #175482; font-size: 15px; line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; }
.quest-library .quest-table tbody th a:hover { color: #703d0f; }
.quest-library .quest-table tbody :is(th,td) { vertical-align: top; padding: 14px 10px; line-height: 1.45; }
.quest-location, .quest-level small { display: block; margin-top: 6px; color: #695339; font-size: 12px; font-weight: 400; }
.quest-location, .quest-reward-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.quest-level { font-variant-numeric: tabular-nums; }
.quest-detail-link { display: inline-block; margin-top: 7px; font-size: 12px; }
.quest-status { display: inline-block; border: 1px solid #99b2c1; border-radius: 4px; padding: 4px 6px; color: #183b51; background: #e5eef4; font-size: 11px; font-weight: 600; line-height: 1.4; }
.quest-status--issue { color: #80320e; background: #fff0d0; border-color: #d5a34b; }
.task-library .task-table { min-width: 520px; }
.task-library .task-table tbody :is(th,td) { vertical-align: middle; padding: 10px; line-height: 1.45; text-align: left; }
.task-library .task-table tbody th { font-family: var(--font-body); font-weight: 400; }
.task-library .task-table td small { display: block; color: #4d5a63; font-size: 12px; }
.task-library .task-name { display: inline-flex; align-items: center; gap: 8px; color: #175482; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.task-library .task-name:hover { color: #703d0f; }
.task-library .task-name img { flex: 0 0 32px; }
.task-library .task-table { table-layout: fixed; min-width: 680px; }
.task-library .task-table thead th:nth-child(1) { width: 27%; }
.task-library .task-table thead th:nth-child(2) { width: 19%; }
.task-library .task-table thead th:nth-child(3) { width: 10%; }
.task-library .task-table thead th:nth-child(4) { width: 9%; }
.task-library .task-table thead th:nth-child(5) { width: 35%; }
.task-library .task-table tbody :is(th,td) { vertical-align: top; padding: 12px 10px; }
.task-library .task-table tbody th .task-badge { margin: 6px 0 0 40px; }
.task-library .task-table .task-repeat { margin: 4px 0 0 40px; }
.task-library .task-reward-list { gap: 4px; }
.task-library .task-reward-list :is(a,.quest-reward-list-benefit) { min-height: 32px; font-size: 12.5px; }
.task-library .task-reward-list li[data-reward-kind="exp"] span:last-child { color: #2d5620; }
.task-library .task-reward-list li[data-reward-kind="gold"] span:last-child { color: #7a4f00; }
.task-library .task-reward-list li[data-reward-kind="boss"] img { background: radial-gradient(circle at 50% 40%, #6b3a33, #3a1f1b 75%); }
.task-badge { display: inline-block; padding: 1px 7px; border: 1px solid; border-radius: 3px; font: 800 10.5px/1.5 var(--font-body); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.task-badge--special { color: #7b2412; background: #fbe3d6; border-color: #d68a6b; }
.task-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.task-card-head { display: flex; align-items: center; gap: 12px; }
.task-card-head > div { min-width: 0; }
.task-badges { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 0; }
.task-badges .quest-account { font-size: 10.5px; line-height: 1.5; }
.task-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.task-summary dd { overflow-wrap: anywhere; }
.task-library .task-table .task-reward-list img { flex-basis: 24px; width: 24px; height: 24px; padding: 1px; }
.task-library .task-table .task-reward-list :is(a,.quest-reward-list-benefit) { min-height: 26px; gap: 7px; font-size: 12px; }
.task-card .quest-card-place a { color: #175482; font-weight: 700; }
.task-card .quest-card-place a:hover { color: #703d0f; }
.task-portrait { flex: 0 0 64px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 6px; background: radial-gradient(circle at 50% 45%, #5c513f, #2f281e 78%); box-shadow: inset 0 0 0 1px #1f1a13, inset 1px 1px 0 2px #6f6350, 0 2px 4px #61431c40; }
.task-portrait img { width: 64px; height: 64px; image-rendering: pixelated; object-fit: contain; }
.task-card--special { background: linear-gradient(160deg, #fff6ec, #f4dcc4); border-color: #c99470; }
.task-card .quest-summary dd { font-size: 13.5px; }
.task-card-more { align-self: flex-start; margin-top: 12px; color: #175482; font: 700 13px/1.3 var(--font-body); text-decoration: underline; text-underline-offset: 3px; }
.task-card-more:hover { color: #703d0f; }
.task-card-more:focus-visible { outline: 2px solid #2477ad; outline-offset: 2px; border-radius: 2px; }
.task-detail :is(.task-rewards, .task-notes) { margin: 8px 0 0; padding-left: 18px; line-height: 1.5; }
.task-detail .task-notes { font-size: 13px; color: #49351f; }
.task-detail .task-rewards a { display: inline-flex; align-items: center; gap: 4px; }
.task-detail .task-heading > img { image-rendering: pixelated; object-fit: contain; }
.task-detail .task-creatures a > span { display: flex; flex-direction: column; }
.task-detail .task-creatures small { color: #705735; font-size: 11px; line-height: 1.3; text-decoration: none; display: inline-block; }
.task-detail .task-npc { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.task-detail .task-npc img { flex: 0 0 48px; image-rendering: pixelated; object-fit: contain; }
.task-detail .task-npc a { color: #12558a; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.task-detail .task-npc small { display: block; color: #705735; font-size: 12px; line-height: 1.5; }
.task-detail .task-tracking code, .task-detail .quest-reward-condition code { white-space: nowrap; }
.task-detail .task-period > summary { cursor: pointer; color: #49351f; font-weight: 700; }
.task-detail .task-period[open] > summary { margin-bottom: 8px; }
.task-detail .task-period ul { margin: 0 0 8px; padding-left: 18px; }
@media (max-width: 540px) { .task-detail.aac .monster-hunts .hunt-table thead th { white-space: nowrap; font-size: 11px; padding-left: 6px; padding-right: 6px; } .task-detail.aac .monster-hunts .hunt-table thead th:first-child { width: 34%; } .task-detail.aac .monster-hunts .hunt-table thead th:nth-child(2), .task-detail.aac .monster-hunts .hunt-table thead th:nth-child(3) { width: 18%; } .task-detail.aac .monster-hunts .hunt-table tbody :is(th, td) { padding-left: 6px; padding-right: 6px; } }
.quest-status--unknown { color: #655339; background: #f4ebda; border-color: #cbb998; }
.quest-review-panel { border: 1px solid #b98e4a; padding: 16px; margin: 18px 0; background: #fff8e8; }
.quest-source-path { overflow-wrap: anywhere; font: 12px monospace; }
.quest-muted { color: #695339; font-size: 12px; }
/* Guide reference tables: row labels read as text, not as stone header cells. */
.quest-guide-table-intro { margin: 0 0 10px; line-height: 1.6; font-size: 14px; }
.quest-guide-table .twrap { margin: 6px 0 0; }
.quest-guide-table .tt tbody th { background: none; color: var(--ink); text-shadow: none; font: 700 14px/1.45 var(--font-body); white-space: normal; border-bottom: 1px solid #b08a5544; border-radius: 0; vertical-align: top; }
.quest-guide-table .tt td { vertical-align: top; line-height: 1.5; }
.quest-guide-table .tt th:first-child { min-width: 7.5em; }
.quest-guide-table .tt tr:nth-child(even) th { background: #d9b97a33; }
.quest-library .item-grid .quest-status { margin-top: 8px; }

/* Shared catalogue help works with hover, keyboard focus and touch. */
.catalogue-help { display:inline-flex; vertical-align:middle; }
.aac .catalogue-help > button { display:grid; place-items:center; width:24px; height:24px; min-height:24px; box-sizing:border-box; padding:0; margin:0 0 0 4px; border:1px solid #9b8055; border-radius:50%; background:#fff8e8; color:#285675; font:bold 13px/1 var(--font-body); cursor:help; box-shadow:none; }
.aac .catalogue-help > button:focus-visible { outline:2px solid #2477ad; outline-offset:2px; }
.catalogue-help [role=tooltip] { position:absolute; z-index:30; bottom:calc(100% + 8px); left:0; width:300px; max-width:calc(100vw - 72px); box-sizing:border-box; padding:12px; border:1px solid #b9914b; border-radius:4px; background:#193b53; color:#fff4d9; box-shadow:0 4px 12px #0004; font:400 12px/1.55 var(--font-body); text-align:left; }
.quest-results { position:relative; display:flex; align-items:center; white-space:nowrap; }
.quest-results [role=tooltip] { white-space:normal; }
.quest-toolbar { min-height:40px; }
.quest-toolbar .item-view-tools { margin-left:auto; flex-shrink:0; }
.bestiary .bestiary-filters { display:grid; grid-template-columns:1.4fr 1fr 1fr; }
.spell-yield { display:flex; align-items:center; gap:5px; margin-top:5px; color:#516344; font:600 12px/1.4 var(--font-body); }
.spell-yield img { object-fit:contain; image-rendering:pixelated; flex:0 0 20px; }
@media(max-width:600px) { .bestiary .bestiary-filters { grid-template-columns:1fr 1fr; } .bestiary-filters .best-search { grid-column:1 / -1; } }

.spell-modal-header .spell-yield { display:inline-flex; padding:5px 8px; border:1px solid #58788d; border-radius:3px; background:#102d41; color:#ffe1a1; font-size:13px; }

/* Keep the creature identity and all seven attributes in the same spotlight. */
.mon-card > .mon-head { display:grid; grid-template-columns:88px minmax(0,1fr); gap:16px 20px; }
.mon-card > .mon-head .char-id { align-self:center; }
.monster-stats { display:grid; grid-column:1 / -1; }
.hunt-table-wrap { max-width:100%; overflow-x:auto; }
.aac .monster-hunts .hunt-table { width:100%; margin:0; table-layout:fixed; }
.aac .monster-hunts .hunt-table thead th:first-child { width:42%; }
.aac .monster-hunts .hunt-table thead th:nth-child(2),.aac .monster-hunts .hunt-table thead th:nth-child(3) { width:14%; }
.aac .monster-hunts .hunt-table tbody th { color:#285474; text-align:left; font:800 13px/1.4 var(--font-body); }
.hunt-table small { display:block; margin-top:3px; color:#7a6343; font-size:11px; font-weight:400; }
.hunt-table .npc-location { margin:0; }
.hunt-table summary { white-space:nowrap; font-size:12px; }

/* Quest details put the route before the technical review. */
.quest-heading { display:flex; gap:16px; align-items:flex-start; }
.quest-heading > img { padding:6px; border:1px solid #a58a55; border-radius:4px; background:#102d43; image-rendering:pixelated; }
.aac .quest-heading h2 { margin:5px 0 10px; color:#ffe4a5; font:700 26px/1.2 var(--font-display); overflow-wrap:anywhere; }
.aac .quest-heading p { margin:0; color:#e1eaf0; font-size:14px; line-height:1.6; }
.quest-eyebrow { color:#d6c49e; font-size:11px; text-transform:uppercase; letter-spacing:1px; }
.quest-jump { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:15px; }
.aac .quest-jump a { color:#ffdf94; font-size:12px; font-weight:700; text-decoration:none; }
.quest-detail > .quest-section { margin-top:20px; padding:22px; background:linear-gradient(115deg,#fff9e7aa,#f9edcf77),var(--tex-parchment,#f9edcf); border:1px solid #c7ab74; border-radius:6px; box-shadow:inset 0 0 0 3px #fff8e344; }
.quest-section > .ph { padding-top:0; margin-top:0; }
.quest-facts { display:grid; grid-template-columns:1fr 1fr; margin:0; gap:16px; }
.quest-facts > div { padding-bottom:12px; border-bottom:1px solid #cfb785; }
.quest-facts dt { color:#7a5c30; font-size:11px; font-weight:800; text-transform:uppercase; }
.quest-facts dt small { font-size:10px; font-weight:400; text-transform:none; }
.quest-facts dd { margin:5px 0 0; color:#203e50; font-weight:700; font-size:14px; line-height:1.5; }
.quest-preparation { margin:17px 0 0; padding-left:20px; line-height:1.7; font-size:13px; }
.quest-npcs { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:16px; font-size:13px; }
.quest-rewards { display:flex; gap:15px; align-items:center; scroll-margin-top:180px; }
.quest-rewards > img { flex:0 0 40px; image-rendering:pixelated; }
.aac .quest-rewards h3 { margin:0 0 6px; font:700 18px var(--font-display); color:#18394d; }
.aac .quest-rewards p { margin:0 0 6px; font-weight:700; line-height:1.5; }
.quest-rewards small,.quest-guide-scope { color:#705735; font-size:12px; line-height:1.6; }
.quest-guide { scroll-margin-top:180px; }
.aac .quest-guide-scope { margin:0 0 20px; }
.quest-walkthrough { counter-reset:quest-step; list-style:none; padding:0; margin:0; }
.quest-walkthrough > li { counter-increment:quest-step; display:flex; gap:14px; position:relative; padding:0 0 23px; margin:0; }
.quest-walkthrough > li::before { content:counter(quest-step); display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; border:1px solid #ac853c; border-radius:50%; background:#19394f; color:#ffe1a0; font:700 16px Georgia,serif; }
.quest-walkthrough > li:not(:last-child)::after { content:''; position:absolute; left:15px; top:35px; bottom:5px; border-left:1px solid #c2a268; }
.quest-walkthrough > li > div { min-width:0; flex:1; }
.aac .quest-walkthrough h4 { margin:3px 0 8px; color:#18394d; font:700 17px/1.3 var(--font-display); }
.aac .quest-walkthrough p { margin:0; line-height:1.7; font-size:14px; }
.quest-step-places { list-style:none; padding:0; margin:10px 0 0; display:grid; gap:8px; }
.quest-step-places > li { padding:8px 10px; background:#fff9ec; border:1px solid #dcc69b; border-radius:6px; }
.quest-step-place { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; font-size:14px; }
.quest-step-place a, .quest-step-place strong { color:#19415d; font-weight:700; }
.quest-step-place small { color:#8b6b32; font-size:12px; }
.quest-step-place-note { flex-basis:100%; color:#4a3b22; font-size:13px; }
.quest-step-places .npc-location { margin-top:6px; }
.quest-dialogue { display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin-top:10px; color:#8b6b32; }
.quest-dialogue code { padding:4px 9px; color:#19415d; background:#fff9ec; border:1px solid #c9af7e; border-radius:4px; font-size:12px; }
.aac .quest-materials-title { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:10px 0 8px; font:700 18px var(--font-display); color:#18394d; }
.quest-materials-title span { font:400 12px var(--font-body); color:#715634; }
.quest-materials { padding:0; margin:10px 0 20px; list-style:none; border:1px solid #c9ad76; border-radius:5px; overflow:hidden; }
.quest-materials li { padding:12px; background:#fff9eccc; border-bottom:1px solid #d7c192; }
.quest-materials li:last-child { border-bottom:0; }
.quest-materials label { display:flex; gap:10px; align-items:center; cursor:pointer; }
.quest-materials input { flex:0 0 16px; width:16px; height:16px; accent-color:#285b2c; }
.quest-materials img { image-rendering:pixelated; }
.quest-materials label > span { min-width:0; }
.quest-materials b { color:#214861; font-size:14px; }
.quest-materials small { display:block; margin-top:3px; color:#785d35; font-size:12px; }
.aac .quest-materials p { margin:7px 0 0 26px; color:#594527; font-size:12px; line-height:1.6; }
.quest-materials li:has(input:checked) { background:#e9efda; }
.quest-materials input:checked ~ span b { text-decoration:line-through; color:#517247; }
.quest-missions > details { border-bottom:1px solid #cbb07e; padding:12px 0; }
.quest-missions summary { display:flex; gap:10px; align-items:center; cursor:pointer; color:#24475c; font-weight:700; line-height:1.5; }
.quest-missions summary::after { content:'+'; margin-left:auto; font-size:20px; }
.quest-missions details[open] > summary::after { content:'−'; }
.quest-mission-number { color:#917039; font:700 13px Georgia; }
.quest-missions ul { padding-left:24px; line-height:1.7; font-size:13px; }
.quest-reference-link { display:inline-block; margin-top:20px; font-size:13px; font-weight:700; }
.quest-reference-link small { display:block; margin-top:5px; color:#775e37; font-weight:400; }
.quest-attention { margin-top:18px; padding:16px 18px; border:1px solid #b46b37; border-left:4px solid #b46b37; border-radius:4px; background:#fff0d6; }
.quest-attention summary { cursor:pointer; font-weight:700; }
.quest-attention .quest-status { margin:0 8px 0 0; }
.quest-attention ul { padding-left:20px; margin-bottom:0; font-size:13px; line-height:1.6; }
.quest-evidence > summary { cursor:pointer; font-weight:700; color:#25465b; }
.quest-evidence > summary span { display:block; margin:5px 0 0 16px; font-size:12px; color:#785d35; font-weight:400; }
.quest-evidence p,.quest-evidence li { font-size:12px; line-height:1.7; }
.quest-evidence a,.quest-source-path { overflow-wrap:anywhere; }
@media(max-width:540px) { .quest-detail > .quest-section { padding:18px 14px; } .aac .quest-heading h2 { font-size:22px; } .quest-heading { gap:12px; } .quest-heading > img { width:44px; height:44px; } .quest-facts { gap:12px; } .quest-facts dd { font-size:13px; } .quest-walkthrough > li { gap:10px; } }
@media(max-width:540px) { .mon-card > .mon-head { grid-template-columns:70px minmax(0,1fr); gap:14px; } .catalogue-detail > .mon-head .char-portrait { width:70px; height:70px; } .catalogue-detail > .mon-head .char-portrait img { width:64px; height:64px; } .aac .monster-hunts .hunt-table :is(th,td) { padding:9px 4px; font-size:11px; } .hunt-table summary { white-space:normal; font-size:11px; } }

/* Creature identity and attributes share the site's blue card language. */
.aac.mon-card > .mon-head { grid-template-columns:48px minmax(0,1fr); padding:18px; gap:14px; background:#173854; border:1px solid #b79857; border-bottom:3px solid #b58b3d; border-radius:5px; box-shadow:0 3px 9px #06172740; }
.aac.mon-card > .mon-head h2 { margin:0 0 4px; font-size:24px; line-height:1.2; color:#ffe6ac; overflow-wrap:anywhere; }
.aac.mon-card > .mon-head .char-id { align-self:center; }
.aac.mon-card > .mon-head .char-sub { margin:0; color:#d9e8f2; }
.aac.mon-card > .mon-head .char-portrait { width:48px; height:48px; border:1px solid #b79857; border-radius:4px; background:#102b42; box-shadow:inset 0 0 10px #071b2a; }
.aac.mon-card > .mon-head .char-portrait img { width:44px; height:44px; }
.mon-card .monster-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:0; }
.mon-card .monster-stats > div { min-width:0; padding:10px 8px; border:1px solid #49657b; border-radius:5px; background:linear-gradient(#24465f,#163249); box-shadow:inset 0 1px #ffffff0c; }
.mon-card .monster-stats dt { margin:0 0 8px; color:#bdd1e0; font:600 10px/1.3 var(--font-body); text-transform:uppercase; letter-spacing:.2px; }
.mon-card .monster-stats dd { display:flex; align-items:center; gap:7px; margin:0; color:#ffe3a0; font:700 21px/1.2 var(--font-body); }
.monster-stat-icon { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; }
.mon-card .monster-stat-icon img { display:block; width:28px; height:28px; margin:0; object-fit:contain; image-rendering:pixelated; }
.monster-powers { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0; }
.monster-powers > div { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:7px; padding:9px 12px; border:1px solid #49657b; border-radius:5px; background:#102d43; }
.monster-powers dt { display:flex; align-items:center; gap:8px; color:#c8dce9; font:600 12px/1.4 var(--font-body); }
.monster-powers dd { margin:0; color:#ffe3a0; font:700 13px/1.4 var(--font-body); }
.monster-power-icon { display:block; width:24px; height:24px; overflow:hidden; border-radius:3px; }
.monster-power-icon .spell-art { transform:scale(.75); transform-origin:top left; }
.mon-card > .monster-section { margin:20px 0 0; padding:20px; background:#f9edcf; border:1px solid #c7ab74; border-radius:6px; }
.mon-card > .monster-section > .ph { margin-top:0; padding-top:10px; }
@media(max-width:540px) {
 .aac.mon-card > .mon-head { padding:14px; gap:12px; }
 .mon-card .monster-stats { grid-template-columns:repeat(6,minmax(0,1fr)); }
 .mon-card .monster-stats > div { grid-column:span 2; padding:9px 7px; }
 .mon-card .monster-stats > div:nth-child(4),.mon-card .monster-stats > div:nth-child(5) { grid-column:span 3; }
 .mon-card .monster-stats dd { font-size:18px; gap:5px; }
 .mon-card .monster-stats dt { font-size:9px; }
 .monster-powers > div { padding:9px; }
 .mon-card > .monster-section { padding:16px 12px; }
}

/* Item profiles share the compact blue attribute cards. */
.item-detail-cards > .item-heading { display:grid; grid-template-columns:48px minmax(0,1fr); gap:14px; padding:18px; }
.item-detail-cards > .item-heading > img { width:48px; height:48px; object-fit:contain; image-rendering:pixelated; border:1px solid #7c8e91; border-radius:4px; background:#102d43; }
.item-detail-cards .item-heading .wiki-facts { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; border:0; background:none; }
.item-detail-cards .item-heading .wiki-facts > div { min-width:0; padding:10px 12px; border:1px solid #49657b; border-radius:5px; background:linear-gradient(#24465f,#163249); }
.item-detail-cards .item-heading .wiki-facts dt { color:#bdd1e0; font-size:10px; text-transform:uppercase; margin-bottom:6px; }
.item-detail-cards .item-heading .wiki-facts dd { margin:0; color:#ffe3a0; font-size:16px; font-weight:700; }
.item-detail-cards .item-heading .wiki-facts dd * { color:inherit; }
.item-detail-cards .catalogue-detail-body { padding:0; }
.item-detail-cards .item-source-panel,.item-detail-cards .item-data-note { margin-top:18px; padding:18px; background:#f9edcf; border:1px solid #c7ab74; border-radius:6px; }
.item-source-panel > .ph { margin-top:0; padding-top:0; }
.item-data-note > summary { cursor:pointer; color:#25465b; font-size:12px; font-weight:700; }
.item-data-note p { font-size:12px; line-height:1.6; }
.item-detail-cards .catalogue-empty { padding:8px 0; background:none; border:0; color:#765f40; font-size:13px; }
.item-detail-cards .item-sources,.item-detail-cards .npc-offers { margin-bottom:0; }
@media(max-width:540px) { .item-detail-cards .item-heading .wiki-facts { grid-template-columns:repeat(2,minmax(0,1fr)); } .item-detail-cards > .item-heading { padding:14px; } }

.teacher-filter-panel { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:0 0 20px; }
.teacher-filter-panel > label { display:flex; flex-direction:column; gap:8px; min-width:0; margin:0; font-size:12px; color:#715634; }
@media(max-width:540px) { .teacher-filter-panel { grid-template-columns:1fr; } }

.aac.spell-page > .spell-modal-header { padding:16px 18px; gap:14px; }
.aac.spell-page .spell-modal-header h3 { margin:0 0 6px; font-size:24px; }
.aac.spell-page .spell-modal-header .sp-kind { margin-top:4px; }
.aac.spell-page .spell-modal-header .sp-words { margin:5px 0 9px; }
.aac.spell-page .spell-modal-header .sp-req { margin:0; gap:8px; }
.aac.spell-page .spell-modal-header .sp-req > span { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:1px solid #49657b; border-radius:4px; background:#102d43; font-size:12px; }
.spell-modal-header .sp-req img { width:24px; height:24px; object-fit:contain; image-rendering:pixelated; }
.aac.spell-page .spell-modal-header .sp-vocs:empty { display:none; }
.aac.spell-page .spell-modal-header .sp-vocs { margin:8px 0 0; }

.spell-page > .spell-info-panel,.spell-page > .spell-teachers-panel { margin-top:18px; padding:18px; border:1px solid #c7ab74; border-radius:6px; background:#f9edcf; }
.spell-info-panel > .ph,.spell-teachers-panel > .ph { margin-top:0; padding-top:0; }
.spell-info-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0; }
.spell-info-facts dt { font-size:11px; color:#785d35; }
.spell-info-facts dd { margin:4px 0 0; color:#25465b; font-size:13px; font-weight:700; }
.teacher-table-wrap { max-width:100%; overflow-x:auto; }
.teacher-table { table-layout:fixed; }
.teacher-table th:first-child { width:32%; }
.teacher-table th:nth-child(2) { width:28%; }
.teacher-name { display:flex; align-items:center; gap:6px; }
.teacher-name img { object-fit:contain; image-rendering:pixelated; }
.teacher-table small { display:block; margin-top:4px; font-size:11px; font-weight:400; }
.teacher-table .npc-location { margin:0; font-size:12px; }
@media(max-width:540px) { .aac .teacher-table :is(th,td) { padding:8px 4px; font-size:11px; overflow-wrap:anywhere; } .teacher-name { flex-direction:column; align-items:flex-start; } }

.aac .teacher-table tbody th a.teacher-name { color:#18558a; text-shadow:none; font-weight:700; text-decoration:none; }
.aac .teacher-table tbody th a.teacher-name:hover { color:#103b61; text-decoration:underline; }

/* Shared library list controls and detail panels. */
.aac-block .catalogue-toolbar,.wiki-library .catalogue-toolbar { display:flex; flex-wrap:nowrap; justify-content:space-between; align-items:center; gap:12px; margin:12px 0; padding:0; }
.catalogue-toolbar > :first-child { min-width:0; margin:0; font-size:12px; }
.catalogue-toolbar .item-view-tools { flex-shrink:0; margin:0; }
.aac.catalogue-detail :is(.item-source-panel,.spell-info-panel,.spell-teachers-panel,.quest-section,.library-detail-panel) { margin:20px 0 0; padding:20px; background:#f9edcf; border:1px solid #c7ab74; border-radius:6px; box-shadow:none; }
.aac.catalogue-detail :is(.item-source-panel,.spell-info-panel,.spell-teachers-panel,.quest-section,.library-detail-panel) > .ph { margin-top:0; padding-top:10px; color:#49351e; }
.aac.catalogue-detail > :is(.item-modal-header,.spell-modal-header,.quest-heading) { padding:18px; gap:14px; background:#173854; border:1px solid #b79857; border-bottom:3px solid #b58b3d; border-radius:5px; box-shadow:0 3px 9px #06172740; }
.aac.catalogue-detail > :is(.item-modal-header,.spell-modal-header,.quest-heading) :is(h2,h3) { font-size:24px; line-height:1.2; color:#ffe6ac; }
.aac.catalogue-detail > :is(.item-modal-header,.quest-heading) > img { width:48px; height:48px; object-fit:contain; image-rendering:pixelated; }
.aac.spell-page .spell-modal-header .sp-req > span { padding:10px 12px; background:linear-gradient(#24465f,#163249); border-radius:5px; color:#bdd1e0; }
.aac.spell-page .spell-modal-header .sp-req b { color:#ffe3a0; font-size:21px; }
@media(max-width:540px) {
 .aac.catalogue-detail :is(.item-source-panel,.spell-info-panel,.spell-teachers-panel,.quest-section,.library-detail-panel) { padding:16px 12px; }
 .aac.catalogue-detail > :is(.item-modal-header,.spell-modal-header,.quest-heading) { padding:14px; }
}

.item-source-panel[data-item-offers] > .catalogue-filters { margin-bottom:20px; }
.item-detail-cards .item-heading .wiki-facts dd { display:flex; align-items:center; gap:8px; }
.item-detail-cards .item-heading .wiki-facts dd img { flex:0 0 28px; width:28px; height:28px; object-fit:contain; image-rendering:pixelated; }
.item-detail-cards .item-heading .wiki-facts dd span { min-width:0; overflow-wrap:anywhere; }

/* Spell attributes occupy their own full-width row, like creature attributes. */
.aac.spell-page > .spell-modal-header { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:start; }
.aac.spell-page .spell-modal-header .sp-main { min-width:0; }
.aac.spell-page .spell-modal-header .library-stats { grid-column:1 / -1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.library-stats > div { min-width:0; padding:10px 8px; border:1px solid #49657b; border-radius:5px; background:linear-gradient(#24465f,#163249); }
.library-stats dt { margin:0 0 8px; color:#bdd1e0; font:600 10px/1.3 var(--font-body); text-transform:uppercase; letter-spacing:.2px; }
.library-stats dd { display:flex; align-items:center; gap:7px; margin:0; color:#ffe3a0; font:700 21px/1.2 var(--font-body); }
.aac.spell-page .library-stats dd img { width:28px; height:28px; object-fit:contain; image-rendering:pixelated; }

.aac.npc-page > .catalogue-detail-body { padding:0; margin:0; background:none; border:0; }
.aac.npc-page > .item-modal-header { display:grid; grid-template-columns:48px minmax(0,1fr); align-items:center; }
.aac.npc-page > .item-modal-header h3 { margin:0 0 4px; }
.aac.npc-page > .item-modal-header p { margin:0; }
.aac.npc-page > .item-modal-header > img { border:1px solid #b79857; border-radius:4px; background:#102b42; }

.aac.spell-page .spell-modal-header .sp-main { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; align-items:start; }
.aac.spell-page .spell-modal-header .sp-main h3 { grid-column:1; margin:0; }
.spell-kind-badge { grid-column:2; grid-row:1 / span 2; align-self:start; padding:5px 8px; border:1px solid #49657b; border-radius:4px; background:#102d43; color:#d9e8f2; font:600 10px/1.3 var(--font-body); text-transform:uppercase; }
.aac.spell-page .spell-modal-header .sp-words { grid-column:1; margin:4px 0 0; }
@media(max-width:540px) { .spell-kind-badge { font-size:9px; padding:4px; max-width:90px; overflow-wrap:anywhere; } }

.aac.spell-page .library-stats dd > span { font:inherit; color:inherit; }

.aac .quest-heading .quest-jump { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.aac .quest-heading .quest-jump a.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:8px 12px; border-radius:4px; text-decoration:none; }
.aac .quest-heading .quest-jump .btn-gold { color:#342608; }
.quest-jump img { width:24px; height:24px; object-fit:contain; image-rendering:pixelated; }
/* All library portrait frames follow the creature portrait. */
.aac.catalogue-detail > :is(.item-modal-header,.quest-heading) > img,
.aac.spell-page > .spell-modal-header > .sp-icon { box-sizing:border-box; width:48px; height:48px; border:1px solid #b79857; border-radius:4px; background:#102b42; box-shadow:inset 0 0 10px #071b2a; }
.aac.spell-page > .spell-modal-header > .sp-icon { display:flex; align-items:center; justify-content:center; overflow:hidden; }

.npc-location-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.npc-location-facts > div { padding:12px; border:1px solid #d3bf98; border-radius:5px; background:#fff9eb; }
.npc-location-facts dt { font-size:11px; color:#785d35; margin-bottom:6px; }
.npc-location-facts dd { margin:0; color:#25465b; font-weight:700; font-size:13px; }
@media(max-width:540px) { .npc-location-facts { grid-template-columns:1fr; gap:8px; } }

/* Player-facing facts share the library icon/card rhythm. */
.fact-icon { width:24px; height:24px; object-fit:contain; image-rendering:pixelated; flex:none; }
.quest-facts > div { padding:12px; border:1px solid #d3bc8b; border-radius:5px; background:#fff9e9; }
.quest-facts dt,.npc-location-facts dt { display:flex; align-items:center; gap:8px; min-height:24px; }
.quest-facts dd { margin-top:8px; }
.quest-difficulty { display:grid; gap:8px; }
.difficulty-track { display:flex; gap:4px; max-width:180px; }
.difficulty-track i { height:9px; flex:1; border:1px solid #c6b78f; background:#e7ddc5; border-radius:2px; }
.difficulty-track i.filled:nth-child(1) { background:#3e8a45; border-color:#326c38; }
.difficulty-track i.filled:nth-child(2) { background:#b6a12b; border-color:#8a7923; }
.difficulty-track i.filled:nth-child(3) { background:#d47729; border-color:#a35920; }
.difficulty-track i.filled:nth-child(4) { background:#b83c32; border-color:#8e2e27; }
.quest-table th .quest-status { display:table; margin-top:7px; }

.quest-reward-items{list-style:none;padding:0;margin:12px 0;display:flex;flex-wrap:wrap;gap:10px}.quest-reward-items a{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #d3bc8b;border-radius:5px;background:#fff9e9;color:#12558a}.quest-reward-items img{object-fit:contain;image-rendering:pixelated}
/* Quest listing: reward slots shared by cards and table, cards for browsing, table for comparison. */
.quest-library .quest-reward-list{list-style:none;padding:0;margin:0;display:grid;gap:6px}
.quest-library .quest-reward-list li{margin:0;padding:0;background:none;border:0;box-shadow:none}
.quest-library .quest-reward-list :is(a,.quest-reward-list-benefit){display:flex;align-items:center;gap:9px;min-height:36px;color:#3a2410;font:600 13px/1.35 var(--font-body);text-align:left}
.quest-library .quest-reward-list a{color:#12558a;text-decoration:underline;text-decoration-color:#12558a55;text-underline-offset:3px}
.quest-library .quest-reward-list a:hover{color:#703d0f;text-decoration-color:currentColor}
.quest-library .quest-reward-list a:focus-visible,.quest-card-title:focus-visible,.quest-reward-more:focus-visible{outline:2px solid #2477ad;outline-offset:2px;border-radius:2px}
.quest-library .quest-reward-list img{flex:0 0 32px;width:32px;height:32px;padding:2px;box-sizing:content-box;border-radius:3px;background:radial-gradient(circle at 50% 40%,#5c513f,#3a3226 75%);box-shadow:inset 0 0 0 1px #1f1a13,inset 1px 1px 0 2px #6f6350,0 1px 2px #61431c40;image-rendering:pixelated;object-fit:contain;filter:none}
.quest-library .quest-reward-list span{min-width:0;overflow-wrap:anywhere}
.quest-library .quest-external{flex:0 0 10px;opacity:.7}
.quest-library .quest-reward-none{color:#695339;font-size:12px;font-style:italic}
.quest-library .quest-reward-list-note{font-size:12px;line-height:1.5;color:#6a5232;margin:8px 0 0}
.quest-library .quest-reward-more{display:inline-block;margin-top:8px;color:#12558a;font:700 12px/1.4 var(--font-body);text-decoration:underline;text-underline-offset:3px}
.quest-library .quest-reward-more:hover{color:#703d0f}
.quest-cards{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:16px}
.quest-card{display:flex;flex-direction:column;margin:0;padding:16px 18px 18px;background:linear-gradient(160deg,#fffaf0,#f3e5c3);border:1px solid #c6ab76;border-radius:8px;box-shadow:0 2px 6px #61431c1f;transition:border-color .15s,box-shadow .2s cubic-bezier(.16,1,.3,1)}
.quest-card:hover,.quest-card:focus-within{border-color:#9a712e;box-shadow:0 6px 16px #61431c30}
.quest-card--empty{color:#5d4628;font-size:14px;grid-column:1/-1}
.quest-card-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:6px 10px}
.aac .quest-card h3{margin:0;padding:0;border:0;background:none;font:700 17px/1.3 var(--font-display);letter-spacing:0;text-shadow:none;text-wrap:balance}
.quest-card-title{color:#3a2410;text-decoration:none}
.quest-card-title:hover{color:#703d0f;text-decoration:underline;text-underline-offset:3px}
.quest-card .quest-status{margin:0}
.quest-card-place{margin:4px 0 0;color:#695339;font-size:12px;line-height:1.45}
.quest-summary{display:flex;flex-wrap:wrap;gap:8px 18px;margin:12px 0 0;padding:10px 0;border-block:1px solid #c5ac7666}
.quest-summary>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.quest-summary dt{color:#7a5a30;font:800 10px/1.2 var(--font-body);letter-spacing:.06em;text-transform:uppercase}
.quest-summary dd{margin:0;color:#3a2410;font:800 14px/1.3 var(--font-body)}
.quest-summary dd small{color:#695339;font-size:11px;font-weight:600}
.quest-account{display:inline-block;padding:2px 7px;border:1px solid;border-radius:3px;font:800 11px/1.5 var(--font-body);white-space:nowrap}
.quest-account--premium{color:#6e4100;background:#fff0c7;border-color:#d4a443}
.quest-account--free{color:#2d5620;background:#e5f0da;border-color:#93b47d}
.quest-account--unknown{color:#6a5232;background:transparent;border-color:transparent}
.quest-card-rewards{flex:1;margin-top:12px}
.aac .quest-card-rewards h4{margin:0 0 8px;padding:0;border:0;background:none;color:#7a5a30;font:800 10px/1.2 var(--font-body);letter-spacing:.06em;text-transform:uppercase;text-shadow:none}
@media(prefers-reduced-motion:reduce){.quest-card{transition:none}}
.quest-rewards>div{width:100%;min-width:0}.quest-rewards .quest-reward-items{margin-bottom:0}.quest-rewards .quest-reward-items li{max-width:100%;min-width:0}.quest-reward-benefit{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #d3bc8b;border-radius:5px;background:#fff9e9;color:#49351f}.quest-rewards .quest-reward-items img{flex:0 0 32px}.quest-rewards .quest-reward-items span{overflow-wrap:anywhere}.aac .quest-rewards .quest-reward-condition{font-size:13px;font-weight:400;line-height:1.5;margin:10px 0}

.location-guide .tt tbody th a{color:#12558a}.location-guide .tt tbody th a:hover{color:#18394d}.location-guide .tt td:nth-child(3){white-space:nowrap}.location-guide .catalogue-filters{margin-bottom:16px}.location-guide .teacher-name{display:flex;align-items:center;gap:6px;margin-top:5px}.location-guide .tt th:first-child{width:34%}.location-guide .quest-dialogue{gap:4px}.location-guide .quest-dialogue code{padding:3px 5px}

.locations-list .tt tbody th a{color:#12558a}.locations-list .tt tbody th a:hover{color:#18394d}.locations-list .tt tbody th{width:25%}

.item-badge{display:inline-flex;align-items:center;margin:4px 4px 0 0;padding:3px 7px;border:1px solid #c6ae79;border-radius:4px;background:#f5e8c5;color:#573e20;font-size:11px;line-height:1.3}.site-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:20px;padding:0}.site-pagination .is-disabled{opacity:.45;pointer-events:none}.pagination-current{font-weight:700;color:#18394d;white-space:nowrap}
.site-pagination{gap:6px;flex-wrap:nowrap}
.site-pagination .pagination-number,.site-pagination .pagination-control{box-sizing:border-box;width:36px;height:38px;min-width:0;padding:0;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.site-pagination .pagination-control{font-family:Arial,sans-serif;font-size:25px;line-height:1}.site-pagination [aria-current="page"]{cursor:default}.site-pagination .is-disabled{cursor:not-allowed;box-shadow:none}
.site-pagination a:focus-visible{outline:3px solid #18394d;outline-offset:3px}

/* Town NPC maps: role colours are shared by badges, filters, markers and the detail panel. */
.town-role{--role:#6b5a43;position:relative;display:inline-grid;place-items:center;width:32px;height:32px;flex-shrink:0;vertical-align:middle;color:#fff}
.town-role img{display:block;width:32px;height:32px;max-width:none;image-rendering:pixelated}
.town-role-arrival{background:var(--role);border-radius:50%}
.town-role[data-tip]:hover::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);padding:4px 8px;border-radius:4px;background:#102435;color:#fff3d5;font:600 12px/1.2 Arial,sans-serif;white-space:nowrap;z-index:6;pointer-events:none;box-shadow:0 2px 6px #0008}
.town-role .town-role-icon{width:16px;height:16px}
.town-role-other{--role:#6f6252}.town-role-teacher{--role:#7247c4}.town-role-buy{--role:#23864a}.town-role-sell{--role:#b37609}.town-role-bank{--role:#265f9e}
.town-role-travel{--role:#137a80}.town-role-bless{--role:#b03a6c}.town-role-promotion{--role:#a63a26}.town-role-more{--role:#3d3427;font:700 9px/1 Arial,sans-serif}
.town-roles{display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px}
.location-map{container-type:inline-size}
.town-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.town-map{margin:0}
.town-map-stage{position:relative;overflow:hidden}
.town-map .world-map-canvas{height:clamp(320px,62vh,620px)}
.town-markers{position:absolute;inset:0;pointer-events:none}
.town-markers .town-marker.chip{all:unset;position:absolute;left:0;top:0;width:0;height:0;pointer-events:auto;cursor:pointer}
.town-markers .town-marker.chip[hidden]{display:none}
.town-markers .town-marker>img{max-width:none;max-height:none;position:absolute;left:-18px;top:-30px;width:36px;height:36px;border-radius:50%;border:2px solid #fff3d2;background:#1d2b38;box-shadow:0 2px 6px #000a;object-fit:cover;image-rendering:pixelated}
.town-marker::after{content:'';position:absolute;left:-5px;top:4px;border:5px solid transparent;border-top:7px solid #fff3d2}
.town-marker-badges{position:absolute;left:10px;top:-12px;display:flex;gap:1px}
.town-marker-badges .town-role{width:22px;height:22px;border-radius:50%;background:#fff3d2;box-shadow:0 1px 3px #0009}.town-marker-badges .town-role img{width:22px;height:22px}
.town-markers .town-marker.is-small>img{left:-12px;top:-22px;width:24px;height:24px}
.town-marker.is-small .town-marker-badges{left:6px;top:-10px}
.town-marker.is-small .town-marker-badges .town-role:nth-child(n+2){display:none}
.town-marker.is-selected>img,.town-marker:focus-visible>img{border-color:var(--gold);box-shadow:0 0 0 3px #18394d,0 2px 8px #000}
.town-marker.is-selected,.town-marker:hover,.town-marker:focus-visible{z-index:3;outline:none}
.town-marker-tip{position:absolute;left:50%;bottom:36px;transform:translateX(-50%);display:none;flex-direction:column;padding:5px 8px;border-radius:4px;background:#102435;color:#fff3d5;white-space:nowrap;font-size:12px;text-align:left;box-shadow:0 2px 6px #0008}
.town-marker-tip small{color:#cde3d4}
.town-marker:hover .town-marker-tip,.town-marker:focus-visible .town-marker-tip{display:flex}
.town-panel{max-height:clamp(420px,76vh,780px);overflow:auto;padding:12px;border:1px solid var(--ink-line);border-radius:6px;background:#fffaf0;color:var(--ink)}
.town-panel-empty{margin:0;color:var(--ink-soft)}
.town-panel-head{display:flex;gap:10px;align-items:flex-start;margin-bottom:8px}
.town-panel-head img{image-rendering:pixelated;flex-shrink:0}
.town-panel-head h3{margin:0 0 2px;font-size:18px!important}.town-panel-head p{margin:0 0 6px;font-size:12px;color:var(--ink-soft)}
.town-role-chip{display:inline-flex;align-items:center;gap:5px;padding:2px 8px 2px 2px;border-radius:12px;background:#f1e3c2;font-size:12px;font-weight:600}
.town-panel-section h4{margin:12px 0 6px;font-size:14px}
.town-panel-scroll{max-height:260px;overflow:auto;border:1px solid #e0cfa6}
.town-mini-table{width:100%;margin:0;border-collapse:collapse;font-size:12px;line-height:1.3}
.location-guide .town-panel .town-mini-table>*>tr>th{position:sticky;top:0;padding:4px 6px;border:0;background:#efe0bb;color:var(--ink);font-size:11px;text-align:left;white-space:nowrap}
.location-guide .town-panel .town-mini-table>*>tr>td{padding:3px 6px;border:0;border-top:1px solid #eadcb8;background:transparent;font-size:12px}
.town-mini-table a{font-weight:600}
.location-guide .town-panel .town-mini-table{display:table;font-size:12px}
.town-mini-table td:not(:first-child),.town-mini-table th:not(:first-child){text-align:right;white-space:nowrap}
.town-item{display:inline-flex;align-items:center;gap:4px}
.town-item img{image-rendering:pixelated}
.town-panel>.btn{margin-top:12px}
.town-note{margin:8px 0 12px;font-size:12px}
.town-table tr.is-selected>*{background:#fff0c4}
.town-table th small{display:block;font-weight:400;color:var(--ink-soft)}
/* Side panel only when the content column is really wide; the site column is usually narrow. */
@container (min-width: 980px){.town-layout{grid-template-columns:minmax(0,1fr) 320px}}
@container (max-width: 979px){.town-panel{max-height:none}}
@media(max-width:600px){.town-filters .town-filter{min-height:44px}.town-map .world-map-canvas{height:clamp(280px,55dvh,460px)}}
/* Locations guide: one list and one map per place; kind colours are shared by list, cards and header. */
.town-role-count{display:inline-flex;align-items:center;gap:3px;margin-right:4px;font-size:12px;font-weight:700}
.location-kind{--kind:#6b5a43;display:inline-flex;align-items:center;gap:5px;padding:2px 9px 2px 6px;border-radius:12px;background:color-mix(in srgb,var(--kind) 14%,#fffaf0);color:var(--kind);font-size:12px;font-weight:700;white-space:nowrap;vertical-align:middle}
.location-kind .town-role-icon{width:14px;height:14px}
.location-kind-city{--kind:#8a5a12}.location-kind-settlement{--kind:#7a4f2a}.location-kind-island{--kind:#13737a}
.location-kind-region{--kind:#4c7a2c}.location-kind-fortress{--kind:#7d3b2e}.location-kind-cave{--kind:#4f4a66}
.location-heading-icon{--kind:#6b5a43;display:inline-grid;place-items:center;width:44px;height:44px;flex-shrink:0;border-radius:50%;background:var(--kind);color:#fff8e6;box-shadow:0 0 0 2px #e9c77d}
.location-heading-icon .town-role-icon{width:24px;height:24px}
.location-heading p{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.location-table td{vertical-align:middle}
.location-cards a{align-items:center;text-align:center;gap:6px}
.town-layout.is-solo{grid-template-columns:1fr}
.town-markers .town-arrival{position:absolute;left:0;top:0;width:0;height:0;z-index:2;pointer-events:auto}
.town-markers .town-arrival[hidden]{display:none}
.town-arrival::after{content:'';position:absolute;left:-6px;top:-9px;border:6px solid transparent;border-top:9px solid #fff3d2}
.town-arrival .town-marker-tip{bottom:42px}
.town-arrival:hover .town-marker-tip{display:flex}
.location-guide .town-locate.chip{all:unset;display:inline-flex;align-items:center;gap:6px;color:#205ca3;font-weight:700;font-size:14px;cursor:pointer;white-space:nowrap}
.location-guide .town-locate.chip::before{content:'';border:5px solid transparent;border-left:8px solid currentColor;border-right:0}
.location-guide .town-locate.chip:hover{text-decoration:underline}
.location-guide .town-locate.chip:focus-visible{outline:3px solid #18394d;outline-offset:2px}
.town-table .wiki-table .wiki-name{display:flex;align-items:center;gap:10px;min-width:155px;color:#315d78;font-size:13px;font-weight:700;text-decoration:none}
.town-table .wiki-table th small{display:block;font-weight:400;color:var(--ink-soft)}
.town-roles{gap:5px}
.town-table .wiki-table td{vertical-align:middle}
.town-filters{margin-bottom:12px}
.town-roles{gap:0}
.town-role-chip{padding:0 8px 0 0}.town-role-chip .town-role{width:24px;height:24px}.town-role-chip .town-role img{width:24px;height:24px}
.town-markers .town-marker.is-other-floor{opacity:.55;filter:grayscale(.6)}
.town-markers .town-marker.is-other-floor:hover,.town-markers .town-marker.is-other-floor:focus-visible{opacity:1;filter:none}
.town-arrival .town-role-arrival{position:absolute;left:-17px;top:-42px;width:34px;height:34px;border-radius:50%;background:#fff3d2;box-shadow:0 0 0 2px #a33a2a,0 2px 6px #000a}
.town-arrival .town-role-arrival img{width:30px;height:30px}
/* Keep zoom, floor and centre on one row in the site's content column. */
.town-map .world-map-tools{flex-wrap:nowrap;gap:12px 14px;padding:12px 14px}
.town-map .world-map-tools .map-floor-group select{width:118px;max-width:118px;min-width:0;padding:8px 6px;flex:none}
.town-map .world-map-tools .map-center-button{flex-shrink:0;white-space:nowrap;padding:8px 14px}
@container (max-width: 540px){.town-map .world-map-tools{flex-wrap:wrap}}
.location-guide .note.location-point{align-items:center;margin:0 0 14px}
.location-point>span{flex:1;display:flex;flex-direction:column;gap:2px;line-height:1.35}
.location-point small{font-size:13px;color:var(--ink-soft)}
.location-link{cursor:pointer;font-weight:700}
/* Neighbouring towns on the map: label links to their own guide. */
.town-markers .town-place{position:absolute;left:0;top:0;z-index:1;padding:4px 10px;border:1px solid #e9c77d;border-radius:12px;background:#102435e6;color:#ffe08a;font:700 12px/1.2 var(--font-body,Arial,sans-serif);white-space:nowrap;text-decoration:none;pointer-events:auto;cursor:pointer;box-shadow:0 2px 6px #0009}
.town-markers .town-place[hidden]{display:none}
.town-markers .town-place:hover,.town-markers .town-place:focus-visible{background:#18394d;color:#fff;text-decoration:underline;outline:none}
.npc-services{margin:6px 0 0}.wiki-library .item-grid .town-roles{justify-content:center}
.npc-services .town-role-chip{color:var(--ink);font-size:12px;font-weight:700}
.town-marker .town-role[data-tip]::after,.town-role-chip .town-role[data-tip]::after{content:none}
.location-guide .town-panel .town-mini-table>*>tr.town-mini-group>th{position:static;background:#f6ead0;color:var(--ink-soft);font-size:11px;text-transform:uppercase;letter-spacing:.5px;text-align:left;padding:5px 6px 3px}
/* A hovered, focused or selected marker (and its tooltip) sits above every other marker. */
.town-markers .town-marker.chip:hover,.town-markers .town-marker.chip:focus-visible,.town-markers .town-marker.chip.is-selected{z-index:30}
.town-markers .town-marker-tip{z-index:31}
.npc-name-cell .wiki-name,.wiki-library .wiki-table .wiki-name{white-space:nowrap}
.npc-services .town-roles{gap:2px}

/* NPC trade tables: the 32px item icon and its name share one centred line, like the quest reward lists. */
.library-detail-panel .tt .npc-offer-item{display:inline-flex;align-items:center;gap:8px;vertical-align:middle}
.library-detail-panel .tt .npc-offer-item img{flex:none;image-rendering:pixelated}

/* Changelog: icons centred in their columns, page links under the table. */
.tt.changelog-table > :is(thead,tbody) > tr > :is(th,td):is(:nth-child(1),:nth-child(2)) { text-align: center; }
.changelog-table td img { vertical-align: middle; image-rendering: pixelated; }
.changelog-pages { display: flex; justify-content: space-between; margin: 12px 0 0; font-weight: 700; }

/* Keep the protected forum composer within the parchment at tablet widths. */
.forum-compose table { table-layout: fixed; }
.forum-compose tr > td:first-child:not([colspan]) { width: 30%; }
.forum-compose td { overflow-wrap: anywhere; }
.forum-compose input[type="text"], .forum-compose textarea, .forum-compose select { width: 100%; min-width: 0; box-sizing: border-box; }
