.digital-pet-root,
.digital-pet-summon {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.digital-pet-summon,
.digital-pet-avatar {
  border: 1px solid rgba(135, 206, 250, 0.45);
  background: radial-gradient(circle at 40% 25%, rgba(125, 249, 255, 0.24), rgba(6, 16, 28, 0.92));
  color: #d8fbff;
  box-shadow: 0 0 24px rgba(74, 222, 255, 0.2), inset 0 0 18px rgba(74, 222, 255, 0.08);
  cursor: pointer;
}
.digital-pet-summon { width: 42px; height: 42px; border-radius: 999px; font-size: 18px; }
.digital-pet-avatar {
  width: 86px; height: 86px; border-radius: 28px 28px 34px 34px;
  display: grid; grid-template-rows: 16px 1fr 18px; place-items: center;
  transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease;
}
.digital-pet-avatar:hover,
.digital-pet-avatar:focus-visible,
.digital-pet-summon:hover,
.digital-pet-summon:focus-visible { outline: 2px solid rgba(125, 249, 255, 0.65); outline-offset: 3px; }
.digital-pet-root[data-mode="idle"] .digital-pet-avatar { animation: digital-pet-breathe 3.6s ease-in-out infinite; }
.digital-pet-root[data-mode="reacting"] .digital-pet-avatar,
.digital-pet-root[data-mode="waking"] .digital-pet-avatar { transform: translateY(-3px) scale(1.04); }
.digital-pet-root[data-mode="sleeping"] .digital-pet-avatar { opacity: 0.58; filter: saturate(0.55); animation: none; }
.digital-pet-antenna { color: #7df9ff; font-size: 18px; line-height: 1; }
.digital-pet-face { font-size: 21px; letter-spacing: 1px; }
.digital-pet-name { font-size: 10px; opacity: 0.72; }
.digital-pet-bubble {
  position: absolute; right: 0; bottom: 96px; max-width: min(260px, calc(100vw - 36px));
  padding: 8px 10px; border: 1px solid rgba(135, 206, 250, 0.35); border-radius: 12px;
  background: rgba(3, 10, 20, 0.92); color: #e9feff; font-size: 12px; line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}
.digital-pet-loading { pointer-events: none; color: #9ee8f3; font-size: 11px; }
@keyframes digital-pet-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (max-width: 640px) {
  .digital-pet-root, .digital-pet-summon { right: 12px; bottom: 72px; }
  .digital-pet-avatar { width: 68px; height: 68px; border-radius: 22px 22px 28px 28px; }
  .digital-pet-bubble { bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .digital-pet-avatar, .digital-pet-root[data-mode="idle"] .digital-pet-avatar { animation: none; transition: none; }
}
