/* ============================================================
   JIMY PANEL v106 | kucing hidup: gerak kecil, reaksi, elus, kucing pemandu, tombol Tanya Jimy
   Dimuat setelah app.css dan theme2.css. Semua animasi mati bila "kurangi gerakan" aktif.
   ============================================================ */

/* ---------- gerak kecil ---------- */
@keyframes catEarL { 0%, 100% { transform: rotate(-6deg); } 30% { transform: rotate(-19deg) translateY(-.25em); } 60% { transform: rotate(-1deg); } }
@keyframes catEarR { 0%, 100% { transform: scaleX(-1) rotate(-6deg); } 30% { transform: scaleX(-1) rotate(-19deg) translateY(-.25em); } 60% { transform: scaleX(-1) rotate(-1deg); } }
@keyframes catHop { 0% { transform: translateY(0) scaleY(1); } 18% { transform: translateY(.3em) scaleY(.93); } 45% { transform: translateY(-2em) scaleY(1.05); } 72% { transform: translateY(0) scaleY(.94); } 100% { transform: translateY(0) scaleY(1); } }
@keyframes catPurr { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(.14em, -.06em) rotate(.6deg); } 75% { transform: translate(-.14em, .06em) rotate(-.6deg); } }
@keyframes catStartle { 0% { transform: translateY(0) scale(1); } 25% { transform: translateY(-1.6em) scale(1.08, .96); } 100% { transform: translateY(0) scale(1); } }
@keyframes catSayIn { 0% { transform: translate(-50%, 4px) scale(.7); opacity: 0; } 100% { transform: translate(-50%, 0) scale(1); opacity: 1; } }

.lbtop.c-ear-l .lbcat.l { animation: catEarL .6s ease-in-out; }
.lbtop.c-ear-r .lbcat.r { animation: catEarR .6s ease-in-out; }
.lbtop.mini.c-tilt .lbhd { transform: rotate(9deg); }
.lbtop.c-hop .lbbob { animation: catHop .65s cubic-bezier(.3, 1.4, .5, 1); }
.lbtop.c-startle .lbbob { animation: catStartle .5s ease-out; }
.lbtop.c-purr .lbbob { animation: catPurr .16s linear infinite; }
.lbtop.c-purr .lbhd { transform: rotate(-5deg); }
.lbtop.c-grumpy .lbhd { transform: rotate(-7deg); }
.lbtop.c-grumpy { --ex: 1.1em; --ey: .2em; }
.lbtop.mini { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.lbtop.mini .lbhd { cursor: pointer; }

/* ---------- gelembung kecil di atas kucing ---------- */
.catsay { position: absolute; left: 50%; bottom: calc(100% - 2px); transform: translate(-50%, 0); z-index: 60; max-width: 220px; width: max-content; padding: 6px 12px; border-radius: 14px; background: #fffaf0; color: #15121c; border: 2px solid #15121c; font: 800 12px/1.3 var(--font); text-align: center; pointer-events: none; box-shadow: 2px 2px 0 #15121c; animation: catSayIn .28s cubic-bezier(.3, 1.5, .5, 1); }
.catsay::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 9px; height: 9px; background: #fffaf0; border-right: 2px solid #15121c; border-bottom: 2px solid #15121c; transform: translateX(-50%) rotate(45deg); }
body.dark .catsay { background: #261f16; color: #f3e9d2; border-color: #d9b26f; box-shadow: 2px 2px 0 #000; }
body.dark .catsay::after { background: #261f16; border-color: #d9b26f; }
.moodcat .catsay { left: 4px; bottom: calc(100% - 8px); transform: none; animation: none; }
.moodcat .catsay::after { left: 38px; transform: translateX(-50%) rotate(45deg); }

/* ---------- kucing pemandu (jendela Tanya Jimy) ---------- */
.catguide { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 10px; }
.catguide .lbtop.mini { --hw: 128px; margin: 0 auto; }
.catguide .rb-say.big { margin-top: 0; }
.catguide .rb-say.big::before { top: -6px; }

/* ---------- tombol Tanya Jimy: kepala kucing kecil ---------- */
.botfab { overflow: visible; }
.botfab .lbtop.mini { --hw: 37px; margin: 0; pointer-events: none; transform: translateY(1px); cursor: default; }
.botfab .lbtop.mini .lbbob { animation-duration: 4.2s; padding-top: 3.9em; }
.botfab .lbzz { font-size: 8px; right: -9px; top: -4px; color: #fff6e4; text-shadow: 0 0 2px #15121c, 1px 1px 0 #15121c; }
.botfab .catsay { left: auto; right: calc(100% + 8px); bottom: 50%; transform: translateY(50%); animation: none; }
.botfab .catsay::after { left: auto; right: -6px; bottom: 50%; transform: translateY(50%) rotate(-45deg); }
body.comic .botfab .lbf, body.dark .botfab .lbf { border-width: .3em; }

@media (prefers-reduced-motion: reduce) {
  .lbtop.c-ear-l .lbcat.l, .lbtop.c-ear-r .lbcat.r, .lbtop.c-hop .lbbob, .lbtop.c-startle .lbbob, .lbtop.c-purr .lbbob, .catsay { animation: none; }
}

/* Malam Emas: tombol Tanya Jimy tanpa pendar merah lama */
body.dark .botfab { box-shadow: 0 8px 20px rgba(217, 178, 111, .3) !important; animation: none !important; }
