:root{--bg:#f8fbff;--surface:#fff;--surface-variant:#eef3fb;--outline:#d6deea;--outline-strong:#b8c4d6;--text:#111827;--muted:#667085;--primary:#0b57d0;--primary-hover:#0847ae;--primary-soft:#e7f0ff;--success:#16833b;--danger:#b42318;--shadow:0 18px 50px #1f29371a;--radius-lg:24px;--radius-md:18px;--radius-sm:12px}*{box-sizing:border-box}html{background:var(--bg);min-height:100%}body{color:var(--text);background:radial-gradient(circle at 10% 0%, #0b57d014, transparent 28rem), linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);margin:0;font-family:Inter,Roboto,Segoe UI,system-ui,-apple-system,BlinkMacSystemFont,sans-serif}button,textarea,input,select,a{font:inherit}button,a{-webkit-tap-highlight-color:transparent}.app-shell{width:min(1180px,100% - 32px);margin:0 auto;padding:32px 0 148px}.hero-row,.panel-heading,.button-row{align-items:center;display:flex}.hero-row{justify-content:space-between;gap:24px;margin-bottom:0}.mode-panel{border:1px solid var(--outline);box-shadow:var(--shadow);background:#ffffffe0;border-radius:999px;grid-template-columns:repeat(2,minmax(0,1fr)) auto;align-items:center;gap:10px;margin-top:18px;padding:10px;display:grid}.mode-button{color:#344054;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:999px;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-width:0;min-height:56px;padding:0 16px;font-weight:800;display:inline-flex}.mode-title-row{justify-content:center;align-items:center;gap:7px;min-width:0;line-height:1;display:inline-flex}.mode-title-row em{max-width:112px;color:var(--muted);text-overflow:ellipsis;white-space:nowrap;background:#6670851a;border-radius:999px;padding:2px 7px;font-size:.72rem;font-style:normal;font-weight:900;overflow:hidden}.mode-button strong{color:var(--muted);white-space:nowrap;font-size:.74rem;font-weight:800;line-height:1.05}.mode-button.selected{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}.mode-button.selected strong{color:var(--primary)}.mode-button.selected .mode-title-row em{color:var(--primary);background:#0b57d01f}.mode-button:disabled{cursor:not-allowed;opacity:.62}.mode-limit{min-height:40px;color:var(--primary);background:var(--primary-soft);white-space:nowrap;border-radius:999px;justify-content:center;align-items:center;padding:0 14px;font-size:.86rem;font-weight:900;display:inline-flex}.mode-limit.over{color:var(--danger);background:#b4231814}.local-worker-panel{border-radius:var(--radius-md);background:linear-gradient(#fff1f0f5,#fff7ede6);border:1px solid #b4231838;justify-content:space-between;align-items:center;gap:14px;margin-top:12px;padding:14px 16px;display:flex;box-shadow:0 14px 38px #b423181a}.local-worker-panel h2{color:#7a271a;margin:2px 0 0;font-size:1rem}.local-worker-hint{color:#8a3a2b;margin:4px 0 0;font-size:.82rem;font-weight:700}.local-worker-panel .section-label{color:#b42318}.local-worker-actions{flex-wrap:wrap;gap:8px;display:flex}.install-worker-button{color:#b42318;background:#fff;border-color:#b4231857;box-shadow:0 8px 22px #b423181a}.eyebrow,.section-label{color:var(--muted);letter-spacing:.08em;text-transform:uppercase;margin:0;font-size:.82rem;font-weight:700}h1,h2{letter-spacing:0;margin:0}h1{font-size:clamp(2rem,4vw,3.8rem);font-weight:800;line-height:1.02}h2{font-size:1.18rem;line-height:1.2}.tonal-button,.primary-button,.download-button{min-height:44px;color:var(--text);cursor:pointer;border:0;border-radius:999px;justify-content:center;align-items:center;gap:9px;padding:0 18px;text-decoration:none;transition:background .18s,border-color .18s,transform .18s,box-shadow .18s;display:inline-flex}.workspace-grid{grid-template-columns:1fr;gap:18px;min-width:0;margin-top:18px;display:grid}.tool-panel,.result-video-panel,.settings-panel{border:1px solid var(--outline);border-radius:var(--radius-lg);min-width:0;box-shadow:var(--shadow);background:#ffffffe0}.tool-panel{padding:20px}.panel-heading{justify-content:space-between;gap:16px;min-width:0;margin-bottom:16px}.panel-heading>*{min-width:0}.panel-heading.compact{margin-bottom:10px}.count-pill{color:var(--primary);background:var(--primary-soft);border-radius:999px;padding:7px 12px;font-size:.86rem;font-weight:800}.input-case-row{flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:12px;display:flex}.case-button{border:1px solid var(--outline);color:#344054;cursor:pointer;background:#fff;border-radius:999px;justify-content:center;align-items:center;gap:8px;min-height:36px;padding:0 13px;font-weight:800;display:inline-flex}.case-button:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}.sheet-editor{width:100%;min-width:0;height:var(--editor-height,430px);border:1px solid var(--outline);border-radius:var(--radius-md);min-height:0;color:var(--text);background:#fbfdff;outline:none;overflow:auto}.sheet-editor:focus-within{border-color:var(--primary);box-shadow:0 0 0 4px #0b57d01f}.sheet-grid{grid-template-columns:44px 44px minmax(130px,1fr) minmax(150px,1.08fr) minmax(130px,1fr) minmax(150px,1.08fr);min-width:100%;font-size:.95rem;display:grid}.sheet-header-cell,.sheet-row-number,.sheet-cell,.sheet-action-cell{border-right:1px solid var(--outline);border-bottom:1px solid var(--outline);min-width:0;min-height:38px}.sheet-header-cell{z-index:1;color:#344054;background:#eef4ff;align-items:center;padding:0 12px;font-size:.78rem;font-weight:800;display:flex;position:sticky;top:0}.sheet-header-cell.corner,.sheet-header-cell.action,.sheet-row-number,.sheet-action-cell{text-align:center;color:var(--muted);background:#f5f8fd;justify-content:center}.sheet-header-cell.corner,.sheet-row-number{z-index:2;position:sticky;left:0}.sheet-header-cell.corner{z-index:4}.sheet-header-cell.action,.sheet-action-cell{z-index:2;position:sticky;left:44px}.sheet-header-cell.action{z-index:4}.sheet-row{grid-column:1/-1;grid-template-columns:44px 44px minmax(130px,1fr) minmax(150px,1.08fr) minmax(130px,1fr) minmax(150px,1.08fr);display:grid}.sheet-row.selected .sheet-row-number{color:var(--primary);background:var(--primary-soft)}.sheet-row-number{place-items:center;font-size:.78rem;font-weight:700;display:grid}.sheet-cell{width:100%;color:var(--text);background:#fff;border-top:0;border-left:0;outline:none;padding:0 12px;font-size:.95rem}.sheet-cell:focus{z-index:2;box-shadow:inset 0 0 0 2px var(--primary);position:relative}.sheet-cell.selected,.sheet-cell:hover{background:#fbfdff}.sheet-action-cell{place-items:center;display:grid}.sheet-delete-row{width:28px;height:28px;color:var(--danger);cursor:pointer;background:0 0;border:0;border-radius:999px;place-items:center;display:grid}.sheet-delete-row:hover:not(:disabled){background:#b423181a}.sheet-delete-row:disabled{cursor:default;opacity:0}.input-settings{grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:12px;min-width:0;margin-top:14px;display:grid}.setting-card{border:1px solid var(--outline);border-radius:var(--radius-sm);background:#fff;grid-template-columns:repeat(2,minmax(130px,1fr));align-items:end;gap:12px;min-width:0;padding:14px 16px;display:grid}.setting-card h2{grid-column:1/-1;font-size:1.05rem}.duration-setting{grid-template-columns:repeat(2,minmax(76px,1fr))}.setting-card label{gap:6px;display:grid}.setting-card span{color:var(--muted);font-size:.78rem;font-weight:800}.setting-card select,.setting-card input{border:1px solid var(--outline);width:100%;min-height:42px;color:var(--text);background-color:#fbfdff;border-radius:12px;outline:none}.setting-card select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23111827' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:right 16px center;background-repeat:no-repeat;background-size:18px 18px;padding:0 44px 0 12px}.setting-card input{padding:0 34px 0 12px}.setting-card select:focus,.setting-card input:focus{border-color:var(--primary);box-shadow:0 0 0 4px #0b57d01f}.duration-input-field{display:block;position:relative}.duration-input-field>span{color:#344054;pointer-events:none;text-transform:none;font-size:.88rem;font-weight:800;line-height:1;position:absolute;top:50%;right:14px;transform:translateY(-50%)}.attention-field{animation:1.8s ease-in-out infinite requiredFieldPulse;border-color:#b423186b!important}@keyframes requiredFieldPulse{0%,to{box-shadow:0 0 #b4231829}50%{box-shadow:0 0 0 4px #b4231814}}.button-row{flex-wrap:wrap;gap:10px;margin-top:14px}.tonal-button{border:1px solid var(--outline);background:#f4f7fb}.tonal-button:hover{border-color:var(--outline-strong);background:#edf4ff}.tonal-button.danger{color:var(--danger)}.result-video-panel{margin-top:18px;padding:18px}.result-video{border:1px solid var(--outline);border-radius:var(--radius-md);background:#0f1720;width:100%;max-height:min(62vh,620px);display:block}.panel-heading.compact>span{color:var(--muted);font-size:.9rem;font-weight:800}.settings-panel{margin-top:18px;padding:18px}.settings-panel .input-settings{margin-top:0}.status-chip{color:#175cd3;align-items:center;gap:10px;min-height:52px;font-weight:800;display:inline-flex}.status-chip.done{color:var(--success)}.status-chip.error{color:var(--danger)}.status-dot{background:currentColor;border-radius:999px;width:20px;height:20px}.primary-button{background:var(--primary);color:#fff;min-height:56px;padding:0 30px;font-weight:800;box-shadow:0 12px 26px #0b57d047}.primary-button:hover:not(:disabled){background:var(--primary-hover);transform:translateY(-1px)}.primary-button:disabled,.download-button.disabled{cursor:not-allowed;opacity:.48;pointer-events:none}.download-button{border:1px solid var(--outline);background:#fff;min-height:56px;font-weight:800}.download-button.ready{border-color:var(--primary);color:var(--primary);background:#fff;box-shadow:0 10px 24px #0b57d01f}.download-button.attention{animation:1.35s ease-in-out infinite downloadPulse}.download-button:hover{border-color:var(--primary);color:var(--primary)}@keyframes downloadPulse{0%,to{box-shadow:0 0 #0b57d038,0 10px 24px #0b57d01f}50%{box-shadow:0 0 0 7px #0b57d014,0 16px 32px #0b57d038}}.progress-area{min-width:0;color:var(--muted);grid-column:1/-1;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;font-size:.92rem;display:grid}.progress-area strong{color:var(--text)}.progress-track{background:#e3e9f2;border-radius:999px;height:8px;overflow:hidden}.progress-fill{border-radius:inherit;background:var(--primary);height:100%;transition:width .22s}.progress-detail{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-width:0;display:grid}.progress-detail span{border:1px solid var(--outline);color:#344054;white-space:nowrap;background:#fbfdff;border-radius:999px;justify-content:center;align-items:center;min-height:38px;padding:0 12px;font-size:.88rem;font-weight:800;display:flex}.progress-modal-backdrop{z-index:40;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#0f172a57;place-items:center;padding:18px;display:grid;position:fixed;inset:0}.progress-modal{border:1px solid var(--outline);border-radius:var(--radius-lg);background:#fffffff5;gap:16px;width:min(640px,100%);padding:20px;display:grid;box-shadow:0 28px 80px #0f172a47}.progress-modal-header{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.icon-button{border:1px solid var(--outline);color:#344054;cursor:pointer;background:#fff;border-radius:999px;place-items:center;width:40px;height:40px;display:grid}.icon-button:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}.progress-modal-actions{flex-wrap:wrap;justify-content:flex-end;gap:10px;display:flex}.progress-modal-actions .tonal-button,.progress-modal-actions .download-button{min-height:48px}.bottom-action-bar{z-index:20;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:#ffffffe0;border:1px solid #d6deeae6;border-radius:999px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:min(680px,100% - 32px);padding:12px;display:grid;position:fixed;bottom:18px;left:50%;transform:translate(-50%);box-shadow:0 20px 60px #1f29372e}.bottom-action-bar .primary-button,.bottom-action-bar .download-button{width:100%}@media (max-width:860px){.app-shell{width:calc(100% - 22px);max-width:560px;padding:18px 0 132px;overflow-x:hidden}.hero-row{flex-direction:column;align-items:flex-start;gap:10px;margin-bottom:0}.mode-panel{border-radius:var(--radius-md);grid-template-columns:1fr 1fr}.mode-button{min-height:62px;padding:0 8px}.mode-button strong{white-space:normal;font-size:.68rem}.mode-title-row{gap:5px}.mode-title-row em{max-width:76px;padding:2px 5px;font-size:.66rem}.mode-limit{grid-column:1/-1}.local-worker-panel{flex-direction:column;align-items:stretch;padding:12px}.local-worker-actions{grid-template-columns:1fr 1fr;display:grid}h1{font-size:clamp(1.95rem,11vw,2.55rem)}.workspace-grid{grid-template-columns:1fr}.tool-panel{border-radius:var(--radius-md);padding:14px}.sheet-editor{height:var(--editor-mobile-height,330px);min-height:0}.sheet-grid,.sheet-row{grid-template-columns:38px 40px minmax(116px,1fr) minmax(132px,1fr) minmax(116px,1fr) minmax(132px,1fr)}.sheet-grid{min-width:610px;font-size:.88rem}.sheet-header-cell.action,.sheet-action-cell{left:38px}.sheet-header-cell,.sheet-row-number,.sheet-cell,.sheet-action-cell{min-height:36px}.sheet-cell{padding:0 10px;font-size:.88rem}.input-settings,.setting-card,.duration-setting{grid-template-columns:1fr}.setting-card{padding:12px}.result-video-panel,.settings-panel{border-radius:var(--radius-md);padding:14px}.result-video{max-height:52vh}.bottom-action-bar{border-radius:var(--radius-md);grid-template-columns:.9fr 1.1fr;gap:8px;width:calc(100% - 18px);padding:9px;bottom:10px}.bottom-action-bar .primary-button,.bottom-action-bar .download-button{white-space:nowrap;gap:7px;min-height:54px;padding:0 10px;font-size:.92rem}.status-chip{min-height:auto}.primary-button,.download-button{width:100%}.progress-detail{grid-template-columns:repeat(2,minmax(0,1fr))}.progress-detail span{border-radius:var(--radius-sm);white-space:normal;justify-content:flex-start}}
