/* Table Hub – shared member-area components (scoped to .th-hub). Sits on parchment. */
.th-hub .th-left { text-align: left; }
.th-hub .th-title { margin-bottom: .75rem; }
.th-hub .th-muted { color: var(--th-brown); font-style: italic; }
.th-hub .th-link { color: var(--th-burgundy); text-decoration: underline; cursor: pointer; }
.th-hub .th-back { margin: 0 0 .5rem; font-size: .98rem; }

.th-btn.th-btn-sm { font-size: .82rem; padding: .55rem 1.1rem; letter-spacing: .06em; box-shadow: 0 0 0 2px color-mix(in srgb, var(--th-dark) 50%, transparent), 0 3px 8px rgba(0,0,0,.3); }
.th-btn.th-btn-danger { background: linear-gradient(180deg, #7a1f1f, #4f1212); }

.th-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.th-list-head .th-title { margin: 0; }
.th-empty { font-style: italic; text-align: center; padding: 1.5rem 0; }

/* session cards */
.th-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.th-card {
	display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; align-items: start;
	padding: 1rem; margin: 0;
	background: color-mix(in srgb, var(--th-paper) 55%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 35%, transparent); border-radius: 4px;
	box-shadow: 0 2px 6px color-mix(in srgb, var(--th-ink) 15%, transparent);
}
.th-card.is-cancelled { opacity: .7; }
.th-card-body { min-width: 0; }
.th-card-title { margin: 0 0 .2rem; font-family: var(--th-font-heading); font-size: 1.15rem; line-height: 1.25; }
.th-card-title a { color: var(--th-ink); text-decoration: none; }
.th-card-title a:hover, .th-card-title a:focus-visible { color: var(--th-burgundy); text-decoration: underline; }
.th-card-meta, .th-card-counts { margin: 0 0 .35rem; font-size: 1rem; }
.th-card-counts { color: var(--th-brown); font-size: .95rem; }

.th-date {
	display: grid; justify-items: center; align-content: center; gap: 0; padding: .45rem .3rem;
	background: linear-gradient(180deg, var(--th-burgundy-hi), #4a2124); color: var(--th-ivory); border: 2px solid var(--th-gold); border-radius: 4px;
	font-family: var(--th-font-heading); line-height: 1.05; text-align: center;
}
.th-date-dow, .th-date-mon { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.th-date-day { font-size: 1.7rem; font-weight: 700; }

/* RSVP pills */
.th-rsvp { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .35rem 0 0; }
.th-rsvp-label { font-family: var(--th-font-heading); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--th-burgundy); margin-right: .2rem; }
.th-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.th-pill {
	cursor: pointer; font: 600 .9rem/1 var(--th-font-heading); padding: .5rem .85rem; border-radius: 999px;
	background: color-mix(in srgb, var(--th-paper) 80%, transparent); color: var(--th-ink); border: 1px solid color-mix(in srgb, var(--th-brown) 50%, transparent);
	transition: background-color .15s, color .15s, box-shadow .15s;
}
.th-pill:hover, .th-pill:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-gold) 45%, transparent); outline: none; }
.th-pill-going.is-on { background: #34463A; color: var(--th-ivory); border-color: #34463A; }
.th-pill-maybe.is-on { background: #8a6a2a; color: var(--th-ivory); border-color: #8a6a2a; }
.th-pill-no.is-on { background: var(--th-burgundy); color: var(--th-ivory); border-color: var(--th-burgundy); }
.th-rsvp-full { display: grid; gap: .5rem; }
.th-rsvp-full input[type="text"] { width: 100%; }

.th-tag { display: inline-block; vertical-align: middle; font: 700 .7rem/1 var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; padding: .3rem .5rem; border-radius: 3px; }
.th-tag-red { background: var(--th-burgundy); color: var(--th-ivory); }

/* detail view */
.th-facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.th-facts dt { font-family: var(--th-font-heading); font-weight: 700; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--th-burgundy); padding-top: .15rem; }
.th-facts dd { margin: 0; }
.th-box { padding: 1rem; margin: 1rem 0; background: color-mix(in srgb, var(--th-paper) 55%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 35%, transparent); border-radius: 4px; }
.th-roster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.th-roster h4 { margin: 0 0 .35rem; font-family: var(--th-font-heading); font-size: .9rem; color: var(--th-burgundy); }
.th-roster ul { list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.th-roster li { padding: .15rem 0; }
.th-gm-tools { border-top: 1px dashed color-mix(in srgb, var(--th-brown) 50%, transparent); padding-top: 1rem; margin-top: 1rem; }
.th-gm-tools h4 { margin: 0 0 .6rem; font-family: var(--th-font-heading); color: var(--th-burgundy); }
.th-inline { display: inline-block; margin: .5rem .75rem 0 0; vertical-align: top; }
.th-inline[open] { display: block; }
.th-inline summary { list-style: none; }
.th-inline form { display: grid; gap: .5rem; margin-top: .5rem; max-width: 28rem; }
.th-past { margin-top: 1.25rem; }
.th-past summary { cursor: pointer; font-family: var(--th-font-heading); font-weight: 700; color: var(--th-burgundy); }
.th-past ul { margin: .5rem 0 0; padding-left: 1.1rem; }

/* forms */
.th-hub textarea, .th-hub input[type="datetime-local"], .th-hub input[type="time"], .th-hub input[type="url"] {
	width: 100%; margin: 0; font: 1.05rem/1.4 var(--th-font-body); color: var(--th-ink);
	background: color-mix(in srgb, var(--th-paper) 60%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 50%, transparent); border-radius: 3px; padding: .65rem .8rem;
	box-shadow: inset 0 1px 3px color-mix(in srgb, var(--th-ink) 18%, transparent);
}
.th-hub textarea:focus, .th-hub input[type="datetime-local"]:focus, .th-hub input[type="time"]:focus, .th-hub input[type="url"]:focus { outline: none; border-color: var(--th-gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-gold) 45%, transparent); }
.th-row { display: grid; grid-template-columns: 2fr 1fr; gap: .9rem; }

@media (max-width: 767px) {
	.th-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.th-row { grid-template-columns: 1fr; }
	.th-card { grid-template-columns: 3.6rem 1fr; gap: .75rem; padding: .85rem; }
	.th-date-day { font-size: 1.4rem; }
	.th-facts { grid-template-columns: 1fr; gap: .1rem; }
	.th-facts dd { margin-bottom: .5rem; }
	.th-hub textarea, .th-hub input { font-size: 16px; }
}

/* ================================================================ Guild Hall */
.th-welcome { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: .4rem 1rem; font-family: var(--th-font-body); color: var(--th-ivory); text-shadow: 0 2px 4px rgba(0,0,0,.9); text-align: center; }
.th-welcome-hi { font-size: 1.35rem; font-style: italic; }
.th-welcome-role { font: 700 .72rem/1 var(--th-font-heading); letter-spacing: .12em; text-transform: uppercase; color: var(--th-dark); background: var(--th-gold); padding: .35rem .6rem; border-radius: 3px; text-shadow: none; }
.th-welcome-out { font-family: var(--th-font-heading); font-size: .8rem; letter-spacing: .06em; color: var(--th-gold-hi) !important; }
.th-welcome-out:hover, .th-welcome-out:focus-visible { color: var(--th-ivory) !important; }

.th-card-feature { grid-template-columns: 5.5rem 1fr; background: color-mix(in srgb, var(--th-paper) 65%, transparent); }
.th-card-feature .th-date-day { font-size: 2.1rem; }
.th-card-feature .th-card-title { font-size: 1.35rem; }

.th-awaiting { margin-top: 1rem; }
.th-awaiting-h { margin: 0 0 .35rem; font-family: var(--th-font-heading); font-size: .9rem; color: var(--th-burgundy); }
.th-awaiting ul { margin: 0; padding-left: 1.1rem; }

.th-rooms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.1rem; }
.th-room { margin: 0; }
.th-room-link {
	position: relative; display: flex; align-items: flex-end; min-height: 11rem; height: 100%;
	border: 2px solid var(--th-gold); border-radius: 6px; overflow: hidden; text-decoration: none !important;
	background: #2a1c11 center / cover no-repeat;
	box-shadow: 0 0 0 3px var(--th-dark), 0 0 0 4px color-mix(in srgb, var(--th-gold) 45%, transparent), 0 12px 24px rgba(0, 0, 0, .55);
	transition: transform .2s ease, box-shadow .2s ease;
}
.th-room-link::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--th-dark) 5%, transparent) 20%, color-mix(in srgb, var(--th-dark) 88%, transparent) 100%); }
a.th-room-link:hover, a.th-room-link:focus-visible { transform: translateY(-4px); outline: none; box-shadow: 0 0 0 3px var(--th-dark), 0 0 0 4px color-mix(in srgb, var(--th-gold-hi) 90%, transparent), 0 0 26px color-mix(in srgb, var(--th-gold-hi) 45%, transparent), 0 14px 28px rgba(0,0,0,.6); }
.th-room-text { position: relative; display: grid; gap: .2rem; padding: 1rem 1.1rem; }
.th-room-name { font: 700 1.2rem/1.15 var(--th-font-heading); color: var(--th-gold-hi); text-shadow: 0 2px 4px rgba(0,0,0,.9); }
.th-room-blurb { font: italic 1rem/1.35 var(--th-font-body); color: var(--th-ivory); text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.th-room-soon { justify-self: start; margin-top: .35rem; font: 700 .65rem/1 var(--th-font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--th-dark); background: rgba(229, 212, 174, .85); padding: .3rem .5rem; border-radius: 3px; }
.th-room.is-soon .th-room-link { filter: grayscale(.55) brightness(.8); cursor: default; }

@media (max-width: 767px) {
	.th-rooms { grid-template-columns: 1fr; }
	.th-room-link { min-height: 9rem; }
	.th-card-feature { grid-template-columns: 4rem 1fr; }
}
@media (prefers-reduced-motion: reduce) { .th-room-link { transition: none; } a.th-room-link:hover { transform: none; } }

/* ================================================================ Chronicles (campaigns) */
.th-camps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.th-camp { margin: 0; }
.th-camp-link { display: flex; flex-direction: column; height: 100%; text-decoration: none !important; color: var(--th-ink); background: color-mix(in srgb, var(--th-paper) 60%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 40%, transparent); border-radius: 5px; overflow: hidden; box-shadow: 0 3px 8px color-mix(in srgb, var(--th-ink) 20%, transparent); transition: transform .2s, box-shadow .2s; }
.th-camp-link:hover, .th-camp-link:focus-visible { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--th-gold), 0 8px 18px color-mix(in srgb, var(--th-ink) 30%, transparent); outline: none; }
.th-camp-cover { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #3a2818, var(--th-dark)) center / cover no-repeat; border-bottom: 2px solid var(--th-gold); }
.th-camp-body { display: grid; gap: .2rem; padding: .85rem 1rem 1rem; }
.th-camp-name { font: 700 1.15rem/1.2 var(--th-font-heading); color: var(--th-burgundy); }
.th-camp-meta { font-size: .98rem; }
.th-camp-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.th-camp-complete .th-camp-link { opacity: .8; }
.th-tag-gold { background: var(--th-gold); color: var(--th-dark); }
.th-tag-dark { background: var(--th-ink); color: var(--th-ivory); }
.th-camp-banner { aspect-ratio: 21 / 8; border-radius: 5px; border: 2px solid var(--th-gold); background: #2a1c11 center / cover no-repeat; margin: .25rem 0 1rem; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.th-camp-sub { margin: -.4rem 0 .75rem; font-style: italic; color: var(--th-brown); }
.th-camp-summary p { margin: 0 0 .7rem; }
.th-camp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.th-camp-cols .th-box { margin: 0; }
.th-box-h { margin: 0 0 .6rem; font: 700 1.05rem/1.2 var(--th-font-heading); color: var(--th-burgundy); }
.th-party, .th-mini-list { margin: 0 0 .5rem; padding-left: 1.1rem; }
.th-mini-list li { margin-bottom: .45rem; }
.th-picks .th-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .35rem .9rem; }
.th-hub fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.th-hub legend { font-family: var(--th-font-heading); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--th-burgundy); margin-bottom: .35rem; padding: 0; }
.th-hub select { width: 100%; font: 1.05rem/1.4 var(--th-font-body); color: var(--th-ink); background: color-mix(in srgb, var(--th-paper) 70%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 50%, transparent); border-radius: 3px; padding: .6rem .7rem; }
.th-hub input[type="file"] { font: 1rem var(--th-font-body); }
@media (max-width: 767px) {
	.th-camp-cols { grid-template-columns: 1fr; }
	.th-camps { grid-template-columns: 1fr; }
}

/* checkbox/radio rows inside fields: body text, not label caps */
.th-hub .th-field .th-check, .th-hub fieldset .th-check {
	display: flex; align-items: flex-start; gap: .55rem; margin: 0;
	font: 400 1.05rem/1.35 var(--th-font-body); letter-spacing: 0; text-transform: none; color: var(--th-ink);
	overflow-wrap: anywhere;
}
.th-hub .th-check input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: .15rem 0 0; accent-color: var(--th-burgundy); }
.th-hub .th-check span { min-width: 0; }
.th-picks .th-pick-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem 1.25rem; }
@media (max-width: 767px) { .th-picks .th-pick-grid { grid-template-columns: 1fr; } }

/* ================================================================ Notice Board */
.th-notices { display: grid; gap: 1rem; }
.th-notice {
	position: relative; padding: 1rem 1.25rem 1.05rem;
	font: 1.05rem/1.5 var(--th-font-body); color: var(--th-ink);
	background: #E5D4AE radial-gradient(ellipse at 30% 20%, rgba(255, 250, 235, .6), rgba(229, 212, 174, 0) 65%);
	border-radius: 2px; box-shadow: 0 6px 14px rgba(0, 0, 0, .55); transform: rotate(-.8deg);
}
.th-notice:nth-child(even) { transform: rotate(.6deg); }
.th-notice::before { /* brass tack */
	content: ''; position: absolute; top: .45rem; left: 50%; width: .7rem; height: .7rem; margin-left: -.35rem; border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #f3d98f, #8a6a2a 70%); box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.th-notice.is-pinned { box-shadow: 0 0 0 2px var(--th-gold), 0 6px 14px rgba(0, 0, 0, .55); }
.th-notice-title { margin: .35rem 0 .35rem; font: 700 1.1rem/1.25 var(--th-font-heading); color: var(--th-burgundy); }
.th-notice-text p { margin: 0 0 .5rem; }
.th-notice-text p:last-child { margin-bottom: 0; }
.th-notice-text a, .th-notice-link a { color: var(--th-burgundy); font-weight: 600; }
.th-notice-link { margin: .5rem 0 0; font-family: var(--th-font-heading); font-size: .9rem; letter-spacing: .03em; }
.th-notices-empty { margin: 0; text-align: center; font: italic 1.05rem var(--th-font-body); color: #E5D4AE; }
.th-notices-admin { margin: .25rem 0 0; text-align: right; font: .85rem var(--th-font-heading); }
.th-notices-admin a { color: var(--th-gold-hi); }
@media (prefers-reduced-motion: reduce) { .th-notice, .th-notice:nth-child(even) { transform: none; } }

/* ================================================================ Campaign colors, filters */
.th-card { border-left: 5px solid var(--th-camp, color-mix(in srgb, var(--th-brown) 35%, transparent)); }
.th-camp-link { border-top: 5px solid var(--th-camp, var(--th-gold)); }
.th-eyebrow { margin: 0 0 .1rem; font: 700 .72rem/1 var(--th-font-heading); letter-spacing: .12em; text-transform: uppercase; color: var(--th-camp, var(--th-burgundy)); }
.th-camp-next { margin: 1rem 0 0; }
.th-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.th-filter {
	font: 600 .85rem/1 var(--th-font-heading); padding: .5rem .85rem; border-radius: 999px; text-decoration: none !important;
	color: var(--th-ink) !important; background: color-mix(in srgb, var(--th-paper) 80%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 45%, transparent);
	box-shadow: inset 4px 0 0 var(--th-camp, transparent);
}
.th-filter.is-on { background: var(--th-camp, var(--th-burgundy)); color: var(--th-ivory) !important; border-color: transparent; box-shadow: none; }
.th-swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
.th-swatch { position: relative; cursor: pointer; }
.th-swatch input { position: absolute; opacity: 0; }
.th-swatch span { display: inline-block; padding: .45rem .8rem .45rem 2rem; font: 600 .85rem/1 var(--th-font-heading); border: 1px solid color-mix(in srgb, var(--th-brown) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--th-paper) 80%, transparent); position: relative; text-transform: none; letter-spacing: 0; color: var(--th-ink); }
.th-swatch span::before { content: ''; position: absolute; left: .55rem; top: 50%; width: 1rem; height: 1rem; margin-top: -.5rem; border-radius: 50%; background: var(--sw); }
.th-swatch input:checked + span { box-shadow: 0 0 0 2px var(--sw); background: #fff8e6; }
.th-swatch input:focus-visible + span { outline: 3px solid var(--th-gold-hi); outline-offset: 2px; }
.th-row.th-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ================================================================ Characters */
.th-roster-cards { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .6rem; }
.th-char a { display: grid; grid-template-columns: 3.4rem 1fr; gap: .75rem; align-items: center; padding: .5rem; border-radius: 4px; text-decoration: none !important; color: var(--th-ink); background: color-mix(in srgb, var(--th-paper) 55%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 30%, transparent); transition: box-shadow .15s; }
.th-char a:hover, .th-char a:focus-visible { box-shadow: 0 0 0 2px var(--th-gold); outline: none; }
.th-char.is-mine a { border-color: var(--th-gold); }
.th-char-fallen a, .th-char-retired a { opacity: .65; }
.th-char-portrait { width: 3.4rem; height: 3.4rem; border-radius: 50%; border: 2px solid var(--th-gold); background: #3a2818 center / cover no-repeat; display: grid; place-items: center; font: 700 1.3rem var(--th-font-heading); color: var(--th-gold-hi); }
.th-char-body { display: grid; gap: .05rem; min-width: 0; }
.th-char-name { font: 700 1.02rem/1.2 var(--th-font-heading); color: var(--th-burgundy); }
.th-char-sub { font-style: italic; font-size: .98rem; }
.th-char-player { font-size: .9rem; color: var(--th-brown); }
.th-char-sheet { display: grid; grid-template-columns: 14rem 1fr; gap: 1.5rem; align-items: start; margin-bottom: 1rem; }
.th-char-frame { aspect-ratio: 3 / 4; border: 3px solid var(--th-gold); border-radius: 6px; background: #3a2818 center / cover no-repeat; box-shadow: 0 0 0 3px var(--th-dark), 0 10px 22px rgba(0,0,0,.4); display: grid; place-items: center; }
.th-char-frame span { font: 700 4rem var(--th-font-heading); color: var(--th-gold-hi); }
.th-char-about p { margin: 0 0 .7rem; }
.th-secret { border-style: dashed; background: color-mix(in srgb, var(--th-burgundy) 7%, transparent); }
@media (max-width: 767px) {
	.th-char-sheet { grid-template-columns: 1fr; }
	.th-char-frame { max-width: 14rem; margin: 0 auto; }
	.th-row.th-row-3 { grid-template-columns: 1fr; }
}

/* ================================================================ Chronicle: recaps, journals, comments */
.th-btn.th-btn-quiet { background: linear-gradient(180deg, #5b4a33, #3a2c1c); }
.th-chronicle { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--th-brown) 35%, transparent); }
.th-chronicle .th-list-head { margin-bottom: .6rem; }
.th-chronicle .th-list-head span { display: flex; flex-wrap: wrap; gap: .4rem; }
.th-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.th-entry { display: grid; gap: .15rem; padding: .7rem .9rem; background: color-mix(in srgb, var(--th-paper) 50%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 30%, transparent); border-left: 4px solid #8a6a3e; border-radius: 3px; }
.th-entry-journal { border-left-color: #5a2d52; font-style: normal; }
.th-entry.is-latest { background: color-mix(in srgb, var(--th-paper) 80%, transparent); border-left-width: 6px; }
.th-entry-title { font: 700 1.05rem/1.25 var(--th-font-heading); color: var(--th-burgundy) !important; text-decoration: none !important; }
.th-entry-title:hover, .th-entry-title:focus-visible { text-decoration: underline !important; }
.th-entry-by { font-size: .92rem; color: var(--th-brown); }
.th-entry-ex { margin: .35rem 0 0; }
.th-entry-full { margin-bottom: 1rem; }
.th-entry-body { font-size: 1.12rem; line-height: 1.7; }
.th-entry-body p { margin: 0 0 1rem; }
.th-entry-full.th-entry-journal .th-entry-body { font-style: italic; padding: 1rem 1.25rem; background: color-mix(in srgb, var(--th-paper) 45%, transparent); border-left: 3px solid #5a2d52; }
.th-previously { margin: .5rem 0 .25rem; font-size: 1rem; }
.th-previously span { font: 700 .75rem/1 var(--th-font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--th-burgundy); margin-right: .3rem; }
.th-comments { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed color-mix(in srgb, var(--th-brown) 50%, transparent); }
.th-comments > ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.th-comment { padding: .6rem .85rem; background: color-mix(in srgb, var(--th-paper) 55%, transparent); border-radius: 3px; border: 1px solid color-mix(in srgb, var(--th-brown) 25%, transparent); }
.th-comment p { margin: 0 0 .4rem; }
.th-comment p:last-child { margin-bottom: 0; }
.th-comment-by { font-size: .95rem; }
.th-comment-del { display: inline; }
.th-comment-del .th-link { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; }

/* ================================================================ My Quarters */
.th-avatar { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--th-gold); background: #3a2818 center / cover no-repeat; font: 700 1rem var(--th-font-heading); color: var(--th-gold-hi); flex: 0 0 auto; }
.th-avatar-lg { width: 5.5rem; height: 5.5rem; font-size: 2.2rem; box-shadow: 0 0 0 3px var(--th-dark), 0 6px 14px rgba(0,0,0,.35); }
.th-profile-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.25rem; }
.th-profile-head .th-title { margin: 0 0 .2rem; }
.th-profile-head .th-camp-sub { margin: 0; }
.th-q-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1rem; }
.th-q-grid .th-box { margin: 0; }
.th-q-sessions { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.th-q-sessions li { display: grid; gap: .1rem; padding-left: .7rem; border-left: 4px solid var(--th-camp, #8a6a3e); }
.th-q-sessions a { font-family: var(--th-font-heading); font-weight: 700; color: var(--th-burgundy); }
.th-q-sessions .th-rsvp { margin-top: .2rem; }
.th-q-sessions .th-rsvp-label { display: none; }
.th-q-sessions .th-pill { font-size: .8rem; padding: .4rem .7rem; }
.th-q-section { margin-top: 1.25rem; }
.th-row.th-row-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 767px) {
	.th-q-grid, .th-row.th-row-even { grid-template-columns: 1fr; }
	.th-avatar-lg { width: 4.5rem; height: 4.5rem; }
}

.th-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .9rem; }
.th-inline-form label { font: 700 .8rem var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; color: var(--th-burgundy); }
.th-inline-form select { width: auto; min-width: 14rem; flex: 1 1 14rem; max-width: 26rem; }
.th-field .th-small { display: block; margin-top: .25rem; }

/* ================================================================ Handouts + GM notes */
.th-handouts { margin-top: 1rem; }
.th-handout-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.th-handout-item { display: flex; gap: .6rem; align-items: baseline; }
.th-handout-item a { font-family: var(--th-font-heading); font-weight: 700; color: var(--th-burgundy); }
.th-handout-item.is-draft { opacity: .75; }
.th-handout-icon { width: 1.4rem; text-align: center; }
.th-handout { margin-bottom: 1rem; }
.th-handout-text { font-size: 1.12rem; line-height: 1.7; padding: 1.1rem 1.3rem; background: color-mix(in srgb, var(--th-paper) 55%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 30%, transparent); border-radius: 3px; margin-bottom: 1rem; }
.th-handout-text p { margin: 0 0 .9rem; }
.th-handout-text p:last-child { margin-bottom: 0; }
.th-handout-img { display: block; margin: 0 0 .75rem; }
.th-handout-img img { display: block; max-width: 100%; height: auto; border: 3px solid var(--th-gold); border-radius: 4px; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.th-indent { margin: .35rem 0 0 1.6rem; }
.th-gm-notes { margin-top: 1.25rem; }
.th-gm-notes summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.th-gm-notes summary::-webkit-details-marker { display: none; }
.th-gm-notes summary .th-box-h { margin: 0; }
.th-gm-notes summary::before { content: '▸'; color: var(--th-burgundy); }
.th-gm-notes[open] summary::before { content: '▾'; }
.th-gm-notes .th-form { margin-top: .75rem; }

/* ================================================================ GM's Study */
.th-study .th-list-head span { display: flex; flex-wrap: wrap; gap: .4rem; }
.th-study-camp { margin: 1.1rem 0; padding: 1rem 1.1rem; background: color-mix(in srgb, var(--th-paper) 50%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 35%, transparent); border-top: 5px solid var(--th-camp, var(--th-burgundy)); border-radius: 4px; }
.th-study-camp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; margin-bottom: .75rem; }
.th-study-camp-head h3 { margin: 0; font: 700 1.2rem/1.2 var(--th-font-heading); }
.th-study-camp-head h3 a { color: var(--th-burgundy); text-decoration: none; }
.th-study-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.th-study-cell { padding: .7rem .8rem; background: color-mix(in srgb, var(--th-paper) 60%, transparent); border-radius: 3px; border: 1px solid color-mix(in srgb, var(--th-brown) 20%, transparent); }
.th-study-cell h4 { margin: 0 0 .4rem; font: 700 .78rem/1 var(--th-font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--th-camp, var(--th-burgundy)); }
.th-study-cell p { margin: 0 0 .4rem; }
.th-warn { color: #8a3a12; font-weight: 600; }
.th-good { color: #2f5a3a; }
.th-notes-peek { font-style: italic; }
.th-study-block { margin-top: 1.4rem; }
.th-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.th-feed li { padding-left: .8rem; border-left: 3px solid color-mix(in srgb, var(--th-gold) 70%, transparent); }
.th-feed a { color: var(--th-ink); }
@media (max-width: 1024px) { .th-study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .th-study-grid { grid-template-columns: 1fr; } }

/* ================================================================ Library */
.th-up-next { margin: 0 0 1rem; border-left: 5px solid var(--th-gold); }
.th-shelf { margin: 1.1rem 0; }
.th-shelf-h { margin: 0 0 .55rem; padding-bottom: .3rem; font: 700 1.1rem/1.2 var(--th-font-heading); color: var(--th-burgundy); border-bottom: 2px solid color-mix(in srgb, var(--th-gold) 60%, transparent); }
.th-books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
.th-book a { display: grid; gap: .25rem; height: 100%; padding: .85rem .9rem .9rem 1.1rem; text-decoration: none !important; color: var(--th-ink); background: linear-gradient(90deg, color-mix(in srgb, var(--th-ink) 18%, transparent) 0, color-mix(in srgb, var(--th-ink) 0%, transparent) .5rem), color-mix(in srgb, var(--th-paper) 65%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 35%, transparent); border-left: 6px solid var(--th-burgundy); border-radius: 2px 5px 5px 2px; box-shadow: 0 3px 8px color-mix(in srgb, var(--th-ink) 15%, transparent); transition: transform .15s, box-shadow .15s; }
.th-book-house_rules a { border-left-color: #34463A; }
.th-book-reference a { border-left-color: #25344a; }
.th-book a:hover, .th-book a:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--th-gold), 0 6px 14px color-mix(in srgb, var(--th-ink) 25%, transparent); outline: none; }
.th-book-type { font: 700 .68rem/1 var(--th-font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--th-brown); }
.th-book-title { font: 700 1.02rem/1.25 var(--th-font-heading); color: var(--th-burgundy); }
.th-book-camp { font-size: .9rem; font-style: italic; color: var(--th-brown); }
.th-doc-body { font-size: 1.1rem; line-height: 1.7; }
.th-doc-body h3 { margin: 1.4rem 0 .5rem; font: 700 1.2rem/1.25 var(--th-font-heading); color: var(--th-burgundy); }
.th-doc-body h4 { margin: 1.1rem 0 .4rem; font: 700 1rem/1.25 var(--th-font-heading); color: var(--th-ink); }
.th-doc-body p { margin: 0 0 .9rem; }
.th-doc-body ul { margin: 0 0 .9rem 1.2rem; padding: 0; }
.th-doc-body li { margin-bottom: .3rem; }

/* ================================================================ Feast Hall */
.th-event-card .th-date { background: linear-gradient(180deg, #8a6a2a, #4f3a12); }

/* ================================================================ Hall of Legends */
.th-legend { display: grid; grid-template-columns: 17rem 1fr; gap: 0; margin: 0 0 1.5rem; background: color-mix(in srgb, var(--th-paper) 55%, transparent); border: 2px solid var(--th-gold); border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-dark) 60%, transparent), 0 12px 26px rgba(0,0,0,.35); }
.th-legend-cover { min-height: 14rem; background: linear-gradient(135deg, #3a2818, var(--th-dark)) center / cover no-repeat; border-right: 3px solid var(--th-camp, var(--th-gold)); filter: sepia(.25); }
.th-legend-body { padding: 1.2rem 1.4rem; }
.th-legend-title { margin: .1rem 0 .3rem; font: 700 1.6rem/1.15 var(--th-font-title); color: var(--th-burgundy); }
.th-epilogue { margin: .75rem 0 1rem; padding: .8rem 1rem; font-style: italic; font-size: 1.08rem; background: color-mix(in srgb, var(--th-gold) 12%, transparent); border-left: 4px solid var(--th-gold); }
.th-epilogue p { margin: 0 0 .6rem; }
.th-epilogue p:last-child { margin: 0; }
.th-heroes { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; }
.th-heroes a { display: flex; align-items: center; gap: .6rem; text-decoration: none !important; color: var(--th-ink); }
.th-heroes .th-char-portrait { width: 2.8rem; height: 2.8rem; font-size: 1rem; flex: 0 0 auto; }
.th-legend-fields summary { margin-bottom: .5rem; }
@media (max-width: 767px) {
	.th-legend { grid-template-columns: 1fr; }
	.th-legend-cover { min-height: 10rem; border-right: 0; border-bottom: 3px solid var(--th-camp, var(--th-gold)); }
}

/* ================================================================ Emblem and motto ([th_emblem], [th_motto]) */
.th-emblem { display: block; width: 5.5rem; height: auto; margin: 0 auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .85)); }
.th-motto { margin: 2rem auto 0; max-width: 48rem; text-align: center; font-family: var(--th-font-body); font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--th-ivory); text-shadow: 0 2px 4px rgba(0, 0, 0, .9); }
.th-motto-small { margin-top: 1rem; font-size: 1rem; color: var(--th-gold-hi); }
@media (max-width: 767px) { .th-emblem { width: 4.5rem; } }

/* ================================================================ Dragonbane character sheet */
.th-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.th-btn-ghost { background: transparent !important; color: var(--th-burgundy) !important; border: 1px solid var(--th-burgundy) !important; box-shadow: none !important; }
.th-db { margin: 1.5rem 0; }
.th-db-tools { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.th-db-tools .th-box-h { margin: 0; }
.th-db-paper { padding: 1.1rem 1.2rem; background: color-mix(in srgb, var(--th-paper) 70%, transparent); border: 2px solid var(--th-gold); border-radius: 6px; box-shadow: inset 0 0 40px color-mix(in srgb, var(--th-brown) 18%, transparent); }
.th-db h4 { margin: 0 0 .5rem; padding: .3rem .6rem; font: 700 .85rem/1.2 var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-ivory); background: #2f5a4a; border-radius: 3px; }
.th-db h4 small { float: right; margin-left: .75rem; font-size: .72rem; letter-spacing: .04em; text-transform: none; opacity: .9; }
.th-db h5 { margin: .8rem 0 .3rem; font: 700 .78rem/1.2 var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-burgundy); }
.th-db-blank { color: color-mix(in srgb, var(--th-brown) 55%, transparent); }
.th-db-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; }
.th-db-id { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; margin: 0; font-size: .98rem; }
.th-db-id dt { font: 700 .7rem/1.6 var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-brown); }
.th-db-id dd { margin: 0; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 30%, transparent); }
.th-db-name { text-align: center; padding: 0 .5rem; }
.th-db-logo { display: block; font: 700 1.5rem/1 var(--th-font-title); color: #b8312f; letter-spacing: .02em; }
.th-db-name strong { display: inline-block; margin-top: .35rem; padding: .2rem 1rem; font: 700 1.2rem/1.2 var(--th-font-heading); color: var(--th-ink); background: color-mix(in srgb, var(--th-gold) 25%, transparent); border-radius: 3px; }
.th-db-attrs { list-style: none; margin: 1rem 0 .6rem; padding: .7rem .5rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; background: linear-gradient(180deg, #2f5a4a, #1f3e33); border-radius: 40px; }
.th-db-attrs li { display: grid; justify-items: center; gap: .25rem; }
.th-db-attr-l { font: 700 .72rem/1 var(--th-font-heading); letter-spacing: .08em; color: var(--th-ivory); }
.th-db-attr-v { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; font: 700 1.35rem/1 var(--th-font-heading); color: var(--th-ink); background: #fffaf0; border: 3px solid #4f7a66; border-radius: 50%; text-align: center; }
.th-db-cond { padding: .12rem .4rem; font: 700 .6rem/1.2 var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; color: color-mix(in srgb, var(--th-ivory) 60%, transparent); border: 1px solid color-mix(in srgb, var(--th-ivory) 35%, transparent); border-radius: 3px; }
.th-db-cond.on { color: #fff; background: #b8312f; border-color: #fff; }
.th-db-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .9rem; }
.th-db-bars div { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .7rem; background: color-mix(in srgb, var(--th-gold) 18%, transparent); border-left: 4px solid #2f5a4a; border-radius: 3px; }
.th-db-bars span { font: 700 .72rem/1.6 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-brown); }
.th-db-cols { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 1rem; }
.th-db-lines, .th-db-inv { margin: 0; padding: 0 0 0 1.4rem; }
.th-db-lines { list-style: none; padding: 0; }
.th-db-lines li, .th-db-inv li { min-height: 1.5rem; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 25%, transparent); }
.th-db-coins { display: grid; grid-template-columns: auto 1fr; gap: .25rem .6rem; margin: 1rem 0 0; }
.th-db-coins dt { font: 700 .72rem/1.7 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-ivory); background: #2f5a4a; padding: 0 .5rem; border-radius: 3px; }
.th-db-coins dd { margin: 0; }
.th-db-skillgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem 1rem; }
.th-db-skills { list-style: none; margin: 0; padding: 0; font-size: .96rem; }
.th-db-skills li { display: flex; align-items: center; gap: .35rem; min-height: 1.55rem; }
.th-db-skills small { color: var(--th-brown); font-size: .75em; }
.th-db-mark { flex: 0 0 auto; width: .7rem; height: .7rem; border: 1.5px solid var(--th-ink); transform: rotate(45deg); }
.th-db-mark.on { background: var(--th-burgundy); border-color: var(--th-burgundy); }
.th-db-lvl { display: inline-block; min-width: 1.6rem; text-align: center; font-weight: 700; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 40%, transparent); }
.th-db-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.th-db-gear { display: grid; gap: .7rem; }
.th-db-armor { display: flex; gap: .7rem; align-items: flex-start; }
.th-db-armor h5 { margin-top: 0; }
.th-db-armor p { margin: 0 0 .25rem; }
.th-db-ar { flex: 0 0 auto; display: grid; place-items: center; width: 2.8rem; height: 3.2rem; font: 700 1.2rem/1 var(--th-font-heading); background: color-mix(in srgb, var(--th-ivory) 80%, #999); border: 2px solid var(--th-brown); border-radius: 6px 6px 40% 40%; }
.th-db-banes { font-size: .85rem; }
.th-db-bane { display: inline-block; margin: 0 .2rem .2rem 0; padding: .05rem .4rem; font: 700 .65rem/1.4 var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; color: color-mix(in srgb, var(--th-brown) 60%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 35%, transparent); border-radius: 3px; }
.th-db-bane.on { color: #fff; background: var(--th-burgundy); border-color: var(--th-burgundy); }
.th-db-pool { margin: .4rem 0; padding: .55rem .7rem; border-radius: 5px; color: var(--th-ivory); }
.th-db-pool h5 { margin: 0 0 .2rem; color: var(--th-ivory); }
.th-db-pool b { font: 700 1.1rem/1.2 var(--th-font-heading); }
.th-db-wp { background: linear-gradient(180deg, #2f5a4a, #1f3e33); }
.th-db-hp { background: linear-gradient(180deg, #b8312f, #7d1b1b); }
.th-db-pips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .35rem; }
.th-db-pips i { width: .8rem; height: .8rem; border: 1.5px solid currentColor; border-radius: 50%; }
.th-db-pips i.on { background: currentColor; }
.th-db-death, .th-db-rests { margin: .3rem 0; font-size: .9rem; }
.th-db-weapons { width: 100%; margin-top: 1rem; border-collapse: collapse; font-size: .95rem; }
.th-db-weapons th { padding: .35rem .5rem; text-align: left; font: 700 .7rem/1.2 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-ivory); background: #2f5a4a; }
.th-db-weapons td { padding: .35rem .5rem; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 25%, transparent); }

/* sheet form */
.th-db-form { display: grid; gap: 1rem; }
.th-db-fs { margin: 0; padding: .9rem 1rem 1rem; border: 1px solid color-mix(in srgb, var(--th-gold) 70%, transparent); border-radius: 6px; background: color-mix(in srgb, var(--th-paper) 45%, transparent); }
.th-db-fs legend { padding: .2rem .6rem; font: 700 .8rem/1.2 var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-ivory); background: #2f5a4a; border-radius: 3px; }
.th-db-form label { display: grid; gap: .2rem; font: 700 .78rem/1.3 var(--th-font-heading); letter-spacing: .03em; color: var(--th-burgundy); }
.th-db-form input[type=text], .th-db-form input[type=number], .th-db-form textarea { width: 100%; font: 1rem/1.3 var(--th-font-body); color: var(--th-ink); padding: .35rem .5rem; background: color-mix(in srgb, var(--th-paper) 85%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 45%, transparent); border-radius: 3px; }
.th-db-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem .8rem; margin-top: .6rem; }
.th-db-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.th-db-attrs-in { border-radius: 14px; }
.th-db-attrs-in .th-db-attr-v { padding: 0; }
.th-db-attrs-in .th-db-cond { display: flex; align-items: center; gap: .25rem; cursor: pointer; }
.th-db-attrs-in .th-db-cond input { margin: 0; }
.th-db-ck { display: inline-flex !important; grid-template-columns: none; align-items: center; gap: .35rem !important; margin-right: .6rem; cursor: pointer; }
.th-db-skill-in li { gap: .4rem; }
.th-db-skill-in input[type=number] { width: 3.4rem !important; padding: .15rem .3rem !important; text-align: center; }
.th-db-skill-in .th-db-secname { flex: 1; }
.th-db-markin { display: inline-flex !important; position: relative; width: 1rem; height: 1rem; }
.th-db-markin input { appearance: none; -webkit-appearance: none; margin: 2px; width: .75rem; height: .75rem; border: 1.5px solid var(--th-ink); transform: rotate(45deg); cursor: pointer; background: transparent; }
.th-db-markin input:checked { background: var(--th-burgundy); border-color: var(--th-burgundy); }
.th-db-markin input:focus-visible { outline: 2px solid var(--th-gold); outline-offset: 2px; }
.th-db-inv-in li { border: 0; margin-bottom: .25rem; }
.th-db-wtable { display: grid; gap: .3rem; overflow-x: auto; }
.th-db-wrow { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr .8fr 2fr; gap: .3rem; min-width: 40rem; }
.th-db-whead span { font: 700 .7rem/1.2 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-brown); }
.th-db-save { position: sticky; bottom: 0; margin: 0; padding: .7rem 0; background: linear-gradient(transparent, color-mix(in srgb, var(--th-paper) 90%, transparent) 30%); }

@media (max-width: 900px) {
	.th-db-cols { grid-template-columns: 1fr 1fr; }
	.th-db-skillcol { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 767px) {
	.th-db-head, .th-db-cols, .th-db-lower, .th-db-skillgrid, .th-db-grid2 { grid-template-columns: 1fr; }
	.th-db-name { order: -1; }
	.th-db-attrs { grid-template-columns: repeat(3, 1fr); border-radius: 14px; }
	.th-db-grid4 { grid-template-columns: 1fr 1fr; }
	.th-db-bars { grid-template-columns: 1fr; }
	.th-db-weapons { display: block; overflow-x: auto; }
}

/* sheet form: keep the attribute band light-on-dark and the round attribute boxes */
.th-db-form .th-db-attrs-in .th-db-attr-l { color: var(--th-ivory); font: 700 .72rem/1 var(--th-font-heading); letter-spacing: .08em; }
.th-db-form .th-db-attrs-in input.th-db-attr-v { width: 3.4rem; height: 3.4rem; padding: 0; font: 700 1.35rem/1 var(--th-font-heading); text-align: center; color: var(--th-ink); background: #fffaf0; border: 3px solid #4f7a66; border-radius: 50%; -moz-appearance: textfield; }
.th-db-form .th-db-attrs-in input.th-db-attr-v::-webkit-inner-spin-button, .th-db-form .th-db-attrs-in input.th-db-attr-v::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.th-db-form .th-db-attrs-in label.th-db-cond { display: flex !important; color: var(--th-ivory); font: 700 .6rem/1.2 var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; border-color: color-mix(in srgb, var(--th-ivory) 45%, transparent); }
.th-db-form .th-db-attrs-in label.th-db-cond:has(input:checked) { background: #b8312f; border-color: #fff; }

/* ================================================================ Forbidden Lands character sheet (0.36)
   Reuses the .th-db sheet pieces; ink and oxblood instead of Dragonbane's green. */
.th-fl { --fl-ink: #2b2420; --fl-ink2: #4a3c33; --fl-red: #8e2b1e; }
.th-fl h4, .th-fl .th-db-fs legend, .th-fl .th-db-coins dt, .th-fl .th-db-weapons th { background: var(--fl-ink); }
.th-fl h5 { color: var(--fl-red); }
.th-fl .th-db-pool h5 { color: var(--th-ivory); }
.th-fl-back h4 small { float: none; display: block; margin: .15rem 0 0; }
.th-fl .th-db-skills li > span { display: inline; }
.th-db-wrow.th-fl-wrow { min-width: 32rem; }
.th-fl-logo { color: var(--fl-red); font-variant: small-caps; letter-spacing: .06em; }
.th-fl-head .th-db-id:last-child dd { font-style: italic; }
.th-fl-attrs, .th-db-form .th-fl-attrs { grid-template-columns: repeat(4, 1fr); background: linear-gradient(180deg, var(--fl-ink2), var(--fl-ink)); }
.th-fl .th-db-attr-v, .th-db-form .th-fl-attrs input.th-db-attr-v { border-color: var(--fl-red); border-radius: 8px; }
.th-fl-conds { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .9rem; }
.th-fl-conds-l { margin-right: .3rem; font: 700 .72rem/1.6 var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-brown); }
.th-fl .th-db-bane.on { background: var(--fl-red); border-color: var(--fl-red); }
.th-fl-cols { grid-template-columns: 1fr 1fr 1fr; }
.th-fl-talents li, .th-fl .th-db-lines li { display: flex; justify-content: space-between; gap: .5rem; }
.th-fl-talents b { min-width: 1.4rem; text-align: center; }
.th-fl .th-db-col > p { margin: 0; }
.th-fl-lower { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin-top: 1rem; }
.th-fl-prot { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.th-fl-shield { border-radius: 50%; width: 3rem; height: 3rem; }
.th-fl-points { display: grid; grid-template-columns: 1fr; gap: .2rem; }
.th-fl .th-db-pool { margin: 0; }
.th-fl-wp { background: linear-gradient(180deg, var(--fl-red), #5e1a12); }
.th-fl-xp { background: linear-gradient(180deg, var(--fl-ink2), var(--fl-ink)); }
.th-fl-back { margin-top: 1rem; padding-top: 1rem; border-top: 2px dashed color-mix(in srgb, var(--th-brown) 40%, transparent); }
.th-fl-res { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.th-fl-box { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .3rem .55rem; border: 1px solid color-mix(in srgb, var(--th-brown) 40%, transparent); border-left: 4px solid var(--fl-red); border-radius: 3px; }
.th-fl-box span { font: 700 .7rem/1.4 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-brown); }
.th-fl-gap { margin-top: 1rem !important; }
.th-fl-mt { margin-top: .6rem; }
/* form */
.th-fl-skill-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem 1.2rem; }
.th-fl-talent-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem 1.2rem; margin-bottom: .7rem; }
.th-fl-talent-in input[type=number] { width: 4.2rem !important; }
.th-fl-rel-in { display: grid; gap: .6rem; }
.th-fl-rel { display: grid; grid-template-columns: 1fr 2fr; gap: .5rem; }
.th-db-wrow.th-fl-wrow { grid-template-columns: 2fr .8fr .8fr 1fr 2.4fr; }
.th-fl-gear-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1.6rem; }
.th-fl .th-db-form select, .th-db-form.th-fl select { width: 100%; font: 1rem/1.3 var(--th-font-body); padding: .3rem .4rem; }
@media (max-width: 900px) {
	.th-fl-cols { grid-template-columns: 1fr 1fr; }
	.th-fl-cols > .th-db-col:first-child { grid-column: 1 / -1; }
	.th-fl-cols > .th-db-col:first-child .th-db-skills { columns: 2; column-gap: 1.5rem; }
	.th-fl-lower { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	.th-fl-attrs, .th-db-form .th-fl-attrs { grid-template-columns: repeat(4, 1fr); }
	.th-fl .th-db-attr-v { width: 2.7rem; height: 2.7rem; }
	.th-fl-cols, .th-fl-skill-in, .th-fl-talent-in, .th-fl-gear-in, .th-fl-rel { grid-template-columns: 1fr; }
	.th-fl-cols > .th-db-col:first-child .th-db-skills { columns: 1; }
	.th-fl-prot { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
	.th-fl-attrs { padding: .6rem .2rem; gap: .2rem; }
	.th-fl .th-db-attr-l { font-size: .62rem; }
}

/* Pirate Borg sheet (0.38): black and bone, blood-red accents */
.th-pb { --pb-ink: #161412; --pb-ink2: #3a332c; --pb-red: #9c1c1c; }
.th-pb h4, .th-pb .th-db-fs legend { background: var(--pb-ink); }
.th-pb h5 { color: var(--pb-red); }
.th-pb h4 small { float: none; display: block; margin: .15rem 0 0; }
.th-pb-logo { color: var(--pb-red); font-variant: small-caps; letter-spacing: .08em; }
.th-pb-attrs, .th-db-form .th-pb-attrs { grid-template-columns: repeat(5, 1fr); background: linear-gradient(180deg, var(--pb-ink2), var(--pb-ink)); }
.th-pb .th-db-attr-v, .th-db-form .th-pb-attrs input.th-db-attr-v { border-color: var(--pb-red); }
.th-pb-bars div { border-left-color: var(--pb-red); }
.th-pb-cols { grid-template-columns: 1fr 1fr 1fr; }
.th-pb-weap li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .5rem; }
.th-pb-weap li small { flex-basis: 100%; color: var(--th-brown); }
.th-pb .th-db-col > p { margin: 0 0 .4rem; }
.th-pb-details { display: block; }
.th-pb-details dt { margin-top: .4rem; }
.th-pb-details dd { margin: 0; }
.th-pb-back { grid-template-columns: 1fr 1fr; margin-top: 1rem; padding-top: 1rem; border-top: 2px dashed color-mix(in srgb, var(--th-brown) 40%, transparent); }
.th-pb-cont { margin: 0 0 .4rem; }
.th-pb-luck { margin: .2rem 0 0 1.1rem; padding: 0; }
.th-db-wrow.th-pb-wrow { grid-template-columns: 2fr .8fr 3fr; min-width: 26rem; }
.th-pb-gear-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1.6rem; }
@media (max-width: 900px) {
	.th-pb-cols { grid-template-columns: 1fr 1fr; }
	.th-pb-cols > .th-db-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.th-pb-attrs, .th-db-form .th-pb-attrs { grid-template-columns: repeat(5, 1fr); padding: .6rem .2rem; gap: .2rem; }
	.th-pb .th-db-attr-v { width: 2.6rem; height: 2.6rem; }
	.th-pb .th-db-attr-l { font-size: .62rem; }
	.th-pb-cols, .th-pb-back, .th-pb-gear-in { grid-template-columns: 1fr; }
}

/* print: only the sheet, on white (0.34: one letter/A4 page, desktop layout, no site chrome, light on toner) */
@page { margin: 0.4in; }
@media print {
	/* desktop sheet layout at any paper width (the paper is narrower than the phone breakpoints) */
	.th-db * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.th-db-head { grid-template-columns: 1fr auto 1fr !important; }
	.th-db-name { order: 0 !important; }
	.th-db-attrs { grid-template-columns: repeat(6, 1fr) !important; }
	.th-db-bars { grid-template-columns: repeat(3, 1fr) !important; }
	.th-db-cols { grid-template-columns: 1fr 2fr 1fr !important; }
	.th-db-skillcol { order: 0 !important; grid-column: auto !important; }
	.th-db-skillgrid, .th-db-lower { grid-template-columns: 1fr 1fr !important; }
	.th-db-weapons { display: table !important; }

	/* Print button: hide everything except the sheet and the boxes that hold it */
	body.th-printing-sheet *:not(:has(#th-sheet)):not(#th-sheet):not(#th-sheet *) { display: none !important; }
	html:has(body.th-printing-sheet), body.th-printing-sheet, body.th-printing-sheet *:has(#th-sheet) {
		display: block !important; position: static !important; width: auto !important; max-width: none !important; min-width: 0 !important;
		height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
		background: #fff !important; box-shadow: none !important; transform: none !important; filter: none !important; overflow: visible !important; }
	body.th-printing-sheet *:has(#th-sheet)::before, body.th-printing-sheet *:has(#th-sheet)::after { display: none !important; content: none !important; }
	html:has(body.th-printing-sheet) { font-size: 9.3pt !important; }
	body.th-printing-sheet .th-noprint { display: none !important; }

	body.th-printing-sheet .th-db { margin: 0 !important; color: #111; }
	body.th-printing-sheet .th-db-paper { padding: .6rem .8rem; background: #fff !important; box-shadow: none; border: 1.5px solid #555; border-radius: 4px; }
	body.th-printing-sheet .th-db-head { gap: .8rem; }
	body.th-printing-sheet .th-db-id { font-size: .95rem; }
	body.th-printing-sheet .th-db-id dd { min-height: 1.3em; border-bottom-color: #999; }
	body.th-printing-sheet .th-db-name { max-width: 17rem; }
	body.th-printing-sheet .th-db-name strong { background: none; border: 1.5px solid #555; }
	/* big dark areas become outlines, so a black-and-white laser doesn't flood them with toner */
	body.th-printing-sheet .th-db-attrs { margin: .7rem 0 .5rem; padding: .45rem .4rem; background: #fff; border: 2px solid #2f5a4a; border-radius: 30px; }
	body.th-printing-sheet .th-db-attr-l { color: #2f5a4a; }
	body.th-printing-sheet .th-db-attr-v { width: 2.7rem; height: 2.7rem; border-color: #2f5a4a; }
	body.th-printing-sheet .th-db-cond { color: #666; border-color: #999; }
	body.th-printing-sheet .th-db-cond.on { color: #fff; background: #b8312f; border-color: #b8312f; }
	body.th-printing-sheet .th-db-bars { margin-bottom: .6rem; gap: .5rem; }
	body.th-printing-sheet .th-db-bars div { padding: .2rem .6rem; background: none; border: 1px solid #999; border-left: 4px solid #2f5a4a; }
	body.th-printing-sheet .th-db-cols { gap: .8rem; }
	body.th-printing-sheet .th-db h4 { margin-bottom: .35rem; padding: .2rem .5rem; font-size: .78rem; }
	body.th-printing-sheet .th-db h5 { margin: .55rem 0 .2rem; }
	body.th-printing-sheet .th-db h4 small { float: none; display: block; margin: .1rem 0 0; }
	body.th-printing-sheet .th-db-lines li, body.th-printing-sheet .th-db-inv li { min-height: 1.4rem; border-bottom-color: #aaa; }
	body.th-printing-sheet .th-db-skills { font-size: .92rem; }
	body.th-printing-sheet .th-db-skills li { min-height: 1.42rem; white-space: nowrap; }
	body.th-printing-sheet .th-db-coins { margin-top: .7rem; }
	body.th-printing-sheet .th-db-lower { margin-top: .7rem; gap: .8rem; }
	body.th-printing-sheet .th-db-ar { background: #fff; }
	body.th-printing-sheet .th-db-bane { color: #666; border-color: #999; }
	body.th-printing-sheet .th-db-bane.on { color: #fff; background: var(--th-burgundy); border-color: var(--th-burgundy); }
	body.th-printing-sheet .th-db-pool { margin: .3rem 0; padding: .35rem .6rem; background: #fff; color: #111; border: 2px solid #2f5a4a; border-left-width: 6px; }
	body.th-printing-sheet .th-db-pool h5 { color: #2f5a4a; }
	body.th-printing-sheet .th-db-hp { border-color: #b8312f; }
	body.th-printing-sheet .th-db-hp h5 { color: #b8312f; }
	body.th-printing-sheet .th-db-weapons { margin-top: .7rem; font-size: .92rem; }
	body.th-printing-sheet .th-db-weapons th, body.th-printing-sheet .th-db-weapons td { padding: .22rem .45rem; }
	body.th-printing-sheet .th-db-weapons td { border-bottom-color: #aaa; }
	/* keep boxes whole across a page break */
	body.th-printing-sheet :is(.th-db-head, .th-db-attrs, .th-db-bars, .th-db-lower, .th-db-armor, .th-db-pool, .th-db-weapons thead, .th-db-weapons tr, .th-db-coins, .th-db-skills li, .th-db-lines li, .th-db-inv li) { break-inside: avoid; }
	body.th-printing-sheet .th-db h4, body.th-printing-sheet .th-db h5 { break-after: avoid; }
	/* Pirate Borg on paper */
	.th-pb-attrs { grid-template-columns: repeat(5, 1fr) !important; }
	.th-pb-cols { grid-template-columns: 1fr 1fr 1fr !important; }
	.th-pb-cols > .th-db-col:last-child { grid-column: auto !important; }
	.th-pb-back { grid-template-columns: 1fr 1fr !important; border-top: 0 !important; }
	body.th-printing-sheet .th-pb-attrs { border-color: #161412; }
	body.th-printing-sheet .th-pb .th-db-attr-l { color: #161412; }
	body.th-printing-sheet .th-pb .th-db-attr-v { border-color: #9c1c1c; }
	/* Forbidden Lands on paper */
	.th-fl-attrs { grid-template-columns: repeat(4, 1fr) !important; }
	.th-fl-cols { grid-template-columns: 1fr 1fr 1fr !important; }
	.th-fl-cols > .th-db-col:first-child { grid-column: auto !important; }
	.th-fl-cols > .th-db-col:first-child .th-db-skills { columns: 1 !important; }
	.th-fl-lower { grid-template-columns: 2fr 1fr !important; }
	.th-fl-prot { grid-template-columns: repeat(3, 1fr) !important; }
	.th-fl-back { break-before: page; border-top: 0 !important; padding-top: 0 !important; }
	body.th-printing-sheet .th-fl-attrs { border-color: #2b2420; }
	body.th-printing-sheet .th-fl .th-db-attr-l { color: #2b2420; }
	body.th-printing-sheet .th-fl .th-db-attr-v { border-color: #8e2b1e; }
	body.th-printing-sheet .th-fl .th-db-pool { border-color: #2b2420; }
	body.th-printing-sheet .th-fl .th-db-pool h5 { color: #2b2420; }
	body.th-printing-sheet .th-fl-wp { border-color: #8e2b1e !important; }
	body.th-printing-sheet .th-fl-wp h5 { color: #8e2b1e !important; }
	body.th-printing-sheet .th-fl-lower { margin-top: .7rem; gap: .8rem; }
	body.th-printing-sheet :is(.th-fl-conds, .th-fl-lower, .th-fl-box) { break-inside: avoid; }
}

/* ================================================================ Guild Roll ([th_members]) */
.th-roll-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; }
.th-roll-card { display: flex; gap: .8rem; align-items: flex-start; padding: .85rem .9rem; background: color-mix(in srgb, var(--th-paper) 60%, transparent); border: 1px solid color-mix(in srgb, var(--th-gold) 70%, transparent); border-radius: 6px; }
.th-roll-card.is-me { border-color: var(--th-burgundy); box-shadow: inset 0 0 0 1px var(--th-burgundy); }
.th-roll-card .th-avatar { flex: 0 0 auto; width: 3.4rem; height: 3.4rem; }
.th-roll-body { display: grid; gap: .1rem; min-width: 0; }
.th-roll-name { font: 700 1.05rem/1.25 var(--th-font-heading); color: var(--th-burgundy); text-decoration: none; }
.th-roll-name:hover { text-decoration: underline; }
.th-roll-rank { font-size: .85rem; font-style: italic; color: var(--th-brown); }
.th-roll-mail { font-size: .95rem; overflow-wrap: anywhere; }
.th-roll-chars { margin-top: .2rem; font-size: .88rem; color: var(--th-ink); }

/* ================================================================ Site header (TH_Nav) */
.th-nav { position: relative; z-index: 50; font-family: var(--th-font-heading); }
.th-nav-bar { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; min-height: 4rem; padding: 0 1.5rem;
	background: linear-gradient(180deg, color-mix(in srgb, var(--th-dark) 85%, #4a3420) 0%, var(--th-dark) 100%);
	border-top: 2px solid color-mix(in srgb, var(--th-gold) 70%, transparent); border-bottom: 2px solid var(--th-gold);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .55), inset 0 -6px 12px rgba(0, 0, 0, .35); }
.th-nav-side { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.6rem; }
.th-nav-left { justify-content: flex-end; }
.th-nav-right { justify-content: flex-start; }
.th-nav a { text-decoration: none !important; }
.th-nav-side a, .th-nav-menu a { position: relative; display: inline-block; padding: .4rem 0; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--th-gold-hi); text-shadow: 0 2px 3px rgba(0, 0, 0, .8); transition: color .15s; }
.th-nav-side a::after { content: ''; position: absolute; left: 0; right: 0; bottom: .1rem; height: 2px; background: var(--th-gold); transform: scaleX(0); transition: transform .2s; }
.th-nav-side a:hover, .th-nav-side a:focus-visible, .th-nav-menu a:hover { color: var(--th-ivory); outline: none; }
.th-nav-side a:hover::after, .th-nav-side a:focus-visible::after, .th-nav-side a.is-current::after { transform: scaleX(1); }
.th-nav-side a.is-current { color: var(--th-ivory); }
.th-nav-out a { font-size: .7rem; opacity: .75; }
.th-nav-crest { position: relative; display: grid; place-items: center; width: 5.6rem; height: 5.6rem; margin: -.6rem 0 -2.2rem; border-radius: 50%;
	background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--th-dark) 70%, #5a3d22), var(--th-dark) 70%);
	border: 3px solid var(--th-gold); box-shadow: 0 0 0 3px var(--th-dark), 0 0 0 4px color-mix(in srgb, var(--th-gold) 60%, transparent), 0 8px 18px rgba(0, 0, 0, .6); transition: transform .2s, box-shadow .2s; }
.th-nav-crest .th-emblem { width: 4.2rem !important; margin: 0 !important; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .8)); }
.th-nav-crest:hover, .th-nav-crest:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 3px var(--th-dark), 0 0 0 4px var(--th-gold-hi), 0 0 22px color-mix(in srgb, var(--th-gold-hi) 55%, transparent), 0 10px 20px rgba(0, 0, 0, .6); outline: none; }
.th-nav-toggle { display: none; }
.th-nav-menu { display: none; }
.th-nav-preview { margin: 0; padding: .3rem 1rem; text-align: center; font: italic .85rem/1.3 var(--th-font-body); color: var(--th-dark); background: var(--th-gold-hi); }
body.th-has-nav .th-nav ~ * { scroll-margin-top: 1rem; }
@media (max-width: 1100px) {
	.th-nav-side { gap: .2rem 1rem; }
	.th-nav-side a { font-size: .74rem; letter-spacing: .08em; }
}
@media (max-width: 900px) {
	.th-nav-bar { grid-template-columns: 1fr auto 1fr; min-height: 3.6rem; padding: 0 .9rem; }
	.th-nav-side { display: none; }
	.th-nav-toggle { display: inline-flex; align-items: center; gap: .5rem; justify-self: start; grid-column: 1; grid-row: 1; padding: .45rem .7rem; font: 700 .75rem/1 var(--th-font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--th-gold-hi); background: transparent; border: 1px solid color-mix(in srgb, var(--th-gold) 70%, transparent); border-radius: 4px; cursor: pointer; }
	.th-nav-crest { grid-column: 2; grid-row: 1; width: 4.6rem; height: 4.6rem; margin: -.4rem 0 -1.8rem; }
	.th-nav-crest .th-emblem { width: 3.4rem !important; }
	.th-nav-burger, .th-nav-burger::before, .th-nav-burger::after { display: block; width: 1.1rem; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
	.th-nav-burger::before, .th-nav-burger::after { content: ''; position: absolute; left: 0; }
	.th-nav-burger::before { top: -6px; } .th-nav-burger::after { top: 6px; }
	.th-nav.is-open .th-nav-burger { background: transparent; }
	.th-nav.is-open .th-nav-burger::before { transform: translateY(6px) rotate(45deg); }
	.th-nav.is-open .th-nav-burger::after { transform: translateY(-6px) rotate(-45deg); }
	.th-nav.is-open .th-nav-menu { display: grid; list-style: none; margin: 0; padding: 2.2rem 1.2rem 1rem; gap: .1rem; background: var(--th-dark); border-bottom: 2px solid var(--th-gold); box-shadow: 0 10px 20px rgba(0, 0, 0, .6); }
	.th-nav-menu a { display: block; padding: .6rem 0; font-size: .9rem; border-bottom: 1px solid color-mix(in srgb, var(--th-gold) 25%, transparent); }
	.th-nav-menu a.is-current { color: var(--th-ivory); }
}
@media (prefers-reduced-motion: reduce) { .th-nav * { transition: none !important; } }
.th-nav-initial { font: 700 2.2rem/1 var(--th-font-title); color: var(--th-gold-hi); }

/* ---------- 0.20: breadcrumbs, session numbers, sessions played ---------- */
.th-crumbs { font-family: var(--th-font-heading); font-size: .92rem; letter-spacing: .03em; margin: 0 0 .75rem; text-align: center; }
.th-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem .4rem; }
.th-crumbs li { display: inline-flex; align-items: center; gap: .4rem; color: var(--th-ivory); text-shadow: 0 1px 3px color-mix(in srgb, var(--th-dark) 85%, transparent); }
.th-crumbs li + li::before { content: "›"; color: var(--th-gold); font-weight: 700; }
.th-crumbs a { color: var(--th-gold-hi); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--th-gold-hi) 45%, transparent); }
.th-crumbs a:hover, .th-crumbs a:focus-visible { color: var(--th-ivory); border-bottom-color: currentColor; }
.th-crumbs [aria-current] { color: var(--th-ivory); font-weight: 700; }
/* The breadcrumbs replace the in-page "← Back" links wherever a page has them. */
body:has(.th-crumbs) .th-hub .th-back { display: none; }
@media (max-width: 600px) { .th-crumbs { font-size: .85rem; } }

.th-played-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .35rem; }
.th-played-list li { padding: .3rem 0; border-bottom: 1px dashed color-mix(in srgb, var(--th-brown) 35%, transparent); }
.th-played-list li:last-child { border-bottom: 0; }
.th-session-chronicle { margin-top: 1.25rem; }
.th-session-chronicle .th-list-head span { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.th-played-form { display: inline; margin: 0; }
.th-played-form button.th-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--th-burgundy); text-decoration: underline; }

/* ---------- 0.21: rich text ---------- */
.th-rich { border: 1px solid color-mix(in srgb, var(--th-brown) 50%, transparent); border-radius: 4px; overflow: hidden; background: var(--th-paper); }
.th-rich:focus-within { border-color: var(--th-gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-gold) 45%, transparent); }
.th-rich .wp-editor-wrap { border: 0; }
.th-rich .wp-editor-container { border: 0 !important; }
.th-rich .mce-panel { background: color-mix(in srgb, var(--th-paper) 80%, var(--th-gold)) !important; border: 0 !important; }
.th-rich .mce-toolbar-grp { border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 30%, transparent) !important; }
.th-rich .mce-btn button { padding: 4px 6px !important; }
.th-rich textarea.wp-editor-area { border: 0; border-radius: 0; box-shadow: none; font: 1.05rem/1.55 var(--th-font-body); padding: .7rem .8rem; }
.th-rich .mce-container, .th-rich .mce-container * { max-width: 100%; }
.th-autosave-note { margin: 0; padding: .45rem .8rem; background: color-mix(in srgb, var(--th-gold) 22%, var(--th-paper)); border-top: 1px solid color-mix(in srgb, var(--th-gold) 50%, transparent); }
.th-autosave-note button.th-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--th-burgundy); text-decoration: underline; }
.th-field > .th-small.th-muted + .th-rich { margin-top: .35rem; }
.th-rich-view h3 { font-family: var(--th-font-heading); color: var(--th-burgundy); font-size: 1.2rem; margin: 1.1rem 0 .4rem; }
.th-rich-view h4 { font-family: var(--th-font-heading); color: var(--th-burgundy); font-size: 1.02rem; margin: .9rem 0 .3rem; }
.th-rich-view > :first-child { margin-top: 0; }
.th-rich-view ul, .th-rich-view ol { padding-left: 1.4rem; margin: .4rem 0 .8rem; }
.th-rich-view blockquote { margin: .7rem 0; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--th-gold); font-style: italic; }
.th-rich-view hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--th-brown) 40%, transparent); margin: 1rem 0; }
.th-rich-view a { color: var(--th-burgundy); }
@media (max-width: 600px) { .th-rich .mce-toolbar .mce-btn-group { padding: 0 !important; } }

/* ---------- 0.22: My campaigns + pins ---------- */
.th-pin-form { display: inline-flex; margin: 0; }
.th-pin { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 1px solid color-mix(in srgb, var(--th-gold) 70%, transparent); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; font: 700 .78rem var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; color: var(--th-brown); }
.th-pin span[aria-hidden] { font-size: 1.05rem; line-height: 1; color: var(--th-gold); }
.th-pin.is-on { background: color-mix(in srgb, var(--th-gold) 22%, transparent); color: var(--th-burgundy); }
.th-pin.is-on span[aria-hidden] { color: #b8862f; }
.th-pin:hover, .th-pin:focus-visible { border-color: var(--th-burgundy); outline: none; }
.th-my-camp .th-pin { border: 0; padding: .1rem .3rem; }
.th-my-camp .th-pin span[aria-hidden] { font-size: 1.3rem; }
.th-camp-head { align-items: center; gap: .75rem; }
.th-camp-head .th-title { margin-bottom: 0; }
.th-hub .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.th-my-camps .th-list-head { align-items: baseline; }
.th-my-camps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.th-my-camp { border: 1px solid color-mix(in srgb, var(--th-brown) 30%, transparent); border-left: 5px solid var(--th-camp, var(--th-burgundy)); border-radius: 4px; padding: .7rem .85rem .75rem; background: color-mix(in srgb, var(--th-paper) 72%, transparent); }
.th-my-camp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.th-my-camp-title { font: 700 1.08rem/1.25 var(--th-font-heading); color: var(--th-burgundy); text-decoration: none; }
.th-my-camp-title:hover { text-decoration: underline; }
.th-my-camp p { margin: .25rem 0 0; font-size: .98rem; }
.th-my-camp-meta { color: var(--th-brown); font-style: italic; }
.th-my-camp-next span { font: 700 .78rem var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; color: var(--th-burgundy); }
.th-my-camp-links { font-size: .95rem; }

/* ================================================================ 0.23: shared design system
   Tokens, room width, background, cards ("panes"), badges, empty states, panels, forms.
   Anything new should be built from these rather than styled on its own. */
:root { --th-page-w: 1040px; }
.th-hub {
	--th-s1: .5rem; --th-s2: .75rem; --th-s3: 1rem; --th-s4: 1.5rem; --th-s5: 2.25rem;
	--th-radius: 6px;
	--th-surface: color-mix(in srgb, var(--th-paper) 72%, transparent);
	--th-line: color-mix(in srgb, var(--th-brown) 30%, transparent);
	--th-lift: 0 2px 8px color-mix(in srgb, var(--th-ink) 14%, transparent);
}

/* One width for every room page (the Guild Hall front page keeps its own grid). */
body:not(.home) .e-con:has(> .dt-parchment > .th-hub) { max-width: min(var(--th-page-w), 100%) !important; width: 100%; }
body:not(.home) .e-con:has(> .dt-parchment > .th-hub) > .dt-parchment { width: 100%; max-width: none; }

/* Room backgrounds: the art is pinned to the window on every screen. Phones ignore
   background-attachment: fixed, which made the art one screen tall and repeated its shading
   down long pages (the seams). A fixed layer clipped to the room does the same job everywhere. */
main.e-con:has(.th-hub) { isolation: isolate; clip-path: inset(0); }
main.e-con:has(.th-hub)::after {
	content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background-image: inherit; background-size: cover; background-position: center; background-repeat: no-repeat; background-attachment: scroll;
}

/* Forms never run past their panel. */
.th-gate .th-form, .th-gate .th-field { grid-template-columns: minmax(0, 1fr); }
.th-hub .th-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.th-hub .th-row.th-row-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.th-gate input[type="file"] { max-width: 100%; font-size: .98rem; }
.th-hint { display: block; font-size: .95rem; font-style: italic; color: var(--th-brown); margin: -.1rem 0 .1rem; }
.th-form-actions { margin: .25rem 0 0; }

/* Section heading: a title with a gilt rule, for big divisions inside a room. */
.th-section-title { display: flex; align-items: center; gap: var(--th-s2); margin: var(--th-s5) 0 var(--th-s2); font: 700 1.3rem/1.2 var(--th-font-heading); color: var(--th-burgundy); }
.th-section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--th-gold), transparent); }

/* Panes: the standard card. Head (title + optional action), body, optional "View all" foot. */
.th-pane { display: flex; flex-direction: column; min-width: 0; padding: var(--th-s3) 1.15rem; background: var(--th-surface); border: 1px solid var(--th-line); border-top: 3px solid color-mix(in srgb, var(--th-gold) 75%, transparent); border-radius: var(--th-radius); box-shadow: var(--th-lift); }
.th-pane-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem var(--th-s2); margin: 0 0 var(--th-s2); padding-bottom: var(--th-s1); border-bottom: 1px solid var(--th-line); }
.th-pane-title { margin: 0; font: 700 1.12rem/1.25 var(--th-font-heading); color: var(--th-burgundy); letter-spacing: .02em; }
.th-pane-action { font: 700 .8rem var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; }
.th-pane-body { flex: 1; }
.th-pane-foot { margin: var(--th-s2) 0 0; padding-top: var(--th-s1); border-top: 1px dashed var(--th-line); font-size: .98rem; text-align: right; }
.th-pane-foot a, .th-pane-action { color: var(--th-burgundy); }

/* Dashboard grid: two columns on desktop, one on phones. */
.th-dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }

/* Badges: one look for every status in the hall. */
.th-badge { display: inline-block; vertical-align: .1em; padding: .22rem .5rem; border-radius: 3px; border: 1px solid transparent; font: 700 .7rem/1 var(--th-font-heading); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; background: color-mix(in srgb, var(--th-brown) 14%, transparent); color: var(--th-brown); }
.th-badge-rank, .th-badge-gm { background: var(--th-burgundy); color: var(--th-ivory); }
.th-badge-player, .th-badge-journal { background: color-mix(in srgb, var(--th-gold) 30%, transparent); color: var(--th-ink); border-color: color-mix(in srgb, var(--th-gold) 70%, transparent); }
.th-badge-recap { background: color-mix(in srgb, var(--th-burgundy) 14%, transparent); color: var(--th-burgundy); border-color: color-mix(in srgb, var(--th-burgundy) 35%, transparent); }
.th-badge-active, .th-badge-going, .th-badge-upcoming { background: #34463A; color: var(--th-ivory); }
.th-badge-maybe, .th-badge-hiatus, .th-badge-waiting { background: #8a6a2a; color: var(--th-ivory); }
.th-badge-no { background: var(--th-burgundy); color: var(--th-ivory); }
.th-badge-complete, .th-badge-played, .th-badge-pinned { background: color-mix(in srgb, var(--th-brown) 16%, transparent); color: var(--th-brown); border-color: var(--th-line); }
.th-badge-none { background: transparent; color: var(--th-burgundy); border: 1px dashed color-mix(in srgb, var(--th-burgundy) 60%, transparent); }

/* Empty states: say what's missing and offer the one thing to do about it. */
.th-empty-state { display: grid; justify-items: center; gap: var(--th-s2); padding: var(--th-s3) var(--th-s1); text-align: center; }
.th-empty-state p { margin: 0; font-style: italic; color: var(--th-brown); }
.th-empty-state .th-btn { margin: 0; }

/* Expandable panels (settings and other tucked-away forms). */
.th-disclosure { margin: 0 0 var(--th-s2); background: var(--th-surface); border: 1px solid var(--th-line); border-radius: var(--th-radius); }
.th-disclosure > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: .1rem var(--th-s2); align-items: center; padding: .85rem 1.1rem; min-height: 44px; }
.th-disclosure > summary::-webkit-details-marker { display: none; }
.th-disclosure > summary::after { content: "▾"; grid-row: 1 / span 2; grid-column: 2; color: var(--th-burgundy); font-size: 1.1rem; transition: transform .15s; }
.th-disclosure[open] > summary::after { transform: rotate(180deg); }
.th-disclosure > summary:hover, .th-disclosure > summary:focus-visible { background: color-mix(in srgb, var(--th-gold) 14%, transparent); outline: none; }
.th-disclosure-title { font: 700 1.02rem/1.25 var(--th-font-heading); color: var(--th-burgundy); }
.th-disclosure-sub { font-size: .95rem; font-style: italic; color: var(--th-brown); }
.th-disclosure-body { padding: var(--th-s1) 1.1rem 1.1rem; border-top: 1px solid var(--th-line); }
.th-disclosure-body .th-msg { margin-top: var(--th-s2); }

/* ---------- My Quarters ---------- */
.th-member-head { display: flex; align-items: center; gap: 1.1rem; margin: 0 0 var(--th-s4); padding-bottom: var(--th-s3); border-bottom: 1px solid var(--th-line); }
.th-member-id { flex: 1; min-width: 0; }
.th-member-name { margin: 0 0 .3rem; font: 700 1.7rem/1.15 var(--th-font-heading); color: var(--th-burgundy); }
.th-member-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-size: 1rem; }
.th-member-inv { color: var(--th-brown); font-style: italic; }
.th-member-inv a { color: var(--th-burgundy); }
.th-member-edit { margin: 0; white-space: nowrap; }
.th-needs { margin: 0 0 var(--th-s4); padding: .8rem 1.1rem; border: 1px solid color-mix(in srgb, var(--th-gold) 75%, transparent); border-left: 5px solid var(--th-gold); border-radius: var(--th-radius); background: color-mix(in srgb, var(--th-gold) 16%, var(--th-paper)); }
.th-needs-title { margin: 0 0 .45rem; font: 700 .85rem var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-burgundy); }
.th-needs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.th-needs li { display: flex; align-items: baseline; gap: .5rem; }
.th-needs a { color: var(--th-ink); font-weight: 600; }
.th-quarters .th-q-sessions { gap: var(--th-s3); }
.th-quarters .th-q-sessions li { gap: .2rem; }
.th-q-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; }
.th-q-when { font-size: .98rem; color: var(--th-brown); }
.th-quarters .th-q-sessions .th-pill { font-size: .85rem; padding: .5rem .85rem; min-height: 40px; }
.th-q-camps, .th-q-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--th-s2); }
.th-q-camps li { display: grid; gap: .25rem; padding-left: .7rem; border-left: 4px solid var(--th-camp, var(--th-burgundy)); }
.th-q-camp-name, .th-q-entries > li > a { font: 700 1.02rem/1.25 var(--th-font-heading); color: var(--th-burgundy); }
.th-q-badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.th-q-entries li { display: grid; gap: .2rem; padding-bottom: var(--th-s2); border-bottom: 1px dotted var(--th-line); }
.th-q-entries li:last-child { border-bottom: 0; padding-bottom: 0; }
.th-q-entries .th-q-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.th-quarters .th-roster-cards { margin: 0; }
.th-settings { margin-top: var(--th-s4); }
.th-settings-who { margin: 0 0 var(--th-s2); }

@media (max-width: 800px) {
	.th-dash { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
	.th-hub .th-row, .th-hub .th-row.th-row-even { grid-template-columns: minmax(0, 1fr); }
	.th-member-head { flex-wrap: wrap; gap: .85rem; }
	.th-member-name { font-size: 1.4rem; }
	.th-member-edit { width: 100%; text-align: center; }
	.th-pane { padding: .85rem .9rem; }
	.th-pane-foot { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .th-disclosure > summary::after { transition: none; } }

/* ================================================================ 0.24: rooms on the shared system */
/* Every boxed section now reads as a pane. */
.th-hub .th-box { padding: var(--th-s3) 1.15rem; margin: 0 0 1.1rem; background: var(--th-surface); border: 1px solid var(--th-line); border-top: 3px solid color-mix(in srgb, var(--th-gold) 75%, transparent); border-radius: var(--th-radius); box-shadow: var(--th-lift); }
.th-hub .th-box > .th-box-h, .th-hub .th-box > .th-list-head { margin-top: 0; padding-bottom: var(--th-s1); border-bottom: 1px solid var(--th-line); margin-bottom: var(--th-s2); }
.th-hub .th-box > .th-list-head .th-box-h { margin: 0; }
.th-hub .th-box-h { font: 700 1.12rem/1.25 var(--th-font-heading); color: var(--th-burgundy); letter-spacing: .02em; }
.th-hub details.th-box { padding-top: .85rem; }
.th-head-actions { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.th-head-actions .th-btn { margin: 0; }

/* Main + side columns (War Room, campaign and session pages). */
.th-split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; margin-top: 1rem; }
.th-split-main > :last-child, .th-split-side > :last-child { margin-bottom: 0; }
.th-split-side .th-roster { grid-template-columns: minmax(0, 1fr); gap: .6rem; margin: 0; }
.th-split-side .th-roster h4 { margin-bottom: .15rem; }
.th-plain-list { list-style: none; padding-left: 0; }

/* War Room: the next session stands out. */
.th-card.is-next { border-left: 5px solid var(--th-camp, var(--th-burgundy)); background: color-mix(in srgb, var(--th-paper) 82%, transparent); box-shadow: 0 4px 14px color-mix(in srgb, var(--th-ink) 20%, transparent); }
.th-card .th-eyebrow { margin: 0 0 .15rem; }
.th-recent .th-q-when a.th-badge { text-decoration: none; }

/* Sessions played: the summary carries the pane heading. */
.th-played-box .th-played > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding-bottom: var(--th-s1); border-bottom: 1px solid var(--th-line); }
.th-played-box .th-played > summary::-webkit-details-marker { display: none; }
.th-played-box .th-played > summary::after { content: "▾"; margin-left: auto; color: var(--th-burgundy); }
.th-played-box .th-played[open] > summary::after { transform: rotate(180deg); }
.th-played-box .th-played > summary .th-box-h { margin: 0; }
.th-played-list li { margin: .35rem 0; }
.th-played-list .th-badge { margin-left: .25rem; }

/* Chronicle lists. */
.th-entry-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; }
.th-more { margin-top: .75rem; }
.th-more > summary { cursor: pointer; font: 700 .9rem var(--th-font-heading); color: var(--th-burgundy); padding: .4rem 0; }
.th-more .th-entries { margin-top: .5rem; }
.th-latest { margin-bottom: .5rem; }

/* Reading a recap or journal: a comfortable column, then on to the next chapter. */
.th-reading { max-width: 46rem; margin: 0 auto; }
.th-reading .th-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; font-size: 1rem; }
.th-entry-heading { margin: .3rem 0 .35rem; font: 700 2rem/1.2 var(--th-font-heading); color: var(--th-burgundy); }
.th-reading .th-entry-body { font-size: 1.18rem; line-height: 1.75; margin-top: 1.25rem; }
.th-entry-nav { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 2rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--th-line); }
.th-entry-nav a { display: grid; gap: .15rem; padding: .7rem .9rem; border: 1px solid var(--th-line); border-radius: var(--th-radius); background: var(--th-surface); text-decoration: none; color: var(--th-burgundy); font: 700 1rem/1.3 var(--th-font-heading); min-height: 44px; }
.th-entry-nav a span { font: 700 .72rem var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-brown); }
.th-entry-nav a:hover, .th-entry-nav a:focus-visible { box-shadow: 0 0 0 2px var(--th-gold); outline: none; }
.th-entry-next { text-align: right; }

/* "Skip" on a reminder, and "Undo". */
.th-skip-form { display: inline; margin: 0 0 0 auto; }
.th-skip { background: none; border: 1px solid var(--th-line); border-radius: 999px; padding: .25rem .7rem; min-height: 32px; cursor: pointer; font: 700 .72rem var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-brown); }
.th-skip:hover, .th-skip:focus-visible { border-color: var(--th-burgundy); color: var(--th-burgundy); outline: none; }
.th-msg .th-skip-form { margin-left: .5rem; }
.th-needs li { flex-wrap: wrap; }

@media (max-width: 900px) {
	.th-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.th-entry-heading { font-size: 1.5rem; }
	.th-reading .th-entry-body { font-size: 1.1rem; }
	.th-entry-nav { grid-template-columns: minmax(0, 1fr); }
	.th-entry-next { text-align: left; }
}
.th-hub .th-gm-tools h4 { font: 700 .85rem var(--th-font-heading); letter-spacing: .08em; text-transform: uppercase; color: var(--th-burgundy); margin: 0 0 .6rem; }
.th-hub .th-gm-tools > .th-btn { margin-right: .6rem; }

/* ================================================================ 0.25: Guild Roll, Library, Feast Hall, Legends */
.th-badge-member { background: color-mix(in srgb, var(--th-gold) 26%, transparent); color: var(--th-ink); border-color: color-mix(in srgb, var(--th-gold) 65%, transparent); }
.th-chip { display: inline-block; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--th-line); background: color-mix(in srgb, var(--th-paper) 80%, transparent); font-size: .9rem; line-height: 1.3; color: var(--th-burgundy) !important; text-decoration: none !important; }
.th-chip:hover, .th-chip:focus-visible { border-color: var(--th-gold); outline: none; }
.th-count { display: inline-block; min-width: 1.6rem; padding: .1rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--th-brown) 14%, transparent); font: 700 .75rem/1.3 var(--th-font-heading); color: var(--th-brown); text-align: center; }

/* Guild Roll: profile cards. */
.th-roll-list { grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr)); gap: 1rem; }
.th-roll-card { padding: 1rem; background: var(--th-surface); border: 1px solid var(--th-line); border-top: 3px solid color-mix(in srgb, var(--th-gold) 75%, transparent); border-radius: var(--th-radius); box-shadow: var(--th-lift); }
.th-roll-card .th-avatar { width: 4rem; height: 4rem; font-size: 1.5rem; }
.th-roll-body { gap: .3rem; }
.th-roll-name { font-size: 1.12rem; }
.th-roll-rank { font-style: normal; }
.th-roll-inv { font-size: .95rem; font-style: italic; color: var(--th-brown); }
.th-roll-inv a { color: var(--th-burgundy); }
.th-roll-chars { display: flex; flex-wrap: wrap; gap: .3rem; margin: .1rem 0; }
.th-roll-mail { font-size: .92rem; }

/* Library: shelves as titled sections, books as tiles. */
.th-shelf { margin-top: .5rem; }
.th-hub .th-shelf-h { margin: 1.5rem 0 .75rem; padding-bottom: 0; border-bottom: 0; font-size: 1.15rem; }
.th-shelf-h .th-count { margin-left: .1rem; }

.th-empty-state .th-small { margin: 0; max-width: 36rem; }

/* ---------- 0.26: GM's Study ---------- */
.th-study-cell h4 { line-height: 1.4; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.th-study-cell h4 .th-badge { font-size: .66rem; letter-spacing: .03em; text-transform: none; }
.th-study-camp { margin-bottom: var(--th-s4); }
.th-admin-links li { padding: .15rem 0; }

/* ---------- 0.27/0.28: room banners (the room's art behind the page title) ---------- */
main.e-con:has(.th-banner) { overflow-x: clip; padding-top: 0 !important; }
main.e-con:has(.th-banner)::after { filter: brightness(.42) saturate(.8) blur(3px); }
.e-con:has(> .th-banner) { display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); row-gap: 8px; }
.e-con:has(> .th-banner) > * { grid-column: 1 / -1; }
.e-con > .th-banner {
	grid-row: 1 / 3; grid-column: 1 / -1; align-self: stretch; justify-self: stretch;
	position: relative; z-index: 0; isolation: isolate; overflow: hidden;
	margin: 0 calc(50% - 50vw) -1.5rem;
	background: #17140f;
	border-bottom: 3px solid var(--th-gold);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 10px 24px rgba(0, 0, 0, .55);
}
.e-con > .th-banner::before, .e-con > .th-banner::after { content: ""; position: absolute; pointer-events: none; }
/* Tile art (16:9): a soft, dark wash of it fills the strip; the art itself sits in the middle, whole, with faded ends. */
.e-con > .th-banner-fit::before { inset: -24px; background: var(--th-banner-img) center / cover no-repeat; filter: blur(14px) brightness(.5) saturate(.9); }
.e-con > .th-banner-fit::after {
	top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
	aspect-ratio: 16 / 9; height: 100%; max-width: 100%;
	background: linear-gradient(180deg, rgba(23, 20, 16, .35), rgba(23, 20, 16, .05) 35%, rgba(23, 20, 16, .45)), var(--th-banner-img) center / cover no-repeat;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
/* A banner made for the strip fills it edge to edge. */
.e-con > .th-banner-wide::after { inset: 0; background: linear-gradient(180deg, rgba(23, 20, 16, .5), rgba(23, 20, 16, .15) 40%, rgba(23, 20, 16, .6)), var(--th-banner-img) center / cover no-repeat; }
/* Title plaque sits low in the banner so the art's subject stays clear; title and subtitle share one width. */
.e-con > .th-banner ~ h1:first-of-type { grid-row: 1; grid-column: 2; justify-self: stretch; width: auto !important; max-width: none !important; min-width: min(30rem, 100%); box-sizing: border-box; position: relative; z-index: 1; margin: clamp(4.5rem, 13vw, 12rem) 0 0 !important; }
/* The subtitle joins the title plaque: one dark panel, a gold rule between them. */
.e-con > .th-banner ~ h1:first-of-type:has(+ p) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.e-con > .th-banner ~ h1:first-of-type + p {
	grid-row: 2; grid-column: 2; justify-self: stretch; position: relative; z-index: 2;
	margin: -8px 0 clamp(1.1rem, 2vw, 1.75rem); padding: .55rem 2.6rem .8rem; width: auto; max-width: none; box-sizing: border-box;
	text-align: center; font-size: 1.02rem; color: #f6ead0; text-shadow: none;
	background: #1b130c; border: 2px solid #c6a15b; border-top: 0; border-radius: 0 0 4px 4px;
	box-shadow: 0 0 0 4px #171410, 0 0 0 5px rgba(198, 161, 91, .55), 0 10px 22px rgba(0, 0, 0, .6);
	clip-path: inset(0 -40px -40px -40px);
}
.e-con > .th-banner ~ :not(h1):not(p) { margin-top: 2.5rem; }
/* Crumbs at the top of the parchment when a banner is showing. */
.th-hub > .th-crumbs { text-align: left; margin: 0 0 var(--th-s3, 1rem); padding-bottom: .45rem; border-bottom: 1px solid color-mix(in srgb, var(--th-gold) 45%, transparent); font-size: .88rem; }
.th-hub > .th-crumbs ol { justify-content: flex-start; }
.th-hub > .th-crumbs li { color: var(--th-ink); text-shadow: none; }
.th-hub > .th-crumbs a { color: var(--th-burgundy); border-bottom-color: color-mix(in srgb, var(--th-burgundy) 35%, transparent); }
.th-hub > .th-crumbs a:hover, .th-hub > .th-crumbs a:focus-visible { color: var(--th-ink); }
.th-hub > .th-crumbs [aria-current] { color: var(--th-ink); }
@media (max-width: 767px) {
	.e-con > .th-banner-fit::after { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
	.e-con > .th-banner ~ :not(h1):not(p) { margin-top: 2rem; }
	.e-con > .th-banner ~ h1:first-of-type + p { padding-inline: 1.1rem; font-size: .95rem; }
}

/* ---------------------------------------------------------------- 0.31 character builder */
.th-builder .th-steps { list-style: none; margin: .4rem 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; counter-reset: none; }
.th-builder .th-steps li { margin: 0; }
.th-builder .th-steps a, .th-builder .th-steps span { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: .3rem .7rem; border: 1px solid var(--th-line); border-radius: 999px; font: 600 .85rem var(--th-font-heading); color: var(--th-brown); background: var(--th-surface); text-decoration: none; }
.th-builder .th-steps b { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: color-mix(in srgb, var(--th-brown) 14%, transparent); font-size: .75rem; }
.th-builder .th-steps .is-done a, .th-builder .th-steps .is-done span { color: #34463A; border-color: color-mix(in srgb, #34463A 45%, transparent); }
.th-builder .th-steps .is-done b { background: #34463A; color: var(--th-ivory); }
.th-builder .th-steps .is-current span { background: var(--th-burgundy); border-color: var(--th-burgundy); color: var(--th-ivory); }
.th-builder .th-steps .is-current b { background: var(--th-ivory); color: var(--th-burgundy); }
.th-builder .th-steps a:hover, .th-builder .th-steps a:focus-visible { border-color: var(--th-burgundy); color: var(--th-burgundy); }
.th-builder .th-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; margin: .6rem 0 1rem; }
.th-builder .th-picks-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.th-builder .th-pick { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: start; padding: .6rem .75rem; border: 1px solid var(--th-line); border-radius: var(--th-radius); background: var(--th-surface); cursor: pointer; margin: 0; }
.th-builder .th-pick input { margin-top: .25rem; accent-color: var(--th-burgundy); }
.th-builder .th-pick-body { display: grid; gap: .2rem; min-width: 0; }
.th-builder .th-pick.is-on, .th-builder .th-pick:has(input:checked) { border-color: var(--th-burgundy); box-shadow: inset 0 0 0 1px var(--th-burgundy); background: color-mix(in srgb, var(--th-gold) 12%, var(--th-surface)); }
.th-builder .th-pick:hover { border-color: color-mix(in srgb, var(--th-burgundy) 60%, var(--th-line)); }
.th-builder .th-roll { margin-left: .35rem; vertical-align: middle; }
.th-builder .th-field .th-roll { margin: .35rem 0 0; }
.th-builder .th-field .th-small { display: block; margin-top: .2rem; }
.th-cite { display: inline-block; vertical-align: .1em; margin-left: .3rem; padding: 0 .35rem; border: 1px solid color-mix(in srgb, var(--th-gold) 60%, transparent); border-radius: 3px; font: 600 .7rem/1.5 var(--th-font-body, inherit); letter-spacing: .02em; color: var(--th-burgundy); background: color-mix(in srgb, var(--th-gold) 14%, transparent); white-space: nowrap; text-transform: none; }
.th-badge-src { margin-left: .35rem; }
.th-src-rolled { background: #34463A; color: var(--th-ivory); }
.th-src-entered { background: #8a6a2a; color: var(--th-ivory); }
.th-src-chosen { background: transparent; color: var(--th-brown); border-color: var(--th-line); }
.th-builder .th-attr-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; margin: 1rem 0; }
.th-builder .th-attr-cell { display: grid; gap: .25rem; justify-items: center; padding: .5rem .3rem; border: 1px solid var(--th-line); border-radius: var(--th-radius); background: var(--th-surface); text-align: center; }
.th-builder .th-attr-cell > span { font: 700 .75rem var(--th-font-heading); letter-spacing: .06em; color: var(--th-brown); }
.th-builder .th-attr-cell > b { font: 700 1.5rem/1 var(--th-font-heading); color: var(--th-ink); }
.th-builder .th-attr-cell input, .th-builder .th-attr-cell select { width: 100%; max-width: 5rem; text-align: center; }
.th-builder .th-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .3rem .6rem; margin: .5rem 0; }
.th-builder .th-skill { display: grid; grid-template-columns: auto 1fr auto; gap: .45rem; align-items: center; padding: .35rem .55rem; min-height: 40px; border: 1px solid var(--th-line); border-radius: var(--th-radius); background: var(--th-surface); margin: 0; cursor: pointer; }
.th-builder .th-skill.is-prof { border-color: color-mix(in srgb, var(--th-gold) 70%, var(--th-line)); }
.th-builder .th-skill:has(input:checked) { background: color-mix(in srgb, var(--th-gold) 14%, var(--th-surface)); border-color: var(--th-burgundy); }
.th-builder .th-skill > b { font-family: var(--th-font-heading); }
.th-builder .th-skill input { accent-color: var(--th-burgundy); }
.th-build-dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: 0 0 .8rem; }
.th-build-dl dt { font: 700 .78rem var(--th-font-heading); letter-spacing: .05em; text-transform: uppercase; color: var(--th-brown); padding-top: .15rem; }
.th-build-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.th-build-attrs { width: 100%; border-collapse: collapse; margin: .2rem 0 .8rem; table-layout: fixed; }
.th-build-attrs th, .th-build-attrs td { border: 1px solid var(--th-line); padding: .25rem .1rem; text-align: center; }
.th-build-attrs th { font: 700 .7rem var(--th-font-heading); color: var(--th-brown); background: color-mix(in srgb, var(--th-brown) 8%, transparent); }
.th-build-attrs td { font: 700 1.05rem var(--th-font-heading); }
.th-builder .th-field-inline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.th-builder .th-field-inline label { margin: 0; }
.th-builder .th-field-inline input[type=number] { width: 5.5rem; }
.th-builder .th-swap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0; }
.th-builder .th-build-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1.2rem; }
.th-builder .th-build-actions .th-btn:last-of-type { margin-left: auto; }
.th-builder .th-split-side { position: sticky; top: 1rem; }
.th-pending-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.th-pending-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .5rem 0; border-top: 1px solid var(--th-line); }
.th-pending-acts { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-left: auto; }
.th-pending-acts form { display: inline; margin: 0; }
.th-build-notes ul { margin: .3rem 0 .4rem 1.1rem; }
.th-build-cta { margin: .6rem 0 0; }
@media (max-width: 767px) {
	.th-builder .th-picks, .th-builder .th-picks-row { grid-template-columns: minmax(0, 1fr); }
	.th-builder .th-attr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.th-builder .th-skill-grid { grid-template-columns: minmax(0, 1fr); }
	.th-builder .th-split-side { position: static; }
	.th-builder .th-steps a, .th-builder .th-steps span { font-size: .78rem; padding: .25rem .55rem; }
	.th-builder .th-build-actions .th-btn { flex: 1 1 auto; text-align: center; }
	.th-builder .th-build-actions .th-btn:last-of-type { margin-left: 0; }
	.th-pending-acts { margin-left: 0; }
}
.th-builder input:not([type]), .th-builder input[type="text"], .th-builder input[type="number"], .th-builder select {
	margin: 0; font: 1.05rem/1.4 var(--th-font-body); color: var(--th-ink);
	background: color-mix(in srgb, var(--th-paper) 60%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 50%, transparent); border-radius: 3px; padding: .5rem .65rem; min-height: 44px;
	box-shadow: inset 0 1px 3px color-mix(in srgb, var(--th-ink) 18%, transparent);
}
.th-builder input:not([type]), .th-builder input[type="text"] { width: 100%; }
.th-builder input:focus, .th-builder select:focus { outline: none; border-color: var(--th-gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-gold) 45%, transparent); }
.th-builder .th-attr-cell input, .th-builder .th-attr-cell select { padding: .35rem .2rem; font-weight: 700; }
.th-builder .th-build-actions .th-btn { padding: .65rem 1.2rem; font-size: .9rem; }
.th-builder .th-skill .th-muted { font-style: normal; font-size: .8em; letter-spacing: .03em; }
.th-pending-acts button.th-link { background: none; border: 0; padding: 0; box-shadow: none; font: inherit; color: var(--th-burgundy); text-decoration: underline; cursor: pointer; }
@media (max-width: 767px) { .th-builder .th-build-step .th-build-dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; } .th-builder .th-build-step .th-build-dl dd { margin-bottom: .45rem; } }
/* 0.32 spells */
.th-builder .th-magic { margin: 1rem 0; padding-top: .8rem; border-top: 1px solid var(--th-line); }
.th-builder .th-magic-h { margin: 1rem 0 .4rem; font: 700 .95rem var(--th-font-heading); color: var(--th-burgundy); letter-spacing: .04em; text-transform: uppercase; }
.th-builder .th-spell-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .4rem; }
.th-builder .th-spell-group { grid-column: 1 / -1; margin: .4rem 0 0; font: 700 .75rem var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-brown); }
.th-builder .th-spell { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: start; padding: .5rem .65rem; border: 1px solid var(--th-line); border-radius: var(--th-radius); background: var(--th-surface); margin: 0; cursor: pointer; }
.th-builder .th-spell input { margin-top: .3rem; accent-color: var(--th-burgundy); }
.th-builder .th-spell:has(input:checked) { border-color: var(--th-burgundy); background: color-mix(in srgb, var(--th-gold) 14%, var(--th-surface)); }
.th-builder .th-note { padding: .5rem .7rem; border-left: 3px solid var(--th-gold); background: color-mix(in srgb, var(--th-gold) 10%, transparent); }
@media (max-width: 767px) { .th-builder .th-spell-grid { grid-template-columns: minmax(0, 1fr); } }

/* ================================================================ Forbidden Lands builder (0.37) */
.th-builder .th-build-sub { margin: 1.1rem 0 .3rem; font: 700 .95rem/1.3 var(--th-font-heading); color: var(--th-burgundy); }
.th-builder .th-pick.is-off { opacity: .45; cursor: not-allowed; }
.th-builder .th-pick-sm { padding: .4rem .6rem; }
.th-fl-pts { margin: .4rem 0 .8rem; font: 700 .95rem var(--th-font-heading); }
.th-fl-pts b { display: inline-block; min-width: 2.2rem; padding: .1rem .5rem; text-align: center; border-radius: 3px; background: color-mix(in srgb, var(--th-gold) 25%, transparent); }
.th-fl-pts.is-done b { background: #2f6b3a; color: #fff; }
.th-fl-pts.is-over b { background: var(--th-burgundy); color: #fff; }
.th-fl-attr-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem .9rem; align-items: end; }
.th-builder-fl .th-build-sum .th-build-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
.th-builder-fl .th-build-sum .th-build-dl dd { margin-bottom: .45rem; }
.th-builder .th-fl-gen .th-small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-builder .th-fl-gen .th-pick:has(input:checked) .th-small { -webkit-line-clamp: unset; }
.th-fl-attr-in .th-field { display: grid; gap: .25rem; margin: 0; }
.th-fl-attr-in input { width: 100%; max-width: 6rem; font-size: 1.2rem; text-align: center; }
.th-fl-skill-pick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.2rem; }
.th-fl-skill-pick li { display: flex; align-items: center; gap: .5rem; }
.th-fl-skill-pick li.is-prof span { font-weight: 700; }
.th-fl-skill-pick input { width: 3.6rem; flex: 0 0 auto; text-align: center; }
.th-fl-skill-pick small { color: var(--th-brown); font-weight: 400; }
.th-builder .th-fl-gen, .th-builder .th-fl-trade { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .4rem; margin: .4rem 0 .8rem; }
.th-builder .th-fl-trade { grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.th-fl-rels { display: grid; gap: .5rem; }
.th-fl-rels .th-fl-rel .th-field, .th-fl-looks .th-field { display: grid; gap: .2rem; margin: 0; }
.th-fl-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.th-fl-own { width: 100%; margin-top: .3rem; }
@media (max-width: 767px) {
	.th-fl-attr-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.th-fl-skill-pick, .th-fl-looks, .th-fl-rels .th-fl-rel { grid-template-columns: minmax(0, 1fr); }
	.th-builder .th-fl-gen { grid-template-columns: minmax(0, 1fr); }
}
.th-builder-fl label.th-field > span:first-child { font: 700 .82rem/1.3 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-burgundy); }
.th-builder-fl label.th-field > span:first-child small { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Use Character Builder picker in My Quarters (0.37.1) */
.th-build-pick { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--th-line); }
.th-build-pick-h { margin: 0 0 .4rem; font: 700 .85rem/1.3 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-burgundy); }
.th-build-pick-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.th-build-pick-row select { flex: 1 1 12rem; min-width: 0; max-width: 20rem; }
.th-build-pick .th-small { margin: .4rem 0 0; }

/* Pirate Borg builder (0.40) */
.th-pb-rollbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.th-pb-roll { margin-bottom: 1.1rem; }
.th-pb-roll label { display: block; margin-bottom: .25rem; }
.th-pb-roll-row { display: flex; gap: .5rem; align-items: center; }
.th-pb-roll-row select { flex: 1 1 auto; min-width: 0; width: 100%; font: 1rem/1.3 var(--th-font-body); padding: .35rem .4rem; }
.th-pb-roll-row .th-roll { flex: 0 0 auto; white-space: nowrap; }
.th-pb-abil { width: 100%; table-layout: fixed; border-collapse: collapse; margin: .4rem 0 .8rem; }
.th-pb-abil th:first-child { width: 34%; }
.th-pb-abil th, .th-pb-abil td { padding: .35rem .4rem; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 25%, transparent); text-align: center; }
.th-pb-abil th[scope=row] { text-align: left; }
.th-pb-abil th[scope=row] small { display: block; font-weight: 400; color: var(--th-brown); font-size: .78rem; }
.th-pb-abil input { width: 100%; max-width: 4.2rem; min-width: 2.9rem; padding: .3rem .15rem !important; text-align: center; }
.th-pb-abil th:nth-child(2), .th-pb-abil td:nth-child(2) { width: 22%; }
.th-builder-pb .th-build-sum .th-build-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
.th-builder-pb .th-build-sum .th-build-dl dd { margin-bottom: .45rem; }
.th-builder-pb .th-pick-body > .th-small { display: block; }
@media (max-width: 600px) {
	.th-pb-roll-row { flex-wrap: wrap; }
	.th-pb-roll-row .th-roll { width: 100%; }
	.th-pb-abil th, .th-pb-abil td { padding: .3rem .2rem; font-size: .9rem; }
}

/* Library resources (0.41): Google Drive links grouped by kind. */
.th-lib-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.th-res { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 2px solid color-mix(in srgb, var(--th-gold) 55%, transparent); }
.th-res-intro { margin: -.25rem 0 .5rem; }
.th-res-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.th-res-item { position: relative; display: flex; flex-direction: column; }
.th-res-link { flex: 1; display: grid; align-content: start; gap: .3rem; padding: .85rem .95rem .8rem; text-decoration: none !important; color: var(--th-ink); background: color-mix(in srgb, var(--th-paper) 72%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 35%, transparent); border-top: 4px solid var(--th-gold); border-radius: 5px; box-shadow: 0 3px 8px color-mix(in srgb, var(--th-ink) 14%, transparent); transition: transform .15s, box-shadow .15s; }
.th-res-link:hover, .th-res-link:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--th-gold), 0 6px 14px color-mix(in srgb, var(--th-ink) 25%, transparent); outline: none; }
.th-res-game { font: 700 .68rem/1 var(--th-font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--th-brown); }
.th-res-note { font-size: .92rem; color: var(--th-ink); opacity: .85; }
.th-res-go { margin-top: .2rem; font: 700 .85rem/1.2 var(--th-font-heading); color: var(--th-burgundy); }
.th-res-edit { align-self: flex-end; margin-top: .25rem; font-size: .85rem; }
.th-res-form textarea { min-height: 4rem; }
@media (max-width: 767px) {
	.th-res-list { grid-template-columns: 1fr; }
	.th-res { margin-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { .th-res-link { transition: none; } .th-res-link:hover { transform: none; } }

/* ---------------------------------------------------------------- 0.42 Players' guides (Library) */
.th-book-guide a { border-left-color: var(--th-gold); }
.th-book-guide.has-cover a { grid-template-rows: auto; align-content: start; padding-top: .65rem; }
.th-book-cover { display: block; margin: -.65rem -.9rem .35rem -1.1rem; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0 4px 0 0; background: var(--th-dark); }
.th-book-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th-guide-hero { margin: 0 0 1rem; aspect-ratio: 21 / 9; overflow: hidden; border-radius: 6px; background: var(--th-dark); box-shadow: 0 4px 12px color-mix(in srgb, var(--th-ink) 25%, transparent); }
.th-guide-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th-guide-preview { display: inline-block; margin-left: .35rem; padding: .1rem .35rem; font-size: .62rem; letter-spacing: .06em; color: var(--th-ivory); background: var(--th-burgundy); border-radius: 3px; vertical-align: middle; }
.th-guide .th-camp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.th-guide-print { margin-left: auto; }
.th-guide-intro { margin: .75rem 0 1rem; padding: .75rem .95rem; background: color-mix(in srgb, var(--th-gold) 12%, transparent); border-left: 4px solid var(--th-gold); border-radius: 3px; }
.th-guide-intro p { margin: 0 0 .5rem; }
.th-guide-intro p:last-child { margin-bottom: 0; }
.th-guide-toc { margin: 0 0 1.5rem; padding: .85rem 1rem 1rem; background: color-mix(in srgb, var(--th-paper) 70%, transparent); border: 1px solid color-mix(in srgb, var(--th-brown) 30%, transparent); border-radius: 5px; scroll-margin-top: 5rem; }
.th-guide-toc > ol { margin: 0; padding-left: 1.3rem; columns: 2 16rem; column-gap: 1.75rem; }
.th-guide-toc > ol > li { break-inside: avoid; margin-bottom: .6rem; font: 700 1rem/1.3 var(--th-font-heading); color: var(--th-burgundy); }
.th-guide-toc ul { margin: .2rem 0 0; padding-left: .9rem; list-style: none; font: 400 .92rem/1.45 var(--th-font-body); }
.th-guide-toc a { text-decoration: none; }
.th-guide-toc a:hover, .th-guide-toc a:focus-visible { text-decoration: underline; }
.th-guide-opt-dot { font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: #34463A; }
.th-guide-ch { margin-top: 1.75rem; scroll-margin-top: 5rem; }
.th-guide-ch-h { display: flex; align-items: center; gap: .55rem; margin: 0 0 .5rem; padding-bottom: .35rem; font: 700 1.35rem/1.2 var(--th-font-heading); color: var(--th-burgundy); border-bottom: 2px solid color-mix(in srgb, var(--th-gold) 60%, transparent); }
.th-guide-num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; font-size: .95rem; color: var(--th-ivory); background: var(--th-burgundy); border-radius: 50%; }
.th-guide-sec { margin: 1.1rem 0 0; scroll-margin-top: 5rem; }
.th-guide-h { margin: 0 0 .4rem; font: 700 1.08rem/1.3 var(--th-font-heading); color: var(--th-ink); }
.th-guide-cite { display: inline-block; margin-left: .3rem; padding: .08rem .4rem; font: 400 .74rem/1.4 var(--th-font-body); color: var(--th-brown); background: color-mix(in srgb, var(--th-brown) 10%, transparent); border-radius: 3px; white-space: nowrap; vertical-align: middle; }
.th-guide-sec.is-optional { padding: .7rem .9rem .5rem; background: color-mix(in srgb, #34463A 8%, transparent); border-left: 4px solid #34463A; border-radius: 3px; }
.th-guide-opt { margin: 0 0 .4rem; font-size: .9rem; color: #34463A; }
.th-guide-opt-used { margin: -.2rem 0 .4rem; font-size: .8rem; font-style: italic; color: var(--th-brown); }
.th-guide-body p { margin: 0 0 .6rem; }
.th-guide-body ul, .th-guide-body ol { margin: 0 0 .7rem; padding-left: 1.25rem; }
.th-guide-body li { margin-bottom: .3rem; }
.th-guide-table { width: 100%; margin: .4rem 0 .8rem; border-collapse: collapse; font-size: .93rem; }
.th-guide-table th, .th-guide-table td { padding: .35rem .5rem; text-align: left; vertical-align: top; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 25%, transparent); }
.th-guide-table thead th { font: 700 .74rem/1.2 var(--th-font-heading); letter-spacing: .06em; text-transform: uppercase; color: var(--th-brown); }
.th-guide-table tbody th { font-weight: 700; white-space: nowrap; }
.th-guide-pg { font-size: .78rem; color: var(--th-brown); white-space: nowrap; }
.th-guide-scroll { overflow-x: auto; }
.th-guide-up { margin: .6rem 0 0; text-align: right; font-size: .85rem; }
.th-guide-foot { margin-top: 2rem; }
@media (max-width: 600px) {
	.th-guide-print { margin-left: 0; }
	.th-guide-ch-h { font-size: 1.2rem; }
	.th-guide-skills thead { display: none; }
	.th-guide-skills tr { display: grid; grid-template-columns: 1fr auto; padding: .4rem 0; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 25%, transparent); }
	.th-guide-skills th, .th-guide-skills td { padding: .1rem 0; border: 0; }
	.th-guide-skills td:last-child { grid-column: 1 / -1; }
	.th-guide-heroic thead { display: none; }
	.th-guide-heroic tr { display: grid; grid-template-columns: 1fr auto; column-gap: .75rem; padding: .45rem 0; border-bottom: 1px solid color-mix(in srgb, var(--th-brown) 25%, transparent); }
	.th-guide-heroic th, .th-guide-heroic td { padding: .1rem 0; border: 0; }
	.th-guide-heroic td:nth-child(2) { grid-row: 2; grid-column: 1; font-size: .85rem; color: var(--th-brown); }
	.th-guide-heroic td:nth-child(3) { grid-row: 1; grid-column: 2; font-size: .85rem; color: var(--th-brown); }
	.th-guide-heroic td:nth-child(3)::before { content: "WP "; }
	.th-guide-heroic td:nth-child(4) { grid-column: 1 / -1; }
}
@media print {
	body.th-printing-guide *:not(:has(#th-guide)):not(#th-guide):not(#th-guide *) { display: none !important; }
	html:has(body.th-printing-guide), body.th-printing-guide, body.th-printing-guide *:has(#th-guide) {
		display: block !important; position: static !important; width: auto !important; max-width: none !important; min-width: 0 !important;
		height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
		background: #fff !important; box-shadow: none !important; transform: none !important; filter: none !important; overflow: visible !important; }
	body.th-printing-guide *:has(#th-guide)::before, body.th-printing-guide *:has(#th-guide)::after { display: none !important; content: none !important; }
	html:has(body.th-printing-guide) { font-size: 10pt !important; }
	body.th-printing-guide .th-noprint { display: none !important; }
	body.th-printing-guide #th-guide { color: #111; }
	body.th-printing-guide .th-guide-sec { break-inside: avoid; }
	body.th-printing-guide .th-guide-ch-h { break-after: avoid; }
	body.th-printing-guide .th-guide-scroll { overflow: visible; }
	body.th-printing-guide .th-guide-hero { max-height: 2.2in; box-shadow: none; }
}
