:root {
  --bg: #100c0a;
  --panel: #1a1411;
  --panel-2: #241b16;
  --line: #3a2c23;
  --text: #f4f4f6;
  --muted: #9a9aab;
  --accent: #e8452c;
  --accent-2: #f5b841;
  --ok: #34d399;
  --bad: #f87171;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); }
img, video { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(16,12,10,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.credit-pill { background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; color: var(--accent-2) !important; font-weight: 600; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; color: #111; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.google { background: #fff; color: #222; }
input[type=email], input[type=password], input[type=text] { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 6px; }
.error { color: var(--bad); font-size: 14px; min-height: 1.2em; margin: 8px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* hero */
.hero { padding: 48px 0 24px; text-align: center; }
.hero h1 { font-size: clamp(30px, 6vw, 54px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 18px; }

/* generator */
.studio { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0 56px; }
@media (max-width: 820px) { .studio { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h2, .card h3 { margin: 0 0 12px; font-size: 18px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); min-height: 220px; display: grid; place-items: center; text-align: center; cursor: pointer; position: relative; overflow: hidden; padding: 16px; }
.drop:hover, .drop.drag { border-color: var(--accent); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.drop input { display: none; }
.step-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.chip small { display: block; color: var(--muted); font-size: 12px; }
.chip[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cost-row { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px; font-size: 15px; }
.cost-row strong { color: var(--accent-2); font-size: 20px; }
.result { aspect-ratio: 9 / 16; max-height: 640px; background: #000; border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; color: var(--muted); text-align: center; padding: 16px; margin: 0 auto; width: 100%; }
.result video { width: 100%; height: 100%; object-fit: contain; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* sections */
section.block { padding: 40px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .grid3 { grid-template-columns: 1fr; } }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }

/* pricing */
.pack { display: flex; flex-direction: column; gap: 8px; }
.pack .price { font-size: 36px; font-weight: 800; }
.pack .credits { color: var(--accent-2); font-weight: 700; }
.pack.featured { border-color: var(--accent); }
.cost-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cost-table th, .cost-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: flex-end; justify-content: center; z-index: 50; }
.modal.open { display: flex; }
@media (min-width: 640px) { .modal { align-items: center; } }
.modal-body { background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 0 0; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 22px 20px 28px; position: relative; }
@media (min-width: 640px) { .modal-body { border-radius: 18px; } }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.pack-pick { display: grid; gap: 10px; margin: 12px 0 16px; }
.pack-pick button { display: flex; justify-content: space-between; align-items: center; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* auth pages */
.auth { max-width: 420px; margin: 48px auto; }

/* account */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.video-card video { aspect-ratio: 9/16; width: 100%; object-fit: cover; background: #000; border-radius: 10px; }
.video-card .meta { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer a { color: var(--muted); margin-right: 16px; }
.prose { max-width: 760px; margin: 40px auto; }
.prose h1 { letter-spacing: -.02em; }

@media (max-width: 480px) {
  .site-header .wrap { gap: 10px; }
  .logo { font-size: 15px; }
  .nav { gap: 10px; font-size: 14px; white-space: nowrap; }
  .nav a[href="/pricing"], .nav a[href="/outstanding-tiny-desk-ai"] { display: none; }
}

.packs-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1000px) { .packs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .packs-grid { grid-template-columns: 1fr; } }

.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.uploads .drop { min-height: 180px; }
.slot-label { font-size: 14px; font-weight: 600; margin-top: 6px; text-align: center; }
.drop-wide { min-height: 140px; margin-top: 10px; }
#scene-custom input { margin-top: 10px; }

/* video with a big sound button */
.result { position: relative; }
.sound-video { position: absolute; inset: 0; }
.sound-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.sound-btn { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); padding: 14px 26px; font: inherit; font-size: 18px; font-weight: 800; color: #111; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.5); cursor: pointer; animation: pulse 1.6s ease-in-out infinite; white-space: nowrap; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.06); } }

/* pack savings */
.pack { position: relative; }
.pack-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #111; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.save { display: inline-block; align-self: flex-start; background: rgba(52, 211, 153, .15); color: var(--ok); font-weight: 800; font-size: 14px; padding: 3px 10px; border-radius: 8px; }
.save-none { background: var(--panel-2); color: var(--muted); }
.save-inline { color: var(--ok); font-weight: 700; }
.packs-grid { margin-top: 16px; }

/* landing pages */
.landing-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: 24px 0 8px; }
.landing-hero .result { flex: 0 0 auto; width: 100%; }
.prose h2 { margin-top: 32px; }
.prose li { margin-bottom: 6px; }

.ap-slot { min-height: 44px; margin: 4px 0 8px; }

/* compact first screen: the example video is visible right away */
.hero { padding: 18px 0 6px; }
.hero h1 { font-size: clamp(22px, 3.6vw, 36px); margin: 0 0 6px; }
.hero p { font-size: 15px; max-width: 760px; }
.studio { margin: 14px 0 40px; gap: 16px; }
.studio .card { padding: 16px; }
.step-label { margin: 12px 0 6px; font-size: 12px; }
.chip { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.chip small { font-size: 11px; }
.uploads .drop { min-height: 130px; }
.drop-wide { min-height: 100px; }
.cost-row { margin: 12px 0 10px; }
#models { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (max-width: 820px) {
  .studio > .card:nth-child(2) { order: -1; }
  .studio > .card:nth-child(2) .step-label { display: none; }
  .result { max-height: 52vh; }
  #models { grid-template-columns: repeat(2, 1fr); }
  .uploads .drop { min-height: 110px; }
}
@media (min-width: 821px) {
  .result { max-height: max(420px, calc(100vh - 290px)); }
  .hero h1 { font-size: clamp(22px, 2.8vw, 34px); }
}

/* header CTA */
.nav-cta { padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.nav-cta .cta-short { display: none; }
.nav-login { font-size: 14px; }
@media (max-width: 480px) {
  .nav-cta .cta-long { display: none; }
  .nav-cta .cta-short { display: inline; }
  .nav-cta { padding: 7px 12px; }
}
.nav a.btn, .nav a.btn:hover { color: #111; }
.pack .btn { white-space: nowrap; font-size: 14px; padding: 12px 8px; }

/* secondary pay buttons: visible, yellow */
.btn.pay-alt { background: transparent; color: var(--accent-2); border: 2px solid var(--accent-2); }
.btn.pay-alt:hover { background: rgba(255, 178, 26, .1); }
/* both photo slots exactly the same size */
.uploads .drop { height: 140px; min-height: 0; }
.uploads .slot-empty { font-size: 13px; line-height: 1.3; }
@media (max-width: 820px) { .uploads .drop { height: 120px; } }

/* collapsed quality row */
.settings-summary { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--text); font: inherit; cursor: pointer; }
.settings-summary small { display: block; color: var(--accent-2); font-size: 12px; margin-top: 2px; }
.settings-summary[aria-expanded="true"] { border-color: var(--accent); }
.credit-badge { white-space: nowrap; background: rgba(255, 178, 26, .12); color: var(--accent-2); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 13px; }
.btn-make { margin-top: 14px; padding: 15px 20px; font-size: 17px; letter-spacing: .02em; }
.make-line { text-align: center; margin: 8px 0 0; }
.make-line a { color: var(--muted); }
/* header: small sign-in entry */
.nav-login .login-icon { display: none; font-size: 18px; }
@media (max-width: 480px) {
  .nav-login .login-text { display: none; }
  .nav-login .login-icon { display: inline; }
}

/* Band photo slots: lead big, four optional bandmates small. */
.band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.band .lead-slot { grid-column: 1 / -1; }
.band .lead-slot .drop { min-height: 200px; }
.band .drop.small { min-height: 120px; padding: 8px; font-size: 13px; }
.band .drop.small .slot-empty div:first-child { font-size: 24px !important; }
.slot-clear { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
@media (max-width: 520px) { .band { grid-template-columns: repeat(2, 1fr); } }
