/* The toy in this note. Loaded on this page only, after styles.css and notes.css.
   Same rules as everywhere: only opacity and transform move, and anything marked
   .lp loops only while the toy is on screen. */

/* one long chat splits into one space per group of tasks, then the build, review,
   fix loop runs, with ChatGPT for the task Claude didn't get right (14 s) */
.spaces { --tint: var(--a2) }
.sp-stage { display: grid; min-height: 120px; align-items: center }
.sp-stage > * { grid-area: 1 / 1 }
.sp-one { justify-self: center; padding: 10px 18px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14.5px; animation: sp-one 14s var(--ease) infinite both }
.sp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px }
.sp { display: block; padding: 11px 8px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); text-align: center; font-size: 14px; line-height: 1.3; opacity: 0; animation-duration: 14s; animation-iteration-count: infinite; animation-timing-function: var(--ease); animation-fill-mode: both }
@media (max-width: 480px) { .sp-grid { grid-template-columns: repeat(2, 1fr) } }

.sp-loop { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); opacity: 0; animation: sp-loop 14s var(--ease) infinite both }
.sl { display: grid; gap: 2px; padding: 12px 8px; text-align: center; font-size: 14.5px; line-height: 1.3 }
.sl b { font-weight: 500 }
.sl .mono { font-size: 10.5px; color: var(--muted) }
.sp-ring { position: absolute; z-index: -1; left: 0; top: 0; bottom: 0; width: calc(100% / 3); border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--a2); opacity: 0; animation: sp-ring 14s var(--ease) infinite both }
.sp-alt { justify-self: end; width: fit-content; margin: 12px 0 0 auto; padding: 7px 14px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 13.5px; font-weight: 500; opacity: 0; animation: sp-alt 14s var(--ease) infinite both }
.sp-alt .mono { margin-right: 4px; font-size: 10.5px; opacity: .7 }

@keyframes sp-one { 0%, 15% { opacity: 1; transform: none } 20%, 96% { opacity: 0; transform: scale(1.04) } 100% { opacity: 1; transform: none } }
.sp1 { animation-name: sp1 }
@keyframes sp1 { 0%, 17% { opacity: 0; transform: translateY(8px) } 20%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }
.sp2 { animation-name: sp2 }
@keyframes sp2 { 0%, 19% { opacity: 0; transform: translateY(8px) } 22%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }
.sp3 { animation-name: sp3 }
@keyframes sp3 { 0%, 21% { opacity: 0; transform: translateY(8px) } 24%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }
.sp4 { animation-name: sp4 }
@keyframes sp4 { 0%, 23% { opacity: 0; transform: translateY(8px) } 26%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }
.sp5 { animation-name: sp5 }
@keyframes sp5 { 0%, 25% { opacity: 0; transform: translateY(8px) } 28%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }
.sp6 { animation-name: sp6 }
@keyframes sp6 { 0%, 27% { opacity: 0; transform: translateY(8px) } 30%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }
@keyframes sp-loop { 0%, 31% { opacity: 0; transform: translateY(8px) } 35%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }
@keyframes sp-ring {
  0%, 36% { opacity: 0; transform: none }
  39%, 45% { opacity: 1; transform: none }
  49%, 55% { opacity: 1; transform: translateX(100%) }
  59%, 65% { opacity: 1; transform: translateX(200%) }
  69%, 92% { opacity: 1; transform: none }
  97%, 100% { opacity: 0; transform: none }
}
@keyframes sp-alt { 0%, 69% { opacity: 0; transform: translateY(6px) } 73%, 92% { opacity: 1; transform: none } 97%, 100% { opacity: 0; transform: none } }

@media (prefers-reduced-motion: reduce) { .sp, .sp-loop, .sp-ring, .sp-alt { opacity: 1 } .sp-one { display: none } }
[data-motion="off"] .sp, [data-motion="off"] .sp-loop, [data-motion="off"] .sp-ring, [data-motion="off"] .sp-alt { opacity: 1 }
[data-motion="off"] .sp-one { display: none }
