/* ─── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --text: #888;
}

body {
  background: #ffffff;
  min-height: 100vh;
  overflow: hidden;
  font-family: 'Courier New', monospace;
}

/* ─── Utility ──────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Scene ────────────────────────────────────────────────────── */
#scene {
  position: fixed;
  bottom: 48px;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

/* ─── Cat canvas ───────────────────────────────────────────────── */
#cat-canvas {
  position: absolute;
  bottom: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transition: left 0.6s ease;
  pointer-events: auto;
}

#cat-canvas.size-s  { width: 128px;  height: 128px;  }
#cat-canvas.size-m  { width: 256px;  height: 256px;  }
#cat-canvas.size-l  { width: 400px;  height: 400px;  }
#cat-canvas.size-xl { width: 560px;  height: 560px;  }

/* ─── Zzz label ────────────────────────────────────────────────── */
.zzz {
  position: absolute;
  pointer-events: none;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  transition: opacity 1.2s ease;
}
.zzz.hidden { opacity: 0; }

.zzz span {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  color: #aaa;
  opacity: 0;
  animation: z-rise 2.6s ease-in-out infinite;
}
.zzz span:nth-child(1) { font-size: 11px; animation-delay: 0s;    }
.zzz span:nth-child(2) { font-size: 15px; animation-delay: 0.75s; }
.zzz span:nth-child(3) { font-size: 20px; animation-delay: 1.5s;  }

@keyframes z-rise {
  0%   { opacity: 0;   transform: translateY(0);     }
  20%  { opacity: 0.8;                               }
  80%  { opacity: 0.3;                               }
  100% { opacity: 0;   transform: translateY(-18px); }
}

/* ─── Radiator ─────────────────────────────────────────────────── */
#radiator {
  position: fixed;
  bottom: 0;
  left: 28px;
  width: 140px;
  height: 180px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ─── Controls — bare icons, no container box ──────────────────── */
#controls {
  position: fixed;
  bottom: 12px;
  right: 14px;
  display: flex;
  gap: 1px;
  z-index: 10;
}

#controls button {
  background: none;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 26px;
  padding: 4px;
  border-radius: 5px;
  color: var(--text);
  opacity: 0.4;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: bold;
  line-height: 1;
}
#controls button:hover  { opacity: 0.9; }
#controls button.active { opacity: 0.9; }
#controls button svg    { width: 14px; height: 14px; display: block; }

/* ─── Dev bar ──────────────────────────────────────────────────── */
#dev-bar {
  position: fixed;
  top: 10px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 18, 28, 0.88);
  border: 1px solid rgba(100, 110, 160, 0.3);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #8090a8;
  z-index: 200;
  backdrop-filter: blur(4px);
}
#dev-bar .dev-label { opacity: 0.45; }
#dev-bar #dev-state { color: #72d9a8; font-weight: bold; min-width: 72px; }
#dev-bar button {
  background: rgba(70, 75, 120, 0.45);
  border: 1px solid rgba(110, 115, 170, 0.3);
  border-radius: 4px;
  color: #9aaabf;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  cursor: pointer;
  padding: 2px 7px;
  line-height: 1.6;
}
#dev-bar button:hover { background: rgba(90, 95, 150, 0.7); color: #fff; }

/* ─── Heart balloons ───────────────────────────────────────────── */
.heart-balloon {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  animation: heart-float var(--heart-dur, 3s) ease-out forwards;
  transform-origin: center bottom;
  user-select: none;
}

@keyframes heart-float {
  0%   { opacity: 0.95; transform: translateY(0)      translateX(0)                    scale(1);    }
  25%  { opacity: 1;    transform: translateY(-65px)  translateX(var(--sway))          scale(1.05); }
  55%  { opacity: 0.75; transform: translateY(-150px) translateX(calc(var(--sway)*-0.6)) scale(0.9); }
  80%  { opacity: 0.35; transform: translateY(-220px) translateX(var(--sway))          scale(0.8);  }
  100% { opacity: 0;    transform: translateY(-300px) translateX(calc(var(--sway)*0.3)) scale(0.6); }
}
