
body {
  font-family: "Lato", sans-serif;
  background: #f3f4f6;
}

.dprd-creature-card {
  max-width: 58rem;
  color: #2f261b;
  line-height: 1.35;
}

.dprd-creature-image {
  display: block;
  width: 100%;
  max-height: 18rem;
  object-fit: cover;
  border-radius: 0.8rem;
  border: 1px solid rgba(140, 104, 56, 0.22);
  box-shadow: 0 10px 24px rgba(78, 44, 20, 0.12);
}

.dprd-creature-image-standalone {
  background: rgba(255, 255, 255, 0.5);
}

.dprd-creature-family {
  border: 1px solid rgba(188, 146, 79, 0.35);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.9), rgba(244, 235, 220, 0.92)),
    repeating-linear-gradient(135deg, rgba(121, 91, 56, 0.03) 0 2px, rgba(255, 255, 255, 0) 2px 8px);
}

.dprd-creature-family-name {
  color: #8c2f14;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dprd-creature-family-text {
  margin-top: 0.35rem;
  color: #4c3c2a;
  font-size: 0.96rem;
}

.dprd-creature-header {
  color: #2f261b;
  letter-spacing: 0.02em;
  padding-bottom: 0.2rem;
}

.dprd-creature-section {
  margin-bottom: 0.4rem;
  padding-bottom: 0.3rem;
}

.dprd-creature-section-title {
  margin-bottom: 0.2rem;
  color: #6f1d12;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dprd-creature-line,
.dprd-creature-subline {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  margin-bottom: 0.14rem;
}

.dprd-creature-attack {
  padding: 0.15rem 0 0.12rem;
  border-bottom: 1px dotted rgba(101, 74, 42, 0.18);
}

.dprd-creature-subline {
  margin-left: 1.05rem;
  color: #433525;
}

.dprd-creature-highlight-block {
  margin-top: 0.15rem;
  padding: 0.2rem 0.45rem;
  border-left: 3px solid rgba(140, 47, 20, 0.45);
  background: rgba(140, 47, 20, 0.05);
}

.dprd-creature-label,
.dprd-creature-sublabel,
.dprd-creature-inline-title,
.dprd-creature-ability-key {
  font-weight: 800;
  color: #2b2016;
}

.dprd-creature-label {
  flex: 0 0 auto;
  min-width: 6.1rem;
  color: #2b2016;
}

.dprd-creature-sublabel {
  margin-right: 0.2rem;
}

.dprd-creature-abilities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.15rem 0;
}

.dprd-creature-ability-key {
  letter-spacing: 0.03em;
}

.dprd-creature-entry {
  margin-top: 0.55rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(101, 74, 42, 0.14);
}

.dprd-creature-subentry {
  margin-top: 0.4rem;
  padding: 0.3rem 0 0 0.75rem;
  border-left: 3px solid rgba(101, 74, 42, 0.18);
}

.dprd-creature-entry-head {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dprd-creature-meta {
  color: #57402e;
}

.dprd-creature-body-text {
  margin-top: 0.1rem;
  color: #433525;
}

.dprd-creature-critblock {
  margin-top: 0.18rem;
}

@media (max-width: 640px) {
  .dprd-creature-card {
    max-width: 100%;
  }

  .dprd-creature-line,
  .dprd-creature-subline {
    display: block;
  }
}

.growCardDiv {
  -moz-transition: height .5s;
  -ms-transition: height .5s;
  -o-transition: height .5s;
  -webkit-transition: height .5s;
  transition: height .5s;
  height: 0;
  overflow: hidden;
}



.w3c_example {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.w3c_example td, .w3c_example th {
  border: 1px solid #FAF4E8;
  padding: 8px;
  text-align: center;
}

.w3c_example tr:nth-child(even){background-color: #F5E9CF;}
.w3c_example tr:nth-child(odd){background-color: #FAF4E8;}

.w3c_example tr:hover {background-color: #cca00075;}

.w3c_example th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: center;
  background-color: #5A0900;
  color: white;
}

.dprd-sidebar {
  position: relative;
}

.dprd-sidebar,
.dprd-main-column {
  min-width: 0;
}

.dprd-sidebar-panel {
  position: relative;
  border: 1px solid #b79259;
  border-radius: 18px;
  padding: 1rem 0.9rem 1.1rem;
  background:
    linear-gradient(180deg, rgba(122, 29, 19, 0.08), rgba(255, 252, 245, 0.99) 10%, rgba(243, 235, 220, 1) 100%),
    repeating-linear-gradient(135deg, rgba(121, 91, 56, 0.035) 0 2px, rgba(255, 255, 255, 0) 2px 8px),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 42%);
  box-shadow:
    0 14px 34px rgba(78, 44, 20, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 0 0 1px rgba(120, 82, 44, 0.1);
}

.dprd-sidebar-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(120, 82, 44, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 28%);
  pointer-events: none;
}

.dprd-sidebar-panel::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 12px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(122, 29, 19, 0.95), rgba(182, 122, 42, 0.9), rgba(122, 29, 19, 0.95));
  opacity: 0.65;
  pointer-events: none;
}

.dprd-sidebar-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.dprd-sidebar-heading-rule {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 21, 14, 0.55), transparent);
}

.dprd-sidebar-title {
  margin: 0;
  color: #641a12;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-family: Georgia, "Times New Roman", serif;
}

.dprd-sidebar-list,
.dprd-nav-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dprd-nav-item {
  margin-bottom: 0.24rem;
}

.dprd-nav-item-root {
  margin-bottom: 0.46rem;
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-row {
  border: 1px solid rgba(125, 89, 48, 0.28);
  background:
    linear-gradient(180deg, rgba(250, 243, 228, 0.99), rgba(236, 224, 198, 0.99)),
    repeating-linear-gradient(90deg, rgba(145, 109, 62, 0.045) 0 1px, rgba(255, 255, 255, 0) 1px 10px);
  box-shadow:
    0 2px 6px rgba(105, 74, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-row:hover {
  background: linear-gradient(180deg, rgba(251, 244, 229, 1), rgba(241, 231, 210, 1));
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-row-current {
  border-color: rgba(122, 29, 19, 0.56);
  background: linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
  box-shadow:
    0 6px 12px rgba(94, 25, 17, 0.18),
    inset 0 1px 0 rgba(255, 241, 219, 0.18);
}

.dprd-nav-link-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 10px;
  padding: 0.08rem 0.12rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.dprd-nav-link-row:hover {
  background: rgba(120, 21, 14, 0.08);
}

.dprd-nav-link {
  position: relative;
  display: block;
  flex: 1 1 auto;
  border-radius: 8px;
  padding: 0.42rem 0.62rem;
  color: #4f3a25;
  text-decoration: none;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.dprd-nav-link:hover {
  color: #4e100a;
  background: rgba(255, 255, 255, 0.5);
  transform: translateX(2px);
}

.dprd-nav-link-parent {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-parent,
.dprd-nav-item-root > .dprd-nav-link-leaf {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.69rem;
  font-weight: 800;
  color: #671a12;
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-parent::before,
.dprd-nav-item-root > .dprd-nav-link-leaf::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28rem;
  bottom: 0.28rem;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #6d1810, #b6762f);
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-parent.dprd-nav-link-current,
.dprd-nav-item-root > .dprd-nav-link-leaf.dprd-nav-link-current,
.dprd-nav-item-child .dprd-nav-link.dprd-nav-link-current {
  color: #fff7ea;
  text-shadow: 0 1px 1px rgba(45, 9, 5, 0.3);
}

.dprd-nav-item-root > .dprd-nav-link-leaf {
  border: 1px solid rgba(125, 89, 48, 0.28);
  background:
    linear-gradient(180deg, rgba(250, 243, 228, 0.99), rgba(236, 224, 198, 0.99)),
    repeating-linear-gradient(90deg, rgba(145, 109, 62, 0.045) 0 1px, rgba(255, 255, 255, 0) 1px 10px);
  box-shadow:
    0 2px 6px rgba(105, 74, 38, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.dprd-nav-item-root > .dprd-nav-link-leaf.dprd-nav-link-current {
  border-color: rgba(122, 29, 19, 0.56);
  color: #fff7ea;
  background: linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
  box-shadow:
    0 6px 12px rgba(94, 25, 17, 0.18),
    inset 0 1px 0 rgba(255, 241, 219, 0.18);
}

.dprd-nav-item-child .dprd-nav-link.dprd-nav-link-current {
  border-color: rgba(122, 29, 19, 0.42);
  background: linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
  box-shadow:
    0 5px 10px rgba(94, 25, 17, 0.16),
    inset 0 1px 0 rgba(255, 241, 219, 0.16);
}

.dprd-nav-link-leaf {
  font-size: 0.8rem;
  font-weight: 600;
}

.dprd-nav-link-current,
.dprd-nav-link-row-current .dprd-nav-link {
  color: #fff7ea;
  background:
    linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
  box-shadow:
    0 8px 16px rgba(94, 25, 17, 0.28),
    inset 0 1px 0 rgba(255, 241, 219, 0.18);
  text-shadow: 0 1px 1px rgba(45, 9, 5, 0.3);
}

.dprd-nav-link-current:hover,
.dprd-nav-link-row-current .dprd-nav-link:hover {
  color: #fff9ef;
  transform: none;
  background:
    linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-parent:hover,
.dprd-nav-item-root > .dprd-nav-link-leaf:hover {
  background: transparent;
}

.dprd-nav-link-row-current:hover {
  background: linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-link-parent.dprd-nav-link-current:hover,
.dprd-nav-item-root > .dprd-nav-link-leaf.dprd-nav-link-current:hover {
  color: #fff9ef;
  background: linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
}

.dprd-nav-item-child .dprd-nav-link.dprd-nav-link-current:hover {
  color: #fff9ef;
  background: linear-gradient(135deg, #7a1d13 0%, #5b110a 58%, #8b4b1e 100%);
}

.dprd-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  color: #6a4a2b;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dprd-nav-link-row:hover .dprd-nav-toggle {
  background: rgba(120, 21, 14, 0.08);
  color: #63170f;
}

.dprd-nav-link-row-current .dprd-nav-toggle {
  color: #f0d4aa;
}

.dprd-nav-item-root > .nav_tree_parent_wrapper > .nav_tree_parent .dprd-nav-toggle {
  width: 2.15rem;
  height: 2.15rem;
}

.dprd-nav-toggle-icon {
  width: 1rem;
  height: 1rem;
}

.dprd-nav-children {
  position: relative;
  margin: 0.14rem 0 0.22rem 0.48rem;
  padding: 0.3rem 0 0 0.78rem;
  border-left: 1px solid rgba(138, 102, 58, 0.15);
}

.dprd-nav-children::before {
  content: "";
  position: absolute;
  left: 0.12rem;
  top: 0.1rem;
  bottom: 0.35rem;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(130, 92, 48, 0.5), rgba(130, 92, 48, 0.06));
}

.dprd-nav-item-child .dprd-nav-link {
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
  border: 1px solid rgba(126, 94, 57, 0);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.76), rgba(248, 242, 229, 0.72));
  color: #4a3723;
}

.dprd-nav-item-child .dprd-nav-link:hover {
  border-color: rgba(141, 102, 60, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(245, 237, 221, 0.92));
}

@media (max-width: 1023px) {
  .dprd-sidebar {
    background:
      linear-gradient(180deg, rgba(255, 249, 239, 0.98), rgba(244, 235, 219, 0.98));
  }

  .dprd-sidebar-panel {
    margin-bottom: 1rem;
  }
}

@media (min-width: 1024px) {
  #sidebar {
    width: 17rem;
    flex: 0 0 17rem;
  }

  .dprd-main-column {
    width: calc(100% - 17rem);
    flex: 1 1 auto;
  }
}

.dprd-inline-edit {
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(101, 74, 42, 0.35);
  font: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  outline: none;
}

.dprd-inline-edit:focus {
  border-bottom: 1px solid #8c2f14;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
}

textarea.dprd-inline-edit {
  width: 100%;
  resize: vertical;
}

select.dprd-inline-edit {
  border-radius: 3px;
  border: 1px solid rgba(101, 74, 42, 0.28);
  background-color: rgba(255, 255, 255, 0.6);
  padding: 0.1rem 0.25rem;
}

.dprd-inline-edit-dark {
  color: #ffffff !important;
  background-color: rgba(0, 0, 0, 0.25) !important;
  border-radius: 3px;
  padding: 0 4px;
  text-align: right;
}

.dprd-inline-edit-dark:focus {
  background-color: rgba(0, 0, 0, 0.5) !important;
  border-bottom: 1px solid #ffaa66 !important;
}

/* Custom positioning for editor elements to bypass Tailwind purge */
.dprd-relative {
  position: relative !important;
}

.dprd-absolute {
  position: absolute !important;
}

.dprd-pr-delete {
  padding-right: 2.2rem !important; /* for single character ❌ buttons */
}

.dprd-pr-delete-large {
  padding-right: 9rem !important; /* for "Tradition löschen" / "Aktion löschen" buttons */
}

.dprd-delete-btn-centered {
  position: absolute !important;
  right: 0.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  z-index: 10 !important;
}

.dprd-delete-btn-top {
  position: absolute !important;
  right: 0.5rem !important;
  top: 0.5rem !important;
  margin: 0 !important;
  z-index: 10 !important;
}

/* Allow edit textareas/fields inside lines to expand and take full width */
.dprd-creature-value {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
}



/* Responsive container for creature card and side image */
.dprd-creature-wrapper {
  display: block;
  max-width: 100%;
}

@media (min-width: 1024px) {
  .dprd-creature-wrapper {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 1.5rem;
  }
}

/* Centered Bestiary-style image container inside the creature card for mobile/tablets */
.dprd-creature-card-image-box {
  max-width: 24rem;
  background: rgba(255, 252, 245, 0.95);
  border: 1px solid rgba(188, 146, 79, 0.35);
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(78, 44, 20, 0.08);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dprd-creature-card-image-box:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(78, 44, 20, 0.14);
}

.dprd-creature-card-image-box.hidden {
  display: none !important;
}

.dprd-creature-card-image {
  width: 100%;
  height: auto;
  max-height: 16rem;
  object-fit: contain;
  border-radius: 0.5rem;
  background: transparent;
}

.dprd-creature-card-header {
  cursor: pointer;
}

/* Large screen sticky sidebar image */
.dprd-creature-side-container {
  display: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) {
  .dprd-creature-side-container {
    display: block;
    position: -webkit-sticky;
    position: sticky;
    top: 7rem; /* 112px, below standard header */
    width: 20rem; /* 320px */
    flex-shrink: 0;
    background: rgba(255, 252, 245, 0.95);
    border: 1px solid rgba(188, 146, 79, 0.35);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    padding: 0.75rem;
  }

  .dprd-creature-side-container:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  }
}

.dprd-creature-side-container.hidden {
  display: none !important;
}

.dprd-creature-side-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  max-height: 80vh;
}

/* Cursor and interactive styles */
.cursor-zoom-in {
  cursor: zoom-in;
}

.cursor-zoom-out {
  cursor: zoom-out;
}

/* Force inline image inside the card and hide the sidebar image in import/preview mode */
.dprd-import-mode .dprd-creature-wrapper {
  display: block !important;
}

.dprd-import-mode .dprd-creature-card-image-box {
  display: block !important;
  margin-top: 1rem;
}

.dprd-import-mode .dprd-creature-card-image-box.hidden {
  display: none !important;
}

.dprd-import-mode .dprd-creature-side-container {
  display: none !important;
}

/* Lightbox overlay and close button styles (using Vanilla CSS for glassmorphism / layout fallback) */
.fixed.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Watermark illustration inside the creature card background */
.dprd-creature-watermark {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: multiply;
}

/* Split grid for side-by-side preview and editor */
.dprd-creature-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .dprd-creature-split-grid.active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* =============================================
   CREATURE LIST PAGE
   ============================================= */

/* --- Creature card in the list --- */
.dprd-creature-list-card {
  position: relative;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.95), rgba(244, 235, 220, 0.95));
  border: 1px solid rgba(188, 146, 79, 0.35);
  border-radius: 0.625rem;
  cursor: pointer;
  transition:
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.22s ease;
  box-shadow:
    0 2px 6px rgba(78, 44, 20, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dprd-creature-list-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(78, 44, 20, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border-color: rgba(188, 146, 79, 0.55);
}

.dprd-creature-list-card.is-open {
  cursor: default;
  border-color: rgba(122, 29, 19, 0.4);
  box-shadow:
    0 6px 18px rgba(78, 44, 20, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: none;
}

/* --- Rarity bar (left edge) --- */
.dprd-creature-list-rarity-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 0.625rem 0 0 0.625rem;
}

.dprd-creature-list-rarity-bar.rarity-uncommon {
  background: #c45e00;
}

.dprd-creature-list-rarity-bar.rarity-rare {
  background: #0c1466;
}

.dprd-creature-list-rarity-bar.rarity-unique {
  background: #800080;
}

/* --- Stat badge (AC / HP / saves) --- */
.dprd-creature-list-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.42rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff7ea;
  background: linear-gradient(135deg, #5A0900 0%, #7a1d13 100%);
  box-shadow: 0 1px 2px rgba(90, 9, 0, 0.18);
  white-space: nowrap;
}

.dprd-creature-list-stat-badge .stat-label {
  opacity: 0.75;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- Trait tag pills --- */
.dprd-creature-list-trait-tag {
  display: inline-block;
  padding: 0.06rem 0.45rem;
  border: 2px solid #E0C984;
  border-top: none;
  border-radius: 0 0 0.25rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #f7fafc;
  background: #5A0900;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.dprd-creature-list-trait-tag.trait-uncommon {
  background: #c45e00;
}

.dprd-creature-list-trait-tag.trait-rare {
  background: #0c1466;
}

.dprd-creature-list-trait-tag.trait-unique {
  background: #800080;
}

/* --- Filter panel container --- */
.dprd-creature-list-filter-panel {
  position: relative;
  border: 1px solid rgba(188, 146, 79, 0.35);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem 0.6rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.97), rgba(244, 235, 220, 0.97));
  box-shadow:
    0 4px 12px rgba(78, 44, 20, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  margin-bottom: 0.75rem;
  width: 100%;
}

/* --- Result count bar --- */
.dprd-creature-list-result-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.5rem;
  margin-bottom: 1rem;
  color: #4a3728;
  font-size: 0.85rem;
  font-weight: 700;
  width: 100%;
}

.dprd-creature-list-result-count button {
  padding: 0.2rem 0.75rem;
  border-radius: 0.375rem;
  background: #fcfaf2;
  color: #5A0900;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(188, 146, 79, 0.4);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.18s ease;
}

.dprd-creature-list-result-count button:hover {
  background: #5A0900;
  color: #fff7ea;
  border-color: #5A0900;
}

/* --- Empty state --- */
.dprd-creature-list-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #6a4a2b;
  font-size: 1.05rem;
  font-style: italic;
}

/* --- Thumbnail --- */
.dprd-creature-list-thumbnail {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 1px solid rgba(188, 146, 79, 0.25);
  background: rgba(255, 252, 245, 0.6);
}

/* --- Filter section (collapsible) --- */
.dprd-filter-section {
  border-bottom: 1px solid rgba(188, 146, 79, 0.2);
  padding: 0.35rem 0;
}

.dprd-filter-section:last-child {
  border-bottom: none;
}

.dprd-filter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.3rem 0.25rem;
  border-radius: 0.35rem;
  transition: background 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.dprd-filter-section-header:hover {
  background: rgba(188, 146, 79, 0.1);
}

.dprd-filter-section-header .chevron-icon {
  width: 0.85rem;
  height: 0.85rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  fill: #6a4a2b;
  flex-shrink: 0;
}

.dprd-filter-section-header.is-open .chevron-icon {
  transform: rotate(180deg);
}

.dprd-filter-section-header .section-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4c3c2a;
  letter-spacing: 0.02em;
}

/* --- Toggle buttons for filter options --- */
.dprd-filter-toggle-btn {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  margin: 0.15rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dprd-filter-toggle-btn.active {
  background: #5A0900;
  color: #f7fafc;
}

.dprd-filter-toggle-btn.active:hover {
  background: #7a1d13;
  color: #fed7d7;
}

.dprd-filter-toggle-btn.inactive {
  background: #FAF5E8;
  color: #1a202c;
}

.dprd-filter-toggle-btn.inactive:hover {
  background: #F3E9D0;
  color: #276749;
}

/* --- Family select (searchable dropdown) --- */
.dprd-filter-family-select {
  position: relative;
}

.dprd-filter-family-select input {
  width: 100%;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(188, 146, 79, 0.35);
  border-radius: 0.4rem;
  background: #fff;
  font-size: 0.8rem;
  color: #2f261b;
  outline: none;
  transition: border-color 0.18s ease;
}

.dprd-filter-family-select input:focus {
  border-color: #8c2f14;
  box-shadow: 0 0 0 2px rgba(140, 47, 20, 0.12);
}

.dprd-filter-family-select .family-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  max-height: 12rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(188, 146, 79, 0.35);
  border-top: none;
  border-radius: 0 0 0.4rem 0.4rem;
  box-shadow: 0 6px 16px rgba(78, 44, 20, 0.14);
  z-index: 40;
}

.dprd-filter-family-select .family-dropdown-item {
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
  color: #2f261b;
  cursor: pointer;
  transition: background 0.12s ease;
}

.dprd-filter-family-select .family-dropdown-item:hover,
.dprd-filter-family-select .family-dropdown-item.is-selected {
  background: rgba(90, 9, 0, 0.08);
  color: #5A0900;
}

/* --- Level badge (top-right of card) --- */
.dprd-creature-list-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff7ea;
  background: linear-gradient(135deg, #5A0900, #8b4b1e);
  box-shadow: 0 2px 4px rgba(90, 9, 0, 0.2);
  letter-spacing: 0.02em;
  font-family: Georgia, "Times New Roman", serif;
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .dprd-creature-list-card {
    max-width: 100%;
  }
}

/* Allow expanded creature card blocks to take full width inside creature lists and search results */
.dprd-creature-list-card .dprd-creature-card,
#search_results .dprd-creature-card {
  max-width: 100%;
}

/* Custom background colors for size and alignment traits (both compact card and preview card) */
.dprd-creature-list-trait-tag.trait-size,
.bg-dprd-size {
  background: #15803d !important; /* Elegant green matching bg-green-700 */
}

.dprd-creature-list-trait-tag.trait-alignment,
.bg-dprd-alignment {
  background: #1e40af !important; /* Elegant blue matching bg-blue-800 */
}

@media (max-width: 767px) {
  .dprd-creature-list-card {
    border-radius: 0.45rem;
  }

  .dprd-creature-list-rarity-bar {
    border-radius: 0.45rem 0 0 0.45rem;
  }

  .dprd-creature-list-thumbnail {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
  }

  .dprd-creature-list-stat-badge {
    font-size: 0.62rem;
    padding: 0.08rem 0.3rem;
  }

  .dprd-creature-list-stat-badge .stat-label {
    font-size: 0.55rem;
  }
}


/* --- Mitarbeiter-Kommentarfunktion --- */

/* Comment visibility toggle in header */
.dprd-comment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.85);
  color: #718096;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.dprd-comment-toggle:hover {
  border-color: #fbd38d;
  color: #dd6b20;
  background: #fffaf0;
}

.dprd-comment-toggle.is-active {
  background: #fffaf0;
  border-color: #fbd38d;
  color: #dd6b20;
}

.dprd-comment-toggle svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
  flex-shrink: 0;
}

/* Toggle switch track */
.dprd-toggle-track {
  position: relative;
  width: 1.75rem;
  height: 1rem;
  border-radius: 9999px;
  background: #cbd5e0;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.dprd-comment-toggle.is-active .dprd-toggle-track {
  background: #dd6b20;
}

/* Toggle switch knob */
.dprd-toggle-track::after {
  content: '';
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dprd-comment-toggle.is-active .dprd-toggle-track::after {
  transform: translateX(0.75rem);
}

/* Wrapper block styles */
.content-block-wrapper {
  transition: background-color 0.2s ease;
}

/* Comment bubble button */
.dprd-comment-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #718096;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dprd-comment-indicator:hover {
  background-color: #fffffb;
  color: #dd6b20;
  border-color: #fbd38d;
  transform: scale(1.1);
}

.dprd-comment-indicator svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

/* Badge for existing comments count */
.dprd-comment-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  background-color: #dd6b20;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  min-width: 1.1rem;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Active indicator color when comments exist */
.dprd-comment-indicator.has-comments {
  color: #dd6b20;
  border-color: #fbd38d;
  background-color: #fffaf0;
}

/* Structured cards (creatures, spells, items, action_or_talent, hazard, background): position below header row, not overlapping level badge */
.content-block-wrapper[data-target-type="creature"] .dprd-comment-indicator,
.content-block-wrapper[data-target-type="spell"] .dprd-comment-indicator,
.content-block-wrapper[data-target-type="item"] .dprd-comment-indicator,
.content-block-wrapper[data-target-type="action_or_talent"] .dprd-comment-indicator,
.content-block-wrapper[data-target-type="hazard"] .dprd-comment-indicator,
.content-block-wrapper[data-target-type="background"] .dprd-comment-indicator {
  top: 2.8rem !important;
  right: 0.4rem !important;
}

/* Desktop positioning for comment indicator: float outside main column if enough screen space */
@media (min-width: 1024px) {
  .dprd-comment-indicator {
    opacity: 0;
    right: -2.5rem;
    top: 0.25rem;
  }

  .content-block-wrapper:not([data-target-type="content"]) .dprd-comment-indicator {
    right: 0.5rem;
    top: 0.5rem;
  }


  
  .content-block-wrapper:hover .dprd-comment-indicator,
  .dprd-comment-indicator:focus {
    opacity: 1;
  }

  .dprd-comment-indicator.has-comments {
    opacity: 1; /* Keep visible if comments exist */
  }
}



/* Toggle: hide all comment indicators when comments are toggled off */
body.dprd-comments-hidden .dprd-comment-indicator {
  display: none !important;
}

/* Comment Drawer / Bottom Sheet Container */
.dprd-comment-drawer-container {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  justify-content: flex-end; /* Drawer on the right by default */
}

/* Backdrop */
.dprd-comment-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 999;
}

.dprd-comment-drawer-container.is-open .dprd-comment-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* The actual drawer panel */
.dprd-comment-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background-color: #ffffff;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1), 0 -10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  z-index: 1000;
  border-top: 1px solid #e2e8f0;
}

/* Show state */
.dprd-comment-drawer-container.is-open .dprd-comment-drawer {
  transform: translateY(0);
}

/* Drawer handle for mobile swipe indicator */
.dprd-comment-drawer-handle {
  width: 3rem;
  height: 0.25rem;
  background-color: #cbd5e0;
  border-radius: 9999px;
  margin: 0.75rem auto 0.25rem auto;
}

/* Desktop layout overrides (lg: screen sizes) */
@media (min-width: 1024px) {
  .dprd-comment-drawer {
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: 26.5rem;
    max-height: 100vh;
    border-radius: 1rem 0 0 1rem;
    transform: translateX(100%);
    border-top: none;
    border-left: 1px solid #e2e8f0;
  }
  
  .dprd-comment-drawer-container.is-open .dprd-comment-drawer {
    transform: translateX(0);
  }
  
  .dprd-comment-drawer-handle {
    display: none;
  }
}

/* Drawer contents */
.dprd-comment-drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dprd-comment-drawer-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3748;
  font-family: Georgia, "Times New Roman", serif;
}

.dprd-comment-drawer-close {
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dprd-comment-drawer-close:hover {
  color: #4a5568;
  background-color: #edf2f7;
}

.dprd-comment-drawer-close svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* Comment list scrollable area */
.dprd-comment-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Single comment item */
.dprd-comment-item {
  background-color: #f7fafc;
  border: 1px solid #edf2f7;
  border-radius: 0.5rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.dprd-comment-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dprd-comment-item-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a5568;
}

.dprd-comment-item-date {
  font-size: 0.75rem;
  color: #a0aec0;
}

.dprd-comment-item-body {
  font-size: 0.9rem;
  color: #2d3748;
  line-height: 1.4;
  white-space: pre-wrap;
}

.dprd-comment-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.dprd-comment-action-btn {
  font-size: 0.75rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  transition: all 0.15s ease;
}

.dprd-comment-action-btn.edit {
  color: #4a5568;
}

.dprd-comment-action-btn.edit:hover {
  background-color: #e2e8f0;
  color: #1a202c;
}

.dprd-comment-action-btn.delete {
  color: #e53e3e;
}

.dprd-comment-action-btn.delete:hover {
  background-color: #fed7d7;
  color: #c53030;
}

/* Empty state comments */
.dprd-comments-empty {
  text-align: center;
  color: #a0aec0;
  padding: 2.5rem 1rem;
  font-size: 0.95rem;
  font-style: italic;
}

/* Editor Form area */
.dprd-comment-editor {
  padding: 1.25rem;
  border-top: 1px solid #edf2f7;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dprd-comment-editor-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #4a5568;
}

.dprd-comment-editor textarea {
  width: 100%;
  height: 5.5rem;
  min-height: 5.5rem;
  padding: 0.6rem;
  border: 1px solid #cbd5e0;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  color: #2d3748;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.dprd-comment-editor textarea:focus {
  border-color: #dd6b20;
  box-shadow: 0 0 0 3px rgba(221, 107, 32, 0.15);
}

.dprd-comment-editor-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dprd-comment-submit-btn {
  padding: 0.5rem 1rem;
  background-color: #dd6b20;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dprd-comment-submit-btn:hover {
  background-color: #c05621;
}

.dprd-comment-cancel-btn {
  padding: 0.5rem 1rem;
  background-color: #edf2f7;
  color: #4a5568;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dprd-comment-cancel-btn:hover {
  background-color: #e2e8f0;
}

/* --- In-place Creature Edit Mode --- */

.dprd-edit-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.85);
  color: #718096;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.dprd-edit-mode-toggle:hover {
  border-color: #fbd38d;
  color: #dd6b20;
  background: #fffaf0;
}

.dprd-edit-mode-toggle.is-active {
  background: #fffaf0;
  border-color: #fbd38d;
  color: #dd6b20;
}

.dprd-edit-mode-toggle svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
  flex-shrink: 0;
}

.dprd-edit-mode-toggle.is-active .dprd-toggle-track {
  background: #dd6b20;
}

.dprd-edit-mode-toggle.is-active .dprd-toggle-track::after {
  transform: translateX(0.75rem);
}

.dprd-edit-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #718096;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dprd-edit-indicator:hover {
  background-color: #fffffb;
  color: #dd6b20;
  border-color: #fbd38d;
  transform: scale(1.1);
}

.dprd-edit-indicator svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Position on structured creature card */
.content-block-wrapper[data-target-type="creature"] .dprd-edit-indicator {
  top: 2.8rem !important;
  right: 2.8rem !important;
}

/* Visibility based on body class toggle */
body.dprd-inplace-edit-active .dprd-edit-indicator {
  display: inline-flex;
}

/* Hide edit and comment indicators when card is collapsed in list view or already in edit mode */
.dprd-creature-list-card:not(.is-open) .dprd-edit-indicator,
[data-is-editing="true"] .dprd-edit-indicator,
[data-is-editing="true"] .dprd-comment-indicator {
  display: none !important;
}

@media (min-width: 1024px) {
  .dprd-edit-indicator {
    opacity: 0;
    right: -2.5rem;
    top: 2.75rem;
    display: none; /* hidden if toggle is off */
  }

  .content-block-wrapper:hover .dprd-edit-indicator,
  .dprd-edit-indicator:focus {
    opacity: 1;
  }
}

/* Inline Edit Field styles */
.dprd-inline-edit {
  border: 1px dashed #cbd5e0;
  background-color: #fcfcfc;
  padding: 0.12rem 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.15s ease;
}

.dprd-inline-edit:focus {
  border: 1px solid #dd6b20;
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(221, 107, 32, 0.1);
}

/* Edit Form Container & buttons */
.dprd-inplace-edit-container {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.dprd-inplace-edit-form {
  transition: all 0.2s ease-in-out;
}

/* --- Custom Pages & Selection Mode Styles --- */

/* Select Mode Toggle Button (Header & Sidebar Options) */
.dprd-select-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.85);
  color: #718096;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.dprd-select-mode-toggle:hover,
.dprd-select-mode-toggle.is-active {
  border-color: #fbd38d;
  color: #dd6b20;
  background: #fffaf0;
}

.dprd-select-mode-toggle svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
  flex-shrink: 0;
}

.dprd-select-mode-toggle.is-active .dprd-toggle-track {
  background: #dd6b20;
}

.dprd-select-mode-toggle.is-active .dprd-toggle-track::after {
  transform: translateX(0.75rem);
}

/* Select Mode Indicator "+" button on content wrappers */
.dprd-select-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0.5rem;
  right: 3rem; /* Placed left of the comment indicator */
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: #ffffff;
  color: #718096;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dprd-select-indicator:hover {
  background-color: #fffffb;
  color: #dd6b20;
  border-color: #fbd38d;
  transform: scale(1.1);
}

.dprd-select-indicator svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

/* Structured cards top position matching comment indicator */
.content-block-wrapper[data-target-type="creature"] .dprd-select-indicator,
.content-block-wrapper[data-target-type="spell"] .dprd-select-indicator,
.content-block-wrapper[data-target-type="item"] .dprd-select-indicator,
.content-block-wrapper[data-target-type="action_or_talent"] .dprd-select-indicator,
.content-block-wrapper[data-target-type="hazard"] .dprd-select-indicator,
.content-block-wrapper[data-target-type="background"] .dprd-select-indicator {
  top: 2.8rem !important;
  right: 2.8rem !important;
}

/* Desktop positioning details */
@media (min-width: 1024px) {
  .dprd-select-indicator {
    opacity: 0;
    right: -5rem;
    top: 0.25rem;
  }

  .content-block-wrapper:not([data-target-type="content"]) .dprd-select-indicator {
    right: 3rem;
    top: 0.5rem;
  }

  .content-block-wrapper:hover .dprd-select-indicator {
    opacity: 1;
  }
}

/* Display rules for selection mode active status */
body.dprd-select-mode-active .dprd-select-indicator {
  display: inline-flex !important;
}

body.dprd-select-mode-active .dprd-select-indicator {
  opacity: 1; /* Always visible on mobile/tablet when active */
}

@media (min-width: 1024px) {
  body.dprd-select-mode-active .dprd-select-indicator {
    opacity: 0; /* Hide by default on desktop, show only on hover */
  }
  body.dprd-select-mode-active .content-block-wrapper:hover .dprd-select-indicator {
    opacity: 1;
  }
}

body:not(.dprd-select-mode-active) .dprd-select-indicator {
  display: none !important;
}

/* Floating Selector Dropdown list */
.dprd-select-dropdown {
  animation: dprd-dropdown-enter 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dprd-dropdown-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Premium Toast Notification alert system */
.dprd-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #1e293b;
  color: #f8fafc;
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 4px 6px -4px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  max-width: 90vw;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dprd-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Drag-and-drop animations and indicators */
.custom-item-wrapper.dragging {
  opacity: 0.4;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  border: 2px dashed #dd6b20 !important;
  transform: scale(0.99);
}

.custom-item-wrapper.drag-over {
  border-top: 3px solid #dd6b20;
  padding-top: 1rem;
}

/* Parchment look user note cards */
.user-note-card {
  box-shadow: 
    inset 0 2px 4px rgba(251, 191, 36, 0.03),
    0 1px 2px rgba(0, 0, 0, 0.05);
  background: linear-gradient(180deg, #fffdf7 0%, #fefaf0 100%);
}

.type-select-btn.active {
  box-shadow: 0 1px 3px rgba(221, 107, 32, 0.1);
}

/* ==========================================================================
   Styled Authentication / Registration Form
   ========================================================================== */

.dprd-auth-form p {
  margin-bottom: 1.25rem;
}

.dprd-auth-form input[type="text"],
.dprd-auth-form input[type="email"],
.dprd-auth-form input[type="password"] {
  width: 100%;
  padding: 0.55rem 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  outline: none;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  background-color: #ffffff;
  color: #1a202c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.dprd-auth-form input[type="text"]:focus,
.dprd-auth-form input[type="email"]:focus,
.dprd-auth-form input[type="password"]:focus {
  border-color: #dd6b20;
  box-shadow: 0 0 0 3px rgba(221, 107, 32, 0.15);
}

.dprd-auth-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a3e3d;
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}

.dprd-auth-form ul.errorlist {
  color: #e53e3e;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.35rem;
  list-style: none;
  padding: 0;
}

.dprd-auth-form .helptext {
  display: block;
  color: #718096;
  font-size: 0.7rem;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.dprd-auth-form p:has(input[type="checkbox"]) {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.dprd-auth-form p:has(input[type="checkbox"]) label {
  display: inline;
  margin-bottom: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
}

.dprd-auth-form input[type="checkbox"] {
  height: 1.05rem;
  width: 1.05rem;
  border-color: #cbd5e0;
  border-radius: 0.25rem;
  color: #dd6b20;
  cursor: pointer;
  accent-color: #dd6b20;
}





