/* Home Screen invitation: an accessible, scrollable surface above Library panels. */
.library-home-screen-invite{position:fixed;inset:0;box-sizing:border-box;width:100%;max-width:600px;height:100%;height:100dvh;max-height:100dvh;margin:auto;padding:0;border:1px solid #ffffff20;border-radius:28px;color:#f6f4fc;background:radial-gradient(ellipse at 12% 0%,#7144ac55,transparent 50%),radial-gradient(ellipse at 100% 65%,#22b3b527,transparent 55%),#090b13;box-shadow:0 25px 100px #000b;font:16px/1.5 system-ui,sans-serif;overflow:hidden}
.library-home-screen-invite:not([open]){display:none}
.library-home-screen-invite::backdrop{background:#03040ae8;backdrop-filter:blur(10px)}
.library-home-screen-invite [hidden]{display:none!important}
.library-home-screen-content{box-sizing:border-box;height:calc(100% - max(68px,calc(env(safe-area-inset-top,0px) + 56px)));margin-top:max(68px,calc(env(safe-area-inset-top,0px) + 56px));overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:12px max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));scroll-padding-top:24px;-webkit-overflow-scrolling:touch}
.library-home-screen-content button,.library-home-screen-support-header button,.library-home-screen-close{font:inherit;cursor:pointer;min-height:44px;touch-action:manipulation}
.library-home-screen-content button:focus-visible,.library-home-screen-support-header button:focus-visible,.library-home-screen-close:focus-visible{outline:3px solid #a7eee5;outline-offset:4px}
.library-home-screen-close{position:absolute;z-index:2;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #ffffff24;border-radius:50%;background:#242132;color:#fff;font-size:28px!important;line-height:1}
.library-home-screen-brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;margin:0 0 24px;font-weight:700;letter-spacing:.02em}
.library-home-screen-brand img{display:block;border-radius:22px;box-shadow:0 10px 42px #9570fa29;border:1px solid #ffffff26}
.library-home-screen-eyebrow{margin:0 0 12px;color:#8fe3d3;font-size:.75rem;font-weight:750;letter-spacing:.1em;text-transform:uppercase}
.library-home-screen-invite #library-home-screen-title{margin:0 0 18px;color:#fff;font-size:clamp(2.15rem,8vw,3.2rem);line-height:1.09;letter-spacing:-.045em;font-weight:750}
.library-home-screen-invite #library-home-screen-description{max-width:440px;margin:0;color:#c7c4d6;font-size:1rem;line-height:1.6}
.library-home-screen-benefits{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 32px}
.library-home-screen-benefits span{padding:6px 10px;border:1px solid #ffffff19;border-radius:999px;font-size:.72rem;color:#e2ddec;background:#ffffff06}
.library-home-screen-guide{border-top:1px solid #ffffff19;padding-top:24px;margin-bottom:24px}
.library-home-screen-guide h3{margin:0 0 24px;color:#fff;font-size:1.12rem;line-height:1.35}
.library-home-screen-guide ol{display:grid;gap:24px;list-style:none;padding:0;margin:0}
.library-home-screen-guide li{display:grid;grid-template-columns:44px minmax(0,1fr);gap:14px;text-align:left}
.library-home-screen-step-icon{display:grid;place-items:center;width:44px;height:44px;border:1px solid #a983fb50;border-radius:14px;background:#a983fb18;color:#d9c7ff;font-size:24px}
.library-home-screen-step-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.library-home-screen-guide strong{color:#fff;font-size:.92rem;font-weight:750}
.library-home-screen-guide li p{margin:6px 0 0;color:#beb9cd;font-size:.84rem;line-height:1.6}
.library-home-screen-note{margin:24px 0 0;color:#9d98af;font-size:.78rem;line-height:1.6}
.library-home-screen-actions{display:grid;gap:10px;margin-top:24px}
.library-home-screen-actions button{width:100%;border:1px solid #ffffff20;border-radius:16px;padding:14px 18px;min-height:52px;font-weight:750}
.library-home-screen-actions .is-primary{background:linear-gradient(110deg,#9870f7,#8050e8);color:white;border-color:#c4a5ff66;box-shadow:0 6px 30px #8452e624}
.library-home-screen-actions .is-secondary{background:#ffffff08;border-color:#ffffff22;color:#ece7f6;box-shadow:none}
.library-home-screen-options{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;margin-top:14px}
.library-home-screen-options button{padding:8px 0;border:0;background:none;color:#b9b1ce;font-size:.78rem;text-decoration:underline;text-underline-offset:4px}
.library-home-screen-status:empty{display:none}
.library-home-screen-status,.library-home-screen-recovery{color:#c7c4d6;font-size:.88rem}
body.library-home-screen-open{overflow:hidden!important}
#library-home-screen-title{white-space:pre-line}
.library-home-screen-invite.is-guide .library-home-screen-brand,.library-home-screen-invite.is-guide .library-home-screen-eyebrow,.library-home-screen-invite.is-guide #library-home-screen-title,.library-home-screen-invite.is-guide #library-home-screen-description,.library-home-screen-invite.is-guide .library-home-screen-benefits,.library-home-screen-invite.is-guide .library-home-screen-recovery{display:none}
.library-home-screen-invite.is-guide .library-home-screen-guide{border:0;padding-top:0}
.library-home-screen-guide li p.library-home-screen-step-note,.library-home-screen-step-note{font-size:.76rem;color:#aaa3bc;line-height:1.5;margin-top:8px}
.library-home-screen-step-note em,.library-home-screen-note em{display:inline-block;color:#c6bdd8}
.library-home-screen-actions a{display:block;box-sizing:border-box;text-align:center;text-decoration:none;border:1px solid #ffffff20;border-radius:16px;padding:14px 18px;min-height:52px;font-weight:750}
.library-home-screen-switch{padding:14px 18px;border:1px solid #ffffff20;border-radius:16px;background:#ffffff05;margin-top:20px}
.library-home-screen-switch p{margin:0 0 8px}.library-home-screen-switch p:last-child{margin-bottom:0}
.library-home-screen-help{margin-top:24px;padding:24px 0 0;border-top:1px solid #ffffff20}
.library-home-screen-help>strong{font-size:1rem;color:#f6f4fc}
.library-home-screen-help>p{margin:6px 0 14px;color:#bdb6cf;font-size:.84rem;line-height:1.5}
.library-home-screen-help button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 18px;border:1px solid #ae8ef869;border-radius:16px;background:#a983fb18;color:#ece1ff;font-weight:700}
.library-home-screen-help button:disabled{opacity:.65;cursor:wait}
.library-home-screen-help svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.library-home-screen-help .library-home-screen-status{margin-bottom:0}
#library-home-screen-invite.is-support{top:var(--home-support-top,0px);bottom:auto;height:var(--home-support-height,100dvh);max-height:var(--home-support-height,100dvh);margin:0 auto}
.library-home-screen-support{display:grid;grid-template-rows:auto minmax(0,1fr);height:100%;min-height:0}
.library-home-screen-support-header{display:flex;align-items:center;flex-wrap:wrap;gap:2px 12px;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));border-bottom:1px solid #ffffff20}
.library-home-screen-support-header button{display:flex;align-items:center;gap:8px;padding:4px 12px;border:1px solid #ffffff24;border-radius:999px;background:#ffffff0c;color:#f6f4fc;font-size:.84rem;font-weight:650}
.library-home-screen-support-header button span{font-size:26px;line-height:1}
.library-home-screen-support-header p{margin:0;color:#bdb6cf;font-size:.75rem}
.library-home-screen-support-mount{min-width:0;min-height:0;overflow:hidden}
#library-home-screen-invite .library-home-screen-support-mount>.chatbot-widget-shell{position:relative!important;inset:auto!important;display:block!important;width:100%!important;max-width:none!important;height:100%!important;margin:0!important;transform:none!important}
#library-home-screen-invite .chatbot-widget-panel{position:relative!important;inset:auto!important;width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;transform:none!important;box-shadow:none!important}
#library-home-screen-invite .chatbot-widget-button-wrap{display:none!important}
#library-home-screen-invite .chatbot-widget-footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}
@media(max-width:600px){.library-home-screen-invite{border:0;border-radius:0;max-width:100vw}}
@media(max-height:600px){.library-home-screen-brand{margin-bottom:20px}.library-home-screen-brand img{width:64px;height:64px}.library-home-screen-invite #library-home-screen-title{font-size:2rem}}

/* A closed chat cannot receive delayed composer focus after returning to the guide. */
body:is(.library-page,.favorites-page) .chatbot-widget-shell:not(.is-open) .chatbot-widget-panel{visibility:hidden}

/* Returning listeners get a compact launch choice; full setup stays one tap away. */
.library-home-screen-invite.is-returning .library-home-screen-eyebrow,
.library-home-screen-invite.is-returning .library-home-screen-benefits,
.library-home-screen-invite.is-returning .library-home-screen-recovery{display:none}
.library-home-screen-invite.is-returning .library-home-screen-brand{flex-direction:row;align-items:center;gap:14px;margin-bottom:24px}
.library-home-screen-invite.is-returning .library-home-screen-brand img{width:56px;height:56px;border-radius:16px}
.library-home-screen-invite.is-returning #library-home-screen-title{font-size:clamp(1.75rem,7vw,2.3rem);margin-bottom:12px}
.library-home-screen-invite.is-returning #library-home-screen-description{font-size:.94rem;line-height:1.5}
.library-home-screen-invite.is-returning .library-home-screen-actions{margin-top:28px;gap:8px}
.library-home-screen-invite.is-returning .library-home-screen-options{flex-direction:column;align-items:center;gap:0;margin-top:0}
.library-home-screen-invite.is-returning .library-home-screen-options [data-home-setup]{order:-1;color:#e2ddec}
.library-home-screen-invite.is-returning .library-home-screen-options [data-home-choice="never"]{font-size:.72rem}
.library-home-screen-invite [data-home-launch]:focus-visible,
.library-home-screen-switch:focus-visible{outline:3px solid #a7eee5;outline-offset:4px}

/* Keep the launch action and its fallback in the same place above Continue. */
.library-home-screen-open-slot{display:grid;min-height:72px}
.library-home-screen-open-slot>*{grid-area:1/1;box-sizing:border-box;width:100%;min-height:72px;margin:0}
.library-home-screen-open-slot .library-home-screen-switch{display:grid;align-content:center;padding:10px 16px;font-size:.94rem;line-height:1.45;text-align:center}
.library-home-screen-invite.is-returning .library-home-screen-help{margin-top:16px;padding-top:16px}
.library-home-screen-invite.is-returning .library-home-screen-help>strong,.library-home-screen-invite.is-returning .library-home-screen-help>p:not([data-home-support-status]){display:none}
.library-home-screen-invite.is-returning .library-home-screen-help button{padding:10px 16px;min-height:44px}
