/*
 * 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.
 */

:root {
  --menu-surface-color: #ffffff;
}

#menu {
  background-color: var(--menu-surface-color, #ffffff) !important;
}

body[data-atmosphere="clean"] {
  background-color: #f7fafc;
  color: #2d3748;
  --menu-surface-color: #ffffff;
  --dashboard-pill-shell-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  --dashboard-pill-shell-shadow: 0 30px 55px rgba(15, 23, 42, 0.14);
  --dashboard-pill-shell-border: rgba(148, 163, 184, 0.3);
  --dashboard-pill-trigger-color: rgba(15, 23, 42, 0.65);
  --dashboard-pill-trigger-hover-color: #0f172a;
  --dashboard-pill-trigger-active-color: #0f172a;
  --dashboard-pill-trigger-active-bg: rgba(255, 255, 255, 0);
  --dashboard-pill-focus-ring: 0 0 0 2px rgba(191, 219, 254, 0.8), 0 0 0 4px rgba(59, 130, 246, 0.35);
  --dashboard-pill-highlight-bg: linear-gradient(115deg, #0ea5e9 0%, #38bdf8 38%, #22d3ee 68%, #fbbf24 100%);
  --dashboard-pill-highlight-shadow: 0 30px 55px rgba(14, 165, 233, 0.32);
  --dashboard-pill-hover-bg: linear-gradient(125deg, rgba(14, 165, 233, 0.08), rgba(250, 204, 21, 0.08));
  --dashboard-pill-hover-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

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

/* ─── Kitty Kat (Hello Kitty inspired) ─────────────────────────────────── */
body[data-atmosphere="kitty_kat"] {
  background-color: #ffe8f2;
  color: #7b376b;
  --menu-surface-color: #fff9fd;
  --dashboard-pill-shell-bg: linear-gradient(135deg, rgba(255, 198, 226, 0.95), rgba(255, 158, 206, 0.92));
  --dashboard-pill-shell-shadow: 0 22px 48px rgba(255, 105, 180, 0.35);
  --dashboard-pill-shell-border: rgba(255, 149, 214, 0.45);
  --dashboard-pill-trigger-color: rgba(122, 54, 107, 0.75);
  --dashboard-pill-trigger-hover-color: #7b376b;
  --dashboard-pill-trigger-active-color: #ffffff;
  --dashboard-pill-trigger-active-bg: rgba(255, 105, 180, 0.32);
  --dashboard-pill-focus-ring: 0 0 0 2px rgba(255, 255, 255, 0.7), 0 0 0 4px rgba(255, 105, 180, 0.45);
  --dashboard-pill-highlight-bg: linear-gradient(120deg, #ff9ad5, #ff5fa8);
  --dashboard-pill-highlight-shadow: 0 18px 38px rgba(255, 111, 181, 0.4);
  --dashboard-pill-hover-bg: linear-gradient(120deg, rgba(255, 255, 255, 0.65), rgba(255, 222, 238, 0.85));
  --dashboard-pill-hover-shadow: inset 0 0 26px rgba(255, 149, 214, 0.35);
}

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-900,
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--pre-entry .ground-cat__wrapper {
  transform: translate3d(var(--entrance-shift, -70vw), var(--entrance-start-y, -120vh), 0)
    rotate(var(--entrance-tilt-early, 0deg));
}

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 var(--entrance-duration, 2.15s) forwards;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.18, 0.72, 0.32, 1.02);
  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.2rem;
  height: 3.2rem;
  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--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: -0.9rem;
  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);
}

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: 3.7rem;
  height: 2.4rem;
  bottom: 0.4rem;
  left: 0.25rem;
  border-radius: 2rem;
  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;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__head {
  position: absolute;
  width: 2.4rem;
  height: 2.2rem;
  top: -0.9rem;
  left: 1rem;
  border-radius: 1.3rem;
  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;
}

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.15rem;
  transform: rotate(-10deg);
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__ear--right {
  right: 0.15rem;
  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.82rem;
  left: 0.55rem;
  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.55rem;
}

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.35rem;
  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.6rem;
  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.3rem;
  width: 1.7rem;
  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.5rem;
  transform: rotate(-8deg);
}

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

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__arm {
  position: absolute;
  width: 0.5rem;
  height: 1.15rem;
  border-radius: 0.45rem;
  background: hsl(
    var(--cat-hue, 330),
    calc(var(--cat-saturation, 84%) + 8%),
    calc(var(--cat-lightness, 88%) - 4%)
  );
  top: 1.1rem;
  left: 0.35rem;
  transform-origin: top center;
  box-shadow: 0 0.18rem 0.28rem rgba(255, 255, 255, 0.35) inset;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__arm::after {
  content: "";
  position: absolute;
  bottom: -0.18rem;
  left: -0.08rem;
  width: 0.68rem;
  height: 0.36rem;
  border-radius: 0.4rem;
  background: rgba(255, 250, 252, 0.9);
  box-shadow: 0 0 0 0.08rem rgba(255, 155, 203, 0.55);
}

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

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__arm--left {
  animation: cat-arm-wave 1.4s ease-in-out infinite;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave .ground-cat__arm--right {
  animation: cat-arm-wave-alt 1.4s ease-in-out infinite;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave-alt .ground-cat__arm--left,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat--wave-alt .ground-cat__arm--right {
  animation-delay: 0.4s;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg {
  position: absolute;
  bottom: 0;
  width: 0.5rem;
  height: 1.1rem;
  border-radius: 0.45rem;
  background: hsl(
    var(--cat-hue, 330),
    var(--cat-saturation, 84%),
    calc(var(--cat-lightness, 88%) - 8%)
  );
  transform-origin: 50% 100%;
  animation: cat-leg-step 0.8s ease-in-out infinite;
}

body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat__leg--front {
  right: 0.65rem;
}

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

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--front {
  animation: cat-leg-wave 1.4s ease-in-out infinite;
}

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

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"][data-kitty-detail="low"] #kitty-kat-ground .ground-cat {
  --walk-speed-mult: 1.35;
}

body[data-atmosphere="kitty_kat"][data-kitty-detail="low"] #kitty-kat-ground .ground-cat__shadow {
  filter: none;
  opacity: 0.4;
  background: rgba(128, 52, 103, 0.35);
}

body[data-atmosphere="kitty_kat"][data-kitty-detail="low"] #kitty-kat-ground .ground-cat__body,
body[data-atmosphere="kitty_kat"][data-kitty-detail="low"] #kitty-kat-ground .ground-cat__head {
  box-shadow: none;
}

body[data-atmosphere="kitty_kat"][data-kitty-detail="low"] #kitty-kat-ground .ground-cat__sprite {
  animation-duration: 6s;
}

body[data-atmosphere="kitty_kat"][data-kitty-detail="low"] #kitty-kat-ground .ground-cat__tail {
  animation-duration: 6.5s;
}

body[data-atmosphere="kitty_kat"][data-kitty-detail="low"] #kitty-kat-ground .ground-treat {
  filter: none;
}

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.reduced-motion .ground-cat__arm,
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,
body[data-atmosphere="kitty_kat"] #kitty-kat-ground .ground-cat.no-motion .ground-cat__arm {
  animation: none !important;
  transform: translateY(0) !important;
}

@keyframes cat-entrance {
  0% {
    transform: translate3d(var(--entrance-shift, -70vw), var(--entrance-start-y, -120vh), 0)
      rotate(var(--entrance-tilt-early, 0deg))
      scale(0.68);
    opacity: 0;
  }
  4% {
    transform: translate3d(
        calc(var(--entrance-shift, -70vw) * 0.97),
        calc(var(--entrance-start-y, -120vh) * 0.96),
        0
      )
      rotate(var(--entrance-tilt-early, 0deg))
      scale(0.7);
    opacity: 0.08;
  }
  8% {
    transform: translate3d(
        calc(var(--entrance-shift, -70vw) * 0.93),
        calc(var(--entrance-start-y, -120vh) * 0.9),
        0
      )
      rotate(var(--entrance-tilt-early, 0deg))
      scale(0.74);
    opacity: 0.2;
  }
  12% {
    transform: translate3d(
        calc(var(--entrance-shift, -70vw) * 0.88),
        calc(var(--entrance-start-y, -120vh) * 0.8),
        0
      )
      rotate(var(--entrance-tilt-early, 0deg))
      scale(0.78);
    opacity: 0.45;
  }
  16% {
    transform: translate3d(
        calc(
          var(--entrance-shift, -70vw) * 0.82 + var(--entrance-arc-1-x, -52vw) * 0.18
        ),
        calc(
          var(--entrance-start-y, -120vh) * 0.72 + var(--entrance-arc-1-y, -72vh) * 0.28
        ),
        0
      )
      rotate(
        calc(
          var(--entrance-tilt-early, 0deg) * 0.6 + var(--entrance-tilt-mid, 6deg) * 0.4
        )
      )
      scale(0.82);
    opacity: 0.65;
  }
  20% {
    transform: translate3d(
        var(--entrance-arc-1-x, -52vw),
        var(--entrance-arc-1-y, -72vh),
        0
      )
      rotate(var(--entrance-tilt-mid, 6deg))
      scale(0.86);
    opacity: 0.85;
  }
  24% {
    transform: translate3d(
        calc(
          var(--entrance-arc-1-x, -52vw) * 0.7 + var(--entrance-arc-2-x, -34vw) * 0.3
        ),
        calc(
          var(--entrance-arc-1-y, -72vh) * 0.7 + var(--entrance-arc-2-y, -46vh) * 0.3
        ),
        0
      )
      rotate(
        calc(
          var(--entrance-tilt-mid, 6deg) * 0.9 + var(--entrance-tilt-glide, 2deg) * 0.1
        )
      )
      scale(0.88);
  }
  28% {
    transform: translate3d(
        calc(
          var(--entrance-arc-1-x, -52vw) * 0.5 + var(--entrance-arc-2-x, -34vw) * 0.5
        ),
        calc(
          var(--entrance-arc-1-y, -72vh) * 0.5 + var(--entrance-arc-2-y, -46vh) * 0.5
        ),
        0
      )
      rotate(
        calc(
          (var(--entrance-tilt-mid, 6deg) + var(--entrance-tilt-glide, 2deg)) / 2
        )
      )
      scale(0.9);
  }
  32% {
    transform: translate3d(
        calc(
          var(--entrance-arc-1-x, -52vw) * 0.3 + var(--entrance-arc-2-x, -34vw) * 0.7
        ),
        calc(
          var(--entrance-arc-1-y, -72vh) * 0.3 + var(--entrance-arc-2-y, -46vh) * 0.7
        ),
        0
      )
      rotate(
        calc(
          var(--entrance-tilt-mid, 6deg) * 0.4 + var(--entrance-tilt-glide, 2deg) * 0.6
        )
      )
      scale(0.92);
  }
  36% {
    transform: translate3d(
        var(--entrance-arc-2-x, -34vw),
        var(--entrance-arc-2-y, -46vh),
        0
      )
      rotate(var(--entrance-tilt-mid, 6deg))
      scale(0.94);
  }
  42% {
    transform: translate3d(
        calc(
          var(--entrance-arc-2-x, -34vw) * 0.7 + var(--entrance-glide-x, -18vw) * 0.3
        ),
        calc(
          var(--entrance-arc-2-y, -46vh) * 0.7 + var(--entrance-glide-y, -24vh) * 0.3
        ),
        0
      )
      rotate(
        calc(
          var(--entrance-tilt-mid, 6deg) * 0.7 + var(--entrance-tilt-glide, 2deg) * 0.3
        )
      )
      scale(0.955);
  }
  46% {
    transform: translate3d(
        calc(
          var(--entrance-arc-2-x, -34vw) * 0.5 + var(--entrance-glide-x, -18vw) * 0.5
        ),
        calc(
          var(--entrance-arc-2-y, -46vh) * 0.5 + var(--entrance-glide-y, -24vh) * 0.5
        ),
        0
      )
      rotate(
        calc(
          (var(--entrance-tilt-mid, 6deg) + var(--entrance-tilt-glide, 2deg)) / 2
        )
      )
      scale(0.97);
  }
  50% {
    transform: translate3d(
        calc(
          var(--entrance-arc-2-x, -34vw) * 0.25 + var(--entrance-glide-x, -18vw) * 0.75
        ),
        calc(
          var(--entrance-arc-2-y, -46vh) * 0.25 + var(--entrance-glide-y, -24vh) * 0.75
        ),
        0
      )
      rotate(
        calc(
          var(--entrance-tilt-mid, 6deg) * 0.2 + var(--entrance-tilt-glide, 2deg) * 0.8
        )
      )
      scale(0.985);
  }
  56% {
    transform: translate3d(
        var(--entrance-glide-x, -18vw),
        var(--entrance-glide-y, -24vh),
        0
      )
      rotate(var(--entrance-tilt-glide, 2deg))
      scale(1);
  }
  60% {
    transform: translate3d(
        calc(
          var(--entrance-glide-x, -18vw) * 0.7 + var(--entrance-mid, -8vw) * 0.3
        ),
        calc(
          var(--entrance-glide-y, -24vh) * 0.65 + var(--entrance-drop, 6vh) * 0.35
        ),
        0
      )
      rotate(
        calc(
          var(--entrance-tilt-glide, 2deg) * 0.7 + var(--entrance-tilt-final, 1deg) * 0.3
        )
      )
      scale(1.02);
  }
  64% {
    transform: translate3d(
        calc(
          var(--entrance-glide-x, -18vw) * 0.5 + var(--entrance-mid, -8vw) * 0.5
        ),
        calc(
          var(--entrance-glide-y, -24vh) * 0.5 + var(--entrance-drop, 6vh) * 0.5
        ),
        0
      )
      rotate(
        calc(
          (var(--entrance-tilt-glide, 2deg) + var(--entrance-tilt-final, 1deg)) / 2
        )
      )
      scale(1.03);
  }
  68% {
    transform: translate3d(
        calc(
          var(--entrance-glide-x, -18vw) * 0.3 + var(--entrance-mid, -8vw) * 0.7
        ),
        calc(
          var(--entrance-glide-y, -24vh) * 0.35 + var(--entrance-drop, 6vh) * 0.65
        ),
        0
      )
      rotate(
        calc(
          var(--entrance-tilt-glide, 2deg) * 0.3 + var(--entrance-tilt-final, 1deg) * 0.7
        )
      )
      scale(1.045);
  }
  72% {
    transform: translate3d(
        var(--entrance-mid, -8vw),
        var(--entrance-drop, 6vh),
        0
      )
      rotate(var(--entrance-tilt-final, 1deg))
      scale(1.06);
  }
  76% {
    transform: translate3d(
        calc(var(--entrance-mid, -8vw) * 0.58),
        calc(
          var(--entrance-drop, 6vh) * 0.25 + var(--entrance-rebound, 2vh) * -0.35
        ),
        0
      )
      rotate(calc(var(--entrance-tilt-final, 1deg) * 0.85))
      scale(1.045);
  }
  80% {
    transform: translate3d(
        calc(var(--entrance-mid, -8vw) * 0.38),
        calc(var(--entrance-rebound, 2vh) * -0.9),
        0
      )
      rotate(var(--entrance-tilt-final, 1deg))
      scale(0.995);
  }
  84% {
    transform: translate3d(
        calc(var(--entrance-mid, -8vw) * 0.28),
        calc(var(--entrance-rebound, 2vh) * -0.2),
        0
      )
      rotate(calc(var(--entrance-tilt-final, 1deg) * 0.65))
      scale(1.007);
  }
  88% {
    transform: translate3d(
        calc(var(--entrance-mid, -8vw) * 0.2),
        calc(var(--entrance-rebound, 2vh) * 0.08),
        0
      )
      rotate(calc(var(--entrance-tilt-final, 1deg) * 0.35))
      scale(1.012);
  }
  92% {
    transform: translate3d(
        calc(var(--entrance-mid, -8vw) * 0.12),
        calc(var(--entrance-rebound, 2vh) * 0.18),
        0
      )
      rotate(var(--entrance-tilt-rest, 0deg))
      scale(1.005);
  }
  96% {
    transform: translate3d(
        calc(var(--entrance-mid, -8vw) * 0.07),
        calc(var(--entrance-rebound, 2vh) * 0.12),
        0
      )
      rotate(calc(var(--entrance-tilt-rest, 0deg) * 0.6))
      scale(1.003);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) 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: translateY(0) rotate(4deg);
  }
  50% {
    transform: translateY(-0.4rem) rotate(-6deg);
  }
}

@keyframes cat-arm-wave {
  0%,
  100% {
    transform: rotate(16deg);
  }
  40% {
    transform: rotate(-74deg);
  }
  60% {
    transform: rotate(-58deg);
  }
}

@keyframes cat-arm-wave-alt {
  0%,
  100% {
    transform: rotate(-16deg);
  }
  40% {
    transform: rotate(74deg);
  }
  60% {
    transform: rotate(58deg);
  }
}

@keyframes cat-leg-wave {
  0%,
  100% {
    transform: rotate(6deg);
  }
  40% {
    transform: rotate(-46deg);
  }
  60% {
    transform: rotate(-32deg);
  }
}

@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: rgba(6, 8, 18, 0.92);
  color: #f8fafc;
  --menu-surface-color: rgba(20, 26, 45, 0.68);
  --fighter-surface-strong: rgba(12, 15, 30, 0.82);
  --fighter-surface: rgba(21, 26, 44, 0.62);
  --fighter-surface-muted: rgba(17, 24, 39, 0.48);
  --fighter-border: rgba(148, 163, 184, 0.35);
  --dashboard-pill-shell-bg: linear-gradient(135deg, rgba(12, 15, 30, 0.95), rgba(6, 8, 18, 0.9));
  --dashboard-pill-shell-shadow: 0 25px 55px rgba(2, 6, 23, 0.65);
  --dashboard-pill-shell-border: var(--fighter-border, rgba(148, 163, 184, 0.35));
  --dashboard-pill-trigger-color: rgba(241, 245, 249, 0.8);
  --dashboard-pill-trigger-hover-color: #f97316;
  --dashboard-pill-trigger-active-color: #f8fafc;
  --dashboard-pill-trigger-active-bg: rgba(239, 68, 68, 0.3);
  --dashboard-pill-focus-ring: 0 0 0 2px rgba(248, 250, 252, 0.4), 0 0 0 4px rgba(239, 68, 68, 0.45);
  --dashboard-pill-highlight-bg: linear-gradient(120deg, #ef4444, #f97316);
  --dashboard-pill-highlight-shadow: 0 20px 45px rgba(249, 115, 22, 0.45);
  --dashboard-pill-hover-bg: linear-gradient(120deg, rgba(19, 24, 51, 0.85), rgba(9, 11, 24, 0.95));
  --dashboard-pill-hover-shadow: inset 0 0 28px rgba(2, 6, 23, 0.65);
}

body[data-atmosphere="fighter"] nav {
  background-color: var(--fighter-surface-strong) !important;
  color: #f8fafc;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--fighter-border);
  box-shadow: 0 22px 55px rgba(2, 6, 23, 0.55);
}

body[data-atmosphere="fighter"] .bg-white,
body[data-atmosphere="fighter"] .bg-gray-50 {
  background-color: var(--fighter-surface) !important;
  border: 1px solid var(--fighter-border);
  backdrop-filter: blur(14px);
}

body[data-atmosphere="fighter"] .bg-gray-50\/80 {
  background-color: rgba(21, 26, 44, 0.72) !important;
  border: 1px solid var(--fighter-border);
  color: #e2e8f0;
  backdrop-filter: blur(14px);
}

body[data-atmosphere="fighter"] .bg-gray-100 {
  background-color: var(--fighter-surface-muted) !important;
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(14px);
}

body[data-atmosphere="fighter"] .bg-gray-200 {
  background-color: rgba(31, 41, 55, 0.4) !important;
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(12px);
}

body[data-atmosphere="fighter"] .bg-gray-300 {
  background-color: rgba(39, 51, 73, 0.32) !important;
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
}

body[data-atmosphere="fighter"] .hover\:bg-gray-300:hover {
  background-color: rgba(47, 61, 87, 0.48) !important;
}

body[data-atmosphere="fighter"] .text-gray-900,
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: var(--fighter-border) !important;
}

body[data-atmosphere="fighter"] .bg-blue-500,
body[data-atmosphere="fighter"] .hover\:bg-blue-500:hover {
  background-color: rgba(239, 68, 68, 0.72) !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
  backdrop-filter: blur(10px);
}

body[data-atmosphere="fighter"] .hover\:bg-blue-600:hover {
  background-color: rgba(220, 38, 38, 0.7) !important;
}

body[data-atmosphere="fighter"] .focus\:ring-blue-400:focus {
  --tw-ring-color: rgba(239, 68, 68, 0.3) !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.12) !important;
}

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

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

body[data-atmosphere="fighter"] .shadow {
  box-shadow: 0 25px 45px rgba(2, 6, 23, 0.5) !important;
}

body[data-atmosphere="fighter"] #fighter-arena {
  pointer-events: none;
}

/* ─── Traxyz (Graph paper math lab) ──────────────────────────────────── */
body[data-atmosphere="traxyz"] {
  color: #1f2937;
  background-color: #f7fafc;
  --menu-surface-color: #ffffff;
  --traxyz-grid-offset-x: 0px;
  --traxyz-grid-offset-y: 0px;
  --traxyz-major-offset-x: 0px;
  --traxyz-major-offset-y: 0px;
  --dashboard-pill-shell-bg: linear-gradient(130deg, rgba(247, 250, 252, 0.96), rgba(224, 242, 254, 0.96));
  --dashboard-pill-shell-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  --dashboard-pill-shell-border: rgba(148, 163, 184, 0.25);
  --dashboard-pill-trigger-color: rgba(30, 64, 175, 0.85);
  --dashboard-pill-trigger-hover-color: #1d4ed8;
  --dashboard-pill-trigger-active-color: #0f172a;
  --dashboard-pill-trigger-active-bg: rgba(59, 130, 246, 0.25);
  --dashboard-pill-focus-ring: 0 0 0 2px rgba(191, 219, 254, 0.85), 0 0 0 4px rgba(37, 99, 235, 0.4);
  --dashboard-pill-highlight-bg: linear-gradient(120deg, #60a5fa, #2563eb);
  --dashboard-pill-highlight-shadow: 0 18px 32px rgba(37, 99, 235, 0.35);
  --dashboard-pill-hover-bg: linear-gradient(120deg, rgba(241, 245, 249, 0.95), rgba(224, 242, 254, 0.9));
  --dashboard-pill-hover-shadow: inset 0 0 22px rgba(148, 163, 184, 0.3);
  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-900,
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;
}

@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;
  }
}

/* ─── Temporal (Season & weather aware) ─────────────────────────────── */
body[data-atmosphere="temporal"] {
  --temporal-body-bg: #030712;
  --temporal-body-text: #e0f2fe;
  --temporal-menu-surface: rgba(2, 6, 23, 0.9);
  --temporal-nav-bg: rgba(2, 6, 23, 0.85);
  --temporal-nav-border: rgba(56, 189, 248, 0.12);
  --temporal-nav-shadow: 0 25px 60px rgba(2, 6, 23, 0.65);
  --temporal-panel-bg: rgba(15, 23, 42, 0.7);
  --temporal-panel-bg-soft: rgba(15, 23, 42, 0.58);
  --temporal-panel-border: rgba(56, 189, 248, 0.12);
  --temporal-panel-text: #ecfeff;
  --temporal-panel-muted: #c7e4ff;
  --temporal-panel-subtle: rgba(226, 232, 240, 0.7);
  --temporal-link-600: #7dd3fc;
  --temporal-link-700: #38bdf8;
  --temporal-info-bg: rgba(125, 211, 252, 0.18);
  --temporal-dashboard-link: #ecfeff;
  --temporal-dashboard-link-hover-bg: rgba(56, 189, 248, 0.18);
  --temporal-dashboard-link-hover: #fcd34d;
  --temporal-accent-gradient: linear-gradient(135deg, #38bdf8, #fbbf24);
  --temporal-accent-gradient-strong: linear-gradient(135deg, #0ea5e9, #f97316);
  --temporal-accent-contrast: #081223;
  --temporal-accent-contrast-strong: #030712;
  color: var(--temporal-body-text);
  background-color: var(--temporal-body-bg);
  --menu-surface-color: var(--temporal-menu-surface, #0f172a);
  --temporal-sky-top: #0f172a;
  --temporal-sky-bottom: #030712;
  --temporal-gradient-spot-a: rgba(56, 189, 248, 0.2);
  --temporal-gradient-spot-b: rgba(251, 191, 36, 0.18);
  --temporal-halo: rgba(56, 189, 248, 0.35);
  --temporal-horizon: rgba(251, 191, 36, 0.12);
  --temporal-stars: rgba(148, 163, 184, 0.35);
  --temporal-card-bg: rgba(7, 16, 33, 0.88);
  --temporal-card-border: rgba(148, 163, 184, 0.28);
  --temporal-card-accent: #38bdf8;
  --temporal-card-muted: rgba(226, 232, 240, 0.75);
  --temporal-calendar-border: rgba(148, 163, 184, 0.45);
  --temporal-calendar-halo: rgba(56, 189, 248, 0.18);
  --dashboard-pill-shell-bg: linear-gradient(140deg, rgba(7, 16, 33, 0.95), rgba(3, 7, 18, 0.9));
  --dashboard-pill-shell-shadow: 0 25px 60px rgba(2, 6, 23, 0.65);
  --dashboard-pill-shell-border: rgba(56, 189, 248, 0.28);
  --dashboard-pill-trigger-color: rgba(226, 232, 240, 0.85);
  --dashboard-pill-trigger-hover-color: #fef3c7;
  --dashboard-pill-trigger-active-color: #fef9c3;
  --dashboard-pill-trigger-active-bg: rgba(56, 189, 248, 0.25);
  --dashboard-pill-focus-ring: 0 0 0 2px rgba(248, 250, 252, 0.45), 0 0 0 4px rgba(56, 189, 248, 0.35);
  --dashboard-pill-highlight-bg: linear-gradient(120deg, #38bdf8, #fbbf24);
  --dashboard-pill-highlight-shadow: 0 22px 48px rgba(56, 189, 248, 0.35);
  --dashboard-pill-hover-bg: linear-gradient(120deg, rgba(8, 20, 36, 0.85), rgba(5, 10, 26, 0.88));
  --dashboard-pill-hover-shadow: inset 0 0 28px rgba(2, 6, 23, 0.6);
  background-image:
    radial-gradient(circle at 12% 20%, var(--temporal-gradient-spot-a, rgba(56, 189, 248, 0.2)), transparent 55%),
    radial-gradient(circle at 80% 6%, var(--temporal-gradient-spot-b, rgba(251, 191, 36, 0.18)), transparent 60%),
    linear-gradient(180deg, var(--temporal-sky-top, #0f172a), var(--temporal-sky-bottom, #030712));
  transition: background 0.8s ease;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] {
  --temporal-body-bg: #f4f9ff;
  --temporal-body-text: #0f172a;
  --temporal-menu-surface: rgba(255, 255, 255, 0.95);
  --temporal-nav-bg: rgba(255, 255, 255, 0.95);
  --temporal-nav-border: rgba(148, 163, 184, 0.45);
  --temporal-nav-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  --temporal-panel-bg: rgba(255, 255, 255, 0.95);
  --temporal-panel-bg-soft: rgba(241, 245, 249, 0.9);
  --temporal-panel-border: rgba(15, 23, 42, 0.08);
  --temporal-panel-text: #0f172a;
  --temporal-panel-muted: #475569;
  --temporal-panel-subtle: rgba(71, 85, 105, 0.75);
  --temporal-link-600: #0e7490;
  --temporal-link-700: #0f172a;
  --temporal-info-bg: rgba(14, 165, 233, 0.12);
  --temporal-dashboard-link: #0f172a;
  --temporal-dashboard-link-hover-bg: rgba(14, 165, 233, 0.12);
  --temporal-dashboard-link-hover: #0f172a;
  --temporal-accent-gradient: linear-gradient(135deg, #0ea5e9, #38bdf8);
  --temporal-accent-gradient-strong: linear-gradient(135deg, #2563eb, #0ea5e9);
  --temporal-accent-contrast: #f8fafc;
  --temporal-accent-contrast-strong: #f8fafc;
  --dashboard-pill-shell-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(226, 244, 255, 0.95));
  --dashboard-pill-shell-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  --dashboard-pill-shell-border: rgba(148, 163, 184, 0.3);
  --dashboard-pill-trigger-color: rgba(15, 23, 42, 0.75);
  --dashboard-pill-trigger-hover-color: #0f172a;
  --dashboard-pill-trigger-active-color: #0f172a;
  --dashboard-pill-trigger-active-bg: rgba(14, 165, 233, 0.18);
  --dashboard-pill-focus-ring: 0 0 0 2px rgba(14, 165, 233, 0.35), 0 0 0 4px rgba(14, 165, 233, 0.2);
  --dashboard-pill-highlight-bg: linear-gradient(120deg, #38bdf8, #fbbf24);
  --dashboard-pill-highlight-shadow: 0 15px 30px rgba(14, 165, 233, 0.28);
  --dashboard-pill-hover-bg: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(236, 254, 255, 0.9));
  --dashboard-pill-hover-shadow: inset 0 0 26px rgba(14, 165, 233, 0.15);
  --temporal-light-post-strong: #0f172a;
  --temporal-light-post-muted: #273449;
  --temporal-light-post-subtle: #4b5568;
  --temporal-calendar-border: rgba(71, 85, 105, 0.4);
  --temporal-calendar-halo: rgba(14, 165, 233, 0.2);
}

/* Autumn-specific warmth for light Temporal days so surfaces match the fall sky */
body[data-atmosphere="temporal"][data-temporal-season="autumn"][data-temporal-mode="light"] {
  --temporal-body-bg: #f7e5d6;
  --temporal-body-text: #3f2a1b;
  --temporal-menu-surface: rgba(255, 249, 241, 0.96);
  --temporal-nav-bg: rgba(255, 245, 232, 0.95);
  --temporal-nav-border: rgba(193, 128, 64, 0.25);
  --temporal-nav-shadow: 0 18px 38px rgba(120, 53, 15, 0.2);
  --temporal-panel-bg: rgba(255, 244, 233, 0.96);
  --temporal-panel-bg-soft: rgba(250, 231, 213, 0.92);
  --temporal-panel-border: rgba(217, 119, 6, 0.25);
  --temporal-panel-text: #4a2a16;
  --temporal-panel-muted: #8b5e3c;
  --temporal-panel-subtle: rgba(74, 35, 17, 0.9);
  --temporal-link-600: #b45309;
  --temporal-link-700: #92400e;
  --temporal-info-bg: rgba(245, 158, 11, 0.18);
  --temporal-dashboard-link: #7c2d12;
  --temporal-dashboard-link-hover-bg: rgba(217, 119, 6, 0.12);
  --temporal-dashboard-link-hover: #431407;
  --temporal-accent-gradient: linear-gradient(135deg, #fbd38d, #fb923c);
  --temporal-accent-gradient-strong: linear-gradient(135deg, #f97316, #ea580c);
  --temporal-accent-contrast: #3f1d12;
  --temporal-accent-contrast-strong: #2a1008;
  --dashboard-pill-shell-bg: linear-gradient(135deg, rgba(255, 248, 240, 0.94), rgba(252, 233, 210, 0.94));
  --dashboard-pill-shell-shadow: 0 18px 35px rgba(120, 53, 15, 0.18);
  --dashboard-pill-shell-border: rgba(217, 119, 6, 0.32);
  --dashboard-pill-trigger-color: rgba(67, 20, 7, 0.75);
  --dashboard-pill-trigger-hover-color: #431407;
  --dashboard-pill-trigger-active-color: #431407;
  --dashboard-pill-trigger-active-bg: rgba(251, 146, 60, 0.22);
  --dashboard-pill-focus-ring: 0 0 0 2px rgba(251, 191, 36, 0.35), 0 0 0 4px rgba(251, 146, 60, 0.25);
  --dashboard-pill-highlight-bg: linear-gradient(120deg, #f97316, #fbbf24);
  --dashboard-pill-highlight-shadow: 0 15px 28px rgba(217, 119, 6, 0.25);
  --dashboard-pill-hover-bg: linear-gradient(120deg, rgba(255, 255, 255, 0.85), rgba(252, 233, 210, 0.9));
  --dashboard-pill-hover-shadow: inset 0 0 22px rgba(217, 119, 6, 0.18);
  --menu-surface-color: rgba(255, 249, 241, 0.96);
  --temporal-light-post-strong: #3c2414;
  --temporal-light-post-muted: #5d3820;
  --temporal-light-post-subtle: #7b4a2c;
  --temporal-calendar-border: rgba(139, 94, 60, 0.45);
  --temporal-calendar-halo: rgba(217, 119, 6, 0.22);
}

body[data-atmosphere="temporal"] nav {
  background: var(--temporal-nav-bg, rgba(2, 6, 23, 0.85)) !important;
  color: var(--temporal-panel-text, #f8fafc) !important;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--temporal-nav-border, rgba(56, 189, 248, 0.12));
  box-shadow: var(--temporal-nav-shadow, 0 25px 60px rgba(2, 6, 23, 0.65));
}

body[data-atmosphere="temporal"] .bg-white,
body[data-atmosphere="temporal"] .bg-gray-50,
body[data-atmosphere="temporal"] .bg-gray-100 {
  background: var(--temporal-panel-bg, rgba(15, 23, 42, 0.7)) !important;
  color: var(--temporal-panel-text, #ecfeff) !important;
  border-color: var(--temporal-panel-border, rgba(56, 189, 248, 0.12)) !important;
}

body[data-atmosphere="temporal"] .bg-gray-200,
body[data-atmosphere="temporal"] .bg-gray-300,
body[data-atmosphere="temporal"] .hover\:bg-gray-300:hover {
  background: var(--temporal-panel-bg-soft, rgba(15, 23, 42, 0.58)) !important;
  color: var(--temporal-panel-text, #e0f2fe) !important;
  border-color: var(--temporal-panel-border, rgba(56, 189, 248, 0.12)) !important;
}

body[data-atmosphere="temporal"] .text-gray-900,
body[data-atmosphere="temporal"] .text-gray-800,
body[data-atmosphere="temporal"] .text-gray-700 {
  color: var(--temporal-panel-text, #f8fafc) !important;
}

body[data-atmosphere="temporal"] .text-gray-600 {
  color: var(--temporal-panel-muted, #c7e4ff) !important;
}

body[data-atmosphere="temporal"] .text-gray-500 {
  color: var(--temporal-panel-subtle, rgba(226, 232, 240, 0.7)) !important;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] :is(.journal-entry-card, #journal-container article) {
  color: var(--temporal-light-post-strong, var(--temporal-panel-text, #0f172a)) !important;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"]
  :is(.journal-entry-card, #journal-container article)
  .prose {
  color: var(--temporal-light-post-strong, var(--temporal-panel-text, #0f172a)) !important;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"]
  :is(.journal-entry-card, #journal-container article)
  :is(.text-gray-900, .text-gray-800, .text-gray-700) {
  color: var(--temporal-light-post-strong, var(--temporal-panel-text, #0f172a)) !important;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"]
  :is(.journal-entry-card, #journal-container article)
  .text-gray-600 {
  color: var(--temporal-light-post-muted, rgba(27, 38, 57, 0.92)) !important;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"]
  :is(.journal-entry-card, #journal-container article)
  :is(.text-gray-500, .text-gray-400) {
  color: var(--temporal-light-post-subtle, rgba(43, 57, 80, 0.85)) !important;
}

body[data-atmosphere="temporal"] .border-gray-200 {
  border-color: var(--temporal-panel-border, rgba(56, 189, 248, 0.2)) !important;
}

body[data-atmosphere="temporal"] .tracker-card .calendar > div {
  border-color: var(--temporal-calendar-border, rgba(148, 163, 184, 0.4)) !important;
  box-shadow: 0 0 0 1px var(--temporal-calendar-halo, rgba(56, 189, 248, 0.18));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body[data-atmosphere="temporal"] .tracker-card .calendar > div[data-alert='true'] {
  border-color: #fecaca !important;
  box-shadow: none;
}

body[data-atmosphere="temporal"] .bg-blue-500,
body[data-atmosphere="temporal"] .hover\:bg-blue-500:hover {
  background-image: var(--temporal-accent-gradient, linear-gradient(135deg, #38bdf8, #fbbf24)) !important;
  color: var(--temporal-accent-contrast, #081223) !important;
}

body[data-atmosphere="temporal"] .hover\:bg-blue-600:hover {
  background-image: var(--temporal-accent-gradient-strong, linear-gradient(135deg, #0ea5e9, #f97316)) !important;
  color: var(--temporal-accent-contrast-strong, #030712) !important;
}

body[data-atmosphere="temporal"] .focus\:ring-blue-400:focus {
  --tw-ring-color: rgba(56, 189, 248, 0.45) !important;
}

body[data-atmosphere="temporal"] .text-blue-600 {
  color: var(--temporal-link-600, #7dd3fc) !important;
}

body[data-atmosphere="temporal"] .text-blue-700 {
  color: var(--temporal-link-700, #38bdf8) !important;
}

body[data-atmosphere="temporal"] .bg-blue-100 {
  background-color: var(--temporal-info-bg, rgba(125, 211, 252, 0.18)) !important;
}

body[data-atmosphere="temporal"] .dashboard-link {
  color: var(--temporal-dashboard-link, #ecfeff) !important;
}

body[data-atmosphere="temporal"] .dashboard-link:hover {
  background-color: var(--temporal-dashboard-link-hover-bg, rgba(56, 189, 248, 0.18)) !important;
  color: var(--temporal-dashboard-link-hover, #fcd34d) !important;
}

body[data-atmosphere="temporal"][data-temporal-mode="dark"] #advisor-toggle {
  background:
    radial-gradient(circle at 26% 24%, rgba(56, 189, 248, 0.42), transparent 52%),
    radial-gradient(circle at 74% 76%, rgba(52, 211, 153, 0.36), transparent 55%),
    linear-gradient(140deg, #0ea5e9 0%, #0369a1 48%, #0f766e 100%);
  color: #e8f4ff !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow:
    0 12px 32px rgba(2, 6, 23, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.28);
}

body[data-atmosphere="temporal"][data-temporal-mode="dark"] #advisor-toggle .traxy-symbol {
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(226, 232, 240, 0.82);
  border-color: rgba(226, 232, 240, 0.82);
}

body[data-atmosphere="temporal"][data-temporal-weather="clear"] nav {
  background: var(--temporal-nav-bg, rgba(15, 23, 42, 0.75)) !important;
  border-bottom-color: rgba(253, 224, 71, 0.35);
  box-shadow:
    0 25px 60px rgba(253, 224, 71, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-atmosphere="temporal"] .shadow {
  box-shadow: 0 25px 45px rgba(2, 6, 23, 0.6) !important;
}

body[data-atmosphere="temporal"] input,
body[data-atmosphere="temporal"] select,
body[data-atmosphere="temporal"] textarea {
  background-color: var(--temporal-panel-bg, rgba(15, 23, 42, 0.75)) !important;
  color: var(--temporal-panel-text, #f1f5f9) !important;
  border-color: var(--temporal-panel-border, rgba(56, 189, 248, 0.18)) !important;
}

body[data-atmosphere="temporal"] input::placeholder,
body[data-atmosphere="temporal"] textarea::placeholder {
  color: var(--temporal-panel-muted, rgba(148, 163, 184, 0.75)) !important;
}

body[data-atmosphere="temporal"] #temporal-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
  background: linear-gradient(180deg, var(--temporal-sky-top), var(--temporal-sky-bottom));
  transition: background 1.2s ease;
}

body[data-atmosphere="temporal"] #temporal-layer::before {
  content: '';
  position: absolute;
  inset: 40% -10% -30%;
  background: radial-gradient(circle at 50% 0%, var(--temporal-halo), transparent 70%);
  filter: blur(6px);
  opacity: 0.9;
  transition: opacity 0.8s ease;
}

body[data-atmosphere="temporal"] #temporal-layer::after {
  content: '';
  position: absolute;
  width: clamp(300px, 34vw, 520px);
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  top: clamp(4%, 8vw, 12%);
  right: clamp(6%, 10vw, 14%);
  box-shadow:
    0 0 80px rgba(248, 250, 252, 0.22),
    0 0 160px rgba(59, 130, 246, 0.25);
  opacity: 0.8;
  transition: transform 3s ease, opacity 0.8s ease;
}

body[data-atmosphere="temporal"] #temporal-layer.temporal-layer--static *,
body[data-atmosphere="temporal"] #temporal-layer.temporal-layer--static::before,
body[data-atmosphere="temporal"] #temporal-layer.temporal-layer--static::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
}

body[data-atmosphere="temporal"] #temporal-layer.temporal-layer--static .temporal-leaves {
  animation: none;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(at 30% 20%, rgba(56, 189, 248, 0.28), transparent 55%),
    radial-gradient(at 70% 10%, rgba(236, 72, 153, 0.18), transparent 60%),
    radial-gradient(at 50% 80%, rgba(254, 215, 170, 0.12), transparent 65%);
  mix-blend-mode: screen;
  opacity: 0.5;
  animation: temporal-aurora 28s ease-in-out infinite alternate;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-constellations {
  position: absolute;
  inset: -5% -10%;
  background-image: radial-gradient(var(--temporal-stars) 1px, transparent 1px);
  background-size: 220px 220px;
  opacity: 0.25;
  transform: rotate(2deg);
  animation: temporal-stars 38s linear infinite;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-leaves {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(249, 115, 22, 0.35) 18%, transparent 40%),
    radial-gradient(circle at 60% 30%, rgba(217, 119, 6, 0.25) 22%, transparent 45%),
    radial-gradient(circle at 30% 70%, rgba(251, 191, 36, 0.3) 15%, transparent 35%);
  filter: blur(8px);
  animation: temporal-leaves 24s linear infinite;
  mix-blend-mode: screen;
}

body[data-atmosphere="temporal"][data-temporal-season="autumn"] #temporal-layer .temporal-leaves {
  opacity: 0.35;
}

body[data-atmosphere="temporal"][data-temporal-season="autumn"][data-temporal-weather="clear"] #temporal-layer .temporal-leaves {
  opacity: 0.45;
}

body[data-atmosphere="temporal"][data-temporal-weather="snow"] #temporal-layer .temporal-leaves,
body[data-atmosphere="temporal"][data-temporal-weather="rain"] #temporal-layer .temporal-leaves,
body[data-atmosphere="temporal"][data-temporal-weather="storm"] #temporal-layer .temporal-leaves {
  opacity: 0;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-precip {
  position: absolute;
  inset: -10%;
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-precip--rain {
  display: none;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-precip::before {
  content: '';
  position: absolute;
  inset: 0;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-precip--rain::before {
  background-image: repeating-linear-gradient(
    190deg,
    rgba(56, 189, 248, 0.35) 0,
    rgba(56, 189, 248, 0.35) 1px,
    transparent 1px,
    transparent 12px
  );
  animation: temporal-rain 1.4s linear infinite;
  opacity: 0.6;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-precip--snow::before {
  background-image: radial-gradient(rgba(248, 250, 252, 0.85) 1px, transparent 1px);
  background-size: 140px 140px;
  animation: temporal-snow 12s linear infinite;
  filter: blur(0.5px);
  opacity: 0.7;
}

body[data-atmosphere="temporal"] #temporal-layer .temporal-precip--mist::before {
  background: radial-gradient(circle, rgba(226, 232, 240, 0.12), transparent 70%);
  filter: blur(35px);
  opacity: 0.55;
  animation: temporal-mist 18s ease-in-out infinite alternate;
}

body[data-atmosphere="temporal"][data-temporal-weather="rain"] #temporal-layer .temporal-precip--rain {
  opacity: 0.55;
}

body[data-atmosphere="temporal"][data-temporal-weather="storm"] #temporal-layer .temporal-precip--rain {
  opacity: 0.7;
}

body[data-atmosphere="temporal"][data-temporal-weather="snow"] #temporal-layer .temporal-precip--snow {
  opacity: 0.65;
}

body[data-atmosphere="temporal"][data-temporal-weather="fog"] #temporal-layer .temporal-precip--mist {
  opacity: 0.55;
}

body[data-atmosphere="temporal"][data-temporal-phase="day"] #temporal-layer .temporal-constellations {
  opacity: 0.15;
}

body[data-atmosphere="temporal"][data-temporal-phase="night"] #temporal-layer .temporal-constellations {
  opacity: 0.4;
}

body[data-atmosphere="temporal"][data-temporal-season="spring"] #temporal-layer::before {
  background: radial-gradient(circle at 50% 0%, rgba(186, 230, 253, 0.45), transparent 70%);
}

body[data-atmosphere="temporal"][data-temporal-season="summer"] #temporal-layer::before {
  background: radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.32), transparent 70%);
}

body[data-atmosphere="temporal"][data-temporal-season="autumn"] #temporal-layer::before {
  background: radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.32), transparent 70%);
}

body[data-atmosphere="temporal"][data-temporal-season="winter"] #temporal-layer::before {
  background: radial-gradient(circle at 50% 0%, rgba(148, 197, 255, 0.4), transparent 70%);
}

body[data-atmosphere="temporal"][data-temporal-phase="dawn"] #temporal-layer::after {
  transform: translateY(-20%) scale(0.8);
  opacity: 0.9;
}

body[data-atmosphere="temporal"][data-temporal-phase="dusk"] #temporal-layer::after {
  transform: translateY(5%) scale(1.1);
  opacity: 0.7;
}

body[data-atmosphere="temporal"][data-temporal-phase="night"] #temporal-layer::after {
  opacity: 0.4;
  box-shadow:
    0 0 80px rgba(148, 163, 184, 0.24),
    0 0 140px rgba(14, 165, 233, 0.2);
}

body[data-atmosphere="temporal"] [data-temporal-settings-target] {
  border-color: rgba(56, 189, 248, 0.18);
  background: rgba(15, 23, 42, 0.35);
  color: rgba(226, 232, 240, 0.9);
}

body[data-atmosphere="temporal"] [data-temporal-settings-target] p {
  color: rgba(226, 232, 240, 0.7);
}

body[data-atmosphere="temporal"] .temporal-card {
  width: 100%;
  background: var(--temporal-card-bg);
  border: 1px solid var(--temporal-card-border);
  border-radius: 1.25rem;
  padding: 1.25rem 1.35rem;
  color: #f8fafc;
  box-shadow:
    0 25px 35px rgba(3, 7, 18, 0.75),
    0 2px 8px rgba(14, 116, 144, 0.25);
  backdrop-filter: blur(18px);
  transition:
    border-color 0.4s ease,
    background 0.4s ease,
    transform 0.4s ease;
}

body[data-atmosphere="temporal"] .temporal-card.temporal-card--static {
  animation: none !important;
}

body[data-atmosphere="temporal"] .temporal-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

body[data-atmosphere="temporal"] .temporal-card__title {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.25rem;
}

body[data-atmosphere="temporal"] .temporal-card__location {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: #f1f5f9;
}

body[data-atmosphere="temporal"] .temporal-card__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

body[data-atmosphere="temporal"] .temporal-card__actions button {
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(15, 23, 42, 0.4);
  color: #f0fdfa;
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

body[data-atmosphere="temporal"] .temporal-card__actions button:hover:not(:disabled) {
  border-color: rgba(248, 250, 252, 0.8);
  background: rgba(248, 250, 252, 0.12);
}

body[data-atmosphere="temporal"] .temporal-card__actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

body[data-atmosphere="temporal"] .temporal-card__metrics {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

body[data-atmosphere="temporal"] .temporal-card__metric {
  flex: 1 1 120px;
}

body[data-atmosphere="temporal"] .temporal-card__metric-value {
  font-size: 2rem;
  font-weight: 600;
}

body[data-atmosphere="temporal"] .temporal-card__metric-label {
  font-size: 0.8rem;
  color: var(--temporal-card-muted);
}

body[data-atmosphere="temporal"] .temporal-card__chips {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

body[data-atmosphere="temporal"] .temporal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(248, 250, 252, 0.85);
}

body[data-atmosphere="temporal"] .temporal-chip__dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
}

body[data-atmosphere="temporal"] .temporal-card__narrative {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.4;
}

body[data-atmosphere="temporal"] .temporal-card__status {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.7);
}

body[data-atmosphere="temporal"] .temporal-card__status[data-tone="error"] {
  color: #fca5a5;
}

body[data-atmosphere="temporal"] .temporal-card__status[data-tone="success"] {
  color: #bef264;
}

body[data-atmosphere="temporal"] .temporal-card__status[data-tone="info"] {
  color: #bae6fd;
}

/* Journal feed entries */
body[data-atmosphere="temporal"] .journal-entry-card {
  background: rgba(7, 16, 33, 0.92) !important;
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow:
    0 35px 65px rgba(2, 6, 23, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] .journal-entry-card {
  background: var(--temporal-panel-bg, rgba(255, 255, 255, 0.95)) !important;
  border-color: var(--temporal-panel-border, rgba(15, 23, 42, 0.08)) !important;
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body[data-atmosphere="temporal"] .journal-entry-card__header {
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] .journal-entry-card__header {
  border-color: var(--temporal-panel-border, rgba(15, 23, 42, 0.08));
}

body[data-atmosphere="temporal"] .journal-entry-card__avatar {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(8, 18, 35, 0.92);
  color: #f8fafc;
  box-shadow: 0 15px 35px rgba(2, 6, 23, 0.65);
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] .journal-entry-card__avatar {
  background: var(--temporal-panel-bg-soft, rgba(241, 245, 249, 0.9));
  border-color: var(--temporal-panel-border, rgba(15, 23, 42, 0.12));
  color: var(--temporal-panel-text, #0f172a);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

body[data-atmosphere="temporal"] .journal-entry-card__timestamp {
  color: rgba(226, 232, 240, 0.72) !important;
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] .journal-entry-card__timestamp {
  color: var(--temporal-panel-subtle, rgba(71, 85, 105, 0.75)) !important;
}

body[data-atmosphere="temporal"] .journal-entry-card__title {
  color: #fef9c3;
  letter-spacing: 0.01em;
  text-shadow: 0 6px 22px rgba(15, 23, 42, 0.65);
}

@supports (-webkit-background-clip: text) {
  body[data-atmosphere="temporal"] .journal-entry-card__title {
    background-image: linear-gradient(120deg, #fcd34d, #38bdf8 70%);
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] .journal-entry-card__title {
  color: var(--temporal-light-post-strong, var(--temporal-panel-text, #0f172a)) !important;
  text-shadow: none;
}

@supports (-webkit-background-clip: text) {
  body[data-atmosphere="temporal"][data-temporal-mode="light"] .journal-entry-card__title {
    background-image: none;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: var(--temporal-light-post-strong, var(--temporal-panel-text, #0f172a)) !important;
  }
}

/* Journal feed surfaces and meta text (Temporal) */
body[data-atmosphere="temporal"] #journal-feed :is(.bg-gray-50, .bg-gray-100) {
  background: var(--temporal-panel-bg-soft, rgba(15, 23, 42, 0.6)) !important;
}

body[data-atmosphere="temporal"] #journal-feed :is(.text-gray-400, .text-gray-300) {
  color: var(--temporal-panel-subtle, rgba(226, 232, 240, 0.78)) !important;
}

body[data-atmosphere="temporal"] #journal-feed .border-gray-300 {
  border-color: var(--temporal-panel-border, rgba(56, 189, 248, 0.18)) !important;
}

body[data-atmosphere="temporal"] #journal-feed .hover\:bg-gray-200:hover {
  background: var(--temporal-panel-bg-soft, rgba(15, 23, 42, 0.62)) !important;
}

body[data-atmosphere="temporal"] #journal-feed .bg-blue-50 {
  background-color: rgba(56, 189, 248, 0.12) !important;
  color: var(--temporal-link-700, #38bdf8) !important;
}

body[data-atmosphere="temporal"] #journal-feed .border-blue-100 {
  border-color: rgba(56, 189, 248, 0.22) !important;
}

body[data-atmosphere="temporal"] #journal-feed textarea,
body[data-atmosphere="temporal"] #journal-feed input {
  background-color: var(--temporal-panel-bg-soft, rgba(15, 23, 42, 0.7)) !important;
}

body[data-atmosphere="temporal"] .temporal-card--pulse-light {
  animation: temporal-card-pulse 1.2s ease;
}

body[data-atmosphere="temporal"] .temporal-card--pulse-medium {
  animation: temporal-card-pulse 1.45s ease;
}

body[data-atmosphere="temporal"] .temporal-card--pulse-heavy {
  animation: temporal-card-pulse 1.65s ease;
}

@media (max-width: 768px) {
  body[data-atmosphere="temporal"] .temporal-card {
    padding: 1rem;
  }

  body[data-atmosphere="temporal"] .temporal-card__metric-value {
    font-size: 1.5rem;
  }
}

@keyframes temporal-aurora {
  0% {
    transform: translate3d(-4%, -2%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(3%, 1%, 0) scale(1.08);
  }
}

@keyframes temporal-stars {
  0% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
  100% {
    transform: rotate(360deg) translate3d(0, 0, 0);
  }
}

@keyframes temporal-leaves {
  0% {
    transform: translate3d(-3%, -3%, 0) rotate(0deg) scale(1.05);
  }
  50% {
    transform: translate3d(2%, 3%, 0) rotate(6deg) scale(1.08);
  }
  100% {
    transform: translate3d(5%, -2%, 0) rotate(-4deg) scale(1.04);
  }
}

@keyframes temporal-rain {
  0% {
    transform: translate3d(0, -5%, 0);
  }
  100% {
    transform: translate3d(-3%, 5%, 0);
  }
}

@keyframes temporal-snow {
  0% {
    transform: translate3d(0, -5%, 0);
  }
  50% {
    transform: translate3d(1%, 2%, 0);
  }
  100% {
    transform: translate3d(-1%, 5%, 0);
  }
}

@keyframes temporal-mist {
  0% {
    transform: translateY(-3%);
  }
  100% {
    transform: translateY(3%);
  }
}

@keyframes temporal-card-pulse {
  0% {
    box-shadow: 0 25px 45px rgba(3, 7, 18, 0.75), 0 0 0 rgba(56, 189, 248, 0.2);
  }
  40% {
    box-shadow:
      0 25px 45px rgba(3, 7, 18, 0.8),
      0 0 25px rgba(56, 189, 248, 0.35);
  }
  100% {
    box-shadow:
      0 25px 45px rgba(3, 7, 18, 0.75),
      0 0 0 rgba(56, 189, 248, 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"],
body[data-atmosphere="temporal"] {
  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,
body[data-atmosphere="temporal"] a {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* ─── Tracker dialog theme overrides ───────────────────────────────────── */
body[data-atmosphere="clean"] {
  --tracker-dialog-surface: linear-gradient(140deg, #ffffff, #f3f7fb);
  --tracker-dialog-border: rgba(148, 163, 184, 0.35);
  --tracker-dialog-text: #0f172a;
  --tracker-dialog-muted: #475569;
  --tracker-dialog-accent: #0ea5e9;
  --tracker-dialog-accent-strong: #2563eb;
  --tracker-dialog-backdrop: rgba(15, 23, 42, 0.25);
  --tracker-dialog-input-bg: rgba(255, 255, 255, 0.92);
  --tracker-dialog-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  --tracker-dialog-glow: radial-gradient(circle at 20% 18%, rgba(59, 130, 246, 0.22), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.16), transparent 42%);
}

body[data-atmosphere="kitty_kat"] {
  --tracker-dialog-surface: linear-gradient(150deg, rgba(255, 240, 248, 0.96), rgba(255, 220, 235, 0.92));
  --tracker-dialog-border: rgba(255, 149, 214, 0.55);
  --tracker-dialog-text: #6b214f;
  --tracker-dialog-muted: #a64e8a;
  --tracker-dialog-accent: #ff69b4;
  --tracker-dialog-accent-strong: #ff4da6;
  --tracker-dialog-backdrop: rgba(255, 192, 218, 0.28);
  --tracker-dialog-input-bg: rgba(255, 255, 255, 0.96);
  --tracker-dialog-shadow: 0 18px 44px rgba(255, 105, 180, 0.32);
  --tracker-dialog-glow: radial-gradient(circle at 18% 15%, rgba(255, 149, 214, 0.36), transparent 42%),
    radial-gradient(circle at 82% 6%, rgba(255, 214, 232, 0.7), transparent 50%);
}

body[data-atmosphere="fighter"] {
  --tracker-dialog-surface: linear-gradient(150deg, rgba(20, 9, 12, 0.96), rgba(36, 14, 18, 0.9));
  --tracker-dialog-border: rgba(249, 115, 22, 0.35);
  --tracker-dialog-text: #fef2f2;
  --tracker-dialog-muted: rgba(254, 226, 226, 0.78);
  --tracker-dialog-accent: #f97316;
  --tracker-dialog-accent-strong: #ef4444;
  --tracker-dialog-backdrop: rgba(7, 5, 8, 0.72);
  --tracker-dialog-input-bg: rgba(22, 10, 12, 0.85);
  --tracker-dialog-shadow: 0 32px 78px rgba(7, 2, 2, 0.78);
  --tracker-dialog-glow: radial-gradient(circle at 16% 18%, rgba(239, 68, 68, 0.28), transparent 42%),
    radial-gradient(circle at 85% 8%, rgba(249, 115, 22, 0.32), transparent 48%);
}

body[data-atmosphere="traxyz"] {
  --tracker-dialog-surface: linear-gradient(140deg, #ffffff, #eef2ff);
  --tracker-dialog-border: rgba(148, 163, 184, 0.3);
  --tracker-dialog-text: #0f172a;
  --tracker-dialog-muted: #475569;
  --tracker-dialog-accent: #2563eb;
  --tracker-dialog-accent-strong: #0ea5e9;
  --tracker-dialog-backdrop: rgba(15, 23, 42, 0.22);
  --tracker-dialog-input-bg: rgba(255, 255, 255, 0.94);
  --tracker-dialog-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
  --tracker-dialog-glow: radial-gradient(circle at 16% 14%, rgba(37, 99, 235, 0.18), transparent 42%),
    radial-gradient(circle at 82% 0%, rgba(14, 165, 233, 0.16), transparent 48%);
}

body[data-atmosphere="temporal"] {
  --tracker-dialog-surface: linear-gradient(150deg, rgba(5, 12, 26, 0.96), rgba(7, 14, 33, 0.94));
  --tracker-dialog-border: rgba(56, 189, 248, 0.28);
  --tracker-dialog-text: #ecfeff;
  --tracker-dialog-muted: rgba(199, 228, 255, 0.85);
  --tracker-dialog-accent: #38bdf8;
  --tracker-dialog-accent-strong: #fbbf24;
  --tracker-dialog-backdrop: rgba(3, 7, 18, 0.72);
  --tracker-dialog-input-bg: rgba(8, 16, 33, 0.82);
  --tracker-dialog-shadow: 0 30px 75px rgba(2, 6, 23, 0.68);
  --tracker-dialog-glow: radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.28), transparent 42%),
    radial-gradient(circle at 86% 6%, rgba(251, 191, 36, 0.22), transparent 52%);
}

body[data-atmosphere="temporal"][data-temporal-mode="light"] {
  --tracker-dialog-surface: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.96));
  --tracker-dialog-border: rgba(56, 189, 248, 0.35);
  --tracker-dialog-text: #0f172a;
  --tracker-dialog-muted: #1e293b;
  --tracker-dialog-accent: #0ea5e9;
  --tracker-dialog-accent-strong: #2563eb;
  --tracker-dialog-backdrop: rgba(15, 23, 42, 0.18);
  --tracker-dialog-input-bg: rgba(255, 255, 255, 0.95);
  --tracker-dialog-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  --tracker-dialog-glow: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.24), transparent 40%),
    radial-gradient(circle at 82% 0%, rgba(251, 191, 36, 0.22), transparent 50%);
}
