#ai-lab {
  --lab-paper: #f4ede2;
  --lab-muted: #c5c8ce;
  --lab-gold: #e0c397;
  --lab-cyan: #8cd5df;
  padding-block: clamp(64px, 7.6vw, 112px);
  color: var(--lab-paper);
  background: radial-gradient(ellipse at 74% 28%, #142439, #0a1422 55%, #080f1a 100%);
}

#ai-lab .lab-grid {
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  gap: clamp(24px, 4vw, 66px);
  align-items: center;
}

#ai-lab .section-head { margin: 0; }
#ai-lab #lab-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.62rem);
  font-weight: 500;
  letter-spacing: -.038em;
  line-height: 1.01;
  color: var(--lab-paper);
}
#lab-title span { display: block; }
.lab-tagline {
  margin: 17px 0 25px;
  font: italic 400 clamp(1.03rem, 1.88vw, 1.62rem)/1.25 Georgia, "Times New Roman", serif;
  color: var(--lab-gold);
}
.lab-tagline::after {
  display: block;
  width: 47px;
  height: 2px;
  margin-top: 23px;
  background: var(--lab-gold);
  content: "";
}
#ai-lab .lab-title-zh {
  margin-bottom: 11px;
  color: var(--lab-paper);
  font-size: clamp(1.34rem, 2.07vw, 1.84rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .025em;
}
.lab-intro {
  max-width: 29em;
  margin: 0;
  color: var(--lab-muted);
  font-size: clamp(.93rem, 1.16vw, 1.07rem);
  line-height: 1.8;
}
.lab-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: clamp(22px, 3vw, 36px) 0 0;
  list-style: none;
}
.lab-values li {
  padding: 7px clamp(7px, 1vw, 13px);
  border: 1px solid #b99c70a6;
  border-radius: 4px;
  color: var(--lab-gold);
  font-size: clamp(.71rem, 1.03vw, .83rem);
  font-weight: 600;
  white-space: nowrap;
}

.lab-carousel { min-width: 0; }
.lab-viewport {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid #e0c39748;
  border-radius: 8px;
  background: #0a1523;
  touch-action: pan-y;
}
.lab-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}
.lab-slide.is-current { z-index: 1; opacity: 1; }
.lab-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-photo:not([src]) { display: none; }
.lab-thumb img:not([src]) { visibility: hidden; }
.lab-demodata {
  position: absolute;
  inset-block-start: 5%;
  inset-inline-end: 4%;
  padding: 4px 9px;
  border: 1px solid #e0c39765;
  border-radius: 4px;
  background: #0a1321ee;
  color: #f4e5ca;
  font-size: clamp(.63rem, 1vw, .78rem);
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}

.lab-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 15px 0 12px;
}
.lab-caption h3 {
  margin: 0 0 4px;
  color: var(--lab-paper);
  font-size: clamp(1.13rem, 2.04vw, 1.56rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: .025em;
}
.lab-caption [data-lab-number] {
  margin-inline-end: 7px;
  color: var(--lab-gold);
  font: 600 .73em/1 Georgia, "Times New Roman", serif;
  letter-spacing: .12em;
  white-space: nowrap;
}
.lab-caption p { margin: 0; color: var(--lab-muted); font-size: clamp(.85rem, 1.18vw, 1rem); line-height: 1.55; }
.lab-playback {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e0c397ad;
  border-radius: 50%;
  background: #0b162500;
  color: var(--lab-gold);
  cursor: pointer;
}
.lab-playback:hover { background: #e0c39719; }
.lab-playback:disabled { opacity: .46; cursor: default; }
.lab-playback .lab-play-icon { display: none; }
.lab-playback[data-paused] .lab-play-icon { display: block; }
.lab-playback[data-paused] .lab-pause-icon { display: none; }
.lab-playback[hidden], .lab-progress[hidden], .lab-thumbnails[hidden] { display: none; }

.lab-progress { height: 2px; overflow: hidden; border-radius: 2px; background: #e0c39734; }
.lab-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--lab-gold);
}
.lab-thumbnails {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(5px, .8vw, 11px);
  margin-top: 14px;
}
.lab-thumb {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lab-muted);
  text-align: center;
  cursor: pointer;
}
.lab-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid #bfc3c936;
  border-radius: 5px;
  filter: saturate(.74) brightness(.83);
}
.lab-thumb span { display: block; margin-top: 5px; font-size: clamp(.63rem, .93vw, .76rem); letter-spacing: .02em; }
.lab-thumb[aria-selected="true"] { color: var(--lab-gold); }
.lab-thumb[aria-selected="true"] img { border-color: var(--lab-gold); filter: none; }
.lab-thumb:hover img { filter: none; }
.lab-thumb:focus-visible, .lab-playback:focus-visible { outline: 2px solid #fff1d8; outline-offset: 3px; }

.lab-fx {
  position: absolute;
  inset-block-end: 6%;
  inset-inline-end: 4%;
  width: min(42%, 206px);
  padding: clamp(7px, 1.1vw, 12px);
  border: 1px solid #d8c3a25c;
  border-radius: 7px;
  background: #091421ee;
  box-shadow: 0 5px 22px #03091051;
  color: #f3e9dc;
  font-size: clamp(.58rem, 1vw, .75rem);
  line-height: 1.35;
}
.lab-fx-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-weight: 650; }
.lab-fx-heading > span + span { color: var(--lab-gold); font-size: .86em; }
.lab-status-dot, .lab-decision-update { width: 6px; height: 6px; border-radius: 50%; background: var(--lab-cyan); }
.lab-inspection, .lab-work-order, .lab-mini-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--lab-muted);
  font-size: .9em;
  white-space: nowrap;
}
.lab-inspection > i, .lab-work-order > i, .lab-preview-track, .lab-task-track {
  position: relative;
  flex: 1;
  height: 3px;
  background: #bfceea34;
  border-radius: 8px;
}
.lab-inspection b, .lab-preview-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform-origin: left;
  transform: scaleX(.67);
  background: var(--lab-cyan);
}
.lab-work-order b, .lab-task-track i {
  position: absolute;
  inset: -2px 0 auto;
  width: 100%;
  height: 7px;
}
.lab-work-order b::after, .lab-task-track i::after {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lab-gold);
  content: "";
}

.lab-fx-mall, .lab-fx-employee, .lab-fx-creative, .lab-fx-decision { inset-inline: 4% auto; }
.lab-floor-map, .lab-knowledge-map, .lab-decision-chart { display: block; width: 100%; margin-top: 4px; }
.lab-floor-map path { stroke: #8fa6bd; stroke-width: 1; }
.lab-floor-map .lab-floor-walk { stroke: var(--lab-gold); }
.lab-floor-map circle { fill: #edac71; opacity: .62; }
.lab-floor-map .lab-heat-b { fill: #8cd5df; }
.lab-mini-trend { margin-top: 4px; justify-content: space-between; }
.lab-mini-trend svg { width: 47%; height: auto; }
.lab-mini-trend path, .lab-chart-trace {
  stroke: var(--lab-cyan);
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lab-knowledge-map { margin-block: 6px; }
.lab-knowledge-map path { stroke: var(--lab-gold); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.lab-knowledge-map circle { fill: #1b3242; stroke: var(--lab-cyan); }
.lab-knowledge-answer { color: var(--lab-muted); font-size: .89em; }

.lab-task-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 0;
  margin: 9px 0 7px;
  list-style: none;
}
.lab-task-flow li {
  padding: 3px 0;
  border: 1px solid #93c6dc59;
  border-radius: 3px;
  background: #15263a;
  text-align: center;
}
.lab-task-track { margin: 0 4px 4px; }
.lab-task-track i::after { background: var(--lab-cyan); }
.lab-fx-creative { width: min(46%, 226px); }
.lab-artwork-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 6px 0 8px; }
.lab-artwork-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  object-position: center 32%;
  border: 1px solid #f4e5ca5c;
  border-radius: 3px;
}
.lab-preview-track i { background: var(--lab-gold); }
.lab-decision-chart .lab-chart-grid { stroke: #8fa6bd58; stroke-width: .8; }
.lab-decision-chart .lab-chart-guide { stroke: #8cd5df4b; stroke-width: 1.5; }
.lab-decision-chart circle { fill: var(--lab-cyan); }
.lab-decision-alert { color: #e6ba93; font-size: .92em; }
.lab-decision-alert i { display: inline-block; width: 5px; height: 5px; margin-inline-end: 4px; border-radius: 50%; background: currentColor; vertical-align: .15em; }

@media (prefers-reduced-motion: no-preference) {
  .lab-carousel[data-motion-live] .lab-slide { transition: opacity 620ms ease; }
  .lab-carousel[data-motion-live] .is-current .lab-status-dot { animation: lab-status 4.8s ease-in-out infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-inspection b { animation: lab-inspect 4.8s ease-in-out infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-work-order b { animation: lab-dispatch 4.8s ease-in-out infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-heat-a { animation: lab-heat-a 4.65s ease-in-out infinite alternate; }
  .lab-carousel[data-motion-live] .is-current .lab-heat-b { animation: lab-heat-b 4.65s ease-in-out infinite alternate; }
  .lab-carousel[data-motion-live] .is-current .lab-heat-c { animation: lab-heat-a 4.65s ease-in-out infinite alternate-reverse; }
  .lab-carousel[data-motion-live] .is-current .lab-mini-trend path { animation: lab-trace 4.65s ease infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-document { animation: lab-ingest 4.8s ease-in-out infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-knowledge-link { animation: lab-trace 4.8s ease infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-knowledge-answer { animation: lab-answer 4.8s ease infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-task-track i { animation: lab-dispatch 4.8s linear infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-task-flow li { animation: lab-task 4.8s ease-in-out infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-task-flow li:nth-child(2) { animation-delay: .85s; }
  .lab-carousel[data-motion-live] .is-current .lab-task-flow li:nth-child(3) { animation-delay: 1.7s; }
  .lab-carousel[data-motion-live] .is-current .lab-completed { animation: lab-answer 4.8s ease infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-artwork-strip img:first-child { animation: lab-artwork-first 4.8s ease-in-out infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-artwork-strip img:last-child { animation: lab-artwork-second 4.8s ease-in-out infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-preview-track i { animation: lab-preview 4.8s linear infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-chart-trace { animation: lab-trace 4.8s ease infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-decision-update { animation: lab-status 4.8s ease infinite; }
  .lab-carousel[data-motion-live] .is-current .lab-decision-alert { animation: lab-alert 4.8s ease infinite; }
}

@keyframes lab-status { 0%, 100% { opacity: .65; } 28%, 58% { opacity: 1; } 40% { opacity: .32; } }
@keyframes lab-inspect { 0% { transform: scaleX(.18); } 67%, 100% { transform: scaleX(.94); } }
@keyframes lab-dispatch { 0%, 12% { transform: translateX(0); } 72%, 100% { transform: translateX(calc(100% - 7px)); } }
@keyframes lab-heat-a { from { transform: translateX(0); opacity: .38; } to { transform: translateX(22px); opacity: .84; } }
@keyframes lab-heat-b { from { transform: translateX(-10px); opacity: .86; } to { transform: translateX(22px); opacity: .42; } }
@keyframes lab-trace { 0%, 10% { stroke-dasharray: 1; stroke-dashoffset: 1; } 68%, 100% { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes lab-ingest { 0%, 82%, 100% { transform: translateY(0); opacity: 1; } 38% { transform: translateY(-4px); opacity: .55; } }
@keyframes lab-answer { 0%, 45% { opacity: .44; } 67%, 94% { opacity: 1; } 100% { opacity: .68; } }
@keyframes lab-task { 0%, 61%, 100% { background: #15263a; color: #f3e9dc; } 25%, 48% { background: #8cd5df; color: #0a1623; } }
@keyframes lab-artwork-first { 0%, 34%, 100% { transform: scale(1.03); opacity: 1; } 52%, 78% { transform: scale(.95); opacity: .56; } }
@keyframes lab-artwork-second { 0%, 34%, 100% { transform: scale(.95); opacity: .56; } 52%, 78% { transform: scale(1.03); opacity: 1; } }
@keyframes lab-preview { 0% { transform: scaleX(.04); } 100% { transform: scaleX(.99); } }
@keyframes lab-alert { 0%, 29%, 100% { opacity: .6; } 50%, 78% { opacity: 1; } 60% { opacity: .65; } }

@media (max-width: 820px) {
  #ai-lab { padding-block: clamp(47px, 8.3vw, 66px); }
  #ai-lab .lab-grid { grid-template-columns: minmax(0, 1fr); gap: 29px; }
  #ai-lab #lab-title span { display: inline; }
  .lab-tagline { margin-block: 10px 18px; }
  .lab-tagline::after { width: 36px; margin-top: 15px; }
  .lab-values { margin-top: 18px; }
}
@media (max-width: 530px) {
  .lab-thumb img { border-width: 1px; }
  .lab-thumb { min-height: 38px; }
  .lab-thumb span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lab-thumbnails { margin-top: 8px; }
  .lab-toolbar { margin: 11px 0 10px; }
  .lab-fx { font-size: .62rem; }
  .lab-fx-creative { width: 39%; }
  .lab-artwork-strip { margin-block: 4px 5px; }
}
