html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;
}

/* ✅ Ensure all elements respect their containers */
*, *::before, *::after {
  box-sizing: border-box;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
   width:100%;
   height:100%;
}
ol, ul {
}

.ss-required-asterisk {
  margin-left: 5px;
  color: #a80000;
}

/* ------------------------------------------------------------------------------------
--  GENERAL
------------------------------------------------------------------------------------ */
html, body { 
	width: 100%;
	margin: 0;
	padding: 0;
	font-family: 'Lato', sans-serif;
	font-size: 100%;
	background: #050403 url(../images/bg_new.jpg) no-repeat center top fixed;
	background-image: image-set(
      url("../images/bg_new.webp") type("image/webp"),
      url("../images/bg_new.jpg") type("image/jpeg")
    );
	background-size: cover;
	color: #e8dcc3;
}
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.42);
  z-index: -1;
}
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
      linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58)),
      radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.54) 100%);
    z-index: -1;
}
::selection,
::-moz-selection{
	background:#d4dedc;
}

#wrapper {
  width: 100%;
  padding: 2rem 0 3rem;
}

#shadow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh; /* ensures background stretches but doesn’t leave awkward gaps */
}

body {
  --site-shell-width: min(1120px, calc(100% - 32px));
  --site-shell-max-width: 1120px;
}

body[data-layout-mode="dm-wide"] {
  --site-shell-width: min(max(1120px, 80vw), calc(100% - 32px));
  --site-shell-max-width: none;
}

#inner-wrapper {
    width: var(--site-shell-width);
    max-width: var(--site-shell-max-width);
    margin: 0 auto;
    display: block;
	background: rgba(35, 28, 20, 0.85); /* deep warm black-brown with transparency */
	color: #e5d5b8;
	backdrop-filter: blur(2px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    overflow: visible;
    border: 1px solid rgba(236, 197, 107, 0.18);
}

.content-shell {
  clear: both;
  min-height: 320px;
  padding: 28px;
  background:
    linear-gradient(to bottom, rgba(20, 15, 10, 0.48), rgba(20, 15, 10, 0.78)),
    url(../images/darkwood.png);
}

.login-intro {
  font-family: 'Lato', sans-serif;
  font-size: 0.9em;
  color: #d5c49a;
  margin-bottom: 15px;
  text-shadow: 0 0 1px #000;
}

.tavern-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #ecc56b 50%, transparent);
  margin: 10px 0 20px 0;
}

/* ------------------------------------------------------------------------------------
--  TYPOGRAPHY
------------------------------------------------------------------------------------ */
h1{
    font-family: 'Vollkorn', serif;
}
h2, h3{
    font-family: 'Vollkorn', serif;
	color:#f5e5bd;
	text-shadow:0 2px 8px rgba(0, 0, 0, 0.75);
	text-transform:uppercase;
}
h2{
	font-size:2em;
	text-align:center;
	padding:0 0 20px 0;
	border-bottom:1px solid #ccc;
	display:block;
}
h3{
	font-size:1.6em;
	margin-bottom:10px;
}
p{
	line-height:1.5em;
	margin-bottom:20px;
}
p.last{
	margin-bottom:0;
}
.tiny{
	font-size:0.8em;
	text-transform:lowercase;
}
/* ------------------------------------------------------------------------------------
--  ANCHORS
------------------------------------------------------------------------------------ */
a{
	text-decoration:none;
	outline:none;
    color:#d5c49a;
}
a:hover{
	color:#fff3c7;
}
a.ext-link:after {
    padding:0 5px;
    margin: 10px 0 0 5px;
    content: "";
	background-repeat: no-repeat;
	display:inline;
	width:10px;
	height:10px;
}

.margin{
	margin-right:6px;	
}
a.readmore{
	margin-top:6px;
	float:left;
    text-shadow:1px 1px 0 rgba(255, 255, 255, 0.7);
    color:#949493;
	font-size:0.9em;
}
a.readmore:hover{
	color:#666;
}

.utility-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.page-heading {
  text-align: center;
  margin-bottom: 22px;
}

.eyebrow {
  margin-bottom: 8px;
  color: #ecc56b;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.82rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkbox-row label {
  margin: 0;
}

.campaign-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 24px;
}

.campaign-section-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(236, 197, 107, 0.28);
  background: rgba(14, 11, 8, 0.5);
  color: #e5d5b8;
}

.campaign-section-card-main {
  color: inherit;
  display: block;
  text-decoration: none;
}

.campaign-section-card-main:hover,
.campaign-section-card-main:focus {
  color: #fff5d8;
  text-decoration: none;
}

.campaign-book-links {
  border-top: 1px solid rgba(236, 197, 107, 0.22);
  display: grid;
  gap: 0.45rem;
  margin-top: 14px;
  padding-top: 12px;
}

.campaign-book-link {
  color: #f7e8c3;
  display: block;
  font-weight: 700;
  text-decoration: none;
}

.campaign-book-link:hover,
.campaign-book-link:focus {
  color: #fff5d8;
  text-decoration: underline;
}

.campaign-book-link small {
  color: #bda879;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.campaign-section-card:hover {
  border-color: rgba(236, 197, 107, 0.75);
  color: #fff5d8;
}

.campaign-section-title,
.campaign-section-summary,
.campaign-section-meta,
.campaign-section-recent {
  display: block;
}

.campaign-section-title {
  font-family: 'Vollkorn', serif;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.campaign-section-summary {
  color: #d5c49a;
  line-height: 1.45;
}

.campaign-section-meta,
.campaign-section-recent {
  margin-top: 12px;
  color: #bda879;
  font-size: 0.82rem;
}

.map-viewer-open-body {
  overflow: hidden;
}

.sheet-ability-grid span {
  display: block;
  color: #ecc56b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.sheet-stat-roll {
  display: block;
  margin-top: 5px;
  color: #fff3d4;
  font-family: 'Vollkorn', serif;
  font-size: 1.35rem;
  line-height: 1;
}

.sheet-stat-roll,
.sheet-text-roll {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sheet-stat-roll {
  width: 100%;
  padding: 0;
}

.sheet-text-roll {
  padding: 3px 7px;
  border: 1px solid rgba(236, 197, 107, 0.24);
  color: #f4e6c4;
  font: inherit;
}

.sheet-stat-roll:hover,
.sheet-stat-roll:focus-visible,
.sheet-text-roll:hover,
.sheet-text-roll:focus-visible {
  border-color: rgba(236, 197, 107, 0.62);
  background: rgba(236, 197, 107, 0.1);
  outline: none;
}

.sheet-roll-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.sheet-panel {
  padding: 16px 18px;
  border: 1px solid rgba(236, 197, 107, 0.22);
  background: linear-gradient(to bottom, rgba(22, 18, 13, 0.72), rgba(9, 8, 6, 0.86));
}

.sheet-panel h2 {
  margin: 0 0 12px;
  padding: 0;
  border-bottom: 0;
  color: #fff0c8;
  font-size: 1.05rem;
}

.sheet-panel h3 {
  margin: 14px 0 6px;
  color: #ecc56b;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.sheet-ability-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.sheet-ability-grid div,
.sheet-ability-grid .ability-roll-button {
  padding: 10px 6px;
  border: 1px solid rgba(236, 197, 107, 0.2);
  background: rgba(255, 248, 230, 0.04);
  text-align: center;
}

.ability-roll-button {
  appearance: none;
  width: 100%;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ability-roll-button:hover,
.ability-roll-button:focus-visible {
  border-color: rgba(236, 197, 107, 0.62);
  background: rgba(236, 197, 107, 0.1);
  outline: none;
}

.sheet-ability-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff3d4;
  font-size: 1.25rem;
}

.sheet-ability-grid em {
  display: block;
  color: #d5c49a;
  font-style: normal;
}

.sheet-inline-list,
.sheet-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.sheet-inline-list span,
.sheet-tag-list span {
  padding: 4px 8px;
  border: 1px solid rgba(236, 197, 107, 0.18);
  background: rgba(255, 248, 230, 0.035);
  color: #d5c49a;
  font-size: 0.8rem;
}

.sheet-table-wrap {
  overflow-x: auto;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  color: #f4e6c4;
}

.sheet-table th,
.sheet-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(236, 197, 107, 0.14);
  text-align: left;
  vertical-align: top;
}

.sheet-table th {
  color: #ecc56b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.sheet-facts {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
}

.sheet-facts dt {
  color: #ecc56b;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.sheet-facts dd {
  margin: 0;
  color: #f4e6c4;
  line-height: 1.35;
}

.sheet-compact-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #f4e6c4;
}

.sheet-compact-list small {
  display: block;
  color: #bda879;
}

.sheet-spell-groups {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sheet-spell-groups p {
  margin: 0;
  color: #f4e6c4;
}

.sheet-spell-list a {
  color: #ffe3a0;
  border-bottom: 1px solid rgba(236, 197, 107, 0.34);
}

.sheet-spell-list a:hover {
  color: #fff5d8;
  border-bottom-color: rgba(236, 197, 107, 0.78);
}

.sheet-notes-panel .markdown-body h1:first-child {
  display: none;
}

@media (max-width: 980px) {
  .sheet-ability-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .sheet-ability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-facts {
    grid-template-columns: 1fr;
  }
}

.collapsible-heading {
  appearance: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.collapsible-heading span,
.collapsible-heading small,
.collapsible-heading strong,
.collapsible-heading em {
  display: block;
}

.collapsible-heading small {
  color: #bda879;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collapsible-heading strong {
  color: #f5e5bd;
  font-family: 'Vollkorn', serif;
  font-size: 1rem;
  font-weight: 700;
}

.collapsible-heading em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(236, 197, 107, 0.22);
  color: #bda879;
  font-style: normal;
  font-size: 0.72rem;
}

.collapsible-heading:hover em,
.collapsible-heading:focus-visible em {
  border-color: rgba(236, 197, 107, 0.62);
  color: #fff2c6;
}

.collapsible-panel.is-collapsed .collapsible-body {
  display: none;
}

.dice-inline {
  display: inline;
  margin: 0 1px;
  padding: 0 4px;
  border: 1px solid rgba(236, 197, 107, 0.32);
  background: rgba(236, 197, 107, 0.08);
  color: #ffe3a0;
  font: inherit;
  line-height: 1.25;
  cursor: pointer;
}

.dice-inline:hover {
  border-color: rgba(236, 197, 107, 0.78);
  background: rgba(236, 197, 107, 0.16);
  color: #fff5d8;
}

.dice-roller-panel {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: end;
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.dice-roller-panel[hidden] {
  display: none;
}

/* ── Dice Roller ────────────────────────────────────────── */

.dice-roller-card {
  width: min(420px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(236, 197, 107, 0.34);
  background:
    linear-gradient(to bottom, rgba(49, 38, 28, 0.96), rgba(10, 8, 6, 0.98)),
    url(../images/darkwood.png);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.62);
}

.dice-roller-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.dice-roller-heading .eyebrow {
  margin: 0 0 2px;
}

.dice-roller-heading h2 {
  margin: 0;
  border: 0;
  color: #f5e5bd;
  font-size: 1.4rem;
}

#dice-roller-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(236, 197, 107, 0.26);
  background: rgba(255, 248, 230, 0.04);
  color: #f4e6c4;
  font-size: 1.25rem;
  cursor: pointer;
}

.dice-roller-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}

.dice-roller-form label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #d5c49a;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.dice-roller-form input {
  min-width: 0;
}

.dice-roller-form button,
.dice-quick-row button,
.dice-roller-history-heading button {
  border: 1px solid rgba(236, 197, 107, 0.32);
  background: rgba(236, 197, 107, 0.1);
  color: #f4e6c4;
  cursor: pointer;
}

.dice-roller-form button {
  min-height: 38px;
  padding: 0 12px;
}

.dice-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.dice-quick-row button {
  min-width: 42px;
  padding: 6px 8px;
}

.dice-roller-result {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid rgba(236, 197, 107, 0.22);
  background: rgba(255, 248, 230, 0.04);
}

.dice-roller-result:empty {
  display: none;
}

.dice-roller-result strong {
  color: #ffe3a0;
  font-family: 'Vollkorn', serif;
  font-size: 1.9rem;
}

.dice-roller-result span {
  color: #f4e6c4;
}

.dice-roller-history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: #bda879;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.dice-roller-history {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.dice-history-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(236, 197, 107, 0.14);
  background: rgba(255, 248, 230, 0.03);
  color: #f4e6c4;
}

.dice-history-row small,
.dice-empty {
  color: #bda879;
}

.dice-roll-toast {
  position: fixed;
  left: 50%;
  top: 34%;
  z-index: 950;
  width: max-content;
  max-width: min(520px, calc(100vw - 36px));
  padding: 14px 18px;
  border: 1px solid rgba(236, 197, 107, 0.4);
  background: rgba(18, 13, 8, 0.96);
  color: #f4e6c4;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.58);
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.98);
  pointer-events: none;
  text-align: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dice-roll-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.compact-bestiary-body {
  margin: 0;
  min-width: 0;
  background:
    linear-gradient(to bottom, rgba(12, 8, 5, 0.92), rgba(5, 4, 3, 0.98)),
    url(../images/darkwood.png);
  color: #f4e6c4;
}

.compact-bestiary {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px;
}

.compact-bestiary-header {
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(236, 197, 107, 0.28);
  padding-bottom: 10px;
}

.compact-bestiary-header h1 {
  margin: 0;
  border: 0;
  color: #f5e5bd;
  font-size: 1.75rem;
}

.compact-bestiary-header p:last-child {
  margin: 4px 0 0;
  color: #d5c49a;
}

.compact-reference-tools {
  margin: 8px 0 0;
}

.compact-reference-tools a,
.sheet-header-actions a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(236, 197, 107, 0.24);
  background: rgba(255, 248, 230, 0.04);
  color: #f4e6c4;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.compact-reference-tools a:hover,
.compact-reference-tools a:focus-visible,
.sheet-header-actions a:hover,
.sheet-header-actions a:focus-visible {
  border-color: rgba(236, 197, 107, 0.62);
  color: #fff3d4;
}

.compact-bestiary-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.compact-bestiary-facts div,
.compact-bestiary-abilities div,
.compact-bestiary-abilities .ability-roll-button {
  padding: 8px;
  border: 1px solid rgba(236, 197, 107, 0.18);
  background: rgba(255, 248, 230, 0.035);
}

.compact-bestiary-facts span,
.compact-bestiary-abilities span {
  display: block;
  color: #bda879;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.compact-bestiary-facts strong,
.compact-bestiary-abilities strong {
  display: block;
  color: #f4e6c4;
}

.compact-bestiary-panel {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(236, 197, 107, 0.2);
  background: rgba(10, 8, 6, 0.48);
}

.compact-bestiary-panel h2 {
  margin: 0 0 8px;
  border: 0;
  color: #ecc56b;
  font-size: 1rem;
  text-transform: uppercase;
}

.compact-bestiary-abilities {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
}

.compact-bestiary-abilities em {
  color: #bda879;
  font-style: normal;
}

.compact-bestiary-actions {
  display: grid;
  gap: 8px;
}

.compact-bestiary-actions article {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(236, 197, 107, 0.12);
}

.compact-bestiary-actions article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.compact-bestiary-actions h3 {
  margin: 0 0 3px;
  color: #f5e5bd;
  font-size: 0.98rem;
  text-shadow: none;
}

.compact-bestiary-actions p,
.compact-bestiary-panel > p {
  margin: 0;
  color: #d5c49a;
  line-height: 1.4;
}

.compact-character-body {
  min-height: 100vh;
  margin: 0;
  background: #0b121c;
  color: #d9e8f2;
}

.compact-character {
  width: min(680px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.compact-character-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(122, 170, 200, 0.3);
}

.compact-character-header h1 {
  margin: 0;
  border: 0;
  color: #e8f4ff;
  font-size: 1.45rem;
}

.compact-character-header p {
  margin: 3px 0 0;
  color: #9ec7df;
  font-size: 0.86rem;
}

.compact-character-statblock {
  margin-bottom: 10px;
}

.compact-character-statblock .srph-statblock.srph-web {
  max-width: none;
  margin: 0;
}

.compact-character-panel {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(122, 170, 200, 0.24);
  background: rgba(16, 30, 44, 0.58);
}

.compact-character-panel h2 {
  margin: 0 0 7px;
  border: 0;
  color: #c8dff0;
  font-size: 0.95rem;
}

.compact-character-chip-row,
.compact-character-skill-grid,
.compact-character-attack-list {
  display: grid;
  gap: 6px;
}

.compact-character-chip-row {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.compact-character-chip-row span,
.compact-character-attack-list div {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border: 1px solid rgba(122, 170, 200, 0.2);
  background: rgba(7, 15, 24, 0.44);
}

.compact-character-chip-row em {
  color: #7aaac8;
  font-size: 0.72rem;
  font-style: normal;
  text-transform: uppercase;
}

.compact-character-chip-row strong {
  color: #e8f4ff;
}

.compact-character-skill-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.compact-character-skill-grid button,
.compact-character-attack-list button {
  min-height: 30px;
  border-color: rgba(122, 170, 200, 0.4);
  background: rgba(122, 170, 200, 0.1);
  color: #e8f4ff;
  box-shadow: none;
  text-shadow: none;
}

.compact-character-attack-list span {
  color: #9ec7df;
  font-size: 0.78rem;
}

.compact-character-features {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  color: #c4d8e8;
}

.compact-character-features dt {
  color: #7aaac8;
  font-weight: 700;
}

.compact-character-features dd {
  margin: 0;
}

.compact-character-actions {
  margin: 12px 0 0;
  text-align: right;
}

.compact-character-actions a {
  color: #9ec7df;
  font-size: 0.82rem;
}

/* ── Cosmere / Stormlight RPG statblock — web version ──────────────────────
   Structure mirrors the srph-statblock Obsidian plugin exactly.
   Colors are remapped to the site's dark amber/tavern theme so the layout
   reads clearly while the palette difference signals a different rule set.
   ─────────────────────────────────────────────────────────────────────── */

.srph-statblock.srph-web {
  --srph-bg:           #0e1a28;
  --srph-header-from:  #0b1929;
  --srph-header-to:    #14304d;
  --srph-header-text:  #c8dff0;
  --srph-header-sub:   #7aaac8;
  --srph-accent:       #4a90b8;
  --srph-accent-light: #2a5c7a;
  --srph-attr-bg:      #101e2c;
  --srph-def-bg:       #1e4060;
  --srph-def-text:     #a8d4ee;
  --srph-hfi-bg:       #0d1e30;
  --srph-divider:      #2a5a7a;
  --srph-heading-text: #9dc8e0;
  --srph-name-text:    #e8f4ff;
  --srph-prop-name:    #7aaac8;
  --srph-body-text:    #c4d8e8;
  --srph-source-text:  #4a7a9a;
  --srph-border:       #2a5a7a;
  --srph-font-body:    'Lato', 'Helvetica Neue', Arial, sans-serif;
  --srph-font-heading: 'Cinzel', 'Georgia', serif;
  --srph-font-ui:      'Lato', 'Helvetica Neue', Arial, sans-serif;

  font-family:      var(--srph-font-body);
  font-size:        13px;
  line-height:      1.55;
  color:            var(--srph-body-text);
  background-color: var(--srph-bg);
  border:           2px solid var(--srph-border);
  border-radius:    5px;
  overflow:         hidden;
  margin:           0;
  width:            100%;
}

.srph-web .srph-header {
  background:  linear-gradient(135deg, var(--srph-header-from) 0%, var(--srph-header-to) 100%);
  color:       var(--srph-header-text);
  padding:     13px 18px 11px;
}

.srph-web .srph-name {
  font-family:    var(--srph-font-heading);
  font-size:      1.35em;
  font-weight:    700;
  font-variant:   small-caps;
  letter-spacing: 0.04em;
  color:          var(--srph-name-text);
  margin:         0 0 3px;
  line-height:    1.2;
}

.srph-web .srph-subtitle {
  font-size:   0.82em;
  font-style:  italic;
  color:       var(--srph-header-sub);
  margin:      0;
}

.srph-web .srph-alignment {
  font-size:   0.78em;
  color:       #5a8aaa;
  margin-top:  2px;
}

.srph-web .srph-accent-bar {
  height:     4px;
  background: linear-gradient(to right,
    var(--srph-header-from),
    var(--srph-accent),
    #5aaad0,
    var(--srph-accent),
    var(--srph-header-from)
  );
}

.srph-web .srph-attr-wrapper {
  display:          flex;
  align-items:      stretch;
  background-color: var(--srph-attr-bg);
  padding:          10px 6px 9px;
  border-bottom:    1px solid var(--srph-accent-light);
}

.srph-web .srph-attr-block {
  flex:        1;
  text-align:  center;
  padding:     0 4px;
}

.srph-web .srph-attr-sep {
  width:            1px;
  background-color: var(--srph-divider);
  margin:           4px 2px;
  opacity:          0.4;
}

.srph-web .srph-attr-block-label {
  font-size:      0.65em;
  font-weight:    700;
  font-variant:   small-caps;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:          var(--srph-heading-text);
  margin-bottom:  5px;
}

.srph-web .srph-attr-lbl-row {
  display:         flex;
  justify-content: space-around;
  margin-bottom:   2px;
}

.srph-web .srph-attr-lbl {
  font-size:      0.63em;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color:          var(--srph-accent);
  width:          30px;
  text-align:     center;
}

.srph-web .srph-attr-lbl.srph-def-lbl {
  color: var(--srph-heading-text);
}

.srph-web .srph-attr-val-row {
  display:         flex;
  justify-content: space-around;
}

.srph-web .srph-attr-val {
  font-size:   1.05em;
  font-weight: 600;
  width:       30px;
  text-align:  center;
  color:       var(--srph-body-text);
}

.srph-web .srph-attr-val.srph-def-val {
  font-size:        1.1em;
  font-weight:      800;
  color:            var(--srph-def-text);
  background-color: var(--srph-def-bg);
  border-radius:    3px;
  padding:          0 2px;
}

.srph-web .srph-hfi-row {
  display:          flex;
  justify-content:  space-evenly;
  flex-wrap:        wrap;
  gap:              8px;
  padding:          7px 16px 6px;
  background-color: var(--srph-hfi-bg);
  border-bottom:    1px solid var(--srph-accent-light);
}

.srph-web .srph-hfi-block {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  min-width:      65px;
}

.srph-web .srph-hfi-label {
  font-size:      0.63em;
  font-weight:    700;
  font-variant:   small-caps;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color:          var(--srph-accent);
}

.srph-web .srph-hfi-value {
  font-size:   1.0em;
  font-weight: 700;
  color:       var(--srph-heading-text);
}

.srph-web .srph-secondary {
  padding: 5px 18px 3px;
}

.srph-web .srph-divider {
  height:     1px;
  background: linear-gradient(to right, transparent, var(--srph-divider) 20%, var(--srph-divider) 80%, transparent);
  margin:     4px 18px;
  opacity:    0.5;
}

.srph-web .srph-skills-sect {
  padding: 4px 18px 5px;
}

.srph-web .srph-prop-line {
  margin:      2px 0;
  line-height: 1.5;
}

.srph-web .srph-prop-name {
  font-weight: 700;
  font-size:   0.86em;
  color:       var(--srph-prop-name);
}

.srph-web .srph-prop-value {
  font-size: 0.93em;
  color:     var(--srph-body-text);
}

.srph-web .srph-section {
  padding: 4px 18px 10px;
}

.srph-web .srph-section-heading {
  font-family:    var(--srph-font-heading);
  font-size:      0.95em;
  font-weight:    700;
  font-variant:   small-caps;
  letter-spacing: 0.07em;
  color:          var(--srph-heading-text);
  border-bottom:  1.5px solid var(--srph-accent);
  margin:         6px 0 7px;
  padding-bottom: 3px;
}

.srph-web .srph-trait {
  margin:      5px 0;
  line-height: 1.55;
}

.srph-web .srph-trait-name em { font-style: italic; }
.srph-web .srph-trait-name strong {
  font-weight: 700;
  color:       var(--srph-heading-text);
  font-style:  italic;
}

.srph-web .srph-trait-desc {
  color: var(--srph-body-text);
}

.srph-web .srph-source {
  font-size:   0.73em;
  font-style:  italic;
  color:       var(--srph-source-text);
  text-align:  right;
  padding:     5px 18px 7px;
  border-top:  1px solid var(--srph-accent-light);
}

/* ── NPC variant on the website (dark-mode warm earth) ─────────────────────
   Overrides the cold Kholin blue with a warm burnt-umber / ochre palette so
   NPC / encounter statblocks are visually distinct from bestiary entries.
   ─────────────────────────────────────────────────────────────────────────── */
.srph-statblock.srph-web.srph-npc {
  --srph-bg:           #1a0e06;   /* Deep ink-brown                           */
  --srph-header-from:  #2a1200;   /* Very dark umber                          */
  --srph-header-to:    #4a2010;   /* Dark sienna                              */
  --srph-header-text:  #f5e8d6;   /* Warm cream                               */
  --srph-header-sub:   #c9a07a;   /* Muted ochre                              */
  --srph-accent:       #c08840;   /* Amber gold                               */
  --srph-accent-light: #5a3a1a;   /* Dark ochre                               */
  --srph-attr-bg:      #221408;   /* Dark warm brown                          */
  --srph-def-bg:       #5a3a18;   /* Dark sandstone                           */
  --srph-def-text:     #f5d8a8;   /* Warm pale text                           */
  --srph-hfi-bg:       #1e1008;   /* Very dark warm                           */
  --srph-divider:      #7a5030;   /* Warm amber rule                          */
  --srph-heading-text: #e0c090;   /* Warm gold headings                       */
  --srph-name-text:    #f5e8d6;   /* Cream name                               */
  --srph-prop-name:    #c9a07a;   /* Ochre labels                             */
  --srph-body-text:    #d4b898;   /* Warm tan body                            */
  --srph-source-text:  #7a5828;   /* Muted amber source                       */
  --srph-border:       #8b5e2a;   /* Ochre border                             */
}

.srph-statblock.srph-web.srph-npc .srph-accent-bar {
  background: linear-gradient(to right, #2a1200, #8b5e2a, #c9a07a, #8b5e2a, #2a1200);
}

/* ── Player Character incomplete banner ───────────────────────────────────── */
.srph-pc-incomplete-banner {
  background:    #2a1000;
  border:        1.5px solid #c08840;
  border-radius: 5px 5px 0 0;
  color:         #f0c070;
  font-family:   'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size:     0.85em;
  max-width:     680px;
  margin:        1.2em auto 0;
  padding:       8px 16px 6px;
}
.srph-pc-incomplete-banner + .srph-statblock.srph-web.srph-npc {
  border-top:    none;
  border-radius: 0 0 5px 5px;
  margin-top:    0;
}
.srph-pc-incomplete-banner strong {
  color: #e8a030;
}
.srph-pc-validation-list {
  margin:  4px 0 2px 1.2em;
  padding: 0;
  color:   #c9a07a;
}
.srph-pc-validation-list li {
  margin: 1px 0;
}
/* Pre-Part-3 draft banner: calm/info tone, not the amber "incomplete" warning. */
.srph-pc-ontrack-banner {
  background: #0e1c24;
  border-color: #4a7a8c;
  color: #9fc6d6;
}
.srph-pc-ontrack-banner strong {
  color: #bfe0ec;
}
.srph-pc-issue-title {
  margin:      6px 0 1px;
  font-weight: 600;
  opacity:     0.85;
}

/* Roll buttons inside srph blocks */
.srph-web .bestiary-roll-row {
  margin-top: 4px;
}

.compact-spell {
  max-width: 660px;
}

.compact-spell-header h1 {
  font-size: 1.55rem;
}

.compact-spell-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-spell-content.markdown-body {
  font-size: 0.98rem;
  line-height: 1.55;
}

.compact-spell-content.markdown-body p {
  margin: 0 0 0.85rem;
}

.compact-spell-content.markdown-body ul,
.compact-spell-content.markdown-body ol {
  margin-top: 0.35rem;
  margin-bottom: 0.85rem;
}

.compact-spell-content.markdown-body li {
  margin-bottom: 0.35rem;
}

.compact-spell-content.markdown-body h2,
.compact-spell-content.markdown-body h3 {
  margin-top: 1rem;
  color: #ecc56b;
  text-transform: uppercase;
}

.compact-spell-source {
  margin: 10px 0 0;
  color: #bda879;
  font-size: 0.9rem;
}

@media (max-width: 540px) {
  .compact-spell-facts {
    grid-template-columns: 1fr;
  }
}

.vault-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #bba47b;
  font-size: 0.9rem;
  line-height: 1.35;
}

.vault-breadcrumbs span {
  color: rgba(236, 197, 107, 0.48);
}

.vault-breadcrumbs a {
  color: #d8c08b;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.vault-breadcrumbs a:hover {
  color: #fff1c2;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.vault-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(236, 197, 107, 0.26);
  background: rgba(10, 8, 6, 0.46);
  color: #f4e6c4;
}

.vault-card:hover {
  border-color: rgba(236, 197, 107, 0.72);
  color: #fff3c7;
}

.vault-card-type,
.vault-card-title,
.vault-card-meta,
.vault-card-recent {
  display: block;
}

.vault-card-type {
  margin-bottom: 10px;
  color: #ecc56b;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.vault-card-title {
  font-family: 'Vollkorn', serif;
  font-size: 1.18rem;
  line-height: 1.2;
}

.vault-card-meta,
.vault-card-recent {
  margin-top: 10px;
  color: #bda879;
  font-size: 0.82rem;
}

.markdown-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(236, 197, 107, 0.24);
  background: rgba(12, 9, 6, 0.62);
}

.reader-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 20px;
}

.markdown-panel h1 {
  color: #f5e5bd;
  margin: 0;
}

.reader-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.reader-actions a,
.reader-actions button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(236, 197, 107, 0.28);
  background: rgba(236, 197, 107, 0.08);
  color: #f0d59a;
  font: inherit;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.reader-actions a:hover,
.reader-actions button:hover {
  border-color: rgba(236, 197, 107, 0.68);
  color: #fff3c7;
}

.reader-toc {
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid rgba(236, 197, 107, 0.2);
  background: rgba(255, 248, 230, 0.035);
}

.reader-toc strong {
  display: block;
  margin-bottom: 8px;
  color: #ecc56b;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reader-toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reader-toc a {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(236, 197, 107, 0.18);
  background: rgba(12, 9, 6, 0.34);
  color: #e5d5b8;
  font-size: 0.82rem;
  line-height: 1.25;
  text-decoration: none;
}

.reader-toc a.is-sub {
  color: #cdbb95;
}

.reader-toc a:hover {
  border-color: rgba(236, 197, 107, 0.62);
  color: #fff3c7;
}

.metadata-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.3fr) 1fr;
  gap: 8px 14px;
  margin-bottom: 22px;
  padding: 16px;
  background: rgba(255, 248, 230, 0.05);
  border: 1px solid rgba(236, 197, 107, 0.18);
}

.metadata-list dt {
  color: #ecc56b;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.metadata-list dd {
  color: #e5d5b8;
}

.markdown-body {
  line-height: 1.65;
  overflow-wrap: break-word;
}

.markdown-body p {
  margin: 0 0 14px;
}

.markdown-body > p:first-child em:only-child {
  display: block;
  margin-bottom: 14px;
  color: #d7bd83;
  font-size: 0.92rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-family: 'Vollkorn', serif;
  margin: 28px 0 12px;
  text-align: left;
  border: 0;
  line-height: 1.16;
  color: #f5e5bd;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.82);
  letter-spacing: 0;
  text-transform: none;
}

.markdown-body h1 {
  margin-top: 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(236, 197, 107, 0.62);
  color: #fff0c7;
  font-size: 2.35rem;
}

.markdown-body h2 {
  margin-top: 34px;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(236, 197, 107, 0.42);
  color: #f4d88f;
  font-size: 1.78rem;
  text-transform: uppercase;
}

.markdown-body h3 {
  margin-top: 28px;
  color: #f7e3aa;
  font-size: 1.46rem;
}

.markdown-body h3::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.45em;
  border: 1px solid rgba(236, 197, 107, 0.72);
  transform: rotate(45deg) translateY(-0.08em);
  transform-origin: center;
  background: rgba(236, 197, 107, 0.14);
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 22px;
  color: #efdcae;
  font-weight: 700;
}

.markdown-body h4 {
  font-size: 1.2rem;
  color: #f0d28b;
}

.markdown-body h5 {
  font-size: 1.02rem;
  color: #e6c987;
  text-transform: uppercase;
}

.markdown-body h6 {
  font-size: 0.94rem;
  color: #d8bd80;
  text-transform: uppercase;
}

.markdown-body a {
  color: #f0ca72;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.markdown-body a:hover {
  color: #fff2bf;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 18px 24px;
  padding-left: 18px;
}

.markdown-body ul {
  list-style: disc;
}

.markdown-body ol {
  list-style: decimal;
}

.markdown-body li {
  margin: 4px 0;
  padding-left: 4px;
}

.markdown-body li::marker {
  color: #ecc56b;
}

.markdown-body li > strong:first-child {
  color: #f1d58f;
}

.markdown-body blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid rgba(236, 197, 107, 0.72);
  background: rgba(236, 197, 107, 0.08);
  color: #ead9b8;
}

.markdown-body blockquote strong:first-child {
  display: inline-block;
  margin-bottom: 4px;
  color: #f4d88f;
}

.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-body .callout {
  margin: 18px 0;
  padding: 12px 14px 12px 16px;
  border: 1px solid rgba(236, 197, 107, 0.22);
  border-left: 4px solid rgba(236, 197, 107, 0.82);
  background: rgba(236, 197, 107, 0.08);
  color: #ead9b8;
}

.markdown-body .callout-title {
  margin: 0 0 8px;
  color: #f5dc98;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.markdown-body .callout p:last-child,
.markdown-body .callout ul:last-child,
.markdown-body .callout ol:last-child {
  margin-bottom: 0;
}

.markdown-body .callout ul,
.markdown-body .callout ol {
  margin-bottom: 12px;
}

.markdown-body .callout-warning,
.markdown-body .callout-danger,
.markdown-body .callout-caution,
.markdown-body .callout-important {
  border-left-color: rgba(217, 101, 75, 0.95);
  background: rgba(217, 101, 75, 0.11);
}

.markdown-body .callout-warning .callout-title,
.markdown-body .callout-danger .callout-title,
.markdown-body .callout-caution .callout-title,
.markdown-body .callout-important .callout-title {
  color: #f0b093;
}

.markdown-body .callout-tip,
.markdown-body .callout-success,
.markdown-body .callout-lore {
  border-left-color: rgba(112, 196, 132, 0.9);
  background: rgba(112, 196, 132, 0.09);
}

.markdown-body .callout-tip .callout-title,
.markdown-body .callout-success .callout-title,
.markdown-body .callout-lore .callout-title {
  color: #bfe9af;
}

.markdown-body .callout-info,
.markdown-body .callout-note,
.markdown-body .callout-summary,
.markdown-body .callout-abstract {
  border-left-color: rgba(105, 175, 220, 0.92);
  background: rgba(105, 175, 220, 0.09);
}

.markdown-body .callout-info .callout-title,
.markdown-body .callout-note .callout-title,
.markdown-body .callout-summary .callout-title,
.markdown-body .callout-abstract .callout-title {
  color: #b9dcf3;
}

.markdown-body code {
  padding: 1px 5px;
  border: 1px solid rgba(236, 197, 107, 0.18);
  background: rgba(255, 248, 230, 0.05);
  color: #f4e6c4;
}

.markdown-body pre {
  max-width: 100%;
  margin: 16px 0;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid rgba(236, 197, 107, 0.18);
  background: rgba(6, 5, 4, 0.58);
}

.markdown-body pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

/* Bold and italic — restore browser semantics wiped by the CSS reset */
.markdown-body strong,
.markdown-body b {
  padding: 0 0.08em;
  color: #fff1bf;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(236, 197, 107, 0.18);
}
.markdown-body em,
.markdown-body i {
  font-style: italic;
}

/* Inline images (small icons embedded in paragraph text) */
.markdown-body img.inline-img {
  display: inline-block;
  vertical-align: middle;
  max-height: 1.4em;
  width: auto;
  max-width: 4em;
  margin: 0 0.15em;
  object-fit: contain;
}

.markdown-body img {
  display: block;
  width: auto;
  max-width: min(100%, 760px);
  max-height: min(62vh, 620px);
  height: auto;
  object-fit: contain;
  margin: 18px auto 22px;
  border: 1px solid rgba(236, 197, 107, 0.2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.content-shell img:not(.inline-img):not([data-no-lightbox]) {
  cursor: zoom-in;
}

.markdown-body table {
  display: block;
  width: 100%;
  margin: 18px 0;
  overflow-x: auto;
  border-collapse: collapse;
  white-space: normal;
}

.markdown-body th,
.markdown-body td {
  padding: 8px;
  border: 1px solid rgba(236, 197, 107, 0.2);
  vertical-align: top;
}

.markdown-body th {
  color: #f4d88f;
  background: rgba(236, 197, 107, 0.08);
}

.statblock-card {
  --fsb-primary: #7a200d;
  --fsb-rule: #922610;
  --fsb-paper: #fdf1dc;
  --fsb-bar: #e69a28;
  --fsb-text: #2c1c12;
  --fsb-muted: #5f4634;
  margin: 22px auto;
  padding: 0 12px 14px;
  max-width: 680px;
  color: var(--fsb-text);
  border: 1px solid #ddd;
  background: var(--fsb-paper);
  box-shadow: 0 0 1.5em rgba(221, 221, 221, 0.28);
  font-family: "Noto Sans", "Myriad Pro", Calibri, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.statblock-card::before,
.statblock-card::after {
  content: "";
  display: block;
  height: 6px;
  margin: 0 -12px;
  background: var(--fsb-bar);
  border: 1px solid #000;
}

.statblock-card::before {
  margin-bottom: 10px;
}

.statblock-card::after {
  margin-top: 12px;
}

.statblock-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.statblock-token {
  width: 82px !important;
  height: 82px !important;
  max-width: 82px !important;
  max-height: 82px !important;
  margin: 0 !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--fsb-primary);
  background: #fff7e6;
  box-shadow: none;
}

.statblock-card h2 {
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--fsb-primary) !important;
  font-family: "Libre Baskerville", "Lora", "Calisto MT", "Bookman Old Style", Georgia, serif;
  font-size: 25px;
  font-variant: small-caps;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-shadow: none !important;
  text-transform: none !important;
}

.statblock-card h3 {
  margin: 14px 0 8px !important;
  padding: 0 0 3px !important;
  color: var(--fsb-primary) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--fsb-primary) !important;
  font-family: "Libre Baskerville", "Lora", "Calisto MT", "Bookman Old Style", Georgia, serif;
  font-size: 21px;
  font-variant: small-caps;
  font-weight: 400;
  line-height: 1.2;
  text-align: left !important;
  text-shadow: none !important;
  text-transform: none !important;
}

.statblock-subtitle {
  margin: 0 0 8px;
  color: var(--fsb-muted);
  font-size: 12px;
  font-style: italic;
}

.statblock-property-list {
  margin: 8px 0 9px;
  padding: 7px 0;
  border-top: 2px solid var(--fsb-rule);
  border-bottom: 2px solid var(--fsb-rule);
}

.statblock-property-line {
  display: flex;
  gap: 5px;
  margin: 2px 0 !important;
  color: var(--fsb-text);
  line-height: 1.35;
}

.statblock-property-line strong {
  flex: 0 0 auto;
  color: var(--fsb-primary) !important;
  font-style: normal !important;
  font-weight: 700;
}

.statblock-property-line span {
  min-width: 0;
}

.statblock-abilities {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 10px 0 12px;
  padding: 4px 0;
  border-top: 2px solid var(--fsb-rule);
  border-bottom: 2px solid var(--fsb-rule);
}

.statblock-abilities .ability-roll-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 4px;
  border: 0;
  background: transparent;
  color: var(--fsb-text);
  text-align: center;
  line-height: 1.2;
}

.statblock-abilities strong {
  display: block;
  color: var(--fsb-primary);
  font-size: 0.79rem;
  font-weight: 800;
}

.statblock-abilities em {
  color: var(--fsb-muted);
  font-style: normal;
  font-size: 0.86rem;
}

.statblock-card p {
  color: var(--fsb-text);
  margin: 7px 0;
}

.statblock-card p strong {
  color: var(--fsb-primary);
  font-style: italic;
}

.statblock-card .dice-inline,
.statblock-card .sheet-text-roll {
  display: inline-block;
  margin: 0 2px;
  padding: 1px 5px;
  border: 1px solid rgba(122, 32, 13, 0.62);
  border-radius: 3px;
  background: #f1cf80;
  color: #4d1409;
  font: inherit;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  box-shadow: inset 0 -1px 0 rgba(122, 32, 13, 0.18);
  cursor: pointer;
}

.statblock-card .dice-inline:hover,
.statblock-card .dice-inline:focus-visible,
.statblock-card .sheet-text-roll:hover,
.statblock-card .sheet-text-roll:focus-visible {
  border-color: var(--fsb-primary);
  background: #7a200d;
  color: #fff3d4;
  outline: 2px solid rgba(122, 32, 13, 0.22);
  outline-offset: 1px;
}

.statblock-section-intro {
  color: var(--fsb-text);
  font-style: normal;
}

.statblock-trait-line strong {
  font-style: italic;
}

.bestiary-primary-notes {
  max-width: 760px;
  margin: 28px auto 0;
}

.statblock-roll-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 6px 0 4px;
  vertical-align: baseline;
}

.statblock-roll-button {
  font-size: 0.88em;
  font-weight: 700;
}

@media (max-width: 520px) {
  .statblock-header {
    grid-template-columns: 1fr;
  }

  .statblock-token {
    width: 68px !important;
    height: 68px !important;
  }
}

@media print {
  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  body::before,
  body::after,
  #top,
  #nav-wrap,
  footer,
  .vault-breadcrumbs,
  .reader-actions,
  .reader-toc,
  .dice-roller-panel {
    display: none !important;
  }

  #wrapper,
  #shadow,
  #inner-wrapper,
  .content-shell,
  .markdown-panel {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
  }

  .markdown-body,
  .markdown-body p,
  .markdown-body li,
  .markdown-body td,
  .markdown-body th {
    color: #111 !important;
  }

  .markdown-body a {
    color: #000 !important;
    text-decoration: underline;
  }
}

/* ------------------------------------------------------------------------------------
--  TOP
------------------------------------------------------------------------------------ */
#top{
	float:left;
	background:#191919 url(../images/top-bg.png);
	background-repeat:repeat;
	width:100%;
	position:relative;
	margin: 0 0 0 0;
    border-bottom: 1px solid rgba(236, 197, 107, 0.18);
}
#langs{
	position:absolute;
	top:0;
	right:0;
}
#langs a{
	font-size:0.8em;
	display:inline-block;
	background:#000;
	border:1px solid rgba(255,255,255,0.2);
	padding:5px;
	margin-left:5px;
}
#langs a:hover{
	color:#eaeaea;
}
.tavern-logo {
    font-family: 'Vollkorn', serif;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    text-align: center;
    margin: 0;
    padding-top: 8px;
    color: #fdf6e3;
    text-shadow: 0 0 8px rgba(255, 240, 200, 0.6);
    letter-spacing: 0;
}
.brand-mark {
    display: block;
    width: min(520px, 82%);
    margin: 0 auto;
    padding-top: 18px;
}
.brand-mark img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
}
.brand-mark + .tavern-logo {
    display: none;
}
.tavern-logo a {
    text-decoration: none;
    color: inherit;
}
.tavern-logo:hover {
    text-shadow: 0 0 10px #fff5c1;
}

.tagline {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    text-align: center;
    color: #d5c49a;
    margin-top: -5px;
    padding-bottom: 10px;
}

/* ------------------------------------------------------------------------------------
--  FOOTER
------------------------------------------------------------------------------------ */
footer{
	float:left;
	background:url(../images/darkwood.png);
	background-repeat:repeat;
	width:100%;
	border-top:1px solid rgba(236,179,100,0.1);
	border-bottom:1px solid rgba(236,179,100,0.1);
}
#pass{
	float:left;
	width:100%;
	height:20px;
	background:url(../images/darkwood.png);
	background-repeat:repeat-x;
}
ul#footer-inside{
	float:left;
	list-style:none;
	color:#7f7f7f;
	margin:40px;
	width:800px;
}
#footer-inside h3{
	text-shadow:none;
}
.white-line-footer{
	float:left;
	width:206px;
	height:1px;
	background:rgba(236,179,100,0.1);
	margin-bottom:20px;
}
ul#footer-inside li{
	float:left;
	margin-right:20px;
	width:206px;
	padding:20px 10px;
	background:url(../images/top-bg.png);
	background-repeat:repeat;
}
ul#footer-inside li.last{
	margin-right:0;
}
ul#footer-inside p{
	margin-bottom:0;
	line-height:1.5em;
	color:#7f7f7f;
	font-family:'Abel', sans-serif;
	letter-spacing:0.1em;
	font-size:0.9em;
	text-transform:uppercase;
}
#lastline{
	float:left;
	width:100%;
	border-bottom:1px solid rgba(236,179,100,0.1);
	position:relative;
}
#lastline small{
	margin:20px 40px;
	color:#7f7f7f;
	font-size:0.8em;
	float:left;
}

/* ------------------------------------------------------------------------------------
--  GENERAL DIVS, SECTIONS, ARTICLES
------------------------------------------------------------------------------------ */
.boxgrid{
	float:left;
	background:transparent;
	overflow: hidden;
	position: relative;
	width:130px;
	height:130px;
}
.frontpage{
	width:130px;
	height:130px;
}
.innerpage{
	width:125px;
	height:125px;
}
.boxgrid figure, .boxgrid img{
	float:left;
}
.boxgrid img.cover{
	position: absolute;
	top: 0;
	left: 0;
	border: 0;
	cursor:pointer;
}
.boxgrid h4{
	letter-spacing:0.1em;
	padding-bottom:7px;
	font-family:'Abel', sans-serif;
	text-transform:uppercase;
}
.boxgrid p{
	font-size:0.8em;
}
/* ------------------------------------------------------------------------------------
--  INDEX (HOME PAGE)
------------------------------------------------------------------------------------ */
/*-----PICTURE BLOCK-----*/
.block{
	float:left;
	margin:0 40px 40px 40px;
	position:relative;
}
figure#topnpic{
	float:left;
	width:720px;
}
img#mainpic{
	cursor:move;
	float:left;
}
#exp{
	position:absolute;
	height:60px;
	width:720px;
	left:0;
	bottom:0;
	background:rgba(0,0,0,0.6);
}
#drag{
	position:absolute;
	top:23px;
	left:246px;
	width:14px;
	height:14px;
}
#exp p{
	text-align:center;
	line-height:60px;
	position:relative;
	font-size:0.9em;
}
#exp img{
	vertical-align:middle;
	margin-right:5px;
}

/*-----MEDIA CONTENT BLOCK-----*/
@media screen and (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow-x: hidden;
  }

  #inner-wrapper,
  #shadow,
  .content-wrap,
  .center-quote {
    width: 95% !important;
    max-width: none !important;
    padding: 10px !important;
    box-sizing: border-box;
  }

  #shadow {
    min-height: 100vh;
  }

  #inner-wrapper {
    width: calc(100% - 14px) !important;
    max-width: calc(100% - 14px) !important;
    padding: 0 !important;
    overflow-x: clip;
  }

  .content-shell {
    padding: 16px 12px !important;
    overflow-x: clip;
  }

  .tavern-logo {
    font-size: 2rem;
  }

  .buttonsubmit {
    font-size: 1rem;
    padding: 8px 18px;
  }

  nav#primary {
    width: 100% !important;
    font-size: 0.85em;
    overflow-x: visible;
  }

  #top {
    width: 100% !important;
  }

  #footer-inside {
    width: 95% !important;
    margin: 10px auto;
  }

  #forma {
    margin: 20px auto;
    padding: 15px;
  }
  
  input:not([type="checkbox"]):not([type="radio"]), textarea {
    width: 100% !important;
  }
  
  .buttonsubmit {
    width: 100%;
    text-align: center;
  }

  .sheet-panel,
  .sheet-table-wrap,
  .markdown-panel,
  .markdown-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .sheet-panel {
    padding: 13px 11px;
    overflow: hidden;
  }

  .sheet-panel h2 {
    font-size: 0.98rem;
  }

  .sheet-ability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .sheet-inline-list,
  .sheet-tag-list,
  .sheet-roll-cluster {
    gap: 5px;
  }

  .sheet-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sheet-table {
    min-width: 460px;
    table-layout: fixed;
  }

  .sheet-table th,
  .sheet-table td {
    padding: 6px 7px;
    overflow-wrap: anywhere;
  }
}
.lab-workspace {
  max-width: 1180px;
}

.lab-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  border: 2px solid #9d2f2f;
  background: #fff4dc;
  color: #2f1d12;
}

.lab-banner strong {
  color: #8a1f1f;
}

.lab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.lab-nav a {
  font-weight: 700;
}

.lab-definition-list {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
  gap: 0.35rem 1rem;
}

.lab-definition-list dt {
  font-weight: 700;
}

.lab-definition-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lab-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.lab-metric {
  display: block;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 6px;
  background: rgba(255,255,255,0.75);
}

.lab-metric span,
.lab-metric strong {
  display: block;
}

.lab-metric strong {
  font-size: 1.5rem;
}

.lab-two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
}

.lab-json {
  max-height: 32rem;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #ccc);
  background: rgba(255,255,255,0.78);
  white-space: pre-wrap;
}

.lab-filter-row,
.lab-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.lab-filter-row label,
.lab-search-form input {
  min-width: min(100%, 16rem);
}

.lab-search-form input {
  flex: 1 1 24rem;
}

.lab-flashes {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.lab-flash,
.lab-warning {
  padding: 0.65rem 0.8rem;
  border: 1px solid #b98533;
  background: #fff8e8;
  border-radius: 6px;
}

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lab-edit-form {
  display: grid;
  gap: 0.9rem;
}

.lab-edit-form label {
  display: grid;
  gap: 0.3rem;
}

.lab-edit-form input,
.lab-edit-form select,
.lab-edit-form textarea {
  max-width: 100%;
}

.lab-edit-table input {
  width: 100%;
  min-width: 5rem;
}
