:root{color-scheme:light;--ink:#18223c;--muted:#828ba1;--muted2:#a5aec0;--line:#e8ebf2;--line2:#eff1f6;--paper:#fff;--background:#f8f9fd;--accent:#5369e8;--accent2:#4557cb;--accent-pale:#f0f2ff;--success:#138e69;--error:#d44752;--radius:22px;font-family:Inter,"Segoe UI",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;font-synthesis:none;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}html{min-width:320px}body{margin:0;color:var(--ink);background:radial-gradient(ellipse 48% 23% at 50% 18%,#eef1ff 0%,transparent 93%),var(--background);min-height:100vh;font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.65}[hidden]{display:none!important}a{color:var(--accent)}.page-shell{max-width:1380px;margin:auto;padding:0 44px}.site-header{height:100px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(229,232,241,.7)}.brand{color:inherit;text-decoration:none;display:flex;align-items:center;gap:12px}.brand-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#242d4e;color:white;box-shadow:0 6px 12px #20294a12}.brand-icon svg{width:27px;height:27px}.brand-copy{display:flex;flex-direction:column;gap:4px}.brand-copy strong{font-size:15px;letter-spacing:-.6px;font-weight:750}.brand-copy small{font-size:9px;font-weight:750;letter-spacing:2px;color:#9aa3b6}.header-actions{display:flex;gap:18px;align-items:center}.health-pill{display:inline-flex;align-items:center;gap:9px;color:#7a8398;font-size:12px;font-weight:600}.health-dot{width:8px;height:8px;border-radius:50%;background:#c2c8d5;box-shadow:0 0 0 4px #c3c8d520}.health-pill.is-online .health-dot{background:#36b58a;box-shadow:0 0 0 4px #36b58a1c}.health-pill.is-offline .health-dot{background:#e46e72;box-shadow:0 0 0 4px #e46e721a}.header-btn{display:flex;align-items:center;gap:8px;padding:11px 15px;background:white;border:1px solid var(--line);border-radius:11px;color:#4a536b;font-size:12px;font-weight:700;box-shadow:0 1px 3px #17244904}.header-btn:hover{border-color:#cfd5e6}.header-btn svg{width:16px;height:16px}.hero{max-width:1000px;margin:0 auto;padding:75px 0 63px;text-align:center}.hero-kicker{display:flex;align-items:center;justify-content:center;gap:10px;font-size:10px;font-weight:800;letter-spacing:2.65px;color:#6576d0}.kicker-line{width:20px;height:2px;background:#7e8cef;border-radius:3px}.hero h1{font-size:clamp(39px,5.3vw,67px);font-weight:750;letter-spacing:-3.9px;line-height:1.1;margin:19px 0 18px}.hero h1 em{font-style:normal;background:linear-gradient(105deg,#5066de,#9286de);color:transparent;background-clip:text;-webkit-background-clip:text}.hero>p{font-size:15px;line-height:1.85;color:#8490a8;margin:0 auto 36px}.hero form{max-width:855px;margin:auto;text-align:left}.input-label,.eyebrow{display:block;color:#9ba5b7;font-size:10px;font-weight:800;letter-spacing:1.8px}.input-label{margin:0 0 10px 6px}.url-input-wrap{height:76px;display:flex;align-items:center;gap:16px;background:white;border:1px solid #dee3ee;box-shadow:0 11px 28px rgba(32,47,96,.07),0 2px 5px rgba(32,47,96,.03);border-radius:17px;padding:9px 10px 9px 22px;transition:border-color .15s,box-shadow .15s}.url-input-wrap:focus-within{border-color:#a8b4fb;box-shadow:0 12px 29px #334ea619,0 0 0 4px #5369e811}.url-input-wrap.invalid{border-color:#df6979}.url-input-wrap>svg{flex-shrink:0;width:22px;height:22px;color:#8f9ab4}.url-input-wrap input{height:100%;min-width:0;flex:1;border:none;background:transparent;font-size:15px;outline:none;color:#232d45}.url-input-wrap input::placeholder{color:#abb3c4}.submit-btn{display:flex;align-items:center;justify-content:center;gap:22px;height:55px;padding:0 21px 0 26px;border:0;border-radius:11px;background:var(--accent);box-shadow:0 5px 10px #4d62d930;color:white;font-size:13px;white-space:nowrap;font-weight:730;transition:background .15s,transform .15s}.submit-btn:hover{background:var(--accent2);transform:translateY(-1px)}.submit-btn svg{width:18px;height:18px}.url-meta{display:flex;justify-content:space-between;padding:12px 4px 0 6px;color:#a2aabe;font-size:11px}.shortcut-hint{color:#a5aec1}kbd{background:#eceff7;padding:3px 7px;border:1px solid #e2e6f0;border-radius:5px;font-size:10px;color:#8290a4}.workspace{max-width:1210px;margin:0 auto}.tabs{display:flex;align-items:center;gap:28px;border-bottom:1px solid #e7eaf2;overflow:auto;scrollbar-width:none;margin:0 0 25px;padding-left:7px}.tabs::-webkit-scrollbar{display:none}.tab{position:relative;white-space:nowrap;border:0;background:transparent;padding:16px 2px 17px;font-size:13px;font-weight:700;color:#939caf}.tab:hover,.tab:focus-visible{color:#2f3c64}.tab.is-active{color:#3f54d7}.tab.is-active:after{position:absolute;bottom:0;left:0;right:0;height:3px;content:"";background:#6073e6;border-radius:8px 8px 0 0}.workspace-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.03fr);gap:22px;align-items:stretch}.config-card,.result-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);min-height:527px;box-shadow:0 9px 35px #1c2b5608}.config-card{padding:30px 31px 22px;display:flex;flex-direction:column}.result-card{padding:30px 31px 24px;min-width:0}.card-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:27px}.eyebrow{font-size:10px}.card-heading h2{font-size:22px;line-height:1.3;letter-spacing:-.9px;margin:9px 0 5px;font-weight:730}.card-heading p{margin:0;font-size:12px;color:#99a2b4;line-height:1.5}.step-number{color:#bbc1ce;font-weight:700;font-size:10px;letter-spacing:.8px;margin-top:4px;white-space:nowrap}.config-panel{flex:1}.field{margin-bottom:21px}.field label:not(.switch-row),.key-dialog-inner>label,.payload-details label{display:block;font-size:12px;font-weight:720;color:#44516e;margin-bottom:9px}.field select,.field input:not([type=checkbox]):not([type=file]),.field textarea,.payload-details textarea,.key-dialog-inner>input,.captcha-entry input{width:100%;min-width:0;background:#fbfcfe;border:1px solid #e5e8f1;border-radius:10px;color:#2d3951;outline:0;padding:13px 14px;font-size:12px;transition:border-color .15s,box-shadow .15s}.field select{appearance:none;cursor:pointer;padding-right:40px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%238994ad' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}.field :is(select,input,textarea):focus,.payload-details textarea:focus,.key-dialog-inner>input:focus,.captcha-entry input:focus{border-color:#9eaff4;box-shadow:0 0 0 3px #5369e812}.field textarea,.payload-details textarea{resize:vertical;line-height:1.6}.field input[type=file]{font-size:12px;max-width:100%;padding:11px;border:1px dashed #d3daeb;border-radius:9px;background:#fbfcff}.field input[type=file]::file-selector-button{background:#edf1ff;color:#4057c0;border:none;border-radius:6px;padding:7px 10px;margin-right:12px;cursor:pointer}.field-help{color:#a0a8b9;font-size:11px;line-height:1.6;margin:7px 0 0}.nested-label{margin-top:14px}.advanced,.payload-details{border:1px solid var(--line2);background:#fcfcfe;border-radius:11px;margin-top:10px;margin-bottom:22px}.advanced summary,.payload-details summary{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:14px 15px;color:#52607b;cursor:pointer;font-size:12px;font-weight:720;list-style:none}.advanced summary::-webkit-details-marker,.payload-details summary::-webkit-details-marker{display:none}.advanced summary:after,.payload-details summary:after{content:"⌄";font-size:18px;margin-left:auto;color:#9fa9bd;line-height:.5;transition:transform .15s}.advanced[open] summary:after,.payload-details[open] summary:after{transform:rotate(180deg)}.advanced summary span,.payload-details summary span{font-size:10px;font-weight:500;color:#acb3c2;margin-left:8px}.advanced-body{padding:3px 15px 15px;border-top:1px solid #eff1f5}.advanced-body>.field{margin-top:12px}.advanced-body>.nested-label{font-size:11px!important}.switch-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 0;border-bottom:1px solid #f0f1f6}.switch-row:last-child{border-bottom:0}.switch-row strong{font-size:11.5px;color:#48536c;font-weight:700}.switch-row small{display:block;color:#a4adbd;font-size:10px;margin-top:4px;line-height:1.45}.switch-row input[type=checkbox]{position:relative;appearance:none;flex-shrink:0;width:37px;height:21px;background:#e2e6ef;border-radius:12px;margin:0;transition:background .2s;cursor:pointer}.switch-row input[type=checkbox]:checked{background:#6679e6}.switch-row input[type=checkbox]:after{position:absolute;content:"";width:15px;height:15px;top:3px;left:3px;border-radius:50%;background:white;box-shadow:0 1px 3px #10152b28;transition:transform .2s}.switch-row input[type=checkbox]:checked:after{transform:translateX(16px)}.switch-row input[type=checkbox]:focus-visible{outline:3px solid #acb9ff}.info-note{background:#f5f7ff;border:1px solid #edf0ff;color:#7885a6;font-size:11px;line-height:1.65;border-radius:9px;padding:13px 14px;margin-bottom:16px}.payload-details{margin:0 0 21px}.payload-details .advanced-body label{margin-top:11px}.config-bottom{border-top:1px solid var(--line2);display:flex;align-items:center;gap:13px;padding-top:19px;margin-top:auto;min-width:0}.endpoint-label{font-size:9px;letter-spacing:1.3px;color:#aab1c1;font-weight:800}.config-bottom code{background:#f1f3fc;color:#6975a6;border-radius:5px;padding:5px 7px;font-size:10px;overflow-wrap:anywhere}.config-bottom-check{margin-left:auto;font-size:10px;color:#9ba5b6;white-space:nowrap}.config-bottom-check span{font-size:13px;color:#7989d9;margin-left:2px}.result-heading{padding-bottom:23px}.status-badge{font-size:10px;font-weight:760;border-radius:7px;padding:7px 10px;letter-spacing:.3px}.status-idle{background:#f2f3f7;color:#929aa9}.status-running{background:#eef1ff;color:#5769d2}.status-done{background:#e9f7f1;color:#138c67}.status-failed{background:#fff1f2;color:#d05263}.status-captcha{background:#fff5e5;color:#ac741d}.result-empty{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:365px;margin:auto;max-width:245px}.empty-illustration{width:160px;height:160px;margin-bottom:0}.empty-illustration svg{width:100%}.result-empty h3{font-size:16px;letter-spacing:-.4px;margin:5px 0 10px}.result-empty p{font-size:12px;color:#9fa8b9;line-height:1.75;margin:0 0 18px}.empty-chip{display:inline-flex;align-items:center;justify-content:center;background:#f5f6fa;color:#afb7c4;font-size:10px;font-weight:650;border-radius:8px;padding:8px 12px}.result-overview{min-height:265px;max-height:520px;overflow:auto;scrollbar-color:#dfe4ef transparent}.job-progress{background:#f4f6ff;border:1px solid #e7ebfe;border-radius:12px;padding:13px;display:flex;align-items:center;gap:12px;margin-bottom:17px}.job-progress strong{display:block;font-size:12px;font-weight:720;color:#4556b4}.job-progress p{margin:4px 0 0;font-size:10px;color:#8790b9;line-height:1.4}.spinner{display:block;width:20px;height:20px;border-radius:50%;border:2px solid #c8d0fa;border-top-color:#4f67dd;animation:spin .8s linear infinite;flex-shrink:0}@keyframes spin{to{transform:rotate(360deg)}}.quiet-btn{margin-left:auto;white-space:nowrap;border:0;background:transparent;color:#5768ce;font-size:10px;font-weight:700}.result-error{background:#fff4f4;border:1px solid #ffe3e5;border-radius:10px;color:#b73d4b;padding:14px;font-size:12px;line-height:1.6;margin-bottom:17px;white-space:pre-wrap;overflow-wrap:anywhere}.output-hero{display:flex;gap:14px;margin-bottom:21px;align-items:flex-start;min-width:0}.output-image{width:96px;height:86px;border-radius:12px;object-fit:cover;background:#eff1fa;flex-shrink:0}.output-text{min-width:0}.output-text h3{font-size:17px;line-height:1.3;letter-spacing:-.55px;margin:1px 0 8px;overflow-wrap:anywhere}.output-text p{font-size:11px;line-height:1.6;margin:0;color:#8a95a8;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.result-label{font-size:10px;letter-spacing:1.1px;color:#a2aabb;font-weight:780;text-transform:uppercase;margin:0 0 10px}.result-fields{margin:0;border:1px solid #edf0f5;border-radius:12px;overflow:hidden}.result-fields .pair{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:start;gap:12px;padding:12px 13px;border-bottom:1px solid #f0f2f6;font-size:11px}.result-fields .pair:last-child{border-bottom:0}.result-fields dt{font-weight:650;color:#a1aabc}.result-fields dd{color:#44506a;margin:0;overflow-wrap:anywhere;line-height:1.5}.output-actions{display:flex;flex-wrap:wrap;gap:9px;margin:18px 0 20px}.action-link{display:inline-flex;align-items:center;gap:7px;padding:11px 14px;border-radius:9px;text-decoration:none;background:#edf0ff;color:#5063d5;border:0;font-weight:750;font-size:11px}.action-link:hover{background:#e2e7ff}.action-link.is-primary{background:#5267dc;color:white}.action-link.is-primary:hover{background:#4357c4}.action-link svg{width:13px;height:13px}.summary-text{font-size:11px;color:#8490a7;line-height:1.6;padding:11px 0}.result-toolbar{display:flex;justify-content:space-between;gap:15px;align-items:center;padding-top:17px;margin-top:20px;border-top:1px solid #edf0f5}.view-toggle{padding:4px;display:flex;gap:2px;background:#f3f5f9;border-radius:9px}.view-toggle button{border:none;background:transparent;color:#9ca5b6;font-size:10px;border-radius:6px;padding:8px 13px;font-weight:700}.view-toggle button.is-current{background:white;color:#5062c9;box-shadow:0 2px 6px #25315a12}.toolbar-actions{display:flex;gap:8px}.icon-button{width:33px;height:33px;display:grid;place-items:center;background:#fafbfe;border:1px solid #e8ebf1;border-radius:9px;color:#8390a9;font-size:22px;line-height:1}.icon-button:hover{color:var(--accent);border-color:#cdd5fb}.icon-button svg{height:16px;width:16px}#json-view pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:480px;overflow:auto;margin:0;border-radius:11px;background:#f7f8fb;padding:18px;font-size:10.5px;color:#48546d;line-height:1.7}.captcha-area{padding:15px;border:1px solid #f6deb0;background:#fffbf4;border-radius:12px;margin:0 0 16px;color:#654e20}.captcha-area strong{font-size:12px}.captcha-area p{font-size:11px;line-height:1.5}.captcha-area img{max-width:260px;max-height:130px;display:block;margin:10px 0;border:1px solid #eddcbf;border-radius:5px}.captcha-area label{display:block;font-size:11px;font-weight:700;margin-bottom:6px}.captcha-entry{display:flex;gap:8px}.captcha-entry input{background:white}.small-primary{white-space:nowrap;background:var(--accent);color:#fff;border:0;border-radius:9px;padding:12px 17px;font-weight:720;font-size:12px}.small-primary:hover{background:var(--accent2)}.site-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:33px 0 35px;margin-top:15px;color:#a7afbd;font-size:11px}.footer-divider{color:#c8cdd9;padding:0 8px}dialog{border:1px solid #e5e8f0;border-radius:20px;max-width:min(92vw,430px);padding:0;box-shadow:0 22px 90px #1c2a5f30;color:var(--ink)}dialog::backdrop{background:rgba(28,40,77,.37);backdrop-filter:blur(3px)}.key-dialog-inner{padding:28px 30px}.dialog-top{display:flex;justify-content:space-between;align-items:start}.dialog-top h2{margin:8px 0 4px;font-size:22px;letter-spacing:-.7px}.key-dialog-inner>p{color:#8390a6;font-size:12px;line-height:1.7;margin:15px 0 20px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.secondary-btn{border:1px solid #e0e5ef;border-radius:9px;padding:12px 17px;color:#5b6882;background:white;font-weight:690;font-size:12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#1f2a4b;color:#fff;border-radius:10px;padding:12px 18px;box-shadow:0 8px 30px #17233d3b;font-size:12px;z-index:30;max-width:calc(100vw - 32px);text-align:center}
@media(max-width:1050px){.page-shell{padding:0 28px}.hero{padding:68px 0 54px}.workspace-grid{gap:15px}.config-card,.result-card{padding:25px 24px 20px}.result-fields .pair{grid-template-columns:88px minmax(0,1fr)}.tabs{gap:23px}}
@media(max-width:770px){.page-shell{padding:0 22px}.site-header{height:79px}.hero{padding:60px 0 48px}.hero h1{font-size:clamp(36px,8vw,52px);letter-spacing:-2.6px}.workspace-grid{grid-template-columns:minmax(0,1fr)}.config-card,.result-card{min-height:0}.result-empty{min-height:300px}.tabs{gap:25px}.site-footer{margin-top:4px}}
@media(max-width:530px){.page-shell{padding:0 16px}.site-header{height:74px}.brand-icon{height:39px;width:39px;border-radius:12px}.brand-copy strong{font-size:12px;letter-spacing:-.35px}.brand-copy small{font-size:8px;letter-spacing:1.3px}.header-actions{gap:10px}.health-pill{font-size:0}.health-dot{width:9px;height:9px}.header-btn{padding:10px 12px}.header-btn svg{height:18px;width:18px}.header-btn span{display:none}.hero{padding:49px 0 41px}.hero-kicker{font-size:9px;letter-spacing:1.6px}.hero h1{font-size:40px;letter-spacing:-2.6px;margin:16px 0}.hero>p{font-size:12px;line-height:1.85;margin-bottom:26px}.desktop-break{display:none}.url-input-wrap{height:auto;padding:8px 8px 8px 13px;gap:10px;min-height:63px}.url-input-wrap>svg{width:18px;height:18px}.url-input-wrap input{font-size:12px}.submit-btn{height:46px;padding:0 14px;gap:0;font-size:0;border-radius:9px}.submit-btn svg{width:20px;height:20px}.url-meta{font-size:10px}.shortcut-hint{display:none}.tabs{gap:20px;margin-bottom:15px;padding:0}.tab{font-size:12px;padding:13px 2px 14px}.config-card,.result-card{border-radius:17px;padding:23px 18px 19px}.card-heading h2{font-size:20px}.card-heading{padding-bottom:23px}.result-heading{padding-bottom:16px}.step-number{font-size:9px}.site-footer{flex-direction:column;align-items:flex-start;font-size:10px;padding-bottom:25px}.config-bottom-check{display:none}.advanced summary span,.payload-details summary span{font-size:9px}.result-fields .pair{grid-template-columns:84px minmax(0,1fr)}.output-image{width:76px;height:77px}.output-text h3{font-size:15px}.captcha-entry{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Login experience */
.login-page{min-height:100vh;background:radial-gradient(ellipse 70% 52% at 50% 15%,#edf0ff 0%,transparent 80%),#f8f9fc;display:grid;place-items:center}
.login-shell{width:min(100%,520px);padding:32px 22px;display:flex;flex-direction:column;align-items:center;gap:30px}
.login-brand{text-decoration:none;display:inline-flex;align-items:center;gap:11px}
.login-card{width:100%;padding:42px;background:white;border:1px solid #e9ecf5;border-radius:22px;box-shadow:0 22px 70px rgba(31,46,92,.07)}
.login-mark{width:50px;height:50px;display:grid;place-items:center;background:#eef0ff;color:#586de0;border-radius:15px;margin-bottom:24px}
.login-mark svg{width:27px;height:27px}
.login-card h1{font-size:32px;line-height:1.2;letter-spacing:-1.25px;margin:10px 0 10px}
.login-subtitle{font-size:13px;color:#8190a7;line-height:1.7;margin:0 0 30px}
.login-field{margin-bottom:19px}
.login-field label{display:block;color:#394560;font-size:12px;font-weight:730;margin-bottom:9px}
.login-field input{width:100%;height:50px;border:1px solid #e2e6f0;border-radius:11px;background:#fbfcff;color:#293553;padding:0 15px;font:inherit;font-size:13px;outline:0;transition:border-color .15s,box-shadow .15s}
.login-field input:focus{border-color:#8999f1;box-shadow:0 0 0 3px #e9edff}
.login-field input::placeholder{color:#a3adbf}
.login-submit{width:100%;height:51px;display:flex;justify-content:center;align-items:center;gap:10px;background:var(--accent);border:0;border-radius:11px;color:white;font:inherit;font-size:13px;font-weight:750;margin-top:26px;cursor:pointer}
.login-submit:hover{background:var(--accent2)}.login-submit:disabled{opacity:.65;cursor:wait}
.login-error{color:#bc3d4d;background:#fff0f2;border:1px solid #ffdee2;border-radius:9px;padding:11px 12px;font-size:12px;line-height:1.5;margin:0}
.login-note{font-size:11px;color:#9ba5b6;text-align:center;line-height:1.5;margin:24px 0 0}
.login-bottom{color:#a0aabc;font-size:11px;margin:0}.login-bottom span{padding:0 6px}
.header-btn-logout{margin-left:4px}.header-btn-logout svg{width:18px;height:18px}
@media(max-width:530px){.login-shell{padding:26px 16px;gap:23px}.login-card{padding:30px 23px;border-radius:17px}.login-card h1{font-size:28px}.login-page .brand-copy strong{font-size:13px}.login-page .brand-copy small{font-size:8px}}

/* Persistent video history */
.history-gallery{background:#fff;border:1px solid #e9edf5;border-radius:19px;padding:31px;margin-bottom:18px;box-shadow:0 8px 28px #21336807}
.history-head{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:24px}
.history-head h2{font-size:27px;letter-spacing:-.9px;margin:8px 0}
.history-head p{font-size:12px;color:#8c96a9;line-height:1.6;margin:0}
.history-count{white-space:nowrap;color:#5368d9;background:#f1f3ff;border:1px solid #e2e7ff;border-radius:10px;font-size:12px;font-weight:750;padding:12px 16px}
.history-search{margin-bottom:26px}.history-search label{display:block;font-size:11px;font-weight:700;color:#64708a;margin:0 0 9px}
.history-search-controls{display:flex;gap:10px}.history-search input{min-width:0;flex:1;min-height:47px;border:1px solid #e1e5f0;border-radius:10px;padding:0 14px;font:inherit;color:#344159;font-size:12px;outline:0}
.history-search input:focus{border-color:#92a1eb;box-shadow:0 0 0 3px #edf0ff}
.history-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,285px),1fr));gap:17px}
.history-item{display:flex;flex-direction:column;min-width:0;border:1px solid #e8ecf4;border-radius:14px;overflow:hidden;background:white}
.history-thumb{width:100%;height:150px;object-fit:cover;background:#f2f4fb}
.history-placeholder{display:grid;place-items:center;color:#b4bdf4;font-size:37px}
.history-item-body{display:flex;flex-direction:column;gap:11px;flex:1;padding:17px}
.history-topline{display:flex;gap:10px;align-items:center;justify-content:space-between}
.history-status{font-size:10px;font-weight:740;padding:6px 9px;border-radius:6px;color:#768197;background:#f4f6fa}
.history-status.is-available{background:#e9f7f1;color:#20734d}.history-date{font-size:10px;color:#a0aabc}
.history-item h3{font-size:15px;letter-spacing:-.35px;line-height:1.35;overflow-wrap:anywhere;margin:0}
.history-desc{font-size:11px;color:#8994a8;line-height:1.6;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.history-url{font-size:11px;color:#5468d4;text-decoration:none;overflow-wrap:anywhere;word-break:break-word}
.history-expiry{font-size:10px;color:#8c96a9}
.history-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:auto;padding-top:6px}
.history-message{font-size:12px;color:#8c96a9;line-height:1.5}.history-message:empty{display:none}
.history-more{display:block;margin:24px auto 0}.history-more[hidden]{display:none}
@media(max-width:530px){.history-gallery{padding:22px 17px}.history-head{align-items:flex-start;flex-direction:column;gap:14px}.history-head h2{font-size:24px}.history-search-controls{gap:7px}.history-search .small-primary{padding:11px 13px}.history-grid{grid-template-columns:1fr}}

/* Download pipeline: compact, readable on desktop and mobile. */
.tool-details { border: 1px solid var(--border, #dce2ed); border-radius: 14px; padding: 17px; margin: 14px 0; background: var(--surface, #fff); }
.tool-header { display: flex; flex-direction: column; gap: 5px; font-size: .9rem; }
.tool-header > div { color: var(--muted, #64748b); font-size: .77rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.tool-header strong { font-size: 1rem; }
.scraper-detail { color: var(--muted, #64748b); font-size: .84rem; margin-top: 9px; }
.tool-attempts { padding: 0; margin: 14px 0; list-style: none; display: grid; gap: 8px; }
.tool-attempt { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border: 1px solid var(--border, #e2e8f0); border-radius: 9px; padding: 9px 12px; font-size: .86rem; min-width: 0; }
.tool-dot { width: 9px; height: 9px; border-radius: 50%; background: #dc8e3f; flex: 0 0 9px; }
.tool-success .tool-dot { background: #27926a; }
.tool-attempt-status { color: var(--muted, #64748b); }
.tool-timing { margin-left: auto; color: var(--muted, #64748b); font-size: .8rem; font-variant-numeric: tabular-nums; }
.tool-error { width: 100%; font-size: .8rem; overflow-wrap: anywhere; color: #a64c30; }
.tool-details .action-link { margin-top: 8px; }
.history-tool { color: var(--muted, #64748b); font-size: .78rem; margin-top: 6px; }

/* Inline authenticated media previews and a responsive image viewer. */
.media-preview{min-width:0;max-width:100%;margin:11px 0 21px}
.media-stage{position:relative;background:#141d34;border-radius:14px;overflow:hidden;aspect-ratio:16/9;display:grid;place-items:center;min-height:180px}
.media-stage.is-audio{aspect-ratio:auto;min-height:130px}
.media-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.65}
.media-play-button{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:9px;background:transparent;border:0;color:white;font-size:13px;font-weight:750;padding:20px}
.play-symbol{display:grid;place-items:center;width:64px;height:64px;padding-left:4px;border-radius:50%;background:#566fe9;color:white;box-shadow:0 5px 20px #111c3988;font-size:23px;transition:transform .18s}
.media-play-button:hover .play-symbol,.media-play-button:focus-visible .play-symbol{transform:scale(1.08)}
.inline-media{width:100%;height:100%;max-height:520px;object-fit:contain;background:#121b31;display:block;aspect-ratio:16/9}
audio.inline-media{height:90px;aspect-ratio:auto;background:transparent}
.media-play-error{padding:8px;color:#a34f44;font-size:12px}
.media-preview-image{padding:0;border:0;width:100%;display:block;background:#f0f2f8;border-radius:13px;overflow:hidden}
.media-preview-image img{width:100%;max-height:480px;object-fit:contain;display:block}
.media-section-title{font-size:14px;letter-spacing:-.3px;margin:20px 0 12px}
.media-gallery{margin:18px 0 22px}
.media-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:10px}
.media-gallery-tile{background:#f3f5f9;border:1px solid #e7ebf3;padding:0;border-radius:11px;overflow:hidden;aspect-ratio:1;transition:transform .14s,border-color .14s}
.media-gallery-tile:hover,.history-cover:hover,.history-image-tile:hover{border-color:#8999ee;transform:translateY(-2px)}
.media-gallery-tile img{display:block;width:100%;height:100%;object-fit:cover}
.history-cover{padding:0;border:0;background:#f1f3fa;width:100%;height:150px;display:block;overflow:hidden}
.history-cover img{height:100%;width:100%;object-fit:cover;display:block}
.history-item>.media-preview{margin:0;max-width:none}
.history-item>.media-preview .media-stage{border-radius:0;min-height:150px}
.history-item>.media-preview .inline-media{max-height:240px}
.history-image-strip{display:flex;gap:5px;padding:8px 12px 0;overflow:hidden}
.history-image-tile{border:1px solid #e7eaf3;padding:0;background:#f1f2f6;flex:1;min-width:0;height:50px;border-radius:7px;overflow:hidden}
.history-image-tile img{width:100%;height:100%;object-fit:cover;display:block}
.media-dialog{width:min(94vw,1050px);max-width:1050px;max-height:94vh;border-radius:19px;background:#10182c;color:white;padding:14px;border:1px solid #33405a}
.media-dialog::backdrop{background:#0c142ae6}
.media-dialog-top{display:flex;align-items:center;justify-content:space-between;padding:0 4px 10px;font-size:12px;color:#c3cadc}
.media-dialog-close{border:0;background:#29334c;color:white;border-radius:50%;width:35px;height:35px;font-size:25px}
.media-dialog-stage{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:180px}
.media-dialog-stage img{display:block;width:min(100%,860px);max-width:calc(100% - 90px);max-height:calc(94vh - 130px);object-fit:contain}
.media-dialog-arrow{border:0;background:#25314c;color:white;font-size:28px;flex:0 0 38px;height:48px;border-radius:9px}
.media-dialog>p{font-size:12px;text-align:center;color:#f1b8b1}
@media(max-width:530px){.media-stage{min-height:150px}.play-symbol{width:52px;height:52px;font-size:19px}.media-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.media-dialog{padding:8px}.media-dialog-arrow{flex-basis:28px;width:28px;height:38px;font-size:24px}.media-dialog-stage{gap:3px}.media-dialog-stage img{max-width:calc(100% - 62px)}}

.preview-note{font-size:11px;color:#8a94a8;margin:-13px 0 19px;line-height:1.6}

.history-delete{color:#b42332!important;border-color:#f2c8cf!important;background:#fff6f7!important}.history-delete:hover{background:#ffe9ed!important}.history-delete:disabled{opacity:.5;cursor:wait}

/* Readable, responsive JSON detail modal. */
.json-modal { width:min(94vw,960px); max-width:960px; max-height:88dvh; }
.json-modal-header { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #e5e8f0; }
.json-modal-header h2 {margin:5px 0 0;font-size:20px;}
.json-modal-actions { display:flex;align-items:center;gap:8px; }
#json-modal-content { margin:0;max-height:calc(88dvh - 92px);overflow:auto;padding:22px 24px;background:#f7f8fb;color:#35405c;font-size:12px;line-height:1.6;white-space:pre;tab-size:2; }
@media (max-width:600px){ .json-modal-header {padding:14px;} #json-modal-content {padding:16px;font-size:11px;} }

/* Two-row API code modal: request on top, exact JSON response below. */
.code-modal{width:min(96vw,1000px);max-width:1000px;height:min(90dvh,860px);max-height:90dvh;overflow:hidden;display:none;flex-direction:column}
.code-modal[open]{display:flex}
.code-modal-header{padding:17px 24px 14px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #e5e8f0;flex:none}
.code-modal-header h2{font-size:22px;margin:4px 0 0}
.code-modal-note{padding:10px 24px 0;margin:0;color:#7e8a9f;font-size:11px;line-height:1.5;flex:none}
.code-modal-rows{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1.45fr);min-height:0;flex:1;gap:0;padding:10px 24px 20px}
.code-modal-section{display:flex;flex-direction:column;min-height:0;min-width:0}
.code-modal-section + .code-modal-section{padding-top:12px}
.code-modal-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:45px}
.code-modal-section-head h3{font-size:12px;font-weight:800;color:#39435c;margin:0}
.code-modal-section-head .secondary-btn{padding:8px 12px;font-size:11px}
.code-modal-section pre{flex:1;min-height:0;margin:0;overflow:auto;padding:15px;border:1px solid #e6eaf1;border-radius:10px;background:#f7f8fb;font-size:11.5px;line-height:1.65;color:#34415c;white-space:pre;tab-size:2;user-select:text}
@media(max-width:600px){.code-modal{height:92dvh;max-height:92dvh;width:96vw;border-radius:14px}.code-modal-header{padding:13px 15px 11px}.code-modal-note{padding:9px 15px 0}.code-modal-rows{padding:8px 12px 14px;grid-template-rows:minmax(0,.9fr) minmax(0,1.4fr)}.code-modal-section pre{font-size:10px;padding:10px}.code-modal-header h2{font-size:19px}}

.job-progress>div{min-width:0;flex:1}.job-progress strong small{font-weight:600;color:#8790b9;margin-left:6px}
.job-steps{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:5px;font-size:10px;color:#8790b9}
.job-steps li{display:flex;gap:7px;align-items:baseline;line-height:1.4;overflow-wrap:anywhere}
.job-steps li:before{content:"✓";color:#36b58a;font-weight:800}
.job-steps li.is-current{color:#3f4fa8;font-weight:700}.job-steps li.is-current:before{content:"›";color:#4f67dd}
.job-steps li.is-failed{color:#b73d4b}.job-steps li.is-failed:before{content:"✕";color:#d05263}
.job-steps time{margin-left:auto;color:#a6aecb;white-space:nowrap;font-weight:500}

.job-steps li{flex-wrap:wrap}.step-frame-button{position:relative;flex-basis:100%;margin:4px 0 4px 17px;padding:0;border:1px solid #dfe4f7;border-radius:8px;background:#fff;overflow:hidden;width:168px;line-height:0}.step-frame{width:100%;height:auto;display:block;background:#eef1fa}.step-frame-count{position:absolute;right:5px;bottom:5px;background:#1f2a4bcc;color:#fff;border-radius:6px;font-size:9px;line-height:1;padding:3px 5px;font-weight:700}
.step-previews{margin:16px 0;border:1px solid var(--line2);border-radius:11px;background:#fcfcfe}.step-previews summary{padding:12px 14px;cursor:pointer;font-size:12px;font-weight:720;color:#52607b}.step-previews-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;padding:0 14px 14px}.step-preview{margin:0}.step-preview .step-frame-button{margin:0;width:100%}.step-preview figcaption{font-size:10px;color:#8490a7;margin-top:6px;line-height:1.4;overflow-wrap:anywhere}
