/* —— themed cores: keep edge motes; hide only orbit balls/specks —— */
body.has-mood .orbit-specks,
body.has-mood .phase-dot,
body.has-mood .orbit-hub > .phase-dot {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  animation: none !important;
}

/* —— core-sync: cinematic ornaments (no chunky balls) —— */
.core-sync {
  position: absolute;
  inset: -38%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 2;
  transition: opacity 0.45s ease;
}

.phase-core[data-shape="couple"] .core-sync,
.phase-core[data-shape="friends"] .core-sync,
.phase-core[data-shape="family"] .core-sync {
  opacity: 1;
  visibility: visible;
}

.core-sync em,
.core-sync i,
.core-sync b {
  position: absolute;
  display: block;
  box-sizing: border-box;
  pointer-events: none;
}

.core-sync .sync-aura,
.core-sync .sync-aura-2,
.core-sync .sync-beam {
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* ========== COUPLE: twin soft rings + shimmer (no orbs) ========== */
.phase-core[data-shape="couple"] .core-sync .sync-aura {
  width: 72%;
  height: 72%;
  border: 2px solid transparent;
  border-top-color: rgba(255, 143, 171, 0.7);
  border-right-color: rgba(255, 92, 138, 0.35);
  animation: syncCoupleRing 4.8s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 92, 138, 0.35));
}

.phase-core[data-shape="couple"] .core-sync .sync-aura-2 {
  width: 88%;
  height: 88%;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(217, 72, 108, 0.55);
  border-left-color: rgba(255, 179, 198, 0.4);
  animation: syncCoupleRingRev 6.4s ease-in-out infinite;
}

.phase-core[data-shape="couple"] .core-sync .sync-beam {
  width: 56%;
  height: 56%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.35), transparent 42%),
    conic-gradient(from 200deg, transparent 0 62%, rgba(255, 143, 171, 0.28) 70%, transparent 82%);
  animation: syncCoupleBeam 5.5s linear infinite;
  opacity: 0.85;
}

.phase-core[data-shape="couple"] .core-sync i,
.phase-core[data-shape="couple"] .core-sync b {
  display: none !important;
}

@keyframes syncCoupleRing {
  0%,
  100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 0.55; }
  50% { transform: translate(-50%, -50%) rotate(18deg) scale(1.06); opacity: 1; }
}

@keyframes syncCoupleRingRev {
  0%,
  100% { transform: translate(-50%, -50%) rotate(20deg) scale(1.02); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) rotate(-16deg) scale(0.96); opacity: 0.85; }
}

@keyframes syncCoupleBeam {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========== FRIENDS: sunburst + soft sparks (the zest) ========== */
.phase-core[data-shape="friends"] .core-sync {
  z-index: 1;
}

.phase-core[data-shape="friends"] .core-sync .sync-aura {
  width: 78%;
  height: 78%;
  background: radial-gradient(
    circle,
    rgba(255, 248, 214, 0.22) 0%,
    rgba(255, 213, 74, 0.14) 38%,
    transparent 68%
  );
  box-shadow:
    0 0 40px rgba(255, 213, 74, 0.4),
    0 0 90px rgba(255, 176, 50, 0.25);
  animation: syncFriendAura 3.2s ease-in-out infinite;
}

.phase-core[data-shape="friends"] .core-sync .sync-aura-2 {
  width: 96%;
  height: 96%;
  border: 1.5px solid rgba(255, 213, 74, 0.3);
  box-shadow: inset 0 0 24px rgba(255, 229, 102, 0.14);
  animation: syncFriendHalo 4s ease-in-out infinite;
}

.phase-core[data-shape="friends"] .core-sync .sync-beam {
  width: 118%;
  height: 118%;
  background:
    repeating-conic-gradient(
      from 4deg,
      rgba(255, 248, 214, 0.62) 0deg 2.2deg,
      transparent 2.2deg 11deg,
      rgba(255, 213, 74, 0.42) 11deg 13deg,
      transparent 13deg 22deg,
      rgba(255, 196, 60, 0.5) 22deg 24deg,
      transparent 24deg 33deg
    );
  -webkit-mask: radial-gradient(circle, transparent 36%, #000 44%, #000 78%, transparent 92%);
  mask: radial-gradient(circle, transparent 36%, #000 44%, #000 78%, transparent 92%);
  animation: syncFriendSun 18s linear infinite;
  opacity: 1;
  filter: blur(0.25px);
}

/* second denser ray layer — more beams, counter-spin */
.phase-core[data-shape="friends"] .core-sync .sync-aura::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 9deg,
    rgba(255, 255, 255, 0.35) 0deg 1.4deg,
    transparent 1.4deg 15deg,
    rgba(255, 229, 102, 0.28) 15deg 16.2deg,
    transparent 16.2deg 30deg
  );
  -webkit-mask: radial-gradient(circle, transparent 40%, #000 48%, #000 70%, transparent 86%);
  mask: radial-gradient(circle, transparent 40%, #000 48%, #000 70%, transparent 86%);
  animation: syncFriendSunRev 26s linear infinite;
  pointer-events: none;
}

@keyframes syncFriendSunRev {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.phase-core[data-shape="friends"] .core-sync b {
  left: 50%;
  top: 50%;
  width: 64%;
  height: 64%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(255, 229, 102, 0.7);
  border-bottom-color: rgba(234, 88, 12, 0.28);
  transform: translate(-50%, -50%);
  animation: syncFriendOrbit 7s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 213, 74, 0.5));
}

.phase-core[data-shape="friends"] .core-sync i {
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 0;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  background: linear-gradient(135deg, #fffef5, #ffe566 45%, #f5c518);
  --spark-rot: 0deg;
  --spark-y: -48%;
  animation: syncFriendSpark 2.6s ease-in-out infinite;
  opacity: 0;
}

.phase-core[data-shape="friends"] .core-sync i:nth-child(4) {
  --spark-rot: 18deg;
  --spark-y: -48%;
  animation-delay: 0s;
}

.phase-core[data-shape="friends"] .core-sync i:nth-child(5) {
  --spark-rot: 78deg;
  --spark-y: -50%;
  animation-delay: 0.35s;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
}

.phase-core[data-shape="friends"] .core-sync i:nth-child(6) {
  --spark-rot: 148deg;
  --spark-y: -46%;
  animation-delay: 0.7s;
}

.phase-core[data-shape="friends"] .core-sync i:nth-child(7) {
  --spark-rot: 210deg;
  --spark-y: -49%;
  animation-delay: 1.05s;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
}

.phase-core[data-shape="friends"] .core-sync i:nth-child(8) {
  --spark-rot: 268deg;
  --spark-y: -47%;
  animation-delay: 1.4s;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
}

.phase-core[data-shape="friends"] .core-sync i:nth-child(9) {
  --spark-rot: 328deg;
  --spark-y: -51%;
  animation-delay: 1.75s;
}

@keyframes syncFriendSpark {
  0%,
  100% {
    opacity: 0;
    filter: drop-shadow(0 0 2px rgba(255, 229, 102, 0.35));
    transform: translate(-50%, -50%) rotate(var(--spark-rot)) translateY(var(--spark-y)) scale(0.5);
  }
  40%,
  55% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(255, 229, 102, 1));
    transform: translate(-50%, -50%) rotate(var(--spark-rot)) translateY(var(--spark-y)) scale(1.25);
  }
  70% {
    opacity: 0.3;
    filter: drop-shadow(0 0 4px rgba(255, 229, 102, 0.55));
    transform: translate(-50%, -50%) rotate(var(--spark-rot)) translateY(var(--spark-y)) scale(0.8);
  }
}

@keyframes syncFriendAura {
  0%,
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

@keyframes syncFriendHalo {
  0%,
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.45; }
  50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.85; }
}

@keyframes syncFriendSun {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes syncFriendOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========== FAMILY: soft helix ribbons (no node balls) ========== */
.phase-core[data-shape="family"] .core-sync .sync-aura {
  width: 74%;
  height: 74%;
  border: 1.5px dashed rgba(147, 197, 253, 0.45);
  animation: syncFamilyBreath 3.6s ease-in-out infinite;
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.18);
}

.phase-core[data-shape="family"] .core-sync .sync-aura-2 {
  width: 92%;
  height: 92%;
  border: 2px solid transparent;
  border-top-color: rgba(96, 165, 250, 0.55);
  border-bottom-color: rgba(37, 99, 235, 0.35);
  animation: syncFamilyRibbon 8s linear infinite;
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.35));
}

.phase-core[data-shape="family"] .core-sync .sync-beam {
  width: 68%;
  height: 68%;
  border: 2px solid transparent;
  border-left-color: rgba(191, 219, 254, 0.65);
  border-right-color: rgba(59, 130, 246, 0.4);
  animation: syncFamilyRibbonRev 11s linear infinite;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.4));
}

.phase-core[data-shape="family"] .core-sync b {
  left: 50%;
  top: 50%;
  width: 50%;
  height: 50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.22), transparent 70%);
  transform: translate(-50%, -50%);
  animation: syncFamilyCore 2.8s ease-in-out infinite;
}

.phase-core[data-shape="family"] .core-sync i {
  display: none !important;
}

@keyframes syncFamilyBreath {
  0%,
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 0.9; }
}

@keyframes syncFamilyRibbon {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes syncFamilyRibbonRev {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes syncFamilyCore {
  0%,
  100% { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.12); }
}

/* Kill old ball/eq ornaments leftover in cinema.css */
.phase-core[data-shape="couple"] .core-sync {
  animation: none !important;
}

.phase-core[data-shape="couple"] .core-sync i,
.phase-core[data-shape="family"] .core-sync i {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.phase-core[data-shape="family"] .core-sync {
  animation: none !important;
}

/* Override old friends equalizer ticks from cinema.css */
.phase-core[data-shape="friends"] .core-sync i {
  border-radius: 0 !important;
  width: 7px !important;
  height: 7px !important;
}

@media (prefers-reduced-motion: reduce) {
  .core-sync,
  .core-sync em,
  .core-sync i,
  .core-sync b {
    animation: none !important;
  }
}
