/* ============================================================
   祖师会诊堂 —— 圆桌研讨场景化舞台（rt-stage.js 配套样式）
   ============================================================ */

/* ---------- 全屏剧场 ---------- */
.rts-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #E9E2CF;
  background-image: radial-gradient(circle at 20% 10%, #F0EAD8 0%, #E5DDC6 60%, #DDD3B8 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  color: #2E2A22;
}
.rts-wrap { max-width: 880px; margin: 0 auto; padding: 18px 12px 90px; }

/* ---------- 堂号匾额 ---------- */
.rts-banner {
  position: relative;
  background: linear-gradient(180deg, #3A3428 0%, #2E2A22 100%);
  color: #E8DCC0;
  border-radius: 14px 14px 0 0;
  padding: 14px 18px 12px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid #4A4436;
  border-bottom: 3px solid #9C7A2D;
}
.rts-banner .seal {
  width: 34px; height: 34px; flex: none;
  background: #B03A2E; color: #F6E9D8;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(246,233,216,.35);
}
.rts-banner .title { font-size: 19px; font-weight: 700; letter-spacing: 3px; }
.rts-banner .sub { font-size: 12px; color: #B7AC91; margin-top: 2px; letter-spacing: 1px;
  max-width: 460px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rts-banner .spacer { flex: 1; }
.rts-banner .close-x {
  flex: none; background: none; border: none; color: #B7AC91;
  font-size: 18px; cursor: pointer; padding: 4px 8px; line-height: 1;
}
.rts-banner .close-x:hover { color: #F0E6CB; }

/* ---------- 舞台 ---------- */
.rts-stage {
  position: relative;
  border: 1px solid #C9BC98; border-top: none;
  background:
    radial-gradient(ellipse 120% 70% at 50% 118%, rgba(138,98,66,.30), transparent 60%),
    linear-gradient(180deg, #F4EFDF 0%, #EDE5CE 55%, #E4D9BC 100%);
  height: 400px; overflow: hidden;
}
.rts-gavel {
  position: absolute; left: 50%; top: 8%;
  transform: translateX(-50%);
  font-size: 13px; letter-spacing: 6px;
  color: #B03A2E; opacity: 0; transition: opacity .3s; z-index: 4;
}
.rts-gavel.show { opacity: 1; animation: rtsGavel .5s ease; }
@keyframes rtsGavel {
  0% { transform: translateX(-50%) scale(2.2) rotate(-8deg); }
  60% { transform: translateX(-50%) scale(1) rotate(0); }
  100% { transform: translateX(-50%) scale(1); }
}
.rts-table {
  position: absolute; left: 50%; top: 58%;
  width: 300px; height: 130px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 32%, #A97B50 0%, #8A6242 45%, #6E4B30 100%);
  box-shadow: 0 22px 34px -14px rgba(46,42,34,.45),
    inset 0 4px 10px rgba(255,240,210,.25),
    inset 0 -10px 18px rgba(0,0,0,.28);
}
.rts-table::after {
  content: ""; position: absolute; inset: 12px 22px;
  border-radius: 50%; border: 1px dashed rgba(246,233,216,.25);
}
/* 病案卷轴 */
.rts-case {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 168px;
  background: linear-gradient(180deg, #FFFDF6, #F5EEDC);
  border: 1px solid #D4C39C; border-radius: 3px;
  padding: 14px 8px 10px; text-align: center;
  box-shadow: 0 6px 16px -6px rgba(46,42,34,.35);
  opacity: 0; transition: opacity .8s, transform .8s; z-index: 2;
}
.rts-case.lit { opacity: 1; }
.rts-case::before, .rts-case::after {
  content: ""; position: absolute; left: -7px; right: -7px; height: 6px;
  background: linear-gradient(180deg, #7A6236, #5A4526); border-radius: 3px;
}
.rts-case::before { top: -3px; }
.rts-case::after { bottom: -3px; }
.rts-case .t { font-size: 11px; color: #B03A2E; letter-spacing: 4px; margin-bottom: 6px; font-weight: 700; }
.rts-case .b { font-size: 11.5px; color: #5C5546; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* 座位 */
.rts-seat {
  position: absolute; width: 92px; text-align: center; z-index: 3;
  opacity: 0; transform: translateY(14px) scale(.85);
  transition: opacity .55s ease, transform .55s ease, filter .3s;
  cursor: pointer;
}
.rts-seat.seated { opacity: 1; transform: none; }
.rts-seat .pt {
  width: 62px; height: 62px; margin: 0 auto; border-radius: 50%;
  object-fit: cover; border: 2px solid #C9BC98; background: #DDD3B8;
  box-shadow: 0 4px 10px -4px rgba(46,42,34,.5);
  transition: box-shadow .35s, border-color .35s, transform .35s;
}
.rts-seat .pt-char {
  width: 62px; height: 62px; margin: 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 22px;
  box-shadow: 0 4px 10px -4px rgba(46,42,34,.5);
}
.rts-seat .np {
  display: inline-block; margin-top: 5px;
  font-size: 12px; font-weight: 700; color: #2E2A22;
  background: rgba(255,253,246,.92);
  border: 1px solid #C9BC98; border-radius: 3px;
  padding: 1px 8px; letter-spacing: 2px;
}
.rts-seat .rt { display: block; font-size: 10px; color: #8C8471; margin-top: 3px; letter-spacing: 1px; }
.rts-seat.host .pt, .rts-seat.host .pt-char { border: 2px solid #9C7A2D; box-shadow: 0 0 0 3px rgba(156,122,45,.25), 0 6px 14px -4px rgba(46,42,34,.5); }
.rts-seat.host .np { border-color: #9C7A2D; color: #6E5416; }
.rts-seat.speaking .pt, .rts-seat.speaking .pt-char {
  transform: scale(1.22); border-color: #9C7A2D;
  box-shadow: 0 0 0 4px rgba(212,175,55,.35), 0 0 28px 6px rgba(212,175,55,.45), 0 8px 18px -4px rgba(46,42,34,.5);
}
.rts-seat.speaking .np { border-color: #9C7A2D; background: #FBF3DC; }
.rts-seat.agree .pt, .rts-seat.agree .pt-char { border-color: #2E7D5B; }
.rts-seat.against .pt, .rts-seat.against .pt-char { border-color: #B03A2E; }
.rts-seat.partial .pt, .rts-seat.partial .pt-char { border-color: #B5651D; }
/* 座位坐标（桌面）：主答居上，评阅按人数环绕 */
.rts-seat.s1 { left: 50%; top: 7%; transform: translateX(-50%) translateY(14px) scale(.85); }
.rts-seat.s1.seated { transform: translateX(-50%); }
.rts-seat.s2 { left: 6%; top: 26%; }
.rts-seat.s3 { right: 6%; top: 26%; }
.rts-seat.s4 { left: 13%; bottom: 8%; }
.rts-seat.s5 { right: 13%; bottom: 8%; }

/* 发言气泡 */
.rts-bubble {
  position: absolute; max-width: 190px;
  background: #FFFDF6; border: 1px solid #C9BC98; border-radius: 8px;
  padding: 7px 10px; font-size: 11.5px; line-height: 1.65; color: #2E2A22;
  box-shadow: 0 6px 14px -6px rgba(46,42,34,.4);
  opacity: 0; transform: translateY(6px) scale(.92);
  transition: opacity .45s, transform .45s; z-index: 5; pointer-events: none;
}
.rts-bubble.show { opacity: 1; transform: none; }
.rts-bubble::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  background: #FFFDF6; border-right: 1px solid #C9BC98; border-bottom: 1px solid #C9BC98;
  transform: rotate(45deg);
}
.rts-bubble.below::after { top: -6px; left: 50%; margin-left: -5px; }
.rts-bubble.above::after { bottom: -6px; left: 50%; margin-left: -5px; }
.rts-bubble .who { color: #9C7A2D; font-weight: 700; margin-right: 4px; }

/* ---------- 幕次进度 ---------- */
.rts-acts {
  display: flex; background: #332E24;
  border: 1px solid #C9BC98; border-top: none;
  padding: 0 6px; overflow-x: auto;
}
.rts-act {
  flex: 1; min-width: 92px; text-align: center;
  padding: 8px 4px 7px; color: #8C8471; font-size: 12px; letter-spacing: 1px;
  position: relative; cursor: default; white-space: nowrap; transition: color .3s;
}
.rts-act .no { display: block; font-size: 10px; color: #6E6752; margin-bottom: 2px; }
.rts-act.done { color: #C9BC98; }
.rts-act.done .no { color: #9C7A2D; }
.rts-act.now { color: #F0E6CB; }
.rts-act.now::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%); width: 22px; height: 2px; background: #9C7A2D;
}
.rts-act .ln { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #4A4436; margin-right: 5px; vertical-align: 1px; }
.rts-act.done .ln { background: #9C7A2D; box-shadow: 0 0 5px rgba(212,175,55,.8); }
.rts-act.now .ln { background: #B03A2E; box-shadow: 0 0 6px rgba(176,58,46,.9); }

/* ---------- 会诊录 ---------- */
.rts-rec-head { display: flex; align-items: center; gap: 10px; padding: 14px 4px 8px; }
.rts-rec-head h2 { font-size: 15px; letter-spacing: 3px; color: #2E2A22; font-weight: 700; }
.rts-rec-head .sub { font-size: 12px; color: #8C8471; }
.rts-rec-head .spacer { flex: 1; }
.rts-rec-head .rt-status {
  font-size: 12px; color: #8C8471; max-width: 46%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rts-fold {
  flex: none; font-size: 12px; letter-spacing: 1px; color: #6E5B3C;
  background: #F5EEDC; border: 1px solid #C9BC98; border-radius: 3px;
  padding: 5px 14px; cursor: pointer; transition: all .25s;
}
.rts-fold:hover { background: #EFE5CB; border-color: #9C7A2D; color: #4A3E22; }
.rts-fold:active { transform: translateY(1px); }
.rts-records.folded { display: none; }
.rts-note-line {
  font-size: 12px; color: #8C8471; text-align: center;
  padding: 10px 0 2px; letter-spacing: 2px; opacity: 0; transition: opacity .5s;
}
.rts-note-line.show { opacity: 1; }

.rts-card {
  position: relative; background: #FFFDF6;
  border: 1px solid #DCD2B4; border-radius: 4px;
  margin: 10px 0; padding: 12px 14px 11px 52px;
  box-shadow: 0 3px 10px -6px rgba(46,42,34,.35);
  animation: rtsNoteIn .5s ease;
}
@keyframes rtsNoteIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rts-card .av {
  position: absolute; left: 10px; top: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; border: 1px solid #C9BC98; background: #DDD3B8;
}
.rts-card .av-char {
  position: absolute; left: 10px; top: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
}
.rts-card .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.rts-card .nm { font-size: 14px; font-weight: 700; }
.rts-card .rd { font-size: 11px; color: #8C8471; }
.rts-stance { font-size: 11px; padding: 1px 9px; border-radius: 10px; letter-spacing: 1px; font-weight: 700; }
.rts-stance.agree { background: rgba(46,125,91,.12); color: #2E7D5B; border: 1px solid rgba(46,125,91,.4); }
.rts-stance.against { background: rgba(176,58,46,.10); color: #B03A2E; border: 1px solid rgba(176,58,46,.4); }
.rts-stance.partial { background: rgba(181,101,29,.10); color: #B5651D; border: 1px solid rgba(181,101,29,.4); }
.rts-verified { font-size: 11px; color: #2E7D5B; border: 1px solid rgba(46,125,91,.4); border-radius: 10px; padding: 1px 8px; }
.rts-obj {
  border-left: 3px solid #B03A2E; background: rgba(176,58,46,.045);
  border-radius: 0 4px 4px 0; padding: 7px 10px; margin: 6px 0;
  font-size: 12.5px; line-height: 1.7;
}
.rts-obj .h { font-weight: 700; color: #B03A2E; }
.rts-obj .b { color: #5C5546; font-size: 11.5px; }
.rts-obj .sug { color: #B5651D; font-size: 11.5px; }
.rts-sup {
  border-left: 3px solid #2E7D5B; background: rgba(46,125,91,.05);
  border-radius: 0 4px 4px 0; padding: 7px 10px; margin: 6px 0;
  font-size: 12.5px; line-height: 1.7; color: #2E7D5B;
}
.rts-card .bt { font-size: 12.5px; line-height: 1.8; color: #2E2A22; white-space: pre-wrap; }
.rts-card.host-card { border-left: 3px solid #9C7A2D; }
.rts-card.rewrite-card { border-left: 3px solid #B5651D; background: #FEFBF2; }

.rts-final {
  position: relative;
  background: linear-gradient(180deg, #FDF9EE, #F3ECD7);
  border: 1px solid #C9BC98; border-radius: 4px;
  margin: 14px 0 8px; padding: 16px 18px;
  box-shadow: 0 5px 14px -8px rgba(46,42,34,.45);
  animation: rtsScrollOpen .8s ease; overflow: hidden;
}
@keyframes rtsScrollOpen { from { opacity: 0; clip-path: inset(0 46% 0 46%); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.rts-final .fh { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: 2px; margin-bottom: 8px; color: #B03A2E; }
.rts-final .fh.gold { color: #6E5416; }
.rts-final .bt { font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; }
.rts-final .stamp {
  position: absolute; right: 16px; bottom: 12px;
  width: 46px; height: 46px; border: 2px solid rgba(176,58,46,.75); border-radius: 6px;
  color: rgba(176,58,46,.85); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  transform: rotate(-8deg); writing-mode: vertical-rl;
}

/* ---------- 流式「落笔中」草稿笺纸 ---------- */
.rts-draft { border-style: dashed; }
.rts-card.rts-draft { background: #FBF8EC; border-color: #CFC3A0; }
.rts-draft .draft-text { color: #6B6353; word-break: break-all; }
.rts-writing { animation: rtsWriting 1.6s ease-in-out infinite; }
@keyframes rtsWriting {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.rts-cursor {
  display: inline-block; width: 2px; height: 14px;
  background: #B03A2E; vertical-align: -2px; margin-left: 2px;
  animation: rtsBlink .9s step-end infinite;
}
@keyframes rtsBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---------- 控制条（含停止） ---------- */
.rts-ctl {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; gap: 10px; align-items: center; justify-content: center;
  margin-top: 18px; flex-wrap: wrap;
  padding: 12px 0 16px;
  background: linear-gradient(180deg, rgba(233,226,207,0), rgba(233,226,207,.95) 40%);
}
.rts-btn {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  font-size: 14px; letter-spacing: 2px;
  padding: 10px 26px; border-radius: 20px;
  border: 1px solid #A8996F; background: #FFFDF6; color: #2E2A22;
  cursor: pointer; transition: all .25s;
}
.rts-btn:hover { background: #9C7A2D; color: #FFFDF6; border-color: #9C7A2D; }
.rts-btn.rts-stop { background: #B03A2E; border-color: #B03A2E; color: #F6E9D8; animation: rtsPulse 2s infinite; }
.rts-btn.rts-stop:hover { background: #8F2E24; }
/* 收场后的导出入口：金色实底，与停止按钮的红色区分 */
.rts-btn.rts-pdf { background: #9C7A2D; border-color: #9C7A2D; color: #FFFDF6; }
.rts-btn.rts-pdf:hover { background: #7E6224; border-color: #7E6224; }
@keyframes rtsPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(176,58,46,.45); }
  50% { box-shadow: 0 0 0 8px rgba(176,58,46,0); }
}
.rts-btn:disabled { opacity: .5; cursor: not-allowed; animation: none; }
.rts-hint-line { font-size: 12px; color: #8C8471; text-align: center; padding-bottom: 6px; letter-spacing: 1px; }

/* ---------- 最小化悬浮球 ---------- */
.rts-pill {
  position: fixed; right: 14px; bottom: 84px; z-index: 199;
  display: none; align-items: center; gap: 6px;
  background: #332E24; color: #F0E6CB;
  border: 1px solid #9C7A2D; border-radius: 20px;
  font-size: 12.5px; padding: 8px 14px; cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.5);
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
}
.rts-pill.show { display: flex; }
.rts-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #E0A93E; animation: rtsBlink 1.2s infinite; }
.rts-pill.done .dot { background: #2E7D5B; animation: none; }
@keyframes rtsBlink { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- 名帖弹层 ---------- */
.rts-pop {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(46,42,34,.5);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.rts-pop.show { display: flex; }
.rts-pop .inner {
  background: #FFFDF6; border: 1px solid #C9BC98; border-radius: 8px;
  max-width: 340px; width: 100%; padding: 18px; position: relative;
  box-shadow: 0 20px 50px -18px rgba(0,0,0,.5);
}
.rts-pop .close { position: absolute; right: 10px; top: 8px; font-size: 16px; color: #8C8471; cursor: pointer; background: none; border: none; }
.rts-pop .ph { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.rts-pop .ph img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid #9C7A2D; }
.rts-pop .ph .n { font-size: 17px; font-weight: 700; }
.rts-pop .ph .e { font-size: 12px; color: #8C8471; margin-top: 2px; }
.rts-pop dl { font-size: 12.5px; line-height: 2; margin: 0; }
.rts-pop dt { color: #9C7A2D; font-weight: 700; margin-right: 6px; display: inline; }
.rts-pop dd { display: inline; color: #5C5546; margin: 0; }
.rts-pop .sep { border-top: 1px dashed #C9BC98; margin: 8px 0; }
.rts-pop .qi { font-size: 12px; color: #5C5546; line-height: 1.8; margin-top: 6px; border-left: 2px solid #C9BC98; padding-left: 8px; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .rts-stage { height: 350px; }
  .rts-table { width: 220px; height: 96px; top: 62%; }
  .rts-case { width: 118px; padding: 10px 5px 8px; }
  .rts-case .t { font-size: 10px; letter-spacing: 2px; margin-bottom: 4px; }
  .rts-case .b { font-size: 10px; line-height: 1.6; }
  .rts-seat { width: 74px; }
  .rts-seat .pt, .rts-seat .pt-char { width: 48px; height: 48px; }
  .rts-seat .pt-char { font-size: 18px; }
  .rts-seat .np { font-size: 11px; padding: 1px 5px; letter-spacing: 1px; }
  .rts-seat .rt { display: none; }
  .rts-seat.s2 { left: 3%; top: 30%; }
  .rts-seat.s3 { right: 3%; top: 30%; }
  .rts-seat.s4 { left: 8%; bottom: 6%; }
  .rts-seat.s5 { right: 8%; bottom: 6%; }
  .rts-bubble { max-width: 140px; font-size: 10.5px; }
  .rts-banner .sub { max-width: 150px; }
  .rts-card { padding-left: 48px; padding-right: 10px; }
  .rts-btn { padding: 10px 20px; font-size: 13px; }
}
