#rai-btn{position:fixed;right:18px;bottom:18px;z-index:99990;display:flex;align-items:center;gap:9px;background:linear-gradient(135deg,#0e2a47,#17457a);color:#fff;border:none;border-radius:30px;padding:13px 20px 13px 15px;font:bold 14px Arial,Helvetica,sans-serif;cursor:pointer;box-shadow:0 4px 18px rgba(14,42,71,.4),0 0 0 2px #ffb400;transition:transform .15s ease,box-shadow .15s ease}
#rai-btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(14,42,71,.45),0 0 0 2px #ffb400}
#rai-btn svg{width:20px;height:20px;flex:0 0 20px}
#rai-btn .rai-dot{position:absolute;top:-3px;right:-2px;width:13px;height:13px;border-radius:50%;background:#ffb400;border:2px solid #fff}
@keyframes raiPulse{0%{box-shadow:0 4px 18px rgba(14,42,71,.4),0 0 0 2px #ffb400}55%{box-shadow:0 4px 18px rgba(14,42,71,.4),0 0 0 2px #ffb400,0 0 0 12px rgba(255,180,0,0)}100%{box-shadow:0 4px 18px rgba(14,42,71,.4),0 0 0 2px #ffb400}}
#rai-btn.pulse{animation:raiPulse 2.2s ease-out 3}
#rai-nudge{position:fixed;right:18px;bottom:76px;z-index:99990;background:#fff;color:#1c2740;border:1px solid #e2e5e9;border-radius:14px 14px 3px 14px;padding:11px 15px;font:13px/1.45 Arial,Helvetica,sans-serif;box-shadow:0 6px 22px rgba(14,42,71,.18);max-width:230px;display:none}
#rai-nudge.show{display:block;animation:raiRise .35s ease}
#rai-nudge b{color:#0e2a47}
@keyframes raiRise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
#rai-box{position:fixed;right:18px;bottom:80px;z-index:99991;width:min(380px,calc(100vw - 36px));height:min(560px,calc(100vh - 120px));display:flex;flex-direction:column;background:#fff;border-radius:16px;box-shadow:0 16px 48px rgba(14,42,71,.32);overflow:hidden;font:13.5px/1.5 Arial,Helvetica,sans-serif;opacity:0;transform:translateY(14px) scale(.98);pointer-events:none;transition:opacity .22s ease,transform .22s ease}
#rai-box.open{opacity:1;transform:none;pointer-events:auto}
#rai-head{display:flex;align-items:center;gap:11px;background:linear-gradient(135deg,#0e2a47,#17457a);color:#fff;padding:14px 16px}
#rai-ava{flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:#ffb400;display:flex;align-items:center;justify-content:center}
#rai-ava svg{width:21px;height:21px}
#rai-head .t{flex:1;min-width:0}
#rai-head .t b{display:block;font-size:15px}
#rai-head .t small{display:block;color:#c9d4e4;font-size:11.5px;font-weight:normal;margin-top:1px}
#rai-x{flex:0 0 34px;width:34px;height:34px;border:none;background:rgba(255,255,255,.12);color:#fff;border-radius:50%;font-size:19px;line-height:1;cursor:pointer}
#rai-x:hover{background:rgba(255,255,255,.22)}
#rai-msgs{flex:1;overflow-y:auto;padding:16px 14px;background:#f4f7fb;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.rai-m{margin:0 0 10px;padding:10px 13px;border-radius:14px;max-width:88%;white-space:pre-wrap;word-wrap:break-word;font-size:13.5px}
.rai-u{background:linear-gradient(135deg,#0e2a47,#17457a);color:#fff;margin-left:auto;border-bottom-right-radius:4px}
.rai-a{background:#fff;border:1px solid #e6eaf1;color:#222;border-bottom-left-radius:4px;box-shadow:0 1px 3px rgba(14,42,71,.05)}
.rai-a a{color:#2e6da4;font-weight:bold}
.rai-typing{display:inline-flex;gap:5px;align-items:center;padding:13px 15px}
.rai-typing i{width:7px;height:7px;border-radius:50%;background:#9fb0c9;animation:raiBlink 1.2s infinite}
.rai-typing i:nth-child(2){animation-delay:.18s}.rai-typing i:nth-child(3){animation-delay:.36s}
@keyframes raiBlink{0%,80%,100%{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
#rai-form{display:flex;border-top:1px solid #e6eaf1;background:#fff}
#rai-in{flex:1;border:none;outline:none;padding:14px;font:16px Arial,Helvetica,sans-serif;min-width:0}
#rai-send{border:none;background:#ffb400;color:#0e2a47;font-weight:bold;padding:0 20px;cursor:pointer;font-size:14px;min-height:48px}
#rai-send:hover{background:#e8a400}
#rai-disc{font-size:10.5px;color:#8a97b1;padding:7px 13px;background:#fff;border-top:1px solid #f0f2f5}
/* RAI_CHIPS_V1 (2026-09-17): the starter questions sit in ONE row that scrolls sideways. Wrapped into five rows they
   swallowed the message area on a phone, so the greeting could not be scrolled and the chat looked stuck. */
#rai-chips{display:flex;flex:0 0 auto;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:7px;padding:2px 14px 12px;background:#f4f7fb;-webkit-overflow-scrolling:touch;scrollbar-width:none;overscroll-behavior-x:contain}
#rai-chips::-webkit-scrollbar{display:none}
.rai-chip{flex:0 0 auto;white-space:nowrap;border:1px solid #c9d4e4;background:#fff;color:#0e2a47;border-radius:16px;padding:8px 13px;font:12.5px Arial,Helvetica,sans-serif;cursor:pointer;min-height:36px}
.rai-chip:hover{border-color:#ffb400;background:#fffaf0}
.rai-basket{max-width:95%!important}
#rai-att{flex:0 0 46px;border:none;background:#fff;color:#17457a;cursor:pointer;display:flex;align-items:center;justify-content:center;border-right:1px solid #e6eaf1;min-height:48px}
#rai-att svg{width:22px;height:22px}
#rai-att:hover{background:#f4f7fb;color:#0e2a47}
#rai-file{display:none}
#rai-pv{display:none;align-items:center;gap:10px;padding:8px 14px;background:#fff;border-top:1px solid #e6eaf1;font-size:12.5px;color:#0e2a47}
#rai-pv img{width:44px;height:44px;object-fit:cover;border-radius:8px;flex:0 0 44px}
#rai-pv span{flex:1;min-width:0}
#rai-pv button{flex:0 0 28px;border:none;background:#eef2f7;color:#0e2a47;width:28px;height:28px;border-radius:50%;font-size:17px;line-height:1;cursor:pointer}
.rai-u img{display:block;max-width:180px;max-height:180px;border-radius:9px;margin:0 0 6px}
#rai-new{flex:0 0 auto;border:none;background:rgba(255,255,255,.12);color:#fff;border-radius:14px;padding:0 10px;height:28px;font:bold 11.5px Arial,Helvetica,sans-serif;cursor:pointer}
#rai-new:hover{background:rgba(255,255,255,.22)}
@media(prefers-reduced-motion:reduce){#rai-btn.pulse{animation:none}#rai-box{transition:none}#rai-nudge.show{animation:none}}
/* RAI_MOBILE_V2 (2026-09-11): on any phone or touch screen, landscape included, the chat is its own screen -
   anchored to all four edges, solid background, nothing behind it visible, no fade/transform, page locked. */
@media(max-width:900px),(pointer:coarse){
  #rai-btn{right:12px;bottom:14px;padding:12px 17px 12px 13px}
  /* RAI_NUDGE_V2: a compact pill tucked directly above the button, never a wide card over the tile grid */
  #rai-nudge{right:12px;bottom:66px;left:auto;max-width:min(230px,calc(100vw - 88px));padding:9px 12px;font-size:12.5px;line-height:1.4}
  #rai-box{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;height:100dvh;max-height:none;max-width:none;margin:0;border-radius:0;box-shadow:none;transform:none;transition:none;opacity:0;visibility:hidden;background:#f4f7fb;overscroll-behavior:none;z-index:2147483000}
  #rai-box.open{opacity:1;visibility:visible;transform:none;transition:none}
  #rai-head{padding:10px 12px;padding-top:calc(10px + env(safe-area-inset-top));flex:0 0 auto}
  #rai-head .t small{display:none}
  #rai-ava{flex:0 0 32px;width:32px;height:32px}
  #rai-ava svg{width:18px;height:18px}
  #rai-x{flex:0 0 44px;width:44px;height:44px;font-size:24px}
  #rai-msgs{flex:1 1 auto;min-height:0;overscroll-behavior:contain}
  #rai-form{flex:0 0 auto;padding-bottom:env(safe-area-inset-bottom)}
  #rai-disc{flex:0 0 auto;padding-bottom:calc(7px + env(safe-area-inset-bottom))}
  .rai-m{max-width:92%}
  html.rai-lock,body.rai-lock{overflow:hidden!important;height:100%!important;overscroll-behavior:none}
  body.rai-lock{position:fixed;left:0;right:0;width:100%}
}