/* ============ 提词舞台(监看台与输出屏共用,双窗等比渲染) ============ */
/* 边界纪律:道具感只属于"棚",不属于"镜头"——此处零装饰。 */

.stage {
  position: relative;
  overflow: hidden;
  container-type: size;
  /* 排版不变量护栏(0717 #6):禁止客户端放大舞台文字(飞书/微信内嵌浏览器的字体缩放)——
     cqw 字号 + cqw 边距 + 同字体 = 每行字数与主持人屏逐字一致,这条不变量不容第三方注水 */
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  background: var(--stage-bg);
  --stage-bg: #000000;
  --fs: 5.4;
  --lh: 1.85;
  --margin: 9cqw;
  --focus: 38%;
  --ink: #f2f0ea;
  --ink-dim: #6d6a62;
}

.stage.light {
  --stage-bg: #f7f5ef;
  --ink: #17150f;
  --ink-dim: #b5b0a4;
}
/* 文稿阅读区纸色随 app 主题(摄影棚暖纸 / 飞书白),不用固定暖纸 */
.stage.reading {
  background: var(--panel);
  /* 舞台局部 --ink 会遮蔽 app 墨色令牌;阅读态显式继承 body 上的主题墨色 */
  --ink: inherit;
}

.prompt-content {
  position: relative;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.prompt-content p {
  margin: 0;
  padding: 0.12em var(--margin);
  font-family:
    'PingFang SC',
    'Hiragino Sans GB',
    'Microsoft YaHei',
    sans-serif;
  font-size: calc(var(--fs) * 1cqw);
  line-height: var(--lh);
  font-weight: var(--w-medium);
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== 文稿阅读态(#3):飞书式舒适阅读排版,固定字号,与 cqw 提词镜像解耦 =====
   文稿区不再是上镜的 1:1 镜子;它的职责是「舒服地读 + 定位」。换行与上镜不同没关系——
   位置交接走 readingLocus(段落 + 段内比例),不依赖逐字一致的换行。 */
.stage.reading .prompt-content p {
  font-size: var(--t-title-s);
  line-height: 1.9;
  padding: 0.3em var(--sp-9);
  font-weight: var(--w-normal);
  max-width: none;
}
/* 章节标记(#3):安静的导航标签,明显低于正文墨色 + 珊瑚小点 → 一眼是「章节分隔」,
   不是正文标题、更不像「小标题没删干净」。正文才是主角。 */
.stage.reading .prompt-content .prompt-heading {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--t-caption);
  font-weight: var(--w-semibold);
  color: var(--ink-3);
  line-height: 1.4;
  padding: 1.15em var(--sp-9) 0.3em;
  letter-spacing: 0.06em;
}
.stage.reading .prompt-content .prompt-heading::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.stage.reading .prompt-content .prompt-heading:first-child {
  padding-top: 0.2em;
}
.stage.reading .prompt-content p:first-child,
.stage.reading .prompt-content .prompt-heading:first-child {
  padding-top: 0.1em;
}

/* 焦点线指示:两缘小三角(镜像后依然对称) */
.stage::before,
.stage::after {
  content: '';
  position: absolute;
  top: var(--focus);
  width: 0;
  height: 0;
  border-top: 0.9cqw solid transparent;
  border-bottom: 0.9cqw solid transparent;
  z-index: 3;
  transform: translateY(-50%);
}
.stage::before {
  left: 0;
  border-left: 1.2cqw solid var(--tp-accent);
}
.stage::after {
  right: 0;
  border-right: 1.2cqw solid var(--tp-accent);
}

/* 章节交界图形提示(#5):滚过一个珊瑚菱形+两侧渐隐线,非文字,提醒主持人新段落开始 */
.prompt-content .prompt-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4cqw;
  /* em 必须与正文同源(0717 #2 取证):不设 font-size 时 em=页面默认字号(固定 px),
     手机小屏与主持人大屏的分隔符高度就不成比例 → 全文总高差 ≈ 每个分隔符一行,
     视口/焦点在章节后逐渐错开。舞台内一切竖向尺寸只准来自 cqw 或正文 em。 */
  font-size: calc(var(--fs) * 1cqw);
  padding: 0.55em var(--margin);
}
.prompt-content .prompt-divider::before,
.prompt-content .prompt-divider::after {
  content: '';
  flex: 0 0 9cqw;
  height: 0.16cqw;
  background: linear-gradient(90deg, transparent, var(--tp-accent-line));
}
.prompt-content .prompt-divider::after {
  background: linear-gradient(90deg, var(--tp-accent-line), transparent);
}
.prompt-content .prompt-divider .pd-dot {
  width: 0.9cqw;
  height: 0.9cqw;
  background: var(--tp-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* 结束标记:与正文同管线滚动,滚到底进入焦点线 → 主持人明确知道「念完了」 */
.prompt-content .prompt-end {
  text-align: center;
  font-family:
    'PingFang SC',
    'Hiragino Sans GB',
    'Microsoft YaHei',
    sans-serif;
  font-size: calc(var(--fs) * 0.62 * 1cqw);
  line-height: var(--lh);
  letter-spacing: 0.6em;
  padding: 0.5em var(--margin) 0;
  color: var(--ink-dim);
}

/* 镜像 / 倒置:分光镜的两根轴,可叠加。
   预览(监看台)与输出屏应用同一变换 → 编导所见严格等于主持人所见。 */
.stage.mirrored {
  transform: scaleX(-1);
}
.stage.flipped {
  transform: scaleY(-1);
}
.stage.mirrored.flipped {
  transform: scale(-1, -1);
}
