/* 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. */

/* the keyboard that presses its own key */
.kb { --tint: var(--a2) }
.kb-row { display: flex; gap: clamp(5px, 1.4vw, 10px); justify-content: center }
.key, .slot { position: relative; flex: 1; max-width: 60px; aspect-ratio: 1; border-radius: 10px }
.key { display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2), 0 3px 0 var(--line) }
.slot { box-shadow: inset 0 0 0 1px var(--line-2); background: repeating-linear-gradient(45deg, transparent 0 5px, var(--line) 5px 6px) }
.slot .key { position: absolute; inset: 0; max-width: none; color: var(--fg); animation: ghost 2.4s ease infinite both }
.kb-ring { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--a2); opacity: 0; animation: ghost-ring 2.4s ease-out infinite both }
@keyframes ghost { 0%, 84% { transform: none } 88% { transform: translateY(3px) scale(.92) } 95%, 100% { transform: none } }
@keyframes ghost-ring { 0%, 85% { opacity: 0; transform: none } 88% { opacity: 1; transform: none } 100% { opacity: 0; transform: scale(1.5) } }
.kb.pulled .slot .key { opacity: 0; animation: pull .8s var(--ease) both }
@keyframes pull { from { opacity: 1; transform: none } 30% { opacity: 1; transform: translateY(-40%) rotate(-6deg) } to { opacity: 0; transform: translate(14px, -180%) rotate(-28deg) } }
