/* Лента вариантов использует тёплую палитру и размеры дизайн-системы. */
.image-workspace { min-width: 0; }
.image-history { margin-bottom: 16px; position: relative; }
.image-history[hidden], .image-history-selection[hidden], .image-history-preview-state[hidden] { display: none; }
.image-history-heading { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #78716C; font-size: 12px; font-weight: 600; }
.image-history-heading h2 { margin: 0; font: inherit; }
.image-history-list { display: flex; align-items: center; gap: 12px; overflow-x: auto; padding: 4px; scrollbar-width: thin; overscroll-behavior: contain; }
.image-history-version { position: relative; flex: 0 0 60px; width: 60px; height: 84px; border: 2px solid transparent; padding: 0; border-radius: 10px; background: #E8E6E3; cursor: pointer; }
.image-history-version img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 8px; }
.image-history-version[aria-pressed="true"] { outline: 3px solid #F98E0A; outline-offset: 1px; }
.image-history-version span { position: absolute; bottom: 4px; left: 4px; padding: 0 4px; border-radius: 6px; background: #FFFFFF; color: #292524; font-size: 12px; font-weight: 600; }
.image-history-version b { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: #F98E0A; color: #1C1917; font-size: 13px; }
.image-history-version:focus-visible, .image-history-add:focus-visible { outline: 3px solid #5684B8; outline-offset: 3px; }
.image-history-add { flex: 0 0 48px; width: 48px; height: 76px; border: 2px dashed #A8A29E; border-radius: 10px; background: #FAFAF9; color: #78716C; font-size: 28px; cursor: pointer; }
.image-history-add:disabled { opacity: .5; cursor: not-allowed; }
.image-history-selection { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.image-history-selection button { min-height: 44px; }
.image-history-selection button:disabled { opacity: .5; cursor: not-allowed; }
.image-history-preview-state { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 68px 16px 16px; background: #FAFAF9; color: #78716C; text-align: center; font-size: 14px; }
.image-history-preview-state button { min-height: 44px; }
.image-history-preview-state[data-state="loading"]::before { content: ""; width: 20px; height: 20px; border: 2px solid #E8E6E3; border-top-color: #D34F0F; border-radius: 50%; animation: image-history-spin 1s linear infinite; }
@keyframes image-history-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .image-history-preview-state[data-state="loading"]::before { animation: none; } }
[data-main-illustration]:has(.image-history-selection:not([hidden])) [data-regen-btn],
[data-main-illustration]:has(.image-history-selection:not([hidden])) [data-regen-locked] { display: none; }
.image-history-message { margin: 8px 0; color: #78716C; font-size: 14px; }
.image-history-message:empty { display: none; }
@media (max-width: 359px) {
  .image-workspace [data-image-page-badge] { top: auto; bottom: 12px; }
}
@media (min-width: 1024px) {
  .image-workspace:has(.image-history:not([hidden])) { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 20px; align-items: stretch; }
  .image-history { margin: 0; display: flex; flex-direction: column; min-height: 0; }
  .image-history-heading { flex-direction: column; text-align: center; }
  .image-history-list { flex-direction: column; align-items: center; overflow-y: auto; overflow-x: hidden; flex: 1 1 0; min-height: 100px; padding: 4px; margin-right: 0; }
  .image-history-version { flex-basis: 84px; }
  .image-history-add { flex-basis: 48px; width: 60px; height: 48px; }
}
