/* ========== 全局 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fafafb;
  --text: #1a1c2c;
  --text-sub: #6b7085;
  --muted: #b7bac7;
  --brand: #14b8a6;
  --brand-dark: #0f9d8f;
  --brand-soft: #e6f7f5;
  --accent: #f97a6b;
  --nav-w: 220px;
}
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ========== 左侧导航 ========== */
.side-nav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  padding: 60px 24px 40px 40px;
  z-index: 20;
  display: flex; align-items: center;
}
.side-nav ul {
  list-style: none;
  position: relative;
  width: 100%;
}
.side-nav ul::before {
  content: ""; position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, #dcdee8 15%, #dcdee8 85%, transparent);
}
.side-nav li {
  position: relative;
  padding: 22px 0 22px 32px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
  letter-spacing: 0.2px;
}
.side-nav li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #e4e5ec;
  transition: all 0.3s ease;
}
.side-nav li.active { color: var(--text); font-weight: 600; }
.side-nav li.active::before {
  background: var(--text);
  box-shadow: 0 0 0 4px rgba(26, 28, 44, 0.08);
}
.side-nav li:hover:not(.active) { color: var(--text-sub); }

/* ========== 提示 ========== */
.hint {
  position: fixed;
  top: 32px; right: 40px;
  z-index: 20;
  display: flex; align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #ffffffcc;
  border: 1px solid #eceef4;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-sub);
  backdrop-filter: blur(8px);
  animation: floatY 2.4s ease-in-out infinite;
}
.hint span:first-child { color: var(--brand); font-weight: 700; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ========== 页面容器 ========== */
.pages {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.pages::-webkit-scrollbar { display: none; }

.page {
  height: 100vh; width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding-left: var(--nav-w);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.page[data-index="0"] { background: linear-gradient(135deg, #f5f7ff 0%, #eef1ff 100%); }
.page[data-index="1"] { background: linear-gradient(135deg, #f2fbfa 0%, #e6f6f4 100%); }
.page[data-index="2"] { background: linear-gradient(135deg, #f2fbf7 0%, #e6f6ee 100%); }
.page[data-index="3"] { background: linear-gradient(135deg, #f8f5ff 0%, #eee6ff 100%); }
.page[data-index="4"] { background: linear-gradient(135deg, #f0f5ff 0%, #dee9ff 100%); }
.page[data-index="5"] { background: linear-gradient(135deg, #fffaf0 0%, #fff2dc 100%); }

.page::before, .page::after {
  content: ""; position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}
.page::before { width: 380px; height: 380px; background: #fff; top: -120px; right: -100px; }
.page::after{ width: 300px; height: 300px; background: #ffffffaa; bottom: -100px; left: 20%; }

.page-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
  width: 100%;
  max-width: 1180px;
  padding: 0 60px;
}

/* ========== 左侧文案 ========== */
.page-text {
  flex: 1;
  max-width: 480px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}
.page.in-view .page-text {
  opacity: 1; transform: translateY(0);
}
.eyebrow {
  font-size: 13px; letter-spacing: 3px;
  color: var(--text-sub);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.page-title {
  font-size: 48px;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex; align-items: center;
}
.title-icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand);
  margin-right: 10px;
}
.title-icon svg { width: 32px; height: 32px; }
.page-subtitle {
  font-size: 18px;
  font-weight: 700;
  color: #7d8497;
  margin-bottom: 18px;
}
.page-desc {
  font-size: 15px;
  line-height: 1.85;
  color: #555a72;
  margin-bottom: 22px;
}
.feat-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}
.feat-list li {
  display: flex; align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.feat-list .num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center; justify-content: center;
}

/* 当前在看 */
.watching-block { margin-top: 4px; }
.watching-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-sub);
  margin-bottom: 10px;
}
.watching-label .bar {
  width: 3px; height: 14px;
  background: var(--brand);
  border-radius: 2px;
}
.watching-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.watching-chips span {
  padding: 6px 14px;
  border-radius: 999px;
  background: #eef0f3;
  color: #6b7085;
  font-size: 12px;
}
.watching-chips .cur {
  background: var(--brand); color: #fff;
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.28);
}

/* ========== 手机外壳 ========== */
.phone-mount { flex: 0 0 auto; }
.phone-wrap {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.7s ease 0.25s, transform 0.7s ease 0.25s;
}
.page.in-view .phone-wrap {
  opacity: 1; transform: translateY(0) scale(1);
}
.phone {
  position: relative;
  width: 360px; height: 744px;
  background: #1a1c2c;
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 30px 60px rgba(30, 34, 60, 0.25),
    0 0 0 2px #2a2d42 inset;
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #1a1c2c;
  border-radius: 999px;
  z-index: 3;
}
.phone-home {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 4px;
  background: #ffffff33;
  border-radius: 999px;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #fff;
  position: relative;
}

/* ========== 腾讯视频播放器（TP = TencentPlayer） ========== */
.tp {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background: #fff;
}

/* --- 视频区 --- */
.tp-video {
  position: relative;
  height: 210px;
  flex-shrink: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.15) 100%),
    linear-gradient(135deg, #4b5b6e 0%, #7c8ea3 40%, #a9bbd0 100%);
  overflow: hidden;
}
.tp-video::before {
  /* 雪景纹理，模拟原图 */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 20%, rgba(255,255,255,0.3) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.28) 0 1.8px, transparent 2.8px),
 radial-gradient(circle at 85% 65%, rgba(255,255,255,0.3) 0 1.5px, transparent 2.5px),
    radial-gradient(ellipse at 50% 100%, rgba(255,255,255,0.35), transparent 60%);
}
.tp-status {
  position: absolute;
  top: 12px; left: 0; right: 0;
  padding: 0 20px;
  display: flex; justify-content: space-between;
  font-size: 11px; font-weight: 700;
  color: #fff;
  z-index: 3;
}
.tp-status .right { letter-spacing: 1px; }
.tp-mark {
  position: absolute;
  right: 10px; bottom: 8px;
  font-size: 10px;
  color: #fff;
  opacity: 0.85;
  letter-spacing: 1px;
  z-index: 3;
}
.tp-danmu {
  position: absolute; inset: 40px 0 20px;
  z-index: 2;
  pointer-events: none;
}
.tp-danmu .dm {
  position: absolute;
  color: #fff;
  font-size: 11px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  white-space: nowrap;
}
.tp-danmu .d1 { top: 30%; left: 65%; animation: dmSlide 12s linear infinite; }
.tp-danmu .d2 { top: 50%; left: 55%; animation: dmSlide 15s linear infinite 3s; }
.tp-danmu .d3 { top: 70%; left: 60%; animation: dmSlide 14s linear infinite 6s; }
@keyframes dmSlide {
  from { transform: translateX(30%); opacity: 0.9; }
  to { transform: translateX(-140%); opacity: 0.9; }
}

/* --- 一级 Tab --- */
.tp-tabs {
  display: flex;
  padding: 10px 14px 0;
  gap: 18px;
  border-bottom: 1px solid #eef0f4;
  flex-shrink: 0;
  background: #fff;
}
.tp-tab {
  position: relative;
  font-size: 13px;
  color: #6b7085;
  padding-bottom: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.tp-tab sup {
  color: #ff8a1e;
  font-size: 9px;
  font-weight: 700;
  vertical-align: super;
  margin-left: 2px;
}
.tp-tab.on {
  color: var(--text);
  font-weight: 700;
}
.tp-tab.on::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* --- 通用面板 --- */
.tp-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 20px;
  background: #fff;
  scrollbar-width: none;
}
.tp-panel::-webkit-scrollbar { display: none; }

/* ========== 详情面板 ========== */
.tp-block { margin-bottom: 10px; }
.tp-title-row {
  display: flex; align-items: baseline; gap: 8px;
}
.tp-title-row h3 { font-size: 20px; color: var(--text); }
.tp-title-row .tp-sub { font-size: 12px; color: #9098aa; }
.tp-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 12px;
}
.tp-tags span {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f4f5f7;
  color: #555a72;
}
.tp-tags .score {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--text);
  font-weight: 700;
}
.tp-tags .hot { background: transparent; color: #ff8a1e; padding-left: 0; }

.tp-actions {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 10px;
}
.tp-action { text-align: center; }
.tp-action .ic { font-size: 18px; color: #555a72; }
.tp-action .lb { font-size: 10px; color: #6b7085; margin-top: 2px; }
.tp-action.on .ic, .tp-action.on .lb { color: var(--brand); }

.tp-section { margin: 10px 0 4px; }
.tp-section-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 8px;
}
.tp-section-head b { font-size: 15px; color: var(--text); }
.tp-section-head .meta { font-size: 11px; color: #9098aa; flex: 1; }
.tp-section-head .chev { color: #b7bac7; font-size: 14px; }

.tp-subtabs {
  display: flex; gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 10px;
  font-size: 12px;
}
.tp-subtabs.solo { border: 0; margin-bottom: 12px; padding-bottom: 4px; }
.tp-subtabs span {
  color: #9098aa;
  padding-bottom: 4px;
  position: relative;
}
.tp-subtabs .on {
  color: var(--text);
  font-weight: 700;
}
.tp-subtabs .on::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -8px;
  transform: translateX(-50%);
  width: 14px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.tp-eps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.tp-ep {
  aspect-ratio: 1;
  border: 1px solid #eaecf0;
  border-radius: 10px;
  position: relative;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}
.tp-ep .vip {
  position: absolute;
  top: 0; right: 0;
  background: #ffce4a;
  color: #7a4a00;
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 0 8px 0 6px;
  font-weight: 700;
}
.tp-ep.cur {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.tp-ugc-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.tp-ugc .thumb {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.thumb .dur {
  position: absolute; right: 4px; bottom: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
font-size: 9px;
  padding: 1px 4px;
  border-radius: 4px;
}
.thumb.g1 { background: linear-gradient(135deg, #b91c1c, #f97316); }
.thumb.g2 { background: linear-gradient(135deg, #6b7280, #cbd5e1); }
.thumb.g3 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.thumb.g4 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }

/* ========== 二创面板 ========== */
.tp-ugc-list { display: flex; flex-direction: column; gap: 12px; }
.tp-ugc-item {
  display: flex; gap: 10px;
  align-items: center;
}
.tp-ugc-item .thumb {
  width: 90px; aspect-ratio: 16/10;
  border-radius: 8px; flex-shrink: 0;
}
.tp-ugc-item .info { flex: 1; }
.tp-ugc-item .t {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tp-ugc-item .meta {
  font-size: 10.5px;
  color: #9098aa;
}

/* ========== 讨论面板 ========== */
.tp-input {
  display: flex; gap: 8px;
  margin-bottom: 14px;
}
.tp-input .ph {
  flex: 1;
  border: 1px solid #eaecf0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--muted);
  background: #f8f9fb;
}
.tp-input .send-btn {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tp-cmts { display: flex; flex-direction: column; gap: 12px; }
.tp-cmt {
  display: flex; gap: 8px;
}
.tp-cmt .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.cmt-body { flex: 1; }
.cmt-head { font-size: 11.5px; margin-bottom: 4px; }
.cmt-head b { color: var(--text); margin-right: 6px; }
.cmt-head span { color: #b7bac7; font-size: 10px; }
.cmt-txt {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 4px;
}
.cmt-foot {
  display: flex; gap: 12px;
  font-size: 11px;
  color: #9098aa;
}

/* ========== AI 懂剧（单页长滚模式） ========== */
.tp-ai-subtabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  /* 用负 top 抵消 .tp-panel 的 padding-top: 12px，让 sticky 从 panel 内容顶部就吸住，不会先透出上方内容 */
  top: -12px;
  z-index: 3;
  /* 全幅出血 + 用负上外边距抵消面板顶 padding，紧贴主 tab 栏 */
  margin: -12px -14px 0;
  padding: 6px 10px 7px;
  background: #fff;
  border-bottom: 1px solid #eef0f4;
}
.tp-ai-subtabs::-webkit-scrollbar { display: none; }
.tp-ai-subtabs .ai-sub {
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: transparent;
  font-size: 10px;
  line-height: 1.3;
  color: #242730;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.tp-ai-subtabs .ai-sub i {
  font-style: normal;
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px;
  color: #6b7085;
}
.tp-ai-subtabs .ai-sub i svg { width: 100%; height: 100%; display: block; }
.tp-ai-subtabs .ai-sub.on {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}
.tp-ai-subtabs .ai-sub.on i { color: var(--brand-dark); }

.tp-ai-banner {
  position: relative;
  border-radius: 12px;
  margin-top: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #eef4f7;
  box-shadow: 0 6px 18px rgba(30, 34, 60, 0.08);
}
.tp-ai-banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* 单页长滚：5 个板块依次排开，每个板块有独立间距 */
.tp-ai-content { position: relative; }
.ai-section { margin-bottom: 20px; }
.ai-section:last-child { margin-bottom: 0; }

.ai-card {
  border: 1px solid #ecf1ef;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  margin-bottom: 10px;
}
.ai-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.ai-card-head .ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.ac-t { font-size: 14px; font-weight: 700; color: var(--text); }
.ac-s { font-size: 11px; color: #9098aa; margin-top: 2px; }

/* 集数上下文徽标（随外部 Tab 同步） */
.ai-ep-context {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  margin-bottom: 10px;
  background: #eef4ff;
  color: #2563eb;
  border: 1px solid #d6e4ff;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.ai-chips {
  display: flex; align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
}
.ai-chips .lb { color: #6b7085; }
.ai-chips span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f5f7;
  color: #6b7085;
}
.ai-chips .on {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.ai-summary {
  background: #f9fbfa;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.ai-summary.emo { background: #fef7f9; margin-top: 12px; }
.ai-summary.secret { background: #f4f8ff; margin-top: 12px; }
.ai-sum-head {
  font-size: 11px;
  color: #9098aa;
  margin-bottom: 6px;
}
.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-weight: 700;
  margin-bottom: 6px;
}
.ai-tag .ai-tag-ic {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 9px;
  font-style: normal;
}
.ai-tag.main { background: #fee2e2; color: #b91c1c; }
.ai-tag.main .tag-main {
  background: #ef4444;
  color: #fff;
  font-size: 8px;
}
.ai-tag.love { background: #fce7f0; color: #db2777; }
.ai-tag.love .tag-love {
  background: #ec4899;
  color: #fff;
  font-size: 10px;
}
.ai-tag.secret { background: #dbeafe; color: #2563eb; }
.ai-tag.secret .tag-secret {
background: #3b82f6;
  color: #fff;
  font-size: 8px;
}
.ai-summary p {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text);
}

.ai-scenes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.ai-scenes.single { grid-template-columns: 1fr 1fr; }
.ai-scenes.single .ai-scene:first-child { grid-column: 1 / span 1; }
.ai-scene {
  position: relative;
  background: #fff;
  border: 1px solid #eef1f4;
  border-radius: 10px;
  overflow: hidden;
}
.ai-scene .th {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}
.ai-scene .ep-badge {
  position: absolute; top: 6px; left: 6px;
  background: #fef3c7;
  color: #b45309;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.ai-scene .scene-play {
  position: absolute;
  right: 6px;
  top: calc(56% - 8px);
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: #333;
  font-size: 10px;
  display: inline-flex;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.ai-scene .scene-cap {
  padding: 6px 8px 8px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thumb.s1 { background: linear-gradient(135deg, #78716c, #a8a29e); }
.thumb.s2 { background: linear-gradient(135deg, #d4a373, #fde68a); }
.thumb.s3 { background: linear-gradient(135deg, #57534e, #a8a29e); }
.thumb.s4 { background: linear-gradient(135deg, #e5a897, #ffd7c2); }
.thumb.s5 { background: linear-gradient(135deg, #64748b, #cbd5e1); }
.thumb.s6 { background: linear-gradient(135deg, #94a3b8, #e2e8f0); }
.thumb.s7 { background: linear-gradient(135deg, #dc2626, #f97316); }
.thumb.s8 { background: linear-gradient(135deg, #78716c, #d4a373); }
.thumb.s9 { background: linear-gradient(135deg, #3730a3, #6366f1); }

.ai-divider {
  height: 1px;
  background: #eef1f4;
  margin: 14px 0 12px;
}
.ai-chips .range { cursor: pointer; }

/* AI 悬浮球（相对手机屏定位，不随内容滚动） */
.tp-fab {
  position: absolute;
  right: 12px;
  bottom: 24px;
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  z-index: 6;
  background: #d4ecff;
  box-shadow: 0 3px 10px rgba(80, 150, 220, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  pointer-events: auto;
  animation: tpFabPulse 2.5s ease-in-out infinite;
}
.tp-fab img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.tp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.tp-fab:active { transform: scale(0.92); }
@keyframes tpFabPulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
  50% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28); }
}

/* ========== 人物关系图（新版）========== */
.rel-canvas {
  position: relative;
  background: linear-gradient(180deg, #fff8f2 0%, #fff2e6 100%);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.rel-canvas svg {
  width: 100%;
  height: 240px;
  display: block;
  transition: transform 0.3s ease;
}
.rel-canvas .node { cursor: pointer; transition: transform 0.15s; transform-box: fill-box; transform-origin: center; }
.rel-canvas .node:hover { transform: scale(1.12); }
.rel-canvas .node.center:hover { transform: scale(1.06); }
.rel-canvas .node-pos { cursor: pointer; }
.rel-canvas .node image { pointer-events: none; }
.rel-canvas .rel-heart {
  position: absolute;
  top: 44%; left: 47%;
  color: #f43f5e;
  font-size: 16px;
  animation: floatY 2s ease-in-out infinite;
  filter: drop-shadow(0 1px 3px rgba(244,63,94,0.3));
}

/* 缩放控件 */
.rel-zoom {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
}
.z-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #555a72;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: all 0.15s;
}
.z-btn:hover { background: #f4f5f7; color: var(--text); }
.z-btn:active { transform: scale(0.92); }

/* 图例 */
.rel-legend {
  display: flex; flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 10px;
  background: #fdf6ee;
  border-radius: 10px;
  font-size: 10.5px;
  color: #555a72;
  margin-bottom: 12px;
}
.rel-legend b { color: var(--text); margin-right: 4px; }
.rel-legend .ln {
  display: inline-block;
  width: 18px; height: 2px;
  vertical-align: middle;
  margin-right: 3px;
}

/* 角色横向滑动条（小头像胶囊，点击弹详情） */
.rel-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 12px;
  margin-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.rel-strip::-webkit-scrollbar { display: none; }
.rel-chip {
  flex:0 0 auto;
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.15s;
}
.rel-chip:hover { transform: translateY(-2px); }
.rel-chip:active { transform: scale(0.95); }
.rel-chip .chip-av {
  width: 46px; height: 46px;
  border-radius: 50%;
  border-width: 2px;
  border-style: solid;
  object-fit: cover;
  display: block;
  margin: 0;
  flex-shrink: 0;
}
.rel-chip.fac-good .chip-av { border-color: #14b8a6; }
.rel-chip.fac-bad  .chip-av { border-color: #dc2626; }
.rel-chip.fac-mid  .chip-av { border-color: #7c3aed; }
.rel-chip .chip-name {
  font-size: 10.5px;
  color: var(--text);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
.rel-avatar {
  width: 46px; height: 46px;
  border-radius: 8px;
  margin: 0 auto 4px;
  border: 2px solid transparent;
  object-fit: cover;
  display: block;
}
.rel-avatar.sm { width: 32px; height: 32px; border-radius: 6px; margin: 0; flex-shrink: 0; }
.rel-avatar.lg { width: 76px; height: 76px; border-radius: 12px; margin: 0; border-width: 3px; border-style: solid; }
.sheet-head.fac-good .rel-avatar.lg { border-color: #14b8a6; }
.sheet-head.fac-bad  .rel-avatar.lg { border-color: #dc2626; }
.sheet-head.fac-mid  .rel-avatar.lg { border-color: #7c3aed; }

/* 阵营描边 */
.fac-good .rel-avatar { border-color: #14b8a6; }
.fac-bad  .rel-avatar { border-color: #dc2626; }
.fac-mid  .rel-avatar { border-color: #7c3aed; }
.rel-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.rel-actor {
  font-size: 9px;
  color: #9098aa;
}

/* 头像色彩（占位）*/
.c-fcy { background: linear-gradient(135deg, #ef4444, #f472b6); }
.c-xz  { background: linear-gradient(135deg, #1e293b, #475569); }
.c-fcn { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.c-sy  { background: linear-gradient(135deg, #38bdf8, #7dd3fc); }
.c-zdn { background: linear-gradient(135deg, #a78bfa, #c4b5fd); }
.c-wy  { background: linear-gradient(135deg, #78350f, #a16207); }
.c-gsz { background: linear-gradient(135deg, #94a3b8, #e2e8f0); }
.c-sm  { background: linear-gradient(135deg, #7e22ce, #a855f7); }
.c-cqj { background: linear-gradient(135deg, #c084fc, #e9d5ff); }
.c-zds { background: linear-gradient(135deg, #92400e, #d97706); }

/* ========== 详情弹层 ========== */
.rel-sheet {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 6;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.rel-sheet.open { opacity: 1; pointer-events: auto; }
.rel-sheet-inner {
width: 100%;
  max-height: 78%;
  overflow-y: auto;
  background: linear-gradient(180deg, #fff8f2 0%, #fff2e6 100%);
  border-radius: 16px 16px 0 0;
  padding: 12px 14px 16px;
  transform: translateY(20px);
  transition: transform 0.25s;
  scrollbar-width: none;
  position: relative;
}
.rel-sheet.open .rel-sheet-inner { transform: translateY(0); }
.rel-sheet-inner::-webkit-scrollbar { display: none; }
.sheet-handle {
  width: 40px; height: 4px;
  background: #d6d3d1;
  border-radius: 999px;
  margin: 0 auto 10px;
}
.sheet-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #6b7085;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.sheet-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.sheet-h-info { flex: 1; }
.sheet-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
display: flex;
  align-items: center;
  gap: 8px;
}
.sheet-name .fac {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.sheet-name .fac.fac-good { background: #fee2e2; color: #b91c1c; }
.sheet-name .fac.fac-bad  { background: #fef3c7; color: #b45309; }
.sheet-name .fac.fac-mid  { background: #e5e5e5; color: #555; }
.sheet-title {
  font-size: 13px;
  color: #b91c1c;
  margin-top: 2px;
}
.sheet-title.fac-good { color: #b91c1c; }
.sheet-title.fac-bad  { color: #b45309; }
.sheet-title.fac-mid  { color: #7c3aed; }
.sheet-actor {
  font-size: 11px;
  color: #6b7085;
  margin-top: 2px;
}
.sheet-desc {
  background: #fffdf9;
  border: 1px solid #f0e4d3;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 14px;
  font-family: "STSong", "SimSun", serif;
}
.sheet-rel-title {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
}
.sheet-rels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sheet-rel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #f0e4d3;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.sheet-rel:hover { background: #fffdf9; }
.rel-r-name {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}
.rel-r-tag {
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 600;
  background: #fff;
  border: 1px solid currentColor;
}
.t-love  { color: #b91c1c; background: #fef2f2; }
.t-blood { color: #c2410c; background: #fff7ed; }
.t-ally  { color: #2563eb; background: #eff6ff; }
.t-foe   { color: #b91c1c; background: #fef2f2; }
.t-past  { color: #57534e; background: #fafaf9; }

/* ========== 时间线（新版：EP分组 + 事件卡片 + 伏笔追踪）========== */
.ai-timeline {
  position: relative;
  padding-left: 6px;
}
.ai-timeline::before {
  content: "";
  position: absolute;
  top: 10px; bottom: 10px;
  left: 15px;
  width: 2px;
  background: #e8eaf0;
  border-radius: 1px;
}

/* EP 分组 */
.tl-group {
  position: relative;
  margin-bottom: 4px;
}

/* EP 标题行（含圆点，定义在下方带 ::before） */
.ep-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: #dbeafe;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.3px;
}
.ep-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* 事件列表 */
.tl-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 30px;
}

/* 事件卡片 */
.tl-card {
  background: #fff;
  border: 1px solid #f0e4d3;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s, background 0.2s;
  overflow: hidden;
}
.tl-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.tl-card:active { transform: scale(0.98); }

/* 展开状态 */
.tl-card.expanded {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
.tl-card.expanded .tl-arrow {
  transform: rotate(180deg);
}
.tl-card.expanded .tl-detail {
  max-height: 200px;
  padding-top: 0;
  opacity: 1;
}

/* 按标签类型染背景（展开时） */
.tl-card.tag-key.expanded     { background: #fffbeb; border-color: #fde68a; }
.tl-card.tag-turn.expanded    { background: #eff6ff; border-color: #bfdbfe; }
.tl-card.tag-scene.expanded   { background: #fdf2f8; border-color: #fce7f3; }
.tl-card.tag-warm.expanded    { background: #fffbeb; border-color: #fde68a; }
.tl-card.tag-recall.expanded  { background: #f0fdf4; border-color: #bbf7d0; }
.tl-card.tag-conflict.expanded{ background: #fef2f2; border-color: #fecaca; }

/* 事件标签 */
.tl-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 0;
}
.tag-key    { color: #c2410c; background: #fff7ed; }   /* 关键相遇 - 橙 */
.tag-turn   { color: #2563eb; background: #eff6ff; }   /* 转折 - 蓝 */
.tag-scene  { color: #be185d; background: #fdf2f8; }   /* 名场面 - 粉 */
.tag-warm   { color: #c2410c; background: #fff7ed; }   /* 温情 - 橙 */
.tag-recall { color: #16a34a; background: #f0fdf4; }   /* 伏笔回收 - 绿 */
.tag-conflict{ color: #dc2626; background: #fef2f2; }  /* 冲突 - 红 */

/* 卡片内容 */
.tl-card-body {
  padding: 9px 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tl-title { flex: 1; min-width: 0; }
.tl-arrow {
  color: #b7bac7;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.25s ease;
}

/* 详情文字（默认隐藏，展开显示） */
.tl-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.2s;
  padding: 0 12px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #555a72;
}

/* 时间线圆点颜色（通过 tl-group 的 data-dot 或 nth-child） */
.tl-group:nth-child(1) .tl-ep::before { background: #f97316; } /* EP01 橙 */
.tl-group:nth-child(2) .tl-ep::before { background: #3b82f6; } /* EP02 蓝 */
.tl-group:nth-child(3) .tl-ep::before { background: #ec4899; } /* EP03 粉 */
.tl-group:nth-child(4) .tl-ep::before { background: #f97316; } /* EP04 橙 */
.tl-group:nth-child(5) .tl-ep::before { background: #ec4899; } /* EP05 粉 */

.tl-ep {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0 2px 28px;
}
.tl-ep::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px currentColor;
}

/* ========== 伏笔追踪 ========== */
.foreshadow-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f0e4d3;
}
.fs-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.fs-icon {
  color: #3b82f6;
  font-size: 15px;
}
.fs-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.fs-count {
  font-size: 11.5px;
  color: #9098aa;
  margin-left: 4px;
}
.fs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fs-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: box-shadow 0.15s;
}
.fs-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.fs-card.fs-active  { background: #fffbeb; border: 1px solid #fde68a; }
.fs-card.fs-locked  { background: #fafafa; border: 1px solid #eef0f4; }
.fs-card.fs-done    { background: #f0fdf4; border: 1px solid #bbf7d0; }

.fs-icon-wrap {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.fs-info { flex: 1; min-width: 0; }
.fs-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.fs-meta {
  font-size: 10.5px;
  color: #9098aa;
  margin-bottom: 2px;
}
.fs-recall-ep {
  color: #16a34a;
  font-weight: 600;
}
.fs-desc {
  font-size: 11.5px;
  color: #6b7085;
  line-height: 1.45;
}
.fs-status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.tag-active { background: #fff7ed; color: #c2410c; }
.tag-locked { background: #f3f4f6; color: #9ca3af; }
.tag-done   { background: #dcfce7; color: #16a34a; }

.si-search { filter: hue-rotate(-10deg); }
.si-lock   { opacity: 0.55; }
.si-check  { /* no change */ }

/* ========== 世界线（新版：分集地图） ========== */

/* 外部集数 Tab 栏（页面文字区底部） */
.wl-ep-tabs-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e8ecf2;
}
.wl-ep-label {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wl-ep-label::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #3b82f6;
  border-radius: 2px;
}
.wl-ep-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wl-ep-tab {
  padding: 10px 22px;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.wl-ep-tab:hover {
  border-color: #93c5fd;
  color: #3b82f6;
  background: #eff6ff;
}
.wl-ep-tab.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

/* 手机内世界线卡片 */
.wl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wl-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wl-ic { font-size: 26px; }
.wl-t { font-size: 19px; font-weight: 800; color: #1e293b; }
.wl-s { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }

/* 地图区域 */
.wl-map-wrap {
  position: relative;
  background: #faf8f5;
  border-radius: 14px;
  border: 1.5px solid #efe9e3;
  overflow: hidden;
}
.wl-map-svg {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}
.wl-node { cursor: default; }
.wl-node text { pointer-events: none; user-select: none; }

/* 缩放按钮 */
.wl-zoom-btns {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wl-zb {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  color: #475569;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.wl-zb:hover { background: #fff; border-color:#cbd5e1; color:#1e293b; }
.wl-zb:active { transform: scale(0.92); }

/* 已解锁地点 */
.wl-locs { }
.wl-locs-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
}
.wl-pin { font-size: 14px; }
.wl-locs-num { color: #9ca3af; font-weight: 500; margin-left: 2px; }
.wl-locs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wl-loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  transition: all 0.15s ease;
}
.wl-loc-chip:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.wl-loc-icon { font-size: 15px; }
.wl-loc-name { color: #374151; font-weight: 600; white-space: nowrap; }
.wl-loc-count { font-weight: 700; font-size: 12px; min-width: 14px; text-align: right; }

/* 响应式：世界线 Tab */
@media (max-width: 1024px) {
  .wl-ep-tab { padding: 8px 18px; font-size: 13px; }
}
@media (max-width: 640px) {
  .wl-ep-tabs { gap: 6px; }
  .wl-ep-tab { padding: 7px 14px; font-size: 12px; }
}
.ai-tip {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* FAQ */
.ai-faq { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px dashed #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  overflow: hidden;
}
.faq-item:hover { border-color: #c7d2fe; }
.faq-item:active { transform: scale(0.98); }

.faq-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.faq-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #c084fc;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-q-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.faq-arrow {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.25s ease;
}

/* 展开态 */
.faq-item.expanded { border-color: #c7d2fe; border-style: solid; }
.faq-item.expanded .faq-arrow { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #475569;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.expanded .faq-answer {
  max-height: 400px;
  padding: 0 16px 16px;
}
.ai-input {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f4f5f7;
  font-size: 11.5px;
  color: var(--muted);
}
.ai-input .send {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

/* ========== AI 懂剧助手（手机内半层） ========== */

/* 手机内 半层聊天窗（覆盖手机屏幕下半部分） */
.tp-chat {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.tp-chat.open {
  opacity: 1;
  pointer-events: auto;
}

/* 聊天卡片（自底部滑入的半层） */
.ai-assist-card {
  width: 100%;
  height: 60%;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.tp-chat.open .ai-assist-card {
  transform: translateY(0);
}

/* 头部 */
.ai-assist-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f0f2f5;
  flex-shrink: 0;
}
.ai-assist-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1c2c;
}
.ai-assist-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.ai-assist-close {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #f4f5f7;
  color: #6b7085;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.ai-assist-close:hover { background: #eef0f4; color: #333; }

/* 内容区（可滚动） */
.ai-assist-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  scrollbar-width: none;
}
.ai-assist-body::-webkit-scrollbar { display: none; }

/* 欢迎消息 */
.ai-assist-welcome {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ai-assist-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.ai-assist-avatar img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}
.ai-assist-msg {
  background: #f9fafb;
  border: 1px solid #f0f2f5;
  border-radius: 4px 16px 16px 16px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  max-width: 260px;
}
.ai-assist-note {
  margin-top: 8px;
  font-size: 12px;
  color: #ef4444;
  font-weight: 600;
}

/* 快捷问题按钮 */
.ai-assist-suggests {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.ai-assist-sug {
  display: inline-block;
  align-self: flex-start;
  padding: 9px 16px;
  border: 1.5px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  line-height: 1.35;
  font-family: inherit;
}
.ai-assist-sug:hover {
  background: #dcfce7;
  border-color: #86efac;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.15);
}
.ai-assist-sug:active { transform: scale(0.97); }

/* AI 回复气泡 */
.ai-assist-reply {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  animation: aiReplyIn 0.3s ease-out;
}
@keyframes aiReplyIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-assist-reply .ai-assist-msg {
  background: #fff;
  border-color: #e5e7eb;
}
/* 流式打字光标 */
.ai-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  margin-left: 2px;
  background: #14b8a6;
  vertical-align: -2px;
  animation: aiCursorBlink 0.9s step-end infinite;
}
@keyframes aiCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 用户提问气泡 */
.ai-assist-user-q {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  animation: aiUserIn 0.25s ease-out;
}
@keyframes aiUserIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ai-assist-user-bubble {
  background: linear-gradient(135deg, #14b8a6, #0f9d8f);
  color: #fff;
  padding: 10px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  max-width: 240px;
  box-shadow: 0 3px 10px rgba(20, 184, 166, 0.25);
}

/* 底部输入栏 */
.ai-assist-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid #f0f2f5;
  background: #fafbfc;
  flex-shrink: 0;
}
.ai-assist-input {
  flex: 1;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: #1a1c2c;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}
.ai-assist-input::placeholder { color: #b7bac7; }
.ai-assist-input:focus { border-color: #14b8a6; }
.ai-assist-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #e5e7eb;
  color: #6b7085;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.ai-assist-send:hover { background: #14b8a6; color: #fff; }
.ai-assist-send:active { transform: scale(0.92); }

/* 响应式：手机内半层聊天窗 */
@media (max-width: 480px) {
  .ai-assist-card { height: 62%; }
  .tp-fab { right: 14px; bottom: 20px; width: 38px; height: 38px; }
}
@media (max-width: 1024px) {
  .page-inner { flex-direction: column; gap: 32px; padding: 40px 32px; }
  .page-text { max-width: 100%; text-align: left; }
  .page-title { font-size: 34px; }
  .phone { width: 320px; height: 660px; }
  .tp-video { height: 180px; }
}
@media (max-width: 640px) {
  :root { --nav-w: 60px; }
  .side-nav { padding: 40px 12px 24px 20px; }
  .side-nav li { font-size: 0; padding: 18px 0 18px 24px; }
  .side-nav li.active { font-size: 12px; }
  .hint { display: none; }
  .page-title { font-size: 28px; }
  .phone { width: 270px; height: 558px; border-radius: 34px; }
  .phone-screen { border-radius: 28px; }
}
