:root {
  --ink: #171815;
  --muted: #686b63;
  --paper: #f0efe9;
  --panel: #faf9f4;
  --line: #d4d2c8;
  --acid: #dfff54;
  --dark: #252722;
  --danger: #a9372a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, textarea { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.site-header { height: 76px; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; font-weight: 730; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--dark); color: var(--acid); font-size: 12px; letter-spacing: .02em; }
.status-pill { border: 1px solid var(--line); border-radius: 99px; padding: 8px 12px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.25); }
.status-pill i { width: 7px; height: 7px; background: #67a937; border-radius: 50%; box-shadow: 0 0 0 3px rgba(103,169,55,.13); }
main { max-width: 1440px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px) 80px; }
.hero { padding: clamp(62px, 8vw, 120px) 0 clamp(52px, 7vw, 96px); max-width: 1050px; }
.eyebrow { margin: 0 0 22px; color: var(--muted); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 750; }
h1 { margin: 0; max-width: 1000px; font-size: clamp(54px, 8.7vw, 132px); line-height: .84; letter-spacing: -.075em; font-weight: 760; }
.lede { max-width: 630px; margin: 42px 0 0 auto; font-size: clamp(18px, 2.1vw, 27px); line-height: 1.35; letter-spacing: -.025em; color: #444740; }
.access-panel { margin: 0 0 28px; padding: clamp(22px, 3vw, 38px); border: 1px solid var(--ink); background: var(--acid); display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 40px; align-items: end; }
.access-panel .eyebrow { margin-bottom: 9px; color: #4d521e; }
.access-panel h2 { margin: 0 0 8px; font-size: clamp(25px, 3vw, 40px); letter-spacing: -.045em; }
.access-panel > div > p:last-child { max-width: 600px; margin: 0; color: #4d521e; font-size: 12px; line-height: 1.5; }
.access-control { display: flex; min-height: 48px; }
.access-control input { min-width: 0; flex: 1; border: 1px solid var(--ink); border-radius: 0; padding: 0 13px; background: white; }
.access-control button { flex: none; border: 1px solid var(--ink); border-left: 0; padding: 0 17px; background: var(--dark); color: white; cursor: pointer; font-weight: 700; }
.access-panel .error-message { margin: 9px 0 0; }
.workspace-tabs { display: flex; align-items: stretch; border: 1px solid var(--line); border-bottom: 0; background: #e4e3dc; }
.workspace-tab { min-height: 47px; padding: 0 20px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-weight: 680; }
.workspace-tab.active { background: var(--panel); color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.workspace-tab span { display: inline-grid; min-width: 24px; min-height: 20px; margin-left: 7px; padding: 0 6px; place-items: center; border-radius: 99px; background: var(--dark); color: white; font-size: 10px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .72fr); border: 1px solid var(--line); background: var(--panel); }
.create-panel { padding: clamp(28px, 5vw, 72px); border-right: 1px solid var(--line); min-width: 0; }
.form-section { padding: 0 0 62px; margin: 0 0 62px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; }
.section-heading .step { flex: none; display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--ink); border-radius: 50%; font-size: 11px; font-weight: 750; }
.section-heading h2 { margin: 0 0 5px; font-size: 25px; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.mode-tabs { display: inline-flex; border-bottom: 1px solid var(--line); margin-bottom: 25px; }
.mode-tab { padding: 10px 0; margin-right: 28px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.mode-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.hidden { display: none !important; }
.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.preset-card { position: relative; padding: 0; border: 1px solid var(--line); background: #e4e3dc; cursor: pointer; text-align: left; overflow: hidden; }
.preset-card img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .35s ease; }
.preset-card:hover img { transform: scale(1.02); }
.preset-card .preset-copy { padding: 13px 14px 15px; background: var(--panel); display: block; }
.preset-card strong { display: block; margin-bottom: 3px; }
.preset-card small { color: var(--muted); line-height: 1.35; }
.preset-card.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.preset-card.selected::after { content: "✓"; position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); font-weight: 800; }
.dropzone { min-height: 190px; border: 1px dashed #a9aa9f; background: #f4f3ed; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 28px; text-align: center; cursor: pointer; transition: border .2s, background .2s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--ink); background: #edede5; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.dropzone strong { font-size: 15px; margin: 12px 0 6px; }
.dropzone span:last-child { color: var(--muted); font-size: 12px; }
.drop-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--dark); color: var(--acid); font-size: 22px; font-weight: 300; }
.music-note { font-size: 18px; }
.dropzone.compact { min-height: 145px; }
.file-preview { margin-top: 12px; padding: 11px 13px; border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; font-size: 13px; }
.file-preview img { width: 48px; height: 48px; object-fit: cover; }
.file-preview .file-meta { min-width: 0; }
.file-preview strong, .file-preview span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.object-reference { margin-top: 25px; padding: 16px; border: 1px solid var(--line); background: white; }
.default-object-reference { display: grid; grid-template-columns: 72px 1fr; gap: 13px; align-items: center; margin: 0 0 13px; padding: 10px; background: #efeee8; }
.default-object-reference img { display: block; width: 72px; height: 72px; object-fit: cover; }
.default-object-reference figcaption strong, .default-object-reference figcaption span { display: block; }
.default-object-reference figcaption strong { font-size: 12px; }
.default-object-reference figcaption span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.object-reference > input { display: block; width: 100%; margin: 5px 0 8px; font-size: 12px; }
.object-reference > span { display: block; color: var(--muted); font-size: 11px; line-height: 1.45; }
.field-label { display: block; text-transform: uppercase; letter-spacing: .11em; font-size: 10px; font-weight: 800; margin: 0 0 9px; color: #4e514a; }
textarea { width: 100%; resize: vertical; min-height: 170px; padding: 18px; border: 1px solid var(--line); border-radius: 0; background: white; color: var(--ink); line-height: 1.55; outline: none; }
textarea:focus, input:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field-help { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.field-help code { color: var(--ink); font-size: 10px; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.quick-prompts button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 7px 10px; font-size: 11px; cursor: pointer; }
.quick-prompts button:hover { border-color: var(--ink); color: var(--ink); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 38px; margin-top: 34px; }
.duration-control { height: 54px; border: 1px solid var(--line); padding: 0 13px; display: flex; gap: 10px; align-items: center; background: white; }
.duration-control input[type="range"] { min-width: 0; flex: 1; accent-color: var(--ink); }
.duration-control input[type="number"] { width: 44px; border: 0; font-weight: 750; outline: none; box-shadow: none; }
.duration-control b { font-size: 11px; color: var(--muted); }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.ratio-options { height: 54px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); background: white; }
.ratio-options label { cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; border-right: 1px solid var(--line); position: relative; }
.ratio-options label:last-child { border-right: 0; }
.ratio-options input { position: absolute; opacity: 0; }
.ratio-options label:has(input:checked) { background: var(--dark); color: white; }
.ratio-shape { display: inline-block; border: 1px solid currentColor; }
.ratio-shape.landscape { width: 16px; height: 9px; }.ratio-shape.portrait { width: 9px; height: 16px; }.ratio-shape.square { width: 13px; height: 13px; }
.ratio-options b { font-size: 10px; }
.generate-button { width: 100%; min-height: 60px; padding: 0 20px; border: 0; background: var(--dark); color: white; display: flex; align-items: center; justify-content: space-between; text-decoration: none; cursor: pointer; font-weight: 700; }
.generate-button b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--acid); color: var(--ink); font-size: 18px; }
.generate-button:disabled { opacity: .5; cursor: wait; }
.cost-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.error-message { padding: 12px 14px; margin: 0 0 16px; background: #f6dfdb; border: 1px solid #e2bcb5; color: var(--danger); font-size: 13px; line-height: 1.45; }
.process-panel { padding: clamp(28px, 4vw, 58px); background: #e8e7df; }
.process-sticky { position: sticky; top: 35px; }
.process-panel h2 { font-size: clamp(33px, 3.3vw, 51px); line-height: .98; letter-spacing: -.06em; margin: 0 0 55px; }
.pipeline-list { list-style: none; padding: 0; margin: 0; }
.pipeline-list li { display: grid; grid-template-columns: 32px 1fr; gap: 15px; padding: 22px 0; border-top: 1px solid #cbcabf; }
.pipeline-list li > span { color: var(--muted); font-size: 11px; padding-top: 3px; }
.pipeline-list strong { font-size: 14px; }.pipeline-list p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.job-panel { margin-top: 70px; padding: clamp(28px, 5vw, 70px); border: 1px solid var(--line); background: var(--panel); }
.job-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.job-heading h2 { font-size: clamp(32px, 5vw, 64px); letter-spacing: -.055em; margin: 0 0 32px; }
.job-actions { display: flex; align-items: center; gap: 8px; }
.quiet-button { padding: 9px 13px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; font: inherit; text-decoration: none; white-space: nowrap; }
.progress-track { height: 7px; background: #ddddd4; overflow: hidden; }.progress-track div { width: 1%; height: 100%; background: var(--acid); border-right: 2px solid var(--dark); transition: width .5s ease; }
.job-status-line { display: flex; justify-content: space-between; margin: 12px 0 38px; font-size: 13px; }.job-status-line span { color: var(--muted); }
.timing-summary { margin: -22px 0 38px; padding: 10px 12px; border-left: 3px solid var(--acid); background: #efeee7; color: var(--muted); font-size: 11px; line-height: 1.5; }
.lyria-review { margin: -20px 0 38px; padding: 14px; border: 1px solid var(--line); background: white; }
.lyria-review > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 11px; }
.lyria-review > div span { color: var(--muted); }
.lyria-review audio { width: 100%; height: 34px; }
.lyria-review details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.lyria-review summary { cursor: pointer; font-size: 11px; font-weight: 750; }
.lyria-review pre { max-height: 260px; overflow: auto; margin: 10px 0 0; padding: 12px; white-space: pre-wrap; word-break: break-word; background: #efeee8; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.reference-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0 0 36px; }
.reference-card { margin: 0; border: 1px solid var(--line); background: white; }.reference-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }.reference-card figcaption { padding: 10px; font-size: 11px; color: var(--muted); }
.scene-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.scene-card { border: 1px solid var(--line); padding: 14px; background: white; }.scene-card b { display: block; font-size: 12px; }.scene-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }.scene-card.done { border-color: #96aa52; background: #f5f8e8; }
.scene-card > video { display: block; width: 100%; margin-top: 12px; background: #111; aspect-ratio: 9/16; max-height: 520px; object-fit: contain; }
.scene-card details { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.scene-card summary { cursor: pointer; font-size: 11px; font-weight: 750; }
.clip-inputs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-top: 10px; }
.clip-inputs figure { margin: 0; }.clip-inputs img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; }.clip-inputs figcaption { font-size: 9px; color: var(--muted); margin-top: 3px; }
.scene-card audio { width: 100%; height: 32px; margin-top: 9px; }
.scene-card pre { margin: 9px 0 0; padding: 10px; max-height: 190px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #efeee8; color: #3f413c; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.result-panel { margin-top: 42px; }.result-panel video { display: block; width: 100%; max-height: 75vh; background: black; margin-bottom: 14px; }
.queue-view { min-height: 490px; padding: clamp(28px, 5vw, 70px); border: 1px solid var(--line); background: var(--panel); }
.queue-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.queue-heading h2 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 64px); line-height: .98; letter-spacing: -.055em; }
.queue-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.queue-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 42px 0; }
.queue-metrics article { min-height: 112px; padding: 16px; border: 1px solid var(--line); background: white; }
.queue-metrics span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.queue-metrics strong { display: block; margin-top: 20px; font-size: clamp(22px, 3vw, 38px); letter-spacing: -.045em; }
.queue-nodes { display: grid; gap: 9px; }
.queue-node { display: grid; grid-template-columns: minmax(150px, 1.25fr) repeat(4, minmax(90px, .7fr)); gap: 16px; align-items: center; padding: 17px; border: 1px solid var(--line); background: white; }
.queue-node > div { min-width: 0; }
.queue-node span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.queue-node strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.queue-node .node-state { color: #4f791f; }
.queue-node .node-state:not([data-ready="true"]) { color: #9a661e; }
.queue-empty { padding: 28px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
footer { max-width: 1440px; margin: 0 auto; padding: 30px clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }

@media (max-width: 900px) {
  .access-panel, .workspace { grid-template-columns: 1fr; }.create-panel { border-right: 0; }.process-panel { border-top: 1px solid var(--line); }.process-sticky { position: static; }.scene-grid { grid-template-columns: repeat(2,1fr); }.reference-gallery { grid-template-columns: repeat(2,1fr); }.queue-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }.queue-node { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .status-pill { display: none; }.hero { padding-top: 55px; }h1 { font-size: 52px; }.lede { margin-top: 30px; }.access-control { display: grid; }.access-control button { min-height: 46px; border-left: 1px solid var(--ink); border-top: 0; }.access-control input { min-height: 46px; }.create-panel { padding: 24px 18px; }.preset-grid, .settings-grid { grid-template-columns: 1fr; }.settings-grid { gap: 24px; }.form-section { padding-bottom: 45px; margin-bottom: 45px; }.scene-grid, .reference-gallery { grid-template-columns: 1fr; }.queue-view { padding: 28px 18px; }.queue-heading { display: block; }.queue-heading .quiet-button { margin-top: 18px; }.queue-metrics, .queue-node { grid-template-columns: repeat(2, minmax(0, 1fr)); }footer { flex-direction: column; }
}
