/* ─────────────────────────────────────────────
   Pawculate — global tokens & animations
   ───────────────────────────────────────────── */

:root {
  /* Surface */
  --cream:       #FFF4E0;
  --cream-deep: #FBE6C5;
  --paper:       #FFFBF2;
  --bg-page:    #2B1B3D;          /* outside the phone frame */

  /* Brand colors — bold & punchy */
  --tangerine:  #FF7A3D;
  --tangerine-dk:#E55A20;
  --coral:      #FF5A6D;
  --coral-dk:   #D63A52;
  --yellow:     #FFC83D;
  --yellow-dk:  #E0A510;
  --lime:       #58D26A;
  --lime-dk:    #2FA947;
  --teal:       #28BFC2;
  --plum:       #2B1B3D;
  --plum-mid:   #5A4A6F;
  --plum-soft:  #8C7BA8;

  /* Tile semantics */
  --tile-fixed-bg:   #FFE4B5;
  --tile-fixed-edge: #F0BF6F;
  --tile-fixed-ink:  #2B1B3D;

  --tile-empty-bg:   #FFF7E5;
  --tile-empty-edge: #E8CFA0;

  --tile-correct-bg:   #C7F2C6;
  --tile-correct-edge: #5BC55E;
  --tile-correct-ink:  #1F6A28;

  --tile-wrong-bg:   #FFD2D8;
  --tile-wrong-edge: #FF5A6D;
  --tile-wrong-ink:  #B1213A;

  --tray-tile-bg:   #FFD24A;
  --tray-tile-edge: #E0A510;
  --tray-tile-ink:  #2B1B3D;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse at 20% 10%, #3a2752 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, #4a2a52 0%, transparent 50%),
    var(--bg-page);
  color: var(--plum);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
}

#root {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fredoka { font-family: 'Fredoka', system-ui, sans-serif; font-weight: 600; }
.fredoka-bold { font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700; }

/* Hide native scrollbar in phone screen */
.scr::-webkit-scrollbar { display: none; }
.scr { scrollbar-width: none; }

/* ─── Animations ─── */
@keyframes pop {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes pop-soft {
  0%   { transform: scale(.85); }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-5px); }
  40%,80% { transform: translateX(5px); }
}
@keyframes wiggle {
  0%,100% { transform: rotate(0deg); }
  25%     { transform: rotate(-4deg); }
  75%     { transform: rotate(4deg); }
}
@keyframes float-y {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255,200,61,0.6); }
  70%  { box-shadow: 0 0 0 14px rgba(255,200,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,200,61,0); }
}
@keyframes confetti-fall {
  0%   { transform: translate3d(0,-20px,0) rotate(0deg); opacity: 1; }
  100% { transform: translate3d(var(--cdx,0),120vh,0) rotate(720deg); opacity: 1; }
}
@keyframes slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes slide-down {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes star-burst {
  0%   { transform: scale(0) rotate(0deg); }
  60%  { transform: scale(1.3) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

/* ── Live home pet animations: smooth combined breathing + sway ── */
@keyframes pet-alive {
  0%   { transform: translateY(0)    rotate(0deg)  scale(1); }
  25%  { transform: translateY(-7px) rotate(-1.5deg) scale(1.015); }
  50%  { transform: translateY(0)    rotate(0deg)  scale(1); }
  75%  { transform: translateY(-3px) rotate(1.5deg)  scale(1.01); }
  100% { transform: translateY(0)    rotate(0deg)  scale(1); }
}
@keyframes pet-shadow {
  0%, 50%, 100% { transform: translateX(-50%) scale(1);    opacity: 0.75; }
  25%           { transform: translateX(-50%) scale(0.82); opacity: 0.5; }
  75%           { transform: translateX(-50%) scale(0.9);  opacity: 0.6; }
}

/* drag ghost */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(1.1);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.25));
}

/* prevent native touch interfering with our drag */
.cell, .tile {
  touch-action: none;
}
