/* RU: Единый редактор использует цвета и размеры дизайн-системы. EN: Unified editor uses design-system tokens. */
.adstudio { max-width:1560px; margin:0 auto; white-space:normal; font-weight:normal; }
.st-head,.st-editor-head,.st-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.st-head { margin-bottom:24px; }
.adstudio h2,.adstudio h3,.st-dialog h3 { margin:0 0 12px; }
.st-head p { margin:0; max-width:680px; }
.st-layout { display:grid; grid-template-columns:240px minmax(0,1fr); gap:20px; align-items:start; }
.st-list { position:sticky; top:88px; padding:16px; max-height:calc(100dvh - 120px); overflow:auto; }
.adstudio input,.adstudio textarea,.adstudio select,.st-dialog input:not([type=radio]):not([type=checkbox]),.st-dialog textarea,.st-dialog select { width:100%; max-width:100%; box-sizing:border-box; padding:12px; border:1px solid var(--line-field); border-radius:var(--r); background:var(--surface); color:var(--ink); font:inherit; }
.adstudio textarea,.st-dialog textarea { resize:vertical; }
.st-list label { display:block; margin-bottom:12px; font-weight:600; }
.st-list input { margin-bottom:12px; }
.st-row { display:block; width:100%; text-align:left; padding:14px 12px; border:1px solid transparent; border-radius:var(--r); background:transparent; color:var(--ink); cursor:pointer; margin:4px 0; overflow-wrap:anywhere; }
.st-row strong,.st-row span { display:block; }
.st-row span { font-size:var(--fs-xs); color:var(--muted); margin-top:8px; }
.st-row:hover { background:var(--surface-2); }
.st-row.selected { background:var(--acc-soft); border-color:var(--acc); }
.st-editor { padding:24px; min-width:0; }
.st-editor-head h3 { margin-top:8px; overflow-wrap:anywhere; }
.st-editor-head #stSaved { flex:0 0 160px; text-align:right; }
.st-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:20px 0; border-bottom:1px solid var(--line); margin-bottom:24px; }
.st-steps button { display:flex; gap:8px; align-items:center; padding:12px 8px; background:var(--surface); border:1px solid var(--line); color:var(--muted); border-radius:var(--r); font:inherit; font-size:var(--fs-sm); cursor:pointer; }
.st-steps button[aria-current=step] { color:var(--acc-soft-ink); background:var(--acc-soft); border-color:var(--acc); font-weight:600; }
.st-steps button span { display:inline-grid; place-items:center; width:24px; height:24px; border:1px solid currentColor; border-radius:50%; flex-shrink:0; }
.st-work { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,.7fr); gap:28px; }
.st-form>section>label { display:block; margin:12px 0 8px; }
.st-form,.st-preview { min-width:0; }
.st-field { margin:0 0 20px; }
.st-field label,.st-dialog label:not(.st-choice label) { display:block; font-weight:600; margin:0 0 8px; }
.st-field small { display:block; margin-top:6px; font-size:var(--fs-xs); }
.st-required,.st-error,.st-form-error { color:var(--bad); }
.st-preview { align-self:start; position:sticky; top:92px; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:var(--surface); }
.st-preview-label { font-size:var(--fs-xs); color:var(--muted); background:var(--surface-2); padding:12px 16px; }
#stPreview h3,#stPreview .st-price,#stPreview>.muted,#stPreview .st-preview-text,.st-preview-copy h3,.st-preview-copy .st-price,.st-preview-copy .st-preview-text { margin:16px; }
#stPreview img,.st-preview-copy img { width:100%; max-height:260px; object-fit:cover; display:block; }
.st-no-image { display:grid; place-items:center; min-height:180px; background:var(--surface-2); color:var(--muted); font-size:var(--fs-sm); }
.st-preview-text { white-space:pre-wrap; font-size:var(--fs-sm); line-height:1.65; overflow-wrap:anywhere; max-height:360px; overflow:auto; }
#stChecks { border-top:1px solid var(--line); padding:16px; font-size:var(--fs-sm); }
.st-check { display:block; width:100%; border:0; background:none; color:var(--ink-2); text-align:left; padding:8px 0; cursor:pointer; font:inherit; line-height:1.5; overflow-wrap:anywhere; }
.st-check:hover { color:var(--acc); text-decoration:underline; }
.st-ok { color:var(--ok); }
.st-candidate { padding:16px; border:1px solid var(--line); border-radius:var(--r); margin:16px 0; }
.st-candidate-text { white-space:pre-wrap; line-height:1.65; overflow-wrap:anywhere; }
.st-actions { display:flex; gap:12px; flex-wrap:wrap; padding-top:24px; border-top:1px solid var(--line); margin-top:24px; }
.st-mobile-preview { display:none; }
.st-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.st-gallery figure { margin:0; border:1px solid var(--line); border-radius:var(--r); overflow:hidden; }
.st-gallery img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.st-gallery figcaption { padding:8px; font-size:var(--fs-xs); }
.st-empty { padding:40px; }
.st-notice { background:var(--warn-soft); color:var(--ink); padding:16px; border-radius:var(--r); margin:16px 0; }
.st-notice .btn { margin:12px 0 0; display:flex; }
.st-dialog { width:min(620px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:var(--r-l); box-sizing:border-box; }
.st-dialog::backdrop { background:rgba(0,0,0,.45); }
.st-dialog .st-dialog-head .btn { min-width:44px; flex-shrink:0; }
.st-dialog textarea,.st-dialog select { margin-bottom:16px; }
.st-dialog hr { border:0; border-top:1px solid var(--line); margin:24px 0; }
.st-choice { display:flex; gap:24px; border:0; padding:0; margin:0 0 20px; }
.st-choice legend { font-weight:600; margin-bottom:12px; }
.st-choice label { display:flex; align-items:center; gap:8px; min-height:44px; }
.st-choice input,.st-compare input { width:20px; height:20px; accent-color:var(--acc); }
.st-form-error { margin:12px 0; line-height:1.5; }
.st-compare { padding:16px 0; border-top:1px solid var(--line); }
.st-compare>div { display:grid; grid-template-columns:1fr 1fr; gap:16px; font-size:var(--fs-sm); }
.st-compare p { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:1200px) { .st-layout { grid-template-columns:200px minmax(0,1fr); gap:16px; } .st-work { grid-template-columns:minmax(0,1fr); } .st-preview { display:none; } .st-mobile-preview { display:inline-flex; } }
@media(max-width:820px) { .st-layout { display:block; } .st-list { position:static; max-height:240px; margin-bottom:16px; } .st-editor { padding:16px; } .st-head { align-items:center; } .st-head h2 { font-size:var(--fs-xl); } .st-head p { font-size:var(--fs-sm); } .st-editor-head { display:block; } .st-editor-head #stSaved { display:block; text-align:left; margin:12px 0; } .st-steps { gap:4px; } .st-steps button { flex-direction:column; gap:8px; font-size:var(--fs-xs); padding:8px 2px; } .st-dialog { padding:20px; } .st-actions { position:sticky; bottom:0; background:var(--surface); padding-bottom:12px; } .st-actions .btn { flex:1; } }
