:root{--bg:#fafbfc;--surface:#fff;--sidebar:#f0f2f5;--ink:#242830;--muted:#626c79;--line:#e1e5eb;--accent:#2f5daa;--accent-dark:#244c91;--accent-soft:#e7eefb;--green:#506978;--red:#b43e4e;--action-fill:#2458ae;--action-hover:#19458e;--radius:12px;font-family:'Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:14px;line-height:1.5;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit}button:disabled{cursor:not-allowed;opacity:.48}a{color:inherit;text-decoration:none}button,a,summary,input,select,textarea{outline-offset:4px}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #638ad0}h1,h2,h3,p{margin:0}h1{font-size:34px;line-height:1.15;letter-spacing:-1.2px;font-weight:620}h2{font-size:22px;letter-spacing:-.6px;font-weight:620;line-height:1.3}h3{font-size:15px;font-weight:600}p{line-height:1.65}small,.small{font-size:12px}.muted{color:var(--muted)}.center{text-align:center}.icon{height:19px;width:19px;flex:none;vertical-align:middle}.btn{border:1px solid transparent;border-radius:8px;min-height:40px;padding:10px 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:13px;line-height:1.2;font-weight:600;white-space:normal;transition:background .17s,transform .17s,box-shadow .17s}.btn:active:not(:disabled){transform:translateY(1px)}.primary{color:#fff;background:var(--action-fill);box-shadow:0 2px 3px #23375116}.primary:hover:not(:disabled){background:var(--action-hover);box-shadow:0 3px 8px #23375122}.secondary{background:#fff;border-color:var(--line)}.secondary:hover:not(:disabled){background:#f1f3f6;border-color:#c9d2de}.danger{background:var(--red);color:white}.danger-outline{background:transparent;color:var(--red);border:1px solid #e3bac2}.danger-outline:hover{background:#faf0f1}.icon-btn{border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:7px;border-radius:7px;flex-shrink:0}.icon-btn:hover{background:#e3e8ef}.icon-only{width:42px;padding:10px}.text-btn{border:0;background:none;color:var(--accent-dark);font-weight:600;display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;padding:7px 0;font-size:12px;min-height:32px}.text-btn:hover{color:#283e59}.text-link{color:var(--accent-dark);font-size:12px;display:inline-flex;align-items:center;gap:4px}.text-link .icon{width:14px}.sidebar{position:fixed;left:0;top:0;bottom:0;width:224px;background:var(--sidebar);border-right:1px solid var(--line);padding:29px 17px 12px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:28px;letter-spacing:-1.8px;margin:0 12px 33px}.brand-dot{font-size:10px;align-self:flex-start;letter-spacing:0;margin-top:7px;margin-left:-5px}.brand-mark{display:flex;width:28px;height:29px;gap:3px;align-items:center}.brand-mark i{display:block;width:11px;height:27px;background:var(--accent);border-radius:3px;transform:skewY(-20deg)}.brand-mark i:last-child{height:18px;align-self:flex-end;margin-bottom:3px;background:linear-gradient(160deg,#cd4c59,#ae3547)}.workspace-switch{display:flex;gap:10px;align-items:center;margin:0 4px 26px;padding:11px 8px;border-top:1px solid #dce2ea;border-bottom:1px solid #dce2ea}.workspace-avatar{width:32px;height:32px;display:grid;place-items:center;background:#e1e5ec;color:#535e70;border-radius:7px;font-size:15px;font-weight:650}.workspace-switch strong{display:block;font-size:12px;font-weight:600}.workspace-switch small{display:block;font-size:10px;color:var(--muted);margin-top:2px}.nav-item{border:0;background:none;width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:7px;font-size:12px;color:#626c7b;text-align:left;margin-bottom:4px}.nav-item .icon{height:17px;width:17px}.nav-item.active{color:var(--accent-dark);background:#e1eafa;font-weight:600}.nav-item:hover{background:#e6ebf1}.nav-item.active:hover{background:#d8e4f8}.nav-caption{display:flex;align-items:center;justify-content:space-between;padding:25px 7px 8px 12px;font-size:9px;letter-spacing:1.5px;color:#818378;font-weight:650}.nav-caption .icon-btn{width:24px;height:24px;padding:4px}.project-nav{display:flex;align-items:center;gap:9px;padding:9px 12px;font-size:12px;color:#626c7b;border-radius:6px;margin-bottom:3px}.project-nav>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-nav small{margin-left:auto;font-size:10px}.project-nav.selected{background:#e3e8ef;color:#29303a}.project-dot{width:7px;height:7px;border-radius:2px;flex-shrink:0}.tone-0{background:#e2eafb;color:#325da3}.project-dot.tone-0{background:#3865b2}.tone-1{background:#e5e8ed;color:#535e6e}.project-dot.tone-1{background:#b94c5a}.tone-2{background:#f0e3e5;color:#986369}.settings-link{margin-top:30px}.sidebar-bottom{margin-top:auto;padding-top:25px}.local-note{padding:0 12px 20px}.local-note strong{font-size:10px;font-weight:600}.live-dot{display:inline-block;width:5px;height:5px;background:#7d9773;border-radius:50%;margin-right:5px;vertical-align:middle}.local-note p{font-size:10px;color:#85877e;margin-top:5px}.local-note .text-btn{font-size:10px}.local-note .icon{width:13px}.profile{display:flex;align-items:center;gap:10px;padding:14px 10px 2px;border-top:1px solid #dce2ea;margin-top:8px}.avatar{width:31px;height:31px;border-radius:50%;background:#dee3eb;display:grid;place-items:center;font-size:11px}.profile strong{font-size:10px;display:block}.profile small{font-size:9px;color:#808176}.page{margin-left:224px}.topbar{height:68px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 40px;background:#fafbfc}.breadcrumbs{display:flex;align-items:center;gap:14px;font-size:11px;color:#85867f;min-width:0}.breadcrumbs strong{color:#525e6f;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-testing{border:1px solid #dce2ea;background:#f0f3f7;border-radius:5px;padding:4px 9px;color:#64758a;font-size:9px;letter-spacing:.1px;white-space:nowrap}.mobile-menu{display:none}main{padding:38px 40px 24px;max-width:1720px;margin:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 31px}.eyebrow{font-size:9px;font-weight:650;letter-spacing:1.5px;color:#6c7888;display:flex;align-items:center;gap:9px;margin-bottom:12px}.tiny-line{height:1px;width:15px;background:var(--red)}.page-heading p{font-size:12px;color:#687382;margin-top:10px;max-width:600px}.heading-actions{display:flex;align-items:center;gap:9px}.project-tabs{display:flex;align-items:center;gap:29px;border-bottom:1px solid var(--line);height:44px;margin-bottom:25px}.project-tabs a{height:44px;display:flex;align-items:center;gap:8px;font-size:12px;color:#6d7887;border-bottom:2px solid transparent}.project-tabs a.active{border-color:transparent;color:#343e4c;font-weight:600;background:linear-gradient(100deg,#2f5daa 0%,#3c62a0 65%,#bf4354 100%) left bottom/100% 2px no-repeat}.project-tabs a span{font-size:9px;background:#edf0f4;padding:1px 6px;border-radius:4px;color:#7d8173}.library-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:23px}.filter-tabs{display:flex;gap:3px;flex-wrap:wrap}.filter-tabs button{background:none;border:1px solid transparent;border-radius:6px;font-size:10px;color:#646f7e;padding:7px 9px;min-height:31px;white-space:nowrap}.filter-tabs button.active{background:#edf0f4;color:#3d4a5d;border-color:#dfe5ed;font-weight:600}.filter-tabs button span{display:inline-grid;place-items:center;font-size:9px;min-width:16px;height:16px;background:#eae2e4;color:#89616c;border-radius:4px;margin-left:5px}.library-tools{display:flex;gap:13px;align-items:center}.search{display:flex;align-items:center;gap:7px;width:150px;color:#94978b}.search .icon{width:15px}.search input{border:0;background:transparent;width:100%;font-size:10px;padding:6px 0;min-width:0}.search input::placeholder{color:#989a8e}.view-switch{display:flex;gap:2px;padding-left:10px;border-left:1px solid var(--line)}.view-switch .icon-btn{width:28px;height:28px;padding:6px}.view-switch .active{background:#eaf0f6;color:#4b6079}.view-switch .icon{width:16px;height:16px}.task-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:27px 21px}.task-card{min-width:0;animation:card-in .4s both;animation-delay:calc(var(--order)*.045s)}.thumb{position:relative;height:204px;display:block;overflow:hidden;background:#262c35;border-radius:10px;isolation:isolate}.thumb>img{width:100%;height:100%;object-fit:cover;object-position:center 40%;transition:transform .5s}.thumb:hover>img{transform:scale(1.035)}.thumb-shade{position:absolute;inset:0;background:linear-gradient(180deg,#0002 0%,transparent 35%,#0006 100%)}.media-format{position:absolute;left:12px;top:11px;border:1px solid #ffffff50;border-radius:4px;background:#0002;backdrop-filter:blur(8px);color:#fff;font-size:9px;padding:2px 6px}.duration{position:absolute;bottom:10px;right:11px;font-size:10px;font-variant-numeric:tabular-nums;color:white;background:#0005;border-radius:4px;padding:2px 5px}.thumb-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);opacity:0;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;color:#fff;border:1px solid #ffffff70;background:#17202ecc;box-shadow:0 2px 8px #0002;transition:opacity .18s}.task-link:hover .thumb-play,.task-link:focus-visible .thumb-play{opacity:1}.thumb-play .icon{display:block;width:20px;height:20px;margin:0;fill:currentColor;stroke:none}.task-info{padding:15px 1px 0}.task-meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.task-meta>small{font-size:9px;color:#6d7b8e}.status{display:inline-flex;align-items:center;gap:5px;font-size:9px;font-weight:550;white-space:nowrap}.status i{height:5px;width:5px;border-radius:50%;background:currentColor}.status.pending{color:#9a535f}.status.processing{color:#315fa6}.status.ready{color:#526b76}.status.failed{color:#b13f4f}.task-info h2{font-size:14px;font-weight:600;letter-spacing:-.2px;margin-top:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task-info h2 a:hover{color:var(--accent)}.task-info p{font-size:10px;color:#6d7887;margin-top:4px}.task-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:16px;padding-top:11px;border-top:1px solid #e4e8ee;gap:10px}.file-kind{font-size:9px;color:#939688;display:flex;align-items:center;gap:4px}.file-kind .icon{width:13px;height:13px}.card-action{font-size:10px;color:#2d58a0;display:flex;align-items:center;gap:5px;font-weight:550}.card-action .icon{width:13px}.card-action:hover{color:var(--accent-dark)}.processing-overlay{position:absolute;bottom:12px;left:12px;color:white;display:flex;align-items:center;gap:7px;font-size:10px}.processing-overlay .spinner{width:12px;height:12px}.list-footer{display:flex;align-items:center;justify-content:space-between;margin-top:36px;color:#a0a396;font-size:9px}.list-footer>span:last-child{display:flex;align-items:center;gap:5px}.list-footer .icon{width:11px;height:11px}.list-view{display:block}.list-view .task-card{display:flex;align-items:center;gap:22px;padding:17px 0;border-bottom:1px solid var(--line)}.list-view .thumb{width:160px;height:103px;flex-shrink:0}.list-view .task-info{flex:1;padding:0}.list-view .task-bottom{margin-top:8px;padding-top:7px}.list-view .task-info h2{margin-top:4px}.empty{min-height:365px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;gap:15px}.empty-icon{display:grid;place-items:center;height:72px;width:72px;border:1px solid var(--line);border-radius:22px;background:#f0f3f7;color:#858e73;margin-bottom:7px}.empty-icon .icon{width:29px;height:29px}.empty p{font-size:13px;color:var(--muted);max-width:350px}.empty h2{font-size:22px}.project-list{margin-top:25px}.project-row{display:flex;align-items:center;gap:22px;padding:28px 15px;border-bottom:1px solid var(--line);transition:background .2s}.project-row:hover{background:#f0f3f7}.project-row>div{flex:1;min-width:0}.project-row h2{font-size:19px}.project-row p{color:var(--muted);font-size:12px;margin-top:6px}.project-row>span.muted{font-size:11px;white-space:nowrap}.project-symbol{width:60px;height:60px;display:grid;place-items:center;border-radius:14px;flex-shrink:0}.project-symbol .icon{width:25px;height:25px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.section-heading h3{display:flex;align-items:center;gap:7px}.section-heading h3 .icon{color:var(--accent)}.section-heading>div>p{font-size:12px;color:var(--muted);margin-top:6px}.settings-layout{display:grid;grid-template-columns:minmax(0,650px) minmax(180px,250px);gap:70px;max-width:1000px}.settings-section{padding:26px 0 30px;border-top:1px solid var(--line)}.settings-section:first-child{padding-top:24px}.settings-section h2{font-size:17px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:20px;font-size:12px;font-weight:550}.field>span{display:block}.optional{font-size:10px;color:#989b90;font-weight:400;margin-left:4px;letter-spacing:0}.field small{color:var(--muted);font-weight:400;font-size:11px;line-height:1.6}.field input,.field textarea,.field select,textarea.transcript{width:100%;background:#fff;border:1px solid #dce2ea;border-radius:7px;padding:11px 12px;color:#3e4857;font-weight:400;line-height:1.6}.field input::placeholder,.field textarea::placeholder{color:#a0a497}.field textarea{resize:vertical;min-height:90px}.field input[type=color]{padding:5px;height:44px}.field input:focus,.field textarea:focus,.field select:focus,textarea.transcript:focus{border-color:#7394cc;outline:2px solid #7195d830;outline-offset:1px}.settings-aside{padding-top:48px}.aside-symbol{display:grid;place-items:center;width:38px;height:38px;background:#e8edf5;border-radius:10px;color:var(--accent);margin-bottom:20px}.settings-aside h3{font-size:24px;line-height:1.25;letter-spacing:-.8px;margin-bottom:16px}.settings-aside p{color:#687585;font-size:12px}.settings-aside hr{margin:25px 0}hr{border:0;border-top:1px solid var(--line);margin:22px 0}.count-label{font-size:10px;background:#edf0f4;border-radius:5px;padding:3px 8px;color:#7a806e}.reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}.reference-add{min-height:165px;border:1px dashed #c9d2de;background:#f3f5f8;border-radius:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:10px}.reference-add strong{font-size:10px}.reference-add small{font-size:9px;color:#8c9280}.reference-add .icon{color:#8e957d}.reference{min-width:0}.ref-image{position:relative;display:block;padding:0;border:0;border-radius:9px;overflow:hidden;width:100%;height:133px}.ref-image img{width:100%;height:100%;object-fit:cover}.ref-image b{position:absolute;top:7px;left:7px;background:#fff;border-radius:4px;padding:2px 6px;font-size:10px}.reference-controls{display:flex;align-items:center;justify-content:space-between;gap:3px}.reference-controls .text-btn{font-size:9px}.reference-controls .icon-btn{width:25px;height:31px;padding:5px}.reference-controls .icon{width:14px}.danger-section p{color:var(--muted);font-size:12px;margin:12px 0 20px}.editor-heading{display:flex;align-items:center;gap:16px;margin-bottom:30px}.editor-heading>div:nth-child(2){flex:1;min-width:0}.editor-heading h1{font-size:23px;letter-spacing:-.65px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.back-btn{border:1px solid var(--line);background:#fff;width:36px;height:36px}.editor-subline{display:flex;align-items:center;gap:15px;margin-top:7px;font-size:9px;color:#69778a}.editor-primary .btn{font-size:11px;min-height:37px}.section-tabs{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);margin-bottom:26px;gap:4px}.section-tabs button{display:flex;align-items:center;gap:7px;padding:13px 8px 16px;border:0;border-bottom:2px solid transparent;background:none;font-size:11px;color:#89917d;white-space:nowrap}.section-tabs button .icon{width:15px;height:15px}.section-tabs button.active{color:var(--accent-dark);border-bottom-color:transparent;background:linear-gradient(100deg,#2f5daa 0%,#3c62a0 65%,#bf4354 100%) left bottom/100% 2px no-repeat}.section-number{font-size:8px;color:#adb2a1;margin-right:2px}.section-tabs button.active .section-number{color:#87a1bd}.editor-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.02fr);gap:35px;align-items:start}.player-panel{position:sticky;top:24px;min-width:0}.player-toolbar{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 15px;background:#292f38;border-radius:11px 11px 0 0;color:#8f9592;font-size:9px}.player-toolbar>span{display:flex;align-items:center;gap:7px}.player-toolbar .icon{width:12px}.media-tabs{display:flex;gap:3px}.media-tabs button{background:transparent;border:0;color:#919993;font-size:10px;padding:5px 10px;border-radius:4px}.media-tabs button.active{background:#414c5a;color:#f2f4ed}.media-tabs button:disabled{opacity:.25}.player-stage{background:#1f232a;display:flex;align-items:center;justify-content:center;min-height:430px;padding:13px 25px 22px}.video-canvas{position:relative;width:244px;max-width:100%;aspect-ratio:9/16;overflow:hidden;box-shadow:0 7px 30px #0004;border-radius:3px;background:#343d49}.video-canvas video{height:100%;width:100%;object-fit:contain}.subtitle-overlay{position:absolute;left:8%;right:8%;top:66%;text-align:center;pointer-events:none;color:white;font-weight:700;line-height:1.17;padding:4px;text-wrap:balance;max-height:25%;overflow:hidden;font-size:19px}.subtitle-overlay em{font-style:normal}.canvas-label{position:absolute;top:9px;left:9px;font-size:8px;background:#0004;border:1px solid #fff3;border-radius:3px;padding:2px 5px;color:#fff;pointer-events:none}.player-foot{background:#292f38;border-radius:0 0 11px 11px;color:#939b94;padding:11px 14px;display:flex;justify-content:space-between;gap:12px;font-size:9px}.player-foot>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.player-foot .icon{height:12px;width:12px;margin-right:5px}.player-hint{display:flex;gap:6px;align-items:flex-start;color:#6b798b;font-size:9px;line-height:1.5;margin-top:13px;padding:0 2px}.player-hint .icon{width:12px;height:12px;margin-top:1px}.editor-panel{min-width:0;padding:4px 0 30px}.editor-intro{margin-bottom:26px}.editor-intro .eyebrow{font-size:8px;margin-bottom:10px}.editor-intro h2{font-size:25px;line-height:1.22;max-width:360px}.editor-intro p{font-size:11px;color:#6b7787;margin-top:9px}.editor-panel .section-heading{font-size:11px;margin-bottom:11px}.editor-panel .section-heading strong{font-weight:600}.language-label{font-size:9px;color:#959d8b;display:flex;align-items:center;gap:6px}.language-label .icon{width:12px;color:#5a748b}.transcript{font-size:14px;line-height:1.9!important;padding:18px!important;resize:vertical;min-height:190px}.text-footer{display:flex;justify-content:space-between;gap:10px;margin-top:8px;font-size:8px;color:#6d7d90}.text-footer>span{display:flex;align-items:center;gap:4px}.text-footer .icon{width:10px;height:10px}.suggestions{margin-top:28px}.suggestions .section-heading h3{font-size:11px}.suggestions .icon{width:14px;height:14px}.suggestion{display:flex;gap:12px;padding:15px 0;border-top:1px solid var(--line)}.time-tag{font-size:9px;color:#929b84;background:#eef2f6;border:1px solid #dfe5ed;height:23px;padding:3px 6px;border-radius:4px;font-variant-numeric:tabular-nums}.suggestion>div{flex:1}.suggestion p{font-size:12px;display:flex;align-items:center;flex-wrap:wrap;gap:7px}.suggestion p del{color:#969c8d;text-decoration-color:#b9bdaf}.suggestion p strong{font-weight:600;color:#50687d}.suggestion p .icon{width:12px;color:#a1a897}.suggestion small{display:block;font-size:9px;color:#909985;margin-top:3px}.inline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}.inline-actions .btn{font-size:10px;min-height:30px;padding:7px 10px}.suggestion.resolved{color:var(--green);font-size:11px}.editor-section-actions{border-top:1px solid var(--line);padding-top:22px;margin-top:14px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}.editor-section-actions .small{font-size:9px}.notice{border:1px solid #dce2ea;background:#eff3f7;border-radius:8px;padding:12px 13px;display:flex;align-items:flex-start;gap:9px;margin:15px 0;font-size:11px;color:#64788f;line-height:1.65}.notice .icon{width:15px;height:15px;margin-top:2px}.notice.error{background:#faf0f1;border-color:#ead1d5;color:#a53445}.notice.success{background:#eff3f7;border-color:#d9e3ed;color:#506b80}.notice .text-btn{font-size:10px}.notice .spinner{width:12px;height:12px;margin-right:5px}.source-file{display:flex;align-items:center;gap:13px;padding:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:11px}.source-file>div{flex:1;min-width:0}.source-file strong{display:block;word-break:break-word}.source-file small{color:var(--muted);font-size:10px;display:block;margin-top:3px}.success-text{color:var(--green);font-size:9px;white-space:nowrap}.success-text .icon{width:13px}.detail-list{font-size:11px;margin:25px 0}.detail-list>div{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line)}.detail-list dt{color:#8b947e}.detail-list dd{margin:0}.preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:22px 0 27px}.preset{position:relative;min-width:0;padding:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff;text-align:left;transition:border-color .2s,transform .2s}.preset.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.preset:hover{transform:translateY(-2px)}.preset>span:last-of-type{display:block;padding:10px;font-size:10px}.preset>.icon{display:none;position:absolute;right:8px;bottom:11px;width:13px;height:13px;color:var(--accent)}.preset.selected>.icon{display:block}.preset-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#292f38;color:white;height:84px;font-size:12px;font-weight:700;line-height:1.2;text-align:center;padding:5px}.preset-preview em{font-style:normal}.preset-preview.highlight em{color:#e8d579}.preset-preview.bold{font-size:14px;letter-spacing:-.5px}.preset-preview.bold em{background:var(--accent);padding:2px 6px}.preset-preview.editorial{font-weight:400;font-size:11px}.range-labels{display:flex;justify-content:space-between;color:#909883;font-size:9px;margin-top:4px;margin-bottom:22px}input[type=range]{width:100%;accent-color:var(--accent);height:20px}fieldset{border:0;padding:0;margin:0;min-width:0}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.advanced{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:14px 0;font-size:11px;margin:0 0 20px}.advanced summary{cursor:pointer}.advanced fieldset{padding-top:18px}.render-policy{display:flex;align-items:center;gap:12px;margin:20px 0;font-size:11px}.render-policy small{display:block;color:#969d8c;font-size:9px;margin-top:3px}.render-policy .icon{color:#8b947e}.disabled-reason{display:block;color:#826976;font-size:10px;margin:9px 0 14px;line-height:1.5}.preview-options{display:grid;gap:22px;margin:24px 0}.preview-options>div{padding-top:20px;border-top:1px solid var(--line)}.preview-options h3{font-size:13px}.preview-options p{font-size:11px;color:var(--muted);margin:7px 0 14px}.metadata-section{border-top:1px solid var(--line);padding-top:22px;margin-top:22px}.metadata-section .field{margin-bottom:12px}.metadata-section .btn{font-size:10px;min-height:33px}.title-options{display:flex;flex-direction:column;gap:5px;margin:10px 0 15px}.title-option{border:0;background:none;color:#8b917f;text-align:left;padding:4px 0;font-size:10px;display:flex;gap:7px;align-items:center}.title-option:hover{color:var(--accent)}.title-option .icon{width:13px;height:13px}.cover-candidates{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:15px 0}.cover-candidate{position:relative;padding:0;height:160px;overflow:hidden;border-radius:7px;border:2px solid transparent;background:#333}.cover-candidate.selected{border-color:var(--accent)}.cover-candidate img{width:100%;height:100%;object-fit:cover;filter:brightness(.7)}.cover-candidate>span{position:absolute;left:7px;right:7px;top:40%;color:white;font-size:13px;font-weight:700;line-height:1.2;text-shadow:1px 1px 3px #000}.cover-candidate b{position:absolute;bottom:5px;left:5px;right:5px;background:#fff;padding:3px;font-size:9px;border-radius:3px;color:#2d58a0}.result-ready{text-align:center;padding:28px 15px;margin:22px 0;background:#eef3f8;border:1px solid #dce5ef;border-radius:10px}.result-ready>span{display:grid;place-items:center;background:#dde7f1;color:#5e7b99;width:46px;height:46px;border-radius:50%;margin:0 auto 16px}.result-ready h3{font-size:16px}.result-ready p{font-size:11px;color:#8a977d;margin-top:8px}.final-checks{margin:27px 0}.final-checks>div{display:flex;gap:11px;align-items:center;font-size:12px;margin:15px 0;color:#687e94}.final-checks .icon{width:15px;height:15px}.publication-note{margin-top:30px;padding-top:21px;border-top:1px solid var(--line)}.publication-note h3{font-size:12px;color:#869078}.publication-note p{font-size:10px;color:#979e8c;margin-top:7px}.rendering{text-align:center;padding:33px 10px}.rendering h3{font-size:17px}.rendering p{font-size:11px;color:#909884;margin-top:9px}.render-orbit{position:relative;width:70px;height:70px;margin:0 auto 27px;display:grid;place-items:center;color:var(--accent)}.render-orbit>.spinner{position:absolute;inset:0;width:100%;height:100%;border-width:2px}.render-orbit>.icon{width:25px;height:25px}.comparison{border:1px solid #e5bfc7;border-radius:8px;background:#fcf1f3;padding:15px;font-size:12px;margin:15px 0}.comparison p{margin:10px 0}.comparison small{display:block;color:var(--muted)}.comparison .btn{font-size:11px;margin-top:12px}.spinner{display:inline-block;width:17px;height:17px;border:1.6px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .9s linear infinite;flex-shrink:0}.boot{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:12px;flex-direction:column}.boot .notice{max-width:500px}.skeleton-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:21px}.skeleton{height:315px;border-radius:10px;background:linear-gradient(100deg,#edf0f4 30%,#f7f9fb 45%,#edf0f4 65%);background-size:300%;animation:shimmer 2s infinite}dialog{border:1px solid #e6e5e0;border-radius:16px;background:#fafbfc;color:var(--ink);padding:32px;width:540px;max-width:calc(100vw - 30px);max-height:calc(100dvh - 40px);box-shadow:0 20px 100px #19253633;animation:dialog-in .2s ease-out}dialog.wide{width:720px}dialog::backdrop{background:#20293677;backdrop-filter:blur(4px)}.modal-close{position:absolute;top:12px;right:12px;color:#8a9280}.modal-heading{margin-bottom:26px}.modal-heading h2{font-size:26px;letter-spacing:-.8px;padding-right:15px}.modal-heading p{font-size:12px;color:#677586;margin-top:10px}.modal-icon{display:grid;place-items:center;width:43px;height:43px;border:1px solid #dce4ef;border-radius:12px;background:#e8edf5;color:var(--accent);margin:0 0 20px}.modal-icon.danger{background:#f3e4e7;color:var(--red);border-color:#e7d0d5}.modal-icon.green{background:#e3ebf5;color:var(--green)}.modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:25px}.dropzone{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;background:#f0f3f7;border:1px dashed #c6ccb9;border-radius:11px;padding:29px 18px;margin:20px 0 10px;cursor:pointer;text-align:center}.dropzone input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.dropzone:focus-within{outline:3px solid #638ad0;outline-offset:3px}.dropzone strong{font-size:12px;overflow-wrap:anywhere}.dropzone>span:not(.drop-icon){font-size:10px;color:#8e967f}.dropzone small{font-size:9px;color:#929b82}.drop-icon{display:grid;place-items:center;width:39px;height:39px;background:#e3e9f1;border-radius:10px;color:#8c9779;margin-bottom:9px}.dropzone.dragover{background:var(--accent-soft);border-color:var(--accent)}.upload-steps{display:flex;justify-content:space-between;gap:10px;margin:30px 0}.upload-steps>div{display:flex;flex-direction:column;align-items:center;gap:8px;flex:1;font-size:10px;color:#a1a88f}.upload-steps>div>span{width:34px;height:34px;border-radius:50%;border:1px solid #dce3ed;display:grid;place-items:center;font-size:11px;background:#eef2f6}.upload-steps .current{color:var(--accent)}.upload-steps .current>span{background:var(--accent-soft);border-color:#bdcde1}.upload-steps .spinner{width:15px;height:15px}.test-options{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 23px}.test-options .btn{font-size:10px;min-height:32px;padding:7px 10px}.help-steps{padding-left:25px}.help-steps li{padding:8px 0 13px 8px;color:#656f57;font-size:14px}.help-steps p{font-size:12px;color:#6c798d;margin-top:6px}.reference-large{display:block;max-width:100%;max-height:65vh;object-fit:contain;margin:20px auto 0;border-radius:8px}#toast{position:fixed;left:calc(50% + 90px);bottom:26px;max-width:min(500px,90vw);background:#29374a;color:#f0f4fa;padding:12px 20px;border:1px solid #ffffff1a;border-radius:9px;box-shadow:0 6px 22px #0002;font-size:12px;z-index:80;opacity:0;transform:translate(-50%,15px);pointer-events:none;transition:opacity .2s,transform .2s}#toast.show{opacity:1;transform:translate(-50%,0)}.skip-link{position:fixed;z-index:100;top:8px;left:8px;background:white;color:var(--accent);padding:10px;transform:translateY(-160%)}.skip-link:focus{transform:translateY(0)}.nav-scrim{display:none}
@keyframes card-in{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}@keyframes dialog-in{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes shimmer{to{background-position:-200% 0}}
@media(min-width:1550px){.thumb{height:245px}.task-info h2{font-size:16px}.task-info p{font-size:12px}.task-meta .status{font-size:11px}.card-action{font-size:12px}.video-canvas{width:290px}.player-stage{min-height:540px}}
@media(max-width:1200px){.sidebar{width:200px}.page{margin-left:200px}.brand{font-size:25px}main{padding:29px 27px}.topbar{padding:0 27px}.task-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-toolbar{align-items:flex-start;gap:10px}.library-tools{gap:5px}.search{width:120px}.view-switch{display:none}.filter-tabs button{font-size:9px;padding:7px}.editor-workspace{gap:22px}.editor-intro h2{font-size:22px}.editor-heading h1{font-size:20px}.section-number{display:none}.section-tabs button{font-size:10px;padding-inline:5px}.editor-primary .btn{font-size:10px;padding:9px 10px}.settings-layout{gap:35px;grid-template-columns:minmax(0,1fr) 190px}.player-stage{padding:14px;min-height:390px}.video-canvas{width:219px}.preset-preview{font-size:10px}.preset-preview.bold{font-size:12px}}
@media(max-width:950px){.sidebar{width:180px;padding-inline:10px}.page{margin-left:180px}.workspace-switch small{font-size:9px}.brand{margin-left:10px}.brand-dot{display:none}.nav-item{font-size:11px}.project-nav{font-size:11px}.sidebar-bottom .local-note{padding-left:10px}.library-toolbar{flex-direction:column;align-items:stretch}.library-tools{justify-content:flex-end}.search{width:170px}.settings-layout{display:block}.settings-aside{display:none}.editor-workspace{gap:20px;grid-template-columns:minmax(0,.85fr) minmax(0,1fr)}.editor-heading{flex-wrap:wrap}.editor-primary{margin-left:52px}.section-tabs{overflow-x:auto;justify-content:flex-start;gap:13px}.section-tabs button{flex-shrink:0}.player-stage{min-height:320px;padding:12px}.player-toolbar{padding:0 8px}.player-toolbar>span{display:none}.media-tabs button{padding:5px 7px}.preset-grid{gap:5px}.preset>span:last-of-type{font-size:9px;padding:8px 5px}.preset>.icon{display:none!important}.editor-intro h2{font-size:19px}.text-footer{flex-wrap:wrap}.video-canvas{width:200px}.editor-subline{flex-wrap:wrap;gap:5px 12px}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);width:240px;padding:25px 18px 12px;transition:transform .23s}.sidebar.open{transform:translateX(0)}.page{margin-left:0}.brand{font-size:28px}.nav-item,.project-nav{font-size:13px}.sidebar-bottom .local-note strong{font-size:11px}.sidebar-bottom .local-note p{font-size:11px}.profile strong{font-size:12px}.profile small{font-size:10px}.workspace-switch strong{font-size:13px}.workspace-switch small{font-size:11px}.mobile-menu{display:inline-flex}.topbar{height:56px;padding:0 18px}.breadcrumbs{gap:9px}.breadcrumbs>a{display:none}.breadcrumbs>span{display:none}.breadcrumbs strong{max-width:190px;font-size:11px}.top-testing{font-size:9px;padding:4px 7px}.nav-scrim{display:block;position:fixed;inset:0;border:0;background:#19253677;z-index:25;backdrop-filter:blur(2px)}main{padding:26px 22px}.page-heading{gap:15px;margin-bottom:24px;align-items:flex-start}.page-heading h1{font-size:30px}.page-heading p{font-size:11px;line-height:1.55}.eyebrow{font-size:8px}.heading-actions{gap:6px}.heading-actions .icon-only{display:none}.heading-actions .btn{font-size:11px;padding:10px 11px}.project-tabs{gap:23px;margin-bottom:18px}.project-tabs a{font-size:11px}.library-toolbar{gap:14px;margin-bottom:20px}.library-tools{justify-content:space-between}.view-switch{display:flex}.search{width:200px}.search input{font-size:12px}.filter-tabs{gap:3px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}.filter-tabs button{font-size:10px;padding:7px 9px}.thumb{height:210px}.task-grid{gap:25px 16px}.task-info h2{font-size:14px}.task-info p{font-size:11px}.task-meta>small{font-size:10px}.task-meta .status{font-size:10px}.card-action{font-size:11px}.task-bottom .small{font-size:10px}.list-footer{gap:15px;font-size:9px}.list-footer>span:last-child{max-width:200px;text-align:right}.editor-workspace{grid-template-columns:1fr 1fr}.editor-heading{margin-bottom:18px}.editor-heading h1{font-size:20px;white-space:normal}.editor-primary{margin-left:52px}.section-tabs{margin-bottom:20px;gap:18px}.section-tabs button{font-size:12px}.editor-panel .field{font-size:12px}.editor-intro h2{font-size:22px}.player-panel{top:15px}.player-stage{min-height:360px}.video-canvas{width:220px}#toast{left:50%;width:max-content;max-width:calc(100vw - 30px)}.reference-grid{gap:10px}.settings-section{padding:24px 0}.settings-section h2{font-size:18px}.project-row{padding:23px 0;gap:15px}.project-symbol{width:48px;height:48px}.project-row h2{font-size:18px}.project-row p{font-size:11px}.project-row>span.muted{font-size:10px}.project-row>.icon{width:15px}.project-row>div{max-width:60%}}
@media(max-width:520px){main{padding:26px 20px}.page-heading{flex-wrap:wrap;gap:19px}.page-heading>div:first-child{width:100%}.page-heading h1{font-size:32px}.page-heading p{max-width:320px}.heading-actions{width:100%}.heading-actions>.btn.primary{width:100%;font-size:12px;padding:12px}.project-tabs{margin-top:4px;gap:24px}.task-grid{grid-template-columns:1fr;gap:29px}.thumb{height:218px}.task-info{padding-top:14px}.task-info h2{font-size:17px;margin-top:9px}.task-info p{font-size:12px}.task-bottom{margin-top:14px;padding-top:13px}.card-action{font-size:12px}.file-kind{font-size:10px}.status{font-size:11px}.task-meta>small{font-size:10px}.list-footer{font-size:9px;align-items:flex-start}.list-footer>span:last-child{max-width:175px}.filter-tabs button{padding:8px 9px}.project-tabs a{font-size:11px}.list-view .thumb{width:99px;height:112px}.list-view .task-card{gap:13px}.list-view .task-info h2{font-size:12px;white-space:normal;line-height:1.3}.list-view .task-info p{font-size:9px;line-height:1.5}.list-view .task-meta>small{display:none}.list-view .task-meta .status{font-size:9px}.list-view .task-bottom .file-kind{display:none}.list-view .card-action{font-size:9px}.list-view .task-bottom{margin-top:5px}.editor-heading{gap:12px}.editor-heading h1{font-size:20px}.editor-heading .back-btn{align-self:flex-start}.editor-subline{font-size:9px;gap:5px 8px}.editor-subline .status{font-size:9px}.editor-primary{margin:6px 0 0;width:100%}.editor-primary .btn{width:100%;min-height:40px;font-size:12px}.section-tabs{gap:18px;margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px;scrollbar-width:none}.section-tabs button{font-size:11px;padding-bottom:13px}.editor-workspace{display:flex;flex-direction:column;gap:27px}.player-panel{position:static;width:100%}.player-stage{min-height:0;padding:14px 20px 18px}.video-canvas{width:185px}.player-toolbar{height:43px;padding:0 13px}.media-tabs button{font-size:11px;padding:5px 11px}.player-toolbar>span{display:flex}.player-foot{font-size:9px;padding:11px 13px}.player-hint{font-size:9px}.editor-panel{width:100%;padding-top:0}.editor-intro h2{font-size:26px}.editor-intro p{font-size:12px}.editor-intro .eyebrow{font-size:9px}.editor-panel .section-heading{font-size:12px}.transcript{font-size:15px}.text-footer{font-size:9px}.suggestions .section-heading h3{font-size:12px}.suggestion p{font-size:13px}.suggestion small{font-size:10px}.inline-actions .btn{font-size:11px;min-height:36px}.notice{font-size:12px}.editor-section-actions .btn{width:100%}.preset-preview{height:98px;font-size:12px}.preset-preview.bold{font-size:14px}.preset>span:last-of-type{font-size:10px;padding:10px}.preset-grid{gap:9px}.reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-add{min-height:155px}.reference-add strong{font-size:11px}.reference-add small{font-size:10px}.reference-controls .text-btn{font-size:11px}.reference-controls .icon-btn{width:30px;height:35px}.settings-section .section-heading{align-items:flex-start;flex-wrap:wrap}.settings-main .btn.primary{width:100%}.settings-layout .field{font-size:13px}.project-row{flex-wrap:wrap}.project-row>div{max-width:calc(100% - 64px)}.project-row>.muted{margin-left:64px}.project-row>.icon{margin-left:auto}.project-row p{font-size:12px}.skeleton-grid{grid-template-columns:1fr}.skeleton:not(:first-child){display:none}dialog{padding:26px 21px;max-width:calc(100vw - 22px);max-height:calc(100dvh - 24px);border-radius:13px}.modal-heading h2{font-size:25px}.modal-heading p{font-size:12px}.modal-actions{flex-direction:column-reverse;align-items:stretch;gap:8px}.modal-actions .btn{width:100%}.modal-close{top:10px;right:10px}.field input,.field textarea,.field select{font-size:16px}.test-options .btn{font-size:11px}.empty{padding:25px 12px;min-height:330px}.empty h2{font-size:23px}.publication-note p{font-size:11px}.cover-candidates{grid-template-columns:repeat(2,1fr)}.cover-candidate{height:210px}.page-heading>.btn{width:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.spinner{border-right-color:currentColor;border-style:dotted}}

/* Legibility pass after desktop and mobile render review. */
.brand{font-family:'Segoe UI',Arial,sans-serif;font-weight:720;letter-spacing:-1.5px}
.workspace-switch strong,.nav-item,.project-nav{font-size:13px}
.workspace-switch small{font-size:10px}.sidebar-bottom .local-note strong{font-size:11px}.local-note p{font-size:11px}.profile strong{font-size:11px}.profile small{font-size:10px}
.breadcrumbs{font-size:12px}.page-heading p{font-size:13px}.project-tabs a{font-size:13px}
.filter-tabs button{font-size:11px}.search input{font-size:12px}.task-info h2{font-size:16px}.task-info p{font-size:12px}.card-action{font-size:12px}.task-meta .status{font-size:11px}.task-meta>small{font-size:10px}.file-kind{font-size:10px}.duration{font-size:11px}
.editor-subline{font-size:11px}.editor-subline .status{font-size:11px}.section-tabs button{font-size:12px}.editor-intro p{font-size:13px}.editor-panel .section-heading{font-size:12px}.language-label{font-size:11px}.text-footer{font-size:10px}.suggestions .section-heading h3{font-size:13px}.suggestion p{font-size:13px}.suggestion small{font-size:11px}.time-tag{font-size:11px}.inline-actions .btn{font-size:11px}.player-hint{font-size:11px}.player-foot{font-size:10px}.editor-section-actions .small{font-size:11px}.disabled-reason{font-size:11px}
button,a{touch-action:manipulation}dialog{overscroll-behavior:contain}h1,h2,h3{text-wrap:balance}
@media(max-width:1200px){.library-toolbar{flex-wrap:wrap}.filter-tabs{max-width:100%}.library-tools{margin-left:auto}.card-action{font-size:11px}.section-tabs{overflow-x:auto}.section-tabs button{flex-shrink:0}}
@media(max-width:760px){.library-tools{margin-left:0}.player-hint{font-size:10px}.sidebar:not(.open){visibility:hidden}.sidebar.open{visibility:visible}.editor-subline{font-size:10px}.editor-subline .status{font-size:10px}.editor-intro p{font-size:12px}}
@media(max-width:520px){.task-info h2{font-size:17px}.card-action{font-size:12px}.project-tabs a{font-size:11px}.filter-tabs button{font-size:10px}.text-footer{font-size:9px}.section-tabs button{font-size:11px}.list-view .task-info h2{font-size:12px}.list-view .card-action{font-size:10px}.list-view .task-info p{font-size:10px}}
.media-loading{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#c4cbc1;padding:20px;text-align:center;gap:16px;font-size:12px}.media-loading .btn{font-size:11px;min-height:34px;padding:8px}

/* Usability: one contextual action, short navigation and readable controls. */
.filter-tabs button,.search input,.card-action{font-size:13px}
.filter-tabs button{min-height:40px}
.library-toolbar{margin-top:28px}
.editor-heading{margin-bottom:22px}
.section-tabs{align-items:flex-start;justify-content:space-between;overflow:visible;gap:12px;margin-inline:0;padding-inline:0}
.main-sections{display:flex;gap:16px;flex-wrap:wrap}
.section-tabs button{font-size:14px;color:var(--muted);min-height:44px}
.extra-sections{position:relative;margin-left:auto;z-index:5}
.extra-sections summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;min-height:48px;font-size:13px;color:var(--muted);padding:8px}
.extra-sections summary::-webkit-details-marker{display:none}
.extra-sections>div{position:absolute;right:0;top:100%;width:240px;padding:8px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 28px #24283015}
.extra-sections button{width:100%;text-align:left;padding:10px;border:0;border-radius:5px;white-space:normal}
.extra-sections button.active{background:var(--accent-soft)}
.optional-note{display:block;font-size:12px;color:var(--muted);padding:7px 10px}
.editor-intro{margin-bottom:20px}
.editor-intro .eyebrow{display:none}
.editor-intro h2{font-size:25px}
.editor-intro p,.editor-panel .field,.editor-panel .section-heading,.inline-actions .btn,.preset>span:last-of-type{font-size:14px}
.editor-panel .field input,.editor-panel .field select,.editor-panel .field textarea{font-size:14px}
.editor-subline,.editor-subline .status,.text-footer,.player-hint,.suggestion small,.disabled-reason,.range-labels,.advanced summary{font-size:12px}
.editor-panel .inline-actions .btn{min-height:40px}
.editor-actionbar{position:sticky;bottom:12px;z-index:6;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px 0;margin:20px 0 0;background:var(--bg);border-top:1px solid var(--line)}
.editor-actionbar[hidden]{display:none}
.editor-actionbar .btn{min-height:44px;font-size:14px}
.editor-actionbar .disabled-reason{width:100%}
.action-hint{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}
.action-hint .icon{width:14px;height:14px}
.player-toggle{display:none}
.subtitle-overlay{max-height:none;text-wrap:initial}
.subtitle-sample-note{margin:0 0 10px;font-size:12px;color:var(--muted);line-height:1.5}
.subtitle-line{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preset-preview .preset-sample{background:var(--preset-background);padding:3px 6px}
.preset-preview em{color:var(--preset-accent)}
.preset-preview.highlight em{color:var(--preset-accent)}
.preset-preview.bold em{background:none;padding:0}
.preset-preview.editorial{font-size:12px}
#editor-error:empty{display:none}
#editor-error:focus{outline:2px solid var(--accent);outline-offset:4px}
.extra-sections summary:focus-visible,.player-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:1100px){
  .main-sections{gap:2px}.section-tabs button{font-size:13px}
  .section-tabs{flex-wrap:wrap}.extra-sections{margin-left:0}
  .extra-sections>div{left:0;right:auto}
}
@media(max-width:760px){
  .editor-workspace{display:flex;flex-direction:column;gap:20px}
  main:has(.editor-workspace){padding-bottom:125px}
  .section-tabs{gap:0;margin-bottom:16px}
  .main-sections{width:100%;justify-content:space-between;gap:0}
  .main-sections button{font-size:14px;padding:10px 6px}
  .extra-sections{width:100%}
  .extra-sections summary{min-height:40px;justify-content:flex-end;font-size:13px}
  .extra-sections>div{position:static;width:100%;box-shadow:none;margin-bottom:10px;display:flex;flex-wrap:wrap}
  .extra-sections .optional-note{width:100%}
  .extra-sections button{width:auto;font-size:13px}
  .player-panel{position:static;width:100%;background:var(--bg)}
  .player-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:10px 12px;font-size:13px;color:var(--ink)}
  .player-toggle>.icon:last-child{margin-left:auto;width:14px}
  .player-panel.compact #player-content{display:none}
  .player-panel.expanded .player-toggle{border-radius:8px 8px 0 0}
  .player-panel.expanded .player-toggle>.icon:last-child{transform:rotate(180deg)}
  .player-toolbar{height:38px;border-radius:0}
  .player-stage{padding:8px;min-height:0}
  .video-canvas{width:129px}
  .player-foot,.player-hint{display:none}
  .editor-panel{padding-top:0;width:100%}
  .editor-intro h2{font-size:24px}
  .editor-intro p{font-size:13px}
  .editor-panel .field input,.editor-panel .field textarea,.editor-panel .field select{font-size:16px}
  .transcript{min-height:160px;height:180px}
  .text-footer{font-size:11px;gap:8px;flex-wrap:wrap}
  .preset>span:last-of-type{font-size:13px}
  .editor-actionbar{position:fixed;left:0;right:0;bottom:0;z-index:10;margin:0;padding:12px 20px calc(12px + env(safe-area-inset-bottom));background:var(--surface);box-shadow:0 -4px 18px #24283008;gap:6px}
  .editor-actionbar .btn{width:100%;font-size:14px;min-height:44px}
  .editor-actionbar .action-hint{width:100%;justify-content:center}
  .editor-panel input,.editor-panel textarea,.editor-panel select,.editor-panel button{scroll-margin-bottom:125px;scroll-margin-top:330px}
  #toast{bottom:115px}
  .filter-tabs button{font-size:13px;min-height:40px}
  .library-tools{width:100%}.search{flex:1}
}

/* Round 2: project-scoped navigation and contextual tools. */
.sidebar{width:208px}.page{margin-left:208px}
.sidebar .nav-caption{display:flex;align-items:center;gap:8px;padding:0;margin:32px 0 12px}
.sidebar .nav-caption .nav-item{flex:1;min-width:0;margin:0;text-transform:none;letter-spacing:0;font-size:14px}
.sidebar .nav-caption>.icon-btn{width:32px;height:32px;flex-shrink:0}
.sidebar .project-nav{font-size:13px;margin-block:4px;min-height:42px}
.sidebar-bottom{padding-bottom:12px}
.project-title{display:flex;gap:16px;align-items:center}
.project-title h1{min-width:0}
.project-settings{margin:0;width:40px;height:40px;flex-shrink:0;color:var(--muted);border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.project-settings:hover{color:var(--accent);background:var(--accent-soft)}
.project-row{display:flex;align-items:flex-start;flex-wrap:nowrap;gap:20px;padding:24px 0}
.project-row>.project-settings{align-self:center;margin-right:16px}
.project-open{display:flex;align-items:flex-start;gap:20px;flex:1;min-width:0;color:inherit;text-decoration:none}
.project-open>div{min-width:0;flex:1;padding-top:6px}
.project-identity{display:flex;flex-direction:column;align-items:center;gap:10px;flex-shrink:0;width:80px}
.project-video-count{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);white-space:nowrap}
.project-video-count .icon{width:14px;height:14px;color:var(--ink)}
.project-open h2{font-size:20px}.project-open p{overflow-wrap:anywhere}
.project-open:hover h2{color:var(--accent)}
.editor-workspace{grid-template-columns:minmax(240px,300px) minmax(0,1fr);gap:36px}
.player-panel{background:transparent}
.player-toolbar{background:transparent;padding:0 0 10px;height:auto;border-radius:0}
.media-tabs{display:flex;gap:2px;flex-wrap:wrap}
.media-tabs button{color:var(--muted);font-size:12px;padding:8px 10px;min-height:36px}
.media-tabs button.active{background:var(--accent-soft);color:var(--accent)}
.media-tabs button:disabled{opacity:1;color:#838b96;background:#f1f3f6;cursor:not-allowed}
.player-stage{min-height:0;padding:10px;background:#e9edf2;border:1px solid var(--line);border-radius:8px}
.video-canvas{width:min(100%,calc((100dvh - 330px)*.5625));max-width:260px;margin:auto}
.player-hint{font-size:11px;margin:10px 0;line-height:1.5}
.context-panel{border-top:1px solid var(--line);margin-top:24px}
.context-panel>summary{list-style:none;display:flex;align-items:center;gap:12px;cursor:pointer;min-height:48px;padding:12px 0;font-size:14px;font-weight:600;color:var(--ink)}
.context-panel>summary::-webkit-details-marker{display:none}
.context-panel>summary>small{font-size:12px;font-weight:400;color:var(--muted)}
.context-panel>summary>.icon{width:14px;height:14px;margin-left:auto;flex-shrink:0}
.context-panel[open]>summary>.icon{transform:rotate(180deg)}
.context-panel>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.context-body{padding:8px 0 20px}
.context-body .editor-intro h2{font-size:20px}
.context-body .editor-intro{margin-bottom:18px}
.context-body .preview-options{margin-top:18px}
.context-body .file-name{overflow-wrap:anywhere;font-size:13px;font-weight:600}
.context-body .detail-list{margin:12px 0;font-size:12px}
.context-body .detail-list>div{padding:10px 0}
.player-panel .context-panel{margin-top:10px}
.player-panel .context-body{padding-bottom:8px}
.section-tabs{overflow:visible;flex-wrap:wrap}
@media(min-width:761px) and (max-width:1000px){
  .editor-workspace{grid-template-columns:minmax(210px,240px) minmax(0,1fr);gap:20px}
  .preset-grid{grid-template-columns:1fr}.preset-preview{height:65px}
  .preview-options,.two-fields{grid-template-columns:1fr}
  .main-sections{gap:12px}
}
@media(max-width:760px){
  .sidebar{width:240px}.page{margin-left:0}
  .project-row{gap:12px}.project-open{gap:12px;flex-wrap:nowrap}
  .project-identity{width:64px}.project-video-count{font-size:11px;gap:4px}
  .project-open>div{flex:1;min-width:0;padding-top:0}
  .project-open h2{font-size:18px}
  .project-title{gap:12px}
  .editor-workspace{display:flex;gap:20px}
  .player-panel:has(#panel-source[open]){position:static}
  .player-toolbar{background:var(--bg);padding:4px 6px}
  .player-stage{padding:6px;background:#e9edf2;border-radius:0 0 8px 8px}
  .video-canvas{width:120px}
  .player-hint{display:block;font-size:10px;margin:6px 0}
  .player-panel .context-panel{margin-top:0;background:var(--bg)}
  .player-panel .context-panel>summary{font-size:12px;min-height:36px;padding:8px 0}
  .context-panel>summary{flex-wrap:wrap;gap:6px 10px}
  .context-body .editor-intro h2{font-size:20px}
  .editor-panel input,.editor-panel textarea,.editor-panel select,.editor-panel button{scroll-margin-top:410px}
}

@media(min-width:761px){.editor-actionbar{position:static}}
@media(min-width:761px) and (max-width:1000px){
  .sidebar{width:240px;transform:translateX(-100%);visibility:hidden;padding:25px 18px 12px;transition:transform .23s}
  .sidebar.open{transform:translateX(0);visibility:visible}
  .page{margin-left:0}.mobile-menu{display:inline-flex}
  .nav-scrim{display:block;position:fixed;inset:0;border:0;background:#19253677;z-index:25;backdrop-filter:blur(2px)}
  .preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .preview-options,.two-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Reference previews preserve the full composition, including text at the edges. */
.ref-image{height:auto;aspect-ratio:1;padding:28px 8px 8px;background:#edf0f4;border:1px solid var(--line)}
.ref-image img{object-fit:contain;display:block}
.reference-add{aspect-ratio:1;min-height:0}

/* Audit: readable secondary content and consistent keyboard/touch controls. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.task-link{display:block;color:inherit;border-radius:10px}
.task-link:hover h2,.task-link:focus-visible h2{color:var(--accent)}
.list-view .task-card{display:block}.list-view .task-link{display:flex;align-items:center;gap:22px}
.top-testing{display:inline-flex;align-items:center;gap:5px;color:#53647a;font-size:11px}
.top-testing>.icon{width:12px;height:12px}.top-testing .live-dot{margin:0}
.task-meta>small,.file-kind,.list-footer,.text-footer,.range-labels,.player-hint,.editor-subline,.time-tag{color:var(--muted)}
.task-meta>small,.file-kind,.list-footer{font-size:11px}
#draft-actions .text-btn{font-size:12px;min-height:32px;color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.page-heading>div,.heading-actions,.library-toolbar,.library-tools,.filter-tabs,.search{min-width:0}
.page-heading h1{overflow-wrap:anywhere}
.heading-actions .btn{white-space:normal;overflow-wrap:anywhere;flex-wrap:wrap}
.view-switch{display:flex}
@media(max-width:760px){
 .mobile-menu,.sidebar .nav-caption>.icon-btn,.project-settings,.view-switch .icon-btn{min-width:44px;min-height:44px}
 .top-testing{min-height:44px;white-space:normal}
 .topbar{gap:8px}.breadcrumbs{flex:1;min-width:44px}.breadcrumbs strong{min-width:0}
 .heading-actions>.btn.primary{flex:1;min-width:0}
 .search{width:auto}.view-switch{flex-shrink:0}
 .list-view .task-link{gap:13px}
 #draft-actions .text-btn{min-height:44px}
 .filter-tabs{width:100%;overflow-x:auto}
 .task-meta,.task-bottom,.list-footer{flex-wrap:wrap}
 .task-meta .status{white-space:normal}
 #toast{max-width:calc(100% - 30px)}
}

/* Reliability audit: variable content, visible input focus, persistent storage feedback. */
.page-heading p,.project-open h2,.editor-heading h1,.modal-heading h2,.modal-heading p{overflow-wrap:anywhere}
.project-description-preview{display:grid;justify-items:start;gap:3px;max-width:680px;margin-top:10px}
.project-description-preview p{margin:0;max-width:none}
.project-description-preview.is-clamped p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.project-description-preview .text-btn{padding-block:5px}
.project-description-full{white-space:pre-wrap;overflow-wrap:anywhere;max-height:min(52vh,520px);overflow:auto;margin-top:18px;padding-right:10px;color:var(--muted)}
.project-row p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.editor-heading>div{min-width:0}
#storage-warning:not([hidden]){position:sticky;top:0;z-index:90;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:12px 20px;background:#fff1e6;color:#743e1a;border-bottom:1px solid #bf895f;font-size:14px}
.topbar-actions{display:flex;align-items:center;gap:10px}
.live-mode{background:#ecf7ee;border-color:#c4e5cb;color:#22633a}
.task-source.empty-source{display:grid;place-items:center;background:linear-gradient(145deg,#e8edf6,#f7f8fa);color:#5d6c82}
.task-source.empty-source .icon{width:30px;height:30px}
.reference-live-placeholder{display:grid;place-items:center;width:100%;height:100%;background:#edf1f7;color:#65748a}
.reference-live-placeholder .icon{width:28px;height:28px}
.initial-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:14px 0 20px}
.initial-action-note{display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font-size:13px}
.field input:focus-visible,.field textarea:focus-visible,.field select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.field-error{display:block;color:var(--red);font-size:12px;margin-top:6px}

/* Keep project actions usable beside long titles. */
.page-heading>div:first-child{flex:1;min-width:0}
.heading-actions{flex-shrink:0}
@media(min-width:521px){.heading-actions .btn{min-width:170px;white-space:nowrap;flex-wrap:nowrap}}
@media(min-width:521px) and (max-width:1000px){.page-heading{flex-wrap:wrap}.page-heading>div:first-child{flex-basis:100%}.heading-actions{margin-left:auto}}
.media-availability{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--muted);line-height:1.5;margin:0 0 10px}
.media-availability span+span::before{content:"·";margin-right:12px}
.rebuild-note{font-size:13px;color:var(--muted);margin:-8px 0 18px;overflow-wrap:anywhere}
/* LFA reference: restrained typography, outlines and project navigation. */
.page-heading{padding:24px 26px;margin-bottom:28px;border-radius:16px;background:radial-gradient(ellipse at 100% 0%,#b43e4e0d,transparent 48%),linear-gradient(115deg,#edf2fb80,#fafbfc 65%);align-items:center}
.page-heading h1{font-weight:700;letter-spacing:-1.4px}
.page-heading p{font-size:14px;line-height:1.6}
.page-heading>.btn{border-radius:10px;min-height:44px;flex-shrink:0}
.project-list{display:grid;gap:12px}
.project-list .project-row{padding:22px;gap:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface);transition:border-color .18s,background .18s}
.project-list .project-row:hover{background:#f7f9fc;border-color:#bccbe0}
.project-list .project-open{align-items:center;gap:24px;border-radius:8px}
.project-list .project-open>div{padding-top:0}
.project-list .project-open h2{font-size:21px;font-weight:650;letter-spacing:-.45px;line-height:1.3;margin:0}
.project-list .project-open p{font-size:13px;line-height:1.6;margin-top:7px;max-width:620px}
.project-list .project-symbol{width:60px;height:60px;border-radius:14px}
.project-list .project-identity{width:76px;gap:9px}
.project-list .project-settings{width:44px;height:44px;margin-right:0;border-radius:10px;background:transparent}
.project-list .project-settings:hover{background:var(--accent-soft);border-color:#bccbe0}
.sidebar .nav-item,.sidebar .project-nav{border-radius:10px;transition:background .18s,color .18s}
.sidebar .nav-caption .nav-item{min-height:44px;font-weight:600}
.sidebar .nav-item.active,.sidebar .project-nav.selected{background:#e6edfa;color:var(--accent-dark);box-shadow:inset 3px 0 var(--accent)}
.sidebar .project-nav.selected{font-weight:600}
.sidebar .project-nav:hover{background:#e9edf3;color:var(--ink)}
.sidebar .project-nav.selected:hover{background:#dfe8f8;color:var(--accent-dark)}
.sidebar .project-nav small{font-size:11px;font-weight:500;font-variant-numeric:tabular-nums;color:var(--muted)}
.sidebar .nav-caption>.icon-btn{width:36px;height:36px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.sidebar-bottom{border-top:1px solid var(--line);padding-top:16px}
@media(max-width:760px){
 .page-heading{padding:20px;margin-bottom:22px}
 .project-list .project-row{padding:18px;gap:12px}
 .project-list .project-open{gap:16px}
 .project-list .project-open h2{font-size:18px}
 .project-list .project-identity{width:64px}
 .project-list .project-symbol{width:52px;height:52px}
 .sidebar .nav-caption>.icon-btn{width:44px;height:44px}
}
@media(max-width:520px){
 .page-heading{padding:20px 16px}
 .project-list .project-row{padding:16px 12px;gap:8px}
 .project-list .project-open{gap:12px;align-items:flex-start}
 .project-list .project-open h2{font-size:17px}
 .project-list .project-open p{font-size:12px}
 .project-list .project-identity{width:52px}
 .project-list .project-video-count{font-size:10px;gap:3px}
 .project-list .project-settings{width:44px;height:44px}
}
@media(prefers-reduced-motion:reduce){.project-list .project-row,.sidebar .nav-item,.sidebar .project-nav{transition:none}}
/* Task overview: source thumbnail, current status and server-provided next step. */
.task-rows{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.task-rows.list-view{display:grid;grid-template-columns:1fr}
.task-rows .task-card{display:block;padding:0;border:0;animation:none}
.task-rows .task-link{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:12px 18px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface);transition:border-color .18s,background .18s}
.task-rows .task-link:hover{border-color:#a9bddb;background:#f7f9fc}
.task-rows .task-link:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.task-source{grid-row:1 / 3;display:block;width:64px;height:88px;border-radius:8px;overflow:hidden;background:#e9edf3;pointer-events:none}
.task-source video{display:block;width:100%;height:100%;object-fit:contain;background:#262c35}
.task-rows .task-info{padding:0;min-width:0}
.task-rows .task-info h2{font-size:17px;font-weight:650;letter-spacing:-.25px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;margin:0}
.task-facts{display:flex;flex-wrap:wrap;gap:4px 14px;color:var(--muted);font-size:12px;margin:5px 0 9px;font-variant-numeric:tabular-nums}
.task-rows .task-meta{justify-content:flex-start;flex-wrap:wrap;gap:6px 12px}
.task-rows .task-meta .status{font-size:12px;white-space:normal}
.task-note{font-size:12px;color:var(--muted)}
.task-rows .task-bottom{grid-column:2;margin:0;padding:0;border:0;min-width:0}
.task-rows .card-action{font-size:13px;gap:8px;line-height:1.5}
.task-rows .card-action .icon{flex-shrink:0;width:16px;height:16px}
@media(min-width:1101px){
 .task-rows.list-view .task-link{grid-template-columns:64px minmax(0,1fr) minmax(160px,210px);gap:22px}
 .task-rows.list-view .task-source{grid-row:auto}
 .task-rows.list-view .task-bottom{grid-column:3;justify-content:flex-end}
}
@media(max-width:1100px){.task-rows{grid-template-columns:1fr}}
@media(max-width:520px){
 .task-rows .task-link{padding:14px;grid-template-columns:48px minmax(0,1fr);gap:10px 14px}
 .task-rows .task-source{width:48px;height:68px;align-self:start}
 .task-rows .task-info h2{font-size:16px}
 .task-rows .task-facts{font-size:11px}
 .task-rows .task-meta .status,.task-rows .task-note{font-size:11px}
 .task-rows .card-action{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.task-rows .task-link{transition:none}}
/* LFA-inspired light palette: graphite, cobalt and restrained signal red. */
:root{--bg:#f8f9fb;--sidebar:#f0f2f5;--ink:#171b23;--muted:#5c6573;--line:#dfe3e9;--accent:#2458ae;--accent-dark:#19458e;--accent-soft:#e9effa;--red:#be2638;--action-fill:#2458ae;--action-hover:#19458e}
.topbar{background:#fff}
.brand-mark i:first-child{background:#2458ae}
.brand-mark i:last-child{background:#d12637}
.project-dot.tone-0{background:#2458ae}
.project-dot.tone-1{background:#be2638}
.tone-0{background:#e7edfa;color:#2458ae}
.tone-1{background:#e9eaee;color:#323a48}
.tone-2{background:#f8e9ec;color:#ac2a3c}
.sidebar .nav-item.active{background:#e4ebf8;color:#19458e;box-shadow:inset 3px 0 #2458ae}
.sidebar .project-nav.selected{background:#e8eef9;color:#19458e;box-shadow:inset 2px 0 #3869b5}
.sidebar .project-nav.selected small{color:#536985}
.sidebar .project-nav.selected .project-dot{background:#3869b5}
.sidebar .project-nav.selected:hover{background:#dfe8f7;color:#19458e}
.filter-tabs button.active{background:#edf2fa;color:#19458e;border-color:#cbd9ed}
.filter-tabs button.active span{background:#dce6f5;color:#19458e}
.task-rows .task-link:hover{background:#f3f6fc;border-color:#8da9d2}
.task-rows .task-meta .status.pending{color:#414c60}
.task-rows .task-meta .status.processing{color:#2458ae}
.task-rows .task-meta .status.ready{color:#38635b}
.task-rows .task-meta .status.failed{color:#b22436}
.task-rows .card-action{color:#2458ae}
.page-heading{background:radial-gradient(ellipse at 100% 0%,#be26380c,transparent 48%),linear-gradient(115deg,#e8eefb,#f8f9fb 65%)}
/* Small brand accents: rose project symbols and a red heading marker. */
.page-heading .eyebrow{display:flex;align-items:center;gap:9px}
.page-heading .eyebrow::before{content:"";width:6px;height:6px;flex-shrink:0;border-radius:50%;background:#c53246}
.project-list .project-symbol.tone-1{background:#f8e9ed;color:#b52f45}
.project-list .project-symbol.tone-2{background:#f6e6ea;color:#aa2940}
.project-list .project-row:hover .project-symbol.tone-1,.project-list .project-row:hover .project-symbol.tone-2{background:#f3dce3}
.sidebar .project-nav.selected .project-dot.tone-1{background:#bd3449}
.filter-tabs button[data-value="pending"]>span{background:#f7e3e8;color:#a62b41}
.filter-tabs button[data-value="pending"].active>span{background:#f3dce3;color:#a62b41}
.page-heading{background:radial-gradient(ellipse at 100% 0%,#bf30451a,transparent 58%),linear-gradient(115deg,#edf2fb,#f8f9fb 65%)}

/* The video workspace uses the same heading surface with a compact back control. */
.editor-heading{padding:22px 26px;border-radius:16px;background:radial-gradient(ellipse at 100% 0%,#bf30451a,transparent 58%),linear-gradient(115deg,#edf2fb,#f8f9fb 65%);align-items:center;flex-wrap:nowrap}
.editor-heading>div{min-width:0;flex:1}
.editor-heading h1{white-space:normal;line-height:1.35}
.editor-heading .back-btn{align-self:center;flex-shrink:0;background:#ffffffb3;border:1px solid var(--line);border-radius:10px}
.editor-subline{flex-wrap:wrap}
@media(max-width:760px){.editor-heading{padding:20px;gap:14px}}
@media(max-width:520px){.editor-heading{padding:18px 16px;gap:12px}.editor-heading .back-btn{align-self:flex-start}.editor-heading h1{font-size:20px}.editor-subline{gap:6px 10px}}
/* LFA heading signature, separated from the primary action. */
.page-heading,.editor-heading{position:relative;isolation:isolate;background:#fff;border:1px solid var(--line)}
.page-heading::after,.editor-heading::after{content:"";position:absolute;bottom:0;left:26px;width:68px;height:4px;background:linear-gradient(110deg,#2458ae 0 60%,#fff 60% 69%,#c92e43 69% 100%);transform:skewX(-24deg);pointer-events:none}
.page-heading .eyebrow::before{border-radius:1px;transform:skewY(-18deg)}
@media(max-width:760px){.page-heading::after,.editor-heading::after{left:20px;width:56px;height:3px}}
@media(max-width:520px){.page-heading::after,.editor-heading::after{left:16px}}

/* Application direction: quiet navigation and one structured content list. */
:root{--bg:#f6f8fb;--sidebar:#f3f6fa;--surface:#fff;--ink:#172033;--muted:#637087;--line:#dfe5ee;--accent:#1765d8;--accent-dark:#0f51b5;--accent-soft:#eaf2ff;--green:#27745e;--red:#c73548;--action-fill:#1765d8;--action-hover:#0f51b5}
.sidebar{background:var(--sidebar);border-right:1px solid #e5eaf1;padding-top:26px}
.brand{color:#111827;margin-bottom:40px}
.sidebar .nav-caption{margin-top:22px}
.sidebar .nav-item,.sidebar .project-nav{color:#53627a;border-radius:9px}
.sidebar .nav-item.active,.sidebar .project-nav.selected{background:#e3edfd;color:#1459bd;box-shadow:none}
.sidebar .nav-item.active:hover,.sidebar .project-nav.selected:hover{background:#d9e7fb;color:#104fa9}
.topbar{height:64px;border-color:#e6ebf2}
main{padding-top:32px}
.page-heading,.editor-heading{position:static;background:transparent;border:0;border-radius:0;padding:0;margin-bottom:28px;isolation:auto}
.page-heading::after,.editor-heading::after,.page-heading .eyebrow::before{display:none}
.page-heading h1{font-size:32px;letter-spacing:-1px}
.page-heading p{font-size:13px;margin-top:8px}
.editor-heading{padding:0;background:transparent}
.editor-heading .back-btn{background:#fff}
.primary{border-radius:8px;box-shadow:0 2px 5px #1456b626}
.library-toolbar{margin:0;background:#fff;border:1px solid var(--line);border-bottom:0;border-radius:14px 14px 0 0;padding:12px 16px;gap:18px}
.filter-tabs{gap:18px;flex-wrap:nowrap}
.filter-tabs button{position:relative;border:0;border-radius:0;padding:10px 2px;color:#68758a;background:transparent;min-height:42px}
.filter-tabs button.active{background:transparent;color:#1459bd;border:0}
.filter-tabs button.active::after{content:"";position:absolute;height:2px;left:2px;right:2px;bottom:0;background:#1765d8;border-radius:2px}
.filter-tabs button span,.filter-tabs button[data-value="pending"]>span,.filter-tabs button[data-value="pending"].active>span{background:#edf1f6;color:#637087;border-radius:999px}
.search{width:190px}
.search input{font-size:12px}
.view-switch{border-left-color:#e3e8ef}
.view-switch .active{background:#eaf2ff;color:#1459bd}
#task-list:has(.task-rows){background:#fff;border:1px solid var(--line);border-radius:0 0 14px 14px;overflow:hidden}
.task-rows.list-view{display:block}
.task-rows.list-view .task-card{border-bottom:1px solid #e7ebf1}
.task-rows.list-view .task-card:last-child{border-bottom:0}
.task-rows.list-view .task-link{display:grid;grid-template-columns:112px minmax(0,1fr) minmax(150px,190px) minmax(150px,190px);align-items:center;gap:20px;padding:16px 18px;border:0;border-radius:0;background:#fff;min-height:116px}
.task-rows.list-view .task-link:hover{background:#f7faff}
.task-rows.list-view .task-link:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.task-rows.list-view .task-source{grid-row:auto;width:112px;height:82px;border-radius:9px;background:#e9eef5}
.task-rows.list-view .task-source video{object-fit:cover}
.task-rows.list-view .task-info{min-width:0}
.task-rows.list-view .task-info h2{font-size:16px;line-height:1.35;margin:0;color:#182238}
.task-summary{margin:3px 0 8px;color:#6a7689;font-size:12px;line-height:1.45}
.task-rows.list-view .task-facts{margin:0;font-size:11px;color:#7a8698}
.task-rows.list-view .task-meta{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;gap:7px}
.task-rows.list-view .status{padding:6px 10px;border-radius:999px;font-size:11px;font-weight:600}
.task-rows.list-view .status.pending{color:#8a6215;background:#fff4d9}
.task-rows.list-view .status.processing{color:#1459bd;background:#e8f1ff}
.task-rows.list-view .status.ready{color:#236b57;background:#e5f5ef}
.task-rows.list-view .status.failed{color:#ac2d40;background:#fbe9ec}
.task-rows.list-view .status i{width:6px;height:6px}
.task-rows.list-view .task-note{font-size:11px;line-height:1.35;color:#7a6570}
.task-rows.list-view .task-bottom{grid-column:4;justify-content:flex-end}
.task-rows.list-view .card-action{font-size:12px;font-weight:600;color:#1459bd;justify-content:flex-end;text-align:right}
.list-footer{margin-top:18px;color:#738096;font-size:11px}
.project-list{gap:0;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.project-list .project-row{border:0;border-bottom:1px solid #e7ebf1;border-radius:0;padding:20px}
.project-list .project-row:last-child{border-bottom:0}
.project-list .project-row:hover{background:#f7faff;border-color:#e7ebf1}
@media(max-width:1100px){
 .task-rows.list-view .task-link{grid-template-columns:96px minmax(0,1fr) minmax(140px,180px);gap:16px}
 .task-rows.list-view .task-source{width:96px;height:76px}
 .task-rows.list-view .task-meta{grid-column:3;grid-row:1}
 .task-rows.list-view .task-bottom{grid-column:3;grid-row:2;justify-content:flex-start}
}
@media(max-width:760px){
 main{padding-top:26px}
 .page-heading,.editor-heading{padding:0;margin-bottom:24px}
 .page-heading h1{font-size:30px}
 .library-toolbar{padding:10px 12px;flex-direction:column;align-items:stretch}
 .filter-tabs{width:100%;overflow-x:auto;gap:16px}
 .library-tools{width:100%}
 .search{width:auto;flex:1}
 .task-rows.list-view .task-link{grid-template-columns:76px minmax(0,1fr);gap:10px 14px;padding:14px;min-height:0}
 .task-rows.list-view .task-source{grid-column:1;grid-row:1 / 3;width:76px;height:96px;align-self:start}
 .task-rows.list-view .task-info{grid-column:2;grid-row:1}
 .task-rows.list-view .task-meta{grid-column:2;grid-row:2;align-items:flex-start}
 .task-rows.list-view .task-bottom{grid-column:2;grid-row:3;justify-content:flex-start}
 .task-rows.list-view .card-action{text-align:left;justify-content:flex-start}
}
@media(max-width:520px){
 .page-heading h1{font-size:28px}
 .task-rows.list-view .task-link{grid-template-columns:64px minmax(0,1fr);padding:13px 12px}
 .task-rows.list-view .task-source{width:64px;height:88px}
 .task-rows.list-view .task-info h2{font-size:15px}
 .task-summary{font-size:11px;margin-bottom:6px}
 .task-rows.list-view .task-meta{grid-column:1 / -1;grid-row:3;flex-direction:row;align-items:center;padding-left:78px;flex-wrap:wrap}
 .task-rows.list-view .task-bottom{grid-column:1 / -1;grid-row:4;padding-left:78px}
}

/* LFA client direction — polished light publishing workspace. */
:root{--bg:#f4f7fb;--sidebar:#f8fafd;--surface:#fff;--ink:#111b31;--muted:#64728a;--line:#e1e7f0;--accent:#0b5bd3;--accent-dark:#0849aa;--accent-soft:#e7f0ff;--red:#dc263e;--action-fill:#0b5bd3;--action-hover:#0849aa;--radius:12px}
body{background:var(--bg);color:var(--ink)}
.sidebar{width:232px;padding:25px 16px 14px;background:#f8fafd;border-right:1px solid #e5eaf2}
.page{margin-left:232px}.topbar{height:62px;padding-inline:34px;background:#fff;border-bottom:1px solid #e7ebf2}.top-testing{border:1px solid #dfe5ee;border-radius:999px;padding:7px 11px;background:#fafcff}
main{max-width:1320px;margin-inline:auto;padding:36px 44px 70px}.brand.lfa-brand{display:flex;align-items:flex-end;gap:9px;margin:0 10px 40px;color:#111827;letter-spacing:0;font-style:normal}.lfa-word{position:relative;display:flex;align-items:center;height:34px;font-size:29px;font-weight:900;font-style:italic;letter-spacing:-5px;transform:skewX(-8deg)}.lfa-word b{display:inline-block;line-height:1}.lfa-word b:nth-child(3){color:#0b5bd3}.lfa-word i{position:absolute;right:-4px;bottom:2px;width:11px;height:14px;background:#e2263f;clip-path:polygon(100% 0,100% 100%,0 72%)}.brand-product{font-size:10px;line-height:1.1;font-weight:750;letter-spacing:.08em;text-transform:uppercase;color:#78859a;margin-bottom:2px}
.sidebar nav{display:grid;gap:4px}.sidebar .nav-caption{margin:0;display:grid;grid-template-columns:1fr 36px;gap:4px}.sidebar .nav-item,.sidebar .project-nav{min-height:44px;padding:11px 12px;border-radius:10px;font-size:13px;color:#526078}.sidebar .nav-item .icon{width:18px;height:18px}.sidebar .nav-item.active,.sidebar .project-nav.selected{color:#0b55bd;background:#e5efff;box-shadow:none}.sidebar .project-nav{margin-left:12px;min-height:38px;padding-block:8px}.sidebar .project-nav span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-bottom{gap:3px;border-top:1px solid #e4e9f1;padding-top:12px}.profile-card{width:100%;margin-top:9px;border:1px solid #e1e6ee;border-radius:11px;background:#fff;display:grid;grid-template-columns:28px minmax(0,1fr) 14px;align-items:center;gap:8px;padding:10px;text-align:left;color:#53617a}.profile-card>span{min-width:0}.profile-card strong,.profile-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-card strong{font-size:11px;color:#1c2639}.profile-card small{font-size:9px;margin-top:1px}
.page-heading{align-items:center;margin-bottom:28px}.page-heading h1{font-size:31px;letter-spacing:-.9px}.page-heading p{color:#68768c;max-width:680px}.eyebrow{font-size:10px;font-weight:750;letter-spacing:.13em;color:#6f7c91}.primary{background:linear-gradient(180deg,#1769db,#0b56c5);border-color:#084ba9;box-shadow:0 4px 12px #0b5bd326}.primary:hover:not(:disabled){background:#084cae}.btn{border-radius:9px;min-height:42px}.library-toolbar{padding:13px 18px;border-radius:13px 13px 0 0;box-shadow:0 5px 20px #283a5a08}.filter-tabs{gap:22px}.filter-tabs button{font-size:12px}.task-rows.list-view .task-link{grid-template-columns:122px minmax(0,1fr) minmax(150px,190px) minmax(150px,190px);padding:16px 20px}.task-rows.list-view .task-source{width:122px;height:80px}.task-rows.list-view .task-info h2{font-size:16px}.task-summary{font-size:12px}.task-rows.list-view .status{padding:7px 11px}.task-rows.list-view .task-card{transition:background .15s}.task-rows.list-view .task-card:hover{background:#f8faff}
.connections-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:18px}.social-card{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:18px;padding:22px;background:#fff;border:1px solid var(--line);border-radius:14px}.social-card h2{font-size:18px}.social-card p{font-size:12px;color:var(--muted);margin-top:4px}.social-logo{width:44px;height:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;font-size:19px;font-weight:800;color:white;flex-shrink:0}.social-logo.instagram{background:linear-gradient(135deg,#6b35c6,#dc2f73 60%,#f79a35)}.social-logo.youtube{background:#f0182d}.social-logo.vk{background:#0077ff}.connection-state{display:inline-flex;align-items:center;gap:5px;margin-top:8px;font-size:11px;color:#27745e}.connection-state .icon{width:13px}
.publish-panel{margin-top:26px;padding-top:24px;border-top:1px solid var(--line)}.publish-panel>.section-heading{align-items:flex-start}.publish-panel h3{font-size:19px;margin:4px 0}.publish-panel p{font-size:12px;color:var(--muted)}.publish-targets{display:grid;gap:10px;margin-top:16px}.publish-target{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:11px;background:#fbfcfe}.publish-target .social-logo{width:38px;height:38px;border-radius:9px;font-size:16px}.publish-target strong,.publish-target small{display:block}.publish-target strong{font-size:13px}.publish-target small{font-size:11px;color:var(--muted);margin-top:2px}.published-badge,.processing-badge{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:650}.published-badge{color:#27745e}.published-badge .icon{width:14px}.processing-badge{color:#0b5bd3}.publication-summary{display:grid;gap:4px;padding:14px 16px;margin-top:16px;border:1px solid var(--line);border-radius:10px;background:#f8faff}.publication-summary span{font-size:12px;color:var(--muted)}
.auth-shell{max-width:none;min-height:100dvh;padding:0;display:grid;grid-template-columns:minmax(360px,1fr) minmax(440px,560px);background:#fff}.auth-brand{position:relative;overflow:hidden;display:flex;align-items:center;padding:8vw;background:linear-gradient(140deg,#eef4fc 0%,#f8fbff 55%,#e6effb 100%)}.auth-brand::before{content:"";position:absolute;width:620px;height:620px;border:1px solid #0b5bd31a;border-radius:50%;right:-280px;top:-230px;box-shadow:0 0 0 80px #0b5bd308,0 0 0 160px #0b5bd306}.auth-brand::after{content:"LFA";position:absolute;right:-16px;bottom:-76px;font-size:260px;font-weight:900;font-style:italic;letter-spacing:-38px;color:#0b5bd309}.auth-brand-inner{position:relative;z-index:1;max-width:670px}.auth-brand .brand{display:inline-flex;margin:0 0 72px}.auth-brand .lfa-word{font-size:40px;height:42px}.auth-brand .brand-product{font-size:12px}.auth-kicker{display:block;font-size:11px;font-weight:800;letter-spacing:.18em;color:#0b5bd3;margin-bottom:20px}.auth-brand h1{font-size:clamp(40px,4vw,64px);line-height:1.04;letter-spacing:-2.8px;max-width:690px}.auth-brand p{font-size:16px;color:#5c6b82;max-width:560px;margin-top:25px}.auth-stripe{display:flex;width:118px;height:6px;gap:4px;margin-top:44px;transform:skewX(-25deg)}.auth-stripe i:nth-child(1){width:68px;background:#0b5bd3}.auth-stripe i:nth-child(2){width:8px;background:#fff}.auth-stripe i:nth-child(3){width:34px;background:#dc263e}.auth-panel{display:flex;align-items:center;justify-content:center;padding:48px;background:#fff;border-left:1px solid #e7ecf3}.auth-card{width:min(100%,380px);display:grid;gap:18px}.auth-card h2{font-size:30px;margin:6px 0}.auth-card>div>p{font-size:13px;color:var(--muted)}.auth-card .field{margin:0}.auth-card .field input{min-height:48px}.auth-submit{width:100%;min-height:48px;margin-top:4px}.auth-switch{border:0;background:transparent;color:#0b5bd3;font-weight:650;font-size:12px}.auth-local-note{text-align:center;color:#8a95a6}.auth-mobile-logo{display:none}
@media(max-width:1000px){.sidebar{width:220px}.page{margin-left:220px}main{padding-inline:28px}.task-rows.list-view .task-link{grid-template-columns:96px minmax(0,1fr) minmax(140px,180px)}.task-rows.list-view .task-source{width:96px}.auth-shell{grid-template-columns:1fr 440px}.auth-brand{padding:6vw}.auth-brand h1{font-size:44px}}
@media(max-width:760px){.page{margin-left:0}.sidebar{width:270px}.topbar{padding-inline:16px}main{padding:25px 18px 100px}.connections-grid{grid-template-columns:1fr}.social-card{grid-template-columns:44px minmax(0,1fr);padding:18px}.social-card>.btn{grid-column:1/-1;width:100%}.auth-shell{display:block;background:#f4f7fb;padding:24px;min-height:100dvh}.auth-brand{display:none}.auth-panel{min-height:calc(100dvh - 48px);padding:24px;border:0;border-radius:18px;box-shadow:0 12px 44px #23395b12}.auth-mobile-logo{display:block;font-size:27px;font-style:italic;font-weight:900;letter-spacing:-2px}.auth-mobile-logo small{font-size:9px;letter-spacing:.08em;color:#78859a}.publish-target{grid-template-columns:38px minmax(0,1fr)}.publish-target>.btn,.published-badge,.processing-badge{grid-column:2;justify-self:start}}
@media(max-width:520px){.task-rows.list-view .task-meta,.task-rows.list-view .task-bottom{padding-left:78px}.auth-shell{padding:0}.auth-panel{min-height:100dvh;border-radius:0;padding:28px 22px}.auth-card h2{font-size:27px}.page-heading>.btn,.page-heading>a.btn{width:100%}.page-heading{align-items:flex-start}}

/* Usability audit remediation: performance, legibility, touch and mobile density. */
:root{--muted:#4d5a70}
.brand-product{color:#4d5a70;font-size:12px}
.page-heading p,.task-summary,.task-rows.list-view .task-facts,.task-note,.list-footer,.eyebrow,.editor-intro p,.player-hint,.editor-subline,.text-footer,.range-labels,.language-label,.suggestion small,.result-ready p,.publish-panel p,.publish-target small,.auth-card>div>p,.auth-local-note,.reference small,.optional,.disabled-reason{color:#4d5a70}
.eyebrow,.task-rows.list-view .task-facts,.task-note,.list-footer,.editor-subline,.text-footer,.range-labels,.language-label,.suggestion small,.player-hint,.publish-target small,.auth-local-note,.reference small,.optional,.disabled-reason{font-size:12px}
.task-summary,.editor-intro p,.page-heading p,.publish-panel p{font-size:13px}
.suggestion del,.suggestion p del{color:#4d5a70}
.breadcrumbs,.task-rows.list-view .task-info p,.notice,.count-label,.reference-add small,.settings-aside p{color:#4d5a70}
.breadcrumbs a{display:inline-flex;align-items:center;min-height:44px}
.skip-link{min-height:44px}
.notice,.reference-add small,.count-label,.settings-aside p{font-size:12px}
.danger-outline{color:#a91e32}
.auth-mobile-logo small{color:#4d5a70;font-size:12px}
.title-option{color:#3f5068;font-size:12px;min-height:44px}
.btn,.icon-btn,.text-btn,.search,.search input,.inline-actions .btn,.publish-target .btn,.reference-controls button{min-height:44px}
button{min-height:44px}
#app button{min-height:44px}
.brand.lfa-brand,.sidebar .project-nav,.context-panel>summary,#project-form input,#project-form select,#project-form textarea{min-height:44px}
.player-panel .context-panel>summary{min-height:44px}
.editor-panel .inline-actions .btn,.media-tabs button{min-height:44px}
.icon-btn{min-width:44px;width:44px;height:44px}
.sidebar .nav-caption>.icon-btn{width:44px;height:44px}
.text-link{display:inline-flex;align-items:center;min-height:44px;padding-block:8px}
.task-source img{display:block;width:100%;height:100%;object-fit:cover;background:#262c35}
.cover-candidate img,.ref-image img{height:auto;aspect-ratio:9/16}
.video-canvas video{accent-color:var(--accent);border-radius:5px}
.video-canvas video::cue{color:#fff;background:#111b31d9;font-size:1rem;line-height:1.35}
@media(max-width:760px){
 .filter-tabs{display:flex;flex-wrap:wrap;overflow:visible;gap:4px 12px;padding-bottom:0}
 .filter-tabs button{flex:0 0 auto;min-height:44px;font-size:12px;padding:9px 2px}
 .search,.search input{min-height:44px}
 .task-rows.list-view .task-link{grid-template-columns:58px minmax(0,1fr);gap:8px 12px;padding:12px;min-height:0}
 .task-rows.list-view .task-source{grid-column:1;grid-row:1 / 3;width:58px;height:76px}
 .task-rows.list-view .task-info{grid-column:2;grid-row:1}
 .task-rows.list-view .task-info h2{font-size:15px}
 .task-summary{font-size:12px;margin:2px 0 5px}
 .task-rows.list-view .task-facts{font-size:12px;margin:0}
 .task-rows.list-view .task-meta{grid-column:2;grid-row:2;flex-direction:row;align-items:center;padding:0;gap:6px}
 .task-rows.list-view .task-bottom{grid-column:1 / -1;grid-row:3;padding-left:70px}
 .task-rows.list-view .status,.task-rows.list-view .task-note,.task-rows.list-view .card-action{font-size:12px}
 .task-rows.list-view .status{padding:5px 8px}
 .library-toolbar{gap:10px}
 .player-hint{font-size:12px}
}
@media(max-width:360px){
 .filter-tabs{gap:2px 9px}
 .filter-tabs button{font-size:12px}
 .task-rows.list-view .task-link{grid-template-columns:52px minmax(0,1fr);padding-inline:10px}
 .task-rows.list-view .task-source{width:52px;height:70px}
 .task-rows.list-view .task-bottom{padding-left:64px}
}

/* UI integrity: long project lists scroll without displacing fixed navigation. */
.sidebar nav{flex:1;min-height:0;align-content:start;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:0}
.sidebar .nav-caption{grid-template-columns:minmax(0,1fr) 44px;width:100%}
.sidebar .nav-caption>.icon-btn{min-width:44px;max-width:44px}
.sidebar-bottom{flex:none;margin-top:12px}

/* Keep library metadata comfortably inside the bordered video list. */
#task-list:has(.task-rows) .list-footer{margin:0;padding:14px 18px;border-top:1px solid #e7ebf1;gap:12px}
#task-list:has(.task-rows) .list-footer>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:520px){#task-list:has(.task-rows) .list-footer{padding:12px}}

/* UI audit remediation: contrast, touch targets and mobile hierarchy. */
.final-checks>div,.rendering p{color:#4d5a70}
.rendering p{font-size:13px;line-height:1.6}
.dropzone>span:not(.drop-icon),.dropzone>small{color:#4d5a70;font-size:13px;line-height:1.5}
.help-steps li p{color:#4d5a70}
.advanced>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 0;cursor:pointer;list-style:none}
.advanced>summary::-webkit-details-marker{display:none}
.advanced>summary>.icon{width:15px;height:15px;margin-left:auto;transition:transform .18s}
.advanced[open]>summary>.icon{transform:rotate(180deg)}
.modal-heading h2:focus{outline:2px solid var(--accent);outline-offset:4px}
@media(max-width:520px){
 .task-summary{font-size:12px;line-height:1.55}
 .breadcrumbs strong{max-width:none;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media(prefers-reduced-motion:reduce){.advanced>summary>.icon{transition:none}}

/* Supplied LFA brand mark: keep its original proportions on every surface. */
.brand.lfa-brand{align-items:center;gap:10px;letter-spacing:0;font-style:normal}
.lfa-brand .lfa-logo{display:block;width:82px;height:auto;object-fit:contain}
.lfa-brand .brand-product{margin:0;font-size:10px;line-height:1;align-self:flex-end;margin-bottom:5px}
.auth-brand .lfa-logo{width:164px}
.auth-brand .brand-product{font-size:12px;margin-bottom:9px}
.auth-mobile-logo{align-items:center;gap:8px;font-style:normal;letter-spacing:0}
.auth-mobile-logo img{display:block;width:78px;height:auto;object-fit:contain}
.auth-mobile-logo small{font-size:10px;letter-spacing:.08em;color:#4d5a70}
@media(max-width:760px){.auth-mobile-logo{display:flex}}

/* Final UI gate: keep tablet filters in the viewport and preserve 44 px controls. */
.editor-panel #font-size,
.editor-panel .field input,
.editor-panel .field select{min-height:44px}
@media(max-width:1000px){
 .filter-tabs{display:flex;flex-wrap:wrap;overflow:visible;gap:4px 12px;padding-bottom:0}
 .filter-tabs button{flex:0 0 auto;min-height:44px;padding-block:9px}
}
.account-section{padding-block:20px;border-bottom:1px solid #e1e7ef}
.account-section summary{cursor:pointer;font-weight:600;min-height:44px;display:flex;align-items:center}
.account-section form{padding-top:12px}
.account-session{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-block:16px;border-top:1px solid #e1e7ef}
.account-session p{margin:6px 0 0}.account-session>div{min-width:0}
.session-confirm:not([hidden]){display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cover-option{min-width:0}.cover-option .cover-candidate{width:100%;height:auto;background:#edf2f8}
.cover-option .cover-candidate img{width:100%;height:auto;max-height:340px;object-fit:contain}
.cover-option .cover-candidate b{position:static;display:block;margin:6px;padding:8px}
.cover-candidate .cover-placeholder{position:static;display:flex;aspect-ratio:9/16;align-items:center;justify-content:center;flex-direction:column;gap:12px;background:#edf2f8;color:#53647b;padding:16px}
.cover-candidate .cover-placeholder span{position:static;background:transparent;color:inherit;padding:0}
@media(max-width:600px){.account-session{align-items:flex-start;flex-direction:column}.account-section .btn{max-width:100%}}
.ref-image img{height:100%;aspect-ratio:auto;object-fit:contain}
.social-logo svg,.social-logo img{display:block;width:28px;height:28px;flex:none}
.social-logo.tiktok{overflow:hidden;background:#000}
.social-logo.tiktok img{width:100%;height:100%;object-fit:cover}
.connection-state.social-soon{color:var(--muted);font-weight:650}
.social-availability{max-width:160px}
@media(max-width:760px){.social-card>.social-availability{grid-column:2/-1;max-width:none}}

/* Covers keep their original portrait ratio without inheriting the source height. */
.cover-candidate.selected img{filter:none}
.publish-target .social-logo svg,.publish-target .social-logo img{width:24px;height:24px}
.read-feedback{margin-bottom:16px}.read-feedback:empty{display:none}
.nav-item:disabled{opacity:.65;cursor:not-allowed}
.initial-settings-panel{max-width:760px;margin:0 auto 32px;scroll-margin-top:24px;padding:24px}
.initial-settings-panel h2{margin-bottom:20px}.initial-settings-actions{margin-top:24px}
.social-flow{margin-bottom:24px}.social-flow>.inline-actions{margin-top:12px}
.social-account{grid-column:1/-1;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-top:18px;border-top:1px solid var(--line)}
.social-account>div:first-child{min-width:0;overflow-wrap:anywhere}
.social-account-actions{flex:none;margin:0}
#app .social-account-actions .btn{min-height:44px;justify-content:center}
.instagram-page{display:flex;align-items:center;gap:12px;padding:14px 0;min-height:48px}.instagram-page small{display:block;color:var(--muted);margin-top:4px}
.social-flow form{margin-block:16px}.social-flow fieldset{border:0;padding:0;margin-bottom:16px}
@media(max-width:760px){.social-account{flex-direction:column}.social-account-actions,.social-account-actions .btn{width:100%}}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-SemiBold.ttf') format('truetype');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-ExtraBold.ttf') format('truetype');font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-Italic.ttf') format('truetype');font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-SemiBoldItalic.ttf') format('truetype');font-weight:600;font-style:italic;font-display:swap}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-BoldItalic.ttf') format('truetype');font-weight:700;font-style:italic;font-display:swap}
@font-face{font-family:'Montserrat';src:url('./assets/fonts/Montserrat-ExtraBoldItalic.ttf') format('truetype');font-weight:800;font-style:italic;font-display:swap}
.subtitle-overlay{right:auto;padding:0;box-sizing:border-box;font-family:'Montserrat',sans-serif;display:flex;flex-direction:column;paint-order:stroke fill}
.task-source img{object-fit:cover;background:transparent}
.custom-cover-upload{margin:18px 0 24px}.custom-cover-upload p{margin-top:8px}
.title-option[aria-pressed="true"]{border-color:#1769db;background:#edf4ff}

/* One shared mobile workspace for the browser and Telegram WebView. */
:root{
 --bg:var(--telegram-theme-secondary-bg-color,#f5f7fb);
 --surface:var(--telegram-theme-section-bg-color,var(--telegram-theme-bg-color,#fff));
 --sidebar:var(--telegram-theme-secondary-bg-color,#f0f3f8);
 --ink:var(--telegram-theme-text-color,#182238);
 --muted:var(--telegram-theme-hint-color,#58677d);
 --accent:var(--telegram-theme-button-color,#1459bd);
 --accent-dark:var(--telegram-theme-button-color,#084cae);
 --accent-soft:color-mix(in srgb,var(--accent) 12%,var(--surface));
 --line:color-mix(in srgb,var(--ink) 14%,var(--surface));
 --bottom-safe:max(env(safe-area-inset-bottom,0px),var(--telegram-safe-area-bottom,0px),var(--telegram-content-safe-area-bottom,0px));
 --keyboard-inset:0px;
}
body,.page,main{background:var(--bg);color:var(--ink)}
.sidebar{background:var(--sidebar);color:var(--ink)}
.topbar,.library-toolbar,#task-list:has(.task-rows),.task-rows .task-link,.task-rows.list-view .task-link,.editor-panel,.player-panel,dialog,.context-panel,.auth-panel{background:var(--surface);color:var(--ink)}
.task-rows.list-view .task-info h2,.editor-heading h1,.editor-intro h2,.page-heading h1,.preset-label,.field{color:var(--ink)}
.page-heading p,.task-summary,.task-note,.editor-subline,.text-footer,.language-label,.eyebrow,.optional,.disabled-reason,.breadcrumbs,.preset-card>p,.preset-colors{color:var(--muted)}
input,textarea,select{background:var(--surface);color:var(--ink);border-color:var(--line)}
.primary{background:var(--accent);border-color:var(--accent);color:var(--telegram-theme-button-text-color,#fff);box-shadow:none}
.primary:hover:not(:disabled){background:var(--accent-dark)}
.task-rows .task-link:hover,.task-rows.list-view .task-link:hover{background:var(--accent-soft)}
.filter-tabs button{color:var(--muted)}
.filter-tabs button.active,.task-rows .card-action{color:var(--accent)}
.filter-tabs button.active::after{background:var(--accent)}
.task-source,.task-rows.list-view .task-source{background:transparent}
.task-status-icon{display:inline-flex;align-items:center;gap:7px;color:var(--muted)}
.task-status-icon.ready{color:#288568}.task-status-icon.processing{color:var(--accent)}.task-status-icon.failed{color:var(--telegram-theme-destructive-text-color,#b22436)}
.task-status-icon .sr-only{position:static;width:auto;height:auto;overflow:visible;clip:auto;clip-path:none;white-space:normal}
.text-workspace{display:block;max-width:1000px;margin-inline:auto}
.text-workspace>.editor-panel{width:100%;min-width:0}
.preset-selector{max-width:620px;margin:20px auto}
.preset-carousel{position:relative;display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:thin;padding:3px 2px 8px;margin-top:8px}
.preset-carousel .preset-card{flex:0 0 calc(100% - 28px);scroll-snap-align:start;scroll-snap-stop:always}
.preset-carousel::after{content:"";flex:0 0 12px}
.preset-palette{margin-top:14px}.palette-label{font-size:13px;font-weight:600;color:var(--ink);margin-bottom:5px}
.preset-card{min-width:0;padding:8px;border:1px solid var(--line);border-radius:16px;background:var(--surface);transition:border-color .18s}
.preset-card.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.preset-card .preset{display:block;width:100%;border:0;border-radius:10px;overflow:hidden;text-align:left;background:none;color:var(--ink)}
.preset-card .preset-preview{height:210px;display:grid;place-items:center;padding:14px;background:#18222d;color:white;font-family:Montserrat,sans-serif;overflow:hidden}
.preset-preview .preset-sample{display:flex;flex-direction:column;align-items:center;gap:4px;background:none;padding:0;font-weight:700;line-height:1.2;text-align:center;text-shadow:0 2px 3px #0008;font-size:16px}
.preset-preview .preset-sample em{font-style:normal;transition:color .15s;color:var(--preset-accent)}
.preset-preview .preset-sample small{font-size:11px}
.preset-preview.clean .preset-sample{font-size:14px;font-weight:600;color:var(--preset-accent)}
.preset-preview.kinetic .preset-sample>span,.preset-preview.kinetic .preset-sample>small{padding:4px 8px;background:#0008;border-radius:5px}
.preset-preview.kinetic .preset-sample em{font-size:23px;font-weight:800;text-transform:uppercase}
.preset-card.selected .preset-preview.kinetic .preset-sample>*{animation:word-arrive .35s both}
.preset-card.selected .preset-preview.kinetic .preset-sample>em{animation-delay:.12s}
.preset-card.selected .preset-preview.kinetic .preset-sample>small{animation-delay:.24s}
@keyframes word-arrive{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.preset-card .preset-label{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 4px 0;font-size:14px;font-weight:650;min-height:42px}
.preset-card .preset-label .icon{position:static;width:18px;height:18px;color:var(--accent);flex:none}
.preset-card>p{font-size:12px;margin:4px 4px 10px;min-height:36px}
.preset-colors{display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:3px 1px 6px;scrollbar-width:thin}
.color-choice{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-height:44px;padding:7px 9px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:12px;scroll-snap-align:start}
.color-choice[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
.color-choice i{width:14px;height:14px;flex:none;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px #0002}
.color-choice .icon{width:13px;height:13px}
.editor-actionbar{background:var(--surface)}
@media(max-width:760px){
 main{padding:20px 16px calc(116px + var(--bottom-safe) + var(--keyboard-inset))}
 main:has(.editor-workspace){padding-bottom:calc(116px + var(--bottom-safe) + var(--keyboard-inset))}
 .page-heading{margin-bottom:18px;gap:12px}.page-heading h1{font-size:25px}
 .library-toolbar{padding:8px 10px;gap:8px}.library-tools{width:100%;margin:0;gap:8px}
 .library-tools .search{flex:1;width:auto}.library-tools .view-switch{flex:none}
 .filter-tabs{display:flex;width:100%;max-width:100%;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:7px;padding:2px 0 5px;scroll-snap-type:x proximity;overscroll-behavior-x:contain;scrollbar-width:none}
 .filter-tabs button{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;scroll-snap-align:start;font-size:12px}
 .filter-tabs button.active{background:var(--accent-soft);border:1px solid var(--accent);color:var(--accent)}
 .filter-tabs button.active::after{display:none}
 .task-rows,.task-rows.list-view{display:block}
 .task-rows .task-card{border-bottom:1px solid var(--line)}
 .task-rows .task-link,.task-rows.list-view .task-link{grid-template-columns:42px minmax(0,1fr) 28px 44px;gap:8px;padding:10px;border:0;border-radius:0;min-height:80px}
 .task-rows .task-source,.task-rows.list-view .task-source{grid-column:1;grid-row:1;width:42px;height:60px;align-self:center;border-radius:6px}
 .task-rows .task-info,.task-rows.list-view .task-info{grid-column:2;grid-row:1}
 .task-rows .task-info h2,.task-rows.list-view .task-info h2{font-size:13px;line-height:1.4;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0}
 .task-rows .task-facts,.task-rows .task-note{display:none}
 .task-rows .task-meta,.task-rows.list-view .task-meta{grid-column:3;grid-row:1;padding:0;display:flex;align-items:center;justify-content:center}
 .task-status-icon .icon{width:20px;height:20px}
 .task-status-icon .sr-only,.task-action-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 .task-rows .task-bottom,.task-rows.list-view .task-bottom{grid-column:4;grid-row:1;padding:0;margin:0;justify-content:center}
 .task-rows .card-action,.task-rows.list-view .card-action{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;background:var(--accent-soft);color:var(--accent)}
 .task-rows .card-action .icon{width:20px;height:20px}
 .task-rows:not(.list-view){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px}
 .task-rows:not(.list-view) .task-card{border:0}
 .task-rows:not(.list-view) .task-link{grid-template-columns:minmax(0,1fr) 44px;gap:8px;padding:0}
 .task-rows:not(.list-view) .task-source{grid-column:1/-1;grid-row:1;width:100%;height:auto;aspect-ratio:9/12;border-radius:8px}
 .task-rows:not(.list-view) .task-info{grid-column:1/-1;grid-row:2;min-height:36px}
 .task-rows:not(.list-view) .task-meta{grid-column:1;grid-row:3;justify-content:flex-start;padding-left:8px}
 .task-rows:not(.list-view) .task-bottom{grid-column:2;grid-row:3}
 .editor-heading h1{font-size:18px}.editor-heading{margin-bottom:16px}.editor-subline{font-size:11px}
 .section-tabs{margin-inline:0;gap:8px;padding-inline:0}.main-sections{width:100%;display:flex;justify-content:space-between;gap:8px}
 .editor-workspace{gap:18px}.editor-panel{padding:16px;border-radius:12px}
 .editor-intro h2{font-size:23px}.transcript{font-size:16px;min-height:230px}
 .text-footer>span:first-child{max-width:70%}
 .preset-selector{margin-block:18px}.preset-carousel{scrollbar-width:none}
 .preset-card .preset-preview{height:180px}.preset-card>p{min-height:0}
 .preset-preview .preset-sample{font-size:20px}.preset-preview.clean .preset-sample{font-size:19px}.preset-preview.kinetic .preset-sample em{font-size:30px}
 .preset-colors{scrollbar-width:none}.color-choice{padding-inline:12px}
 .editor-actionbar{position:fixed;left:0;right:0;bottom:var(--keyboard-inset);z-index:10;margin:0;padding:10px 16px calc(10px + var(--bottom-safe));border-top:1px solid var(--line);box-shadow:none;background:var(--telegram-theme-bottom-bar-bg-color,var(--surface));max-height:180px;overflow-y:auto}
 .editor-actionbar .btn{width:100%;min-height:46px}.editor-actionbar .action-hint{font-size:11px;line-height:1.4}
 .player-panel .video-canvas{width:min(100%,260px)}
}
@media(prefers-reduced-motion:reduce){.preset-card,.preset-preview .preset-sample em{transition:none}.preset-card.selected .preset-preview.kinetic .preset-sample>*{animation:none}}
.skip-link:not(:focus){visibility:hidden}
.field input,.field textarea,.field select,.transcript,.search input{background:var(--surface);color:var(--ink);border-color:var(--line)}
.secondary,.view-switch{background:var(--surface);color:var(--ink);border-color:var(--line)}
.view-switch .active,.section-tabs button.active{color:var(--accent);background:var(--accent-soft)}
.section-tabs button,.context-panel>summary{color:var(--ink)}
.preset-card .preset-preview{border-radius:10px}
.dropzone #file-label{color:#223047;overflow-wrap:anywhere}
dialog.preparation-dialog{width:min(680px,calc(100vw - 32px));padding:28px;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
.preparation-workspace{min-width:0}
.preparation-workspace .modal-heading{margin-bottom:20px;padding-right:20px}
.preparation-workspace .modal-heading h2{font-size:25px;margin:8px 0}
.preparation-workspace .modal-heading .upload-filename{overflow-wrap:anywhere;font-size:13px!important;color:var(--muted)}
.preparation-progress{padding-bottom:20px;border-bottom:1px solid var(--line)}
.preparation-progress strong{font-size:15px}
.preparation-progress p{margin:8px 0 0;line-height:1.55}
.upload-meter{display:flex;flex-direction:column;gap:7px;margin-top:12px}
.upload-meter progress{display:block;width:100%;height:7px;border:0;border-radius:8px;accent-color:var(--accent)}
.upload-meter progress::-webkit-progress-bar{background:var(--line);border-radius:8px}
.upload-meter progress::-webkit-progress-value{background:var(--accent);border-radius:8px;transition:width .15s}
.upload-meter span{font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted)}
.preparation-section{padding:20px 0;border-bottom:1px solid var(--line)}
.preparation-section h3{font-size:17px;margin:0 0 12px}
.preparation-workspace .small,.preparation-section .field>span{font-size:13px;line-height:1.55}
.preparation-section .preset-card .preset-preview{height:150px}
.preparation-section .preset-card>p{min-height:0}
.preparation-section .preset-label{font-size:13px}
.preparation-section .preset-carousel{padding-bottom:8px}
.preparation-section .preset-card{flex-basis:calc(70% - 16px)}
.preparation-check{display:flex;gap:10px;align-items:flex-start;margin:16px 0 0;font-size:14px;line-height:1.5;cursor:pointer}
.preparation-check input{width:20px;height:20px;flex:none;margin:1px 0 0;accent-color:var(--accent)}
.preparation-choice{display:flex;gap:8px;flex-wrap:wrap}
.preparation-choice .btn{min-height:44px;padding:10px 14px;font-size:13px;flex:1}
.preparation-thumbnails{display:flex;gap:8px;margin:12px 0}
.preparation-thumbnails img,.preparation-thumbnails>span{width:64px;height:72px;object-fit:cover;border-radius:8px;background:var(--line)}
.preparation-thumbnails>span{display:grid;place-items:center}
.preparation-section .field{margin-top:18px}
#preparation-save-state{font-size:13px;color:var(--muted);padding-top:14px}
#preparation-save-state .notice{margin-bottom:8px}
#task-preparation-entry:not(:empty){display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 18px}
#task-preparation-entry .notice{flex-basis:100%}
.preparation-workspace .modal-actions:empty{display:none}
@media(max-width:760px){dialog.preparation-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:calc(22px + var(--telegram-content-safe-area-top,0px)) 20px calc(24px + var(--bottom-safe,0px))}.preparation-section .preset-card{flex-basis:calc(100% - 28px)}.preparation-section .preset-card .preset-preview{height:145px}.preparation-workspace .modal-heading h2{font-size:23px}.preparation-workspace .modal-actions .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.upload-meter progress::-webkit-progress-value{transition:none}}
.editor-panel #transcript,.editor-panel #transcript:focus{background:var(--surface);color:var(--ink);border-color:var(--line)}
.editor-panel #transcript:focus{border-color:var(--accent)}
.editor-intro p,.breadcrumbs strong,.suggestion small,.suggestion del,.task-rows.list-view .task-facts{color:var(--muted)}
.editor-heading .back-btn{background:var(--surface);color:var(--ink);border-color:var(--line)}
.count-label,.time-tag{background:var(--accent-soft);color:var(--muted)}
.section-tabs button.active{border-bottom-color:var(--accent)}
.miniapp-entry .auth-card { width:min(100%,440px); text-align:left; }
.miniapp-entry .auth-card h1 { font-size:clamp(24px,6vw,32px); line-height:1.2; }
.miniapp-entry .auth-card p { overflow-wrap:anywhere; }

/* One semantic palette for the web app and Telegram's current theme. */
:root{color-scheme:light;--surface-alt:#eef2f7;--hover:#e7eef8;--muted:#4d5a70;--success-soft:#e5f5ef;--warning:#805900;--warning-soft:#fff4d9;--error-soft:#fbe9ec;--danger-fill:#b42338}
:root[data-telegram-theme="light"]{--bg:var(--telegram-theme-secondary-bg-color,#f4f7fb);--surface:var(--telegram-theme-bg-color,#fff);--sidebar:var(--telegram-theme-section-bg-color,var(--surface));--ink:#111b31;--accent:#0b5bd3;--accent-dark:#0849aa}
:root[data-telegram-theme="dark"]{color-scheme:dark;--bg:var(--telegram-theme-secondary-bg-color,#17212b);--surface:var(--telegram-theme-section-bg-color,var(--telegram-theme-bg-color,#232e3c));--sidebar:var(--surface);--surface-alt:#2c3a4b;--hover:#33455b;--ink:#f3f5f7;--muted:#b7c4d5;--line:#526075;--accent:#8bc4ff;--accent-dark:#a6d2ff;--accent-soft:#293f59;--red:#ff9aaa;--green:#97d8b8;--success-soft:#243e36;--warning:#efcf86;--warning-soft:#443b27;--error-soft:#482e38;--action-fill:#185caa;--action-hover:#124b8e}

/* Paired foregrounds and backgrounds prevent light cards in the dark theme. */
.sidebar{background:var(--sidebar);border-color:var(--line)}
.topbar,.library-toolbar,.project-list,.project-list .project-row,.task-rows.list-view .task-link,.social-card,.profile-card,.preset,.auth-shell,.auth-panel,dialog,#task-list:has(.task-rows){background:var(--surface);border-color:var(--line)}
.field input,.field textarea,.field select,textarea.transcript{background:var(--surface);color:var(--ink);border-color:var(--line)}
.search input{color:var(--ink)}
.field input::placeholder,.field textarea::placeholder,.search input::placeholder{color:var(--muted);opacity:1}
.field input:focus,.field textarea:focus,.field select:focus,textarea.transcript:focus{border-color:var(--accent)}
.secondary,.back-btn,.editor-heading .back-btn{background:var(--surface);color:var(--ink);border-color:var(--line)}
.primary{background:var(--action-fill);border-color:var(--action-fill);color:#fff}
.primary:hover:not(:disabled){background:var(--action-hover)}
.danger{background:var(--danger-fill);color:#fff}
.danger-outline{color:var(--red);border-color:var(--red)}
.danger-outline:hover{background:var(--error-soft)}
.secondary:hover:not(:disabled),.icon-btn:hover,.project-list .project-row:hover,.task-rows.list-view .task-link:hover,.task-rows.list-view .task-card:hover,.sidebar .project-nav:hover,.sidebar .nav-item:hover{background:var(--hover);border-color:var(--line);color:var(--ink)}
.text-btn,.text-link,.card-action,.task-rows .card-action,.task-rows.list-view .card-action,.auth-switch{color:var(--accent)}
.text-btn:hover,.text-link:hover{color:var(--accent-dark)}
.sidebar .nav-item,.sidebar .project-nav,.brand-product,.profile-card,.profile small,.nav-caption,.breadcrumbs,.breadcrumbs strong,.project-tabs a,.filter-tabs button{color:var(--muted)}
.sidebar .nav-item.active,.sidebar .project-nav.selected,.sidebar .nav-item.active:hover,.sidebar .project-nav.selected:hover,.view-switch .active{background:var(--accent-soft);color:var(--accent)}
.filter-tabs button.active,.section-tabs button.active,.project-tabs a.active{color:var(--accent)}
.filter-tabs button.active::after{background:var(--accent)}
.filter-tabs button span,.filter-tabs button[data-value="pending"]>span,.filter-tabs button[data-value="pending"].active>span,.project-tabs a span,.count-label,.time-tag{background:var(--surface-alt);color:var(--muted);border-color:var(--line)}
.brand.lfa-brand,.profile-card strong,.task-rows.list-view .task-info h2,.help-steps li,.title-option,.suggestion p strong{color:var(--ink)}
.page-heading p,.task-summary,.task-rows.list-view .task-facts,.task-note,.list-footer,.eyebrow,.editor-intro p,.player-hint,.editor-subline,.text-footer,.range-labels,.language-label,.suggestion small,.suggestion del,.suggestion p del,.result-ready p,.publish-panel p,.publish-target small,.auth-card>div>p,.auth-local-note,.reference small,.optional,.disabled-reason,.task-rows.list-view .task-info p,.settings-aside p,.modal-heading p,.help-steps li p,.final-checks>div,.rendering p,.dropzone>span:not(.drop-icon),.dropzone>small,.publication-note h3,.publication-note p,.detail-list dt,.render-policy small,.render-policy .icon,.task-rows.list-view .task-note,.auth-brand p,.auth-mobile-logo small{color:var(--muted)}
.sidebar .project-nav.selected small,.task-meta>small,.file-kind,.section-number,.section-tabs button.active .section-number,.reference-add small,.reference-add .icon{color:var(--muted)}
.reference-add,.ref-image,.reference-live-placeholder,.cover-option .cover-candidate,.cover-candidate .cover-placeholder,.player-stage,.task-source,.task-source img,.task-source.empty-source,.empty-icon,.dropzone,.drop-icon,.publish-target,.publication-summary,.result-ready,.workspace-avatar,.avatar{background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
.reference-add:hover{background:var(--hover);border-color:var(--accent)}
.ref-image{padding:8px}
.cover-candidate b{background:var(--surface);color:var(--accent)}
.cover-candidate.selected{border-color:var(--accent)}
.modal-icon,.aside-symbol,.tone-0{background:var(--accent-soft);color:var(--accent);border-color:var(--line)}
.tone-1{background:var(--surface-alt);color:var(--ink)}
.tone-2,.project-list .project-symbol.tone-1,.project-list .project-symbol.tone-2{background:var(--error-soft);color:var(--red)}
.notice,.notice.success{background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
.notice.error,.comparison,.modal-icon.danger{background:var(--error-soft);color:var(--red);border-color:var(--red)}
.status.ready,.connection-state,.published-badge,.success-text{color:var(--green)}
#connection-status[hidden]{display:none}
.connection-offline{color:var(--red);margin:0;white-space:normal}
.status.processing,.processing-badge{color:var(--accent)}
.status.failed{color:var(--red)}
.task-rows.list-view .status.pending{background:var(--warning-soft);color:var(--warning)}
.task-rows.list-view .status.processing{background:var(--accent-soft);color:var(--accent)}
.task-rows.list-view .status.ready{background:var(--success-soft);color:var(--green)}
.task-rows.list-view .status.failed{background:var(--error-soft);color:var(--red)}
.account-section,.account-session,.sidebar-bottom,.profile,.workspace-switch,.task-bottom,.task-rows.list-view .task-card,#task-list:has(.task-rows) .list-footer{border-color:var(--line)}
.media-tabs button:disabled{background:var(--surface-alt);color:var(--muted)}
.player-foot{color:#d2dbe6}
.auth-brand{background:var(--surface-alt)}
.skip-link{background:var(--surface);color:var(--accent)}

/* Selecting a title is separate from editing it; keep every option readable. */
.title-option{padding:10px;border:1px solid transparent;border-radius:8px;font-size:13px;align-items:flex-start;overflow-wrap:anywhere}
.title-option .icon{margin-top:3px;flex-shrink:0}
.title-option:hover{background:var(--hover);color:var(--ink)}
.title-option[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft);color:var(--ink)}
#title-input{min-height:52px;resize:none;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere}
.modal-heading h2:focus,#main:focus,#editor-error:focus{outline:none}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-color:var(--accent)}

/* The close control remains reachable while long account/reference dialogs scroll. */
.modal-close{position:sticky;top:0;right:auto;float:right;z-index:3;margin:-16px -16px 4px 8px;background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:0 2px 8px #0002}
.modal-heading{padding-right:36px}
dialog.reference-library{width:760px}
#cover-upload-status:not([hidden]){position:fixed;bottom:calc(84px + var(--bottom-safe,0px) + var(--keyboard-inset,0px));right:16px;z-index:24;display:flex;align-items:center;gap:12px;width:min(420px,calc(100vw - 32px));padding:12px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:0 5px 24px #0003}
.cover-upload-preview{width:44px;height:64px;object-fit:contain;flex:none;border-radius:5px;background:var(--surface-alt)}
.cover-upload-progress{display:flex;align-items:flex-start;gap:12px;width:100%;min-width:0}
.cover-upload-progress>div{min-width:0;flex:1;font-size:12px;overflow-wrap:anywhere}
.cover-upload-progress p{margin:4px 0;color:var(--muted)}
.cover-upload-progress progress{display:block;width:100%;height:8px;accent-color:var(--action-fill);margin:8px 0}
.cover-upload-progress a{display:inline-block;padding:8px;color:var(--accent)}
#cover-upload-status:not([hidden]){flex-direction:column;max-height:min(40dvh,calc(100dvh - var(--keyboard-inset,0px) - var(--bottom-safe,0px) - 108px));overflow-y:auto}
.cover-selected-label{color:var(--accent);margin:8px;text-align:center}
.cover-option>.btn{width:100%;margin-top:6px}
#reference-library .reference-controls{justify-content:space-between}
.dropzone #file-label{color:var(--ink)}
.task-status-icon.ready{color:var(--green)}
.task-status-icon.failed{color:var(--red)}
@media(max-width:760px){#title-input{font-size:16px;line-height:1.5}.modal-close{margin:-12px -8px 4px 8px}dialog.reference-library{width:calc(100vw - 22px)}}

/* Mobile Mini App navigation: persistent, thumb-reachable and theme-aware. */
/* Keep page and fixed navigation width stable while loading removes overflow. */
html{scrollbar-gutter:stable}
:root{--mobile-nav-height:72px}
.mobile-bottom-nav{display:none}
.project-switcher{min-width:0;min-height:44px;display:none;align-items:center;gap:7px;padding:8px 10px;border:0;border-radius:10px;background:transparent;color:var(--ink);font-weight:650;text-align:left}
.project-switcher>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-switcher>.icon{width:15px;height:15px;color:var(--muted)}
.project-switcher:hover{background:var(--hover)}
.project-switcher-list{display:grid;gap:7px;margin-top:6px}
.project-switcher-row{display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.project-switcher-row.selected{border-color:var(--accent);background:var(--accent-soft)}
.project-switcher-row>button:first-child{min-width:0;min-height:64px;display:grid;grid-template-columns:42px minmax(0,1fr) 18px;align-items:center;gap:12px;padding:10px 8px 10px 12px;border:0;background:transparent;color:var(--ink);text-align:left}
.project-switcher-row>button:first-child>span:nth-child(2){min-width:0}
.project-switcher-row strong,.project-switcher-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.project-switcher-row strong{font-size:14px}.project-switcher-row small{margin-top:2px;font-size:11px;color:var(--muted)}
.project-switcher-row .project-symbol{width:42px;height:42px;border-radius:10px}
.project-switcher-row .project-symbol .icon{width:20px;height:20px}
.project-switcher-settings{border-left:1px solid var(--line);border-radius:0;color:var(--muted)}

@media(max-width:1000px){
 .sidebar{display:none}
 .page{margin-left:0}
 .mobile-menu,.nav-scrim{display:none!important}
 .desktop-project-title{display:none}.project-switcher{display:inline-flex}
 main{padding-bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + 32px)}
 .mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:22;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:start;height:calc(var(--mobile-nav-height) + var(--bottom-safe));padding:6px 4px var(--bottom-safe);background:var(--telegram-theme-bottom-bar-bg-color,var(--surface));border-top:1px solid var(--line);box-shadow:0 -5px 18px #00000012;transition:transform .18s ease,opacity .18s ease}
 .bottom-nav-item{position:relative;min-width:0;min-height:60px;padding:6px 3px 5px;border:0;border-radius:12px;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:10px;font-weight:650;line-height:1.1;text-align:center}
 #app .mobile-bottom-nav [data-action="account"]{min-height:60px}
 .bottom-nav-item>.icon{display:block;width:24px;height:24px;flex:0 0 24px}
 .bottom-nav-item>span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .bottom-nav-item:not(.bottom-nav-create).active{color:var(--accent);background:var(--accent-soft)}
 .bottom-nav-create{color:var(--accent);overflow:visible}
 .bottom-nav-create>.icon{width:42px;height:42px;flex-basis:42px;margin-top:-10px;padding:10px;border-radius:50%;background:var(--accent);color:var(--telegram-theme-button-text-color,#fff);box-shadow:0 5px 14px color-mix(in srgb,var(--accent) 28%,transparent)}
 .bottom-nav-create:active>.icon{transform:translateY(1px)}
 .mobile-keyboard-open .mobile-bottom-nav{visibility:hidden;pointer-events:none;opacity:0;transform:translateY(100%)}
 body:has(dialog[open]) .mobile-bottom-nav{pointer-events:none}
 dialog.project-switcher-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:min(72dvh,620px);margin:0;padding:22px 18px calc(18px + var(--bottom-safe));border-radius:20px 20px 0 0;overflow-y:auto;animation:bottom-sheet-in .2s ease-out}
 dialog.project-switcher-dialog .modal-close{top:8px;right:10px}
 dialog.project-switcher-dialog .modal-actions{justify-content:stretch}
 dialog.project-switcher-dialog .modal-actions .btn{width:100%}
 #cover-upload-status:not([hidden]){bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + var(--keyboard-inset) + 12px)}
 #toast{bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + var(--keyboard-inset) + 18px)}
}
@media(max-width:760px){
 .editor-actionbar{left:12px;right:12px;width:auto;bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + var(--keyboard-inset) + 32px);padding:6px;gap:4px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 14px #00000018}
 .editor-actionbar .btn{min-height:44px;border-radius:8px}
 main:has(.editor-workspace){padding-bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + var(--keyboard-inset) + 206px)}
 .mobile-keyboard-open .editor-actionbar{bottom:calc(var(--keyboard-inset) + 12px)}
 .mobile-keyboard-open main:has(.editor-workspace){padding-bottom:calc(166px + var(--keyboard-inset))}
 .breadcrumbs{max-width:100%}.project-switcher{max-width:min(68vw,320px)}
}
@media(max-width:360px){.bottom-nav-item{font-size:9px}.bottom-nav-item>.icon{width:22px;height:22px;flex-basis:22px}.bottom-nav-create>.icon{width:40px;height:40px;flex-basis:40px}}
@keyframes bottom-sheet-in{from{opacity:.7;transform:translateY(24px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.mobile-bottom-nav,.bottom-nav-create>.icon{transition:none}.project-switcher-dialog{animation:none!important}}

.task-pagination{display:flex;align-items:center;gap:10px}
.task-pagination .btn{min-height:40px}
@media(max-width:520px){.list-footer{gap:12px;flex-wrap:wrap}.task-pagination{width:100%;justify-content:space-between}.task-pagination .btn{flex:1}}

/* Task-list status replaces the source thumbnail; task-detail media is unchanged. */
.task-rows .task-status-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;padding:7px;border-radius:10px;text-align:center;background:var(--surface-alt);color:var(--muted)}
.task-rows .task-status-tile.pending{background:var(--warning-soft);color:var(--warning)}
.task-rows .task-status-tile.processing{background:var(--accent-soft);color:var(--accent)}
.task-rows .task-status-tile.ready{background:var(--success-soft);color:var(--green)}
.task-rows .task-status-tile.failed{background:var(--error-soft);color:var(--red)}
.task-rows .task-status-tile>.icon{width:22px;height:22px}
.task-rows .task-status-tile .status{display:block;padding:0;border-radius:0;background:transparent;color:inherit;font-size:11px;font-weight:700;line-height:1.2;white-space:normal}
.task-rows .task-status-tile .status i{display:none}
.task-rows .task-info .task-note{display:block;margin-top:4px}
.task-rows.list-view .task-link{grid-template-columns:108px minmax(0,1fr) minmax(120px,170px);gap:18px;min-height:104px}
.task-rows.list-view .task-status-tile{grid-column:1;grid-row:1;width:108px;min-height:72px}
.task-rows.list-view .task-info{grid-column:2;grid-row:1}
.task-rows.list-view .task-bottom{grid-column:3;grid-row:1}
@media(max-width:1100px){
 .task-rows.list-view .task-link{grid-template-columns:88px minmax(0,1fr) minmax(120px,150px)}
 .task-rows.list-view .task-status-tile{width:88px;min-height:76px}
}
@media(max-width:760px){
 .task-rows.list-view .task-link{grid-template-columns:76px minmax(0,1fr);gap:8px 12px}
 .task-rows.list-view .task-status-tile{grid-column:1;grid-row:1 / 3;width:76px;min-height:76px}
 .task-rows.list-view .task-info{grid-column:2;grid-row:1}
 .task-rows.list-view .task-bottom{grid-column:2;grid-row:2;justify-content:flex-start;padding-left:0}
 .task-rows:not(.list-view) .task-status-tile{grid-column:1 / -1;grid-row:1;width:100%;min-height:78px}
 .task-rows:not(.list-view) .task-info{grid-column:1 / -1;grid-row:2}
 .task-rows:not(.list-view) .task-bottom{grid-column:2;grid-row:3}
}
@media(max-width:520px){
 .task-rows.list-view .task-link{grid-template-columns:76px minmax(0,1fr)}
 .task-rows.list-view .task-status-tile{width:76px}
 .task-rows.list-view .task-bottom{grid-column:2;grid-row:2;padding-left:0}
}

/* Mobile task registry: status, title and destination stay on one quiet row. */
@media(max-width:760px){
 .task-rows.list-view .task-link{grid-template-columns:22px minmax(0,1fr) 22px;align-items:center;gap:10px;min-height:60px;padding:10px 12px}
 .task-rows.list-view .task-status-tile{grid-column:1;grid-row:1;width:22px;height:22px;min-height:22px;padding:0;gap:0;border-radius:0;background:transparent}
 .task-rows.list-view .task-status-tile.pending,
 .task-rows.list-view .task-status-tile.processing,
 .task-rows.list-view .task-status-tile.ready,
 .task-rows.list-view .task-status-tile.failed{background:transparent}
 .task-rows.list-view .task-status-tile>.icon{width:18px;height:18px}
 .task-rows.list-view .task-status-tile .status,
 .task-rows.list-view .task-note,
 .task-rows.list-view .task-action-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
 .task-rows.list-view .task-info{grid-column:2;grid-row:1;min-width:0;padding:0}
 .task-rows.list-view .task-info h2{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .task-rows.list-view .task-facts{display:none}
 .task-rows.list-view .task-bottom{grid-column:3;grid-row:1;align-self:center;justify-self:end;justify-content:center;width:22px;margin:0;padding:0;border:0}
 .task-rows.list-view .card-action{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;gap:0;padding:0;border-radius:0;background:transparent;color:var(--accent)}
 .task-rows.list-view .card-action .icon{width:18px;height:18px}
}
/* Mobile tiles: compact icon row and title, without status/action backplates. */
@media(max-width:760px){
 .task-rows:not(.list-view){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;padding:8px 12px}
 .task-rows:not(.list-view) .task-card{padding:0;border:0;background:transparent}
 .task-rows:not(.list-view) .task-link{display:grid;grid-template-columns:minmax(0,1fr) 20px;grid-template-rows:20px 42px;align-items:start;gap:8px;min-height:0;height:100%;padding:12px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;color:var(--ink);-webkit-tap-highlight-color:transparent}
 .task-rows:not(.list-view) .task-link:hover,.task-rows:not(.list-view) .task-link:active{background:transparent}
 .task-rows:not(.list-view) .task-link:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
 .task-rows:not(.list-view) .task-status-tile{grid-column:1;grid-row:1;width:20px;height:20px;min-height:20px;padding:0;gap:0;border:0;border-radius:0;background:transparent;box-shadow:none}
 .task-rows:not(.list-view) .task-status-tile>.icon{width:18px;height:18px}
 .task-rows:not(.list-view) .task-status-tile .status,
 .task-rows:not(.list-view) .task-note,
 .task-rows:not(.list-view) .task-action-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
 .task-rows:not(.list-view) .task-info{grid-column:1 / -1;grid-row:2;min-width:0;min-height:0;padding:0}
 .task-rows:not(.list-view) .task-info h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:normal;margin:0;font-size:15px;font-weight:600;line-height:21px;color:var(--ink)}
 .task-rows:not(.list-view) .task-facts{display:none}
 .task-rows:not(.list-view) .task-bottom{grid-column:2;grid-row:1;align-self:start;justify-self:end;justify-content:center;width:20px;margin:0;padding:0;border:0}
 .task-rows:not(.list-view) .card-action{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;gap:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--muted)}
 .task-rows:not(.list-view) .card-action .icon{display:none}
}

/* Keep task identity and status in separate rows, with a recognisable frame. */
.task-rows.list-view .task-link{grid-template-columns:72px minmax(0,1fr) 32px;gap:14px;min-height:88px}
.task-rows.list-view .task-bottom{grid-column:3;grid-row:1;justify-content:flex-end}
.task-thumb{display:grid;place-items:center;width:72px;height:72px;overflow:hidden;border-radius:8px;background:var(--surface-alt);color:var(--muted)}
.task-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.task-thumb>.icon{width:24px;height:24px}
.task-info{min-width:0}
.task-details{display:flex;align-items:center;flex-wrap:wrap;gap:5px 10px;margin-top:6px}
.task-details .status{display:inline-flex;max-width:100%;white-space:normal}
.task-added-date{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums}
.library-toolbar{flex-wrap:wrap}
.task-sort{display:flex;flex:0 0 100%;gap:6px}
.task-sort button{min-height:40px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
.task-sort button.active{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.task-rows .task-info h2{overflow-wrap:anywhere}
.task-rows.list-view .task-info h2{font-size:15px}
.task-rows:not(.list-view) .task-link{grid-template-columns:72px minmax(0,1fr)}
.task-rows:not(.list-view) .task-thumb{grid-column:1;grid-row:1 / 3}
.task-rows:not(.list-view) .task-info{grid-column:2;grid-row:1}
.task-rows:not(.list-view) .task-bottom{grid-column:2;grid-row:2}
.editor-title-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 14px;min-width:0}
.editor-title-row h1{min-width:0;overflow-wrap:anywhere}
.editor-title-row .text-btn{flex:none}
.subtitle-position{display:grid;gap:8px;margin:16px 0}
.subtitle-position>span{font-weight:600}
.position-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.preparation-extra{border-top:1px solid var(--line);padding-top:12px}
.preparation-extra>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600}
.position-options button{min-width:0;min-height:44px;padding:8px 5px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}
.position-options button.selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.skeleton{background:linear-gradient(100deg,var(--surface-alt) 30%,var(--hover) 45%,var(--surface-alt) 65%);background-size:300%}
@media(max-width:760px){
 .filter-tabs{display:flex;flex-wrap:nowrap;max-width:100%;overflow-x:auto;background:var(--surface);scrollbar-width:thin}
 .filter-tabs button{flex:none;white-space:nowrap}
 .task-rows.list-view .task-link{grid-template-columns:48px minmax(0,1fr) 22px;gap:10px;min-height:74px;padding:10px 12px}
 .task-rows.list-view .task-thumb{grid-column:1;grid-row:1;width:48px;height:54px}
 .task-rows.list-view .task-info{grid-column:2;grid-row:1;min-width:0}
 .task-rows.list-view .task-info h2{font-size:14px;line-height:1.25;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .task-rows.list-view .task-details{margin-top:4px}
 .task-rows.list-view .task-details .status{padding:0;background:transparent;font-size:10px}
 .task-rows.list-view .task-bottom{grid-column:3;grid-row:1}
 .task-rows:not(.list-view) .task-link{grid-template-columns:minmax(0,1fr);grid-template-rows:130px auto;gap:8px;padding:10px 0}
 .task-rows:not(.list-view) .task-thumb{grid-column:1;grid-row:1;width:100%;height:130px}
 .task-rows:not(.list-view) .task-info{grid-column:1;grid-row:2}
 .task-rows:not(.list-view) .task-bottom{display:none}
 .task-rows:not(.list-view) .task-details .status{font-size:10px}
}
/* Static composition guide; never a background video render. */
.design-frame{margin:0 auto 16px;text-align:center}
.design-frame-canvas{position:relative;container-type:inline-size;width:min(100%,190px);aspect-ratio:9/16;margin:auto;overflow:hidden;background:#141b23;border-radius:10px}
.design-frame-canvas>img{display:block;width:100%;height:100%;object-fit:contain}
.frame-placeholder{display:grid;place-items:center;height:100%;padding:20px;color:#ccd2da;font-size:12px}
.design-frame figcaption{margin-top:8px;font-size:12px;color:var(--muted)}
.frame-subtitles{position:absolute;left:10%;right:10%;text-align:center;font-family:Montserrat,sans-serif;color:#fff;line-height:1.3;overflow-wrap:anywhere;text-shadow:0 1px 1px #000}
.frame-subtitles>span{display:block}
.frame-subtitles em{color:var(--frame-accent);font-style:normal}
.frame-subtitles.clean{color:var(--frame-accent)}
.frame-subtitles:not(.kinetic){left:14.815%;right:14.815%;padding:.74cqw 1.48cqw;paint-order:stroke fill;-webkit-text-stroke:1.481cqw #000;text-shadow:0 .556cqw 0 #0008}
.frame-subtitles.clean{-webkit-text-stroke:.556cqw #000;text-shadow:0 .185cqw 0 #0008}
.frame-subtitles.kinetic{left:10%;right:10%;padding:0.93cqw 1.85cqw 2.04cqw;line-height:1;text-shadow:0 .185cqw .185cqw #0008}
.frame-subtitles.kinetic .frame-row{display:flex;justify-content:center;align-items:baseline;gap:2.27cqw;margin:0;line-height:1}
.frame-subtitles.kinetic .frame-row+.frame-row{margin-top:.38cqw}
.frame-subtitles.kinetic .frame-word{display:inline-block;flex:none;white-space:nowrap;line-height:1}
.frame-subtitles.kinetic.frame-glass{background:#17132673;border:.093cqw solid #ffffffaf;border-radius:1.1cqw}
.preset-step{display:none}
.result-status{display:flex;align-items:center;gap:12px;margin:0 0 20px}
.result-status h2{margin:0;font-size:22px}
#task-notifications{margin:0 0 20px}
@media(max-width:760px){
 .design-frame{margin-bottom:6px}
 .design-frame-canvas{width:auto;height:clamp(200px,calc(100svh - 390px),300px);max-width:100%}
 .design-frame figcaption{margin-top:4px;font-size:11px;line-height:1.3}
 .design-settings .preset-selector{margin:0 auto}
 .design-settings button{scroll-margin:8px 0}
 .design-settings .preset-preview,.design-settings .preset-card>p{display:none}
 .design-settings .preset-card{padding:0;border-radius:10px}
 .design-settings .preset-label{min-height:44px;padding:8px 10px;font-size:13px;white-space:nowrap}
 .design-settings .preset-carousel{min-height:0;margin-top:0;padding:2px 2px 4px}
 .design-settings .preset-navigation{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;border:1px solid var(--accent);border-radius:10px}
 .design-settings .preset-step{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;border-radius:9px;background:none;color:var(--accent);padding:8px}
 .design-settings .preset-step:active{background:var(--accent-soft)}
 .design-settings .preset-navigation .preset-carousel{padding:0;gap:0}
 .design-settings .preset-navigation .preset-carousel::after{display:none}
 .design-settings .preset-navigation .preset-card{flex-basis:100%;border:0;box-shadow:none}
 .design-settings .preset-navigation .preset-label{display:flex;justify-content:center;text-align:center;white-space:normal;padding:5px 2px;line-height:1.2;min-height:48px}
 .design-settings .preset-navigation .preset-label .icon{display:none}
 .design-settings .preset-palette{margin-top:6px}
 .design-settings .palette-label{display:none}
 .design-settings .preset-colors{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;overflow:visible;padding:0}
 .design-settings .color-choice{position:relative;min-width:0;min-height:44px;padding:4px;flex-direction:column;justify-content:center;gap:3px;font-size:10px;line-height:1.2}
 .design-settings .color-choice .icon{position:absolute;top:4px;right:4px;width:11px;height:11px}
 .design-settings .subtitle-position{margin:8px 0 0;gap:4px}
 .design-settings .subtitle-position>span{font-size:12px}
 .design-settings .position-options{gap:6px}
 .design-settings .position-options button{font-size:12px}
}

/* Mini App text editing: more usable width, content-sized fields where supported. */
@media(max-width:760px){
 main:has(.editor-workspace){padding-inline:12px}
 .editor-workspace>.editor-panel{padding-inline:12px}
 .editor-panel textarea.transcript,.editor-panel .field textarea,:is(#project-form,#new-project-form) :is(input,textarea){font-size:15px;line-height:1.5!important;padding:10px 12px!important;scroll-margin-top:16px}
 .editor-panel textarea.transcript{height:auto;min-height:180px}
 .editor-panel .field textarea:not(#title-input),:is(#project-form,#new-project-form) textarea{min-height:110px}
 @supports(field-sizing:content){
  .editor-panel textarea:not(#title-input),:is(#project-form,#new-project-form) textarea{field-sizing:content;height:auto;max-height:min(520px,60svh);overflow-y:auto}
 }
 .mobile-keyboard-open :is(.editor-panel textarea:not(#title-input),#project-form textarea,#new-project-form textarea){min-height:140px;max-height:240px}
}
/* Four mobile tabs stay readable without horizontal scrolling. */
@media(max-width:760px){
 .section-tabs .main-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .section-tabs .main-sections button{min-width:0;min-height:48px;padding:8px;font-size:13px;line-height:1.25;white-space:normal;justify-content:center;text-align:center}
 .section-tabs .main-sections button .icon{width:16px;height:16px;flex-shrink:0}
}
/* Keep iOS text fields at its no-zoom editing size. */
.upload-example.design-frame{max-width:240px;margin:16px auto}
#upload-design{margin-block:20px}
.compact-presets .preset-carousel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow:visible;scroll-snap-type:none;padding:2px}
.compact-presets .preset-carousel::after{display:none}
.compact-presets .preset-card{padding:0;border-radius:10px}
.compact-presets .preset-label{min-height:48px;padding:8px 4px;font-size:12px;line-height:1.25;justify-content:center;text-align:center;gap:4px;overflow-wrap:normal;word-break:normal}
.compact-presets .preset-label .icon{display:none}
.compact-presets .preset-nav{display:none}
#source-upload-status:not([hidden]){position:fixed;right:16px;--source-upload-bottom:calc(20px + var(--bottom-safe,0px) + var(--keyboard-inset,0px));bottom:var(--source-upload-bottom);z-index:23;width:min(370px,calc(100% - 32px));max-height:calc(100dvh - var(--source-upload-bottom) - max(env(safe-area-inset-top,0px),var(--telegram-safe-area-top,0px),var(--telegram-content-safe-area-top,0px)) - 16px);display:flex;flex-direction:column;overflow:hidden;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 4px 20px #0002}
#source-upload-status [hidden]{display:none!important}
#source-upload-status>.source-upload-heading{flex-shrink:0}
.source-upload-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;line-height:1.4}
.source-upload-summary{display:grid;gap:3px;min-width:0}
.source-upload-heading strong{min-width:0;overflow-wrap:anywhere}
.source-upload-controls{display:flex;align-items:center;flex:none}
.source-upload-heading .icon-btn{width:32px;height:32px;flex:none}
.source-upload-controls [aria-expanded=false] .icon{transform:rotate(180deg)}
.source-upload-details:not([hidden]){display:grid;gap:8px;margin-top:10px}
.source-upload-name{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.source-upload-progress progress{display:block;appearance:none;width:100%;height:3px;margin:0;border:0;border-radius:999px;overflow:hidden;background:var(--accent-soft);accent-color:var(--accent)}
.source-upload-progress progress::-webkit-progress-bar{background:var(--accent-soft);border-radius:999px}
.source-upload-progress progress::-webkit-progress-value{background:var(--accent);border-radius:999px}
.source-upload-progress progress::-moz-progress-bar{background:var(--accent);border-radius:999px}
.source-upload-progress progress:indeterminate{background:linear-gradient(90deg,var(--line) 0 35%,var(--accent) 35% 65%,var(--line) 65% 100%)}
.source-upload-progress progress:indeterminate::-webkit-progress-bar{background:transparent}
.source-upload-progress p{font-size:12px;margin:0;line-height:1.4}
.source-upload-progress .inline-actions{font-size:12px;gap:6px;margin-top:0}
.source-upload-progress+.source-upload-progress{border-top:1px solid var(--line);margin-top:8px;padding-top:8px}
.source-upload-row-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.source-upload-row-heading .source-upload-summary{flex:1}
.source-upload-remove{color:var(--muted)}
.source-upload-remove .icon{width:16px;height:16px}
#source-upload-status .icon-btn:focus-visible{outline-width:2px;outline-offset:-5px}
body:has(#source-upload-status:not([hidden])) .page{padding-bottom:calc(var(--source-upload-height,0px) + 28px)}
html:has(#source-upload-status:not([hidden])){scroll-padding-bottom:calc(var(--source-upload-height,0px) + 100px)}
@media(min-width:761px){body:has(#source-upload-status:not([hidden])) .editor-actionbar{position:sticky;bottom:calc(var(--source-upload-height,0px) + var(--bottom-safe,0px) + 40px);z-index:24}}
body:has(#source-upload-status:not([hidden])) #cover-upload-status:not([hidden]){bottom:calc(var(--source-upload-height,0px) + 44px + var(--bottom-safe,0px) + var(--keyboard-inset,0px))}
@media(max-width:767px){#source-upload-status:not([hidden]){--source-upload-bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + var(--keyboard-inset) + 10px)}.source-upload-heading .icon-btn{min-width:44px;min-height:44px}.compact-presets .preset-label{min-height:48px;font-size:11px;padding-inline:3px}}
#source-upload-status.is-collapsed:not([hidden]){width:max-content;max-width:calc(100% - 32px);padding:3px 6px 3px 10px;border-radius:9px}
#source-upload-status.is-collapsed .source-upload-heading{gap:6px;font-size:11px;line-height:1.25}
#source-upload-status.is-collapsed strong{font-weight:600}
#source-upload-status.is-collapsed .icon-btn{width:28px;height:28px;min-width:28px;min-height:28px;padding:5px}
#source-upload-status.is-collapsed .icon{width:14px;height:14px}
#source-upload-details:not([hidden]){display:flex;flex-direction:column;min-height:0;gap:10px;margin-top:4px}
#source-upload-details [data-upload-list]{min-height:0;overflow:auto;overscroll-behavior:contain;padding-inline-end:10px;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
#source-upload-details [data-upload-list]::-webkit-scrollbar{width:4px}
#source-upload-details [data-upload-list]::-webkit-scrollbar-thumb{background:var(--line);border-radius:4px}
#source-upload-details .source-upload-progress{display:grid;gap:5px;font-size:13px;line-height:1.4}
#source-upload-status .source-upload-guidance{font-size:12px;line-height:1.5;margin:0;flex-shrink:0}
@media(max-width:760px){
 body:has(#source-upload-status:not([hidden])) .editor-actionbar{bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + var(--keyboard-inset) + var(--source-upload-height,0px) + 24px)}
 body:has(#source-upload-status:not([hidden])) #cover-upload-status:not([hidden]){bottom:calc(var(--mobile-nav-height) + var(--bottom-safe) + var(--keyboard-inset) + var(--source-upload-height,0px) + 24px)}
 .mobile-keyboard-open #source-upload-status:not([hidden]){--source-upload-bottom:calc(var(--keyboard-inset) + 10px)}
 .mobile-keyboard-open body:has(#source-upload-status:not([hidden])) .editor-actionbar{bottom:calc(var(--keyboard-inset) + var(--source-upload-height,0px) + 24px)}
}
.automatic-option{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;margin-block:24px;position:relative}
.automatic-switch{display:flex;align-items:center;gap:12px;cursor:pointer;font-weight:600;min-height:44px;min-width:0}
.automatic-switch input{position:absolute;opacity:0;width:1px;height:1px}
.switch-track{flex:none;width:42px;height:24px;border-radius:20px;background:var(--line);padding:3px;transition:background .16s ease}
.switch-track:after{content:'';display:block;box-sizing:border-box;background:var(--surface);border:1px solid var(--muted);width:18px;height:18px;border-radius:50%;transition:transform .16s ease}
.automatic-switch input:checked+.switch-track{background:var(--accent)}
.automatic-switch input:checked+.switch-track:after{transform:translateX(18px)}
.automatic-switch input:focus-visible+.switch-track{outline:2px solid var(--ink);outline-offset:3px}
.automatic-switch input:disabled~span{opacity:.6;cursor:default}
.automatic-help{min-width:44px;min-height:44px}
.automatic-help-text{grid-column:1/-1;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:13px;line-height:1.5}
.automatic-help-text p{margin:0 0 12px}.automatic-help-text p:last-child{margin:0}
.transcript-label{display:flex;align-items:center;gap:4px;min-width:0}
.transcript-heading .language-label{margin-left:auto;text-align:right}
.transcript-help-text{margin-bottom:12px}
.automation-progress{max-width:640px;margin:30px auto;line-height:1.6}
.automation-progress h1{margin-top:16px}.automation-progress>.btn{margin:8px 8px 0 0}
.automation-stages{list-style:none;padding:0;margin:20px 0;text-align:left}
.automation-stages li{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--line)}
.automation-stages small{color:var(--muted);text-align:right}
.automation-failure{margin-bottom:24px}.result-review{margin-bottom:28px}
.result-review p{line-height:1.55}.result-review .inline-actions{flex-wrap:wrap;margin:16px 0}
.correction-options{display:grid;gap:12px}.correction-options .btn{white-space:normal;min-height:48px}
.task-link[aria-disabled=true]{cursor:progress}
/* Compact action controls leave more room for the editor. */
:is(#app,dialog) .btn{min-height:36px;padding:6px 10px;gap:5px;border-radius:6px;font-size:12px;line-height:1.25}
:is(#app,dialog) .btn .icon{width:14px;height:14px}
:is(#app,dialog) .btn.icon-only{width:36px;padding:6px}
#app .editor-actionbar{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;pointer-events:none}
#app .editor-actionbar .action-hint{display:none}
#app .editor-actionbar .btn{min-height:30px;padding:4px 7px;gap:4px;pointer-events:auto}
#app .editor-actionbar .btn.primary{background:#f5b82e;border-color:#f5b82e;color:#211b0c}
#app .editor-actionbar .btn.primary:hover:not(:disabled){background:#e5a61e;border-color:#e5a61e}
@media(max-width:760px){#app .editor-actionbar .btn{width:auto;max-width:100%;margin-left:auto;margin-right:0}}
@media(prefers-reduced-motion:reduce){.switch-track,.switch-track:after{transition:none}}
@supports(-webkit-touch-callout:none){
 @media(max-width:760px){.editor-panel textarea.transcript,.editor-panel .field textarea,:is(#project-form,#new-project-form) :is(input,textarea){font-size:16px}}
}

/* Keep the destructive action secondary and inside the card in both layouts. */
.task-rows .task-card{position:relative}
#app .task-card>.task-delete{position:absolute;z-index:1;inset:10px 8px auto auto;width:28px;height:28px;min-width:28px;min-height:28px;margin:0;padding:6px;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--muted);box-shadow:none}
#app .task-card>.task-delete .icon{width:14px;height:14px}
#app .task-card>.task-delete:hover,#app .task-card>.task-delete:focus-visible{background:var(--surface-alt);color:var(--red);border-color:var(--red)}
#app .task-card>.task-delete:focus-visible{outline-offset:2px}
.task-rows.list-view .task-link{grid-template-columns:72px minmax(0,1fr);padding-right:64px}
.task-rows.list-view .task-bottom{display:none}
#app .task-rows.list-view .task-delete{top:50%;margin-top:-14px;border-color:transparent;background:transparent}
#app .task-rows.list-view .task-delete:hover,#app .task-rows.list-view .task-delete:focus-visible{background:var(--surface-alt);border-color:var(--line)}
.task-rows:not(.list-view) .task-link{padding-right:60px}
@media(max-width:760px){
 .task-rows.list-view .task-link{grid-template-columns:48px minmax(0,1fr);padding-right:60px}
 .task-rows:not(.list-view) .task-link{height:auto;padding-right:0}
 #app .task-rows:not(.list-view) .task-delete{top:16px;right:6px}
}
.task-deletion-status{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--border,#ddd);font-size:14px}.task-deletion-status span{line-height:1.5}

/* Contour v1 uses the same static bundled faces as the renderer. */
@font-face{font-family:Oswald;src:url('./assets/fonts/Oswald-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:block}
.preset-preview.contour .preset-sample{color:#fff;font-weight:400;text-shadow:none;gap:2px}
.preset-preview.contour .preset-sample em{font-family:Oswald,sans-serif;font-weight:700;font-size:30px;line-height:1.15;paint-order:stroke fill;-webkit-text-stroke:1px var(--preset-outline,#fff);text-shadow:none;text-transform:uppercase}
.preset-preview.contour .preset-sample small{font-weight:400;color:#fff}
.preset-colors.extended{display:flex;overflow-x:auto;overscroll-behavior-x:contain;max-width:100%;padding-block:2px;scrollbar-width:thin}
.preset-colors.extended .color-choice{flex:0 0 calc((100% - 18px)/4)}
.frame-subtitles.contour{left:10%;right:10%;padding:0;color:#fff;font-weight:400;-webkit-text-stroke:0;text-shadow:none;overflow-wrap:normal}
.frame-subtitles.contour .frame-row{display:flex;justify-content:center;align-items:baseline;gap:1.422cqw;margin-top:var(--contour-gap)}
.frame-subtitles.contour .frame-row:first-child{margin-top:0}
.frame-subtitles.contour .contour-hero{gap:3.556cqw}
.frame-subtitles.contour em.frame-word{font-family:Oswald,sans-serif;font-weight:700;paint-order:stroke fill;-webkit-text-stroke:var(--contour-stroke) var(--contour-outline,#fff);color:var(--frame-accent)}
.frame-subtitles.contour .contour-support .frame-word{paint-order:stroke fill;-webkit-text-stroke:calc(2 * var(--contour-support-stroke)) var(--contour-support-outline);text-shadow:var(--contour-support-shadow) var(--contour-support-shadow) 0 var(--contour-support-shadow-color)}

/* Confirmed publications remain visible independently of processing status. */
.task-publications{display:inline-flex;align-items:center;gap:7px;margin-left:8px;flex:none;vertical-align:middle}
.task-publications img{display:block;width:14px;height:14px;object-fit:contain}
.publication-history-note{display:block;margin-top:5px;color:var(--green);font-size:12px;line-height:1.4}
.publication-past{opacity:.85}

/* TikTok uses the existing publication dialog and shared form controls. */
.tiktok-description{margin-bottom:16px}.tiktok-description p{white-space:pre-wrap;overflow-wrap:anywhere;max-height:120px;overflow-y:auto;margin:8px 0}
.tiktok-toggles{display:grid;gap:14px;margin:18px 0}.tiktok-toggles label{display:flex;align-items:flex-start;gap:10px;line-height:1.45}.tiktok-toggles input{flex:none;width:18px;height:18px;margin-top:2px;accent-color:var(--accent)}.tiktok-toggles small{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.tiktok-interactions{border:0;padding:0;margin:0;display:grid;gap:4px}.tiktok-interactions legend{font-weight:600;margin-bottom:4px}.tiktok-interactions label{padding:8px 0}
.tiktok-advanced summary{cursor:pointer;color:var(--muted);font-size:13px;padding:8px 0}.tiktok-advanced[open] summary{margin-bottom:8px}.tiktok-advanced:has(input:checked) summary{color:var(--text)}
#tiktok-brands{padding-left:28px}#tiktok-brands:not([hidden]){display:grid;gap:10px}.tiktok-publication select{width:100%;min-height:42px}

.tiktok-cover{display:flex;align-items:center;gap:12px;margin-bottom:16px}.tiktok-cover img{width:64px;height:84px;object-fit:cover;border-radius:8px}

/* Focus uses the same pinned static font instances as the native renderer. */
@font-face{font-family:'LabOnest900';src:url('./assets/fonts/LabOnest900.ttf') format('truetype');font-weight:900;font-style:normal;font-display:swap}
@font-face{font-family:'LabUnbounded300';src:url('./assets/fonts/LabUnbounded300.ttf') format('truetype');font-weight:300;font-style:normal;font-display:swap}
.preset-preview.focus .preset-sample{font-family:'LabUnbounded300',sans-serif;font-weight:300;text-shadow:0 1px 2px #0005;paint-order:stroke fill;-webkit-text-stroke:.6px #151515}
.preset-preview.focus .preset-sample>em{font-family:'LabOnest900',sans-serif;font-weight:900;font-size:29px;-webkit-text-stroke:1px #151515;transform:scaleX(1.25)}
.preset-preview.focus .preset-sample>small{font-size:13px;transform:scaleX(1.12)}
.frame-subtitles.focus{left:10%;right:10%;padding:0;color:#fff;font-family:'LabUnbounded300',sans-serif;font-weight:300;line-height:1;overflow-wrap:normal;-webkit-text-stroke:0;text-shadow:0 .139cqw .278cqw #00000047}
.frame-subtitles.focus .frame-row{display:flex;justify-content:center;margin:0;line-height:1}
.frame-subtitles.focus .frame-row+.frame-row{margin-top:1.944cqw}
.frame-subtitles.focus .frame-word{display:inline-block;flex:none;white-space:nowrap;paint-order:stroke fill;-webkit-text-stroke:.3704cqw #151515;transform:scaleX(1.12)}
.frame-subtitles.focus em.frame-word{font-family:'LabOnest900',sans-serif;font-weight:900;-webkit-text-stroke:.5556cqw #151515;transform:scaleX(1.25)}

/* Account-wide published-video analytics; no media-player dependency. */
/* Published videos: compact mobile catalogue and shared navigation. */
.topbar-profile{width:44px;height:44px;border-radius:50%;color:var(--muted);background:var(--sidebar)}
.topbar-profile>.icon{width:25px;height:25px}.topbar-profile.active{color:var(--accent);background:var(--accent-soft)}
.analytics-page{max-width:1000px;margin-inline:auto}
.analytics-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
.analytics-heading h1{font-size:30px;letter-spacing:-.8px;font-weight:750;line-height:1.2}
.analytics-heading p{font-size:14px;color:var(--muted);margin-top:5px}
.analytics-heading>.icon-btn{width:44px;height:44px;color:var(--muted)}
.analytics-filters{margin:0 0 20px;display:grid;gap:12px}
.analytics-platform-tabs{display:flex;gap:8px}
.analytics-platform-tabs button{display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 13px;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:13px;font-weight:600;transition:background .16s,color .16s,box-shadow .16s}
.analytics-platform-tabs button.selected{background:var(--action-fill);color:#fff;border-color:var(--action-fill);box-shadow:0 2px 5px color-mix(in srgb,var(--accent) 15%,transparent)}
.analytics-network{display:inline-flex;align-items:center;justify-content:center;flex:none;width:19px;height:19px}
.analytics-network>svg,.analytics-network>img{display:block;width:100%;height:100%;object-fit:contain}
.network-youtube svg rect{fill:#ff0033}.network-youtube svg path{fill:#fff}.network-instagram{color:#de398d}
.analytics-search{position:relative;display:flex;align-items:center;min-width:0}
.analytics-search>.icon{position:absolute;left:13px;color:var(--muted);pointer-events:none}
.analytics-search input{width:100%;min-width:0;min-height:46px;padding:10px 14px 10px 40px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:15px}
.analytics-search input::placeholder{color:var(--muted);opacity:1}
.analytics-filter-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:10px}
.analytics-select{position:relative;display:flex;align-items:center;min-width:0}
.analytics-select>.icon{position:absolute;left:12px;pointer-events:none;color:var(--muted);width:18px}
.analytics-select>.icon:last-child{left:auto;right:11px;width:15px}
.analytics-select select{appearance:none;width:100%;min-width:0;min-height:46px;padding:10px 30px 10px 39px;font-size:13px;font-weight:550;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:10px;text-overflow:ellipsis}
.analytics-project-filter{min-width:0}.analytics-project-filter .text-btn{min-height:44px}
.analytics-period-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:46px;width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:13px;font-weight:550}
.analytics-period-trigger>.icon{width:18px}.analytics-period-trigger>.icon:last-child{width:15px}
.analytics-period-trigger>span{min-width:0;text-align:left;flex:1;overflow-wrap:anywhere}.analytics-period-trigger.has-value{color:var(--accent)}
.analytics-filter-summary{display:flex;justify-content:flex-end;margin-top:-8px}.analytics-filter-summary .text-btn{min-height:44px}
.analytics-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.analytics-card{position:relative;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0;transition:border-color .16s,box-shadow .16s}
.analytics-card:hover{border-color:color-mix(in srgb,var(--accent) 30%,var(--line));box-shadow:0 3px 14px #142a5010}
.analytics-card-heading{display:grid;grid-template-columns:104px minmax(0,1fr);padding-right:32px;gap:12px;align-items:start;border-radius:8px;min-height:76px}
.analytics-card-heading>div{min-width:0}
.analytics-thumb{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:none;width:104px;height:74px;border-radius:9px;background:var(--sidebar);color:var(--muted)}
.analytics-duration{position:absolute;right:5px;bottom:4px;padding:1px 4px;border-radius:4px;color:#fff;background:#101827cf;font-size:10px;font-variant-numeric:tabular-nums;font-weight:600}
.analytics-thumb>img{width:100%;height:100%;object-fit:cover}.analytics-thumb>.icon{width:28px;height:28px}
.analytics-card h2{font-size:15px;line-height:1.35;letter-spacing:-.2px;font-weight:700;margin:0 0 5px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.analytics-card-meta{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;line-height:1.45}
.analytics-published{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--green);margin-top:4px}
.analytics-published i{width:7px;height:7px;background:currentColor;border-radius:50%}.analytics-card-arrow{color:var(--muted);align-self:center}
.analytics-stats-strip{margin-top:11px;padding:8px 0;border:1px solid color-mix(in srgb,var(--line) 75%,transparent);border-radius:9px}
.analytics-card-note{text-align:center;font-size:11px;color:var(--muted);margin-bottom:5px;line-height:1.4}
.analytics-card-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0;text-align:center}
.analytics-card-metrics>.analytics-metric+div{border-left:1px solid var(--line)}
.analytics-metric{min-width:0}.analytics-metric dt{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.analytics-metric dd{margin:3px 0 0;font-size:16px;font-variant-numeric:tabular-nums;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.analytics-metric small{display:block;font-size:11px;color:var(--muted);margin-top:6px;line-height:1.4}
.analytics-card-metrics small{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.analytics-metric-locked dd{font-size:13px;color:var(--muted)}
.analytics-count{margin:12px 0 0;text-align:center;font-size:12px;color:var(--muted)}
.analytics-platform{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.analytics-platform svg,.analytics-platform img{width:16px;height:16px;object-fit:contain;flex:none}
.analytics-project{display:block;font-size:12px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.analytics-freshness{display:flex;flex-direction:column;gap:3px;font-size:12px;line-height:1.5;color:var(--muted)}
.analytics-pagination{display:flex;justify-content:center;margin-top:18px}
.analytics-loading{display:flex;align-items:center;gap:12px;padding:24px 0;color:var(--muted)}
.analytics-empty{padding:44px 20px;text-align:center;max-width:560px;margin:auto}
.analytics-empty>span{display:block;margin-bottom:20px;color:var(--accent)}.analytics-empty>span>.icon{width:36px;height:36px}
.analytics-empty h2{font-size:22px;margin-bottom:12px}.analytics-empty p{color:var(--muted)}
.analytics-back{margin-bottom:24px}.analytics-detail-heading{display:flex;align-items:flex-start;gap:18px;margin:0 0 20px}
.analytics-detail-heading>div{min-width:0}.analytics-detail-heading .analytics-thumb{width:100px;height:90px}
.analytics-detail-heading h1{font-size:26px;line-height:1.3;margin:8px 0;overflow-wrap:anywhere}.analytics-detail-heading p{font-size:12px;color:var(--muted)}
.analytics-retained-note,.analytics-permission-note,.analytics-upgrade-note{font-size:13px;background:var(--sidebar);border-radius:8px;padding:13px 16px;margin:16px 0}
.analytics-detail-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:24px 0;border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden}
.analytics-detail-metrics>.analytics-metric{padding:20px;border-bottom:1px solid var(--line)}.analytics-detail-metrics dd{margin-top:8px;font-size:24px}
.analytics-social-link{margin-bottom:16px}.analytics-period-note{color:var(--muted);font-size:12px;line-height:1.6;margin:12px 0 24px;max-width:760px}
.social-account-actions:has([data-analytics-permission]){display:flex;flex-direction:column;gap:8px}
.analytics-period-dialog{width:min(440px,calc(100% - 24px))}.analytics-period-dialog .modal-heading{padding-right:22px}
.analytics-period-dialog .modal-heading p{font-size:13px}.analytics-period-presets{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0}
.analytics-period-presets button{min-height:44px;flex:1;padding:8px 10px;white-space:nowrap;border:1px solid var(--line);border-radius:9px;background:var(--surface);font-size:12px;color:var(--muted)}
.analytics-period-presets button.selected{color:var(--accent);background:var(--accent-soft);border-color:var(--accent-soft)}
.analytics-range-inputs{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;margin:16px 0}
.analytics-range-inputs>label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted);min-width:0}
.analytics-range-inputs input{min-width:0;width:100%;min-height:44px;padding:8px;font-size:14px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:9px}
.analytics-range-inputs>span{margin-top:22px;color:var(--muted)}
.analytics-calendar-heading{display:flex;align-items:center;justify-content:space-between;margin:10px 0 5px}
.analytics-calendar-heading strong{text-transform:capitalize;font-size:14px}.analytics-calendar-heading .icon-btn{width:44px;height:44px}
.analytics-calendar-week,.analytics-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center}
.analytics-calendar-week{font-size:12px;color:var(--muted);padding-bottom:7px}
.analytics-calendar-days button{min-width:0;height:44px;padding:0;border:0;background:transparent;border-radius:0;font-size:14px;color:var(--ink);transition:background .15s}
.analytics-calendar-days button.in-range{background:var(--accent-soft)}.analytics-calendar-days button.selected{background:var(--action-fill);color:#fff;border-radius:10px}.analytics-calendar-days button.today:not(.selected){color:var(--accent);font-weight:750;text-decoration:underline;text-underline-offset:5px}
.analytics-period-hint{font-size:12px;line-height:1.5;color:var(--muted);margin:16px 0}.analytics-date-error{color:var(--red);font-size:13px}
.analytics-period-dialog .modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}#modal.analytics-period-dialog .modal-actions .btn{min-height:46px}
@media(max-width:1000px){
 .mobile-bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;background:transparent;border:0;box-shadow:none;isolation:isolate;--nav-notch:62.5%;padding:7px 8px var(--bottom-safe)}
 .mobile-bottom-nav.with-analytics{grid-template-columns:repeat(5,minmax(0,1fr));--nav-notch:50%}
 .mobile-bottom-nav::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--telegram-theme-bottom-bar-bg-color,var(--surface));border-top:1px solid var(--line);border-radius:18px 18px 0 0;-webkit-mask:radial-gradient(circle 34px at var(--nav-notch) -3px,transparent 33px,#000 34px);mask:radial-gradient(circle 34px at var(--nav-notch) -3px,transparent 33px,#000 34px)}
 .bottom-nav-item{min-height:58px;gap:5px;font-size:10px;padding:7px 1px 5px;border-radius:12px;transition:background .16s,color .16s}
 .bottom-nav-item:not(.bottom-nav-create).active{background:var(--accent-soft)}
 .mobile-bottom-nav [href="#analytics"]{font-size:clamp(8px,2.3vw,10px);letter-spacing:-.3px;padding-inline:0}
 .bottom-nav-item>.icon{width:23px;height:23px;flex-basis:23px}
 .bottom-nav-create{justify-content:flex-end;padding-top:0}
 .bottom-nav-create>.icon{background:var(--action-fill);color:#fff;position:absolute;top:-22px;width:48px;height:48px;padding:12px;margin:0;flex-basis:48px;box-shadow:0 4px 10px color-mix(in srgb,var(--accent) 22%,transparent);transition:transform .16s}
 .bottom-nav-create>span{margin-top:32px;margin-bottom:1px}.bottom-nav-create:active>.icon{transform:scale(.94)}
 .topbar{min-height:56px;padding-inline:16px;gap:10px}.topbar-actions{gap:6px}.topbar-profile{flex-shrink:0}
 .breadcrumbs{min-width:0;gap:8px}.breadcrumbs>a{font-size:12px;white-space:nowrap}.breadcrumbs>strong,.breadcrumbs>span{display:none}
 .project-switcher{max-width:min(42vw,260px)}
 .analytics-list{grid-template-columns:1fr}
}
@media(max-width:760px){
 main:has(.analytics-page){padding:18px 16px calc(var(--mobile-nav-height) + var(--bottom-safe) + 26px)}
 .analytics-heading{margin-bottom:15px}.analytics-heading h1{font-size:28px}.analytics-heading p{font-size:13px}
 .analytics-platform-tabs{gap:7px}.analytics-platform-tabs button{flex:1;padding-inline:8px;font-size:12px}.analytics-platform-tabs button:first-child{flex:.65}
 .analytics-search input{font-size:16px}.analytics-filter-row{gap:9px}.analytics-filters{margin-bottom:17px}
 .analytics-detail-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-detail-heading h1{font-size:21px}
 dialog.analytics-period-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:calc(100dvh - 20px);margin:0;padding:24px 18px calc(18px + var(--bottom-safe));border-radius:22px 22px 0 0;overflow-y:auto;animation:bottom-sheet-in .2s ease-out}
 dialog.analytics-period-dialog::before{content:"";display:block;width:36px;height:4px;border-radius:4px;background:var(--line);margin:-12px auto 16px}
}
@media(max-width:360px){
 main:has(.analytics-page){padding-inline:12px}.analytics-platform-tabs{gap:5px}.analytics-platform-tabs button{font-size:11px;padding-inline:5px;gap:4px}.analytics-network{width:16px;height:16px}
 .analytics-card-heading{grid-template-columns:84px minmax(0,1fr);gap:9px}.analytics-card .analytics-thumb{width:84px;height:70px}.analytics-card h2{font-size:14px}.analytics-card-meta{font-size:11px;gap:5px}
 .analytics-select select{padding-left:33px;font-size:12px}.analytics-period-trigger{font-size:12px;gap:5px}.analytics-select>.icon{left:9px}.bottom-nav-item{font-size:9px}
 .analytics-detail-heading .analytics-thumb{width:72px;height:84px}.analytics-detail-heading h1{font-size:19px}.analytics-detail-metrics>.analytics-metric{padding:15px}
}
@media(prefers-reduced-motion:reduce){.analytics-card,.analytics-platform-tabs button,.analytics-calendar-days button{transition:none}dialog.analytics-period-dialog{animation:none}}
#app .analytics-page button:not(.sr-only),#app .analytics-page a.btn{min-height:44px}

.analytics-card-heading::after{content:"";position:absolute;inset:0;border-radius:14px}
.analytics-card-menu{position:absolute;right:1px;top:2px;width:44px;height:44px;z-index:1;color:var(--muted)}
.analytics-card-menu>.icon{width:18px;height:18px}.analytics-menu-actions{display:flex;flex-direction:column;gap:10px;margin-top:24px}
#modal.analytics-menu-dialog .btn{min-height:46px;justify-content:flex-start}.analytics-menu-actions .analytics-social-link{margin-bottom:0}

/* Publication feedback occupies its own row, outside the action controls. */
.publish-target .publication-identity{min-width:0;overflow-wrap:anywhere}
.publish-target .publication-messages{grid-column:1 / -1;min-width:0;display:grid;gap:8px;overflow-wrap:anywhere}
.publication-messages .notice{margin:0;width:100%;min-width:0}
.publication-messages .notice>div{min-width:0}
.publish-target .publication-actions{grid-column:1 / -1;min-width:0;margin-top:0;justify-content:flex-start}
