.detail-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 0 22px;
  color: var(--muted);
}

#detail-dialog { width: min(1180px, 96vw); max-height: 94vh; }
#detail-content { max-height: 94vh; overflow-y: auto; }
#detail-content > section { margin: 28px 0; }

.image-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.image-review-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f8faf8;
}

.image-frame {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  background: #eef1ef;
  color: var(--muted);
}

.image-review-grid img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #eef1ef;
}

.mask-grid .image-frame, .mask-grid img { background: #252b28; color: #e7ece9; }
.image-review-grid figcaption { padding: 12px; color: var(--muted); font-size: 12px; display: grid; gap: 6px; }
.image-review-grid figcaption strong { color: var(--ink); font-size: 14px; }
.image-review-grid figcaption span { display: grid; gap: 2px; }
.image-review-grid figcaption p { margin: 0; }
.image-error { border: 2px solid var(--red); }
.image-missing { border-style: dashed!important; }
.mask-empty { grid-column: 1/-1; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.sha { overflow-wrap: anywhere; word-break: break-all; font-size: 11px; }

.part-facts dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.part-facts dt, .part-facts dd {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.part-facts dt { background: #f5f7f5; font-weight: 700; }
.fact-section ul { columns: 2; column-gap: 36px; }
.fact-section li { break-inside: avoid; margin: 7px 0; }
.trace-table { font-size: 12px; }
.trace-table th, .trace-table td { vertical-align: top; padding: 10px 12px; }

.provenance-grid, .delivery-grid, .editorial-preview {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.provenance-grid dt, .provenance-grid dd,
.delivery-grid dt, .delivery-grid dd,
.editorial-preview dt, .editorial-preview dd {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.provenance-grid dt, .delivery-grid dt, .editorial-preview dt { background: #f5f7f5; font-weight: 700; }
.provenance-section h4 { margin: 22px 0 10px; }

.review-note {
  display: grid;
  gap: 7px;
  margin-top: 24px;
  font-weight: 700;
}

.review-note textarea {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
}

.mask-lock-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff8e9;
  font-weight: 700;
  line-height: 1.5;
}

.mask-lock-confirmation input { margin-top: 4px; }
.mask-lock-evidence { border-top: 1px solid var(--line); padding-top: 24px; }

.danger { color: var(--red); }
.notice { padding: 14px; border-radius: 10px; background: #eef5d7; color: #445c20; }
.revision-reason { display: grid; gap: 6px; padding: 14px; margin: 12px 0; border-radius: 10px; background: #fff3e2; color: #754611; }
.revision-reason small { color: var(--muted); }
.preserve-lines { white-space: pre-wrap; }
#draft-revision-form { display: grid; gap: 14px; margin-top: 18px; }
#draft-revision-form label { display: grid; gap: 7px; font-weight: 700; }
#draft-revision-form input, #draft-revision-form textarea { border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; }
#draft-revision-form textarea { min-height: 86px; resize: vertical; }
#revision-description { min-height: 150px!important; }
.wordpress-draft { border-top: 1px solid var(--line); padding-top: 24px; }
.draft-only-notice { padding: 14px; border-radius: 10px; background: #eef5d7; color: #445c20; }
.wordpress-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.status.delivery-retry_scheduled { background: #fff3e2; color: var(--amber); }
.status.delivery-failed_permanent { background: #fbe9e7; color: var(--red); }
.status.delivery-succeeded { background: #e7f6c9; color: #496918; }
.detail-loading, .detail-error { min-height: 240px; display: grid; place-content: center; gap: 16px; text-align: center; color: var(--muted); }
details { margin-top: 24px; }
summary { cursor: pointer; font-weight: 700; }

@media (max-width: 650px) {
  .part-facts dl { grid-template-columns: 1fr; }
  .provenance-grid, .delivery-grid, .editorial-preview { grid-template-columns: 1fr; }
  .fact-section ul { columns: 1; }
}
