/* ui_refresh.css v5 — 书香气质录制详情页（保留字幕卡片，不用科技风） */

:root{
  --ui-ink:#332b24;
  --ui-ink-2:#241d18;
  --ui-paper:#f8f3ea;
  --ui-paper-2:#f2ebdf;
  --ui-paper-3:#efe6d7;
  --ui-panel:#fbf7f0;
  --ui-panel-soft:#f3ede3;
  --ui-line:#ddd1bf;
  --ui-line-2:#cdbca5;
  --ui-muted:#8a7d6a;
  --ui-muted-2:#a69784;
  --ui-accent:#7b9a7c;
  --ui-accent-soft:rgba(123,154,124,.14);
  --ui-brown:#5e4a39;
  --ui-brown-2:#453428;
  --ui-shadow:0 28px 72px rgba(53,37,24,.18);
}

.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

#session-modal{backdrop-filter:blur(8px)}
.session-player-modal{
  position:relative;
  padding:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border:none!important;
  overflow:visible!important;
}
.session-player-host{display:block}
.session-player-close{
  position:absolute;
  top:16px;
  right:16px;
  z-index:6;
  width:42px;
  height:42px;
  border:none;
  border-radius:50%;
  background:rgba(255,248,238,.16);
  color:#fff8ef;
  backdrop-filter:blur(10px);
  font-size:1.1rem;
  cursor:pointer;
  transition:transform .16s ease, background .16s ease;
}
.session-player-close:hover{background:rgba(255,248,238,.24)}
.session-player-close:active{transform:scale(.96)}

.session-ui{
  position:relative;
  margin:12px 14px;  /* 两边留白:手机端14px,整体有呼吸感 */
  border-radius:28px;
  overflow:hidden;
  background:linear-gradient(180deg,#2f241d 0%,#403128 45%,#5a4738 100%);
  box-shadow:var(--ui-shadow);
}
@media (min-width: 640px) {
  .session-ui { margin: 16px 20px; border-radius: 34px; }
}
.session-ui::before{
  content:'';
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,240,214,.16), transparent 34%),
    radial-gradient(circle at 86% 14%, rgba(198,177,142,.15), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  pointer-events:none;
}
.session-ui::after{
  content:'';
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(
    180deg,
    rgba(255,255,255,.012) 0,
    rgba(255,255,255,.012) 2px,
    rgba(0,0,0,.01) 2px,
    rgba(0,0,0,.01) 4px
  );
  mix-blend-mode:soft-light;
  opacity:.28;
  pointer-events:none;
}

.session-hero{
  position:relative;
  z-index:1;
  padding:28px 26px 130px;
  min-height:220px;
}
.session-hero-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.session-hero-profile{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.session-hero-avatar{
  width:50px;
  height:50px;
  border-radius:50%;
  background:linear-gradient(135deg,#efe0c6 0%,#d2b992 100%);
  color:#433227;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.12rem;
  font-weight:700;
  letter-spacing:.5px;
  box-shadow:0 10px 24px rgba(21,14,10,.18);
  flex:0 0 auto;
}
.session-hero-copy{min-width:0}
.session-hero-name{
  color:#fff6ea;
  font-size:1.18rem;
  line-height:1.15;
  font-weight:700;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.session-hero-status{
  margin-top:8px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#cfe0cb;
  font-size:.96rem;
  letter-spacing:.2px;
}
.session-hero-status-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--ui-accent);
  box-shadow:0 0 0 6px rgba(123,154,124,.12);
  flex:0 0 auto;
}
.session-hero-clock{
  font-variant-numeric:tabular-nums lining-nums;
  font-feature-settings:"tnum" 1, "lnum" 1;
  flex:0 0 auto;
  color:#f7eadc;
  font-size:1rem;
  font-variant-numeric:tabular-nums;
  letter-spacing:.3px;
  padding-top:4px;
}

.session-sheet{
  position:relative;
  z-index:2;
  margin-top:-82px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 22%),
    linear-gradient(180deg, var(--ui-panel) 0%, #f7f1e7 100%);
  border-radius:36px 36px 0 0;
  padding:30px 26px 24px;
  box-shadow:0 -1px 0 rgba(255,255,255,.45);
}
.session-sheet::before{
  content:'';
  position:absolute;
  inset:0;
  background:repeating-linear-gradient(
    180deg,
    rgba(123,102,77,.018) 0,
    rgba(123,102,77,.018) 1px,
    rgba(255,255,255,0) 1px,
    rgba(255,255,255,0) 3px
  );
  pointer-events:none;
  opacity:.22;
}
.session-sheet-kicker{
  position:relative;
  z-index:1;
  font-size:.8rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#9d8b73;
  margin-bottom:10px;
}
.session-sheet-title{
  position:relative;
  z-index:1;
  /* 优先用系统衬线字体(保证数字等高), Playfair 作为装饰备选 */
  font-family:
    "Source Han Serif SC",     /* 思源宋体 */
    "Songti SC",               /* macOS 宋体 */
    "Noto Serif SC",           /* 谷歌宋体 */
    "STSong",                   /* Windows 宋体备选 */
    "SimSun",                   /* Windows 宋体 */
    "Playfair Display",
    Georgia,
    "Times New Roman",
    serif;
  font-size:clamp(2rem,6vw,3rem);
  line-height:1.15;
  font-weight:700;
  letter-spacing:0;
  color:var(--ui-ink-2);
  margin:0;
  word-break:break-word;
  font-variant-numeric:lining-nums;
  font-feature-settings:"lnum" 1;
}
.session-sheet-sub{
  position:relative;
  z-index:1;
  margin-top:12px;
  color:var(--ui-muted);
  font-size:1rem;
  letter-spacing:.2px;
}

.custom-player{
  position:relative;
  z-index:1;
  margin-top:24px;
  padding:0;
}
.cp-row{
  display:flex;
  align-items:center;
  gap:16px;
}
.cp-row-sub{
  margin-top:18px;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.cp-btn{
  flex:0 0 auto;
  width:46px;
  height:46px;
  border-radius:50%;
  border:none;
  background:var(--ui-brown-2);
  color:#fff8ef;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 24px rgba(53,37,24,.14);
  transition:transform .14s ease, background .16s ease, box-shadow .16s ease;
  -webkit-tap-highlight-color:transparent;
}
.cp-btn:hover{background:#594638;box-shadow:0 12px 28px rgba(53,37,24,.18)}
.cp-btn:active{transform:scale(.95)}
.cp-progress{
  flex:1 1 auto;
  height:2px;
  background:rgba(94,74,57,.18);
  border-radius:999px;
  cursor:pointer;
  position:relative;
  transition:height .15s ease;
}
.cp-progress:hover{ height:3px; }
.cp-progress-fill{
  position:absolute;
  inset:0 auto 0 0;
  background:var(--ui-brown-2);
  border-radius:999px;
  width:0;
  transition:width .1s linear;
}
/* 端点小圆:仅在 hover 时出现(平时是一条纯线) */
.cp-progress-fill::after{
  content:'';
  position:absolute;
  right:-5px;
  top:50%;
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--ui-brown-2);
  transform:translateY(-50%);
  opacity:0;
  transition:opacity .15s ease;
}
.cp-progress:hover .cp-progress-fill::after{ opacity:1; }
.cp-time{
  flex:0 0 auto;
  min-width:122px;
  text-align:right;
  color:var(--ui-muted);
  font-size:.95rem;
  font-variant-numeric:tabular-nums lining-nums;
  font-feature-settings:"tnum" 1, "lnum" 1;
  letter-spacing:.2px;
}
.cp-speed-label{
  color:var(--ui-muted);
  font-size:.84rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.cp-speed-group{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.cp-speed-btn{
  padding:7px 12px;
  border:1px solid #e0d4c5;
  background:#f5eee3;
  color:#726452;
  font-size:.86rem;
  cursor:pointer;
  border-radius:999px;
  transition:background .16s ease,color .16s ease,transform .16s ease,border-color .16s ease;
  -webkit-tap-highlight-color:transparent;
}
.cp-speed-btn:hover{background:#f1e7d9;color:#403328;border-color:#d2c0ab}
.cp-speed-btn:active{transform:scale(.98)}
.cp-speed-btn.active{
  background:var(--ui-brown-2);
  color:#fff8ef;
  border-color:var(--ui-brown-2);
  box-shadow:0 8px 20px rgba(94,74,57,.14);
}






.subtitle-panel{
  position:relative;
  z-index:1;
  margin:22px 0 0;
  background:linear-gradient(180deg,#f4eee5 0%, #efe7da 100%);
  border:1px solid var(--ui-line);
  border-radius:26px;
  overflow:hidden;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75), 0 10px 26px rgba(68,48,30,.05);
}
.subtitle-panel .sub-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:18px 18px 10px;
}
.subtitle-panel .sub-card-title{
  color:#433527;
  font-size:1rem;
  font-weight:700;
  letter-spacing:.01em;
}
.subtitle-panel .sub-card-sub{
  margin-top:4px;
  color:#9a8a76;
  font-size:.82rem;
}
.subtitle-panel .sub-current{
  margin:0 18px 12px;
  padding:16px 16px 14px;
  border-radius:20px;
  background:rgba(255,252,247,.9);
  border:1px solid rgba(205,188,165,.82);
  box-shadow:0 8px 18px rgba(77,58,41,.05);
}
.subtitle-panel .sub-current-meta{
  font-size:.82rem;
  color:#927f69;
  font-variant-numeric:tabular-nums;
}
.subtitle-panel .sub-current-text{
  margin-top:8px;
  color:#2d241d;
  font-family:"Playfair Display","Times New Roman","Songti SC",serif;
  font-size:1.35rem;
  line-height:1.45;
  letter-spacing:.01em;
}
.subtitle-panel .sub-scroll{
  max-height:360px;
  overflow-y:auto;
  padding:0 16px 14px;
  -webkit-overflow-scrolling:touch;
}
.subtitle-panel .sub-line{
  display:block;
  width:100%;
  text-align:left;
  border:none;
  background:transparent;
  padding:14px 14px 12px;
  margin:0 0 4px;
  border-radius:18px;
  cursor:pointer;
  color:#b4a899;
  transition:background .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
  font-size:1.01rem;
  line-height:1.68;
}
.subtitle-panel .sub-line:hover{background:rgba(255,255,255,.48)}
.subtitle-panel .sub-line.active{
  color:#2c241d;
  background:#fffbf6;
  box-shadow:0 10px 24px rgba(84,63,43,.08);
}
.subtitle-panel .sub-meta{
  display:block;
  font-size:.84rem;
  color:#a08f7b;
  font-variant-numeric:tabular-nums;
  margin-bottom:6px;
}
.subtitle-panel .sub-line.active .sub-meta{color:#756552}
.subtitle-panel .sub-text{display:block;word-break:break-word}
.subtitle-panel .sub-line.active .sub-text{font-weight:600}
.subtitle-panel .sub-back-btn{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 14px;
  border:none;
  border-radius:999px;
  background:var(--ui-brown-2);
  color:#fff8ef;
  font-size:.78rem;
  cursor:pointer;
  opacity:0;
  transform:translateY(6px);
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
.subtitle-panel .sub-back-btn.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.sub-loading{
  padding:22px 18px;
  color:var(--ui-muted);
  font-size:.9rem;
}
.sub-toggle-btn,
.subtitle-panel .sub-expand-btn{display:none!important}

.analysis-entry{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:18px 0 0;
  padding:18px 18px;
  background:linear-gradient(135deg,#f8f1e6 0%,#f3eadc 100%);
  border:1px solid rgba(173,148,120,.28);
  border-radius:22px;
  cursor:pointer;
  transition:transform .16s ease,box-shadow .18s ease,border-color .18s ease;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.analysis-entry:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(84,63,43,.08);
  border-color:rgba(127,100,69,.38);
}
.analysis-entry:active{transform:scale(.992)}
.analysis-entry-left{display:flex;align-items:center;gap:14px;min-width:0}
.analysis-entry-icon{
  flex:0 0 auto;
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(164,139,107,.14);
  color:#6a543e;
  font-size:1.15rem;
}
.analysis-entry-title{
  font-size:1rem;
  font-weight:700;
  color:#3a2d22;
  letter-spacing:.2px;
}
.analysis-entry-sub{
  margin-top:4px;
  font-size:.82rem;
  color:#897966;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.analysis-entry-arrow{
  font-size:1.55rem;
  color:#8f7b66;
  line-height:1;
}

.admin-media-ctrls{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px dashed #d7c8b2;
}
.admin-media-ctrls:empty{display:none}
.admin-media-ctrls .btn{border-radius:999px!important}

.analysis-page{
  position:fixed;
  inset:0;
  background:rgba(33,23,16,.38);
  backdrop-filter:blur(10px);
  z-index:9999;
  display:flex;
  flex-direction:column;
  transform:translateX(100%);
  transition:transform .28s cubic-bezier(.33,1,.68,1);
  pointer-events:none;
}
.analysis-page.open{transform:translateX(0);pointer-events:auto}
.analysis-page-header{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  padding-top:calc(12px + env(safe-area-inset-top,0));
  background:linear-gradient(180deg,#31251d 0%,#4a392d 100%);
  color:#fff3e5;
}
.analysis-page-back{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border:none;
  background:rgba(255,248,238,.1);
  color:#fff6ea;
  cursor:pointer;
  border-radius:12px;
  transition:background .16s ease;
}
.analysis-page-back:hover{background:rgba(255,248,238,.16)}
.analysis-page-title{
  flex:1;
  font-size:.98rem;
  font-weight:700;
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.analysis-page-copy{
  flex:0 0 auto;
  padding:7px 12px;
  background:rgba(255,248,238,.08);
  border:1px solid rgba(255,248,238,.12);
  border-radius:10px;
  color:#fff4e8;
  font-size:.82rem;
  cursor:pointer;
  transition:background .16s ease;
}
.analysis-page-copy:hover{background:rgba(255,248,238,.14)}
.analysis-page-body{
  flex:1 1 auto;
  overflow-y:auto;
  margin:0 12px 12px;
  padding:24px 24px 50px;
  font-size:.98rem;
  line-height:1.92;
  color:#3b2f26;
  background:linear-gradient(180deg,#fbf6ee 0%,#f5ecdf 100%);
  border-radius:28px;
  box-shadow:0 18px 48px rgba(53,37,24,.12);
  -webkit-overflow-scrolling:touch;
}
.analysis-page-body>:first-child{margin-top:0}
.analysis-page-body p{margin:0 0 14px}
.analysis-page-body h1,.analysis-page-body h2,.analysis-page-body h3,.analysis-page-body h4,.analysis-page-body h5,.analysis-page-body h6{
  font-family:"Source Han Serif SC","Songti SC","Noto Serif SC","Playfair Display",serif;
  color:#c89030;             /* 琥珀金 */
  margin:30px 0 14px;
  font-weight:700;
  letter-spacing:.4px;
  line-height:1.4;
}
.analysis-page-body h1{
  font-size:1.32rem;
  padding-bottom:10px;
  border-bottom:1px solid rgba(200,144,48,.22);
}
.analysis-page-body h2{font-size:1.16rem}
.analysis-page-body h3{
  font-size:1.05rem;
  position:relative;
  padding-left:14px;
}
.analysis-page-body h3::before{
  content:'';
  position:absolute;
  left:0;
  top:.3em;
  bottom:.3em;
  width:3px;
  background:linear-gradient(180deg,#d9a344,#c89030);
  border-radius:2px;
}
.analysis-page-body h4,.analysis-page-body h5,.analysis-page-body h6{font-size:.98rem;color:#a07220}
.analysis-page-body strong{color:#2a2119;font-weight:700}
.analysis-page-body em{color:#604a38;font-style:italic}
.analysis-page-body code{background:#efe4d4;padding:2px 6px;border-radius:6px;font-size:.88em;color:#49382c}
.analysis-page-body ul,.analysis-page-body ol{margin:8px 0 16px;padding-left:22px}
.analysis-page-body li{margin:6px 0;line-height:1.8}
.analysis-page-body li::marker{color:#c89030;font-weight:600}
.analysis-page-body blockquote{
  margin:14px 0;
  padding:12px 16px;
  border-left:3px solid #c89030;
  background:linear-gradient(90deg,rgba(200,144,48,.08),rgba(200,144,48,.02));
  color:#604a38;
  font-style:italic;
  border-radius:0 12px 12px 0;
}
.analysis-page-body hr{margin:24px 0;border:none;border-top:1px dashed #d3c1aa}
.analysis-loading{padding:60px 20px;text-align:center;color:#8a7a66;font-size:.92rem}

@media (max-width:720px){
  .session-player-modal{max-width:none!important}
  .session-player-close{top:12px;right:12px;width:40px;height:40px}
  .session-ui{border-radius:28px}
  .session-hero{padding:22px 20px 112px;min-height:200px}
  .session-sheet{margin-top:-72px;padding:24px 18px 20px;border-radius:28px 28px 0 0}
  .session-sheet-title{font-size:2.38rem}
  .session-hero-name{font-size:1.05rem}
  .session-hero-status{font-size:.9rem}
  .cp-row{gap:12px}
  .cp-time{min-width:92px;font-size:.9rem}
  .cp-row-sub{margin-top:16px}
  .cp-speed-label{width:100%}
  .subtitle-panel{border-radius:22px}
  .subtitle-panel .sub-card-head{padding:16px 14px 8px}
  .subtitle-panel .sub-current{margin:0 14px 10px;padding:14px}
  .subtitle-panel .sub-current-text{font-size:1.18rem}
  .subtitle-panel .sub-scroll{padding:0 12px 12px}
  .analysis-entry{padding:16px}
  .analysis-page-body{margin:0 8px 8px;padding:20px 18px 42px;border-radius:22px}
}

/* ═══ 视频切换按钮(只在有视频时显示) ═══ */
.media-toggle {
  display: inline-flex;
  gap: 2px;
  background: rgba(94, 74, 57, .07);
  border-radius: 22px;
  padding: 3px;
  margin: 18px 0 10px;
  box-shadow: inset 0 1px 2px rgba(94, 74, 57, .08);
  position: relative;
  z-index: 1;
}
.media-toggle-btn {
  padding: 7px 16px;
  border: none;
  background: transparent;
  color: var(--ui-muted);
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: 18px;
  transition: all .18s ease;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.3px;
  font-weight: 500;
}
.media-toggle-btn:hover {
  color: var(--ui-ink-2);
  background: rgba(255, 255, 255, .4);
}
.media-toggle-btn.active {
  background: linear-gradient(180deg, var(--ui-brown) 0%, var(--ui-brown-2) 100%);
  color: #fff8ef;
  box-shadow: 0 2px 6px rgba(53, 37, 24, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.media-video {
  margin: 14px 0 18px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(53, 37, 24, .2);
  position: relative;
  z-index: 1;
  max-height: 30vh;
  background: #000;
}
.media-video video {
  width: 100%;
  height: auto;
  max-height: 30vh;   /* 再加一层限制 */
  display: block;
  object-fit: contain;
}

/* 头像微调:容纳SVG图标,保持与原版文字头像的尺寸 */
.session-hero-avatar svg {
  display: block;
}

/* 去掉"同步字幕进行中"(原bookish版有此状态,我们不需要) */
.session-hero-status,
.session-hero-status-dot {
  display: none !important;
}


/* 三按钮一行:AI 解读按钮(带跳转暗示) */
.media-toggle-btn.media-toggle-nav {
  background: transparent;
  color: var(--ui-muted);
  position: relative;
}
.media-toggle-btn.media-toggle-nav::after {
  content: '›';
  margin-left: 4px;
  font-size: 1.1em;
  color: inherit;
  opacity: .6;
}
.media-toggle-btn.media-toggle-nav:hover {
  color: var(--ui-ink-2);
  background: rgba(255, 255, 255, .4);
}

/* 三按钮组在手机上可横向滚动,避免挤爆 */
.media-toggle {
  flex-wrap: wrap;
}
