:root{color-scheme:dark;--bg:#080b16;--panel:#111629;--line:#ffffff20;--text:#f7f5fb;--muted:#c2bfd0;--violet:#b7a5ff;--cyan:#76e5dd;--pink:#f2b6dc}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:var(--bg);color:var(--text);font:15px/1.5 Inter,ui-sans-serif,system-ui,sans-serif}.noise{position:fixed;inset:0;z-index:5;pointer-events:none;opacity:.035;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E")}.brand{color:var(--text);text-decoration:none;font-size:1.2rem;font-weight:800;letter-spacing:.16em}.brand span{color:var(--cyan)}.eyebrow{margin:0;color:var(--violet);font-size:.65rem;font-weight:800;letter-spacing:.18em;text-transform:uppercase}button,input,textarea{font:inherit}.auth-screen{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:8vw;align-items:center;width:min(1120px,calc(100% - 3rem));height:100%;margin:auto}.auth-copy .brand{display:inline-block;margin-bottom:5rem}.auth-copy h1,.setup-card h1{margin:1rem 0;font-size:clamp(3rem,7vw,6rem);letter-spacing:-.075em;line-height:.95}.auth-copy h1 em,.setup-card h1 em,.floating-welcome em{color:var(--pink);font-style:normal}.hero-copy{max-width:34rem;margin:1.7rem 0;color:var(--muted);font-size:1.05rem}.story-points{display:grid;gap:.65rem;margin-top:2.5rem;color:var(--muted)}.story-points b{display:inline-block;width:2.6rem;color:var(--cyan);font-size:.68rem}.auth-card,.setup-card{padding:2rem;border:1px solid #ffffff1c;border-radius:1.2rem;background:#12172bd9;box-shadow:0 1.5rem 5rem #0007;backdrop-filter:blur(20px)}.orb{width:3.5rem;height:3.5rem;margin-bottom:1.5rem;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff 0 3%,var(--cyan) 10%,#7064d8 42%,transparent 68%);box-shadow:0 0 3rem #7c6cff99}.orb-small{width:2.5rem;height:2.5rem}.auth-card-heading h2{margin:.4rem 0 .2rem;font-size:1.8rem}.auth-card-heading p:last-child,.setup-copy{margin:0;color:var(--muted)}.auth-tabs{display:flex;gap:1.2rem;margin:1.8rem 0 1.1rem;border-bottom:1px solid var(--line)}.tab{padding:0 0 .65rem;border:0;background:none;color:var(--muted);cursor:pointer}.tab.is-active{color:var(--text);border-bottom:2px solid var(--cyan)}.auth-form,.profile-form{display:grid;gap:.9rem}.auth-form label,.profile-form label{display:grid;gap:.35rem;color:var(--muted);font-size:.78rem;font-weight:700}.auth-form input,.profile-form input,.profile-form textarea{width:100%;padding:.8rem .9rem;border:1px solid var(--line);border-radius:.6rem;background:#090d1b;color:var(--text);outline:0}.auth-form input:focus,.profile-form input:focus,.profile-form textarea:focus{border-color:var(--cyan)}.primary-button,.send-btn{display:flex;align-items:center;justify-content:space-between;border:0;border-radius:.65rem;padding:.8rem 1rem;background:linear-gradient(100deg,var(--violet),var(--cyan));color:#080b16;font-weight:800;cursor:pointer}.form-error{min-height:1.2em;margin:0;color:#ff9db2;font-size:.78rem}.prototype-note{margin:1.4rem 0 0;color:#767d98;font-size:.68rem;text-align:center}.setup-screen{display:grid;place-items:center;width:100%;height:100%;padding:2rem}.setup-card{width:min(650px,100%)}.step-mark{margin-bottom:4rem;color:var(--cyan);font-weight:800}.step-mark span{color:var(--muted);font-weight:400}.setup-card h1{font-size:clamp(2.8rem,7vw,5.2rem);margin-bottom:1.2rem}.setup-copy{margin-bottom:2rem}.setup-actions{display:flex;align-items:center;justify-content:space-between;margin-top:.9rem}.text-button{border:0;background:none;color:var(--muted);cursor:pointer}.text-button:hover{color:var(--text)}[hidden]{display:none!important}
.app-screen{position:relative;width:100%;height:100dvh;min-height:0;overflow:hidden;background:#080b16}.stage{position:absolute;inset:0;z-index:0;overflow:hidden;background:radial-gradient(circle at 50% 35%,#36366d,#0a0e1c 70%)}.stage sv-presenter{display:block;width:100%;height:100%}.stage:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#080b1666 0%,transparent 27%,transparent 62%,#080b16dd 100%)}.stage-loading,.stage-error{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;background:#080b16dd;color:var(--muted)}.stage-loading span{width:.45rem;height:.45rem;border-radius:50%;background:var(--cyan);animation:pulse 1.1s infinite}.stage-loading span:nth-child(2){animation-delay:.15s}.stage-loading span:nth-child(3){animation-delay:.3s}.stage-loading small{margin-top:.4rem;font-size:.68rem;letter-spacing:.14em;text-transform:uppercase}.stage-error{text-align:center;padding:2rem}.floating-header,.floating-welcome,.floating-prompts,.floating-conversation,.floating-controls{position:absolute;z-index:3}.floating-header{top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:1.4rem 2rem;background:linear-gradient(180deg,#080b16cc,transparent)}.header-actions{display:flex;align-items:center;gap:1rem}.user-pill,.stage-label{padding:.4rem .7rem;border:1px solid var(--line);border-radius:2rem;background:#080b1666;color:var(--muted);font-size:.72rem;backdrop-filter:blur(14px)}.stage-label{display:flex;align-items:center;gap:.4rem}.status-dot{display:inline-block;width:.48rem;height:.48rem;border-radius:50%;background:var(--cyan);box-shadow:0 0 1rem var(--cyan)}.floating-welcome{top:6rem;left:50%;width:min(600px,calc(100% - 2rem));transform:translateX(-50%);text-align:center;text-shadow:0 2px 18px #000}.floating-welcome h1{margin:.35rem 0;font-size:clamp(1.7rem,3vw,2.8rem);letter-spacing:-.06em}.floating-welcome p:last-child{margin:0;color:#e4e0ecaa;font-size:.8rem}.floating-prompts{top:12rem;left:50%;display:flex;gap:.5rem;transform:translateX(-50%)}.prompt-chip{border:1px solid #ffffff30;border-radius:2rem;padding:.48rem .8rem;background:#080b1666;color:#f7f5fbcc;font-size:.75rem;white-space:nowrap;cursor:pointer;backdrop-filter:blur(12px)}.prompt-chip:hover{border-color:var(--cyan);color:var(--text)}.floating-conversation{right:2rem;bottom:7rem;width:min(300px,calc(100% - 2rem));padding:.7rem;border:1px solid var(--line);border-radius:1rem;background:#080b1699;backdrop-filter:blur(16px)}.chat-log{display:flex;flex-direction:column;gap:.45rem;max-height:10rem;overflow-y:auto;margin:0;padding:0;list-style:none}.chat-log:empty{display:none}.msg{max-width:90%;padding:.5rem .7rem;border-radius:.75rem;font-size:.78rem;line-height:1.4;white-space:pre-wrap}.msg--user{align-self:flex-end;background:var(--violet);color:#0b0d18}.msg--assistant{align-self:flex-start;border:1px solid var(--line);background:#151a30;color:var(--text)}.msg--error{align-self:flex-start;color:var(--muted);font-style:italic}.floating-controls{right:2rem;bottom:2rem;left:2rem;display:flex;align-items:center;justify-content:center;gap:1rem}.voice-dock{display:flex;align-items:center;gap:.7rem;padding:.45rem 1rem .45rem .45rem;border:1px solid var(--line);border-radius:3rem;background:#080b16c7;box-shadow:0 .8rem 2rem #0006;backdrop-filter:blur(18px)}.voice-dock strong,.voice-dock small{display:block}.voice-dock strong{font-size:.78rem}.voice-dock small{color:var(--muted);font-size:.67rem}.mic-button{display:grid;place-items:center;width:3.2rem;height:3.2rem;border:0;border-radius:50%;background:linear-gradient(145deg,var(--cyan),var(--violet));color:#080b16;box-shadow:0 0 1.5rem #76e5dd55;cursor:pointer}.mic-button.is-listening{background:#ff9db2;box-shadow:0 0 1.5rem #ff9db266;animation:breathe 1.3s infinite}.mic-icon{font-size:1.6rem;line-height:1;transform:rotate(180deg)}.round-button{width:2.4rem;height:2.4rem;border:1px solid var(--line);border-radius:50%;background:#080b1699;color:var(--muted);cursor:pointer}.round-button:hover{color:#ff9db2;border-color:#ff9db2}.hidden-chat-form{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.send-btn{display:inline-flex}.send-btn:disabled{opacity:.5;cursor:not-allowed}@keyframes pulse{0%,100%{opacity:.25;transform:translateY(0)}50%{opacity:1;transform:translateY(-.2rem)}}@keyframes breathe{50%{transform:scale(1.08)}}
@media(max-width:700px){.auth-screen,.setup-screen{height:100dvh;min-height:100dvh;overflow-y:auto;align-items:start}.auth-screen{grid-template-columns:1fr;gap:2rem;width:min(420px,calc(100% - 2rem));padding:2rem 0}.auth-copy .brand{margin-bottom:3rem}.auth-copy h1{font-size:clamp(2.8rem,14vw,4.5rem)}.auth-copy .hero-copy,.story-points{display:none}.auth-card{padding:1.4rem}.floating-header{padding:1rem}.floating-header .user-pill{display:none}.floating-welcome{top:5rem}.floating-welcome h1{font-size:1.65rem}.floating-welcome p:last-child{max-width:20rem;margin:auto}.floating-prompts{top:10rem;max-width:calc(100% - 1.5rem);overflow-x:auto;justify-content:flex-start}.floating-conversation{right:.75rem;bottom:6rem;width:min(270px,calc(100% - 1.5rem))}.floating-controls{right:.75rem;bottom:.8rem;left:.75rem}.voice-dock{max-width:calc(100% - 3.5rem);padding-right:.7rem}.voice-dock small{display:none}.voice-dock strong{font-size:.72rem}.mic-button{width:2.8rem;height:2.8rem}.round-button{flex:0 0 auto}.profile-button{width:2.75rem;height:2.75rem}}
/* Only the live avatar view is locked to the viewport. Auth and setup remain scrollable. */
body{overflow:auto}
.auth-screen,.setup-screen{min-height:100dvh;height:auto;overflow:visible}
.app-screen{overflow:hidden}
/* Phone layout: forms may scroll, while the live avatar remains a true viewport. */
@media (max-width: 700px) {
  html, body { width: 100%; min-height: 100%; height: auto; overflow-x: hidden; overflow-y: auto; }
  .auth-screen, .setup-screen { width: 100%; min-height: 100svh; height: auto; padding: max(1.25rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom)); align-content: start; }
  .auth-copy { padding-top: .5rem; }
  .auth-copy .brand { margin-bottom: 2.5rem; }
  .auth-copy h1 { margin-top: .8rem; font-size: clamp(2.5rem, 13vw, 4rem); }
  .auth-card, .setup-card { width: 100%; padding: 1.25rem; border-radius: 1rem; }
  .auth-card-heading h2 { font-size: 1.55rem; }
  .setup-screen { place-items: start center; }
  .setup-card h1 { font-size: clamp(2.35rem, 12vw, 4rem); }
  .step-mark { margin-bottom: 2.5rem; }
  .app-screen { width: 100%; height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
  .floating-header { padding: max(.75rem, env(safe-area-inset-top)) .8rem 0; gap: .5rem; }
  .floating-header .brand { font-size: 1rem; }
  .header-actions { min-width: 0; gap: .3rem; }
  .stage-label { padding: .35rem .5rem; font-size: .62rem; }
  .header-actions .text-button { padding: .55rem .3rem; font-size: .72rem; white-space: nowrap; }
  .floating-conversation { left: .75rem; right: .75rem; bottom: 7.5rem; width: auto; padding: .55rem; }
  .chat-log { max-height: 20svh; }
  .msg { max-width: 94%; font-size: .75rem; }
  .floating-controls { right: .75rem; bottom: max(.7rem, env(safe-area-inset-bottom)); left: .75rem; gap: .5rem; }
  .voice-dock { min-width: 0; flex: 1; max-width: none; padding-right: .7rem; }
  .voice-dock > div { min-width: 0; overflow: hidden; }
  .voice-dock strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .voice-dock small { display: none; }
  .mic-button { flex: 0 0 auto; width: 3rem; height: 3rem; }
  .round-button { flex: 0 0 auto; width: 2.7rem; height: 2.7rem; }
}
@media (max-width: 390px) {
  .stage-label { display: none; }
  .header-actions .text-button:first-of-type { display: none; }
  .floating-welcome, .floating-prompts { display: none; }
}
.profile-menu-wrap{position:relative}.profile-button{display:grid;place-items:center;width:2.4rem;height:2.4rem;border:1px solid #ffffff40;border-radius:50%;background:linear-gradient(145deg,var(--violet),var(--cyan));color:#080b16;font-size:.78rem;font-weight:900;cursor:pointer;box-shadow:0 .35rem 1rem #0005}.profile-button[aria-expanded="true"]{outline:2px solid var(--cyan);outline-offset:2px}.profile-menu{position:absolute;top:3rem;right:0;width:13rem;padding:.45rem;border:1px solid #ffffff25;border-radius:1rem;background:#10162beb;box-shadow:0 1rem 3rem #0009;backdrop-filter:blur(20px)}.profile-menu-user{padding:.65rem .7rem .75rem;border-bottom:1px solid var(--line)}.profile-menu-user strong,.profile-menu-user small{display:block}.profile-menu-user strong{font-size:.82rem}.profile-menu-user small{margin-top:.15rem;color:var(--muted);font-size:.68rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-menu button{display:block;width:100%;border:0;border-radius:.6rem;padding:.65rem .7rem;background:transparent;color:var(--text);font-size:.78rem;text-align:left;cursor:pointer}.profile-menu button:hover{background:#ffffff12}.profile-menu button:last-child{color:#ffb2c1}.profile-modal{position:fixed;inset:0;z-index:10;display:grid;place-items:center;padding:1rem;background:#05071299;backdrop-filter:blur(12px)}.profile-dialog{width:min(420px,100%);padding:1.25rem;border:1px solid #ffffff25;border-radius:1.1rem;background:#11172beb;box-shadow:0 1.5rem 5rem #000a}.profile-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:1.1rem}.profile-dialog-heading h2{margin:.25rem 0 0;font-size:1.35rem}.profile-close{width:2rem;height:2rem;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--muted);font-size:1.25rem;line-height:1;cursor:pointer}.profile-edit-form{display:grid;gap:.8rem}.profile-edit-form label{display:grid;gap:.35rem;color:var(--muted);font-size:.75rem;font-weight:700}.profile-edit-form input,.profile-edit-form textarea{width:100%;padding:.75rem .85rem;border:1px solid var(--line);border-radius:.6rem;background:#090d1b;color:var(--text);font:inherit;outline:0}.profile-edit-form input:focus,.profile-edit-form textarea:focus{border-color:var(--cyan)}.profile-edit-actions{display:flex;align-items:center;justify-content:space-between;margin-top:.3rem}.profile-edit-actions .primary-button{min-width:8.5rem}.profile-edit-actions .primary-button span{font-size:1rem}@media(max-width:700px){.profile-menu{top:2.85rem;right:-.25rem}.profile-modal{align-items:end;padding:.75rem}.profile-dialog{border-radius:1rem 1rem .75rem .75rem;padding:1rem}.profile-dialog-heading h2{font-size:1.2rem}}
