﻿/* Local, decorative companions; no account data or API calls. */
.brand img {
  image-rendering: pixelated;
}
.pig-brand {
  position: relative;
}
.brand-pig {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}
.brand-pig img {
  display: block;
  animation: pig-hello 320ms steps(3, end);
}
.brand-pig:hover {
  background: transparent;
  transform: translateY(-2px);
}
.brand-pig:focus-visible,
.chart-pet-cat:focus-visible {
  outline: 2px solid #6b8e4c;
  outline-offset: 3px;
}
.pig-brand .brand-name {
  text-decoration: none;
  color: inherit;
}
.pig-bubble {
  position: fixed;
  width: min(260px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  z-index: 1000;
  background: #fffbed;
  border: 2px solid #9caf84;
  box-shadow: 4px 4px 0 #d6dfc7;
  padding: 10px 12px;
  color: #40523b;
  text-align: left;
  font-weight: 400;
  letter-spacing: 0;
}
.pig-bubble::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  top: 0;
  left: var(--bubble-arrow, 12px);
  background: #fffbed;
  border-top: 2px solid #9caf84;
  border-left: 2px solid #9caf84;
  transform: rotate(45deg);
}
.pig-bubble[data-side='above']::before {
  top: auto;
  bottom: 0;
  transform: rotate(225deg);
}
.pig-bubble-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
}
.pig-bubble-heading button {
  border: 0;
  background: transparent;
  padding: 0 4px;
  font-size: 19px;
  line-height: 1;
  color: #5f7352;
}
.pig-bubble p {
  font-size: 13px;
  line-height: 1.75;
  margin: 8px 0;
}
.pig-bubble small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: #7c876d;
}
.chart-pet {
  margin-top: 22px;
}
.chart-pet-stage {
  position: relative;
  height: 100px;
  width: 100%;
  touch-action: pan-y;
}
.pet-candles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.chart-pet-cat {
  position: absolute;
  width: 34px;
  height: 34px;
  padding: 0;
  margin-left: -17px;
  border: 0;
  background: transparent;
  box-shadow: none;
  transition:
    left 180ms steps(4, end),
    top 180ms steps(3, end);
  z-index: 1;
}
.chart-pet-cat:hover {
  background: transparent;
}
.chart-pet-cat svg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.chart-pet-cat.is-happy svg {
  animation: cat-nuzzle 450ms steps(3, end) 2;
}
.pet-heart {
  position: absolute;
  top: -12px;
  left: 13px;
  color: #c5757c;
  font-size: 14px;
  pointer-events: none;
  animation: pet-heart 1500ms steps(5, end) both;
}
.chart-pet-caption {
  margin: 5px 0 0;
  font-size: 10px;
  color: #78866c;
  line-height: 1.6;
  text-align: center;
}
@keyframes pig-hello {
  50% {
    transform: translateY(-3px);
  }
}
@keyframes cat-nuzzle {
  50% {
    translate: 0 -4px;
  }
}
@keyframes pet-heart {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}
@media (max-width: 1000px) {
  .pig-bubble {
    width: min(260px, calc(100vw - 52px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-pig,
  .brand-pig img,
  .chart-pet-cat,
  .chart-pet-cat.is-happy svg,
  .pet-heart {
    animation: none;
    transition: none;
  }
}
/* Ambient companions live at the page edges; their layer never intercepts the app. */
body {
  padding-bottom: 62px;
}
.ambient-world {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}
.ambient-world[hidden] {
  display: none;
}
.ambient-ground {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55px;
  background: linear-gradient(0deg, #edf1e4 0%, #f6f7f0e8 70%, #f6f7f000 100%);
  border-bottom: 3px solid #d7e0c8;
}
.ambient-ground::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0 28px,
    #cbd8b7 28px 32px,
    transparent 32px 51px
  );
  opacity: 0.6;
}
.ambient-animal {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  transition: transform 2.3s linear;
  will-change: transform;
  z-index: 2;
}
.ambient-animal:hover,
.ambient-animal:active {
  background: transparent;
  box-shadow: none;
}
.ambient-animal img {
  display: block;
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  animation: pals-walk 600ms steps(2, end) infinite;
}
.ambient-animal.animal-visiting {
  pointer-events: none;
  opacity: 0.85;
}
.ambient-animal.animal-happy img {
  animation: pals-hop 700ms steps(3, end) infinite;
}
.ambient-emote {
  position: absolute;
  right: 0;
  top: -7px;
  color: #bd7f8d;
  font-size: 12px;
  animation: pals-emote 1.6s steps(4, end) infinite;
}
.ambient-toy {
  position: absolute;
  bottom: 7px;
  width: 25px;
  height: 25px;
  margin-left: -12px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: auto;
  z-index: 3;
}
.ambient-toy svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.ambient-toy:hover {
  background: #fff8d9;
  outline: 1px dashed #bba674;
}
.ambient-toy.toy-active svg {
  animation: pals-toy 1s steps(3, end) infinite;
}
.ambient-controls {
  position: absolute;
  right: 10px;
  bottom: 9px;
  display: grid;
  gap: 3px;
  text-align: center;
  color: #7a886b;
}
.ambient-controls > span {
  font: 9px var(--mono);
  letter-spacing: 1px;
}
.ambient-controls button {
  pointer-events: auto;
  font-size: 11px;
  background: #f8faef;
  padding: 3px 8px;
  border: 1px solid #cbd5bc;
}
.ambient-world button:focus-visible {
  outline: 2px solid #6f8d52;
  outline-offset: 2px;
}
.ambient-world button:focus-visible {
  transition: none;
}
.ambient-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ambient-still .ambient-animal,
.ambient-still .ambient-animal img,
.ambient-still .ambient-emote,
.ambient-still .ambient-toy svg {
  animation: none;
  transition: none;
}
@keyframes pals-walk {
  50% {
    translate: 0 -2px;
  }
}
@keyframes pals-hop {
  50% {
    translate: 0 -5px;
  }
}
@keyframes pals-emote {
  50% {
    translate: 0 -3px;
    opacity: 0.55;
  }
}
@keyframes pals-toy {
  50% {
    translate: 0 -4px;
    rotate: 8deg;
  }
}
@media (min-width: 1001px) {
  .sidebar {
    padding-bottom: 82px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-animal,
  .ambient-animal img,
  .ambient-emote,
  .ambient-toy svg {
    animation: none !important;
    transition: none !important;
  }
}
/* A shared courtship sequence: arrive, nuzzle together, then float little hearts. */
.ambient-animal.animal-romantic img {
  animation: pals-nuzzle 1.2s 2.3s steps(4, end) infinite;
}
.ambient-animal.romantic-0 {
  --nuzzle-x: 3px;
  --nuzzle-angle: 7deg;
}
.ambient-animal.romantic-1 {
  --nuzzle-x: -3px;
  --nuzzle-angle: -7deg;
}
.ambient-romance {
  position: absolute;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 4;
}
.ambient-romance > span {
  position: absolute;
  color: #c96e8b;
  top: -6px;
  font: 15px var(--mono);
  opacity: 0;
  animation: pals-love 2s 2.3s steps(5, end) infinite;
}
.ambient-romance > span:nth-child(1) {
  left: -14px;
}
.ambient-romance > span:nth-child(2) {
  left: 5px;
  animation-delay: 2.9s;
  font-size: 11px;
}
.ambient-romance > span:nth-child(3) {
  left: -3px;
  animation-delay: 3.5s;
  font-size: 12px;
}
.ambient-romance small {
  position: absolute;
  top: -26px;
  left: -62px;
  width: 124px;
  text-align: center;
  color: #a25e76;
  background: #fff8f0ed;
  border: 1px solid #e8c6cd;
  padding: 2px 4px;
  font-size: 10px;
  white-space: nowrap;
}
.ambient-controls .romance-trigger {
  color: #aa607b;
  background: #fff3f1;
  border-color: #e5c5cc;
}
.ambient-controls .romance-trigger:disabled {
  opacity: 0.85;
  cursor: default;
}
@keyframes pals-nuzzle {
  0%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  30%,
  65% {
    translate: var(--nuzzle-x) -3px;
    rotate: var(--nuzzle-angle);
  }
  80% {
    translate: 0 -6px;
    rotate: 0deg;
  }
}
@keyframes pals-love {
  0% {
    opacity: 0;
    translate: 0 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: 0 -25px;
  }
}
.ambient-still .animal-romantic img,
.ambient-still .ambient-romance > span {
  animation: none;
}
.ambient-still .ambient-romance > span:first-child {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .ambient-romance > span {
    animation: none;
  }
  .ambient-romance > span:first-child {
    opacity: 1;
  }
}
