:root{
  --bg:#0b0e14;
  --panel:#121722;
  --panel2:#171e2b;
  --border:#273044;
  --text:#f6f7fb;
  --muted:#9aa6bb;
  --gold:#e4b85b;
  --gold2:#ffcf70;
  --green:#42d392;
  --red:#ff6b78;
  --shadow:0 18px 50px rgba(0,0,0,.30);
}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(circle at top right,#182033 0,#0b0e14 36%,#080a0e 100%);color:var(--text);font:15px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh}
button,input,select{font:inherit}
button,a{transition:.2s ease}
.app-shell{min-height:100vh}
.topbar{height:78px;padding:0 max(24px,calc((100vw - 1180px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.06);background:rgba(8,10,14,.76);backdrop-filter:blur(18px);position:sticky;top:0;z-index:20}
.brand{display:flex;align-items:center;gap:13px}.brand-mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,var(--gold2),#9f7022);display:grid;place-items:center;color:#1a1408;font-weight:900;box-shadow:0 8px 24px rgba(228,184,91,.22)}
h1{font-size:18px;margin:0;letter-spacing:.2px}.brand p{margin:2px 0 0;color:var(--muted);font-size:12px}.status-pill{border:1px solid var(--border);border-radius:999px;padding:8px 12px;color:var(--muted);display:flex;align-items:center;gap:8px;font-size:12px;background:#0e131c}.dot{width:8px;height:8px;border-radius:50%;background:#6b7280}.status-pill.ready .dot{background:var(--green);box-shadow:0 0 0 4px rgba(66,211,146,.09)}
.workspace{width:min(1180px,calc(100% - 32px));margin:28px auto 50px;display:grid;gap:18px}.hero-card{display:flex;justify-content:space-between;align-items:end;gap:24px;padding:30px 32px;border:1px solid rgba(228,184,91,.25);background:linear-gradient(120deg,rgba(228,184,91,.10),rgba(18,23,34,.65) 45%,rgba(18,23,34,.92));border-radius:22px;box-shadow:var(--shadow)}.eyebrow{color:var(--gold2);font-size:11px;font-weight:800;letter-spacing:1.5px}.hero-card h2{font-size:34px;line-height:1.08;margin:8px 0 10px;max-width:680px}.hero-card p{color:var(--muted);margin:0;max-width:760px}.privacy-badge{white-space:nowrap;background:rgba(66,211,146,.1);color:#8ce9bd;border:1px solid rgba(66,211,146,.25);border-radius:999px;padding:10px 14px;font-size:12px;font-weight:700}
.panel{background:rgba(18,23,34,.92);border:1px solid var(--border);border-radius:20px;padding:24px;box-shadow:0 10px 30px rgba(0,0,0,.14)}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.section-head>div{display:flex;align-items:center;gap:10px}.step{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:rgba(228,184,91,.12);color:var(--gold2);font-size:11px;font-weight:900}.section-head h3{margin:0;font-size:17px}.ghost-btn{border:1px solid var(--border);background:transparent;color:var(--muted);padding:8px 12px;border-radius:10px;cursor:pointer}.ghost-btn:hover{color:#fff;border-color:#4b5872}
.dropzone{min-height:190px;border:1.5px dashed #38445e;border-radius:16px;background:#0d121b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;color:var(--muted)}.dropzone.drag{border-color:var(--gold);background:rgba(228,184,91,.06)}.dropzone strong{color:#fff;font-size:17px}.dropzone small{margin-top:9px;color:#6f7b91}.upload-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:rgba(228,184,91,.12);color:var(--gold2);font-size:26px;margin-bottom:5px}.file-card{display:flex;align-items:center;gap:14px;padding:14px 16px;background:#0d121b;border:1px solid var(--border);border-radius:14px}.file-icon{width:42px;height:42px;border-radius:11px;background:rgba(228,184,91,.11);color:var(--gold2);display:grid;place-items:center;font-size:20px}.file-main{min-width:0;display:flex;flex-direction:column;flex:1}.file-main strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-main span,.file-duration{font-size:12px;color:var(--muted)}.media-box{margin-top:14px;background:#090d13;border-radius:14px;padding:10px;border:1px solid #20293a}.media-box audio,.media-box video{display:block;width:100%;max-height:360px;border-radius:10px}
.stats-grid{display:grid;grid-template-columns:1.3fr 1.1fr .8fr .9fr;gap:12px}.stat-card{background:#0d121b;border:1px solid var(--border);border-radius:14px;padding:13px 14px;display:flex;flex-direction:column;gap:7px}.stat-card>span,.export-grid label>span{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.7px}.stat-card input,.export-grid select{width:100%;height:40px;border:1px solid #303a4f;border-radius:9px;background:#111824;color:#fff;padding:0 10px;outline:none}.stat-card input:focus,.export-grid select:focus{border-color:var(--gold)}.stat-card strong{font-size:23px}.stat-card.emphasis{border-color:rgba(228,184,91,.35);background:linear-gradient(145deg,rgba(228,184,91,.08),#0d121b)}.stat-card.emphasis strong{color:var(--gold2)}.input-with-action{display:flex;gap:7px}.input-with-action button{border:1px solid #34405a;border-radius:9px;background:#171f2d;color:#c8d0de;padding:0 11px;cursor:pointer}.input-with-action button:hover{border-color:var(--gold);color:var(--gold2)}
.tempo-block{margin-top:22px;padding:18px;background:#0d121b;border:1px solid var(--border);border-radius:15px}.slider-labels{display:flex;justify-content:space-between;color:#6f7b91;font-size:10px;margin-bottom:2px}input[type=range]{width:100%;accent-color:var(--gold);cursor:pointer}.preset-row{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:14px}.preset-row button{background:#131a26;color:var(--muted);border:1px solid #2c3548;padding:9px 7px;border-radius:9px;cursor:pointer;font-size:12px}.preset-row button:hover,.preset-row button.active{color:#191307;background:var(--gold2);border-color:var(--gold2);font-weight:800}
.options-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.toggle-row{position:relative;display:flex;align-items:center;gap:14px;background:#0d121b;border:1px solid var(--border);border-radius:14px;padding:15px;cursor:pointer}.toggle-row>div{display:flex;flex:1;flex-direction:column}.toggle-row strong{font-size:13px}.toggle-row span{color:var(--muted);font-size:11px}.toggle-row input{position:absolute;opacity:0}.toggle-row i{width:42px;height:24px;border-radius:20px;background:#30394b;position:relative;flex:none}.toggle-row i:after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;top:3px;left:3px;transition:.2s}.toggle-row input:checked+i{background:var(--gold)}.toggle-row input:checked+i:after{left:21px}.preview-actions{display:flex;align-items:center;gap:12px;margin-top:16px}.secondary-btn,.primary-btn,.download-btn{border-radius:11px;padding:11px 16px;font-weight:800;cursor:pointer;text-decoration:none}.secondary-btn{border:1px solid #35405a;background:#151d2a;color:#fff}.secondary-btn:disabled,.primary-btn:disabled{opacity:.42;cursor:not-allowed}.preview-actions span{font-size:11px;color:var(--muted)}
.export-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;align-items:end}.export-grid label{display:flex;flex-direction:column;gap:7px}.primary-btn{height:40px;border:0;background:linear-gradient(135deg,var(--gold2),#b37c24);color:#1a1408;box-shadow:0 8px 20px rgba(228,184,91,.16)}.primary-btn:not(:disabled):hover{transform:translateY(-1px);filter:brightness(1.05)}.progress-area{margin-top:18px;padding:15px;background:#0c1119;border-radius:14px;border:1px solid var(--border)}.progress-copy{display:flex;justify-content:space-between;margin-bottom:8px}.progress-copy span,.progress-area small{color:var(--muted);font-size:11px}.progress-track{height:8px;background:#242c3b;border-radius:99px;overflow:hidden}.progress-bar{height:100%;width:0;background:linear-gradient(90deg,#a97729,var(--gold2));border-radius:99px;transition:width .2s}.result-card{margin-top:15px;display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border:1px solid rgba(66,211,146,.25);background:rgba(66,211,146,.07);border-radius:14px}.result-card>div{display:flex;align-items:center;gap:11px}.result-card>div>div{display:flex;flex-direction:column}.result-card span{color:#9fceb8;font-size:11px}.success-icon{width:34px;height:34px;border-radius:10px;background:rgba(66,211,146,.16);display:grid;place-items:center;color:var(--green)!important;font-size:18px!important;font-weight:900}.download-btn{background:var(--green);color:#062315;padding:9px 14px}.download-btn:hover{filter:brightness(1.08)}
.info-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--border);border:1px solid var(--border);border-radius:16px;overflow:hidden}.info-strip div{background:#0d121b;padding:14px 16px;display:flex;flex-direction:column}.info-strip strong{font-size:12px}.info-strip span{font-size:11px;color:var(--muted);margin-top:3px}footer{text-align:center;color:#677287;font-size:11px;padding:0 20px 30px}
.toast{position:fixed;right:22px;bottom:22px;background:#171e2b;border:1px solid #35405a;color:#fff;padding:12px 15px;border-radius:12px;box-shadow:var(--shadow);z-index:50;max-width:360px}.toast.error{border-color:rgba(255,107,120,.4);color:#ffd4d8}
@media(max-width:800px){.topbar{padding:0 16px}.status-pill{display:none}.workspace{width:min(100% - 20px,1180px);margin-top:14px}.hero-card{padding:22px;align-items:flex-start;flex-direction:column}.hero-card h2{font-size:27px}.panel{padding:16px}.stats-grid{grid-template-columns:1fr 1fr}.preset-row{grid-template-columns:repeat(3,1fr)}.options-grid,.export-grid,.info-strip{grid-template-columns:1fr}.result-card{align-items:flex-start;gap:12px;flex-direction:column}.download-btn{width:100%;text-align:center}.preview-actions{align-items:flex-start;flex-direction:column}.brand p{display:none}}
@media(max-width:480px){.stats-grid{grid-template-columns:1fr}.hero-card h2{font-size:24px}.dropzone{min-height:165px}.preset-row{grid-template-columns:1fr 1fr}}


/* v1.1 engine startup states */
.engine-wrap{display:flex;align-items:center;gap:8px}.status-pill.loading .dot{background:#f5b942;box-shadow:0 0 0 4px rgba(245,185,66,.09);animation:enginePulse 1.2s ease-in-out infinite}.status-pill.error .dot{background:#ff6b6b;box-shadow:0 0 0 4px rgba(255,107,107,.09)}.engine-retry{border:1px solid var(--border);background:#151b26;color:var(--text);border-radius:999px;padding:8px 11px;font:inherit;font-size:12px;cursor:pointer}.engine-retry:hover{border-color:#64748b}.engine-retry[hidden]{display:none!important}@keyframes enginePulse{0%,100%{opacity:.45}50%{opacity:1}}
@media(max-width:800px){.engine-wrap{display:none}}
