/* Live interaction studies. Each card's media square is a small stage that runs in the page.
   Stages stay light in both themes so they sit next to the recorded videos. */

.lab {
  --lab-bg: #F1F0F3;
  --lab-card: #FFFFFF;
  --lab-ink: #2A2633;
  --lab-soft: #E7E3EE;
  --lab-mute: #9A95A6;
  --lab-acc: #8B6CF0;
  --lab-pink: #E86FB1;
  --lab-green: #3BB273;
  --lab-red: #E5484D;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 20%, #FAF9FB 0%, var(--lab-bg) 70%);
  color: var(--lab-ink);
  font-family: var(--font-sans);
  width: 100%;
  align-self: stretch;
  aspect-ratio: 1 / 1;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
:where(.lab) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
.lab button:focus-visible, .lab input:focus-visible { outline: 2px solid var(--lab-acc); outline-offset: 3px; }
.lab svg { display: block; }

/* What to do with it: a small pill in the corner with a looping icon that acts out the gesture.
   The recorded LinkedIn cards carry one too. */
.lab__hint {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  font: 500 9px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: #6F6A7A; background: rgba(255,255,255,.8); border: 1px solid rgba(42,38,51,.08);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 4px 8px 4px 6px; border-radius: 999px; pointer-events: none;
}
.record__media { position: relative; }
.lab__hint svg { width: 12px; height: 12px; overflow: visible; flex: none; }
.lab__hint svg * { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transform-box: fill-box; }
.lab__hint .h-ptr { fill: currentColor; stroke-width: 1; }

/* Click: the pointer taps and a ring spreads from its tip. */
[data-hint="click"] .h-ptr { transform-origin: 0 0; animation: h-tap 1.6s ease-in-out infinite; }
[data-hint="click"] .h-rip { transform-origin: center; opacity: 0; animation: h-rip 1.6s ease-out infinite; }
@keyframes h-tap { 0%, 30%, 60%, 100% { transform: none; } 42% { transform: scale(.78); } }
@keyframes h-rip { 0%, 40% { opacity: 0; transform: scale(.3); } 45% { opacity: .9; } 85%, 100% { opacity: 0; transform: scale(1.6); } }

/* Hover: the pointer drifts back and forth over a spot. */
[data-hint="hover"] .h-ptr { animation: h-drift 2.4s ease-in-out infinite; }
@keyframes h-drift { 0%, 100% { transform: translate(-2px, 1px); } 50% { transform: translate(2px, -1px); } }

/* Move: the pointer wanders in a small loop. */
[data-hint="move"] .h-ptr { animation: h-loop 2.8s linear infinite; }
@keyframes h-loop { 0%, 100% { transform: translate(-2px, 0); } 25% { transform: translate(0, -2px); } 50% { transform: translate(2px, 0); } 75% { transform: translate(0, 2px); } }

/* Hold: a ring fills while the dot is pressed, then lets go. */
[data-hint="hold"] .h-track { opacity: .3; }
[data-hint="hold"] .h-fill { stroke-dasharray: 38; stroke-dashoffset: 38; transform: rotate(-90deg); transform-origin: center;
  animation: h-fill 2s ease-in-out infinite; }
[data-hint="hold"] .h-dot { fill: currentColor; stroke: none; transform-origin: center; animation: h-press 2s ease-in-out infinite; }
@keyframes h-fill { 0%, 10% { stroke-dashoffset: 38; } 70%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes h-press { 0%, 100% { transform: scale(1); } 10%, 80% { transform: scale(.7); } }

/* Drag: a knob slides along its track and back. */
[data-hint="drag"] .h-line { opacity: .35; }
[data-hint="drag"] .h-knob { fill: currentColor; stroke: none; animation: h-slide 2.2s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes h-slide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

/* Watch: an eye that blinks now and then. */
[data-hint="watch"] .h-eye { transform-origin: center; animation: h-blink 3.2s ease-in-out infinite; }
[data-hint="watch"] .h-eye circle { fill: currentColor; stroke: none; }
@keyframes h-blink { 0%, 44%, 52%, 100% { transform: none; } 48% { transform: scaleY(.1); } }

/* LinkedIn: the arrow leaves up and to the right, then comes back in from the corner. */
[data-hint="linkedin"] { color: #0A66C2; }
[data-hint="linkedin"] .h-arw { animation: h-out 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes h-out {
  0%, 30% { transform: none; opacity: 1; }
  48% { transform: translate(5px, -5px); opacity: 0; }
  49% { transform: translate(-5px, 5px); opacity: 0; }
  70%, 100% { transform: none; opacity: 1; }
}
/* On the card being pointed at, the hint plays a little faster. */
.record__row:hover .lab__hint svg * { animation-duration: 1.1s; }
.record__row:hover [data-hint="watch"] .h-eye { animation-duration: 1.6s; }

/* A shared white button. */
.lab-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--lab-card); font-weight: 500; font-size: 14px;
  box-shadow: 0 1px 2px rgba(42,38,51,.08), 0 6px 18px -6px rgba(42,38,51,.18);
  transition: transform .25s var(--out), box-shadow .25s ease;
}
.lab-btn:active { transform: scale(.96); }
.lab-btn svg { width: 18px; height: 18px; }

/* 01 Like burst --------------------------------------------------------- */
.like { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--lab-card);
  display: grid; place-items: center; box-shadow: 0 8px 24px -8px rgba(42,38,51,.25); }
.like svg { width: 36px; height: 36px; }
.like path { fill: none; stroke: var(--lab-ink); stroke-width: 1.8; transition: fill .2s ease, stroke .2s ease; }
.like.on path { fill: var(--lab-pink); stroke: var(--lab-pink); }
.like.pop svg { animation: like-pop .5s var(--spring); }
@keyframes like-pop { 0% { transform: scale(1); } 30% { transform: scale(.7); } 100% { transform: scale(1); } }
.like i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%;
  background: var(--lab-pink); opacity: 0; }
.like.pop i { animation: like-dot .6s var(--out) forwards; }
.like i:nth-child(2n) { background: var(--lab-acc); }
@keyframes like-dot {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(-20px) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-58px) scale(.2); }
}

/* 02 Sleepy toggle ------------------------------------------------------ */
.sleepy { width: 120px; height: 64px; border-radius: 999px; background: #D9D5E0; position: relative;
  transition: background .35s ease; box-shadow: inset 0 2px 6px rgba(0,0,0,.08); }
.sleepy b { position: absolute; top: 6px; left: 6px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--lab-card); box-shadow: 0 4px 10px rgba(42,38,51,.2); transition: transform .5s var(--spring); }
.sleepy b::before, .sleepy b::after { content: ""; position: absolute; top: 23px; width: 9px; height: 2px;
  border-radius: 2px; background: var(--lab-ink); transition: height .25s ease, top .25s ease, border-radius .25s ease; }
.sleepy b::before { left: 13px; } .sleepy b::after { right: 13px; }
.sleepy em { position: absolute; right: 18px; top: 8px; font: 600 12px/1 var(--font-sans); font-style: normal;
  color: #8A8496; animation: zz 2s ease-in-out infinite; transition: opacity .2s; }
@keyframes zz { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-5px); opacity: 1; } }
.sleepy.on { background: var(--lab-acc); }
.sleepy.on b { transform: translateX(56px); }
.sleepy.on b::before, .sleepy.on b::after { height: 9px; top: 20px; border-radius: 50%; }
.sleepy.on em { opacity: 0; animation: none; }

/* 03 Copy --------------------------------------------------------------- */
.copy .ico { position: relative; width: 18px; height: 18px; }
.copy .ico svg { position: absolute; inset: 0; transition: transform .3s var(--spring), opacity .2s; }
.copy .tick { opacity: 0; transform: scale(.4); color: var(--lab-green); }
.copy .tick path { stroke-dasharray: 20; stroke-dashoffset: 20; }
.copy.done .clip { opacity: 0; transform: scale(.4); }
.copy.done .tick { opacity: 1; transform: none; }
.copy.done .tick path { stroke-dashoffset: 0; transition: stroke-dashoffset .35s .1s var(--out); }
.copy .lbl { position: relative; height: 18px; overflow: hidden; width: 58px; }
.copy .lbl span { display: block; line-height: 18px; transition: transform .35s var(--out); }
.copy.done .lbl span { transform: translateY(-18px); }

/* 04 Send --------------------------------------------------------------- */
.send { overflow: hidden; width: 128px; justify-content: center; }
.send .plane { transition: none; }
.send.go .plane { animation: fly 1.4s var(--out); }
@keyframes fly {
  0% { transform: none; }
  35% { transform: translate(70px, -40px) rotate(-20deg); opacity: 0; }
  36% { transform: translate(-70px, 20px); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.send .lbl { position: relative; height: 18px; overflow: hidden; }
.send .lbl span { display: block; line-height: 18px; }
.send.go .lbl span { animation: sendlbl 1.4s var(--out); }
@keyframes sendlbl { 0%,100% { transform: none; } 25%,75% { transform: translateY(-18px); } }

/* 05 Download ----------------------------------------------------------- */
.dl { position: relative; height: 48px; width: 150px; border-radius: 999px; background: var(--lab-ink); color: #fff;
  display: grid; place-items: center; font-weight: 500; font-size: 14px; overflow: hidden;
  transition: width .45s var(--out), background .3s; }
.dl > span { display: flex; align-items: center; gap: 8px; transition: opacity .2s; }
.dl svg.ring { position: absolute; inset: 4px; width: 40px; height: 40px; opacity: 0; transform: rotate(-90deg); }
.dl .ring circle { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 101; stroke-dashoffset: 101; }
.dl .ok { position: absolute; opacity: 0; transform: scale(.4); transition: transform .4s var(--spring), opacity .2s; }
.dl.load { width: 48px; }
.dl.load > span { opacity: 0; }
.dl.load svg.ring { opacity: 1; }
.dl.load .ring circle { animation: dlring 1.3s .35s linear forwards; }
@keyframes dlring { to { stroke-dashoffset: 0; } }
.dl.fin { width: 48px; background: var(--lab-green); }
.dl.fin > span, .dl.fin svg.ring { opacity: 0; }
.dl.fin .ok { opacity: 1; transform: none; }

/* 06 Hold to delete ----------------------------------------------------- */
.hold { position: relative; overflow: hidden; height: 48px; padding: 0 22px; border-radius: 14px;
  background: #FBE3E4; color: var(--lab-red); font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 8px;
  touch-action: none; }
.hold::before { content: ""; position: absolute; inset: 0; background: var(--lab-red); transform-origin: left;
  transform: scaleX(0); transition: transform .4s var(--out); }
.hold.down::before { transform: scaleX(1); transition: transform 1.2s linear; }
.hold span, .hold svg { position: relative; z-index: 1; transition: color .3s; }
.hold.down span, .hold.down svg { color: #fff; transition-delay: .5s; }
.hold.gone { animation: shake .4s ease; }
.hold.gone::before { transform: scaleX(1); }
.hold.gone span, .hold.gone svg { color: #fff; }
@keyframes shake { 20%,60% { transform: translateX(-4px); } 40%,80% { transform: translateX(4px); } }

/* 07 Stars -------------------------------------------------------------- */
.stars { display: flex; gap: 6px; }
.stars button svg { width: 30px; height: 30px; }
.stars path { fill: var(--lab-soft); transition: fill .2s ease; }
.stars button { transition: transform .3s var(--spring); }
.stars button.lit path { fill: #F5B83D; }
.stars button.lit { animation: wob .45s var(--spring) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes wob { 0% { transform: scale(1) rotate(0); } 40% { transform: scale(1.25) rotate(-12deg); } 100% { transform: scale(1) rotate(0); } }
.stars-out { position: absolute; bottom: 22px; font: 400 11px/1 var(--font-mono); letter-spacing: .06em; color: var(--lab-mute); }

/* 08 Search ------------------------------------------------------------- */
.search { display: flex; align-items: center; height: 48px; width: 48px; border-radius: 999px; background: var(--lab-card);
  box-shadow: 0 6px 18px -6px rgba(42,38,51,.25); overflow: hidden; transition: width .55s var(--spring); }
.search.open { width: 200px; }
.search button { flex: none; width: 48px; height: 48px; display: grid; place-items: center; }
.search button svg { width: 20px; height: 20px; }
.search input { border: 0; outline: 0; background: transparent; font: 400 14px var(--font-sans); color: var(--lab-ink);
  width: 140px; opacity: 0; transition: opacity .2s; }
.search.open input { opacity: 1; transition-delay: .2s; }

/* 09 Toast stack -------------------------------------------------------- */
.toasts { position: relative; width: 190px; height: 150px; }
.toast { position: absolute; left: 0; right: 0; bottom: 20px; height: 44px; border-radius: 12px; background: var(--lab-card);
  box-shadow: 0 6px 16px -6px rgba(42,38,51,.25); display: flex; align-items: center; gap: 9px; padding: 0 12px; font-size: 12.5px;
  transition: transform .5s var(--spring), opacity .3s; }
.toast i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.toast:nth-child(1) { z-index: 3; }
.toast:nth-child(2) { z-index: 2; transform: translateY(-8px) scale(.94); opacity: .85; }
.toast:nth-child(3) { z-index: 1; transform: translateY(-16px) scale(.88); opacity: .6; }
.lab:hover .toast:nth-child(2), .toasts.fan .toast:nth-child(2) { transform: translateY(-52px); opacity: 1; }
.lab:hover .toast:nth-child(3), .toasts.fan .toast:nth-child(3) { transform: translateY(-104px); opacity: 1; }

/* 10 Tabs --------------------------------------------------------------- */
.tabs { position: relative; display: flex; padding: 4px; border-radius: 999px; background: var(--lab-card);
  box-shadow: 0 6px 18px -8px rgba(42,38,51,.25); }
.tabs button { position: relative; z-index: 1; padding: 9px 14px; font-size: 13px; font-weight: 500; color: var(--lab-mute); transition: color .25s; }
.tabs button.on { color: #fff; }
.tabs .pill { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--lab-acc);
  transition: transform .5s var(--spring), width .5s var(--spring); }

/* 11 Accordion ---------------------------------------------------------- */
.acc { width: 200px; display: flex; flex-direction: column; gap: 6px; }
.acc > div { background: var(--lab-card); border-radius: 12px; box-shadow: 0 4px 12px -6px rgba(42,38,51,.2); }
.acc button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; font-size: 13px; font-weight: 500; }
.acc button svg { width: 14px; height: 14px; transition: transform .4s var(--spring); }
.acc .body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--out); }
.acc .body p { overflow: hidden; margin: 0; padding: 0 12px; font-size: 12px; line-height: 1.45; color: #6F6A7A; }
.acc .open .body { grid-template-rows: 1fr; }
.acc .open .body p { padding-bottom: 12px; }
.acc .open button svg { transform: rotate(180deg); }

/* 12 Password reveal ---------------------------------------------------- */
.pw { display: flex; align-items: center; gap: 4px; height: 48px; width: 200px; padding: 0 6px 0 14px; border-radius: 14px;
  background: var(--lab-card); box-shadow: 0 6px 18px -8px rgba(42,38,51,.25); }
.pw .txt { flex: 1; display: flex; font: 500 15px/1 var(--font-mono); letter-spacing: .02em; }
.pw .txt span { display: inline-block; width: 1ch; text-align: center; transition: transform .3s var(--spring); }
.pw .txt span::before { content: "\2022"; }
.pw.show .txt span::before { content: attr(data-c); }
.pw.show .txt span { animation: flip .35s var(--spring) both; animation-delay: calc(var(--i) * 35ms); }
@keyframes flip { 0% { transform: rotateX(90deg); } 100% { transform: none; } }
.pw button { width: 36px; height: 36px; display: grid; place-items: center; }
.pw .lid { stroke-dasharray: 23; stroke-dashoffset: 0; transition: stroke-dashoffset .35s var(--out); }
.pw.show .lid { stroke-dashoffset: 23; }
.pw .pupil { transition: transform .1s linear; }

/* 13 Checklist ---------------------------------------------------------- */
.todo { display: flex; flex-direction: column; gap: 10px; width: 180px; }
.todo button { display: flex; align-items: center; gap: 10px; font-size: 13.5px; text-align: left; }
.todo .box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid #BDB7C8; display: grid; place-items: center;
  transition: background .25s, border-color .25s, transform .3s var(--spring); }
.todo .box svg { width: 13px; height: 13px; }
.todo .box path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 18; stroke-dashoffset: 18; transition: stroke-dashoffset .3s var(--out); }
.todo .t { position: relative; transition: color .3s; }
.todo .t::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s .1s var(--out); }
.todo .on .box { background: var(--lab-acc); border-color: var(--lab-acc); transform: scale(1.08); }
.todo .on .box path { stroke-dashoffset: 0; transition-delay: .05s; }
.todo .on .t { color: var(--lab-mute); }
.todo .on .t::after { transform: scaleX(1); }

/* 14 Bell --------------------------------------------------------------- */
.bell { position: relative; width: 72px; height: 72px; border-radius: 22px; background: var(--lab-card); display: grid; place-items: center;
  box-shadow: 0 8px 22px -8px rgba(42,38,51,.25); }
.bell svg { width: 30px; height: 30px; transform-origin: 50% 8%; }
.bell.ring svg { animation: swing .8s ease-in-out; }
@keyframes swing { 15% { transform: rotate(18deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } 100% { transform: none; } }
.bell .badge { position: absolute; top: 10px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--lab-red); color: #fff; font: 600 10.5px/18px var(--font-sans); text-align: center; transform: scale(0); transition: transform .35s var(--spring); }
.bell .badge.in { transform: scale(1); }

/* 15 Rolling counter ---------------------------------------------------- */
.count { display: flex; align-items: center; gap: 14px; }
.count button.step { width: 40px; height: 40px; border-radius: 50%; background: var(--lab-card); font-size: 20px; line-height: 1;
  box-shadow: 0 4px 12px -4px rgba(42,38,51,.25); transition: transform .2s var(--out); }
.count button.step:active { transform: scale(.9); }
.num { display: flex; font: 600 44px/1 var(--font-sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.num .col { height: 1em; overflow: hidden; width: .62em; }
.num .col span { display: block; transition: transform .55s var(--spring); }
.num .col span i { display: block; height: 1em; font-style: normal; text-align: center; }

/* 16 Avatar stack ------------------------------------------------------- */
.faces { display: flex; }
.faces span { width: 50px; height: 50px; border-radius: 50%; border: 3px solid var(--lab-bg); display: grid; place-items: center;
  font: 600 14px var(--font-sans); color: #fff; margin-left: -16px; transition: margin .45s var(--spring), transform .45s var(--spring); }
.faces span:first-child { margin-left: 0; }
.lab:hover .faces span { margin-left: 6px; transform: translateY(-4px); }
.lab:hover .faces span:first-child { margin-left: 0; }
.faces span:nth-child(2) { transition-delay: 30ms; } .faces span:nth-child(3) { transition-delay: 60ms; } .faces span:nth-child(4) { transition-delay: 90ms; }

/* 17 Battery ------------------------------------------------------------ */
.batt { position: relative; width: 64px; height: 110px; border: 4px solid var(--lab-ink); border-radius: 14px; padding: 5px; }
.batt::before { content: ""; position: absolute; top: -12px; left: 50%; width: 22px; height: 8px; margin-left: -11px; border-radius: 4px 4px 0 0; background: var(--lab-ink); }
.batt .fill { position: absolute; left: 5px; right: 5px; bottom: 5px; border-radius: 7px; background: var(--lab-green); height: 10%; animation: charge 3.2s var(--out) infinite; overflow: hidden; }
@keyframes charge { 0% { height: 10%; background: var(--lab-red); } 30% { background: #F5B83D; } 60%,85% { height: calc(100% - 10px); background: var(--lab-green); } 100% { height: 10%; background: var(--lab-red); } }
.batt .fill i { position: absolute; bottom: -8px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); animation: bub 1.6s linear infinite; }
.batt .fill i:nth-child(1) { left: 8px; } .batt .fill i:nth-child(2) { left: 22px; animation-delay: .5s; } .batt .fill i:nth-child(3) { left: 34px; animation-delay: 1s; }
@keyframes bub { to { transform: translateY(-110px); } }
.batt svg { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; z-index: 1; animation: bolt 1.6s ease-in-out infinite; }
@keyframes bolt { 50% { transform: scale(1.15); } }

/* 18 Bouncing ball ------------------------------------------------------ */
.ballbox { position: relative; width: 120px; height: 150px; }
.ball { position: absolute; left: 50%; bottom: 14px; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F49AD0, var(--lab-pink) 55%, #B54A88); transform-origin: 50% 100%;
  animation: bounce 1s infinite; }
@keyframes bounce {
  0% { transform: translateY(0) scale(1.3, .7); animation-timing-function: cubic-bezier(.2,.6,.35,1); }
  12% { transform: translateY(-10px) scale(.85, 1.2); animation-timing-function: cubic-bezier(.2,.6,.35,1); }
  50% { transform: translateY(-92px) scale(1); animation-timing-function: cubic-bezier(.65,0,.8,.4); }
  88% { transform: translateY(-6px) scale(.9, 1.12); }
  100% { transform: translateY(0) scale(1.3, .7); }
}
.shadow { position: absolute; left: 50%; bottom: 8px; width: 50px; height: 10px; margin-left: -25px; border-radius: 50%; background: rgba(42,38,51,.18); animation: shad 1s infinite; }
@keyframes shad { 0%,100% { transform: scale(1.1); opacity: 1; } 50% { transform: scale(.45); opacity: .4; } }

/* 19 Typing to message -------------------------------------------------- */
.typing { position: relative; display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 22px 22px 22px 6px;
  background: var(--lab-card); box-shadow: 0 6px 16px -6px rgba(42,38,51,.25); animation: tb 4.8s var(--out) infinite; overflow: hidden; }
@keyframes tb { 0%,45% { width: 70px; } 55%,90% { width: 150px; } 100% { width: 70px; } }
.typing .dots { position: absolute; display: flex; gap: 5px; animation: tdots 4.8s infinite; }
.typing .dots i { width: 8px; height: 8px; border-radius: 50%; background: #B2ACBD; animation: tdot 1s ease-in-out infinite; }
.typing .dots i:nth-child(2) { animation-delay: .15s; } .typing .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%,60%,100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes tdots { 0%,44% { opacity: 1; } 48%,96% { opacity: 0; } 100% { opacity: 1; } }
.typing .msg { font-size: 13.5px; white-space: nowrap; opacity: 0; animation: tmsg 4.8s infinite; }
@keyframes tmsg { 0%,52% { opacity: 0; transform: translateY(6px); } 58%,88% { opacity: 1; transform: none; } 94%,100% { opacity: 0; } }

/* 20 Sun to moon -------------------------------------------------------- */
.lab.night { background: radial-gradient(120% 90% at 50% 20%, #2C2840 0%, #17151F 70%); }
.lab { transition: background .6s ease; }
.lab.night .lab__hint { background: rgba(255,255,255,.12); color: #C9C3D6; border-color: transparent; }
.sky { position: relative; width: 96px; height: 96px; }
.sky .core { position: absolute; inset: 22px; border-radius: 50%; background: #F5B83D; transition: background .6s, transform .6s var(--spring); }
.sky .bite { position: absolute; width: 52px; height: 52px; border-radius: 50%; top: 22px; left: 22px; background: var(--lab-bg);
  transform: translate(46px, -46px); opacity: 0; transition: transform .7s var(--out), background .6s, opacity .3s; }
.lab.night .sky .bite { opacity: 1; }
.sky .rays { position: absolute; inset: 0; transition: transform .7s var(--out), opacity .4s; }
.sky .rays i { position: absolute; left: 46px; top: 2px; width: 4px; height: 12px; border-radius: 2px; background: #F5B83D; transform-origin: 2px 46px; }
.lab.night .sky .core { background: #E9E4FF; transform: rotate(-20deg); }
.lab.night .sky .bite { transform: translate(14px, -12px); background: #24213A; }
.lab.night .sky .rays { transform: rotate(90deg) scale(.5); opacity: 0; }
.sky .star { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .5s .3s; }
.lab.night .sky .star { opacity: 1; animation: twinkle 2s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .3; } }

/* 21 Gears -------------------------------------------------------------- */
.gears { width: 150px; height: 120px; }
.gears .g1 { transform-origin: 56px 64px; animation: spin 6s linear infinite; }
.gears .g2 { transform-origin: 105px 38px; animation: spin 4s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 22 Volume ------------------------------------------------------------- */
.vol { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.vol svg { width: 64px; height: 64px; overflow: visible; }
.vol .w { fill: none; stroke: var(--lab-ink); stroke-width: 2.2; stroke-linecap: round; transition: opacity .25s, transform .35s var(--spring); transform-origin: 18px 32px; }
.vol .w.off { opacity: 0; transform: scale(.6); }
.vol .x { stroke: var(--lab-red); stroke-width: 2.2; stroke-linecap: round; opacity: 0; transition: opacity .2s; }
.vol.mute .x { opacity: 1; }
.vol input { width: 150px; accent-color: var(--lab-acc); }

/* 23 Folder ------------------------------------------------------------- */
.folder { position: relative; width: 130px; height: 96px; perspective: 400px; }
.folder .back { position: absolute; inset: 0; border-radius: 6px 12px 12px 12px; background: #7A5BE0; }
.folder .back::before { content: ""; position: absolute; top: -10px; left: 0; width: 48px; height: 14px; border-radius: 6px 8px 0 0; background: #7A5BE0; }
.folder .paper { position: absolute; left: 12px; right: 12px; top: 8px; height: 76px; border-radius: 6px; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .5s var(--spring); }
.folder .paper:nth-of-type(2) { left: 18px; right: 18px; background: #FDF2F8; transition-delay: 40ms; }
.folder .front { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; border-radius: 12px; background: var(--lab-acc);
  transform-origin: bottom; transition: transform .5s var(--out); }
.lab:hover .folder .front, .folder.open .front { transform: rotateX(-32deg); }
.lab:hover .folder .paper, .folder.open .paper { transform: translateY(-22px) rotate(-4deg); }
.lab:hover .folder .paper:nth-of-type(2), .folder.open .paper:nth-of-type(2) { transform: translateY(-12px) rotate(5deg); }

/* 24 Watching blob ------------------------------------------------------ */
.blob { position: relative; width: 120px; height: 104px; border-radius: 55% 45% 48% 52% / 60% 58% 42% 40%;
  background: var(--lab-acc); animation: wobble 4s ease-in-out infinite; }
@keyframes wobble { 50% { border-radius: 48% 52% 55% 45% / 55% 60% 40% 45%; } }
.blob .eye { position: absolute; top: 34px; width: 26px; height: 26px; border-radius: 50%; background: #fff; overflow: hidden; }
.blob .eye:nth-child(1) { left: 28px; } .blob .eye:nth-child(2) { right: 28px; }
.blob .eye i { position: absolute; left: 8px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--lab-ink); transition: transform .12s linear; }
.blob .eye::after { content: ""; position: absolute; inset: 0; background: #6A4FD0; transform: translateY(-100%); }
.blob.blink .eye::after { animation: blink .28s ease-in-out; }
@keyframes blink { 50% { transform: none; } }
.blob.hop { animation: hop .5s var(--spring), wobble 4s ease-in-out infinite; }
@keyframes hop { 40% { transform: translateY(-16px) scale(.95, 1.06); } }

/* 25 Magnetic button ---------------------------------------------------- */
.mag { height: 52px; padding: 0 26px; border-radius: 999px; background: var(--lab-ink); color: #fff; font-weight: 500; font-size: 14px;
  transition: transform .6s var(--spring); }
.mag span { display: inline-block; transition: transform .6s var(--spring); }
.mag.near { transition: transform .15s linear; }
.mag.near span { transition: transform .15s linear; }

@media (prefers-reduced-motion: reduce) {
  .lab *, .lab *::before, .lab *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* The filter chips set [hidden], but the card grid rule sets display:flex and wins. Put hidden back on top. */
.gd .record--grid .gd__item[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .lab__hint svg * { animation: none !important; } }

/* The home page tile borrows the looping pieces. Its stage is 188px wide, so they are drawn smaller. */
.reel-stage .lab { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.reel-stage .lab > * { scale: .72; }
.reel-stage .lab.is-on { opacity: 1; }
