@font-face {
  font-family: 'Edisson';
  src: url('/styles/sourcebooks/assets/drde/Edisson.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Ruleholder Draconic';
  src: url('/styles/sourcebooks/assets/drde/Dracofont.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.sourcebook--drde {
  --rh-sourcebook-accent: #8f3b33;
  --rh-sourcebook-accent-muted: #9b740b;
  --rh-sourcebook-background-image: url('/styles/sourcebooks/assets/drde/cover-compendium.webp');
  --rh-sourcebook-heading-color: #b44b41;
  --rh-sourcebook-heading-underline-color: #c5a86f;
  --rh-sourcebook-heading-underline-image: none;
  --rh-sourcebook-callout-heading-color: var(--rh-sourcebook-heading-color);
  --rh-sourcebook-chapter-title-color: var(--rh-sourcebook-accent);
  --rh-sourcebook-chapter-title-font: 'Edisson', 'Modesto', var(--font-heading);
  --rh-sourcebook-chapter-title-font-weight: 400;
  --rh-sourcebook-chapter-title-letter-spacing: 1px;
  --rh-sourcebook-chapter-title-underline-color: var(--rh-sourcebook-accent);
  --rh-sourcebook-chapter-title-underline-image: none;
  --rh-sourcebook-table-odd-bg: #faecc1;
  --rh-sourcebook-table-even-bg: transparent;
  --rh-sourcebook-table-header-bg: transparent;
  --rh-sourcebook-table-border: transparent;
  --rh-sourcebook-notable-bg: #d3e0e6;
  --rh-sourcebook-narrative-bg: #efd9cc;
  --rh-sourcebook-narrative-border: #b44b41;
  --rh-sourcebook-callout-border: #9b740b;
  --rh-sourcebook-branded-callout-border: #281328;
  --rh-sourcebook-toc-column-count: 3;
  --rh-sourcebook-toc-column-width: 30ch;
  --rh-sourcebook-toc-column-gap: 1.5rem;
}

.sourcebook--drde:is(
  .sourcebook-chapter--vvedenie,
  .sourcebook-chapter--smert-na-zakate,
  .sourcebook-chapter--pekar-tak-ne-delaet,
  .sourcebook-chapter--volya-orkusa,
  .sourcebook-chapter--zov-pustoty,
  .sourcebook-chapter--drakon-naykira,
  .sourcebook-chapter--zapretnaya-dolina,
  .sourcebook-chapter--pered-burey,
  .sourcebook-chapter--drozhashchaya-smert,
  .sourcebook-chapter--medyak-za-pesnyu,
  .sourcebook-chapter--drakony-peschanogo-goroda
) {
  --rh-sourcebook-canvas-background-position: top center, center;
  --rh-sourcebook-canvas-background-repeat: no-repeat, repeat;
  --rh-sourcebook-canvas-background-size: auto, auto;
}

.sourcebook--drde.sourcebook-chapter--vvedenie {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/introduction.webp'),
    var(--rh-sourcebook-reader-background-image);
}

.sourcebook--drde.sourcebook-chapter--smert-na-zakate {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/death-at-sunset.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #364727;
  --rh-sourcebook-accent-muted: #97a164;
}

.sourcebook--drde.sourcebook-chapter--pekar-tak-ne-delaet {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/bakers-doesnt.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #bb8d25;
  --rh-sourcebook-accent-muted: #e2ad37;
}

.sourcebook--drde.sourcebook-chapter--volya-orkusa {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/the-will-of-orcus.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #505052;
  --rh-sourcebook-accent-muted: #a5b2a6;
}

.sourcebook--drde.sourcebook-chapter--zov-pustoty {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/for-whom-the-void-calls.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #c24f72;
  --rh-sourcebook-accent-muted: #f8c391;
  --rh-sourcebook-map-lightbox-background: #ffffff;
}

.sourcebook--drde.sourcebook-chapter--drakon-naykira {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/the-dragon-of-najkir.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #a95d22;
  --rh-sourcebook-accent-muted: #d07e32;
}

.sourcebook--drde.sourcebook-chapter--zapretnaya-dolina {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/the-forbidden-vale.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #a83d22;
  --rh-sourcebook-accent-muted: #b09188;
  --rh-sourcebook-map-lightbox-background: #ffffff;
}

.sourcebook--drde.sourcebook-chapter--pered-burey {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/before-the-storm.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #464956;
  --rh-sourcebook-accent-muted: #8b8e9e;
}

.sourcebook--drde.sourcebook-chapter--drozhashchaya-smert {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/shivering-death.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #337ea8;
  --rh-sourcebook-accent-muted: #cad4db;
}

.sourcebook--drde.sourcebook-chapter--medyak-za-pesnyu {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/a-copper-for-a-song.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #733b34;
  --rh-sourcebook-accent-muted: #4b967f;
}

.sourcebook--drde.sourcebook-chapter--drakony-peschanogo-goroda {
  --rh-sourcebook-canvas-background-image:
    url('/styles/sourcebooks/assets/drde/dragons-of-the-sandstone-city.webp'),
    var(--rh-sourcebook-reader-background-image);
  --rh-sourcebook-accent: #41709d;
  --rh-sourcebook-accent-muted: #997970;
}

.sourcebook--drde .sourcebook-reader-content .quest {
  border-color: var(--rh-sourcebook-accent);
  background-color: var(--rh-sourcebook-narrative-bg);
}

.sourcebook--drde .sourcebook-reader-content .advice.ag-advice {
  border-color: var(--rh-sourcebook-branded-callout-border);
}

.sourcebook--drde .adventure-summary {
  display: flex;
  align-items: center;
}

.sourcebook--drde .adventure-summary .level-flag {
  display: flex;
  flex-direction: column;
  min-height: 7.8rem;
  max-width: 7.8rem;
  margin-inline: 1.55rem;
  border-radius: 0.6rem;
  background-color: var(--rh-sourcebook-accent);
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 85%, 0 100%, 0 0);
  color: #f9f9fa;
  font-family: 'Roboto', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  padding: 0.65rem;
  text-align: center;
  text-shadow: 0 2px 3px rgb(0 0 0 / 40%);
  text-transform: uppercase;
}

.sourcebook--drde .adventure-summary .adventure-level {
  display: inline-block;
  margin: 0.25rem 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.125rem;
}

.sourcebook--drde .adventure-summary .level-flag + p {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: uppercase;
}

.sourcebook--drde
  .sourcebook-content-block:has(.history-header)
  .sourcebook-content-html {
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.sourcebook--drde
  .sourcebook-content-block:has(.history-header)
  > .sourcebook-content-block-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sourcebook--drde .history-header {
  position: relative;
  width: min(100%, 37rem);
  min-height: 12rem;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

.sourcebook--drde .history-header .row {
  display: flex;
  align-items: center;
  min-height: 4rem;
}

.sourcebook--drde .history-header .row p {
  margin: 0.5rem 0 0;
  font-size: 1.25rem;
}

.sourcebook--drde .history-header :is(.pattern, .head) {
  position: absolute;
  pointer-events: none;
}

.sourcebook--drde .history-header .pattern {
  top: 0;
  right: 0;
  left: 8rem;
  width: calc(100% - 8rem);
}

.sourcebook--drde .history-header .head {
  top: 1.75rem;
  right: 3.25rem;
  width: 5rem;
}

.sourcebook--drde .history-header > p {
  margin-block: 0.25rem;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1;
}

.sourcebook--drde .history-header .draconic-text {
  margin-left: 1.5rem;
  font-family: 'Ruleholder Draconic', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: none;
}

.sourcebook--drde .history-header .draconic-text p {
  margin: 0;
}

.sourcebook--drde .history-header ~ p:first-of-type {
  max-width: 28rem;
  margin-bottom: 2rem;
}

.sourcebook--drde
  .sourcebook-content-block:has(.history-header)
  .sourcebook-content-html
  > div[style*='max-width: 400px'] {
  margin-inline: auto;
}

.sourcebook--drde
  .sourcebook-content-block:has(.history-header)
  .sourcebook-content-html
  > div[style*='max-width: 400px']
  + p {
  margin-bottom: 0;
  text-align: center;
}

.sourcebook--drde
  .sourcebook-content-block:has(.history-header)
  .sourcebook-content-html
  > div[style*='max-width: 400px']
  + p
  + p {
  text-align: center;
}

.sourcebook--drde
  .sourcebook-content-block:has(.history-header)
  .sourcebook-content-html
  > figure.content-embed--image
  + p {
  margin-bottom: 0;
  text-align: center;
}

.sourcebook--drde
  .sourcebook-content-block:has(.history-header)
  .sourcebook-content-html
  > figure.content-embed--image
  + p
  + p {
  text-align: center;
}

@media (max-width: 639px) {
  .sourcebook--drde.sourcebook-reader-page {
    --rh-sourcebook-canvas-background-image: var(--rh-sourcebook-reader-background-image);
    --rh-sourcebook-canvas-background-position: center;
    --rh-sourcebook-canvas-background-repeat: repeat;
    --rh-sourcebook-canvas-background-size: auto;
  }

  .sourcebook--drde .adventure-summary {
    align-items: flex-start;
  }

  .sourcebook--drde .adventure-summary .level-flag {
    flex: 0 0 6.5rem;
    min-height: 6.5rem;
    margin-inline: 0 0.8rem;
  }

  .sourcebook--drde .history-header {
    min-height: 9rem;
  }

  .sourcebook--drde .history-header img.pattern {
    display: none;
  }

  .sourcebook--drde .history-header .head {
    top: 0.5rem;
    right: 1rem;
    width: 4rem;
  }
}
