/* Direct source-level Persian presentation. No runtime translation is used. */
html,body{direction:rtl}html[dir="rtl"] .mobile-frame{direction:rtl}html[dir="rtl"] input,html[dir="rtl"] textarea,html[dir="rtl"] select{font-family:Vazirmatn,Tahoma,sans-serif}html[dir="rtl"] .drawer-item,html[dir="rtl"] .settings-item,html[dir="rtl"] .page-header,html[dir="rtl"] .modal-sheet,html[dir="rtl"] .form-section{text-align:right}.email,.url,.ltr,input[type="email"],input[type="url"]{direction:ltr;text-align:left}

/* RTL presentation only; responsive shell lives in adapter.css. */
@media (min-width:640px){.drawer{border-right:0;border-left:1px solid var(--border)}.drawer-close{display:none}.app-header .brand{align-items:flex-end}}

/* Authoritative responsive shell. */
html,body{width:100%;min-height:100%;overflow:hidden}
.cmd-title,.cmd-meta,.pname,.pfollowers,[class*="username"]{unicode-bidi:plaintext}
@media(max-width:639px){
  body{display:block;padding:0}
  .mobile-frame{width:100%;max-width:none;height:100dvh;max-height:none;margin:0;border:0;border-radius:0}
  .main-content{min-height:0}
}
@media(min-width:640px){
  body{display:block;padding:0;background:var(--bg)}
  .mobile-frame{width:100%;max-width:none;height:100dvh;max-height:none;margin:0;display:grid;grid-template-columns:minmax(0,1fr) clamp(220px,20vw,280px);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"header sidebar" "main sidebar";overflow:hidden;border:0;border-radius:0;box-shadow:none;direction:ltr}
  .app-header,.main-content,.drawer{direction:rtl}
  .app-header{grid-area:header;min-width:0;padding:14px clamp(20px,3vw,42px)}
  .drawer{grid-area:sidebar;position:relative;inset:auto;width:100%;max-width:none;height:100%;transform:none!important;visibility:visible!important;display:flex!important;padding-top:20px;overflow-y:auto;box-shadow:none;z-index:6}
  .main-content{grid-area:main;min-width:0;min-height:0;padding:clamp(20px,3vw,40px);overflow:auto}
  .bottom-nav,.drawer-backdrop,#menuBtn{display:none!important}
  .fab{position:fixed;left:clamp(24px,3vw,48px);right:auto;bottom:clamp(24px,3vw,48px)}
  #commandsList,#buttonsList,#leadsList{grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr))}
}
html.ta-desktop{--ta-sidebar-width:clamp(220px,20vw,280px);--ta-main-pad:clamp(20px,3vw,40px);--ta-create-width:min(1264px,calc(100vw - var(--ta-sidebar-width) - var(--ta-main-pad) - var(--ta-main-pad)));--ta-form-width:calc(var(--ta-create-width) - 364px)}
html.ta-desktop body{display:block!important;padding:0!important;background:var(--bg)!important;align-items:initial!important;justify-content:initial!important}
html.ta-desktop .mobile-frame{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;margin:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) clamp(220px,20vw,280px)!important;grid-template-rows:auto minmax(0,1fr)!important;grid-template-areas:"header sidebar" "main sidebar"!important;overflow:hidden!important;border:0!important;border-radius:0!important;box-shadow:none!important;direction:ltr!important}
html.ta-desktop .app-header,html.ta-desktop .main-content,html.ta-desktop .drawer{direction:rtl!important}
html.ta-desktop .app-header{grid-area:header!important;min-width:0!important;padding:14px clamp(20px,3vw,42px)!important}
html.ta-desktop .drawer{grid-area:sidebar!important;position:relative!important;inset:auto!important;width:100%!important;max-width:none!important;height:100%!important;transform:none!important;visibility:visible!important;display:flex!important;padding-top:20px!important;overflow-y:auto!important;box-shadow:none!important;z-index:6!important}
html.ta-desktop .drawer{grid-column:2!important;grid-row:1 / -1!important;right:auto!important;left:auto!important}
html.ta-desktop .main-content{grid-area:main!important;min-width:0!important;min-height:0!important;padding:clamp(20px,3vw,40px)!important;overflow:auto!important}
html.ta-desktop .bottom-nav,html.ta-desktop .drawer-backdrop,html.ta-desktop #menuBtn,html.ta-desktop .drawer-close{display:none!important}
html.ta-desktop .fab{position:fixed!important;left:clamp(24px,3vw,48px)!important;right:auto!important;bottom:clamp(24px,3vw,48px)!important;transform:none!important;border:0!important}
html.ta-desktop #tab-create{width:var(--ta-create-width)!important;max-width:none!important;margin:0 auto!important;padding-bottom:72px!important;grid-template-columns:340px minmax(0,var(--ta-form-width))!important;column-gap:24px!important;align-items:start!important;direction:ltr!important}
html.ta-desktop #tab-create.active{display:grid!important}
html.ta-desktop #tab-create>.page-header,html.ta-desktop #tab-create>.step-container{grid-column:2!important;direction:rtl!important}
html.ta-desktop #tab-create>.page-header{direction:ltr!important}
html.ta-desktop .action-bar{position:fixed!important;left:calc((100vw - var(--ta-sidebar-width) - var(--ta-create-width)) / 2 + 364px)!important;right:auto!important;bottom:0!important;width:var(--ta-form-width)!important;margin:0!important;padding:12px clamp(24px,4vw,64px)!important;border-radius:0!important;background:var(--surface)!important;z-index:20!important}
html:not(.ta-desktop) .drawer{right:0!important;left:auto!important;transform:translateX(100%)!important}
html:not(.ta-desktop) .drawer.open{right:0!important;left:auto!important;transform:translateX(0)!important}
.avatar-group .avatar{position:relative;overflow:hidden;border:3px solid transparent;cursor:pointer;transition:.18s}
.avatar-group .avatar img{width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit}
.avatar-group .avatar.selected{border-color:var(--primary);box-shadow:0 0 0 3px rgba(33,150,243,.18);transform:translateY(-2px)}
#commandsList{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;gap:12px!important}
#commandsList .command-card{width:100%!important;height:auto!important;margin:0!important}
.drawer,.drawer-header,.drawer-user-info,.drawer-menu,.drawer-item{direction:rtl;text-align:right!important}
.drawer-header{align-items:flex-start!important}
.drawer-user-info{width:100%!important}
.drawer-item{justify-content:flex-start!important}
.drawer-item svg{order:0!important;flex:0 0 auto}
.commands-search{display:flex!important;align-items:center!important;gap:8px!important}
.commands-search input{min-width:0;flex:1}
.command-sort-btn{width:36px;height:36px;display:grid;place-items:center;flex:0 0 auto;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text-3);cursor:pointer}
.command-sort-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:.2s}
.command-sort-btn.active{border-color:var(--primary);background:rgba(33,150,243,.1);color:var(--primary)}
.command-sort-btn.descending svg{transform:rotate(180deg)}
#commandsList .command-card{display:flex!important;direction:rtl;align-items:center;gap:10px;padding:12px 14px!important;min-height:68px}
.cmd-visual{width:46px;height:46px;display:grid;place-items:center;flex:0 0 auto;overflow:hidden;border-radius:14px;background:var(--surface-2);color:#fff}
.cmd-visual img{width:100%;height:100%;display:block;object-fit:cover}
.cmd-visual svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}
.cmd-visual.direct{background:linear-gradient(135deg,#8b5cf6,#6366f1)}
.cmd-visual.post_reel{background:linear-gradient(135deg,#f97316,#ec4899)}
.cmd-visual.story_live{padding:3px;background:linear-gradient(135deg,#f59e0b,#ec4899,#8b5cf6);border-radius:50%}
.cmd-visual.story_live img{border:2px solid var(--surface);border-radius:50%}
.cmd-visual.loading{background:var(--surface-2);color:var(--primary)}
.cmd-cover-spinner{width:20px;height:20px;border:2px solid rgba(33,150,243,.22);border-top-color:var(--primary);border-radius:50%;animation:cmd-cover-spin .7s linear infinite}
@keyframes cmd-cover-spin{to{transform:rotate(360deg)}}
.cmd-number{width:28px;height:28px;display:grid;place-items:center;flex:0 0 auto;border-radius:9px;background:var(--surface-2);color:var(--text-2);font-size:12px;font-weight:900}
.command-card .cmd-info{text-align:left!important;direction:rtl}
.command-card .cmd-title{text-align:left!important;margin:0!important;font-size:14px!important}
.cmd-features{display:flex;align-items:center;gap:6px;color:var(--text-3)}
.cmd-features span{width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--border);border-radius:8px;background:var(--surface-2)}
.cmd-features svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.cmd-type-badge{padding:5px 9px;flex:0 0 auto;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}
.cmd-type-badge.direct{background:rgba(99,102,241,.13);color:#6366f1}.cmd-type-badge.post_reel{background:rgba(236,72,153,.13);color:#db2777}.cmd-type-badge.story_live{background:rgba(245,158,11,.15);color:#d97706}
.cmd-toggle{width:42px;height:24px;position:relative;flex:0 0 auto;padding:0;border:0;border-radius:999px;background:#cbd5e1;cursor:pointer;transition:.2s;direction:ltr}
.cmd-toggle span{position:absolute;top:3px;right:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.22);transition:.2s}
.cmd-toggle.active{background:var(--success)}.cmd-toggle.active span{transform:translateX(-18px)}.cmd-toggle:disabled{opacity:.55;cursor:wait}
@media(max-width:639px){.cmd-features{gap:3px}.cmd-features span{width:25px;height:25px}.cmd-type-badge{max-width:68px;overflow:hidden;text-overflow:ellipsis}.cmd-visual{width:40px;height:40px}.cmd-number{width:24px;height:24px}}
.follow-required-section{display:grid;gap:12px}
.follow-required-section .follow-check{width:100%;margin:0;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);font:inherit;text-align:right;cursor:pointer}
.follow-required-section .follow-check.checked{border-color:var(--primary);background:rgba(33,150,243,.08)}
.follow-required-section .follow-message-box{margin:0}

/* Quiz mission */
#postSection.quiz-post-mode > .form-section:not(:first-child){display:none}
.quiz-textarea,.quiz-field textarea{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--text);font-family:inherit;font-size:12px;line-height:1.9;resize:vertical}
.quiz-texts{display:grid;gap:12px}
.quiz-field{display:grid;gap:6px;font-size:12px;font-weight:800;color:var(--text-2)}
.quiz-options{display:grid;gap:10px;margin-bottom:10px}
.quiz-option{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}
.quiz-option-num{flex:0 0 auto;width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:rgba(33,150,243,.12);color:var(--primary);font-size:12px;font-weight:900}
.quiz-option-remove{flex:0 0 auto;width:28px;height:28px;display:grid;place-items:center;border:1px solid rgba(239,68,68,.22);border-radius:8px;background:rgba(239,68,68,.08);color:#ef4444;cursor:pointer}
.quiz-option-remove svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.quiz-option-correct{display:flex;align-items:center;gap:6px;flex:0 0 auto;white-space:nowrap;font-size:11px;font-weight:800;color:var(--text-2);cursor:pointer}
.quiz-option-correct input{accent-color:var(--primary)}
.quiz-option .quiz-alias-chips{flex:1;min-width:0;margin:0;padding:5px 8px;min-height:38px}
.quiz-option .quiz-alias-chips .chip{font-size:11px}
.quiz-option-main{background:rgba(33,150,243,.14);color:var(--primary);font-weight:800}
.quiz-comment-replies{display:grid;gap:8px;margin-bottom:10px}
.quiz-comment-reply{display:flex;align-items:center;gap:8px}
.quiz-comment-reply input{flex:1;min-width:0;padding:9px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--text);font-family:inherit;font-size:12px}
.cmd-visual.quiz{background:linear-gradient(135deg,#f6c453,#e0a53a);color:#3d2b06}
.cmd-visual.quiz svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.cmd-type-badge.quiz{background:rgba(224,165,58,.18);color:#a9711a}
.lead-quiz-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 8px;margin-bottom:6px}
.lead-quiz-tabs.hidden{display:none}
.lead-quiz-tab{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);color:var(--text-2);font-family:inherit;font-size:11px;font-weight:800;white-space:nowrap;cursor:pointer}
.lead-quiz-tab svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.lead-quiz-tab .count{font-size:10px;opacity:.9}
.lead-quiz-tab.active{border-color:transparent;background:linear-gradient(135deg,#f6c453,#e0a53a);color:#3d2b06}
.quiz-result{flex:0 0 auto;padding:4px 9px;border-radius:999px;font-size:10px;font-weight:900}
.quiz-result.correct{background:rgba(34,197,94,.14);color:#16a34a}
.quiz-result.wrong{background:rgba(239,68,68,.13);color:#dc2626}
.lead-action-btn.call{border-color:rgba(13,148,136,.3);color:#0f766e}
.lead-action-btn.call:hover{border-color:#0f766e;color:#0f766e;background:rgba(13,148,136,.08)}

/* Mission type picker: two per row */
#typeRadioGroup .radio-option{padding:12px;gap:8px}
#typeRadioGroup .radio-option .icon-wrap{width:26px;height:26px}

/* Lead details modal */
.modal-sheet.lead-detail-sheet{max-height:min(82vh,680px);overflow:auto;text-align:right}
.lead-detail-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.lead-detail-avatar{width:42px;height:42px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:var(--surface-2);color:var(--primary)}
.lead-detail-avatar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2}
.lead-detail-titles{flex:1;min-width:0;display:grid;gap:2px}
.lead-detail-titles strong{font-size:14px;color:var(--text)}
.lead-detail-titles small{font-size:11px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lead-detail-close{width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text-2);cursor:pointer}
.lead-detail-close svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.lead-detail-list{display:grid;gap:7px}
.lead-detail-row{display:flex;direction:ltr;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);cursor:pointer;transition:border-color .16s,background .16s}
.lead-detail-row:hover{border-color:var(--primary);background:var(--surface)}
.lead-detail-row:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.lead-detail-row .ld-meta{flex:0 0 112px;min-width:0;display:flex;direction:rtl;align-items:center;justify-content:flex-start;gap:7px}
.lead-detail-row .ld-icon{flex:0 0 auto;display:grid;place-items:center;color:var(--primary)}
.lead-detail-row .ld-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.lead-detail-row .ld-label{min-width:0;font-size:10.5px;font-weight:800;color:var(--text-3);white-space:nowrap}
.lead-detail-row .ld-value{flex:1;min-width:0;direction:rtl;text-align:right;font-size:12px;color:var(--text);word-break:break-word}
.lead-detail-actions{display:flex;gap:8px;margin-top:14px}
.lead-detail-actions .btn-primary,.lead-detail-actions .btn-cancel{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:10px 14px;border-radius:11px;border:1px solid var(--border);font-family:inherit;font-size:12px;font-weight:800;cursor:pointer}.lead-detail-actions .btn-cancel{background:var(--surface-2);color:var(--text-2)}.lead-detail-actions .btn-primary{border-color:transparent;background:var(--primary-grad);color:#fff}
.lead-detail-actions svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}

/* Story picker */
.story-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-height:380px;overflow:auto;padding:2px;direction:rtl}
.story-item{position:relative;aspect-ratio:9/16;border-radius:12px;overflow:hidden;border:2px solid var(--border);background:var(--surface-2);cursor:pointer;transition:border-color .18s,box-shadow .18s}
.story-item img{width:100%;height:100%;object-fit:cover;display:block}
.story-item.selected{border-color:var(--primary);box-shadow:0 0 0 2px rgba(33,150,243,.16)}
.story-item .story-badge{position:absolute;top:6px;inset-inline-start:6px;display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font-size:9px;font-weight:800}
.story-item.live{display:grid;place-items:center;gap:6px;background:linear-gradient(135deg,#7f1d1d,#b91c1c);color:#fff}
.story-item.live .live-label{display:inline-flex;align-items:center;gap:6px;font-weight:900;font-size:13px;letter-spacing:.5px}
.story-item.live .live-dot{width:9px;height:9px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 0 rgba(239,68,68,.7);animation:livePulse 1.2s infinite}
.story-item.ta-next-story-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;border-style:dashed;background:linear-gradient(145deg,#f8fafc,#eef6f2);color:#315469}.story-item.ta-next-story-option strong{font-size:15px;line-height:1.4;font-weight:900}.story-item.ta-next-story-option small{font-size:9px;color:#64748b}.story-item.ta-next-story-option.selected{border-style:solid;border-color:#16a34a;box-shadow:0 0 0 2px rgba(22,163,74,.14);background:linear-gradient(145deg,#f0fdf4,#dcfce7)}
@keyframes livePulse{0%{box-shadow:0 0 0 0 rgba(239,68,68,.7)}70%{box-shadow:0 0 0 8px rgba(239,68,68,0)}100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}}
.story-empty{padding:14px;border:1px dashed var(--border);border-radius:12px;color:var(--text-3);font-size:12px;text-align:center}

/* Collapsible post picker */
.posts-collapse-btn{width:30px;height:30px;flex:0 0 auto;display:grid;place-items:center;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);color:var(--text-2);cursor:pointer;transition:border-color .18s,color .18s}
.posts-collapse-btn:hover{border-color:var(--primary);color:var(--primary)}
.posts-collapse-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.posts-collapse-btn[aria-expanded="false"] svg{transform:rotate(180deg)}
#postSection.posts-collapsed #postGrid,#postSection.posts-collapsed #postPreviewBox{display:none}
#storySection.stories-collapsed #storyGrid{display:none}
.section-collapse-btn{width:28px;height:28px;flex:0 0 auto;display:grid;place-items:center;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);color:var(--text-3);cursor:pointer;transition:border-color .18s,color .18s}
.section-collapse-btn:hover{border-color:var(--primary);color:var(--primary)}
.section-collapse-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.section-collapse-btn[aria-expanded="false"] svg{transform:rotate(180deg)}
#tab-create .form-section.is-collapsed > *:not(.step-title){display:none}
#tab-create .form-section.is-collapsed > .step-title{border-bottom:0;padding-bottom:0}
#taMoreFeatures{background:var(--surface)!important;border:1px solid var(--border)!important;border-style:solid!important;border-radius:14px!important}
#taMoreFeatures>.accordion-header{padding:2px 0}

/* Preview closed: let the mission sections use the freed column */
html.ta-desktop.ta-preview-hidden #tab-create{grid-template-columns:minmax(0,1fr)!important;column-gap:0!important}
html.ta-desktop.ta-preview-hidden #tab-create>.page-header,
html.ta-desktop.ta-preview-hidden #tab-create>.step-container{grid-column:1!important}
html.ta-desktop.ta-preview-hidden .action-bar{left:calc((100vw - var(--ta-sidebar-width) - var(--ta-create-width)) / 2)!important;width:var(--ta-create-width)!important}

/* Quick reply modal: keep Persian order so the primary action sits on the left */
.modal-sheet.ta-quick-reply-sheet{direction:rtl;text-align:right}
.modal-sheet.ta-quick-reply-sheet .modal-actions{flex-direction:row}

/* Comment reply chooser */
.comment-choice-list{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.comment-choice{display:inline-flex;align-items:center;gap:6px;padding:5px 6px 5px 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);transition:border-color .18s,background .18s}
.comment-choice.selected{border-color:var(--primary);background:rgba(33,150,243,.1)}
.comment-choice .cc-toggle{border:0;background:transparent;color:var(--text-2);font-family:inherit;font-size:11px;font-weight:800;cursor:pointer;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.comment-choice.selected .cc-toggle{color:var(--primary)}
.comment-choice .cc-remove{width:18px;height:18px;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(239,68,68,.1);color:#ef4444;font-size:12px;line-height:1;cursor:pointer}
.comment-choice-add{display:flex;gap:8px;margin-bottom:12px}
.comment-choice-add input{flex:1;min-width:0;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--text);font-family:inherit;font-size:12px}
.comment-choice-plus{width:42px;flex:0 0 auto;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--primary);font-size:20px;font-weight:800;line-height:1;cursor:pointer}
.comment-choice-plus:hover{border-color:var(--primary);background:rgba(33,150,243,.08)}

/* Text selection: only inputs and copyable values stay selectable */
html{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
button,.nav-item,.tab-page,.step-title,.form-section,.lead-card,.command-card,.story-item,.post-item{-webkit-user-select:none;user-select:none}
input,textarea,select,[contenteditable="true"],.lead-detail-row .ld-value,.ld-value,.ta-lead-fields span{-webkit-user-select:text;user-select:text}
/* The whole section header toggles, like a real accordion */
.ta-collapsible-header{cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:8px;transition:background .16s}
.ta-collapsible-header:hover{background:rgba(33,150,243,.06)}
.ta-collapsible-header:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
/* Shimmer skeleton while missions sync with the server */
#commandsList .command-skeleton{display:flex;align-items:center;gap:10px;width:100%;margin:0!important;padding:12px 14px;min-height:68px;box-sizing:border-box;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.sk-avatar{width:42px;height:42px;flex:0 0 42px;border-radius:12px}
.sk-lines{flex:1;min-width:0;display:grid;gap:8px}
.sk-line{display:block;width:100%;height:10px;border-radius:999px}
.sk-line.short{width:55%}
.sk-pill{width:64px;height:22px;flex:0 0 64px;border-radius:999px}
.skeleton-shimmer{position:relative;overflow:hidden;background:var(--surface-2)}
.skeleton-shimmer::after{content:'';position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0));animation:ta-shimmer 1.4s infinite}
[data-theme="dark"] .skeleton-shimmer::after{background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.12),rgba(255,255,255,0))}
@keyframes ta-shimmer{100%{transform:translateX(100%)}}
@media (prefers-reduced-motion: reduce){.skeleton-shimmer::after{animation:none}}
/* Carousel editor thumbnails and reply icon */
/* Collapsible settings cards (start collapsed) */
.settings-section .section-collapse-btn{margin-inline-start:auto}
.settings-section.is-collapsed > *:not(h3){display:none}
.settings-section.is-collapsed > h3{margin-bottom:0}
.settings-section > h3.ta-collapsible-header{margin-bottom:12px}
/* Quiz answer rows must never overflow their card */
.quiz-option{flex-wrap:wrap!important;row-gap:6px;min-width:0;box-sizing:border-box;overflow:hidden}
.quiz-option-num{order:1}
.quiz-option-correct{order:2;margin-inline-start:auto}
.quiz-option-remove{order:3}
.quiz-option .quiz-alias-chips{flex:1 1 100%!important;order:4;min-width:0;max-width:100%;box-sizing:border-box}
.quiz-option .quiz-alias-chips input[type=text]{flex:1 1 100%;min-width:0;width:100%;box-sizing:border-box}
.quiz-option .quiz-alias-chips .chip{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Post and reel picker: each tile follows its image's real ratio. */
#postGrid{grid-auto-rows:max-content;align-items:start;max-height:none!important;overflow:visible!important;-webkit-overflow-scrolling:touch}
#postGrid .post-item.ta-real-post,#postGrid .post-item.ta-next-post-option{display:flex!important;flex-direction:column;align-items:stretch;justify-content:flex-start;width:100%;height:auto!important;min-height:0;aspect-ratio:auto!important;overflow:hidden;background:var(--surface);border-radius:10px;isolation:isolate}
#postGrid .ta-post-card-image{position:relative;display:block;width:100%;height:auto!important;min-height:80px;aspect-ratio:9/16!important;overflow:hidden;background:var(--surface-2)}
#postGrid .ta-post-card-image::before{content:'';position:absolute;z-index:0;inset:-12px;background-image:var(--ta-post-bg);background-size:cover;background-position:center;filter:blur(16px);opacity:.72;transform:scale(1.08)}
#postGrid .ta-post-card-image>img{position:absolute;z-index:1;inset:0;display:block;width:100%!important;height:100%!important;min-height:0;object-fit:contain!important;object-position:center;background:transparent}
#postGrid .ta-media-kind{z-index:4}
#postGrid .ta-post-card-caption{position:absolute;z-index:3;right:0;bottom:0;left:0;max-height:2.9em;padding:7px 9px;color:#fff;background:linear-gradient(0deg,rgba(5,12,24,.92),rgba(5,12,24,.6) 70%,transparent);font-family:inherit;font-size:10px;font-weight:700;line-height:1.65;text-align:right;white-space:normal;overflow:hidden;text-overflow:ellipsis;transition:inset .2s ease,max-height .2s ease,padding .2s ease,background .2s ease}
#postGrid .post-item.ta-real-post:hover .ta-post-card-caption,#postGrid .post-item.ta-real-post:focus-visible .ta-post-card-caption{top:0;max-height:100%;padding:34px 10px 10px;background:rgba(5,12,24,.88);white-space:pre-wrap;overflow:hidden;pointer-events:none}
#postGrid .ta-post-card-stats{position:relative;z-index:2;flex:0 0 auto;width:100%;min-height:36px;box-sizing:border-box;background:var(--surface)}
#postGrid .ta-next-post-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:auto!important;min-height:0;text-align:center;background:var(--surface-2);background:linear-gradient(145deg,var(--surface-2),color-mix(in srgb,var(--primary) 8%,var(--surface)))}
#postGrid .ta-next-post-card>*{position:relative;z-index:1}
#postGrid .ta-next-post-card strong{font-size:18px;line-height:1.3}#postGrid .ta-next-post-card small{color:var(--text-3);font-size:9px}#postGrid .ta-next-post-stats span{justify-content:center;white-space:nowrap}
#postGrid .post-item.ta-post-hidden{display:none!important}
.ta-post-more{display:block;width:100%;margin:10px 0 2px;padding:11px 14px;border:1px dashed var(--border);border-radius:12px;background:var(--surface-2);color:var(--primary);font-family:inherit;font-size:12px;font-weight:800;cursor:pointer}.ta-post-more:hover{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 8%,var(--surface))}.ta-post-more[hidden]{display:none!important}
#postSection.posts-collapsed .ta-post-more{display:none!important}
@supports not (aspect-ratio:9/16){#postGrid .ta-post-card-image{height:auto!important;min-height:260px}}
@media (hover:none),(pointer:coarse){#postGrid .ta-post-card-caption{max-height:3.3em;padding:6px 8px;background:linear-gradient(0deg,rgba(5,12,24,.9),rgba(5,12,24,.44),transparent)}#postGrid .post-item.ta-real-post:focus .ta-post-card-caption{top:auto;max-height:3.3em;padding:6px 8px;overflow:hidden;background:linear-gradient(0deg,rgba(5,12,24,.9),rgba(5,12,24,.44),transparent)}}
