/* Telegram-inspired chat view, visual format menu, compact automation editor. */
.simple-stage{max-width:820px;border-radius:12px;background:#dce7d4;border:1px solid #53646e;box-shadow:0 18px 55px #0005}
.simple-chat-header{background:#f7fafc;color:#172e40;border-bottom:1px solid #c6d4db;padding:10px 15px;min-height:58px}
.simple-chat-header small{color:#72899a}.simple-chat-header strong{color:#18384c;font-size:14px}
.simple-chat-avatar{background:linear-gradient(140deg,#5ba2dc,#2a79ae);width:41px;height:41px}
.simple-chat-dot{background:#47b599;box-shadow:none}.simple-chat-back{font-size:32px;font-weight:300;color:#6a91aa;line-height:1;margin-right:4px}
.simple-chat-body{min-height:245px;padding:20px clamp(15px,5vw,45px) 25px;background-color:#dce7d4;background-image:radial-gradient(#a9c8a731 1.5px,transparent 2px),radial-gradient(#bdcdb744 1.5px,transparent 2px);background-size:31px 31px,47px 47px;background-position:0 0,15px 15px}
.simple-message{background:#fff;color:#172d38;max-width:min(94%,640px);padding:13px 13px 9px;border-radius:3px 12px 12px 12px;border:1px solid #e4edf0;box-shadow:0 4px 14px #2b49321b}
.simple-message-input{color:#203644}.simple-message-input:focus{background:#fff}
.message-eyebrow{font-size:9px;margin-bottom:8px;letter-spacing:.7px;color:#7695a5}
.canvas-inline-keyboard{width:min(94%,640px);gap:2px;margin-top:5px}
.canvas-inline-button{background:#f7fafce8;border:1px solid #dce9ef;color:#2686b9;min-height:41px;font-weight:600;border-radius:6px;box-shadow:0 2px 4px #425a5422;transform:none!important}
.canvas-inline-button:hover{background:#edf7fe}.canvas-inline-button.muted-button{background:#eef3f7;color:#5785a1}
.canvas-plus-tile{border-color:#74a4b1;background:#eff8fa80;color:#2b879e}
.tg-composer{background:#fff;border-top:1px solid #dae4eb;display:flex;align-items:center;gap:12px;padding:10px 16px;color:#8aa4b4;min-height:47px;font-size:18px}
.tg-composer span:nth-child(2){font-size:13px;color:#9cadb8;flex:1}
.reply-keyboard{background:#d4dfe7;border-top:1px solid #c6d5dc;padding:9px 12px 12px;min-height:72px}
.reply-keyboard-caption{color:#526f81}.reply-keyboard-caption span{color:#718d9e}
.reply-key,.reply-key-add{color:#304c5f;background:#f8fafc;border:1px solid #d1dbe1;border-radius:6px;box-shadow:0 1px 3px #51636b33}
.reply-key-add{background:#f2f8fc;border-style:dashed;color:#438da8}
.tg-format-float{display:flex;justify-content:center;align-items:center;gap:2px;padding:5px;background:#293544;color:#eef6ff;border-radius:11px;box-shadow:0 8px 18px #0004;margin:4px auto 11px;width:max-content;max-width:100%;flex-wrap:wrap}
.tg-format-float[hidden]{display:none!important}
.tg-format-float button{background:transparent;border:0;color:#f6f8fd;cursor:pointer;border-radius:7px;min-width:32px;height:32px;font-size:13px}
.tg-format-float button:hover,.tg-format-float button:focus{background:#516477}
.tg-spoiler{background:#bac5cf;color:transparent;border-radius:3px;cursor:help}.tg-spoiler:hover{color:#1d2c37}
.workflow-intro{border:1px dashed #59708b;border-radius:12px;padding:12px;margin:12px 0}.workflow-intro p{font-size:11px;margin:5px 0 0}
.workflow-builder{border:1px solid #455c76;border-radius:14px;overflow:hidden;margin:12px 0;background:#1a293a}
.workflow-header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 13px;background:#243751;color:#eef7ff}
.workflow-section{padding:13px;border-bottom:1px solid #344962;display:grid;gap:10px}
.workflow-section h4{color:#c0b9ff;font-size:12px;letter-spacing:.5px;margin:0}
.workflow-section h4 small{font-size:11px;color:#a2b1c3;font-weight:400;letter-spacing:0;margin-left:5px}
.workflow-entry{border:1px solid #39516d;background:#1f3145;border-radius:9px;padding:9px;display:grid;gap:8px}
.workflow-entry-row{display:flex;gap:6px;align-items:center}.workflow-entry-row .input{flex:1;min-width:0}
.workflow-entry-row button{border:0;background:#344760;color:#dce9f5;border-radius:7px;font-size:18px;min-width:33px;height:35px}
.workflow-number{border-radius:100%;background:#445474;color:#e8f3fe;display:grid;place-items:center;min-width:23px;height:23px;font-size:11px}
.workflow-add{padding:9px 12px;border:1px dashed #6f87a3;background:#263e58;color:#d8e8f8;border-radius:8px;font-weight:600}
.workflow-builder .field{margin:0}.workflow-builder .field span{font-size:11px}
.workflow-builder .input{font-size:12px;padding:9px}.workflow-and-row .input{width:100%}
@media(max-width:680px){.simple-chat-header{padding:9px}.simple-message{max-width:99%}.canvas-inline-keyboard{width:99%}.simple-chat-body{padding:12px 10px}.workflow-header{padding:10px}.workflow-section{padding:10px}}
/* R8: Pages and routes are separate; selecting a page never opens settings. */
.page-nav{display:grid;gap:7px}.page-nav-caption{font-size:10px;letter-spacing:.12em;font-weight:800;color:#91a2b9;display:flex;justify-content:space-between;padding:5px 7px}
.page-entry{border-radius:11px;background:#1b293b;border:1px solid #344256;overflow:hidden}
.page-entry .page-select{width:100%;padding:12px 11px;border-radius:0;display:flex;align-items:center;gap:9px}
.page-entry .page-select.active{background:#29456a;color:#eefaff}
.page-branches{padding:3px 10px 8px 21px;border-top:1px solid #3a4c63;background:#202e43}
.page-branch{display:flex;align-items:center;gap:7px;font-size:11px;line-height:1.5;padding:5px 0;color:#afbed1;min-width:0}
.page-corner{color:#72a9db;font-size:18px}.page-route-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:600;color:#f0f5fb}
.page-branch-dest{margin-left:auto;color:#8db5ce;font-size:10px;white-space:nowrap;max-width:42%;text-overflow:ellipsis;overflow:hidden}.muted-branch{opacity:.65;font-style:italic}
.page-new{width:100%;padding:13px;background:#293a54;border:1px dashed #728baa;border-radius:10px;color:#eef6ff;cursor:pointer;font-weight:700}
.page-new:hover{background:#344d6d}
.canvas-button-wrap{position:relative;display:flex;width:100%}.canvas-button-wrap>.canvas-inline-button{flex:1;min-width:0}
.canvas-button-edit{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:0;background:#e0eff7;color:#1c719d;font-size:14px;cursor:pointer;width:30px;height:30px;border-radius:6px}
.canvas-button-wrap .canvas-inline-button{padding-right:42px}
.reply-key-wrap{display:flex;position:relative;flex:1;min-width:0}.reply-key-wrap>.reply-key{flex:1;min-width:0;padding-right:35px}
.reply-key-edit{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:0;background:#e1eef6;color:#386b8c;cursor:pointer;width:25px;height:29px;border-radius:5px}
.flow-advanced[open]{padding-bottom:10px}.flow-advanced-filters{display:grid;gap:12px;padding:14px}
@media(max-width:680px){.page-branch-dest{max-width:38%}.canvas-button-edit{opacity:1}}
.simple-message-input{min-height:86px;max-height:310px;resize:vertical}
@media(max-width:740px){.simple-screens{order:1}.simple-canvas{order:2}.simple-screens .page-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.page-nav-caption,.page-new{grid-column:1/-1}.page-entry .page-select{padding:9px 7px}.page-branches{padding:4px 5px 7px}.page-branch-dest{display:none}}
/* R8.1: clickable preview buttons expose simple actions; only tiny navigation icons switch screens. */
.page-nav{gap:8px}.page-entry{background:#1e2b3d;transition:background .16s}.page-entry:hover{background:#263952}
.page-entry .page-select{padding:12px 13px;min-height:48px}.page-entry .page-select.active{background:#2d486b}
.screen-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.screen-current-dot{font-size:7px;color:#65d3aa;margin-left:auto}.simple-rail-hint{line-height:1.5}
.canvas-button-wrap{position:relative;min-width:0}.canvas-button-wrap>.canvas-inline-button{padding:9px 40px 9px 10px;flex:1;min-width:0;justify-content:center}
.canvas-button-navigate,.reply-key-navigate{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:1px solid #cfdfec;background:#edf6fb;color:#267caf;cursor:pointer;border-radius:7px;min-width:29px;height:29px;display:grid;place-items:center;font-size:16px;line-height:1;z-index:2}
.canvas-button-navigate:hover,.reply-key-navigate:hover{background:#d9edf8;color:#115c85}
.reply-key-wrap>.reply-key{padding:9px 37px 9px 9px}.reply-key-navigate{right:5px;min-width:27px;height:27px}
.button-quick-menu{position:absolute;left:50%;top:calc(100% + 7px);transform:translateX(-50%);z-index:70;background:#fff;border:1px solid #d2dce4;box-shadow:0 18px 40px #1e345044,0 3px 8px #243c4c22;border-radius:15px;padding:6px;min-width:min(275px,85vw);max-width:90vw;color:#293b4d;display:grid;gap:2px;text-align:left}
.button-quick-menu:before{content:'';position:absolute;top:-6px;left:calc(50% - 5px);height:10px;width:10px;background:#fff;border-top:1px solid #d2dce4;border-left:1px solid #d2dce4;transform:rotate(45deg)}
.button-quick-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e9edf3;padding:8px 7px 9px;margin-bottom:3px;gap:5px}.button-quick-head strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;color:#5c6b7c}.button-quick-head button{border:0;background:#edf2f6;color:#38526b;border-radius:50%;width:27px;height:27px;font-size:19px;cursor:pointer}
.button-quick-menu>button{border:0;border-radius:9px;background:transparent;color:#263e53;text-align:left;font-size:13px;font-weight:600;padding:10px 12px;display:flex;align-items:center;gap:9px;cursor:pointer;min-height:41px}
.button-quick-menu>button:hover,.button-quick-menu>button:focus-visible{background:#eef5fa}.button-quick-menu .quick-delete{color:#a54c57;border-top:1px solid #e9edf3;border-radius:0 0 8px 8px;margin-top:3px}
.screen-picker-wrap{margin-left:auto;position:relative;z-index:90}.chat-screen-switcher{display:flex;align-items:center;justify-content:center;gap:6px;background:#e4eff5;border:1px solid #d2e3ee;border-radius:9px;color:#23648b;padding:8px 10px;cursor:pointer;font-size:12px;font-weight:700}.chat-screen-switcher:hover{background:#d4e9f7}
.screen-picker-popover{position:absolute;right:0;top:calc(100% + 5px);z-index:99;width:min(270px,80vw);max-height:290px;overflow:auto;background:#fff;color:#263b4f;border:1px solid #d5e1eb;box-shadow:0 15px 38px #15283b30;border-radius:12px;display:grid;gap:2px;padding:7px}
.screen-picker-popover button{border:0;background:transparent;color:#2c4c67;text-align:left;padding:11px 10px;border-radius:7px;cursor:pointer;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.screen-picker-popover button:hover{background:#edf4fb}.screen-picker-popover button.current{background:#e0effb;font-weight:800}
@media(max-width:680px){.button-quick-menu{left:8px;transform:none;min-width:min(270px,82vw)}.button-quick-menu:before{left:22px}.chat-screen-switcher span{display:none}.simple-rail-hint{font-size:11px}}

/* Keep lightweight menus visible beyond chat rows and improve mobile editing order. */
.simple-stage{overflow:visible}.simple-chat-header{border-radius:12px 12px 0 0}.reply-keyboard{border-radius:0 0 12px 12px}
@media(max-width:740px){.simple-canvas{order:1}.simple-screens{order:2}.button-quick-menu{max-width:calc(100vw - 48px)}.simple-editor-grid{gap:13px}}
/* R9 — page-first editor, independently editable Telegram messages. */
.page-nav{display:block}.page-tree-root,.page-tree-row{display:flex;align-items:center;gap:6px;min-height:43px;border:1px solid #344760;border-radius:10px;background:#1e2e44;margin:3px 0;padding:3px 6px;position:relative}
.page-tree-root{padding:4px}.page-tree-root>.screen-link,.page-tree-row>.screen-link{flex:1;width:auto;min-width:0;text-align:left;min-height:37px;padding:8px;border-radius:8px;font-size:12px}
.page-tree-row .page-select.active,.page-tree-root .page-select.active{background:#31547f;color:#fff}
.page-tree-children{margin-left:19px;padding-left:13px;border-left:2px solid #6c87a7}.page-tree-node{min-width:0;position:relative}.page-tree-children .page-tree-node:before{content:'';position:absolute;left:-13px;top:20px;width:12px;border-top:2px solid #6c87a7}
.page-grip{color:#9fb2ca;font-size:18px;cursor:grab;user-select:none}.page-tree-row:active .page-grip{cursor:grabbing}
.tree-expander,.tree-expander-spacer{color:#9fc9ed;border:0;background:transparent;min-width:18px;padding:4px;cursor:pointer;font-size:13px;text-align:center}
.tree-drag-hint{color:#6984a3;padding-right:4px;font-size:11px}.page-tree-help{font-size:10px;line-height:1.55;color:#a3b7d0;margin:11px 4px 13px}
.page-tree-row.drag-inside,.page-tree-root.drag-inside{outline:2px solid #60b4ed;background:#28476b}.page-tree-row.drag-before{border-top:3px solid #67d8ff}.page-tree-row.drag-after{border-bottom:3px solid #67d8ff}.page-tree-row.is-dragging{opacity:.5}
.page-new{margin-top:4px}
.screen-message-sequence{display:grid;gap:0}.screen-message-unit{display:grid;gap:4px;position:relative;margin-top:5px}.screen-message-unit .simple-message{max-width:min(94%,640px);width:100%;margin:0}
.screen-message-unit .canvas-inline-keyboard{margin-top:0;width:min(94%,640px)}.screen-message-unit .canvas-inline-button{padding:8px 12px;min-height:39px}
.screen-message-unit .simple-message-input{min-height:80px;width:100%}.screen-message-unit .message-helper{display:flex;align-items:center;justify-content:space-between;padding-top:6px;font-size:10px;color:#6c8496}
.screen-message-unit .mini-message-remove{border:0;background:#eff4f7;color:#687b88;cursor:pointer;padding:5px 9px;border-radius:6px}
.screen-insert-slot{display:flex;justify-content:flex-start;align-items:center;padding:12px 0 10px 20px;max-width:min(94%,640px);position:relative}
.screen-insert-slot:before{content:'';position:absolute;left:34px;top:0;height:100%;border-left:1px dashed #7d9d99;z-index:0}
.screen-insert-slot button{position:relative;z-index:1;border:1px dashed #82aab0;color:#2b7c8f;background:#ecfafafa;width:30px;height:30px;border-radius:50%;font-size:20px;font-weight:600;cursor:pointer;box-shadow:0 2px 8px #375d4e1d}
.screen-insert-slot button:hover{background:#ddf3fa}
.screen-timeline-chip{display:flex;align-items:center;gap:9px;background:#f2f8f7e8;color:#3f6671;border-radius:13px;padding:10px 13px;width:max-content;max-width:95%;margin:7px 0;font-size:12px;border:1px dashed #b5cbd0}
.screen-timeline-chip input{max-width:65px;padding:5px 6px;background:white;color:#30475b;height:30px}
.screen-timeline-chip button{margin-left:auto;border:0;background:#e5eeee;color:#5f727f;border-radius:50%;width:24px;height:24px;cursor:pointer}
.page-choice-modal{max-height:min(85vh,690px);display:flex;flex-direction:column;overflow:hidden}.page-choice-list{display:grid;gap:5px;overflow-y:auto;max-height:420px;margin:12px 0;padding-right:5px}
.page-choice-list>button{display:flex;align-items:center;gap:10px;text-align:left;padding:13px;border:1px solid #3c5268;background:#22344b;color:#e4f1ff;border-radius:11px;cursor:pointer;font-size:13px;font-weight:600}
.page-choice-list>button:hover{background:#335377}.page-choice-list>button span:nth-last-child(1){margin-left:auto}.page-choice-icon{background:#324e6f;border-radius:8px;padding:8px}
.screen-config-details{margin:14px 0 18px;border:1px solid #526a84;border-radius:13px;background:#162434;overflow:hidden}.screen-config-details>summary{padding:14px 16px;cursor:pointer;color:#dfeaf8;display:flex;align-items:center;gap:7px;font-weight:700}
.screen-config-details>summary span{margin-left:auto;color:#8cabc4}.screen-config-details[open]>summary{border-bottom:1px solid #425c79;background:#20344e}
.screen-config-body{padding:14px;display:grid;gap:12px}.screen-config-body>.field{margin:0}.screen-config-body .advanced-details{background:#1d2b3e;border:1px solid #344b65;border-radius:9px;margin:0;padding:0}
.screen-config-body .advanced-details>summary{padding:11px 12px;font-size:12px;cursor:pointer}.page-function-settings{display:grid;gap:12px}.page-function-settings .advanced-body{padding:12px;display:grid;gap:10px}
.screen-config-body .action-panel{padding:12px;margin:0}.screen-config-body .workflow-builder{margin:0}
.page-function-settings .field{margin:0}.page-function-settings .input{width:100%}
@media(max-width:740px){.simple-screens{order:2}.simple-canvas{order:1}.simple-screens .page-nav{display:block}.page-tree-children{margin-left:13px;padding-left:10px}.screen-message-unit .simple-message,.screen-message-unit .canvas-inline-keyboard{max-width:100%;width:100%}.screen-insert-slot{padding-left:11px}.screen-insert-slot:before{left:25px}.page-choice-list{max-height:50vh}}
.screen-message-unit .canvas-inline-keyboard{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:3px}
.screen-message-unit .canvas-inline-button{width:100%;font-weight:650}
.screen-message-unit .canvas-plus-tile{min-height:40px;max-width:75px;justify-self:start;border-radius:8px}
.message-media-details{color:#47708b;font-size:11px;margin:2px 0 5px;background:#e9f1f4;border-radius:8px;padding:5px 8px}
.message-media-details summary{cursor:pointer;font-weight:650;padding:5px;color:#3a759a}.message-media-details .field{margin:8px 0;color:#374f64}.message-media-details input,.message-media-details select{background:white;color:#293c52;font-size:12px;padding:8px;width:100%}

/* R10 — Telegram-style chat surface and interactive draft simulator. */
.r10-editor .simple-stage.telegram-simulator{max-width:660px;overflow:visible;background:#dce5d6;border:1px solid #b5c6d0;border-radius:14px;box-shadow:0 10px 35px #070f1928;color:#1b2e39}
.r10-editor .simple-chat-header{position:relative;z-index:60;display:flex;gap:10px;min-height:59px;padding:7px 11px;background:#fff;border-bottom:1px solid #e2e9ee;border-radius:14px 14px 0 0}
.r10-editor .simple-chat-back{appearance:none;border:0;background:transparent;cursor:pointer;color:#829cad;border-radius:50%;font-size:33px;line-height:1;width:35px;height:40px;padding:0;display:grid;place-items:center;flex:none;transition:background .12s}
.r10-editor .simple-chat-back:hover{background:#eaf1f8;color:#3684bd}
.r10-editor .simple-chat-avatar{width:41px;height:41px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:22px;background:linear-gradient(135deg,#70befb,#2683c5)}
.r10-editor .tg-chat-identity{min-width:0;display:grid;align-content:center;gap:2px}
.r10-editor .tg-chat-identity strong{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:14px;color:#172c3c}
.r10-editor .tg-chat-identity small{color:#6f9fb9;font-size:11px}
.r10-editor .screen-picker-wrap{display:flex;gap:5px;align-items:center}
.r10-editor .chat-screen-switcher,.r10-editor .tg-sound-btn{min-width:34px;height:34px;border:0;border-radius:50%;background:transparent;color:#668fac;cursor:pointer;display:grid;place-items:center;font-size:19px;padding:0}
.r10-editor .tg-sound-btn{font-size:16px}.r10-editor .chat-screen-switcher:hover,.r10-editor .tg-sound-btn:hover{background:#eaf3f8}
.r10-editor .simple-chat-body{height:clamp(340px,58vh,560px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;position:relative;padding:13px 14px 22px;background-color:#d7e4d8;background-image:radial-gradient(ellipse at 7% 24%,#d8e9cf 0 3%,transparent 3.1%),radial-gradient(ellipse at 85% 81%,#c5dbc5 0 2.5%,transparent 2.6%),linear-gradient(140deg,#dce9da,#d5e3dd 48%,#e4e9d9);background-size:180px 170px,220px 220px,cover}
.r10-editor .tg-day-label{font-size:10px;font-weight:600;letter-spacing:.2px;color:#fff;text-align:center;background:#99b1b0b0;border-radius:13px;width:max-content;max-width:140px;padding:4px 12px;margin:0 auto 16px}
.r10-editor .screen-message-unit.tg-edit-unit{gap:0;max-width:370px;min-width:0;margin:9px 0 2px;position:relative}
.r10-editor .tg-message-preview{position:relative;width:max-content;max-width:100%;min-width:62px}
.r10-editor .tg-bubble{position:relative;min-width:65px;max-width:min(335px,100%);width:max-content;padding:8px 11px 6px;background:#fff;color:#162c38;border-radius:4px 12px 12px 12px;box-shadow:0 1px 3px #334f5130;font-size:13px;line-height:1.38;overflow-wrap:anywhere}
.r10-editor .tg-bubble p{margin:0}.r10-editor .tg-bubble-content{white-space:normal;min-width:0}.r10-editor .tg-bubble-content a{color:#188ace;text-decoration:underline}.r10-editor .tg-bubble-content blockquote{border-left:3px solid #5b9bbc;margin:4px 0;padding:3px 8px;color:#426279;background:#e8f2f8}
.r10-editor .tg-bubble-meta{display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-top:3px;color:#8c9ca6;font-size:9px;line-height:1;white-space:nowrap}
.r10-editor .tg-double-check{color:#57a1d0;font-size:13px;font-weight:700;letter-spacing:-4px;padding-right:4px}
.r10-editor .tg-bubble.tg-sim-outgoing{background:#e3ffdb;border-radius:12px 4px 12px 12px}
.r10-editor .tg-sim-outgoing .tg-bubble-meta{color:#7caa7a}
.r10-editor .tg-media{display:block;max-width:300px;max-height:270px;width:auto;height:auto;border-radius:8px;margin-bottom:5px;object-fit:cover}
.r10-editor .tg-media-file{background:#e9f2f8;border-radius:8px;padding:9px;margin-bottom:6px;font-size:11px}.r10-editor .tg-media-file a{color:#298dcc}
.r10-editor .screen-message-unit .canvas-inline-keyboard{width:min(100%,335px);grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;margin:3px 0 0}
.r10-editor .screen-message-unit .canvas-inline-button,.r10-editor .screen-message-unit .canvas-plus-tile{background:#f7fcffdb;color:#2789c0;border:0;border-radius:5px;min-height:33px;height:auto;padding:6px 8px;font-size:11px;font-weight:600;box-shadow:0 1px 2px #174b6330}
.r10-editor .canvas-inline-button:hover,.r10-editor .canvas-plus-tile:hover{background:#e5f5ff}
.r10-editor .screen-message-unit .canvas-plus-tile{border:1px dashed #83b5cd;max-width:75px}
.r10-editor .tg-message-edit-trigger{position:absolute;top:2px;right:-35px;border:0;background:#f8fcffdc;border-radius:50%;width:29px;height:29px;color:#408ab3;cursor:pointer;box-shadow:0 2px 6px #25455822;font-size:15px;display:grid;place-items:center;opacity:.72}
.r10-editor .tg-message-edit-trigger:hover,.r10-editor .tg-message-edit-trigger:focus{opacity:1;background:#fff}
.r10-editor .tg-floating-editor{position:relative;z-index:25;max-width:370px;min-width:min(310px,100%);width:100%;margin:9px 0 6px;padding:11px;background:#fff;border-radius:12px;border:1px solid #b5d6e9;box-shadow:0 10px 29px #243d5270;color:#29445a}
.r10-editor .tg-floating-editor:before{content:"";position:absolute;top:-6px;left:15px;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff}
.r10-editor .tg-floating-editor-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;font-size:11px;color:#56839e}
.r10-editor .tg-floating-editor-header button{border:0;background:transparent;color:#7894a7;font-size:23px;line-height:1;cursor:pointer}
.r10-editor .tg-edit-text{display:block;box-sizing:border-box;width:100%;resize:vertical;min-height:70px;max-height:180px;border:1px solid #c8dde9;border-radius:8px;background:#f9fcff;color:#20374d;padding:9px 10px;font:13px/1.45 inherit;outline:none;scrollbar-width:thin}
.r10-editor .tg-edit-text:focus{border-color:#50a3d9;box-shadow:0 0 0 2px #80c6f733}
.r10-editor .tg-edit-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}
.r10-editor .tg-edit-tools .tg-edit-done{border:0;background:#309ddd;color:#fff;border-radius:8px;padding:8px 15px;font-size:12px;font-weight:650;cursor:pointer}
.r10-editor .tg-edit-tools .tg-media-tool{font-size:11px;color:#537b96;position:relative;flex:1}
.r10-editor .tg-media-tool summary{cursor:pointer;width:max-content;padding:7px;border-radius:7px;list-style:none}
.r10-editor .tg-media-tool[open]{display:grid;gap:6px}.r10-editor .tg-media-tool label{display:grid;gap:3px;font-size:11px}
.r10-editor .tg-media-tool .input{background:#fff;color:#243c53;padding:6px;font-size:11px;width:100%}
.r10-editor .tg-floating-editor .tg-format-float{position:relative;z-index:1;display:flex;align-items:center;gap:1px;flex-wrap:nowrap;max-width:100%;overflow-x:auto;scrollbar-width:none;margin:0 0 8px;padding:4px;border-radius:9px;background:#263a4c;box-shadow:0 4px 12px #15253633}
.r10-editor .tg-floating-editor .tg-format-float button{min-width:27px;width:28px;height:29px;font-size:12px;padding:0}
.r10-editor .tg-chat-history{display:flex;flex-direction:column;gap:8px;align-items:stretch;padding-top:2px}
.r10-editor .tg-chat-line{display:flex;flex-direction:column;gap:3px;max-width:100%;align-items:flex-start}
.r10-editor .tg-chat-line.outgoing{align-items:flex-end}
.r10-editor .tg-chat-line .tg-bubble{max-width:min(335px,85vw)}
.r10-editor .tg-sim-inline-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;width:min(335px,86%)}
.r10-editor .tg-sim-inline-row button{background:#f8fcffee;color:#268ac2;border:0;border-radius:5px;min-height:32px;font-size:11px;font-weight:650;cursor:pointer;padding:6px}
.r10-editor .tg-sim-inline-row button:active,.r10-editor .tg-live-keyboard button:active{transform:scale(.98);background:#d5ebfa}
.r10-editor .tg-sim-notice{text-align:center;align-self:center;max-width:min(310px,95%);background:#91a4a4bc;color:#fff;border-radius:15px;padding:7px 12px;font-size:10px;line-height:1.45}
.r10-editor .tg-typing-bubble{display:flex;gap:3px;background:#fff;border-radius:13px 13px 13px 3px;padding:12px 14px;width:max-content;box-shadow:0 1px 3px #2a53602a}
.r10-editor .tg-typing-bubble i{width:6px;height:6px;background:#79a4bc;border-radius:50%;animation:tgTyping 1s infinite alternate}.r10-editor .tg-typing-bubble i:nth-child(2){animation-delay:.2s}.r10-editor .tg-typing-bubble i:nth-child(3){animation-delay:.4s}
@keyframes tgTyping{to{opacity:.2;transform:translateY(-3px)}}
.r10-editor .tg-composer{margin:0;min-height:48px;display:flex;align-items:center;padding:6px 10px;gap:8px;background:#f7fbfd;border:0;border-top:1px solid #d7e3eb;border-radius:0}
.r10-editor .tg-composer input{font:13px/1.3 inherit;border:0;outline:none;background:#fff;border-radius:22px;flex:1;min-width:0;min-height:35px;color:#294459;padding:8px 14px}
.r10-editor .tg-composer input:disabled{background:#f0f4f6;color:#71899a;cursor:default}
.r10-editor .tg-composer button{border:0;cursor:pointer;display:grid;place-items:center;flex:none;border-radius:50%;min-width:32px;height:32px}
.r10-editor .tg-composer .tg-emoji{font-size:23px;color:#8a9fad;background:transparent}
.r10-editor .tg-composer .tg-send{color:#fff;background:#339bd7;font-size:18px}
.r10-editor .tg-composer .tg-send:disabled{opacity:.45;cursor:default}
.r10-editor .reply-keyboard{padding:7px 10px 10px;min-height:52px;background:#d9e4e9;border-top:1px solid #cbdae1;border-radius:0 0 14px 14px}
.r10-editor .reply-keyboard-caption{font-weight:600;font-size:10px;margin-bottom:5px;color:#67879e}.r10-editor .reply-keyboard-caption span{font-size:9px}
.r10-editor .reply-key,.r10-editor .reply-key-add{min-height:35px;border:0;border-radius:6px;background:#fafcfe;color:#3e6178;font-size:11px;box-shadow:0 1px 2px #61768933}
.r10-editor .tg-live-keyboard{padding:7px 10px 10px;background:#dde7ed;border-top:1px solid #cadbe3;border-radius:0 0 14px 14px;display:grid;gap:5px}
.r10-editor .tg-live-keyboard-row{display:flex;gap:5px}.r10-editor .tg-live-keyboard button{flex:1;border:0;border-radius:6px;min-height:36px;background:#fff;color:#365b74;box-shadow:0 1px 3px #496b8033;cursor:pointer;font-size:12px}
.r10-editor .simple-hint{font-size:11px}
@media(max-width:740px){
  .r10-editor .simple-stage.telegram-simulator{max-width:100%}
  .r10-editor .simple-chat-body{height:clamp(360px,55vh,580px);padding:12px 11px}
  .r10-editor .tg-bubble{max-width:min(305px,81vw);font-size:13px}
  .r10-editor .tg-chat-line .tg-bubble{max-width:80vw}
  .r10-editor .screen-message-unit.tg-edit-unit{max-width:calc(100% - 22px)}
  .r10-editor .tg-floating-editor{width:min(100%,360px);min-width:0}
  .r10-editor .tg-sim-inline-row{width:min(320px,86%)}
}
@media(prefers-reduced-motion:reduce){.r10-editor .tg-typing-bubble i{animation:none}}

/* R11 — compact, phone-width editing and one contextual circular add action for buttons. */
.r10-editor .simple-stage.telegram-simulator{width:min(100%,365px);max-width:365px;margin:0 auto;border:5px solid #263646;border-radius:29px;box-shadow:0 14px 32px #0003;overflow:visible}
.r10-editor .simple-chat-header{min-height:51px;padding:5px 8px;border-radius:23px 23px 0 0}
.r10-editor .simple-chat-avatar{width:34px;height:34px;font-size:18px}
.r10-editor .simple-chat-body{height:clamp(300px,52vh,540px);padding:9px 10px 15px}
.r10-editor .reply-keyboard,.r10-editor .tg-live-keyboard{border-radius:0 0 23px 23px}
.r10-editor .simple-heading.tg-compact-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 0 10px;max-width:420px;margin:0 auto}
.r10-editor .tg-compact-heading h2{font-size:17px;margin:2px 0}
.r10-editor .tg-edit-screen-button{border:1px solid #41576f;background:#1c3046;color:#d4e8fa;border-radius:18px;padding:7px 11px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.r10-editor .tg-edit-screen-button:hover{background:#2b4767}
.r10-editor .tg-screen-tools{width:min(100%,365px);margin:12px auto 0;display:flex;flex-wrap:wrap;gap:7px;align-items:center;justify-content:space-between}
.r10-editor .tg-add-message-control{background:#1c3046;border:1px solid #476680;color:#d4e8fa;border-radius:11px;padding:9px 10px;font-size:11px;font-weight:650;cursor:pointer}
.r10-editor .tg-add-message-control:hover{background:#274562}
.r10-editor .tg-screen-tools>span{font-size:10px;color:#8eacc0}
.r10-editor .screen-config-details{width:min(100%,480px);margin:14px auto 15px}
.r10-editor .tg-edit-button-rows{width:min(100%,330px);display:flex;flex-direction:column;gap:3px}
.r10-editor .tg-edit-button-row{display:flex;align-items:stretch;gap:3px;min-height:33px}
.r10-editor .tg-edit-button-row .canvas-button-wrap,.r10-editor .tg-edit-button-row .reply-key-wrap{min-width:0;flex:1;position:relative}
.r10-editor .tg-edit-button-row .canvas-inline-button,.r10-editor .tg-edit-button-row .reply-key{width:100%;height:100%;min-height:33px;padding:6px 18px 6px 8px;word-break:break-word}
.r10-editor .tg-edit-button-row .tg-round-add{display:grid;place-items:center;width:32px;height:32px;min-width:32px;max-width:32px;align-self:center;flex:0 0 32px;border-radius:50%;border:1px solid #86b5cc;background:#eefaff;color:#2683b4;font-size:21px;font-weight:600;line-height:1;cursor:pointer;box-shadow:0 1px 3px #174b6330;padding:0}
.r10-editor .tg-edit-button-row .tg-round-add:hover,.r10-editor .tg-edit-button-row .tg-round-add:focus-visible{background:#d6f1fe;border-color:#308fbd}
.r10-editor .tg-edit-button-row .tg-button-remove{position:absolute;top:0;right:0;z-index:3;width:16px;height:16px;padding:0;border-radius:0 5px 0 6px;background:#e6edf2;border:0;color:#6a7580;font-size:13px;font-weight:700;line-height:1;cursor:pointer}
.r10-editor .tg-edit-button-row .tg-button-remove:hover{background:#fce0df;color:#be3434}
.r10-editor .tg-edit-button-row .button-quick-menu{z-index:45}
.r10-editor .screen-message-unit .canvas-inline-keyboard{display:flex;max-width:335px;grid-template-columns:none;width:min(100%,335px);margin-top:3px}
.r10-editor .screen-message-sequence .tg-message-more{display:block;margin:0 0 4px 6px;background:transparent;color:#5c8797;cursor:pointer;border:0;border-radius:10px;font-size:16px;line-height:1;letter-spacing:1px;padding:3px 9px;width:max-content}
.r10-editor .screen-message-sequence .tg-message-more:hover{background:#c2d6dc}
.r10-editor .screen-insert-slot{display:none}
.r10-editor .tg-message-edit-trigger{right:-27px;width:24px;height:24px;font-size:13px}
.r10-editor .tg-bubble{font-size:12px;max-width:min(295px,100%);padding:7px 9px 5px}
.r10-editor .tg-chat-line .tg-bubble{max-width:min(295px,85%)}
.r10-editor .tg-sim-inline-row{width:min(295px,86%)}
.r10-editor .tg-floating-editor{max-width:min(310px,calc(100vw - 58px));min-width:0}
.r10-editor .simple-chat-header .tg-chat-identity strong{max-width:144px}
@media(max-width:740px){.r10-editor .simple-stage.telegram-simulator{max-width:min(365px,100%)}.r10-editor .simple-chat-body{height:clamp(295px,50vh,470px);padding:9px 9px 12px}.r10-editor .tg-bubble{font-size:12px}.r10-editor .tg-floating-editor{width:100%}.r10-editor .tg-compact-heading{padding:4px 2px 9px}.r10-editor .simple-stage .tg-chat-line .tg-bubble{max-width:85%}}
@media(max-width:430px){.main{padding:13px 12px}.simple-topline .simple-name h1{font-size:21px;margin:4px 0}.simple-topline .simple-name p{display:none}.simple-topline .simple-name .eyebrow{font-size:10px}.simple-topline{gap:8px}.simple-save-actions{margin-top:2px}.simple-editor-grid{margin-top:9px}.simple-editor{padding:10px}.simple-toolbar{margin:0 0 6px;padding:0}.r10-editor .simple-chat-body{height:clamp(250px,40vh,340px)}.r10-editor .simple-stage.telegram-simulator{max-width:min(342px,100%)}.r10-editor .tg-add-message-control{padding:7px 9px}.r10-editor .tg-screen-tools>span{display:none}}
