:root{--bg: #f6f7fb;--panel: #ffffff;--card: #ffffff;--accent: #2f80ed;--text: #1f2a44;--muted: #5f6b85;--border: #d9deeb}*{box-sizing:border-box}*{scrollbar-width:thin;scrollbar-color:rgba(31,42,68,.25) transparent}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:#1f2a4447;border-radius:6px}*::-webkit-scrollbar-thumb:hover{background:#1f2a446b}body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--bg);color:var(--text);overflow:hidden;min-height:100vh}#root{min-height:100vh;height:100vh}.app{display:grid;grid-template-columns:320px 1fr;height:100vh;min-height:100vh}.sidebar{background:var(--panel);padding:20px;border-right:1px solid var(--border);display:flex;flex-direction:column;gap:12px;height:100vh;box-sizing:border-box}.sidebar-head{display:flex;align-items:center;justify-content:space-between;font-size:12px}.session-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;align-content:flex-start;gap:8px}.sidebar-footer{margin-top:auto;padding:10px 8px 0;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--muted)}.user-chip{display:flex;align-items:center;gap:8px;position:relative;padding:6px 8px;border-radius:12px;background:transparent;width:100%;justify-content:center;text-align:center;border:none;box-shadow:none;align-self:center;margin:0 auto;cursor:default}.avatar-circle{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;box-shadow:0 6px 16px #4f46e540}.user-name{font-weight:600;color:#1f2a44}.user-menu{display:none}.logout-btn,.logout-inline{padding:6px 12px;font-size:12px;border-radius:8px;border:1px solid var(--border);background:#fff;color:#1f2a44;cursor:pointer;transition:all .15s ease;width:auto;white-space:nowrap}.logout-btn:hover,.logout-inline:hover{background:#f5f7fb;transform:translateY(-1px)}.logout-btn:active,.logout-inline:active{transform:translateY(0)}.logout-floating{position:fixed;left:16px;bottom:32px;display:flex;align-items:center;justify-content:center;width:234px;background:transparent;border:none;padding:6px 8px;border-radius:12px;box-shadow:none;z-index:20;font-size:12px;color:var(--text)}.session-item{padding:10px 12px;border-radius:10px;background:#f1f4fa;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:6px;box-shadow:0 0 0 1px transparent;position:relative}.session-item.active{box-shadow:none;font-weight:700}.session-item .delete-btn{opacity:0;pointer-events:none}.session-item:hover .delete-btn{opacity:1;pointer-events:all}.session-meta{display:grid;gap:2px;min-width:0;flex:1}.single-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.main{padding:0 24px;display:flex;flex-direction:column;gap:16px;height:100vh;overflow:hidden;overflow-x:hidden}.header{display:flex;align-items:center;justify-content:space-between}.panel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}.card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px;box-shadow:0 6px 16px #1f2a4414}.label{display:block;color:var(--muted);font-size:13px;margin-bottom:6px}input[type=text],input[type=file],textarea,select{width:100%;padding:10px;background:#f6f8fd;border:1px solid var(--border);border-radius:8px;color:var(--text)}textarea{min-height:140px}button{background:var(--accent);color:#fff;border:1px solid transparent;border-radius:10px;padding:10px 14px;cursor:pointer;font-weight:600;transition:transform .08s ease,box-shadow .12s ease}.ghost{background:transparent;color:var(--text);border:1px solid var(--border)}button:disabled{opacity:.55;cursor:not-allowed}button:hover:not(:disabled){transform:translateY(-1px)}.flex{display:flex;gap:10px;align-items:center}.status{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:10px;background:#2f80ed14;border:1px solid rgba(47,128,237,.35);color:var(--text);font-size:13px}.small{font-size:12px;color:var(--muted)}.title{font-weight:700}.panel{min-height:120px}.chat-area{display:grid;gap:12px;flex:1;margin-top:0;min-height:0;overflow-y:auto}.stage-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 6px 4px;position:sticky;top:0;z-index:5;margin-top:0}.stage-svg{width:100%;height:80px}.stage-label{font-size:11px;dominant-baseline:hanging}.icon-btn{display:inline-flex;align-items:center;gap:6px}.icon-only{display:inline-flex;align-items:center;justify-content:center;padding:6px;width:32px;height:32px;background:transparent;border:none!important;border-radius:10px;color:var(--text);transition:background .12s ease,transform .08s ease;position:relative}.icon-only:hover:not(:disabled){background:#eef2fb;transform:translateY(-1px)}.icon-only:active:not(:disabled){transform:translateY(0)}.icon-only svg{width:18px;height:18px}.icon-only[data-tooltip]:after{content:attr(data-tooltip);position:absolute;bottom:-30px;left:50%;transform:translate(-50%);background:#1f2a44e6;color:#fff;padding:4px 8px;border-radius:6px;font-size:12px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s ease,transform .12s ease}.icon-only[data-tooltip]:hover:after{opacity:1;transform:translate(-50%,-2px)}.bubble{padding:12px;border-radius:12px;background:#f9fbff;border:1px solid var(--border);white-space:pre-wrap}.bubble-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.bubble-actions{display:flex;gap:8px;margin-top:10px}.icon-accepted{color:#2f9e44}.icon-danger{color:#d64545}.icon-muted{color:var(--muted)}.icon-rejected{color:#d64545;opacity:.6;pointer-events:none}.outline-list{display:grid;gap:10px}.outline-card{padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:#f9fbff;font-size:14px}.bullet-list{padding-left:18px;margin:6px 0 0}.slides-list{display:grid;gap:8px}.slide-card{padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:#f9fbff}.input-bar textarea{width:100%}.input-bar{position:sticky;bottom:0;z-index:4;background:var(--card);margin-top:auto;padding-bottom:0}.stage-bar,.chat-area,.input-bar{width:min(1200px,100%);margin:0 auto}.toast{background:#2f80ed14;border:1px solid rgba(47,128,237,.35);padding:10px 12px;border-radius:10px;color:var(--text);white-space:pre-wrap}.landing{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:40px;background:var(--bg)}.landing-card{max-width:480px;text-align:center}.markdown{line-height:1.35;white-space:normal}.markdown p{margin:6px 0}.markdown ul,.markdown ol{padding-left:18px;margin:0}.markdown li{margin:0;padding:0;line-height:1.6;list-style-position:outside}.markdown li+li{margin-top:6px}.markdown li p{margin:0;line-height:1.6}.markdown li *{margin:0;padding:0;line-height:1.6}.summary-text{font-size:15px}.outline-title{font-size:16px}.outline-card .small{font-size:14px}.history-card{border-style:dashed}.history-list{display:grid;gap:10px}.history-item{padding:8px 0;border-top:1px solid var(--border)}.history-content{display:grid;gap:6px}.script-preview{display:grid;gap:4px}.script-line{line-height:1.4}.script-line strong{margin-right:6px}.script-blocks{display:grid;gap:10px}.script-section{border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:#f9fbff}.script-lines{display:grid;gap:8px;margin-top:8px}.script-line-row{display:grid;grid-template-columns:70px 1fr;gap:8px}.script-speaker{font-weight:700;color:var(--text)}.script-text{color:var(--text);line-height:1.5}.line-meta{display:flex;align-items:center;gap:6px}.line-index{font-size:12px;color:var(--muted);background:#eef2fb;border-radius:999px}.merged-script-line{align-items:center}.slide-script-view{display:grid;gap:12px;margin-top:8px}.slide-script-view.compact{gap:8px;margin-top:6px}.slide-insert{border:1px solid var(--border);border-radius:10px;padding:8px 10px;background:#f9fbff}.slide-image{width:100%;margin-top:6px;border-radius:8px;border:1px solid var(--border);background:#fff}.slide-image.placeholder{display:grid;place-items:center;color:var(--muted);height:180px;font-size:13px}.slide-prompt{margin-top:6px;line-height:1.4}.slide-preview-blocks{display:grid;gap:10px}.loading-dots{display:inline-flex;gap:4px}.loading-dots span{width:6px;height:6px;background:var(--muted);border-radius:50%;animation:bounce 1s infinite ease-in-out}.loading-dots span:nth-child(2){animation-delay:.15s}.loading-dots span:nth-child(3){animation-delay:.3s}@keyframes bounce{0%,80%,to{transform:scale(.8);opacity:.6}40%{transform:scale(1);opacity:1}}.user-msg{padding:8px 10px;border-radius:10px;background:#f6f8fd;border:1px solid var(--border)}.user-msg-content{white-space:pre-wrap;color:var(--text)}.podcast-pane{display:flex;flex-direction:column;gap:12px;height:100%;flex:1;overflow:hidden}.podcast-body{display:grid;grid-template-columns:260px 1fr;gap:14px;height:100%;min-height:0}.history-pane{background:#fff;border:1px solid #e4e7f0;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px;min-height:0;box-shadow:0 12px 32px #0000000d}.history-header{display:flex;align-items:center;justify-content:space-between;font-weight:600;position:sticky;top:0;background:#fff;padding-bottom:6px;border-bottom:1px solid #eef1f8;z-index:2}.history-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding-top:16px;scroll-padding-top:16px}.history-item{padding:10px;border:1px solid #e7ebf5;border-radius:10px;background:#f9fbff;display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;transition:box-shadow .12s ease,transform .08s ease,border-color .12s ease}.history-item:hover{box-shadow:0 8px 20px #1f2a4414;border-color:#d5ddf0;transform:translateY(-1px)}.history-title{font-size:14px;color:#1f2a44;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.podcast-main{background:#fff;border:1px solid #e4e7f0;border-radius:12px;box-shadow:0 12px 32px #0000000d;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;position:relative;min-width:0}.podcast-header{position:sticky;top:0;z-index:5;background:#fff;padding:12px;border-bottom:1px solid #eef1f8}.podcast-status{border:1px solid #dfe3ef;border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:10px;background:#f9fbff}.status-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.status-text{font-weight:700;display:flex;align-items:center;gap:10px;flex:1;min-width:0}.status-actions{display:flex;gap:8px;flex-wrap:wrap;position:relative}.progress-row{display:flex;align-items:center;gap:8px}.progress-row.inline{align-items:center;width:100%}.progress-row.inline .progress-bar{flex:1}.progress-row.inline .label{min-width:64px}.progress-stack{display:grid;gap:6px;width:100%}.progress-row .label{min-width:72px;color:#666}.podcast-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px;justify-content:center}.segments-wrapper{flex:1;min-height:0;padding:12px;overflow-x:auto;overflow-y:auto}.segments-table{width:100%;border-collapse:collapse;background:#fff;box-shadow:0 8px 18px #1f2a440d;table-layout:fixed}.segments-table th,.segments-table td{border:1px solid #e4e7f0;padding:8px;vertical-align:top;text-align:center;background:#fff}.segments-table textarea{width:100%;min-height:64px;resize:vertical}.segments-table select{width:140px;max-width:100%;text-overflow:ellipsis}.segments-table .mismatch td{background:#ffe1e1;color:#b00000}.segments-table .playing{outline:2px solid #2f9e44}.status-cell{display:flex;flex-direction:column;gap:4px;font-size:13px}.progress-bar{width:100%;height:6px;background:#eef1f8;border-radius:4px;overflow:hidden}.progress-bar-fill{height:100%;background:linear-gradient(90deg,#2f9e44,#52c41a)}.progress-bar.large{height:12px;background:#e8f5e9}.status-cell .error{color:#c00;font-size:12px}.actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px;justify-content:center;align-items:center}.generate-menu{position:relative;display:inline-block}.generate-menu-list{position:absolute;top:calc(100% + 6px);right:0;z-index:10;background:#fff;border:1px solid #e4e7f0;border-radius:10px;box-shadow:0 8px 18px #1f2a441f;min-width:220px;padding:8px;display:grid;gap:8px}.generate-menu-list .menu-item{display:grid;gap:4px;padding:10px;border-radius:10px;border:1px solid transparent;cursor:pointer;background:#f8faff}.generate-menu-list .menu-item:hover{background:#eef3ff;border-color:#dfe6f7}.generate-menu-list .menu-item.disabled{opacity:.5;cursor:not-allowed;background:#f5f5f5}.generate-menu-list .menu-title{font-weight:700;color:#1f2a44}.generate-menu-list .menu-desc{font-size:12px;color:#6b748a}.audio-bar{position:sticky;bottom:0;z-index:8;background:#fff;border-top:1px solid #e4e7f0;padding:10px 14px;display:grid;gap:8px;grid-template-columns:1fr;box-shadow:0 -8px 18px #1f2a4414;width:100%}.audio-controls{display:flex;align-items:center;gap:8px}.speed-buttons{display:flex;gap:6px}.chip{padding:6px 10px;border-radius:12px;border:1px solid #c9d6ff;background:#e9f1ff;color:#1f2a44;cursor:pointer}.chip.active{background:#2f80ed;border-color:#2f80ed;color:#fff;font-weight:700}.audio-progress{display:grid;gap:4px}.audio-progress input[type=range]{width:100%}.time-labels{display:flex;justify-content:space-between;font-size:12px;color:#6b748a}.icon-btn{background:none;border:none;padding:4px;cursor:pointer;color:#1f2a44;position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;transition:background .12s ease,transform .08s ease}.icon-btn:hover{color:#000;background:#eef2fb;transform:translateY(-1px)}.icon-btn:after{content:attr(data-tooltip);position:absolute;bottom:-26px;left:50%;transform:translate(-50%);background:#1f2a44;color:#fff;padding:4px 6px;border-radius:4px;white-space:nowrap;font-size:12px;opacity:0;pointer-events:none;transition:opacity .15s ease,transform .15s ease}.icon-btn:hover:after{opacity:1;transform:translate(-50%) translateY(-2px)}.file-drop{width:100%;border:2px dashed #c9d2e8;border-radius:12px;padding:24px;text-align:center;color:#4a5672;background:#f9fbff;cursor:pointer;transition:border-color .12s ease,box-shadow .12s ease,transform .08s ease}.file-drop:hover{border-color:#2f80ed;box-shadow:0 8px 20px #2f80ed1f;transform:translateY(-1px)}.file-drop-title{font-weight:700;font-size:16px;margin-bottom:6px}.file-drop-desc{color:#6b748a;font-size:13px}.app-shell{min-height:100vh;height:100vh;padding:16px;background:var(--bg);display:flex;flex-direction:column;overflow:hidden}.login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f2f5ff,#e4ecff,#f7f7ff)}.login-card{background:#fff;padding:32px;border-radius:16px;box-shadow:0 12px 40px #2c3e501f;width:320px;display:flex;flex-direction:column;gap:16px}.login-card h1{margin:0 0 8px;font-size:22px;color:#1f2937}.login-card label{display:flex;flex-direction:column;gap:6px;font-size:14px;color:#374151}.login-card input{padding:10px 12px;border-radius:10px;border:1px solid #d1d5db;font-size:14px;transition:border-color .2s,box-shadow .2s}.login-card input:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 3px #4f46e526}.login-error{color:#b91c1c;font-size:13px}.login-card button{margin-top:8px;padding:12px;border:none;border-radius:10px;background:linear-gradient(120deg,#4f46e5,#7c3aed);color:#fff;font-size:15px;font-weight:600;cursor:pointer;box-shadow:0 10px 25px #4f46e540;transition:transform .2s ease,box-shadow .2s ease}.login-card button:hover{transform:translateY(-1px);box-shadow:0 12px 28px #4f46e54d}.login-card button:active{transform:translateY(0);box-shadow:0 6px 18px #4f46e540}.log{border:1px solid #ddd;border-radius:8px;padding:8px}.log-content{max-height:200px;overflow:auto;font-family:monospace;font-size:12px}
