/* Real image reference picker. Shared by the image studio and the carousel tab. */
.real-references { display: grid; gap: 12px; margin-top: 10px; }
.real-references-lead { margin: 0; color: var(--muted, #a29b90); font-size: 12px; line-height: 1.5; }
.real-references-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.real-references-toolbar input[type="search"] {
  flex: 1 1 180px; min-width: 140px; padding: 8px 10px;
  border: 1px solid var(--line, #34302a); border-radius: 10px;
  background: var(--field, #12110f); color: inherit; font: inherit; font-size: 12px;
}
.real-references-toolbar button,
.real-references-toolbar .real-references-import {
  padding: 8px 12px; border: 1px solid var(--line, #34302a); border-radius: 10px;
  background: #211e1a; color: #aaa297; font: inherit; font-size: 12px; cursor: pointer;
}
.real-references-toolbar button:hover,
.real-references-toolbar .real-references-import:hover { border-color: var(--gold, #d7ad66); }
.real-references-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.real-references-tags button {
  padding: 4px 10px; border: 1px solid var(--line, #34302a); border-radius: 999px;
  background: #211e1a; color: #aaa297; font: inherit; font-size: 11px; cursor: pointer;
}
.real-references-tags button[aria-pressed="true"] { border-color: var(--gold, #d7ad66); color: var(--gold, #d7ad66); }
.real-references-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px; max-height: 320px; overflow-y: auto; padding: 2px;
}
.real-references-grid:empty { display: none; }
.real-reference {
  position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; background: #12110f; cursor: pointer; padding: 0;
}
.real-reference img { width: 100%; height: 100%; object-fit: cover; display: block; }
.real-reference[aria-pressed="true"] { border-color: var(--gold, #d7ad66); }
.real-reference[aria-pressed="true"]::after {
  content: attr(data-order); position: absolute; top: 4px; left: 4px;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--gold, #d7ad66); color: #21170b;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.real-reference span {
  position: absolute; inset: auto 0 0 0; padding: 4px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  color: #f5efe6; font-size: 10px; line-height: 1.3; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.real-reference:not([aria-pressed="true"]) span { opacity: .72; }
.real-references-status { margin: 0; color: var(--muted, #a29b90); font-size: 11px; }
.real-references-status[data-tone="error"] { color: #e08a7a; }
.real-references-compact { margin: 10px 0 0; }
.real-references-compact summary { cursor: pointer; }
.real-references-compact .real-references { max-height: 380px; }
