/* Gehege- und Tierdetail */
.detail-page {
  max-width: 740px;
  margin-inline: auto;
  padding-bottom: 24px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #85bce0;
}

.detail-portrait {
  position: relative;
  aspect-ratio: 16 / 9;
  isolation: isolate;
}

.detail-portrait img {
  position: absolute;
  display: block;
  image-rendering: pixelated;
}

.portrait-habitat {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  filter: blur(3px) brightness(.84) saturate(.86);
  transform: scale(1.04);
}

.portrait-animal {
  left: 50%;
  bottom: 2%;
  width: 56%;
  height: 82%;
  transform: translateX(-50%);
  object-fit: contain;
  filter: drop-shadow(0 9px 7px #17231880);
}

.detail-back {
  position: absolute;
  z-index: 1;
  inset: 10px auto auto 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid #fff4;
  border-radius: 10px;
  color: #fffdf6;
  background: #173e32f5;
  font-weight: 750;
}

.detail-back span {
  font-size: 1.6rem;
  line-height: 1;
}

.detail-heading {
  margin: 15px 0;
}

.detail-heading h1 {
  font-size: clamp(1.65rem, 5.8vw, 2.7rem);
  overflow-wrap: anywhere;
}

.detail-heading p {
  margin-top: 4px;
  font-size: .9rem;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.detail-metrics > div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  text-align: center;
}

.detail-metrics dt {
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.detail-metrics dd {
  font-size: clamp(.9rem, 3.6vw, 1.15rem);
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.detail-sections {
  display: grid;
  gap: 10px;
}

.detail-panel {
  padding: 13px;
}

.detail-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
}

.detail-panel p,
.detail-panel dl {
  margin-top: 7px;
}

.detail-panel .animal-list {
  margin: 8px 0 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions:not(:empty) {
  margin-top: 12px;
}

.detail-actions button {
  flex: 1 1 150px;
}

.detail-panel .need-list {
  gap: 6px;
  margin-bottom: 0;
}

.detail-panel .need-attention {
  background: #f5ecdd;
}

.detail-panel .need-attention progress {
  accent-color: #946018;
}

@media (min-width: 600px) {
  .detail-panel .need-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.enclosure-remove,
.enclosure-config-note.is-unavailable {
  color: #8a3c29;
}

.enclosure-config-note,
.enclosure-config figcaption {
  font-size: .86rem;
}

.enclosure-config-fields {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.enclosure-config-note {
  margin: 8px 0 14px;
}

.enclosure-config-figure {
  margin: 0 0 12px;
}

.enclosure-config-figure #config-preview {
  margin-bottom: 4px;
}

.enclosure-config figcaption {
  color: var(--sub);
}

.enclosure-checkout {
  display: grid;
  gap: 8px;
}

.enclosure-checkout > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--sub);
  font-size: .86rem;
}

.enclosure-checkout strong {
  color: var(--ink);
}

.enclosure-price {
  flex: none;
  margin-left: 10px;
}
