:root {
  --bg-0: #090806;
  --bg-1: #11100d;
  --bg-2: #1c1812;
  --panel: rgba(24, 21, 16, .88);
  --panel-solid: #15120e;
  --surface: rgba(35, 30, 22, .94);
  --surface-hover: rgba(48, 41, 30, .96);
  --border: rgba(230, 208, 172, .14);
  --border-strong: rgba(230, 208, 172, .28);
  --gold: #c7a35b;
  --gold-light: #dfc17b;
  --gold-deep: #7f5d2c;
  --gold-glow: rgba(199, 163, 91, .28);
  --sage: #8fa888;
  --rose: #c78475;
  --danger: #d64060;
  --text: #f5ead9;
  --text-dim: #c8baa5;
  --text-faint: #8c806e;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 18px 48px -26px rgba(0,0,0,.82);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; }
html { max-width: 100%; overflow-x: hidden; background: var(--bg-0); }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(199,163,91,.12), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(130,151,124,.10), transparent 30%),
    linear-gradient(145deg, var(--bg-2), var(--bg-1) 42%, var(--bg-0));
  background-attachment: fixed;
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(9,8,6,.88);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 33px; height: 35px; flex: none; filter: drop-shadow(0 2px 4px #000); }
.brand-name { font-size: 21px; letter-spacing: -.6px; white-space: nowrap; }
.brand-name .red { color: #ef2929; }
.brand-name .cream { color: #e9c66e; }
.version {
  margin-left: 9px;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-dim);
  font: 10px/16px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .03em;
}
.spacer { flex: 1; }
.nav { display: flex; align-items: stretch; gap: 12px; height: 100%; }
.nav-link {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 2px;
  color: var(--text-dim);
  font-weight: 700;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 15px;
  height: 2px;
  background: var(--gold-light);
}
.mobile-settings-link, .nav-toggle, .nav-scrim { display: none; }
.nav-toggle { gap: 3px; }
.nav-toggle span { width: 17px; height: 2px; border-radius: 2px; background: currentColor; }
.nav-scrim { position: fixed; z-index: 28; inset: 66px 0 0; border: 0; background: rgba(0,0,0,.55); }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  background: var(--surface);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface-hover); }
.icon-btn svg, .btn svg, .pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.page {
  width: 100%;
  max-width: 1080px;
  min-height: calc(100vh - 66px);
  margin: 0 auto;
  padding: 30px 22px 84px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.page.wide { max-width: 1180px; }
.page-title { margin: 3px 0 0; font-size: 28px; line-height: 1.2; }
.display { font-family: var(--display); }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.eyebrow { color: var(--gold-light); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.btn, .pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-dim);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn { min-height: 38px; padding: 8px 18px; }
.btn.sm { min-height: 31px; padding: 5px 13px; font-size: 12px; }
.btn:hover, .pill:hover { color: var(--text); background: var(--surface); }
.btn.primary {
  border-color: transparent;
  color: #17120a;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 10px 28px -10px var(--gold-glow);
}
.btn.primary:hover { color: #17120a; box-shadow: 0 12px 34px -8px var(--gold-glow); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.pill { min-height: 37px; padding: 7px 14px; font-size: 13px; border-color: var(--border); background: var(--surface); font-weight: 500; }
.pill.active { color: var(--text); border-color: var(--border-strong); }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: rgba(9,8,6,.7); }
.segmented button { border: 0; border-radius: 999px; padding: 7px 18px; color: var(--text-dim); background: none; font-weight: 700; cursor: pointer; }
.segmented button.active { color: #17120a; background: linear-gradient(180deg, var(--gold-light), var(--gold-deep)); box-shadow: 0 6px 18px -6px var(--gold-glow); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid rgba(199,163,91,.22); border-radius: 999px; color: var(--gold-light); background: rgba(199,163,91,.16); font-size: 11px; font-weight: 700; }
.badge { white-space: nowrap; }
.badge.complete { color: #c7d6bd; border-color: rgba(143,168,136,.35); background: rgba(143,168,136,.16); }
.badge.failed { color: #ffb3c1; border-color: rgba(214,64,96,.5); background: rgba(214,64,96,.16); }
.new-badge { float: right; padding: 2px 7px; border-radius: 999px; color: var(--gold-light); background: rgba(199,163,91,.18); font-size: 9px; font-weight: 800; letter-spacing: .04em; }

/* Create */
.stagebar { display: flex; align-items: center; justify-content: center; height: 38px; }
.create-stage { display: inline-flex; align-items: center; gap: 8px; color: var(--text-faint); font-weight: 700; }
.create-stage.active { color: var(--gold-light); }
.stage-number { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 12px; }
.create-stage.active .stage-number { color: #17120a; border-color: transparent; background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.stage-sep { width: 27px; height: 1px; margin: 0 12px; background: var(--border-strong); }
.create-shell { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 22px; }
.create-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hero-title { margin: 2px 0 0; text-align: center; color: var(--text); font: 600 37px/1.15 var(--display); white-space: nowrap; }
.composer { min-height: 286px; padding: 20px; display: flex; flex-direction: column; gap: 11px; }
.composer-top { display: flex; gap: 8px; }
.composer-top .pill { height: 36px; }
.composer-title {
  width: 100%;
  margin-top: 2px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: 600 24px/1.25 var(--display);
}
.composer-title::placeholder { color: var(--text-faint); }
.composer textarea {
  width: 100%;
  min-height: 94px;
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  line-height: 1.6;
}
.composer textarea::placeholder { color: var(--text-faint); }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; }
.round-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text-dim); background: var(--surface); font-size: 26px; cursor: pointer; }
.round-btn.send { width: 48px; height: 48px; color: #17120a; border: 0; background: linear-gradient(180deg, var(--gold-light), var(--gold-deep)); font-size: 25px; }
.avatar-picker { align-self: flex-start; }
.queue { position: sticky; top: 86px; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-height: 872px; }
.queue-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.queue-head > div:first-child { min-width: 0; flex: 1; }
.queue h2 { margin: 0; font: 600 23px/1.2 var(--display); }
.queue p { margin: 4px 0 0; line-height: 1.45; }
.queue-state { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(9,8,6,.36); }
.queue-state .play { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--gold-light); background: var(--surface); }
.queue-section h3 { display: flex; justify-content: space-between; margin: 0 0 10px; font: 600 17px/1.2 var(--display); }
.queue-empty { padding: 8px 2px; color: var(--text-faint); font-size: 13px; }
.queue-error { padding: 10px; border: 1px solid rgba(214,64,96,.45); border-radius: 8px; color: #ffb3c1; background: rgba(214,64,96,.13); font-size: 12px; }
.queue-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.queue-mini { padding: 9px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: rgba(9,8,6,.3); font-size: 12px; }
.queue-mini strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Library */
.library-tabs { align-self: flex-start; }
.folder-row, .filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.folder-row .pill { min-height: 36px; }
.library-tabs ~ .folder-row .pill { min-height: 33px; padding: 5px 12px; font-size: 12px; }
.library-tabs ~ .filter-row .pill { min-height: 35px; padding: 6px 13px; }
.filter-row .sort { margin-left: auto; }
.section-label { margin: -1px 0 0; color: var(--text-dim); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.video-list { display: flex; flex-direction: column; gap: 10px; margin: -7px 0 0; padding: 0; list-style: none; }
.video-card { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 14px; align-items: center; padding: 12px; }
.thumb {
  position: relative;
  width: 100px; height: 56px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg,#29412d,#b18b4e 52%,#593328);
}
.thumb::before { content: ""; position: absolute; inset: 48% 0 0; background: repeating-linear-gradient(95deg,#29452f 0 8px,#8f6940 8px 13px,#6e3241 13px 20px); }
.thumb::after { content: attr(data-label); position: absolute; inset: 5px 5px auto; color: white; font: 900 9px/1.05 Impact, sans-serif; text-shadow: 0 1px 3px black; }
.thumb.hydrangea { background: linear-gradient(135deg,#6f8231,#d7bd6a 50%,#5b2b3b); }
.thumb.failed-thumb { background: linear-gradient(135deg,#183623,#8d7143 50%,#272016); }
.video-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.video-top, .video-bottom { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.video-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 16px; font-weight: 700; }
.video-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-faint); font-size: 12.5px; }
.video-actions { display: flex; gap: 8px; flex-shrink: 0; }
.retention { color: var(--gold-light); font-size: 12px; }
.library-note { margin-top: -5px; color: var(--text-faint); font-size: 12px; }

/* Settings */
.settings-page { max-width: 1180px; min-height: 6380px; gap: 18px; }
.settings-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.settings-card h2 { margin: 0; font-size: 18px; }
.settings-card h3 { margin: 0; font-size: 14px; }
.settings-card p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.55; }
.setting-box { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(9,8,6,.3); }
.setting-box + .setting-box { margin-top: -3px; }
#generation > .setting-box:nth-of-type(2) { min-height:330px; }
#generation > .setting-box:nth-of-type(3) { min-height:205px; }
#generation > .setting-box:nth-of-type(4) { min-height:130px; }
#generation > .setting-box:nth-of-type(5) { min-height:185px; }
#generation > .setting-box:nth-of-type(6) { min-height:84px; }
.queue-policy { max-width:180px; margin-top:8px; }
.setting-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12px; font-weight: 600; }
.check input { width: 15px; height: 15px; accent-color: var(--gold); }
.sliders { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 22px; margin-top: 12px; }
.slider-row { display: grid; grid-template-columns: 126px minmax(100px,1fr) 44px; align-items: center; gap: 10px; margin: 10px 0; color: var(--text-dim); font-size: 12px; }
input[type="range"] { appearance: none; height: 3px; border-radius: 4px; background: var(--border-strong); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 3px var(--gold-glow); }
.mini-fields { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; margin-top: 12px; }
.field label { display: block; margin-bottom: 6px; color: var(--text-dim); font-size: 11px; font-weight: 700; }
.input {
  width: 100%; min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: 0;
  color: var(--text);
  background: rgba(9,8,6,.55);
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.provider-heading { margin: 12px 0 0; color: var(--text-dim); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.provider-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: start; }
.provider { display:flex; flex-direction:column; gap:9px; min-width:0; padding:14px 15px; border:1px solid var(--border); border-radius:var(--radius); background:rgba(9,8,6,.36); transition:border-color .2s; }
.provider-set { border-color: rgba(143,168,136,.29); }
.provider-warning { border-color: rgba(245,158,11,.26); }
.provider-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.provider-head h3 { font-size:14px; }
.provider p { margin:0; }
.provider .provider-desc { min-height:36px; font-size:12px; line-height:1.5; }
.provider .provider-validation { min-height:32px; color:#c7d6bd; font-size:11px; line-height:1.45; }
.provider-warning .provider-validation { color:#ffe6a3; }
.provider-unset .provider-validation { color:var(--text-faint); }
.provider .provider-model { color:var(--text-faint); font-size:11px; }
.provider-fields { display:flex; flex-direction:column; gap:7px; }
.provider .input { min-height: 30px; margin-top: 7px; padding: 6px 8px; font-size: 11px; }
.provider-fields .input { margin:0; }
.provider-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; }
.provider-extra { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding-top:8px; border-top:1px solid var(--border); }
.provider-extra span { padding:7px; border:1px solid var(--border); border-radius:7px; color:var(--text-faint); background:rgba(9,8,6,.34); font-size:10px; }
.provider-fetch { align-self:flex-start; }
.provider-runpod { min-height:800px; }
.provider-runpod .provider-actions { margin-top:0; }
.provider-runpod-fields { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.provider-runpod-fields label { color:var(--text-faint); font-size:10px; font-weight:700; }
.runpod-choice { display:flex; flex-direction:column; gap:6px; padding-top:9px; border-top:1px solid var(--border); }
.runpod-choice strong { font-size:11.5px; }
.runpod-choice p { font-size:11px; }
.voice-grid .provider-set { min-height:330px; }
.optional-grid .provider { min-height:260px; }
.provider .provider-note { color:var(--gold-light); font-size:10.5px; line-height:1.4; }
.provider-group-copy { margin-top:-7px !important; font-size:12px !important; }
.provider-add { min-height:108px; align-items:flex-start; justify-content:center; border-style:dashed; color:var(--text); background:transparent; text-align:left; cursor:pointer; }
.provider-add span { color:var(--text-faint); font-size:11px; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: #c7d6bd; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.verified::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.provider-unset .verified { color:var(--text-faint); }
.provider-unset .verified::before { background:var(--text-faint); }
.provider-warning .verified { color:#ffe6a3; }
.provider-warning .verified::before { background:#f59e0b; }
.settings-actions { display: flex; gap: 8px; }
.changelog { min-height: 360px; }
.settings-page > .settings-card:nth-of-type(3) { min-height:340px; }
.settings-page > .settings-card:nth-of-type(4) { min-height:280px; }
.settings-page > .settings-card:nth-of-type(5) { min-height:157px; }
.settings-page > .settings-card:nth-of-type(6) { min-height:210px; }
.settings-page > .settings-card:nth-of-type(7) { min-height:438px; }
.license-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.fixed-tag.approved { color:#c7d6bd; border-color:rgba(143,168,136,.35); background:rgba(143,168,136,.14); }
.activity { display: grid; grid-template-columns: repeat(26, 10px); gap: 4px; margin: 12px 0 18px; }
.activity i { display:block; width:10px; height:10px; border-radius:2px; background:#211d16; }
.activity i:nth-last-child(-n+22) { background: #285f32; }
.activity i:nth-last-child(-n+12) { background: #39a34a; }
.activity i:nth-last-child(-n+5) { background: #62c86c; }

/* Generation defaults */
.defaults-page { max-width: 920px; min-height: 4135px; padding-bottom: 82px; }
.library-page { min-height: 1139px; padding-bottom: 77px; }
.back-link { align-self: flex-start; }
.defaults-intro h1 { margin: 3px 0 4px; font-size: 29px; }
.defaults-intro p { margin: 0; max-width: 760px; }
.default-group { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.default-group > h2 { margin: 0; font-size: 17px; }
.default-item { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(9,8,6,.3); }
.default-group:first-of-type { min-height:610px; }
.default-group:nth-of-type(3) { min-height:250px; }
.default-group:nth-of-type(4) { min-height:1515px; }
.default-group:nth-of-type(5) { min-height:270px; }
.default-group:nth-of-type(6) { min-height:315px; }
.default-group .default-item { flex-grow:1; }
.default-item h3 { margin: 0 0 5px; font-size: 14px; }
.default-item p { margin: 5px 0; color: var(--text-dim); font-size: 12px; line-height: 1.55; }
.default-item .check { margin-top: 4px; }
.inline-field { display:flex; align-items:center; gap:8px; margin-top:7px; color:var(--text-dim); font-size:11px; font-weight:700; }
.inline-field label { width:154px; flex:none; }
.inline-field .input { min-height:28px; padding:5px 8px; }
.inline-field.compact .input { max-width:170px; }
.refquest-item .test-connection { margin-top:8px; }
.refquest-item .provider-note { margin-left:8px; color:var(--text-faint); font-size:10.5px; }
.default-ltx25 .provider-note { color:var(--text-faint); font-size:10.5px; }
.togglebar { display: inline-flex; gap: 2px; margin-top: 7px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: rgba(9,8,6,.6); }
.togglebar button { border: 0; border-radius: 999px; padding: 5px 14px; color: var(--text-dim); background: none; font-size: 11px; font-weight: 700; }
.togglebar button.active { color: #17120a; background: var(--gold-light); }
.defaults-foot { margin-top: -7px; color: var(--text-faint); font-size: 12px; }

/* Job */
.job-page { max-width: 1180px; min-height: 1632px; }
.job-head { display: flex; flex-direction: column; gap: 5px; }
.job-head h1 { margin: 0; max-width: 1040px; font: 600 31px/1.1 var(--display); }
.job-hero { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.job-hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.job-stage { font: 19px var(--display); }
.job-numbers { display: inline-flex; align-items: baseline; gap: 16px; }
.job-percent { color: var(--gold-light); font: 26px var(--display); }
.progress { height: 10px; overflow: hidden; border: 1px solid var(--border); border-radius: 999px; background: rgba(9,8,6,.65); }
.progress span { display: block; height: 100%; background: linear-gradient(90deg,#6f8a68,var(--sage)); transition: width .4s; }
.pipeline { display: flex; padding: 1px 0 0; margin: 0; list-style: none; }
.pipeline li { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-faint); font-size: 10px; font-weight: 800; letter-spacing: .035em; text-align: center; text-transform: uppercase; }
.pipeline li:not(:first-child)::before { content:""; position:absolute; top:10px; left:calc(-50% + 14px); right:calc(50% + 14px); height:1px; background:var(--border-strong); }
.pipeline li.done:not(:first-child)::before, .pipeline li.active:not(:first-child)::before { background: var(--gold); }
.pipeline-dot { z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--bg-0); }
.pipeline li.done .pipeline-dot { color:#17120a; border-color:var(--gold); background:linear-gradient(180deg,var(--gold-light),var(--gold)); }
.pipeline li.active .pipeline-dot { border-color:var(--gold-light); box-shadow:0 0 0 4px var(--gold-glow); }
.result-card { padding: 18px; display: grid; grid-template-columns: 55% minmax(0,1fr); gap: 18px; }
.video-preview { width:100%; display:block; aspect-ratio: 16/9; position: relative; overflow: hidden; object-fit:contain; border-radius: 9px; background: linear-gradient(135deg,#273f2b,#b38c52 47%,#593427); border: 1px solid var(--border); }
.video-preview::before { content:"12 HARDY PERENNIALS\A PLANT ONCE. THEY RETURN"; white-space:pre; position:absolute; left:17px; top:16px; color:white; font:900 29px/.95 Impact,sans-serif; text-shadow: 0 3px 4px black; }
.video-preview::after { content:"▶   0:00 / 19:42                                      ◖   ⛶"; position:absolute; left:14px; right:14px; bottom:10px; padding-top:9px; border-top:3px solid rgba(255,255,255,.65); color:white; font-size:12px; }
.result-info h2 { display:flex; align-items:center; gap:8px; margin:0 0 8px; font:600 19px var(--display); }
.result-thumb { margin-top:10px; }
.description { position:relative; margin-top: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-dim); background: rgba(9,8,6,.35); font-size: 12.5px; line-height: 1.6; }
.description-copy { position:absolute; top:8px; right:8px; }
.description p { margin:14px 0 0; }
.result-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.job-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:18px; align-items:start; }
.job-sidebar { display:flex; flex-direction:column; gap:18px; }
.chunks-panel, .feed-panel, .side-panel { padding:18px; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.panel-head h2, .side-panel h2 { margin:0; font-size:15px; }
.chunk-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.chunk { padding:11px 12px; border:1px solid var(--border); border-radius:10px; background:rgba(9,8,6,.4); }
.chunk-top { display:flex; justify-content:space-between; font-size:12px; }
.chunk-status { margin:7px 0 8px; color:var(--sage); font-size:11px; }
.mini-progress { height:4px; border-radius:4px; background:rgba(143,168,136,.3); overflow:hidden; }
.mini-progress span { display:block; width:100%; height:100%; background:var(--sage); }
.concurrency-list, .stat-list { display:flex; flex-direction:column; gap:7px; }
.concurrency-row, .stat-row { padding:9px 10px; border:1px solid var(--border); border-radius:7px; background:rgba(9,8,6,.35); color:var(--text-dim); font-size:12px; }
.concurrency-row { display:grid; grid-template-columns:auto 1fr auto; align-items:center; }
.concurrency-row span { color:var(--text-faint); }
.stat-row { position:relative; }
.stat-row > span { float:right; color:var(--gold-light); }
.stat-row small { display:block; margin-top:4px; color:var(--text-faint); }
.api-log { margin-top:12px; color:var(--text-dim); font-size:12px; font-weight:700; }
.dot { display:inline-block; width:7px; height:7px; margin-right:8px; border-radius:50%; background:#5a5143; }
.cost-row { display:flex; justify-content:space-between; margin:7px 0; color:var(--text-dim); font-size:12.5px; }
.cost-row strong { color:var(--gold-light); font:17px var(--display); }
.feed { max-height:340px; overflow:auto; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:rgba(5,4,3,.65); }
.logline { display:flex; gap:9px; color:var(--text-dim); font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; }
.logtime { color:var(--text-faint); white-space:nowrap; }
.level { width:43px; height:18px; flex:none; text-align:center; border:1px solid var(--border); border-radius:5px; font-size:9px; font-weight:800; line-height:16px; text-transform:uppercase; }
.level.warn { color:#ffe6a3; border-color:rgba(245,158,11,.45); }
.level.error, .level.fatal { color:#ffb3c1; border-color:rgba(214,64,96,.48); }

/* Logs */
.logs-page { max-width: 1180px; gap: 18px; }
.logs-toolbar { display:flex; align-items:center; gap:8px; }
.logs-toolbar > svg, .panel-head svg, .job-numbers svg, .side-panel h2 svg { width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.logs-title { margin:0 5px 0 0; font-size:28px; }
.streaming { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border:1px solid rgba(143,168,136,.35); border-radius:999px; color:#c7d6bd; font-size:12px; font-weight:700; }
.streaming::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--sage); }
.log-filter.active.warn { color:#ffe6a3; border-color:rgba(245,158,11,.55); }
.log-filter.active.error, .log-filter.active.fatal { color:#ffb3c1; border-color:rgba(214,64,96,.55); }
.logs-controls { display:flex; gap:8px; margin-left:auto; }
.log-console { min-height:620px; padding:20px; border:1px solid var(--border); border-radius:12px; background:#050403; box-shadow:var(--shadow); }
.log-waiting { color:var(--text-faint); font-size:13px; }

/* Release note */
.whats-new { position:fixed; z-index:50; right:12px; bottom:12px; width:396px; padding:17px 15px 14px; border:1px solid var(--border-strong); border-radius:12px; background:#1b1711; box-shadow:0 18px 50px -18px #000; }
.whats-head { display:flex; align-items:center; gap:10px; }
.whats-head strong { font-size:14px; }
.whats-head .close { margin-left:auto; border:0; color:var(--text-faint); background:none; cursor:pointer; font-size:18px; }
.whats-body { display:grid; grid-template-columns:76px 1fr; gap:8px; margin-top:9px; color:var(--text-dim); font-size:12px; }
.fixed-tag { align-self:start; padding:2px 9px; border:1px solid rgba(199,132,117,.35); border-radius:999px; color:#e8c2b8; background:rgba(199,132,117,.13); font-size:9px; font-weight:800; letter-spacing:.08em; text-align:center; }
.whats-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }

.toast { position:fixed; z-index:100; left:50%; bottom:22px; transform:translateX(-50%); padding:10px 16px; border:1px solid var(--border-strong); border-radius:999px; color:var(--text); background:#211c15; box-shadow:var(--shadow); }
.hidden { display:none !important; }

@media (max-width: 900px) {
  .create-shell, .job-grid, .result-card { grid-template-columns:1fr; }
  .queue { position:static; min-height:0; }
  .provider-grid { grid-template-columns:1fr 1fr; }
  .mini-fields { grid-template-columns:repeat(3,1fr); }
  .sliders { grid-template-columns:1fr; }
  .settings-link { display:none; }
  .nav-toggle { display:flex; flex-direction:column; align-items:center; justify-content:center; }
  .nav {
    position:fixed; z-index:31; top:66px; right:0;
    width:min(82vw,300px); height:calc(100dvh - 66px);
    padding:16px; display:flex; flex-direction:column; align-items:stretch; gap:8px;
    border-left:1px solid var(--border); background:#100e0b;
    box-shadow:-20px 20px 50px rgba(0,0,0,.45);
  }
  .nav:not(.open) { display:none; }
  .nav.open { display:flex; }
  .nav-link { min-height:48px; display:flex; align-items:center; padding:0 14px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
  .nav-link.active::after { left:12px; right:auto; top:12px; bottom:12px; width:2px; height:auto; }
  .mobile-settings-link { display:flex; }
  .nav-scrim.open { display:block; }
  .logs-toolbar { flex-wrap:wrap; }
  .logs-controls { width:100%; margin-left:0; flex-wrap:wrap; }
  .license-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .provider-runpod, .voice-grid .provider-set, .optional-grid .provider { min-height:0; }
  .settings-page, .defaults-page, .library-page, .job-page { min-height:calc(100vh - 66px); }
  .default-group:first-of-type, .default-group:nth-of-type(3), .default-group:nth-of-type(4), .default-group:nth-of-type(5), .default-group:nth-of-type(6),
  .settings-page > .settings-card:nth-of-type(n), #generation > .setting-box:nth-of-type(n) { min-height:0; }
}
@media (max-width: 640px) {
  .topbar { padding:0 12px; }
  .version { display:none; }
  .brand-name { font-size:18px; }
  .page { padding:20px 14px 76px; }
  .hero-title { font-size:30px; white-space:normal; }
  .card { border-radius:10px; }
  .settings-card, .default-group, .job-hero, .chunks-panel, .feed-panel, .side-panel, .log-console { padding:15px; }
  .composer { min-height:245px; padding:15px; }
  .composer-title { font-size:21px; }
  .composer-top { flex-wrap:wrap; }
  .composer-top .pill { flex:1 1 145px; }
  .stagebar { overflow:auto; justify-content:flex-start; }
  .stage-sep { width:16px; margin:0 6px; }
  .create-stage { font-size:11px; }
  .folder-row, .filter-row { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
  .filter-row .sort { margin-left:0; }
  .video-card { grid-template-columns:84px minmax(0,1fr); gap:10px; }
  .video-body { overflow:hidden; }
  .thumb { width:84px; height:48px; }
  .video-top, .video-bottom { align-items:flex-start; flex-direction:column; }
  .video-actions { width:100%; flex-wrap:wrap; }
  .video-title { max-width:100%; }
  .video-actions .btn { flex:1; min-height:44px; padding-inline:8px; }
  .provider-grid, .mini-fields, .chunk-grid, .provider-runpod-fields, .license-grid { grid-template-columns:1fr; }
  .setting-line, .queue-head, .panel-head, .job-hero-top { align-items:flex-start; flex-direction:column; }
  .setting-line > .btn, .setting-line > a.btn { width:100%; }
  .slider-row { grid-template-columns:minmax(92px,1fr) minmax(90px,1.4fr) 40px; gap:7px; }
  .inline-field { align-items:stretch; flex-direction:column; }
  .inline-field label { width:auto; }
  .inline-field .btn { align-self:flex-start; }
  .togglebar { max-width:100%; display:flex; overflow-x:auto; }
  .togglebar button { min-height:40px; flex:1 0 auto; }
  .pipeline { overflow-x:auto; padding-bottom:6px; }
  .pipeline li { min-width:85px; }
  .whats-new { right:8px; left:8px; bottom:8px; width:auto; }
  .whats-body { grid-template-columns:1fr; }
  .whats-actions .btn { min-height:44px; }
  .logs-toolbar { flex-wrap:wrap; }
  .logs-controls { width:100%; margin-left:0; }
  .logs-controls > * { min-width:0; }
  .logs-controls .pill { flex:1 1 100%; justify-content:space-between; }
  .logs-controls .btn { flex:1 1 auto; }
  .logs-controls select { max-width:200px; }
  .job-grid > div, .chunks-panel, .feed-panel, .feed { min-width:0; max-width:100%; }
  .log-console { min-height:420px; overflow:hidden; }
  .feed { width:100%; overflow:auto; }
  .logline { min-width:560px; }
  .settings-actions { flex-wrap:wrap; }
  .settings-actions > .btn, .settings-actions > a.btn { flex:1 1 160px; }
  .settings-actions .input { max-width:none !important; flex:1 1 100%; }
  .toast { right:12px; left:12px; bottom:12px; max-width:none; transform:none; border-radius:10px; text-align:center; }
  .activity { grid-template-columns:repeat(22,10px); overflow:hidden; }
}
@media (max-width: 380px) {
  .brand-name { display:none; }
  .topbar { gap:8px; }
  .page { padding-inline:10px; }
  .stage-sep { width:10px; margin-inline:4px; }
  .create-stage { min-width:max-content; }
  .video-card { grid-template-columns:1fr; }
  .thumb { width:100%; height:auto; aspect-ratio:16/9; }
  .video-meta { white-space:normal; }
  .video-actions .btn { flex:1 1 100%; }
  .segmented { max-width:100%; overflow-x:auto; }
  .whats-actions { justify-content:stretch; }
  .whats-actions .btn { flex:1; }
}
