/* Spot the difference: level, message, found dots and Hint in one row; the two pictures below, as big as fits
   (game.js sizes the frames to 4:3). */
.sd-main { gap: clamp(10px, 1.8vh, 20px); }
.sd-top { width: 100%; display: flex; align-items: center; gap: clamp(12px, 1.6vw, 28px); }
.sd-message { flex: 1; min-width: 0; text-align: left; font-size: 1.35rem; line-height: 1.2; }
.sd-found { display: flex; gap: 10px; }
.sd-dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--rule); background: var(--cream); }
.sd-dot.is-on { border-color: var(--good); background: var(--good); box-shadow: inset 0 0 0 4px var(--cream); }
.sd-dot.is-new { animation: sd-pop 0.35s ease-out; }
@keyframes sd-pop { 40% { transform: scale(1.35); } }
[data-hint] { min-width: 140px; }

.sd-pics { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; column-gap: clamp(12px, 1.4vw, 24px); }
.sd-frame {
  flex: 0 0 auto; width: 400px; height: 300px; border-radius: 18px; overflow: hidden; cursor: crosshair;
  box-shadow: 0 0 0 4px var(--sea-deep), 0 10px 28px rgba(22, 44, 51, 0.18); touch-action: none;
}
.sd-pic { display: block; width: 100%; height: 100%; }
/* The frame takes every touch; nothing inside the picture is a target (it is redrawn as rings are added). */
.sd-pic * { pointer-events: none; }

.sd-ring-under, .sd-ring, .sd-hint { fill: none; }
.sd-ring-under { stroke: #fff; stroke-width: 11; }
.sd-ring { stroke: var(--good); stroke-width: 6; }
.sd-hint { stroke: #f2c230; stroke-width: 7; stroke-dasharray: 18 10; animation: sd-hint 0.7s ease-in-out infinite alternate; }
@keyframes sd-hint { to { stroke-opacity: 0.25; } }
.sd-miss path { stroke: var(--bad); stroke-width: 6; stroke-linecap: round; animation: sd-fade 0.7s ease-out forwards; }
@keyframes sd-fade { to { opacity: 0; } }
.sd-cursor-under { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; }
.sd-cursor-line { fill: none; stroke: var(--sea-deep); stroke-width: 4; stroke-linecap: round; }

.sd-frame.is-miss { animation: sd-shake 0.4s ease-in-out; }
@keyframes sd-shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .sd-dot.is-new, .sd-hint, .sd-miss path { animation: none; }
  /* No shake: a red outline says "not there" instead. */
  .sd-frame.is-miss { animation: sd-miss-still 0.6s step-end; }
  @keyframes sd-miss-still { from { box-shadow: 0 0 0 6px var(--bad); } }
}
