.upload-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.upload-form label { display: grid; gap: 5px; font-size: 12px; color: #6d675d; }
.upload-form input { width: 100%; }
.reference-group { margin-top: 24px; }
.reference-group h2 small { font-size: 13px; color: #777166; }
.reference-card { background: #fff; border-radius: 12px; overflow: hidden; }
.reference-card.disabled { opacity: .55; }
.reference-card > img { width: 100%; height: 230px; object-fit: cover; }
.tag { display: inline-block; background: #eee9df; border-radius: 10px; padding: 2px 7px; margin: 4px 4px 5px 0; }
.card-actions { display: flex; gap: 7px; margin-top: 8px; }
.danger { background: #7f1d2d; }
.status-pill { display: inline-block; padding: 8px 11px; background: #fff; border-radius: 16px; color: #625d54; }
.generation-items { display: grid; gap: 15px; }
.generation-item { background: #fff; border-radius: 12px; padding: 14px; }
.generation-pair { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.generation-pair > div span { display: block; font-size: 12px; color: #777166; margin-bottom: 5px; }
.generation-pair img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; }
.result-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.result-filter-tabs button { background: #e9e5dc; color: #39352f; }
.result-filter-tabs button.active { background: #c73245; color: #fff; }
.result-note-group { margin: 20px 0 30px; }
.result-note-heading { display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid #d9d4c8; margin-bottom: 12px; padding-bottom: 8px; }
.result-note-heading h3 { margin: 0; }
.result-note-heading small { color: #777166; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.result-card { background: #fff; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; box-shadow: 0 4px 18px #0001; }
.result-card.chosen { border-color: #c73245; }
.result-card > img { width: 100%; height: 260px; object-fit: cover; background: #ddd; }
.result-card .meta { padding: 11px; }
.result-card .result-state { display: inline-block; border-radius: 10px; padding: 2px 7px; margin-top: 5px; background: #eee9df; }
.result-card .result-state.kept { background: #d8eddf; color: #185d34; }
.result-card .result-state.voided { background: #f3d8dc; color: #872236; }
.generation-modal-card { width: min(1760px, 98vw); max-height: 96vh; padding: 20px; }
.result-compare-header h2 { margin: 3px 0 5px; }
.result-compare-header p { margin: 0 0 10px; color: #625d54; }
.compare-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 16px; align-items: stretch; }
.compare-layout { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 14px; margin: 0; min-width: 0; }
.compare-layout figure { margin: 0; }
.compare-layout figcaption { font-weight: 700; margin-bottom: 7px; }
.compare-layout img { width: 100%; height: calc(96vh - 165px); max-height: 820px; object-fit: contain; background: #dedbd3; border-radius: 10px; }
.compare-actions { display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 12px; padding: 14px; }
.compare-actions strong { font-size: 17px; }
.compare-actions small { color: #777166; margin-bottom: 4px; }
.compare-actions button { width: 100%; min-height: 44px; }
.compare-actions .compare-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: auto; }
.compare-actions .compare-nav button { padding-left: 7px; padding-right: 7px; }
.mask-panel { margin-top: 14px; }
.mask-panel img { max-width: 420px; width: 100%; border-radius: 9px; }
@media (max-width: 1100px) {
  .generation-modal-card { padding: 14px; }
  .compare-workspace { grid-template-columns: 1fr; }
  .compare-layout img { height: 55vh; }
  .compare-actions { position: sticky; bottom: 0; z-index: 3; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .compare-actions button { width: auto; }
  .compare-actions .compare-nav { display: flex; margin: 0 0 0 auto; }
}
@media (max-width: 900px) {
  .upload-form { grid-template-columns: repeat(2, 1fr); }
  .generation-pair { grid-template-columns: repeat(2, 1fr); }
  .compare-layout { grid-template-columns: 1fr; }
  .compare-layout img { height: auto; max-height: 70vh; }
}
.pipeline-tag{display:inline-flex;align-items:center;padding:3px 8px;border-radius:999px;background:#e8eef5;color:#40536a;font-size:12px;font-weight:700;margin-right:6px}
.pipeline-tag.experimental,button.experimental{background:#6f49c7;color:#fff;border-color:#6f49c7}
