/* Detail presentation can evolve independently of the map layout. */
.sheet {
  position: absolute;
  z-index: 20;
  left: 10px;
  right: 10px;
  bottom: 10px;
  max-height: min(48%, 380px);
  overflow: auto;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(27, 36, 33, 0.28);
  transform: translateY(120%);
  transition: transform 0.28s ease;
  padding: 8px 16px 14px;
}

.sheet.is-open { transform: translateY(0); }

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: #d2c7b0;
  margin: 4px auto 10px;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.sheet h2 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.25;
  font-family: var(--font-brand);
  font-weight: 600;
}

.sheet .meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}

.sheet p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
}

.sheet a { color: var(--accent); }

.sheet .note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.sheet-close {
  border: 0;
  background: var(--paper-2);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
}


@media (min-width: 760px) {
  .sheet {
    left: auto;
    right: 16px;
    width: min(380px, 36vw);
    max-height: calc(100% - 20px);
    top: 16px;
    bottom: 16px;
    transform: translateX(110%);
    padding: 16px 16px 18px;
  }

  .sheet.is-open { transform: translateX(0); }
  .sheet-handle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
}

.sheet [hidden] { display: none !important; }
.detail-media { margin: 12px 0; }
.detail-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(32dvh, 280px);
  object-fit: contain;
  border-radius: 10px;
  background: var(--paper-2);
}
.detail-media figcaption { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.media-kind { font-weight: 700; color: var(--ink); }
.media-credit { display: block; }
#dSections details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
#dSections summary { cursor: pointer; font-weight: 600; }
