:root{
  --bg:#f5f5f0; --surface:#ecece6; --ink:#1c1d1f; --muted:#7a7b76; --line:#dcdcd5;
  --dark:#1e1f21; --accent:#1f4fff; --danger:#b3261e;
  --r:16px; --wrap:1280px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:90px}
body{background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
ul{list-style:none}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 24px}
.muted{color:var(--muted)}
.small{font-size:12.5px;color:var(--muted)}

/* Type */
.display{font-size:clamp(52px,8.4vw,104px);line-height:.98;letter-spacing:-.055em;font-weight:600}
.display.sm{font-size:clamp(40px,6vw,72px)}
.h2{font-size:clamp(30px,4vw,44px);letter-spacing:-.04em;font-weight:600;line-height:1.1}
.eyebrow{font-size:11px;letter-spacing:.16em;text-transform:uppercase;font-weight:600;color:var(--muted);margin-bottom:14px}
.lede{font-size:17px;color:#5d5e5a;max-width:460px;margin-top:26px}
.note{color:#5d5e5a;max-width:340px}
.note.right{text-align:right}
.textlink{border-bottom:1px solid var(--ink);padding-bottom:1px;font-weight:500}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:8px;justify-content:center;border:1px solid transparent;border-radius:12px;padding:11px 18px;font:500 14px/1 Inter,sans-serif;cursor:pointer;transition:.15s}
.btn-dark{background:var(--dark);color:#fff}
.btn-dark:hover{background:#000}
.btn-light{background:transparent;border-color:#bdbdb5;color:var(--ink)}
.btn-light:hover{background:var(--surface)}
.btn-lg{padding:16px 24px;font-size:15px}
.btn-block{width:100%;padding:14px}
.link{font-size:14px;color:#5d5e5a;padding:0 14px}
.link:hover{color:var(--ink)}

/* Nav */
.nav{position:sticky;top:0;z-index:20;background:rgba(245,245,240,.88);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.nav-in{display:flex;align-items:center;height:76px;gap:40px}
.logo{display:flex;align-items:center;gap:9px;font-weight:700;font-size:20px;letter-spacing:-.03em;color:var(--accent)}
.logo-mark{width:24px;height:24px;border-radius:7px;background:
  radial-gradient(circle at 30% 30%,#fff 0 18%,transparent 19%),var(--accent)}
.nav-links{display:flex;gap:30px;font-size:14px;color:#4a4b48}
.nav-links a:hover{color:var(--ink)}
.nav-links a.active{color:var(--ink);font-weight:600}
.nav-user{font-size:14px;color:#5d5e5a;margin-right:14px}
.nav-cta{margin-left:auto;display:flex;align-items:center}
.nav-toggle{display:none;margin-left:auto;background:none;border:0;width:36px;height:36px;cursor:pointer;flex-direction:column;justify-content:center;gap:6px;align-items:center}
.nav-toggle span{width:20px;height:2px;background:var(--ink)}

/* Hero */
.hero{padding-top:56px}
.hero-grid{display:grid;grid-template-columns:1fr minmax(340px,440px);gap:64px;align-items:center}
.pill{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#4a4b48;margin-bottom:26px}
.pill .dot{width:6px;height:6px;border-radius:50%;background:#4fa36a}
.pill em{font-style:normal;font-size:10px;letter-spacing:.08em;text-transform:uppercase;border:1px solid var(--line);padding:3px 7px;border-radius:4px;background:#fff}
.hero-actions{display:flex;align-items:center;gap:26px;margin:26px 0 18px;flex-wrap:wrap}
.checks{display:flex;gap:22px;flex-wrap:wrap;font-size:12.5px;color:var(--muted)}
.checks li::before{content:"✓";margin-right:6px}

/* Stage (video frame) */
.stage{margin:48px 0 0;background:#1f2022;border-radius:20px;overflow:hidden;box-shadow:0 30px 60px -30px rgba(0,0,0,.35);color:#cfd0cc}
.stage-bar,.stage-foot{display:flex;justify-content:space-between;align-items:center;padding:14px 20px;font-size:11.5px}
.dots{display:flex;gap:6px}.dots i{width:7px;height:7px;border-radius:50%;background:#55565a}
.stage-video{position:relative;aspect-ratio:16/9;background:#000}
.stage.portrait{margin:0;justify-self:end;width:100%}
.stage.portrait .stage-video{aspect-ratio:4/5}
.stage.portrait .stage-foot{flex-direction:column;align-items:flex-start;gap:4px}
.stage-video video{width:100%;height:100%;object-fit:cover;display:block}
.sound{position:absolute;right:16px;bottom:16px;background:rgba(0,0,0,.55);color:#fff;border:1px solid rgba(255,255,255,.25);border-radius:999px;padding:7px 13px;font:500 12px Inter,sans-serif;cursor:pointer;backdrop-filter:blur(6px)}
.stage-foot .small{color:#8c8d90}
.cam-empty{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:20px;color:#8c8d90;font-size:14px}

.strip{display:flex;gap:28px;align-items:center;padding:22px 0;margin-top:16px;border-bottom:1px solid var(--line);font-size:12.5px;color:var(--muted);flex-wrap:wrap}
.strip strong{color:var(--ink);font-weight:600;margin-right:auto}
.strip span::before{content:"•";margin-right:14px;color:#b5b5ad}

/* Sections */
.section{padding-top:104px}
.sec-head{display:flex;justify-content:space-between;align-items:flex-end;gap:32px;margin-bottom:40px;flex-wrap:wrap}

/* Examples gallery */
.gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.tile{position:relative;aspect-ratio:9/16;border-radius:var(--r);overflow:hidden;display:grid;place-items:center;border:1px solid var(--line);cursor:pointer;background-size:cover;background-position:center}
.tile video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#101113}
.tile .play{position:relative;z-index:1;transition:opacity .2s}
.tile.playing .play{opacity:0}
.tile .chip{z-index:1}
.chip{position:absolute;left:12px;bottom:12px;background:rgba(20,21,23,.85);color:#fff;font-size:12px;font-weight:600;padding:6px 12px;border-radius:999px}
.play{width:54px;height:54px;border-radius:50%;background:rgba(255,255,255,.9);position:relative}
.play::after{content:"";position:absolute;left:21px;top:17px;border-left:15px solid var(--dark);border-top:10px solid transparent;border-bottom:10px solid transparent}
.g0{background:linear-gradient(135deg,#3d4a63,#8a97b3)}
.g1{background:linear-gradient(135deg,#5b4636,#c9a27e)}
.g2{background:linear-gradient(135deg,#2f5a52,#8cc3b3)}
.g3{background:linear-gradient(135deg,#5a3a55,#c597bd)}
.g4{background:linear-gradient(135deg,#3b3f45,#9ea4ad)}
.g5{background:linear-gradient(135deg,#6a4a2a,#e0b36a)}

/* Use cases */
.uses{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.use{display:flex;gap:18px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:26px}
.use-icon{flex:0 0 44px;height:44px;border-radius:12px;background:#fff;border:1px solid var(--line);display:grid;place-items:center}
.use-icon svg{width:21px;height:21px;fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.use h3{font-size:18px;letter-spacing:-.025em;font-weight:600;margin-bottom:8px}
.use p{color:#5d5e5a;font-size:14.5px;margin-bottom:16px}
.tags{display:flex;gap:8px;flex-wrap:wrap}
.tags li{font-size:11px;color:var(--muted);border:1px solid #cfcfc7;border-radius:999px;padding:3px 10px}

/* Steps */
.steps{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line)}
.step{padding:28px 28px 40px;border-right:1px solid var(--line)}
.step:first-child{padding-left:0}.step:last-child{border-right:0}
.step-top{display:flex;justify-content:space-between;font-size:12px;color:#8a5a3a;margin-bottom:64px}
.step svg{width:20px;height:20px;fill:none;stroke:#4a4b48;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.step h3{font-size:21px;letter-spacing:-.03em;font-weight:600;margin-bottom:10px}
.step p{color:var(--muted);max-width:280px}

/* Testimonials */
.quotes{columns:3;column-gap:16px}
.quote{position:relative;break-inside:avoid;margin:0 0 16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:26px}
.quote blockquote{font-size:16px;letter-spacing:-.01em;line-height:1.5;margin-bottom:22px}
.quote figcaption{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--muted);line-height:1.35}
.quote figcaption strong{color:var(--ink);font-weight:600}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--dark);color:#fff;display:grid;place-items:center;font-weight:600;font-size:14px}
.sample{position:absolute;top:14px;right:14px;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);border:1px dashed #b5b5ad;border-radius:999px;padding:2px 8px}

/* Pricing */
.plans{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.plan{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:30px;display:flex;flex-direction:column;gap:6px}
.plan.featured{background:#fff;border-color:var(--dark);box-shadow:0 20px 40px -24px rgba(0,0,0,.3)}
.badge{position:absolute;top:18px;right:18px;font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;background:var(--dark);color:#fff;padding:4px 9px;border-radius:999px}
.plan h3{font-size:19px;letter-spacing:-.02em}
.tagline{color:var(--muted);font-size:13.5px}
.price{font-size:40px;letter-spacing:-.05em;font-weight:600;margin:18px 0}
.price small{font-size:13px;color:var(--muted);letter-spacing:0;font-weight:400}
.plan ul{display:grid;gap:10px;margin-bottom:28px;flex:1;font-size:14px}
.plan li::before{content:"✓";margin-right:9px;color:#4fa36a}

/* FAQ */
.faq{border-top:1px solid var(--line);max-width:820px}
.faq details{border-bottom:1px solid var(--line);padding:20px 0}
.faq summary{cursor:pointer;font-weight:500;font-size:16px;list-style:none;display:flex;justify-content:space-between}
.faq summary::after{content:"+";color:var(--muted)}
.faq details[open] summary::after{content:"−"}
.faq p{margin-top:12px;color:#5d5e5a;max-width:620px}

.cta{padding-top:110px;display:flex;justify-content:space-between;align-items:center;gap:30px;flex-wrap:wrap}

/* Footer */
.footer{margin-top:110px;border-top:1px solid var(--line);padding:40px 0 32px;font-size:13px;color:var(--muted)}
.safety{max-width:560px;margin-bottom:36px}
.safety .eyebrow{color:var(--ink);margin-bottom:8px}
.foot-row{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}
.foot-links{display:flex;gap:22px}
.foot-links a:hover{color:var(--ink)}

/* Auth */
.auth{min-height:calc(100vh - 77px - 220px);display:grid;place-items:center;padding-top:48px}
.auth-card{width:100%;max-width:420px}
.auth-card h1{margin-bottom:24px}
.auth form{display:grid;gap:16px;margin-bottom:20px}
label{display:grid;gap:7px;font-size:13px;font-weight:500}
label small{font-weight:400;color:var(--muted)}
input[type=text],input[type=email],input[type=password]{width:100%;padding:13px 14px;border:1px solid #c9c9c1;border-radius:12px;background:#fff;font:15px Inter,sans-serif;color:var(--ink)}
input:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:transparent}
.alert{background:#fbeceb;border:1px solid #efc5c2;color:var(--danger);border-radius:12px;padding:12px 14px;margin-bottom:18px;font-size:13.5px}

/* Account pages */
.page{padding-top:56px;min-height:60vh}
.page .note{margin-top:14px;max-width:520px}
.lib-sec{margin-top:44px}
.lib-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;border-bottom:1px solid var(--line);padding-bottom:12px}
.lib-head h2{font-size:20px;letter-spacing:-.03em;font-weight:600;margin-right:auto}
.btn-sm{padding:9px 14px;font-size:13px}
.btn-danger{background:transparent;border-color:#e3b9b6;color:var(--danger)}
.btn-danger:hover{background:#fbeceb}
.lib-sec .err{margin-top:10px}
.lib-voices{margin-top:20px;margin-bottom:0}
.lib-card{cursor:pointer;padding:0;font:inherit;text-align:left}
.page .note[hidden]{display:none}
.lib-sec .note{margin-top:16px}
.grow{flex:1}
.cm-audio{display:flex;align-items:center;gap:12px;grid-column:1/-1}
.cm-audio audio{flex:1;min-width:0;height:40px}
.cm-audio[hidden],.cm-preview[hidden]{display:none}
.cm-body:has(.cm-audio:not([hidden])) .cm-form{grid-column:1/-1}
.lib{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin-top:20px}
.lib-card{position:relative;aspect-ratio:3/4;border-radius:var(--r);border:1px solid var(--line);background-size:cover;background-position:center;transition:.15s}
.lib-card:hover{transform:translateY(-3px);box-shadow:0 16px 30px -18px rgba(0,0,0,.4)}
.set-list{margin:36px 0 16px;max-width:620px;border-top:1px solid var(--line)}
.set-row{display:flex;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid var(--line);font-size:15px}
.set-row span{color:var(--muted)}
.set-sec{margin-top:44px;max-width:620px}
.set-sec h2{font-size:20px;letter-spacing:-.03em;font-weight:600;margin-bottom:16px}
.set-sec .set-list{margin-top:0}
.set-label{font-size:13px;font-weight:600;margin-bottom:10px;display:block}
.set-sec.wide{max-width:980px}
.set-keys{margin:0 0 14px}
.set-intro{color:#5d5e5a;max-width:520px;margin:-6px 0 22px}
.tag{font-size:11px;font-weight:600;letter-spacing:.02em;border-radius:999px;padding:3px 10px;border:1px solid transparent;white-space:nowrap;justify-self:start}
.tag-inc{background:#eaf5ee;color:#2d6a45;border-color:#bcdcc7}
.tag-key{background:#fdf3e1;color:#8a5a14;border-color:#ecd3a3}

/* AI list: one row per AI, grouped by how it is paid for */
.ai-table{border-top:1px solid var(--line)}
.ai-group{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;color:var(--muted);padding:22px 0 8px}
.ai-row{display:grid;grid-template-columns:22px minmax(0,1fr) 190px 280px;gap:0 18px;align-items:center;padding:16px 14px;margin:0 -14px;border-bottom:1px solid var(--line);border-radius:12px;transition:background .15s}
.ai-row:hover{background:rgba(0,0,0,.025)}
.ai-row:has(input[type=radio]:checked){background:#fff;box-shadow:inset 0 0 0 1px var(--ink);border-bottom-color:transparent}
.ai-row.locked{opacity:.5}
.ai-row input[type=radio]{width:18px;height:18px;margin:0;accent-color:var(--dark);cursor:pointer}
.ai-row.locked input[type=radio]{cursor:not-allowed}
.ai-name{display:grid;gap:2px;cursor:pointer;font-weight:400}
.ai-name strong{font-size:15px;font-weight:600;letter-spacing:-.01em}
.ai-name span{font-size:13px;color:var(--muted)}
.ai-key{display:grid;gap:6px}
.ai-key{min-width:0}
.ai-key input[type=password]{width:100%;min-width:0;padding:9px 12px;font-size:13.5px;border-radius:10px}
.key-state{font-size:12px;color:var(--muted)}
.key-state.ok{color:#2d6a45}
.key-state .linkbtn{margin-left:8px}
@media (max-width:860px){
  .ai-row{grid-template-columns:22px minmax(0,1fr);gap:8px 14px;align-items:start;margin:0;padding:16px 12px}
  .ai-row .tag{grid-column:2}
  .ai-row .ai-key{grid-column:2}
}
.set-actions{display:flex;gap:16px;align-items:center;margin-top:24px;flex-wrap:wrap}
.inline-form{margin-top:14px}
.linkbtn.danger{color:var(--danger);border-color:var(--danger);margin-left:0}
.notice{background:#eaf5ee;border:1px solid #bcdcc7;color:#2d6a45;border-radius:12px;padding:12px 14px;margin:24px 0 0;font-size:13.5px;max-width:620px}
.page .alert{margin:24px 0 0;max-width:620px}

/* Dashboard */
.dash-page{overflow:hidden}
.app{height:calc(100vh - 77px);height:calc(100dvh - 77px);display:grid;grid-template-columns:1fr 360px}
.main{display:flex;flex-direction:column;min-height:0;padding:20px 28px 24px}
.main-top{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:16px}
.main-top h1{font-size:26px;letter-spacing:-.04em;font-weight:600;line-height:1.1}
.status{font-size:13.5px;color:#5d5e5a;text-align:right}
.previews{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:16px}
.pane{margin:0;display:flex;flex-direction:column;min-height:0;min-width:0}
.pane .stage-bar,.pane .stage-foot{padding:10px 16px;flex:none}
.frame-wrap{flex:1;min-height:0;container-type:size;display:flex;align-items:center;justify-content:center;background:#000}
.frame{position:relative;background:#101113;overflow:hidden}
.previews.landscape .frame{width:min(100cqw,100cqh*16/9);aspect-ratio:16/9}
.previews.portrait .frame{width:min(100cqw,100cqh*9/16);aspect-ratio:9/16}
.frame video{width:100%;height:100%;object-fit:cover;display:block}
.frame.cam video{transform:scaleX(-1)}
.cam-empty{position:absolute;inset:0;display:flex;flex-direction:column;gap:14px;align-items:center;justify-content:center;text-align:center;padding:20px;color:#8c8d90;font-size:14px}
.btn-light-on-dark{background:transparent;border-color:#55565a;color:#e6e6e2;padding:9px 14px}
.btn-light-on-dark:hover{background:#2b2c2f}
.out-char{position:absolute;inset:0;background-size:cover;background-position:center;display:flex;align-items:flex-end;padding:16px}
.out-char[hidden]{display:none}
.out-char span{position:absolute;inset:0;display:grid;place-items:center;font-size:min(30cqw,160px);font-weight:600;color:rgba(255,255,255,.85);letter-spacing:-.05em}
.out-char em{position:relative;font-style:normal;background:rgba(20,21,23,.8);color:#fff;font-size:12px;font-weight:600;padding:6px 12px;border-radius:999px}

.side{display:flex;flex-direction:column;min-height:0;border-left:1px solid var(--line);background:var(--bg)}
.side-scroll{flex:1;min-height:0;overflow-y:auto;padding:20px 24px 8px}
.block{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--line)}
.block:last-child{border-bottom:0;margin-bottom:0}
.block .eyebrow{margin-bottom:12px}
.char-grid{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;padding:4px 4px 12px;margin:0 -4px 4px;scrollbar-width:thin;scrollbar-color:#b5b5ad transparent;cursor:grab;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
.char-grid.dragging{scroll-snap-type:none;cursor:grabbing;user-select:none}

/* Cues that the character row scrolls sideways: a hint label, soft edge fades, and a one-time nudge (see app.js) */
.char-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:12px}
.char-head .eyebrow{margin-bottom:0}
.swipe-hint{display:none;font-size:12px;font-weight:500;color:#5d5e5a}
.swipe-arrow{display:inline-block;animation:swipeArrow 1.4s ease-in-out infinite}
@keyframes swipeArrow{0%,100%{transform:translateX(0)}50%{transform:translateX(5px)}}
@media (prefers-reduced-motion:reduce){.swipe-arrow{animation:none}}
.char-wrap{position:relative}
.char-wrap::before,.char-wrap::after{content:"";position:absolute;top:0;bottom:16px;width:34px;pointer-events:none;opacity:0;transition:opacity .2s;z-index:2}
.char-wrap::before{left:-4px;background:linear-gradient(to right,var(--bg),rgba(245,245,240,0))}
.char-wrap::after{right:-4px;background:linear-gradient(to left,var(--bg),rgba(245,245,240,0))}
.char-wrap.can-left::before,.char-wrap.can-right::after{opacity:1}
@media (hover:none),(max-width:900px){.swipe-hint:not([hidden]){display:inline}}
.char{flex:0 0 92px;scroll-snap-align:start;aspect-ratio:3/4;border:2px solid transparent;border-radius:12px;display:flex;align-items:flex-end;padding:8px;color:#fff;font:500 12px Inter,sans-serif;cursor:pointer;background-size:cover;background-position:center;text-align:left}
.char span{background:rgba(20,21,23,.6);border-radius:999px;padding:3px 9px}
.char:hover{filter:brightness(1.08)}
.char[aria-pressed=true]{border-color:var(--ink);box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--ink)}
.upload{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px;display:grid;gap:10px}
.up-title{font-size:13px;font-weight:600}
.check{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;font-weight:400;color:#5d5e5a;cursor:pointer}
.check input{margin-top:2px}
.file{display:block;border:1.5px dashed #b5b5ad;border-radius:10px;padding:14px;text-align:center;font-size:12.5px;color:#5d5e5a;cursor:pointer;background:#fff;font-weight:400}
.file input{display:none}
.file[aria-disabled=true]{opacity:.55;cursor:not-allowed}
.upload.locked{opacity:.7}
.upload.locked .check,.upload.locked .file{cursor:not-allowed}
.soon{font-size:10px;letter-spacing:.08em;text-transform:uppercase;font-weight:600;color:var(--muted);border:1px solid #b5b5ad;border-radius:999px;padding:2px 8px;margin-left:6px;vertical-align:middle}
.err{color:var(--danger);min-height:0}
.err:empty{display:none}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip-btn{border:1px solid #c9c9c1;background:#fff;border-radius:999px;padding:8px 14px;font:500 13px Inter,sans-serif;color:var(--ink);cursor:pointer}
.chip-btn:hover{background:var(--surface)}
.chip-btn[aria-pressed=true],.chip-btn.active{background:var(--dark);border-color:var(--dark);color:#fff}
.chip-btn.more{border-style:dashed;color:#5d5e5a}
.chip-btn.more.active{border-style:solid;color:#fff}
#morePf{margin-top:10px}
#morePf[hidden]{display:none}
select{width:100%;padding:12px 14px;border:1px solid #c9c9c1;border-radius:12px;background:#fff;font:14px Inter,sans-serif;color:var(--ink)}
.seg{display:inline-flex;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:4px;gap:4px;width:100%}
.seg button{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;background:transparent;border-radius:9px;padding:9px 12px;font:500 14px Inter,sans-serif;color:#5d5e5a;cursor:pointer}
.seg button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.12)}
.seg i{display:inline-block;border:1.6px solid currentColor;border-radius:2px}
.ico-p{width:9px;height:14px}.ico-l{width:14px;height:9px}
.side-foot{padding:16px 24px 20px;border-top:1px solid var(--line);display:grid;gap:10px;background:var(--bg)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.stage-foot .linkbtn{color:#e6e6e2;border-color:#8c8d90}
.voice-line{margin-top:12px;display:flex;align-items:center;gap:10px;font-size:13px;color:#5d5e5a;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px 12px}
.voice-line[hidden],.vplay[hidden]{display:none}
.voice-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.voice-text strong{color:var(--ink)}
.vplay{flex:0 0 30px;width:30px;height:30px;border-radius:50%;border:0;background:var(--dark);color:#fff;font-size:10px;cursor:pointer;display:grid;place-items:center;padding-left:1px}
.vplay.on{background:var(--accent);padding-left:0;letter-spacing:-2px}
.vnote{color:#3f7a55;margin-top:-8px}
.vnote:empty{display:none}
.modal-foot{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}
.linkbtn{background:none;border:0;border-bottom:1px solid var(--ink);padding:0;margin-left:6px;font:500 12.5px Inter,sans-serif;color:var(--ink);cursor:pointer}

/* AI engine not activated modal */
.modal.modal-ai{width:min(440px,calc(100vw - 32px));text-align:center}
.ai-icon{width:60px;height:60px;border-radius:50%;background:#fdf3e1;border:1px solid #ecd3a3;display:grid;place-items:center;margin:4px auto 16px}
.ai-icon svg{width:28px;height:28px;fill:none;stroke:#8a5a14;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.modal-ai h2{font-size:26px;letter-spacing:-.04em;font-weight:600;line-height:1.15}
.ai-msg{margin:10px 0 8px;color:#44453f}
.ai-detail{margin-bottom:4px}
.ai-detail strong{color:var(--ink)}
.ai-foot{justify-content:center}

/* Plan confirmed (thank-you) modal */
.modal.modal-paid{width:min(440px,calc(100vw - 32px));text-align:center}
.pd-icon{width:60px;height:60px;border-radius:50%;background:#eaf5ee;border:1px solid #bcdcc7;display:grid;place-items:center;margin:4px auto 16px}
.pd-icon svg{width:28px;height:28px;fill:none;stroke:#2d6a45;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.modal-paid .eyebrow{margin-bottom:6px}
.modal-paid h2{font-size:30px;letter-spacing:-.045em;font-weight:600;line-height:1.1}
.pd-thanks{color:#5d5e5a;margin:8px 0 18px}
.modal-paid .cf-rows{text-align:left;margin:0 0 14px;border-top:1px solid var(--line)}
.pd-hint{margin-bottom:18px}

/* Confirm-your-plan panel */
.modal.modal-confirm{width:min(500px,calc(100vw - 32px))}
.modal-confirm .modal-head{margin-bottom:18px}
#cfTitle:focus{outline:none}
.modal-confirm .modal-head h2{margin-bottom:4px}
.cf-price{display:flex;align-items:baseline;gap:10px;padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.cf-price span{font-size:40px;font-weight:600;letter-spacing:-.05em;line-height:1}
.cf-price small{font-size:14px;color:var(--muted)}
.cf-rows{margin:6px 0 4px}
.cf-rows div{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--line);font-size:14px}
.cf-rows dt{color:var(--muted);flex:0 0 auto}
.cf-rows dd{text-align:right;font-weight:500;min-width:0;overflow-wrap:anywhere}
.cf-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;color:var(--muted);margin:18px 0 10px}
.cf-feats{list-style:none;display:grid;gap:8px;font-size:14px;margin-bottom:6px}
.cf-feats li::before{content:"✓";margin-right:9px;color:#4fa36a}
.modal-confirm .alert,.modal-confirm .notice{margin:16px 0 0;max-width:none}
.cf-foot{margin-top:14px;text-align:center}
@media (max-width:520px){.cf-price span{font-size:34px}}

/* Plan modal */
.modal.modal-plans{width:min(900px,calc(100vw - 32px))}
.pm-sub{margin:-8px 0 22px;max-width:560px}
.pm-plans{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.pm-plan{position:relative;display:flex;flex-direction:column;gap:6px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px}
.pm-plan.featured{border-color:var(--dark);box-shadow:0 18px 36px -24px rgba(0,0,0,.35)}
.pm-plan h3{font-size:17px;letter-spacing:-.02em}
.pm-plan .price{font-size:30px;letter-spacing:-.04em;font-weight:600;margin:6px 0 10px}
.pm-plan .price small{font-size:12px;color:var(--muted);letter-spacing:0;font-weight:400}
.pm-plan ul{display:grid;gap:7px;font-size:13px;margin-bottom:18px;flex:1;color:#44453f}
.pm-plan li::before{content:"✓";margin-right:8px;color:#4fa36a}
.pm-foot{margin-top:16px}
@media (max-width:760px){.pm-plans{grid-template-columns:1fr}}

/* Character modal */
.modal.modal-sm{width:min(560px,calc(100vw - 32px))}
.cm-body{display:grid;grid-template-columns:170px 1fr;gap:22px;align-items:start}
.cm-preview{aspect-ratio:3/4;border-radius:var(--r);border:1px solid var(--line);background:var(--surface) center/cover no-repeat}
.cm-form{display:grid;gap:12px}
@media (max-width:520px){.cm-body{grid-template-columns:1fr}.cm-preview{max-width:200px}}

/* Voice modal */
.modal{border:1px solid var(--line);border-radius:24px;background:var(--bg);color:var(--ink);padding:32px;width:min(780px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;overflow:auto;box-shadow:0 40px 80px -30px rgba(0,0,0,.45)}
.modal::backdrop{background:rgba(20,21,23,.55);backdrop-filter:blur(3px)}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24px}
.modal-head .eyebrow{margin-bottom:6px}
.modal-head h2{font-size:30px;letter-spacing:-.045em;font-weight:600;line-height:1.1}
.modal-x{border:1px solid var(--line);background:#fff;width:36px;height:36px;border-radius:50%;font-size:22px;line-height:1;cursor:pointer;color:#5d5e5a;display:grid;place-items:center}
.modal-x:hover{background:var(--surface)}
.vm-label{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;color:var(--muted);margin-bottom:12px}
.voice-list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:28px}
.voice-item{position:relative}
.voice-row{width:100%;display:flex;align-items:center;gap:14px;text-align:left;border:1px solid var(--line);background:#fff;border-radius:16px;padding:14px 68px 14px 14px;cursor:pointer;font-family:Inter,sans-serif;color:var(--ink);transition:.15s}
.voice-row:hover{background:var(--surface)}
.voice-row[aria-pressed=true]{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.v-av{flex:0 0 48px;height:48px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:600;font-size:17px;background-size:cover;background-position:center}
.v-av.mine{background:var(--dark);font-size:18px}
.v-text{display:grid;gap:2px;min-width:0}
.v-name{font-weight:600;font-size:15px;letter-spacing:-.01em}
.v-sub{font-size:12.5px;color:var(--muted)}
.v-play{position:absolute;right:14px;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;border:0;background:var(--dark);color:#fff;font-size:12px;cursor:pointer;display:grid;place-items:center;padding-left:2px;transition:.15s}
.v-play:hover:not(:disabled){background:#000;transform:translateY(-50%) scale(1.06)}
.v-play.on{background:var(--accent);padding-left:0;letter-spacing:-2px}
.v-play:disabled{background:#e2e2db;color:#a5a69f;cursor:not-allowed}
.dropzone{display:grid;justify-items:center;gap:6px;text-align:center;border:1.5px dashed #b5b5ad;border-radius:16px;padding:28px 20px;background:#fff;cursor:pointer;transition:.15s}
.dropzone:hover{background:var(--surface);border-color:var(--ink)}
.dropzone input{display:none}
.dropzone svg{width:30px;height:30px;fill:none;stroke:var(--ink);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;margin-bottom:4px}
.dz-title{font-weight:600;font-size:15px}
.dz-sub{font-size:12.5px;color:var(--muted)}
@media (max-width:620px){
  .modal{padding:22px 18px}
  .voice-list{grid-template-columns:1fr}
}
/* On tablets and phones the upload comes first, then the list of voices */
@media (max-width:900px){
  .vm-body{display:flex;flex-direction:column}
  .vm-upload{order:-1;margin-bottom:24px;padding-bottom:22px;border-bottom:1px solid var(--line)}
  .vm-upload .dropzone{padding:20px 16px}
  .vm-upload .vnote{margin-top:10px}
  .vm-voices .voice-list{margin-bottom:8px}
}

/* Responsive */
@media (max-width:900px){
  .nav-in{gap:16px}
  .nav-links{display:none;position:absolute;top:76px;left:0;right:0;background:var(--bg);flex-direction:column;gap:0;padding:8px 24px 16px;border-bottom:1px solid var(--line)}
  .nav-links.open{display:flex}
  .nav-links a{padding:14px 0;border-bottom:1px solid var(--line)}
  .nav-cta{margin-left:auto}
  .nav-toggle{display:flex;margin-left:0}
  .hero-grid{grid-template-columns:1fr;gap:32px}
  /* Dashboard on tablets and phones: one scrolling column, controls under the previews, Start pinned to the bottom */
  html{scroll-padding-bottom:140px}   /* things scrolled into view never land under the pinned Start bar */
  .dash-page{overflow:auto}
  .app{height:auto;grid-template-columns:minmax(0,1fr);padding-bottom:calc(120px + env(safe-area-inset-bottom))}
  .main,.side{min-width:0}   /* without this the character row stretches the whole page wider than the screen */
  .main{padding:16px 16px 8px}
  .main-top{flex-direction:column;align-items:flex-start;gap:6px;margin-bottom:12px}
  .status{text-align:left}
  .side{border-left:0;border-top:1px solid var(--line)}
  .side-scroll{overflow:visible;padding:20px 16px 8px}
  .previews{flex:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .previews.landscape{grid-template-columns:minmax(0,1fr)}
  .pane .stage-bar,.pane .stage-foot{padding:9px 10px;font-size:11px}
  .pane .stage-bar .dots{display:none}
  .pane .stage-foot{flex-wrap:wrap;gap:4px 8px}
  .hide-m,.stage-foot #outNote{display:none}
  .frame-wrap{container-type:normal;flex:none;display:block;padding:0}
  .previews.portrait .frame{width:100%;height:auto;aspect-ratio:9/16}
  .previews.landscape .frame{width:100%;height:auto;aspect-ratio:16/9}
  .cam-empty{padding:10px;font-size:12.5px;gap:10px}
  .side-foot{position:fixed;left:0;right:0;bottom:0;z-index:30;padding:12px 16px calc(12px + env(safe-area-inset-bottom));box-shadow:0 -12px 24px -18px rgba(0,0,0,.4)}
  .side-foot > .small:not(.err){display:none}
  /* comfortable tap targets */
  .btn{min-height:44px}
  .chip-btn{min-height:44px;padding:11px 16px}
  .seg button{min-height:44px}
  .nav-toggle{width:44px;height:44px}
  .modal-x,.v-play{width:44px;height:44px}
  select,input[type=text],input[type=email],input[type=password]{min-height:44px;font-size:16px}
  .stage.portrait{justify-self:center;max-width:440px}
  .modal{padding:24px 20px}
  .steps,.plans,.uses{grid-template-columns:1fr}
  .quotes{columns:1}
  .step{border-right:0;border-bottom:1px solid var(--line);padding-left:0}
  .step-top{margin-bottom:28px}
  .note.right{text-align:left}
    .gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
}
@media (max-width:560px){
  .gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}
@media (max-width:520px){
  .wrap{padding-left:16px;padding-right:16px}
  .nav-cta .link,.nav-user{display:none}
  .section{padding-top:72px}
  .cta{padding-top:72px}
  .strip strong{width:100%}
}
