/* Lab Player：教室投影课件气质，不要游戏 HUD */
body.lab {
  background: #f8f7fc;
  min-height: 100vh;
}

.lab-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8f7fc;
}

.lab-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--ktb-line);
}

.lab-top-lead,
.lab-top-acts {
  display: contents;
}

.lab-back,
.lab-layout-link {
  color: var(--ktb-body);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.lab-back:hover,
.lab-layout-link:hover {
  color: var(--ktb-primary);
}

.lab-top h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ktb-ink);
  flex: 1;
  min-width: 160px;
  line-height: 1.35;
}

.lab-top .meta { white-space: nowrap; }

.lab-top-status { gap: 8px; }

.lab-ai {
  margin: 0 16px;
  margin-top: 10px;
}

.lab-stage {
  flex: 1;
  position: relative;
  margin: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--ktb-line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lab-pack {
  flex: 1;
  padding: 20px 24px 16px;
  position: relative;
  z-index: 1;
}

.lab-foot {
  padding: 10px 20px 16px;
  font-size: 13px;
  color: var(--ktb-muted);
  background: #fff;
  border-top: 1px solid var(--ktb-line);
}

.lab-expire {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #0a0a12;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.lab-expire.is-on { display: flex; }

.lab-expire h1 { font-size: 28px; margin-bottom: 12px; color: #fff; }

.beaker-row {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 280px;
}

.beaker {
  width: 120px;
  height: 160px;
  border: 3px solid #8a9aa8;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  position: relative;
  background: linear-gradient(#f4f6f8, #e8eef2);
  overflow: hidden;
}

.beaker .liq {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70%;
  background: #cfe4f5;
  transition: background 200ms var(--ktb-ease), height 200ms var(--ktb-ease);
}

.beaker .ppt {
  position: absolute;
  left: 10%; right: 10%; bottom: 0;
  height: 0;
  background: #9bb8d4;
  border-radius: 0 0 10px 10px;
  transition: height 200ms;
}

.beaker .bubbles::before,
.beaker .bubbles::after {
  content: "";
  position: absolute;
  bottom: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
  opacity: 0;
}

.beaker.is-gas .bubbles::before,
.beaker.is-gas .bubbles::after {
  opacity: 1;
  animation: up 1.2s ease-out infinite;
}

.beaker.is-gas .bubbles::after { left: 60%; animation-delay: .3s; }
.beaker.is-gas .bubbles::before { left: 30%; }

@keyframes up {
  from { transform: translateY(0); opacity: .8; }
  to { transform: translateY(-70px); opacity: 0; }
}

.reag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

.reag-grid button {
  min-width: 96px;
}

.reag-grid button.is-on {
  outline: 2px solid var(--ktb-primary);
}

.phenom {
  max-width: 640px;
  margin: 12px auto 0;
  padding: 16px;
  background: var(--ktb-paper);
  border-radius: 8px;
  min-height: 88px;
}

.phenom strong { color: var(--ktb-ink); }

.circuit {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
}

.circuit-svg {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.meter {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.meter b {
  display: block;
  font-size: 28px;
  color: var(--ktb-ink);
  font-variant-numeric: tabular-nums;
}

.scene-list button {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
}

.scene-list button.is-on {
  border-color: var(--ktb-primary);
  background: var(--ktb-primary-soft);
  color: var(--ktb-primary);
}

.lab-map {
  width: min(960px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.lab-map .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

body.lab-phone .lab-shell {
  max-width: 375px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: var(--ktb-shadow-md);
}

body.lab-embed .lab-shell {
  max-width: none;
  box-shadow: none;
}

body.lab-phone .lab-top {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 12px 14px 14px;
}

body.lab-phone .lab-top-lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.lab-phone .lab-top h1 {
  font-size: 17px;
  flex: none;
  min-width: 0;
}

body.lab-phone .lab-top .meta {
  font-size: 12px;
  color: var(--ktb-muted);
}

body.lab-phone .lab-top-status {
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  justify-content: space-between;
}

body.lab-phone .lab-top-acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

body.lab-phone .lab-top-acts .ktb-btn {
  width: 100%;
  justify-content: center;
}

body.lab-phone .lab-layout-link {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4px 0 0;
}
body.lab-phone .circuit { grid-template-columns: 1fr; }
body.lab-phone .beaker { width: 88px; height: 120px; }
body.lab-phone .meter b { font-size: 22px; }

@media (max-width: 800px) {
  .circuit, .lab-map .grid { grid-template-columns: 1fr; }
}
