div.journal-sheet div.ddbimporter-image-container {
  position: relative;
}

div.journal-sheet div.ddbimporter-image-container a.ddbimporter-show-image {
  max-width: 255px;
  background: #2f0000d6;
  -webkit-box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.5);
          box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  margin-left: 10px;
  display: block;
  padding: 8px 16px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  -webkit-transform: translate(-20px, 20px);
          transform: translate(-20px, 20px);
}

div.journal-sheet div.ddbimporter-image-container a.ddbimporter-to-chat {
  max-width: 255px;
  background: #2f0000d6;
  -webkit-box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.5);
          box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  margin-left: 10px;
  display: block;
  padding: 8px 16px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  -webkit-transform: translate(-20px, 60px);
          transform: translate(-20px, 60px);
}

.ddbimporter-chat-image{
  border-radius: 5px;
  border-color: transparent;
  width: 100%;
}

a.ddbimporter.roll{
  font-family: "Signika", sans-serif;
  color: #191813;
  -webkit-user-drag: element;
  box-sizing: border-box;
  cursor: pointer;
  user-select: text;
  background: #DDD;
  padding: 1px 4px;
  border: 1px solid #4b4a44;
  border-radius: 2px;
  white-space: nowrap;
  word-break: break-all;
}

div.ddbimporter-image-popout {
  display: none;
  z-index: 50;
  position: relative;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
}

div.ddbimporter-image-popout img {
  border: none;
  margin-top: auto;
  margin-bottom: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;

  object-fit: contain;
  width: 90%;
  height: 90%;
}

.ddb aside.block-torn-paper, .ddb aside.epigraph, .ddb aside.epigraph--with-author, .ddb aside.epigraph-with-author {
  overflow: auto;
  background: var(--theme-quote-bg-color,#fff);
  color: var(--theme-quote-fg-color,#242527);
  margin: 40px 0;
  line-height: 1.6;
  font-size: 14px;
  border: solid transparent;
  border-width: 20px 10px;
  border-image-source: var(--theme-quote-border,url(https://media.dndbeyond.com/ddb-compendium-client/5f1f1d66d16be68cf09d6ca172f8df92.png));
  border-image-repeat: repeat;
  border-image-slice: 20 10 20 10 fill;
  padding: 10px;
  position: relative;
}

.ddb aside.rules-text {
  overflow: auto;
  display: block;
  margin: 30px 0;
  line-height: 1.6;
  font-size: 14px;
  color: var(--theme-rules-text-fg-color,#242527);
  border-color: transparent;
  border-style: solid;
  border-width: 15px 20px;
  border-image-repeat: repeat;
  border-image-slice: 20 30 20 30 fill;
  background-color: transparent;
  padding: 20px 10px 10px;
  position: relative;
  border-image-source: var(--theme-rules-text-border,url(https://media.dndbeyond.com/ddb-compendium-client/463d4668370589a1a73886611645df7e.png));
  -webkit-filter: drop-shadow(0 5px 8px #ccc);
  filter: drop-shadow(0 5px 8px #ccc);
}

.ddb aside.read-aloud-text {
  overflow: auto;
  display: block;
  margin: 30px 0;
  line-height: 1.6;
  font-size: 14px;
  color: var(--theme-read-aloud-fg-color,#242527);
  border: 8px solid transparent;
  border-image-repeat: repeat;
  border-image-slice: 8 8 8 8 fill;
  background-color: transparent;
  padding: 20px 20px 10px !important;
  position: relative;
  border-image-source: var(--theme-read-aloud-border,url(https://media.dndbeyond.com/ddb-compendium-client/146117d0758df55ed5ff299b916e9bd1.png));
}

.ddb .text--quote-box, .ddb .text-quote-box {
  display: block !important;
  background-color: var(--compendium-quote-box-color, #FAF8EC) !important;
  padding: 20px 25px 15px 25px !important;
  position: relative !important;
  width: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
  border-radius: 0 !important;
  border-left: 1px solid !important;
  border-right: 1px solid !important;
  border-color: var(--compendium-quote-box-border, #620000) !important;
  border-top: 0;
  border-bottom: 0;
  color: var(--theme-page-fg-color) !important;
  margin: 40px 0px !important;
  line-height: 1.6 !important;
  font-size: 14px !important;
}

.ddb .text-quote-box::before, .ddb .text-quote-box::after,
.ddb .text--quote-box::before, .ddb .text--quote-box::after {
  content: '';
  border-radius: 50%;
  background-position: left !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  height: 8px !important;
  width: 8px !important;
  left: -4px !important;
  position: absolute !important;
  background-color: var(--compendium-quote-box-corner, #620000);
  box-sizing: inherit;
  -webkit-tap-highlight-color: transparent;
  outline: 0;
}


.ddb .stat-block-background {
  background-repeat: no-repeat;
  -webkit-box-shadow: 0px 5px 8px 0px #aaa;
  -moz-box-shadow: 0px 5px 8px 0px #aaa;
  box-shadow: 0px 5px 8px 0px #aaa;
  background-position: top center !important;
  background-image: url(https://media.dndbeyond.com/compendium-images/tcoe/0gqawlEa2tjXGxpc/mm_statbg_sm.jpg) !important;
}

.ddb h2.compendium-hr,
.ddb h3.compendium-hr,
.ddb h4.compendium-hr,
.ddb h4.Core-Styles_Core-Body,
.ddb h4.quick-menu-exclude.Table_Table-Title,
.ddb-book-header{
  font-weight: bold;
}

.ddb .compendium-image-subtitle, .ddb .compendium-image > figcaption {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  margin: 10px 0;
}

.ddb p.Table-Styles_Table-Title {
  font-weight: bold;
  font-size: 16px;
  margin-top: 19.5px;
  margin-bottom: 6.5px;
}

.ddb .compendium-left-aligned-table th:nth-child(1) {
  text-align: center !important;
  width: 80px !important;
}

.ddb .summoning-creatures-table td:nth-child(1), .ddb .compendium-left-aligned-table td:nth-child(1) {
  vertical-align: middle !important;
  padding: 8px 20px !important;
  line-height: 1.4 !important;
  text-align: center !important;
}

.ddb .table-compendium.table-generic-dice td:first-child,
.ddb .table-compendium.table-generic-dice th:first-child,
.ddb .table-compendium.table--generic-dice td:first-child,
.ddb .table-compendium.table--generic-dice th:first-child {
  width: 12% !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.ddb blockquote.adventure-read-aloud-text::before,
.ddb blockquote.adventure-read-aloud-text::after {
  background-image: url("../images/icons/dot.svg"),url("../images/icons/dot.svg") !important;
  background-position: left,right;
  background-size: contain !important;
  background-repeat: no-repeat;
  height: 8px !important;
  left: -4px !important;
  right: -4px !important;
}

.ddb blockquote.adventure-read-aloud-text,
.ddb blockquote.compendium-parchment-blockquote,
.ddb blockquote.ddb-blockquote {
  background: white;
  padding: 20px;
  position: relative;
  width: auto;
  /* display: -webkit-flex; */
  /* display: -ms-flexbox; */
  display: flex;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  border-left: 1px solid #e0dcdc;
  border-right: 1px solid #e0dcdc;
  border-top: 0;
  border-bottom: 0;
  overflow: visible;
  border-radius: 0;
  color: #242527;
  margin: 40px 0;
  line-height: 1.6;
}

.ddb blockquote.adventure-read-aloud-text {
  display: block !important;
  background-color: #e6e7ec !important;
  border-color: #979aa4 !important;
}

.ddb .Flowchart-Block {
  border-width: 16px 16px 16px 16px !important;
  border-style: solid !important;
  border-color: transparent !important;
  border-image-repeat: repeat !important;
  border-image-slice: 16 16 16 16 fill !important;
  background-color: transparent !important;
  padding: 10px !important;
  position: relative !important;
  border-image-source: url(https://media-waterdeep.cursecdn.com/attachments/7/571/blockquote-flowchart.png) !important;
  font-size: 14px;
  line-height: 1.6 !important;
  margin: 50px 0px 20px 0px !important;
}

.ddb .Flowchart-Heading {
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  font-size: 16px;
}

.ddb .Flowchart-Block {
  font-size: 14px;
  line-height: 1.6 !important;
}

.ddb .Flowchart-Subheading {
  font-style: italic;
  text-align: center;
  font-size: 16px;
}

.ddb .Flowchart-Block-Linked::before {
  content: '';
  border-left: 3px solid #cdb078;
  height: 100px;
  left: 50%;
  position: absolute;
  margin-top: -80px;
  z-index: -1;
}

.ddb aside.vrgtr-flowchart--1 {
  background-image: url(https://media.dndbeyond.com/compendium-images/vrgtr/U9mBj5XfiTD1mHie/flowchart-box-01.png);
}
.ddb aside.vrgtr-flowchart {
  text-align: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 30px 20% !important;
  margin: 0px 0px;
}

.Core-Styles_Core-Metadata, .Serif-Character-Style_Inline-Subhead-Serif, .Serif-Character-Style_Italic-Serif, .Serif-Character-Style_Inline-Subhead-Serif, .Sans-Serif-Character-Styles_Italic-Sans-Serif, .Sans-Serif-Character-Styles_Bold-Italic-Sans-Serif, .Serif-Character-Style_Bold-Italic-Serif  {
  font-style: italic;
}

.Serif-Character-Style_Bold-Serif, .Serif-Character-Style_Inline-Subhead-Serif, .Sans-Serif-Character-Styles_Bold-Sans-Serif, .Sans-Serif-Character-Styles_Bold-Italic-Sans-Serif, .Serif-Character-Style_Bold-Italic-Serif {
  font-weight: bold;
}

.ddb .Basic-Text-Frame {
  clear: both;
  position: relative;
  box-shadow: 0 0 5px #979aa4;
  border: 1px solid #d4d0ce;
  background: #ffffff66;
  padding: 10px;
  margin: 10px 0 10px 0;
}

.ddb .Stat-Block-Styles_Stat-Block-Title {
  font-size: 18px !important;
  font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
  text-transform: uppercase;
  font-weight: bold;
  line-height: 1.4 !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

.ddb .Stat-Block-Styles_Stat-Block-Metadata {
  font-style: italic;
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
}

.ddb .Stat-Block-Styles_Stat-Block-Data,
.ddb .Stat-Block-Styles_Stat-Block-Data-Last,
.ddb .Stat-Block-Styles_Stat-Block-Body,
.ddb .Stat-Block-Styles_Stat-Block-Hanging,
.ddb .Stat-Block-Styles_Stat-Block-Hanging-Last,
.ddb .Stat-Block-Styles_Stat-Block-Body-Last-apply-before-heading-,
.ddb .Stat-Block-Styles_Stat-Block-Body-Last--apply-before-heading- {
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin-bottom: 10px !important;
}

.ddb .stat-block-ability-scores {
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  border-top: 2px solid #bc0f0f;
  border-bottom: 2px solid #bc0f0f;
  margin: 10px 0;
}

.ddb .stat-block-ability-scores-stat {
  width: 33.33333%;
  padding: 10px 5px;
  text-align: center;
}

.ddb .stat-block-ability-scores-stat {
  width: 16.66667%;
}

.ddb .stat-block-ability-scores-heading {
  font-weight: bold;
}

.ddb .stat-block-ability-scores-modifier {
  margin-left: 5px;
}

.ddb .Stat-Block-Styles_Stat-Block-Heading,
.ddb .Stat-Block-Styles_Stat-Block-Heading-after-last-bar-,
.ddb .Stat-Block-Styles_Stat-Block-Heading--after-last-bar- {
  font-size: 16px !important;
  font-weight: bold;
  font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
}


 /* for stat blocks appearing in spells details */
.Basic-Text-Frame {
  column-count: 1;

  .stat-block-ability-scores-modifier {
    display: block;
  }

  &::before {
    left: -3px;
    top: -3px;
    right: -3px;
  }

  &::after {
    left: -3px;
    bottom: -3px;
    right: -3px;
  }

  &::before,
  &::after {
    content: "";
    background-image: url("https://www.dndbeyond.com/content/skins/waterdeep/images/MMStatBar_lrg.jpg");
    background-size: 100% 100%;
    background-position: center;
    height: 4px;
    display: inline-block;
    position: absolute;
  }

  .Stat-Block-Styles_Stat-Block-Title {
    font-size: 18px;
    font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 0;
    display: inline;
    margin-right: 5px;
  }

  .Stat-Block-Styles_Stat-Block-Metadata {
    font-style: italic;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    &::after {
      content: "";
      display: block;
      border-bottom: 2px solid #bc0f0f;
      padding-top: 5px;
    }
  }

  .Stat-Block-Styles_Stat-Block-Heading,
  .Stat-Block-Styles_Stat-Block-Heading-after-last-bar-,
  .Stat-Block-Styles_Stat-Block-Heading--after-last-bar- {
    font-size: 16px;
    font-weight: bold;
    font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
    &::after {
      content: "";
      display: block;
      border-bottom: 1px solid #bc0f0f;
      padding-top: 2px;
    }
  }

  .Stat-Block-Styles_Stat-Block-Data,
  .Stat-Block-Styles_Stat-Block-Data-Last,
  .Stat-Block-Styles_Stat-Block-Body,
  .Stat-Block-Styles_Stat-Block-Hanging,
  .Stat-Block-Styles_Stat-Block-Hanging-Last,
  .Stat-Block-Styles_Stat-Block-Body-Last-apply-before-heading-,
  .Stat-Block-Styles_Stat-Block-Body-Last--apply-before-heading- {
    font-size: 14px;
    line-height: 1.4;
  }

  .Stat-Block-Styles_Stat-Block-Data-Last {
    border-bottom: 2px solid #bc0f0f;
    padding-bottom: 10px;
  }

  .stat-block-ability-scores {
    display: flex;
    flex-wrap: wrap;
    border-top: 2px solid #bc0f0f;
    border-bottom: 2px solid #bc0f0f;
    margin: 10px 0;
  }

  .stat-block-ability-scores-stat {
    width: 33.33333%;
    padding: 10px 5px;
    text-align: center;
  }

  .stat-block-ability-scores-heading {
    font-weight: bold;
  }

  @media (min-width: 768px) {
    .stat-block-ability-scores-stat {
      width: 16.66667%;
    }
  }
}

.monster-stat-block,
.monster--stat-block {
  border: 1px solid #d4d0ce;
  background-color: var(--sb-stat-block-bg-override, #fefcef);
  padding: 15px;
  position: relative;
  background-repeat: no-repeat;
  box-shadow: 0 5px 5px 0 #aaa;
  font-size: 14px;
  line-height: 19.6px;
  margin: 10px 4px;

  &::before,
  &::after {
    content: "";
    background-image: var(--sb-stat-block-scrollbar, url(https://media.dndbeyond.com/compendium-images/cm/c43LH2y2Gcaxb3V2/MMStatBar_lrg.png));
    background-size: 100% 100%;
    background-position: center;
    height: 4px;
    display: inline-block;
    position: absolute;
  }
  &::before {
    left: -3px;
    top: -3px;
    right: -3px;
  }
  &::after {
    left: -3px;
    bottom: -3px;
    right: -3px;
  }

  & br {
    display: none;
  }

  p {
    break-inside: avoid;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  h2,
  h3,
  h4,
  h5 {
    display: inline;
    font-size: 20px;
    font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0;
    margin-right: 8px;
  }

  p:first-of-type:not(.monster--stats p:first-of-type) {
    font-style: italic;
    border-bottom: 2px solid var(--sb-stat-block-divider, #bc0f0f);
    padding: 5px 0;
  }

  p:nth-child(odd) {
    margin-top: 12px;
  }

  .monster-stats,
  .monster--stats {
    display: grid;
    grid-auto-flow: column;
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    grid-template-areas:
      "STR-a DEX-a CON-a"
      "STR-b DEX-b CON-b"
      "INT-a WIS-a CHA-a"
      "INT-b WIS-b CHA-b";
    border-top: 2px solid var(--sb-stat-block-divider, #bc0f0f);
    border-bottom: 2px solid var(--sb-stat-block-divider, #bc0f0f);
    text-align: center;
    align-items: center;
    margin: 12px 6px 12px 0;
    padding: 0 12px 8px 0;

    p {
      font-size: 15px;
      margin: 3px 0 5px;

      &:nth-child(odd) {
        margin-top: 12px;
        font-weight: bold;
        text-transform: uppercase;
        margin-bottom: 5px;
      }
      &:nth-of-type(1) {
        grid-area: STR-a;
      }
      &:nth-of-type(3) {
        grid-area: DEX-a;
      }
      &:nth-of-type(5) {
        grid-area: CON-a;
      }
      &:nth-of-type(7) {
        grid-area: INT-a;
      }
      &:nth-of-type(9) {
        grid-area: WIS-a;
      }
      &:nth-of-type(11) {
        grid-area: CHA-a;
      }
      &:nth-of-type(2) {
        grid-area: STR-b;
      }
      &:nth-of-type(4) {
        grid-area: DEX-b;
      }
      &:nth-of-type(6) {
        grid-area: CON-b;
      }
      &:nth-of-type(8) {
        grid-area: INT-b;
      }
      &:nth-of-type(10) {
        grid-area: WIS-b;
      }
      &:nth-of-type(12) {
        grid-area: CHA-b;
      }
    }
  }

  .monster-stats p:nth-child(odd),
  .monster--stats p:nth-child(odd) {
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px !important;
  }

  .monster-data-last::after,
  .monster--data-last::after {
    content: "";
    display: block;
    border-bottom: 2px solid var(--sb-stat-block-divider, #bc0f0f);
    padding: 0 0 8px;
  }
  .monster-action-header,
  .monster--action-header {
    font-size: 16px;
    font-weight: 700;
    font-family: "Roboto Condensed", Roboto, Helvetica, sans-serif;
    padding-top: 4px;
    border-bottom: 1px solid var(--sb-stat-block-divider, #bc0f0f);
  }
  .monster-data-last strong + strong,
  .monster--data-last strong + strong {
    margin-left: 12px;
  }
}

.ddb .text-rules-sidebar + figure.compendium-art,
.ddb .text--rules-sidebar + figure.compendium-art {
  padding-top: 1.5rem;
}

.ddb .text-rules-sidebar,
.ddb .text--rules-sidebar {
  background-color: var(--compendium-rules-sidebar-color, #DAE4C1); /*Fallback: if the variable isn't declared, it'll default to pale-green*/
  color: var(--theme-page-fg-color, #242527);
  overflow: visible;
  margin: 30px 5px;
  padding: 15px 28px 15px 30px;
  border-radius: 0;
  border-top: 3px solid #231f20;
  border-bottom: 3px solid #231f20;
  border-left: 1.5px solid  #b3b3b3;
  border-right: 1.5px solid  #b3b3b3;
  filter: drop-shadow(0px 5px 8px #ccc);
}

.ddb .text-rules-sidebar p:first-child,
.ddb .text--rules-sidebar p:first-child {
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1.16rem;
}

.ddb .text-rules-sidebar p ,
.ddb .text--rules-sidebar p {
  font-size: 0.96rem;
}

.ddb .text-rules-sidebar p+p,
.ddb .text-quote-box p+p,
.ddb .text--rules-sidebar p+p,
.ddb .text--quote-box p+p {
  margin-block-start: 0.45rem;
}

.ddb .text-rules-sidebar a:hover,
.ddb .text-rules-sidebar a:focus,
.ddb .text--rules-sidebar a:hover,
.ddb .text--rules-sidebar a:focus {
  text-decoration: underline;
}

.ddb .text-rules-sidebar::before,
.ddb .text--rules-sidebar::before {
  top: -13px;
  right: 0.1px;
  left: 0.1px;
}

.ddb .text-rules-sidebar::before,
.ddb .text--rules-sidebar::before {
  content: '';
  background-image: url("modules/ddb-importer/img/svg-rules-banner-4.svg"),url("modules/ddb-importer/img/svg-rules-banner-3.svg");
  background-position: left, right;
  background-size: contain;
  background-repeat: no-repeat;
  height: 11px;
  position: absolute;
  z-index: -1;
}

.ddb .text-rules-sidebar::after,
.ddb .text--rules-sidebar::after {
  bottom: -13px;
  right: -0.1px;
  left: 0.1px;
}

.ddb .text-rules-sidebar::after,
.ddb .text--rules-sidebar::after {
  content: '';
  background-image: url("modules/ddb-importer/img/svg-rules-banner-4.svg"),url("modules/ddb-importer/img/svg-rules-banner-3.svg");
  background-position: left, right;
  background-size: contain;
  background-repeat: no-repeat;
  height: 11px;
  position: absolute;
  z-index: -1;
  transform: scaleY(-1);
}

.monster-stat-block.mcdm-statblock,
.monster--stat-block.mcdm-statblock {
  --stat-block-divider: var(--mcdm-primary);
  --stat-block-scrollbar: url("https://media.dndbeyond.com/compendium-images/fm/ui/mcdm-stat-bar.png");
  --stat-block-header-size: 1.294rem;
  --stat-block-bg-override: #f9f9f9;
  font-family: "Roboto";
}
.monster-stat-block.mcdm-statblock .monster-stats p:nth-child(odd),
.monster--stat-block.mcdm-statblock .monster--stats p:nth-child(odd) {
  color: var(--mcdm-primary);
}
.monster-stat-block.mcdm-statblock .monster-action-header,
.monster--stat-block.mcdm-statblock .monster--action-header {
  font-family: "Roboto Condensed";
  color: var(--mcdm-primary);
}
.monster-stat-block.mcdm-statblock p:first-of-type:not(.monster-stats p:first-of-type),
.monster--stat-block.mcdm-statblock p:first-of-type:not(.monster--stats p:first-of-type) {
  border-bottom: unset;
  padding-bottom: unset;
  margin-bottom: 6px;
}
.monster-stat-block.mcdm-statblock .mon-data,
.monster--stat-block.mcdm-statblock .mon-data {
  display: grid;
  grid-template-columns: 0.9fr 0.7fr;
  grid-template-rows: 0.5fr 0.5fr;
  border-bottom: 2px solid var(--stat-block-divider, #bc0f0f);
  justify-content: space-between;
  grid-template-areas: "header header mon-role" "metadata metadata xp";
}
.monster-stat-block.mcdm-statblock .mon-data :is(h2, h3, h4, h5),
.monster--stat-block.mcdm-statblock .mon-data :is(h2, h3, h4, h5) {
  grid-area: header;
  margin-block: unset;
}
.monster-stat-block.mcdm-statblock :is(h2, h3, h4, h5):not(a),
.monster--stat-block.mcdm-statblock :is(h2, h3, h4, h5):not(a) {
  --theme-page-fg-color: #204d4cba;
}
.monster-stat-block.mcdm-statblock .mon-data p:nth-of-type(1),
.monster--stat-block.mcdm-statblock .mon-data p:nth-of-type(1) {
  grid-area: metadata;
  text-wrap: balance;
}
.monster-stat-block.mcdm-statblock .mon-data p:nth-of-type(2),
.monster--stat-block.mcdm-statblock .mon-data p:nth-of-type(2) {
  grid-area: mon-role;
  text-align: right;
  margin-bottom: 0;
  align-self: center;
  font-size: 0.882rem;
}
.monster-stat-block.mcdm-statblock .mon-data p:nth-of-type(3),
.monster--stat-block.mcdm-statblock .mon-data p:nth-of-type(3) {
  grid-area: xp;
  text-align: right;
  font-size: 0.882rem;
  align-self: start;
  margin-top: -3px;
}
.monster-stat-block.mcdm-statblock .mon-data + p,
.monster--stat-block.mcdm-statblock .mon-data + p {
  padding-top: 10px;
  font-style: revert !important;
}
.monster-stat-block.mcdm-statblock::before, .monster-stat-block.mcdm-statblock::after,
.monster--stat-block.mcdm-statblock::before, .monster--stat-block.mcdm-statblock::after {
  left: -3px;
  right: -3px;
  height: 11px;
  background-repeat: no-repeat;
}
.monster-stat-block.mcdm-statblock::after,
.monster--stat-block.mcdm-statblock::after {
  transform: scaleY(-1);
}
.flexible-double-column .monster-stat-block.mcdm-statblock,
.flexible-double-column .monster--stat-block.mcdm-statblock {
  --stat-block-scrollbar: url("https://media.dndbeyond.com/compendium-images/fm/ui/stat-block-wide.svg");
}
@media (max-width: 760px) {
  .monster-stat-block.mcdm-statblock,
  .monster--stat-block.mcdm-statblock {
      --stat-block-scrollbar: url("https://media.dndbeyond.com/compendium-images/fm/ui/stat-block-wide.svg");
  }
}

.monster-stat-block.mcdm-statblock + .monster-stat-block.mcdm-statblock,
.monster--stat-block.mcdm-statblock + .monster--stat-block.mcdm-statblock {
  margin-top: 1.5rem
}

.text-rules-sidebar.mcdm-sidebar,
.text--rules-sidebar.mcdm-sidebar {
  border-color: var(--mcdm-primary);
  border-width: 5px;
  max-width: 600px;
  margin: 30px auto;
  padding: 18px 20px;
  filter: drop-shadow(0 3px 5px #ccc);
}
.text-rules-sidebar.mcdm-sidebar::after,
.text--rules-sidebar.mcdm-sidebar::after {
  all: unset;
}
.text-rules-sidebar.mcdm-sidebar p:first-of-type,
.text--rules-sidebar.mcdm-sidebar p:first-of-type {
  color: var(--mcdm-primary);
  font-size: 1.176rem;
}
.text-rules-sidebar.mcdm-sidebar p:first-of-type + p,
.text--rules-sidebar.mcdm-sidebar p:first-of-type + p {
  margin-top: 8px !important;
}
.text-rules-sidebar.mcdm-sidebar::before,
.text--rules-sidebar.mcdm-sidebar::before {
  content: "";
  background-image: url("https://media.dndbeyond.com/compendium-images/fm/ui/sidebar-border.svg");
  background-position: 0, 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: 15px;
  top: -10px;
  left: -7px;
  right: -7px;
}

:is(.mcdm-epigraph, .mcdm-epigraph-red) {
  margin-bottom: 20px;
  line-height: 24px;
}
:is(.mcdm-epigraph, .mcdm-epigraph-red) p {
  color: var(--theme-page-fg-color);
  margin-bottom: 0;
  font-style: italic;
}
:is(.mcdm-epigraph, .mcdm-epigraph-red) p + p {
  margin-top: 8px;
}
:is(.mcdm-epigraph, .mcdm-epigraph-red) p:last-of-type {
  text-align: right;
  font-style: normal;
  font-variant: small-caps;
  font-size: 1.059rem;
}

.mcdm-epigraph-red p:not(:last-of-type) {
  --theme-page-fg-color: #6b2424;
}

.ddb .stat-block {
  --sb-monster-header-underline: #7a3c2f;
  border: 1px solid #a7a3a0;
  background-color: #fefcef;
  padding: 10px;
  position: relative;
  background-repeat: no-repeat;
  box-shadow: 0 5px 8px 0 var(--sb-stat-block-shadow, #aaa);
  background-position: top;
  background: var(--sb-stat-block-bg-override, #f6f3ee);
  font-size: 16px;
  line-height: 19.6px;
  border-radius: 8px;
  outline: 1px solid #a7a3a0;
  outline-offset: -4px;
  font-family: var(--sb-stat-block-font, Roboto, Helvetica, sans-serif);
  columns: 2 384px;

  :is(h2, h3, h4, h5) {
    font-size: 22px;
    font-family: "Roboto Condensed";
    text-transform: uppercase;
    font-weight: bold;
    margin-right: 8px;
    margin-block-start: 0.45rem;
    margin-block-end: 0;

    &::after {
      content: "";
      display: block;
      width: 100%;
      margin: 2px auto 8px;
      height: 1px;
      background: var(--sb-monster-header-underline, #7a3c2f);
      column-span: all;
    }
  }

  p {
    break-inside: avoid;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 0;

    + p {
      margin-top: 10px;
    }
  }

  p:first-of-type {
    margin-top: 0;
    font-style: italic;
    opacity: 0.7;

    + p {
      margin-top: 16px;
    }
  }

  :is(ol, ul, dl) {
    margin-bottom: 0;
    padding-top: 0;
  }

  .monster-header {
    padding-top: 4px;
    letter-spacing: 0.35px;
    font-weight: 500;
    color: var(--sb-monster-header-color, #5b160c);
    font-size: var(--sb-monster-trait-header-size, 18px);
    font-family: var(
      --sb-monster-trait-header-font,
      "Roboto Condensed",
      Helvetica,
      sans-serif
    );
    border-bottom: 2px solid var(--sb-monster-header-underline, #7a3c2f);

    + p {
      break-before: avoid;
    }
  }

  .stats {
    display: flex;
    gap: 10px;

    table.abilities-saves {
      --sb-theme-table-row-color: transparent;
      flex: 1 1 auto;
      line-height: 24px;
      background: revert;
      border: none;
      font-size: 14px;
      break-inside: avoid;

      &.physical {
        --sb-stats-score: #ede6d9;
        --sb-stats-mods: #ded4cc;
        --sb-stats-score-hover: #997f6d7d;
        --sb-stats-mods-hover: #996d727d;
      }

      &.mental {
        --sb-stats-score: #d8dad1;
        --sb-stats-mods: #d0caca;
        --sb-stats-score-hover: #6d8d997d;
        --sb-stats-mods-hover: #756d997d;
      }

      thead {
        border: none;
        height: revert;
        min-height: 45px;

        tr {
          height: revert;
          min-height: 45px;
        }

        tr th {
          padding: 5px 2px 0 !important;
          background: inherit;
          color: inherit;
          vertical-align: bottom;
          border: none;
          text-transform: uppercase;
          font-weight: 500;
          font-size: 14px;
        }
      }

      tbody {
        border: none;

        tr {
          background-color: var(--sb-theme-table-row-color, #fdfdfd);
          color: var(--sb-theme-table-header-fg-color, #222);

          &:hover {
            background-color: var(--sb-stats-hover);

            *:nth-child(-n + 3) {
              background-color: var(--sb-stats-score-hover);
            }

            *:nth-child(n + 3) {
              background-color: var(--sb-stats-mods-hover);
            }
          }

          *:nth-child(-n + 3) {
            background-color: var(--sb-stats-score);
          }

          *:nth-child(n + 3) {
            background-color: var(--sb-stats-mods);
          }
        }

        th {
          text-transform: uppercase;
          font-weight: bold;
          border: none;
          padding-left: 3px;
          font-size: 15px;
        }

        td {
          min-width: revert;
          padding: 5px 6px !important;
          border: none;
          font-size: 15px;
        }
      }

      tr :is(th, td) {
        transition: 0.3s;
      }
    }
  }

  p:nth-of-type(2) strong + strong {
    margin-left: 30px;
  }
}

.ddb figure .artist-credit,
.ddb figure .artist-credit-left,
.ddb figure .artist-credit-right {
  display:block;
  text-transform:uppercase;
  font-size:10px;
  font-weight:600;
  color:#565a62
}
.ddb figure .artist-credit-left:before,
.ddb figure .artist-credit-right:before,
.ddb figure .artist-credit:before {
  content:"Artist: "
}
.ddb figure .artist-credit-left,
.ddb figure.compendium-art-left .artist-credit {
  text-align:start;
  left:0;
  top:-36px
}
.ddb figure .artist-credit-right,
.ddb figure.compendium-art-center .artist-credit,
.ddb .figure.compendium-art-right .artist-credit {
  text-align:end;
  right:0;
  top:-36px
}
