/* AIVidGen design system v2: midnight navy, the icon's cyan-violet-magenta gradient, motion everywhere. */
:root {
  --bg: #05060f; --bg2: #0a0c1c; --card: rgba(255, 255, 255, .045); --card2: rgba(255, 255, 255, .085); --line: rgba(255, 255, 255, .085);
  --text: #f4f5fb; --mute: #9aa0b8; --faint: #5f6680;
  --c1: #38c8ff; --c2: #7a5cff; --c3: #e35cff;
  --grad: linear-gradient(120deg, #38c8ff 0%, #7a5cff 52%, #e35cff 100%);
  --glow: 0 14px 40px -12px rgba(122, 92, 255, .75);
  --ok: #5ee0a8; --bad: #ff6b8a; --nav-h: 68px; --nav-gap: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; overscroll-behavior: none; }
body { font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: rgba(122, 92, 255, .4); }

/* ---------- ambient background ---------- */
#app { position: fixed; inset: 0; padding-top: env(safe-area-inset-top); }
.nebula { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.nebula i { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; opacity: .22; will-change: transform; animation: drift 22s var(--ease) infinite alternate; }
.nebula i:nth-child(1) { background: radial-gradient(circle, var(--c2), transparent 68%); top: -45vmax; left: -35vmax; }
.nebula i:nth-child(2) { background: radial-gradient(circle, var(--c1), transparent 68%); bottom: -50vmax; right: -40vmax; animation-duration: 28s; opacity: .14; }
.nebula i:nth-child(3) { background: radial-gradient(circle, var(--c3), transparent 68%); top: 30vh; left: 25vw; animation-duration: 34s; opacity: .1; }
@keyframes drift { to { transform: translate3d(9vw, 7vh, 0) scale(1.18); } }

/* ---------- screens + transitions ---------- */
#screens { position: absolute; inset: 0; top: env(safe-area-inset-top); }
.screen { position: absolute; inset: 0; display: none; will-change: transform, opacity; }
.screen.on { display: block; }
.screen.in-r { animation: inR .46s var(--ease) both; } .screen.in-l { animation: inL .46s var(--ease) both; }
.screen.out-l { display: block; animation: outL .38s var(--ease) both; pointer-events: none; }
.screen.out-r { display: block; animation: outR .38s var(--ease) both; pointer-events: none; }
@keyframes inR { from { opacity: 0; transform: translate3d(14%, 0, 0) scale(.98); } }
@keyframes inL { from { opacity: 0; transform: translate3d(-14%, 0, 0) scale(.98); } }
@keyframes outL { to { opacity: 0; transform: translate3d(-10%, 0, 0) scale(.97); } }
@keyframes outR { to { opacity: 0; transform: translate3d(10%, 0, 0) scale(.97); } }
.rv { opacity: 0; transform: translateY(16px); filter: blur(6px); }
.show .rv { animation: rv .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 60ms); }
@keyframes rv { to { opacity: 1; transform: none; filter: none; } }
.scroll { height: 100%; overflow-y: auto; padding: 22px 18px calc(var(--nav-h) + var(--nav-gap) + env(safe-area-inset-bottom) + 28px); scrollbar-width: none; position: relative; }
.scroll::-webkit-scrollbar { display: none; }
.spacer { height: 96px; }

/* ---------- type ---------- */
.title { font: 800 36px/1.04 var(--sans); letter-spacing: -.035em; margin: 8px 0 22px; }
.title em, .hero em, .sheet h3 em { font: italic 400 1.08em/1 var(--serif); letter-spacing: -.01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.fine { font-size: 12px; color: var(--faint); text-align: center; margin: 14px 0 0; }
.fine a { color: var(--c1); text-decoration: none; }
.note { font-size: 13px; color: var(--mute); }
.note.soft { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: -8px 0 18px; }
.hint { font-size: 12px; color: var(--faint); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 10px 2px 0; }

/* ---------- surfaces + buttons ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin-bottom: 12px; }
.cta { position: relative; overflow: hidden; width: 100%; border: 0; border-radius: 18px; padding: 16px; font-size: 16px; font-weight: 800; letter-spacing: .01em; color: #fff; background: var(--grad); box-shadow: var(--glow); transition: transform .25s var(--spring), opacity .2s; }
.cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-18deg); animation: sheen 3.6s var(--ease) infinite; }
@keyframes sheen { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.cta:active { transform: scale(.965); }
.cta:disabled { opacity: .55; box-shadow: none; } .cta:disabled::after { display: none; }
.cta.slim { padding: 12px 20px; font-size: 14px; border-radius: 14px; width: auto; }
.btn2 { border: 1px solid var(--line); background: var(--card2); border-radius: 16px; padding: 14px 18px; font-weight: 800; transition: transform .25s var(--spring); }
.btn2:active, .menu button:active, .mrow:active, .modelbtn:active { transform: scale(.975); }
.link { background: none; border: 0; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.link.small { font-size: 13px; color: var(--faint); }
.btnrow { display: flex; gap: 10px; align-items: center; width: 100%; }
.btnrow .cta { flex: 2; } .btnrow .btn2 { flex: 1; }
.x { border: 0; background: var(--card2); width: 36px; height: 36px; border-radius: 50%; font-size: 19px; line-height: 1; color: var(--mute); transition: transform .25s var(--spring); }
.x:active { transform: scale(.9); }

/* animated gradient ring on the focused prompt card */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.prompt::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--a), var(--c1), var(--c2), var(--c3), var(--c1)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .4s; pointer-events: none; }
.prompt.focus::before { opacity: 1; animation: spinA 4s linear infinite; }
@keyframes spinA { to { --a: 360deg; } }

/* ---------- segmented controls with sliding thumbs ---------- */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 14px; }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); border-radius: 14px; background: var(--card2); box-shadow: inset 0 0 0 1px rgba(122, 92, 255, .6), 0 6px 18px -8px rgba(122, 92, 255, .8); transition: transform .5s var(--spring); }
.seg.right .thumb { transform: translateX(calc(100% + 4px)); }
.seg button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: var(--mute); padding: 12px 6px; border-radius: 14px; font-weight: 800; font-size: 14px; transition: color .3s; }
.seg svg { width: 18px; height: 18px; }
.seg button[aria-pressed="true"] { color: var(--text); }
.caps { position: relative; display: flex; gap: 6px; }
.caps .thumb { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 13px; background: var(--grad); box-shadow: var(--glow); transition: transform .5s var(--spring), width .4s var(--ease); pointer-events: none; }
.cap { position: relative; z-index: 1; flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card); border-radius: 13px; padding: 11px 0; font-weight: 800; text-align: center; transition: color .3s, background .3s, border-color .3s; }
.cap[aria-pressed="true"] { color: #fff; border-color: transparent; background: transparent; }
.cap .shape { display: inline-block; border: 2px solid currentColor; border-radius: 3px; margin-right: 7px; vertical-align: -3px; }

/* ---------- create ---------- */
textarea { width: 100%; resize: none; border: 0; background: transparent; color: var(--text); font: 500 17px/1.5 var(--sans); outline: none; }
textarea::placeholder { color: var(--faint); }
.prompt .rowb { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ideas { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ideas::-webkit-scrollbar { display: none; }
.idea { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--mute); border-radius: 99px; padding: 7px 12px; font-size: 12.5px; transition: transform .25s var(--spring), border-color .3s, color .3s; }
.idea:active { transform: scale(.94); border-color: var(--c2); color: var(--text); }
.count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.drop { position: relative; display: grid; place-items: center; text-align: center; min-height: 176px; border: 1.5px dashed rgba(122, 92, 255, .45); border-radius: 22px; background: var(--card); margin-bottom: 12px; overflow: hidden; cursor: pointer; animation: rv .5s var(--ease) both; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop b { display: block; font-size: 16px; } .drop small { color: var(--mute); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: pop .5s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(1.06); } }
.drop .rm { position: absolute; top: 10px; right: 10px; z-index: 2; border: 0; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); color: #fff; font-size: 18px; }
.modelbtn { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 22px; padding: 12px 14px; margin-bottom: 12px; transition: transform .25s var(--spring); }
.glyph { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 800 19px var(--sans); color: #fff; flex: none; background: var(--grad); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.mt { flex: 1; min-width: 0; } .mt small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); } .mt b { font-size: 17px; }
.tier { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; color: #fff; background: linear-gradient(120deg, rgba(122, 92, 255, .55), rgba(227, 92, 255, .55)); }
.tier.fast { background: rgba(94, 224, 168, .16); color: var(--ok); } .tier.std { background: var(--card2); color: var(--mute); }
.chev { width: 20px; height: 20px; color: var(--faint); }
.opt + .opt { margin-top: 18px; }
.opt.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; width: 54px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255, 255, 255, .14); transition: background .3s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); transition: transform .45s var(--spring); }
.switch input:checked + i { background: var(--grad); } .switch input:checked + i::after { transform: translateX(22px); }
.gobar { position: absolute; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--nav-gap) + env(safe-area-inset-bottom) + 10px); padding: 28px 16px 0; background: linear-gradient(transparent, var(--bg) 40%); z-index: 4; }
.gohint { text-align: center; font-size: 12px; color: var(--faint); margin-top: 8px; min-height: 16px; }

/* ---------- navigation ---------- */
#nav { position: absolute; left: 14px; right: 14px; bottom: calc(var(--nav-gap) + env(safe-area-inset-bottom)); height: var(--nav-h); z-index: 20; display: flex; align-items: center; justify-content: space-around; padding: 0 6px; background: rgba(14, 16, 32, .74); border: 1px solid var(--line); border-radius: 26px; backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); box-shadow: 0 20px 44px -18px #000; }
.nav-ind { position: absolute; top: 8px; bottom: 8px; left: 0; width: 25%; border-radius: 18px; background: linear-gradient(120deg, rgba(56, 200, 255, .2), rgba(122, 92, 255, .26), rgba(227, 92, 255, .2)); box-shadow: inset 0 0 0 1px rgba(122, 92, 255, .45); transition: transform .55s var(--spring), width .5s var(--ease); }
#nav button { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: var(--faint); font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 6px 0; transition: color .3s, transform .25s var(--spring); }
#nav button:active { transform: scale(.9); }
#nav button svg { width: 24px; height: 24px; transition: transform .5s var(--spring); }
#nav button.on { color: var(--text); } #nav button.on svg { transform: translateY(-1px) scale(1.1); color: #b9a9ff; }
#pill { position: absolute; z-index: 19; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--nav-gap) + env(safe-area-inset-bottom) + 12px); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; border: 1px solid rgba(122, 92, 255, .55); background: rgba(16, 14, 34, .9); backdrop-filter: blur(16px); color: var(--text); font-weight: 800; font-size: 13px; box-shadow: var(--glow); animation: pillIn .5s var(--spring) both; }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, 20px) scale(.9); } }
#pill .ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--c1); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- home feed ---------- */
.homebar { position: absolute; z-index: 6; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.homebar > * { pointer-events: auto; }
.logo { display: flex; align-items: center; gap: 9px; font: 800 21px var(--sans); letter-spacing: -.03em; }
.logo img { height: 30px; width: auto; display: block; filter: drop-shadow(0 4px 14px rgba(122, 92, 255, .6)); }
.logo.big { font-size: 28px; } .logo.big img { height: 42px; }
.qpill { border: 1px solid var(--line); background: rgba(14, 16, 32, .6); backdrop-filter: blur(12px); border-radius: 99px; padding: 7px 13px; font-size: 12px; font-weight: 800; transition: transform .25s var(--spring); }
.qpill.gold { border-color: rgba(122, 92, 255, .6); background: linear-gradient(120deg, rgba(56, 200, 255, .22), rgba(227, 92, 255, .22)); }
.qpill:active { transform: scale(.94); }
.cats { position: absolute; z-index: 6; top: 58px; left: 0; right: 0; display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; border: 1px solid var(--line); background: rgba(14, 16, 32, .5); backdrop-filter: blur(10px); border-radius: 99px; padding: 7px 14px; font-size: 13px; font-weight: 800; color: var(--mute); transition: all .35s var(--ease); }
.cat[aria-selected="true"] { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.feed { position: absolute; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; background: #000; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #070812; }
.slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.6s var(--ease); }
.slide.live video { transform: scale(1); }
.slide .shade { position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .4) 0%, transparent 24%, transparent 48%, rgba(3, 3, 12, .9) 100%); }
.slide .bar { position: absolute; left: 16px; right: 16px; top: 104px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; z-index: 2; opacity: 0; transition: opacity .4s; }
.slide.live .bar { opacity: 1; }
.slide .bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.slide .info { position: absolute; left: 18px; right: 18px; bottom: calc(var(--nav-h) + var(--nav-gap) + env(safe-area-inset-bottom) + 22px); }
.slide .info > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.slide.live .info > * { opacity: 1; transform: none; }
.slide.live .info > :nth-child(2) { transition-delay: .07s; } .slide.live .info > :nth-child(3) { transition-delay: .14s; } .slide.live .info > :nth-child(4) { transition-delay: .21s; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 10px; padding: 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .14); }
.slide h3 { font: 800 32px/1.02 var(--sans); letter-spacing: -.035em; margin: 0 0 8px; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.slide p { margin: 0 0 16px; font-size: 14px; color: rgba(255, 255, 255, .82); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide .recreate { border: 0; border-radius: 16px; padding: 13px 20px; font-weight: 800; font-size: 14px; color: #fff; background: var(--grad); box-shadow: var(--glow); transition: transform .25s var(--spring); }
.slide .recreate:active { transform: scale(.94); }

/* ---------- library ---------- */
.lib { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vcard { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #0b0d1c; aspect-ratio: 9 / 14; padding: 0; text-align: left; animation: rv .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); transition: transform .3s var(--spring); }
.vcard:active { transform: scale(.97); }
.vcard video, .vcard > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard .shade { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(3, 3, 12, .88)); }
.vcard .meta { position: absolute; left: 10px; right: 10px; bottom: 10px; }
.vcard .meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard .meta small { color: var(--mute); font-size: 11.5px; }
.vcard .state { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; color: var(--mute); font-size: 13px; padding: 10px; }
.vcard .state .ring { width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--c1); border-right-color: var(--c3); animation: spin 1s linear infinite; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--mute); padding: 48px 12px; }

/* ---------- account ---------- */
.acct { display: flex; align-items: center; gap: 14px; }
.acct b { display: block; font-size: 17px; } .acct small { color: var(--mute); }
.avatar { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #0d0f20; font: 800 18px var(--sans); }
.avatar::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; padding: 2px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 6s linear infinite; }
.plan #planBody { margin-bottom: 14px; color: var(--mute); font-size: 14px; }
.plan #planBody b { color: var(--text); font-size: 19px; display: block; margin-bottom: 2px; }
.plan.premium { background: linear-gradient(140deg, rgba(56, 200, 255, .12), rgba(122, 92, 255, .14), rgba(227, 92, 255, .12)); border-color: rgba(122, 92, 255, .45); }
.menu { display: grid; gap: 10px; margin-top: 16px; }
.menu button { border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 15px 16px; font-weight: 700; text-align: left; transition: transform .25s var(--spring), background .3s; }
.menu .danger { color: var(--bad); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 69; background: rgba(2, 3, 10, .66); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 86vh; display: flex; flex-direction: column; background: rgba(12, 14, 30, .97); backdrop-filter: blur(20px); border: 1px solid var(--line); border-bottom: 0; border-radius: 30px 30px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .5s var(--ease); }
.sheet.on { transform: none; }
.sheet.small { max-height: none; }
.grab { width: 42px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); margin: 6px auto 12px; flex: none; }
.sheethead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex: none; }
.sheet h3 { font: 800 24px var(--sans); letter-spacing: -.03em; margin: 0; }
.search { flex: none; width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 16px; padding: 13px 14px; font: inherit; outline: none; margin-bottom: 8px; transition: border-color .3s; }
.search:focus { border-color: rgba(122, 92, 255, .7); }
.mlist { overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 0 6px 6px; scrollbar-width: none; }
.brand { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 2px 8px; background: rgba(12, 14, 30, .98); }
.brand .glyph { width: 30px; height: 30px; border-radius: 10px; font-size: 14px; }
.brand b { font-size: 15px; } .brand small { color: var(--faint); margin-left: auto; font-size: 12px; }
.mrow { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 12px 14px; margin-bottom: 8px; transition: transform .25s var(--spring), border-color .3s, background .3s; }
.sheet.on .mrow { animation: rv .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
.mrow[aria-pressed="true"] { border-color: rgba(122, 92, 255, .8); background: linear-gradient(120deg, rgba(56, 200, 255, .08), rgba(122, 92, 255, .14)); box-shadow: 0 8px 24px -14px rgba(122, 92, 255, .9); }
.mrow .t { flex: 1; min-width: 0; } .mrow b { display: block; font-size: 15px; } .mrow small { color: var(--mute); font-size: 12.5px; }

/* ---------- full-screen layers ---------- */
.full { position: fixed; inset: 0; z-index: 60; display: none; background: var(--bg); overflow: hidden; padding-top: env(safe-area-inset-top); }
.full.on { display: block; animation: fullIn .45s var(--ease) both; }
@keyframes fullIn { from { opacity: 0; transform: scale(1.03); } }
.aurora { position: absolute; inset: 0; overflow: hidden; }
.aurora i { position: absolute; width: 80vmax; height: 80vmax; border-radius: 50%; opacity: .5; will-change: transform; animation: drift 16s var(--ease) infinite alternate; }
.aurora i:nth-child(1) { background: radial-gradient(circle, var(--c2) 0%, transparent 65%); top: -30vmax; left: -25vmax; }
.aurora i:nth-child(2) { background: radial-gradient(circle, var(--c1) 0%, transparent 65%); bottom: -35vmax; right: -30vmax; animation-duration: 20s; opacity: .38; }
.aurora i:nth-child(3) { background: radial-gradient(circle, var(--c3) 0%, transparent 65%); top: 25vh; left: 30vw; animation-duration: 24s; opacity: .3; }
.aurora.soft i { opacity: .24; }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.busyin, .resin { position: relative; z-index: 2; height: 100%; max-width: 480px; margin: 0 auto; padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.min { position: absolute; top: 14px; right: 18px; z-index: 3; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); backdrop-filter: blur(10px); border-radius: 99px; padding: 8px 16px; font-size: 13px; font-weight: 800; transition: transform .25s var(--spring); }
.min:active { transform: scale(.94); }
.ringwrap { position: relative; width: 244px; height: 244px; margin-bottom: 6px; }
.rsvg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.rtrack { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 5; }
.rbar { fill: none; stroke: url(#rg); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 553; stroke-dashoffset: 553; transition: stroke-dashoffset .5s linear; filter: drop-shadow(0 0 10px rgba(122, 92, 255, .8)); }
.orb { position: absolute; inset: 26px; border-radius: 50%; background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c2), var(--c1)); filter: blur(16px) saturate(1.2); opacity: .7; animation: spin 7s linear infinite, breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.88); opacity: .5; } }
.pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pct .num { display: inline-flex; align-items: baseline; gap: 3px; line-height: 1; }
.pct b { font: 800 64px/1 var(--sans); letter-spacing: -.04em; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); font-variant-numeric: tabular-nums; }
.pct small { font: 800 22px/1 var(--sans); color: var(--mute); }
#bStage { font: 800 26px/1.15 var(--sans); letter-spacing: -.03em; margin: 4px 0 0; min-height: 30px; transition: opacity .3s, transform .3s var(--ease); }
.btime { margin: 0; font-size: 14px; color: var(--c1); font-weight: 800; font-variant-numeric: tabular-nums; } .btime span { color: var(--faint); font-weight: 600; }
.quote { font: italic 400 20px/1.3 var(--serif); color: rgba(255, 255, 255, .84); max-width: 340px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.quote img { width: 66px; height: 66px; object-fit: cover; border-radius: 16px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips span { border: 1px solid var(--line); background: rgba(255, 255, 255, .06); border-radius: 99px; padding: 5px 12px; font-size: 12px; color: var(--mute); font-weight: 700; }
.tip { margin: 6px 0 0; font-size: 13px; color: var(--mute); min-height: 40px; max-width: 320px; transition: opacity .4s; }
.resin video { width: 100%; max-height: 62vh; border-radius: 24px; background: #000; box-shadow: 0 30px 80px -24px rgba(122, 92, 255, .55); animation: resIn .7s var(--spring) both; }
@keyframes resIn { from { opacity: 0; transform: scale(.86) translateY(20px); } }
.timeleft { font-size: 13px; color: var(--c1); font-weight: 800; font-variant-numeric: tabular-nums; }
.timeleft.soon { color: var(--bad); }
.burst { position: absolute; left: 50%; top: 40%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.burst i { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); animation: burst 1.1s var(--ease) forwards; }
@keyframes burst { from { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.4); opacity: 0; } }

/* ---------- paywall ---------- */
.pay { background: #04050c; }
#payBg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); }
#payBg.on { opacity: .55; }
.payscrim { position: absolute; inset: 0; background: linear-gradient(rgba(4, 5, 12, .35), rgba(4, 5, 12, .7) 40%, #04050c 78%); }
.payin { position: relative; z-index: 2; height: 100%; max-width: 460px; margin: 0 auto; padding: 24px 22px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; overflow-y: auto; }
.pay.on .rv { animation: rv .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.badge { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; background: var(--grad); box-shadow: var(--glow); }
.hero { font: 800 44px/1 var(--sans); letter-spacing: -.04em; margin: 0; }
.perks2 { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 12px; }
.perks2 li { display: flex; gap: 12px; align-items: flex-start; }
.perks2 li i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); position: relative; margin-top: 1px; box-shadow: 0 4px 14px -4px rgba(122, 92, 255, .9); }
.perks2 li i::after { content: ""; position: absolute; left: 8px; top: 5px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
.perks2 b { display: block; font-size: 15px; } .perks2 span { font-size: 13px; color: var(--mute); }
.pricecard { position: relative; border-radius: 20px; padding: 16px 18px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(122, 92, 255, .5); backdrop-filter: blur(14px); }
.pricecard b { font: 800 34px/1 var(--sans); letter-spacing: -.03em; } .pricecard span { color: var(--mute); margin-left: 4px; font-weight: 700; }
.pricecard small { display: block; color: var(--faint); margin-top: 6px; font-size: 12.5px; }
.paylinks { display: flex; justify-content: center; gap: 6px; }

/* ---------- sign in: showcase panel + calm form (split on wide screens, stacked on phones) ---------- */
.auth { background: #05060c; }
.auth.on, html.pre-auth .auth { display: flex; flex-direction: column; }
html.pre-auth .auth, .auth.instant { animation: none; }
html.pre-auth #app { visibility: hidden; }   /* signed out: the sign-in screen is the first thing drawn */
.auth-media { position: relative; flex: none; height: clamp(210px, 38vh, 360px); overflow: hidden; background: #0a0b16 center / cover no-repeat; }
#authBg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; opacity: 0; transition: opacity .9s var(--ease); }
#authBg.on { opacity: 1; }
.auth-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 6, 12, .35) 0%, rgba(5, 6, 12, .1) 40%, rgba(5, 6, 12, .75) 80%, #05060c 100%); }
.auth-brand { position: absolute; top: 18px; left: 20px; display: flex; align-items: center; gap: 9px; font: 800 18px var(--sans); letter-spacing: -.03em; }
.auth-brand img, .auth-logo img { height: 28px; width: auto; display: block; }
.auth-claim { position: absolute; left: 20px; right: 20px; bottom: 14px; }
.auth-claim p { margin: 0; font: 800 24px/1.05 var(--sans); letter-spacing: -.035em; }
.auth-claim em { font: italic 400 1.1em/1 var(--serif); letter-spacing: -.01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.auth-claim ul { display: none; }
.auth-panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); }
.auth-card { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-panel.cm .auth-card { padding-bottom: 340px; }
@media (min-width: 900px) { .auth-panel.cm .auth-card { padding-bottom: 0; } }
.auth-logo { display: none; align-items: center; gap: 10px; font: 800 20px var(--sans); letter-spacing: -.03em; margin-bottom: 36px; }
.auth.on .auth-card > * { animation: rv .6s var(--ease) both; }
.auth-h { margin: 0 0 6px; font: 800 24px/1.15 var(--sans); letter-spacing: -.03em; }
.auth-p { margin: 0 0 22px; color: var(--mute); font-size: 14.5px; line-height: 1.55; }
#stepPhone { position: relative; z-index: 3; }   /* the country menu must sit above the text below it */
.flabel { display: block; font-size: 12.5px; font-weight: 700; color: var(--mute); margin: 0 0 8px; letter-spacing: .01em; }

.pfield { position: relative; display: flex; align-items: stretch; height: 54px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .035); border-radius: 12px; margin-bottom: 14px; transition: border-color .2s, box-shadow .2s; }
.pfield:focus-within, .pfield.open { border-color: rgba(140, 120, 255, .85); box-shadow: 0 0 0 4px rgba(122, 92, 255, .16); }
.cc { flex: none; display: flex; align-items: center; gap: 7px; border: 0; border-right: 1px solid rgba(255, 255, 255, .1); background: none; border-radius: 12px 0 0 12px; padding: 0 12px 0 14px; color: var(--text); }
.cc:hover { background: rgba(255, 255, 255, .04); }
.cc b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cc svg { width: 15px; height: 15px; color: var(--mute); transition: transform .25s var(--ease); }
.pfield.open .cc svg { transform: rotate(180deg); }
.iso { display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, .09); color: var(--mute); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; }
#phone { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); padding: 0 14px; font: 600 17px var(--sans); letter-spacing: .03em; outline: none; font-variant-numeric: tabular-nums; }
#phone::placeholder { color: #4b5068; font-weight: 500; }

.cmenu { position: absolute; z-index: 5; top: calc(100% + 8px); left: -1px; right: -1px; display: flex; flex-direction: column; background: #0d0f1d; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .8); overflow: hidden; animation: cmIn .18s var(--ease) both; }
@keyframes cmIn { from { opacity: 0; transform: translateY(-4px); } }
.csearch { display: flex; align-items: center; gap: 9px; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.csearch svg { width: 16px; height: 16px; color: var(--mute); flex: none; }
#cSearch { flex: 1; min-width: 0; height: 46px; border: 0; background: none; color: var(--text); font: 500 14.5px var(--sans); outline: none; }
.clist { max-height: min(300px, 42vh); overflow-y: auto; overscroll-behavior: contain; padding: 6px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.crow { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; border: 0; background: none; text-align: left; padding: 10px; border-radius: 9px; font-size: 14.5px; color: var(--text); }
.crow:hover, .crow.kb { background: rgba(255, 255, 255, .06); }
.crow .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .d { color: var(--mute); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.crow[aria-selected="true"] { background: rgba(122, 92, 255, .14); }
.crow[aria-selected="true"] .d { color: #c8bdff; }
.cnone { padding: 18px 12px; color: var(--mute); font-size: 14px; text-align: center; }

.abtn { width: 100%; height: 52px; border: 0; border-radius: 12px; background: #f4f5fb; color: #07080f; font: 800 15.5px var(--sans); letter-spacing: .005em; transition: background .2s, transform .15s, opacity .2s; }
.abtn:hover { background: #fff; }
.abtn:active { transform: scale(.985); }
.abtn:disabled { opacity: .5; cursor: default; }
.aback { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--mute); font-size: 13.5px; font-weight: 700; padding: 6px 8px 6px 0; margin: -6px 0 14px; }
.aback svg { width: 17px; height: 17px; }
.aback:hover { color: var(--text); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 0 0 16px; }
.otp input { width: 100%; min-width: 0; height: 56px; text-align: center; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .035); color: var(--text); border-radius: 12px; font: 700 22px var(--sans); outline: none; transition: border-color .2s, box-shadow .2s; }
.otp input:focus { border-color: rgba(140, 120, 255, .85); box-shadow: 0 0 0 4px rgba(122, 92, 255, .16); }
.otp input.filled { border-color: rgba(255, 255, 255, .3); }
.resendrow { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 10px; font-size: 13.5px; color: var(--mute); }
.resendrow .link { font-size: 13.5px; font-weight: 700; color: var(--text); text-decoration: none; padding: 6px; }
.resendrow .link:disabled { color: var(--faint); font-weight: 600; }
.auth .err { margin: 12px 0 0; min-height: 0; }
.auth .err:empty { display: none; }
.auth-trust { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--mute); font-size: 12.5px; line-height: 1.45; }
.auth-trust svg { width: 16px; height: 16px; flex: none; color: #9d8cff; }
.auth .fine { text-align: left; margin-top: 10px; }
.devlink { display: block; margin: 10px auto 0; }

@media (min-width: 900px) {
  /* vertical 9:16 video card beside the form, the pair centred on the page */
  .auth.on, html.pre-auth .auth { display: grid; grid-template-columns: auto minmax(380px, 440px); justify-content: center; align-items: center; column-gap: clamp(40px, 7vw, 130px); padding: 28px; }
  .auth-media { height: min(calc(100vh - 56px), 880px); aspect-ratio: 9 / 16; margin: 0; border-radius: 26px; box-shadow: 0 30px 90px -30px rgba(122, 92, 255, .45), 0 0 0 1px rgba(255, 255, 255, .06); }
  .auth-shade { background: linear-gradient(180deg, rgba(5, 6, 12, .45) 0%, rgba(5, 6, 12, .05) 35%, rgba(5, 6, 12, .55) 70%, rgba(5, 6, 12, .9) 100%); }
  .auth-brand { top: 28px; left: 32px; font-size: 20px; }
  .auth-claim { left: 28px; right: 28px; bottom: 30px; }
  .auth-claim p { font-size: clamp(30px, 2.7vw, 42px); line-height: 1; letter-spacing: -.04em; }
  .auth-claim ul { display: grid; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
  .auth-claim li { position: relative; padding-left: 24px; color: rgba(244, 245, 251, .85); font-size: 14px; font-weight: 600; }
  .auth-claim li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 11px; height: 6px; border: solid #9d8cff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
  .auth-panel { display: flex; align-items: center; padding: 0; overflow: visible; }
  .auth-brand { display: none; }
  .auth-logo { display: flex; }
  .auth-h { font-size: 28px; }
}
@media (max-height: 640px) and (max-width: 899px) { .auth-media { height: 150px; } .auth-claim { display: none; } }

/* ---------- legal viewer, toast ---------- */
.legalhead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.legalhead b { font-size: 16px; }
#o-legal iframe { width: 100%; height: calc(100% - 62px); border: 0; background: var(--bg); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--nav-gap) + env(safe-area-inset-bottom) + 24px); z-index: 90; transform: translate(-50%, 20px) scale(.96); background: rgba(20, 22, 44, .94); backdrop-filter: blur(16px); border: 1px solid var(--line); padding: 11px 18px; border-radius: 99px; opacity: 0; transition: all .45s var(--spring); pointer-events: none; max-width: 88vw; text-align: center; font-size: 14px; font-weight: 700; }
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- style picker + camera ---------- */
.rowh { display: flex; align-items: baseline; justify-content: space-between; }
.rowh .hint { font-weight: 800; color: var(--text); }
.styles { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.styles::-webkit-scrollbar { display: none; }
.stile { flex: none; width: 84px; border: 0; background: none; padding: 0; text-align: center; scroll-snap-align: start; color: var(--mute); font-size: 12px; font-weight: 800; transition: color .3s; }
.stile .im { display: block; width: 84px; height: 108px; border-radius: 16px; margin-bottom: 6px; background: #12142a center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--line); transition: transform .4s var(--spring), box-shadow .35s; }
.stile.auto .im { display: grid; place-items: center; background: linear-gradient(140deg, rgba(56, 200, 255, .25), rgba(122, 92, 255, .3), rgba(227, 92, 255, .25)); font-size: 26px; color: #fff; }
.stile[aria-pressed="true"] { color: var(--text); }
.stile[aria-pressed="true"] .im { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--c2), 0 12px 26px -10px rgba(122, 92, 255, .95); }
.stile:active .im { transform: scale(.94); }
.camhead { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: none; padding: 0; text-align: left; }
.camhead .ct .lbl { margin-bottom: 4px; } .camhead b { font-size: 15px; }
.camhead .chev { transition: transform .45s var(--spring); }
.camcard.open .camhead .chev { transform: rotate(180deg); }
.camgroups { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.camgroups > div { overflow: hidden; }
.camcard.open .camgroups { grid-template-rows: 1fr; }
.camgroup { margin-top: 16px; }
.camgroup .lbl { margin-bottom: 8px; }
.cchips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.cchips::-webkit-scrollbar { display: none; }
.cchip { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--mute); border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 800; transition: all .35s var(--ease); }
.cchip[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.cchip:active { transform: scale(.94); }

/* ---------- desktop / web: keep the app in a centred column, sign-in centred ---------- */
@media (min-width: 760px) {
  body { background: #000; }
  #app { left: 50%; right: auto; width: 460px; transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--bg); overflow: hidden; }
  .sheet { left: 50%; right: auto; width: 460px; margin-left: -230px; }
  .toast { bottom: 110px; }
  .payin { justify-content: center; }
}
#o-legal { z-index: 75; }   /* policies open above the sign-in screen */
.link.del { font-size: 13px; color: var(--faint); margin-top: -6px; }

/* lite mode: devices drawing without graphics acceleration get the same layout without per-frame effects */
html.lite .nebula i, html.lite .aurora i, html.lite .cta::after, html.lite .prompt.focus::before { animation: none !important; }
html.lite *, html.lite *::before, html.lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.lite .rv { filter: none; }
