/* TTRPG tools inside the Asar Dynasty template (www.asardynasty.com/ttrpg/).
   Made from the TTRPG repo's www/assets/css/site.css: every rule is scoped to .ttrpg so it cannot restyle the Asar
   header, menu or footer; sizes are in em from a 1.25rem base (the tools' large type); colours are the Asar ones
   (black, whitesmoke text, Asar blue borders, purple accents). Asar is always dark, so the light palette is gone. */
.ttrpg { color-scheme: light dark;
  --bg: #fbf8f2; --text: #14110d; --muted: #4a4237; --panel: #ffffff; --line: #8a7f6e;
  --accent: #7a2410; --accent-text: #ffffff; --focus: #0b57d0; --ok: #1b5e20; --warn: #8a4b00;
  --radius: 10px;
  font-size: 1.25rem; }
.ttrpg, .ttrpg * { box-sizing: border-box; }
.ttrpg { accent-color: var(--accent); }
.ttrpg { margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; }
.ttrpg a { color: var(--accent); text-underline-offset: 0.15em; }
.ttrpg :focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.ttrpg .wrap { max-width: 52em; margin: 0 auto; padding: 1em; }
.ttrpg header.site { border-bottom: 2px solid var(--line); }
.ttrpg header.site .wrap { display: flex; flex-wrap: wrap; gap: 0.5em 1.5em; align-items: baseline; padding-block: 0.75em; }
.ttrpg header.site .brand { font-weight: 700; font-size: 1.2em; text-decoration: none; color: var(--text); }
.ttrpg h1 { font-size: 2em; line-height: 1.2; margin: 1em 0 0.5em; }
.ttrpg h2 { font-size: 1.4em; margin: 1.5em 0 0.5em; }
.ttrpg h3 { font-size: 1.15em; margin: 0 0 0.25em; }
.ttrpg .lead { color: var(--muted); margin-top: 0; }
.ttrpg form.roller { display: grid; gap: 1em; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 1em; }
.ttrpg fieldset { border: 2px solid var(--line); border-radius: var(--radius); margin: 0; padding: 0.5em 1em 0.75em; }
.ttrpg legend { font-weight: 700; padding: 0 0.4em; }
.ttrpg .choices { display: flex; flex-wrap: wrap; gap: 0.25em 1.25em; }
.ttrpg .choices label { display: inline-flex; align-items: center; gap: 0.5em; min-block-size: 44px; cursor: pointer; }
.ttrpg input[type="radio"] { inline-size: 1.25em; block-size: 1.25em; margin: 0; }
.ttrpg .field { display: flex; flex-wrap: wrap; gap: 0.5em 1em; align-items: center; }
.ttrpg .field label { font-weight: 700; }
.ttrpg input[type="number"] { font: inherit; inline-size: 5em; min-block-size: 44px; padding: 0.25em 0.5em; border: 2px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
.ttrpg .hint { color: var(--muted); font-size: 0.9em; margin: 0.25em 0 0; }
.ttrpg button { font: inherit; font-weight: 700; min-block-size: 48px; min-inline-size: 48px; padding: 0.5em 1.25em; border-radius: var(--radius); border: 2px solid var(--accent); cursor: pointer; }
.ttrpg button.primary { background: var(--accent); color: var(--accent-text); font-size: 1.15em; }
.ttrpg button.secondary { background: transparent; color: var(--accent); }
.ttrpg .actions { display: flex; flex-wrap: wrap; gap: 0.75em; align-items: center; }
.ttrpg .result { margin-top: 1.5em; }
.ttrpg .card { color: var(--text); background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 1em; margin-block: 0.75em; }
.ttrpg .total { font-size: 1.3em; font-weight: 700; }
.ttrpg ul.plain { list-style: none; padding: 0; margin: 0; }
.ttrpg ul.plain > li { padding: 0.5em 0; border-top: 1px solid var(--line); }
.ttrpg ul.plain > li:first-child { border-top: 0; }
.ttrpg .coins { display: flex; flex-wrap: wrap; gap: 0.5em 1.5em; font-size: 1.2em; font-weight: 700; }
.ttrpg .tag { display: inline-block; font-size: 0.85em; font-weight: 700; padding: 0 0.5em; border: 2px solid currentColor; border-radius: 999px; margin-inline-start: 0.4em; white-space: nowrap; }
.ttrpg .tag.homebrew { color: var(--ok); }
.ttrpg .meta { color: var(--muted); }
.ttrpg details summary { cursor: pointer; font-weight: 700; min-block-size: 44px; display: flex; align-items: center; gap: 0.5em; }
.ttrpg details .desc { white-space: pre-line; margin: 0.5em 0 0.25em; }
.ttrpg .note { border-inline-start: 6px solid var(--warn); padding: 0.5em 0.75em; background: var(--panel); margin-block: 0.5em; }
.ttrpg .status { min-block-size: 1.5em; font-weight: 700; color: var(--ok); }
.ttrpg .status[data-failed] { color: var(--warn); }
.ttrpg .seed { font-family: ui-monospace, Menlo, monospace; }
.ttrpg footer.site { margin-top: 3em; border-top: 2px solid var(--line); color: var(--muted); font-size: 0.85em; }
.ttrpg .tools { display: grid; gap: 1em; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); }
.ttrpg .tools a.card { display: block; text-decoration: none; color: var(--text); }
.ttrpg .tools a.card strong { color: var(--accent); font-size: 1.2em; }
.ttrpg .soon { opacity: 0.75; }
@media (forced-colors: active) {
.ttrpg button.primary { border-color: ButtonText; }
}
.ttrpg [hidden] { display: none !important; }
.ttrpg footer.site, .ttrpg .desc { overflow-wrap: anywhere; }
.ttrpg .card li::first-letter { text-transform: uppercase; }
.ttrpg .mix { display: grid; gap: 0.25em 1em; grid-template-columns: minmax(10em, max-content) 1fr; align-items: center; margin-block: 0.5em 0.75em; }
.ttrpg .mix label { font-weight: 700; }
.ttrpg .mix output { font-weight: 400; color: var(--muted); }
.ttrpg .mix output.stop { font-weight: 700; color: var(--accent); }
.ttrpg p.group-name { font-weight: 700; margin-block: 0.6em 0; }
.ttrpg .mix input[type="range"] { inline-size: 100%; min-block-size: 44px; }
/* The "Map sizes" fold of size sliders (size-sliders.js) */
.ttrpg details.sizes { margin-block: 0.75em 0.25em; }
.ttrpg details.sizes > summary { cursor: pointer; font-weight: 700; min-block-size: 44px; display: flex; align-items: center; width: fit-content; }
@media (max-width: 34em) {
.ttrpg .mix { grid-template-columns: 1fr; }
}
.ttrpg #feedback { margin-top: 2em; }
.ttrpg #feedback form { display: grid; gap: 0.5em; }
.ttrpg #feedback textarea, .ttrpg #feedback input[type="text"] { font: inherit; inline-size: 100%; padding: 0.5em; border: 2px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
.ttrpg .hp { position: absolute; inset-inline-start: -10000px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.ttrpg select { font: inherit; min-block-size: 44px; padding: 0.25em 0.5em; border: 2px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
.ttrpg fieldset .field + .field { margin-top: 0.5em; }
.ttrpg .token-key { display: inline-grid; place-items: center; inline-size: 1.8em; block-size: 1.8em; border-radius: 50%; background: #a3241f; color: #fff; font-weight: 700; flex: none; }
.ttrpg .statblock { font-size: 0.95em; }
.ttrpg .map { overflow-x: auto; border: 2px solid var(--line); border-radius: 6px; background: #fff; }
.ttrpg .map svg { display: block; inline-size: 100%; min-inline-size: 36em; block-size: auto; }
.ttrpg ul.legend { list-style: none; padding: 0; margin: 0.75em 0 0; display: flex; flex-wrap: wrap; gap: 0.5em 1.25em; }
.ttrpg ul.legend li { display: inline-flex; align-items: center; gap: 0.4em; }
.ttrpg ul.legend svg { flex: none; }
/* The key under each map (map-views.js legendHtml): foldable on screen, always printed open */
.ttrpg details.map-legend { margin: 0.75em 0 0; }
.ttrpg details.map-legend > summary { cursor: pointer; font-weight: 600; font-size: 0.95em; width: fit-content; }
.ttrpg details.map-legend > ul.legend { margin-top: 0.4em; }
.ttrpg details.map-legend li:not(:has(svg)) { font-style: italic; opacity: 0.85; }
@media print { .ttrpg details.map-legend { break-inside: avoid; } .ttrpg details.map-legend > summary { list-style: none; } }
@media print {
.ttrpg { color-scheme: light; --bg: #fff; --text: #000; --muted: #333; --panel: #fff; --line: #888; --accent: #7a2410; --ok: #1b5e20; --warn: #8a4b00; }
.ttrpg header.site, .ttrpg form.roller, .ttrpg .result > .actions, .ttrpg .result > .hint, .ttrpg .map-card .actions, .ttrpg #load-problems { display: none !important; }
.ttrpg { background: #fff; color: #000; font-size: 11pt; }
.ttrpg .map-card { break-inside: avoid; }
.ttrpg .map svg { min-inline-size: 0; }
.ttrpg footer.site { margin-top: 1em; }
}

/* Asar palette (assets/css/style.css: --asar-purple, --asar-blue, --asar-section-border) */
.ttrpg {
  color-scheme: dark;
  --bg: #0b0b12; --text: whitesmoke; --muted: #c9c4d6; --panel: rgba(0, 0, 0, 0.55); --line: rgba(50, 50, 250, 0.7);
  --accent: #c99be0; --accent-bg: rgba(140, 68, 173, 1); --accent-text: #ffffff; --focus: #8ab4f8; --ok: #8fd694; --warn: #ffc77a;
  background: transparent;
  text-align: left; width: 100%; max-width: 56em; margin: 0 auto;
}
.ttrpg h1, .ttrpg h2, .ttrpg h3 { font-family: var(--font-family-h1-h6, inherit), system-ui, sans-serif; color: whitesmoke; }
.ttrpg button.primary { background: var(--accent-bg); border-color: var(--accent-bg); color: var(--accent-text); }
.ttrpg button.secondary { border-color: var(--accent-bg); }
@media print { .ttrpg { --bg: #fff; --text: #000; --panel: #fff; } }
/* Licence and disclaimer text at the foot of each tool page: small print (Daniel, 14 Nov 2026: "a bit smaller, more
   compact, less line height"). 0.72em of the tools' 1.25rem base is about 14px. */
.ttrpg footer.site { margin-top: 2.5em; font-size: 0.72em; line-height: 1.3; }
.ttrpg footer.site .wrap { padding-block: 0.6em 0.4em; }
.ttrpg footer.site p { margin: 0 0 0.35em; }
/* The Asar stylesheet hides every <section> (absolute, opacity 0) except .section-show, for its one-page home.
   The tools use <section> for results and maps, so undo that inside .ttrpg only. */
.ttrpg section { position: static; overflow: visible; width: auto; top: auto; bottom: auto; opacity: 1; padding-bottom: 0; transition: none; }
/* Dungeon generator */
.ttrpg .card { color: var(--text); }   /* Bootstrap's own .card colour follows the site colour mode; the tools are always dark */
.ttrpg h4 { font-size: 1em; margin: 0.9em 0 0.2em; color: var(--accent); font-family: inherit; }
.ttrpg ul.plain.tight > li { padding: 0.2em 0; border-top: 0; }
.ttrpg .room h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em 0.3em; }
.ttrpg .area-no { display: inline-grid; place-items: center; inline-size: 1.9em; block-size: 1.9em; border-radius: 50%; background: #fff; color: #111; border: 3px solid #2f2318; font-weight: 700; flex: none; margin-inline-end: 0.3em; }
.ttrpg ol.contents { margin: 0.5em 0 0; padding-inline-start: 1.8em; }
.ttrpg ol.contents li { padding: 0.15em 0; }
.ttrpg .map[style] svg { min-inline-size: var(--map-min, 36em); }
.ttrpg .rooms-title { margin-top: 1.5em; }
.ttrpg .level-title { margin-top: 2em; padding-top: 0.6em; border-top: 4px solid var(--line); font-size: 1.7em; }
.ttrpg .room:target { outline: 4px solid var(--focus); outline-offset: 3px; }
.ttrpg blockquote.read-aloud { margin: 0.6em 0; padding: 0.6em 0.9em; border-inline-start: 6px solid var(--accent-bg, var(--accent)); background: rgba(140, 68, 173, 0.16); font-size: 1em; font-style: normal; color: var(--text); }
.ttrpg details.battle { margin-block: 0.5em; }
.ttrpg details.battle .map svg { min-inline-size: 0; max-inline-size: 40em; }
@media print {
.ttrpg blockquote.read-aloud { background: none; border-color: #000; color: #000; }
.ttrpg details.battle { break-inside: avoid; }
.ttrpg details.battle .map svg { max-inline-size: 60%; }
.ttrpg .map-card .choices { display: none !important; }
.ttrpg .map[style] svg { min-inline-size: 0; }
.ttrpg .room { break-inside: avoid; }
.ttrpg .level-title { break-before: page; border-top: 0; }
.ttrpg .area-no { border-color: #000; }
.ttrpg h4 { color: #000; }
}
/* Dungeon clock, hour boxes and the ink-saving switch */
.ttrpg .boxes { display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0.5em 0; }
.ttrpg .boxes label { display: inline-grid; place-items: center; min-inline-size: 44px; min-block-size: 44px; cursor: pointer; }
.ttrpg .boxes input[type="checkbox"] { inline-size: 1.7em; block-size: 1.7em; margin: 0; }
.ttrpg .clock-boxes label:nth-child(2n) { margin-inline-end: 0.9em; }
.ttrpg .stages li.reached { border-inline-start: 6px solid var(--warn); padding-inline-start: 0.6em; }
.ttrpg .clock-now { font-weight: 700; color: var(--warn); }
.ttrpg label.ink { display: inline-flex; align-items: center; gap: 0.5em; min-block-size: 44px; cursor: pointer; }
.ttrpg label.ink input { inline-size: 1.25em; block-size: 1.25em; margin: 0; }
@media print {
.ttrpg .clock { break-inside: avoid; }
.ttrpg .clock-now, .ttrpg .wander .actions { display: none !important; }
.ttrpg .boxes label { min-inline-size: 0; min-block-size: 0; }
.ttrpg .boxes input[type="checkbox"] { appearance: none; -webkit-appearance: none; inline-size: 1.6em; block-size: 1.6em; border: 1.5pt solid #000; border-radius: 2pt; background: #fff; }
.ttrpg .stages li.reached { border: 0; padding-inline-start: 0; }
}
/* Printing from inside the Asar template (every tool). Print only: nothing here changes the screen.
   The Asar menu, footer and smoke are left off the paper, the page flows over as many sheets as it needs, and all
   text is black on white (the Asar palette above would otherwise print white headings on white paper). */
@media print {
body { background: #fff !important; }
#header, #top, #footer, #mypreloader, body > .dropdown.position-fixed, body > div[style*="z-index: -10"] { display: none !important; }
#pageOpen { position: static !important; overflow: visible !important; top: auto !important; bottom: auto !important; height: auto !important; opacity: 1 !important; padding: 0 !important; }
.ttrpg { --bg: #fff; --text: #000; --muted: #333; --panel: #fff; --line: #888; --accent: #7a2410; --ok: #1b5e20; --warn: #8a4b00; background: #fff; color: #000; max-width: none; }
.ttrpg h1, .ttrpg h2, .ttrpg h3, .ttrpg h4 { color: #000; }
.ttrpg .card { color: #000; background: #fff; }
.ttrpg a { color: #000; }
}
/* Map versions (assets/js/map-views.js): every map has a DM map and a players' map, chosen with one switch. */
.ttrpg .map-views > [data-view] > .hint { margin-block: 0.6em 0; }
.ttrpg details.battle .map-switch { margin-block-start: 0.3em; }
.ttrpg .map-actions { margin-block-start: 0.75em; }
/* Tokens for a virtual tabletop (assets/js/tokens.js): each round picture is a button that saves it. */
.ttrpg .tokens { margin-block-start: 0.9em; padding-block-start: 0.2em; border-block-start: 2px solid var(--line); }
.ttrpg .token-row { display: flex; flex-wrap: wrap; gap: 0.4em; margin-block: 0.4em; }
.ttrpg button.token-save { padding: 2px; border: 2px solid transparent; border-radius: 50%; background: transparent; line-height: 0; cursor: pointer; min-inline-size: 0; min-block-size: 0; }
.ttrpg button.token-save:hover, .ttrpg button.token-save:focus-visible { border-color: var(--focus); }
.ttrpg button.token-save svg { display: block; }
/* Your own picture on a token (assets/js/token-art.js): one line for each monster, with a button-like file chooser. */
.ttrpg .token-art ul { margin-block: 0.3em; }
.ttrpg .token-art li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em 0.8em; }
.ttrpg .token-art-name { font-weight: 700; flex: 1 1 10em; overflow-wrap: anywhere; }
.ttrpg label.file-pick { display: inline-flex; align-items: center; min-block-size: 48px; padding: 0.5em 1.25em; border: 2px solid var(--accent-bg, var(--accent)); border-radius: var(--radius); color: var(--accent); font-weight: 700; cursor: pointer; }
.ttrpg label.file-pick input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; overflow: hidden; }
.ttrpg label.file-pick:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
@media print {
.ttrpg .map-switch, .ttrpg .map-actions, .ttrpg .tokens { display: none !important; }
/* The page's own Print button prints the DM's copy of everything: always the DM maps, whichever is on screen. */
.ttrpg .map-views > [data-view="dm"] { display: block !important; }
.ttrpg .map-views > [data-view="players"] { display: none !important; }
.ttrpg .map-views [data-view] .choices, .ttrpg .map-views > .hint { display: none !important; }
/* "Print this map": that one map box alone, in the version shown, with nothing else from the page. */
body.ttrpg-print-map .ttrpg main > :not(.result), body.ttrpg-print-map .ttrpg .result > :not(#result-body):not(#result-title),
body.ttrpg-print-map .ttrpg #result-body > :not(.print-this), body.ttrpg-print-map .ttrpg footer.site,
body.ttrpg-print-map.ttrpg-print-notitle .ttrpg #result-title { display: none !important; }
body.ttrpg-print-map .ttrpg .print-this > [data-view][hidden] { display: none !important; }
body.ttrpg-print-map .ttrpg .print-this > [data-view]:not([hidden]) { display: block !important; }
}
/* A magic item's own details in a result (assets/js/item-card.js): its numbers, its story, and what only the DM sees. */
.ttrpg ul.item-facts { margin: 0.4em 0; padding-inline-start: 1.2em; }
.ttrpg ul.item-facts li { padding: 0.1em 0; }
.ttrpg .item-lore { font-style: italic; }
.ttrpg .dm-only { border-inline-start: 6px solid var(--warn); padding: 0.4em 0.75em; margin-block: 0.6em; }
.ttrpg .dm-only .dm-label { margin: 0; font-weight: 700; color: var(--warn); font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.04em; }
.ttrpg .dm-only .desc { margin: 0.25em 0; }
/* "My house rules" under a tool's results (assets/js/house-rules.js). */
.ttrpg .house-rules { margin-top: 1.5em; }
.ttrpg .house-rules h2 { margin: 0 0 0.2em; font-size: 1.25em; }
@media print { .ttrpg .house-rules .hint { display: none !important; } .ttrpg .house-rules { break-inside: avoid; } }
/* Members only (16 Nov 2026): a save or download button the visitor may not use yet keeps its place, with a lock. */
.ttrpg .is-locked { opacity: 0.7; border-style: dashed; }
.ttrpg .members-note { color: var(--warn); font-weight: 700; }
/* One look for non-members (16 Nov 2026): the roll code is not shown (assets/js/members.js adds the class). */
.ttrpg-nolinks .ttrpg p.hint:has(> .seed) { display: none; }
/* Clean print (Daniel, 16 Nov 2026: "print button should load print css and reform to only print the module (map and
   text generated)"). Print only, nothing here changes the screen. The tool's title, the roll and its maps print on
   plain white; the Asar crest backdrop, the dark frame, the menu, buttons, ad spots, cookie box, colour-mode button,
   install button and the page's own introduction stay off the paper. The one-line page footer is set by
   assets/js/print.js; the full licence wording prints once at the end (footer.site). */
@media print {
@page { margin: 12mm 12mm 14mm; }
body::before, body::after { display: none !important; content: none !important; }
html, body { background: #fff !important; }
#pageOpen > .container, .section-show > .container { background: none !important; border: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; }
#us-toast-container, #install, .bd-mode-toggle, .asar-promo, #asar-consent, #top-admin, #adminMenu, #about, #resume, #contact { display: none !important; }
.ttrpg .lead, .ttrpg .no-print, .ttrpg .members-note, .ttrpg .is-locked, .ttrpg .fav-row, .ttrpg .token-art { display: none !important; }
.ttrpg main.wrap, .ttrpg .wrap { padding: 0 !important; max-width: none !important; }
.ttrpg h1 { font-size: 16pt; margin: 0 0 0.1em; }
.ttrpg .print-only { display: block !important; }
/* Keep the small colour marks (monster letters, district squares, tags) when the dialog's background graphics are off. */
.ttrpg .result, .ttrpg .result * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ttrpg-print-lock { color: #000 !important; }  /* the members note: the template's light text would vanish on white */
.ttrpg p.print-roll { margin: 0 0 0.8em; font-size: 9pt; color: #333; }
.ttrpg footer.site { margin-top: 1.5em; font-size: 7.5pt; color: #333; break-inside: avoid; }
.ttrpg footer.site .wrap { border-top: 0.5pt solid #888; padding-top: 0.4em !important; }
.ttrpg .map svg { max-inline-size: 100%; height: auto; }
/* Rooms flow on from one page to the next instead of leaving half pages blank; a heading stays with what follows it,
   and each battle map stays whole. */
.ttrpg .room, .ttrpg .npc, .ttrpg .result .card:not(.map-card) { break-inside: auto !important; }
.ttrpg .result tr, .ttrpg blockquote.read-aloud { break-inside: avoid; }
.ttrpg h2, .ttrpg h3, .ttrpg h4, .ttrpg .rooms-title { break-after: avoid; }
/* Maps as large as the paper allows without running off the page: while printing, print.js gives each map box its
   shape (--print-ar, width over height), and the box takes the full width or the width that fits the height cap. */
.ttrpg .map[style*="--print-ar"] { inline-size: min(100%, calc(var(--print-cap, 6.5in) * var(--print-ar))); }
.ttrpg details.battle .map[style*="--print-ar"] { --print-cap: 5in; }
.ttrpg .map[style*="--print-ar"] svg, .ttrpg details.battle .map[style*="--print-ar"] svg { inline-size: 100%; max-inline-size: none; min-inline-size: 0; block-size: auto; }
}
.ttrpg .print-only { display: none; }
/* Player handout (assets/js/handout-panel.js): tick boxes, a preview laid out like the paper, and printing it alone. */
.ttrpg .handout { margin-block: 1.2em; }
.ttrpg .handout-ticks { display: grid; gap: 0.6em; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18em), 1fr)); }
.ttrpg .handout-group { margin: 0; }
.ttrpg .handout-group label.check { display: flex; align-items: center; gap: 0.6em; min-block-size: 44px; cursor: pointer; }
.ttrpg .handout-group input[type="checkbox"] { inline-size: 1.4em; block-size: 1.4em; margin: 0; flex: none; }
.ttrpg .handout-all { margin: 0 0 0.2em; }
.ttrpg button.link { background: none; border: 0; padding: 0.3em 0; min-block-size: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.ttrpg .handout-preview-title { margin-block: 1.2em 0.4em; }
.ttrpg .handout-sheet { background: #fff; color: #111; border: 1px solid #999; border-radius: 4px; padding: 1.2em 1.4em; max-inline-size: 48em; font-size: 1.05em; line-height: 1.5; overflow-wrap: anywhere; }
.ttrpg .handout-sheet h2, .ttrpg .handout-sheet h3 { color: #111; }
.ttrpg .handout-sheet .handout-title { margin: 0; font-size: 1.7em; }
.ttrpg .handout-sheet .handout-sub { margin: 0.1em 0 0.8em; color: #444; }
.ttrpg .handout-sheet h3 { margin: 1em 0 0.25em; font-size: 1.15em; }
.ttrpg .handout-sheet blockquote.read-aloud { color: #111; background: #f3eee6; border-color: #7a2410; font-style: italic; }
.ttrpg .handout-sheet .handout-map { margin: 0.6em 0; }
.ttrpg .handout-sheet .handout-map img { display: block; inline-size: 100%; height: auto; }
.ttrpg .handout-sheet .handout-key { margin: 0.3em 0 0; font-size: 0.85em; color: #444; }
.ttrpg .handout-sheet .handout-credit { margin-top: 1.5em; font-size: 0.75em; color: #444; border-top: 1px solid #bbb; padding-top: 0.4em; }
.ttrpg .handout-sheet .hint { color: #444; }
@media print {
body.ttrpg-print-handout .ttrpg main > :not(.handout), body.ttrpg-print-handout .ttrpg footer.site,
body.ttrpg-print-handout .ttrpg .handout > :not(.handout-sheet) { display: none !important; }
body.ttrpg-print-handout .ttrpg .handout { margin: 0; padding: 0; border: 0; background: #fff; box-shadow: none; }
body.ttrpg-print-handout .ttrpg .handout-sheet { border: 0; padding: 0; max-inline-size: none; font-size: 11pt; }
body.ttrpg-print-handout .ttrpg .handout-sheet .handout-map { break-inside: avoid; }
body.ttrpg-print-handout .ttrpg .handout-sheet .handout-map img { max-block-size: 8.5in; object-fit: contain; }
body.ttrpg-print-handout .ttrpg .handout-sheet h3 { break-after: avoid; }
body.ttrpg-print-handout .ttrpg .handout-sheet blockquote { break-inside: avoid; }
/* the page's own Print button prints the DM's copy: the handout panel is not part of it */
body:not(.ttrpg-print-handout) .ttrpg .handout { display: none !important; }
}
/* Quick dice (assets/js/quick-dice.js): How many, then one button per die in that die's shape. */
.ttrpg .quick-dice { display: grid; gap: 0.5em; }
.ttrpg .qd-count { display: flex; align-items: center; gap: 0.4em; flex-wrap: wrap; }
.ttrpg .qd-label { font-weight: 700; margin-inline-end: 0.25em; }
.ttrpg .qd-count .qd-step { min-inline-size: 44px; min-block-size: 44px; padding: 0; font-size: 1.3em; line-height: 1; }
.ttrpg .qd-count .qd-n { inline-size: 3.6em; text-align: center; font-weight: 700; }
.ttrpg .qd-dice { display: flex; flex-wrap: wrap; gap: 0.45em; }
.ttrpg .qd-die { display: inline-flex; flex-direction: column; align-items: center; gap: 0.15em; min-inline-size: 3.6em; padding: 0.35em 0.5em; line-height: 1.1; }
.ttrpg .qd-die .die-icon { inline-size: 1.7em; block-size: 1.7em; }
.ttrpg .die-icon .pip { fill: currentColor; stroke: none; }
.ttrpg .qd-die .qd-text { font-size: 0.85em; }

/* A link that looks like a button ("Run this fight", combat-handoff.js). */
.ttrpg a.button { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; min-block-size: 48px; padding: 0.5em 1.25em;
  border-radius: var(--radius); border: 2px solid var(--accent-bg); text-decoration: none; color: var(--accent); }
.ttrpg a.button:hover { background: rgba(140, 68, 173, 0.25); }
.ttrpg .run-fight-row { margin-block: 0.5em; }
@media print { .ttrpg .run-fight-row { display: none !important; } }
/* The players' key under a map in the player handout (handout-panel.js): the same drawings as the page's key. */
.ttrpg .handout-sheet .handout-legend { margin-top: 0.5em; break-inside: avoid; }
.ttrpg .handout-sheet .handout-key-title { margin: 0 0 0.2em; font-weight: 700; }
.ttrpg .handout-sheet .handout-legend ul.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14em), 1fr)); gap: 0.2em 1em; margin: 0; padding: 0; list-style: none; color: #111; }
.ttrpg .handout-sheet .handout-legend li { display: flex; align-items: center; gap: 0.5em; font-size: 0.9em; }
.ttrpg .handout-sheet .handout-legend li svg { flex: none; inline-size: 1.6em; block-size: 1.6em; }

/* Sounds strip under a rolled encounter or dungeon (assets/js/sounds.js, 22 Nov 2026) */
.ttrpg .sounds .snd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em 0.75em; margin-block: 0.5em; }
.ttrpg .sounds .snd-row select { max-width: 100%; }
.ttrpg .sounds .snd-row input[type="range"] { flex: 1 1 10em; max-width: 18em; }
.ttrpg .sounds .snd-head { font-weight: bold; margin: 0.75em 0 0.25em; }
.ttrpg .sounds .snd-buttons { display: flex; flex-wrap: wrap; gap: 0.4em; }
.ttrpg .sounds .snd-buttons button { min-height: 2.75em; }
.ttrpg .sounds .snd-bed-play[aria-pressed="true"] { outline: 2px solid var(--accent); }
