/* ============================================================
   Cat, speech bubble, particles & toys
   ============================================================ */
.cat-wrapper {
  position: relative;
  /* painted by depth: rig.js writes 10 (back wall) … 30 (front) every frame (room/stage.js zAt) */
  z-index: 24;
  width: var(--cat-w);
  aspect-ratio: 440 / 410;
  transform-origin: 50% 90%;
  will-change: transform;
  transition: opacity .2s ease;
  /* only what is drawn of the cat takes a touch: the empty corners of its box let the room through */
  pointer-events: none;
}
.cat-wrapper.is-in-box { opacity: 0; }
.cat-wrapper.is-in-box #rig-root { pointer-events: none; }
#cow-cat-svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 9px rgba(60, 30, 20, .18)); }
#rig-root { pointer-events: visiblePainted; }
.cat-wrapper .thought-bubble, .cat-wrapper .egg-stage { pointer-events: auto; }
.hitbox { fill: transparent; cursor: pointer; }

@keyframes spinDizzy { to { transform: rotate(360deg); } }
.dizzy-left { transform-origin: 174px 168px; animation: spinDizzy .75s linear infinite; }
.dizzy-spin { transform-origin: 0 0; animation: spinDizzy .75s linear infinite; }
.dizzy-spin.rev { animation-direction: reverse; }
/* sad eyes: a tear wells up, rolls down and fades, then again */
.sad-tear { transform-box: fill-box; transform-origin: 50% 0; animation: sadTear 2.6s ease-in infinite; }
@keyframes sadTear {
  0% { transform: translateY(-4px) scale(.3); opacity: 0; }
  25% { transform: translateY(0) scale(1); opacity: 1; }
  80% { transform: translateY(22px) scale(.9); opacity: .9; }
  100% { transform: translateY(30px) scale(.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .sad-tear { animation: none; } }
.dizzy-right { transform-origin: 266px 168px; animation: spinDizzy .75s linear infinite reverse; }
@keyframes starPulse { 0%, 100% { transform: scale(.92) rotate(-6deg); } 50% { transform: scale(1.15) rotate(6deg); } }
.star-eye-anim { transform-box: fill-box; transform-origin: center; animation: starPulse .45s ease-in-out infinite; }

.foam-bubble { fill: rgba(255, 255, 255, .9); stroke: #bae6fd; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: foamIn .25s var(--ease-spring); }
.foam-bubble.is-popping { animation: foamOut .25s ease-in forwards; }
@keyframes foamIn { from { transform: scale(.2); } }
@keyframes foamOut { to { transform: scale(1.4); opacity: 0; } }

/* ---------------- speech bubble ---------------- */
.speech-bubble {
  position: relative;
  z-index: 40;
  /* the camera scales the room, not the words */
  scale: calc(1 / var(--cam, 1));
  transform-origin: 50% 100%;
  max-width: min(86vw, 420px);
  min-height: 34px;
  margin-bottom: 4px;
  padding: 7px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--sh-1), 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: opacity .2s, transform .25s var(--ease-spring);
  pointer-events: none;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}
.speech-bubble.is-visible { opacity: 1; transform: none; }
.speech-bubble.is-pop { animation: bubblePop .3s var(--ease-spring); }
@keyframes bubblePop { from { transform: scale(.9); } }

/* ---------------- toe beans high-five ---------------- */
.toe-beans {
  /* the camera scales the room, not the pop-up */
  scale: calc(1 / var(--cam, 1));
  position: absolute;
  left: 50%;
  top: 20%;
  width: 48%;
  z-index: 6;
  pointer-events: none;
  transform: translate(-50%, -20%) scale(0);
  opacity: 0;
  transition: transform .25s var(--ease-spring), opacity .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.toe-beans svg { width: 100%; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .25)); }
.toe-beans.is-shown { transform: translate(-50%, -20%) scale(1.05); opacity: 1; }
.toe-beans-text {
  margin-top: -10px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--rose);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 900;
  white-space: nowrap;
  border: 2px solid #fff;
}

/* ---------------- overlays ---------------- */
.particle-layer, .toy-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle-layer { z-index: 30; }
.knock-item { transform: translate(-50%, -50%); }
.toy-layer { z-index: 31; }
.particle {
  position: absolute;
  font-size: 22px;
  line-height: 1;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  pointer-events: none;
}

.food-item, .critter {
  position: absolute;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 42px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .2));
}
.food-item.is-bobbing { animation: foodBob 1.4s ease-in-out infinite; }
/* the first feeds: a finger shows the way to the mouth */
.drag-hint { position: absolute; z-index: 30; font-size: 30px; transform: translate(-30%, 0); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
/* 猫条: held out by its crimped end; press to squeeze */
.treat-tube {
  position: absolute;
  transform: translate(-50%, 0) rotate(-30deg);
  transform-origin: 50% 12%;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .22));
}
.treat-tube svg { display: block; overflow: visible; transition: transform .12s ease-out; transform-origin: 50% 20%; }
.treat-tube.is-squeezing svg { transform: scaleX(.86); }
.treat-tube .treat-body { transform-box: fill-box; transform-origin: 50% 0; transition: transform .2s linear; }
.treat-hand { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%) rotate(20deg); font-size: 30px; pointer-events: none; }
.catnip-leaf { position: absolute; font-size: 20px; pointer-events: none; filter: saturate(.75); }
@keyframes foodBob { 50% { margin-top: -6px; } }
.critter { font-size: 34px; cursor: pointer; }

/* lawn games (lawn.js): frisbee, bubbles, dig mounds, the leaf pile */
.lawn-disc, .lawn-disc-shadow, .lawn-bubble, .lawn-mound, .lawn-leaf { position: absolute; pointer-events: none; transform: translate(-50%, -50%); }
.lawn-disc { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .2)); }
.lawn-disc-shadow { width: 38px; height: 12px; border-radius: 50%; background: rgba(21, 128, 61, .55); filter: blur(2px); }
.lawn-bubble {
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0 12%, rgba(255, 255, 255, .15) 22%, rgba(186, 230, 253, .18) 60%, rgba(244, 114, 182, .35) 100%);
  box-shadow: inset 0 0 6px rgba(255, 255, 255, .7), 0 0 0 1px rgba(255, 255, 255, .5);
  transition: transform .25s ease-out, opacity .25s ease-out;
}
.lawn-bubble.is-popping { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
.lawn-mound { width: 58px; height: 30px; z-index: 2; }   /* in the scene layer, behind the cat */
.lawn-mound-dirt { position: absolute; inset: 0; border-radius: 50% 50% 40% 40% / 70% 70% 30% 30%; background: radial-gradient(ellipse at 50% 30%, #a16207, #713f12); box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.lawn-mound-glint { position: absolute; right: -4px; top: -14px; font-size: 16px; animation: moundGlint 1.8s ease-in-out infinite; }
.lawn-mound.is-dug { transition: opacity 1.4s ease-in .2s, transform .3s; opacity: 0; transform: translate(-50%, -50%) scale(1.2, .5); }
.lawn-mound.is-dug .lawn-mound-glint { display: none; }
@keyframes moundGlint { 50% { opacity: .2; transform: scale(.7); } }
.lawn-leaf { font-size: 22px; line-height: 1; rotate: var(--r, 0deg); transition: left .35s ease-out, top .35s ease-out, rotate .35s; }
.lawn-leaf.is-swept { rotate: 0deg; }
.lawn-leaf.is-burst { transition: left .6s cubic-bezier(.2, .8, .3, 1), top .6s cubic-bezier(.2, .8, .3, 1), rotate .6s; }
@media (prefers-reduced-motion: reduce) { .lawn-mound-glint { animation: none; } }

.laser-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 14px 5px rgba(239, 68, 68, .85);
}
.feather-wand { position: absolute; width: 60px; height: 60px; margin: -30px 0 0 -30px; display: grid; place-items: center; }
.wand-stick { position: absolute; bottom: 30px; left: 29px; width: 2px; height: 80px; background: rgba(146, 64, 14, .6); transform-origin: bottom; transform: rotate(18deg); }
.wand-feather { font-size: 34px; animation: wandSwing 1s ease-in-out infinite; }
@keyframes wandSwing { 50% { transform: rotate(16deg) translateY(-4px); } }
.bath-cursor { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: grid; place-items: center; font-size: 38px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
.yarn-ball { position: absolute; width: 56px; height: 56px; pointer-events: auto; touch-action: none; cursor: grab; transform: translate(-50%, -50%); }
.yarn-ball svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }

/* partner's finger */
.ghost-finger {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 32;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s, transform .16s linear;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -16px 0 0 -16px;
}
.ghost-finger.is-on { opacity: .85; }
.ghost-finger.has-tool .ghost-dot { font-size: 22px; background: rgba(224, 242, 254, .75); box-shadow: 0 0 0 6px rgba(56, 189, 248, .25); animation: none; }
.ghost-finger.is-holding .ghost-dot { transform: scale(1.25); box-shadow: 0 0 0 10px rgba(251, 113, 133, .35); }
.ghost-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 228, 230, .7);
  box-shadow: 0 0 0 6px rgba(251, 113, 133, .25);
  animation: heartBeat 1s ease-in-out infinite;
}
.ghost-name {
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(244, 63, 94, .85);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.camera-flash { position: fixed; inset: 0; background: #fff; z-index: 60; pointer-events: none; }

/* ---------------- thought bubble ---------------- */
.thought-bubble {
  scale: calc(1 / var(--cam, 1));
  transform-origin: 0 100%;
  position: absolute;
  top: -4%;
  right: 2%;
  z-index: 7;
  width: 54px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh-2), 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.4) translateY(10px);
  transition: opacity .2s, transform .3s var(--ease-spring);
}
.thought-bubble.is-in { opacity: 1; transform: none; animation: thoughtFloat 2.4s ease-in-out .3s infinite; }
.thought-icon { font-size: 24px; line-height: 1; }
.thought-bubble[data-label]:not([data-label=""])::after {
  content: attr(data-label);
  position: absolute;
  bottom: -6px;
  right: -8px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--rose);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.thought-dots i {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh-1);
}
.thought-dots i:nth-child(1) { width: 12px; height: 12px; left: -4px; bottom: -6px; }
.thought-dots i:nth-child(2) { width: 7px; height: 7px; left: -14px; bottom: -16px; }
@keyframes thoughtFloat { 50% { transform: translateY(-5px); } }

/* ---------------- autonomous activity props ---------------- */
.pawprint { position: absolute; font-size: 18px; transform: translate(-50%, -50%); pointer-events: none; filter: saturate(.6) opacity(.85); }
.floor-letter {
  position: absolute;
  bottom: 6%;
  z-index: 4;
  font-size: 34px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2));
  animation: letterDrop .6s var(--ease-spring);
}
.floor-letter.is-left { left: 12%; }
.floor-letter.is-right { right: 12%; }
@keyframes letterDrop { from { transform: translateY(-120px) rotate(-30deg); opacity: 0; } }

.window-bird {
  position: absolute;
  top: 18%;
  left: -20%;
  font-size: 16px;
  animation: birdFly 3s linear forwards;
  pointer-events: none;
}
@keyframes birdFly {
  0% { transform: translate(0, 0) scaleX(-1); }
  50% { transform: translate(70px, 10px) scaleX(-1); }
  100% { transform: translate(140px, -10px) scaleX(-1); }
}
.prop-window { overflow: hidden; border-radius: 16px; }

.is-wobble { animation: propWobble .45s ease-in-out 2; transform-origin: 50% 100%; }
@keyframes propWobble { 25% { rotate: -6deg; } 75% { rotate: 6deg; } }
.is-hint { animation: propHint 1.2s ease-in-out 2; }
@keyframes propHint { 50% { filter: drop-shadow(0 0 12px #fde047) brightness(1.1); scale: 1.08; } }
.prop-mirror.is-reflecting::after {
  content: "🐱";
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%) scaleX(-1);
  font-size: 22px;
  opacity: .75;
  animation: mirrorCat 1.8s ease-in-out;
}
@keyframes mirrorCat { from { opacity: 0; } }

/* ---------------- the egg (before hatching) ---------------- */
.egg-stage {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 6px; padding-bottom: 6%; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.egg-wrap { position: relative; display: block; width: 46%; aspect-ratio: 4 / 5; }
.egg-shell {
  position: absolute; inset: 0; display: block; overflow: hidden;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #f7f4f9 60%, #e2dceb 100%);
  border: 4px solid #18181b; box-shadow: 0 12px 18px rgba(60, 30, 20, .2);
  transform-origin: 50% 100%; animation: eggIdle 3.2s ease-in-out infinite;
}
.egg-stage.is-warming .egg-shell { animation: eggWobble .5s ease-in-out; }
.egg-stage.is-nudged .egg-shell { animation: eggNudge .35s ease-in-out; }
.egg-spot { position: absolute; background: #232329; border-radius: 50% 40% 55% 45%; }
.egg-spot.s1 { width: 36%; height: 28%; left: -6%; top: 12%; }
.egg-spot.s2 { width: 30%; height: 34%; right: -4%; top: 38%; }
.egg-spot.s3 { width: 26%; height: 20%; left: 18%; bottom: 8%; }
/* cracks: one more for every quarter of the way (both of them together) */
.egg-cracks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.egg-cracks .ck { fill: none; stroke: #18181b; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s ease-out; }
.egg-stage[data-crack="1"] .ck1, .egg-stage[data-crack="2"] .ck1, .egg-stage[data-crack="3"] .ck1,
.egg-stage[data-crack="2"] .ck2, .egg-stage[data-crack="3"] .ck2,
.egg-stage[data-crack="3"] .ck3 { stroke-dashoffset: 0; }
.egg-stage[data-crack="3"] .egg-shell { animation: eggIdle 1.4s ease-in-out infinite; }
/* the cool-down ring: full = ready to warm again */
.egg-ring { position: absolute; inset: -9% -11%; width: 122%; height: 118%; overflow: visible; pointer-events: none; }
.egg-ring ellipse { fill: none; stroke-width: 3.2; }
.egg-ring-bg { stroke: rgba(255, 255, 255, .55); }
.egg-ring-fg { stroke: #fb7185; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; opacity: 0; transition: opacity .3s;
  transform: rotate(-90deg); transform-origin: 50% 50%; transform-box: fill-box; }
.egg-ring-fg.is-cooling { opacity: 1; }
/* hatching: shake harder and harder, flash, the two halves fly off */
.egg-half { position: absolute; inset: 0; opacity: 0; pointer-events: none;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; border: 4px solid #18181b;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #f7f4f9 60%, #e2dceb 100%); }
.egg-half-top { clip-path: polygon(0 0, 100% 0, 100% 52%, 84% 46%, 72% 54%, 60% 45%, 48% 54%, 36% 45%, 24% 54%, 12% 46%, 0 53%); }
.egg-half-bottom { clip-path: polygon(0 53%, 12% 46%, 24% 54%, 36% 45%, 48% 54%, 60% 45%, 72% 54%, 84% 46%, 100% 52%, 100% 100%, 0 100%); }
.egg-flash { position: absolute; inset: -40%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #fff 0%, rgba(255, 247, 214, .9) 35%, rgba(255, 255, 255, 0) 70%); }
.egg-stage.is-hatching .egg-ring, .egg-stage.is-hatching .egg-prog { opacity: 0; }
.egg-stage.is-hatching .egg-shell { animation: eggShake 1.45s ease-in infinite; }
.egg-stage.is-bursting .egg-shell { opacity: 0; animation: none; }
.egg-stage.is-bursting .egg-half { opacity: 1; }
.egg-stage.is-bursting .egg-half-top { animation: eggTopOff .8s cubic-bezier(.2, .7, .3, 1) forwards; }
.egg-stage.is-bursting .egg-half-bottom { animation: eggBottomOff .8s ease-in forwards; }
.egg-stage.is-bursting .egg-flash { animation: eggFlash .7s ease-out forwards; }
.egg-stage.is-bursting .egg-hint { opacity: 0; transition: opacity .3s; }
@keyframes eggShake {
  0% { transform: rotate(0); } 10% { transform: rotate(-4deg); } 20% { transform: rotate(4deg); }
  35% { transform: rotate(-7deg) translateY(-2%); } 50% { transform: rotate(7deg); } 65% { transform: rotate(-10deg) translateY(-4%); }
  80% { transform: rotate(11deg) scale(1.04); } 90% { transform: rotate(-12deg) scale(1.06); } 100% { transform: rotate(0) scale(1.08); }
}
@keyframes eggTopOff { to { transform: translate(-38%, -120%) rotate(-48deg); opacity: 0; } }
@keyframes eggBottomOff { 40% { transform: translateY(4%) scaleY(.92); opacity: 1; } to { transform: translateY(18%) scaleY(.6); opacity: 0; } }
@keyframes eggFlash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes eggNudge { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(-3deg); } 70% { transform: rotate(2deg); } }
.egg-hint, .egg-prog { padding: 2px 10px; border-radius: 99px; background: rgba(255, 255, 255, .85); font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.egg-prog { font-size: 12px; color: var(--ink-3, #78716c); transition: opacity .3s; }
.egg-prog.is-note { color: var(--ink-2); background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
@keyframes eggIdle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes eggWobble { 0% { transform: rotate(0) scale(1); } 25% { transform: rotate(-9deg) scale(1.05); } 60% { transform: rotate(7deg) scale(1.03); } 100% { transform: rotate(0) scale(1); } }

/* ---------------- the lawn's toys are as big as the room makes the cat (interactions/field.js sets --play-k) ---------------- */
.lawn-disc, .lawn-disc-shadow, .lawn-mound, .lawn-leaf, .lawn-ball, .lawn-fall, .critter, .laser-dot, .feather-wand, .yarn-ball { scale: var(--play-k, 1); }
.lawn-ball, .lawn-fall { position: absolute; pointer-events: none; transform: translate(-50%, -50%); line-height: 1; }
.lawn-ball { font-size: 34px; filter: drop-shadow(0 0 3px rgba(255, 255, 255, .95)) drop-shadow(0 3px 3px rgba(0, 0, 0, .2)); }
.lawn-fall { font-size: 28px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .18)); }
.lawn-fall.is-landed { transition: opacity .6s ease-in, transform .25s; opacity: 0; transform: translate(-50%, -50%) scale(1.2, .5); }

/* ---------------- one cat, the whole house (cat/roam.js) ---------------- */
/* in another room: nothing of it here; what it calls back from there has no tail pointing at a cat */
.is-cat-out #cat-stage-wrapper, .is-cat-out #thought-bubble { visibility: hidden; }
.is-cat-out .speech-bubble::after { display: none; }
.is-cat-out .speech-bubble.is-visible { opacity: .94; }

/* where it is, what it's up to: a tap goes there, "叫它" calls it here */
.cat-where {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: fit-content;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(92%, 360px);
  padding: 5px 6px 5px 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--sh-1);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 800;
  cursor: pointer;
  animation: catWhereIn .35s var(--ease-spring);
}
.cat-where.is-hidden { display: none; }
.cat-where-icon { font-size: 14px; }
.cat-where-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-where-call {
  flex: none;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 18%, #fff);
  color: color-mix(in srgb, var(--accent) 70%, #1f2937);
}
.cat-where-call.is-hidden { display: none; }
.cat-where.is-nudge { animation: catWhereNudge .5s var(--ease-out); }
@keyframes catWhereIn { from { opacity: 0; translate: 0 -8px; } }
@keyframes catWhereNudge { 30% { scale: 1.08; } 60% { scale: .97; } }
/* a timer up there (a workout, a pomodoro): the pill goes to the bottom of the stage */
#stage-area:has(.workout-hud:not(.is-mini)) .cat-where { top: auto; bottom: 10px; }
.is-night .cat-where { background: rgba(30, 27, 75, .82); color: #e0e7ff; }

/* the room it is in, on the dock */
.dock-cat { position: absolute; top: 1px; right: 10%; font-size: 11px; line-height: 1; }
.dock-cat.is-hidden { display: none; }
.dock-picker-item .dock-cat { position: static; margin-left: 2px; }

/* what goes through its head, not what it says: a thought (lines.js think()) */
.speech-bubble.is-os {
  background: rgba(246, 243, 255, .96);
  box-shadow: var(--sh-1), 0 0 0 2px rgba(167, 139, 250, .35);
  color: #5b4b8a;
  font-weight: 600;
  border-radius: 22px;
}
.speech-bubble.is-os::before { content: "💭 "; }
.speech-bubble.is-os::after {
  bottom: -9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 5px 9px 0 -2px rgba(246, 243, 255, .96);
}
