#monster-page {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.monster-breadcrumb {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.monster-hero {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 28px;
  background:
    radial-gradient(ellipse at top left, #263e46 0, transparent 68%), #14212b;
}
.monster-portrait {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border: 1px solid #53605b;
  border-radius: 18px;
  background: #101a20;
  overflow: hidden;
}
.monster-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.monster-placeholder {
  font-size: 32px;
  color: #839ba3;
}
.monster-identity h1 {
  margin: 7px 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.monster-identity p {
  color: var(--muted);
  margin: 0 0 14px;
}
.monster-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.monster-badges span {
  padding: 4px 9px;
  border: 1px solid #40504e;
  border-radius: 5px;
  font-size: 12px;
  color: #d8c394;
  background: #17272d;
}
.monster-hero-actions {
  display: grid;
  gap: 9px;
}
.monster-hero-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  text-decoration: none;
  text-align: center;
}
.monster-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.monster-facts,
.monster-locations,
.monster-loot,
.monster-error {
  padding: 24px;
  min-width: 0;
}
.monster-overview h2,
.monster-loot h2 {
  margin: 0 0 18px;
  font-size: 19px;
}
.monster-facts dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
  margin: 0;
}
.monster-facts dl > div {
  padding: 12px 0;
  border-bottom: 1px solid #293a42;
  min-width: 0;
}
.monster-facts dt {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}
.monster-facts dd {
  font-size: 15px;
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.monster-facts .microcopy,
.monster-locations > .microcopy {
  margin: 18px 0 0;
  font-size: 11px;
}
.monster-location {
  padding: 15px;
  border: 1px solid #32454e;
  border-radius: 9px;
  background: #14232b;
  margin-top: 12px;
}
.monster-location-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.monster-location-heading h3 {
  margin: 0;
  font-size: 16px;
}
.monster-location-heading > span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.monster-location ul {
  list-style: none;
  margin: 14px 0;
  padding: 0;
}
.monster-location li {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 5px 0;
  color: #dbceae;
}
.monster-location li small {
  color: var(--muted);
}
.monster-location a {
  display: inline-block;
  font-size: 12px;
  padding: 5px 0;
}
.monster-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.monster-section-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.monster-loot-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  max-width: 850px;
  margin: 0 0 24px;
}
.monster-loot-section {
  margin-bottom: 24px;
}
.monster-loot-section h3 {
  font-size: 14px;
  display: flex;
  gap: 9px;
  margin: 0 0 12px;
}
.monster-loot-section h3 span {
  color: var(--muted);
  font-weight: 400;
}
.monster-loot-list {
  border: 1px solid #2d404b;
  border-radius: 9px;
  overflow: hidden;
}
.monster-loot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 145px;
  gap: 10px 18px;
  align-items: center;
  padding: 12px 16px;
  background: #15232c;
}
.monster-loot-row:nth-child(even) {
  background: #182a34;
}
.monster-loot-row + .monster-loot-row {
  border-top: 1px solid #2d404b;
}
.monster-loot-row.is-grouped {
  grid-template-columns: minmax(0, 1fr) 60px 125px 145px;
}
.monster-loot-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}
.monster-loot-item strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.monster-loot-item:hover strong {
  text-decoration: underline;
}
.monster-item-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--item-grade-color, #72858f) 50%, #26313a);
  border-radius: 3px;
  background: #0c1920 var(--item-grade-background, none) center / cover;
  overflow: hidden;
}
.monster-item-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.monster-loot-item small,
.monster-loot-rate small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.monster-loot-item small {
  margin: 4px 0 0;
}
.monster-loot-quantity {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.monster-loot-rate {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.monster-loot-rate.is-total strong {
  color: #dfd0a8;
}
.monster-loot-conditions {
  grid-column: 1/-1;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 0 56px;
}
.monster-loot-conditions summary {
  cursor: pointer;
  padding: 3px 0;
}
.monster-loot-conditions ul {
  margin: 8px 0 4px;
  padding-left: 16px;
  line-height: 1.8;
}
.monster-loot-group {
  border: 1px solid #34454f;
  border-radius: 10px;
  margin: 16px 0 0;
  overflow: hidden;
}
.monster-loot-group > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
  background: #1e303b;
  cursor: pointer;
  list-style: none;
}
.monster-loot-group > summary::-webkit-details-marker {
  display: none;
}
.monster-loot-group > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid #bcc9ca;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
  flex: none;
}
.monster-loot-group[open] > summary::after {
  transform: rotate(45deg);
}
.monster-loot-group > summary > span:first-child {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.monster-loot-group > summary small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}
.monster-group-chance {
  text-align: right;
}
.monster-group-chance strong {
  display: block;
  font-size: 16px;
  color: #dfd0a8;
  margin-top: 3px;
}
.monster-loot-group .monster-loot-list {
  border: 0;
  border-top: 1px solid #34454f;
  border-radius: 0;
}
.monster-loot-group > .microcopy {
  padding: 0 16px;
}
#monster-loot {
  scroll-margin-top: 90px;
}
@media (max-width: 1100px) {
  .monster-hero {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 20px;
  }
  .monster-portrait {
    width: 104px;
    height: 104px;
  }
  .monster-hero-actions {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
  }
  .monster-hero-actions a {
    padding: 10px 18px;
  }
  .monster-loot-row.is-grouped {
    grid-template-columns: minmax(0, 1fr) 44px 105px 110px;
    gap: 10px;
  }
}
@media (max-width: 650px) {
  #monster-page {
    gap: 14px;
  }
  .monster-hero {
    padding: 18px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 16px;
  }
  .monster-portrait {
    width: 76px;
    height: 76px;
    border-radius: 12px;
  }
  .monster-identity h1 {
    font-size: 23px;
  }
  .monster-identity p {
    font-size: 12px;
  }
  .monster-badges {
    gap: 5px;
  }
  .monster-badges span {
    font-size: 10px;
  }
  .monster-hero-actions a {
    flex: 1;
    font-size: 12px;
    padding: 8px 10px;
  }
  .monster-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .monster-facts,
  .monster-locations,
  .monster-loot {
    padding: 18px;
  }
  .monster-section-heading {
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 14px;
  }
  .monster-section-heading h2 {
    margin: 0 0 8px;
  }
  .monster-loot-row,
  .monster-loot-row.is-grouped {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .monster-loot-item {
    grid-column: 1/-1;
  }
  .monster-loot-quantity {
    grid-column: 1;
    text-align: left;
  }
  .monster-loot-row.is-grouped .monster-loot-quantity {
    grid-column: 1/-1;
  }
  .monster-loot-row.is-grouped .monster-loot-rate:not(.is-total) {
    text-align: left;
  }
  .monster-loot-conditions {
    margin: 0;
  }
  .monster-loot-rate {
    font-size: 12px;
  }
  .monster-loot-group > summary {
    padding: 12px;
    gap: 12px;
  }
  .monster-location-heading {
    flex-wrap: wrap;
    gap: 6px;
  }
  .monster-location li {
    font-size: 13px;
  }
}
