/* 共享导览层样式：自适应各展项深浅主题，不干扰实验画布与核心布局 */
.lab-nav.lab-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.lab-nav.lab-nav > .back {
  justify-self: start;
  min-width: 0;
}

.lab-nav.lab-nav > button {
  margin-left: 0 !important;
  white-space: nowrap;
}

.lab-loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font: 600 11.5px/1.2 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: inherit;
  opacity: 0.78;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.lab-select {
  min-height: 40px;
  padding: 0 11px !important;
  background: transparent;
  border: 1px solid currentColor !important;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 12px/1.2 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: inherit;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.15s, transform 0.15s;
}

.lab-select > span:first-child {
  font-size: 16px;
}

.lab-select:hover {
  opacity: 1;
  background: rgba(128, 128, 128, 0.14);
}

.lab-narrow {
  display: none;
}

/* 页内「上手第一步」智能引导条（自适应深色与浅色背景） */
.lab-first-step {
  margin: 10px 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid currentColor;
  background: rgba(128, 128, 128, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: inherit;
  transition: opacity 0.25s ease;
}

.lab-first-step.acted {
  opacity: 0.75;
}

.lab-step-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.lab-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(200, 90, 40, 0.2);
  border: 1px solid currentColor;
  white-space: nowrap;
}

.lab-step-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.lab-step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lab-step-next-link {
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: inherit;
  opacity: 0.85;
  white-space: nowrap;
}

.lab-step-next-link:hover {
  opacity: 1;
}

/* 页底「展厅漫游导览卡」（上一项 / 随机 / 下一项） */
.lab-trail-dock {
  margin: 22px 0 14px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: rgba(128, 128, 128, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lab-trail-reveal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px dashed currentColor;
  font-size: 12.5px;
  line-height: 1.55;
}

.lab-trail-reveal strong {
  font-weight: 700;
}

.lab-trail-meta {
  font-size: 11px;
  opacity: 0.75;
  white-space: nowrap;
}

.lab-trail-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.lab-trail-left, .lab-trail-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lab-trail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 7px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.88;
  transition: opacity 0.15s, background 0.15s;
}

.lab-trail-btn:hover {
  opacity: 1;
  background: rgba(128, 128, 128, 0.15);
}

.lab-trail-btn.primary-next {
  opacity: 1;
  font-weight: 700;
  background: rgba(128, 128, 128, 0.16);
}

/* 展项切换弹窗 Dialog */
.lab-picker {
  color-scheme: light !important;
  background: #f6f4ed !important;
  color: #182b23 !important;
  border: 1px solid #c4cec1 !important;
  border-radius: 14px !important;
  padding: 22px 24px !important;
  width: min(860px, calc(100vw - 24px)) !important;
  max-height: 88vh !important;
  box-shadow: 0 24px 80px rgba(10, 24, 18, 0.38) !important;
}

.lab-picker::backdrop {
  background: rgba(10, 22, 26, 0.68);
  backdrop-filter: blur(4px);
}

.lab-picker * {
  box-sizing: border-box;
}

.lab-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.lab-picker-head > div > span {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #c85a28 !important;
  letter-spacing: 0.6px;
}

.lab-picker-head h2 {
  font: 700 24px/1.3 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  color: #162a22 !important;
  margin: 4px 0 12px !important;
}

.lab-picker button {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: inherit;
  cursor: pointer;
}

.lab-picker-close {
  width: 40px;
  height: 40px;
  border: 1px solid #cfd7cc !important;
  border-radius: 8px !important;
  background: #fffdf8 !important;
  font-size: 24px !important;
  line-height: 1 !important;
  align-self: flex-start;
  padding: 0 !important;
  color: #3b4d43 !important;
}

.lab-picker-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.lab-picker-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #c1ccc0;
  background: #ffffff;
  padding: 0 12px;
  border-radius: 8px;
  height: 44px;
}

.lab-picker-search > span {
  font-size: 22px;
  color: #1c4b3c;
}

.lab-picker-search input {
  color: #182b23 !important;
  color-scheme: light;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  font: 13px -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  width: 100%;
  min-width: 0;
  height: 40px;
  margin: 0 !important;
}

.lab-picker-floors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lab-picker-floor-btn {
  padding: 5px 11px !important;
  border-radius: 999px !important;
  border: 1px solid #cbd4c7 !important;
  background: #fffdf8 !important;
  color: #46594e !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

.lab-picker-floor-btn.active {
  background: #1c4b3c !important;
  border-color: #1c4b3c !important;
  color: #ffffff !important;
}

.lab-picker-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 4px;
}

.lab-picker .lab-picker-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 76px;
  width: 100%;
  margin: 0 !important;
  padding: 11px 13px !important;
  border: 1px solid #d5dcd0 !important;
  border-radius: 8px;
  background: #fffdf8;
  text-align: left;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #182b23 !important;
  line-height: 1.45;
  transition: border-color 0.15s, background 0.15s;
}

.lab-picker-item.current {
  background: #e5efe8;
  border-color: #2f6b55 !important;
}

.lab-picker-item:hover {
  border-color: #6b8a78 !important;
  background: #f1f6f2;
}

.lab-picker-item strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #162a22;
}

.lab-picker-item strong em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #edf1ea;
  color: #495d51;
}

.lab-picker-item small {
  display: block;
  font-size: 11px;
  line-height: 1.55;
  color: #637368;
  margin-top: 4px;
}

.lab-picker-item > span:last-child {
  font-size: 11px;
  font-weight: 700;
  color: #1c4b3c;
  white-space: nowrap;
}

.lab-picker-empty {
  padding: 26px 0 !important;
  font-size: 13px !important;
  text-align: center;
  color: #637368 !important;
}

.lab-picker-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px solid #dce2d8;
}

.lab-picker .lab-picker-home {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #1c4b3c !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: none;
}

.lab-picker-progress {
  font-size: 11.5px;
  color: #637368;
}

.lab-picker [hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .lab-nav.lab-nav {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px;
  }
  .lab-loc-badge {
    display: none;
  }
  .lab-select {
    padding: 0 7px !important;
    gap: 4px !important;
    font-size: 11px !important;
    min-height: 36px;
  }
  .lab-wide {
    display: none;
  }
  .lab-narrow {
    display: inline;
  }
  .lab-first-step {
    padding: 9px 11px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .lab-step-text {
    font-size: 12px;
  }
  .lab-trail-dock {
    padding: 13px 12px;
  }
  .lab-trail-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .lab-trail-left, .lab-trail-right {
    width: 100%;
    justify-content: space-between;
  }
  .lab-trail-btn.primary-next {
    width: 100%;
    justify-content: center;
  }
  .lab-picker {
    padding: 16px !important;
  }
  .lab-picker-list {
    grid-template-columns: 1fr;
  }
  .lab-picker-head h2 {
    font-size: 20px !important;
  }
}
