/* ShadowCast · The Lab (v3). Everything is scoped to .lab.
   Layout: a near-black stage with one shared particle field behind a 4 / 2 / 1 column grid of
   cinematic product cards. Gold ties the section to ShadowCast; each app's accent lives in its
   artwork, edge light, label, aura and particles. */
.lab {
  --bg: #080809; --surface: #111113; --surface-2: #17171a; --text: #F1E9D3; --muted: #B3ADA1; --dim: #8a8478;
  --gold: #D8B76B; --gold-hi: #F3DCA0; --gold-lo: #8a6a2c;
  --line: rgba(216, 183, 107, .24); --line-2: rgba(241, 233, 211, .09);
  --display: var(--f-display, 'Syne', 'Avenir Next', 'Segoe UI', sans-serif);
  --body: var(--f-body, 'Manrope', 'Segoe UI', system-ui, sans-serif);
  --label: var(--f-label, 'Cinzel', 'Trajan Pro', Georgia, serif);
  --mono: var(--f-mono, 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace);
  --gut: clamp(20px, 4vw, 48px);
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  padding-block: clamp(36px, 4.5vw, 64px) clamp(56px, 7vw, 96px);
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(216, 183, 107, .055), transparent 70%),
    radial-gradient(60% 60% at 50% 100%, rgba(216, 183, 107, .04), transparent 70%),
    var(--bg);
  color: var(--text); font-family: var(--body);
}
.lab *, .lab *::before, .lab *::after { box-sizing: border-box; }
.lab .lab-sky-wrap, .lab .lab-fx-wrap { position: absolute; inset: 0; pointer-events: none; }
.lab .lab-sky-wrap { z-index: 0; }
.lab .lab-fx-wrap { z-index: 2; }
/* both canvases are viewport-sized and stick while the section scrolls past */
.lab .lab-sky, .lab .lab-field { position: sticky; top: 0; display: block; width: 100%; height: 100vh; max-height: 100%; }
.lab .lab-inner { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding-inline: var(--gut); }

/* header */
.lab .lab-head { display: grid; justify-items: center; text-align: center; gap: 14px; margin: 0 auto clamp(28px, 3.4vw, 44px); max-width: 980px; padding-top: clamp(124px, 13vw, 210px); }
.lab .lab-eyebrow { margin: 0; text-shadow: 0 1px 10px rgba(0, 0, 0, .9); display: flex; align-items: center; gap: 14px; font: 600 12px/1.2 var(--label); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.lab .lab-eyebrow::before, .lab .lab-eyebrow::after { content: ''; width: clamp(28px, 5vw, 56px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.lab .lab-eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }
.lab .lab-eyebrow i { font-style: normal; color: var(--gold-lo); }
.lab .lab-title { margin: 6px 0 0; font: 800 clamp(38px, 5.6vw, 84px)/1 var(--display); letter-spacing: -.025em; color: var(--text); text-wrap: balance; text-shadow: 0 2px 28px rgba(0, 0, 0, .75), 0 0 2px rgba(0, 0, 0, .5); }
.lab .lab-sub { margin: 0; font: 400 clamp(18px, 1.7vw, 24px)/1.35 var(--body); color: #e4dccb; text-shadow: 0 1px 14px rgba(0, 0, 0, .85); }
.lab .lab-note { margin: 4px 0 0; max-width: 62ch; font-size: 16px; line-height: 1.6; color: #c4beb2; text-shadow: 0 1px 12px rgba(0, 0, 0, .9); }

/* filters */
.lab .lab-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: clamp(28px, 3vw, 40px); }
.lab .lab-filter { min-height: 44px; padding: 0 20px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(17, 17, 19, .7); color: var(--text);
  font: 600 15px var(--body); cursor: pointer; transition: background .25s, border-color .25s, color .25s, box-shadow .25s; }
.lab .lab-filter:hover { border-color: var(--gold); }
.lab .lab-filter[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1206; border-color: transparent; box-shadow: 0 8px 30px rgba(216, 183, 107, .22); }
.lab .lab-n { font: 600 12px/1 var(--mono); padding: 4px 7px; border-radius: 999px; background: rgba(241, 233, 211, .08); color: var(--muted); }
.lab .lab-filter[aria-pressed="true"] .lab-n { background: rgba(26, 18, 6, .14); color: #1a1206; }
.lab .lab-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.lab :focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* grid: 4 columns from 1280px, 2 from 640px, 1 on phones */
.lab .lab-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 1.7vw, 26px); }
@media (min-width: 640px) { .lab .lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .lab .lab-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* card: overflow-visible wrapper (aura) > surface (edge light, media, body) */
.lab .lab-card { --ac: var(--gold); --ac2: var(--ac); --lift: 0px; position: relative; isolation: isolate; display: flex; min-width: 0; transform: translateY(var(--lift)); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.lab .lab-card[hidden] { display: none; }
.lab .lab-card.is-active { --lift: -4px; }
.lab .lab-surface { position: relative; display: flex; flex-direction: column; width: 100%; border-radius: 16px; background: linear-gradient(180deg, var(--surface-2), var(--surface) 40%);
  border: 1px solid color-mix(in srgb, var(--ac) 20%, rgba(241, 233, 211, .07)); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); transition: border-color .26s, box-shadow .26s; }
.lab .lab-card.is-active .lab-surface { border-color: color-mix(in srgb, var(--ac) 55%, transparent); box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 40px color-mix(in srgb, var(--ac) 16%, transparent); }

/* soft halo behind the card, plus two sparse particles drifting just outside its edge */
.lab .lab-aura { position: absolute; inset: -26px; z-index: -1; pointer-events: none; border-radius: 40px;
  background: radial-gradient(58% 52% at 50% 36%, color-mix(in srgb, var(--ac) 26%, transparent), transparent 72%);
  opacity: .34; transition: opacity .7s ease; }
.lab .lab-card.is-active .lab-aura { opacity: .9; }
.lab .lab-aura i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 8px var(--ac); opacity: 0; }
.lab .lab-aura i:nth-child(1) { left: 8px; top: 32%; animation: lab-orbit-a 9s linear infinite; }
.lab .lab-aura i:nth-child(2) { right: 10px; top: 64%; animation: lab-orbit-a 11s linear -4s infinite reverse; }
@keyframes lab-orbit-a { 0% { transform: translateY(18px); opacity: 0; } 20% { opacity: .55; } 80% { opacity: .45; } 100% { transform: translateY(-70px); opacity: 0; } }

/* thin coloured edge light (border-only via mask) */
.lab .lab-edge { position: absolute; inset: -1px; border-radius: 17px; padding: 1px; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 50%, transparent), color-mix(in srgb, var(--ac) 8%, transparent) 55%, color-mix(in srgb, var(--ac) 30%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: .5; transition: opacity .4s; }
.lab .lab-card.is-active .lab-edge { opacity: 1; }

/* media viewport: the only clipped layer */
.lab .lab-media { position: relative; aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden; border-radius: 15px 15px 0 0; background: #050506; cursor: pointer; }
.lab .lab-art, .lab .lab-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lab .lab-art { transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.03); transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .45s; }
.lab .lab-prev { opacity: 0; transition: opacity .45s ease; background: #000; }
.lab .lab-card.is-playing .lab-prev { opacity: 1; }
.lab .lab-card.is-playing .lab-fx { opacity: .25; }
.lab .lab-media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none; z-index: 2; background: linear-gradient(180deg, transparent, rgba(17, 17, 19, .82)); }
.lab .lab-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity .5s; }
.lab .lab-fx i { position: absolute; display: block; }
.lab .lab-status { position: absolute; left: 14px; top: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  font: 700 11px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: #f6f1e4;
  background: rgba(8, 8, 9, .72); border: 1px solid color-mix(in srgb, var(--ac) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lab .lab-status b { width: 6px; height: 6px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 8px var(--ac); }
.lab .lab-card[data-filter="oss"] .lab-status b { border-radius: 1px; transform: rotate(45deg); }

/* play control: straddles the artwork and the body */
.lab .lab-play { position: absolute; right: 16px; top: 0; transform: translateY(-50%); z-index: 4; min-width: 48px; height: 48px; padding: 0 14px 0 13px; display: inline-flex; align-items: center; gap: 0; border-radius: 999px; cursor: pointer;
  background: rgba(10, 10, 11, .86); color: var(--text); border: 1px solid color-mix(in srgb, var(--ac) 70%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55), 0 0 0 4px rgba(10, 10, 11, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 600 14px var(--body); transition: gap .26s, border-color .26s, background .26s, box-shadow .26s; }
.lab .lab-play svg { width: 20px; height: 20px; flex: none; fill: var(--ac); }
.lab .lab-play span { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .3s ease, opacity .2s ease; }
.lab .lab-card.is-active .lab-play, .lab .lab-play:focus-visible { gap: 8px; border-color: var(--ac); box-shadow: 0 10px 28px rgba(0, 0, 0, .55), 0 0 0 4px rgba(10, 10, 11, .55), 0 0 22px color-mix(in srgb, var(--ac) 35%, transparent); }
.lab .lab-card.is-active .lab-play span, .lab .lab-play:focus-visible span { max-width: 90px; opacity: 1; }

/* body */
.lab .lab-body { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 26px 22px 20px; flex: 1; }
.lab .lab-cat { margin: 0; padding-right: 64px; font: 600 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--ac) 88%, #fff); }
.lab .lab-name { margin: 0; font: 800 clamp(22px, 1.75vw, 27px)/1.08 var(--display); letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; text-wrap: balance; }
.lab .lab-desc { margin: 2px 0 0; font-size: 15.5px; line-height: 1.58; color: var(--muted); }
.lab .lab-meta { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 500 12.5px/1.4 var(--mono); color: var(--dim); }
.lab .lab-body > .lab-desc { margin-bottom: 12px; }
.lab .lab-meta b { color: var(--text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* signature line */
.lab .lab-sign { margin: clamp(40px, 5vw, 64px) 0 0; display: flex; align-items: center; gap: 22px; font: 600 11px var(--label); letter-spacing: .4em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.lab .lab-sign i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.lab .lab-sign i:last-child { background: linear-gradient(90deg, var(--line), transparent); }

/* ------------------------------------------------------------------ per-app identities */
/* Vehicle Studio 360: cool cyan perimeter with a travelling studio light; light sweep and glints in the art */
@property --lab-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.lab .lab-card[data-app="vs360"] .lab-edge { background: conic-gradient(from var(--lab-a), transparent 0 64%, color-mix(in srgb, var(--ac) 80%, transparent) 76%, #effcff 80%, color-mix(in srgb, var(--ac) 80%, transparent) 84%, transparent 94%), linear-gradient(color-mix(in srgb, var(--ac) 22%, transparent), color-mix(in srgb, var(--ac) 22%, transparent)); animation: lab-spin 8s linear infinite; }
@keyframes lab-spin { to { --lab-a: 360deg; } }
.lab [data-app="vs360"] .lab-fx i:nth-child(1) { inset: -20% -60%; background: linear-gradient(105deg, transparent 42%, rgba(120, 230, 255, .22) 49%, rgba(235, 252, 255, .32) 50%, rgba(120, 230, 255, .2) 51%, transparent 58%); animation: lab-sweep 6.5s cubic-bezier(.45, 0, .2, 1) infinite; mix-blend-mode: screen; }
@keyframes lab-sweep { 0%, 35% { transform: translateX(-55%); } 75%, 100% { transform: translateX(55%); } }
.lab [data-app="vs360"] .lab-fx i:nth-child(2), .lab [data-app="vs360"] .lab-fx i:nth-child(3) { width: 10px; height: 10px; background: radial-gradient(circle, #fff 0 1px, rgba(140, 235, 255, .8) 2px, transparent 5px); animation: lab-glint 4.2s ease-in-out infinite; }
.lab [data-app="vs360"] .lab-fx i:nth-child(2) { left: 31%; top: 46%; }
.lab [data-app="vs360"] .lab-fx i:nth-child(3) { left: 71%; top: 52%; animation-delay: 2.1s; }
@keyframes lab-glint { 0%, 70%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 82% { opacity: 1; transform: scale(1.3) rotate(45deg); } }
.lab [data-app="vs360"] .lab-aura i { width: 14px; height: 1.5px; border-radius: 2px; transform-origin: center; }

/* Nyx-I: deep violet halo, slow elliptical orbit, a pulse from the etched emblem */
.lab .lab-card[data-app="nyx"] .lab-aura { background: radial-gradient(56% 50% at 50% 34%, color-mix(in srgb, var(--ac) 34%, transparent), transparent 72%); }
.lab [data-app="nyx"] .lab-fx i:nth-child(1) { left: 50%; top: 42%; width: 36%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(170, 130, 255, .32), rgba(155, 107, 250, .1) 45%, transparent 70%); animation: lab-pulse 4.6s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes lab-pulse { 0%, 100% { opacity: .25; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: .9; transform: translate(-50%, -50%) scale(1.06); } }
.lab [data-app="nyx"] .lab-fx i:nth-child(2) { left: 50%; top: 46%; width: 70%; height: 26%; transform: translate(-50%, -50%) rotate(-12deg); border-radius: 50%; }
.lab [data-app="nyx"] .lab-fx i:nth-child(2)::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(170, 130, 255, .16); }
.lab [data-app="nyx"] .lab-fx i:nth-child(2)::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #e2d4ff; box-shadow: 0 0 10px #9b6bfa, 0 0 18px #9b6bfa; offset-path: ellipse(50% 50% at 50% 50%); animation: lab-ellipse 12s linear infinite; }
@supports not (offset-path: ellipse(50% 50% at 50% 50%)) { .lab [data-app="nyx"] .lab-fx i:nth-child(2)::after { display: none; } }
@keyframes lab-ellipse { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.lab [data-app="nyx"] .lab-fx i:nth-child(3) { left: 24%; top: 30%; width: 7px; height: 9px; background: linear-gradient(160deg, #cdb8ff, #6b45c9); clip-path: polygon(50% 0, 100% 40%, 60% 100%, 0 55%); animation: lab-tumble 9s ease-in-out infinite; opacity: .7; }
@keyframes lab-tumble { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(10px, 16px) rotate(160deg); } 100% { transform: translate(0, 0) rotate(360deg); } }
.lab [data-app="nyx"] .lab-aura i { width: 5px; height: 6px; border-radius: 1px; clip-path: polygon(50% 0, 100% 45%, 55% 100%, 0 50%); }

/* QuoteFlow: fluid teal light flowing around the edge, a liquid shimmer in the art */
.lab .lab-card[data-app="quoteflow"] .lab-edge { background: conic-gradient(from var(--lab-a), color-mix(in srgb, var(--ac) 10%, transparent), color-mix(in srgb, var(--ac) 70%, transparent) 12%, color-mix(in srgb, var(--ac) 12%, transparent) 30%, color-mix(in srgb, var(--ac) 55%, transparent) 46%, color-mix(in srgb, var(--ac) 10%, transparent) 62%, color-mix(in srgb, var(--ac) 65%, transparent) 80%, color-mix(in srgb, var(--ac) 10%, transparent)); animation: lab-spin 16s linear infinite; }
.lab [data-app="quoteflow"] .lab-fx i:nth-child(1) { inset: 40% -10% 18%; background: repeating-linear-gradient(100deg, transparent 0 40px, rgba(90, 240, 210, .12) 60px, transparent 90px); filter: blur(6px); animation: lab-flow 7s linear infinite; mix-blend-mode: screen; }
@keyframes lab-flow { from { background-position: 0 0; } to { background-position: 180px 0; } }
.lab [data-app="quoteflow"] .lab-fx i:nth-child(2), .lab [data-app="quoteflow"] .lab-fx i:nth-child(3) { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(160, 255, 235, .7); box-shadow: inset 0 0 3px rgba(160, 255, 235, .6); animation: lab-bubble 6s ease-in infinite; }
.lab [data-app="quoteflow"] .lab-fx i:nth-child(2) { left: 30%; top: 70%; }
.lab [data-app="quoteflow"] .lab-fx i:nth-child(3) { left: 68%; top: 66%; animation-delay: 2.8s; width: 5px; height: 5px; }
@keyframes lab-bubble { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(8px, -90px); opacity: 0; } }
.lab [data-app="quoteflow"] .lab-aura i { width: 5px; height: 7px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }

/* Operator Forge: copper glow with a soft irregular heat flicker, embers and a seam pulse */
.lab .lab-card[data-app="forge"] .lab-aura { animation: lab-heat 5.3s ease-in-out infinite; }
.lab .lab-card[data-app="forge"].is-active .lab-aura { animation: lab-heat-on 5.3s ease-in-out infinite; }
@keyframes lab-heat { 0%, 100% { opacity: .3; } 18% { opacity: .38; } 31% { opacity: .32; } 47% { opacity: .42; } 63% { opacity: .34; } 81% { opacity: .4; } }
@keyframes lab-heat-on { 0%, 100% { opacity: .82; } 18% { opacity: .95; } 31% { opacity: .84; } 47% { opacity: 1; } 63% { opacity: .86; } 81% { opacity: .96; } }
.lab [data-app="forge"] .lab-fx i:nth-child(1) { left: 50%; top: 56%; width: 34%; height: 18%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 150, 60, .4), transparent); mix-blend-mode: screen; animation: lab-seam 3.4s ease-in-out infinite; }
@keyframes lab-seam { 0%, 100% { opacity: .35; } 40% { opacity: .9; } 55% { opacity: .55; } 70% { opacity: .8; } }
.lab [data-app="forge"] .lab-fx i:nth-child(n+2) { width: 3px; height: 3px; border-radius: 50%; background: #ffb46a; box-shadow: 0 0 6px #ff8a35; bottom: 30%; animation: lab-ember 4.8s ease-out infinite; }
.lab [data-app="forge"] .lab-fx i:nth-child(2) { left: 46%; }
.lab [data-app="forge"] .lab-fx i:nth-child(3) { left: 55%; animation-delay: 1.6s; animation-duration: 5.6s; }
.lab [data-app="forge"] .lab-fx i:nth-child(4) { left: 61%; animation-delay: 3.1s; }
@keyframes lab-ember { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 1; } 60% { transform: translate(9px, -60px); opacity: .7; } 100% { transform: translate(-6px, -110px); opacity: 0; } }
.lab [data-app="forge"] .lab-aura i { width: 3px; height: 3px; background: #ffb46a; box-shadow: 0 0 6px #ff6a1a; }

/* DispatchMatrix: emerald edge scan and route pulses running along the perimeter */
.lab .lab-card[data-app="dispatch"] .lab-edge { background: linear-gradient(180deg, transparent 0 40%, color-mix(in srgb, var(--ac) 85%, transparent) 50%, transparent 60% 100%) 0 0 / 100% 300% no-repeat, linear-gradient(color-mix(in srgb, var(--ac) 22%, transparent), color-mix(in srgb, var(--ac) 22%, transparent)); animation: lab-scan 5.5s linear infinite; }
@keyframes lab-scan { from { background-position: 0 100%, 0 0; } to { background-position: 0 0, 0 0; } }
.lab [data-app="dispatch"] .lab-fx i:nth-child(1), .lab [data-app="dispatch"] .lab-fx i:nth-child(2) { left: 0; width: 100%; height: 0; animation: lab-route 5s cubic-bezier(.6, 0, .3, 1) infinite; }
.lab [data-app="dispatch"] .lab-fx i:nth-child(1) { top: 38%; }
.lab [data-app="dispatch"] .lab-fx i:nth-child(2) { top: 64%; animation-delay: 2.4s; animation-direction: reverse; }
.lab [data-app="dispatch"] .lab-fx i:nth-child(1)::after, .lab [data-app="dispatch"] .lab-fx i:nth-child(2)::after { content: ''; position: absolute; right: 0; top: -2px; width: 22px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, #b9ffd3); box-shadow: 0 0 8px #43de85; }
@keyframes lab-route { 0% { transform: translateX(-100%); opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(0); opacity: 0; } }
.lab [data-app="dispatch"] .lab-fx i:nth-child(3), .lab [data-app="dispatch"] .lab-fx i:nth-child(4) { width: 8px; height: 8px; border-radius: 50%; border: 1px solid #7dffb1; box-shadow: 0 0 10px #43de85; animation: lab-node 3s ease-in-out infinite; }
.lab [data-app="dispatch"] .lab-fx i:nth-child(3) { left: 22%; top: 36%; }
.lab [data-app="dispatch"] .lab-fx i:nth-child(4) { left: 78%; top: 62%; animation-delay: 1.5s; }
@keyframes lab-node { 0%, 100% { transform: scale(.7); opacity: .3; } 50% { transform: scale(1.25); opacity: 1; } }
.lab [data-app="dispatch"] .lab-aura i { width: 4px; height: 4px; border-radius: 0; }
.lab .lab-card[data-app="dispatch"] .lab-surface::after { content: ''; position: absolute; left: 14%; top: -1px; width: 26px; height: 2px; border-radius: 2px; pointer-events: none; z-index: 4; background: #b9ffd3; box-shadow: 0 0 10px #43de85; animation: lab-perim 7s linear infinite; }
@keyframes lab-perim { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateX(200px); opacity: 0; } }

/* HourForge: slow breathing gold halo, a time ring, sand drifting past the glass */
.lab .lab-card[data-app="hourforge"] .lab-aura { animation: lab-breathe 7s ease-in-out infinite; }
@keyframes lab-breathe { 0%, 100% { transform: scale(.97); } 50% { transform: scale(1.04); } }
.lab [data-app="hourforge"] .lab-fx i:nth-child(1) { left: 50%; top: 46%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 220, 150, .26), transparent 64%); mix-blend-mode: screen; animation: lab-pulse 8s ease-in-out infinite; }
.lab [data-app="hourforge"] .lab-fx i:nth-child(2) { left: 50%; top: 46%; width: 62%; aspect-ratio: 1; margin: -31% 0 0 -31%; border-radius: 50%; border: 1px solid rgba(243, 220, 160, .22); -webkit-mask: conic-gradient(#000 0 28%, transparent 28% 50%, #000 50% 64%, transparent 64%); mask: conic-gradient(#000 0 28%, transparent 28% 50%, #000 50% 64%, transparent 64%); animation: lab-rot 40s linear infinite; }
@keyframes lab-rot { to { transform: rotate(360deg); } }
.lab [data-app="hourforge"] .lab-fx i:nth-child(3), .lab [data-app="hourforge"] .lab-fx i:nth-child(4) { width: 2px; height: 2px; border-radius: 50%; background: #f3dca0; top: 18%; animation: lab-sand 5s linear infinite; }
.lab [data-app="hourforge"] .lab-fx i:nth-child(3) { left: 36%; }
.lab [data-app="hourforge"] .lab-fx i:nth-child(4) { left: 64%; animation-delay: 2.5s; }
@keyframes lab-sand { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(150px); opacity: 0; } }
.lab [data-app="hourforge"] .lab-aura i { width: 2.5px; height: 2.5px; }

/* Sakura: soft rose bloom that drifts, and a petal passing now and then */
.lab .lab-card[data-app="sakura"] .lab-aura { background: radial-gradient(52% 48% at var(--bx, 46%) 38%, color-mix(in srgb, var(--ac) 30%, transparent), transparent 72%); animation: lab-bloom 14s ease-in-out infinite; }
@property --bx { syntax: '<percentage>'; inherits: false; initial-value: 46%; }
@keyframes lab-bloom { 0%, 100% { --bx: 40%; } 50% { --bx: 60%; } }
.lab [data-app="sakura"] .lab-fx i:nth-child(-n+3) { top: -8%; width: 10px; height: 8px; border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #ffd3e4, #ed86b1); opacity: 0; animation: lab-petal 11s linear infinite; }
.lab [data-app="sakura"] .lab-fx i:nth-child(1) { left: 20%; }
.lab [data-app="sakura"] .lab-fx i:nth-child(2) { left: 58%; animation-delay: 4s; animation-duration: 13s; width: 8px; height: 6px; }
.lab [data-app="sakura"] .lab-fx i:nth-child(3) { left: 80%; animation-delay: 8s; }
@keyframes lab-petal { 0% { transform: translate(0, 0) rotate(0deg) scaleY(1); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(34px, 110px) rotate(160deg) scaleY(.4); } 90% { opacity: .8; } 100% { transform: translate(10px, 240px) rotate(320deg) scaleY(1); opacity: 0; } }
.lab [data-app="sakura"] .lab-aura i { width: 7px; height: 5px; border-radius: 80% 0 80% 0; background: #f7b6d0; box-shadow: none; }

/* Local Book Reader: warm reading-lamp halo with a faint emerald audio wave */
.lab .lab-card[data-app="reader"] .lab-aura { background: radial-gradient(56% 50% at 50% 36%, rgba(234, 220, 193, .22), transparent 70%), radial-gradient(40% 30% at 50% 70%, color-mix(in srgb, var(--ac2) 20%, transparent), transparent 70%); }
.lab .lab-card[data-app="reader"] .lab-edge { background: linear-gradient(180deg, rgba(234, 220, 193, .55), rgba(234, 220, 193, .08) 55%, color-mix(in srgb, var(--ac2) 60%, transparent)); }
.lab .lab-card[data-app="reader"] .lab-status b { background: var(--ac2); box-shadow: 0 0 8px var(--ac2); }
.lab [data-app="reader"] .lab-fx i:nth-child(1) { left: 55%; top: 50%; width: 52%; height: 40%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 228, 170, .28), transparent); mix-blend-mode: screen; animation: lab-pulse2 6s ease-in-out infinite; }
@keyframes lab-pulse2 { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }
.lab [data-app="reader"] .lab-fx i:nth-child(2), .lab [data-app="reader"] .lab-fx i:nth-child(3) { width: 5px; height: 2px; background: #f4ead5; opacity: 0; top: 24%; animation: lab-fleck 8s ease-in-out infinite; }
.lab [data-app="reader"] .lab-fx i:nth-child(2) { left: 40%; }
.lab [data-app="reader"] .lab-fx i:nth-child(3) { left: 66%; animation-delay: 4s; }
@keyframes lab-fleck { 0% { transform: translate(0, 0) rotateX(0deg); opacity: 0; } 15% { opacity: .8; } 100% { transform: translate(-14px, 90px) rotateX(540deg); opacity: 0; } }
.lab [data-app="reader"] .lab-fx i:nth-child(4) { left: 64%; top: 34%; width: 3px; height: 3px; border-radius: 50%; background: #6fd3a6; box-shadow: 0 0 6px #43876d; animation: lab-node 4s ease-in-out infinite; }
.lab .lab-wave { position: absolute; left: 18%; right: 18%; bottom: 26%; width: 64%; height: 18px; z-index: 1; overflow: visible; }
.lab .lab-wave path { fill: none; stroke: color-mix(in srgb, var(--ac2) 80%, #9fe3c2); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 26 14; opacity: .55; vector-effect: non-scaling-stroke; animation: lab-dash 3.2s linear infinite; }
@keyframes lab-dash { to { stroke-dashoffset: -80; } }
.lab [data-app="reader"] .lab-aura i { width: 5px; height: 2px; border-radius: 1px; background: #f1e6cf; box-shadow: 0 0 6px rgba(241, 230, 207, .6); }

/* Tiny image parallax on Vehicle Studio 360 is set from script through --px / --py */

/* paused off-screen and when the page is hidden */
.lab.is-paused *, .lab.is-paused *::before, .lab.is-paused *::after { animation-play-state: paused !important; }

/* touch devices: a stable state, explicit play control always shown in full */
@media (hover: none) {
  .lab .lab-play { gap: 8px; }
  .lab .lab-play span { max-width: 90px; opacity: 1; }
}

/* reduced motion: still artwork, static auras, explicit play only */
@media (prefers-reduced-motion: reduce) {
  .lab *, .lab *::before, .lab *::after { animation: none !important; transition-duration: .01ms !important; }
  .lab .lab-fx i, .lab .lab-aura i { display: none !important; }
  .lab .lab-card.is-active { --lift: 0px; }
  .lab .lab-art { transform: none; }
  .lab .lab-wave path { stroke-dasharray: none; }
}

@media (max-width: 639px) {
  .lab .lab-body { padding: 20px 18px 18px; }
  .lab .lab-sign { gap: 14px; letter-spacing: .3em; }
}

/* film modal (used when the page has no film modal of its own) */
.lab-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); background: rgba(5, 4, 6, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.lab-modal[hidden] { display: none; }
.lab-modal .lab-box { width: min(1100px, 100%); display: grid; gap: 14px; }
.lab-modal .lab-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.lab-modal h4 { margin: 0; font: 700 clamp(17px, 2vw, 20px)/1.2 var(--f-display, 'Syne', 'Segoe UI', sans-serif); color: #F1E9D3; }
.lab-modal video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; border: 1px solid rgba(216, 183, 107, .24); display: block; }
.lab-modal .lab-x { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid rgba(216, 183, 107, .3); background: #17171a; color: #F1E9D3; font-size: 20px; line-height: 1; cursor: pointer; }
.lab-modal .lab-x:focus-visible, .lab-modal video:focus-visible { outline: 2px solid #F3DCA0; outline-offset: 3px; }
