:root {
  --ink: #2b1d3f;
  --glass: rgba(255, 255, 255, 0.22);
  --glass-strong: rgba(255, 255, 255, 0.34);
  --glass-edge: rgba(255, 255, 255, 0.55);
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  height: 100dvh;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--body);
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 20%, #3b2a5c 0%, #150d24 70%);
  display: grid;
  place-items: center;
  min-height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

kbd {
  font-family: var(--body);
  font-weight: 900;
  font-size: 0.85em;
  padding: 0 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

/* ---------- Device frame (tablet portrait) ---------- */
.device {
  position: relative;
  width: min(100vw, calc(100vh * 0.75), 720px);
  aspect-ratio: 3 / 4;
  max-height: 100vh;
  border-radius: clamp(0px, 4vw, 44px);
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 0 10px #1c1330,
    0 0 0 12px rgba(255, 255, 255, 0.08),
    0 40px 120px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  padding: clamp(10px, 1.8vh, 18px) 20px clamp(8px, 1.4vh, 14px);
  gap: clamp(5px, 1.1vh, 10px);
}

@media (max-height: 780px) {
  .meta { display: none; }
  .thermo-hint { display: none; }
  .nameplate-avatar { width: 36px; height: 36px; }
  .nameplate-text strong { font-size: 1.1rem; }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  body { background: #150d24; }
  .device {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
  }
  .meta { display: none; }
}

/* iOS Safari adicionado à tela inicial (navigator.standalone) */
body.ios-standalone {
  background: #150d24;
}
body.ios-standalone .device {
  width: 100vw;
  height: 100vh;
  height: -webkit-fill-available;
  height: 100dvh;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
}
body.ios-standalone .meta,
body.touch .meta,
body.touch .btn .k { display: none; }

/* iPhone / iPad em tela cheia no navegador também */
@media (max-width: 920px) {
  .device {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

/* iPad: botões e gauges um pouco maiores */
@media (min-width: 768px) and (max-width: 1200px) {
  .btn { height: clamp(72px, 11vh, 110px); border-radius: 28px; }
  .btn .i { font-size: clamp(1.8rem, 3.8vh, 2.6rem); }
  .btn .t { font-size: clamp(0.85rem, 2vh, 1.1rem); }
  .gauge { --gs: clamp(48px, 7vh, 64px); }
  .guide { font-size: clamp(1.1rem, 2.4vh, 1.45rem); }
}

/* ---------- Install tip (Safari iOS) ---------- */
.ios-install {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  translate: -50% 0;
  z-index: 200;
  width: min(92vw, 420px);
  padding: 16px 18px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(40, 10, 60, 0.35);
  font-family: var(--body);
  animation: guide-in 0.45s var(--ease-bounce);
}
.ios-install strong { font-family: var(--display); font-size: 1.15rem; }
.ios-install ol { margin: 10px 0 0 1.1rem; font-weight: 800; font-size: 0.92rem; line-height: 1.45; }
.ios-install-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Audience pick (menino / menina / ambos) ---------- */
.audience-pick {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 180, 210, 0.55), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(140, 210, 255, 0.45), transparent 50%),
    linear-gradient(160deg, #fff6fb, #e8f6ff 45%, #fff0e8);
}
.audience-pick[hidden] { display: none !important; }
.audience-card {
  width: min(92vw, 440px);
  padding: 28px 22px 22px;
  text-align: center;
  border-radius: 28px;
  animation: guide-in 0.5s var(--ease-bounce);
}
.audience-eyebrow {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ff6b9d;
  font-size: 0.95rem;
}
.audience-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 5vw, 2rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}
.audience-sub {
  margin: 8px 0 20px;
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.98rem;
  color: rgba(40, 20, 50, 0.7);
}
.audience-actions {
  display: grid;
  gap: 12px;
}
.audience-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--body);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(40, 10, 60, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.audience-btn:active { transform: scale(0.97); }
.audience-emoji {
  grid-row: 1 / span 2;
  font-size: 2rem;
  line-height: 1;
}
.audience-btn strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
}
.audience-btn em {
  font-style: normal;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(40, 20, 50, 0.55);
}
.audience-girl { background: linear-gradient(135deg, rgba(255, 200, 220, 0.9), rgba(255, 240, 248, 0.95)); }
.audience-boy { background: linear-gradient(135deg, rgba(180, 220, 255, 0.9), rgba(230, 245, 255, 0.95)); }
.audience-both { background: linear-gradient(135deg, rgba(255, 230, 180, 0.9), rgba(255, 248, 230, 0.95)); }
.audience-change {
  margin-top: 14px;
  border: 0;
  background: transparent;
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.82rem;
  color: rgba(40, 20, 50, 0.5);
  cursor: pointer;
}
.audience-change kbd {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.08);
}

.ios-share {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  background: #eef2ff;
  font-weight: 900;
}

/* ---------- Scene ---------- */
.scene { position: absolute; inset: 0; z-index: -1; }

.scene-bg {
  position: absolute;
  inset: -3%;
  background: url("assets/scene/bg_meadow.webp") center / cover no-repeat;
  animation: bg-drift 30s ease-in-out infinite alternate;
  transition: filter 2s ease, background-image 0.8s ease;
}

@keyframes bg-drift {
  from { transform: scale(1.04) translate3d(-0.6%, 0, 0); }
  to { transform: scale(1.08) translate3d(0.6%, -0.5%, 0); }
}

.scene-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 190, 220, 0.08), rgba(40, 10, 60, 0.12));
  transition: background 2s ease, opacity 2s ease;
}

.device[data-period="dusk"] .scene-bg { filter: saturate(1.15) hue-rotate(-12deg) brightness(0.92); }
.device[data-period="dusk"] .scene-tint { background: linear-gradient(180deg, rgba(255, 120, 80, 0.25), rgba(90, 20, 90, 0.35)); }

.device[data-period="night"] .scene-bg { filter: brightness(0.42) saturate(0.8) hue-rotate(200deg); }
.device[data-period="night"] .scene-tint { background: linear-gradient(180deg, rgba(20, 30, 90, 0.55), rgba(10, 5, 40, 0.55)); }

.scene-stars {
  position: absolute;
  inset: 0 0 45% 0;
  opacity: 0;
  transition: opacity 2s ease;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 28% 8%, #fff, transparent),
    radial-gradient(2px 2px at 44% 22%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 63% 12%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 78% 26%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 90% 9%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 55% 35%, #fff, transparent);
  animation: twinkle 3s ease-in-out infinite alternate;
}

.device[data-period="night"] .scene-stars { opacity: 1; }

@keyframes twinkle { from { filter: brightness(0.7); } to { filter: brightness(1.4); } }

.scene-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.scene-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(30, 10, 50, 0.45) 100%);
  pointer-events: none;
}

/* ---------- Glass ---------- */
.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.16));
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1.5px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 30px rgba(60, 20, 80, 0.22);
}

/* ---------- Top HUD ---------- */
.hud-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.nameplate {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
}

.nameplate-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffd6ec 60%, #e8b8ff) center / cover;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), 0 4px 10px rgba(0, 0, 0, 0.15);
  background-size: 150%;
  background-position: 50% 18%;
}

.nameplate-text { display: flex; flex-direction: column; line-height: 1.05; }
.rename-pet { border: 0; background: transparent; color: inherit; font: 800 .65rem var(--body); cursor: pointer; text-align: left; padding: 3px 0; }
.device[data-phase="egg"] .rename-pet, .device[data-phase="hatching"] .rename-pet { display: none; }
.nameplate-text strong { font-family: var(--display); font-size: 1.35rem; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(80, 20, 90, 0.45); }
.nameplate-text span { font-size: 0.78rem; font-weight: 800; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 4px rgba(80, 20, 90, 0.4); }

.trait-banner {
  align-self: center;
  max-width: 96%;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(0.82rem, 2vh, 1.05rem);
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 140, 180, 0.92), rgba(160, 120, 255, 0.88));
  box-shadow: 0 6px 18px rgba(80, 20, 90, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 3px rgba(60, 20, 80, 0.35);
  line-height: 1.25;
}
.trait-banner[hidden] { display: none; }
.device[data-phase="egg"] .trait-banner,
.device[data-phase="hatching"] .trait-banner { display: none; }

.clock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(80, 20, 90, 0.4);
}
.clock-icon { font-size: 1.15rem; }
.clock-time { font-variant-numeric: tabular-nums; }

.mute-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  flex: 0 0 auto;
}
.mute-btn .i { font-size: 1.2rem; line-height: 1; }
.mute-btn:active { transform: scale(0.94); }
html[data-sound="off"] .mute-btn { opacity: 0.85; }

/* ---------- Needs gauges ---------- */
.needs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 10px 8px 8px;
  border-radius: 26px;
  transition: opacity 0.6s, transform 0.6s var(--ease-bounce);
}

.device[data-phase="egg"] .needs, .device[data-phase="hatching"] .needs { display: none; }
.device[data-phase="egg"] .side-care, .device[data-phase="hatching"] .side-care { display: none !important; }
.device[data-phase="pet"] .side-care:not([hidden]) {
  display: grid !important;
  visibility: visible;
  opacity: 1;
}

.gauge { position: relative; display: grid; justify-items: center; gap: 2px; }
.gauge { --gs: clamp(34px, 5.4vh, 48px); }
.gauge svg { width: var(--gs); height: var(--gs); transform: rotate(-90deg); filter: drop-shadow(0 3px 6px rgba(60, 20, 80, 0.25)); }
.gauge circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.gauge .track { stroke: rgba(255, 255, 255, 0.45); fill: rgba(255, 255, 255, 0.35); }
.gauge .val {
  stroke: var(--c2);
  stroke-dasharray: 119.4;
  stroke-dashoffset: calc(119.4 * (1 - var(--v, 0.7)));
  transition: stroke-dashoffset 0.4s ease, stroke 0.4s;
}
.gauge > span { position: absolute; top: calc(var(--gs) / 2); translate: 0 -50%; font-size: calc(var(--gs) * 0.42); line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15)); }
.gauge em { font-style: normal; font-size: 0.72rem; font-weight: 900; color: #fff; text-shadow: 0 1px 4px rgba(80, 20, 90, 0.5); }
.gauge.low .val { stroke: #ff7a59; }
.gauge.crit .val { stroke: #ff3b5c; }
.gauge.crit svg { animation: gauge-alarm 0.9s ease-in-out infinite; }
@keyframes gauge-alarm { 50% { transform: rotate(-90deg) scale(1.12); } }

/* ---------- Stage & actor ---------- */
.stage { position: relative; flex: 1 1 auto; min-height: 0; }

.toy {
  position: absolute;
  z-index: 6;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  display: none;
  place-items: center;
  font-size: 3.4rem;
  line-height: 1;
  filter: drop-shadow(0 10px 12px rgba(40, 10, 60, 0.4));
  cursor: grab;
  touch-action: none;
  user-select: none;
  animation: toy-bob 0.7s ease-in-out infinite;
  pointer-events: auto;
}
.toy:active { cursor: grabbing; scale: 1.12; }
.device.playing .toy { display: grid; }
@keyframes toy-bob { 50% { translate: 0 -8px; } }

.side-care {
  position: absolute;
  right: max(8px, env(safe-area-inset-right, 0px));
  top: 34%;
  z-index: 14;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}
.side-btn {
  appearance: none;
  border: 0;
  width: 64px;
  min-height: 62px;
  height: auto;
  padding: 7px 4px 8px;
  border-radius: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 2px;
  color: #fff;
  font-family: var(--display);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 50%),
    linear-gradient(160deg, #7dffb0, #2ecc71);
  box-shadow: 0 8px 18px rgba(40, 10, 60, 0.28), inset 0 -4px 0 rgba(0,0,0,.12);
}
.side-btn#btnPlay {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 50%),
    linear-gradient(160deg, #ffd27a, #ff8a3d);
}
.side-btn.side-closet {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 50%),
    linear-gradient(160deg, #ffb3e6, #c56bff);
}
.side-btn.side-collection {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 50%),
    linear-gradient(160deg, #9ad7ff, #5b8cff);
}
.side-btn:disabled { filter: grayscale(.8); opacity: .4; cursor: default; }
.side-btn .i { font-size: 1.55rem; line-height: 1; }
.side-btn .t { font-size: .68rem; font-weight: 800; }
.side-btn.wanted { outline: 3px solid #fff; animation: guide-in .4s var(--ease-bounce); }
.device.playing .side-btn#btnPlay { outline: 3px solid #fff59d; }

.actor.sick { filter: saturate(.55) hue-rotate(70deg); }
.actor.sick .actor-img { animation: sick-wobble 1.2s ease-in-out infinite; }
@keyframes sick-wobble { 25% { rotate: -4deg; } 75% { rotate: 4deg; } }

.wear {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  font-size: clamp(1.4rem, 5vh, 2.4rem);
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(40, 10, 60, 0.35));
  animation: wear-bob 2.4s ease-in-out infinite;
}
.wear-hat { left: 50%; top: 8%; translate: -50% 0; font-size: clamp(1.8rem, 6.5vh, 3rem); z-index: 5; }
.wear-face { left: 50%; top: 28%; translate: -50% 0; font-size: clamp(1.5rem, 5.2vh, 2.6rem); z-index: 5; }
.wear-neck { left: 50%; top: 48%; translate: -50% 0; font-size: clamp(1.2rem, 4.2vh, 2rem); }
.wear-body { left: 50%; top: 55%; translate: -50% 0; font-size: clamp(1.6rem, 5.5vh, 2.8rem); opacity: 0.92; z-index: 3; }
.wear-held { right: 12%; top: 52%; font-size: clamp(1.4rem, 5vh, 2.4rem); z-index: 5; }
.wear-feet { left: 50%; bottom: 4%; top: auto; translate: -50% 0; font-size: clamp(1.4rem, 4.8vh, 2.2rem); z-index: 4; }
.wear svg { display: block; width: clamp(44px, 7.5vh, 72px); height: clamp(44px, 7.5vh, 72px); overflow: visible; }
.wear-hat svg { width: clamp(54px, 9vh, 86px); height: clamp(54px, 9vh, 86px); }
.wear-body svg { width: clamp(58px, 9.5vh, 92px); height: clamp(58px, 9.5vh, 92px); }
.wear-feet svg { width: clamp(62px, 10vh, 96px); height: clamp(44px, 7vh, 68px); }
@keyframes wear-bob { 50% { translate: -50% -4px; } }
.wear-held { animation-name: wear-bob-held; }
@keyframes wear-bob-held { 50% { translate: 0 -5px; } }

.combo-badge {
  position: absolute;
  top: 8%;
  left: 50%;
  translate: -50% 0;
  z-index: 9;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.1rem, 3.5vh, 1.6rem);
  color: #fff;
  text-shadow: 0 3px 0 #ff5c9d, 0 6px 14px rgba(40, 10, 60, 0.45);
  pointer-events: none;
}
.combo-badge.pop { animation: combo-pop 0.45s var(--ease-bounce); }
@keyframes combo-pop { from { scale: 0.4; opacity: 0; } to { scale: 1; opacity: 1; } }

.stage.shake { animation: stage-shake 0.4s ease-in-out; }
@keyframes stage-shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 12px;
  background: rgba(30, 10, 50, 0.35);
  backdrop-filter: blur(4px);
}
.sheet[hidden] { display: none !important; }
.sheet-card {
  width: min(520px, 100%);
  max-height: min(76vh, 680px);
  overflow: auto;
  border-radius: 28px 28px 22px 22px;
  padding: 14px 14px 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.55), transparent 45%),
    linear-gradient(165deg, #fff6ff, #ffe8f4 40%, #e8f4ff);
  box-shadow: 0 -8px 40px rgba(40, 10, 60, 0.35);
  animation: sheet-up 0.35s var(--ease-bounce);
}
@keyframes sheet-up { from { translate: 0 40px; opacity: 0; } }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.sheet-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  color: #6b2d8a;
}
.sheet-x {
  appearance: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255,255,255,.7);
  font-size: 1.1rem;
  cursor: pointer;
}
.closet-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px dashed rgba(180, 90, 220, 0.45);
}
.tray-slot {
  appearance: none;
  border: 1.5px solid rgba(197, 107, 255, 0.35);
  border-radius: 14px;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  cursor: pointer;
  font-family: var(--body);
  color: #6b2d8a;
  transition: transform 0.12s ease, background 0.15s ease;
}
.tray-slot.empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.4);
  color: #9e6bb8;
  cursor: default;
  font-size: 0.72rem;
  font-weight: 800;
}
.tray-slot.filled {
  background: #fff;
  box-shadow: 0 3px 0 rgba(120, 40, 140, 0.14);
}
.tray-slot.filled:active { transform: scale(0.96); }
.tray-slot .te { display: grid; place-items: center; font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.tray-slot .te img, .tray-slot .te svg { width: 28px; height: 28px; object-fit: contain; }
.tray-slot .tn { font-size: 0.68rem; font-weight: 900; line-height: 1.1; text-align: left; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tray-slot .tx { font-size: 0.75rem; font-weight: 900; color: #b6468c; margin-left: auto; padding-right: 2px; }
.tray-clear {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 6px 10px;
  background: rgba(234, 210, 248, 0.85);
  color: #6b2d8a;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.74rem;
  cursor: pointer;
}
.tray-clear:disabled { opacity: 0.4; cursor: default; }
.closet-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.closet-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.8rem;
  background: rgba(255,255,255,.65);
  color: #6b2d8a;
  cursor: pointer;
}
.closet-tab.on {
  background: linear-gradient(160deg, #ffb3e6, #c56bff);
  color: #fff;
}
.closet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}
.closet-item {
  position: relative;
  appearance: none;
  border: 0;
  border-radius: 18px;
  padding: 10px 6px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 4px 0 rgba(120, 40, 140, 0.12);
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-items: center;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.closet-item:active { transform: translateY(2px); }
.closet-item.on {
  outline: 3px solid #c56bff;
  background: #fff;
}
.closet-item.on::after {
  content: "✓";
  position: absolute;
  top: 5px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c56bff;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.closet-item.limit-reached:not(.on) {
  opacity: 0.55;
}
.closet-item .ce { font-size: 1.85rem; line-height: 1; min-height: 44px; display: grid; place-items: center; }
.closet-item .ce svg { width: 44px; height: 44px; overflow: visible; filter: drop-shadow(0 3px 4px rgba(60, 20, 80, 0.22)); }
.closet-item .cn { font-size: 0.68rem; font-weight: 800; color: #6b2d8a; text-align: center; line-height: 1.15; }

.collection-grid {
  display: grid;
  gap: 10px;
}
.collection-new-egg {
  appearance: none;
  border: 0;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffe566, #ffb347);
  box-shadow: 0 8px 0 #e09220, 0 12px 24px rgba(224, 146, 32, .28);
  cursor: pointer;
  text-align: left;
  transition: transform .12s ease;
}
.collection-new-egg:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 4px 0 #e09220; }
.collection-new-egg:disabled,
.collection-new-egg.done {
  background: linear-gradient(135deg, #e8dff0, #d4c8e0);
  box-shadow: 0 6px 0 #b5a4c4;
  cursor: not-allowed;
  opacity: .85;
}
.collection-new-egg .cne-ico { font-size: 2rem; line-height: 1; }
.collection-new-egg .cne-txt { display: grid; gap: 2px; }
.collection-new-egg .cne-txt b {
  font-family: var(--display);
  font-size: 1.05rem;
  color: #5a2a12;
}
.collection-new-egg .cne-txt i {
  font-style: normal;
  font-size: 0.78rem;
  color: #7a4a22;
}
.collection-new-egg.done .cne-txt b,
.collection-new-egg.done .cne-txt i { color: #6a4a7a; }
.collection-card {
  appearance: none;
  border: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.8);
  cursor: pointer;
  text-align: left;
}
.collection-card.active { outline: 3px solid #5b8cff; }
.collection-card.frozen { opacity: .92; background: rgba(240, 248, 255, .9); }
.collection-card .thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #f3e8ff center/contain no-repeat;
}
.collection-card .meta { display: grid; gap: 2px; }
.collection-card .meta b { font-family: var(--display); color: #5a2a7a; }
.collection-card .meta i { font-style: normal; font-size: 0.78rem; color: #8a5aa0; }
.collection-card .bits { font-size: 1.2rem; }
.collection-card .pause-badge {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #3d6ea8;
  background: #dcebff;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}
.collection-card .pause-badge.live {
  color: #1f7a3a;
  background: #d8f5e2;
}
.collection-empty { text-align: center; color: #8a5aa0; padding: 24px 8px; }
.sheet-hint { margin: 12px 4px 0; font-size: 0.78rem; color: #8a5aa0; }

.actor {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 2%;
  bottom: 2%;
  cursor: grab;
  touch-action: none;
  z-index: 2;
}

.actor-move { position: absolute; inset: 0; transform-origin: 50% 100%; }

.actor-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 18px 18px rgba(40, 10, 50, 0.28));
  animation: breathe 3.2s ease-in-out infinite;
  transition: filter 0.3s ease, scale 0.8s var(--ease-bounce);
  will-change: transform;
}

@keyframes breathe {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  30% { transform: scale(1.012, 0.985) rotate(-0.6deg); }
  60% { transform: scale(0.992, 1.018) rotate(0.5deg); }
}

.actor[data-mood="happy"] .actor-img { animation: hop 0.9s var(--ease-bounce) 1, breathe 3.2s ease-in-out 0.9s infinite; }
@keyframes hop {
  0% { transform: scale(1, 1); }
  18% { transform: scale(1.08, 0.88); }
  45% { transform: translateY(-14%) scale(0.94, 1.08); }
  70% { transform: translateY(0) scale(1.06, 0.93); }
  100% { transform: scale(1, 1); }
}

.actor[data-mood="sad"] .actor-img { animation: sob 1.6s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(40, 10, 50, 0.28)) saturate(0.75) brightness(0.95); }
@keyframes sob {
  0%, 100% { transform: scale(1, 0.97) translateY(2%); }
  50% { transform: scale(1.01, 0.95) translateY(3%) rotate(-1.5deg); }
}

.actor[data-mood="mad"] .actor-img { animation: fume 0.5s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(40, 10, 50, 0.28)) sepia(0.25) saturate(1.6) hue-rotate(-18deg); }
@keyframes fume {
  0%, 100% { transform: translateX(0) scale(1.02, 0.98); }
  25% { transform: translateX(-1.8%) rotate(-1.5deg); }
  75% { transform: translateX(1.8%) rotate(1.5deg); }
}

.actor[data-mood="sleep"] .actor-img { animation: snooze 4.5s ease-in-out infinite; filter: drop-shadow(0 18px 18px rgba(40, 10, 50, 0.28)) brightness(0.72) saturate(0.8); }
@keyframes snooze {
  0%, 100% { transform: scale(1, 0.96) rotate(-2deg); }
  50% { transform: scale(1.015, 0.99) rotate(-2deg); }
}

.actor-glow {
  position: absolute;
  inset: 10% 5% 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, rgba(255, 230, 170, 0.55), transparent 65%);
  filter: blur(10px);
  opacity: 0.55;
  transition: background 0.3s, opacity 0.3s;
  pointer-events: none;
}

.actor-shadow {
  position: absolute;
  bottom: 1%;
  left: 50%;
  translate: -50% 0;
  width: 40%;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(30, 20, 10, 0.45), transparent 70%);
  animation: shadow-breathe 3.2s ease-in-out infinite;
  z-index: 1;
}
@keyframes shadow-breathe { 50% { transform: scaleX(0.95); opacity: 0.85; } }

.actor-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; }

.fx {
  position: absolute;
  pointer-events: none;
  font-size: 2rem;
  will-change: transform, opacity;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.18));
}
.fx.float { animation: fx-float 1.6s ease-out forwards; }
@keyframes fx-float {
  0% { transform: translate(0, 0) scale(0.3); opacity: 0; }
  15% { transform: translate(0, -10px) scale(1.15); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), -140px) scale(0.8) rotate(var(--rot, 0deg)); opacity: 0; }
}
.fx.tear { animation: fx-tear 1.1s ease-in forwards; font-size: 1.2rem; }
@keyframes fx-tear {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  20% { opacity: 1; transform: scale(1); }
  100% { transform: translate(var(--dx, 0px), 90px) scale(0.7); opacity: 0; }
}
.fx.zzz { animation: fx-zzz 2.6s ease-out forwards; font-family: var(--display); font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(120, 90, 255, 0.9); }
@keyframes fx-zzz {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(60px, -120px) scale(1.4) rotate(12deg); opacity: 0; }
}
.fx.bubble-soap {
  width: var(--s, 30px);
  height: var(--s, 30px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(180, 230, 255, 0.35) 40%, rgba(255, 180, 240, 0.25) 70%, rgba(255, 255, 255, 0.5));
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.8);
  animation: fx-float 2.2s ease-out forwards;
}

/* Egg specifics — sem filter animado (drop-shadow+transform = rastro/sombra) */
.device[data-phase="egg"] .actor { top: 4%; }
.device[data-phase="egg"] .actor-img,
.device[data-phase="hatching"] .actor-img {
  animation: egg-idle 2.8s ease-in-out infinite;
  filter: none !important;
}
@keyframes egg-idle { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
.actor.rubbing .actor-img { animation: egg-rub 0.18s ease-in-out infinite; }
@keyframes egg-rub { 0%, 100% { transform: rotate(-3deg) scale(1.01); } 50% { transform: rotate(3deg) scale(0.99); } }

/* Ovo escolhido: uma única <img> + véu leitoso (revela sem sombra) */
.egg-peek { display: none !important; }
.actor.egg-peeking .actor-move {
  position: absolute;
  inset: 0;
}
.actor.egg-peeking .actor-move::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 14%;
  bottom: 30%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 248, 255, 0.72), rgba(255, 230, 245, 0.28) 55%, transparent 72%);
  opacity: var(--egg-veil, 0.4);
  transition: opacity 0.55s ease;
}
.device[data-phase="egg"] .actor.chosen-egg.egg-pushing .actor-img,
.device[data-phase="hatching"] .actor.chosen-egg.egg-pushing .actor-img {
  animation: egg-peek-push 0.55s ease-in-out infinite;
}
@keyframes egg-peek-push {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  18% { transform: translate(1.6%, -2.2%) scale(1.03) rotate(2.2deg); }
  40% { transform: translate(-2%, -1%) scale(1.02) rotate(-2.8deg); }
  62% { transform: translate(1.2%, -3.2%) scale(1.05) rotate(1.8deg); }
  82% { transform: translate(-1%, -0.6%) scale(1.01) rotate(-1.2deg); }
}

.actor.crack-shake .actor-img { animation: egg-crack-shake 0.45s ease-in-out; }
@keyframes egg-crack-shake {
  0%, 100% { transform: rotate(0) scale(1); }
  20% { transform: rotate(-6deg) translateX(-2%) scale(1.02); }
  40% { transform: rotate(7deg) translateX(2%); }
  60% { transform: rotate(-5deg) scale(1.04); }
  80% { transform: rotate(4deg); }
}

.actor.hatching .actor-img { animation: egg-hatch-pulse 0.7s ease-in-out infinite; }
@keyframes egg-hatch-pulse {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.06) rotate(2deg); }
}

.actor.hatch-burst .actor-img {
  animation: egg-burst 0.9s ease-out forwards;
}
@keyframes egg-burst {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ---------- Speech bubble ---------- */
.bubble {
  position: absolute;
  top: 6%;
  left: 0;
  z-index: 5;
  max-width: 21%;
  padding: 7px 11px;
  border-radius: 16px;
  background: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(0.78rem, 1.9vh, 0.95rem);
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 10px 30px rgba(80, 20, 90, 0.3);
  animation: bubble-in 0.45s var(--ease-bounce);
}
.bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  translate: 0 -50%;
  border: 9px solid transparent;
  border-left-color: #fff;
  border-right: 0;
}
@keyframes bubble-in { from { scale: 0.4; opacity: 0; } to { scale: 1; opacity: 1; } }

/* ---------- Thermometer ---------- */
.thermo {
  padding: 8px 16px 6px;
  border-radius: 24px;
  color: #fff;
  transition: opacity 0.5s, transform 0.5s;
}
.device[data-phase="pet"] .thermo { display: none; }

.thermo-head { display: flex; justify-content: space-between; font-weight: 900; text-shadow: 0 1px 4px rgba(80, 20, 90, 0.5); margin-bottom: 8px; }
.thermo-head b { font-family: var(--display); font-size: 1.1rem; }

.thermo-track {
  position: relative;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ec8ff 0%, #9be7ff 25%, #ffe680 48%, #ffb347 66%, #ff5a5a 85%, #d9143a 100%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(255, 255, 255, 0.5);
}
.thermo-ideal {
  position: absolute;
  left: 48%;
  width: 18%;
  top: -6px;
  bottom: -6px;
  border-radius: 10px;
  border: 3px solid #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.9), inset 0 0 12px rgba(255, 255, 255, 0.6);
  animation: ideal-pulse 1.6s ease-in-out infinite;
}
.thermo-ideal span { position: absolute; top: -18px; left: 50%; translate: -50% 0; font-size: 0.66rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
@keyframes ideal-pulse { 50% { box-shadow: 0 0 24px #fff, inset 0 0 16px rgba(255, 255, 255, 0.8); } }

.thermo-fill { display: none; }

.thermo-knob {
  position: absolute;
  top: 50%;
  left: 20%;
  width: 34px;
  height: 34px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe9f3 55%, #ffc2dc);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: left 0.1s linear;
}
.thermo-knob::after { content: "🥚"; }

.thermo-progress { margin-top: 10px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.thermo-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #fff6b0, #ffd84d, #ff9de2); box-shadow: 0 0 10px #ffe680; transition: width 0.2s; }

.thermo-hint { margin-top: 6px; text-align: center; font-weight: 800; font-size: 0.85rem; text-shadow: 0 1px 4px rgba(80, 20, 90, 0.5); }

/* ---------- Dock ---------- */
.dock { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }

.btn {
  position: relative;
  appearance: none;
  border: 0;
  cursor: pointer;
  height: clamp(58px, 10.5vh, 100px);
  border-radius: clamp(16px, 2.6vh, 26px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #fff;
  font-family: var(--display);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.7), transparent 45%),
    linear-gradient(160deg, var(--b1), var(--b2));
  box-shadow:
    inset 0 -6px 0 rgba(0, 0, 0, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    0 8px 0 color-mix(in srgb, var(--b2), #000 30%),
    0 14px 24px rgba(60, 20, 80, 0.35);
  transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s, filter 0.3s, opacity 0.3s;
}
.btn:hover:not(:disabled) { transform: translateY(-3px) scale(1.03); }
.btn:active:not(:disabled), .btn.pressed {
  transform: translateY(6px) scale(0.97);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14), inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 2px 0 color-mix(in srgb, var(--b2), #000 30%), 0 4px 10px rgba(60, 20, 80, 0.3);
}
.btn:disabled { filter: grayscale(0.85) brightness(1.05); opacity: 0.45; cursor: default; }
.btn .i { font-size: clamp(1.4rem, 3.6vh, 2.3rem); line-height: 1; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.2)); }
.btn .t { font-size: clamp(0.72rem, 1.8vw, 0.95rem); font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.btn .k {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
}

/* ---------- Growth ---------- */
.growth { color: #fff; text-shadow: 0 1px 4px rgba(60, 20, 80, 0.6); }
.growth-steps { list-style: none; display: flex; justify-content: space-between; font-weight: 900; font-size: 0.78rem; margin-bottom: 4px; padding: 0 2px; }
.growth-steps li { opacity: 0.55; transition: opacity 0.3s, transform 0.3s var(--ease-bounce); }
.growth-steps li.done { opacity: 0.9; }
.growth-steps li.now { opacity: 1; transform: scale(1.2); }
.growth-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.3); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); }
.growth-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffe680, #ff9de2, #b98bff); box-shadow: 0 0 12px rgba(255, 200, 255, 0.8); transition: width 0.5s ease; }
.meta { margin-top: 6px; text-align: center; font-size: 0.7rem; font-weight: 800; opacity: 0.8; }

/* ---------- Wish (what the pet wants) ---------- */
.wish {
  position: absolute;
  top: 6%;
  right: 4%;
  z-index: 6;
  width: clamp(52px, 8vh, 72px);
  height: clamp(44px, 7vh, 62px);
  display: grid;
  place-items: center;
  font-size: clamp(1.5rem, 4vh, 2.1rem);
  background: #fff;
  border-radius: 50% 50% 46% 54% / 60% 60% 44% 44%;
  box-shadow: 0 10px 26px rgba(80, 20, 90, 0.3), inset 0 -4px 0 rgba(120, 80, 160, 0.08);
  animation: wish-float 1.6s ease-in-out infinite;
  cursor: pointer;
}
.wish[hidden], .bubble[hidden] { display: none; }
.wish::before, .wish::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(80, 20, 90, 0.2);
}
.wish::before { width: 20px; height: 20px; bottom: -14px; left: 14px; }
.wish::after { width: 11px; height: 11px; bottom: -28px; left: 2px; }
.wish span { animation: wish-icon 0.9s ease-in-out infinite; }
@keyframes wish-float { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes wish-icon { 50% { transform: scale(1.18); } }

/* ---------- Guide ---------- */
.guide {
  align-self: center;
  margin-bottom: 30px;
  max-width: 96%;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(80, 20, 90, 0.28);
  text-align: center;
  animation: guide-in 0.5s var(--ease-bounce);
}
.guide.urgent { background: #fff3c4; animation: guide-in 0.5s var(--ease-bounce), guide-nudge 1.4s ease-in-out 0.5s infinite; }
@keyframes guide-in { from { scale: 0.6; opacity: 0; } }
@keyframes guide-nudge { 50% { scale: 1.05; } }

.btn.wanted {
  z-index: 3;
  animation: wanted 0.9s ease-in-out infinite;
  outline: 4px solid #fff;
  outline-offset: 3px;
}
.btn.wanted::after {
  content: "👇";
  position: absolute;
  top: -38px;
  left: 50%;
  translate: -50% 0;
  font-size: 1.8rem;
  animation: point 0.7s ease-in-out infinite;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
}
@keyframes wanted {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: inset 0 -6px 0 rgba(0,0,0,.14), inset 0 2px 0 rgba(255,255,255,.6), 0 8px 0 color-mix(in srgb, var(--b2), #000 30%), 0 0 0 0 rgba(255, 255, 255, 0.8); }
  50% { transform: translateY(-4px) scale(1.07); box-shadow: inset 0 -6px 0 rgba(0,0,0,.14), inset 0 2px 0 rgba(255,255,255,.6), 0 8px 0 color-mix(in srgb, var(--b2), #000 30%), 0 0 0 14px rgba(255, 255, 255, 0); }
}
@keyframes point { 50% { transform: translateY(8px); } }

/* ---------- Rub hint hand (egg) ---------- */
.rub-hand {
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 4;
  font-size: 3rem;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  animation: rub-hint 1.1s ease-in-out infinite;
  display: none;
}
.device[data-phase="egg"] .rub-hand { display: block; }
.device[data-phase="egg"] .actor.rubbing ~ .rub-hand { opacity: 0; }
@keyframes rub-hint {
  0%, 100% { transform: translate(-90%, 0) rotate(-15deg); }
  50% { transform: translate(-10%, -10px) rotate(15deg); }
}

/* ---------- Skits (clumsy baby moments) ---------- */
.actor-move.fly { animation: skit-fly 1.6s ease-in-out forwards; }
@keyframes skit-fly {
  0% { transform: translateY(0) scale(1, 1); }
  10% { transform: translateY(2%) scale(1.08, 0.9); }
  25% { transform: translateY(-16%) rotate(-3deg); }
  35% { transform: translateY(-20%) rotate(3deg); }
  45% { transform: translateY(-17%) rotate(-3deg); }
  55% { transform: translateY(-22%) rotate(3deg); }
  65% { transform: translateY(-19%) rotate(-2deg); }
  78% { transform: translateY(-21%) rotate(0deg); }
  100% { transform: translateY(-21%); }
}
.actor-move.drop { animation: skit-drop 0.45s cubic-bezier(0.55, 0, 1, 0.45) forwards; }
@keyframes skit-drop { from { transform: translateY(-21%); } to { transform: translateY(0); } }
.actor-move.splat { animation: skit-splat 0.6s var(--ease-bounce); }
@keyframes skit-splat {
  0% { transform: scale(1.25, 0.7); }
  60% { transform: scale(0.95, 1.06); }
  100% { transform: scale(1, 1); }
}
.actor-move.wobble { animation: skit-wobble 0.35s ease-in-out 4; }
@keyframes skit-wobble {
  0%, 100% { transform: skewX(0) rotate(0); }
  25% { transform: skewX(6deg) rotate(-3deg) translateX(-2%); }
  75% { transform: skewX(-6deg) rotate(3deg) translateX(2%); }
}
.actor-move.tumble { animation: skit-tumble 0.7s ease-in forwards; }
@keyframes skit-tumble {
  0% { transform: rotate(0) translate(0, 0); }
  40% { transform: rotate(-25deg) translate(-4%, -8%); }
  100% { transform: rotate(0deg) translate(0, 0); }
}
.actor-move.rear { animation: skit-rear 1.4s var(--ease-bounce); }
@keyframes skit-rear {
  0% { transform: rotate(0); }
  25% { transform: rotate(-14deg) translateY(-4%); }
  45% { transform: rotate(-10deg) translateY(-6%); }
  70% { transform: rotate(0) translateY(-18%); }
  85% { transform: scale(1.06, 0.92); }
  100% { transform: none; }
}
.actor-move.munch { animation: skit-munch 0.32s ease-in-out 7; }
@keyframes skit-munch { 50% { transform: scale(1.03, 0.96); } }

.projectiles { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.projectile { position: absolute; font-size: 3rem; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3)); }

/* ---------- Flash ---------- */
.flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, #fff, rgba(255, 240, 200, 0.6) 40%, transparent 75%); opacity: 0; pointer-events: none; z-index: 20; }
.flash.go { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* Player welcome: scrolls above the game when the mobile keyboard is open. */
.player-welcome {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at top, #63417d, #1a0f2e);
}
.player-welcome[hidden] { display: none; }
.player-card {
  width: min(100%, 420px);
  padding: 28px;
  border-radius: 28px;
  background: #fff4fa;
  box-shadow: 0 20px 70px #0005;
  display: grid;
  gap: 16px;
}
.player-brand, .player-card h1 { font-family: var(--display); }
.player-brand { color: #89416d; font-size: 1.2rem; }
.player-card h1 { font-size: clamp(1.6rem, 6vw, 2rem); line-height: 1.15; }
.player-card label { font-weight: 900; }
.player-card input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid #bd8aa9;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font: 18px var(--body);
  user-select: text;
  -webkit-user-select: text;
}
.player-card input:focus-visible, .player-card button:focus-visible { outline: 3px solid #7441b8; outline-offset: 3px; }
.player-card .player-privacy { font-size: .85rem; line-height: 1.5; color: #66536c; }
.player-card button { min-height: 52px; border: 0; border-radius: 16px; background: #743b95; color: white; font: 900 18px var(--body); cursor: pointer; }
.player-card .player-error { font-size: .9rem; color: #9d2344; }
.player-error:empty { display: none; }
.player-card .player-consent { display: flex; align-items: flex-start; gap: 10px; font-size: .8rem; line-height: 1.5; font-weight: 400; }
.player-card .player-consent input { width: 22px; height: 22px; min-height: 22px; flex-shrink: 0; margin-top: 2px; }
.pet-naming { margin: auto; padding: 0; border: 0; border-radius: 28px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; color: var(--ink); background: #fff4fa; }
.pet-naming::backdrop { background: #1a0f2ebf; backdrop-filter: blur(5px); }
.pet-naming .player-card { box-shadow: none; }
.pet-naming .player-card .pet-name-suggestion { color: #63327f; background: #eadcf2; }

/* Accessory prototype: one shared animated frame for the sprite and fitted pieces. */
.actor-appearance { position: absolute; inset: 0; transform-origin: 50% 100%; }
.actor.has-accessories .actor-appearance { scale: var(--pet-scale, 1); animation: breathe 3.2s ease-in-out infinite; }
.actor.has-accessories .actor-img { scale: 1 !important; animation: none !important; z-index: 2; }
.wear.wear-art { display: block; height: auto; right: auto; translate: -50% -50%; animation: none; line-height: 0; filter: drop-shadow(0 3px 4px rgba(45, 18, 55, 0.28)); opacity: 1; }
.wear.wear-art img { display: block; width: 100%; height: auto; }
.wear-wings { z-index: 1 !important; transform-origin: 50% 60%; }
.actor.unicorn-flying .actor-appearance {
  animation: unicorn-soar 2.6s ease-in-out infinite !important;
}
.actor.unicorn-flying .wear-wings img {
  animation: pegasus-flap 0.85s ease-in-out infinite;
  transform-origin: 50% 65%;
}
@keyframes unicorn-soar {
  0%, 100% { transform: translateY(-4%) scale(1); }
  50% { transform: translateY(-16%) scale(1.03) rotate(-1.5deg); }
}
@keyframes pegasus-flap {
  0%, 100% { transform: scaleX(1) scaleY(1); }
  50% { transform: scaleX(1.08) scaleY(0.88) translateY(-4%); }
}
.actor.power-beauty .actor-img {
  filter: drop-shadow(0 0 18px rgba(255, 105, 220, 0.85)) drop-shadow(0 12px 18px rgba(60, 15, 75, 0.3)) saturate(1.18) brightness(1.06) !important;
}
.actor.power-lightning .actor-img {
  filter: drop-shadow(0 0 20px rgba(70, 225, 255, 0.92)) drop-shadow(0 0 34px rgba(255, 230, 80, 0.75)) !important;
}
.power-aura {
  position: absolute;
  inset: 6% 8% 4%;
  pointer-events: none;
  z-index: 6;
  border-radius: 50%;
}
.actor.power-lightning .power-aura {
  display: block !important;
  box-shadow: 0 0 28px 6px rgba(80, 230, 255, 0.55), inset 0 0 24px rgba(255, 235, 90, 0.55);
  animation: aura-pulse 0.9s ease-in-out infinite;
}
.actor.power-beauty .power-aura {
  display: block !important;
  box-shadow: 0 0 32px 8px rgba(255, 130, 225, 0.55), inset 0 0 24px rgba(255, 230, 150, 0.45);
  animation: aura-pulse 1.6s ease-in-out infinite;
}
@keyframes aura-pulse {
  0%, 100% { transform: scale(0.96); opacity: 0.75; }
  50% { transform: scale(1.05); opacity: 1; }
}
.wear[hidden] { display: none !important; }
.closet-item .ce img { width: 66px; height: 66px; object-fit: contain; }
.closet-status { margin: 0 0 10px; color: #663378; font-size: .82rem; line-height: 1.4; font-weight: 800; }
/* Side-care dock */
.side-care { top: 14%; gap: 6px; }
.side-btn { width: 60px; min-height: 52px; padding: 4px 2px; }
.side-btn .i { font-size: 1.5rem; }
.side-btn .t { font-size: 0.68rem; }
.side-btn.side-contest {
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 50%), linear-gradient(160deg, #ffe066, #ff6b9d);
}
.side-btn.side-hospital {
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 50%), linear-gradient(160deg, #ff9aa2, #e84362);
}
.side-btn.side-album {
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 50%), linear-gradient(160deg, #a8edea, #5f72bd);
}

/* Tier badges in Closet */
.tier-badge {
  font-size: 0.58rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tier-basic { background: #e3f9e5; color: #1f7a3a; }
.tier-fashion { background: #e0f0ff; color: #1b5dab; }
.tier-grife { background: linear-gradient(135deg, #ffe57f, #ff80ab); color: #5a1238; box-shadow: 0 2px 6px rgba(255, 100, 160, 0.35); }
.closet-item.locked { background: rgba(255, 255, 255, 0.62); border: 1.5px dashed rgba(180, 90, 220, 0.45); }

/* Contest, Hospital & 3D Album Cards */
.hub-banner {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: #5a2a7a;
}
.hub-banner b { font-family: var(--display); font-size: 0.95rem; }
.hub-btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 8px 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(135deg, #ff7eb3, #8a5cff);
  box-shadow: 0 4px 0 rgba(90, 30, 140, 0.28);
  cursor: pointer;
}
.hub-btn:active { transform: translateY(2px); }
.hub-btn.gold { background: linear-gradient(135deg, #ffd32a, #ff7a3d); color: #4a1c00; }
.hub-btn.green { background: linear-gradient(135deg, #55efc4, #00b894); color: #084c3a; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.hub-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  padding: 10px;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  box-shadow: 0 5px 14px rgba(70, 20, 100, 0.12);
  position: relative;
}
.hub-stage-preview {
  position: relative;
  width: 112px;
  height: 118px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 60%, #fff, #f2e6ff);
  overflow: hidden;
}
.hub-stage-preview img.base-pet {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
}
.sticker-3d {
  perspective: 600px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.sticker-3d:hover { transform: rotateY(8deg) rotateX(-6deg) scale(1.03); }
.sticker-3d.rare { outline: 2.5px solid #5bc0ff; }
.sticker-3d.legendary {
  outline: 3px solid #ffd32a;
  background: linear-gradient(155deg, #fffdf0, #ffeaa7 45%, #ffd6e8);
  box-shadow: 0 6px 20px rgba(255, 190, 40, 0.38);
}
.story-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  color: #4a2366;
  font-size: 0.83rem;
  line-height: 1.48;
  box-shadow: 0 6px 18px rgba(60, 20, 90, 0.16);
}
.photo-veranda .actor, .photo-veranda .actor-shadow, .photo-veranda .rub-hand, .photo-veranda .wish { visibility: hidden; }
.photo-veranda .scene-bg { background-image: url("assets/scene/veranda-photo.png") !important; background-position: center; background-size: cover; animation: none; filter: none !important; }
.photo-veranda .scene-tint, .photo-veranda .scene-stars, .photo-veranda .scene-vignette { display: none; }
.veranda-portrait { position: absolute; left: 12%; bottom: -2%; width: 76%; height: 110%; object-fit: contain; object-position: center bottom; pointer-events: none; filter: drop-shadow(0 10px 9px #643b5633); }
.photo-veranda .bubble { z-index: 6; }
.photo-veranda *, .photo-veranda *::before, .photo-veranda *::after { animation: none !important; }

/* ---------- 3D Ground Feeding, Drinking & Full-Body Bath Foam ---------- */
.stage-ground-prop {
  position: absolute;
  left: 50%;
  bottom: 0.5%;
  translate: -50% 0;
  width: clamp(150px, 26vh, 220px);
  height: clamp(112px, 19.5vh, 165px);
  z-index: 7;
  pointer-events: none;
  display: grid;
  place-items: center;
  animation: ground-bowl-pop 0.36s var(--ease-bounce);
}
.stage-ground-prop[hidden] { display: none !important; }
@keyframes ground-bowl-pop {
  from { transform: translateY(18px) scale(0.5); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.ground-bowl-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(35, 12, 50, 0.35));
  transition: transform 0.16s ease;
}
.ground-bowl-img.bowl-chomp {
  animation: bowl-chomp-anim 0.28s var(--ease-bounce);
}
@keyframes bowl-chomp-anim {
  0%, 100% { transform: scale(1, 1); }
  45% { transform: scale(1.09, 0.89) translateY(4px); }
}
.ground-bowl-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

/* Clip pet bottom behind the ground bowl when crouched */
.stage.crouch-at-bowl .actor {
  clip-path: inset(-35% -35% 6.5% -35%);
}

/* Crouch & 4 head-bobbing bites into the ground bowl */
.actor-move.eat-ground-bobs {
  animation: eat-ground-choreo 2.55s ease-in-out forwards;
}
@keyframes eat-ground-choreo {
  0% { transform: translate(0, 0) scale(1, 1) rotate(0deg); }
  12% { transform: translate(var(--crouch-x, 0px), var(--crouch-y, 48px)) scale(1.02, 0.95) rotate(var(--crouch-rot, 4deg)); }
  21% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 18px)) scale(1.05, 0.90) rotate(calc(var(--crouch-rot, 4deg) * 1.4)); }
  30% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) - 2px)) scale(0.98, 1.02) rotate(0deg); }
  41% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 20px)) scale(1.06, 0.89) rotate(calc(var(--crouch-rot, 4deg) * 1.4)); }
  50% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) - 2px)) scale(0.98, 1.02) rotate(0deg); }
  61% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 20px)) scale(1.06, 0.89) rotate(calc(var(--crouch-rot, 4deg) * 1.4)); }
  70% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) - 2px)) scale(0.98, 1.02) rotate(0deg); }
  80% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 22px)) scale(1.07, 0.88) rotate(calc(var(--crouch-rot, 4deg) * 1.5)); }
  90% { transform: translate(0, -8px) scale(1.03, 0.97) rotate(0deg); }
  100% { transform: translate(0, 0) scale(1, 1) rotate(0deg); }
}

/* Crouch & 4 drinking laps in the ground water bowl */
.actor-move.drink-ground-laps {
  animation: drink-ground-choreo 2.35s ease-in-out forwards;
}
@keyframes drink-ground-choreo {
  0% { transform: translate(0, 0) scale(1, 1); }
  13% { transform: translate(var(--crouch-x, 0px), var(--crouch-y, 48px)) scale(1.01, 0.96); }
  23% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 15px)) scale(1.04, 0.92); }
  33% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 2px)) scale(0.99, 1.01); }
  44% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 16px)) scale(1.04, 0.92); }
  54% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 2px)) scale(0.99, 1.01); }
  65% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 16px)) scale(1.04, 0.92); }
  75% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 2px)) scale(0.99, 1.01); }
  85% { transform: translate(var(--crouch-x, 0px), calc(var(--crouch-y, 48px) + 17px)) scale(1.05, 0.91); }
  100% { transform: translate(0, 0) scale(1, 1); }
}

/* Animated pink lapping tongue & water ripples in the water bowl */
.water-ripple-ring {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 56%;
  height: 20%;
  translate: -50% -50%;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(110, 225, 255, 0.9);
  animation: water-ripple-expand 0.52s ease-out forwards;
  pointer-events: none;
}
@keyframes water-ripple-expand {
  0% { transform: scale(0.25); opacity: 0.95; }
  100% { transform: scale(1.18); opacity: 0; }
}
.lapping-tongue {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 22px;
  height: 28px;
  translate: -50% -50%;
  border-radius: 45% 45% 55% 55%;
  background: linear-gradient(180deg, #ff85b3, #ff4d88);
  box-shadow: 0 3px 6px rgba(140, 20, 60, 0.35), inset 0 -3px 4px rgba(255, 255, 255, 0.45);
  animation: tongue-lap-anim 0.42s ease-in-out forwards;
  pointer-events: none;
}
@keyframes tongue-lap-anim {
  0% { transform: translateY(-10px) scaleY(0.3); opacity: 0; }
  45% { transform: translateY(8px) scaleY(1.1); opacity: 1; }
  100% { transform: translateY(-8px) scaleY(0.4); opacity: 0; }
}

/* Full-body 3D bath soap foam layer inside .actor-appearance */
.bath-foam-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}
.bath-foam-layer[hidden] { display: none !important; }
.bath-foam-suit,
.bath-foam-crown {
  position: absolute;
  translate: -50% -50%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(90, 140, 195, 0.32));
}
.bath-foam-layer.foam-building .bath-foam-suit,
.bath-foam-layer.foam-building .bath-foam-crown {
  animation: foam-swell 1.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes foam-swell {
  0% { transform: scale(0.18); opacity: 0; }
  35% { transform: scale(0.68); opacity: 0.92; }
  70% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.bath-foam-layer.foam-rinsing .bath-foam-suit,
.bath-foam-layer.foam-rinsing .bath-foam-crown {
  animation: foam-rinse-melt 1.25s ease-in forwards;
}
@keyframes foam-rinse-melt {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  65% { transform: translateY(28px) scale(0.92, 0.72); opacity: 0.55; }
  100% { transform: translateY(58px) scale(0.75, 0.35); opacity: 0; }
}

/* Stage Care Overlay (3D Sponge, 3D Showerhead & Water Streams, Petting Hand) */
.stage-care-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
}
.stage-care-overlay[hidden] { display: none !important; }
.care-sponge-prop {
  position: absolute;
  left: 50%;
  top: 56%;
  width: clamp(76px, 13vh, 108px);
  height: auto;
  translate: -50% -50%;
  filter: drop-shadow(0 8px 14px rgba(40, 20, 60, 0.32));
  animation: sponge-scrub-motion 1.55s ease-in-out forwards;
}
@keyframes sponge-scrub-motion {
  0% { transform: translate(-75px, -30px) rotate(-15deg) scale(0.5); opacity: 0; }
  15% { transform: translate(-55px, -10px) rotate(-12deg) scale(1); opacity: 1; }
  38% { transform: translate(60px, 15px) rotate(14deg) scale(1.05); opacity: 1; }
  62% { transform: translate(-58px, 28px) rotate(-14deg) scale(1.05); opacity: 1; }
  85% { transform: translate(52px, -18px) rotate(12deg) scale(1); opacity: 1; }
  100% { transform: translate(75px, -35px) rotate(18deg) scale(0.5); opacity: 0; }
}
.care-shower-prop {
  position: absolute;
  left: 58%;
  top: 6%;
  width: clamp(96px, 16vh, 138px);
  height: auto;
  translate: -50% 0;
  filter: drop-shadow(0 8px 14px rgba(40, 20, 60, 0.32));
  animation: shower-enter 1.3s ease-in-out forwards;
}
@keyframes shower-enter {
  0% { transform: translate(40px, -30px) rotate(12deg); opacity: 0; }
  18% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  82% { transform: translate(-12px, 4px) rotate(-4deg); opacity: 1; }
  100% { transform: translate(30px, -25px) rotate(10deg); opacity: 0; }
}
.shower-stream-line {
  position: absolute;
  top: 18%;
  width: 4px;
  height: 58%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(160, 235, 255, 0.92), rgba(255, 255, 255, 0.85) 50%, rgba(120, 215, 255, 0));
  box-shadow: 0 0 8px rgba(140, 230, 255, 0.75);
  transform-origin: top center;
  animation: shower-spray-fall 0.38s linear infinite;
}
@keyframes shower-spray-fall {
  0% { transform: translateY(-8%) scaleY(0.85); opacity: 0.95; }
  50% { transform: translateY(6%) scaleY(1.08); opacity: 0.75; }
  100% { transform: translateY(16%) scaleY(0.9); opacity: 0.3; }
}
.actor-move.bath-shake {
  animation: bath-shake-dry 0.58s ease-in-out;
}
@keyframes bath-shake-dry {
  0%, 100% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(-9deg) translateX(-8px) scale(1.03); }
  30% { transform: rotate(9deg) translateX(8px) scale(1.03); }
  45% { transform: rotate(-8deg) translateX(-7px) scale(1.04); }
  60% { transform: rotate(8deg) translateX(7px) scale(1.04); }
  75% { transform: rotate(-5deg) translateX(-4px) scale(1.02); }
  90% { transform: rotate(5deg) translateX(4px) scale(1.01); }
}
.care-pet-hand {
  position: absolute;
  font-size: clamp(2.5rem, 6vh, 3.6rem);
  translate: -50% -50%;
  filter: drop-shadow(0 6px 10px rgba(40, 10, 60, 0.32));
  animation: pet-hand-stroke 1.25s ease-in-out forwards;
}
@keyframes pet-hand-stroke {
  0% { transform: translate(-36px, -10px) rotate(-18deg) scale(0.7); opacity: 0; }
  20% { transform: translate(-24px, 0px) rotate(-12deg) scale(1); opacity: 1; }
  50% { transform: translate(26px, 6px) rotate(14deg) scale(1.06); opacity: 1; }
  80% { transform: translate(-22px, 2px) rotate(-10deg) scale(1); opacity: 1; }
  100% { transform: translate(20px, -12px) rotate(12deg) scale(0.7); opacity: 0; }
}
.actor-move.pet-nuzzle {
  animation: pet-nuzzle-anim 1.2s ease-in-out;
}
@keyframes pet-nuzzle-anim {
  0%, 100% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(-4deg) scale(1.03, 0.97) translateY(3px); }
  65% { transform: rotate(4deg) scale(1.03, 0.97) translateY(3px); }
}

