/* Rhoma.ai: charcoal surfaces, lime green as the one accent. */
:root {
  --bg: #17181a;
  --bg-2: #1f2023;
  --bg-3: #28292d;
  --line: #34363b;
  --line-2: #44474d;
  --text: #f3f4ef;
  --muted: #a4a89f;
  --lime: #b8f53b;
  --lime-2: #a6e22c;
  --lime-ink: #0f1407;
  --lime-soft: rgba(184, 245, 59, 0.1);
  --bad: #ff8f84;
  --yellow: #ffe14d;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --caption: "Anton", "Impact", sans-serif;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); font-variant-numeric: tabular-nums; }
img, video { max-width: 100%; display: block; }
a { color: var(--lime); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: var(--lime-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 750; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.bad { color: var(--bad); }
.sep::before { content: ", "; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(23, 24, 26, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font: 800 21px/1 var(--display); letter-spacing: -0.02em; }
.brand-name span { color: var(--lime); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--lime); }
.nav form { margin: 0; }
.linkish { background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; padding: 0; }
.linkish:hover { color: var(--text); }
.plan-chip { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.plan-chip b { color: var(--text); font-weight: 700; }
a.plan-chip { text-decoration: none; }
a.plan-chip:hover { border-color: var(--lime); color: var(--text); }

main { padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px) 96px; }
.wide { max-width: 1200px; margin: 0 auto; }
.mid { max-width: 760px; margin: 0 auto; }
.narrow { max-width: 420px; margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--lime); color: var(--lime-ink);
  border: 1.5px solid var(--lime); border-radius: var(--r-sm);
  padding: 11px 20px; font: 700 16px/1.1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--lime-2); border-color: var(--lime-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--line-2); }
.btn-small { padding: 7px 13px; font-size: 14px; }
.btn-wide { width: 100%; margin-top: 12px; }
.btn-lg { padding: 15px 26px; font-size: 17px; border-radius: 12px; }

.pro-badge {
  display: inline-flex; align-items: center; gap: 4px; font: 700 11px/1 var(--body); letter-spacing: 0.04em;
  color: var(--lime); border: 1px solid rgba(184, 245, 59, 0.45); background: var(--lime-soft);
  padding: 3px 7px; border-radius: 6px; vertical-align: 2px;
}
.pro-badge svg { width: 11px; height: 11px; }

/* ---------- messages ---------- */
.notice, .error { border-radius: var(--r-sm); padding: 12px 16px; margin: 0 0 20px; background: var(--bg-2); border-left: 4px solid var(--lime); }
.error { border-left-color: var(--bad); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 15px;
}

/* ---------- landing ---------- */
.hero { max-width: 1100px; margin: 0 auto; text-align: center; padding-top: clamp(12px, 4vw, 40px); }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 18px; }
.hero h1 .accent { color: var(--lime); }
.hero .lede { font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); max-width: 40em; margin: 0 auto 30px; }
.dropbar {
  display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto;
  background: var(--bg-2); border: 1.5px solid var(--lime); border-radius: 18px; padding: 8px;
  box-shadow: 0 0 0 6px var(--lime-soft), var(--shadow);
}
.dropbar.over { background: #23271c; }
.dropbar .link-icon { width: 20px; height: 20px; margin-left: 10px; color: var(--muted); flex: none; }
.dropbar input[type=url] { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: 17px var(--body); padding: 12px 6px; }
.dropbar input[type=url]:focus { outline: none; }
.drop-note { color: var(--muted); font-size: 14px; margin-top: 14px; }

.demo {
  max-width: 1100px; margin: 54px auto 0; border: 1.5px solid rgba(184, 245, 59, 0.55); border-radius: var(--r-lg);
  background: radial-gradient(120% 90% at 50% 0%, #23251f 0%, var(--bg-2) 55%); padding: clamp(20px, 3vw, 36px);
  display: grid; grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.4fr); gap: clamp(16px, 2.5vw, 32px); align-items: center;
}
.demo-long { text-align: left; }
.demo-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, #2c3b52 0%, #3e2d4f 45%, #5b3a2a 100%);
}
.demo-frame::before { content: ""; position: absolute; left: 10%; bottom: 0; width: 30%; height: 72%; border-radius: 50% 50% 0 0; background: rgba(0,0,0,0.28); }
.demo-frame::after { content: ""; position: absolute; left: 17%; bottom: 58%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: rgba(0,0,0,0.28); }
.demo-frame .dur { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,0.7); font-size: 13px; padding: 2px 7px; border-radius: 6px; }
.demo-frame .play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,0.92); }
.demo-frame .play::after { content: ""; position: absolute; left: 21px; top: 16px; border-left: 16px solid #111; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.demo-track { display: flex; gap: 3px; margin-top: 12px; height: 10px; }
.demo-track i { flex: 1; background: var(--bg-3); border-radius: 3px; }
.demo-track i.hit { background: var(--lime); }
.demo-label { margin-top: 10px; font-size: 14px; color: var(--muted); }
.demo-arrow { width: 44px; height: 44px; color: var(--lime); }
.demo-frame.real { background: #000; }
.demo-frame.scene, .demo-clip.scene { background: #1a1c22; }
.demo-frame.scene::before, .demo-frame.scene::after { display: none; }
.demo-frame.scene canvas, .demo-clip.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.demo-clip.scene { padding: 0; }
.demo-clip.scene .score { z-index: 2; top: auto; bottom: 14px; left: auto; right: 8px; font-size: 11px; padding: 3px 5px; }
.demo-frame.scene .dur { z-index: 2; font-size: 11px; padding: 1px 6px; right: 8px; bottom: 8px; }
.demo-frame.real::before, .demo-frame.real::after { display: none; }
.demo-frame.real video, .demo-frame.real img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-timeline { position: relative; height: 10px; margin-top: 12px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.demo-timeline i { position: absolute; top: 0; bottom: 0; background: var(--lime); border-radius: 2px; }
.demo-clips.n1, .demo-clips.n2, .demo-clips.n3 { grid-template-columns: repeat(3, 1fr); }
.demo-clips.n4 { grid-template-columns: repeat(4, 1fr); }
.demo-clip.real { padding: 0; cursor: pointer; background: #000; font: inherit; color: inherit; }
.demo-clip.real video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.demo-clip.real .score { z-index: 2; top: auto; bottom: 8px; left: 8px; font-size: 12px; padding: 4px 6px; }
.demo-clip.real .clip-play { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.55); z-index: 2; transition: opacity .2s; }
.demo-clip.real .clip-play::after { content: ""; position: absolute; left: 15px; top: 11px; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.demo-clip.real.playing .clip-play { opacity: 0; }
.demo-clip.real:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.demo-clips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.demo-clip {
  position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2);
  display: flex; align-items: flex-end; justify-content: center; padding: 10px 6px;
}
.demo-clip .score { position: absolute; top: 8px; left: 8px; background: var(--lime); color: var(--lime-ink); font: 800 14px/1 var(--display); padding: 5px 7px; border-radius: 6px; }
.demo-clip .cap { font: 400 15px/1.05 var(--caption); text-transform: uppercase; color: #fff; text-align: center; text-shadow: 0 0 2px #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; margin-bottom: 18%; }
.demo-clip .cap b { color: var(--yellow); font-weight: 400; }
.demo-clip:nth-child(1) { background: linear-gradient(170deg, #34475f, #1d2633); }
.demo-clip:nth-child(2) { background: linear-gradient(170deg, #4c3352, #241828); }
.demo-clip:nth-child(3) { background: linear-gradient(170deg, #2f4a3b, #16231c); }
.demo-clip:nth-child(4) { background: linear-gradient(170deg, #5a4030, #2a1d15); }
.demo-clip:nth-child(5) { background: linear-gradient(170deg, #3b3b58, #1b1b2b); }

.section { max-width: 1100px; margin: 96px auto 0; }
.section > h2 { font-size: clamp(30px, 3.6vw, 44px); text-align: center; }
.section > .sub { text-align: center; color: var(--muted); max-width: 38em; margin: 0 auto 36px; font-size: 18px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font: 800 16px/1 var(--display); margin-bottom: 14px; }
.steps h3 { font-size: 20px; }
.steps p { color: var(--muted); margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.feature h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }
.cta-band { max-width: 1100px; margin: 96px auto 0; text-align: center; border: 1.5px solid var(--lime); border-radius: var(--r-lg); padding: 48px 24px; background: var(--bg-2); }
.cta-band h2 { font-size: clamp(28px, 3.2vw, 40px); }
.footer { max-width: 1100px; margin: 64px auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; flex-wrap: wrap; gap: 12px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer { width: min(1200px, calc(100% - 48px)); margin: 72px auto 32px; }
.billing-card { max-width: 720px; }
.billing-card .plan-line { font: 800 28px/1.1 var(--display); margin: 6px 0 4px; }
.billing-card .plan-line small { font: 600 15px var(--body); color: var(--muted); margin-left: 6px; }
.billing-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.legal-doc { max-width: 760px; }
.legal-doc h2 { font-size: 22px; margin: 32px 0 8px; }
.legal-doc p, .legal-doc li { color: var(--text-2, var(--text)); line-height: 1.65; }
.legal-doc ul { padding-left: 20px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; display: flex; flex-direction: column; }
.plan.popular { border: 2px solid var(--lime); box-shadow: 0 0 0 6px var(--lime-soft); }
.plan .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--lime); color: var(--lime-ink); font: 800 12px/1 var(--body); letter-spacing: 0.03em; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .tag { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.plan .was { color: var(--muted); text-decoration: line-through; font-size: 17px; height: 22px; }
.plan .price { font: 800 44px/1 var(--display); letter-spacing: -0.03em; }
.plan .price small { font: 400 16px var(--body); color: var(--muted); letter-spacing: 0; }
.plan .billing { color: var(--muted); font-size: 14px; margin: 8px 0 20px; min-height: 21px; }
.plan .save { display: inline-block; background: var(--lime-soft); color: var(--lime); border-radius: 6px; padding: 2px 7px; font-size: 13px; font-weight: 700; margin-left: 6px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; flex: 1; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; font-size: 15px; line-height: 1.4; }
.plan li::before { content: ""; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--lime-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='%23b8f53b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan li.limit::before { background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 8h6' stroke='%23a4a89f' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan li.limit { color: var(--muted); }
.plan-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 16px; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(8, 9, 10, 0.72); backdrop-filter: blur(4px); overflow-y: auto; }
.modal-card { position: relative; width: min(100%, 460px); background: var(--bg-2); border: 1.5px solid var(--lime); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
.modal-card.wide { width: min(100%, 1060px); border-color: var(--line-2); }
.modal-card h2 { font-size: 26px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.modal-head { text-align: center; margin-bottom: 26px; }
.modal-head p { color: var(--muted); margin: 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-3); border-radius: 12px; padding: 4px; margin: 18px 0 6px; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: 700 15px var(--body); padding: 10px; border-radius: 9px; cursor: pointer; }
.tabs button.on { background: var(--bg-2); color: var(--text); box-shadow: 0 1px 0 var(--line-2) inset; }
.file-pill { display: flex; align-items: center; gap: 10px; background: var(--bg-3); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--muted); }
.file-pill b { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- forms ---------- */
.form label, .form legend, .field-label { display: block; font-weight: 700; margin: 18px 0 8px; }
.form fieldset { border: 0; padding: 0; margin: 24px 0 0; min-width: 0; }
.form legend { padding: 0; margin: 0 0 10px; float: left; width: 100%; }
.form legend + * { clear: both; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], textarea, select {
  width: 100%; background: var(--bg-3); color: var(--text);
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; font: 16px/1.4 var(--body);
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23a4a89f' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 34px; }
input:focus, textarea:focus, select:focus { border-color: var(--lime); outline: none; }
input::placeholder, textarea::placeholder { color: #7d8178; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--lime); flex: none; }
.switch-auth { margin-top: 20px; color: var(--muted); }

/* segmented + choice boxes */
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { margin: 0; font-weight: 400; }
.segmented input, .choice input, .style-pick input, .nbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: inline-block; padding: 9px 15px; border: 1.5px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: 15px; }
.segmented input:checked + span { border-color: var(--lime); background: var(--lime-soft); color: var(--lime); font-weight: 700; }
.segmented input:focus-visible + span, .style-pick input:focus-visible + .swatch, .nbox input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }
.nboxes { display: flex; gap: 10px; }
.nbox { margin: 0 !important; }
.nbox span { display: grid; place-items: center; width: 56px; height: 52px; border: 1.5px solid var(--line-2); border-radius: 12px; font: 800 20px/1 var(--display); cursor: pointer; }
.nbox input:checked + span { border-color: var(--lime); background: var(--lime); color: var(--lime-ink); }
.nbox span:hover { border-color: var(--lime); }
.nbox { position: relative; }
.nbox.is-locked span { color: var(--muted); border-style: dashed; }
.nbox-lock { position: absolute; top: -8px; right: -6px; font: 800 9px/1 var(--body); font-style: normal; letter-spacing: .04em; color: var(--lime-ink); background: var(--lime); border-radius: 999px; padding: 3px 5px; pointer-events: none; }

/* ---------- project page (new) ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-title { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 4px; }
.page-head p { margin: 0; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 8px; font-size: 15px; }
.back::before { content: "‹ "; }
.back:hover { color: var(--text); }

.build { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card + .card { margin-top: 18px; }
.card > h2 { font-size: 15px; font-family: var(--body); font-weight: 700; color: var(--muted); letter-spacing: 0.02em; margin: 0 0 4px; }
.card.source { border: 1.5px solid var(--lime); }
.summary { position: sticky; top: 86px; }
.summary h2 { font-size: 20px; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sum-row span:first-child { color: var(--muted); }
.sum-row span:last-child { text-align: right; }
.sum-pro { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sum-pro ul { margin: 6px 0 0; padding-left: 18px; color: var(--text); }
.sum-plan { margin: 16px 0 4px; font-size: 14px; color: var(--muted); }
.sum-plan b { color: var(--text); }
.legal { font-size: 13px; color: var(--muted); text-align: center; margin: 12px 0 0; }

.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 170px; padding: 22px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: var(--bg-3);
}
.drop:hover, .drop.over { border-color: var(--lime); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-main { font-size: 18px; font-weight: 700; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 16px 0; font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.yt-row { display: flex; gap: 8px; }
.yt-row input { flex: 1; }

.file-card { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.file-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.file-thumb video, .file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb .chip { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.72); font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.file-name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; margin-bottom: 2px; }
.file-sub { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.bar { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--lime); transition: width 300ms ease; }
.range-box { margin-top: 14px; }
.range-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.range-head b { color: var(--text); }
.dual { position: relative; height: 34px; }
.dual .track { position: absolute; left: 0; right: 0; top: 13px; height: 8px; border-radius: 99px; background: var(--bg-3); }
.dual .fill { position: absolute; top: 13px; height: 8px; border-radius: 99px; background: var(--lime); }
.dual input[type=range] { position: absolute; left: 0; width: 100%; top: 0; height: 34px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input[type=range]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--text); border: 3px solid var(--lime); cursor: grab; }
.dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 3px solid var(--lime); cursor: grab; }
.dual input[type=range]::-webkit-slider-runnable-track { background: none; }
.range-times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.opt-row:first-of-type { border-top: 0; }
.opt-text { min-width: 0; }
.opt-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-desc { color: var(--muted); font-size: 14px; margin-top: 2px; }
.opt-sub { padding: 0 0 14px; }
.locked { cursor: pointer; }
.locked .opt-title, .locked .opt-desc { opacity: 0.72; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background 150ms; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 150ms; }
.switch input:checked + i { background: var(--lime); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--lime-ink); }
.switch input:focus-visible + i { outline: 3px solid var(--lime); outline-offset: 2px; }
.switch input:disabled { cursor: pointer; }

.style-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.style-picks.three { grid-template-columns: repeat(3, 1fr); }
.style-pick { margin: 0 !important; font-weight: 400 !important; cursor: pointer; position: relative; }
.style-pick .pro-badge { position: absolute; top: 6px; right: 6px; z-index: 1; }
.swatch {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 0 5px;
  height: 92px; padding: 8px; border-radius: 12px; border: 1.5px solid var(--line-2);
  background: linear-gradient(180deg, #34383d, #22252a);
}
.style-pick input:checked + .swatch { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
.style-pick.is-locked .swatch { opacity: 0.6; }
.swatch b { font: 400 16px/1.1 var(--caption); color: #fff; text-shadow: 0 0 2px #000, 1px 1px 0 #000, -1px -1px 0 #000; }
.swatch b.on { color: var(--yellow); }
.swatch b.red { color: #ff3b3b; }
.swatch b.fill { background: linear-gradient(90deg, var(--yellow) 60%, #fff 60%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.swatch b.mark { background: var(--yellow); color: #141a26; text-shadow: none; padding: 1px 4px; border-radius: 4px; }
.swatch-minimal b { font: 700 11px/1.3 var(--body); background: rgba(0,0,0,0.6); padding: 4px 6px; border-radius: 3px; text-shadow: none; }
.swatch-none b.dim { font: 400 13px/1.2 var(--body); color: var(--muted); text-shadow: none; }
.swatch .hk { font: 400 13px/1 var(--caption); padding: 6px 8px; border-radius: 7px; text-transform: uppercase; }
.swatch .hk.sticker { background: var(--yellow); color: #141a26; }
.swatch .hk.clean { background: #fff; color: #141a26; }
.swatch .hk.bold { color: #fff; font-size: 17px; text-shadow: 0 0 3px #000, 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000; }
.pick-label { display: block; text-align: center; margin-top: 6px; font-size: 14px; color: var(--muted); }

/* ---------- projects list ---------- */
.usage-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 22px; }
.usage-card .meter { flex: 1; min-width: 200px; }
.usage-card .meter p { margin: 0 0 8px; }
.project-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.project-row { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 14px; border-radius: var(--r-md); background: var(--bg-2); color: var(--text); text-decoration: none; border: 1px solid var(--line); }
.project-row:hover { border-color: var(--lime); }
.project-row h2 { margin: 0 0 4px; font-size: 18px; font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.project-row p { margin: 0; }
.expiry { font-size: 13px; color: var(--muted); white-space: nowrap; }
.strip { display: flex; gap: 4px; }
.strip img, .strip-empty { width: 40px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 5px; background: var(--bg-3); }
.empty { padding: 48px 0; max-width: 34em; }
.empty-big { font: 800 32px/1.1 var(--display); }

/* ---------- project page / clips ---------- */
.status-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; margin-bottom: 26px; }
.stages { list-style: none; display: flex; gap: 8px 26px; flex-wrap: wrap; padding: 0; margin: 0 0 16px; color: var(--muted); }
.stages .num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); font-size: 13px; font-weight: 700; margin-right: 6px; }
.stages li.active { color: var(--text); font-weight: 700; }
.stages li.active .num { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.stages li.done .num { border-color: var(--lime); color: var(--lime); }
#status-text { margin: 12px 0 0; }
.error-panel { margin-bottom: 26px; }
.error-detail { font-size: 14px; margin: 8px 0 0; }
.error-detail code { color: var(--text); word-break: break-word; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.head-actions form { margin: 0; }
.clip-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px 22px; }
.clip-frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.clip-frame video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.clip-frame.big { max-width: 360px; border-radius: var(--r-lg); }
.clip-pending { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: var(--bg-2); color: var(--muted); text-align: center; padding: 16px; }
.pending-detail { font-size: 12px; color: var(--muted); word-break: break-word; max-height: 40%; overflow: auto; }
.clip-card.ready .clip-pending { display: none; }
.clip-card:not(.ready) video { visibility: hidden; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--lime); animation: spin 0.9s linear infinite; }
.clip-card.failed .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.score { position: absolute; top: 10px; left: 10px; min-width: 40px; text-align: center; background: var(--lime); color: var(--lime-ink); font: 800 17px/1 var(--display); padding: 6px 8px; border-radius: 8px; }
.clip-body { padding-top: 12px; }
.clip-hook { font: 400 21px/1.15 var(--caption); text-transform: uppercase; margin: 0 0 6px; }
.clip-title { margin: 0 0 8px; font-size: 15px; }
.clip-reason { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.clip-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clip-actions .length { margin-left: auto; font-size: 14px; }

/* ---------- clip editor ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.preview { position: sticky; top: 86px; }
.downloads { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.why { color: var(--muted); font-size: 15px; }
.why strong { color: var(--text); }
.editor-tabs { display: inline-grid; grid-template-columns: auto auto; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.editor-tabs button { border: 0; background: transparent; color: var(--muted); font: 700 15px var(--body); padding: 9px 16px; border-radius: 9px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.editor-tabs button.on { background: var(--bg-3); color: var(--text); }
.chat { display: flex; flex-direction: column; height: min(70vh, 640px); background: var(--bg-2); border: 1.5px solid var(--lime); border-radius: var(--r-lg); overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.msg.user { align-self: flex-end; background: var(--lime); color: var(--lime-ink); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--bg-3); border-bottom-left-radius: 4px; }
.chat-empty { color: var(--muted); font-size: 15px; }
.chat-empty ul { padding-left: 18px; margin: 8px 0 0; }
.chat-empty li { margin-bottom: 6px; cursor: pointer; }
.chat-empty li:hover { color: var(--lime); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--bg-2); }
.chat-form input { flex: 1; }
.chat-locked { position: relative; }
.chat-locked .lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; background: rgba(23, 24, 26, 0.82); border-radius: var(--r-lg); }
.with-copy { display: flex; gap: 8px; }
.with-copy input { flex: 1; }
.source-video { width: 100%; border-radius: var(--r-sm); background: #000; aspect-ratio: 16 / 9; }
.trim { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 4px; }
.trim label { font-weight: 400; margin: 12px 0 6px; }
.trim .btn { margin-top: 8px; }
.transcript { margin-top: 12px; max-height: 240px; overflow-y: auto; padding: 14px 16px; background: var(--bg-3); border-radius: var(--r-sm); line-height: 1.9; }
.tw { background: none; border: 0; padding: 1px 1px; font: inherit; color: var(--muted); cursor: pointer; border-radius: 3px; }
.tw.in { color: var(--text); background: var(--lime-soft); }
.tw.now { background: var(--lime); color: var(--lime-ink); }
.tw:hover { color: var(--lime); }
.pager { display: flex; gap: 8px; }

/* ---------- auth page ---------- */
.auth-card { background: var(--bg-2); border: 1.5px solid var(--lime); border-radius: var(--r-lg); padding: 28px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .build { grid-template-columns: 1fr; }
  .summary { position: static; }
  .demo { grid-template-columns: 1fr; }
  .demo-arrow { transform: rotate(90deg); justify-self: center; }
  .plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .plan.popular { order: -1; }
}
@media (max-width: 860px) {
  .steps, .features { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
  .preview { position: static; }
  .clip-frame.big { margin: 0 auto; }
  .file-card { grid-template-columns: 1fr; }
  .opt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nav .hide-sm { display: none; }
  .dropbar { flex-wrap: wrap; }
  .dropbar input[type=url] { flex-basis: calc(100% - 40px); }
  .dropbar .btn { flex: 1; }
  .demo-clips, .demo-clips.n4 { grid-template-columns: repeat(3, 1fr); }
  .demo-clip:nth-child(n+4) { display: none; }
  .style-picks { grid-template-columns: repeat(2, 1fr); }
  .project-row { grid-template-columns: 1fr; }
  .trim { grid-template-columns: 1fr; }
  .nboxes { gap: 6px; }
  .nbox span { width: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
