:root {
  color-scheme:dark;
  --bg:#111016; --panel:#191820; --field:#211f2b; --line:#393444;
  --text:#f7f3ff; --muted:#bdb3cd; --accent:#dac9ff; --ink:#211434;
  font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
* { box-sizing:border-box }
[hidden] { display:none !important }
body { margin:0; background:radial-gradient(ellipse at 84% 4%,#321f49,transparent 51rem),var(--bg); color:var(--text) }
a { color:var(--accent); text-underline-offset:.22em }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px }
.wrap { width:min(100%,1370px); margin-inline:auto; padding-inline:clamp(16px,4vw,60px) }
header,footer,.row,.head { display:flex; justify-content:space-between; align-items:center; gap:12px }
header { min-height:74px; border-bottom:1px solid var(--line) }
.brand { display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; font-weight:850; font-size:19px; letter-spacing:.08em }
.free { white-space:nowrap; color:var(--muted); font-size:12px }
.free::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:#b7efcf; box-shadow:0 0 13px #b7efcf }
h1,h2,p { margin:0 }
.intro { padding:clamp(25px,5vw,65px) 0 26px }
h1 { font-size:clamp(37px,6vw,78px); letter-spacing:-.07em; line-height:1.04 }
h1 em { font-family:Georgia,serif; font-weight:500; color:var(--accent); letter-spacing:-.06em }
.intro p { margin-top:13px; color:var(--muted) }
.layout { display:grid; grid-template-columns:minmax(0, .9fr) minmax(0,1.27fr); align-items:start; gap:20px }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:19px; overflow:hidden; box-shadow:0 16px 40px #08060b55 }
.head { padding:15px 20px; border-bottom:1px solid var(--line) }
h2 { font-size:16px }
.head small { font-size:10px; letter-spacing:.12em }
.body { padding:18px }
label { display:block; font-size:13px; font-weight:650 }
label[for] { margin-bottom:7px }
.drop + label,.row + label { margin-top:16px }
.drop { position:relative; display:grid; place-items:center; min-height:124px; padding:8px; text-align:center; border:1px dashed #786295; border-radius:12px; background:#261f34 }
.drop:focus-within,.drop.over { outline:2px solid var(--accent) }
.drop input { position:absolute; width:100%; height:100%; inset:0; opacity:0; cursor:pointer }
.drop img { width:100%; height:170px; object-fit:contain }
.drop b,.play { display:grid; place-items:center; margin:0 auto 7px; color:var(--accent); background:#392952; border-radius:9px }
.drop b { width:30px; height:30px; font-size:20px }
small,.output,footer { color:var(--muted); font-size:12px }
.drop small,.stage small,#model-note { display:block }
.row { margin-top:8px }
#filename { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
textarea,select,input[type="number"] { display:block; width:100%; padding:9px 10px; font:inherit; color:var(--text); background:var(--field); border:1px solid var(--line); border-radius:8px }
textarea { resize:vertical }
label > :is(select,textarea,input[type="number"]) { margin-top:5px; font-weight:400 }
::placeholder { color:#ada1be }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:7px }
button,.download { cursor:pointer; color:var(--text); background:none; border:1px solid var(--line); border-radius:8px; padding:6px 9px; font:inherit }
.chips button { color:var(--muted); font-size:11px }
button:hover,.download:hover { border-color:var(--accent); color:var(--accent) }
button:disabled { opacity:.6; cursor:wait }
.grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:9px; margin:13px 0 6px }
details { border-block:1px solid var(--line); margin:13px 0; padding:9px 0 }
summary { cursor:pointer; font-size:13px; font-weight:650 }
details > label { margin-top:9px }
.consent { display:flex; gap:8px; align-items:flex-start; margin:12px 0; color:var(--muted); font-size:12px; font-weight:400 }
.consent input { margin:3px 0 0; accent-color:var(--accent) }
.primary { background:var(--accent); color:var(--ink); border:0; font-weight:800 }
button.primary { width:100%; min-height:44px }
.primary:hover { background:#eee4ff; color:var(--ink) }
.stage { position:relative; isolation:isolate; display:grid; place-items:center; aspect-ratio:16/10; min-height:200px; overflow:hidden; text-align:center; border:1px solid var(--line); border-radius:13px; background:#100e16 }
.stage::before { content:""; position:absolute; z-index:-1; inset:0; background:radial-gradient(ellipse at 50% 52%,#664689aa,transparent 64%),repeating-linear-gradient(120deg,transparent 0 31px,#9872be24 32px 33px,transparent 34px 63px); mask-image:radial-gradient(ellipse,#000 10%,transparent 82%) }
.play { width:61px; height:61px; border:1px solid #b895f388; border-radius:17px; font-size:32px }
.stage strong { font-size:17px }
video { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; background:#0c0a10 }
.stage:has(video:not([hidden])) { max-height:65svh; }
.policy { max-width:800px; padding-block:clamp(26px,5vw,62px) }
.policy h1 { font-size:clamp(36px,6vw,63px) }
.policy h2 { margin-top:25px; font-size:19px }
.policy p { margin-top:9px; color:var(--muted) }
.policy li { margin-top:6px; color:var(--muted) }
.output { min-height:42px; flex-wrap:wrap }
.download { white-space:nowrap; text-decoration:none }
#input-status:not(:empty),[data-error] { color:#ffc0c7; font-size:13px; margin-top:6px }
footer.row { margin:12px auto 0; padding-block:20px }
@media(max-width:810px) { .layout { grid-template-columns:1fr } }
@media(max-width:430px) { header { min-height:60px } .head,.body { padding:13px } .brand { font-size:17px } }

.mode-switch { display:inline-flex; flex-wrap:wrap; gap:3px; padding:4px; margin-bottom:19px; border:1px solid var(--line); border-radius:12px; background:#17141e }
.mode-switch a { text-decoration:none; border-radius:8px; border:0; padding:8px 13px; color:var(--muted); font-size:13px; font-weight:650 }
.mode-switch a[aria-current="page"] { background:#423355; color:var(--text) }
.adult { border:1px solid #76576d; padding:9px; border-radius:8px; background:#322439 }
.stage :is(video,#edited) { position:absolute; inset:0; width:100%; height:100%; object-fit:contain }
.stage:has(#edited:not([hidden])) { max-height:65svh }
.progress-row { margin-top:13px }
.progress-meta { display:flex; justify-content:space-between; gap:7px; color:var(--muted); font-size:12px }
progress { display:block; width:100%; height:9px; margin-top:5px; border:0; border-radius:10px; overflow:hidden; background:#342941; accent-color:var(--accent) }
progress::-webkit-progress-bar { background:#342941; border-radius:10px }
progress::-webkit-progress-value { background:var(--accent); border-radius:10px; transition:width .2s ease }
progress::-moz-progress-bar { background:var(--accent) }
progress:indeterminate { appearance:none; background:linear-gradient(100deg,#342941 32%,#ac89ff 50%,#342941 68%) 100% 0 / 230% 100%; animation:job-progress 1.5s linear infinite }
progress:indeterminate::-webkit-progress-bar { background:transparent }
progress:indeterminate::-moz-progress-bar { background:transparent }
@keyframes job-progress { to { background-position:0 0 } }
@media(prefers-reduced-motion:reduce) { progress:indeterminate { animation:none } }

.mode-switch a[aria-disabled="true"] { opacity:.62; cursor:wait }
.studio-help { max-width:67ch; margin:23px 0 6px; padding-top:14px; border-top:1px solid var(--line) }
.studio-help p { margin-top:4px; color:var(--muted); font-size:13px }

.reuse { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 9px }
.reuse button { color:var(--accent); font-size:12px; font-weight:650 }

.trial { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin:0 0 18px; padding:14px 17px; border:1px solid #504160; border-radius:14px; background:#261e32 }
.trial p { color:var(--muted); font-size:13px; margin-top:3px }
.trial-status { color:var(--accent); font-size:13px; font-weight:650 }
button.primary:disabled { cursor:default }

.brand .brand-mark { flex:none }
.brand .brand-wordmark { height:auto; width:clamp(106px, 28vw, 144px) }
@media (max-width:360px) {
  .brand .brand-mark { width:34px; height:34px }
  .brand { gap:6px }
}
