.pet { position: relative; right: auto; top: auto; margin: 0; width: 200px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: bob 4s ease-in-out infinite; cursor: pointer; outline: none; touch-action: manipulation; }
.dock:not(.open) .pet { display: none; }
.pet:focus-visible .hg { outline: 2px solid var(--acc); outline-offset: 4px; border-radius: 50%; }
.hg { --bgc: var(--ink-dark); --fgc: var(--food); display: block; width: 100%; height: auto; overflow: visible; transition: transform .3s; touch-action: manipulation; }
.pet:hover .hg, .pet.on .hg { --bgc: var(--food); --fgc: var(--ink-dark); }
.hg .bg { fill: var(--bgc); transition: fill .3s; }
.hg .ln { fill: none; stroke: var(--fgc); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.hg .eyeDot { fill: var(--fgc); transition: fill .3s, transform .12s; }
.hg .zz { opacity: 0; }
.pet.sleep { animation: snooze 4s ease-in-out infinite; }
.pet.sleep .zz { animation: zz 2.4s ease-in infinite; }
.pet.sleep .zz.z2 { animation-delay: 1.2s; }
.pet.hop { animation: hop .6s ease; }
.pet.eat .hg { animation: chew .3s 3; }
@keyframes hop { 30% { transform: translateY(-30px); } 60% { transform: translateY(0) scaleY(.92); } }
@keyframes snooze { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(4px) rotate(2deg); } }
@keyframes zz { 0% { opacity: 0; transform: translate(0,4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(6px,-10px); } }
@keyframes chew { 50% { transform: scale(1.04,.96); } }
@keyframes heart { to { transform: translateY(-44px); opacity: 0; } }
.bubble { position: absolute; top: 50%; bottom: auto; right: 100%; left: auto; margin: 0 12px 0 0; transform: translateY(-50%) translateX(6px); width: max-content; max-width: 200px; background: var(--bg); border: 1.5px solid var(--ink); border-radius: 16px; padding: 8px 12px; font-size: 14px; line-height: 1.35; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.bubble.on { opacity: 1; transform: translateY(-50%); }
.heart { position: absolute; font-size: 20px; color: var(--acc); pointer-events: none; animation: heart 1s ease-out forwards; }
.tray { display: flex; gap: 10px; justify-content: center; }
.tray button { width: 52px; height: 52px; border-radius: 50%; background: #F8F7F2; border: 1.5px solid var(--ink-dark); display: grid; place-items: center; touch-action: none; transition: transform .2s, background .2s; color: var(--ink-dark); }
.tray button svg { width: 30px; height: 30px; }
.tray button:hover { transform: translateY(-3px); }
.tray button[aria-pressed=true] { background: var(--ink-dark); box-shadow: 0 0 0 3px rgba(18,18,18,.25); color: #F2F1EC; }
.tray button[aria-pressed=true] .food { color: #F2F1EC; }
.tray button.drag { position: fixed; z-index: 95; pointer-events: none; width: 52px; height: 52px; }
.stat { width: 100%; max-width: 230px; font-size: 13px; color: var(--ink); }
.stat .bar { height: 8px; border: 1.5px solid var(--ink-dark); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.stat .bar i { display: block; height: 100%; width: 60%; background: var(--ink-dark); transition: width .5s; }
.food { width: 30px; height: 30px; }
@media (max-width: 900px) { .pet { width: min(220px,62vw); } .bubble { top: -64px; right: auto; left: 50%; margin: 0; transform: translateX(-50%) translateY(6px); width: 220px; max-width: 220px; } .bubble.on { transform: translateX(-50%); } }
@media (max-width: 700px) { .dock .pet { width: 170px; } .dock .bubble { max-width: 150px; } }
@media (max-width: 420px) { .dock .bubble { max-width: 130px; } }