/* Геометрия раздела. Общие компоненты определяются в aart-ui. */
@layer aart-legacy {
.card-history-dialog { width: min(1250px, 94vw); max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); }
.card-history-dialog::backdrop { background: #20222a80; }
.card-history-dialog > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 20px; border-bottom: 1px solid var(--line); }
.card-history-dialog header h2 { font-size: 21px; }
.card-history-dialog header p { color: var(--muted); font-size: 12px; margin-top: 6px; }
.card-history-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 20px; padding: 20px; }
.card-history-layout > aside { max-height: 65vh; overflow: auto; }
.card-history-layout > section { min-width: 0; }
.card-history-layout h3 { margin-bottom: 12px; }
.card-history-version { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; background: var(--surface); color: var(--text); font-size: 12px; text-align: left; }
.card-history-version[aria-pressed=true] { border-color: var(--purple); background: var(--accent-soft); }
.card-history-version img { width: 40px; height: 54px; object-fit: contain; }
.card-history-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.card-history-controls label { min-width: 0; }
.card-history-controls select { width: 100%; font-size: 12px; }
.card-history-stage { height: min(54vh, 620px); display: grid; place-items: center; overflow: auto; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
#history-art { position: relative; height: 100%; max-width: 100%; transform-origin: center center; flex: 0 0 auto; }
#history-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
#history-art #history-other { position: absolute; inset: 0; }
#history-art #history-other[hidden] { display: none; }
.card-history-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.card-history-tools label { margin: 0 10px; font-size: 12px; }
.card-history-tools input[type=range] { width: 180px; min-height: 0; padding: 0; }
.card-history-tools .button { min-height: 30px; font-size: 12px; padding: 5px 10px; }
#history-description, #history-note { font-size: 12px; line-height: 1.5; }

/* В узкой плитке все действия сохраняют область нажатия, включая скачивание PNG. */
.card-slide-info>div { flex-wrap:wrap; justify-content:flex-start; gap:6px 12px; }
.card-slide-info>div>* { min-width:0; max-width:100%; }
.card-slide-info .text-button,.card-slide-info a { min-height:32px; }
.card-slide-info [data-slide-history] { text-align:left; }
.card-slide-info a { white-space:nowrap; color:var(--purple); }
}
