/* Bizzy's chat, in the banner's splatter world. Shared by every page (home + Torri's pages). */
.mascot{position:fixed;right:14px;bottom:14px;width:118px;z-index:30;cursor:pointer;animation:mascot-bob 3.2s ease-in-out infinite;-webkit-tap-highlight-color:transparent}
.mascot img{display:block;width:100%;height:auto;filter:drop-shadow(0 8px 14px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(157,78,230,.45))}
@keyframes mascot-bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-9px) rotate(2deg)}}

.chat-label{position:fixed;right:14px;bottom:186px;z-index:31;font-family:'Kaushan Script',cursive;font-size:1.05rem;color:#140d1d;background:#f6c21b;border:2px solid #140d1d;border-radius:999px;padding:4px 14px 6px;cursor:pointer;box-shadow:3px 3px 0 #9d4ee6;animation:label-pulse 2.4s ease-in-out infinite}
.chat-label.hidden{display:none}
@keyframes label-pulse{0%,100%{transform:scale(1) rotate(-2deg)}50%{transform:scale(1.07) rotate(1deg)}}

.chat-panel{position:fixed;right:14px;bottom:186px;width:min(370px,calc(100vw - 28px));height:470px;max-height:calc(100vh - 210px);z-index:40;display:none;flex-direction:column;
  font-family:'Nunito',-apple-system,'Segoe UI',Roboto,sans-serif;color:#f3eefa;
  background:radial-gradient(260px 160px at 100% 0,rgba(246,194,27,.18),transparent 70%),radial-gradient(260px 200px at 0 100%,rgba(70,166,236,.16),transparent 70%),linear-gradient(165deg,#1d1330,#0f0b16 70%);
  border:3px solid #9d4ee6;border-radius:24px 24px 24px 8px;overflow:hidden;box-shadow:7px 7px 0 #f6c21b,0 18px 50px rgba(0,0,0,.6);transform-origin:100% 100%}
.chat-panel.open{display:flex;animation:chatIn .38s cubic-bezier(.2,1.5,.4,1)}
@keyframes chatIn{from{transform:scale(.3) rotate(8deg);opacity:0}}
/* paint flecks on the panel corners */
.chat-panel::before,.chat-panel::after{content:"";position:absolute;pointer-events:none;border-radius:50% 45% 55% 48%;z-index:0}
.chat-panel::before{width:70px;height:62px;right:-22px;top:46px;background:#ee4fa1;opacity:.28;box-shadow:-40px 24px 0 -24px #ee4fa1,-18px 52px 0 -27px #ee4fa1}
.chat-panel::after{width:90px;height:80px;left:-34px;bottom:58px;background:#7cc443;opacity:.2;box-shadow:52px 10px 0 -32px #7cc443,40px -26px 0 -36px #7cc443}
.chat-panel>*{position:relative;z-index:1}

.chat-header{display:flex;align-items:center;gap:10px;padding:10px 12px 8px;border-bottom:2px dashed rgba(157,78,230,.55)}
.chat-header img{width:46px;height:46px;object-fit:contain;border-radius:50%;background:radial-gradient(circle,#2b1d44,#140d1d);border:2px solid #f6c21b;padding:2px}
.chat-header .name{font-family:'Kaushan Script',cursive;font-size:1.45rem;line-height:1;background:linear-gradient(100deg,#ffe066,#c58cff 55%,#6cc0ff);-webkit-background-clip:text;background-clip:text;color:transparent}
.chat-header .status{font-family:'Caveat',cursive;font-size:1.05rem;color:#7cc443;line-height:1}
.chat-close{margin-left:auto;width:32px;height:32px;border-radius:50%;border:2px solid #140d1d;background:#f6c21b;color:#140d1d;font-size:.9rem;font-weight:800;cursor:pointer;box-shadow:2px 2px 0 #9d4ee6;padding:0}

.chat-messages{flex:1;overflow-y:auto;padding:14px 12px;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin;scrollbar-color:#9d4ee6 transparent}
.msg{max-width:86%;padding:9px 13px;font-size:.95rem;line-height:1.45;white-space:pre-line;animation:msgIn .3s cubic-bezier(.2,1.6,.4,1)}
@keyframes msgIn{from{transform:scale(.6);opacity:0}}
/* Bizzy talks on paper, like the cookbook */
.msg.bot{align-self:flex-start;background:#fffdf6;color:#2a2238;border-radius:18px 18px 18px 4px;box-shadow:3px 3px 0 #9d4ee6;transform-origin:0 100%}
/* you talk in paint */
.msg.user{align-self:flex-end;color:#140d1d;font-weight:700;background:linear-gradient(120deg,#f6c21b,#ffb340);border-radius:18px 18px 4px 18px;box-shadow:-3px 3px 0 #ee4fa1;transform-origin:100% 100%}
.msg.bot a{color:#7428c2;font-weight:800}
.msg.bot small{color:#8d859a;font-size:.78rem}
/* recipe cards Bizzy hands you: tap to open the page in the cookbook */
.rcards{display:grid;gap:7px;margin-top:8px}
.rcard{display:block;text-decoration:none;background:#fff;border:2px solid #2a2238;border-radius:12px;padding:7px 10px;box-shadow:3px 3px 0 #f6c21b;transition:transform .15s}
.rcard:hover{transform:translate(-1px,-1px) rotate(-.5deg)}
.rcard b{display:block;font-family:'Kaushan Script',cursive;font-weight:400;font-size:1.05rem;color:#c22777;line-height:1.15}
.rcard small{display:block;color:#5a5168;font-weight:700;font-size:.76rem}
.rcard small.need{color:#a06a00}
.msg.bot .follow-row{margin-top:8px}
.msg.bot .follow-btn{text-decoration:none;color:#3c8a1c;border-color:#3c8a1c;background:#f3faee}
/* typing: three paint dots bouncing */
.msg.typing{font-size:0;padding:12px 16px;display:flex;gap:6px}
.msg.typing::before,.msg.typing::after{content:"";width:9px;height:9px;border-radius:50%;background:#9d4ee6;animation:dot .8s ease-in-out infinite}
.msg.typing::after{background:#46a6ec;animation-delay:.2s;box-shadow:15px 0 0 #ee4fa1}
@keyframes dot{50%{transform:translateY(-6px)}}

.chat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 10px}
.chip{font-family:inherit;background:transparent;border:2px dashed rgba(243,238,250,.35);color:#d9cfe9;border-radius:999px;padding:4px 11px;font-size:.8rem;font-weight:700;cursor:pointer;transition:border-color .15s,color .15s}
.chip:hover{border-color:#f6c21b;color:#f6c21b}
/* once the talking starts, the topic buttons shrink to one swipeable row so the chat gets the room */
.chat-panel:has(.msg.user) .chat-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-top:6px}
.chat-panel:has(.msg.user) .chat-chips::-webkit-scrollbar{display:none}
.chat-panel:has(.msg.user) .chip{flex:none}
.follow-row{display:flex;flex-wrap:wrap;gap:6px;padding:2px 0 4px}
.follow-btn{border-style:solid;border-color:#7cc443;color:#7cc443}

.chat-input{display:flex;gap:8px;padding:10px 12px 12px;border-top:2px dashed rgba(157,78,230,.55)}
.chat-input input{flex:1;min-width:0;margin:0;padding:10px 13px;border-radius:14px;border:2px solid #46a6ec;background:rgba(15,11,22,.9);color:#f3eefa;font:inherit;font-size:.95rem;box-shadow:3px 3px 0 #46a6ec}
.chat-input input::placeholder{color:#8f84a3}
.chat-input button{font-family:'Kaushan Script',cursive;font-size:1.05rem;background:#7cc443;color:#140d1d;border:2px solid #140d1d;border-radius:14px;padding:6px 16px;cursor:pointer;box-shadow:3px 3px 0 #2b5e14}
.chat-input button:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #2b5e14}

@media (max-width:860px){
  .mascot{width:78px;right:8px;bottom:8px}
  .chat-label{right:8px;bottom:112px;font-size:.92rem}
  .chat-panel{right:8px;bottom:112px;height:60vh;max-height:calc(100vh - 130px)}
}
@media (prefers-reduced-motion:reduce){.mascot,.chat-label,.chat-panel.open,.msg{animation:none}}
