/* Candy Cuddle Kids — Spot the Difference (all rules scoped to .g-spot) */
.g-spot .sd-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.g-spot [hidden] { display: none !important; }
.g-spot .btn-sm { min-height: 46px; }
.g-spot .btn[disabled] { opacity: .5; }
.g-spot .btn.nudge { animation: sdNudge .7s ease 2; }
.g-spot .sd-stat-ico { color: var(--berry); }
.g-spot .sd-dots { display: inline-flex; gap: 6px; align-items: center; }
.g-spot .sd-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); transition: background .25s, transform .25s; }
.g-spot .sd-dots i.on { background: var(--berry); transform: scale(1.15); box-shadow: 0 0 0 3px var(--berry-soft); }

/* Gus + speech bubble */
.g-spot .sd-buddy { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin: -4px 0 14px; min-height: 96px; }
.g-spot .sd-gus { height: 96px; width: auto; flex-shrink: 0; filter: drop-shadow(0 6px 8px rgba(60, 30, 35, .18)); transform-origin: 50% 90%; }
.g-spot .sd-gus.hop { animation: sdHop .6s ease; }
.g-spot .sd-bubble {
  position: relative; margin: 0 0 0 8px; flex: 1 1 200px; max-width: 520px; background: var(--mint); color: var(--ink);
  font-family: var(--head); font-weight: 600; font-size: 1.15rem; line-height: 1.3; padding: 12px 18px; border-radius: 20px;
}
.g-spot .sd-bubble::before { content: ""; position: absolute; left: -10px; top: 50%; margin-top: -10px; border: 10px solid transparent; border-left: 0; border-right-color: var(--mint); }
.g-spot .sd-bubble.pop { animation: sdPop .35s cubic-bezier(.2, 1.5, .4, 1); }
.g-spot .sd-win { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; animation: sdPop .5s cubic-bezier(.2, 1.5, .4, 1); }

/* the two pictures */
.g-spot .sd-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2.4vw, 26px); }
.g-spot .sd-panel { position: relative; margin: 0; min-width: 0; }
.g-spot .sd-label {
  position: absolute; z-index: 3; left: -6px; top: -8px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--berry); color: #fff; font-family: var(--head); font-weight: 700; font-size: 1.25rem; box-shadow: 0 0 0 4px #fff, var(--shadow-sm); pointer-events: none;
}
.g-spot .sd-label.is-b { background: var(--night-2, #2f3a7a); }
.g-spot .sd-frame {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; background: #fff; cursor: crosshair;
  box-shadow: 0 0 0 3px var(--line), var(--shadow-sm);
  touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.g-spot .sd-frame:focus-visible { outline: 5px solid var(--gold); outline-offset: 5px; }
.g-spot .sd-frame.is-loading::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%) var(--cream);
  background-size: 250% 100%; animation: sdShimmer 1.2s linear infinite;
}
.g-spot .sd-img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.g-spot .sd-fx { position: absolute; inset: 0; pointer-events: none; }

.g-spot .sd-circle {
  position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-8deg); border-radius: 50%;
  border: clamp(3px, .55vw, 6px) solid var(--berry); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), inset 0 0 0 2px rgba(255, 255, 255, .9);
  min-width: 26px; background: rgba(224, 36, 94, .06);
}
.g-spot .sd-circle.is-new { animation: sdCircle .55s cubic-bezier(.2, 1.5, .4, 1) both; }
.g-spot .sd-circle.is-new::after {
  content: "✓"; position: absolute; right: -8%; top: -14%; width: 34%; min-width: 22px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--berry); color: #fff; font: 700 clamp(12px, 1.4vw, 16px)/1 var(--head); box-shadow: 0 0 0 2px #fff; animation: sdTick .5s ease .3s both;
}
.g-spot .sd-ripple {
  position: absolute; width: 8%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(.3);
  border: 3px solid rgba(90, 125, 255, .8); opacity: 0; animation: sdRipple .7s ease-out forwards;
}
.g-spot .sd-hint {
  position: absolute; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 201, 77, .55), rgba(255, 201, 77, .25) 65%, rgba(255, 201, 77, 0));
  animation: sdHint 1s ease-in-out infinite, sdFadeIn .3s ease;
}
.g-spot .sd-cursor {
  position: absolute; width: 7%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; display: none;
  border: 3px solid #fff; box-shadow: 0 0 0 3px var(--berry), 0 2px 10px rgba(0, 0, 0, .35);
}
.g-spot .sd-cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--berry); }
.g-spot .sd-frame.kbd:focus .sd-cursor { display: block; }

/* stacked on narrow screens */
@media (max-width: 700px) {
  .g-spot .sd-pair { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .g-spot .sd-buddy { margin: -4px 0 12px; min-height: 0; }
  .g-spot .sd-gus { height: 70px; }
  .g-spot .sd-bubble { font-size: 1rem; padding: 9px 13px; flex-basis: 150px; }
  .g-spot .sd-win { margin: 0 auto; justify-content: center; }
  .g-spot .sd-dots i { width: 11px; height: 11px; }
}
@media (max-width: 400px) {
  .g-spot .sd-dots { display: none; }
}

@keyframes sdShimmer { to { background-position: -150% 0; } }
@keyframes sdCircle { from { transform: translate(-50%, -50%) rotate(-60deg) scale(1.8); opacity: 0; } }
@keyframes sdTick { from { transform: scale(0); } }
@keyframes sdRipple { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.3); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); } }
@keyframes sdHint { 50% { transform: translate(-50%, -50%) scale(1.1); opacity: .7; } }
@keyframes sdFadeIn { from { opacity: 0; } }
@keyframes sdPop { from { transform: scale(.85); } }
@keyframes sdHop { 40% { transform: translateY(-12px) rotate(-5deg); } }
@keyframes sdNudge { 25% { transform: rotate(-5deg) scale(1.06); } 75% { transform: rotate(5deg) scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
  .g-spot .sd-ripple { opacity: .8; transform: translate(-50%, -50%); }
  .g-spot .sd-frame.is-loading::after { background: var(--cream); }
}
