/* Lab cards (shared by the home page and /lab) */
/* ---------- Lab ---------- */
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 64px; }
.lab-card { min-height: 360px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .4s cubic-bezier(.2,.7,.2,1), border-color .3s; }
a.lab-card:hover { transform: translateY(-6px) scale(1.01); border-color: var(--line-2); }
.lab-card h3 { font-size: 30px; }
.lab-path { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 8px; }
.lab-card.soon { opacity: .5; }
.lab-art { flex: 1; display: grid; place-items: center; margin: 18px 0; }
.mini-globe { width: 170px; height: 170px; }
.keys { display: flex; gap: 3px; }
.keys i { width: 18px; height: 90px; background: var(--text); border-radius: 0 0 4px 4px; animation: press 2.4s ease-in-out infinite; }
.keys i:nth-child(2n) { background: var(--surface-2); border: 1px solid var(--line-2); height: 60px; width: 12px; margin: 0 -9px; position: relative; z-index: 1; }
@keyframes press { 8% { transform: translateY(4px); opacity: .6; } 16% { transform: none; opacity: 1; } }
.tornado-art { width: 150px; color: var(--text); animation: sway 5s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes sway { 50% { transform: skewX(-6deg); } }
.saturn-art { width: 200px; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(3deg); } }
.feed-art { width: 200px; display: flex; flex-direction: column; gap: 9px; }
.feed-art i { height: 8px; border-radius: 4px; background: var(--surface-2); }
.feed-art i:first-child { background: var(--text); }
.feed-art b { height: 1px; background: var(--line-2); margin: 6px 0; }
.music-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
a.b-music { transition: border-color .3s, transform .4s cubic-bezier(.2,.7,.2,1); }
a.b-music:hover { border-color: var(--line-2); transform: translateY(-4px); }
.wall-art { display: flex; flex-wrap: wrap; gap: 8px; width: 210px; justify-content: center; }
.wall-art span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; font-size: 13px; animation: bob 4s ease-in-out infinite; }
.wall-art span:nth-child(2n) { animation-delay: -1.3s; } .wall-art span:nth-child(3n) { animation-delay: -2.6s; }
.space-art { width: 190px; }
.orb { transform-origin: 100px 100px; animation: orbit linear infinite; }
.o1 { animation-duration: 4s; } .o2 { animation-duration: 7s; } .o3 { animation-duration: 12s; }
@keyframes orbit { to { transform: rotate(360deg); } }
.matrix-art { width: 210px; height: 170px; font: 13px/14px var(--mono); color: #33ff66; overflow: hidden; display: flex; gap: 6px; justify-content: center;
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.matrix-art span { writing-mode: vertical-lr; text-orientation: upright; animation: fall 3s linear infinite; opacity: .8; }
@keyframes fall { from { transform: translateY(-60%); } to { transform: translateY(60%); } }
.beat-art { display: grid; grid-template-columns: repeat(8, 18px); gap: 5px; }
.beat-art i { width: 18px; height: 18px; border-radius: 4px; background: var(--surface-2); }
.beat-art i.on { background: var(--text); }
.beat-art i.hit { box-shadow: 0 0 0 2px #f9731a; }
.snake-art { position: relative; width: 180px; height: 120px; }
.snake-art i, .snake-art b { position: absolute; width: 16px; height: 16px; border-radius: 4px; background: var(--text); }
.snake-art i:nth-child(1) { left: 20px; top: 52px; opacity: .4; } .snake-art i:nth-child(2) { left: 38px; top: 52px; opacity: .55; }
.snake-art i:nth-child(3) { left: 56px; top: 52px; opacity: .7; } .snake-art i:nth-child(4) { left: 74px; top: 52px; opacity: .85; }
.snake-art i:nth-child(5) { left: 92px; top: 52px; animation: nudge 1s steps(2) infinite; }
.snake-art b { left: 146px; top: 52px; background: #f9731a; border-radius: 50%; animation: pulse 1s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(18px); } }
@keyframes pulse { 50% { transform: scale(.7); } }
.robot-art { width: 200px; color: var(--text); }
.ra1 { transform-origin: 100px 140px; animation: rs1 3.5s ease-in-out infinite; }
.ra2 { transform-origin: 100px 80px; animation: rs2 3.5s ease-in-out infinite; }
@keyframes rs1 { 50% { transform: rotate(18deg); } }
@keyframes rs2 { 50% { transform: rotate(60deg); } }
.draw-art { width: 200px; }
.draw-art path { stroke-dasharray: 400; stroke-dashoffset: 400; animation: drawp 4s ease-in-out infinite; }
.draw-art path:nth-child(2) { animation-delay: .6s; } .draw-art path:nth-child(3) { animation-delay: 1.2s; }
@keyframes drawp { 50%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -400; } }
.phys-art { position: relative; width: 200px; height: 130px; }
.phys-art > * { position: absolute; bottom: 0; }
.phys-art b { font: 900 54px/1 var(--sans); color: var(--text); animation: drop 3s cubic-bezier(.5,0,.6,1.4) infinite; }
.phys-art b:nth-child(1) { left: 14px; transform: rotate(-12deg); } .phys-art b:nth-child(2) { left: 62px; animation-delay: .25s; }
.phys-art b:nth-child(5) { left: 140px; bottom: 0; transform: rotate(18deg); animation-delay: .5s; }
.phys-art i { left: 104px; width: 30px; height: 30px; border-radius: 50%; background: #f9731a; animation: drop 3s cubic-bezier(.5,0,.6,1.4) infinite .4s; }
.phys-art u { left: 100px; bottom: 30px; width: 26px; height: 26px; background: #7cc4ff; transform: rotate(20deg); animation: drop 3s cubic-bezier(.5,0,.6,1.4) infinite .6s; }
@keyframes drop { 0% { translate: 0 -120px; opacity: 0; } 30% { translate: 0 0; opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.boids-art { width: 200px; color: var(--text); }
.flock { animation: flock 5s ease-in-out infinite; transform-origin: center; }
@keyframes flock { 50% { transform: translate(14px, -10px) rotate(-8deg); } }
.click-art { text-align: center; }
.click-art span { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 12px; border-radius: 50%; font-size: 40px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-2); animation: tap 1.2s ease-in-out infinite; }
.click-art b { font: 800 26px var(--sans); letter-spacing: -0.03em; }
@keyframes tap { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(.9); } }
.type-art { font: 500 20px var(--mono); color: var(--dim); }
.type-art .ok { color: var(--text); } .type-art .cur { color: var(--text); background: var(--surface-2); border-radius: 5px; padding: 0 4px; }
.type-art i { display: inline-block; width: 2px; height: 22px; background: #f9731a; vertical-align: -4px; animation: blink 1s steps(1) infinite; }
.grav-art { width: 200px; }
.gp { transform-origin: 100px 80px; animation: ell 4s linear infinite; }
@keyframes ell { to { transform: rotate(360deg) scaleY(1); } }
.worst-art { width: 210px; padding: 12px; text-align: center; font-family: "Comic Sans MS", cursive; background: repeating-linear-gradient(45deg, #ff0 0 10px, #0ff 10px 20px); border: 4px outset #ccc; transform: rotate(-3deg); }
.worst-art b { display: block; color: red; font: 22px Impact, sans-serif; text-shadow: 2px 2px #00f; }
.worst-art span { display: block; color: #00a; font-size: 12px; margin: 6px 0; }
.worst-art i { display: inline-block; font-style: normal; font-size: 12px; padding: 3px 10px; background: linear-gradient(#7f7, #0a0); color: #fff; border: 2px outset #ddd; animation: run 2s ease-in-out infinite; }
@keyframes run { 25% { transform: translate(40px, -6px); } 50% { transform: translate(-30px, 4px); } 75% { transform: translate(20px, 2px); } }
.dying-art { position: relative; font: 800 48px var(--sans); letter-spacing: -0.04em; filter: grayscale(.7) sepia(.4); }
.dying-art span { display: inline-block; animation: rot 4s ease-in-out infinite; }
.dying-art span:nth-child(2) { animation-delay: .4s; } .dying-art span:nth-child(4) { animation: fallen 4s ease-in infinite; }
.dying-art em { position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%); font: 600 12px var(--mono); font-style: normal; color: #ff6b6b; white-space: nowrap; }
@keyframes rot { 50% { transform: rotate(14deg) translateY(6px); } }
@keyframes fallen { 0%, 30% { transform: none; opacity: 1; } 80%, 100% { transform: translateY(60px) rotate(80deg); opacity: 0; } }
.casino-art { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; padding: 10px; border-radius: 16px; background: linear-gradient(#1c1408, #0b0904); border: 2px solid #5a4410; }
.casino-art span { height: 64px; display: grid; place-items: center; font-size: 34px; background: #f6f1e4; border-radius: 10px; animation: slot .9s steps(1) infinite; }
.casino-art span:nth-child(2) { animation-delay: .3s; } .casino-art span:nth-child(3) { animation-delay: .6s; }
.casino-art b { grid-column: 1 / -1; text-align: center; font: 700 15px var(--mono); color: #2fe37a; }
@keyframes slot { 50% { transform: translateY(-4px); filter: brightness(1.15); } }
.lab-ext { box-shadow: inset 0 0 0 1px rgba(249,115,26,.35); }
.sb-art { display: flex; align-items: center; gap: 16px; }
.sb-art > span { font-size: 46px; animation: tap 1s ease-in-out infinite; }
.sb-art ol { list-style: none; width: 150px; display: flex; flex-direction: column; gap: 8px; }
.sb-art li { position: relative; font-size: 12px; padding: 4px 8px; border-radius: 6px; overflow: hidden; }
.sb-art li b { position: relative; z-index: 1; font-weight: 600; }
.sb-art li i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(249,115,26,.25); border-radius: 6px; animation: grow 3s ease-in-out infinite alternate; }
.sb-art li:nth-child(2) i { animation-delay: -1s; background: rgba(255,255,255,.08); } .sb-art li:nth-child(3) i { animation-delay: -2s; background: rgba(255,255,255,.08); }
@keyframes grow { from { transform: scaleX(.8); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@media (max-width: 900px) { .lab-grid { grid-template-columns: 1fr; } }


@keyframes bob { 50% { transform: translateY(-6px) rotate(3deg); } }
@keyframes tap { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(.9); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes press { 8% { transform: translateY(4px); opacity: .6; } 16% { transform: none; opacity: 1; } }
/* ---- new experiment cards ---- */
.px-art { display: grid; grid-template-columns: repeat(10, 16px); gap: 2px; }
.px-art i { width: 16px; height: 16px; border-radius: 2px; background: var(--surface-2); transition: background .4s; }
.conf-art { display: flex; flex-direction: column; gap: 8px; width: 210px; }
.conf-art span { background: var(--surface-2); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: 13px; color: var(--muted); filter: blur(.4px); }
.conf-art span:nth-child(2) { align-self: flex-end; border-radius: 14px 14px 4px 14px; }
.conf-art b { font-size: 12px; font-family: var(--mono); color: #33d17a; } .conf-art b + b { color: #ff6b6b; margin-left: 10px; }
.quiz-art { text-align: center; }
.quiz-art b { display: grid; place-items: center; width: 110px; height: 140px; margin: 0 auto; border-radius: 16px; background: linear-gradient(140deg, #f9731a, #bf5af2); font-size: 56px; transform: rotate(-6deg); animation: bob 4s ease-in-out infinite; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.duel-art { width: 210px; display: flex; flex-direction: column; gap: 10px; font: 600 12px var(--mono); }
.duel-art div { height: 18px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.duel-art div i { display: block; height: 100%; background: #33d17a; animation: race 2.4s ease-in-out infinite alternate; }
.duel-art div:nth-of-type(2) i { background: #ff453a; animation-delay: -1.2s; }
.duel-art span { text-align: center; color: var(--muted); font-size: 18px; font-weight: 800; }
@keyframes race { from { width: 20%; } to { width: 95%; } }
.guess-art { display: flex; align-items: flex-end; gap: 5px; height: 100px; position: relative; }
.guess-art i { width: 12px; background: var(--text); border-radius: 3px; animation: eqg .7s ease-in-out infinite alternate; }
.guess-art i:nth-child(2n) { animation-delay: -.3s; } .guess-art i:nth-child(3n) { animation-delay: -.5s; }
.guess-art b { position: absolute; right: -44px; top: -10px; font-size: 44px; color: #f9731a; }
@keyframes eqg { from { height: 15%; } to { height: 100%; } }
.flappy-art { position: relative; width: 200px; height: 130px; overflow: hidden; }
.flappy-art i { position: absolute; width: 30px; background: #33d17a; border-radius: 4px; animation: pipes 3s linear infinite; }
.flappy-art i:nth-child(1) { top: 0; height: 40px; } .flappy-art i:nth-child(2) { bottom: 0; height: 45px; }
.flappy-art i:nth-child(3) { top: 0; height: 60px; animation-delay: -1.5s; } .flappy-art i:nth-child(4) { bottom: 0; height: 25px; animation-delay: -1.5s; }
.flappy-art b { position: absolute; left: 50px; top: 50px; width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--bg); font: 800 11px/30px var(--sans); text-align: center; animation: flap .8s ease-in-out infinite alternate; }
@keyframes pipes { from { left: 210px; } to { left: -40px; } }
@keyframes flap { from { transform: translateY(-14px) rotate(-12deg); } to { transform: translateY(12px) rotate(14deg); } }
.sweep-art { display: grid; grid-template-columns: repeat(5, 28px); gap: 3px; font: 700 14px var(--mono); }
.sweep-art i { height: 28px; display: grid; place-items: center; border-radius: 5px; background: #2c2f36; font-style: normal; }
.sweep-art i.o { background: #17181b; } .sweep-art .n1 { color: #7cc4ff; } .sweep-art .n2 { color: #33d17a; } .sweep-art .n3 { color: #ff6b6b; }
.night-art { position: relative; width: 200px; height: 140px; border-radius: 18px; background: radial-gradient(circle at 70% 30%, #1b2a4a, #05070d); overflow: hidden; }
.night-art b { position: absolute; right: 30px; top: 22px; font-size: 40px; }
.night-art i { position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%; animation: twinkle 2s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; } }
.cap-art { font-size: 70px; animation: bob 5s ease-in-out infinite; position: relative; }
.cap-art small { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); font: 600 11px var(--mono); color: var(--muted); white-space: nowrap; }
.remix-art { display: flex; gap: 14px; }
.remix-art div { width: 18px; height: 120px; border-radius: 9px; background: var(--surface-2); position: relative; }
.remix-art div i { position: absolute; left: -5px; width: 28px; height: 14px; border-radius: 4px; background: var(--text); animation: fader 3s ease-in-out infinite alternate; }
.remix-art div:nth-child(2) i { animation-delay: -1s; background: #f9731a; } .remix-art div:nth-child(3) i { animation-delay: -2s; } .remix-art div:nth-child(4) i { animation-delay: -.5s; background: #7cc4ff; }
@keyframes fader { from { top: 8px; } to { top: 96px; } }
/* category headers on /lab */
.lab-cat { margin-top: 80px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.lab-cat h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.lab-cat span { font: 13px var(--mono); color: var(--dim); }
.lab-cat + .lab-grid { margin-top: 24px; }
