@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');

/*
 * Theme overrides for configurable atmospheres.
 * We piggyback on existing Tailwind utility classes and adjust their
 * palette per-atmosphere. Clean is effectively the default Tailwind palette
 * so it only needs minimal tweaks. The other atmospheres override the
 * utilities the UI relies on for colors so pages inherit the new mood
 * without template changes.
 */

body[data-atmosphere="clean"] {
  background-color: #f7fafc;
  color: #2d3748;
}

body[data-atmosphere="clean"] nav {
  background-color: #ffffff;
}

/* ─── Kitty Kat (Hello Kitty inspired) ─────────────────────────────────── */
body[data-atmosphere="kitty_kat"] {
  background-color: #ffe8f2;
  color: #7b376b;
}

body[data-atmosphere="kitty_kat"] nav {
  background-color: #ffe0f0 !important;
  color: #7b376b;
  box-shadow: 0 10px 30px rgba(255, 153, 204, 0.25);
}

body[data-atmosphere="kitty_kat"] .bg-white {
  background-color: #fff9fd !important;
}

body[data-atmosphere="kitty_kat"] .bg-gray-50 {
  background-color: #fff0f7 !important;
}

body[data-atmosphere="kitty_kat"] .bg-gray-100 {
  background-color: #ffe8f2 !important;
}

body[data-atmosphere="kitty_kat"] .bg-gray-200 {
  background-color: #ffd1e8 !important;
}

body[data-atmosphere="kitty_kat"] .bg-gray-300 {
  background-color: #ffb9dd !important;
}

body[data-atmosphere="kitty_kat"] .hover\:bg-gray-300:hover {
  background-color: #ffb9dd !important;
}

body[data-atmosphere="kitty_kat"] .text-gray-800,
body[data-atmosphere="kitty_kat"] .text-gray-700 {
  color: #7b376b !important;
}

body[data-atmosphere="kitty_kat"] .text-gray-600 {
  color: #a54e8a !important;
}

body[data-atmosphere="kitty_kat"] .text-gray-500 {
  color: #c779a6 !important;
}

body[data-atmosphere="kitty_kat"] .border-gray-200 {
  border-color: #f9b9d5 !important;
}

body[data-atmosphere="kitty_kat"] .bg-blue-500,
body[data-atmosphere="kitty_kat"] .hover\:bg-blue-500:hover {
  background-color: #ff69b4 !important;
}

body[data-atmosphere="kitty_kat"] .hover\:bg-blue-600:hover {
  background-color: #ff4da6 !important;
}

body[data-atmosphere="kitty_kat"] .focus\:ring-blue-400:focus {
  --tw-ring-color: rgba(255, 105, 180, 0.35) !important;
}

body[data-atmosphere="kitty_kat"] .text-blue-600 {
  color: #ff4da6 !important;
}

body[data-atmosphere="kitty_kat"] .text-blue-700 {
  color: #d23694 !important;
}

body[data-atmosphere="kitty_kat"] .bg-blue-100 {
  background-color: #ffe5f2 !important;
}

body[data-atmosphere="kitty_kat"] .dashboard-link {
  color: #a6458d !important;
}

body[data-atmosphere="kitty_kat"] .dashboard-link:hover {
  background-color: #ffd2eb !important;
  color: #7b376b !important;
}

/* Kitty Kat scene extras */
body[data-atmosphere="kitty_kat"] #kitty-kat-ground {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(5rem, 10vw, 9rem);
  pointer-events: none;
  z-index: 8;
  overflow: visible;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 232, 242, 0),
    rgba(255, 196, 221, 0.35) 45%,
    rgba(255, 176, 214, 0.92) 100%
  );
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground.reduced-motion::before {
  background: linear-gradient(
    180deg,
    rgba(255, 232, 242, 0.35),
    rgba(255, 188, 216, 0.95)
  );
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat {
  position: absolute;
  bottom: var(--lane-offset, 1rem);
  left: var(--cat-left, 50%);
  transform: translateX(calc(-50% + var(--slide-offset, 0px))) scale(var(--cat-scale, 1));
  transform-origin: center bottom;
  transition: transform 1.05s cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: var(--cat-transition-delay, 0s);
  will-change: transform;
  --walk-speed-mult: 1;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--pre-entry {
  opacity: 0;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__wrapper {
  position: relative;
  display: block;
  transform: translateY(0);
  transition: transform 0.8s cubic-bezier(0.25, 0.9, 0.35, 1);
  will-change: transform;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--entrance .ground-cat__wrapper {
  animation: cat-entrance 1.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--entrance-delay, 0ms);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__walker {
  position: relative;
  display: block;
  animation: cat-walk calc(var(--walk-duration, 18s) * var(--walk-speed-mult, 1)) ease-in-out infinite alternate;
  will-change: transform;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--pause .ground-cat__walker {
  animation-play-state: paused;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--no-walk .ground-cat__walker {
  animation: none !important;
  transform: translateX(0) !important;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__shadow {
  position: absolute;
  left: 50%;
  bottom: 0.25rem;
  width: 3.9rem;
  height: 0.9rem;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(128, 52, 103, 0.35) 0%, rgba(128, 52, 103, 0) 70%);
  filter: blur(4px);
  opacity: 0.65;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__sprite {
  position: relative;
  width: 4.9rem;
  height: 3.3rem;
  transform-origin: center bottom;
  animation: cat-bob 4.4s ease-in-out infinite;
  animation-delay: var(--hop-phase, 0s);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__sprite {
  animation: cat-landing-bounce 0.65s cubic-bezier(0.2, 0.8, 0.35, 1.1) forwards;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__body,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__head,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__leg,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__tail {
  animation-duration: 0.65s;
  animation-fill-mode: forwards;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--airborne .ground-cat__sprite {
  animation: none !important;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__body {
  animation: cat-landing-body 0.65s cubic-bezier(0.2, 0.8, 0.35, 1.1) forwards;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__tail {
  animation-duration: 3.2s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__head {
  animation: cat-landing-head 0.65s cubic-bezier(0.2, 0.8, 0.35, 1.1) forwards;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--landing .ground-cat__leg {
  animation: cat-leg-landing 0.65s cubic-bezier(0.2, 0.8, 0.35, 1.1) forwards;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--dance .ground-cat__sprite {
  animation: cat-dance-hop 1.25s ease-in-out infinite;
  animation-delay: var(--dance-phase, 0ms);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--snack .ground-cat__sprite {
  animation: cat-purr 0.55s ease-in-out infinite alternate;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--roll .ground-cat__sprite {
  animation: cat-roll 1.6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  transform-origin: center center;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__tail {
  position: absolute;
  width: 1.6rem;
  height: 0.7rem;
  top: 1.3rem;
  left: -1.05rem;
  border-radius: 1rem;
  background: hsl(
    var(--cat-hue, 330),
    var(--cat-saturation, 84%),
    calc(var(--cat-lightness, 88%) - 6%)
  );
  transform-origin: 100% 50%;
  animation: cat-tail-sway 5.2s ease-in-out infinite;
  animation-delay: var(--tail-delay, 0s);
  z-index: 0;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--dance .ground-cat__tail {
  animation-duration: 2.6s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--roll .ground-cat__tail {
  animation: cat-roll-tail 1.4s ease-in-out infinite;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__body {
  position: absolute;
  width: 4.6rem;
  height: 2.1rem;
  bottom: 0.4rem;
  left: 0.1rem;
  border-radius: 2.4rem;
  background: hsl(
    var(--cat-hue, 330),
    var(--cat-saturation, 84%),
    var(--cat-lightness, 88%)
  );
  box-shadow: 0 0.35rem 0.4rem rgba(255, 255, 255, 0.35) inset;
  transition: box-shadow 0.35s ease;
  z-index: 1;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__head {
  position: absolute;
  width: 1.9rem;
  height: 1.85rem;
  top: -0.35rem;
  left: 2.75rem;
  border-radius: 1.15rem;
  background: hsl(
    var(--cat-hue, 330),
    var(--cat-saturation, 84%),
    calc(var(--cat-lightness, 88%) + 4%)
  );
  box-shadow: 0 0.25rem 0.25rem rgba(255, 255, 255, 0.4) inset;
  transition: transform 0.3s ease;
  z-index: 2;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__ear {
  position: absolute;
  width: 0.9rem;
  height: 1rem;
  background: hsl(
    var(--cat-hue, 330),
    calc(var(--cat-saturation, 84%) + 12%),
    calc(var(--cat-lightness, 88%) + 6%)
  );
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  top: -0.6rem;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__ear::after {
  content: "";
  position: absolute;
  inset: 0.15rem 0.2rem;
  background: rgba(255, 155, 203, 0.9);
  clip-path: inherit;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__ear--left {
  left: -0.05rem;
  transform: rotate(-10deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__ear--right {
  right: -0.05rem;
  transform: rotate(10deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__eye {
  position: absolute;
  width: 0.38rem;
  height: 0.58rem;
  background: #41124a;
  border-radius: 50%;
  top: 0.68rem;
  left: 0.38rem;
  box-shadow: 0 0 0 0.08rem rgba(255, 255, 255, 0.15);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__eye--right {
  left: auto;
  right: 0.38rem;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__eye::after {
  content: "";
  position: absolute;
  width: 0.16rem;
  height: 0.22rem;
  top: 0.08rem;
  left: 0.1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__nose {
  position: absolute;
  top: 1.08rem;
  left: 50%;
  width: 0.36rem;
  height: 0.28rem;
  transform: translateX(-50%);
  border-radius: 0.2rem 0.2rem 0.15rem 0.15rem;
  background: #ff8fbf;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__mouth {
  position: absolute;
  top: 1.32rem;
  left: 50%;
  width: 0.75rem;
  height: 0.45rem;
  transform: translateX(-50%);
  border-bottom: 0.08rem solid rgba(122, 33, 97, 0.9);
  border-radius: 0 0 1rem 1rem;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__whiskers {
  position: absolute;
  top: 1.22rem;
  width: 1.35rem;
  height: 0.1rem;
  color: rgba(255, 255, 255, 0.95);
  background: currentColor;
  border-radius: 0.2rem;
  box-shadow: 0 -0.32rem 0 currentColor, 0 0 0 currentColor, 0 0.32rem 0 currentColor;
  transition: transform 0.3s ease;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__whiskers--left {
  left: -1.05rem;
  transform: rotate(-8deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__whiskers--right {
  right: -1.05rem;
  transform: rotate(8deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg {
  position: absolute;
  bottom: -0.15rem;
  width: 0.48rem;
  height: 1.28rem;
  border-radius: 0.5rem;
  background: hsl(
    var(--cat-hue, 330),
    var(--cat-saturation, 84%),
    calc(var(--cat-lightness, 88%) - 9%)
  );
  transform-origin: 50% 8%;
  animation: cat-leg-step 0.85s ease-in-out infinite;
  box-shadow: inset 0 0.2rem 0.25rem rgba(255, 255, 255, 0.35);
  z-index: 0;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg::after {
  content: "";
  position: absolute;
  bottom: -0.2rem;
  left: -0.1rem;
  width: 0.7rem;
  height: 0.36rem;
  border-radius: 0.4rem;
  background: rgba(255, 247, 252, 0.9);
  box-shadow: 0 0 0 0.07rem rgba(255, 155, 203, 0.5);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg--back-left {
  left: 0.55rem;
  animation-delay: 0s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg--back-right {
  left: 1.35rem;
  animation-delay: 0.4s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg--front-left {
  left: 2.55rem;
  animation-delay: 0.2s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg--front-right {
  left: 3.35rem;
  animation-delay: 0.6s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--pause .ground-cat__leg {
  animation-play-state: paused;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__leg {
  animation: none;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__leg--back-left,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__leg--back-right {
  animation: cat-leg-step 1.1s ease-in-out infinite;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__leg--back-right {
  animation-delay: 0.55s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__leg--front-left {
  animation: cat-leg-tap 0.95s ease-in-out infinite;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__leg--front-right {
  animation: cat-paw-wave 1.4s ease-in-out infinite;
  transform-origin: 45% 12%;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave-alt .ground-cat__leg--front-right {
  animation-delay: 0.5s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave-alt .ground-cat__leg--front-left {
  animation-delay: 0.3s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--dance .ground-cat__leg {
  animation-duration: 0.65s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--roll .ground-cat__leg {
  animation: none;
  transform: rotate(65deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--gather {
  transition-duration: 1.15s;
  transition-timing-function: cubic-bezier(0.55, 0, 0.29, 1.2);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--roll {
  transition-duration: 1.25s;
  transition-timing-function: cubic-bezier(0.37, 0, 0.15, 1.22);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--gather-left .ground-cat__wrapper {
  transform: translateY(-0.35rem) rotate(-6deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--gather-right .ground-cat__wrapper {
  transform: translateY(-0.35rem) rotate(6deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--snack .ground-cat__wrapper {
  transform: translateY(-0.25rem);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--roll .ground-cat__wrapper {
  transform: translateY(-0.28rem);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--snack .ground-cat__head {
  animation: cat-snack-head 0.7s ease-in-out infinite alternate;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--gather-left .ground-cat__whiskers--left,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--gather-left .ground-cat__whiskers--right {
  transform: rotate(-4deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--gather-right .ground-cat__whiskers--left,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--gather-right .ground-cat__whiskers--right {
  transform: rotate(4deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--snack .ground-cat__body,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--snack .ground-cat__head {
  box-shadow: 0 0.5rem 1rem rgba(255, 121, 190, 0.6), 0 0.35rem 0.4rem rgba(255, 255, 255, 0.4) inset;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--highlight .ground-cat__body,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--highlight .ground-cat__head {
  box-shadow: 0 0 0.9rem rgba(255, 121, 190, 0.6), 0 0.35rem 0.4rem rgba(255, 255, 255, 0.4) inset;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat {
  position: absolute;
  bottom: clamp(1rem, 2vw, 1.9rem);
  width: 5rem;
  height: 2.6rem;
  pointer-events: none;
  filter: drop-shadow(0 0.55rem 0.9rem rgba(255, 109, 182, 0.35));
  opacity: 0;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat[data-side="left"] {
  left: 0;
  animation: treat-slide-left 0.85s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat[data-side="right"] {
  right: 0;
  animation: treat-slide-right 0.85s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat__plate {
  position: absolute;
  inset: auto 0 0 0;
  height: 1rem;
  border-radius: 1.4rem 1.4rem 0.8rem 0.8rem;
  background: linear-gradient(180deg, rgba(255, 245, 250, 0.92), rgba(255, 210, 232, 0.95));
  box-shadow: 0 0.35rem 0.45rem rgba(204, 102, 170, 0.25) inset;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat__goodies {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  width: 2.8rem;
  height: 1.5rem;
  transform: translateX(-50%);
  background: radial-gradient(circle at 30% 40%, #ff82c3 0%, #ff5aa8 65%);
  border-radius: 1.2rem 1.2rem 0.6rem 0.6rem;
  box-shadow: 0 0.3rem 0.45rem rgba(255, 118, 189, 0.45) inset;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat__goodies::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 60% 30%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 60%);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat__crumb {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 192, 220, 0.95);
  opacity: 0;
  animation: treat-crumb 1.6s linear infinite;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat__crumb--1 {
  bottom: 0.3rem;
  left: 0.6rem;
  animation-delay: 0.95s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat__crumb--2 {
  bottom: 0.9rem;
  right: 0.9rem;
  animation-delay: 1.15s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-treat__crumb--3 {
  bottom: 0.5rem;
  left: 2rem;
  animation-delay: 1.35s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground.reduced-motion .ground-cat__wrapper,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground.reduced-motion .ground-cat__walker,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground.reduced-motion .ground-cat__sprite,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground.reduced-motion .ground-cat__tail,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground.reduced-motion .ground-cat__head,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground.reduced-motion .ground-cat__leg,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat.no-motion .ground-cat__wrapper,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat.no-motion .ground-cat__walker,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat.no-motion .ground-cat__sprite,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat.no-motion .ground-cat__tail,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat.no-motion .ground-cat__head,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat.no-motion .ground-cat__leg {
  animation: none !important;
  transform: translateY(0) !important;
}

@keyframes cat-entrance {
  0% {
    transform: translateX(var(--entrance-shift, -48vw)) translateY(var(--entrance-start-y, -110vh)) scale(0.55);
    opacity: 1;
  }
  45% {
    transform: translateX(calc(var(--entrance-shift, -48vw) * 0.45)) translateY(-30vh) scale(0.88);
    opacity: 1;
  }
  70% {
    transform: translateX(var(--entrance-mid, -9vw)) translateY(2vh) scale(1.04);
    opacity: 1;
  }
  100% {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes cat-walk {
  0% {
    transform: translateX(calc(var(--walk-span, 18vw) * -0.5));
  }
  100% {
    transform: translateX(calc(var(--walk-span, 18vw) * 0.5));
  }
}

@keyframes cat-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.35rem);
  }
}

@keyframes cat-tail-sway {
  0%,
  100% {
    transform: rotate(14deg);
  }
  50% {
    transform: rotate(-20deg);
  }
}

@keyframes cat-leg-step {
  0%,
  100% {
    transform: rotate(6deg) translateY(0);
  }
  50% {
    transform: rotate(-10deg) translateY(calc(-0.28rem - var(--party-level, 0) * 0.18rem));
  }
}

@keyframes cat-leg-landing {
  0% {
    transform: rotate(-20deg) translateY(-0.8rem);
  }
  70% {
    transform: rotate(6deg) translateY(0.15rem);
  }
  100% {
    transform: rotate(2deg) translateY(0);
  }
}

@keyframes cat-landing-bounce {
  0% {
    transform: translateY(-10vh) scale(0.92);
  }
  65% {
    transform: translateY(0.4rem) scale(1.06);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes cat-landing-body {
  0% {
    transform: translateY(-0.8rem) rotate(-6deg);
  }
  70% {
    transform: translateY(0.25rem) rotate(2deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes cat-landing-head {
  0% {
    transform: translateY(-0.45rem) rotate(6deg);
  }
  70% {
    transform: translateY(0.35rem) rotate(-4deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes cat-paw-wave {
  0%,
  100% {
    transform: rotate(8deg) translateY(0);
  }
  35% {
    transform: rotate(-72deg) translateY(-0.35rem);
  }
  55% {
    transform: rotate(-46deg) translateY(-0.22rem);
  }
}

@keyframes cat-leg-tap {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.25rem);
  }
}

@keyframes cat-dance-hop {
  0%,
  100% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-0.55rem) scale(1.02);
  }
  65% {
    transform: translateY(0.15rem) scale(0.98);
  }
}

@keyframes cat-purr {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.2rem);
  }
}

@keyframes cat-roll {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(720deg);
  }
}

@keyframes cat-roll-tail {
  0%,
  100% {
    transform: rotate(18deg);
  }
  50% {
    transform: rotate(-45deg);
  }
}

@keyframes cat-snack-head {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  50% {
    transform: rotate(-8deg) translateY(0.12rem);
  }
}

@keyframes treat-slide-left {
  0% {
    transform: translateX(-110%) translateY(0) scale(0.7);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  85% {
    transform: translateX(12vw) translateY(-0.5rem) scale(1.05);
  }
  100% {
    transform: translateX(12vw) translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes treat-slide-right {
  0% {
    transform: translateX(110%) translateY(0) scale(0.7);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  85% {
    transform: translateX(-12vw) translateY(-0.5rem) scale(1.05);
  }
  100% {
    transform: translateX(-12vw) translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes treat-crumb {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(0.9rem);
    opacity: 0;
  }
}

/* ─── Fighter (Tekken inspired) ───────────────────────────────────────── */
body[data-atmosphere="fighter"] {
  background-color: #0d0f16;
  color: #f8fafc;
}

body[data-atmosphere="fighter"] nav {
  background-color: #141826 !important;
  color: #f8fafc;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.55);
}

body[data-atmosphere="fighter"] .bg-white {
  background-color: #1b2233 !important;
}

body[data-atmosphere="fighter"] .bg-gray-50 {
  background-color: #141b2c !important;
}

body[data-atmosphere="fighter"] .bg-gray-100 {
  background-color: #111827 !important;
}

body[data-atmosphere="fighter"] .bg-gray-200 {
  background-color: #1f2937 !important;
}

body[data-atmosphere="fighter"] .bg-gray-300 {
  background-color: #273349 !important;
}

body[data-atmosphere="fighter"] .hover\:bg-gray-300:hover {
  background-color: #2f3d57 !important;
}

body[data-atmosphere="fighter"] .text-gray-800,
body[data-atmosphere="fighter"] .text-gray-700 {
  color: #f1f5f9 !important;
}

body[data-atmosphere="fighter"] .text-gray-600 {
  color: #cbd5f5 !important;
}

body[data-atmosphere="fighter"] .text-gray-500 {
  color: #94a3b8 !important;
}

body[data-atmosphere="fighter"] .border-gray-200 {
  border-color: #273349 !important;
}

body[data-atmosphere="fighter"] .bg-blue-500,
body[data-atmosphere="fighter"] .hover\:bg-blue-500:hover {
  background-color: #ef4444 !important;
}

body[data-atmosphere="fighter"] .hover\:bg-blue-600:hover {
  background-color: #dc2626 !important;
}

body[data-atmosphere="fighter"] .focus\:ring-blue-400:focus {
  --tw-ring-color: rgba(239, 68, 68, 0.45) !important;
}

body[data-atmosphere="fighter"] .text-blue-600 {
  color: #f97316 !important;
}

body[data-atmosphere="fighter"] .text-blue-700 {
  color: #fb923c !important;
}

body[data-atmosphere="fighter"] .bg-blue-100 {
  background-color: rgba(249, 115, 22, 0.15) !important;
}

body[data-atmosphere="fighter"] .dashboard-link {
  color: #f8fafc !important;
}

body[data-atmosphere="fighter"] .dashboard-link:hover {
  background-color: rgba(239, 68, 68, 0.18) !important;
  color: #f97316 !important;
}

body[data-atmosphere="fighter"] .shadow {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.5) !important;
}

/* ─── Traxyz (Graph paper math lab) ──────────────────────────────────── */
body[data-atmosphere="traxyz"] {
  color: #1f2937;
  background-color: #f7fafc;
  --traxyz-grid-offset-x: 0px;
  --traxyz-grid-offset-y: 0px;
  --traxyz-major-offset-x: 0px;
  --traxyz-major-offset-y: 0px;
  background-image:
    linear-gradient(0deg, rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(30, 64, 175, 0.12) 0, transparent 0),
    linear-gradient(90deg, rgba(30, 64, 175, 0.12) 0, transparent 0);
  background-size:
    1.25rem 1.25rem,
    1.25rem 1.25rem,
    6.25rem 6.25rem,
    6.25rem 6.25rem;
  background-position:
    calc(50% + var(--traxyz-grid-offset-x)) calc(50% + var(--traxyz-grid-offset-y)),
    calc(50% + var(--traxyz-grid-offset-x)) calc(50% + var(--traxyz-grid-offset-y)),
    calc(50% + var(--traxyz-major-offset-x)) calc(50% + var(--traxyz-major-offset-y)),
    calc(50% + var(--traxyz-major-offset-x)) calc(50% + var(--traxyz-major-offset-y));
}

body[data-atmosphere="traxyz"] nav {
  background-color: rgba(247, 250, 252, 0.96) !important;
  color: #1e3a8a;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

body[data-atmosphere="traxyz"] .bg-white,
body[data-atmosphere="traxyz"] .bg-gray-50 {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

body[data-atmosphere="traxyz"] .bg-gray-100 {
  background-color: rgba(241, 245, 249, 0.85) !important;
}

body[data-atmosphere="traxyz"] .bg-gray-200 {
  background-color: rgba(226, 232, 240, 0.7) !important;
}

body[data-atmosphere="traxyz"] .hover\:bg-gray-300:hover {
  background-color: rgba(226, 232, 240, 0.9) !important;
}

body[data-atmosphere="traxyz"] .text-gray-800,
body[data-atmosphere="traxyz"] .text-gray-700 {
  color: #111827 !important;
}

body[data-atmosphere="traxyz"] .text-gray-600 {
  color: #1f3b82 !important;
}

body[data-atmosphere="traxyz"] .text-gray-500 {
  color: #2563eb !important;
}

body[data-atmosphere="traxyz"] .border-gray-200 {
  border-color: rgba(148, 163, 184, 0.55) !important;
}

body[data-atmosphere="traxyz"] .bg-blue-500,
body[data-atmosphere="traxyz"] .hover\:bg-blue-500:hover {
  background-color: #2563eb !important;
}

body[data-atmosphere="traxyz"] .hover\:bg-blue-600:hover {
  background-color: #1d4ed8 !important;
}

body[data-atmosphere="traxyz"] .focus\:ring-blue-400:focus {
  --tw-ring-color: rgba(37, 99, 235, 0.45) !important;
}

body[data-atmosphere="traxyz"] .text-blue-600 {
  color: #1d4ed8 !important;
}

body[data-atmosphere="traxyz"] .text-blue-700 {
  color: #1e3a8a !important;
}

body[data-atmosphere="traxyz"] .bg-blue-100 {
  background-color: rgba(191, 219, 254, 0.35) !important;
}

body[data-atmosphere="traxyz"] .dashboard-link {
  color: #1e40af !important;
}

body[data-atmosphere="traxyz"] .dashboard-link:hover {
  background-color: rgba(59, 130, 246, 0.12) !important;
  color: #0f172a !important;
}

body[data-atmosphere="traxyz"] .shadow {
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16) !important;
}

body[data-atmosphere="traxyz"] #traxyz-lab {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

body[data-atmosphere="traxyz"] #traxyz-lab canvas {
  width: 100%;
  height: 100%;
  display: block;
  mix-blend-mode: multiply;
}

body[data-atmosphere="traxyz"] .traxyz-sheet {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 78, 216, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(30, 64, 175, 0.12) 0, transparent 0),
    linear-gradient(90deg, rgba(30, 64, 175, 0.12) 0, transparent 0);
  background-size: 1.25rem 1.25rem, 1.25rem 1.25rem, 6.25rem 6.25rem, 6.25rem 6.25rem;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.45s ease;
}

body[data-atmosphere="traxyz"] .traxyz-sheet.is-visible {
  opacity: 1;
}

body[data-atmosphere="traxyz"] .traxyz-sheet--slide-left {
  animation: traxyz-slide-left 1.8s ease forwards;
}

body[data-atmosphere="traxyz"] .traxyz-sheet--slide-right {
  animation: traxyz-slide-right 1.8s ease forwards;
}

body[data-atmosphere="traxyz"] .traxyz-sheet--fade {
  animation: traxyz-fade 1.2s ease forwards;
}

body[data-atmosphere="traxyz"] .traxyz-sheet--peel {
  animation: traxyz-peel 1.9s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  transform-origin: top right;
}

body[data-atmosphere="traxyz"] main {
  max-width: min(1100px, 94vw);
  margin: clamp(2.5rem, 5vw, 4rem) auto;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.25rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow:
    0 30px 70px rgba(15, 23, 42, 0.18),
    0 12px 30px rgba(59, 130, 246, 0.12);
  backdrop-filter: blur(10px);
}

body[data-atmosphere="traxyz"] main > *:first-child {
  margin-top: 0 !important;
}

@keyframes traxyz-slide-left {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: translateX(-110%);
    opacity: 0;
  }
}

@keyframes traxyz-slide-right {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: translateX(110%);
    opacity: 0;
  }
}

@keyframes traxyz-fade {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes traxyz-peel {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
    opacity: 0.96;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: rotateX(20deg) rotateY(-70deg) translateX(30%) translateY(-12%);
    opacity: 0;
  }
}

/* Utility: ensure system text inherits body color when no explicit class */
body[data-atmosphere="kitty_kat"],
body[data-atmosphere="fighter"],
body[data-atmosphere="traxyz"] {
  transition: background-color 0.4s ease, color 0.4s ease;
}

body[data-atmosphere="kitty_kat"] a,
body[data-atmosphere="fighter"] a,
body[data-atmosphere="traxyz"] a {
  transition: color 0.2s ease, background-color 0.2s ease;
}
