/* Chai-bot: 3D CSS mascot on the Support page (public/support-bot.js) */
#tab-support-view .sp-botrow { position: relative; display: flex; align-items: center; gap: 6px; margin: 26px 0 0; }
#tab-support-view .sp-bot { --bot: #f5f0e6; --bot-2: #e9e1d2; --bot-a: var(--sp-a, #e24d8b); --bot-b: var(--sp-b, #f2a600); --scr: #17202e;
  position: relative; flex: none; width: 220px; height: 268px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.dark #tab-support-view .sp-bot { --bot: #ece6da; --bot-2: #d9d0c0; }
#tab-support-view .sp-pick.bubble { position: relative; flex: 1; min-height: 0; max-width: 300px; padding: 12px 15px; border-radius: 16px; border: 1px solid var(--sp-bd); background: var(--sp-card); color: var(--sp-ink); font-size: 13.5px; line-height: 1.45; box-shadow: 0 14px 30px -20px rgb(0 0 0 / .45); }
#tab-support-view .sp-pick.bubble::before { content: ''; position: absolute; left: -8px; top: 50%; width: 14px; height: 14px; background: var(--sp-card); border-left: 1px solid var(--sp-bd); border-bottom: 1px solid var(--sp-bd); transform: translateY(-50%) rotate(45deg); }
#tab-support-view .sp-pick.bubble.pop { animation: botSay .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes botSay { from { opacity: 0; transform: translateX(-8px) scale(.94); } }

/* stage + rig */
.sp-bot .bot-stage { position: absolute; inset: 0; perspective: 760px; perspective-origin: 50% 35%; }
.sp-bot .bot-rig { position: absolute; left: 50%; top: 240px; width: 0; height: 0; transform-style: preserve-3d; --rx: 0deg; --ry: 0deg; --hx: 0deg; --hy: 0deg;
  transform: rotateX(calc(-10deg + var(--rx))) rotateY(calc(-18deg + var(--ry))); }
.sp-bot .bot, .sp-bot .bot-bob, .sp-bot .part, .sp-bot .head-turn, .sp-bot .arm-pivot, .sp-bot .hand, .sp-bot .item, .sp-bot .ear, .sp-bot .antenna { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.sp-bot .bot-bob { animation: botBob 2.6s ease-in-out infinite; }
@keyframes botBob { 50% { transform: translateY(-7px); } }
.sp-bot .bot-shadow { position: absolute; left: 50%; top: 236px; width: 130px; height: 22px; margin-left: -65px; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .28), transparent); animation: botShadow 2.6s ease-in-out infinite; }
html.dark .sp-bot .bot-shadow { background: radial-gradient(closest-side, rgb(0 0 0 / .6), transparent); }
@keyframes botShadow { 50% { transform: scale(.86); opacity: .7; } }

/* cuboids */
.sp-bot .cb { position: absolute; width: var(--w); height: var(--h); left: calc(var(--w) / -2); top: calc(var(--h) / -2); transform-style: preserve-3d; }
.sp-bot .cb .f { position: absolute; left: 0; top: 0; background: var(--c, var(--bot)); }
.sp-bot .cb .fr, .sp-bot .cb .bk { width: var(--w); height: var(--h); }
.sp-bot .cb .fr { transform: translateZ(calc(var(--d) / 2)); }
.sp-bot .cb .bk { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); filter: brightness(.86); }
.sp-bot .cb .rt, .sp-bot .cb .lf { width: var(--d); height: var(--h); left: calc((var(--w) - var(--d)) / 2); }
.sp-bot .cb .rt { transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); filter: brightness(.84); }
.sp-bot .cb .lf { transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); filter: brightness(.93); }
.sp-bot .cb .tp, .sp-bot .cb .bt { width: var(--w); height: var(--d); top: calc((var(--h) - var(--d)) / 2); }
.sp-bot .cb .tp { transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); filter: brightness(1.05); }
.sp-bot .cb .bt { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); filter: brightness(.7); }

/* parts (origin = between the feet) */
.sp-bot .leg { --c: var(--bot-2); }
.sp-bot .leg.l { transform: translate3d(-24px, -15px, 0); } .sp-bot .leg.r { transform: translate3d(24px, -15px, 0); }
.sp-bot .body { transform: translate3d(0, -78px, 0); }
.sp-bot .torso .f { border-radius: 4px; }
.sp-bot .torso .fr { border-radius: 14px 14px 10px 10px; background: linear-gradient(165deg, var(--bot), var(--bot-2)); }
.sp-bot .chest { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 44px; margin: -22px 0 0 -28px; border-radius: 10px; background: var(--scr); color: #3ddc97; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bot-a) 70%, transparent); }
.sp-bot .chest svg { width: 40px; height: 30px; animation: botTick 2s steps(2) infinite; }
@keyframes botTick { 50% { opacity: .75; transform: translateY(-1px); } }
.sp-bot .neck { transform: translate3d(0, -130px, 0); } .sp-bot .nk { --c: var(--bot-2); }
.sp-bot .head { transform: translate3d(0, -182px, 0); }
.sp-bot .head-turn { transform: rotateX(var(--hx)) rotateY(var(--hy)); transition: transform .12s linear; }
.sp-bot .skull .fr { border-radius: 22px; background: linear-gradient(170deg, var(--bot), var(--bot-2)); }
.sp-bot .skull .tp, .sp-bot .skull .bk, .sp-bot .skull .rt, .sp-bot .skull .lf { border-radius: 14px; }
.sp-bot .scr { position: absolute; inset: 12px 12px 14px; border-radius: 16px; background: radial-gradient(120% 90% at 50% 0%, #22324a, var(--scr)); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .06), inset 0 -10px 20px rgb(0 0 0 / .35); overflow: hidden; }
.sp-bot .scr::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .12) 50%, transparent 60%); transform: translateX(-100%); animation: botGlint 5s ease-in-out 1.5s infinite; }
@keyframes botGlint { 18%, 100% { transform: translateX(100%); } }
.sp-bot .eye { position: absolute; top: 20px; width: 16px; height: 22px; border-radius: 8px; background: #7ef0c2; box-shadow: 0 0 12px #3ddc97; transition: transform .09s ease; transform-origin: 50% 60%; }
.sp-bot .eye.l { left: 24px; } .sp-bot .eye.r { right: 24px; }
.sp-bot .mouth { position: absolute; left: 50%; bottom: 13px; width: 28px; height: 12px; margin-left: -14px; border: 3px solid #7ef0c2; border-top: 0; border-radius: 0 0 16px 16px; box-shadow: 0 6px 10px -6px #3ddc97; transition: height .25s, width .25s, margin .25s; }
.sp-bot .blush { position: absolute; top: 44px; width: 14px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--bot-a) 70%, transparent); opacity: .55; filter: blur(1px); }
.sp-bot .blush.l { left: 14px; } .sp-bot .blush.r { right: 14px; }
.sp-bot .ear.l { transform: translate3d(-66px, 0, 0); } .sp-bot .ear.r { transform: translate3d(66px, 0, 0); }
.sp-bot .ear .e { --c: var(--bot-a); }
.sp-bot .ear .f { border-radius: 4px; }
.sp-bot .antenna { transform: translate3d(0, -58px, 0); }
.sp-bot .stick { --c: var(--bot-2); }
.sp-bot .bulb { position: absolute; left: -9px; top: -30px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--bot-b) 45%, color-mix(in srgb, var(--bot-b) 60%, #000)); box-shadow: 0 0 14px var(--bot-b); animation: botBulb 1.8s ease-in-out infinite; }
@keyframes botBulb { 50% { box-shadow: 0 0 26px var(--bot-b); transform: scale(1.12); } }

/* arms: pivot at the shoulder, arm hangs down (+y) */
.sp-bot .arm.l { transform: translate3d(-62px, -116px, 0); } .sp-bot .arm.r { transform: translate3d(62px, -116px, 0); }
.sp-bot .limb { --c: var(--bot-2); transform: translate3d(0, 30px, 0); }
.sp-bot .limb .f { border-radius: 8px; }
.sp-bot .hand { transform: translate3d(0, 68px, 0); }
.sp-bot .palm { --c: var(--bot-a); } .sp-bot .palm .f { border-radius: 7px; }
.sp-bot .arm-pivot { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.sp-bot .arm.l .arm-pivot { transform: rotateZ(10deg); } .sp-bot .arm.r .arm-pivot { transform: rotateZ(-10deg); }
/* holding something: left arm forward, hand up */
.sp-bot .bot[data-mood] .arm.l .arm-pivot { transform: rotateZ(48deg) rotateX(-18deg); }
.sp-bot .bot.wave .arm.r .arm-pivot { animation: botWave .5s ease-in-out 4 alternate; }
@keyframes botWave { from { transform: rotateZ(-150deg); } to { transform: rotateZ(-118deg); } }
.sp-bot .bot.point .arm.r .arm-pivot { transform: rotateZ(-98deg) rotateY(-20deg); }
.sp-bot .bot.cheer .arm.l .arm-pivot { animation: botCheerL .65s ease-in-out 2 alternate; }
.sp-bot .bot.cheer .arm.r .arm-pivot { animation: botCheerR .65s ease-in-out 2 alternate; }
@keyframes botCheerL { from { transform: rotateZ(150deg); } to { transform: rotateZ(170deg); } }
@keyframes botCheerR { from { transform: rotateZ(-150deg); } to { transform: rotateZ(-170deg); } }
.sp-bot .bot.cheer .bot-bob { animation: botHop .32s ease-in-out 4 alternate; }
@keyframes botHop { to { transform: translateY(-16px); } }
.sp-bot .bot.cheer .mouth, .sp-bot .bot.jump .mouth { width: 34px; height: 18px; margin-left: -17px; background: #7ef0c2; }
.sp-bot .bot.jump { animation: botJump .9s cubic-bezier(.3, .7, .4, 1); }
@keyframes botJump { 40% { transform: translateY(-46px) rotateY(180deg); } 80% { transform: translateY(0) rotateY(360deg); } 90% { transform: translateY(4px) rotateY(360deg) scaleY(.94); } 100% { transform: rotateY(360deg); } }
.sp-bot .bot.blink .eye { transform: scaleY(.12); }
.sp-bot .bot.point .eye { transform: translateX(5px); }

/* held items (counter-rotated so they stay upright in the raised hand) */
.sp-bot .item { display: none; transform: translate3d(0, -26px, 0) rotateZ(-48deg); }
.sp-bot .bot[data-mood="chai"] .item.chai, .sp-bot .bot[data-mood="samosa"] .item.chai, .sp-bot .bot[data-mood="samosa"] .item.samosa,
.sp-bot .bot[data-mood="rocket"] .item.rocket, .sp-bot .bot[data-mood="heart"] .item.heart { display: block; animation: botItem .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes botItem { from { scale: 0; } }
.sp-bot .cup { --c: #fffdf8; transform: translate3d(0, -4px, 0); }
.sp-bot .cup .tp { background: #9a5b2d; filter: none; }
.sp-bot .cup-band { position: absolute; left: 0; right: 0; top: 9px; height: 7px; background: var(--bot-b); }
.sp-bot .steam { position: absolute; top: -40px; width: 6px; height: 16px; border-radius: 50%; background: rgb(255 255 255 / .75); filter: blur(2px); opacity: 0; animation: botSteam 2.2s ease-out infinite; }
html:not(.dark) .sp-bot .steam { background: rgb(120 120 120 / .45); }
.sp-bot .steam.s1 { left: -8px; } .sp-bot .steam.s2 { left: -2px; animation-delay: .7s; } .sp-bot .steam.s3 { left: 4px; animation-delay: 1.4s; }
@keyframes botSteam { 0% { opacity: 0; transform: translateY(10px) scaleX(.6); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-26px) scaleX(1.4) translateX(5px); } }
.sp-bot .item.samosa { transform: translate3d(-34px, -10px, 10px) rotateZ(-48deg); }
.sp-bot .item.samosa span { position: absolute; left: -16px; top: -16px; width: 32px; height: 28px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: linear-gradient(160deg, #f6c35b, #c97b1c); filter: drop-shadow(0 2px 2px rgb(0 0 0 / .25)); }
.sp-bot .item.rocket .rk, .sp-bot .item.heart span { position: absolute; left: -16px; top: -24px; font-size: 30px; line-height: 1; }
.sp-bot .item.rocket .rk { animation: botRocket .5s ease-in-out infinite alternate; }
@keyframes botRocket { to { transform: translate(2px, -4px) rotate(-6deg); } }
.sp-bot .item.heart span { color: var(--bot-a); animation: botHeart 1s ease-in-out infinite; }
@keyframes botHeart { 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }

/* particles */
.sp-bot .bot-fx { position: absolute; left: 50%; top: 70px; width: 0; height: 0; pointer-events: none; }
.sp-bot .bot-fx .fx { position: absolute; left: -9px; top: -9px; font-size: 18px; line-height: 1; animation: botFx 1.6s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes botFx { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); } }
.sp-bot:hover .bulb { animation-duration: .6s; }
.sp-bot:focus-visible { outline: 2px solid var(--sp-a); outline-offset: 4px; border-radius: 16px; }

@media (max-width: 520px) {
  #tab-support-view .sp-botrow { flex-direction: column; align-items: center; }
  #tab-support-view .sp-pick.bubble::before { left: 50%; top: -8px; transform: translateX(-50%) rotate(135deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-bot *, .sp-bot .bot { animation: none !important; transition: none !important; }
  .sp-bot .steam { opacity: .5; }
}
