@font-face {
  font-family: "Geist";
  src: url("/static/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090f1c;
  --bg-deep: #070b14;
  --surface: #101827;
  --surface-raised: #151f31;
  --surface-soft: #1b2638;
  --text: #f7f5ef;
  --text-soft: #aab4c5;
  --text-faint: #758196;
  --accent: #ff9d18;
  --accent-hover: #ffb33f;
  --accent-ink: #211303;
  --success: #72d3a4;
  --danger: #ff776d;
  --line: rgba(226, 234, 247, 0.12);
  --line-strong: rgba(226, 234, 247, 0.21);
  --radius-card: 22px;
  --radius-inner: 16px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --shadow: 0 30px 90px rgba(2, 7, 16, 0.38);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 84% 5%, rgba(255, 157, 24, 0.1), transparent 27rem),
    radial-gradient(circle at 12% 32%, rgba(74, 99, 138, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: "Geist", "Avenir Next", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.site-noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.025;
  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='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.site-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(9, 15, 28, 0.84);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 18px 55px rgba(2, 7, 16, 0.26), inset 0 1px rgba(255, 255, 255, 0.05);
  transform: translateX(-50%);
}

.brand-button {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-button img,
.footer-brand img,
.auth-brand img {
  border-radius: 11px;
}

.brand-button span,
.footer-brand strong,
.auth-brand span {
  font-size: 1.1rem;
  font-weight: 780;
  letter-spacing: -0.035em;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav nav a,
.nav-promise,
.text-button {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 570;
  transition: color 500ms var(--ease);
}

.site-nav nav a:hover,
.text-button:hover {
  color: var(--text);
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px 13px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  cursor: pointer;
  font-weight: 670;
  transition:
    transform 550ms var(--ease),
    background 550ms var(--ease),
    border-color 550ms var(--ease),
    color 550ms var(--ease),
    opacity 550ms var(--ease);
}

.button i {
  font-size: 1.05rem;
  transition: transform 550ms var(--ease);
}

.button:hover i {
  transform: translate(2px, -2px);
}

.button:active,
.icon-button:active,
.app-nav-item:active {
  transform: scale(0.975);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35);
}

.button-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.button-secondary:hover {
  border-color: rgba(255, 157, 24, 0.5);
  background: rgba(255, 157, 24, 0.07);
  transform: translateY(-2px);
}

.button-large {
  min-height: 54px;
  padding: 0 23px;
}

.marketing-view {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-section {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
  align-items: center;
  gap: clamp(48px, 7vw, 108px);
  padding: 108px 20px 64px;
}

.hero-copy {
  padding-left: clamp(0px, 4vw, 48px);
}

.eyebrow {
  width: max-content;
  margin: 0 0 22px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 157, 24, 0.25);
  border-radius: var(--radius-pill);
  background: rgba(255, 157, 24, 0.08);
  color: #ffc46d;
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(3.65rem, 6vw, 6.7rem);
  line-height: 0.93;
  letter-spacing: -0.075em;
  font-weight: 790;
}

.hero-copy h1 span {
  color: var(--accent);
}

.hero-subtitle {
  max-width: 550px;
  margin: 30px 0 0;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 25px;
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 620;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-proof span::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.hero-ingest-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.72fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-card) + 8px);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.06);
}

.hero-ingest {
  min-height: 520px;
  padding: 30px;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 20% 5%, rgba(255, 157, 24, 0.08), transparent 18rem),
    var(--surface);
}

.ingest-top {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 42px;
}

.ingest-top span,
.difference-label,
.app-topbar span,
.create-intro > span,
.library-summary,
.drawer-panel header span {
  color: var(--text-faint);
  font-size: 0.77rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ingest-top strong {
  font-size: 1.23rem;
  letter-spacing: -0.025em;
}

.hero-upload,
.studio-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed rgba(255, 157, 24, 0.42);
  border-radius: var(--radius-inner);
  background: rgba(255, 157, 24, 0.045);
  cursor: pointer;
  transition:
    transform 600ms var(--ease),
    border-color 600ms var(--ease),
    background 600ms var(--ease);
}

.hero-upload {
  min-height: 238px;
}

.hero-upload:hover,
.studio-upload:hover,
.studio-upload.dragging {
  border-color: var(--accent);
  background: rgba(255, 157, 24, 0.09);
  transform: translateY(-3px);
}

.hero-upload input,
.studio-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hero-upload i,
.studio-upload i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.35rem;
}

.hero-upload span {
  font-size: 1.06rem;
  font-weight: 680;
}

.hero-upload small,
.studio-upload span,
.field-block small,
.mode-section small {
  margin-top: 7px;
  color: var(--text-faint);
  line-height: 1.45;
}

.youtube-field {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.025);
}

.youtube-field em {
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 650;
  text-transform: uppercase;
}

.hero-ingest > p {
  margin: 24px 0 0;
  color: var(--text-faint);
  font-size: 0.78rem;
  text-align: center;
}

.hero-result-preview {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background:
    linear-gradient(155deg, rgba(255, 157, 24, 0.16), transparent 42%),
    #0b121f;
}

.preview-frame,
.example-video {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 12px;
  border-radius: var(--radius-inner);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 157, 24, 0.19), transparent 38%),
    linear-gradient(180deg, #152037, #070b13);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
}

.preview-frame::before,
.example-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.04), transparent 58%);
  transform: translateX(-100%);
  animation: previewSweep 7s var(--ease) infinite;
}

.preview-frame img,
.example-video img {
  border-radius: 24%;
}

.preview-frame strong,
.example-video strong {
  position: relative;
  text-align: center;
  color: var(--text);
  font-size: clamp(0.82rem, 1.15vw, 1.12rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.caption-preview,
.example-video p {
  position: relative;
  margin: 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(5, 8, 14, 0.72);
  color: var(--text);
  font-size: 0.66rem;
  line-height: 1.35;
  text-align: center;
}

.caption-preview span,
.example-video mark {
  color: var(--accent);
  background: transparent;
}

.preview-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.preview-note span {
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.65rem;
}

.audience-strip {
  width: min(920px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 40px);
  margin: 10px auto 140px;
  padding: 24px;
  color: var(--text-soft);
  font-size: 0.87rem;
  font-weight: 580;
}

.quick-value {
  width: min(1120px, calc(100% - 40px));
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: clamp(22px, 4vw, 54px);
  margin: 0 auto 70px;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.landing-proof,
.landing-example {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.landing-proof {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 7vw, 90px);
  padding: clamp(34px, 5vw, 64px);
}

.proof-copy h2 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(2.25rem, 4.2vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.proof-copy > p:last-child {
  max-width: 58ch;
  margin: 22px 0 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.feature-checks {
  display: grid;
  align-content: center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-checks span {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.82rem;
  font-weight: 570;
}

.feature-checks i {
  color: var(--accent);
  font-size: 1rem;
}

.landing-example {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 30px;
}

.landing-example > i {
  color: var(--accent);
  font-size: 1.35rem;
}

.example-source,
.example-output {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 25px;
  border-radius: var(--radius-inner);
  background: rgba(255, 255, 255, 0.028);
}

.example-source > span,
.example-output > span {
  margin-bottom: 18px;
  color: var(--text-faint);
  font-size: 0.7rem;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.example-source strong {
  font-size: 1.04rem;
  line-height: 1.5;
}

.example-source small {
  margin-top: 14px;
  color: var(--text-faint);
  line-height: 1.5;
}

.example-output {
  border: 1px solid rgba(255, 157, 24, 0.24);
  background: rgba(255, 157, 24, 0.055);
}

.example-output > strong {
  color: #fff;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.example-output > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.example-output b {
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text-soft);
  font-size: 0.65rem;
}

.quick-value > div {
  display: grid;
  gap: 7px;
}

.quick-value > div span {
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quick-value > div strong {
  font-size: 1rem;
  line-height: 1.35;
}

.quick-value > i {
  color: var(--accent);
  font-size: 1.25rem;
}

.audience-strip i {
  color: var(--accent);
}

.difference-section,
.examples-section,
.workflow-section {
  padding: 96px 20px 140px;
}

.section-copy {
  max-width: 720px;
  margin-bottom: 52px;
}

.section-copy h2,
.workflow-heading h2,
.closing-section h2,
.create-intro h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.section-copy p,
.create-intro p {
  max-width: 610px;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

.difference-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 14px;
}

.difference-grid article,
.example-large,
.example-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.difference-grid article {
  min-height: 480px;
  padding: clamp(28px, 4vw, 50px);
}

.difference-before {
  background: #0c131f;
}

.difference-after {
  background:
    radial-gradient(circle at 90% 5%, rgba(255, 157, 24, 0.11), transparent 22rem),
    var(--surface);
}

.difference-grid h3 {
  margin: 48px 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  letter-spacing: -0.05em;
}

.difference-grid p,
.example-large > div:last-child p,
.example-copy p,
.workflow-steps p {
  max-width: 48ch;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.62;
}

.source-timeline {
  height: 138px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 68px;
  padding: 18px;
  border-radius: var(--radius-inner);
  background: rgba(255, 255, 255, 0.035);
}

.source-timeline span {
  height: 22px;
  border-radius: 4px;
}

.dead-zone {
  flex: 1;
  background: #293445;
}

.dead-zone.long {
  flex: 2.2;
}

.good-zone {
  flex: 0.52;
  background: var(--accent);
  box-shadow: 0 0 25px rgba(255, 157, 24, 0.18);
}

.good-zone.short {
  flex: 0.32;
}

.output-stack {
  display: grid;
  gap: 8px;
  margin-top: 48px;
}

.output-stack div {
  min-height: 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.03);
}

.output-stack span {
  color: var(--text-faint);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.output-stack strong {
  font-size: 0.9rem;
}

.output-stack em {
  color: var(--success);
  font-size: 0.72rem;
  font-style: normal;
}

.examples-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 14px;
}

.example-large {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) 1fr;
  align-items: center;
  gap: clamp(30px, 5vw, 72px);
  padding: clamp(22px, 4vw, 46px);
  background:
    linear-gradient(145deg, rgba(255, 157, 24, 0.08), transparent 46%),
    var(--surface);
}

.example-video {
  max-width: 310px;
  justify-self: center;
}

.example-large > div:last-child h3,
.example-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 3vw, 2.65rem);
  letter-spacing: -0.05em;
}

.example-side {
  display: grid;
  gap: 14px;
}

.example-copy {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  background: #0d1522;
}

.example-copy i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: var(--radius-control);
  background: rgba(255, 157, 24, 0.1);
  color: var(--accent);
  font-size: 1.35rem;
}

.workflow-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(50px, 9vw, 140px);
  align-items: start;
}

.workflow-heading {
  position: sticky;
  top: 130px;
}

.workflow-heading .eyebrow {
  margin-bottom: 26px;
}

.workflow-steps {
  display: grid;
}

.workflow-steps article {
  min-height: 220px;
  display: grid;
  grid-template-columns: 60px 1fr;
  align-content: center;
  column-gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.workflow-steps article:first-child {
  border-top: 1px solid var(--line);
}

.workflow-steps i {
  grid-row: 1 / span 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-inner);
  background: var(--surface);
  color: var(--accent);
  font-size: 1.45rem;
}

.workflow-steps h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  letter-spacing: -0.035em;
}

.closing-section {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 20px 100px;
  padding: 70px 30px;
  border: 1px solid rgba(255, 157, 24, 0.2);
  border-radius: calc(var(--radius-card) + 8px);
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 157, 24, 0.18), transparent 24rem),
    var(--surface);
  text-align: center;
}

.closing-section img {
  margin-bottom: 34px;
  border-radius: 24px;
}

.closing-section h2 {
  max-width: 800px;
}

.closing-section p {
  margin: 22px 0 30px;
  color: var(--text-soft);
  font-size: 1.1rem;
}

.site-footer {
  min-height: 120px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0 20px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.84rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.site-footer .text-button {
  justify-self: end;
}

/* Workspace */
.app-view {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 250px 1fr;
  background: var(--bg-deep);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: #0a111d;
}

.app-sidebar > .brand-button {
  margin: 0 8px 40px;
}

.app-sidebar nav {
  display: grid;
  gap: 5px;
}

.app-nav-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  transition:
    color 500ms var(--ease),
    background 500ms var(--ease),
    transform 500ms var(--ease);
}

.app-nav-item i {
  font-size: 1.15rem;
}

.app-nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.app-nav-item.active {
  color: #ffd08c;
  background: rgba(255, 157, 24, 0.1);
}

.sidebar-account {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 10px 0;
  border-top: 1px solid var(--line);
}

.sidebar-account > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-account strong,
.sidebar-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account strong {
  font-size: 0.84rem;
}

.sidebar-account span {
  color: var(--text-faint);
  font-size: 0.73rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    border-color 500ms var(--ease),
    background 500ms var(--ease),
    transform 500ms var(--ease);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.app-main {
  min-width: 0;
}

.app-topbar {
  height: 94px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(24px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.88);
}

.app-topbar > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-topbar h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.app-topbar .button {
  margin-left: auto;
}

.mobile-menu-button {
  display: none;
}

.app-panel {
  padding: clamp(28px, 4vw, 58px);
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.generation-list {
  display: grid;
  gap: 12px;
}

.generation-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(190px, 0.7fr) auto;
  align-items: center;
  gap: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
  transition:
    transform 600ms var(--ease),
    border-color 600ms var(--ease),
    background 600ms var(--ease);
}

.generation-card:hover {
  border-color: rgba(255, 157, 24, 0.28);
  background: var(--surface-raised);
  transform: translateY(-3px);
}

.generation-primary {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.generation-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
  background: rgba(255, 157, 24, 0.1);
  color: var(--accent);
  font-size: 1.25rem;
}

.generation-primary h2 {
  overflow: hidden;
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-primary p,
.generation-meta span {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.generation-progress {
  display: grid;
  gap: 9px;
}

.generation-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.progress-line {
  height: 5px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
}

.progress-line span,
.upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 800ms var(--ease);
}

.generation-meta {
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 157, 24, 0.1);
  color: #ffc978;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: capitalize;
}

.status-badge.complete {
  background: rgba(114, 211, 164, 0.1);
  color: var(--success);
}

.status-badge.failed,
.status-badge.canceled {
  background: rgba(255, 119, 109, 0.1);
  color: var(--danger);
}

.empty-state {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  text-align: center;
  background: rgba(255, 255, 255, 0.018);
}

.empty-state i {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: var(--radius-inner);
  background: rgba(255, 157, 24, 0.1);
  color: var(--accent);
  font-size: 1.7rem;
}

.empty-state h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.empty-state p {
  max-width: 430px;
  margin: 0 0 24px;
  color: var(--text-soft);
  line-height: 1.55;
}

.generation-skeleton {
  min-height: 98px;
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent),
    var(--surface);
  background-size: 220% 100%;
  animation: skeleton 1.8s var(--ease) infinite;
}

.create-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(520px, 1.28fr);
  align-items: start;
  gap: clamp(50px, 8vw, 120px);
}

.create-intro {
  position: sticky;
  top: 140px;
}

.create-intro h2 {
  margin-top: 18px;
  font-size: clamp(2.6rem, 4.4vw, 4.9rem);
}

.generation-form {
  display: grid;
  gap: 28px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-card) + 8px);
  background: rgba(255, 255, 255, 0.025);
}

.generation-form > *:not(.studio-upload) {
  margin-left: 22px;
  margin-right: 22px;
}

.generation-form > .form-submit {
  margin-bottom: 22px;
}

.studio-upload {
  min-height: 230px;
  margin: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.studio-upload strong {
  font-size: 1.05rem;
}

.field-block,
.mode-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 590;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: 0;
  background: #0b1320;
  color: var(--text);
  transition:
    border-color 450ms var(--ease),
    box-shadow 450ms var(--ease),
    background 450ms var(--ease);
}

input,
select {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  min-height: 126px;
  padding: 14px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #657187;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(255, 157, 24, 0.58);
  background: #0d1624;
  box-shadow: 0 0 0 3px rgba(255, 157, 24, 0.09);
}

.mode-section > div:first-child {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.mode-section > div:first-child small {
  margin: 0;
  text-align: right;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mode-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.mode-lock {
  display: none;
}

.mode-option.locked .mode-lock {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 177, 58, 0.45);
  border-radius: 9px;
  background: rgba(7, 11, 20, 0.92);
  color: var(--accent);
  font-size: 1rem;
  margin: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.mode-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mode-option > span {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
  transition:
    border-color 500ms var(--ease),
    background 500ms var(--ease),
    transform 500ms var(--ease);
}

.mode-option:not(.locked):hover > span {
  transform: translateY(-2px);
}

.mode-option input:checked ~ span {
  border-color: rgba(255, 157, 24, 0.58);
  background: rgba(255, 157, 24, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 157, 24, 0.1);
}

.mode-option i {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 1.25rem;
}

.mode-option strong {
  color: var(--text);
}

.mode-option small {
  min-height: 36px;
  margin: 5px 0 14px;
  font-weight: 430;
}

.mode-option em {
  margin-top: auto;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 580;
}

.mode-option.locked {
  cursor: pointer;
}

.mode-option.locked > span {
  opacity: 0.58;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.subtitle-picker {
  min-width: 0;
  padding: 0;
  border: 0;
}

.subtitle-picker legend {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 590;
}

.subtitle-picker legend small {
  color: var(--text-faint);
  font-weight: 430;
}

.subtitle-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.subtitle-options label {
  min-width: 0;
  cursor: pointer;
}

.subtitle-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.caption-swatch {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: #0a111d;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 0.77rem;
  font-weight: 900;
  text-align: center;
  transition: border-color 300ms ease, background 300ms ease, transform 300ms ease;
}

.subtitle-options input:checked + .caption-swatch {
  border-color: var(--accent);
  background: rgba(255, 157, 24, 0.07);
  transform: translateY(-2px);
}

.caption-swatch small {
  color: var(--text-faint);
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 520;
}

.caption-line {
  display: inline-block;
  line-height: 1.08;
}

.word-pop .caption-line {
  color: #fff;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 0.86rem;
  text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000;
}

.word-pop b {
  color: #ff9d00;
}

.single-word b {
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.72);
  color: #ff9d00;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 1.08rem;
}

.boxed-punch .caption-line {
  padding: 7px 8px;
  background: #050505;
  color: #fff;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 0.72rem;
}

.creator-bold .caption-line {
  padding: 7px 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffff00;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 0.78rem;
}

.creator-bold b {
  color: #ffff00;
}

.karaoke-glow .caption-line {
  color: #fff;
  font-family: Verdana, sans-serif;
  font-size: 0.72rem;
  text-shadow: 0 0 5px #008aff, 1px 1px #008aff;
}

.karaoke-glow b {
  color: #38fffc;
}

.editorial-clean .caption-line {
  color: #f1eee8;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: none;
}

.neon-pop .caption-line {
  color: #fff;
  font-family: Arial, sans-serif;
  text-shadow: 0 0 5px #d42aff, 1px 1px #d42aff, -1px -1px #d42aff;
}

.neon-pop b {
  color: #ffff00;
}

.high-contrast .caption-line {
  color: #ffff00;
  font-family: "Arial Black", Arial, sans-serif;
  text-shadow: -2px -2px #000, 2px -2px #000, -2px 2px #000, 2px 2px #000;
}

.toast-region {
  position: fixed;
  top: 104px;
  right: 22px;
  z-index: 70;
  width: min(390px, calc(100% - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.reward-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 15px 48px 15px 15px;
  border: 1px solid rgba(255, 157, 24, 0.4);
  border-radius: var(--radius-inner);
  background: rgba(16, 24, 39, 0.96);
  box-shadow: 0 24px 70px rgba(2, 7, 16, 0.46), inset 0 1px rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  animation: rewardIn 520ms var(--ease) both;
}

.reward-toast.leaving {
  animation: rewardOut 280ms ease both;
}

.reward-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.25rem;
}

.reward-toast strong {
  display: block;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.reward-toast p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.reward-toast > button:not(.reward-close) {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 680;
}

.reward-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  z-index: 65;
  overflow: hidden;
  pointer-events: none;
}

.celebration-layer span {
  position: absolute;
  top: -18px;
  left: var(--x);
  width: 7px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
  animation: confettiFall 1.55s var(--ease) var(--delay) both;
}

.celebration-layer span:nth-child(3n) {
  background: #f7f5ef;
}

.celebration-layer span:nth-child(4n) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffc66f;
}

@keyframes rewardIn {
  from { opacity: 0; transform: translateX(28px) scale(0.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes rewardOut {
  to { opacity: 0; transform: translateX(22px) scale(0.98); }
}

@keyframes confettiFall {
  from { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0); }
  12% { opacity: 1; }
  to { opacity: 0; transform: translate3d(var(--drift), 102vh, 0) rotate(var(--spin)); }
}

.check-row {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.82rem;
  cursor: pointer;
}

.check-row input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
}

.form-submit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.78rem;
  line-height: 1.45;
}

.form-submit .form-message {
  margin-right: auto;
}

.account-grid,
.admin-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.balance-card,
.account-card {
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.balance-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 157, 24, 0.15), transparent 20rem),
    var(--surface);
}

.balance-card span {
  color: var(--text-faint);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.balance-card strong {
  margin: auto 0 0;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.balance-card p {
  margin: 16px 0 0;
  color: var(--text-soft);
}

.panel-heading h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.panel-heading p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.plan-cards {
  display: grid;
  gap: 9px;
  margin-top: 24px;
}

.featured-plans-card {
  grid-column: 1 / -1;
}

.featured-plan-cards,
.upgrade-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.featured-plan-card {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.025);
}

.featured-plan-card.popular {
  border-color: rgba(255, 157, 24, 0.48);
  background: rgba(255, 157, 24, 0.055);
}

.popular-label {
  position: absolute;
  top: 17px;
  right: 17px;
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.62rem;
  font-weight: 760;
  text-transform: uppercase;
}

.plan-price {
  color: var(--text-faint);
  font-size: 0.76rem;
}

.featured-plan-card > strong {
  margin-top: 14px;
  font-size: 1.65rem;
  letter-spacing: -0.045em;
}

.featured-plan-card > p {
  margin: 6px 0 0;
  color: var(--accent);
  font-weight: 650;
}

.featured-plan-card ul {
  display: grid;
  gap: 9px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.featured-plan-card li {
  display: flex;
  gap: 8px;
}

.featured-plan-card li i {
  color: var(--accent);
}

.featured-plan-card .button {
  width: 100%;
  margin-top: auto;
}

.plan-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: rgba(255, 255, 255, 0.025);
}

.plan-card > span,
.plan-card > p {
  color: var(--text-faint);
  font-size: 0.76rem;
}

.plan-card strong {
  grid-column: 1;
}

.plan-card p {
  grid-column: 1;
  margin: 0;
}

.plan-card button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}

.plan-card.active {
  border-color: rgba(255, 157, 24, 0.38);
}

.promo-card {
  align-self: start;
}

.promo-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 22px;
}

.promo-admin-form {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.7fr;
  gap: 10px;
  margin: 24px 0;
}

.promo-admin-form label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.promo-admin-form button {
  grid-column: 1 / -1;
}

.admin-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.admin-row,
.promo-code-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-inner);
  background: rgba(255, 255, 255, 0.025);
}

.admin-row > div,
.promo-code-item > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-row span,
.promo-code-item span {
  color: var(--text-faint);
  font-size: 0.7rem;
}

.admin-row input,
.admin-row select,
.promo-code-item input {
  min-height: 38px;
}

.danger {
  color: var(--danger);
}

/* Modal and generation drawer */
.modal,
.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.modal {
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 13, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.modal-panel {
  position: relative;
  width: min(470px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius-card) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.06);
  animation: modalIn 650ms var(--ease) both;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-modal-panel h2,
.upload-modal-panel h2,
.upgrade-modal-panel h2 {
  max-width: 370px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.upgrade-modal-panel {
  width: min(760px, 100%);
}

.upgrade-modal-panel > p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.upgrade-modal-panel .eyebrow {
  margin-bottom: 20px;
}

.upgrade-choices .featured-plan-card {
  min-height: 290px;
}

.more-plans-button {
  width: 100%;
  margin-top: 14px;
  text-align: center;
}

.drawer-waiting {
  min-height: 280px;
  margin-top: 16px;
}

.auth-modal-panel > p:not(.form-message),
.upload-modal-panel > p:not(.eyebrow) {
  margin: 16px 0 28px;
  color: var(--text-soft);
  line-height: 1.55;
}

.auth-modal-panel .field-block {
  margin-top: 14px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-faint);
  font-size: 0.72rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.google-button {
  width: 100%;
}

.upload-modal-panel {
  text-align: center;
}

.upload-modal-panel .eyebrow {
  margin: 0 auto 22px;
}

.upload-modal-panel h2 {
  margin-inline: auto;
}

.upload-motion {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
}

.upload-motion img {
  z-index: 1;
  border-radius: 18px;
}

.upload-motion span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 157, 24, 0.4);
  border-radius: 30px;
  animation: uploadPulse 1.8s var(--ease) infinite;
}

.upload-progress {
  height: 8px;
  overflow: hidden;
  margin: 26px 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.upload-modal-panel > strong {
  display: block;
  color: var(--accent);
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}

.upload-modal-panel > small {
  display: block;
  margin-top: 22px;
  color: var(--text-faint);
  line-height: 1.45;
}

.drawer {
  display: grid;
  grid-template-columns: 1fr minmax(520px, 48vw);
}

.drawer-backdrop {
  border: 0;
  background: rgba(3, 7, 13, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drawer-panel {
  min-width: 0;
  height: 100dvh;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: var(--bg);
  box-shadow: -30px 0 90px rgba(2, 7, 16, 0.4);
  animation: drawerIn 700ms var(--ease) both;
}

.drawer-panel > header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 15, 28, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.drawer-panel header h2 {
  margin: 5px 0 0;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.drawer-content {
  padding: 28px;
}

.drawer-progress {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.drawer-progress h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.drawer-progress p {
  margin: 0 0 24px;
  color: var(--text-soft);
  line-height: 1.5;
}

.drawer-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: var(--text-faint);
  font-size: 0.75rem;
}

.drawer-clips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.clip-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.clip-card video,
.clip-loading {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #050912;
}

.clip-loading {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.clip-card-body {
  padding: 18px;
}

.clip-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.clip-card p {
  min-height: 40px;
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.45;
}

.clip-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-faint);
  font-size: 0.7rem;
}

.clip-card .button {
  width: 100%;
}

.drawer-error {
  padding: 22px;
  border: 1px solid rgba(255, 119, 109, 0.25);
  border-radius: var(--radius-inner);
  background: rgba(255, 119, 109, 0.07);
  color: #ffaaa3;
  line-height: 1.5;
}

@keyframes previewSweep {
  0%,
  55% {
    transform: translateX(-100%);
  }
  85%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes skeleton {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes uploadPulse {
  0% {
    opacity: 0.75;
    transform: scale(0.78);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

/* URL-first conversion and simplified workspace */
.hero-ingest-shell {
  grid-template-columns: minmax(0, 1fr);
  max-width: 660px;
}

.hero-ingest {
  min-height: auto;
}

.hero-youtube-form label,
.source-choice-primary > label {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.youtube-locked {
  user-select: none;
}

.youtube-locked > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.youtube-locked > label em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 177, 58, 0.32);
  border-radius: var(--radius-pill);
  color: var(--accent);
  background: rgba(255, 157, 24, 0.08);
  font-size: 0.66rem;
  font-style: normal;
  letter-spacing: 0.06em;
}

.youtube-locked > label em i {
  color: inherit;
  font-size: 0.8rem;
}

.hero-youtube-form > div,
.source-choice-primary > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border: 1px solid rgba(255, 177, 58, 0.58);
  border-radius: 16px;
  background: rgba(5, 10, 20, 0.9);
  box-shadow: 0 0 0 4px rgba(255, 166, 32, 0.08), 0 20px 55px rgba(0, 0, 0, 0.24);
}

.youtube-locked > div {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(5, 10, 20, 0.48);
  box-shadow: none;
  opacity: 0.68;
}

.youtube-locked input,
.youtube-locked button {
  cursor: not-allowed;
}

.youtube-locked button i {
  margin-right: 6px;
  font-size: 0.9rem;
}

.hero-youtube-form i,
.source-choice-primary i {
  color: var(--accent);
  font-size: 1.35rem;
}

.hero-youtube-form input,
.source-choice-primary input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.source-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.source-divider::before,
.source-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hero-upload.compact,
.studio-upload.compact {
  min-height: 92px;
}

.full-width-create {
  display: block;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.full-width-create .generation-form {
  width: 100%;
}

.source-chooser {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(260px, 0.7fr);
  align-items: center;
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(255, 177, 58, 0.2);
  border-radius: 20px;
  background: rgba(12, 18, 31, 0.86);
}

.source-choice-primary small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.source-chooser > span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.feedback-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: 30px;
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.feedback-card > div > span {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.feedback-card h2 { margin: 8px 0; }
.feedback-card p { color: var(--muted); }
.feedback-card textarea { width: 100%; margin-bottom: 10px; }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.analytics-grid > div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.analytics-grid span,
.analytics-grid strong { display: block; }
.analytics-grid span { color: var(--muted); font-size: 0.75rem; }
.analytics-grid strong { margin-top: 5px; font-size: 1.4rem; }
.feedback-row p { margin: 7px 0; color: var(--text); }
.compact-row { grid-template-columns: 1fr; }

@media (max-width: 820px) {
  .hero-youtube-form > div { grid-template-columns: auto minmax(0, 1fr); }
  .hero-youtube-form button { grid-column: 1 / -1; width: 100%; }
  .source-chooser,
  .feedback-card { grid-template-columns: 1fr; }
  .source-chooser > span { text-align: center; }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 900ms var(--ease),
    transform 900ms var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .site-nav {
    grid-template-columns: 1fr auto;
  }

  .site-nav nav {
    display: none;
  }

  .hero-section {
    grid-template-columns: 1fr;
    padding-top: 140px;
  }

  .hero-copy {
    padding-left: 0;
  }

  .hero-copy h1 {
    max-width: 850px;
  }

  .hero-ingest-shell {
    width: min(800px, 100%);
    justify-self: end;
  }

  .quick-value {
    grid-template-columns: 1fr auto 1fr;
  }

  .quick-value .button {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .difference-grid,
  .workflow-section {
    grid-template-columns: 1fr;
  }

  .workflow-heading {
    position: static;
  }

  .examples-layout {
    grid-template-columns: 1fr;
  }

  .example-side {
    grid-template-columns: 1fr 1fr;
  }

  .create-layout {
    grid-template-columns: 1fr;
  }

  .create-intro {
    position: static;
  }

  .account-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .landing-proof {
    grid-template-columns: 1fr;
  }

  .subtitle-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .toast-region {
    top: 80px;
    right: 16px;
  }

  .reward-toast {
    grid-template-columns: auto 1fr;
  }

  .reward-toast > button:not(.reward-close) {
    grid-column: 1 / -1;
  }

  .marketing-view {
    width: min(100% - 24px, 1280px);
  }

  .site-nav {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 60px;
    padding: 6px 7px 6px 12px;
  }

  .nav-actions .text-button {
    display: none;
  }

  .nav-actions .button {
    min-height: 42px;
    padding-inline: 14px;
  }

  .hero-section,
  .difference-section,
  .examples-section,
  .workflow-section {
    padding-left: 4px;
    padding-right: 4px;
  }

  .hero-section {
    min-height: auto;
    gap: 54px;
    padding-top: 120px;
  }

  .landing-proof,
  .landing-example {
    width: calc(100% - 8px);
  }

  .landing-example {
    grid-template-columns: 1fr;
  }

  .landing-example > i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .feature-checks,
  .featured-plan-cards,
  .upgrade-choices {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: clamp(3.15rem, 15vw, 5.2rem);
  }

  .hero-ingest-shell {
    grid-template-columns: 1fr;
  }

  .hero-ingest {
    min-height: auto;
    padding: 22px;
  }

  .hero-result-preview {
    padding: 22px;
  }

  .preview-frame {
    max-width: 260px;
    margin-inline: auto;
  }

  .audience-strip {
    flex-wrap: wrap;
    margin-bottom: 90px;
  }

  .quick-value {
    width: calc(100% - 8px);
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 42px;
    padding: 24px;
  }

  .quick-value > i {
    transform: rotate(90deg);
  }

  .quick-value .button {
    width: 100%;
  }

  .difference-grid,
  .example-large,
  .example-side {
    grid-template-columns: 1fr;
  }

  .difference-grid article {
    min-height: 430px;
  }

  .example-large > div:last-child {
    text-align: center;
  }

  .workflow-steps article {
    grid-template-columns: 52px 1fr;
    column-gap: 18px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer > p {
    display: none;
  }

  .app-view {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 15;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 650ms var(--ease);
    box-shadow: 30px 0 80px rgba(2, 7, 16, 0.48);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu-button {
    display: grid;
  }

  .app-topbar {
    height: 84px;
    padding: 0 16px;
  }

  .app-topbar .button {
    padding-inline: 14px;
  }

  .app-topbar .button span {
    display: none;
  }

  .app-panel {
    padding: 24px 16px 40px;
  }

  .generation-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .generation-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .mode-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .mode-option > span {
    min-height: 124px;
  }

  .form-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .form-submit .button {
    width: 100%;
  }

  .generation-form > *:not(.studio-upload) {
    margin-left: 14px;
    margin-right: 14px;
  }

  .drawer {
    display: block;
  }

  .drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
  }

  .drawer-panel {
    position: absolute;
    inset: 5dvh 0 0;
    height: 95dvh;
    border-top: 1px solid var(--line);
    border-left: 0;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }

  .drawer-clips {
    grid-template-columns: 1fr;
  }

  .promo-admin-form {
    grid-template-columns: 1fr;
  }

  .promo-admin-form button {
    grid-column: auto;
  }

  .admin-row,
  .promo-code-item {
    grid-template-columns: 1fr 1fr;
  }

  .admin-row > div,
  .promo-code-item > div {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reward-toast,
  .reward-toast.leaving,
  .celebration-layer span {
    animation: none;
  }
}

@media (max-width: 520px) {
  .brand-button span {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .audience-strip {
    justify-content: flex-start;
    padding-inline: 6px;
  }

  .audience-strip i {
    display: none;
  }

  .audience-strip span {
    padding: 8px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
  }

  .difference-section,
  .examples-section,
  .workflow-section {
    padding-top: 70px;
    padding-bottom: 100px;
  }

  .closing-section {
    margin-inline: 4px;
  }

  .modal-panel {
    padding: 28px 22px;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .drawer-content {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-nav,
  .modal,
  .drawer-backdrop,
  .drawer-panel > header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
