/* guide.html / node_guide.html 共用外壳 */

header {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 10px;
  margin: 4px 4px 0;
  display: flex;
  align-items: center;
  background: #52525b;
  color: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.content {
  padding-top: 0 !important;
  gap: 0;
}
header .back {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
header .titles .main {
  color: #ffffff;
  font-weight: 600;
}
header .titles .sub {
  display: none !important;
}
header .lock-btn {
  background: #71717a;
  color: #ffffff;
}

/* 分类 / 场景标签栏：上下等距、左起排列、行内上下居中 */
.tab-row {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 5px 4px 5px 2px;
  margin: 0;
  min-height: 32px;
  justify-content: flex-start;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-row::-webkit-scrollbar {
  display: none;
}
.cat-tab-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  height: 26px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.cat-tab-btn.active {
  background: #ffffff;
  border-color: #d61c1c;
  color: #e11b1b;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(214, 28, 28, 0.12);
}
.cat-tab-btn.locked {
  opacity: 0.4;
}

/* 播放栏：通栏 + 顶角小圆角 */
.audio-bar {
  left: 0 !important;
  right: 0 !important;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  border-radius: 6px 6px 0 0 !important;
  border: none !important;
  border-top: 1px solid #e5e7eb !important;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06) !important;
}
body.guide-fullscreen .audio-bar {
  left: 0 !important;
  right: 0 !important;
  bottom: env(safe-area-inset-bottom, 0px) !important;
  border-radius: 6px 6px 0 0 !important;
}

/* 播放栏圆形按钮：高级灰底 + 白 icon */
.audio-bar .audio-btn {
  background: #52525b !important;
  color: #ffffff !important;
  border: 2px solid transparent !important;
  box-sizing: border-box;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.audio-bar .audio-btn svg {
  display: block;
  color: inherit;
  transition: color 0.12s;
}
.audio-bar .audio-btn-skip {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px;
  min-height: 30px;
  padding: 0 !important;
}
.audio-bar .audio-btn-skip svg {
  width: 22px;
  height: 22px;
}
.audio-bar .audio-btn-skip svg text {
  fill: currentColor;
  transition: fill 0.12s;
}
.audio-bar .audio-btn:active:not(:disabled):not(.locked) {
  border-color: #d32f2f !important;
  color: #d32f2f !important;
  background: #fff !important;
}
.audio-bar .audio-btn:active:not(:disabled):not(.locked) svg {
  fill: #d32f2f;
}
.audio-bar .audio-btn-skip:active:not(:disabled):not(.locked) svg text {
  fill: #d32f2f;
}
.audio-bar .audio-btn-skip:active:not(:disabled):not(.locked) svg path {
  stroke: #d32f2f;
}
.audio-bar .speed-btn {
  box-sizing: border-box;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.audio-bar .speed-btn:active:not(:disabled):not(.locked) {
  border-color: #d32f2f !important;
  color: #d32f2f !important;
  background: #fff !important;
}
.audio-bar .progress {
  cursor: pointer;
  touch-action: none;
}
.audio-bar .progress-inner {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: #c42020;
  border-radius: 3px;
  pointer-events: none;
}
.audio-bar.no-audio .progress {
  pointer-events: none !important;
}

/* node_guide：无图时正文区 */
.scene-image-wrapper.is-hidden {
  display: none;
}
.scene-caption {
  display: none;
}
.scene-caption.show {
  display: block;
  flex: 1 1 auto;
  margin-top: 3px;
  padding: 8px 6px;
  font-size: 11px;
  color: #6b7280;
  text-align: left;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 48px;
  overflow-y: auto;
}
.scene-caption-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}
.scene-caption-empty {
  color: #9ca3af;
  font-style: italic;
}

/* 无音频：禁用播放器，不显示假时间 */
.audio-bar.no-audio .time-label {
  display: none;
}
.audio-bar.no-audio .audio-btn,
.audio-bar.no-audio .progress,
.audio-bar.no-audio .speed-btn {
  opacity: 0.35;
  pointer-events: none;
}

#sceneVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
