:root {
  color-scheme: dark;
  --bg: #09080f;
  --bg-deep: #06050a;
  --surface: rgba(20, 17, 28, .88);
  --surface-strong: #17131f;
  --surface-soft: #100e16;
  --line: rgba(255, 255, 255, .095);
  --line-strong: rgba(195, 160, 255, .28);
  --text: #f8f5fc;
  --muted: #aaa2b7;
  --muted-2: #766e82;
  --pink: #ff77ae;
  --violet: #a27aff;
  --violet-strong: #8557f5;
  --green: #63e7a6;
  --yellow: #ffce78;
  --red: #ff7895;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  --sidebar: 224px;
  --topbar: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 22px); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% -10%, rgba(126, 77, 224, .12), transparent 30%),
    linear-gradient(180deg, #0a0911 0%, var(--bg) 55%, #08070d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(162, 122, 255, .38);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-140%); color: #fff; background: #7f52e8; padding: 9px 13px; border-radius: 9px; }
.skip-link:focus { transform: none; }
.aurora { position: fixed; z-index: -1; width: 44vw; height: 44vw; border-radius: 50%; filter: blur(130px); opacity: .13; pointer-events: none; }
.aurora-one { top: -25vw; left: -17vw; background: #a872ff; }
.aurora-two { top: 38vh; right: -32vw; background: #ff478f; }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 3.2vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 15, .82);
  backdrop-filter: blur(22px) saturate(130%);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-logo { width: 39px; height: 39px; filter: drop-shadow(0 8px 18px rgba(156, 97, 227, .35)); }
.brand-copy { display: block; line-height: 1; }
.brand-copy strong { display: block; font-size: 18px; letter-spacing: -.65px; }
.brand-copy strong span { color: var(--pink); }
.brand-copy small { display: block; margin-top: 5px; color: #9a90a8; font-size: 8px; font-weight: 800; letter-spacing: 1.9px; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.health-chip, .owner-button { border: 1px solid var(--line); color: var(--text); background: rgba(255, 255, 255, .035); cursor: pointer; }
.health-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 206, 120, .1); }
.health-chip.connected .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(99, 231, 166, .1); }
.health-chip.disconnected .status-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 120, 149, .1); }
.owner-button { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 9px 5px 5px; border-radius: 15px; }
.owner-button:hover, .health-chip:hover { border-color: rgba(255, 255, 255, .17); background: rgba(255, 255, 255, .055); }
.owner-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #f4c5ff, #8a63dd); color: #1a092b; font-size: 12px; font-weight: 900; }
.owner-copy { text-align: left; line-height: 1.1; }
.owner-copy strong { display: block; font-size: 11px; }
.owner-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.owner-button > svg { width: 13px; fill: none; stroke: #8d8398; stroke-width: 1.5; }

.app-shell { width: min(1540px, 100%); margin: auto; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); display: flex; flex-direction: column; justify-content: space-between; padding: 34px 20px 25px clamp(18px, 3.2vw, 52px); border-right: 1px solid var(--line); }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 10px 12px; border-radius: 13px; color: #9c94aa; text-decoration: none; font-size: 12px; font-weight: 650; transition: .2s ease; }
.nav-item:hover { color: #ddd6e7; background: rgba(255, 255, 255, .035); }
.nav-item.active { color: #fff; background: linear-gradient(100deg, rgba(147, 95, 246, .18), rgba(255, 119, 174, .06)); box-shadow: inset 2px 0 var(--violet); }
.nav-icon { width: 20px; text-align: center; color: #b694ff; font-size: 16px; font-weight: 400; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 99px; background: var(--pink); color: #260a18; font-size: 9px; font-weight: 900; }
.sidebar-foot { display: flex; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .022); }
.sidebar-foot .lock-icon { color: #b99aff; }
.sidebar-foot p { margin: 0; color: var(--muted-2); font-size: 9px; line-height: 1.55; }
.sidebar-foot strong { color: #a9a0b4; }

.main-content { min-width: 0; padding: 46px clamp(22px, 4.3vw, 72px) 80px; }
.section-anchor { scroll-margin-top: calc(var(--topbar) + 24px); }
.section-anchor + .section-anchor { margin-top: 82px; }
.welcome-row, .section-heading, .surface-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.welcome-row { align-items: flex-end; }
.eyebrow { margin: 0 0 8px; color: #c0a8ea; font-size: 9px; font-weight: 850; letter-spacing: 1.7px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(42px, 5.4vw, 68px); line-height: .98; letter-spacing: -3.8px; }
.lead { max-width: 660px; margin: 15px 0 0; color: var(--muted); font-size: 15px; }
h2 { margin: 0; font-size: clamp(24px, 2.4vw, 31px); line-height: 1.1; letter-spacing: -1.15px; }
h3 { margin: 0; }
.button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 13px; cursor: pointer; padding: 11px 16px; color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; transition: transform .18s ease, filter .18s ease, opacity .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-primary { background: linear-gradient(130deg, #8d5cf3, #e862a2); box-shadow: 0 12px 30px rgba(144, 74, 201, .28); }
.button-secondary { border: 1px solid var(--line-strong); background: rgba(160, 115, 244, .09); color: #dacbfa; }
.button-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .035); color: #d4ccdc; }
.welcome-cta { flex: 0 0 auto; }

.overview-grid { display: grid; grid-template-columns: 1.08fr 1.08fr .84fr; gap: 16px; margin-top: 34px; }
.surface { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(24, 20, 32, .91), rgba(14, 12, 20, .94)); box-shadow: var(--shadow); }
.health-card, .budget-card, .quick-card { min-height: 248px; padding: 23px; }
.surface-head h2 { font-size: 20px; letter-spacing: -.65px; }
.state-pill { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 6px 9px; border: 1px solid rgba(255, 206, 120, .24); border-radius: 999px; background: rgba(255, 206, 120, .06); color: #e8c992; font-size: 9px; font-weight: 800; letter-spacing: .4px; }
.state-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-pill.connected, .state-pill.completed { color: #8ce9b5; border-color: rgba(99, 231, 166, .22); background: rgba(99, 231, 166, .065); }
.state-pill.disconnected, .state-pill.failed { color: #ff9bae; border-color: rgba(255, 120, 149, .22); background: rgba(255, 120, 149, .065); }
.state-pill.queued { color: #efcc8a; }
.state-pill.processing { color: #c1a3ff; border-color: rgba(162, 122, 255, .27); background: rgba(162, 122, 255, .07); }
.state-pill.cancelling { color: #f1ca83; border-color: rgba(255, 206, 120, .25); background: rgba(255, 206, 120, .06); }
.state-pill.unknown { color: #ff9bae; border-color: rgba(255, 120, 149, .3); background: rgba(255, 120, 149, .075); }
.state-pill.attention { color: #ff9bae; border-color: rgba(255, 120, 149, .3); background: rgba(255, 120, 149, .075); }
.state-pill.cancelled { color: #aca3b7; border-color: var(--line); background: rgba(255,255,255,.035); }
.engine-line { display: flex; align-items: center; gap: 12px; margin-top: 23px; }
.engine-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; border: 1px solid rgba(185, 145, 255, .25); background: linear-gradient(145deg, rgba(172, 122, 255, .2), rgba(255, 119, 174, .06)); color: #d6bbff; font-size: 11px; font-weight: 900; }
.engine-line strong, .engine-line span { display: block; }
.engine-line strong { font-size: 13px; }
.engine-line span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.health-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 19px 0 12px; }
.health-facts div { min-width: 0; padding: 9px 10px; border-radius: 11px; background: rgba(255, 255, 255, .026); }
.health-facts dt { color: var(--muted-2); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .75px; }
.health-facts dd { margin: 3px 0 0; overflow: hidden; color: #dcd6e4; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.text-link { border: 0; padding: 2px 0; background: none; color: #c2a2ff; cursor: pointer; font-size: 10px; font-weight: 750; }
.month-label { color: var(--muted-2); font-size: 9px; }
.budget-numbers { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 7px; margin-top: 28px; }
.budget-numbers > strong { font-size: 29px; letter-spacing: -1.3px; }
.budget-numbers > span { color: var(--muted); font-size: 9px; }
.budget-numbers > b { color: #c9c0d1; font-size: 11px; }
.budget-track { height: 7px; overflow: hidden; margin-top: 13px; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.budget-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--pink)); transition: width .4s ease; }
.budget-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--muted-2); font-size: 9px; }
.budget-meta strong { color: #d8d0e0; }
.microcopy { margin: 20px 0 0; color: #756e7f; font-size: 9px; }
.quick-card { display: flex; flex-direction: column; }
.quick-card h2 { margin-top: 2px; font-size: 20px; }
.quick-card > p:not(.eyebrow) { margin: 14px 0; color: var(--muted); font-size: 11px; }
.quick-card .button { width: 100%; margin-top: auto; }

.section-heading { margin-bottom: 24px; }
.section-heading > div > p:not(.eyebrow) { max-width: 660px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.section-heading.compact { align-items: flex-end; }
.verified-note, .stack-badge { flex: 0 0 auto; padding: 8px 11px; border: 1px solid rgba(99, 231, 166, .18); border-radius: 999px; background: rgba(99, 231, 166, .045); color: #9bdab7; font-size: 9px; font-weight: 750; }
.verified-note span { margin-right: 4px; color: var(--green); }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(285px, .65fr); align-items: start; gap: 18px; }
.creator-form { padding: clamp(20px, 3vw, 32px); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset > legend, .field-group > label { width: 100%; display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; color: #ddd6e5; font-size: 11px; font-weight: 750; }
fieldset > legend span, .field-group > label span { color: var(--muted-2); font-size: 9px; font-weight: 500; }
.mode-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-switcher legend { grid-column: 1 / -1; }
.mode-option { position: relative; display: flex; align-items: center; gap: 11px; min-height: 66px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .018); cursor: pointer; }
.mode-option:hover { border-color: rgba(255, 255, 255, .15); }
.mode-option.active { border-color: rgba(174, 133, 255, .45); background: linear-gradient(135deg, rgba(139, 88, 238, .14), rgba(231, 98, 162, .035)); }
.mode-option.disabled { cursor: not-allowed; opacity: .42; }
.mode-option input, .choice input, .duration-choice input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.mode-glyph { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: rgba(165, 120, 255, .11); color: #c4a5ff; font-size: 12px; font-weight: 850; }
.mode-option > span:nth-of-type(2) { min-width: 0; }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { font-size: 11px; }
.mode-option small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.mode-option i { display: none; margin-left: auto; color: var(--green); font-size: 10px; font-style: normal; }
.mode-option.active i { display: block; }
.field-group { margin-top: 23px; }
input[type="text"], input[type="password"], textarea { width: 100%; border: 1px solid #393141; border-radius: 13px; background: #0d0b12; color: var(--text); }
input[type="text"], input[type="password"] { height: 45px; padding: 0 13px; }
textarea { min-height: 150px; resize: vertical; padding: 14px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #635c6d; }
input:focus, textarea:focus { border-color: rgba(162, 122, 255, .68); box-shadow: 0 0 0 3px rgba(162, 122, 255, .09); outline: 0; }
.prompt-wrap { overflow: hidden; border-radius: 13px; background: #0d0b12; }
.prompt-wrap textarea { display: block; border-radius: 13px 13px 0 0; border-bottom: 0; }
.prompt-hints { display: flex; justify-content: space-between; gap: 15px; padding: 8px 13px; border: 1px solid #393141; border-top: 0; border-radius: 0 0 13px 13px; color: #756d80; font-size: 8px; }
.reference-panel { margin-top: 22px; padding: 0 16px 16px; border: 1px solid rgba(176, 135, 255, .2); border-radius: 17px; background: rgba(151, 102, 239, .035); }
.upload-zone { min-height: 122px; display: flex !important; flex-direction: column; align-items: center !important; justify-content: center !important; gap: 5px; margin-bottom: 0 !important; border: 1px dashed rgba(186, 149, 255, .36); border-radius: 14px; background: rgba(255, 255, 255, .018); cursor: pointer; text-align: center; }
.upload-zone.dragging { border-color: var(--pink); background: rgba(255, 119, 174, .055); }
.upload-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(162, 122, 255, .12); color: #c4a9fa; font-size: 17px; }
.upload-zone strong { font-size: 10px; }
.upload-zone small { max-width: 390px; color: var(--muted); font-size: 8px; }
.image-preview { display: grid; grid-template-columns: 58px 1fr 28px; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: #0e0c14; }
.image-preview img { width: 58px; height: 58px; border-radius: 9px; object-fit: cover; }
.image-preview strong, .image-preview span { display: block; }
.image-preview strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.image-preview span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.image-preview button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.03); color: #cbbfd3; cursor: pointer; }
.consent-check, .paid-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; cursor: pointer; }
.consent-check input, .paid-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--violet); }
.consent-check strong, .consent-check small, .paid-check strong, .paid-check small { display: block; }
.consent-check strong, .paid-check strong { color: #dcd4e3; font-size: 9px; }
.consent-check small, .paid-check small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.setting-block { margin-top: 24px; }
.choice-row { display: grid; gap: 9px; }
.frame-choices { grid-template-columns: repeat(3, 1fr); }
.choice { min-height: 75px; display: grid; grid-template-columns: 29px 1fr; grid-template-rows: 1fr 1fr; align-items: center; column-gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.015); cursor: pointer; }
.choice.active { border-color: rgba(172, 127, 255, .43); background: rgba(151, 100, 245, .075); }
.ratio-icon { grid-row: 1 / 3; place-self: center; display: block; border: 1.5px solid #a68abe; border-radius: 3px; background: rgba(166,138,190,.08); }
.ratio-icon.portrait { width: 14px; height: 24px; }
.ratio-icon.landscape { width: 25px; height: 15px; }
.ratio-icon.square { width: 20px; height: 20px; }
.choice strong { align-self: end; font-size: 10px; }
.choice small { align-self: start; color: var(--muted); font-size: 8px; }
.duration-choices { grid-template-columns: repeat(4, 1fr); }
.resolution-choices { grid-template-columns: repeat(2, 1fr); }
.duration-choice { min-height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.015); color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 750; }
.duration-choice.active { border-color: rgba(172, 127, 255, .45); background: rgba(151, 100, 245, .09); color: #e3d5fd; }
.locked-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.locked-settings.single-setting { grid-template-columns: 1fr; }
.locked-settings > div { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.setting-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: rgba(162, 122, 255, .09); color: #c8aff7; font-size: 8px; font-weight: 900; }
.locked-settings strong, .locked-settings small { display: block; }
.locked-settings strong { font-size: 9px; }
.locked-settings small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.locked-settings i { color: #847b8e; font-size: 7px; font-style: normal; }
.form-error { margin-top: 14px; padding: 11px 12px; border: 1px solid rgba(255, 120, 149, .24); border-radius: 11px; background: rgba(255, 120, 149, .065); color: #ffadbd; font-size: 10px; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.estimate-compact span, .estimate-compact strong, .estimate-compact small { display: block; }
.estimate-compact span { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .8px; }
.estimate-compact strong { margin-top: 3px; color: #f1cedd; font-size: 17px; letter-spacing: -.5px; }
.estimate-compact small { max-width: 290px; margin-top: 3px; color: var(--muted); font-size: 7.5px; }
.generate-button { flex: 0 0 auto; min-width: 176px; }
.render-summary { position: sticky; top: calc(var(--topbar) + 20px); overflow: hidden; padding: 22px; }
.empty-output { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.film-icon { position: relative; width: 112px; height: 162px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.11); border-radius: 19px; background: radial-gradient(circle at 70% 20%, rgba(255, 130, 179, .22), transparent 30%), linear-gradient(160deg, #20172a, #0d0b13 75%); box-shadow: inset 0 0 40px rgba(153, 91, 227, .09); }
.film-icon:before, .film-icon:after { content: ""; position: absolute; left: 8px; right: 8px; height: 4px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 8px, transparent 8px 15px); }
.film-icon:before { top: 8px; }
.film-icon:after { bottom: 8px; }
.film-icon span { width: 39px; height: 39px; display: grid; place-items: center; padding-left: 2px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: rgba(255,255,255,.07); color: #cdb7f0; font-size: 11px; }
.empty-output h3 { margin-top: 19px; font-size: 13px; }
.empty-output p { max-width: 220px; margin: 8px auto 0; color: var(--muted); font-size: 9px; }
.summary-security { display: flex; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.summary-security > span { color: #c6a9f8; }
.summary-security p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.summary-security strong { color: #cfc7d7; }

.active-job { min-height: 116px; padding: 21px; }
.active-job.empty-job { display: flex; align-items: center; gap: 15px; }
.job-empty-icon { width: 45px; height: 45px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: rgba(162, 122, 255, .08); color: #ae91e4; font-size: 22px; }
.empty-job h3 { font-size: 13px; }
.empty-job p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.history-list { display: grid; gap: 10px; }
.history-empty { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed rgba(255,255,255,.12); border-radius: var(--radius-md); color: var(--muted); text-align: center; }
.history-empty span { color: #9b7bd5; }
.history-empty p { margin: 0; font-size: 10px; }

.stack-card { padding: clamp(22px, 3.4vw, 36px); }
.stack-badge { border-color: rgba(162, 122, 255, .22); background: rgba(162, 122, 255, .055); color: #cbb3fb; }
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-top: 29px; }
.stack-grid article { position: relative; overflow: hidden; min-height: 235px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(150deg, rgba(255,255,255,.028), rgba(255,255,255,.008)); }
.stack-number { position: absolute; top: 13px; right: 14px; color: #50485a; font-size: 8px; font-weight: 850; letter-spacing: 1px; }
.stack-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: rgba(162, 122, 255, .095); color: #c7a9ff; font-size: 13px; }
.stack-grid h3 { margin-top: 37px; font-size: 12px; }
.stack-grid p { margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.truth-banner { display: flex; gap: 13px; margin-top: 14px; padding: 14px 16px; border: 1px solid rgba(255, 206, 120, .18); border-radius: 13px; background: rgba(255, 206, 120, .045); }
.truth-banner > span { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: rgba(255,206,120,.11); color: var(--yellow); font-size: 10px; font-weight: 900; }
.truth-banner p { margin: 2px 0 0; color: #c5b9a9; font-size: 9px; }
.truth-banner strong { color: #e6d6bf; }
.mobile-nav { display: none; }
footer { display: flex; justify-content: space-between; gap: 20px; margin-left: var(--sidebar); padding: 20px clamp(22px, 4.3vw, 72px) 33px; border-top: 1px solid var(--line); color: #625b6a; font-size: 9px; }

@media (max-width: 1120px) {
  :root { --sidebar: 78px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item > span:not(.nav-icon):not(.nav-badge), .sidebar-foot { display: none; }
  .nav-badge { position: absolute; top: 6px; right: 8px; }
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .quick-card { grid-column: 1 / -1; min-height: 175px; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --topbar: 66px; }
  .topbar { padding: 0 15px; }
  .health-chip { width: 35px; min-height: 35px; justify-content: center; padding: 0; }
  .health-chip > span:last-child { display: none; }
  .owner-copy, .owner-button > svg { display: none; }
  .owner-button { min-height: 38px; padding: 3px; border: 0; background: none; }
  .owner-avatar { width: 34px; height: 34px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-content { padding: 32px 15px 104px; }
  .section-anchor + .section-anchor { margin-top: 66px; }
  h1 { font-size: 48px; letter-spacing: -3px; }
  .welcome-row { align-items: flex-start; }
  .welcome-cta { display: none; }
  .overview-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 27px; }
  .health-card, .budget-card, .quick-card { min-height: auto; }
  .quick-card { grid-column: auto; }
  .quick-card .button { margin-top: 10px; }
  .studio-grid { grid-template-columns: 1fr; }
  .render-summary { position: static; }
  .empty-output { min-height: 270px; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav { position: fixed; z-index: 29; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-around; padding: 8px 8px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); background: rgba(13, 11, 19, .94); backdrop-filter: blur(20px); }
  .mobile-nav a { position: relative; min-width: 58px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #8e8598; text-decoration: none; }
  .mobile-nav a > span { font-size: 17px; }
  .mobile-nav a > small { font-size: 8px; font-weight: 700; }
  .mobile-nav a.active { color: #cfb4ff; }
  .mobile-nav i { position: absolute; top: -2px; right: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px #17121f; }
  footer { margin-left: 0; padding: 20px 15px 92px; }
}

@media (max-width: 560px) {
  .brand-logo { width: 35px; height: 35px; }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { font-size: 7px; }
  h1 { font-size: 42px; }
  .lead { font-size: 13px; }
  .section-heading { display: block; }
  .section-heading .verified-note, .stack-badge { display: inline-flex; margin-top: 13px; }
  .creator-form { padding: 17px; }
  .mode-switcher { grid-template-columns: 1fr; }
  .field-group { margin-top: 20px; }
  .prompt-hints span:last-child { display: none; }
  .frame-choices { gap: 6px; }
  .choice { grid-template-columns: 24px 1fr; padding: 8px 7px; }
  .locked-settings { grid-template-columns: 1fr; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .generate-button { width: 100%; }
  .stack-grid { grid-template-columns: 1fr; }
  .stack-grid article { min-height: auto; }
  .stack-grid h3 { margin-top: 27px; }
  footer { display: block; text-align: center; }
  footer span { display: block; margin-top: 4px; }
}
