
:root { --leather: #3a2317; --parchment: #f5ecd6; --ink-text: #2b2016; --soft: #5e4b36; --faint: #8a7457; --rule: #c9b48a; --rubric: #8f2b1f; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--leather); color: var(--ink-text); font: 18px/1.55 "EB Garamond", Georgia, "Iowan Old Style", "Palatino Linotype", serif; }
header { padding: 10px 16px; text-align: center; }
.brand { color: #d4af5a; font-variant: small-caps; letter-spacing: 0.12em; font-size: 15px; }
main.page { max-width: 720px; margin: 0 auto; padding: 18px 18px 28px; background: var(--parchment); min-height: 70vh; border-radius: 2px; box-shadow: 0 6px 22px rgba(0,0,0,0.35); }
@media (min-width: 760px) { main.page { margin-top: 8px; padding: 26px 34px 34px; } }
footer { text-align: center; color: #b8944a; font-size: 13px; padding: 14px; font-style: italic; }
h1 { font-size: 1.7rem; line-height: 1.15; margin: 0.2em 0 0.4em; font-variant: small-caps; letter-spacing: 0.02em; }
h2 { font-size: 1.1rem; color: var(--rubric); border-bottom: 1px solid var(--rule); margin: 1.2em 0 0.4em; font-variant: small-caps; }
h3 { font-size: 0.95rem; margin: 0 0 4px; color: var(--faint); font-variant: small-caps; }
a { color: var(--rubric); text-underline-offset: 2px; }
.hint { color: var(--soft); font-style: italic; }
.crumbs { font-size: 14px; color: var(--faint); margin-bottom: 8px; font-variant: small-caps; }
.crumbs a { color: var(--soft); }
.toc { padding-left: 1.4em; }
.toc li { margin: 0.4em 0; }
.big { font-size: 1.25rem; }
.search input { width: 100%; font: inherit; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 3px; background: #fffaf0; color: inherit; }
.chapter h2 { color: var(--ink); }
.count { color: var(--faint); font-size: 0.8em; }
.entries, .ties { padding-left: 1.2em; margin: 0.2em 0; }
.entries li, .ties li { margin: 0.3em 0; }
.cat { color: var(--faint); font-size: 0.8em; font-variant: small-caps; }
.entry .head { display: flex; gap: 14px; align-items: center; }
.entry .kind { margin: 0; color: var(--ink); font-variant: small-caps; letter-spacing: 0.06em; font-size: 14px; }
.portrait { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ink); flex: none; }
.part_of { margin: 0; font-style: italic; color: var(--soft); }
.map_picture { display: block; margin: 8px 0; text-align: center; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.gallery figure { margin: 0; width: 140px; }
.gallery img { width: 140px; height: 180px; object-fit: contain; border: 1px solid var(--rule); background: rgba(255,250,240,0.6); }
.gallery figcaption { font-size: 0.85em; font-style: italic; color: var(--soft); text-align: center; }
.map_picture img { width: 100%; height: auto; border: 1px solid var(--rule); }
.desc { white-space: pre-line; margin: 0.6em 0; }
.desc p, .notes p { margin: 0 0 0.6em; }
.desc ul, .notes ul { margin: 0.2em 0 0.6em; padding-left: 1.3em; white-space: normal; }
.rt_table { border-collapse: collapse; margin: 0.2em 0 0.6em; white-space: normal; font-size: 0.95em; display: block; overflow-x: auto; }
.rt_table th, .rt_table td { padding: 2px 8px; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.rt_table th { font-weight: normal; font-variant: small-caps; color: var(--rubric); background: rgba(227,209,168,0.5); }
.desc h3, .desc h4, .desc h5, .notes h4, .notes h5 { margin: 0.9em 0 0.3em; font-size: 1em; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 3px; background: rgba(255,250,240,0.6); }
.details dt { font-variant: small-caps; color: var(--rubric); }
.details dd { margin: 0; }
.notes { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--rule); background: rgba(227,209,168,0.35); white-space: pre-line; }
em { color: var(--soft); }
.sheet_cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 8px 0; }
.sheet_card { padding: 6px 10px 8px; border: 1px solid var(--rule); border-radius: 3px; background: rgba(255,250,240,0.6); }
.sheet_card h3 { color: var(--rubric); border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; margin: 0; }
.stats dt { font-variant: small-caps; color: var(--soft); }
.stats dd { margin: 0; text-align: right; font-weight: 600; }
.stats .wide { grid-column: 1 / -1; text-align: left; font-weight: normal; }
code.roll { font: 0.75em ui-monospace, Menlo, monospace; color: var(--faint); font-weight: normal; }
.rolls { padding-left: 1.2em; margin: 0.2em 0; }
table.items { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
table.items th { text-align: left; font-weight: normal; font-variant: small-caps; color: var(--faint); font-size: 0.85em; }
table.items td { border-top: 1px dotted var(--rule); padding: 2px 4px; vertical-align: top; }
table.items .num { text-align: right; white-space: nowrap; width: 3.5em; }
table.chart { max-width: 260px; }
table.chart .num { width: auto; font-weight: 600; }
