.tg-channel{max-width:640px;width:100%;box-sizing:border-box}.tg-channel form{display:grid;gap:16px}.tg-channel .tg-options{display:flex;gap:10px 18px;flex-wrap:wrap}.tg-channel .tg-options label{display:flex;align-items:center;gap:6px;font-size:13px}.tg-channel .tg-options input{width:auto;margin:0}.tg-preview-card{margin-top:20px;border:1px solid #e3e8f1;border-radius:16px;overflow:hidden;background:#fff;max-width:420px;box-shadow:0 8px 26px #25375a0a}.tg-preview-card img{width:100%;aspect-ratio:1;object-fit:cover;display:block}.tg-preview-card #tg-text{padding:20px;font-size:14px;line-height:1.65;overflow-wrap:anywhere;white-space:normal}.tg-channel #tg-destination{font-size:13px;font-weight:600}.tg-channel #tg-setup,.tg-channel #tg-recovery{background:#f8f9fc;border:1px solid #e6e9f2;padding:16px;border-radius:12px;font-size:13px;line-height:1.65}.tg-channel #tg-setup ol{padding-left:20px}.tg-channel textarea{resize:vertical}.club-detail-head [data-telegram-club]{white-space:nowrap}@media(max-width:700px){.tg-channel{min-width:0}.tg-preview-card{max-width:100%}.club-detail-head [data-telegram-club]{font-size:12px;padding:8px 10px}}
dialog:has(.tg-channel){width:min(560px,calc(100vw - 32px));max-width:calc(100vw - 32px)}dialog:has(.tg-channel #tg-preview-box:not([hidden])){width:min(900px,calc(100vw - 32px))}.tg-channel:has(#tg-preview-box:not([hidden])){max-width:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 28px;align-items:start}.tg-channel:has(#tg-preview-box:not([hidden])) #tg-connection{grid-column:1/-1;margin:0}.tg-channel:has(#tg-preview-box:not([hidden])) #tg-compose{grid-column:1;grid-row:2}.tg-channel:has(#tg-preview-box:not([hidden])) #tg-preview-box{grid-column:2;grid-row:2/5}.tg-channel #tg-error:empty{display:none}.tg-channel #tg-recovery{grid-column:1/-1}.tg-preview-card{margin-top:0}.tg-channel .field>span{display:block;font-size:12px;font-weight:400;margin-top:4px}.tg-channel .field{margin:0}@media(max-width:700px){.tg-channel:has(#tg-preview-box:not([hidden])){display:block}.tg-channel #tg-preview-box{margin-top:20px}.tg-channel #tg-connection{margin-bottom:16px!important}.tg-channel .tg-options{gap:12px}.tg-preview-card{width:100%}}
.tg-preview-card img{height:200px;aspect-ratio:auto;object-fit:contain;background:#f8f9fc;padding:12px;box-sizing:border-box}.tg-preview-card #tg-text{padding:16px;font-size:13px;line-height:1.5}

/* The preview uses the exact framed image sent to Telegram. */
.tg-preview-card img{height:auto;aspect-ratio:8/5;object-fit:contain;background:#fff;padding:0}

.tg-preview-card img{aspect-ratio:1;height:auto;padding:0;background:#f7e9ef}.tg-offer-button{display:flex;align-items:center;justify-content:center;padding:13px 16px;border-top:1px solid #e4e8ef;background:#f3f6fc;color:#396382;text-decoration:none;font-size:12px;font-weight:750;letter-spacing:.3px}.tg-offer-button:hover{background:#eaf0fa}.tg-preview-card #tg-text{color:#202631;line-height:1.5}.tg-preview-card #tg-text b{font-weight:700}

/* Telegram simulation: preview only, no fabricated views or delivery status. */
.tg-telegram-window{border:1px solid #dbe3e9;border-radius:15px;overflow:hidden;background:#fff;box-shadow:0 8px 24px #2039470b}.tg-app-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fff}.tg-app-avatar{display:grid;place-items:center;background:#2aabee;color:#fff;width:36px;height:36px;border-radius:50%;flex:none}.tg-app-avatar svg{width:23px;height:23px}.tg-app-head strong{display:block;font-size:13px;color:#223444;line-height:1.4}.tg-app-head span:not(.tg-app-avatar){display:block;font-size:11px;color:#8c9ba6;margin-top:2px}.tg-chat-background{padding:12px;background-color:#dce7c9;background-image:radial-gradient(ellipse at 10% 20%,#f7f2c9aa,transparent 60%),radial-gradient(ellipse at 100% 80%,#a6cdbdaa,transparent 65%);}.tg-telegram-window .tg-preview-card{border:0;border-radius:10px;box-shadow:0 1px 2px #314e4920;overflow:hidden;max-width:none}.tg-post-author{padding:9px 11px 7px;font-size:12px;font-weight:700;color:#2699c9;background:#fff}.tg-telegram-window .tg-preview-card #tg-text{padding:10px 11px 3px;font-size:13px;color:#17212b;line-height:1.45}.tg-post-meta{font-size:10px;color:#96a3ab;text-align:right;padding:4px 10px 7px}.tg-telegram-window .tg-offer-button{margin-top:4px;border:0;border-radius:6px;background:#ffffff42;color:#345f50;padding:10px;font-size:11px;letter-spacing:.2px}.tg-telegram-window .tg-offer-button:hover{background:#ffffff70}.tg-channel #tg-publish{display:inline-flex;gap:8px;align-items:center;justify-content:center;background:#269ed4;border:1px solid #269ed4;color:#fff;box-shadow:0 3px 9px #229ed426;padding:11px 17px;font-weight:650;border-radius:10px}.tg-channel #tg-publish:hover:not(:disabled){background:#168fc6;border-color:#168fc6}.tg-channel #tg-publish svg{flex:none}.tg-channel #tg-publish[aria-busy=true] svg{animation:tg-sending 1s ease-in-out infinite}@keyframes tg-sending{50%{opacity:.35;transform:translate(2px,-2px)}}@media(prefers-reduced-motion:reduce){.tg-channel #tg-publish[aria-busy=true] svg{animation:none}}
.tg-app-head>div{flex:1;text-align:left;min-width:0}.tg-app-head strong{overflow-wrap:anywhere}.tg-chat-background{max-height:min(54vh,520px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.tg-telegram-window{min-width:0}
/* Compact composer and icon-only club entry point. */
.club-detail-head .tg-club-button{display:grid;place-items:center;width:38px;height:38px;min-width:38px;padding:0;border:1px solid #cceafa;border-radius:11px;background:#ecf8ff;color:#229ed9;cursor:pointer;flex:none}.club-detail-head .tg-club-button:hover{background:#dff2ff;border-color:#9dd7f5}.club-detail-head .tg-club-button:focus-visible{outline:3px solid #229ed944;outline-offset:3px}.tg-club-button svg{display:block;flex:none}
dialog:has(.tg-channel) .modal-title h2,dialog:has(.tg-channel) .modal-head h2{display:flex;align-items:center;gap:10px}.tg-title-icon{display:inline-grid;place-items:center;width:34px;height:34px;margin-right:10px;border-radius:10px;background:#eaf7ff;color:#229ed9;vertical-align:middle}.tg-channel #tg-connection{display:flex;align-items:center;gap:7px;font-size:12px;margin:0 0 20px;color:#78899b}.tg-channel #tg-connection[data-connected=true]:before{content:"";width:6px;height:6px;border-radius:50%;background:#48ac87;flex:none}.tg-channel form{gap:16px}.tg-channel .field{font-size:12px}.tg-channel .field select{height:42px;padding:9px 12px;border-radius:10px;font-size:14px}.tg-compose-settings{border:1px solid #e7ebf2;border-radius:12px;background:#fcfdff;overflow:hidden}.tg-compose-settings summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 14px;color:#33445d;font-size:13px;font-weight:600;cursor:pointer;list-style:none}.tg-compose-settings summary::-webkit-details-marker{display:none}.tg-compose-settings summary span{font-size:11px;font-weight:400;color:#8997a9}.tg-compose-settings summary:after{content:"⌄";color:#8c9bb0;margin-left:4px}.tg-compose-settings[open] summary{border-bottom:1px solid #edf0f5}.tg-channel .tg-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px}.tg-channel .tg-options label{display:flex;align-items:center;gap:8px;padding:8px 9px;border:1px solid #e9edf4;border-radius:8px;background:#fff;white-space:nowrap;font-size:12px;line-height:18px;min-width:0;box-sizing:border-box}.tg-channel .tg-options label:has(input:checked){background:#f1f8fe;border-color:#d3eafa;color:#326c94}.tg-channel .tg-options input[type=checkbox]{appearance:auto!important;-webkit-appearance:checkbox!important;width:15px!important;height:15px!important;min-width:15px!important;max-width:15px!important;padding:0!important;margin:0!important;flex:0 0 15px!important;accent-color:#229ed9;transform:none!important}.tg-compose-settings>.field{display:block;padding:0 12px 12px}.tg-compose-settings textarea{font-size:13px;min-height:62px;border-radius:9px}.tg-offer-destination{display:flex;justify-content:space-between;gap:10px;font-size:12px;padding:0 2px;color:#8a98aa}.tg-offer-destination strong{color:#527695;font-weight:550}.tg-channel .tg-preview-action{width:100%;display:flex;align-items:center;justify-content:space-between;border:1px solid #cce4f2;background:#f0f8fd;color:#32759b;border-radius:10px;padding:11px 14px;font-weight:600;font-size:12px}.tg-channel .tg-preview-action:hover{background:#e5f3fc}
@media(max-width:700px){.tg-channel .tg-options{grid-template-columns:repeat(2,minmax(0,1fr))}.tg-channel .tg-options label{white-space:normal}.tg-compose-settings summary span{font-size:10px}.club-detail-head .tg-club-button{width:36px;height:36px;min-width:36px}}

.tg-preview-card img{aspect-ratio:40/33}

#modal #tg-publish{background:#229ed9!important;background-image:none!important;border-color:#229ed9!important;color:#fff!important}#modal #tg-publish:hover:not(:disabled){background:#168bc2!important}.club-detail-head .tg-club-button{background:#eaf7ff!important;color:#229ed9!important}

.tg-channel .field>.tg-club-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 7px}.tg-club-label>span:first-child{color:#7d8ba0;font-size:12px}.tg-channel #tg-published-status{display:inline-flex;align-items:center;gap:5px;border-radius:6px;padding:3px 7px;font-size:10px;font-weight:650;line-height:16px;letter-spacing:.1px;white-space:nowrap}.tg-channel #tg-published-status[data-tone=published]{background:#eaf7ef;color:#368560}.tg-channel #tg-published-status[data-tone=published]:before{content:"✓";font-size:11px}.tg-channel #tg-published-status[data-tone=warning]{background:#fff5df;color:#997021}.tg-channel #tg-published-status[data-tone=neutral]{background:#f0f2f6;color:#8a96a8}

.tg-publish-result{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.tg-publish-result #tg-published-status{flex:none}
