:root{--bg: #f7f8fa;--panel: #ffffff;--surface: #fbfcfd;--text: #111827;--muted: #6b7280;--muted-strong: #4b5563;--line: #e5e7eb;--line-strong: #d1d5db;--accent: #4f63d8;--accent-dark: #3949b4;--accent-soft: #f0f3ff;--success: #197a45;--success-soft: #eaf7ef;--danger: #b42318;--danger-soft: #fff1f0;--shadow: 0 18px 50px rgba(17, 24, 39, .07);--shadow-soft: 0 8px 24px rgba(17, 24, 39, .05);font-family:system-ui,-apple-system,BlinkMacSystemFont,Inter,Segoe UI,sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:var(--bg);font-size:15px;font-weight:400;line-height:1.45}button,select,textarea,input{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid rgba(79,99,216,.18);outline-offset:2px}.app-shell{display:grid;grid-template-rows:auto minmax(0,1fr);gap:24px;min-height:100vh;padding:28px}.topbar,.workspace{width:min(1720px,100%);margin:0 auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:18px}.topbar h1,.auth-panel h1{margin:0;font-size:2rem;font-weight:600;letter-spacing:0;line-height:1.05}.topbar p{margin:5px 0 0;color:var(--muted);font-size:.86rem}.topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.account-menu{position:relative;display:inline-flex}.account-avatar{display:inline-grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--panel);color:var(--text);font-size:.9rem;font-weight:500;text-transform:uppercase}.account-avatar:hover{border-color:var(--line-strong);background:var(--surface)}.account-popover{position:absolute;top:calc(100% + 8px);right:0;z-index:15;display:grid;gap:3px;min-width:190px;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--panel);box-shadow:var(--shadow-soft)}.account-name{overflow:hidden;padding:8px 10px 6px;color:var(--muted);font-size:.78rem;text-overflow:ellipsis;white-space:nowrap}.account-popover a,.account-popover button{display:flex;align-items:center;min-height:34px;width:100%;padding:0 10px;border:0;border-radius:9px;background:transparent;color:var(--muted-strong);font-size:.88rem;text-align:left;text-decoration:none}.account-popover a:hover,.account-popover button:hover{background:var(--surface);color:var(--text)}.workspace{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,860px) minmax(260px,340px);align-items:start;justify-content:center;gap:18px;min-height:0}.source-workspace{display:grid;gap:14px;min-width:0}.upload-panel,.transcript-panel,.jobs-panel,.settings-modal,.history-modal,.auth-panel{border:1px solid var(--line);border-radius:16px;background:var(--panel)}.upload-panel,.transcript-panel,.auth-panel{box-shadow:var(--shadow)}.upload-panel{display:grid;grid-template-columns:1fr;gap:12px;align-items:stretch;padding:12px}.source-panel{display:grid;gap:8px;min-width:0}.source-tabs{display:inline-flex;justify-self:start;gap:3px;padding:3px;border:1px solid var(--line);border-radius:12px;background:#f1f3f6}.source-tabs button{min-height:30px;padding:0 12px;border:0;border-radius:9px;background:transparent;color:var(--muted-strong);font-size:.86rem;font-weight:400}.source-tabs button.active{background:#fff;color:var(--text);box-shadow:0 1px 5px #1118271a}.drop-zone{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;min-width:0;min-height:68px;padding:12px 14px;border:1px dashed var(--line-strong);border-radius:12px;background:var(--surface);color:var(--text);transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.drop-zone>svg{width:34px;height:34px;padding:7px;border-radius:10px;background:#f0f2f5;color:var(--muted-strong)}.drop-zone:hover{border-color:#4f63d873;background:#fff}.drop-zone.dragging,.drop-zone.has-file{border-color:#4f63d89e;background:var(--accent-soft)}.drop-zone input{display:none}.drop-zone strong,.drop-zone span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.drop-zone strong{font-size:.98rem;font-weight:500}.drop-zone span{margin-top:2px;color:var(--muted);font-size:.86rem}.link-zone{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;min-width:0;min-height:68px;padding:12px 14px;border:1px dashed var(--line-strong);border-radius:12px;background:var(--surface)}.link-zone>svg{width:34px;height:34px;padding:7px;border-radius:10px;background:#f0f2f5;color:var(--muted-strong)}.link-input-group{display:grid;gap:8px;min-width:0}.link-input-group input[type=url]{width:100%;min-height:32px;min-width:0;border:0;background:transparent;color:var(--text);font-size:.94rem;outline:none}.link-input-group input[type=url]::placeholder{color:#9ca3af}.source-option-toggle{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:.82rem}.source-option-toggle input{width:14px;height:14px;accent-color:var(--accent)}.quality-select{display:grid;gap:5px;max-width:260px}.quality-select span{color:var(--muted);font-size:.78rem}.quality-select select{min-height:34px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);font-size:.88rem}.upload-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.settings-summary{min-height:40px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--muted-strong);font-size:.86rem}.settings-summary:hover{border-color:var(--line-strong);background:var(--surface)}.primary-button,.copy-button,.icon-button,.model-download,.delete-job,.primary-link{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;text-decoration:none}.primary-button{min-width:124px;min-height:44px;border:0;padding:0 16px;background:var(--accent);color:#fff;font-size:.94rem;font-weight:500;box-shadow:0 10px 24px #4f63d833}.primary-button:hover:not(:disabled),.primary-link:hover{background:var(--accent-dark)}.copy-button,.icon-button,.model-download,.delete-job{border:1px solid var(--line);background:var(--panel);color:var(--muted-strong)}.copy-button:hover:not(:disabled),.icon-button:hover:not(:disabled),.model-download:hover:not(:disabled){border-color:var(--line-strong);background:var(--surface);color:var(--text)}.copy-button{min-height:38px;padding:0 12px;font-size:.88rem;font-weight:400}.icon-button{width:38px;height:38px;padding:0}.icon-button.subtle{background:transparent}.status-strip{display:inline-flex;align-items:center;justify-self:start;gap:8px;min-height:34px;padding:0 12px;border:1px solid #c8ead5;border-radius:12px;background:var(--success-soft);color:var(--success);font-size:.86rem;font-weight:400}.status-strip.error,.inline-error{border-color:#f4c7c2;background:var(--danger-soft);color:var(--danger)}.status-strip-dot{width:7px;height:7px;border-radius:999px;background:currentColor}.transcript-panel{display:grid;grid-template-rows:auto auto auto minmax(0,1fr);min-height:min(660px,calc(100vh - 190px));overflow:hidden}.transcript-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;min-width:0;padding:20px 24px 16px;border-bottom:1px solid var(--line)}.transcript-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.heading-row{display:flex;align-items:center;gap:10px;min-width:0}.transcript-title{min-width:0}.transcript-title h2,.recent-heading h2,.settings-section h3{margin:0;color:var(--text);font-size:1.04rem;font-weight:500;line-height:1.2}.transcript-title p{margin:6px 0 0;max-width:720px;overflow:hidden;color:var(--muted);font-size:.84rem;font-weight:400;text-overflow:ellipsis;white-space:nowrap}.progress-block{display:grid;gap:7px;padding:12px 24px 0}.progress-line{height:5px;overflow:hidden;border-radius:999px;background:#eef1f5}.progress-line span{display:block;height:100%;border-radius:inherit;min-width:8px;background:var(--accent)}.progress-meta{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:.8rem}.inline-error{margin:14px 24px 0;padding:10px 12px;border:1px solid #f4c7c2;border-radius:12px;font-size:.88rem}.transcript-document{width:min(100%,860px);min-width:0;min-height:480px;height:100%;margin:0 auto;resize:none;border:0;padding:28px 32px 34px;color:var(--text);background:transparent;font-size:1.02rem;font-weight:400;line-height:1.74}.transcript-document:focus{outline:none}.jobs-panel{display:grid;grid-template-rows:auto minmax(0,1fr);gap:8px;align-self:start;position:sticky;top:20px;max-height:calc(100vh - 112px);padding:14px;background:#ffffffb8;box-shadow:none}.recent-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 8px}.recent-heading h2{font-size:.98rem}.recent-heading span,.settings-header p,.settings-section-heading p{color:var(--muted);font-size:.82rem;font-weight:400}.job-list{display:grid;align-content:start;gap:2px;min-height:0;overflow:auto}.job-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:4px;min-width:0;min-height:46px;padding:4px 34px 5px 4px;border:1px solid transparent;border-radius:12px}.job-card:hover,.job-card.active{background:var(--surface)}.job-card.active{border-color:#4f63d840;background:var(--accent-soft)}.job-select{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;width:100%;border:0;border-radius:10px;background:transparent;color:inherit;text-align:left}.job-file-icon{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:8px;background:#f0f2f5;color:var(--muted-strong)}.job-main{display:grid;min-width:0;gap:1px}.job-main strong{overflow:hidden;color:var(--text);font-size:.84rem;font-weight:500;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.job-main span{overflow:hidden;color:var(--muted);font-size:.76rem;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.delete-job{position:absolute;top:50%;right:5px;width:28px;height:28px;padding:0;border-color:transparent;background:transparent;color:var(--muted);opacity:0;transform:translateY(-50%);transition:opacity .15s ease,background .15s ease,color .15s ease}.job-card:hover .delete-job,.job-card:focus-within .delete-job{opacity:1}.delete-job:hover{border-color:#f4c7c2;background:var(--danger-soft);color:var(--danger)}.job-progress{grid-column:1 / -1;height:3px;margin:0 4px 1px 34px;overflow:hidden;border-radius:999px;background:#eef1f5}.job-progress span{display:block;height:100%;min-width:4px;border-radius:inherit;background:var(--accent)}.pill{display:inline-flex;align-items:center;justify-content:center;min-width:52px;min-height:20px;padding:0 7px;border-radius:999px;background:#eef0f3;color:var(--muted-strong);font-size:.68rem;font-weight:500;line-height:1}.pill.ready,.pill.completed{background:var(--success-soft);color:var(--success)}.pill.downloading,.pill.running,.pill.queued{background:var(--accent-soft);color:var(--accent-dark)}.pill.failed{background:var(--danger-soft);color:var(--danger)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:flex;justify-content:flex-end;background:#11182733;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.settings-modal{display:grid;grid-template-rows:auto auto;gap:18px;width:min(440px,calc(100vw - 24px));height:calc(100vh - 24px);margin:12px;padding:18px;overflow:auto;box-shadow:0 24px 70px #11182733}.history-modal{display:grid;grid-template-rows:auto minmax(0,1fr);gap:14px;width:min(430px,calc(100vw - 24px));height:calc(100vh - 24px);margin:12px;padding:18px;overflow:hidden;box-shadow:0 24px 70px #11182733}.history-list{min-height:0;overflow:auto}.settings-header,.settings-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.settings-header h2{margin:0;font-size:1.16rem;font-weight:600}.settings-header p,.settings-section-heading p{margin:4px 0 0}.settings-section{display:grid;gap:12px}.settings-section h3{font-size:.98rem}.settings-model-list{display:grid;gap:6px}.settings-model-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;min-height:58px;padding:8px;border:1px solid transparent;border-radius:12px}.settings-model-row:hover,.settings-model-row.active{background:var(--surface)}.settings-model-row.active{border-color:#4f63d847;background:var(--accent-soft)}.settings-model-choice{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;min-width:0;border:0;background:transparent;color:inherit;text-align:left}.model-main{display:grid;min-width:0;gap:2px}.model-main strong{overflow:hidden;color:var(--text);font-size:.9rem;font-weight:500;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.model-main span,.model-main em{overflow-wrap:anywhere;color:var(--muted);font-size:.8rem;font-style:normal;line-height:1.28}.model-main em{color:var(--danger)}.status-dot{width:8px;height:8px;border-radius:50%;background:#9ca3af;box-shadow:0 0 0 4px #9ca3af1f}.status-dot.ready{background:#22a965;box-shadow:0 0 0 4px #22a9651f}.status-dot.downloading{background:var(--accent);box-shadow:0 0 0 4px #4f63d81f}.status-dot.failed{background:var(--danger);box-shadow:0 0 0 4px #b423181f}.model-download{width:30px;height:30px;padding:0}.segmented-control{display:flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:12px;background:#f1f3f6}.segmented-control.wide{width:100%}.segmented-control button{flex:1 1 0;min-height:36px;border:0;border-radius:9px;background:transparent;color:var(--muted-strong);font-size:.9rem;font-weight:400}.segmented-control button.active{background:#fff;color:var(--text);box-shadow:0 1px 5px #1118271f}.empty-state{display:grid;place-items:center;min-height:96px;border:1px dashed var(--line-strong);border-radius:12px;color:var(--muted);font-size:.9rem}.auth-shell{display:grid;place-items:center;min-height:100vh;padding:20px}.auth-panel{width:min(420px,100%);padding:24px;text-align:center}.auth-panel p{color:var(--muted)}.primary-link{min-height:44px;padding:0 16px;background:var(--accent);color:#fff;font-weight:500}.spin{animation:spin .85s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 1180px){.workspace{grid-template-columns:minmax(0,980px)}.jobs-panel{position:static;max-height:280px}}@media (max-width: 760px){.app-shell{padding:16px;gap:16px}.topbar{align-items:flex-start;flex-direction:column}.topbar h1{font-size:1.75rem}.topbar-actions{width:100%;justify-content:flex-end}.upload-panel,.upload-actions{grid-template-columns:1fr;flex-direction:column}.upload-actions{align-items:stretch}.settings-summary,.primary-button{width:100%}.transcript-panel{min-height:560px}.transcript-heading{flex-direction:column;padding:18px}.copy-button{width:100%}.transcript-actions{width:100%;flex-direction:column}.transcript-title p{white-space:normal}.transcript-document{min-height:400px;padding:22px 18px 28px}.settings-modal,.history-modal{width:calc(100vw - 16px);height:calc(100vh - 16px);margin:8px;padding:16px;border-radius:16px}.settings-model-row{grid-template-columns:minmax(0,1fr) auto}.settings-model-row .model-download{grid-column:2}}
