/* TmiGochi FX — particle layers, stage pulses, action emblems */

.tg-fx {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint;
}

.tg-fx__layer {
  position: absolute;
  inset: 0;
}

/* ---- Particles ---- */
.tg-fx__p {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: 0;
  border-radius: 50%;
  will-change: transform, opacity;
  animation: tg-fx-burst var(--dur, 0.9s) cubic-bezier(0.2, 0.7, 0.2, 1) var(--delay, 0ms) forwards;
  background: var(--c, #c8f542);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c, #c8f542) 70%, transparent);
  opacity: 0;
}

.tg-fx__p[data-kind="crumb"] {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  animation-name: tg-fx-fall-in;
}

.tg-fx__p[data-kind="berry"] {
  width: 12px;
  height: 12px;
  border-radius: 50% 40% 50% 40%;
  animation-name: tg-fx-fall-in;
}

.tg-fx__p[data-kind="bubble"] {
  background: transparent !important;
  border: 2px solid var(--c, #67e8f9);
  box-shadow: inset 0 0 6px color-mix(in srgb, var(--c, #67e8f9) 40%, transparent);
  animation-name: tg-fx-rise;
}

.tg-fx__p[data-kind="drop"] {
  width: 6px;
  height: 10px;
  border-radius: 40% 40% 55% 55%;
  animation-name: tg-fx-splash;
}

.tg-fx__p[data-kind="zzz"] {
  width: auto;
  height: auto;
  background: none !important;
  box-shadow: none;
  color: #99f6e4;
  font-family: var(--tg-font-display, Syne, sans-serif);
  font-weight: 800;
  font-size: clamp(0.9rem, 2.4vw, 1.35rem);
  text-shadow: 0 0 12px rgba(45, 212, 191, 0.55);
  animation-name: tg-fx-zzz;
}

.tg-fx__p[data-kind="note"] {
  width: auto;
  height: auto;
  background: none !important;
  box-shadow: none;
  color: var(--c, #fbbf24);
  font-size: clamp(0.95rem, 2.6vw, 1.45rem);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c, #fbbf24) 60%, transparent));
  animation-name: tg-fx-note;
}

.tg-fx__p[data-kind="glyph"] {
  width: auto;
  height: auto;
  background: none !important;
  box-shadow: none;
  color: var(--c, #c8f542);
  font-family: var(--tg-font-display, Syne, sans-serif);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  animation-name: tg-fx-orbit;
}

.tg-fx__p[data-kind="coin"] {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7ed, #fbbf24 45%, #d97706);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.55);
  animation-name: tg-fx-coin;
}

.tg-fx__p[data-kind="star"] {
  width: 12px;
  height: 12px;
  background: var(--c, #fde68a);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  border-radius: 0;
  animation-name: tg-fx-twinkle;
}

.tg-fx__p[data-kind="leaf"] {
  width: 11px;
  height: 16px;
  border-radius: 50% 0 50% 0;
  animation-name: tg-fx-drift;
}

.tg-fx__p[data-kind="ember"] {
  width: 7px;
  height: 14px;
  border-radius: 45% 45% 20% 20%;
  animation-name: tg-fx-rise-fast;
}

.tg-fx__p[data-kind="pixel"] {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 0 10px var(--c, #c8f542);
  animation-name: tg-fx-pixel;
}

.tg-fx__p[data-kind="shard"] {
  width: 10px;
  height: 16px;
  border-radius: 2px;
  clip-path: polygon(20% 0%, 100% 15%, 80% 100%, 0% 75%);
  animation-name: tg-fx-shard;
}

.tg-fx__p[data-kind="ring"] {
  width: var(--size, 40px);
  height: var(--size, 40px);
  margin-left: calc(var(--size, 40px) / -2);
  margin-top: calc(var(--size, 40px) / -2);
  background: transparent !important;
  border: 2px solid var(--c, #c8f542);
  box-shadow: none;
  animation-name: tg-fx-ring;
}

.tg-fx__p[data-kind="heart"] {
  width: auto;
  height: auto;
  background: none !important;
  box-shadow: none;
  color: #fb7185;
  font-size: 1rem;
  filter: drop-shadow(0 0 10px rgba(251, 113, 133, 0.55));
  animation-name: tg-fx-rise;
}

.tg-fx__p[data-kind="ball"] {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 30% 30%, #fda4af, #ff6b4a 55%, #9a3412);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation-name: tg-fx-ball;
}

.tg-fx__p[data-kind="butterfly"] {
  width: 16px;
  height: 12px;
  background: linear-gradient(135deg, #c8f542, #2dd4bf);
  border-radius: 60% 10% 60% 10%;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.45);
  animation-name: tg-fx-butterfly;
}

.tg-fx__p[data-kind="meteor"] {
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #fde68a 40%, transparent);
  box-shadow: 0 0 16px #fbbf24;
  animation-name: tg-fx-meteor;
}

/* Emblem flash — larger, held longer for readable staging */
.tg-fx__emblem {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%) scale(0.35);
  font-size: clamp(2rem, 6.5vw, 3.2rem);
  line-height: 1;
  opacity: 0;
  filter: drop-shadow(0 0 22px rgba(200, 245, 66, 0.55));
  animation: tg-fx-emblem 1.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 2;
}

.tg-fx__caption {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, 0);
  z-index: 2;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-family: var(--tg-font-display, Syne, sans-serif);
  font-size: clamp(0.65rem, 1.8vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f8fafc;
  background: color-mix(in srgb, #0f172a 72%, transparent);
  border: 1px solid color-mix(in srgb, #c8f542 35%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: tg-fx-caption 1.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.tg-fx__emblem--prop {
  width: clamp(3.2rem, 12vw, 4.5rem);
  height: clamp(3.2rem, 12vw, 4.5rem);
  display: grid;
  place-items: center;
}

.tg-fx__emblem--prop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

/* Item / room stage themes — furniture & ownership diversify the surface */
.tg-stage-frame[data-item-theme="arcade"] {
  --tg-stage-tint: rgba(200, 245, 66, 0.12);
  box-shadow: inset 0 0 80px var(--tg-stage-tint);
}

.tg-stage-frame[data-item-theme="cozy"] {
  box-shadow: inset 0 0 90px rgba(251, 191, 36, 0.14);
}

.tg-stage-frame[data-item-theme="spa"] {
  box-shadow: inset 0 0 90px rgba(103, 232, 249, 0.16);
}

.tg-stage-frame[data-item-theme="library"] {
  box-shadow: inset 0 0 80px rgba(253, 230, 138, 0.14);
}

.tg-stage-frame[data-item-theme="workshop"] {
  box-shadow: inset 0 0 80px rgba(251, 146, 60, 0.14);
}

.tg-stage-frame[data-item-theme="ocean"] {
  box-shadow: inset 0 0 90px rgba(56, 189, 248, 0.16);
}

.tg-stage-frame[data-item-theme="forest"] {
  box-shadow: inset 0 0 90px rgba(74, 222, 128, 0.14);
}

.tg-stage-frame[data-item-theme="night"] {
  filter: brightness(0.88) saturate(0.95);
  box-shadow: inset 0 0 100px rgba(15, 23, 42, 0.35);
}

.tg-stage-frame[data-item-theme="feast"] {
  box-shadow: inset 0 0 80px rgba(251, 113, 133, 0.14);
}

.tg-stage-frame[data-item-theme="play"],
.tg-stage-frame[data-item-theme="spark"] {
  box-shadow: inset 0 0 70px rgba(45, 212, 191, 0.14);
}

/* Stage pulses */
.tg-stage-frame.is-fx {
  transition: filter 0.25s ease, box-shadow 0.25s ease;
}

.tg-stage-frame.is-fx-feed,
.tg-stage-frame.is-fx-snack,
.tg-stage-frame.is-fx-meal,
.tg-stage-frame.is-fx-tea {
  box-shadow: inset 0 0 60px rgba(251, 113, 133, 0.18);
}

.tg-stage-frame.is-fx-rare_meal {
  box-shadow: inset 0 0 70px rgba(253, 230, 138, 0.28);
}

.tg-stage-frame.is-fx-play,
.tg-stage-frame.is-fx-toy,
.tg-stage-frame.is-fx-arcade {
  box-shadow: inset 0 0 50px rgba(200, 245, 66, 0.16);
}

.tg-stage-frame.is-fx-soap,
.tg-stage-frame.is-fx-tonic {
  box-shadow: inset 0 0 55px rgba(103, 232, 249, 0.22);
}

.tg-stage-frame.is-fx-book {
  box-shadow: inset 0 0 50px rgba(253, 230, 138, 0.2);
}

.tg-stage-frame.is-fx-discipline,
.tg-stage-frame.is-fx-use {
  box-shadow: inset 0 0 45px rgba(251, 191, 36, 0.2);
}

.tg-stage-frame.is-fx-sleep,
.tg-stage.is-fx-sleep {
  filter: brightness(0.78) saturate(0.88);
  box-shadow: inset 0 0 100px rgba(99, 102, 241, 0.28);
  animation: tg-stage-sleep-in 0.9s ease both;
}

.tg-stage-frame.is-fx-sleep_loop,
.tg-stage.is-fx-sleep_loop {
  filter: brightness(0.72) saturate(0.85);
  box-shadow: inset 0 0 120px rgba(49, 46, 129, 0.42);
}

.tg-stage-frame.is-fx-wake,
.tg-stage.is-fx-wake {
  animation: tg-stage-wake 1.2s ease;
  box-shadow: inset 0 0 90px rgba(251, 191, 36, 0.28);
}

.tg-stage-frame.is-fx-wake_early,
.tg-stage.is-fx-wake_early {
  animation: tg-stage-wake-early 0.95s ease;
  box-shadow: inset 0 0 80px rgba(244, 63, 94, 0.28);
}

.tg-stage-frame.is-fx-wash {
  box-shadow: inset 0 0 55px rgba(103, 232, 249, 0.22);
}

.tg-stage-frame.is-fx-teach {
  box-shadow: inset 0 0 55px rgba(253, 230, 138, 0.18);
}

.tg-stage-frame.is-fx-work {
  box-shadow: inset 0 0 55px rgba(251, 191, 36, 0.2);
}

.tg-stage-frame.is-fx-dance {
  animation: tg-stage-disco 0.9s ease;
}

.tg-stage-frame.is-fx-hatch {
  animation: tg-stage-flash 1.15s ease;
}

.tg-stage-frame.is-fx-buy,
.tg-stage-frame.is-fx-equip {
  box-shadow: inset 0 0 50px rgba(45, 212, 191, 0.2);
}

.tg-stage-frame.is-fx-place {
  box-shadow: inset 0 0 40px rgba(134, 239, 172, 0.18);
}

.tg-stage-frame.is-fx-quest {
  animation: tg-stage-flash 0.85s ease;
}

.tg-stage-frame.is-fx-event {
  box-shadow: inset 0 0 70px rgba(253, 230, 138, 0.25);
}

.tg-stage-frame.is-fx-pet {
  box-shadow: inset 0 0 60px rgba(253, 164, 175, 0.26);
  animation: tg-stage-pet-pulse 0.75s ease;
}

.tg-stage-frame.is-fx-nuzzle {
  filter: brightness(0.92) saturate(0.95);
  box-shadow: inset 0 0 70px rgba(167, 139, 250, 0.28);
}

.tg-stage-frame.is-fx-tickle {
  box-shadow: inset 0 0 55px rgba(253, 230, 138, 0.24);
  animation: tg-stage-flash 0.65s ease;
}

.tg-stage-frame.is-fx-cheer {
  box-shadow: inset 0 0 65px rgba(200, 245, 66, 0.28);
  animation: tg-stage-flash 0.85s ease;
}

.tg-stage-frame.is-fx-wave {
  box-shadow: inset 0 0 50px rgba(125, 211, 252, 0.24);
}

.tg-stage-frame.is-fx-interact_miss {
  box-shadow: inset 0 0 40px rgba(148, 163, 184, 0.22);
  animation: tg-stage-wake-early 0.45s ease;
}

/* Companion touch trails + hint */
.tg-interact-trails {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  overflow: hidden;
}

.tg-interact-trail {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  --trail-c: rgba(253, 164, 175, 0.95);
  background: radial-gradient(circle, var(--trail-c), transparent 70%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--trail-c) 70%, transparent);
  animation: tg-interact-trail 0.65s ease forwards;
  transform: scale(var(--trail-s, 1));
}

.tg-interact-trail--ocean { --trail-c: rgba(103, 232, 249, 0.95); }
.tg-interact-trail--forest { --trail-c: rgba(134, 239, 172, 0.95); }
.tg-interact-trail--ember { --trail-c: rgba(251, 146, 60, 0.95); }
.tg-interact-trail--cyber { --trail-c: rgba(200, 245, 66, 0.95); }
.tg-interact-trail--cosmos { --trail-c: rgba(196, 181, 253, 0.95); }

.tg-interact-hint {
  position: absolute;
  right: 8%;
  top: 26%;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  transform: translate(8px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tg-stage-frame.is-interact-hint .tg-interact-hint {
  opacity: 0.9;
  transform: translate(0, 0);
  animation: tg-interact-hint-bob 1.6s ease-in-out 2;
}

.tg-interact-hint__hand {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: rgba(253, 164, 175, 0.2);
  border: 1px solid rgba(253, 164, 175, 0.45);
  color: #fda4af;
  font-size: 1rem;
  box-shadow: 0 0 18px rgba(253, 164, 175, 0.35);
}

.tg-interact-hint__keys {
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: color-mix(in srgb, #e2e8f0 80%, transparent);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

#tg-mood-badge.is-gain-flash,
#tg-stage-hud.is-gain-flash {
  position: relative;
}

#tg-mood-badge.is-gain-flash::after,
#tg-stage-hud.is-gain-flash::after {
  content: attr(data-gain);
  position: absolute;
  right: 0.35rem;
  top: -0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fda4af;
  animation: tg-gain-float 0.85s ease forwards;
  pointer-events: none;
}

@keyframes tg-interact-trail {
  0% { transform: scale(calc(var(--trail-s, 1) * 0.6)); opacity: 0.95; }
  100% { transform: scale(calc(var(--trail-s, 1) * 1.55)) translateY(-20px); opacity: 0; }
}

@keyframes tg-interact-hint-bob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-6px, 4px); }
}

@keyframes tg-stage-pet-pulse {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.08); }
  100% { filter: brightness(1); }
}

@keyframes tg-gain-float {
  0% { opacity: 0; transform: translateY(6px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .tg-interact-trail,
  .tg-stage-frame.is-interact-hint .tg-interact-hint {
    animation: none;
  }
}

/* Action buttons feedback */
.tg-btn[data-action].is-casting {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 0 2px rgba(200, 245, 66, 0.35), 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* ---- Keyframes ---- */
@keyframes tg-fx-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(var(--s, 0.3)) rotate(var(--rot, 120deg)); }
}

@keyframes tg-fx-fall-in {
  0% { opacity: 0; transform: translate(var(--sx, 0px), var(--sy, -80px)) scale(0.6) rotate(0deg); }
  20% { opacity: 1; }
  70% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot, 40deg)); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 12px)) scale(0.4) rotate(var(--rot, 80deg)); }
}

@keyframes tg-fx-rise {
  0% { opacity: 0; transform: translate(0, 20px) scale(0.5); }
  15% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(var(--s, 1.2)); }
}

@keyframes tg-fx-rise-fast {
  0% { opacity: 0.9; transform: translate(0, 10px) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

@keyframes tg-fx-splash {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(180deg); }
}

@keyframes tg-fx-zzz {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6) rotate(-8deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.35) rotate(12deg); }
}

@keyframes tg-fx-note {
  0% { opacity: 0; transform: translate(0, 10px) scale(0.5) rotate(-10deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2) rotate(18deg); }
}

@keyframes tg-fx-orbit {
  0% { opacity: 0; transform: rotate(0deg) translateX(var(--orbit, 48px)) rotate(0deg) scale(0.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--spin, 320deg)) translateX(var(--orbit, 48px)) rotate(calc(var(--spin, 320deg) * -1)) scale(1.1); }
}

@keyframes tg-fx-coin {
  0% { opacity: 0; transform: translate(0, -10px) scale(0.4) rotateY(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.7) rotateY(540deg); }
}

@keyframes tg-fx-twinkle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.2) rotate(0deg); }
  30% { opacity: 1; transform: translate(calc(var(--dx) * 0.4), calc(var(--dy) * 0.4)) scale(1.2) rotate(40deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(160deg); }
}

@keyframes tg-fx-drift {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.7); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot, 140deg)) scale(0.9); }
}

@keyframes tg-fx-pixel {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  20% { opacity: 1; }
  50% { transform: translate(calc(var(--dx) * 0.5), calc(var(--dy) * 0.5)) scale(1.3); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

@keyframes tg-fx-shard {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot, 220deg)) scale(0.4); }
}

@keyframes tg-fx-ring {
  0% { opacity: 0.85; transform: scale(0.2); }
  100% { opacity: 0; transform: scale(2.4); }
}

@keyframes tg-fx-ball {
  0% { opacity: 0; transform: translate(var(--sx, -40px), var(--sy, 30px)) scale(0.7); }
  15% { opacity: 1; }
  45% { transform: translate(10px, -50px) scale(1); }
  70% { transform: translate(var(--dx), var(--dy)) scale(0.95); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 20px)) scale(0.6); }
}

@keyframes tg-fx-butterfly {
  0% { opacity: 0; transform: translate(-40%, 30%) scale(0.5) rotate(-20deg); }
  20% { opacity: 1; }
  50% { transform: translate(10%, -20%) scale(1) rotate(15deg); }
  100% { opacity: 0; transform: translate(55%, -55%) scale(0.8) rotate(-10deg); }
}

@keyframes tg-fx-meteor {
  0% { opacity: 0; transform: translate(-30%, -40%) rotate(35deg) scaleY(0.4); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(60%, 70%) rotate(35deg) scaleY(1.2); }
}

@keyframes tg-fx-emblem {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.25) rotate(-10deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.22) rotate(3deg); }
  32%, 58% { opacity: 1; transform: translate(-50%, -52%) scale(1.08) rotate(0deg); } /* HOLD readable */
  82% { opacity: 0.85; transform: translate(-50%, -62%) scale(0.95); }
  100% { opacity: 0; transform: translate(-50%, -78%) scale(0.8); }
}

@keyframes tg-fx-caption {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
  22% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  35%, 62% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(0.95); }
}

@keyframes tg-stage-disco {
  0%, 100% { filter: none; box-shadow: inset 0 0 0 transparent; }
  20% { filter: hue-rotate(20deg); box-shadow: inset 0 0 60px rgba(251, 113, 133, 0.25); }
  45% { filter: hue-rotate(-15deg); box-shadow: inset 0 0 60px rgba(45, 212, 191, 0.25); }
  70% { filter: hue-rotate(30deg); box-shadow: inset 0 0 60px rgba(251, 191, 36, 0.25); }
}

@keyframes tg-stage-flash {
  0% { filter: brightness(1); }
  20% { filter: brightness(1.45); }
  100% { filter: brightness(1); }
}

@keyframes tg-stage-sleep-in {
  0% { filter: brightness(1) saturate(1); }
  100% { filter: brightness(0.78) saturate(0.88); }
}

@keyframes tg-stage-wake {
  0% { filter: brightness(0.72) saturate(0.85); }
  35% { filter: brightness(1.35) saturate(1.1); }
  100% { filter: brightness(1) saturate(1); }
}

@keyframes tg-stage-wake-early {
  0% { filter: brightness(0.72); transform: translateX(0); }
  15% { filter: brightness(1.2); transform: translateX(-4px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-3px); }
  100% { filter: brightness(1); transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .tg-fx__p,
  .tg-fx__emblem,
  .tg-fx__caption,
  .tg-stage-frame.is-fx-dance,
  .tg-stage-frame.is-fx-hatch,
  .tg-stage-frame.is-fx-quest {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  /* Still show emblem + caption for 0.6s so action remains readable. */
  .tg-fx__emblem,
  .tg-fx__caption {
    opacity: 1 !important;
    animation: none !important;
  }
}
