/* Bottom composer stays in one DOM location from the blank canvas to answers. */
.ai-thread{position:relative}
.ai-page.has-welcome .ai-topic-stage{opacity:0;pointer-events:none}
.ai-page:not(.has-welcome) .ai-topic-stage{transition:opacity 380ms ease 160ms}
.ai-welcome{position:absolute;inset:0 0 150px;z-index:2;display:flex;justify-content:center;align-items:flex-start;padding:clamp(50px,13vh,170px) 28px 0;pointer-events:none;overflow:visible}
.ai-welcome-art{position:relative;width:min(650px,100%);text-align:center;isolation:isolate;animation:aiWelcomeIn 700ms cubic-bezier(.22,1,.36,1) both}
.ai-welcome-halo{position:absolute;z-index:-1;width:110%;height:230%;left:-5%;top:-65%;background:radial-gradient(ellipse,color-mix(in srgb,var(--voxel-top) 36%,transparent),transparent 66%);opacity:.65;pointer-events:none;transition:background 400ms ease}
.ai-voxel-logo{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 13px 10px color-mix(in srgb,var(--voxel-side) 10%,transparent))}
.ai-voxel[data-tone=accent]{--voxel-face:var(--voxel-top)}
.ai-welcome-tagline{font-size:14px;line-height:1.8;font-weight:400;letter-spacing:1px;margin:18px 0 14px;color:var(--ai-secondary)}
.ai-welcome-progress{height:32px;margin-top:18px;font-size:12px;line-height:24px;color:var(--ai-secondary);display:flex;align-items:center;justify-content:center;gap:7px}
.ai-welcome-progress i{width:5px;height:5px;background:var(--voxel-face);border-radius:50%;animation:aiPulse 1.5s ease infinite}
.edition-weekend .ai-voxel-logo{animation:aiWeekendFloat 6s ease-in-out infinite}
.ai-welcome.is-leaving{pointer-events:none}
.ai-welcome.is-leaving .ai-welcome-art{animation:none}
.ai-welcome.is-leaving .ai-voxel-logo{animation:none}
.ai-welcome.is-leaving .ai-voxel{transform-box:fill-box;transform-origin:center;animation:aiVoxelScatter 850ms cubic-bezier(.3,.1,.65,1) var(--delay) both;will-change:transform,opacity}
.ai-welcome.is-leaving :is(.ai-welcome-tagline,.ai-welcome-progress,.ai-welcome-halo){opacity:0;transition:opacity 200ms ease}
@keyframes aiWelcomeIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes aiWeekendFloat{0%,100%{transform:translateY(0) rotate(-.35deg)}50%{transform:translateY(-5px) rotate(.35deg)}}
@keyframes aiVoxelScatter{0%{opacity:1;transform:translate(0,0) rotate(0) scale(1)}28%{opacity:.85}100%{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--rz)) scale(.3)}}
@media(max-width:600px){.ai-welcome{bottom:145px;padding:clamp(38px,12vh,100px) 24px 0}.ai-welcome-tagline{font-size:12px;letter-spacing:.5px;margin-top:12px}.ai-welcome-halo{height:240%}.ai-welcome-progress{margin-top:12px}}
@media(max-height:540px){.ai-welcome{padding-top:12px;bottom:110px}.ai-welcome-art{width:min(370px,70%)}.ai-welcome-tagline{margin:4px 0;font-size:11px}.ai-welcome-progress{margin:4px 0;height:20px}}

/* Quiet breathing plus occasional, staggered hops from a handful of cubes. */
.ai-welcome.is-idle .ai-voxel-logo{animation:aiLogoBreathe 7s ease-in-out infinite}
.ai-welcome.is-idle.edition-weekend .ai-voxel-logo{animation:aiWeekendFloat 6s ease-in-out infinite}
.ai-welcome.is-idle .ai-voxel[data-playful=true]{transform-box:fill-box;transform-origin:center;animation:aiVoxelPlay var(--idle-duration) ease-in-out var(--idle-delay) infinite}
@keyframes aiLogoBreathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes aiVoxelPlay{0%,68%,100%{transform:translate(0,0) rotate(0)}75%{transform:translate(-.7px,-1.5px) rotate(-3deg)}83%{transform:translate(.5px,-3px) rotate(3deg)}92%{transform:translate(0,0) rotate(0)}}
@media(prefers-reduced-motion:reduce){.ai-welcome *, .ai-topic-stage{animation:none!important;transition:none!important}.ai-welcome.is-leaving{display:none}}
.ai-thread>.ai-compose-wrap{z-index:3}

/* A companion and a seasonal object form a tiny scene above the letters. */
.ai-welcome.is-idle .ai-voxel-friend{transform-box:fill-box;transform-origin:50% 100%;animation:aiFriendPeek 8s ease-in-out infinite}
.ai-welcome.is-idle .friend-1{animation-name:aiObjectSway;animation-delay:-3s;animation-duration:9s}
.ai-welcome.is-idle .ai-voxel-scene .ai-voxel{animation:none}
.ai-welcome.is-leaving .ai-voxel-friend{animation:none}
@keyframes aiFriendPeek{0%,60%,100%{transform:translateY(0) rotate(0)}68%{transform:translateY(-2px) rotate(-5deg)}76%{transform:translateY(-3px) rotate(4deg)}86%{transform:translateY(0) rotate(0)}}
@keyframes aiObjectSway{0%,60%,100%{transform:rotate(0)}72%{transform:rotate(6deg)}86%{transform:rotate(-4deg)}}
@media(prefers-reduced-motion:reduce){.ai-welcome .ai-voxel-friend{animation:none!important}}
