#detail {
  box-sizing: border-box; width: min(40rem, calc(100% - 1.5rem)); max-width: none;
  max-height: 92vh; max-height: 92dvh; padding: 0; overflow: auto;
  border: 1px solid #cfd6c7; border-radius: 14px; background: #faf9f4; color: #253c30;
  box-shadow: 0 16px 64px #172c2240; font: 15px/1.5 system-ui, sans-serif;
}
#detail[open] { display: flex; flex-direction: column; }
#detail::backdrop { background: #172d246b; }
#detail [hidden] { display: none !important; }
#detail button, #detail .note-actions a {
  font: 650 14px/1.4 system-ui, sans-serif; color: #31553f; background: white; cursor: pointer;
  border: 1px solid #cdd6c7; border-radius: 7px; padding: .55rem .8rem; min-height: 42px;
}
#detail button.primary { background: #385844; border-color: #385844; color: white; }
#detail button:disabled { opacity: .65; cursor: default; }
#detail .note-head, #detail .note-foot { flex: none; padding: .85rem 1.2rem; }
#detail .note-head { border-bottom: 1px solid #dedfd5; }
#detail .note-head h2 { margin: .2rem 0; font: 400 clamp(1.45rem, 4vw, 2rem)/1.2 Georgia, serif; }
#detail .note-head p { margin: 0; font-size: .85rem; color: #526955; }
#detail p.note-source { font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
#detail .note-close { float: right; line-height: 1; margin-left: .7rem; font-size: 1.25rem; }
#detail .note-body { padding: 1rem 1.2rem; overflow: auto; overscroll-behavior: contain; }
#detailImage { display: block; margin: 0 auto 1rem; max-width: 100%; max-height: 64vh; width: auto; height: auto; border-radius: 5px; }
#detail .field-vote-row, #detail .note-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
#detail .field-vote-row { justify-content: space-between; }
#detail .field-vote-score { font-weight: 650; }
#detail .field-vote-status, #detailStatus { font-size: .84rem; color: #556858; margin: .55rem 0; }
#detailStatus:empty, #detail .field-vote-status:empty { display: none; }
#detail .field-vote-verification { margin-top: .6rem; }
#detail .note-primary-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: .6rem; }
#detail .field-photo-vote { flex: 1 1 13rem; min-width: 0; margin: 0; padding: 0; border: 0; }
#detail .note-primary-actions button { min-height: 44px; }
/* Leave space in the initially visible body for the vote and share controls. */
@media(min-width: 600px) and (min-height: 421px) {
  #detailImage { max-height: min(64vh, calc(92dvh - 16rem)); }
}
@media(max-width: 599px) and (min-height: 421px) {
  #detailImage { max-height: clamp(180px, calc(92dvh - 19rem), 52vh); }
}
#detail dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.25rem; margin: .6rem 0 1rem; }
#detail dt { color: #586958; } #detail dd { margin: 0; }
#detailDot { display: inline-block; width: .6em; height: .6em; margin-right: .35em; border-radius: 50%; }
#detailNote { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 1rem; padding: .75rem 1rem; background: #edf1e7; border-left: 3px solid #a8b99d; }
#shareFallback { width: 100%; box-sizing: border-box; padding: .5rem; }
#detail .note-foot { display: flex; justify-content: flex-end; border-top: 1px solid #dedfd5; }
@media (max-height: 420px) { #detail[open] { display: block; } #detail .note-body { overflow: visible; } }
