/* Nilo shares the platform's navy/orange tokens; conversation stays in this visit. */
.nilo-avatar{display:inline-block;flex:none;width:68px;height:68px;background-image:url('assets/guide-poses.webp');background-size:200% 200%;background-repeat:no-repeat;background-position:100% 100%;vertical-align:middle}
.nilo-avatar[data-state=idle]{background-position:100% 100%}.nilo-avatar[data-state=thinking]{background-position:0 100%}.nilo-avatar[data-state=explaining]{background-position:100% 0}.nilo-avatar[data-state=celebrating]{background-position:0 0}
.nilo-avatar[data-expressions=true]{background-image:url('assets/guide-expressions.webp')}
.nilo-avatar[data-expressions=true][data-state=idle]{background-position:0 0}.nilo-avatar[data-expressions=true][data-state=thinking]{background-position:100% 0}.nilo-avatar[data-expressions=true][data-state=explaining]{background-position:0 100%}.nilo-avatar[data-expressions=true][data-state=celebrating]{background-position:100% 100%}
.nilo-avatar[data-portrait=true]{background-image:url('assets/guide-portraits.webp')}
.nilo-avatar[data-portrait=true][data-state=idle]{background-position:0 0}.nilo-avatar[data-portrait=true][data-state=thinking]{background-position:100% 0}.nilo-avatar[data-portrait=true][data-state=explaining]{background-position:0 100%}.nilo-avatar[data-portrait=true][data-state=celebrating]{background-position:100% 100%}
.nilo-launcher{--nilo-launcher-bg:var(--navy);--nilo-launcher-ink:#edf3ff;--nilo-launcher-muted:#c5d0e0;--nilo-launcher-hover:#192a44;position:fixed;right:24px;bottom:16px;z-index:4400;display:flex;align-items:center;gap:4px;min-height:66px;padding:0 17px 0 0;border:0;border-radius:13px;background:var(--nilo-launcher-bg);color:var(--nilo-launcher-ink);box-shadow:0 6px 26px #06152b30;text-align:left;transition:transform .18s ease-out,background .18s ease-out;touch-action:none;user-select:none}
.nilo-launcher:hover{background:var(--nilo-launcher-hover);transform:translateY(-2px)}
.nilo-launcher .nilo-avatar{width:70px;height:70px;margin-top:-7px}
.nilo-launcher strong{display:block;font-size:13px;line-height:1.5}.nilo-launcher small{display:block;color:var(--nilo-launcher-muted);font-size:10px;line-height:1.5}
html[data-theme=dark] .nilo-launcher{--nilo-launcher-bg:#edf3ff;--nilo-launcher-ink:var(--navy);--nilo-launcher-muted:#42526b;--nilo-launcher-hover:#fff}
.nilo-launcher[aria-expanded=true]{padding-right:0;border-radius:50%;width:66px}.nilo-launcher[aria-expanded=true]>span:last-child{display:none}.nilo-launcher[data-dragging=true]{transition:none;cursor:grabbing;transform:none}
.nilo-launcher[data-positioned=true]{padding-right:0;border-radius:50%;width:66px}.nilo-launcher[data-positioned=true]>span:last-child{display:none}
.nilo-assistant{position:fixed;right:24px;bottom:94px;z-index:4300;width:min(418px,calc(100vw - 32px));height:min(640px,calc(100dvh - var(--ribbon,36px) - 112px));display:flex;flex-direction:column;overflow:hidden;background:var(--surface);color:var(--ink);border-radius:16px;box-shadow:0 14px 48px #04142e40;isolation:isolate;font-family:var(--font);font-size:13px;line-height:1.65;animation:nilo-open .24s cubic-bezier(.16,1,.3,1)}
@keyframes nilo-open{from{transform:translateY(10px);clip-path:inset(4% 0 0 0 round 16px)}to{transform:none;clip-path:inset(0 round 16px)}}
.nilo-header{display:flex;align-items:center;gap:9px;flex:none;padding:13px 14px 11px 12px;background:var(--soft);border-bottom:1px solid var(--line)}
.nilo-header .nilo-avatar{width:66px;height:66px;margin:-6px 0 -7px}
.nilo-heading{flex:1;min-width:0}.nilo-heading h2{font-size:18px;letter-spacing:-.02em;margin:0;line-height:1.35}.nilo-heading p{font-size:10px;margin:3px 0 0;line-height:1.5;color:var(--muted)}
.nilo-controls{display:flex;gap:2px;align-self:flex-start}.nilo-controls .icon-button{width:36px;height:36px;padding:7px}.nilo-controls .icon-button:disabled{opacity:.4}
.nilo-notice{font-size:10px;color:var(--muted);margin:0;padding:9px 18px;border-bottom:1px solid var(--line);flex:none;line-height:1.55}
.nilo-messages{flex:1;min-height:80px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--muted) var(--surface);padding:20px 18px 8px;scroll-behavior:auto}
.nilo-message{margin:0 0 22px;overflow-wrap:anywhere}
.nilo-message-label{display:block;font-weight:600;font-size:10px;color:var(--muted);margin:0 0 6px}
.nilo-message p{white-space:pre-line;color:var(--ink);font-size:12px;line-height:1.8;margin:0;max-width:65ch}
.nilo-message[data-role=user]{margin-left:35px;padding:10px 13px;background:var(--soft);border-radius:10px 10px 2px 10px}
.nilo-message[data-role=user] .nilo-message-label{color:var(--muted)}
.nilo-message[data-role=user] p{font-size:12px;line-height:1.65}
.nilo-message[data-state=thinking] p{color:var(--muted)}
.nilo-message[data-state=thinking] .nilo-message-label:after{content:'';display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--brand);margin-left:7px;animation:nilo-thinking 1s ease-in-out infinite}
@keyframes nilo-thinking{50%{opacity:.35;transform:translateY(-2px)}}
.nilo-followups{display:flex;flex-wrap:wrap;gap:6px;margin:11px 0 0}
.nilo-followups button{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:6px;padding:7px 10px;min-height:34px;font-size:10px;line-height:1.5;text-align:left}
.nilo-followups button:hover{border-color:var(--brand);color:var(--brand);background:var(--soft)}
.nilo-actions button{border-color:var(--brand);color:var(--brand);font-weight:600}.nilo-action-note{width:100%;font-size:10px;color:var(--muted);line-height:1.6}
.nilo-suggestions{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain;flex:none;padding:8px 18px 11px;border-top:1px solid var(--line)}
.nilo-suggestions button{flex:none;border:0;background:var(--soft);color:var(--ink);border-radius:5px;font-size:10px;padding:7px 9px;min-height:32px;white-space:nowrap}
.nilo-suggestions button:hover{color:var(--brand)}
.nilo-compose{flex:none;padding:0 14px 12px}
.nilo-input-row{display:flex;align-items:flex-end;gap:8px}
.nilo-compose textarea{min-height:44px;height:48px;max-height:90px;resize:none;padding:11px 12px;font-size:12px;line-height:1.7;border-radius:8px;caret-color:var(--brand)}
.nilo-send{flex:none;display:grid;place-items:center;width:44px;height:46px;border:0;border-radius:8px;background:var(--brand);color:#fff;padding:10px}
.nilo-send:hover{filter:brightness(.92)}
html[data-theme=dark] .nilo-send{color:#171009}
.nilo-compose-note{font-size:9px;line-height:1.4;margin:7px 0 0;color:var(--muted)}
.nilo-context{display:flex;gap:9px;align-items:center;margin:0 0 15px}.nilo-context .nilo-avatar{width:62px;height:62px;margin:-8px 0}.nilo-context button{background:none;border:0;text-align:left;color:var(--ink);padding:6px 0;font-size:12px;line-height:1.6}.nilo-context button span{display:block;color:var(--muted);font-size:10px}.nilo-context button:hover{color:var(--brand)}
.nilo-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body[data-nadir-tour-layout=rail] .nilo-assistant{right:calc(var(--tour-rail) + 14px);width:min(418px,calc(100vw - var(--tour-rail) - 38px))}
body[data-nadir-tour-layout=rail] .nilo-launcher{right:calc(var(--tour-rail) + 14px)}
body[data-nadir-tour-layout=dock] .nilo-assistant{bottom:calc(var(--tour-space) + 82px);height:calc(100dvh - var(--tour-space) - var(--ribbon,36px) - 100px);max-height:560px}
body[data-nadir-tour-layout=dock] .nilo-launcher{bottom:calc(var(--tour-space) + 12px)}
/* Opening Nilo pauses the optional presentation; the launcher remains reachable. */
body[data-nadir-tour-active] .nilo-launcher{z-index:5201}
@media(max-width:600px){.nilo-launcher{right:14px;bottom:12px;min-height:58px;padding-right:13px}.nilo-launcher .nilo-avatar{width:62px;height:62px}.nilo-launcher[aria-expanded=true]{width:58px}.nilo-assistant{right:10px;bottom:84px;width:calc(100vw - 20px);height:min(620px,calc(100dvh - var(--ribbon,36px) - 98px));border-radius:13px}.nilo-header{padding:11px 12px}.nilo-compose textarea{font-size:16px;line-height:1.4}.nilo-message p{font-size:13px}.nilo-suggestions button{min-height:36px}.nilo-followups button{min-height:38px}.nilo-controls .icon-button{min-height:40px;min-width:40px}.nilo-compose-note{font-size:10px}.nilo-notice{padding:7px 16px}.nilo-messages{padding:15px 16px 5px}.nilo-heading h2{font-size:17px}}
@media(max-height:540px){.nilo-assistant{bottom:8px;right:90px;width:min(418px,calc(100vw - 110px));height:calc(100dvh - var(--ribbon,36px) - 18px)}.nilo-launcher{right:12px;bottom:12px;padding-right:0;border-radius:50%;width:66px}.nilo-launcher>span:last-child{display:none}.nilo-header{padding:7px 12px}.nilo-header .nilo-avatar{height:44px;width:44px;margin:0}.nilo-notice{padding:5px 14px}.nilo-compose{padding-bottom:7px}.nilo-compose-note{display:none}.nilo-suggestions{padding:5px 14px}.nilo-messages{padding-top:10px}.nilo-message{margin-bottom:15px}body[data-nadir-tour-layout=dock] .nilo-assistant{bottom:calc(var(--tour-space) + 10px);height:calc(100dvh - var(--tour-space) - var(--ribbon,36px) - 22px);min-height:0}.nilo-heading h2{font-size:16px}}
@media(prefers-reduced-motion:reduce){.nilo-launcher{transition:none}.nilo-assistant{animation:none}.nilo-message[data-state=thinking] .nilo-message-label:after{animation:none}}
/* Portrait scale keeps the face readable while the transcript retains flexible space. */
.nilo-header .nilo-avatar{width:96px;height:96px;margin:0;flex-basis:96px}
.nilo-header{padding:10px 14px 10px 12px}
.nilo-launcher{bottom:58px;min-height:88px}
.nilo-launcher .nilo-avatar{width:88px;height:88px;margin:0}
.nilo-launcher[aria-expanded=true],.nilo-launcher[data-positioned=true]{width:88px;height:88px;padding:0}
.nilo-assistant{bottom:158px;height:min(640px,calc(100dvh - var(--ribbon,36px) - 176px))}
body:not([data-nadir-tour-active]):has(.presnp-host:not([hidden])) .nilo-launcher[aria-expanded=false]{bottom:148px}
body[data-nadir-tour-layout=dock] .nilo-assistant{bottom:calc(var(--tour-space) + 108px);height:calc(100dvh - var(--tour-space) - var(--ribbon,36px) - 126px)}
@media(max-width:600px){
 .nilo-header .nilo-avatar{width:84px;height:84px;flex-basis:84px}
 .nilo-header{gap:7px;padding:8px 10px}
 .nilo-launcher{bottom:64px;min-height:76px}
 .nilo-launcher .nilo-avatar{width:76px;height:76px}
 .nilo-launcher[aria-expanded=true],.nilo-launcher[data-positioned=true]{width:76px;height:76px}
 .nilo-assistant{bottom:152px;height:min(620px,calc(100dvh - var(--ribbon,36px) - 170px))}
 body[data-nadir-tour-layout=dock] .nilo-assistant{bottom:calc(var(--tour-space) + 100px);height:calc(100dvh - var(--tour-space) - var(--ribbon,36px) - 118px)}
}
@media(max-height:540px){
 .nilo-header .nilo-avatar{width:44px;height:44px;flex-basis:44px;margin:0}
 .nilo-header{padding:7px 12px}
 .nilo-launcher,.nilo-launcher[aria-expanded=true],.nilo-launcher[data-positioned=true]{width:70px;height:70px;min-height:70px;bottom:60px}
 .nilo-launcher .nilo-avatar{width:70px;height:70px}
 .nilo-assistant{bottom:8px;height:calc(100dvh - var(--ribbon,36px) - 18px)}
 body[data-nadir-tour-layout=dock] .nilo-assistant{bottom:calc(var(--tour-space) + 10px);height:calc(100dvh - var(--tour-space) - var(--ribbon,36px) - 22px)}
}
/* The optional guide keeps the large avatar away from the wizard's right-hand actions. */
body[data-nadir-tour-active] .nilo-launcher{left:14px!important;right:auto!important;top:auto!important;padding:0;border-radius:50%;width:88px;height:88px;min-height:88px}
body[data-nadir-tour-active] .nilo-launcher>span:last-child{display:none}
@media(min-width:1080px){body[data-nadir-tour-layout=rail] .nilo-launcher{left:250px!important}}
@media(max-width:600px){body[data-nadir-tour-active] .nilo-launcher{width:76px;height:76px;min-height:76px}}
@media(max-height:540px){body[data-nadir-tour-active] .nilo-launcher{width:70px;height:70px;min-height:70px}}
@media print{.nilo-launcher,.nilo-assistant,.nilo-context{display:none!important}}
