/* Post creation is a workspace: content first, optional setup underneath. */
.post-workspace{--post-surface:var(--well-2,#211b13);--post-line:var(--line,#453927)}
.post-workspace.hx-yt .post-actions{position:static;top:auto;background:#202329}
.post-text-editor{min-width:0;border:1px solid var(--post-line);border-radius:12px;overflow:hidden;background:var(--bg,#141009)}
.post-editor-modes{display:flex;gap:5px;padding:9px 12px;background:var(--post-surface);border-bottom:1px solid var(--post-line)}
.post-editor-modes button{border:0;background:transparent;color:var(--text-3,#baaa91);padding:7px 12px;border-radius:7px;font:600 12px var(--font-body,Onest,sans-serif);cursor:pointer}.post-editor-modes button[aria-pressed=true]{background:#b96b3426;color:var(--primary-soft,#ffbf90);box-shadow:inset 0 0 0 1px #c189513d}
.post-workspace .post-text-editor .post-toolbar{margin:0;padding:10px 12px;border-bottom:1px solid var(--post-line)}
.post-workspace .post-text-editor textarea{border:0!important;border-radius:0!important;margin:0;min-height:240px;font-family:Consolas,monospace;font-size:13px}
.post-rich{min-height:240px;max-height:480px;overflow:auto;padding:20px;outline:0;color:var(--text,#eee1d0);font:400 16px/1.8 var(--font-body,Onest,sans-serif);white-space:pre-wrap;overflow-wrap:anywhere;cursor:text}
.post-rich:focus{box-shadow:inset 0 0 0 2px #dd965452}.post-rich:empty:before{content:attr(data-placeholder);color:var(--text-3,#9d8f79);pointer-events:none}.post-rich strong{font-weight:750}.post-rich a{color:var(--info-soft,#94c9df);text-decoration:underline;text-underline-offset:3px;cursor:text}.post-rich[aria-readonly=true]{opacity:.75;cursor:default}
.post-workspace [hidden]{display:none!important}
.post-workspace .hx-svc-hero .hx-title{font-family:var(--font-body,Onest,sans-serif);font-size:clamp(26px,2.6vw,36px);line-height:1.25;letter-spacing:-.025em;text-transform:none;display:flex;flex-wrap:wrap;gap:0 .28em;align-items:baseline}
.post-workspace .hx-svc-hero .hx-title .hx-accent{font:inherit;letter-spacing:inherit;background:none;color:var(--primary-soft,#ffbd87);-webkit-text-fill-color:currentColor}
.post-workspace .hx-svc-hero{padding:22px 26px;border-radius:16px;min-height:0}.post-workspace .hx-hero-title{font-size:clamp(22px,2.4vw,32px)}
.post-workspace .hx-kpis{display:flex;flex-wrap:wrap;gap:10px}.post-workspace .hx-kpi{min-width:130px;padding:12px 15px}.post-workspace .hx-kpi-value{font-size:24px}
.post-workspace .tg-layout,.post-workspace .compose-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(310px,.85fr);gap:22px;align-items:start}
.post-workspace .tg-main,.post-workspace .compose-editor{min-width:0;display:grid;gap:14px}
.post-workspace .post-primary{padding:24px;border-radius:16px!important;gap:12px;background:var(--post-surface);border:1px solid var(--post-line)}
.post-workspace .post-primary textarea{width:100%;min-height:220px;max-height:480px;resize:vertical;font:15px/1.7 var(--font-body,Onest,sans-serif);border-radius:10px!important;padding:16px;background:var(--bg,#141009)}
.post-workspace .post-primary .tg-step-head h2{text-transform:none;font:700 20px/1.3 var(--font-body,Onest,sans-serif)}
.post-workspace .post-primary .tg-step-head p{font-size:13px;line-height:1.6}.post-workspace .tg-step-num{border-radius:8px}
.post-workspace .post-toolbar{gap:8px;margin:12px 0 8px}.post-workspace .post-toolbar .format-button{min-height:38px;display:inline-flex;align-items:center;gap:7px;font-size:12px;border-radius:8px!important}
.post-workspace .post-toolbar small{flex-basis:100%;line-height:1.5}.post-character-count{display:block;text-align:right;margin:7px 0 12px;color:var(--text-3,#b6a489);font-size:11px;font-variant-numeric:tabular-nums}
.post-variable-label{font-size:11px;color:var(--text-3,#b6a489);margin:14px 0 8px}.post-workspace .post-variable-list{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 15px}
.post-workspace .post-variable-list button{display:inline-flex;gap:7px;align-items:center;min-height:33px;max-width:100%;padding:6px 9px;border:1px solid var(--post-line);border-radius:7px;background:var(--bg,#141009);color:var(--text-2,#d2c0a7);cursor:pointer;font:500 11px/1.4 var(--font-body,Onest,sans-serif)}
.post-variable-list button code{font-size:9px;opacity:.6;background:transparent;overflow-wrap:anywhere}.post-variable-list button:disabled{opacity:.45;cursor:not-allowed}
.post-workspace .post-options{margin:0;border:1px solid var(--post-line);border-radius:12px;background:var(--post-surface);overflow:hidden;min-width:0}
.post-options>summary{position:relative;display:grid;gap:5px;padding:16px 42px 16px 18px;cursor:pointer;list-style:none}.post-options>summary::-webkit-details-marker{display:none}.post-options>summary:after{content:'+';position:absolute;right:18px;top:15px;color:#eda565;font:20px monospace}.post-options[open]>summary:after{content:'−'}.post-options>summary b{font-size:14px;color:var(--text,#eee0cb)}.post-options>summary span{font-size:12px;color:var(--text-3,#b7a38a);line-height:1.55}.post-options[open]>summary{border-bottom:1px solid var(--post-line)}
.post-workspace .post-options>section.card{border:0!important;border-radius:0!important;margin:0;padding:18px;background:transparent}.post-options .tg-step-head,.post-options .hx-card-head .hx-eyebrow{display:none}
.post-options:has(.compose-history-card){margin-top:22px}.post-workspace .compose-history-list{max-height:420px;overflow:auto}
.post-workspace .post-actions{position:sticky;top:calc(var(--header-h,64px) + 8px);z-index:5;display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px 16px;margin:16px 0;background:var(--post-surface);border:1px solid var(--post-line);border-radius:12px;box-shadow:0 6px 20px #0002}
.post-actions .button{border-radius:8px!important;min-height:40px;font-size:12px}.post-actions .tg-actions-hint{flex-basis:100%}.post-actions .compose-send-row{display:flex;align-items:center;gap:14px;width:100%}.post-actions .compose-send-copy{flex:1;min-width:0}.post-actions .compose-send-copy strong{font-size:13px}.post-actions .compose-send-copy p{font-size:11px;line-height:1.5;margin:3px 0 0;max-width:580px}.post-actions .compose-send-button{flex-shrink:0}
.post-workspace .tg-preview-col,.post-workspace .compose-preview,.post-workspace .yt-preview{position:sticky;top:calc(var(--header-h,64px) + 88px);min-width:0;max-width:100%;border-radius:16px;overflow:hidden}
.post-workspace .tg-preview-col .telegram-preview{position:static}.post-workspace .telegram-preview,.post-workspace .yt-preview{border:1px solid var(--post-line);background:var(--post-surface);padding:0;border-radius:16px;--tg-accent:#7eb5cc}
.post-workspace .telegram-preview-top{padding:15px 18px;background:transparent;font-size:11px;letter-spacing:.06em}
.post-workspace .telegram-chat{padding:24px 18px;min-height:310px;max-height:calc(100dvh - var(--header-h,64px) - 200px);overflow:auto;background:radial-gradient(ellipse at top left,#476b6422,transparent 80%),repeating-linear-gradient(45deg,#ffffff02 0px,#ffffff02 1px,transparent 1px,transparent 14px),#172126}
.post-workspace .telegram-post{width:100%;max-width:390px;justify-self:center;border:1px solid #46555d;border-radius:14px 14px 14px 4px;background:#25343e;color:#eef1f2;padding:17px;box-shadow:0 4px 14px #0002}
.post-workspace .telegram-post-head strong{color:#a4cfdd;font-size:14px;font-weight:600;line-height:1.35}.post-workspace .telegram-post-head small,.post-workspace .telegram-post-head div>span{font-size:11px;color:#a3b3be;text-transform:none;letter-spacing:0}
.post-workspace .telegram-avatar{width:32px;height:32px;border-radius:50%;background:#456674;color:#daf5ff;flex-shrink:0;font-size:11px}
.post-workspace .telegram-post-text{font:400 14px/1.65 var(--font-body,Onest,sans-serif);color:#f0f3f5;letter-spacing:0;text-transform:none}.post-workspace .telegram-post-text strong{font-weight:700;color:inherit}.post-workspace .telegram-post-text a{color:#92c8e9;font-weight:500}
.post-workspace .telegram-link-preview{border-color:#86bfd4;background:#1c2c3559;padding:10px;border-radius:6px;min-width:0}.post-workspace .telegram-link-meta strong{color:#94c7de;font-size:12px}.post-workspace .telegram-link-meta span{color:#e8eff3;font-size:13px;white-space:normal;line-height:1.5;font-weight:500}.post-workspace .telegram-link-meta small{color:#9db6c4}
.post-workspace .tg-preview-button{display:block;text-align:center;margin-top:8px;padding:10px;border-radius:7px;background:#395568;color:#e0f0fa;font-size:13px;font-weight:500;border:1px solid #ffffff12;overflow-wrap:anywhere}
.post-workspace .tg-preview-button.is-success{background:#37604c}.post-workspace .tg-preview-button.is-danger{background:#754746}.post-workspace .telegram-compose-image{margin:0 -6px 12px;border-radius:8px;overflow:hidden}.post-workspace .telegram-compose-image img{width:100%;height:auto;max-height:360px;object-fit:contain}
.post-workspace .yt-preview>.field-hint{padding:14px 18px;margin:0!important;line-height:1.65;font-size:11px}.post-workspace .yt-presets{display:flex;flex-wrap:wrap;gap:8px}.post-workspace .yt-preset{flex:1 1 120px;min-width:0;border-radius:9px;padding:11px;text-align:left}.post-workspace .yt-preset strong{font-size:12px}.post-workspace .yt-preset small{font-size:10px;line-height:1.5}
.post-video-cover{position:relative;display:grid;place-content:center;justify-items:center;gap:10px;aspect-ratio:16/9;overflow:hidden;border-radius:8px;background:radial-gradient(ellipse at 15% 20%,#b9824c99,transparent 60%),linear-gradient(130deg,#293c4e,#161b2d);margin:0 0 12px;color:#f7ece0}
.post-video-cover>span{display:grid;place-items:center;width:48px;height:34px;border-radius:11px;background:#f14d4d;font-size:18px}.post-video-cover>b{font-size:11px;font-weight:500}.post-video-cover>small{position:absolute;right:8px;bottom:8px;font:11px monospace;background:#0009;padding:3px 5px;border-radius:3px}.post-video-cover.is-short{aspect-ratio:9/12;max-height:240px}
.post-workspace button:focus-visible,.post-options>summary:focus-visible{outline:2px solid #f7b570;outline-offset:3px}
/* Avoid the equal-width segment squeezing the longer «Док-панель» label. */
.post-autopost .post-primary>.tg-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px;background:transparent;border:0;padding:0;margin:18px 0;border-radius:0}
.post-autopost .post-primary>.tg-tabs button{display:grid;gap:6px;align-content:start;text-align:left;white-space:normal;min-width:0;padding:16px;border-radius:12px;border:1px solid var(--post-line);background:var(--post-surface);color:var(--text-2)}
.post-autopost .post-primary>.tg-tabs button strong{font:650 14px/1.4 var(--font-body,Onest,sans-serif)}
.post-autopost .post-primary>.tg-tabs button small{font:400 11px/1.5 var(--font-body,Onest,sans-serif);color:var(--text-3)}
.post-autopost .post-primary>.tg-tabs button[aria-selected=true]{border-color:#d68b4e;background:linear-gradient(125deg,#aa552d33,#aa552d08);box-shadow:inset 0 2px #fda769}
.post-autopost .post-delivery{margin:16px 0 0;border-radius:10px;padding:14px;min-width:0}
.post-autopost .post-event-toggle{margin:0 0 18px;padding:12px 14px;border-radius:10px;gap:12px;background:transparent;min-width:0}
.post-autopost .post-event-toggle strong{font-size:12px}.post-autopost .post-event-toggle small{font-size:11px;line-height:1.5}
.post-autopost .tg-event-grid:empty{display:none}.post-autopost .post-link-options{margin-top:18px}.post-options-body{padding:16px}
.post-autopost .post-options-body .tg-inline-grid{margin:0}.post-autopost .tg-recap-preview{max-width:100%;border-radius:10px}
.post-preview-note{padding:14px 18px;color:var(--text-3);font-size:11px;line-height:1.6;border-top:1px solid var(--post-line);margin:0}
@media(max-width:480px){.post-autopost .post-primary>.tg-tabs{gap:8px}.post-autopost .post-primary>.tg-tabs button{padding:12px}.post-autopost .post-primary>.tg-tabs button strong{font-size:12px}.post-autopost .post-primary>.tg-tabs button small{font-size:10px}.post-autopost .post-options-body .tg-inline-grid{grid-template-columns:1fr}}
.cv-frame .cf-frame-head{flex-wrap:wrap;gap:8px}.cv-frame .cf-frame-head .cf-live{flex:1 1 90px;min-width:0;letter-spacing:.1em}.cv-frame .cf-frame-head .cv-seg{width:auto;min-width:max-content;flex:0 0 auto;margin-left:auto}.cv-frame .cf-frame-head .cv-seg button{flex:0 0 auto;min-width:max-content;padding:0 11px}.cv-frame .cf-frame-head .scene-map{flex:0 0 58px;width:58px}
@media(max-width:1100px){.post-workspace .hx-kpis{display:none}.post-workspace .tg-layout,.post-workspace .compose-layout{grid-template-columns:minmax(0,1fr) minmax(290px,.85fr)}.post-workspace .post-primary{padding:18px}.post-actions .compose-send-copy p{max-width:400px}}
@media(max-width:800px){.post-workspace .tg-layout,.post-workspace .compose-layout{grid-template-columns:1fr}.post-workspace .tg-preview-col,.post-workspace .yt-preview,.post-workspace .compose-preview{position:static}.post-workspace .telegram-chat{max-height:480px}.post-workspace .post-actions{top:calc(var(--header-h,56px) + 4px);padding:10px}.post-actions .compose-send-row{flex-wrap:wrap}.post-actions .hx-compose-send-ico{display:none}.post-actions .compose-send-copy{flex-basis:180px}.post-actions .compose-send-copy p{display:none}.post-workspace .post-variable-list button code{display:none}}
@media(max-width:480px){.post-workspace .hx-svc-hero{padding:18px}.post-workspace .post-primary{padding:14px}.post-workspace .post-actions .button{flex:1 1 auto;white-space:normal}.post-workspace .post-primary textarea{font-size:16px;min-height:190px}.post-workspace .telegram-chat{padding:18px 12px}.cv-frame .cf-frame-head .cv-seg{order:3;width:100%;margin:0;justify-content:center}.cv-frame .cf-frame-head .cv-seg button{flex:1 1 auto}.post-workspace .tg-button-row{grid-template-columns:1fr}.post-workspace .tg-button-row>*{min-width:0;max-width:100%}}
@media(prefers-reduced-motion:no-preference){.post-options>summary:after{transition:transform .2s}.post-options[open]>summary:after{transform:rotate(180deg)}}
