    * { box-sizing: border-box; margin: 0; padding: 0; }
    body, html {
      width: 100%; height: 100%;
      background-color: #05070d;
      color: #f3f4f6;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
      overflow: hidden;
      overscroll-behavior: none;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      -webkit-user-select: none;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    /* Ambient background backdrop for PC viewports */
    .ambient-backdrop {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: radial-gradient(circle at 50% 30%, #1e1538 0%, #090c17 60%, #03050a 100%);
      z-index: 0;
      pointer-events: none;
    }

    /* 9:16 Main Stage Viewport */
    #stage {
      position: relative;
      width: 100%;
      height: 100%;
      max-height: 100vh;
      max-height: 100dvh;
      aspect-ratio: 9 / 16;
      max-width: calc(100vh * 9 / 16);
      max-width: calc(100dvh * 9 / 16);
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
      box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(236, 72, 153, 0.15);
      border-radius: 28px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      /* 竖版 9:16 HUD 纵向堆叠：--topbar-h / --dlg-h / --bottom-bar-h 由 layoutHud() 实测回填，
         对白框、抉择弹窗、滑动提示条从此跟随顶栏/底栏真实高度，不再用电脑版写死的 px。*/
      --gutter: 12px;
      --safe-top: env(safe-area-inset-top, 0px);
      --topbar-top: max(10px, calc(var(--safe-top) + 6px));
      --topbar-h: 62px;
      --bottom-bar-h: 60px;
      --text-hud-drag-y: 0px;
      z-index: 1;
    }

    /* Mobile devices fill 100% of the screen */
    @media (max-width: 600px), (max-aspect-ratio: 9/15) {
      #stage {
        width: 100vw;
        height: 100dvh;
        max-width: none;
        max-height: none;
        aspect-ratio: auto;
        border-radius: 0;
        border: none;
        box-shadow: none;
      }
    }

    /* ── TikTok Video Card Pool (Hardware Accelerated) ── */
    #video-slider {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow: hidden;
      z-index: 1;
      background: #080b12;
    }

    .video-card {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      overflow: hidden;
      will-change: transform;
      pointer-events: none;
      /* 去主图后，视频就绪前的短暂空窗由这里兜底（与 App 深色底一致，
         避免出现透明/白闪）。见 syncCharacterCarousel / 静态卡片注释。 */
      background: #0d0b0a;
      /* 🔴 关掉浏览器手势：否则在角色身上纵向拖拽会被判成 scroll → pointercancel
         → 拖拽衣领永远收不到 move（2026-09-17 实测踩过）。只加在卡片/视频上，
         不能加在 #stage 上：touch-action 是祖先求交，会连带禁掉下拉菜单的滚动。 */
      touch-action: none;
      transform: translateY(100%);
      transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .video-card.active {
      transform: translateY(0);
      z-index: 3;
      pointer-events: auto;
    }

    .video-card.above {
      transform: translateY(-100%);
      z-index: 2;
    }

    .video-card.below {
      transform: translateY(100%);
      z-index: 2;
    }

    .companion-poster {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      object-position: center 20%;
      z-index: 0;
      pointer-events: none;
      -webkit-backface-visibility: hidden;
    }

    /* ── v72 卡片加载占位层 ──────────────────────────────────────────────
       去主图后，有待机视频的槽位在首帧到达前是纯黑（.video-card 底色 #0d0b0a）。
       在 iPhone 微信 / 移动网络下这就是「点进去一块黑」——被反馈成「卡死」。
       做法：把**同一角色**的缩略图垫在视频下方（z-index 0 < 视频 1），
       叠一层暗幕 + 三拍呼吸点，让等待读起来是「正在加载」而不是「图放错了」；
       视频 canplay/loadeddata 后占位层 0.45s 淡出（见 armCardReveal）。
       🔴 只在「当前角色 + 预热环内」才给 src —— 12 张缩略图合计 867KB
          （poster.jpg 是 5080KB，大 5.9 倍），不进环就不下，否则省下来的
          视频流量又被占位图吃回去。缩略图由 assets/bg-images/<asset>/thumb.jpg
          提供（ffmpeg -vf scale=540:-2 -q:v 4），缺失时回退 poster.jpg。 */
    .card-poster {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      object-position: center 20%;
      z-index: 0;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.45s ease;
      -webkit-backface-visibility: hidden;
    }
    .video-card.showing-poster .card-poster { opacity: 1; }

    /* 加载暗幕：只压四角与顶部，人物不被糊掉，只是「还没现形」 */
    .video-card::after {
      content: '';
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.4s ease;
      background:
        radial-gradient(130% 92% at 50% 68%, rgba(8, 11, 18, 0) 36%, rgba(8, 11, 18, 0.60) 100%),
        linear-gradient(to bottom, rgba(8, 11, 18, 0.30) 0%, rgba(8, 11, 18, 0) 40%);
    }
    .video-card.is-loading-video::after { opacity: 1; }

    /* [static-card-v1] 无待机视频的卡（只出立绘）永远不会有首帧，
       暗幕与呼吸点必须永久压掉，否则整卡停在「加载中」并压黑画面。
       JS 侧在 armCardReveal 里已不再挂这两个类，这里再兜一层防回归。 */
    .video-card.static-card::after { opacity: 0 !important; }
    .video-card.static-card .card-load-dots { opacity: 0 !important; }

    /* 三拍呼吸点：存在感压到最低，且只在真的等了一下（>600ms）之后才亮 */
    .card-load-dots {
      position: absolute;
      left: 50%;
      /* 46%：人物胸口空白区。原 22% 会压在「角色名 · 年龄 / 台词」上（真机实测
         elementFromPoint(196,664) = DIV.dialogue-box），又看不清又搅浑 UI。 */
      bottom: 46%;
      transform: translateX(-50%);
      z-index: 3;
      display: flex;
      gap: 6px;
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
    }
    .video-card.is-loading-video.card-slow .card-load-dots { opacity: 1; }
    .card-load-dots i {
      display: block;
      width: 5px; height: 5px;
      border-radius: 50%;
      background: rgba(241, 229, 252, 0.88);
      /* 很淡的暗描边：画面明暗交错时也能辨认，又不至于变成显眼的 UI */
      box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
      animation: cardDotBreath 1.25s infinite ease-in-out;
    }
    .card-load-dots i:nth-child(2) { animation-delay: 0.16s; }
    .card-load-dots i:nth-child(3) { animation-delay: 0.32s; }
    @keyframes cardDotBreath {
      0%, 100% { opacity: 0.22; transform: translateY(0); }
      50%      { opacity: 0.95; transform: translateY(-3px); }
    }

    .companion-video {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      object-position: center 20%;
      touch-action: none;   /* 同上：角色身上的纵向拖拽不能被浏览器当滚动收走 */
      filter: drop-shadow(0 0 24px rgba(0,0,0,0.6));
      z-index: 1;
      opacity: 0;
      transition: opacity 0.35s ease;
      -webkit-backface-visibility: hidden;
    }

    .companion-video.is-ready {
      opacity: 1;
    }

    /* ── 动作切片层（拖拽衣领等）：叠在待机片之上，靠 opacity 交叉溶解进出 ──
       量测依据（2026-09-17）：动作片首帧 vs 待机片帧2 均差 3.28 / 中位 2.00，
       差异全部落在人物轮廓的次像素错位上（>32 灰度的像素仅 0.40%），末帧同理。
       所以 220ms 淡入 + 260ms 淡出就足以完全遮住接缝，不需要跳帧对齐。 */
    .action-video {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      object-position: center 20%;
      z-index: 10;
      /* iOS Safari 对 opacity:0 的 <video> 不解码，readyState 永远停在 0。
         0.01 肉眼仍不可见，但会进合成器，硬解才会出帧。 */
      opacity: 0.01;
      pointer-events: none;
      transition: opacity 0.22s ease-out;
      -webkit-backface-visibility: hidden;
    }
    .action-video.is-playing {
      opacity: 1;
    }


    /* ── Blob Cache Progress Overlay (adapted from ai-mate916.html) ── */
    .hostess-cache {
      position: absolute;
      inset: 0;
      z-index: 50;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(8, 11, 18, 0.45);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      transition: opacity 0.35s ease, visibility 0.35s ease;
      pointer-events: auto;
    }

    .hostess-cache.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .hostess-cache-card {
      min-width: min(78%, 290px);
      padding: 1.25rem 1.4rem 1.15rem;
      border-radius: 22px;
      border: 1.5px solid rgba(255, 182, 193, 0.35);
      background: linear-gradient(180deg, rgba(28, 16, 32, 0.94), rgba(12, 10, 20, 0.96));
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(236, 72, 153, 0.2);
      text-align: center;
      color: #fff0f5;
    }

    .hostess-cache-title {
      font-size: 19px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
      animation: hostess-cache-pulse 1.2s ease-in-out infinite;
    }

    @keyframes hostess-cache-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.85; transform: scale(1.03); }
    }

    .hostess-cache-bar {
      margin: 0.85rem auto 0.55rem;
      height: 8px;
      width: 100%;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.15);
    }

    .hostess-cache-bar i {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #ec4899, #f43f5e);
      box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
      transition: width 150ms linear;
    }

    .hostess-cache-pct {
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 0.08em;
      color: #fbcfe8;
    }

    /* ── Right-Side TikTok Reels Indicator ── */
    #reel-indicators {
      position: absolute;
      right: 8px;
      top: 48%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0;
      z-index: 20;
      background: rgba(15, 23, 42, 0.5);
      padding: 8px 2px;
      border-radius: 20px;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }
    /* 竖版：原来只有 7x7px，手指根本点不中；改成 34x34px 触控盒，视觉圆点仍走 ::after */
    .indicator-dot {
      touch-action: manipulation;
      width: 34px;
      height: 34px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: transparent;
      border-radius: 50%;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .indicator-dot::after {
      content: '';
      display: block;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.35);
      transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .indicator-dot:hover::after,
    .indicator-dot:active::after {
      background: rgba(255, 255, 255, 0.85);
      transform: scale(1.2);
    }
    .indicator-dot.active::after {
      height: 20px;
      border-radius: 10px;
      background: linear-gradient(180deg, #f472b6 0%, #ec4899 100%);
      box-shadow: 0 0 10px rgba(236, 72, 153, 0.9);
      transform: none;
    }

    /* ── Swipe Toast Notification ── */
    #swipe-toast {
      position: absolute;
      top: calc(var(--topbar-top) + var(--topbar-h) + 10px);
      bottom: auto;
      left: 50%;
      transform: translateX(-50%) translateY(12px);
      background: rgba(15, 23, 42, 0.88);
      border: 1px solid rgba(236, 72, 153, 0.55);
      color: #fff;
      font-size: 13px;
      font-weight: 500;
      padding: 7px 16px;
      border-radius: 20px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(236, 72, 153, 0.35);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      display: flex;
      align-items: center;
      gap: 7px;
      opacity: 0;
      pointer-events: none;
      z-index: 60;
      transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    #swipe-toast.visible {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    #swipe-toast .toast-arrow {
      color: #f472b6;
      font-weight: 700;
      font-size: 14px;
    }

    /* ── Initial TikTok-style Swipe Gesture Guide ── */
    #swipe-guide {
      position: absolute;
      top: 42%;
      left: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      z-index: 30;
      pointer-events: none;
      opacity: 0;
      animation: swipeGuideIn 3.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }
    .swipe-guide-icon {
      font-size: 32px;
      animation: swipeHand 1.2s infinite ease-in-out;
      filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.8));
    }
    .swipe-guide-text {
      font-size: 12px;
      color: #f3f4f6;
      background: rgba(0, 0, 0, 0.65);
      padding: 4px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      white-space: nowrap;
      text-shadow: 0 1px 3px rgba(0,0,0,0.8);
      letter-spacing: 0.5px;
    }
    @keyframes swipeHand {
      0%, 100% { transform: translateY(8px); opacity: 0.8; }
      50% { transform: translateY(-12px); opacity: 1; }
    }
    @keyframes swipeGuideIn {
      0% { opacity: 0; transform: translate(-50%, -38%); }
      15% { opacity: 1; transform: translate(-50%, -50%); }
      75% { opacity: 1; transform: translate(-50%, -50%); }
      100% { opacity: 0; transform: translate(-50%, -62%); pointer-events: none; }
    }

    /* ── [discover-touch-to-inner-v1] 發現頁已徹底停用身體碰觸熱區（遷移至內頁微動影片頁），確保全屏上下滑零阻塞 ── */
    #stage:not(.chat-mode) #video-slider {
      touch-action: none;
    }
    #hitbox-layer,
    .hitbox {
      display: none !important;
      pointer-events: none !important;
    }

    /* 触摸不倾斜不形变，保持平稳静候视频切片承接 */
    .video-card.squishing,
    .video-card.spring-back,
    .video-card.head-stroking {
      /* 保持原始画面稳定，避免与后续视频切片跳变冲突 */
    }

    /* 脸颊红晕扩散涟漪 (Cheek Blush Ripple) */
    .blush-ripple {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
      z-index: 46;
      width: 90px; height: 90px;
      background: radial-gradient(circle, rgba(244, 63, 94, 0.5) 0%, rgba(236, 72, 153, 0.2) 45%, rgba(236, 72, 153, 0) 70%);
      transform: translate(-50%, -50%) scale(0.2);
      animation: blushExpand 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }
    @keyframes blushExpand {
      0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.9; }
      100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
    }

    /* 抚摸发丝星芒粒子 (Hair Sparkles) */
    .hair-sparkle {
      position: absolute;
      pointer-events: none;
      z-index: 47;
      width: 14px; height: 14px;
      border-radius: 50%;
      background: radial-gradient(circle, #ffffff 15%, #f472b6 60%, rgba(244, 114, 182, 0) 100%);
      box-shadow: 0 0 10px #f472b6;
      transform: translate(-50%, -50%) scale(0.6);
      animation: hairSparkleFade 0.55s ease-out forwards;
    }
    @keyframes hairSparkleFade {
      0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
      100% { transform: translate(-50%, -50%) translateY(-22px) scale(0.15); opacity: 0; }
    }

    /* 摸头实时蓄力光环 HUD (Pet Progress HUD) */
    #pet-hud {
      position: absolute;
      top: 0; left: 0;
      width: 58px; height: 58px;
      pointer-events: none;
      z-index: 52;
      display: none;
      transform: translate(-50%, -50%);
      filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.85));
      transition: opacity 0.2s ease;
    }
    #pet-hud svg {
      width: 100%; height: 100%;
      transform: rotate(-90deg);
    }
    #pet-hud .ring-bg {
      fill: none;
      stroke: rgba(255, 255, 255, 0.25);
      stroke-width: 4;
    }
    #pet-hud .ring-fill {
      fill: none;
      stroke: url(#pet-grad);
      stroke-width: 4.5;
      stroke-linecap: round;
      stroke-dasharray: 157;
      stroke-dashoffset: 157;
      transition: stroke-dashoffset 0.05s linear;
    }
    #pet-hud .pet-heart-icon {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      font-size: 16px;
      color: #f472b6;
      animation: pulseMini 0.8s infinite alternate ease-in-out;
    }
    @keyframes pulseMini {
      0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.8; }
      100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    }

    /* 心跳共鸣全屏暗涌微光 (Heartbeat Vignette) */
    #heartbeat-vignette {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 20;
      box-shadow: inset 0 0 60px rgba(244, 63, 94, 0.35);
      opacity: 0;
      transition: opacity 0.25s ease;
    }
    #heartbeat-vignette.active {
      opacity: 1;
      animation: heartbeatPulse 0.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
    }
    @keyframes heartbeatPulse {
      0%, 100% { opacity: 0.2; transform: scale(1); }
      30% { opacity: 0.7; transform: scale(1.008); }
      50% { opacity: 0.35; transform: scale(1.002); }
      70% { opacity: 0.65; transform: scale(1.006); }
    }

    /* 手势指引模拟手掌 (Simulated Hand Avatar for Chip Guide) */
    #sim-hand-cursor {
      position: absolute;
      font-size: 32px;
      pointer-events: none;
      z-index: 55;
      display: none;
      filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.9));
      transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    /* Floating Heart Particles */
    .heart-fx, .heart-particle {
      position: absolute;
      pointer-events: none;
      z-index: 50;
      font-size: 22px;
      color: #f43f5e;
      text-shadow: 0 0 10px rgba(244, 63, 94, 0.8);
      animation: floatUp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }
    @keyframes floatUp {
      0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
      100% { transform: translate(var(--dx), var(--dy)) scale(1.4); opacity: 0; }
    }

    /* ── Top Floating Action Group (Gallery + Settings) ── */
    .top-action-group {
      position: absolute;
      top: var(--topbar-top);
      right: var(--gutter);
      display: flex;
      align-items: center;
      gap: 8px;
      z-index: 26;
      transition: opacity 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
    }
    .top-action-group.hidden {
      opacity: 0;
      pointer-events: none;
      transform: scale(0.75);
    }
    .top-settings-btn, .top-gallery-btn {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: rgba(15, 23, 42, 0.78);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border: 1px solid rgba(255, 255, 255, 0.18);
      color: #f1f5f9;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
      cursor: pointer;
      position: relative;
      transition: all 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      -webkit-user-select: none;
    }
    .top-settings-btn:hover, .top-settings-btn:active,
    .top-gallery-btn:hover, .top-gallery-btn:active {
      background: rgba(236, 72, 153, 0.28);
      border-color: rgba(236, 72, 153, 0.55);
      transform: scale(0.94);
    }
    .top-gallery-badge {
      position: absolute;
      top: 2px;
      right: 2px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #ec4899;
      box-shadow: 0 0 8px #ec4899;
    }

    /* ── Bond Gallery / Polaroids Modal ── */
    .gallery-modal {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.78);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      display: flex;
      justify-content: center;
      align-items: flex-end;
      z-index: 120;
      animation: fadeIn 0.25s ease-out;
    }
    .gallery-sheet {
      width: 100%;
      max-height: 82vh;
      background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
      border-top: 1px solid rgba(251, 191, 36, 0.35);
      border-radius: 24px 24px 0 0;
      padding: 16px 16px 28px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.8);
      animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      overflow-y: auto;
      scrollbar-width: none;
    }
    .gallery-sheet::-webkit-scrollbar { display: none; }
    @keyframes sheetUp {
      0% { transform: translateY(100%); }
      100% { transform: translateY(0); }
    }
    .gallery-sheet-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .gallery-pill {
      display: inline-block;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 1px;
      color: #fbbf24;
      background: rgba(251, 191, 36, 0.15);
      padding: 3px 8px;
      border-radius: 6px;
      margin-bottom: 4px;
    }
    .gallery-title {
      font-size: 15px;
      font-weight: 700;
      color: #f8fafc;
    }
    .gallery-subtitle {
      font-size: 11.5px;
      color: #94a3b8;
      margin-top: 2px;
    }
    .gallery-sheet-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #cbd5e1;
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }
    .gallery-sheet-close:hover {
      background: rgba(255, 255, 255, 0.16);
      color: #fff;
    }
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      padding-top: 4px;
    }
    .polaroid-card {
      background: #fdfbf7;
      border-radius: 12px;
      padding: 8px 8px 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
      display: flex;
      flex-direction: column;
      gap: 6px;
      color: #1e293b;
      position: relative;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      border: 1px solid rgba(0, 0, 0, 0.06);
    }
    .polaroid-card.locked {
      background: rgba(30, 41, 59, 0.65);
      border: 1px dashed rgba(251, 191, 36, 0.3);
      color: #94a3b8;
      box-shadow: none;
    }
    .polaroid-thumb-box {
      width: 100%;
      aspect-ratio: 1 / 1;
      border-radius: 8px;
      overflow: hidden;
      background: #0f172a;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .polaroid-thumb-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .polaroid-locked-overlay {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.78);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 8px;
      text-align: center;
    }
    .polaroid-locked-icon {
      font-size: 22px;
    }
    .polaroid-locked-hint {
      font-size: 10.5px;
      color: #cbd5e1;
      line-height: 1.3;
    }
    .polaroid-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 9.5px;
      font-weight: 700;
      color: #64748b;
      letter-spacing: 0.5px;
    }
    .polaroid-title {
      font-size: 12px;
      font-weight: 700;
      color: #0f172a;
      line-height: 1.3;
    }
    .polaroid-card.locked .polaroid-title {
      color: #cbd5e1;
    }
    .polaroid-note {
      font-size: 10.5px;
      color: #475569;
      line-height: 1.4;
      font-style: italic;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      min-height: 42px;
    }
    .polaroid-whisper-btn {
      margin-top: 4px;
      background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(236, 72, 153, 0.18));
      border: 1px solid rgba(251, 191, 36, 0.4);
      color: #b45309;
      padding: 6px 10px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      transition: all 0.2s;
    }
    .polaroid-whisper-btn:hover, .polaroid-whisper-btn:active {
      background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(236, 72, 153, 0.35));
      transform: scale(0.97);
    }

    /* ── Top HUD Bar (Mobile-Streamlined 2-Row Layout, Pop-out on Trigger) ── */
    .top-bar {
      position: absolute;
      top: var(--topbar-top);
      left: var(--gutter); right: var(--gutter);
      display: flex;
      flex-direction: column;
      gap: 5px;
      z-index: 25;
      background: rgba(15, 23, 42, 0.88);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 18px;
      padding: 6px 10px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
      opacity: 0;
      pointer-events: none;
      transform: translateY(-14px);
      transform-origin: top right;
      transition: opacity 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
    }
    .top-bar.active {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
      z-index: 28;
    }
    .top-close-btn {
      font-size: 13px !important;
      font-weight: 700 !important;
      color: #94a3b8 !important;
      min-width: 28px !important;
      min-height: 28px !important;
      padding: 0 !important;
      border-radius: 50% !important;
      background: rgba(255, 255, 255, 0.08) !important;
      border: 1px solid rgba(255, 255, 255, 0.16) !important;
      transition: all 0.2s ease !important;
    }
    .top-close-btn:hover, .top-close-btn:active {
      color: #fff !important;
      background: rgba(239, 68, 68, 0.35) !important;
      border-color: rgba(239, 68, 68, 0.65) !important;
      transform: scale(0.94) !important;
    }
    .top-bar-main-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      min-width: 0;
    }
    .character-name-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 14px;
      padding: 4px 10px 4px 8px;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
      -webkit-tap-highlight-color: transparent;
      color: #fff;
      max-width: 240px;
    }
    .character-name-btn:hover, .character-name-btn:active {
      background: rgba(236, 72, 153, 0.22);
      border-color: rgba(236, 72, 153, 0.5);
      transform: scale(0.98);
    }
    .brand-avatar {
      font-size: 15px;
      line-height: 1;
      filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.6));
      flex-shrink: 0;
    }
    .brand-name {
      font-weight: 700;
      font-size: 13.5px;
      color: #fff;
      letter-spacing: 0.3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .top-bar-sub-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      width: 100%;
      min-width: 0;
    }
    .chapter-pill {
      font-size: 11px;
      font-weight: 600;
      color: #fde047;
      background: rgba(234, 179, 8, 0.16);
      border: 1px solid rgba(234, 179, 8, 0.32);
      padding: 2px 8px;
      border-radius: 9px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 58%;
      flex: 0 1 auto;
    }
    .favor-mini-row {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }
    .favor-track {
      width: 48px;
      height: 5px;
      background: rgba(255, 255, 255, 0.14);
      border-radius: 3px;
      overflow: hidden;
    }
    .favor-fill {
      height: 100%;
      width: 10%;
      background: linear-gradient(90deg, #ec4899, #f43f5e);
      border-radius: 3px;
      box-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
      transition: width 0.4s ease;
    }
    .favor-num {
      font-size: 11px;
      color: #cbd5e1;
      font-weight: 600;
      white-space: nowrap;
    }
    .favor-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 1px 5px;
      border-radius: 6px;
      background: rgba(236, 72, 153, 0.2);
      color: #f472b6;
      border: 1px solid rgba(236, 72, 153, 0.35);
      white-space: nowrap;
    }

    /* Top HUD Right Action Controls */
    .hud-right {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    /* ── Dropdown Menus (Secondary Levels) ── */
    .dropdown-wrapper {
      position: relative;
    }
    .dropdown-btn {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.18);
      color: #f1f5f9;
      padding: 6px 10px;
      min-height: 32px;
      border-radius: 14px;
      font-size: 12.5px;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      backdrop-filter: blur(10px);
      transition: all 0.2s;
      -webkit-tap-highlight-color: transparent;
    }
    .dropdown-btn:hover, .dropdown-btn:active {
      background: rgba(236, 72, 153, 0.25);
      border-color: rgba(236, 72, 153, 0.5);
    }
    .dropdown-btn.icon-btn {
      padding: 5px 8px;
      min-height: 30px;
      min-width: 32px;
      font-size: 13.5px;
      justify-content: center;
    }
    .arrow-icon {
      font-size: 10px;
      color: #94a3b8;
      transition: transform 0.2s;
    }
    .dropdown-wrapper.open .arrow-icon {
      transform: rotate(180deg);
    }
    .dropdown-menu {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      min-width: 186px;
      max-height: min(40vh, 300px);
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      background: rgba(15, 23, 42, 0.96);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(236, 72, 153, 0.35);
      border-radius: 16px;
      padding: 6px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
      display: none;
      flex-direction: column;
      gap: 4px;
      z-index: 100;
      animation: menuPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .dropdown-menu::-webkit-scrollbar {
      width: 4px;
    }
    .dropdown-menu::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 4px;
    }
    .dropdown-menu.dropdown-menu-left {
      left: 0;
      right: auto;
      min-width: 220px;
      max-width: calc(100vw - 32px);
    }
    .dropdown-menu.dropdown-menu-right {
      right: 0;
      left: auto;
    }
    .dropdown-menu.active {
      display: flex;
    }
    @keyframes menuPop {
      0% { opacity: 0; transform: translateY(-8px) scale(0.96); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .dropdown-title {
      font-size: 10.5px;
      color: #94a3b8;
      padding: 6px 10px 4px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      font-weight: 600;
    }
    .dropdown-list {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .dropdown-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 10px 12px;
      min-height: 42px;
      border-radius: 10px;
      font-size: 12.5px;
      color: #e2e8f0;
      cursor: pointer;
      transition: background 0.15s;
      -webkit-tap-highlight-color: transparent;
    }
    .dropdown-item:hover, .dropdown-item:active {
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
    }
    .dropdown-item.active {
      background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3));
      color: #f472b6;
      font-weight: 600;
    }
    .active-check {
      font-size: 12px;
      color: #ec4899;
      font-weight: bold;
    }
    .dropdown-divider {
      height: 1px;
      background: rgba(255, 255, 255, 0.08);
      margin: 4px 6px;
    }
    .text-danger {
      color: #f87171 !important;
    }

    /* ── 角色音色菜单（按性别过滤）+ 切换提示 ── */
    #voice-menu {
      min-width: 228px;
    }
    .engine-tab-group {
      display: flex;
      gap: 5px;
      padding: 3px;
      background: rgba(0, 0, 0, 0.45);
      border-radius: 11px;
      margin: 4px 4px 6px;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .engine-tab-btn {
      flex: 1;
      padding: 5px 8px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: #94a3b8;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      -webkit-tap-highlight-color: transparent;
    }
    .engine-tab-btn:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.08);
    }
    .engine-tab-btn.active {
      background: linear-gradient(135deg, rgba(236, 72, 153, 0.32), rgba(244, 63, 94, 0.42));
      border-color: rgba(236, 72, 153, 0.65);
      color: #fff;
      box-shadow: 0 2px 8px rgba(244, 63, 94, 0.35);
    }
    #top-reset-memory-btn {
      font-size: 13.5px;
      transition: all 0.2s ease;
    }
    #top-reset-memory-btn:hover, #top-reset-memory-btn:active {
      background: rgba(239, 68, 68, 0.26);
      border-color: rgba(239, 68, 68, 0.55);
      color: #fca5a5;
      transform: scale(0.95);
    }
    #top-tts-toggle-btn.is-muted {
      opacity: 0.65;
      background: rgba(239, 68, 68, 0.18);
      border-color: rgba(239, 68, 68, 0.45);
      color: #fca5a5;
    }
    #top-tts-icon {
      font-size: 13.5px;
      line-height: 1;
    }
    .voice-gender-note {
      font-size: 10.5px;
      color: #f9a8d4;
      padding: 0 8px 6px;
      opacity: 0.85;
      line-height: 1.4;
    }
    .voice-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
      text-align: left;
      min-width: 0;
    }
    .voice-name {
      font-weight: 600;
      font-size: 12.5px;
    }
    .voice-desc {
      font-size: 10.5px;
      opacity: 0.62;
    }
    .voice-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }
    .voice-preview-btn {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      border: 1px solid rgba(236, 72, 153, 0.45);
      background: rgba(236, 72, 153, 0.16);
      color: #f9a8d4;
      font-size: 10px;
      line-height: 1;
      padding: 0;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      -webkit-tap-highlight-color: transparent;
      transition: all 0.15s;
    }
    .voice-preview-btn:hover, .voice-preview-btn:active {
      background: rgba(236, 72, 153, 0.42);
      color: #fff;
    }
    #voice-menu {
      min-width: 236px;
      max-height: 62vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }
    .voice-toast {
      position: fixed;
      left: 50%;
      bottom: 14%;
      transform: translate(-50%, 12px);
      background: rgba(15, 23, 42, 0.94);
      border: 1px solid rgba(236, 72, 153, 0.45);
      color: #fce7f3;
      font-size: 13px;
      font-weight: 500;
      padding: 9px 18px;
      border-radius: 999px;
      z-index: 9999;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s, transform 0.25s;
      max-width: 86vw;
      text-align: center;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    }
    .voice-toast.show {
      opacity: 1;
      transform: translate(-50%, 0);
    }
    .voice-toast.positive {
      border-color: rgba(244, 114, 182, 0.7);
      color: #fce7f3;
      box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
    }
    .voice-toast.neutral {
      border-color: rgba(148, 163, 184, 0.55);
      color: #e2e8f0;
      box-shadow: 0 8px 24px rgba(100, 116, 139, 0.25);
    }
    .voice-toast.warning {
      border-color: rgba(239, 68, 68, 0.75);
      color: #fecaca;
      box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
    }

    @media (max-width: 430px) {
      .hud-right { gap: 5px; }
      .character-name-btn { max-width: 200px; }
    }
    /* 好感度徽章不换行 */
    .favor-badge {
      white-space: nowrap;
    }

    /* ── Draggable Text HUD Layer (Default Docked at Bottom) ── */
    .text-hud-layer {
      position: absolute;
      left: var(--gutter);
      right: var(--gutter);
      bottom: calc(var(--bottom-bar-h, 60px) + 8px);
      z-index: 25;
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: calc(100% - var(--topbar-top) - var(--topbar-h, 62px) - var(--bottom-bar-h, 60px) - 24px);
      transform: translateY(var(--text-hud-drag-y, 0px));
      transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
      touch-action: none;
    }
    .text-hud-layer.is-dragging {
      transition: none !important;
    }

    .drag-handle-bar {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 6px 0 2px 0;
      cursor: grab;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
    }
    .drag-handle-bar:active {
      cursor: grabbing;
    }
    .drag-handle-pill {
      width: 42px;
      height: 4px;
      background: rgba(255, 255, 255, 0.45);
      border-radius: 2px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
      transition: background 0.2s, width 0.2s;
    }
    .drag-handle-bar:hover .drag-handle-pill,
    .drag-handle-bar:active .drag-handle-pill {
      background: #ec4899;
      width: 54px;
    }

    /* ── Subtitle Dialogue Box (Inside Draggable Text HUD) ── */
    .dialogue-box {
      position: relative;
      background: rgba(15, 23, 42, 0.85);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border: 1px solid rgba(236, 72, 153, 0.35);
      border-radius: 18px;
      padding: 12px 16px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-height: 210px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .dialogue-box::-webkit-scrollbar { display: none; }
    .dialogue-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11.5px;
      color: #f472b6;
      font-weight: 600;
      cursor: grab;
      user-select: none;
      -webkit-user-select: none;
    }
    .dialogue-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .dialogue-text {
      font-size: 14px;
      line-height: 1.55;
      color: #f8fafc;
      word-break: break-word;
      user-select: text;
      -webkit-user-select: text;
    }
    .dialogue-act {
      font-size: 12px;
      line-height: 1.4;
      color: #94a3b8;
      font-style: italic;
    }
    .dialogue-thought {
      font-size: 12.5px;
      line-height: 1.45;
      color: #f9a8d4;
      background: rgba(131, 24, 67, 0.28);
      border-left: 2px solid rgba(244, 114, 182, 0.7);
      padding: 4px 8px;
      border-radius: 0 8px 8px 0;
    }
    .chip-next {
      color: #fde68a;
      border-color: rgba(251, 191, 36, 0.45);
      background: rgba(120, 53, 15, 0.42);
    }
    /* 私信入口（v60 复活）。底色调深：浅粉底配白字对比度只有约 2.6:1，小字不可读 */
    #letter-btn {
      display: none;                 /* 解锁后由 applyUnlocks() 改为 inline-flex */
      flex: 0 0 auto;
      align-items: center;
      justify-content: center;
      height: 40px;
      padding: 0 14px;
      border-radius: 20px;
      background: linear-gradient(135deg, #C2456F 0%, #8E1E4E 100%);
      border: 1px solid rgba(255, 255, 255, 0.18);
      color: #FFFFFF;
      font-size: 13px;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
      cursor: pointer;
      box-shadow: 0 4px 14px rgba(142, 30, 78, 0.42);
      transition: transform 0.15s ease, filter 0.15s ease;
    }
    #letter-btn:active { transform: scale(0.96); filter: brightness(1.10); }
    #letter-modal {
      display: none;
      flex-direction: column;
      gap: 10px;
      background: rgba(15, 23, 42, 0.94);
      border: 1px solid rgba(244, 114, 182, 0.4);
      border-radius: 16px;
      padding: 14px 16px;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
    }
    #letter-modal .letter-title { color: #f9a8d4; font-size: 13px; font-weight: 600; }
    #letter-modal .letter-body { color: #e2e8f0; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
    #letter-modal .letter-close {
      align-self: flex-end;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.14);
      color: #cbd5e1;
      border-radius: 999px;
      padding: 4px 12px;
      font-size: 12px;
    }
    .replay-voice-btn {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.14);
      color: #cbd5e1;
      font-size: 11.5px;
      font-weight: 600;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 10px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.2s, color 0.2s;
    }
    .replay-voice-btn:hover, .replay-voice-btn:active {
      background: rgba(236, 72, 153, 0.28);
      border-color: rgba(236, 72, 153, 0.5);
      color: #fff;
    }
    /* ── HUD 内音色选择入口 + 面板（2026-10-01）── */
    .dx-voice-btn {
      color: #f9a8d4;
      border-color: rgba(244, 114, 182, 0.38);
      background: rgba(131, 24, 67, 0.30);
      max-width: 40vw;
    }
    .dx-voice-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dx-voice-btn.is-open { background: rgba(236, 72, 153, 0.45); border-color: rgba(236, 72, 153, 0.65); color: #fff; }
    .dx-voice-picker {
      position: absolute;
      inset: 0;
      z-index: 99990;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(0, 0, 0, 0.55);
      -webkit-backdrop-filter: blur(2px);
      backdrop-filter: blur(2px);
    }
    .dx-voice-picker.show { display: flex; }
    .dx-voice-card {
      width: min(92%, 380px);
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 14px;
      border-radius: 16px;
      background: rgba(15, 23, 42, 0.97);
      border: 1px solid rgba(244, 114, 182, 0.35);
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72);
    }
    .dx-voice-head { display: flex; justify-content: space-between; align-items: center; }
    .dx-voice-head span { color: #f9a8d4; font-size: 13px; font-weight: 600; }
    .dx-voice-x { background: transparent; border: none; color: #94a3b8; font-size: 15px; padding: 2px 6px; cursor: pointer; }
    .dx-voice-select {
      width: 100%;
      min-height: 38px;
      padding: 0 10px;
      font-size: 13px;
      color: #e2e8f0;
      background: rgba(2, 6, 23, 0.9);
      border: 1px solid rgba(148, 163, 184, 0.3);
      border-radius: 10px;
    }
    .dx-voice-select optgroup { color: #f472b6; font-weight: 600; }
    .dx-voice-select option { color: #e2e8f0; background: #0b1120; }
    .dx-voice-desc { min-height: 16px; font-size: 11.5px; line-height: 1.5; color: #94a3b8; }
    .dx-voice-row { display: flex; gap: 8px; }
    .dx-voice-act {
      flex: 1;
      min-height: 36px;
      border-radius: 10px;
      font-size: 12.5px;
      font-weight: 600;
      color: #cbd5e1;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.14);
      cursor: pointer;
    }
    .dx-voice-act.primary { color: #fff; background: rgba(236, 72, 153, 0.85); border-color: rgba(236, 72, 153, 0.95); }
    .dx-voice-act:disabled { opacity: 0.6; }
    .dx-voice-hint { font-size: 11px; text-align: center; color: #64748b; }
    #engine-badge-btn {
      color: #fbbf24;
      border-color: rgba(251, 191, 36, 0.35);
      background: rgba(251, 191, 36, 0.12);
    }
    #engine-badge-btn.is-qwen {
      color: #38bdf8;
      border-color: rgba(56, 189, 248, 0.35);
      background: rgba(56, 189, 248, 0.12);
    }

    /* ── Story Catalyst Bar (Immersive Choice Modal) ── */
    /* ── 剧情抉择浮层 ──────────────────────────────────────────────────
       v50：原为 relative 内联小面板，嵌在 #text-hud-layer 内。该容器
       z-index:25 且 position:absolute → 自成层叠上下文，子元素再高的 z-index
       也逃不出去；聊天页 #chat-page z-index:100 会把它整层盖住（实测
       elementFromPoint 命中 #chat-quick-quote-bar，VISIBLE_TO_USER=false）。
       现改为 #stage 直属全屏浮层（#stage 无 transform，fixed 等价视口）。 ── */
    #choice-modal {
      position: fixed;
      inset: 0;
      z-index: 125000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 0 22px;
    }
    #choice-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(10, 7, 6, 0.74);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
    }
    #choice-card {
      position: relative;
      width: 100%;
      max-width: 330px;
      max-height: 78vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: #1D1815;
      border: 1px solid rgba(201, 142, 138, 0.34);
      border-radius: 20px;
      padding: 18px 16px 14px;
      box-shadow: 0 22px 60px rgba(0, 0, 0, 0.62);
      animation: catalystSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #choice-card::-webkit-scrollbar { display: none; }
    @keyframes catalystSlideIn {
      0% { opacity: 0; transform: translateY(10px) scale(0.98); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .choice-title {
      font-size: 11.5px;
      color: #C98E8A;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
      letter-spacing: 0.3px;
    }
    .choice-desc {
      font-size: 12px;
      color: rgba(214, 198, 190, 0.78);
      line-height: 1.5;
      display: -webkit-box;
      -webkit-line-clamp: 4;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      opacity: 0.9;
    }
    .choice-btn {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(201, 142, 138, 0.32);
      color: #F0E6DF;
      padding: 10px 14px;
      min-height: 42px;
      border-radius: 12px;
      font-size: 12.5px;
      line-height: 1.45;
      cursor: pointer;
      text-align: left;
      display: flex;
      align-items: center;
      transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .choice-btn:hover, .choice-btn:active {
      background: linear-gradient(135deg, rgba(201, 142, 138, 0.26), rgba(201, 142, 138, 0.14));
      border-color: rgba(201, 142, 138, 0.62);
      transform: scale(0.985);
    }
    /* 「稍后再说」逃生口：避免浮层变成无法退出的死锁 */
    .choice-later {
      align-self: center;
      margin-top: 2px;
      background: transparent;
      border: none;
      color: rgba(214, 198, 190, 0.5);
      font-size: 11.5px;
      padding: 6px 10px;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 3px;
    }
    .choice-text {
      flex: 1;
      letter-spacing: 0.2px;
    }
    .choice-bonus {
      display: none !important;
    }

    /* ── Clean Screen Mode (One-click Immersive View) ── */
    #stage.clean-screen-mode .top-settings-btn {
      opacity: 0 !important;
      pointer-events: none !important;
      transform: translateY(-20px) !important;
      transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    }
    #stage.clean-screen-mode .top-bar {
      opacity: 0 !important;
      pointer-events: none !important;
      transform: translateY(calc(-100% - var(--topbar-top) - 15px)) !important;
      transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    }
    #stage.clean-screen-mode .text-hud-layer {
      opacity: 0 !important;
      pointer-events: none !important;
      transform: translateY(40px) scale(0.96) !important;
      transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    }
    #stage.clean-screen-mode .bottom-bar {
      opacity: 0 !important;
      pointer-events: none !important;
      transform: translateY(calc(100% + 20px)) !important;
      transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    }
    #stage.clean-screen-mode #reel-indicators,
    #stage.clean-screen-mode #discover-top-strip,
    #stage.clean-screen-mode #discover-action-rail,
    #stage.clean-screen-mode #discover-tabbar,
    #stage.clean-screen-mode #discover-scrim,
    #stage.clean-screen-mode #swipe-guide,
    #stage.clean-screen-mode #swipe-toast,
    #stage.clean-screen-mode #chapter-toast,
    #stage.clean-screen-mode #pet-hud,
    #stage.clean-screen-mode #sim-hand-cursor,
    #stage.clean-screen-mode .dropdown-menu {
      opacity: 0 !important;
      pointer-events: none !important;
      transition: opacity 0.3s ease !important;
    }
    #stage.clean-screen-mode #hitbox-layer,
    #stage.clean-screen-mode .hitbox {
      display: none !important;
      pointer-events: none !important;
    }
    #stage.clean-screen-mode .clean-screen-restore-hint {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0);
    }

    .clean-screen-restore-hint {
      position: absolute;
      bottom: calc(16px + env(safe-area-inset-bottom, 10px));
      left: 50%;
      transform: translateX(-50%) translateY(14px);
      z-index: 100;
      opacity: 0;
      pointer-events: none;
      transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
      background: rgba(15, 23, 42, 0.82);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(236, 72, 153, 0.5);
      color: #f1f5f9;
      padding: 9px 20px;
      border-radius: 22px;
      font-size: 13px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 7px;
      cursor: pointer;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(236, 72, 153, 0.3);
      white-space: nowrap;
      user-select: none;
      -webkit-user-select: none;
    }
    .clean-screen-restore-hint:hover, .clean-screen-restore-hint:active {
      background: rgba(236, 72, 153, 0.35);
      border-color: rgba(236, 72, 153, 0.8);
      transform: translateX(-50%) translateY(-2px);
    }

    /* Chapter Toast Alert */
    #chapter-toast {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%) scale(0.9);
      width: calc(100% - 40px);
      max-width: 340px;
      /* 竖版：限高可滚，短屏也不会顶穿上下栏 */
      max-height: calc(100% - 180px);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      background: rgba(15, 23, 42, 0.96);
      backdrop-filter: blur(24px);
      border: 2px solid #ec4899;
      border-radius: 24px;
      padding: 22px 24px;
      box-shadow: 0 0 40px rgba(236, 72, 153, 0.5);
      /* v50：原为 z-index:100，与 #chat-page 相同且 DOM 更靠前 → 整层被盖住，
         章节解锁这种最重要的正反馈玩家根本看不到。提到聊天页之上。 */
      z-index: 125100;
      display: none;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      text-align: center;
      /* 关键修复：原来复用 popIn，其终态 translateY(0) scale(1) 会覆盖基类的 translate(-50%,-50%)，
         动画 fill:forwards 保留终态后弹窗左边缘落在 50% 处、右侧溢出屏幕 145px（用户截图即此现象）。
         这里改用自带居中位移的关键帧。*/
      animation: chapterToastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }
    #chapter-toast::-webkit-scrollbar { display: none; }
    @keyframes chapterToastIn {
      0%   { opacity: 0; transform: translate(-50%, -50%) translateY(14px) scale(0.9); }
      100% { opacity: 1; transform: translate(-50%, -50%) translateY(0) scale(1); }
    }
    .toast-title { font-size: 17px; font-weight: 700; color: #f472b6; }
    .toast-desc { font-size: 13.5px; color: #cbd5e1; line-height: 1.5; }
    .toast-btn {
      margin-top: 6px;
      background: linear-gradient(135deg, #ec4899, #8b5cf6);
      color: #fff;
      border: none;
      border-radius: 18px;
      padding: 8px 24px;
      font-weight: 600;
      cursor: pointer;
    }

    /* ── Bottom Controls (Mobile Safe Area) ── */
    .bottom-bar {
      position: absolute;
      bottom: 0;
      left: 0; right: 0;
      z-index: 20;
      display: flex;
      flex-direction: column;
      gap: 0;
      padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 10px)) 12px;
      background: linear-gradient(to top, rgba(5, 7, 13, 0.96) 0%, rgba(5, 7, 13, 0.75) 65%, transparent 100%);
      transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    }

    /* 剧情引导改成「💬 话题」浮层（2026-09-17：常驻快捷按钮行按用户要求撤掉） */
    .topic-panel {
      position: relative;
      margin-bottom: 8px;
      background: rgba(12, 17, 30, 0.94);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 16px;
      padding: 8px 10px 10px 10px;
      box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
    }
    .topic-panel[hidden] { display: none; }
    .topic-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 2px 6px 2px;
    }
    .topic-title { font-size: 12px; color: #94a3b8; letter-spacing: 0.04em; }
    .topic-close {
      border: none;
      background: transparent;
      color: #94a3b8;
      font-size: 15px;
      line-height: 1;
      padding: 2px 4px;
      cursor: pointer;
    }
    .topic-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      max-height: 34vh;
      overflow-y: auto;
      scrollbar-width: none;
    }
    .topic-list::-webkit-scrollbar { display: none; }
    .chip {
      flex: 0 0 auto;
      white-space: nowrap;
      font-size: 12.5px;
      line-height: 1;
      color: #e2e8f0;
      background: rgba(15, 23, 42, 0.82);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 999px;
      padding: 8px 13px;
      cursor: pointer;
      transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    }
    .chip:active { transform: scale(0.94); background: rgba(244, 114, 182, 0.22); }
    .chip-special {
      color: #fbcfe8;
      border-color: rgba(244, 114, 182, 0.42);
      background: rgba(131, 24, 67, 0.42);
    }
    .input-form {
      display: flex;
      gap: 8px;
      background: rgba(15, 23, 42, 0.88);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 28px;
      padding: 5px 6px 5px 14px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.5);
      align-items: center;
    }
    .input-box {
      flex: 1;
      background: transparent;
      border: none;
      outline: none;
      color: #fff;
      font-size: 14px;
    }
    .input-box::placeholder { color: #64748b; }
    .btn-circle {
      width: 36px; height: 36px;
      border-radius: 50%;
      border: none;
      background: rgba(255, 255, 255, 0.1);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s;
      flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
    }
    .btn-circle:hover, .btn-circle:active { background: rgba(255, 255, 255, 0.2); }
    /* 💬 话题按钮展开态：别复用 .listening（那是录音中的红色，语义冲突） */
    .btn-circle.topic-open { background: rgba(244, 114, 182, 0.26); }
    .btn-circle.listening { background: #ef4444; animation: pulse 1s infinite; }
    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1); }
    }
    .btn-send {
      background: linear-gradient(135deg, #ec4899, #8b5cf6);
      color: #fff;
      border: none;
      border-radius: 20px;
      padding: 0 16px;
      height: 36px;
      font-weight: 600;
      font-size: 13px;
      cursor: pointer;
      flex-shrink: 0;
      transition: all 0.2s;
      -webkit-tap-highlight-color: transparent;
    }
    /* ══════════════════════════════════════════════════════════════════
       AIMate 9:16-2 Warm Dream (Direction B) Design System & Chat Page
       Visual Spec: Soft Emotional Editorial / Dark Mode (Wishhh.ai)
       ══════════════════════════════════════════════════════════════════ */
    :root {
      --wd-espresso-black: #1A1412;
      --wd-charcoal: #2C201C;
      --wd-deep-russet: #4A2D24;
      --wd-muted-rose: #8E5A5A;
      --wd-rosewood: #C98E8A;
      --wd-rosewood-dark: #8B4D5C;
      --wd-warm-taupe: #D5BEB4;
      --wd-warm-ivory: #F5EBE6;
      --wd-blush-neutral: #F8EBE8;

      --wd-grad-amber-glow: linear-gradient(135deg, #4A2D24 0%, #8E5A5A 100%);
      --wd-grad-warm-depth: linear-gradient(180deg, #1A1412 0%, #2C201C 100%);
      --wd-grad-soft-highlight: linear-gradient(135deg, #C98E8A 0%, #F5EBE6 100%);
      --wd-grad-rose-btn: linear-gradient(135deg, #E0958D 0%, #A84A63 100%);

      --wd-font-serif: 'Playfair Display', Georgia, serif;
      --wd-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

    /* ── 1. 发现页 (Discovery) UI 精简：隐藏图1红框中的旧顶栏与旧底栏 ── */
    #top-action-group, #top-bar, .bottom-bar {
      display: none !important;
    }

    /* ══════════════════════════════════════════════════════════════════════
       发现页 v49 · TikTok 式信息层
       （LIVE 胶囊 / 右侧互动栏 / 角色信息块 / 底部 Tab 栏）
       依据用户设计稿版式。整段可回滚：删掉本块并还原 HTML 即回到旧版。
       ══════════════════════════════════════════════════════════════════════ */
    #stage {
      --dp-tabbar-h: 56px;
      --dp-info-h: 224px;
      --dp-gold: #E8C46A;
      --dp-glass-line: rgba(255, 255, 255, 0.13);
      /* v52：发现页主 CTA 金色（设计稿取样）——与 --dp-gold 区分开：
         --dp-gold #E8C46A 偏亮黄，用于收藏星标 / 播放态文字；
         本令牌是更柔和的香槟金，专供主按钮底色。 */
      --dp-grad-gold-btn: linear-gradient(135deg, #D1B381 0%, #C5A675 100%);
    }

    /* 底部压暗，保证文字在任意画面上都可读 */
    #discover-scrim {
      position: absolute; left: 0; right: 0; bottom: 0;
      height: 64%;
      background: linear-gradient(to top,
        rgba(12, 8, 7, 0.94) 0%,
        rgba(12, 8, 7, 0.76) 26%,
        rgba(12, 8, 7, 0.34) 58%,
        transparent 100%);
      z-index: 8;
      pointer-events: none;
    }

    /* ── 顶部条：更多入口（[qa-batch1] 移除旧 LIVE 胶囊后改为靠右排列，且层级高于 .dp-toptabs(35)，防止塌到左侧被「推荐」遮挡） ── */
    #discover-top-strip {
      position: absolute;
      top: calc(var(--topbar-top, 14px) + 7px);
      left: 14px; right: 14px;
      display: flex; align-items: center; justify-content: flex-end; gap: 8px;
      z-index: 36;
      pointer-events: none;
    }
    @keyframes dpLivePulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.3; transform: scale(0.72); }
    }
    .dp-more-btn {
      pointer-events: auto;
      width: 30px; height: 30px; border-radius: 50%;
      background: rgba(20, 14, 13, 0.46);
      border: 1px solid rgba(232, 196, 106, 0.4);
      backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      color: #EBCF8E; font-size: 14px; line-height: 1;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
      transition: background 0.2s ease, transform 0.2s ease;
    }
    .dp-more-btn:active { transform: scale(0.9); background: rgba(74, 45, 36, 0.72); }
    .dp-more-btn.open { background: rgba(232, 196, 106, 0.24); }

    #discover-more-menu {
      position: absolute;
      top: calc(var(--topbar-top) + 40px); right: 14px;
      z-index: 42;
      display: none; flex-direction: column;
      min-width: 152px; padding: 6px;
      background: rgba(24, 18, 16, 0.95);
      border: 1px solid var(--dp-glass-line);
      border-radius: 14px;
      backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
      box-shadow: 0 14px 38px rgba(0, 0, 0, 0.62);
    }
    #discover-more-menu.open { display: flex; animation: dpMenuIn 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
    @keyframes dpMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
    .dp-menu-item {
      display: flex; align-items: center; gap: 9px;
      padding: 9px 10px; border: none; border-radius: 10px; background: none;
      color: var(--wd-warm-ivory);
      font-family: var(--wd-font-sans); font-size: 13px;
      text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .dp-menu-item:active { background: rgba(201, 142, 138, 0.2); }
    .dp-mi-icon { width: 18px; text-align: center; font-size: 14px; }

    /* ── 右侧互动栏 ── */
    #discover-action-rail {
      position: absolute;
      right: 8px;
      bottom: calc(var(--dp-tabbar-h) + var(--dp-info-h) + 14px);
      z-index: 27;
      display: flex; flex-direction: column; align-items: center; gap: 15px;
      transition: bottom 0.2s ease;
    }
    .dp-rail-btn {
      display: flex; flex-direction: column; align-items: center; gap: 3px;
      width: 48px; padding: 0; border: none; background: none;
      color: #F4EAE4;
      font-family: var(--wd-font-sans); font-size: 10.5px; font-weight: 600;
      letter-spacing: 0.2px; cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.75));
    }
    /* 图标一律走内联 SVG（fill:currentColor）：
       ⛔ 不用 emoji —— 同一份代码在 iOS/Android/桌面渲染出的表情字形完全不同，
          彩色 emoji 会和设计稿的单色图标严重不符（跨端 UI 老坑）。 */
    .dp-rail-icon { display: block; width: 26px; height: 26px; transition: transform 0.18s ease; }
    .dp-rail-icon svg { display: block; width: 100%; height: 100%; }
    .dp-rail-btn:active .dp-rail-icon { transform: scale(0.84); }
    .dp-rail-count { line-height: 1.1; }
    .dp-rail-btn.on { color: #F0537A; }
    .dp-rail-btn.dp-star.on { color: var(--dp-gold); }
    .dp-rail-btn.on .dp-rail-icon { animation: dpRailPop 0.38s cubic-bezier(0.3, 1.5, 0.5, 1); }
    @keyframes dpRailPop {
      0% { transform: scale(1); }
      45% { transform: scale(1.34); }
      100% { transform: scale(1); }
    }

    /* ── 角色指示点：从「深色药丸」改为贴边细点，给互动栏让位 ── */
    #reel-indicators {
      right: 12px; top: 27%; gap: 2px;
      background: transparent; padding: 0; border: none; box-shadow: none;
      backdrop-filter: none; -webkit-backdrop-filter: none;
    }
    .indicator-dot::after {
      width: 5px; height: 5px;
      background: rgba(255, 255, 255, 0.42);
      box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
    }
    .indicator-dot.active::after {
      height: 16px; border-radius: 8px;
      background: linear-gradient(180deg, #E7B3AC 0%, #C98E8A 100%);
      box-shadow: 0 0 9px rgba(201, 142, 138, 0.9);
    }

    /* ── 发现页角色信息块 ──
       复用 #dialogue-box 容器，保留 #speaker-name / #dialogue-act /
       #dialogue-thought / #dialogue-text 四个 id —— JS 侧零改动即可继续写值。 */
    .text-hud-layer {
      bottom: calc(var(--dp-tabbar-h) + 6px);
      left: 16px; right: 16px;
    }
    .text-hud-layer .drag-handle-bar { display: none; }
    .dialogue-box {
      background: transparent; border: none; box-shadow: none;
      padding: 0; border-radius: 0;
      max-height: none; overflow: visible;
      gap: 9px;
      backdrop-filter: none; -webkit-backdrop-filter: none;
    }
    .dp-title-row {
      display: block;              /* v70j：单个块级子项，无需 flex */
      min-width: 0;
    }
    .dp-name {
      margin: 0;
      /* v70j：块级文本流，内部 inline 排版 ——
         名字与年龄同属一段文本，长名字折行时年龄自然跟在末字之后。 */
      font-family: var(--wd-font-serif);
      font-size: 30px; font-weight: 700; line-height: 1.12;
      color: #FCF6F2; letter-spacing: 0.2px;
      text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
      text-wrap: balance;
    }
    .dp-name #speaker-name { display: inline; }
    .dp-age {
      /* v70j：行内后缀，随名字文本流排版 */
      display: inline;
      white-space: nowrap;
      margin-left: 8px;
      font-family: var(--wd-font-serif);
      font-size: 19px; font-weight: 600;
      color: rgba(245, 235, 230, 0.72);
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    }
    .dp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
    .dp-tag {
      display: inline-flex; align-items: center;
      height: 24px; padding: 0 11px; border-radius: 9999px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.2);
      backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
      color: var(--wd-warm-ivory);
      font-family: var(--wd-font-sans);
      font-size: 11.5px; font-weight: 500; white-space: nowrap;
    }
    /* v59（P0-5）：取向徽标 —— 与普通 personality tag 视觉分级。
       底色一律取深色（玫瑰 / 紫 / 深蓝），是为了白字对比度能过 4.5:1；
       浅色底 + 白字只有 1.8:1 那种坑本项目踩过。 */
    .dp-tag-orient {
      background: linear-gradient(135deg, #B04A6E, #8E2F55);
      border-color: rgba(255, 255, 255, 0.42);
      color: #FFF7FA;
      font-weight: 700;
      letter-spacing: 0.3px;
      box-shadow: 0 3px 14px rgba(140, 40, 78, 0.5);
    }
    .dp-tag-orient.bi { background: linear-gradient(135deg, #6E4A9E, #513070); box-shadow: 0 3px 14px rgba(80, 48, 112, 0.5); }
    .dp-tag-orient.straight { background: linear-gradient(135deg, #3F6E96, #2B4E6E); box-shadow: 0 3px 14px rgba(43, 78, 110, 0.5); }
    /* 筛选条：默认低调，选中态反白 */
    .dp-orient-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
    .dp-of-chip {
      display: inline-flex; align-items: center; gap: 4px;
      height: 22px; padding: 0 9px; border-radius: 9999px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: rgba(245, 235, 230, 0.78);
      font-family: var(--wd-font-sans);
      font-size: 11px; font-weight: 500; white-space: nowrap;
      cursor: pointer;
    }
    .dp-of-chip i { font-style: normal; opacity: 0.55; font-size: 10px; }
    .dp-of-chip.on {
      background: rgba(255, 255, 255, 0.92);
      border-color: rgba(255, 255, 255, 0.92);
      color: #2A1A20;
      font-weight: 700;
    }
    .dp-of-chip.on i { opacity: 0.7; }
    .dd-orient {
      display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
      font-size: 10px; font-weight: 700; color: #FFF7FA; vertical-align: middle;
      background: linear-gradient(135deg, #B04A6E, #8E2F55);
    }
    .dd-orient.bi { background: linear-gradient(135deg, #6E4A9E, #513070); }
    .dd-orient.straight { background: linear-gradient(135deg, #3F6E96, #2B4E6E); }
    .dp-swipe-hint {
      display: flex; align-items: center; gap: 5px;
      font-family: var(--wd-font-sans);
      font-size: 11px;
      color: rgba(245, 235, 230, 0.62);
      text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
    }
    .dp-hint-arrow {
      font-size: 12px; color: rgba(245, 235, 230, 0.82);
      animation: dpHintUp 1.8s ease-in-out infinite;
    }
    @keyframes dpHintUp {
      0%, 100% { transform: translateY(0); opacity: 0.55; }
      50% { transform: translateY(-3px); opacity: 1; }
    }
    .dp-line-wrap { position: relative; }
    .dp-line-wrap .dialogue-text {
      font-family: var(--wd-font-sans);
      font-size: 13.5px; line-height: 1.55;
      color: #F7EFEA;
      text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
      display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
      overflow: hidden;
    }
    /* 用字面量弯引号，绝不写 CSS 十六进制转义 —— 该 CSS 最终位于 Python
       三引号串里，反斜杠八进制转义会被 Python 先吃掉，到浏览器就成乱码。 */
    .dp-line-wrap .dialogue-text::before { content: '“'; }
    .dp-line-wrap .dialogue-text::after { content: '”'; }
    .dp-line-wrap .dialogue-act { color: rgba(241, 236, 233, 0.78); }
    .dp-line-wrap .dialogue-thought {
      background: rgba(140, 90, 90, 0.24);
      border-left-color: rgba(201, 142, 138, 0.7);
      color: #F3D6D2;
    }
    .dp-cta-row { display: flex; align-items: center; gap: 9px; margin-top: 3px; }
    .dp-cta-primary {
      flex: 1 1 auto;
      height: 46px; border-radius: 9999px;
      /* v52：改用设计稿香槟金。文字同步改深棕 —— 金底上白字对比仅约 1.8:1，
         深棕 #37242E 可达 7.2:1；这是本次改动里最容易漏的一步。 */
      background: var(--dp-grad-gold-btn);
      border: 1px solid rgba(255, 250, 238, 0.30);
      color: #37242E;
      font-family: var(--wd-font-sans);
      font-size: 14.5px; font-weight: 600;
      display: flex; align-items: center; justify-content: center; gap: 7px;
      box-shadow: 0 8px 26px rgba(209, 179, 129, 0.38);
      cursor: pointer; -webkit-tap-highlight-color: transparent;
      transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
    }
    .dp-cta-primary:active { transform: scale(0.97); box-shadow: 0 4px 16px rgba(209, 179, 129, 0.34); }
    .dp-cta-ghost {
      flex: 0 0 auto;
      height: 46px; padding: 0 18px; border-radius: 9999px;
      /* v53：对齐设计稿玻璃质感（实测线上 L=14 而设计稿 L=28，暗一倍）。 */
      background: rgba(255, 255, 255, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.30);
      backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      color: var(--wd-warm-ivory);
      font-family: var(--wd-font-sans);
      font-size: 13.5px; font-weight: 600;
      display: flex; align-items: center; justify-content: center; gap: 6px;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
      transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
    }
    .dp-cta-ghost:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.24); }
    .dp-cta-ghost.playing { color: var(--dp-gold); border-color: rgba(232, 196, 106, 0.55); }

    /* ── v61 · PRD 批注#2：试听声音播放态（暂停图标 + 波形条 + 时长进度） ── */
    .dp-voice-wave { display: none; align-items: flex-end; gap: 2px; height: 15px; margin-left: 2px; }
    .dp-voice-wave i {
      display: block; width: 2px; border-radius: 1px;
      background: rgba(241, 236, 233, 0.34);
      transition: background 0.18s ease;
    }
    .dp-voice-wave i.wv { height: 5px; }
    .dp-voice-wave i.wv:nth-child(2n) { height: 9px; }
    .dp-voice-wave i.wv:nth-child(3n) { height: 13px; }
    .dp-voice-wave i.wv:nth-child(5n) { height: 7px; }
    .dp-voice-wave i.on { background: var(--dp-gold); }
    .dp-voice-time {
      display: none; font-family: var(--wd-font-mono, monospace);
      font-size: 11px; letter-spacing: 0.2px; color: var(--dp-gold);
      margin-left: 2px; white-space: nowrap;
    }
    .dp-voice-dur { color: rgba(241, 236, 233, 0.52); }
    .dp-cta-ghost.playing { min-width: 176px; }
    .dp-cta-ghost.playing .dp-voice-txt { display: none; }
    .dp-cta-ghost.playing .dp-voice-wave { display: flex; align-items: flex-end; }
    .dp-cta-ghost.playing .dp-voice-time { display: inline-flex; gap: 1px; }
    .dp-cta-ghost.playing .dp-voice-ico::before { content: "❚❚"; font-size: 9px; letter-spacing: -1px; }
    .dp-cta-ghost.playing .dp-voice-ico { font-size: 11px; }
    /* 暂停态：图标换回播放三角（= 点我可恢复），波形冻结并降透明 */
    .dp-cta-ghost.playing.paused .dp-voice-ico::before { content: "▶"; font-size: 10px; letter-spacing: 0; }
    .dp-cta-ghost.playing.paused .dp-voice-wave { opacity: 0.45; }
    .dp-cta-ghost.playing.paused .dp-voice-time { color: rgba(241, 236, 233, 0.6); }
    .dp-cta-ghost.playing.paused .dp-voice-dur { color: rgba(241, 236, 233, 0.4); }



    /* ═══════════════════════════════════════════════════════════
       v62 · 前端占位层：C 端 9 个二级页共用样式
       层级：二级页 90（低于 chat-page 100）· 浮层 125000+
       ═══════════════════════════════════════════════════════════ */
    :root {
      --cp-bg: #14100E;
      --cp-card: #221B18;
      --cp-card-2: #2B221F;
      --cp-line: #382C27;
      --cp-line-2: #4A3A34;
      --cp-text: #F5EBE6;
      --cp-dim: #BFAEA6;
      --cp-dimmer: #7A6960;
      --cp-rose: #C98E8A;
      --cp-rose-l: #E0ADA9;
      --cp-gold: #D4AF37;
      --cp-gold-l: #F3E5AB;
      --cp-green: #10B981;
      --cp-red: #EF4444;
      --cp-wine: #7B2E3B;
    }

    /* ── 通用二级页骨架 ── */
    .cp-page {
      position: absolute; inset: 0; z-index: 90;
      background: var(--cp-bg);
      display: none; flex-direction: column;
      font-family: var(--wd-font-sans, -apple-system, BlinkMacSystemFont, sans-serif);
      color: var(--cp-text);
    }
    .cp-page.active { display: flex; }
    .cp-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
      scrollbar-width: none; }   /* v66b: 隐藏默认滚动条（与全站滚动容器惯例一致） */
    .cp-scroll::-webkit-scrollbar { display: none; }
    .cp-head {
      display: flex; align-items: center; gap: 10px;
      padding: 14px 16px; border-bottom: 1px solid var(--cp-line);
      background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
      flex-shrink: 0;
    }
    .cp-back {
      width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
      background: var(--cp-card); border: 1px solid var(--cp-line);
      color: var(--cp-text); display: flex; align-items: center; justify-content: center;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .cp-back:active { background: var(--cp-card-2); }
    .cp-title { font-size: 18px; font-weight: 700; letter-spacing: 0.2px; }
    .cp-sub { font-size: 11.5px; color: var(--cp-dimmer); margin-top: 1px; }
    .cp-pad { padding: 16px; }
    /* v67 他人主页 / 设置 */
    .pf-hero { display: flex; align-items: center; gap: 14px; padding: 18px 16px 10px; }
    .pf-av { width: 58px; height: 58px; border-radius: 50%; background: var(--cp-card);
      border: 1px solid var(--cp-line); display: flex; align-items: center; justify-content: center;
      font-size: 24px; flex-shrink: 0; }
    .pf-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
    .pf-official { font-size: 10.5px; padding: 2px 6px; border-radius: 6px;
      background: rgba(255,255,255,0.10); color: var(--cp-dimmer); }
    .pf-meta { font-size: 11.5px; color: var(--cp-dimmer); margin-top: 4px; }
    .pf-stats { display: flex; gap: 10px; padding: 4px 16px 12px; }
    .pf-stat { flex: 1; background: var(--cp-card); border: 1px solid var(--cp-line);
      border-radius: 12px; padding: 10px 4px; text-align: center; }
    .pf-stat b { display: block; font-size: 16px; }
    .pf-stat span { font-size: 10.5px; color: var(--cp-dimmer); }
    .pf-sec-t { font-size: 12.5px; color: var(--cp-dimmer); padding: 12px 16px 6px; }
    .pf-char { display: flex; align-items: center; gap: 10px; padding: 10px 16px;
      border-bottom: 1px solid var(--cp-line); }
    .pf-char .n { font-size: 14px; }
    .pf-char .lv { font-size: 11px; color: var(--cp-dimmer); margin-top: 2px; }
    .pf-blocked { margin: 12px 16px; padding: 10px 12px; border-radius: 10px;
      background: rgba(255,255,255,0.05); font-size: 12px; color: var(--cp-dimmer); line-height: 1.6; }
    .pf-menu { position: absolute; right: 14px; top: 54px; min-width: 130px;
      background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 10px;
      overflow: hidden; display: none; z-index: 120000; }
    .pf-menu.open { display: block; }
    .pf-menu button { display: block; width: 100%; padding: 12px 16px; background: none;
      border: none; color: var(--cp-text); font-size: 13.5px; text-align: left; }
    .bl-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px;
      border-bottom: 1px solid var(--cp-line); }
    .bl-item .av { width: 34px; height: 34px; border-radius: 50%; background: var(--cp-card);
      border: 1px solid var(--cp-line); display: flex; align-items: center; justify-content: center; }
    .set-in { width: 100%; margin-bottom: 8px; padding: 10px 12px; border-radius: 10px;
      border: 1px solid var(--cp-line); background: var(--cp-card); color: var(--cp-text); font-size: 13.5px; }
    .dpc-av[data-act], .dpc-who[data-act], .dpc-reply-who[data-act] { cursor: pointer; }

    /* ── 通用卡片/列表/按钮 ── */
    .cp-card {
      background: var(--cp-card); border: 1px solid var(--cp-line);
      border-radius: 14px; padding: 14px; margin-bottom: 12px;
    }
    .cp-row {
      display: flex; align-items: center; gap: 12px;
      padding: 13px 14px; border-bottom: 1px solid var(--cp-line);
    }
    .cp-row:last-child { border-bottom: none; }
    .cp-row-main { flex: 1; min-width: 0; }
    .cp-row-t { font-size: 14.5px; font-weight: 600; }
    .cp-row-d { font-size: 12px; color: var(--cp-dim); margin-top: 3px; line-height: 1.5; }
    .cp-row-x { font-size: 12px; color: var(--cp-dimmer); flex-shrink: 0; }
    .cp-btn {
      border: 1px solid var(--cp-line-2); background: var(--cp-card-2);
      color: var(--cp-text); border-radius: 9999px; padding: 8px 15px;
      font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
      -webkit-tap-highlight-color: transparent;
    }
    .cp-btn:active { transform: scale(0.97); }
    .cp-btn.primary {
      background: linear-gradient(135deg, #8E3543, var(--cp-wine));
      border-color: rgba(201,142,138,0.4); color: #FFF6F2;
    }
    .cp-btn.gold {
      background: linear-gradient(135deg, #E4C86A, var(--cp-gold));
      border-color: rgba(243,229,171,0.5); color: #2A1F14;
    }
    .cp-btn.ghost { background: transparent; }
    .cp-btn.sm { padding: 6px 11px; font-size: 12px; }
    .cp-btn.block { display: block; width: 100%; text-align: center; }
    .cp-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

    .cp-chip {
      display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 9999px;
      background: var(--cp-card-2); color: var(--cp-dim); border: 1px solid var(--cp-line);
    }
    .cp-chip.gold { background: rgba(212,175,55,0.14); color: var(--cp-gold-l); border-color: rgba(212,175,55,0.3); }
    .cp-chip.rose { background: rgba(201,142,138,0.14); color: var(--cp-rose-l); border-color: rgba(201,142,138,0.3); }
    .cp-chip.green { background: rgba(16,185,129,0.14); color: #6EE7B7; border-color: rgba(16,185,129,0.32); }
    .cp-chip.dim { opacity: 0.55; }

    .cp-sec-t {
      font-size: 12px; font-weight: 700; color: var(--cp-rose);
      text-transform: uppercase; letter-spacing: 0.8px;
      margin: 20px 0 10px; display: flex; align-items: center; justify-content: space-between;
    }
    .cp-sec-t:first-child { margin-top: 4px; }
    .cp-empty { text-align: center; padding: 56px 24px; color: var(--cp-dimmer); font-size: 13px; line-height: 1.8; }
    .cp-empty-ico { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

    /* ── 05 模型选择 ── */
    .ml-card {
      border: 1px solid var(--cp-line); border-radius: 16px; padding: 15px;
      margin-bottom: 12px; background: var(--cp-card); position: relative;
    }
    .ml-card.on { border-color: var(--cp-rose); background: linear-gradient(135deg, rgba(201,142,138,0.1), var(--cp-card)); }
    .ml-card.locked { border-style: dashed; border-color: var(--cp-line-2); opacity: 0.72; }
    .ml-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
    .ml-name { font-size: 16px; font-weight: 700; }
    .ml-cost { margin-left: auto; font-size: 12.5px; color: var(--cp-gold-l); font-weight: 600; }
    .ml-desc { font-size: 12.5px; color: var(--cp-dim); line-height: 1.6; }
    .ml-hook { font-size: 11.5px; color: var(--cp-gold); margin-top: 8px; }
    .ml-lockico { position: absolute; top: 14px; right: 14px; font-size: 15px; }

    /* ── 02 双列流 ── */
    .dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 14px; }
    .dl-card {
      border-radius: 15px; overflow: hidden; background: var(--cp-card);
      border: 1px solid var(--cp-line); cursor: pointer; position: relative;
    }
    .dl-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #0B0807; }
    .dl-meta { padding: 9px 10px 11px; }
    .dl-n { font-size: 14px; font-weight: 700; }
    .dl-t { font-size: 11px; color: var(--cp-dim); margin-top: 3px; line-height: 1.45;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .dl-badge {
      position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700;
      background: rgba(0,0,0,0.6); border: 1px solid rgba(232,196,106,0.45);
      color: var(--cp-gold-l); padding: 3px 7px; border-radius: 9999px; backdrop-filter: blur(8px);
    }

    /* ── 03 搜索 ── */
    .sr-bar { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--cp-line); }
    .sr-in {
      flex: 1; background: var(--cp-card); border: 1px solid var(--cp-line);
      border-radius: 9999px; padding: 9px 14px; color: var(--cp-text);
      font-size: 14px; outline: none;
    }
    .sr-in:focus { border-color: var(--cp-rose); }
    .sr-in::placeholder { color: var(--cp-dimmer); }
    .sr-clr { background: none; border: none; color: var(--cp-dimmer); font-size: 17px; cursor: pointer; padding: 0 3px; }
    .sr-hot { display: flex; flex-wrap: wrap; gap: 8px; }
    .sr-tag {
      font-size: 12.5px; padding: 6px 12px; border-radius: 9999px;
      background: var(--cp-card); border: 1px solid var(--cp-line); color: var(--cp-dim); cursor: pointer;
    }
    .sr-tag:active { background: var(--cp-card-2); }
    .sr-item { display: flex; gap: 11px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--cp-line); cursor: pointer; }
    .sr-av { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex-shrink: 0; background: #0B0807; }
    .sr-count { font-size: 11.5px; color: var(--cp-dimmer); padding: 10px 16px 4px; }

    /* ── 06 好感度 ── */
    .fv-hero {
      border-radius: 18px; padding: 22px 18px; text-align: center;
      background: linear-gradient(135deg, #2A1E1A, #191312); border: 1px solid var(--cp-line);
    }
    .fv-ring { font-size: 46px; font-weight: 700; color: var(--cp-rose-l); line-height: 1; }
    .fv-lv { font-size: 14px; margin-top: 9px; font-weight: 600; }
    .fv-bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.09); margin-top: 14px; overflow: hidden; }
    .fv-bar-i { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cp-rose), var(--cp-gold)); }
    .fv-stage {
      display: flex; gap: 11px; padding: 13px 14px; border-bottom: 1px solid var(--cp-line);
      position: relative;
    }
    .fv-stage:last-child { border-bottom: none; }
    .fv-dot {
      width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
      border: 2px solid var(--cp-line-2); display: flex; align-items: center; justify-content: center;
      font-size: 12px; color: var(--cp-dimmer); background: var(--cp-bg);
    }
    .fv-stage.done .fv-dot { border-color: var(--cp-green); color: var(--cp-green); }
    .fv-stage.cur .fv-dot { border-color: var(--cp-rose); color: var(--cp-rose-l); }
    .fv-stage.cur { background: rgba(201,142,138,0.05); }
    .fv-rew { font-size: 12px; color: var(--cp-gold-l); margin-top: 5px; }

    /* ── 07 记忆页 ── */
    .mp-tabs { display: flex; gap: 6px; padding: 12px 14px 0; }
    .mp-tab {
      flex: 1; text-align: center; padding: 9px 0; font-size: 13px; font-weight: 600;
      color: var(--cp-dim); border-bottom: 2px solid transparent; cursor: pointer;
    }
    .mp-tab.on { color: var(--cp-rose-l); border-bottom-color: var(--cp-rose); }
    .mp-item { padding: 13px 15px; border-bottom: 1px solid var(--cp-line); }
    .mp-t { font-size: 13.5px; line-height: 1.65; color: var(--cp-text); }
    .mp-m { font-size: 11px; color: var(--cp-dimmer); margin-top: 6px; }
    /* [promise-ledger-v1] 约定页：逾期用暖色提醒，已兑现压暗，不抢当前约定 */
    .mp-m.is-overdue { color: #E0A14A; }
    .mp-m.is-kept { color: rgba(160,200,170,0.75); }
    /* [episodes-v1] 往事回顾与散装事件在同一列表里，用左侧竖线区分「一段剧情」与「一句话」 */
    .mp-item.is-ep { border-left: 2px solid rgba(200,170,230,0.45); padding-left: 13px; }
    .mp-item.is-ep .mp-m { color: rgba(200,170,230,0.72); }
    /* [pinned-v1] 印象条目的三个动作按钮：低饱和、不抢正文，但要点得到 */
    .mp-ops { display: flex; gap: 10px; margin-top: 8px; }
    .mp-ops button { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px;
      border: 1px solid var(--cp-line); background: transparent;
      color: var(--cp-dim, #999); font-size: 11px; line-height: 1.6; }
    .mp-ops button:active { background: rgba(255,255,255,0.06); }
    .mp-item.is-pin { border-left: 2px solid rgba(224,161,74,0.65); padding-left: 13px; }
    .mp-sum { padding: 12px 15px 4px; font-size: 11.5px; color: var(--cp-dimmer); }
    .mp-lock { text-align: center; padding: 40px 24px; color: var(--cp-dimmer); font-size: 13px; line-height: 1.9; }
    .mp-moments { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 14px; }

    /* ── 08 消息页 / 09 系统消息 ── */
    .ms-av { width: 48px; height: 48px; border-radius: 15px; object-fit: cover; flex-shrink: 0; background: #0B0807; }
    .ms-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 9999px; background: rgba(201,142,138,0.16); color: var(--cp-rose-l); border: 1px solid rgba(201,142,138,0.3); }
    .ms-prev { font-size: 12.5px; color: var(--cp-dim); margin-top: 3px; line-height: 1.45;
              display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    .ms-unread {
      min-width: 18px; height: 18px; border-radius: 9px; background: var(--cp-red);
      color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center;
      justify-content: center; padding: 0 5px; flex-shrink: 0;
    }
    .ms-sysdot { width: 9px; height: 9px; border-radius: 50%; background: var(--cp-red); flex-shrink: 0; }
    .ms-pin { font-size: 10.5px; color: var(--cp-gold-l); }

    /* ── 10 钱包 ── */
    .wl-bal {
      border-radius: 18px; padding: 20px; text-align: center;
      background: linear-gradient(135deg, #33231C, #1C1512); border: 1px solid var(--cp-line-2);
    }
    .wl-gem { font-size: 36px; font-weight: 700; color: var(--cp-gold-l); }
    .wl-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .wl-tier {
      border: 1px solid var(--cp-line); border-radius: 13px; padding: 11px 8px;
      text-align: center; background: var(--cp-card); cursor: pointer; position: relative;
    }
    .wl-tier.on { border-color: var(--cp-gold); background: linear-gradient(135deg, rgba(212,175,55,0.14), var(--cp-card)); }
    .wl-tier .p { font-size: 15px; font-weight: 700; }
    .wl-tier .b { font-size: 9.5px; color: var(--cp-dimmer); margin-top: 3px; line-height: 1.35; }
    .wl-check {
      position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%;
      background: var(--cp-gold); color: #2A1F14; font-size: 10px; font-weight: 700;
      display: none; align-items: center; justify-content: center;
    }
    .wl-tier.on .wl-check { display: flex; }
    .wl-bar {
      position: sticky; bottom: 0; display: flex; align-items: center; gap: 11px;
      padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
      background: rgba(20,16,14,0.96); border-top: 1px solid var(--cp-line); backdrop-filter: blur(14px);
    }
    .wl-mem {
      border: 1px solid var(--cp-line); border-radius: 16px; padding: 15px; margin-bottom: 11px;
      background: var(--cp-card);
    }
    .wl-mem.on { border-color: rgba(16,185,129,0.5); background: linear-gradient(135deg, rgba(16,185,129,0.09), var(--cp-card)); }
    .wl-mem.ghost { opacity: 0.55; }
    .wl-mem .nm { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
    .wl-mem .pr { font-size: 20px; font-weight: 700; color: var(--cp-gold-l); margin: 9px 0 4px; }
    .wl-perk { font-size: 12.5px; color: var(--cp-dim); line-height: 1.85; }
    .wl-perk .on { color: var(--cp-green); }
    .wl-perk .off { color: var(--cp-dimmer); }

    /* ── 11 我的 ── */
    .me-hd { display: flex; align-items: center; gap: 14px; padding: 22px 16px 18px; }
    .me-av {
      width: 64px; height: 64px; border-radius: 22px; background: linear-gradient(135deg, #3A2A24, #241A16);
      border: 1px solid var(--cp-line-2); display: flex; align-items: center; justify-content: center;
      font-size: 27px;
    }
    .me-nm { font-size: 19px; font-weight: 700; }
    .me-days { font-size: 12px; color: var(--cp-dim); margin-top: 4px; }
    .me-vip {
      margin: 0 16px 14px; padding: 13px 15px; border-radius: 15px;
      background: linear-gradient(135deg, #2E211B, #1B1412); border: 1px solid var(--cp-line-2);
      display: flex; align-items: center; gap: 11px; cursor: pointer;
    }
    .me-vip .crown { font-size: 21px; }
    .me-vip .t { font-size: 14.5px; font-weight: 700; }
    .me-vip .d { font-size: 11.5px; color: var(--cp-dim); margin-top: 2px; }
    .me-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 0 16px 16px; }
    .me-gi {
      background: var(--cp-card); border: 1px solid var(--cp-line); border-radius: 14px;
      padding: 13px 5px; text-align: center; cursor: pointer;
    }
    .me-gi .i { font-size: 20px; }
    .me-gi .t { font-size: 11.5px; margin-top: 6px; color: var(--cp-dim); }
    .me-sw {
      display: flex; align-items: center; gap: 11px; padding: 12px 15px;
      border-bottom: 1px solid var(--cp-line);
    }
    .me-sw:last-child { border-bottom: none; }
    .me-tog {
      width: 42px; height: 24px; border-radius: 12px; background: rgba(255,255,255,0.13);
      position: relative; flex-shrink: 0; cursor: pointer; transition: background 0.18s;
    }
    .me-tog.on { background: var(--cp-rose); }
    .me-tog::after {
      content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
      border-radius: 50%; background: #fff; transition: transform 0.18s;
    }
    .me-tog.on::after { transform: translateX(18px); }

    /* ── 顶部 tab（发现页设计稿：推荐 + 金色下划线 + 剧场版专区） ── */
    .dp-toptabs {
      position: absolute !important;
      top: calc(var(--topbar-top, 14px) + 10px) !important;
      left: 14px !important;
      right: 54px !important;
      display: flex !important;
      justify-content: flex-start !important;
      align-items: center !important;
      gap: 14px !important;
      padding: 0 !important;
      z-index: 35 !important;
      pointer-events: auto !important;
    }
    .dp-toptab {
      font-size: 16px; font-weight: 700; color: var(--cp-dimmer);
      background: none; border: none; padding: 0 0 9px; cursor: pointer; position: relative;
    }
    .dp-toptab.on { color: var(--cp-text); }
    .dp-toptab.on::after {
      content: ""; position: absolute; left: 50%; transform: translateX(-50%);
      bottom: 0; width: 22px; height: 2.5px; border-radius: 2px; background: var(--cp-gold);
    }


    /* ═══════════════════════════════════════════════════════════════
       v63 · 发现页批注 #3/#4/#5/#6/#7
       评论半屏弹层（排序/楼中楼/引用/点赞/删除）+ 输入栏
       分享弹层（Web Share 降级）+ 举报表单（原因 chips + 24h 去重）
       ═══════════════════════════════════════════════════════════════ */

    /* ── 评论弹层骨架 ── */
    #discover-comment-sheet .dpc-card {
      max-height: 74vh; display: flex; flex-direction: column;
    }
    .dpc-handle {
      width: 38px; height: 4px; border-radius: 3px; background: rgba(255,255,255,0.22);
      margin: 9px auto 2px; flex-shrink: 0;
    }
    .dpc-sortbar {
      display: flex; align-items: center; gap: 4px;
      padding: 8px 16px 10px; border-bottom: 1px solid var(--cp-line, #382C27); flex-shrink: 0;
    }
    .dpc-sort {
      font-size: 12.5px; padding: 5px 13px; border-radius: 9999px;
      background: none; border: none; color: #BFAEA6; cursor: pointer; font-weight: 600;
    }
    .dpc-sort.on { background: rgba(201,142,138,0.16); color: #E0ADA9; }
    .dpc-sort-n { font-size: 11px; color: #7A6960; margin-left: 5px; }
    .dpc-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }

    /* ── 评论行 ── */
    .dpc-item { padding: 13px 16px; border-bottom: 1px solid rgba(56,44,39,0.7); position: relative; }
    .dpc-item.mine { background: rgba(212,175,55,0.06); }
    .dpc-item.pending { opacity: 0.72; }
    .dpc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .dpc-av {
      width: 27px; height: 27px; border-radius: 50%; flex-shrink: 0;
      background: linear-gradient(135deg, #3A2A24, #241A16);
      display: flex; align-items: center; justify-content: center; font-size: 12px; color: #D4AF37;
    }
    .dpc-who { font-size: 12.5px; font-weight: 600; }
    .dpc-when { font-size: 10.5px; color: #7A6960; }
    .dpc-likes { margin-left: auto; font-size: 11.5px; color: #BFAEA6; }
    .dpc-likes.on { color: #E0ADA9; }
    .dpc-text { font-size: 13.5px; line-height: 1.65; color: #F5EBE6; }
    .dpc-trans {
      font-size: 12px; color: #BFAEA6; line-height: 1.6; margin-top: 7px;
      padding: 8px 10px; background: rgba(0,0,0,0.26); border-radius: 9px; display: none;
    }
    .dpc-trans.show { display: block; }
    .dpc-acts { display: flex; align-items: center; gap: 14px; margin-top: 9px; }
    .dpc-act { font-size: 11.5px; color: #7A6960; background: none; border: none; cursor: pointer; padding: 0; }
    .dpc-act:hover, .dpc-act:active { color: #E0ADA9; }
    .dpc-badge { font-size: 10px; color: var(--cp-gold, #D4AF37); }
    .dpc-locked { font-size: 10.5px; color: #BFAEA6; background: none; border: none; cursor: default; }

    /* 楼中楼 */
    .dpc-reply {
      margin: 10px 0 0 34px; padding: 9px 11px; border-radius: 10px;
      background: rgba(255,255,255,0.045); border-left: 2px solid rgba(201,142,138,0.4);
    }
    .dpc-reply-who { font-size: 11.5px; font-weight: 600; color: #E0ADA9; }
    .dpc-reply-txt { font-size: 12.5px; line-height: 1.6; margin-top: 3px; }
    .dpc-authorliked { font-size: 10.5px; color: #D4AF37; margin-top: 5px; }

    /* 引用条 */
    .dpc-quote {
      display: flex; align-items: center; gap: 8px; margin: 0 16px 8px;
      padding: 8px 11px; border-radius: 10px; font-size: 12px;
      background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.28); color: #F3E5AB;
    }
    .dpc-quote span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .dpc-quote button { background: none; border: none; color: #BFAEA6; cursor: pointer; font-size: 14px; padding: 0; }

    /* 输入栏 */
    .dpc-inputbar {
      display: flex; align-items: center; gap: 9px; padding: 11px 14px;
      padding-bottom: calc(11px + env(safe-area-inset-bottom, 0px));
      border-top: 1px solid rgba(56,44,39,0.9); background: rgba(20,16,14,0.96);
      backdrop-filter: blur(14px); flex-shrink: 0;
    }
    .dpc-input {
      flex: 1; background: #221B18; border: 1px solid #382C27; border-radius: 9999px;
      padding: 9px 14px; color: #F5EBE6; font-size: 13.5px; outline: none; min-width: 0;
    }
    .dpc-input:focus { border-color: #C98E8A; }
    .dpc-input::placeholder { color: #7A6960; }
    .dpc-send {
      border: none; border-radius: 9999px; padding: 9px 17px; font-size: 13px; font-weight: 600;
      background: #4A3A34; color: #7A6960; cursor: not-allowed; flex-shrink: 0;
    }
    .dpc-send.ready { background: linear-gradient(135deg, #8E3543, #7B2E3B); color: #FFF6F2; cursor: pointer; }

    /* ── 分享 / 举报 通用底部弹层 ── */
    .vb-sheet {
      position: fixed; inset: 0; z-index: 125000; display: none;
      background: rgba(0,0,0,0.66); backdrop-filter: blur(6px);
      align-items: flex-end; justify-content: center;
    }
    .vb-sheet.open { display: flex; }
    .vb-sheet-card {
      width: 100%; max-width: 520px; max-height: 84vh; overflow-y: auto;
      background: #1A1412; border: 1px solid #382C27; border-bottom: none;
      border-radius: 20px 20px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    }
    .vb-handle { width: 38px; height: 4px; border-radius: 3px; background: rgba(255,255,255,0.22); margin: 0 auto 12px; }
    .vb-t { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

    /* 分享卡预览 */
    .vb-card-prev {
      border: 1px solid #382C27; border-radius: 15px; overflow: hidden; margin-bottom: 16px;
      background: #221B18;
    }
    .vb-card-prev img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
    .vb-card-prev .bd { padding: 11px 13px 13px; }
    .vb-card-prev .nm { font-size: 15px; font-weight: 700; }
    .vb-card-prev .hk { font-size: 12.5px; color: #BFAEA6; line-height: 1.6; margin-top: 6px; }
    .vb-share-url {
      margin-top: 10px;
      padding: 7px 10px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(232, 168, 124, 0.28);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      cursor: pointer;
    }
    .vb-share-url:active { background: rgba(232, 168, 124, 0.12); }
    .vb-su-txt {
      font-size: 11.5px;
      color: #F0D6C6;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      flex: 1;
      min-width: 0;
    }
    .vb-su-btn {
      font-size: 11px;
      font-weight: 600;
      color: #1A1412;
      background: #E8A87C;
      padding: 3px 9px;
      border-radius: 999px;
      flex-shrink: 0;
    }
    .vb-card-prev .bd-row { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; }
    .vb-qr {
      width: 52px; height: 52px; border-radius: 8px; background: #F5EBE6;
      display: flex; align-items: center; justify-content: center; font-size: 9px; color: #382C27;
      text-align: center; line-height: 1.2; font-weight: 700;
    }
    .vb-chans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
    .vb-chan { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
    .vb-chan .ic {
      width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
      font-size: 21px; background: #221B18; border: 1px solid #382C27;
    }
    .vb-chan .nm { font-size: 10.5px; color: #BFAEA6; }
    .vb-chan:active .ic { background: #2B221F; }

    /* 举报表单 */
    .vb-quote-box {
      border-left: 2px solid #C98E8A; background: rgba(201,142,138,0.08);
      padding: 9px 11px; border-radius: 9px; font-size: 12.5px; color: #BFAEA6;
      line-height: 1.6; margin-bottom: 15px; max-height: 74px; overflow: hidden;
    }
    .vb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
    .vb-chip {
      font-size: 12.5px; padding: 7px 13px; border-radius: 9999px; cursor: pointer;
      background: #221B18; border: 1px solid #382C27; color: #BFAEA6;
    }
    .vb-chip.on { background: rgba(201,142,138,0.16); border-color: #C98E8A; color: #E0ADA9; }
    .vb-textarea {
      width: 100%; background: #221B18; border: 1px solid #382C27; border-radius: 11px;
      padding: 10px 12px; color: #F5EBE6; font-size: 13px; outline: none; resize: none;
      min-height: 66px; font-family: inherit;
    }
    .vb-textarea:focus { border-color: #C98E8A; }
    .vb-acts { display: flex; gap: 10px; margin-top: 15px; }
    .vb-btn {
      flex: 1; text-align: center; border-radius: 9999px; padding: 11px 0; font-size: 14px;
      font-weight: 600; cursor: pointer; border: 1px solid #4A3A34; background: #2B221F; color: #F5EBE6;
    }
    .vb-btn.primary { background: linear-gradient(135deg, #8E3543, #7B2E3B); border-color: rgba(201,142,138,0.4); color: #FFF6F2; }
    .vb-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

    /* ── 底部一级导航 Tab 栏（发现 / 列表 / 消息 / 我的 共用常驻） ── */
    #discover-tabbar {
      position: absolute; left: 0; right: 0; bottom: 0;
      height: calc(var(--dp-tabbar-h) + env(safe-area-inset-bottom, 0px));
      padding-bottom: env(safe-area-inset-bottom, 0px);
      display: flex; align-items: stretch;
      background: rgba(10, 7, 6, 0.92);
      backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      z-index: 95;
    }
    .dp-tab {
      flex: 1;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
      border: none; background: none; padding: 0;
      color: rgba(245, 235, 230, 0.46);
      font-family: var(--wd-font-sans);
      font-size: 10.5px; font-weight: 500;
      cursor: pointer; -webkit-tap-highlight-color: transparent;
    }
    .dp-tab-icon { position: relative; display: block; width: 21px; height: 21px; }
    .dp-tab-icon svg { display: block; width: 100%; height: 100%; }
    .dp-tab.active { color: var(--wd-warm-ivory); font-weight: 700; }
    .dp-tab.disabled { color: rgba(245, 235, 230, 0.28); }
    .dp-tab-dot {
      position: absolute; top: -1px; right: -5px;
      width: 6px; height: 6px; border-radius: 50%;
      background: #E4574F;
      box-shadow: 0 0 6px rgba(228, 87, 79, 0.9);
    }

    /* ── 评论浮层（复用后端 /api/comments 官方精选） ── */
    #discover-comment-sheet {
      position: absolute; inset: 0; z-index: 120;
      display: none; align-items: flex-end; justify-content: center;
      background: rgba(8, 5, 4, 0.58);
    }
    #discover-comment-sheet.open { display: flex; }
    .dpc-card {
      width: 100%; max-height: 64%;
      display: flex; flex-direction: column;
      background: #17110F;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 20px 20px 0 0;
      padding-bottom: env(safe-area-inset-bottom, 0px);
      animation: dpcRise 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes dpcRise { from { transform: translateY(100%); } to { transform: none; } }
    .dpc-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px 8px;
    }
    .dpc-title { font-family: var(--wd-font-sans); font-size: 14px; font-weight: 700; color: #F0E6DF; }
    .dpc-title em { font-style: normal; font-size: 10.5px; font-weight: 500; color: rgba(214, 198, 190, 0.5); margin-left: 6px; }
    .dpc-x {
      width: 26px; height: 26px; border-radius: 50%;
      border: none; background: rgba(255, 255, 255, 0.08);
      color: rgba(245, 235, 230, 0.75); font-size: 12px;
      display: flex; align-items: center; justify-content: center; cursor: pointer;
    }
    .dpc-list { flex: 1; overflow-y: auto; padding: 0 16px 16px; scrollbar-width: none; }
    .dpc-list::-webkit-scrollbar { display: none; }
    .dpc-list .phc-item { padding: 12px 0; }
    .dpc-list .phc-likes { color: #F0537A; margin-right: 6px; font-weight: 600; }
    .dpc-loading { padding: 24px 0; text-align: center; font-size: 12px; color: rgba(214, 198, 190, 0.55); }

    /* ── 聊天页激活模式：彻底隐藏发现页底层元素，杜绝任何 GPU 合成穿透闪烁 ── */
    #stage.chat-mode #video-slider,
    #stage.chat-mode #text-hud-layer,
    #stage.chat-mode #discover-tabbar,
    #stage.chat-mode #discover-action-rail,
    #stage.chat-mode #discover-top-strip,
    #stage.chat-mode .dp-toptabs,
    #stage.chat-mode #reel-indicators,
    #stage.chat-mode #hitbox-layer,
    #stage.chat-mode #drink-hotspot-layer,
    #stage.chat-mode #choice-modal {
      visibility: hidden !important;
      pointer-events: none !important;
    }

    /* ── 2. 二级页面：互动对话 (Chat Page) 容器 ── */
    .chat-page {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      width: 100%; height: 100%;
      box-sizing: border-box;
      background: #1A1412 !important;
      background-color: #1A1412 !important;
      z-index: 100;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      overflow-x: clip;
      /* [chat-scroll-v1] 聊天页整页兜一层：任何内部滚动都不许链式带动外层发现页换人 */
      overscroll-behavior: contain;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      -webkit-transform: translate3d(100%, 0, 0);
      transform: translate3d(100%, 0, 0);
      transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
      pointer-events: none;
      opacity: 1;
      will-change: transform;
    }

    .chat-page > .chat-messages-container,
    .chat-page .chat-bottom-dock {
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      overflow-x: hidden;
    }

    .chat-page .chat-stream-list {
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      flex-shrink: 0;
      overflow: visible;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .chat-page .chat-stream-list::-webkit-scrollbar {
      width: 0;
      height: 0;
      display: none;
    }

    .chat-page.active {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
      pointer-events: auto;
      opacity: 1;
    }

    /* 背景柔和微光（Phase 1 解放畫布：變數化柔焦與暗幕亮度） */
    .chat-bg-ambient {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background-size: cover;
      background-position: center;
      filter: blur(var(--am2-bg-blur, 10px)) brightness(var(--am2-bg-dim, 0.52)) saturate(1.06);
      -webkit-filter: blur(var(--am2-bg-blur, 10px)) brightness(var(--am2-bg-dim, 0.52)) saturate(1.06);
      -webkit-transform: translate3d(0, 0, 0) scale(1.08);
      transform: translate3d(0, 0, 0) scale(1.08);
      transition: filter 0.18s ease, -webkit-filter 0.18s ease;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
      will-change: transform;
      z-index: 0;
      pointer-events: none;
      opacity: 0.85;
    }

    .chat-bg-glow {
      position: absolute;
      top: -10%; right: -10%;
      width: 320px; height: 320px;
      background: radial-gradient(circle, rgba(142, 90, 90, 0.22) 0%, transparent 70%);
      z-index: 1;
      pointer-events: none;
    }

    /* ── 3. Chat 顶栏 (批注 ① & ⑦) ── */
    .chat-top-header {
      position: relative;
      z-index: 10;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: max(12px, env(safe-area-inset-top, 12px)) 14px 10px;
      background: rgba(26, 20, 18, 0.85);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(201, 142, 138, 0.12);
    }

    .chat-back-btn {
      width: 38px; height: 38px;
      border-radius: 50%;
      background: rgba(44, 32, 28, 0.6);
      border: 1px solid rgba(201, 142, 138, 0.2);
      color: var(--wd-warm-ivory);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
      flex-shrink: 0;
    }

    .chat-back-btn:active {
      transform: scale(0.92);
      background: rgba(74, 45, 36, 0.8);
    }

    .chat-character-identity {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 0 10px;
      cursor: pointer;
      overflow: hidden;
    }

    .chat-avatar-wrapper {
      position: relative;
      width: 40px; height: 40px;
      flex-shrink: 0;
    }

    .chat-avatar-img {
      width: 100%; height: 100%;
      border-radius: 50%;
      object-fit: cover;
      border: 1.5px solid var(--wd-rosewood);
    }

    .chat-status-dot {
      position: absolute;
      bottom: 1px; right: 1px;
      width: 9px; height: 9px;
      border-radius: 50%;
      background: #34d399;
      border: 1.5px solid var(--wd-espresso-black);
    }

    .chat-name-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .chat-name-row {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .chat-char-name {
      font-family: var(--wd-font-serif);
      font-size: 15.5px;
      font-weight: 700;
      color: var(--wd-warm-ivory);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .chat-favor-badge {
      font-family: var(--wd-font-sans);
      font-size: 10px;
      font-weight: 600;
      padding: 1px 7px;
      border-radius: 9999px;
      background: rgba(201, 142, 138, 0.18);
      color: var(--wd-rosewood);
      border: 1px solid rgba(201, 142, 138, 0.35);
      white-space: nowrap;
    }

    .chat-online-hint {
      font-family: var(--wd-font-sans);
      font-size: 10.5px;
      color: var(--wd-warm-taupe);
      white-space: nowrap;
      opacity: 0.85;
    }

        /* v68 灵感胶囊：输入框上方横滑，点击直填 */
    .chat-inspiration-bar {
      order: -2;                /* v68：置于展开的角色栏与输入框之上 */
      width: 100%;              /* v68：独占一行，不挤压输入框 */
      flex: 0 0 100%;
      display: flex;
      gap: 6px;
      padding: 0 0 3px;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      align-items: center;
    }
    .chat-inspiration-bar::-webkit-scrollbar { display: none; }
    .chat-inspiration-track {
      display: flex;
      gap: 8px;
      flex-shrink: 0;
    }
    .chat-inspiration-chip {
      flex-shrink: 0;
      max-width: 62vw;
      padding: 7px 13px;
      border-radius: 999px;
      background: rgba(201, 142, 138, 0.13);
      border: 1px solid rgba(201, 142, 138, 0.34);
      color: #F0DCD6;
      font-size: 12.5px;
      line-height: 1.35;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: pointer;
      transition: background .18s ease, transform .12s ease;
    }
    .chat-inspiration-chip:active { transform: scale(.96); }
    .chat-inspiration-chip:hover { background: rgba(201, 142, 138, 0.24); }

    .chat-inspiration-refresh-btn {
      flex-shrink: 0;
      width: 28px;
      height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: rgba(201, 142, 138, 0.16);
      border: 1px solid rgba(201, 142, 138, 0.35);
      color: #F0DCD6;
      cursor: pointer;
      transition: background 0.18s ease, transform 0.12s ease;
      padding: 0;
      margin-left: 2px;
    }
    .chat-inspiration-refresh-btn:active { transform: scale(.92); }
    .chat-inspiration-refresh-btn:hover { background: rgba(201, 142, 138, 0.3); color: #FFF; }
    .chat-inspiration-refresh-btn.spinning svg {
      animation: chipSpin 0.75s linear infinite;
    }
    @keyframes chipSpin {
      100% { transform: rotate(360deg); }
    }

    /* v68 情感合集胶囊（顶栏右侧） */
    .chat-moments-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 5px 11px 5px 9px;
      border-radius: 999px;
      background: rgba(201, 142, 138, 0.16);
      border: 1px solid rgba(201, 142, 138, 0.38);
      color: #F0DCD6;
      font-size: 12px;
      cursor: pointer;
      position: relative;
      transition: background .18s ease;
    }
    .chat-moments-pill:hover { background: rgba(201, 142, 138, 0.26); }
    .chat-moments-pill-icon { font-size: 11px; color: #C98E8A; }
    .chat-moments-pill-dot {
      position: absolute;
      top: 3px;
      right: 4px;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #EF4444;
    }

    .chat-header-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .chat-icon-btn {
      height: 34px;
      padding: 0 8px;
      border-radius: 17px;
      background: rgba(44, 32, 28, 0.65);
      border: 1px solid rgba(201, 142, 138, 0.2);
      color: var(--wd-warm-taupe);
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .chat-icon-btn:active {
      transform: scale(0.94);
      background: rgba(74, 45, 36, 0.8);
    }

    .chat-icon-btn.liked {
      color: #f43f5e;
      border-color: rgba(244, 63, 94, 0.4);
    }

    /* ── 多选分享顶栏 (批注 ⑩) ── */
    .chat-select-header {
      position: relative;
      z-index: 10;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: max(12px, env(safe-area-inset-top, 12px)) 16px 10px;
      background: var(--wd-charcoal);
      border-bottom: 1px solid rgba(201, 142, 138, 0.2);
    }

    .chat-select-cancel-btn, .chat-select-all-btn {
      background: none;
      border: none;
      color: var(--wd-warm-taupe);
      font-family: var(--wd-font-sans);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
    }

    .chat-select-title {
      font-family: var(--wd-font-sans);
      font-size: 15px;
      font-weight: 600;
      color: var(--wd-warm-ivory);
    }

    /* ── 4. 模型与状态栏 (批注 ①) ── */
    .chat-sub-model-bar {
      position: relative;
      z-index: 5;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 16px;
      background: rgba(44, 32, 28, 0.45);
      border-bottom: 1px solid rgba(201, 142, 138, 0.08);
      font-family: var(--wd-font-sans);
      font-size: 11px;
    }

    /* ── [reply-style-v1] 面对面四档回复风格胶囊栏（默认 / 真實 / 温柔 / spicy） ── */
    .chat-reply-style-bar {
      position: relative;
      z-index: 5;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 5px 14px;
      background: rgba(28, 20, 19, 0.62);
      border-bottom: 1px solid rgba(201, 142, 138, 0.10);
      font-family: var(--wd-font-sans);
      overflow-x: auto;
      scrollbar-width: none;
    }
    .chat-reply-style-bar::-webkit-scrollbar { display: none; }
    .crs-label {
      flex-shrink: 0;
      font-size: 11px;
      font-weight: 600;
      color: rgba(235, 218, 210, 0.58);
      letter-spacing: 0.02em;
    }
    .crs-pills {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex: 1;
      min-width: 0;
    }
    .crs-pill {
      appearance: none;
      border: 1px solid rgba(255, 255, 255, 0.12);
      background: rgba(255, 255, 255, 0.04);
      color: rgba(244, 234, 228, 0.78);
      border-radius: 999px;
      padding: 3px 11px;
      font-size: 11.5px;
      font-weight: 500;
      line-height: 1.35;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.18s ease;
    }
    .crs-pill:hover {
      background: rgba(201, 142, 138, 0.14);
      border-color: rgba(201, 142, 138, 0.36);
      color: #fff;
    }
    .crs-pill.active {
      background: linear-gradient(135deg, rgba(201, 142, 138, 0.34), rgba(168, 98, 114, 0.42));
      border-color: rgba(232, 174, 168, 0.68);
      color: #fff6f4;
      font-weight: 700;
      box-shadow: 0 1px 8px rgba(201, 142, 138, 0.25);
    }
    .crs-pill.is-spicy {
      font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      letter-spacing: 0.02em;
    }
    .crs-pill.is-spicy.active {
      background: linear-gradient(135deg, rgba(225, 45, 75, 0.52), rgba(185, 28, 60, 0.65));
      border-color: rgba(251, 113, 133, 0.82);
      color: #fff1f2;
      box-shadow: 0 1px 10px rgba(225, 45, 75, 0.38);
    }
    .crs-pill.is-locked {
      border-style: dashed;
      border-color: rgba(244, 114, 182, 0.32);
      background: rgba(255, 255, 255, 0.02);
      color: rgba(244, 234, 228, 0.46);
    }
    .crs-pill.is-locked:hover {
      border-color: rgba(251, 113, 133, 0.55);
      background: rgba(225, 45, 75, 0.10);
      color: rgba(255, 228, 230, 0.85);
    }

    .chat-model-tag {
      display: flex;
      align-items: center;
      gap: 5px;
      color: var(--wd-rosewood);
      font-weight: 500;
    }

    .chat-quota-tag {
      color: var(--wd-warm-taupe);
      opacity: 0.8;
    }

    /* ── 5. 消息滚动流 ── */
    .chat-messages-container {
      position: relative;
      z-index: 2;
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 14px 14px 20px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;          /* v83: 隐藏消息区滚动条（与全站滚动容器惯例一致） */
      -ms-overflow-style: none;
      /* 🔴 [chat-scroll-v1] 消息滚到顶/底后，惯性滚动会**链式**传给父级 #stage，
         触发发现页的 TikTok 换人（正在聊的角色被换成下一个，多半是英文卡）。
         这里把滚动边界锁在本容器内，滚到头就停住，不再带动外层。 */
      overscroll-behavior: contain;
      overscroll-behavior-y: contain;
    }
    .chat-messages-container::-webkit-scrollbar { display: none; }

    /* 置顶 AI 安全文案 (批注 ⑪) */
    .chat-disclaimer-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      margin: 4px 0 10px;
    }

    .chat-disclaimer-pill, .chat-security-pill {
      max-width: 90%;
      text-align: center;
      padding: 5px 12px;
      border-radius: 9999px;
      background: rgba(44, 32, 28, 0.6);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(201, 142, 138, 0.12);
      font-family: var(--wd-font-sans);
      font-size: 10.5px;
      line-height: 1.4;
      color: var(--wd-warm-taupe);
    }

    .chat-security-pill {
      font-size: 10px;
      opacity: 0.85;
    }

    .chat-stream-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    /* ── 6. 消息卡片体系 ── */
    .chat-msg-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      position: relative;
      transition: all 0.2s ease;
    }

    .chat-msg-row.selectable {
      padding-left: 28px;
    }

    /* [cheat-favor-v1] 系统提示卡（好感度作弊器）：居中窄条、无头像、不可重新生成 */
    .chat-msg-row.system {
      justify-content: center;
      padding: 2px 10px;
    }
    .chat-msg-row.system .chat-system-card {
      max-width: 94%;
      padding: 9px 13px;
      border-radius: 12px;
      border: 1px dashed rgba(230, 176, 74, 0.55);
      background: rgba(230, 176, 74, 0.13);
      color: #F6DFAC;
      font-size: 12.5px;
      line-height: 1.65;
      text-align: center;
      letter-spacing: 0.2px;
      word-break: break-word;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    }

    /* 多选勾选圈 */
    .chat-msg-checkbox {
      position: absolute;
      left: 0;
      top: 10px;
      width: 20px; height: 20px;
      border-radius: 50%;
      border: 1.5px solid var(--wd-warm-taupe);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .chat-msg-checkbox.checked {
      background: var(--wd-rosewood-dark);
      border-color: var(--wd-rosewood);
    }

    .chat-msg-checkbox.checked::after {
      content: '✓';
      color: #fff;
      font-size: 12px;
      font-weight: 700;
    }

    /* AI 角色消息卡片 */
    .chat-msg-row.ai {
      justify-content: flex-start;
    }

    .chat-msg-row.ai .chat-msg-avatar {
      width: 46px; height: 46px;
      border-radius: 50%;
      object-fit: cover;
      border: 1px solid var(--wd-rosewood);
      flex-shrink: 0;
      margin-top: 2px;
    }

    .chat-msg-row.ai .chat-msg-bubble-wrapper {
      max-width: 82%;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .chat-msg-bubble {
      padding: 12px 14px;
      border-radius: 16px 16px 16px 4px;
      background: rgba(44, 32, 28, 0.88);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(201, 142, 138, 0.22);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
      position: relative;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    /* 长按浮起高亮态 (批注 ⑨) */
    .chat-msg-bubble.context-active {
      border-color: #f59e0b !important;
      box-shadow: 0 0 20px rgba(245, 158, 11, 0.45) !important;
      transform: translateY(-2px);
    }

    /* 台词文字排版与副语言分离渲染 (批注 ④) */
    .msg-dialogue-content {
      font-family: var(--wd-font-sans);
      font-size: 14.5px;
      line-height: 1.55;
      color: var(--wd-warm-ivory);
      word-break: break-word;
    }

    .msg-act-tag {
      font-style: italic;
      color: var(--wd-rosewood);
      margin: 0 2px;
      display: inline-block;
    }

    .msg-emotion-tag {
      color: var(--wd-warm-taupe);
      opacity: 0.9;
      margin: 0 2px;
    }

    .msg-thought-tag {
      color: #e0b4a4;
      font-style: italic;
    }

    /* 骨架屏 Loading 态 (批注 ③) */
    .skeleton-shimmer-box {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 4px 0;
    }

    .skeleton-line {
      height: 14px;
      border-radius: 6px;
      background: linear-gradient(90deg, rgba(74, 45, 36, 0.4) 0%, rgba(201, 142, 138, 0.25) 50%, rgba(74, 45, 36, 0.4) 100%);
      background-size: 200% 100%;
      animation: skeleton-sweep 1.6s infinite;
    }

    .skeleton-line.w-80 { width: 85%; }
    .skeleton-line.w-60 { width: 60%; }
    .skeleton-line.w-40 { width: 45%; }

    @keyframes skeleton-sweep {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    .skeleton-status-hint {
      font-family: var(--wd-font-sans);
      font-size: 11px;
      color: var(--wd-rosewood);
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 4px;
      animation: pulse 1.5s infinite;
    }

    /* 生图内嵌展示 (批注 ① & ②) */
    .msg-inline-image-box {
      margin-top: 10px;
      border-radius: 12px;
      overflow: hidden;
      position: relative;
      border: 1px solid rgba(201, 142, 138, 0.3);
      cursor: pointer;
    }

    .msg-inline-img {
      /* v41：竖版 9:16 完整显示。原 max-height:240px + object-fit:cover
         会把竖图按宽度撑满后垂直裁掉上下、只露中间约一半。 */
      width: 100%;
      height: auto;
      display: block;
      transition: transform 0.3s ease;
    }

    .msg-inline-image-box:active .msg-inline-img {
      transform: scale(0.98);
    }

    .msg-img-badge {
      position: absolute;
      right: 8px; bottom: 8px;
      background: rgba(26, 20, 18, 0.75);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border-radius: 9999px;
      padding: 3px 8px;
      font-family: var(--wd-font-sans);
      font-size: 10px;
      color: var(--wd-warm-ivory);
      border: 1px solid rgba(201, 142, 138, 0.2);
    }

    /* AI 卡片底部 4 大功能操作行 (批注 ①, ③, ④) */
    .chat-msg-actions-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 4px;
      flex-wrap: wrap;
    }

    .msg-action-pill {
      height: 25px;
      padding: 0 9px;
      border-radius: 9999px;
      background: rgba(44, 32, 28, 0.65);
      border: 1px solid rgba(201, 142, 138, 0.18);
      color: var(--wd-warm-taupe);
      font-family: var(--wd-font-sans);
      font-size: 11px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      transition: all 0.18s ease;
    }

    /* [chat-tts-manual-v1] 「试听」按钮：聊天页不再自动播，这里成了唯一的语音入口，
       必须比原来那个 🔊 图标显眼 —— 直接写文字并提亮一档。
       ⚠️ 选择器带 `.chat-msg-actions-row` 提特异性：本文件后面还有一套
       `.msg-action-pill { width:27px; height:27px; padding:0; font-size:13px }`
       的统一定义，同特异性会被它按出现顺序覆盖掉，两个中文字会挤成竖排。 */
    .chat-msg-actions-row .msg-action-pill--tts {
      width: auto;
      min-width: 0;
      height: 26px;
      padding: 0 12px;
      border-radius: 9999px;
      font-size: 11.5px;
      font-weight: 600;
      letter-spacing: 0.3px;
      white-space: nowrap;
      color: var(--wd-warm-ivory);
      background: rgba(201, 142, 138, 0.20);
      border-color: rgba(201, 142, 138, 0.42);
    }
    .chat-msg-actions-row .msg-action-pill--tts:active {
      background: rgba(201, 142, 138, 0.34);
    }

    /* [tts-cached-bright-v1] 当有缓存可供用户直接听取的时候，这个试听改为亮色的 */
    .chat-msg-actions-row .msg-action-pill--tts.is-cached {
      color: #ffffff !important;
      background: linear-gradient(135deg, #FF9E7D 0%, #D86B80 100%) !important;
      border: 1px solid rgba(255, 255, 255, 0.55) !important;
      box-shadow: 0 2px 10px rgba(232, 120, 130, 0.45), 0 0 4px rgba(255, 158, 125, 0.3) !important;
      font-weight: 700 !important;
      letter-spacing: 0.4px;
      opacity: 1 !important;
    }
    .chat-msg-actions-row .msg-action-pill--tts.is-cached:active {
      background: linear-gradient(135deg, #e88665 0%, #bd5267 100%) !important;
      transform: scale(0.95);
    }

    /* [scene-img-btn-v1] 「实时情境图」按钮（2026-10-27 用户要求：把 🎨 换成文字，太不明显）。
       与「试听」同病同治：选择器必须带 `.chat-msg-actions-row` 提特异性，
       否则被本文件后面那套 `.msg-action-pill { width:27px; padding:0; font-size:13px }`
       的图标版统一定义按出现顺序覆盖掉 → 五个中文字会挤成竖排。 */
    .chat-msg-actions-row .msg-action-pill--scene {
      width: auto;
      min-width: 0;
      height: 26px;
      padding: 0 11px;
      border-radius: 9999px;
      font-size: 11.5px;
      font-weight: 600;
      letter-spacing: 0.3px;
      white-space: nowrap;
      color: var(--wd-warm-ivory);
      background: rgba(201, 142, 138, 0.14);
      border-color: rgba(201, 142, 138, 0.34);
    }
    .chat-msg-actions-row .msg-action-pill--scene:active {
      background: rgba(201, 142, 138, 0.30);
    }

    .msg-action-pill:active {
      transform: scale(0.94);
      background: rgba(74, 45, 36, 0.9);
      border-color: var(--wd-rosewood);
    }

    .msg-action-pill.active {
      background: rgba(201, 142, 138, 0.25);
      color: var(--wd-warm-ivory);
      border-color: var(--wd-rosewood);
    }

    /* 用户发送的消息卡片 */
    .chat-msg-row.user {
      justify-content: flex-end;
    }

    .chat-msg-row.user .chat-msg-bubble-wrapper {
      max-width: 80%;
    }

    .chat-msg-row.user .chat-msg-bubble {
      max-width: 100%;
      border-radius: 16px 16px 4px 16px;
      background: var(--wd-grad-amber-glow);
      border: 1px solid rgba(201, 142, 138, 0.35);
      color: #ffffff;
      box-shadow: 0 4px 14px rgba(74, 45, 36, 0.4);
    }

    .chat-msg-row.user .msg-dialogue-content {
      color: #ffffff;
    }

    /* ── 7. ✦ 回复提示卡片栏 (批注 ④) ── */
    .chat-reply-hints-bar {
      position: relative;
      z-index: 10;
      padding: 10px 14px;
      background: rgba(36, 26, 23, 0.95);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-top: 1px solid rgba(201, 142, 138, 0.25);
      display: flex;
      flex-direction: column;
      gap: 8px;
      animation: slideUpIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reply-hints-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-family: var(--wd-font-sans);
      font-size: 11.5px;
      color: var(--wd-rosewood);
      font-weight: 600;
    }

    .reply-hints-close {
      background: none;
      border: none;
      color: var(--wd-warm-taupe);
      font-size: 13px;
      cursor: pointer;
    }

    .reply-hints-list {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .reply-hint-card {
      padding: 8px 12px;
      border-radius: 10px;
      background: rgba(44, 32, 28, 0.85);
      border: 1px solid rgba(201, 142, 138, 0.22);
      font-family: var(--wd-font-sans);
      font-size: 13px;
      color: var(--wd-warm-ivory);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all 0.2s ease;
    }

    .reply-hint-card:active, .reply-hint-card.filled {
      border-color: #f59e0b;
      background: rgba(245, 158, 11, 0.12);
      color: #fbbf24;
    }

    .hint-filled-tag {
      font-size: 10.5px;
      color: #f59e0b;
      font-weight: 600;
      white-space: nowrap;
      margin-left: 6px;
    }

    /* ── 8. 快捷引用工具条 (批注 ⑤) ── */
    .chat-quick-quote-bar {
      position: relative;
      z-index: 10;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 14px;
      background: rgba(26, 20, 18, 0.9);
      border-top: 1px solid rgba(201, 142, 138, 0.1);
      overflow-x: auto;
      scrollbar-width: none;
    }

    .chat-quick-quote-bar::-webkit-scrollbar {
      display: none;
    }

    .quick-quote-btn {
      flex-shrink: 0;
      height: 26px;
      padding: 0 10px;
      border-radius: 13px;
      background: rgba(44, 32, 28, 0.7);
      border: 1px solid rgba(201, 142, 138, 0.16);
      color: var(--wd-warm-taupe);
      font-family: var(--wd-font-sans);
      font-size: 11px;
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .quick-quote-btn:active, .quick-quote-btn.tap-flash {
      background: var(--wd-rosewood);
      color: #ffffff;
      border-color: var(--wd-rosewood);
      transform: scale(0.95);
    }

    .quote-sym {
      color: var(--wd-rosewood);
      font-weight: 700;
    }

    .quick-quote-btn:active .quote-sym {
      color: #ffffff;
    }

    /* ── 9. 底部输入主栏 (批注 ③ & ⑤) ── */
    .chat-bottom-dock {
      position: relative;
      z-index: 10;
      display: flex;
      flex-wrap: wrap;          /* v68：允许灵感胶囊独占一行 */
      align-items: flex-end;
      gap: 8px;
      padding: 8px 12px max(12px, env(safe-area-inset-bottom, 12px));
      background: var(--wd-charcoal);
      border-top: 1px solid rgba(201, 142, 138, 0.18);
    }

    .chat-input-wrapper {
      flex: 1;
      position: relative;
      display: flex;
      align-items: center;
      background: #17110f;
      border: 1px solid rgba(201, 142, 138, 0.28);
      border-radius: 22px;
      padding: 4px 40px 4px 14px;
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .chat-input-wrapper:focus-within {
      border-color: var(--wd-rosewood);
      box-shadow: 0 0 10px rgba(201, 142, 138, 0.25);
    }

    .chat-textarea {
      width: 100%;
      border: none;
      background: transparent;
      color: var(--wd-warm-ivory);
      font-family: var(--wd-font-sans);
      font-size: 14.5px;
      line-height: 1.4;
      resize: none;
      outline: none;
      max-height: 90px;
      scrollbar-width: none;          /* v83: 隐藏输入框滚动条（与全站滚动容器惯例一致） */
      -ms-overflow-style: none;
    }
    .chat-textarea::-webkit-scrollbar { display: none; }

    .chat-textarea::placeholder {
      color: rgba(213, 190, 180, 0.45);
    }

    .chat-expand-plus-btn {
      position: absolute;
      right: 6px;
      width: 30px; height: 30px;
      border-radius: 50%;
      background: rgba(44, 32, 28, 0.85);
      border: 1px solid rgba(201, 142, 138, 0.3);
      color: var(--wd-warm-ivory);
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .chat-expand-plus-btn.opened {
      transform: rotate(45deg);
      background: var(--wd-rosewood);
      border-color: var(--wd-rosewood);
      color: #fff;
    }

    /* 平滑滑出发送按钮 (批注 ⑤) */
    .chat-send-action-btn {
      height: 38px;
      padding: 0 14px;
      border-radius: 19px;
      background: var(--wd-grad-rose-btn);
      border: 1px solid rgba(245, 235, 230, 0.3);
      color: #ffffff;
      font-family: var(--wd-font-sans);
      font-size: 13.5px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 5px;
      cursor: pointer;
      flex-shrink: 0;
      box-shadow: 0 4px 12px rgba(201, 142, 138, 0.3);
      display: none;
      animation: scaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .chat-send-action-btn:active {
      transform: scale(0.94);
    }

    /* ── 10. 「+」记忆资产展开面板抽屉 (批注 ⑥) ── */
    .chat-plus-drawer {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 120;
    }

    .plus-drawer-backdrop {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0, 0, 0, 0.55);
      backdrop-filter: blur(4px);
    }

    .plus-drawer-sheet {
      position: absolute;
      left: 0; right: 0; bottom: 0;
      background: var(--wd-charcoal);
      border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(201, 142, 138, 0.25);
      padding: 16px 16px max(24px, env(safe-area-inset-bottom, 24px));
      display: flex;
      flex-direction: column;
      gap: 14px;
      animation: slideUpIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .plus-drawer-handle {
      width: 36px; height: 4px;
      border-radius: 2px;
      background: rgba(201, 142, 138, 0.3);
      margin: 0 auto 2px;
    }

    .plus-drawer-title {
      font-family: var(--wd-font-serif);
      font-size: 15px;
      font-weight: 700;
      color: var(--wd-warm-ivory);
      text-align: center;
    }

    .plus-drawer-grid {
      display: grid;
      /* [heart-line-v1] 从 3 张变 4 张（印象/日记/瞬间/好感度），改 2×2 避免第 4 张单独掉到第二行 */
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }

    .plus-asset-card {
      background: rgba(44, 32, 28, 0.7);
      border: 1px solid rgba(201, 142, 138, 0.18);
      border-radius: 12px;
      padding: 12px 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      text-align: center;
      transition: all 0.2s ease;
    }

    .plus-asset-card:active {
      transform: scale(0.96);
      background: rgba(74, 45, 36, 0.8);
    }

    .plus-asset-icon {
      font-size: 24px;
    }

    .plus-asset-name {
      font-family: var(--wd-font-sans);
      font-size: 12px;
      font-weight: 600;
      color: var(--wd-warm-ivory);
    }

    .plus-asset-badge {
      font-size: 9.5px;
      color: var(--wd-warm-taupe);
      opacity: 0.8;
    }

    .plus-asset-badge.unlocked {
      color: var(--wd-rosewood);
    }

    /* ── 11. 多选模式底部操作栏 (批注 ⑩) ── */
    .chat-multi-select-dock {
      position: relative;
      z-index: 10;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px max(14px, env(safe-area-inset-bottom, 14px));
      background: var(--wd-charcoal);
      border-top: 1px solid rgba(201, 142, 138, 0.2);
    }

    .select-dock-btn {
      flex: 1;
      height: 42px;
      border-radius: 21px;
      background: rgba(44, 32, 28, 0.8);
      border: 1px solid rgba(201, 142, 138, 0.25);
      color: var(--wd-warm-ivory);
      font-family: var(--wd-font-sans);
      font-size: 13.5px;
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      cursor: pointer;
    }

    .select-dock-btn.primary {
      background: var(--wd-grad-rose-btn);
      border-color: rgba(245, 235, 230, 0.3);
      font-weight: 600;
      color: #fff;
    }

    /* ── 12. 长按气泡快捷菜单 (批注 ⑨) ── */
    .bubble-context-menu {
      position: fixed;
      z-index: 200;
      background: rgba(28, 20, 18, 0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid rgba(245, 158, 11, 0.5);
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
      padding: 4px;
      animation: scaleIn 0.16s ease;
    }

    .bubble-menu-list {
      display: flex;
      align-items: center;
      gap: 2px;
    }

    .bubble-menu-item {
      padding: 6px 10px;
      border-radius: 8px;
      background: none;
      border: none;
      color: var(--wd-warm-ivory);
      font-family: var(--wd-font-sans);
      font-size: 12px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      transition: background 0.15s ease;
    }

    .bubble-menu-item:hover, .bubble-menu-item:active {
      background: rgba(201, 142, 138, 0.2);
    }

    .bubble-menu-item.danger {
      color: #f43f5e;
    }

    /* ── 13. 全屏大图查看器 (批注 ②) ── */
    .fullscreen-image-viewer {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 300;
      background: #000000;
      display: flex;
      flex-direction: column;
      animation: fadeIn 0.2s ease;
    }

    .image-viewer-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: max(16px, env(safe-area-inset-top, 16px)) 16px 12px;
      background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    }

    .image-source-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .source-tag {
      font-family: var(--wd-font-serif);
      font-size: 14px;
      font-weight: 700;
      color: var(--wd-rosewood);
    }

    .source-time {
      font-family: var(--wd-font-sans);
      font-size: 11px;
      color: var(--wd-warm-taupe);
      opacity: 0.8;
    }

    .image-viewer-close {
      width: 36px; height: 36px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.15);
      border: none;
      color: #ffffff;
      font-size: 16px;
      cursor: pointer;
    }

    .image-viewer-body {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      padding: 10px;
    }

    .image-viewer-body img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }

    .image-viewer-footer {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 16px max(24px, env(safe-area-inset-bottom, 24px));
      background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    }

    .image-footer-btn {
      flex: 1;
      height: 44px;
      border-radius: 22px;
      background: rgba(44, 32, 28, 0.85);
      border: 1px solid rgba(201, 142, 138, 0.3);
      color: var(--wd-warm-ivory);
      font-family: var(--wd-font-sans);
      font-size: 13.5px;
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      cursor: pointer;
    }

    .image-footer-btn.primary {
      background: var(--wd-grad-rose-btn);
      border-color: rgba(245, 235, 230, 0.35);
      font-weight: 600;
      color: #fff;
    }

    /* ── 14. 角色个人页浮层 (批注 ⑦) ── */
    .character-profile-modal {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 250;
    }

    .profile-modal-backdrop {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0, 0, 0, 0.65);
      backdrop-filter: blur(8px);
    }

    .profile-modal-sheet {
      position: absolute;
      left: 0; right: 0; bottom: 0;
      max-height: 85vh;
      background: var(--wd-espresso-black);
      border-radius: 24px 24px 0 0;
      border-top: 1px solid rgba(201, 142, 138, 0.25);
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      animation: slideUpIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .profile-hero-box {
      position: relative;
      height: 220px;
      overflow: hidden;
    }

    .profile-hero-img {
      width: 100%; height: 100%;
      object-fit: cover;
    }

    .profile-close-btn {
      position: absolute;
      top: 14px; right: 14px;
      width: 34px; height: 34px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.55);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #fff;
      font-size: 15px;
      cursor: pointer;
      z-index: 2;
    }
    .profile-share-btn {
      position: absolute;
      top: 14px; left: 14px;
      width: 34px; height: 34px;
      border-radius: 50%;
      display: grid; place-items: center;
      background: rgba(0, 0, 0, 0.55);
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: #fff;
      cursor: pointer;
      z-index: 2;
    }
    .profile-share-btn:active { transform: scale(0.92); }

    .profile-hero-gradient {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: linear-gradient(to top, var(--wd-espresso-black) 0%, rgba(26, 20, 18, 0.4) 60%, transparent 100%);
    }

    .profile-hero-info {
      position: absolute;
      left: 16px; bottom: 12px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .profile-char-name {
      font-family: var(--wd-font-serif);
      font-size: 24px;
      font-weight: 700;
      color: var(--wd-warm-ivory);
    }

    .profile-char-tags {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .p-tag {
      font-family: var(--wd-font-sans);
      font-size: 11px;
      color: var(--wd-rosewood);
      background: rgba(201, 142, 138, 0.15);
      padding: 2px 8px;
      border-radius: 4px;
    }

    /* v59（P0-5）：资料卡取向徽标 —— 底色与发现页一致，便于跨页识别 */
    .p-tag-orient {
      background: linear-gradient(135deg, #B04A6E, #8E2F55);
      color: #FFF7FA;
      font-weight: 700;
      letter-spacing: 0.3px;
    }
    .p-tag-orient.bi { background: linear-gradient(135deg, #6E4A9E, #513070); }
    .p-tag-orient.straight { background: linear-gradient(135deg, #3F6E96, #2B4E6E); }

    .profile-stats-row {
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding: 16px;
      border-bottom: 1px solid rgba(201, 142, 138, 0.1);
    }

    .p-stat-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }

    .p-stat-num {
      font-family: var(--wd-font-serif);
      font-size: 17px;
      font-weight: 700;
      color: var(--wd-warm-ivory);
    }

    .p-stat-label {
      font-family: var(--wd-font-sans);
      font-size: 11px;
      color: var(--wd-warm-taupe);
    }

    .profile-bio-box {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .profile-bio-title {
      font-family: var(--wd-font-serif);
      font-size: 14px;
      font-weight: 700;
      color: var(--wd-warm-ivory);
    }

    .profile-bio-text {
      font-family: var(--wd-font-sans);
      font-size: 13.5px;
      line-height: 1.6;
      color: var(--wd-warm-taupe);
    }

    .profile-creator-box {
      padding: 0 16px 16px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: var(--wd-font-sans);
      font-size: 12px;
    }

    .p-creator-badge {
      background: var(--wd-rosewood-dark);
      color: #fff;
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 600;
    }

    .p-creator-name {
      color: var(--wd-warm-taupe);
    }

    .profile-footer-cta {
      padding: 16px max(16px, env(safe-area-inset-bottom, 16px));
      border-top: 1px solid rgba(201, 142, 138, 0.15);
    }

    .profile-story-cta-btn {
      width: 100%;
      height: 46px;
      border-radius: 23px;
      background: var(--wd-grad-rose-btn);
      border: none;
      color: #ffffff;
      font-family: var(--wd-font-sans);
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
    }

    /* ── 通用动画 ── */
    @keyframes slideUpIn {
      from { transform: translateY(100%); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes scaleIn {
      from { transform: scale(0.92); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    /* ═══════════════════════════════════════════════════════════════
       v33 · 聊天页新视觉 (2026-09-30) —— 覆盖层，置于末尾以获优先级
       对齐设计稿：紧凑顶栏 / Quick Chat 额度胶囊 / 中性炭灰 AI 气泡 /
       玫瑰色用户气泡 / 紫色等级徽章 / 英文快捷胶囊 / 圆形发送
       ═══════════════════════════════════════════════════════════════ */

    /* 背景氛圍（Phase 1 解放聊天室背景畫布，改走 --am2-bg-blur / --am2-bg-dim 變數） */
    .chat-bg-ambient {
      filter: blur(var(--am2-bg-blur, 10px)) brightness(var(--am2-bg-dim, 0.52)) saturate(1.06);
      -webkit-filter: blur(var(--am2-bg-blur, 10px)) brightness(var(--am2-bg-dim, 0.52)) saturate(1.06);
    }

    /* ── 1. 顶栏：紧凑、无边框、透出背景 ── */
    .chat-top-header {
      padding: max(10px, env(safe-area-inset-top, 10px)) 12px 8px;
      background: linear-gradient(to bottom, rgba(20,17,16,0.86) 0%, rgba(20,17,16,0.30) 72%, transparent 100%);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      border-bottom: none;
    }
    .chat-back-btn {
      width: 30px; height: 30px;
      background: transparent;
      border: none;
      padding: 0;
    }
    .chat-back-btn:active { background: transparent; transform: scale(0.9); }
    .chat-avatar-wrapper { width: 38px; height: 38px; }
    .chat-avatar-img { border: 1.5px solid rgba(255,255,255,0.30); }
    .chat-status-dot { width: 8px; height: 8px; background: #4ade80; border-color: rgba(20,17,16,0.9); }
    .chat-char-name { font-size: 15px; font-weight: 600; }
    .chat-online-hint { display: none; }

    .chat-favor-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 9px 2px 6px;
      font-size: 10.5px;
      font-weight: 600;
      border-radius: 9999px;
      background: rgba(140,110,190,0.16);
      color: #C9A7EA;
      border: 1px solid rgba(201,167,234,0.30);
    }
    .chat-favor-badge::before {
      content: '♥';
      font-size: 9px;
      line-height: 1;
      color: #B78BEE;
    }

    .chat-icon-btn {
      height: 32px;
      padding: 0 9px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.10);
      color: #E4DDD9;
      font-size: 12.5px;
    }

    /* ── 2. Quick Chat 额度行 ── */
    .chat-sub-model-bar {
      justify-content: flex-start;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px 8px;
      box-sizing: border-box;
      max-width: 100%;
      padding: 2px 12px 8px;
      background: transparent;
      border-bottom: none;
    }
    .chat-quick-chat-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 28px;
      padding: 0 11px;
      border-radius: 9999px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.10);
      color: #EDE7E3;
      font-family: var(--wd-font-sans);
      font-size: 11.5px;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.18s ease;
    }
    .chat-quick-chat-pill:active { background: rgba(255,255,255,0.12); }
    .chat-quick-chat-pill .qcc-dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: #D9A441;
      box-shadow: 0 0 6px rgba(217,164,65,0.85);
      flex-shrink: 0;
    }
    .chat-quick-chat-pill .qcc-chevron { font-size: 11px; opacity: 0.75; }
    .chat-model-tag {
      margin-left: auto;
      color: rgba(228,221,217,0.40);
      font-size: 10.5px;
      font-weight: 500;
    }
    .chat-quota-tag { display: none; }

    /* ── 3. 免责声明：更轻 ── */
    .chat-disclaimer-box { margin: 0 0 4px; gap: 4px; }
    .chat-disclaimer-pill, .chat-security-pill {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.07);
      color: rgba(232,225,221,0.48);
      font-size: 9.5px;
      padding: 4px 10px;
    }
    .chat-security-pill { font-size: 9px; }

    /* ── 4. 气泡：AI 中性炭灰 / 用户玫瑰色，均不显示流内头像 ── */
    .chat-stream-list { gap: 14px; }
    /* 2026-10-30：恢复单角色卡的流内头像（此前全局 none，等于所有单卡气泡都是裸文字）。
       多人卡的每个 turn 自带 26px 头像，JS 侧已跳过这一块，不会重复。 */
    .chat-msg-row.ai .chat-msg-bubble-wrapper { max-width: 86%; }
    .chat-msg-row.ai .chat-msg-bubble { border-radius: 18px 18px 18px 5px; }

    .chat-msg-bubble {
      padding: 11px 14px;
      background: rgba(30,29,28,0.80);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border: 1px solid rgba(255,255,255,0.07);
      box-shadow: 0 2px 12px rgba(0,0,0,0.35);
    }

    .chat-msg-row.user .chat-msg-bubble-wrapper { max-width: 84%; }

    .chat-msg-row.user .chat-msg-bubble {
      max-width: 100%;
      border-radius: 18px 18px 5px 18px;
      background: linear-gradient(135deg, #9E6069 0%, #7C4753 100%);
      border: 1px solid rgba(255,255,255,0.10);
      color: #FFFFFF;
      box-shadow: 0 4px 16px rgba(124,71,83,0.32);
    }

    .msg-dialogue-content { font-size: 14.5px; line-height: 1.5; color: #F1ECE9; }
    .msg-act-tag { font-style: italic; color: rgba(241,236,233,0.76); }
    .msg-emotion-tag { color: rgba(241,236,233,0.78); }
    .msg-thought-tag { color: #E7B9A8; font-style: italic; }
    .chat-msg-row.user .msg-dialogue-content { color: #FFFFFF; }
    .chat-msg-row.user .msg-act-tag { color: rgba(255,255,255,0.74); }
    .chat-msg-row.user .msg-emotion-tag { color: rgba(255,255,255,0.82); }
    .chat-msg-row.user .msg-thought-tag { color: rgba(255,255,255,0.92); }

    /* ── 5. 消息时间标签 ── */
    .chat-time-sep {
      margin: -8px 0 -6px 2px;
      font-family: var(--wd-font-sans);
      font-size: 10.5px;
      color: rgba(232,225,221,0.42);
      letter-spacing: 0.3px;
    }

    /* ── 6. 气泡操作行：收成图标 + 横铺展开胶囊 ── */
    .chat-msg-actions-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 6px;
      flex-wrap: wrap;
      opacity: 0.6;
      transition: opacity 0.2s ease;
    }
    .chat-msg-actions-row:hover,
    .chat-msg-actions-row:active,
    .chat-msg-actions-row.has-loading,
    .chat-msg-actions-row.has-cached,
    .chat-msg-actions-row:has(.is-loading),
    .chat-msg-actions-row:has(.is-cached) {
      opacity: 1;
    }
    .msg-action-pill {
      min-width: 27px;
      width: 27px;
      height: 27px;
      padding: 0;
      border-radius: 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.09);
      color: #CFC7C3;
      font-size: 13px;
      cursor: pointer;
      box-sizing: border-box;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .msg-action-pill:active {
      transform: scale(0.94);
    }
    .msg-action-pill.active {
      background: rgba(201,167,234,0.18);
      color: #D9BEF5;
      border-color: rgba(201,167,234,0.45);
    }
    /* 英文 + 横铺展开状态：横向胶囊，严禁竖排折行 (用户铁律：用英文+横铺) */
    .msg-action-pill.is-loading {
      width: auto !important;
      min-width: 28px !important;
      height: 28px !important;
      padding: 0 10px !important;
      border-radius: 9999px !important;
      gap: 5px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      white-space: nowrap !important;
      font-size: 11px !important;
      font-weight: 500 !important;
      letter-spacing: 0.2px !important;
      background: rgba(201,167,234,0.22) !important;
      color: #F1E5FC !important;
      border-color: rgba(201,167,234,0.5) !important;
      cursor: default !important;
      pointer-events: none !important;
    }
    .pill-spin {
      display: inline-block;
      font-size: 12px;
      animation: spinHourglass 1.4s infinite ease-in-out;
    }
    @keyframes spinHourglass {
      0% { transform: rotate(0deg); }
      50% { transform: rotate(180deg); }
      100% { transform: rotate(360deg); }
    }

    /* ── 8. 底部快捷胶囊：英文 + 图标 + 细分隔 ── */
    .chat-quick-quote-bar {
      gap: 8px;
      padding: 7px 12px;
      background: transparent;
      border-top: none;
    }
    .quick-quote-btn {
      position: relative;
      height: 30px;
      padding: 0 12px;
      border-radius: 9999px;
      background: rgba(255,255,255,0.075);
      border: 1px solid rgba(255,255,255,0.10);
      color: #E6E0DC;
      font-size: 11.5px;
      font-weight: 500;
      gap: 5px;
    }
    .quick-quote-btn + .quick-quote-btn::before {
      content: '';
      position: absolute;
      left: -4.5px;
      top: 50%;
      width: 1px;
      height: 14px;
      background: rgba(255,255,255,0.13);
      transform: translateY(-50%);
    }
    .quick-quote-btn .qq-ico { font-size: 12px; opacity: 0.9; }
    .quote-sym { display: none; }

    /* ── 9. 输入区：药丸输入框 + 圆形发送 ── */
    .chat-bottom-dock {
      gap: 8px;
      padding: 2px 12px max(12px, env(safe-area-inset-bottom, 12px));
      background: transparent;
      border-top: none;
    }
    .chat-input-wrapper {
      background: rgba(255,255,255,0.075);
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 22px;
      padding: 6px 46px 6px 16px;
    }
    .chat-input-wrapper:focus-within {
      border-color: rgba(201,167,234,0.45);
      box-shadow: none;
    }
    .chat-textarea { font-size: 14px; }
    .chat-textarea::placeholder { color: rgba(232,225,221,0.45); }
    .chat-expand-plus-btn {
      right: 9px;
      width: 30px; height: 30px;
      background: transparent;
      border: none;
      color: rgba(232,225,221,0.78);
      font-size: 16px;
    }
    .chat-expand-plus-btn.opened {
      transform: none;
      background: rgba(201,167,234,0.20);
      border: none;
      color: #C9A7EA;
    }
    .chat-send-action-btn {
      width: 40px; height: 40px;
      padding: 0;
      border-radius: 50%;
      justify-content: center;
      background: linear-gradient(135deg, #B4555F 0%, #8E3F4A 100%);
      border: 1px solid rgba(255,255,255,0.14);
      box-shadow: 0 4px 14px rgba(142,63,74,0.42);
    }
    .chat-send-action-btn > span { display: none; }

    /* ── C8 宝石不足拦截弹窗（PRD P0） ── */
    .gem-insufficient-modal {
      position: fixed; inset: 0; z-index: 120000;
      display: none; align-items: center; justify-content: center;
      background: rgba(12, 8, 7, 0.68);
      backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
      padding: 0 28px;
    }
    .gem-modal-card {
      width: 100%; max-width: 324px;
      background: linear-gradient(180deg, #241B19 0%, #17110F 100%);
      border: 1px solid rgba(232, 196, 106, 0.34);
      border-radius: 22px;
      padding: 24px 20px 18px; text-align: center;
      box-shadow: 0 18px 50px rgba(0, 0, 0, 0.68);
      font-family: var(--wd-font-sans);
      color: #F5EBE6;
    }
    .gem-modal-icon {
      font-size: 46px; line-height: 1; margin-bottom: 10px;
      filter: drop-shadow(0 0 12px rgba(232, 196, 106, 0.42));
    }
    .gem-modal-title {
      font-size: 18px; font-weight: 700; color: #FFF6F2; margin-bottom: 8px;
    }
    .gem-modal-cost {
      font-size: 13.5px; color: #E8C46A; margin-bottom: 4px; font-weight: 600;
    }
    .gem-modal-balance {
      font-size: 12.5px; color: #C9B8B0; margin-bottom: 18px;
    }
    .gem-modal-cta {
      width: 100%; height: 44px; border: none; border-radius: 9999px;
      background: linear-gradient(135deg, #E8C46A, #C79A3C);
      color: #2A1E12; font-size: 15px; font-weight: 700;
      box-shadow: 0 6px 18px rgba(199, 154, 60, 0.35);
      cursor: pointer;
    }
    .gem-modal-cta:active { transform: scale(0.97); }
    .gem-modal-foot {
      margin-top: 12px; font-size: 11px; color: #9E8D84; line-height: 1.6;
    }
    .gem-modal-foot a {
      color: #E8C46A; text-decoration: none; font-weight: 600; cursor: pointer;
    }
    /* ── 7. 内嵌插画缩略图卡片：定比 9:14 竖屏海报 + 骨架屏 + 防挤压 ── */
    .msg-inline-image-box {
      margin-top: 10px;
      border-radius: 14px;
      overflow: hidden;
      position: relative;
      border: 1px solid rgba(255, 255, 255, 0.12);
      cursor: pointer;
      width: 100%;
      max-width: 280px;
      aspect-ratio: 9 / 14;
      background: #181514;
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
      transition: transform 0.2s ease, border-color 0.2s ease;
    }
    .msg-inline-image-box:hover {
      border-color: rgba(255, 255, 255, 0.22);
    }
    .msg-inline-image-box:active {
      transform: scale(0.985);
    }
    .msg-inline-img-skeleton {
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
      background-size: 200% 100%;
      animation: skeletonShimmer 1.8s infinite linear;
      z-index: 1;
    }
    @keyframes skeletonShimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    .msg-inline-img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      opacity: 0;
      transition: opacity 0.35s ease, transform 0.3s ease;
      z-index: 2;
    }
    .msg-inline-img.loaded {
      opacity: 1;
    }
    .msg-inline-image-box:hover .msg-inline-img.loaded {
      transform: scale(1.02);
    }
    .img-error-notice {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      color: rgba(240, 230, 223, 0.75);
      font-size: 11px;
      z-index: 4;
      background: rgba(18, 16, 15, 0.88);
      cursor: pointer;
    }
    .img-error-notice span:first-child { font-size: 22px; }
    .msg-img-ai-tag {
      position: absolute;
      top: 8px; right: 8px;
      padding: 3px 8px;
      border-radius: 9999px;
      background: rgba(12, 10, 9, 0.72);
      color: #F0E6DF;
      font-size: 10px;
      font-weight: 500;
      letter-spacing: 0.3px;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.12);
      z-index: 3;
      white-space: nowrap;
    }
    .msg-img-scene {
      position: absolute;
      left: 8px; bottom: 8px;
      padding: 3px 8px;
      border-radius: 7px;
      background: rgba(12, 10, 9, 0.72);
      color: rgba(240, 230, 223, 0.95);
      font-size: 10.5px;
      font-weight: 500;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.12);
      z-index: 3;
      max-width: 60%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .msg-img-badge {
      position: absolute;
      right: 8px; bottom: 8px;
      height: 24px;
      padding: 0 8px;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      font-size: 10.5px;
      font-weight: 500;
      background: rgba(20, 17, 16, 0.72);
      border: 1px solid rgba(255, 255, 255, 0.18);
      color: #F1ECE9;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 3;
      white-space: nowrap;
    }
    .story-longimage-preview {
      position: fixed; inset: 0; z-index: 125000;
      display: none; align-items: center; justify-content: center;
      background: rgba(10, 7, 6, 0.86); padding: 18px;
    }
    .slp-backdrop { position: absolute; inset: 0; }
    .slp-body {
      position: relative; width: 100%; max-width: 380px; max-height: 88vh;
      background: #1A1513; border: 1px solid rgba(255,255,255,0.10);
      border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
    }
    .slp-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 14px; font-size: 13px; color: #EDE4DE;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .slp-close { background: none; border: none; color: #C9BFB8; font-size: 16px; cursor: pointer; }
    .slp-img-wrap { flex: 1; overflow-y: auto; background: #12100F; }
    .slp-img-wrap img { display: block; width: 100%; }
    .slp-actions { display: flex; gap: 10px; padding: 12px 14px; }
    .slp-btn {
      flex: 1; height: 40px; border-radius: 9999px; cursor: pointer;
      background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
      color: #EDE4DE; font-size: 13px;
    }
    .slp-btn.primary { background: linear-gradient(135deg, #B4555F, #8E3F4A); border: none; color: #fff; }
    .select-dock-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
    /* ── C7 补充：简介折叠 / 热门评论 / 金色 CTA 与试听 ── */
    .profile-bio-text.clamped {
      display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .profile-bio-more {
      margin-top: 6px; background: none; border: none; padding: 0;
      color: #C9A7EA; font-size: 12px; font-weight: 600; cursor: pointer;
      font-family: var(--wd-font-sans);
    }
    .profile-hot-comments { padding: 4px 18px 14px; }
    .phc-head {
      display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
    }
    .phc-title { font-size: 13px; font-weight: 700; color: #F0E6DF; }
    .phc-sub { font-size: 10.5px; color: rgba(214,198,190,0.5); }
    .phc-item {
      display: flex; gap: 10px; padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .phc-item:last-child { border-bottom: none; }
    .phc-avatar {
      flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      background: linear-gradient(135deg, #9E6069, #7C4753);
      color: #fff; font-size: 12px; font-weight: 700;
    }
    .phc-body { flex: 1; min-width: 0; }
    .phc-author { font-size: 11.5px; color: rgba(233,222,215,0.78); margin-bottom: 3px; }
    .phc-likes { float: right; color: rgba(233,222,215,0.5); }
    .phc-text { font-size: 12.5px; line-height: 1.6; color: #EDE4DE; }
    .phc-trans {
      display: none; margin-top: 6px; padding-left: 8px;
      border-left: 2px solid rgba(201,167,234,0.35);
      font-size: 11.5px; line-height: 1.6; color: rgba(214,198,190,0.72);
    }
    .phc-trans.show { display: block; }
    .phc-trans-btn {
      margin-top: 6px; background: none; border: none; padding: 0;
      color: #C9A7EA; font-size: 11px; font-weight: 600; cursor: pointer;
    }
    .profile-footer-cta { display: flex; align-items: center; gap: 10px; }
    .profile-story-cta-btn {
      flex: 1;
      background: linear-gradient(135deg, #E8C46A, #C79A3C) !important;
      color: #2A1E12 !important; font-weight: 700 !important;
      box-shadow: 0 6px 18px rgba(199,154,60,0.30);
    }
    .profile-voice-btn {
      flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
      border: 1px solid rgba(255,255,255,0.16);
      background: rgba(255,255,255,0.08); color: #EDE4DE;
      font-size: 18px; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: transform 0.18s ease, box-shadow 0.18s ease;
    }
    .profile-voice-btn.playing {
      box-shadow: 0 0 0 6px rgba(201,167,234,0.18);
      animation: pvPulse 1.2s ease-in-out infinite;
    }
    .profile-voice-btn.loading { opacity: 0.55; }
    @keyframes pvPulse {
      0%, 100% { box-shadow: 0 0 0 3px rgba(201,167,234,0.18); }
      50% { box-shadow: 0 0 0 10px rgba(201,167,234,0.06); }
    }
    /* ── C1 双层环形好感度徽章 ── */
    .chat-favor-badge { display: inline-flex; align-items: center; gap: 5px; }
    .favor-ring { width: 14px; height: 14px; transform: rotate(-90deg); flex: 0 0 14px; }
    .favor-ring-bg { fill: none; stroke: rgba(255,255,255,0.18); stroke-width: 3; }
    .favor-ring-fg {
      fill: none; stroke: #C9A7EA; stroke-width: 3; stroke-linecap: round;
      stroke-dasharray: 0 50.27;
      transition: stroke-dasharray 0.7s cubic-bezier(.22,.61,.36,1), stroke 0.4s ease;
    }
    /* ── C1 模型胶囊（可切换） ── */
    .chat-model-tag {
      display: inline-flex; align-items: center; gap: 5px;
      background: rgba(255,255,255,0.075); border: none; cursor: pointer;
      font-family: var(--wd-font-sans); color: inherit;
    }
    .chat-model-tag .cmp-hint { font-size: 10.5px; opacity: 0.62; }
    /* ── C6 未解锁置灰态 ── */
    .plus-asset-card.locked { opacity: 0.45; }
    .plus-asset-card.locked .plus-asset-badge { color: rgba(233,222,215,0.72); background: rgba(255,255,255,0.07); }
    .plus-asset-sub { font-size: 10px; color: rgba(214,198,190,0.55); margin-top: 2px; line-height: 1.35; }
    /* ── C6 记忆资产面板 ── */
    .memory-asset-panel { position: fixed; inset: 0; z-index: 118000; display: none; }
    .map-backdrop { position: absolute; inset: 0; background: rgba(10,7,6,0.62); }
    .map-sheet {
      position: absolute; left: 0; right: 0; bottom: 0; max-height: 78vh;
      background: #17120F; border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(255,255,255,0.09);
      display: flex; flex-direction: column;
      animation: mapRise 0.26s cubic-bezier(.22,.61,.36,1);
    }
    @keyframes mapRise { from { transform: translate3d(0, 100%, 0); } to { transform: translate3d(0, 0, 0); } }
    .map-grabber, .msd-grabber {
      width: 36px; height: 4px; border-radius: 2px;
      background: rgba(255,255,255,0.22); margin: 9px auto 4px;
    }
    .map-head { display: flex; align-items: center; padding: 2px 16px 6px; }
    .map-close { background: none; border: none; color: #C9BFB8; font-size: 16px; cursor: pointer; padding: 4px; }
    .map-title { flex: 1; text-align: center; font-size: 14px; font-weight: 700; color: #F0E6DF; margin-right: 24px; }
    .map-tabs { display: flex; gap: 8px; padding: 4px 16px 10px; }
    .map-tab {
      flex: 1; height: 32px; border-radius: 9999px; cursor: pointer;
      background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09);
      color: rgba(233,222,215,0.75); font-size: 12.5px; font-family: var(--wd-font-sans);
    }
    .map-tab.active { background: linear-gradient(135deg, #9E6069, #7C4753); color: #fff; border-color: transparent; }
    .map-body { flex: 1; overflow-y: auto; padding: 4px 16px 22px; -webkit-overflow-scrolling: touch; }
    .map-lock {
      text-align: center; padding: 34px 20px; color: rgba(214,198,190,0.72); font-size: 13px; line-height: 1.8;
    }
    .map-lock .lock-icon { font-size: 30px; display: block; margin-bottom: 10px; }
    .map-block { margin-bottom: 16px; }
    .map-block-title { font-size: 12px; font-weight: 700; color: #C9A7EA; margin-bottom: 8px; letter-spacing: 0.3px; }
    .map-kv { display: flex; gap: 8px; flex-wrap: wrap; }
    .map-chip {
      padding: 5px 11px; border-radius: 9999px; font-size: 11.5px;
      background: rgba(255,255,255,0.07); color: #EDE4DE;
      border: 1px solid rgba(255,255,255,0.09);
    }
    .map-entry {
      padding: 10px 12px; margin-bottom: 8px; border-radius: 12px;
      background: rgba(255,255,255,0.05); border-left: 3px solid rgba(201,167,234,0.5);
      font-size: 12.5px; line-height: 1.65; color: #EDE4DE;
    }
    .map-entry .me-idx { color: rgba(214,198,190,0.5); font-size: 10.5px; margin-right: 6px; }
    .map-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .map-thumb { position: relative; border-radius: 10px; overflow: hidden; background: #100D0C; }
    .map-thumb img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
    .map-thumb .mt-cap {
      position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 7px;
      font-size: 9.5px; color: rgba(240,230,223,0.92);
      background: linear-gradient(180deg, transparent, rgba(10,7,6,0.82));
    }
    .map-empty { text-align: center; padding: 40px 20px; color: rgba(214,198,190,0.6); font-size: 12.5px; }
    /* ── C1 模型切换抽屉 ── */
    .model-switch-drawer { position: fixed; inset: 0; z-index: 119000; display: none; }
    .msd-backdrop { position: absolute; inset: 0; background: rgba(10,7,6,0.62); }
    .msd-sheet {
      position: absolute; left: 0; right: 0; bottom: 0;
      background: #17120F; border-radius: 20px 20px 0 0;
      border-top: 1px solid rgba(255,255,255,0.09); padding-bottom: 14px;
      animation: mapRise 0.26s cubic-bezier(.22,.61,.36,1);
    }
    .msd-title { text-align: center; font-size: 14px; font-weight: 700; color: #F0E6DF; padding: 4px 0 12px; }
    .msd-item {
      display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
      padding: 13px 18px; background: none; border: none; cursor: pointer;
      border-top: 1px solid rgba(255,255,255,0.05);
      font-family: var(--wd-font-sans);
    }
    .msd-item .msd-radio {
      flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
      border: 2px solid rgba(255,255,255,0.28); position: relative;
    }
    .msd-item.active .msd-radio { border-color: #C9A7EA; }
    .msd-item.active .msd-radio::after {
      content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #C9A7EA;
    }
    .msd-item-main { flex: 1; }
    .msd-item-name { font-size: 13.5px; font-weight: 600; color: #EDE4DE; }
    .msd-item-desc { font-size: 11px; color: rgba(214,198,190,0.6); margin-top: 2px; }
    .msd-item-cost { font-size: 11.5px; color: #E8C46A; font-weight: 600; }
    .msd-foot { text-align: center; font-size: 10.5px; color: rgba(214,198,190,0.45); padding: 10px 18px 0; }
    /* ── C5 快捷引用胶囊：符号徽标 + 前置标签 ── */
    .chat-quick-quote-bar .qq-label {
      flex-shrink: 0; font-size: 10.5px; letter-spacing: 0.3px;
      color: rgba(214,198,190,0.55); align-self: center; padding-right: 2px;
    }
    .quick-quote-btn .qq-sym { font-weight: 700; opacity: 0.72; margin-left: 3px; }
    /* ── C9 通用二次确认 / 输入 / 协议浮层（全站替换原生 alert/confirm/prompt） ── */
    .aimate-confirm-modal {
      position: fixed; inset: 0; z-index: 200000; display: none;
      align-items: center; justify-content: center; padding: 0 28px;
    }
    .acm-backdrop { position: absolute; inset: 0; background: rgba(10,7,6,0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
    .acm-card {
      position: relative; width: 100%; max-width: 332px;
      background: #1F1815; border: 1px solid rgba(232,196,106,0.24);
      border-radius: 18px; padding: 20px 18px 15px; text-align: center;
      box-shadow: 0 18px 50px rgba(0,0,0,0.65);
      font-family: var(--wd-font-sans);
    }
    .acm-title { font-size: 15px; font-weight: 700; color: #FFF6F2; margin-bottom: 8px; }
    .acm-desc { font-size: 12.5px; color: rgba(233,222,215,0.76); margin-bottom: 15px; line-height: 1.6; white-space: pre-line; }
    .acm-desc.is-long { text-align: left; max-height: 52vh; overflow-y: auto; padding-right: 4px; font-size: 12px; }
    .acm-input {
      width: 100%; box-sizing: border-box; height: 40px; margin: 0 0 14px;
      padding: 0 12px; border-radius: 11px;
      background: #14100E; border: 1px solid rgba(232,196,106,0.32);
      color: #F5EBE6; font-size: 13.5px; font-family: var(--wd-font-sans); outline: none;
    }
    .acm-input:focus { border-color: #E8C46A; }
    .acm-actions { display: flex; gap: 10px; }
    .acm-btn {
      flex: 1; height: 40px; border-radius: 9999px; cursor: pointer;
      background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
      color: #EDE4DE; font-size: 13px; font-family: var(--wd-font-sans);
    }
    .acm-btn.primary { background: linear-gradient(135deg, #E8C46A, #C79A3C); border: none; color: #2A1E12; font-weight: 700; }
    .acm-btn.danger { background: linear-gradient(135deg, #B4555F, #8E3F4A); border: none; color: #fff; font-weight: 600; }
    /* ── C2 大图手势：缩放容器 + 提示 ── */
    #fullscreen-image-viewer .image-viewer-body {
      overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none;
    }
    #fullscreen-target-img {
      transform-origin: center center;
      transition: transform 0.16s ease-out;
      will-change: transform;
      -webkit-user-drag: none;
    }
    .image-viewer-header .source-hint {
      display: block; margin-top: 3px;
      font-size: 10px; color: rgba(214,198,190,0.45);
    }
    /* ── SPEC 四维渲染：台词（唯一朗读文本）与独白 ── */
    .msg-line-tag { font-weight: 400; color: #FCF5F0; letter-spacing: 0.2px; }
    .chat-msg-row.user .msg-line-tag { font-weight: 700; color: #FFFFFF; }
    .msg-act-line { margin-bottom: 4px; }
    .msg-act-line .msg-act-tag { font-style: italic; }
    .msg-thought-line {
      margin-top: 8px;
      padding: 6px 12px;
      background: rgba(231, 185, 168, 0.08);
      border-radius: 7px;
      border-left: 2px dashed rgba(231, 185, 168, 0.55);
      font-size: 13px;
      line-height: 1.55;
      color: rgba(240, 212, 202, 0.9);
      font-style: italic;
    }
    .msg-thought-line .msg-thought-tag {
      color: inherit;
      font-style: inherit;
      opacity: 1;
    }
    /* ── C3 失败态与重试 ── */
    .msg-error-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .msg-error-text { font-size: 12.5px; color: #E4736F; }
    .msg-retry-btn {
      height: 26px; padding: 0 14px; border-radius: 9999px; cursor: pointer;
      background: rgba(228,115,111,0.16); border: 1px solid rgba(228,115,111,0.55);
      color: #F09A96; font-size: 11.5px; font-weight: 600;
      font-family: var(--wd-font-sans);
    }
  
/* ══════════════════ v80/v88：开屏页（三层入场 + 首屏数据就绪后再退场，杜绝抢跑闪旧卡）══════════════════ */
:root { --hm-splash-lift: 14px; }
.hm-splash {
  position: fixed; inset: 0; z-index: 120000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; background: #1A1412;
  opacity: 1;
  transition: opacity 220ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity;
}
.hm-splash.is-leaving {
  opacity: 0 !important;
  pointer-events: none;
}
.hm-splash-head {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 160px; opacity: 0;
  animation: hmSplashHead 1600ms cubic-bezier(.22,.61,.36,1) forwards;
  transition: transform 220ms cubic-bezier(.22,.61,.36,1), opacity 220ms cubic-bezier(.22,.61,.36,1);
  will-change: transform, opacity;
}
.hm-splash.is-leaving .hm-splash-head {
  opacity: 0;
  transform: translateY(calc(-1 * var(--hm-splash-lift))) scale(.94);
}
.hm-splash-mark { width: 26px; height: 26px; flex: 0 0 auto; }
.hm-splash-word {
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: 25px; font-weight: 700; letter-spacing: .04em; color: #FBF6F2;
}
.hm-splash-sub {
  font-size: 12.5px; letter-spacing: .1em; color: rgba(251,246,242,.55);
  opacity: 0;
  animation: hmSplashSub 1600ms cubic-bezier(.22,.61,.36,1) forwards;
  transition: transform 220ms cubic-bezier(.22,.61,.36,1), opacity 220ms cubic-bezier(.22,.61,.36,1);
  will-change: transform, opacity;
}
.hm-splash.is-leaving .hm-splash-sub {
  opacity: 0;
  transform: translateY(0);
}
html.hm-returning .hm-splash-head,
html.hm-returning .hm-splash-sub { animation-duration: 500ms; }

@keyframes hmSplashHead {
  0%   { opacity: 0; transform: translateY(var(--hm-splash-lift)) scale(.94); }
  35%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hmSplashSub {
  0%, 24% { opacity: 0; transform: translateY(calc(var(--hm-splash-lift) * .6 + 12px)); }
  58%     { opacity: 1; transform: translateY(calc(var(--hm-splash-lift) * .6)); }
  100%    { opacity: 1; transform: translateY(calc(var(--hm-splash-lift) * .6)); }
}
@media (prefers-reduced-motion: reduce) {
  .hm-splash { animation: none !important; opacity: 1; }
  .hm-splash-head, .hm-splash-sub { animation: none !important; opacity: 1; transform: none; }
}

/* ══════════════════ v80：首访登录页 ══════════════════ */
.hm-login {
  position: fixed; inset: 0; z-index: 110000;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  background: #14100E; overflow-y: auto;
}
.hm-login[hidden] { display: none; }
.hm-login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; }
.hm-login-brand { font-size: 11px; letter-spacing: .22em; color: rgba(251,246,242,.45); margin-bottom: 18px; }
.hm-login-h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 30px; font-weight: 700; color: #FBF6F2; margin: 0 0 10px; }
.hm-login-tag { font-size: 14px; line-height: 1.7; color: rgba(251,246,242,.7); margin: 0 0 22px; }
.hm-login-points { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hm-login-points li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.6; color: rgba(251,246,242,.62); }
.hm-login-points li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: #E8A87C; }
.hm-login-age { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 1.55; color: rgba(251,246,242,.6); margin-bottom: 18px; cursor: pointer; }
.hm-login-age input { margin: 2px 0 0; width: 15px; height: 15px; accent-color: #E8A87C; flex: 0 0 auto; }
.hm-login-primary { width: 100%; padding: 15px; border: 0; border-radius: 999px; background: #E8A87C; color: #241A12; font-size: 15px; font-weight: 600; letter-spacing: .04em; cursor: pointer; font-family: inherit; }
.hm-login-primary:disabled { background: rgba(251,246,242,.13); color: rgba(251,246,242,.35); cursor: not-allowed; }
.hm-login-ghost { width: 100%; margin-top: 12px; padding: 14px; border: 1px solid rgba(251,246,242,.22); border-radius: 999px; background: transparent; color: rgba(251,246,242,.85); font-size: 14px; cursor: pointer; font-family: inherit; transition: opacity 0.2s ease; }
.hm-login-ghost:disabled { opacity: 0.38; cursor: not-allowed; }
.hm-login-legal { margin: 18px 0 0; font-size: 11.5px; line-height: 1.6; color: rgba(251,246,242,.45); text-align: center; }
.hm-legal-link { background: none; border: none; padding: 0 2px; color: #E8A87C; font-size: 11.5px; font-family: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ── [duo-tts-v1] 双角色卡：分角色台词条 ─────────────────────────────
   同一张卡两个人交替出声。每句用左侧竖条 + 说话人名区分，
   两人竖条/名字颜色交错（暖金 ↔ 冷紫），不依赖头像也能一眼分开。
   单角色卡不走这套 DOM，样式对老角色零影响。 */
.msg-duo-turns { display: flex; flex-direction: column; gap: 9px; }
.msg-duo-turn { position: relative; padding-left: 10px; border-left: 2px solid rgba(232,168,124,.55); }
.msg-duo-turn:nth-child(even) { border-left-color: rgba(198,166,232,.55); }
.msg-duo-name {
  display: inline-block; margin-bottom: 2px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: #E8A87C;
}
.msg-duo-turn:nth-child(even) .msg-duo-name { color: #C6A6E8; }
.msg-duo-text { font-size: 14.5px; line-height: 1.5; }


/* ─────────────────────────────────────────────────────────────
   [cast-v2] 多人卡：阵容定向 chip + 按成员主色区分的双人气泡
   2026-10-26 / w1。只在 cast.members >= 2 时由 JS 注入，
   单角色卡零影响（.cast-address-bar 由 JS 保持 display:none）。
   ───────────────────────────────────────────────────────────── */
.cast-address-bar{
  /* footer 是横向 flex（flex-wrap:wrap）：必须独占一行并排在输入框正上方（order:-1，位于 order:-2 灵感条之下） */
  flex:0 0 100%; order:-1;
  display:flex; gap:8px; padding:4px 2px 6px;
  overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none;
  animation:castBarPopUp .18s cubic-bezier(.16,1,.3,1);
}
@keyframes castBarPopUp{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:translateY(0); }
}
.cast-address-bar::-webkit-scrollbar{ display:none; }
/* [cast-v3] 输入框左侧折叠小图标：点一下在上方展开/收起角色定向栏 */
.cast-address-toggle-btn{
  position:relative;
  flex:0 0 34px;
  width:34px; height:34px;
  border-radius:50%;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.12);
  border:1.5px solid rgba(232,168,124,0.65);
  color:#fff;
  cursor:pointer;
  transition:transform .15s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color:transparent;
}
.cast-address-toggle-btn .cast-chip-icon{
  font-size:15px;
  line-height:1;
}
.cast-address-toggle-btn:hover{
  background:rgba(255,255,255,0.12);
  border-color:rgba(232,168,124,0.45);
}
.cast-address-toggle-btn:active{ transform:scale(.94); }
.cast-address-toggle-btn.is-open{
  background:rgba(232,168,124,0.18);
  border-color:rgba(232,168,124,0.68);
  box-shadow:0 0 10px rgba(232,168,124,0.28);
}
.cast-address-toggle-btn.has-target{
  border-width:1.5px;
  border-color:var(--cast-color, #E8A87C);
  box-shadow:0 0 10px -2px var(--cast-color, rgba(232,168,124,0.5));
}
.cast-address-toggle-btn .catb-inner{
  width:100%; height:100%;
  border-radius:50%;
  overflow:hidden;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.cast-address-toggle-btn .catb-avatar{
  width:100%; height:100%;
  object-fit:cover;
  object-position:center top;
  display:block;
}
.cast-address-toggle-btn .catb-initial{
  font-size:13px; font-weight:700; color:#fff;
}
.cast-address-toggle-btn .catb-caret{
  position:absolute;
  right:-2px; bottom:-2px;
  width:14px; height:14px;
  border-radius:50%;
  background:#221917;
  border:1px solid rgba(255,255,255,0.22);
  color:#E8A87C;
  font-size:9px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .18s ease, background .18s ease, color .18s ease;
  pointer-events:none;
}
.cast-address-toggle-btn.is-open .catb-caret{
  transform:rotate(180deg);
  background:#E8A87C;
  color:#1A1412;
  border-color:#E8A87C;
}
.cast-address-toggle-btn.is-solo .catb-caret{
  background:#EC4899;
  color:#fff;
  border-color:#F9A8D4;
}
.cast-chip{
  flex:0 0 auto; padding:5px 12px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.05);
  color:rgba(255,255,255,0.70);
  font-size:12px; line-height:1.25; cursor:pointer;
  transition:color .18s ease, border-color .18s ease, background .18s ease;
}
.cast-chip.active{
  color:#fff;
  border-color:var(--cast-color,#E8A87C);
  background:rgba(255,255,255,0.12);
}
.msg-duo-turn{ border-left-color:var(--cast-color, rgba(232,168,124,.55)); }
.msg-duo-turn:nth-child(even){ border-left-color:var(--cast-color, rgba(198,166,232,.55)); }

/* ─────────────────────────────────────────────────────────────
   [cast-hud-v1] 多人卡：顶栏每人一条好感 / [cast-solo-v1] 场域开关
   2026-10-26 / w1。单角色卡：JS 保持 #cast-favor-list display:none，
   原来的 .favor-mini-row 照旧显示 —— 零回归。
   ───────────────────────────────────────────────────────────── */
.top-bar-sub-row{ flex-wrap:wrap; }
.cast-favor-list{
  /* 独占一行（chapter-pill 留在上一行），内部纵向排 N 位成员 */
  flex:1 0 100%; order:2;
  display:flex; flex-direction:column; gap:3px;
  margin-top:4px; min-width:0;
}
.cfr-row{
  display:flex; align-items:center; gap:5px; min-width:0;
  /* 单行高度压到 12px：两行也不能把顶栏撑起来（移动端首屏太贵） */
  height:12px;
}
.cfr-row.away{ opacity:.38; }
.cfr-dot{
  flex:0 0 5px; width:5px; height:5px; border-radius:50%;
  background:var(--cfr-c,#E8A87C);
  box-shadow:0 0 5px var(--cfr-c,#E8A87C);
}
.cfr-name{
  flex:0 0 auto; max-width:46px;
  font-size:9.5px; line-height:1; color:#cbd5e1; font-weight:600;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cfr-track{
  flex:1 1 auto; min-width:24px; height:3px; border-radius:2px;
  background:rgba(255,255,255,.14); overflow:hidden;
}
.cfr-fill{
  display:block; height:100%; border-radius:2px;
  background:var(--cfr-c,#E8A87C);
  transition:width .4s ease;
}
.cfr-num{
  flex:0 0 auto; min-width:16px; text-align:right;
  font-size:9.5px; line-height:1; color:#94a3b8; font-weight:600;
  font-variant-numeric:tabular-nums;
}
.cfr-flag{ flex:0 0 auto; font-size:8px; line-height:1; }

/* 场域开关：与成员 chip 同排，视觉上要能一眼看出「当前不是双人场」 */
.cast-chip.solo{
  border-color:var(--cast-color,#E8A87C);
  background:rgba(255,255,255,.16);
}
.cast-policy-chip{
  margin-left:auto; flex:0 0 auto;
  border-style:dashed;
  color:rgba(255,255,255,.55);
}
.cast-policy-chip.active{
  border-style:solid;
  border-color:#fbbf24;
  color:#fde047;
  background:rgba(234,179,8,.14);
}

/* ══ [cast-hud-v1-chat] 聊天页分人好感条 ══════════════════════════════
   位置：chat-sub-model-bar 之下、消息流之上。
   ≤3人：单行平铺；≥4人（如6人睡衣派对卡）：自动分两行（3列×2行），
   彻底解决6人卡好感数字被挤压溢出、重叠覆盖在相邻角色圆点上的问题。 */
.chat-cast-favor {
  display: grid !important;
  grid-template-columns: repeat(var(--cast-cols, 2), minmax(0, 1fr));
  align-items: center;
  gap: 3px 0;
  padding: 1px 14px 4px;
  margin-top: -2px;
  box-sizing: border-box;
  width: 100%;
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
}
.chat-cast-favor:empty {
  display: none !important;
}
.chat-cast-favor.cast-multi-row {
  row-gap: 5px;
  padding: 2px 12px 5px;
}
.chat-cast-favor .cfr-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 13px;
  padding: 0 6px;
  box-sizing: border-box;
  overflow: hidden; /* 绝对禁止数字溢出盖到相邻角色的圆点 */
}
.chat-cast-favor .cfr-name {
  max-width: 40px;
  flex: 0 0 auto;
  font-size: 9.5px;
  line-height: 1;
  color: #cbd5e1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-cast-favor .cfr-track {
  flex: 1 1 auto;
  min-width: 14px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.chat-cast-favor .cfr-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--cfr-c, #E8A87C);
  transition: width .4s ease;
}
.chat-cast-favor .cfr-num {
  flex: 0 0 auto;
  min-width: 14px;
  text-align: right;
  font-size: 9.5px;
  line-height: 1;
  color: #f1f5f9; /* 高对比度亮白，清晰醒目 */
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chat-cast-favor .cfr-flag {
  flex: 0 0 auto;
  font-size: 8px;
  line-height: 1;
}

/* 3列布局分隔线（如 6人卡 3+3 两行，或 3人卡单行） */
.chat-cast-favor[data-cols="3"] .cfr-row:not(:nth-child(3n + 1)) {
  border-left: 1px solid rgba(255, 255, 255, .10);
}
.chat-cast-favor[data-cols="3"] .cfr-row:nth-child(3n + 1) {
  padding-left: 0;
  border-left: none;
}
.chat-cast-favor[data-cols="3"] .cfr-row:nth-child(3n) {
  padding-right: 0;
}

/* 2列布局分隔线（如 2人卡单行，或 4人卡 2+2 两行） */
.chat-cast-favor[data-cols="2"] .cfr-row:not(:nth-child(2n + 1)) {
  border-left: 1px solid rgba(255, 255, 255, .10);
}
.chat-cast-favor[data-cols="2"] .cfr-row:nth-child(2n + 1) {
  padding-left: 0;
  border-left: none;
}
.chat-cast-favor[data-cols="2"] .cfr-row:nth-child(2n) {
  padding-right: 0;
}

/* 4列布局（兜底 >=7 人情况） */
.chat-cast-favor[data-cols="4"] .cfr-row:not(:nth-child(4n + 1)) {
  border-left: 1px solid rgba(255, 255, 255, .10);
}
.chat-cast-favor[data-cols="4"] .cfr-row:nth-child(4n + 1) {
  padding-left: 0;
  border-left: none;
}
.chat-cast-favor[data-cols="4"] .cfr-row:nth-child(4n) {
  padding-right: 0;
}

/* ══ [scene-inline-v3] 开场背景故事：聊天流第一条「旁白卡」════════════════
   序章 → 开场白（第一条 AI 气泡）→ 玩家与角色的对话。
   它不是气泡：无头像、通栏、左侧一道暖光竖线，读起来像章节卷首。
   长文默认折 5 行（底部渐隐暗示还有），点「展开全文」看全，随时可回看。
   ⚠️ 这是「常驻内容」，不是弹窗：绝不要再给它加 position:fixed / 遮罩。 */
.chat-scene-card {
  margin: 2px 0 16px;
  padding: 13px 15px 11px 14px;
  border-radius: 13px;
  border: 1px solid rgba(232, 168, 124, .16);
  border-left: 2px solid rgba(232, 168, 124, .62);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(232, 168, 124, .085), rgba(232, 168, 124, 0) 62%),
    rgba(255, 255, 255, .022);
  color: rgba(233, 235, 242, .84);
  font-size: 13.5px;
  line-height: 1.92;
  letter-spacing: .012em;
  word-break: break-word;
  -webkit-tap-highlight-color: transparent;
}

.chat-scene-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.chat-scene-kicker {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(232, 168, 124, .88);
}

.chat-scene-rule {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(232, 168, 124, .34), rgba(232, 168, 124, 0));
}

.chat-scene-body p { margin: 0 0 9px; }
.chat-scene-body p:last-child { margin-bottom: 0; }

/* 折叠：约 5 行 + 底部渐隐 —— 硬切会让人以为被截断，渐隐才像「还有下文」 */
.chat-scene-body.is-clamped {
  max-height: 9.6em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, .10));
  mask-image: linear-gradient(180deg, #000 58%, rgba(0, 0, 0, .10));
}

.chat-scene-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: rgba(232, 168, 124, .92);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.chat-scene-toggle::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.2px solid currentColor;
  border-bottom: 1.2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .2s ease;
  opacity: .85;
}
.chat-scene-card.is-open .chat-scene-toggle::after {
  transform: rotate(-135deg) translateY(-1px);
}
.chat-scene-toggle:active { opacity: .62; }

@media (max-width: 380px) {
  .chat-scene-card { font-size: 13px; padding: 12px 13px 10px 12px; }
}

/* ── [SPEC-TYPOGRAPHY-V2] 台词、动作与角色颜色排版层级 ── */
.msg-bold-name {
  display: inline-block;
  font-weight: 700;
  color: #FFAAA6;
  margin: 6px 0 2px;
  font-size: 13.5px;
  letter-spacing: 0.5px;
}
.msg-speech-quote {
  font-style: normal;
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1.65;
  display: inline;
}
.msg-act-tag {
  font-style: italic;
  font-weight: 400;
  color: rgba(225, 202, 192, 0.78);
  display: block;
  margin-bottom: 5px;
  line-height: 1.55;
}
.msg-act-line {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 9px;
  border-left: 2px solid rgba(232, 168, 124, 0.45);
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(230, 218, 210, 0.86);
  font-style: italic;
}
.msg-act-line .msg-act-tag {
  display: inline;
  margin-bottom: 0;
  color: inherit;
}
.msg-duo-turns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.msg-duo-turn {
  position: relative;
  padding: 9px 13px 11px 13px;
  border-left: 3.5px solid var(--cast-color, rgba(232, 168, 124, 0.75));
  background: rgba(255, 255, 255, 0.038);
  border-radius: 0 10px 10px 0;
}
.msg-duo-name {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--cast-color, #E8A87C);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}
.msg-duo-text {
  font-size: 14.5px;
  line-height: 1.6;
  font-weight: 400;
}

/* [three-tier-v1] 发言角色专属动作描写卡片（位于台词上方） */
.msg-turn-act {
  margin: 6px 0 8px 0;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.24);
  border-radius: 7px;
  border-left: 2px solid var(--cast-color, rgba(232, 168, 124, 0.7));
  font-size: 13px;
  line-height: 1.55;
  color: rgba(235, 225, 218, 0.9);
  font-style: italic;
}
.msg-scene-act {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #E8A87C;
  font-size: 13.5px;
  line-height: 1.55;
  color: #F3EAE4;
}

/* [streaming-v1] 流式逐段输出与打字机动效 */
.stream-fade-in {
  animation: streamFadeSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes streamFadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.stream-cursor {
  display: inline-block;
  color: var(--cast-color, #E8A87C);
  font-weight: 700;
  font-size: 13px;
  margin-left: 2px;
  vertical-align: baseline;
  animation: streamBlink 0.65s infinite alternate;
  user-select: none;
}
@keyframes streamBlink {
  0% { opacity: 0.15; transform: scaleY(0.9); }
  100% { opacity: 1; transform: scaleY(1.05); }
}
.chat-msg-bubble.is-streaming {
  cursor: pointer;
  position: relative;
}
.stream-skip-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(235, 225, 218, 0.45);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 12px;
  user-select: none;
  animation: streamFadeSlideIn 0.3s ease;
}
.stream-skip-badge::before {
  content: '⚡';
  font-size: 10px;
}

    /* 发送按钮即刻触感反馈与旋转动效 (0ms 物理即刻响应) */
    .chat-send-action-btn:active {
      transform: scale(0.90) !important;
      box-shadow: 0 2px 6px rgba(142,63,74,0.3) !important;
    }

    .chat-send-action-btn .send-spinner {
      display: none;
      width: 17px;
      height: 17px;
      border: 2px solid rgba(255, 255, 255, 0.32);
      border-top-color: #ffffff;
      border-radius: 50%;
      animation: sendBtnSpin 0.65s linear infinite;
    }

    .chat-send-action-btn.is-sending .send-icon-arrow {
      display: none !important;
    }

    .chat-send-action-btn.is-sending .send-spinner {
      display: block !important;
    }

    .chat-send-action-btn.is-sending {
      opacity: 0.92;
      cursor: default;
      pointer-events: none;
      background: linear-gradient(135deg, #A84954 0%, #7E323D 100%) !important;
    }

    @keyframes sendBtnSpin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* 灵动三连跳波浪点动效 (Universal Live Typing Indicator) */
    .live-typing-container {
      display: flex;
      flex-direction: column;
      gap: 7px;
      padding: 4px 2px;
    }

    .typing-wave-dots {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 6px 12px;
      border-radius: 14px;
      background: rgba(255, 245, 240, 0.10);
      border: 1px solid rgba(255, 255, 255, 0.10);
      width: fit-content;
      margin-bottom: 2px;
    }

    .tw-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #E8A89A;
      box-shadow: 0 0 8px rgba(232, 168, 154, 0.6);
      animation: waveDotBounce 1.2s infinite ease-in-out;
    }

    .tw-dot-1 { animation-delay: 0s; }
    .tw-dot-2 { animation-delay: 0.2s; }
    .tw-dot-3 { animation-delay: 0.4s; }

    @keyframes waveDotBounce {
      0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
      }
      40% {
        transform: translateY(-5px);
        opacity: 1;
        background: #FFF;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
      }
    }

    .skeleton-shimmer-box.compact {
      gap: 6px;
      padding: 0;
    }
    .skeleton-shimmer-box.compact .skeleton-line {
      height: 10px;
    }

    .typing-status-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11.5px;
      color: var(--typing-accent, #D69F94);
      font-family: var(--wd-font-sans);
      letter-spacing: 0.2px;
      animation: typingPillBreath 2.0s infinite ease-in-out;
    }

    .typing-sparkle {
      color: var(--typing-accent, #F8C3B6);
      font-size: 12px;
      display: inline-block;
      animation: sparkleTwinkle 1.5s infinite alternate;
    }

    @keyframes typingPillBreath {
      0%, 100% { opacity: 0.75; transform: translateX(0); }
      50% { opacity: 1; transform: translateX(2px); }
    }

    @keyframes sparkleTwinkle {
      0% { transform: scale(0.85) rotate(0deg); opacity: 0.6; }
      100% { transform: scale(1.15) rotate(25deg); opacity: 1; }
    }

/* [cast-solo-v2] 悄悄话与定向提问标记 */
.msg-addressed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--target-color, #E8A87C);
  border: 1px solid rgba(255, 255, 255, 0.15);
  letter-spacing: 0.03em;
}
.msg-addressed-badge.is-solo {
  background: rgba(236, 72, 153, 0.18);
  border-color: rgba(236, 72, 153, 0.45);
  color: #f472b6;
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.2);
}
.msg-solo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: normal;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 4px;
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════
   [acct-v1] 聊天前登录门
   只在「按发送键且未登录」时出现，所以视觉上要轻、要快、不打断沉浸：
   暖深底 + 单一主色，全部沿用页面既有的 #E8A87C / #FBF6F2 / #1A1412。
   ══════════════════════════════════════════════════════════════════ */
.cag { position: fixed; inset: 0; z-index: 130000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cag[hidden] { display: none; }
.cag-veil { position: absolute; inset: 0; background: rgba(12,8,6,.74); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); animation: cagFade .18s ease-out both; }
.cag-card {
  position: relative; width: 100%; max-width: 382px; max-height: calc(100% - 12px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(168deg, #2A211B 0%, #1A1412 62%);
  border: 1px solid rgba(232,168,124,.2); border-radius: 24px;
  padding: 26px 22px 20px; box-shadow: 0 26px 64px rgba(0,0,0,.6);
  animation: cagRise .26s cubic-bezier(.22,.61,.36,1) both;
  scrollbar-width: none;
}
.cag-card::-webkit-scrollbar { display: none; }
.cag-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(251,246,242,.08); color: rgba(251,246,242,.62); font-size: 20px; line-height: 1; cursor: pointer; font-family: inherit; }
.cag-x:active { background: rgba(251,246,242,.16); }
.cag-voice { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 13px 7px 10px; margin-bottom: 16px; border: 1px solid rgba(232,168,124,.32); border-radius: 999px; background: rgba(232,168,124,.1); color: #E8A87C; font-size: 12px; cursor: pointer; font-family: inherit; }
.cag-voice:active { background: rgba(232,168,124,.2); }
.cag-wave { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.cag-wave i { display: block; width: 2px; border-radius: 1px; background: currentColor; opacity: .85; animation: cagWave 1.1s ease-in-out infinite; }
.cag-wave i:nth-child(1) { height: 5px; animation-delay: 0s; }
.cag-wave i:nth-child(2) { height: 11px; animation-delay: .16s; }
.cag-wave i:nth-child(3) { height: 7px; animation-delay: .32s; }
.cag-wave i:nth-child(4) { height: 9px; animation-delay: .48s; }
.cag-title { margin: 0 0 8px; font-family: 'Playfair Display', Georgia, 'Songti SC', serif; font-size: 23px; font-weight: 700; color: #FBF6F2; letter-spacing: .01em; }
.cag-sub { margin: 0 0 20px; font-size: 13px; line-height: 1.66; color: rgba(251,246,242,.62); }
.cag-form { display: flex; flex-direction: column; gap: 10px; }
.cag-in { width: 100%; box-sizing: border-box; padding: 14px 15px; border: 1px solid rgba(251,246,242,.16); border-radius: 13px; background: rgba(251,246,242,.06); color: #FBF6F2; font-size: 16px; font-family: inherit; outline: none; }
.cag-in::placeholder { color: rgba(251,246,242,.34); }
.cag-in:focus { border-color: rgba(232,168,124,.6); background: rgba(251,246,242,.09); }
.cag-err { padding: 9px 12px; border-radius: 10px; background: rgba(220,90,80,.14); color: #F0A79E; font-size: 12.5px; line-height: 1.5; }
.cag-err[hidden] { display: none; }
.cag-primary { width: 100%; margin-top: 4px; padding: 15px; border: 0; border-radius: 999px; background: #E8A87C; color: #241A12; font-size: 15px; font-weight: 600; letter-spacing: .03em; cursor: pointer; font-family: inherit; }
.cag-primary:disabled { background: rgba(251,246,242,.14); color: rgba(251,246,242,.36); cursor: not-allowed; }
.cag-switch { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; font-size: 12.5px; color: rgba(251,246,242,.5); }
.cag-link { border: 0; background: none; padding: 4px; color: #E8A87C; font-size: 12.5px; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* 登录即注册：这里不再是可点的链接，改成一句说明，避免用户以为要另开一步 */
.cag-switch-note { padding: 4px 0; color: #E8A87C; font-size: 12.5px; letter-spacing: .01em; }
.cag-note { margin: 16px 0 0; font-size: 11.5px; line-height: 1.6; color: rgba(251,246,242,.34); text-align: center; }
/* ── [auth-p1] 统一认证弹窗扩展样式（双Tab / 验证码 / 密码强度 / 会员态）── */
.cag-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; padding-right: 36px; }
.cag-top-row .cag-voice { margin-bottom: 0; }
.cag-back-btn { border: 0; background: none; color: #E8A87C; font-size: 13px; cursor: pointer; padding: 4px 2px; font-family: inherit; }
.cag-back-btn[hidden] { display: none; }
.cag-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin-bottom: 16px; border-radius: 13px; background: rgba(251,246,242,.06); border: 1px solid rgba(251,246,242,.08); }
.cag-tabs[hidden] { display: none; }
.cag-tab { border: 0; border-radius: 10px; padding: 9px 10px; background: transparent; color: rgba(251,246,242,.58); font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .16s ease, color .16s ease; }
.cag-tab.on { background: rgba(232,168,124,.22); color: #FFD9BC; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.cag-tab[hidden] { display: none; }
.cag-otp-wrap { display: flex; flex-direction: column; gap: 6px; }
.cag-otp-wrap[hidden] { display: none; }
.cag-otp-row { display: flex; gap: 8px; align-items: stretch; }
.cag-otp-in { flex: 1; min-width: 0; letter-spacing: 3px; font-weight: 600; }
.cag-otp-btn { flex: 0 0 auto; min-width: 108px; padding: 0 13px; border: 1px solid rgba(232,168,124,.45); border-radius: 13px; background: rgba(232,168,124,.14); color: #FFD9BC; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; transition: background .15s ease, opacity .15s ease; }
.cag-otp-btn:hover:not(:disabled) { background: rgba(232,168,124,.24); }
.cag-otp-btn:disabled { opacity: .48; cursor: not-allowed; }
.cag-ok-tip { padding: 7px 11px; border-radius: 9px; background: rgba(52,211,153,.13); color: #86efac; font-size: 12px; line-height: 1.45; }
.cag-ok-tip[hidden] { display: none; }
.cag-pw-wrap { position: relative; display: flex; align-items: center; }
.cag-pw-wrap[hidden] { display: none; }
.cag-pw-wrap .cag-in { padding-right: 42px; }
.cag-pw-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: rgba(251,246,242,.5); font-size: 15px; cursor: pointer; padding: 4px 6px; line-height: 1; }
.cag-pw-eye.on { color: #E8A87C; }
.cag-pw-meter { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.cag-pw-meter[hidden] { display: none; }
.cag-pw-bar { width: 64px; height: 4px; border-radius: 99px; background: rgba(251,246,242,.12); overflow: hidden; flex: 0 0 auto; }
.cag-pw-bar i { display: block; height: 100%; width: 0%; border-radius: inherit; transition: width .18s ease, background .18s ease; }
.cag-pw-meter-txt { font-size: 11.5px; color: rgba(251,246,242,.52); }
.cag-login-aux { display: flex; justify-content: flex-end; margin-top: -2px; }
.cag-login-aux[hidden] { display: none; }
.cag-age { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.5; color: rgba(251,246,242,.62); margin: 2px 0; cursor: pointer; }
.cag-age[hidden] { display: none; }
.cag-age input { margin-top: 2px; width: 14px; height: 14px; accent-color: #E8A87C; flex: 0 0 auto; }
.cag-err-cta { display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1px solid rgba(232,168,124,.5); border-radius: 999px; background: rgba(232,168,124,.16); color: #FFD9BC; font-size: 12px; cursor: pointer; font-family: inherit; }
.me-auth-banner { margin: 0 16px 14px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(232,168,124,.18), rgba(232,168,124,.06)); border: 1px solid rgba(232,168,124,.35); display: flex; align-items: center; gap: 12px; cursor: pointer; }
.me-auth-banner .t { font-size: 14.5px; font-weight: 700; color: #FFD9BC; }
.me-auth-banner .d { font-size: 12px; color: rgba(251,246,242,.68); margin-top: 3px; line-height: 1.45; }
.me-email-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; vertical-align: middle; }
.me-email-badge.ok { background: rgba(52,211,153,.16); color: #86efac; }
.me-email-badge.warn { background: rgba(251,191,36,.18); color: #fde68a; }
.cp-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
body.cag-open { overflow: hidden; }
@keyframes cagFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cagRise { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cagWave { 0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1); } }
@media (max-width: 380px) {
  .cag-card { border-radius: 20px; padding: 22px 18px 18px; }
  .cag-title { font-size: 20px; }
}

    /* [no-reel-dots-v1] 右侧角色切换圆点列已下线（2026-10-29）。
       动态点由 app.js 的 REEL_DOTS_ENABLED 关掉，这里兜住 HTML 里预置的
       3 个静态点，并防止别处再把它 display 回来。想恢复时两处一起改。 */
    #reel-indicators { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   [cast-avatar-v1] 多人剧场：用角色立绘头像代替/强化抽象颜色标识
   2026-10-29. 让寻址栏、对话流发言框、定向提问和好感度直观显示女生头像。
   ───────────────────────────────────────────────────────────── */
.cast-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3px 11px 3px 4px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  transition: all .2s ease !important;
}
.cast-chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--cast-color, rgba(255,255,255,0.35));
  flex-shrink: 0;
  display: block;
}
.cast-chip.active {
  color: #fff !important;
  border-color: var(--cast-color, #E8A87C) !important;
  background: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 0 10px -2px var(--cast-color, rgba(232, 168, 124, 0.5)) !important;
}
.cast-chip.active .cast-chip-avatar {
  border-color: #fff;
  box-shadow: 0 0 6px var(--cast-color, #fff);
}
.cast-chip-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.msg-duo-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}
.msg-duo-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--cast-color, rgba(255, 255, 255, 0.45));
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  display: block;
}
.msg-duo-header .msg-duo-name {
  margin-bottom: 0 !important;
}
.msg-addressed-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.msg-addressed-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--target-color, #E8A87C);
  flex-shrink: 0;
  display: block;
}
.cfr-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--cfr-c, rgba(255, 255, 255, 0.4));
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   [cast-clean-v1] 用户铁律：已有头像，彻底移除前置粗竖条色块；
   头像聚焦角色头部。
   ───────────────────────────────────────────────────────────── */
.msg-duo-turn {
  border-left: none !important;
  border-radius: 12px !important;
  padding: 10px 14px 12px 14px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
}
.msg-duo-avatar, .cast-chip-avatar, .msg-addressed-avatar, .cfr-avatar {
  object-fit: cover !important;
  object-position: center top !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   [theatre-edition-v1] 互动剧场版体系：专区大厅 / 模式切换器 / 舞台聚光灯 / 卡司大殿
   保留原方案前端展示，无缝一键来回切换对比
   ══════════════════════════════════════════════════════════════════════════ */

/* 1. 发现页顶栏剧场版专区 Tab */
.dp-toptab-theatre {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
  color: #fff !important;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.45) 0%, rgba(139, 92, 246, 0.45) 100%) !important;
  border: 1px solid rgba(244, 114, 182, 0.5) !important;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.35) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
}
.dp-toptab-theatre .dp-theatre-icon {
  font-size: 13px;
}

/* 2. 聊天页顶栏：剧场版 vs 原方案 模式切换器 */
.theatre-edition-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(20, 14, 16, 0.92);
  border: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: 9999px;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  margin-right: 6px;
  flex-shrink: 0;
  z-index: 12;
}
.tep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 600;
  cursor: default;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.tep-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.4);
  font-weight: 700;
}
.tep-btn#tep-btn-classic.active {
  background: linear-gradient(135deg, #4A2D24 0%, #8E5A5A 100%);
  box-shadow: 0 2px 6px rgba(74, 45, 36, 0.5);
}

/* 3. 沉浸剧场舞台聚光灯视窗 (Stage Spotlight) */
.theatre-stage-spotlight {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 6px 12px 10px 12px;
  animation: slideDownIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tss-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(38, 24, 32, 0.92) 0%, rgba(26, 18, 28, 0.94) 100%);
  border: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(236, 72, 153, 0.12);
}
.tss-actor-box {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.tss-actor-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid #EC4899;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
  display: block;
}
.tss-actor-meta {
  flex: 1;
  min-width: 0;
}
.tss-actor-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.tss-theatre-tag {
  font-size: 10px;
  font-weight: 700;
  color: #F472B6;
  letter-spacing: 0.3px;
}
.tss-actor-role {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(244, 114, 182, 0.2);
  color: #FBCFE8;
  border: 1px solid rgba(244, 114, 182, 0.3);
}
.tss-actor-voice {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.6);
}
.tss-actor-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 2px;
}
.tss-actor-act {
  font-size: 11px;
  color: rgba(245, 235, 230, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
}
.tss-cast-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.tss-cast-btn:active {
  background: rgba(236, 72, 153, 0.3);
  transform: scale(0.95);
}
.tss-cb-icon { font-size: 14px; }
.tss-cb-txt { font-size: 10px; font-weight: 600; margin-top: 1px; }
.tss-cb-count { font-size: 9px; opacity: 0.75; }

/* 4. 剧场版高能剧本推进抉择卡 */
.theatre-decision-bar {
  margin: 0 12px 10px 12px;
  background: rgba(28, 20, 24, 0.85);
  border: 1px solid rgba(244, 114, 182, 0.25);
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.tdb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tdb-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.tdb-spark { font-size: 12px; color: #F472B6; }
.tdb-title {
  font-size: 12px;
  font-weight: 700;
  color: #FBCFE8;
  letter-spacing: 0.3px;
}
.tdb-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}
.tdb-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tdb-choice-btn {
  text-align: left;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(244, 114, 182, 0.2);
  color: #ffffff;
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tdb-choice-btn:hover, .tdb-choice-btn:active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-color: rgba(244, 114, 182, 0.6);
  transform: translateX(2px);
}
.tdb-choice-arrow {
  color: #F472B6;
  font-size: 12px;
  margin-left: 8px;
  opacity: 0.8;
}

/* 5. 原方案 vs 剧场版 显隐控制铁律 */
.chat-page.is-classic-edition .theatre-stage-spotlight,
.chat-page.is-classic-edition .theatre-decision-bar {
  display: none !important;
}
.chat-page.is-classic-edition #tep-btn-theatre {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}
.chat-page.is-classic-edition #tep-btn-classic {
  background: linear-gradient(135deg, #4A2D24 0%, #8E5A5A 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(74, 45, 36, 0.5) !important;
  font-weight: 700 !important;
}

/* [theatre-residue-v1] 显隐开关从「类」改成「data-on」：
   此前只要 chat-page 残留 is-theatre-edition（切卡时没人删），!important 就会
   把 inline 的 display:none 顶掉，舞台一直显示上一个剧场。data-on 由 JS 每次
   渲染时显式写入，类残留不再具备任何显示能力。 */
.chat-page.is-theatre-edition .theatre-stage-spotlight {
  display: block !important;
}
/* 手机竖屏默认隐藏上方抉择栏（仅桌面宽屏通过下方 @media 显式放开） */
.chat-page .theatre-decision-bar {
  display: none !important;
}
.chat-page.is-theatre-edition #tep-btn-theatre {
  background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.4) !important;
  font-weight: 700 !important;
}
.chat-page.is-theatre-edition #tep-btn-classic {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

/* 6. 剧场大厅专区 (#cp-theatre) */
.theatre-hall-intro-banner {
  margin: 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.16) 0%, rgba(139, 92, 246, 0.14) 100%);
  border: 1px solid rgba(244, 114, 182, 0.3);
}
.th-intro-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: #F472B6;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.th-intro-h2 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}
.th-intro-p {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(245, 235, 230, 0.8);
}

.theatre-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 12px 24px 12px;
}
.theatre-card-item {
  display: flex;
  flex-direction: column;
  background: rgba(26, 20, 24, 0.9);
  border: 1px solid rgba(244, 114, 182, 0.25);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.theatre-card-item:hover {
  border-color: rgba(244, 114, 182, 0.55);
}
.tci-cover-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #110d13;
}
.tci-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.3s ease;
}
.theatre-card-item:hover .tci-cover-img {
  transform: scale(1.03);
}
.tci-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(18,12,18,0.85) 100%);
}
.tci-cast-count-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.tci-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tci-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tci-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #ffffff;
}
.tci-tagline {
  font-size: 12px;
  color: rgba(245, 235, 230, 0.75);
  line-height: 1.45;
}
.tci-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tci-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
}
.tci-members-preview {
  display: flex;
  align-items: center;
  gap: -6px;
  margin-top: 2px;
}
.tci-member-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #1a1418;
  margin-right: -6px;
}
.tci-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.tci-btn-theatre {
  flex: 1.4;
  height: 36px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.4);
}
.tci-btn-classic {
  flex: 1;
  height: 36px;
  border-radius: 18px;
  border: 1px solid rgba(201, 142, 138, 0.35);
  background: rgba(44, 32, 28, 0.6);
  color: #F5EBE6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 7. 全员卡司展台大殿 (#theatre-cast-modal) */
.theatre-cast-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}
.tcm-sheet {
  width: 100%;
  max-height: 80vh;
  background: #181216;
  border-top: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px 28px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.tcm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.tcm-pill {
  font-size: 10px;
  font-weight: 700;
  color: #F472B6;
  letter-spacing: 0.6px;
}
.tcm-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}
.tcm-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
}
.tcm-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.tcm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.tcm-actor-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tcm-actor-card:active {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(244, 114, 182, 0.5);
}
.tcm-actor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--actor-color, #EC4899);
  flex-shrink: 0;
}
.tcm-actor-info {
  flex: 1;
  min-width: 0;
}
.tcm-actor-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tcm-actor-role {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}
.tcm-actor-voice {
  font-size: 9.5px;
  color: #F472B6;
  margin-top: 2px;
}


/* ══════════════════════════════════════════════════════════════════════════
   [theatre-stage-viewport-v2] 大画幅视觉小说大立绘舞台（剧场版专属）
   与原方案纯文字气泡形成鲜明而震撼的代差对比
   ══════════════════════════════════════════════════════════════════════════ */

.theatre-stage-viewport {
  position: relative;
  width: 100%;
  height: 416px;
  min-height: 416px;
  border-radius: 20px;
  overflow: hidden;
  margin: 4px 0 14px 0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(236, 72, 153, 0.25);
  border: 1px solid rgba(244, 114, 182, 0.45);
  background: #0f0a12;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.tsv-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  filter: brightness(0.76) saturate(1.12);
  transform: scale(1.02);
  transition: background-image 0.45s ease, filter 0.45s ease, transform 0.6s ease;
}

.tsv-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 10, 18, 0.28) 0%, rgba(15, 10, 18, 0.32) 52%, rgba(15, 10, 18, 0.92) 100%);
  pointer-events: none;
}

/* 大立绘演员舞台位置：下沿自然延伸至半透台词台后方，彻底消除鞋底半空悬浮 */
.tsv-actor-stage {
  position: absolute;
  top: 38px;
  bottom: -18px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.tsv-actor-standing {
  height: 100%;
  max-height: 100%;
  max-width: 88%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.82)) drop-shadow(0 0 18px rgba(236, 72, 153, 0.22));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  animation: tsvActorEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tsvActorEnter {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tsv-spotlight-glow {
  position: absolute;
  bottom: 72px;
  width: 260px;
  height: 180px;
  background: radial-gradient(circle at center, rgba(244, 114, 182, 0.20) 0%, transparent 72%);
  pointer-events: none;
  z-index: -1;
}

/* 剧场实时状态窗胶囊条 */
.tsv-status-strip {
  position: absolute;
  top: 46px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  z-index: 4;
  pointer-events: none;
}

.tsv-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8.5px;
  border-radius: 9999px;
  background: rgba(16, 11, 22, 0.76);
  border: 1px solid rgba(244, 114, 182, 0.32);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 244, 248, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.38);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 同轮多角色舞台切换器 */
.tsv-turn-pager {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
}

.tsv-pager-btn {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(244, 114, 182, 0.42);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.tsv-pager-btn:hover,
.tsv-pager-btn:active {
  background: rgba(236, 72, 153, 0.42);
  transform: scale(0.94);
}

.tsv-pager-label {
  font-size: 11px;
  font-weight: 700;
  color: #FBCFE8;
  min-width: 26px;
  text-align: center;
}

.tsv-listen-btn.is-loading {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  opacity: 0.92;
  animation: pulse 1.2s infinite;
}

.tsv-listen-btn.is-playing {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
}

/* 顶部状态条 */
.tsv-top-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.tsv-badge-live {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(20, 14, 24, 0.88);
  border: 1px solid rgba(244, 114, 182, 0.45);
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tsv-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EC4899;
  box-shadow: 0 0 10px #EC4899;
  animation: pulse 1.5s infinite;
}

.tsv-cast-wall-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.tsv-cast-wall-btn:active {
  background: rgba(236, 72, 153, 0.45);
  transform: scale(0.96);
}
.tsv-cast-count {
  font-size: 10.5px;
  color: #FBCFE8;
  font-weight: 700;
}

/* 视觉小说台词框 (Script Box) */
.tsv-script-box {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 12px 14px 12px 14px;
  background: rgba(24, 16, 28, 0.94);
  border: 1px solid rgba(244, 114, 182, 0.45);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 5;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tsv-speaker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tsv-speaker-tag {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.tsv-speaker-role {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(236, 72, 153, 0.22);
  color: #FBCFE8;
  border: 1px solid rgba(236, 72, 153, 0.4);
  margin-left: 8px;
  margin-right: auto;
  font-weight: 600;
}

.tsv-listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(135deg, #FF8E72 0%, #D84E71 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 2px 10px rgba(232, 110, 125, 0.45) !important;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.tsv-listen-btn:active {
  transform: scale(0.95);
}

.tsv-act-text {
  font-size: 12px;
  color: rgba(245, 235, 230, 0.88);
  font-style: italic;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tsv-dialogue-text {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.2px;
}

/* 核心显隐隔离门禁：原方案绝对不显示大立绘舞台与抉择卡 */
.chat-page.is-classic-edition .theatre-stage-viewport {
  display: none !important;
}

.chat-page.is-theatre-edition .theatre-stage-viewport[data-on="1"] {
  display: block !important;
}

.chat-page.is-theatre-edition .chat-disclaimer-box {
  display: none !important;
}

/* 剧场版模式下，对话流中的发言卡支持点击瞬间切换舞台聚焦 */
.chat-page.is-theatre-edition .msg-duo-turn {
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.chat-page.is-theatre-edition .msg-duo-turn:active {
  transform: scale(0.99);
}

/* ══════════════════════════════════════════════════════════════════════════
   [theatre-stage-planA-v1] 响应式全时驻留舞台架构（左栏 9:16 实景舞台 + 手机吸顶可折叠 + 历史场景路标）
   ══════════════════════════════════════════════════════════════════════════ */

.tsv-hud-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tsv-fold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(20, 14, 24, 0.86);
  border: 1px solid rgba(244, 114, 182, 0.45);
  color: #FBCFE8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.18s ease;
}
.tsv-fold-btn:active { transform: scale(0.95); }

/* 1. 桌面端左栏「实景舞台 / 剧本档案」顶栏与全高 9:16 舞台槽 */
.cws-theatre-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 6px;
  flex-shrink: 0;
  z-index: 6;
}

.cws-tb-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: rgba(28, 20, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #F5EBE6;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.14s ease;
}
.cws-tb-back:hover { background: rgba(48, 32, 36, 0.9); }
.cws-tb-back:active { transform: scale(0.92); }

.cws-view-switch {
  flex: 1;
  display: inline-flex;
  padding: 3px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(244, 114, 182, 0.28);
}

.cws-vs-btn {
  flex: 1;
  height: 28px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: rgba(245, 235, 230, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.cws-vs-btn:hover { color: #fff; }
.cws-vs-btn.active {
  background: linear-gradient(135deg, #EC4899 0%, #A855F7 100%);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(236, 72, 153, 0.42);
}

.chat-wide-side.has-theatre-topbar .cws-back,
.chat-wide-side.has-theatre-topbar .cws-share {
  display: none !important;
}
.cws-tb-share {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--wd-warm-ivory, #F5EBE6);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.16s ease, background 0.16s ease;
}
.cws-tb-share:hover { background: rgba(255, 255, 255, 0.16); }
.cws-tb-share:active { transform: scale(0.92); }

.cws-stage-host {
  flex: 1;
  min-height: 0;
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#cws-stage-host > .theatre-stage-viewport {
  flex: 1 1 auto;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#cws-stage-host .tsv-fold-btn {
  display: none !important;
}

#cws-stage-host .tsv-backdrop {
  filter: brightness(0.86) saturate(1.08);
  transform: none;
}

#cws-stage-host .tsv-scrim {
  background: linear-gradient(
    180deg,
    rgba(12, 8, 16, 0.58) 0%,
    rgba(12, 8, 16, 0.14) 20%,
    rgba(12, 8, 16, 0.06) 66%,
    rgba(12, 8, 16, 0.94) 100%
  );
}

#cws-stage-host .tsv-actor-stage {
  top: 86px;
  bottom: -10px;
}

#cws-stage-host .tsv-actor-standing {
  max-width: 96%;
}

/* 针对不透明整幅插画型剧场卡（如 No or Yes 派对夜 1024x1792 RGB），满铺 9:16 画框 */
#cws-stage-host .theatre-stage-viewport.is-opaque-sprite .tsv-actor-stage {
  top: 0;
  bottom: 0;
}
#cws-stage-host .theatre-stage-viewport.is-opaque-sprite .tsv-actor-standing {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: none;
}

#cws-stage-host .tsv-badge-live {
  max-width: calc(100% - 102px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#cws-stage-host #tsv-theatre-title-badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cws-stage-host .tsv-script-box {
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 11px 13px;
  background: rgba(20, 14, 26, 0.86);
}

#cws-stage-host .tsv-speaker-role {
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cws-stage-host .tsv-listen-btn {
  padding: 0 10px;
  height: 25px;
  font-size: 11px;
  flex-shrink: 0;
}

#cws-stage-host .tsv-act-text {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#cws-stage-host .tsv-dialogue-text {
  -webkit-line-clamp: 3;
  font-size: 13.5px;
  line-height: 1.48;
}

/* 2. 手机竖屏顶部吸顶可折叠动态舞台 (Sticky Collapsible Mini-Stage) */
.chat-mobile-stage-dock {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
  padding: 4px 12px 6px;
  background: linear-gradient(180deg, rgba(26, 20, 18, 0.96) 0%, rgba(26, 20, 18, 0.82) 100%);
  border-bottom: 1px solid rgba(244, 114, 182, 0.16);
}

#chat-mobile-stage-dock > .theatre-stage-viewport {
  height: 268px;
  min-height: 268px;
  margin: 0;
  border-radius: 16px;
  transition: height 0.26s cubic-bezier(0.16, 1, 0.3, 1), min-height 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

#chat-mobile-stage-dock > .theatre-stage-viewport .tsv-top-hud {
  top: 8px;
  left: 8px;
  right: 8px;
  gap: 6px;
}

#chat-mobile-stage-dock > .theatre-stage-viewport .tsv-badge-live {
  min-width: 0;
  flex: 0 1 auto;
  padding: 3px 9px;
  font-size: 11px;
  overflow: hidden;
}

#chat-mobile-stage-dock > .theatre-stage-viewport #tsv-theatre-title-badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#chat-mobile-stage-dock > .theatre-stage-viewport .tsv-status-strip {
  top: 38px;
  left: 8px;
  right: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: auto;
}
#chat-mobile-stage-dock > .theatre-stage-viewport .tsv-status-strip::-webkit-scrollbar {
  display: none;
}

/* 手机横幅舞台取角色半身中近景（top: 30px, bottom: -145px），让脸部与上半身完美居于顶栏与字幕台之间 */
#chat-mobile-stage-dock > .theatre-stage-viewport .tsv-actor-stage {
  top: 30px;
  bottom: -145px;
}

#chat-mobile-stage-dock > .theatre-stage-viewport .tsv-script-box {
  bottom: 8px;
  left: 8px;
  right: 8px;
  padding: 8px 11px;
  gap: 3px;
}

#chat-mobile-stage-dock > .theatre-stage-viewport .tsv-dialogue-text {
  -webkit-line-clamp: 2;
  font-size: 12.5px;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact {
  height: 92px !important;
  min-height: 92px !important;
  border-radius: 14px;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-status-strip,
#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-cast-wall-btn,
#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-act-text,
#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-speaker-role {
  display: none !important;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-actor-stage {
  top: 4px;
  bottom: -112px;
  left: 4px;
  right: auto;
  width: 76px;
  pointer-events: auto;
  cursor: pointer;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-top-hud {
  top: 6px;
  left: 84px;
  right: 8px;
  justify-content: space-between;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-badge-live {
  min-width: 0;
  flex: 0 1 auto;
  padding: 2px 8px;
  font-size: 10.5px;
  max-width: calc(100% - 66px);
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-hud-actions {
  flex: 0 0 auto;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-fold-btn {
  padding: 2px 9px;
  font-size: 10.5px;
  flex-shrink: 0;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-script-box {
  bottom: 6px;
  left: 84px;
  right: 8px;
  padding: 5px 9px;
  border-radius: 10px;
  gap: 2px;
  background: rgba(20, 14, 26, 0.84);
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-speaker-tag {
  font-size: 12.5px;
  margin-right: auto;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-listen-btn {
  height: 21px;
  padding: 0 8px;
  font-size: 10px;
}

#chat-mobile-stage-dock > .theatre-stage-viewport.is-mobile-compact .tsv-dialogue-text {
  -webkit-line-clamp: 1;
  font-size: 11.5px;
  line-height: 1.35;
}

/* 3. 对话流内嵌「场景切换路标胶囊」与底部可折叠抉择栏 */
.chat-scene-landmark {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: min(calc(100% - 12px), 860px);
  margin: 10px auto 6px;
  padding: 4px 11px 4px 5px;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(30, 20, 38, 0.92), rgba(22, 16, 28, 0.88));
  border: 1px solid rgba(244, 114, 182, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.34);
  font-size: 11.5px;
  color: #F5E9F0;
  cursor: pointer;
  user-select: none;
  transition: transform 0.14s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.chat-scene-landmark:hover {
  border-color: rgba(244, 114, 182, 0.68);
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.24);
}
.chat-scene-landmark:active { transform: scale(0.98); }

.csl-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  flex-shrink: 0;
}
.csl-badge {
  color: #FBCFE8;
  font-weight: 700;
  white-space: nowrap;
}
.csl-sep {
  color: rgba(255, 255, 255, 0.25);
}
.csl-place {
  color: #ffffff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.csl-replay {
  margin-left: 2px;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(236, 72, 153, 0.22);
  color: #F9A8D4;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.theatre-decision-bar {
  margin-top: 10px;
}
.theatre-decision-bar.is-collapsed .tdb-chips {
  display: none !important;
}


/* 剧场版顶栏瘦身，让完整剧场名称展示无阻；同时剧场/剧情卡彻底隐藏 1v1 伴侣专属的整卡 Lv.0~13 心动值体系入口 */
.chat-page.is-theatre-edition #chat-like-btn,
.chat-page.is-theatre-edition #chat-moments-pill,
.chat-page.is-classic-edition #chat-like-btn,
.chat-page.is-classic-edition #chat-moments-pill,
.chat-page.is-theatre-edition #chat-header-badge,
.chat-page.is-classic-edition #chat-header-badge,
.chat-page.is-theatre-edition #chat-avatar-lv,
.chat-page.is-classic-edition #chat-avatar-lv,
.chat-page.is-theatre-edition #profile-favor-entry,
.chat-page.is-classic-edition #profile-favor-entry,
.chat-page.is-theatre-edition #plus-card-favor,
.chat-page.is-classic-edition #plus-card-favor,
.chat-page.is-theatre-edition #plus-card-impression,
.chat-page.is-classic-edition #plus-card-impression,
.chat-page.is-theatre-edition #plus-card-diary,
.chat-page.is-classic-edition #plus-card-diary {
  display: none !important;
}
.chat-page.is-theatre-edition .chat-character-identity,
.chat-page.is-classic-edition .chat-character-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.chat-page.is-theatre-edition .chat-char-name,
.chat-page.is-classic-edition .chat-char-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ══════════════════════════════════════════════════════════════════════
   [cast-standing-art-v1] 卡司头像 → 角色立绘大图（2026-10-30 / w1）
   只在点击头像时打开，不改动卡司席原有布局；素材与剧场版舞台大立绘同源。
   ══════════════════════════════════════════════════════════════════════ */
/* 头像外框：让「可点看立绘」有稳定热区（44px 起跳的下限在移动端够用） */
.cast-chip-ava{
  position:relative; flex:0 0 auto;
  display:inline-flex; width:34px; height:34px;
  border-radius:50%; cursor:pointer;
  transition:transform .16s ease;
  -webkit-tap-highlight-color:transparent;
}
.cast-chip-ava:active{ transform:scale(.94); }
.cast-chip-ava:focus-visible{ outline:2px solid var(--cast-color,#fff); outline-offset:2px; }
.cast-chip-ava .cast-chip-avatar{ pointer-events:none; }
/* 右下角微角标：仅点击该角标打开立绘大图，点击头像主体或名字均正常切换对话角色 */
.cast-chip-zoom{
  position:absolute; right:-4px; bottom:-4px;
  width:14px; height:14px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:8px; line-height:1; font-weight:700;
  color:rgba(255,255,255,.95);
  background:rgba(12,9,18,.92);
  border:1px solid rgba(255,255,255,.48);
  pointer-events:auto; cursor:zoom-in;
  box-shadow:0 1px 4px rgba(0,0,0,.5);
}

.csv-viewer{
  position:fixed; inset:0; z-index:140000;
  display:flex; align-items:center; justify-content:center;
  padding:16px; overflow:hidden;
  background:radial-gradient(120% 88% at 50% 2%, rgba(52,28,60,.92) 0%, rgba(8,5,12,.965) 62%);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  overscroll-behavior:contain;
  animation:csvFade .18s ease-out both;
}
@keyframes csvFade{ from{ opacity:0 } to{ opacity:1 } }
.csv-panel{
  --csv-c:#F9A8D4;
  position:relative;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  /* min-width:0 必须写：立绘原图 1024px 宽会把 flex 子项按 max-content 撑开，
     不写这一行右上角关闭按钮会被顶到视口外（实测 x=604 @430 视口）。 */
  width:100%; max-width:520px; min-width:0; max-height:100%;
  animation:csvRise .26s cubic-bezier(.22,.8,.3,1) both;
}
@keyframes csvRise{ from{ opacity:0; transform:translateY(14px) scale(.97) } to{ opacity:1; transform:none } }
.csv-head{
  width:100%; flex:0 0 auto;
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  padding:0 2px;
}
.csv-title-box{ min-width:0; }
.csv-pill{
  display:inline-block; padding:2px 8px; border-radius:999px;
  font-size:9px; font-weight:800; letter-spacing:.14em;
  color:rgba(255,255,255,.62);
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
}
.csv-name{
  margin-top:6px;
  font-size:19px; font-weight:800; line-height:1.2; letter-spacing:.02em;
  color:var(--csv-c);
  text-shadow:0 0 16px rgba(255,255,255,.16);
}
.csv-sub{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  margin-top:4px; font-size:11px; color:rgba(255,255,255,.56);
}
.csv-role:empty, .csv-voice:empty{ display:none; }
.csv-voice{ color:rgba(255,255,255,.42); }
.csv-close{
  flex:0 0 auto; width:32px; height:32px; border-radius:50%;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.8);
  font-size:14px; line-height:1; cursor:pointer;
  transition:background .18s ease, transform .16s ease;
}
.csv-close:active{ transform:scale(.92); }
.csv-stage{
  position:relative; flex:1 1 auto; min-height:200px; min-width:0;
  width:100%;
  display:flex; align-items:center; justify-content:center;
}
.csv-img{
  max-width:100%; max-height:calc(100vh - 190px);
  width:auto; height:auto; object-fit:contain;
  border-radius:18px;
  background:rgba(255,255,255,.03);
  box-shadow:0 22px 60px -18px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.12);
  opacity:0; transform:scale(.985);
  transition:opacity .2s ease, transform .24s ease;
}
.csv-viewer.csv-ready .csv-img{ opacity:1; transform:none; }
.csv-loading{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center; gap:8px;
  font-size:12px; color:rgba(255,255,255,.55);
  border-radius:18px;
  background:rgba(255,255,255,.03);
  border:1px dashed rgba(255,255,255,.16);
}
.csv-spin{
  flex:0 0 auto; width:13px; height:13px; border-radius:50%;
  border:2px solid rgba(255,255,255,.25);
  border-top-color:var(--csv-c,#F9A8D4);
  animation:csvSpin .8s linear infinite;
}
@keyframes csvSpin{ to{ transform:rotate(360deg) } }
.csv-hint{
  flex:0 0 auto;
  font-size:10.5px; letter-spacing:.04em;
  color:rgba(255,255,255,.32);
}
@media (max-height:640px){
  .csv-img{ max-height:calc(100vh - 152px); }
  .csv-hint{ display:none; }
}

/* ─────────────────────────────────────────────────────────────
   [avatar-face-crop-v1] 2026-11-02_w1
   用户反馈：气泡流头像默认 center 裁切，遇到竖版立绘 / 竖版海报兜底时
   正好裁在胸口，看不到脸。统一改为「从上往下截」（center top），
   竖版图优先露出头部；方图（face.jpg、*_avatar.webp）比例一致，不受影响。
   ───────────────────────────────────────────────────────────── */
.chat-msg-avatar,
.chat-avatar-img,
.sr-av,
.ms-av,
.msg-duo-avatar,
.cast-chip-avatar,
.msg-addressed-avatar,
.cfr-avatar,
.tss-actor-avatar,
.tcm-actor-avatar,
.tci-member-thumb {
  object-fit: cover !important;
  object-position: center top !important;
}

    /* ── Wish 2.0 剧情存档与多分支抽屉 ── */
    .saves-drawer { position: fixed; inset: 0; z-index: 120000; display: none; }
    .saves-backdrop { position: absolute; inset: 0; background: rgba(10,7,6,0.72); backdrop-filter: blur(4px); }
    .saves-sheet {
      position: absolute; left: 0; right: 0; bottom: 0; max-height: 85vh;
      background: #17120F; border-radius: 22px 22px 0 0;
      border-top: 1px solid rgba(255,255,255,0.12); padding: 12px 18px 24px;
      display: flex; flex-direction: column; overflow: hidden;
      animation: mapRise 0.28s cubic-bezier(.22,.61,.36,1);
      box-shadow: 0 -10px 40px rgba(0,0,0,0.6);
    }
    .saves-grabber {
      width: 36px; height: 4px; border-radius: 2px;
      background: rgba(255,255,255,0.22); margin: 0 auto 12px; flex-shrink: 0;
    }
    .saves-header { flex-shrink: 0; margin-bottom: 12px; }
    .saves-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .saves-title { font-size: 15px; font-weight: 700; color: #F0E6DF; display: flex; align-items: center; gap: 6px; }
    .saves-title-icon { font-size: 16px; }
    .saves-quota-badge {
      font-size: 11px; font-weight: 700; color: #E8C46A;
      background: rgba(232,196,106,0.12); border: 1px solid rgba(232,196,106,0.28);
      padding: 3px 8px; border-radius: 12px;
    }
    .saves-sub-desc { font-size: 11.5px; color: rgba(214,198,190,0.65); margin-top: 4px; line-height: 1.4; }
    .saves-upgrade-banner {
      margin-top: 8px; padding: 6px 10px; border-radius: 8px;
      background: linear-gradient(90deg, rgba(201,167,234,0.14), rgba(244,63,94,0.14));
      border: 1px solid rgba(201,167,234,0.3); font-size: 11px; color: #D8B4FE;
      cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    }
    .saves-cta-box {
      flex-shrink: 0; margin-bottom: 14px; padding: 12px;
      background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
      border-radius: 14px;
    }
    .saves-new-btn {
      width: 100%; height: 40px; border-radius: 10px; border: none; cursor: pointer;
      background: linear-gradient(135deg, #F43F5E, #A855F7);
      color: #fff; font-size: 13.5px; font-weight: 700;
      display: flex; align-items: center; justify-content: center; gap: 6px;
      box-shadow: 0 4px 14px rgba(244,63,94,0.32);
      transition: transform 0.15s ease, opacity 0.15s ease;
    }
    .saves-new-btn:active { transform: scale(0.98); opacity: 0.9; }
    .saves-new-hint { font-size: 10.5px; color: rgba(214,198,190,0.5); margin-top: 6px; text-align: center; }
    .saves-list-container {
      flex: 1; overflow-y: auto; overscroll-behavior: contain;
      display: flex; flex-direction: column; gap: 10px; padding-right: 2px;
    }
    .saves-list-container::-webkit-scrollbar { width: 4px; }
    .saves-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
    .saves-loading { text-align: center; padding: 30px; font-size: 12px; color: rgba(214,198,190,0.5); }
    .saves-empty { text-align: center; padding: 30px 20px; font-size: 12px; color: rgba(214,198,190,0.5); }

    .save-slot-card {
      background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px; padding: 12px; transition: border-color 0.2s ease, background 0.2s ease;
      display: flex; flex-direction: column; gap: 8px;
    }
    .save-slot-card.active {
      background: rgba(244,63,94,0.05); border-color: rgba(244,63,94,0.4);
      box-shadow: 0 0 16px rgba(244,63,94,0.08);
    }
    .save-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .save-slot-title-box { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
    .save-slot-title {
      font-size: 13.5px; font-weight: 700; color: #EDE4DE;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .save-slot-rename-btn {
      background: none; border: none; cursor: pointer; color: rgba(214,198,190,0.45);
      font-size: 11px; padding: 2px; flex-shrink: 0;
    }
    .save-slot-rename-btn:hover { color: #EDE4DE; }
    .save-slot-badge {
      font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 8px;
      background: rgba(255,255,255,0.08); color: rgba(214,198,190,0.6); flex-shrink: 0;
    }
    .save-slot-badge.active {
      background: rgba(16,185,129,0.15); color: #34D399; border: 1px solid rgba(16,185,129,0.3);
    }
    .save-slot-meta {
      display: flex; align-items: center; gap: 10px; font-size: 11px; color: rgba(214,198,190,0.65);
    }
    .save-slot-favor { color: #FB7185; font-weight: 600; display: flex; align-items: center; gap: 2px; }
    .save-slot-preview {
      font-size: 11px; color: rgba(214,198,190,0.5); line-height: 1.4;
      background: rgba(0,0,0,0.25); border-radius: 6px; padding: 6px 8px;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .save-slot-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 2px; }
    .slot-action-btn {
      font-size: 11.5px; font-weight: 600; border-radius: 7px; padding: 5px 12px;
      border: none; cursor: pointer; transition: all 0.15s ease;
    }
    .slot-action-btn.switch {
      background: rgba(255,255,255,0.1); color: #EDE4DE;
    }
    .slot-action-btn.switch:hover { background: rgba(255,255,255,0.18); color: #fff; }
    .slot-action-btn.current {
      background: rgba(16,185,129,0.1); color: #34D399; cursor: default;
    }
    .slot-action-btn.delete {
      background: rgba(239,68,68,0.1); color: #F87171; padding: 5px 8px;
    }
    .slot-action-btn.delete:hover { background: rgba(239,68,68,0.2); }


    /* ── Wish 2.0 剧场经历与羁绊好感 (Theater Bonds) ── */
    .profile-theatre-bonds-box {
      margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px;
      background: rgba(244,63,94,0.06); border: 1px solid rgba(244,63,94,0.22);
    }
    .ptb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
    .ptb-title { font-size: 13px; font-weight: 700; color: #EDE4DE; display: flex; align-items: center; gap: 6px; }
    .ptb-tag {
      font-size: 10.5px; font-weight: 700; color: #FB7185;
      background: rgba(251,113,133,0.15); padding: 2px 8px; border-radius: 10px;
    }
    .ptb-list { display: flex; flex-direction: column; gap: 8px; }
    .ptb-item {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 8px 10px; border-radius: 8px; background: rgba(0,0,0,0.25);
    }
    .ptb-info { display: flex; flex-direction: column; gap: 2px; }
    .ptb-theatre-name { font-size: 12px; font-weight: 600; color: #EDE4DE; }
    .ptb-theatre-pts { font-size: 10.5px; color: rgba(214,198,190,0.65); }
    .ptb-jump-btn {
      font-size: 11px; font-weight: 600; color: #fff; border: none; cursor: pointer;
      background: linear-gradient(135deg, #F43F5E, #A855F7);
      padding: 5px 10px; border-radius: 6px; white-space: nowrap;
      transition: opacity 0.15s ease;
    }
    .ptb-jump-btn:active { opacity: 0.85; }

    .chat-theatre-bond-badge {
      display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
      border-radius: 10px; font-size: 10px; font-weight: 700;
      color: #FB7185; background: rgba(251,113,133,0.12);
      border: 1px solid rgba(251,113,133,0.25); cursor: pointer;
      margin-left: 6px; vertical-align: middle;
    }

/* ── [mask-system-v1] 916-2 身份面具抽屉与模态框样式 ── */
.mask-drawer { position: fixed; inset: 0; z-index: 125000; display: none; }
.mask-backdrop { position: absolute; inset: 0; background: rgba(10,7,6,0.76); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mask-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 82vh;
  background: linear-gradient(180deg, #1C151B 0%, #120F13 100%);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid rgba(244,63,94,0.3);
  padding: 12px 18px 24px;
  display: flex; flex-direction: column; overflow: hidden;
  animation: mapRise 0.28s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 -12px 48px rgba(0,0,0,0.7), 0 0 24px rgba(244,63,94,0.12);
}
.mask-grabber {
  width: 38px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.25); margin: 0 auto 12px; flex-shrink: 0;
}
.mask-header { flex-shrink: 0; margin-bottom: 12px; }
.mask-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mask-title { font-size: 15px; font-weight: 700; color: #F0E6DF; display: flex; align-items: center; gap: 6px; }
.mask-title-icon { font-size: 16px; }
.mask-sub-desc { font-size: 11.5px; color: rgba(214,198,190,0.65); margin-top: 4px; line-height: 1.4; }
.mask-btn-create {
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #F43F5E, #9333EA);
  border: none; padding: 4px 10px; border-radius: 12px;
  cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease;
}
.mask-btn-create:active { transform: scale(0.96); opacity: 0.9; }

.mask-active-section { flex-shrink: 0; margin-bottom: 12px; }
.mask-section-label { font-size: 11px; font-weight: 700; color: #E8C46A; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px; display: block; }
.mask-active-card {
  background: linear-gradient(135deg, rgba(244,63,94,0.14) 0%, rgba(147,51,234,0.1) 100%);
  border: 1px solid rgba(244,63,94,0.45);
  border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 4px 18px rgba(244,63,94,0.12);
  display: flex; flex-direction: column; gap: 6px;
}
.mask-active-head { display: flex; align-items: center; justify-content: space-between; }
.mask-active-name { font-size: 14px; font-weight: 700; color: #FFF; display: flex; align-items: center; gap: 6px; }
.mask-active-badge {
  font-size: 10px; font-weight: 700; color: #34D399;
  background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.3);
  padding: 2px 7px; border-radius: 10px;
}
.mask-active-appellation { font-size: 12px; color: #F472B6; font-weight: 600; }
.mask-active-desc { font-size: 11px; color: rgba(255,255,255,0.7); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mask-active-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mask-chip-tag { font-size: 10px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.1); }

.mask-list-header { flex-shrink: 0; margin-bottom: 8px; }
.mask-list-container {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 10px; padding-right: 2px;
}
.mask-list-container::-webkit-scrollbar { width: 4px; }
.mask-list-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.mask-loading, .mask-empty { text-align: center; padding: 24px 10px; font-size: 12px; color: rgba(214,198,190,0.5); }

.mask-item-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 13px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 6px;
  transition: all 0.2s ease;
}
.mask-item-card.is-active {
  border-color: rgba(244,63,94,0.5);
  background: rgba(244,63,94,0.06);
}
.mask-item-head { display: flex; align-items: center; justify-content: space-between; }
.mask-item-title { font-size: 13.5px; font-weight: 700; color: #E2E8F0; display: flex; align-items: center; gap: 6px; }
.mask-item-type { font-size: 10px; color: #A78BFA; background: rgba(167,139,250,0.12); padding: 1px 5px; border-radius: 4px; }
.mask-item-desc { font-size: 11px; color: rgba(226,232,240,0.65); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mask-item-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; gap: 8px; }
.mask-item-appellation-hint { font-size: 11px; color: #F472B6; }
.mask-item-btn-switch {
  font-size: 11.5px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #E11D48, #7C3AED);
  border: none; padding: 5px 12px; border-radius: 8px;
  cursor: pointer; transition: transform 0.15s ease;
}
.mask-item-btn-switch:active { transform: scale(0.95); }
.mask-item-btn-switch.current {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4);
  cursor: default;
}
.mask-item-btn-delete {
  font-size: 11px; color: #EF4444; background: none; border: none; cursor: pointer; padding: 4px;
}

/* Modal */
.mask-modal { position: fixed; inset: 0; z-index: 130000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mask-modal-dialog {
  position: relative; width: 100%; max-width: 390px; max-height: 85vh;
  background: #171317; border: 1px solid rgba(244,63,94,0.35);
  border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,0.8);
  display: flex; flex-direction: column; overflow: hidden;
  animation: mapRise 0.24s cubic-bezier(.22,.61,.36,1);
}
.mask-modal-header {
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.mask-modal-title { font-size: 14px; font-weight: 700; color: #F1F5F9; }
.mask-close-btn { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 16px; cursor: pointer; }
.mask-modal-body {
  padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
}
.mask-form-group { display: flex; flex-direction: column; gap: 4px; }
.mask-form-label { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,0.85); }
.mask-req { color: #F43F5E; }
.mask-form-input, .mask-form-textarea {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: #FFF; font-size: 12px; padding: 8px 10px;
  outline: none; transition: border-color 0.2s ease;
}
.mask-form-input:focus, .mask-form-textarea:focus { border-color: #F43F5E; }
.mask-gender-radio-group { display: flex; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 4px; }
.mask-gender-item { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.mask-modal-footer {
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}
.mask-btn-cancel {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 6px 14px; color: rgba(255,255,255,0.7); font-size: 12px; cursor: pointer;
}
.mask-btn-submit {
  background: linear-gradient(135deg, #F43F5E, #9333EA);
  border: none; border-radius: 8px; padding: 6px 16px; color: #FFF; font-size: 12px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 12px rgba(244,63,94,0.3);
}

/* ═══ [heart-line-v1] 角色详情浮层 · 好感度入口 ═══════════════════════════
   背景：顶栏 Lv 徽章嵌在「点击了解 TA」的命中区里，点它只会打开本浮层；
   浮层原先没有任何好感信息，好感度页（#cp-favor）全仓零入口。
   这个入口把「徽章 → 详情 → 阶梯页」补成一条完整可走的路。 */
.profile-favor-entry {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--wd-warm-ivory, #EDE7E3);
  font-family: var(--wd-font-sans, system-ui, sans-serif);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.profile-favor-entry:active { background: rgba(255, 255, 255, 0.09); }
.profile-favor-entry .pfe-heart {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
  color: #F472B6;
}
.profile-favor-entry .pfe-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.profile-favor-entry .pfe-lv {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-favor-entry .pfe-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.profile-favor-entry .pfe-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: #F472B6;
  transition: width 0.4s ease, background 0.3s ease;
}
.profile-favor-entry .pfe-num {
  flex: 0 0 auto;
  font-size: 11px;
  color: #B9AFA9;
  white-space: nowrap;
}
.profile-favor-entry .pfe-go {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: #E9C48C;
  white-space: nowrap;
}

/* [heart-line-v1] 好感度页从聊天页打开时的层级：二级页默认 90 < 聊天页 100，
   不抬高就会被对话整层盖住（这正是过去只能先关聊天、把玩家踢出对话的原因）。 */
.cp-page.is-over-chat { z-index: 120; }

    /* [heart-line-v1] 头像等级角标（好感度常驻入口）
       顶栏在 390px 视口里被 6 个图标挤到没有名字/徽章的位置，实测
       .chat-name-meta 宽度 = 0，所以徽章再好看也看不见。
       角标叠在头像左下，不占任何布局宽度，永远可点。 */
    .chat-avatar-lv {
      position: absolute;
      left: -5px;
      bottom: -3px;
      min-width: 17px;
      height: 17px;
      padding: 0 4px;
      box-sizing: border-box;
      border-radius: 9999px;
      background: rgba(20, 17, 16, 0.94);
      border: 1.2px solid var(--wd-rosewood);
      color: var(--wd-rosewood);
      font-family: var(--wd-font-sans);
      font-size: 9.5px;
      font-weight: 800;
      line-height: 15px;
      text-align: center;
      letter-spacing: -0.2px;
      z-index: 3;
      cursor: pointer;
    }
    .chat-avatar-lv:active { transform: scale(0.9); }

    /* ══════════════════════════════════════════════════════════════════════
       [wide-split-v1] 宽屏左右分屏 · 内页聊天页（2026-11-15 w1）
       ──────────────────────────────────────────────────────────────────────
       目标：9:16 设备一切都保持原样；宽屏（电脑 / 平板横屏 / 折叠屏展开 /
       手机横屏且够高）把聊天页变成「左侧角色信息栏 + 右侧对话」。

       为什么这样做：
         · #stage 原本被锁死 aspect-ratio:9/16（电脑上是一条 506px 竖条，两侧大片
           空白）。只有在「聊天页打开」时（#stage.chat-mode）才放开宽度，
           发现页永不变宽 → 首页零影响。
         · 左栏用 absolute 定位 + 给 .chat-page 加 padding-left 让位。
           聊天页主内容（顶栏 / 模型栏 / 消息流 / 灵感条 / 输入栏）全部是
           position:relative 的 flex 子项，padding 一加就自动让位，不需要动
           DOM 结构与既有布局代码。
       回滚：整块删除 + index.html 的 <aside id="chat-wide-side"> + app.js 的
             renderWideSidePanel 即可，窄屏逻辑一行未改。
       ══════════════════════════════════════════════════════════════════════ */

    /* 窄屏 / 竖屏：信息栏彻底不存在（连布局占位都没有） */
    .chat-wide-side {
      display: none;
      position: absolute;
      top: 0; left: 0; bottom: 0;
      width: var(--cws-w, 380px);
      z-index: 4;
      flex-direction: column;
      overflow: hidden;
      background: linear-gradient(180deg, #171211 0%, #100C0B 100%);
      border-right: 1px solid rgba(201, 142, 138, 0.14);
      box-shadow: 14px 0 40px rgba(0, 0, 0, 0.38);
    }

    .cws-scroll {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .cws-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

    /* [hero-card-v2] 左栏封面 = 一张贴满栏宽的圆角大卡（替换 hero-916-v1）
       ────────────────────────────────────────────────────────────────────
       上一版把 9:16 画框居中，栏宽 432 时画框只有 334，两侧各留 49px 虚化边 ——
       在宽屏里看着窄、碎，不像一张「卡」。这一版：
         · 比例放宽到 4:5，宽度吃满栏宽（高度上限仍由 --cws-hero-h 换算，
           矮屏自动收窄，保证角色信息不被挤出首屏）；
         · object-fit 从 contain 改 cover，整块铺满，两侧不再有模糊留边；
         · 圆角 20px + 1px 暖色内描边，顶部留 10px 缝，四个角都完整可见；
         · 顶部暗角 + 底部渐隐都收进画框内部（::after，border-radius: inherit），
           取代原来铺满整个 hero 的矩形遮罩 —— 那会把下面两个圆角涂平。
       想再宽/再窄只改 aspect-ratio 与 calc 里的 4/5 两处
       （3:4 更高更方、1:1 更矮；4:5 是竖版卡片最常用的比例）。 */
    .cws-hero {
      position: relative;
      flex: 0 0 auto;
      overflow: hidden;
      padding-top: 10px;
      background: transparent;
    }
    /* 改成 cover 满铺后不再需要虚化底图；保留元素（JS 仍在写它的 background-image） */
    .cws-hero-bg { display: none; }
    .cws-hero-frame {
      position: relative;
      z-index: 1;
      width: min(100%, calc(var(--cws-hero-h, 66vh) * 4 / 5));
      aspect-ratio: 4 / 5;
      margin: 0 auto;
      overflow: hidden;
      border-radius: 24px;
      background: #0E0A09;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09),
                  0 0 0 1px rgba(201, 142, 138, 0.26),
                  0 10px 28px rgba(0, 0, 0, 0.45);
    }
    .cws-hero-frame::after {
      content: '';
      position: absolute;
      inset: 0;
      z-index: 4;
      border-radius: inherit;
      pointer-events: none;
      background:
        linear-gradient(180deg, rgba(10, 7, 6, 0.52) 0%, rgba(10, 7, 6, 0.10) 12%, rgba(10, 7, 6, 0) 24%),
        linear-gradient(0deg, rgba(23, 18, 17, 0.94) 0%, rgba(23, 18, 17, 0.62) 7%, rgba(23, 18, 17, 0.22) 15%, rgba(23, 18, 17, 0) 26%);
    }
    .cws-hero-img {
      position: relative;
      z-index: 1;
      width: 100%; height: 100%;
      object-fit: cover;
      object-position: center 18%;
      display: block;
    }
    /* [cws-hero-motion-v1] 角色卡左上角微动视频层与触碰交互层（严禁 transform:scale 保持原生 1:1 清晰度） */
    .cws-hero-video,
    .cws-hero-action-video {
      position: absolute;
      inset: 0;
      width: 100%; height: 100%;
      object-fit: cover;
      object-position: center 18%;
      transform: none;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.22s ease;
    }
    .cws-hero-video { z-index: 2; }
    .cws-hero-action-video { z-index: 3; }
    .cws-hero-frame.is-motion-mode .cws-hero-video.is-video-ready { opacity: 1; }
    .cws-hero-frame.is-motion-mode .cws-hero-action-video.is-playing { opacity: 1; }

    .cws-hero-touch-layer {
      position: absolute;
      inset: 0;
      z-index: 5;
      user-select: none;
      -webkit-user-select: none;
    }
    .cws-hero-hitbox {
      position: absolute;
      left: 20%;
      width: 60%;
      border: none;
      border-radius: 50%;
      background: transparent;
      touch-action: none;
      transition: background 0.2s ease;
      -webkit-tap-highlight-color: transparent;
    }
    .cws-hb-head { top: 12%; height: 20%; cursor: grab; }
    .cws-hb-head:active { cursor: grabbing; }
    .cws-hb-cheek { top: 32%; height: 16%; cursor: pointer; }
    .cws-hb-chest { top: 48%; height: 24%; cursor: pointer; }
    .cws-hero-hitbox:hover,
    .cws-hero-hitbox:active,
    .cws-hero-hitbox.is-pressing {
      background: radial-gradient(circle, rgba(244, 114, 182, 0.24) 0%, rgba(236, 72, 153, 0.08) 58%, transparent 78%);
    }
    .cws-hb-tip {
      position: absolute;
      top: -18px;
      left: 50%;
      transform: translate(-50%, 4px);
      background: rgba(18, 12, 15, 0.88);
      border: 1px solid rgba(244, 114, 182, 0.45);
      color: #F7B4CA;
      font-size: 11px;
      font-weight: 500;
      padding: 3px 9px;
      border-radius: 9999px;
      opacity: 0;
      pointer-events: none;
      white-space: nowrap;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
      transition: opacity 0.18s ease, transform 0.18s ease;
      z-index: 10;
    }
    .cws-hb-head .cws-hb-tip {
      top: auto;
      bottom: -14px;
    }
    .cws-hero-hitbox:hover .cws-hb-tip,
    .cws-hero-hitbox:active .cws-hb-tip,
    .cws-hero-hitbox.is-pressing .cws-hb-tip {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .cws-hero-heartbeat-glow {
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      opacity: 0;
      background: radial-gradient(circle at 50% 58%, rgba(244, 63, 94, 0.28) 0%, rgba(236, 72, 153, 0.10) 48%, transparent 76%);
      box-shadow: inset 0 0 38px rgba(244, 63, 94, 0.36);
      transition: opacity 0.2s ease;
    }
    .cws-hero-heartbeat-glow.is-active {
      opacity: 1;
      animation: cwsHeartbeatPulse 0.62s ease-in-out infinite;
    }
    @keyframes cwsHeartbeatPulse {
      0%, 100% { opacity: 0.55; }
      45% { opacity: 1; }
    }
    .cws-hero-pet-ring {
      position: absolute;
      width: 40px;
      height: 40px;
      transform: translate(-50%, -50%);
      pointer-events: none;
      z-index: 7;
      filter: drop-shadow(0 2px 8px rgba(244, 114, 182, 0.65));
    }
    .cws-hero-fx-host {
      position: absolute;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
      z-index: 8;
    }
    .cws-hero-gesture-pill {
      position: absolute;
      top: 22px;
      left: 50%;
      z-index: 10;
      pointer-events: none;
      padding: 5px 12px;
      border-radius: 9999px;
      font-size: 11.5px;
      font-weight: 600;
      color: #FFF4F7;
      background: rgba(34, 16, 24, 0.86);
      border: 1px solid rgba(244, 114, 182, 0.52);
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      white-space: nowrap;
      max-width: calc(100% - 116px);
      overflow: hidden;
      text-overflow: ellipsis;
      opacity: 0;
      transform: translate(-50%, -6px);
      transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .cws-hero-gesture-pill.is-visible {
      opacity: 1;
      transform: translate(-50%, 0);
    }
    .cws-hero-touch-hint {
      position: absolute;
      top: 24px;
      left: 50%;
      z-index: 9;
      pointer-events: none;
      padding: 4px 11px;
      border-radius: 9999px;
      font-size: 10.5px;
      font-weight: 500;
      color: #F7EDE8;
      background: rgba(20, 14, 14, 0.66);
      border: 1px solid rgba(236, 150, 164, 0.34);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      white-space: nowrap;
      opacity: 0;
      transform: translate(-50%, -4px);
      transition: opacity 0.24s ease, transform 0.24s ease;
    }
    .cws-hero-touch-hint.is-visible {
      opacity: 0.9;
      transform: translate(-50%, 0);
    }
    .cws-hero-touch-hint.is-ducked {
      opacity: 0 !important;
    }

    /* ── [discover-touch-to-inner-v1] 行動端豎屏內頁「微動互動」膠囊與全螢幕微動視圖 ── */
    .chat-mobile-motion-pill {
      background: rgba(244, 114, 182, 0.14);
      border-color: rgba(244, 114, 182, 0.36);
      color: #F9D2DF;
    }
    .chat-mobile-motion-pill:active {
      background: rgba(244, 114, 182, 0.26);
    }
    .mobile-motion-overlay {
      position: absolute;
      inset: 0;
      z-index: 165;
      background: #0D090B;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    .mmo-topbar {
      position: absolute;
      top: calc(12px + env(safe-area-inset-top, 0px));
      left: 14px;
      right: 14px;
      z-index: 15;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      pointer-events: none;
    }
    .mmo-back-btn {
      pointer-events: auto;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      height: 34px;
      padding: 0 12px 0 8px;
      border-radius: 9999px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: rgba(18, 13, 14, 0.68);
      color: #F7EDE8;
      font-size: 12.5px;
      font-weight: 500;
      cursor: pointer;
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
    }
    .mmo-back-btn:active { transform: scale(0.95); }
    .mmo-title {
      font-size: 13px;
      font-weight: 600;
      color: rgba(247, 237, 232, 0.92);
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .mmo-topbar-spacer { width: 72px; }
    .mmo-hero-frame {
      position: relative;
      width: 100%;
      height: 100%;
      max-width: none;
      aspect-ratio: auto;
      border-radius: 0;
    }
    .mmo-hero-frame .cws-hero-touch-hint,
    .mmo-hero-frame .cws-hero-gesture-pill {
      top: calc(58px + env(safe-area-inset-top, 0px));
    }
    .mmo-hero-frame .cws-hero-touch-bubble {
      bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    }
    .cws-hero-touch-bubble {
      position: absolute;
      left: 12px;
      right: 12px;
      bottom: 44px;
      z-index: 9;
      pointer-events: none;
      padding: 8px 12px;
      border-radius: 14px;
      background: rgba(22, 15, 15, 0.84);
      border: 1px solid rgba(224, 152, 162, 0.38);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.52);
      -webkit-backdrop-filter: blur(12px);
      backdrop-filter: blur(12px);
      color: #F7EDE8;
      opacity: 0;
      transform: translateY(6px);
      transition: opacity 0.22s ease, transform 0.22s ease;
    }
    .cws-hero-touch-bubble.is-visible {
      opacity: 1;
      transform: translateY(0);
    }
    .cws-hero-touch-bubble.is-guarded {
      border-color: rgba(244, 114, 142, 0.55);
      animation: cwsTouchShake 0.34s ease;
    }
    @keyframes cwsTouchShake {
      0%, 100% { transform: translateX(0); }
      25% { transform: translateX(-4px); }
      50% { transform: translateX(4px); }
      75% { transform: translateX(-2px); }
    }
    .cws-hero-touch-bubble .ctb-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      font-size: 10.5px;
      font-weight: 600;
      color: #F3B8C2;
      margin-bottom: 3px;
    }
    .cws-hero-touch-bubble .ctb-badge {
      font-size: 10px;
      font-weight: 500;
      color: rgba(245, 235, 230, 0.72);
    }
    .cws-hero-touch-bubble .ctb-act {
      font-size: 11px;
      line-height: 1.4;
      color: rgba(240, 213, 206, 0.78);
      font-style: italic;
      margin-bottom: 2px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .cws-hero-touch-bubble .ctb-line {
      font-size: 12px;
      line-height: 1.45;
      color: #FFF7F4;
      font-weight: 500;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* 旧的整幅矩形遮罩已由 .cws-hero-frame::after 接管（否则会涂掉下方两个圆角） */
    .cws-hero-fade { display: none; }
    .cws-back {
      position: absolute;
      top: 22px; left: 16px;
      z-index: 8;
      width: 36px; height: 36px;
      border-radius: 50%;
      display: grid; place-items: center;
      background: rgba(18, 13, 12, 0.58);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: var(--wd-warm-ivory, #F5EBE6);
      cursor: pointer;
      transition: transform 0.16s ease, background 0.16s ease;
    }
    .cws-back:hover { background: rgba(40, 28, 25, 0.8); }
    .cws-back:active { transform: scale(0.92); }

    .cws-share {
      position: absolute;
      top: 22px; right: 16px;
      z-index: 8;
      width: 36px; height: 36px;
      border-radius: 50%;
      display: grid; place-items: center;
      background: rgba(18, 13, 12, 0.58);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.16);
      color: var(--wd-warm-ivory, #F5EBE6);
      cursor: pointer;
      transition: transform 0.16s ease, background 0.16s ease;
    }
    .cws-share:hover { background: rgba(40, 28, 25, 0.8); }
    .cws-share:active { transform: scale(0.92); }

    .cws-body {
      position: relative;
      z-index: 6;
      margin-top: -34px;
      padding: 0 18px 20px;
    }

    .cws-name-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .cws-name-main {
      display: flex;
      align-items: center;
      gap: 7px;
      min-width: 0;
      flex: 1 1 auto;
    }
    .cws-name {
      min-width: 0;
      flex: 0 1 auto;
      font-family: var(--wd-font-serif, 'Playfair Display', Georgia, serif);
      font-size: 22px;
      font-weight: 700;
      line-height: 1.28;
      color: #F7EDE8;
      letter-spacing: 0.2px;
      text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
      /* 剧场卡名字很长（「No or Yes」派對夜），单行省略，别把模型胶囊挤下去 */
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .cws-media-switch {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      flex: 0 0 auto;
    }
    .cws-media-btn {
      appearance: none;
      -webkit-appearance: none;
      font-family: var(--wd-font-sans, Inter, sans-serif);
      font-size: 10.5px;
      font-weight: 600;
      line-height: 1.2;
      letter-spacing: 0.2px;
      padding: 4px 8.5px;
      border-radius: 9999px;
      color: rgba(245, 235, 230, 0.80);
      background: rgba(26, 18, 17, 0.68);
      border: 1px solid rgba(255, 255, 255, 0.22);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      white-space: nowrap;
      cursor: pointer;
      transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
    }
    .cws-media-btn:hover:not(:disabled):not(.is-disabled) {
      color: #FFF8F6;
      background: rgba(68, 42, 45, 0.76);
      border-color: rgba(232, 160, 168, 0.58);
    }
    .cws-media-btn:active:not(:disabled):not(.is-disabled) {
      transform: scale(0.95);
    }
    .cws-media-btn.is-active {
      color: #FFF8F6;
      background: linear-gradient(135deg, rgba(206, 108, 122, 0.58) 0%, rgba(154, 74, 88, 0.54) 100%);
      border-color: rgba(240, 172, 180, 0.80);
      box-shadow: 0 2px 10px rgba(201, 102, 116, 0.30);
    }
    .cws-media-btn:disabled,
    .cws-media-btn.is-disabled {
      color: rgba(162, 158, 158, 0.45) !important;
      background: rgba(52, 50, 50, 0.46) !important;
      border-color: rgba(148, 144, 144, 0.20) !important;
      box-shadow: none !important;
      cursor: not-allowed !important;
      transform: none !important;
    }
    .cws-model-pill {
      flex: 0 0 auto;
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.2px;
      padding: 4px 10px;
      border-radius: 9999px;
      color: #F3DCD6;
      background: rgba(142, 90, 90, 0.30);
      border: 1px solid rgba(201, 142, 138, 0.42);
      white-space: nowrap;
    }
    .cws-sub-line {
      margin-top: 7px;
      font-size: 11.5px;
      line-height: 1.5;
      color: rgba(245, 235, 230, 0.52);
    }
    .cws-sub-line:empty { display: none; }

    .cws-stats {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px 14px;
      margin-top: 9px;
      font-size: 11.5px;
      color: rgba(245, 235, 230, 0.72);
      font-variant-numeric: tabular-nums;
    }
    .cws-stats .cws-stat { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
    .cws-stats .cws-stat b { color: #F0D5CE; font-weight: 700; }
    .cws-stats .cws-stat--muted { color: rgba(245, 235, 230, 0.42); }

    .cws-desc {
      margin-top: 12px;
      font-size: 12.8px;
      line-height: 1.8;
      color: rgba(245, 235, 230, 0.80);
      white-space: pre-wrap;
      word-break: break-word;
    }
    .cws-desc.is-clamped {
      display: -webkit-box;
      -webkit-line-clamp: 9;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .cws-desc-more {
      margin-top: 6px;
      background: none;
      border: none;
      padding: 0;
      font-size: 11.5px;
      font-weight: 600;
      color: #C98E8A;
      cursor: pointer;
    }

    .cws-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 12px;
    }
    .cws-tags:empty { display: none; }
    .cws-tag {
      font-size: 10.5px;
      line-height: 1;
      padding: 6px 9px;
      border-radius: 7px;
      color: rgba(245, 235, 230, 0.72);
      background: rgba(255, 255, 255, 0.055);
      border: 1px solid rgba(255, 255, 255, 0.085);
      white-space: nowrap;
    }

    .cws-sec {
      margin-top: 14px;
      padding-top: 11px;
      border-top: 1px dashed rgba(201, 142, 138, 0.18);
    }
    .cws-sec-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.3px;
      color: #DFB6AC;
      margin-bottom: 11px;
    }
    .cws-sec-tag {
      font-size: 10.5px;
      font-weight: 600;
      color: rgba(245, 235, 230, 0.45);
    }

    /* ── 全员卡司（剧场卡）── */
    .cws-cast-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .cws-cast-item {
      display: flex;
      align-items: center;
      gap: 7px;
      min-width: 0;
      padding: 5px 7px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .cws-cast-avatar {
      width: 32px; height: 32px;
      border-radius: 50%;
      object-fit: cover;
      flex: 0 0 auto;
      border: 1.5px solid var(--cws-cast-color, rgba(255, 255, 255, 0.4));
      background: #221A18;
    }
    .cws-cast-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .cws-cast-name {
      font-size: 12.5px;
      font-weight: 600;
      color: #F2E4DE;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .cws-cast-role {
      font-size: 10.5px;
      color: rgba(245, 235, 230, 0.48);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ── 开场剧本三型（旁白 / 对白 / 抉择）── */
    .cws-script-body { display: flex; flex-direction: column; gap: 8px; }
    .cws-rpui {
      font-size: 12.4px;
      line-height: 1.62;
      white-space: pre-wrap;
      word-break: break-word;
      border-radius: 0 9px 9px 0;
      padding: 9px 11px;
    }
    .cws-rpui--narration {
      color: rgba(245, 235, 230, 0.74);
      background: rgba(255, 255, 255, 0.045);
      border-left: 2px solid rgba(201, 142, 138, 0.42);
      /* 卡上的 opening_background 是长篇前情，左栏装不下全文。
         折 2 行、点一下展开 —— 和「展开全文」同一个心智，不隐藏信息。
         折叠属性放内层 .cws-rpui-t：外层带 padding 时 clamp 会漏出半行。 */
      cursor: pointer;
    }
    .cws-rpui--narration::after { content: ''; display: block; }
    .cws-rpui--narration.is-open::after { content: '收起 ‹'; font-size: 10.5px; color: #C98E8A; margin-top: 6px; font-style: normal; }
    .cws-rpui--dialogue {
      color: #F8E9E4;
      background: rgba(201, 142, 138, 0.11);
      border-left: 2px solid #C98E8A;
      font-style: italic;
      /* 开场白可能是三四段连排，同样先折 3 行，点开看全文（折叠在内层） */
      cursor: pointer;
    }

    /* 折叠加在内层：clamp 与 padding 不能同处一个盒子（会把下一行漏半截） */
    .cws-rpui-t {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      overflow: hidden;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .cws-rpui--narration .cws-rpui-t { -webkit-line-clamp: 2; }
    /* 说话人小标签：台词块是斜体，标签不能跟着斜 */
    .cws-rpui-who {
      display: block;
      margin-bottom: 4px;
      font-size: 10.5px;
      font-weight: 700;
      font-style: normal;
      letter-spacing: 0.4px;
      color: #E9B6AE;
    }
    .cws-rpui--dialogue .cws-rpui-t { -webkit-line-clamp: 3; }
    .cws-rpui.is-open .cws-rpui-t {
      display: block;
      -webkit-line-clamp: unset;
      overflow: visible;
    }

    .cws-rpui--choice-title {
      font-size: 11.5px;
      font-weight: 700;
      color: rgba(245, 235, 230, 0.6);
      margin-top: 4px;
    }
    .cws-choice-btn {
      display: flex;
      align-items: flex-start;
      gap: 7px;
      width: 100%;
      text-align: left;
      padding: 8px 10px;
      border-radius: 10px;
      background: rgba(42, 31, 29, 0.72);
      border: 1px solid rgba(255, 255, 255, 0.09);
      color: rgba(245, 235, 230, 0.88);
      font-size: 12px;
      line-height: 1.52;
      font-family: inherit;
      cursor: pointer;
      transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
    }
    .cws-choice-btn::before { content: '✦'; color: #C98E8A; flex: 0 0 auto; font-size: 11px; line-height: 1.7; }
    .cws-choice-btn:hover { border-color: rgba(201, 142, 138, 0.55); background: rgba(58, 40, 36, 0.85); }
    .cws-choice-btn:active { transform: scale(0.985); }

    /* ══ 宽屏断点：电脑 / 平板横屏 / 折叠屏展开 / 够高的手机横屏 ══ */
    @media (min-width: 820px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
      /* ① 聊天页打开时才放开 #stage 的 9:16 限制（发现页不受影响） */
      #stage.chat-mode {
        width: min(1560px, calc(100vw - 48px));
        max-width: min(1560px, calc(100vw - 48px));
        height: min(100dvh - 24px, 980px);
        max-height: min(100dvh - 24px, 980px);
        aspect-ratio: auto;
      }

      /* ② 聊天页让出左栏宽度：所有 relative 的 flex 子项自动右移 */
      .chat-page {
        --cws-w: clamp(336px, 31%, 432px);
        /* [hero-916-v1] 9:16 封面的高度基准：视口越高给得越多，矮屏靠这条自动收窄，
           保证画框宽度换算出来的高度不会把下面的角色信息挤出首屏。 */
        --cws-hero-h: 66vh;
        padding-left: var(--cws-w);
      }
      /* 剧场版桌面端左栏承载 9:16 实景大舞台，宽度给足纯正 9:16 比例 */
      .chat-page.is-theatre-edition {
        --cws-w: clamp(354px, 32.5%, 456px);
      }
      .chat-page > .chat-mobile-stage-dock,
      .chat-page .chat-mobile-motion-pill,
      .chat-page > .mobile-motion-overlay {
        display: none !important;
      }

      /* ③ 左栏登场 */
      .chat-page > .chat-wide-side { display: flex; }

      /* ④ 右侧对话列限宽，避免宽屏下气泡被拉成超长行 */
      .chat-page .chat-msg-row {
        width: 100%;
        max-width: 860px;
        margin-left: auto;
        margin-right: auto;
      }
      .chat-page > .chat-messages-container { padding-left: 28px; padding-right: 28px; }
      .chat-page .theatre-stage-viewport {
        width: 100%;
        max-width: 860px;
        height: 438px;
        min-height: 438px;
        align-self: center;
      }
      .chat-page .theatre-decision-bar {
        width: 100%;
        max-width: 860px;
        margin: 12px auto 8px;
        align-self: center;
      }
      .chat-page.is-theatre-edition .theatre-decision-bar[data-on="1"] {
        display: block !important;
      }
      .chat-page > .chat-bottom-dock {
        padding-left: max(16px, calc((100% - 860px) / 2 + 16px));
        padding-right: max(16px, calc((100% - 860px) / 2 + 16px));
      }
      .chat-page > .chat-quick-quote-bar,
      .chat-page > .chat-reply-hints-bar,
      .chat-page > .am2-quick-cmd-bar,
      .chat-page > .am2-moment-bar {
        padding-left: max(16px, calc((100% - 860px) / 2 + 16px));
        padding-right: max(16px, calc((100% - 860px) / 2 + 16px));
      }
      .chat-page > .chat-sub-model-bar { padding-left: 18px; padding-right: 18px; box-sizing: border-box; }
      .chat-page > .chat-top-header { padding-left: 18px; padding-right: 18px; }
      /* 返回统一走左栏左上角那颗；右列再放一颗纯属重复占位 */
      .chat-page > .chat-top-header > .chat-back-btn { display: none; }

      /* ⑤ 抽屉 / 弹窗 / 二级叠层浮层只在右侧对话列里展示，把左侧角色栏完整空出来 */
      #stage.chat-mode {
        --cws-w: clamp(336px, 31%, 432px);
      }
      .chat-page > .chat-plus-drawer,
      .chat-page > .model-switch-drawer,
      .chat-page > .reply-style-modal,
      .chat-page > .chat-dislike-sheet,
      .chat-page > .character-profile-modal,
      .chat-page > .memory-asset-panel,
      .chat-page > .story-longimage-preview,
      .chat-page > .fullscreen-image-viewer {
        left: var(--cws-w);
      }
      #stage.chat-mode > .cp-page.is-over-chat,
      #stage.chat-mode > .gallery-modal,
      #stage.chat-mode > .theatre-cast-modal,
      #stage.chat-mode > .dx-voice-picker,
      #stage.chat-mode > #discover-comment-sheet,
      #stage.chat-mode > .vb-sheet {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: var(--cws-w);
      }
      body.wide-chat-active .saves-drawer,
      body.wide-chat-active .mask-drawer,
      body.wide-chat-active .mask-modal,
      body.wide-chat-active .csv-viewer,
      body.wide-chat-active .aimate-confirm-modal,
      body.wide-chat-active .gem-insufficient-modal,
      body.wide-chat-active .cag,
      body.wide-chat-active .hm-excl-modal,
      body.wide-chat-active #cp-levelup {
        top: var(--chat-pane-top, 0px) !important;
        right: var(--chat-pane-right, 0px) !important;
        bottom: var(--chat-pane-bottom, 0px) !important;
        left: var(--chat-pane-left, 0px) !important;
        border-radius: 0 28px 28px 0;
        overflow: hidden;
      }
      body.wide-chat-active #warm-dream-toast,
      body.wide-chat-active .voice-toast {
        left: calc(var(--chat-pane-left, 0px) + (100vw - var(--chat-pane-left, 0px) - var(--chat-pane-right, 0px)) / 2) !important;
        max-width: calc(100vw - var(--chat-pane-left, 0px) - var(--chat-pane-right, 0px) - 32px) !important;
      }

      /* ⑤' 剧场/原方案两档下名字被硬卡在 140px：宽屏右列有 900+ px，
            这个上限是当年 390px 挤爆时的补丁，宽屏必须放开。 */
      .chat-page.is-theatre-edition .chat-char-name,
      .chat-page.is-classic-edition .chat-char-name { max-width: 100%; }

      /* ⑥ 顶栏减负：883~1024 这类「折叠屏展开 / 小平板横屏」宽度下，
             原先 6 个图标 + 名字 + 好感徽章会把角色名挤到 0 宽。
             左栏已经把「是谁 / 好感多少」讲清楚了，右列顶栏只留必要的。 */
      .chat-page .chat-online-hint { display: none; }
      .chat-page .favor-badge-text { display: none; }
      .chat-page .chat-name-meta { min-width: 0; flex: 1 1 auto; }
      .chat-page .chat-char-name {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .chat-page .chat-header-actions { gap: 2px; flex: 0 0 auto; }
      .chat-page .chat-icon-btn { width: 32px; height: 32px; }
      .chat-page .chat-header-actions .chat-moments-pill { padding: 0 8px; }

      /* ⑦ 消息流字号在宽屏略放大一点，读起来更舒展 */
      .chat-page .chat-msg-bubble { font-size: 14.5px; line-height: 1.82; }
    }

    /* 更窄的宽屏（折叠屏展开 / 小平板横屏，820~1080）：
       顶栏再让两格 —— 「评论区」和「多选分享」在这里既挤又非核心，
       长按消息菜单里仍有「分享」入口，功能不丢，只是不从顶栏抢位置。 */
    @media (min-width: 820px) and (max-width: 1080px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
      .chat-page .chat-header-actions .cws-opt-comment,
      .chat-page .chat-header-actions .cws-opt-share { display: none; }
    }

    /* 折叠屏展开 / 竖屏平板横过来（820~960）：右列只有 490px 上下，
       136px 的双按钮切档器会把角色名压成「「No or Yes」派…」。
       这里也收成图标（文案进 title/aria-label），名字就够长了。 */
    @media (min-width: 820px) and (max-width: 960px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
      .chat-page .tep-btn { padding: 0 7px; }
      .chat-page .tep-btn .tep-lbl { display: none; }
      .chat-page .tep-btn .tep-ico { font-size: 12px; line-height: 1; }
    }

    /* ══════════════════════════════════════════════════════════════════════
       [wide-split-v2] 左栏信息密度 + 390 顶栏角色名（2026-11-15 w1 第二轮）
       ──────────────────────────────────────────────────────────────────────
       ① 剧场版标识从「名字后缀」改成「名字上方的眉毛标签」：
          顶栏那个切换器在宽屏右列，左栏是信息面板，理应自报身份；
          但把（剧场版）直接拼进名字会把长名折两行（no_or_yes 名字 17 字），
          而且「N 人同场」原本又占了一行副标题 —— 合并成一条眉毛，净增高 0。
       ② 全员卡司默认只露 4 人（2×2），其余折进「查看全部 N 人」。
       ③ 390px 顶栏角色名宽度实测为 0（.chat-name-meta = 0×21）：
          原因是 6 个图标 + 40px 头像 + 142px 的「剧场版/原方案」双按钮把
          366px 的可用宽度吃光，而只有 identity 允许收缩。这里不是靠压缩名字，
          而是让真正次要的东西先让位（见下），名字才有宽度可拿。
       ══════════════════════════════════════════════════════════════════════ */

    /* ── ① 剧场版眉毛标签 ── */
    .cws-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-bottom: 7px;
      padding: 3px 9px;
      border-radius: 6px;
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: 0.3px;
      color: #F6C9DC;
      background: rgba(244, 114, 182, 0.14);
      border: 1px solid rgba(244, 114, 182, 0.34);
      white-space: nowrap;
    }

    /* ── ② 卡司折叠 ── */
    .cws-cast-list:not(.is-expanded) .cws-cast-item.is-extra { display: none; }
    /* 放标题行右侧：独占一行要多花 37px，而首屏每 40px 都要算清楚 */
    .cws-sec-title .cws-sec-more {
      flex: 0 0 auto;
      background: none;
      border: none;
      padding: 0;
      font-family: inherit;
      font-size: 11.5px;
      font-weight: 600;
      color: #C98E8A;
      cursor: pointer;
      transition: color 0.15s ease;
    }
    .cws-sec-title .cws-sec-more:hover { color: #E8B4AE; }

    /* ── ③ 非分屏时的顶栏：先让次要的让位，再把名字撑开 ──
       条件写成「非分屏」而不是 max-width:560px —— 顶栏的可用宽度取决于
       #stage（9:16 盒子）的宽度，不是视口宽度。768×1024 竖屏平板视口 768
       但 stage 只有 576，用视口断点会漏掉，名字照样被压成 45px。
       与分屏块的条件严格互斥，两者不会同时生效。 */
    @media not all and (min-width: 820px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
      /* 顶栏左右内边距各收 2~4px，省下的全给名字 */
      .chat-top-header { padding-left: 8px; padding-right: 10px; }

      /* 身份区：允许收缩但整体占满剩余宽度（原来只有它 shrink，其它都 flex-shrink:0） */
      .chat-character-identity {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
        margin: 0 4px;
      }
      .chat-name-meta { flex: 1 1 auto; min-width: 0; }
      .chat-name-row { min-width: 0; }
      .chat-page.is-theatre-edition .chat-char-name,
      .chat-page.is-classic-edition .chat-char-name { flex: 0 1 auto; min-width: 0; max-width: 100%; }

      /* 剧场版/原方案双按钮：窄屏只留图标（142px → ~66px），文案进 title */
      .tep-btn { padding: 0 6px; }
      .tep-btn .tep-lbl { display: none; }
      .tep-btn .tep-ico { font-size: 12px; line-height: 1; }
      .theatre-edition-pill { margin-right: 4px; }

      /* 图标按钮整体收紧 */
      .chat-header-actions { gap: 4px; }
      .chat-header-actions .chat-icon-btn { padding: 0 6px; }

      /* 好感徽章在 390px 下独占 101px（占名字行的 63%）。「Lv.x · 头衔」
         与点击入口早就有一个不占宽度的常驻位置 —— 头像左下那颗角标。
         只留「♥+圆环」会看着像个开关，索性整个收掉，宽度全给角色名。 */
      .chat-page .chat-favor-badge { display: none; }

      /* 头像略收，给名字多 4px（38 → 34） */
      .chat-avatar-wrapper { width: 34px; height: 34px; }
    }

    /* 非分屏（手机竖屏 / 平板竖屏）：评论区是「即将开放」占位、多选分享在气泡
       长按菜单里已有入口（app.js §13），两个都不从顶栏抢位置 —— 换入口，不是藏功能。 */
    @media not all and (min-width: 820px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
      .chat-page .cws-opt-comment,
      .chat-page .cws-opt-share { display: none; }
    }

    /* ══ 矮宽屏笔记本（1280×800 / 1366×768 这类，高度 560~840）：再挤一档 ══
       1440×900 已经刚好装下；800px 高度还差 50 来 px，全部从「可压缩项」出：
       封面（装饰）> 行高 > 内边距 > 字号，信息一个不删。 */
    @media (min-width: 820px) and (min-aspect-ratio: 1/1) and (min-height: 560px) and (max-height: 840px) {
      /* [hero-card-v2] 封面高度基准：矮屏 68vh。
         这个值 × 4/5 是「卡片最大宽度」，必须 ≥ 栏宽卡片才吃得满 —— 否则会留一道
         7~10px 的缝，比满宽和明显留边都难看（1366×768 在 64vh 下就是 393/407）。
         560px 高的极端视口仍会被压到 305 宽，优先保住下面能看见名字和数据。 */
      .chat-page { --cws-hero-h: 68vh; }
      .cws-body { padding-bottom: 14px; }
      .cws-sec { margin-top: 12px; padding-top: 9px; }
      .cws-eyebrow { margin-bottom: 4px; }
      .cws-name { font-size: 21px; }
      .cws-rpui { line-height: 1.55; }
      .cws-rpui-who { margin-bottom: 3px; }
      .cws-choice-btn { padding: 7px 10px; }
      .cws-cast-item { padding: 4px 7px; }
      .cws-cast-list { gap: 5px; }
      .cws-stats { margin-top: 7px; }
      .cws-tags { margin-top: 10px; }
    }

    /* 内容确实装不下时，底部渐隐提示「还能往下滑」——
       否则 883×707 这类折叠屏就是一刀切在卡司中间，像坏了。 */
    .chat-wide-side.has-overflow .cws-scroll {
      -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%);
      mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%);
    }

    /* ══════════════════ [qa-batch3] 状态机、多选底栏互斥、窄屏顶栏与暗色一致性补丁 ══════════════════ */
    /* #28：一级 Tab 页（列表/消息/我的）保留底部导航栏时，滚动容器预留底栏安全区 */
    .cp-page.has-tabbar .cp-scroll {
      padding-bottom: calc(var(--dp-tabbar-h, 58px) + env(safe-area-inset-bottom, 0px) + 14px);
    }

    /* #19：列表页「全部 / 我的喜欢 / 我的收藏」筛选胶囊 & 记忆页「瞬间」画廊 */
    .dl-filter-bar {
      display: flex; align-items: center; gap: 8px;
      padding: 12px 14px 2px; overflow-x: auto; scrollbar-width: none;
    }
    .dl-filter-bar::-webkit-scrollbar { display: none; }
    .dl-filter-chip {
      flex: 0 0 auto; height: 30px; padding: 0 13px; border-radius: 9999px;
      background: var(--cp-card, #221B18); border: 1px solid var(--cp-line, #382C27);
      color: var(--cp-dim, #BFAEA6); font-size: 12px; font-weight: 600;
      cursor: pointer; font-family: var(--wd-font-sans);
    }
    .dl-filter-chip.on {
      background: rgba(232, 196, 106, 0.16); border-color: rgba(232, 196, 106, 0.52); color: #F3E5AB;
    }
    .mp-moment-grid {
      display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 4px 16px 20px;
    }
    .mp-moment-card {
      position: relative; border-radius: 12px; overflow: hidden; background: #181210;
      border: 1px solid rgba(255,255,255,0.09); cursor: pointer; aspect-ratio: 3 / 4;
    }
    .mp-moment-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .mp-moment-cap {
      position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 7px;
      background: linear-gradient(180deg, transparent, rgba(10,7,6,0.88));
      font-size: 11px; color: #F5EBE6; line-height: 1.35;
    }
    .mp-moment-cap span { display: block; font-size: 10px; color: rgba(214,198,190,0.68); margin-top: 2px; }

    /* #25：多选分享模式下彻底隐藏输入底坞、剧场抉择栏、卡司定向栏与快捷条，杜绝 4 层底栏叠压 */
    .chat-page.is-multiselect .chat-bottom-dock,
    .chat-page.is-multiselect #theatre-decision-bar,
    .chat-page.is-multiselect #cast-address-bar,
    .chat-page.is-multiselect .chat-quick-quote-bar,
    .chat-page.is-multiselect .chat-reply-hints-bar,
    .chat-page.is-multiselect .chat-inspiration-bar {
      display: none !important;
    }

    /* #25：390px 手机竖屏下收紧聊天顶栏按钮组（特别是剧场版双按钮 + 4 位数点赞），防止右侧溢出裁切 */
    @media (max-width: 480px) {
      .chat-page .chat-top-header { padding-left: 6px; padding-right: 8px; }
      .chat-page .theatre-edition-pill .tep-btn .tep-lbl { display: none !important; }
      .chat-page .theatre-edition-pill .tep-btn { padding: 0 5px; min-width: 26px; height: 26px; }
      .chat-page .chat-header-actions { gap: 3px; }
      .chat-page .chat-header-actions .chat-icon-btn { height: 28px; padding: 0 5px; font-size: 12px; }
      .chat-page .chat-header-actions .chat-moments-pill { height: 28px; padding: 0 8px; }
      .chat-page .chat-header-actions .chat-moments-pill-text { display: none; }
    }

    /* #27：桌面宽屏（>=1180px）右列顶栏充足，恢复展示「Lv.x · 头衔」文字，避免孤立空心环 */
    @media (min-width: 1180px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
      .chat-page .favor-badge-text { display: inline !important; }
    }

    /* #27：浏览器自动填充密码/邮箱时锁定暗色底，消除刺眼白底色块 */
    #chat-auth-gate input:-webkit-autofill,
    #chat-auth-gate input:-webkit-autofill:hover,
    #chat-auth-gate input:-webkit-autofill:focus,
    #cp-settings input:-webkit-autofill,
    #cp-settings input:-webkit-autofill:hover,
    #cp-settings input:-webkit-autofill:focus {
      -webkit-box-shadow: 0 0 0 1000px #221A18 inset !important;
      -webkit-text-fill-color: #F5EBE6 !important;
      caret-color: #F5EBE6;
      transition: background-color 9999s ease-out 0s;
    }

/* ── [mask-system-v2] 摘下面具按钮与 4 部位触碰快捷演播条 ── */
.mask-btn-unequip {
  font-size: 10.5px; font-weight: 600; color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  padding: 2px 8px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mask-btn-unequip:hover { background: rgba(244,63,94,0.2); color: #fff; border-color: rgba(244,63,94,0.45); }
.mask-touch-quick-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.12);
}
.mask-touch-mini-btn {
  font-size: 10.5px; font-weight: 600; color: #F9A8D4;
  background: rgba(244,63,94,0.12); border: 1px solid rgba(244,63,94,0.3);
  border-radius: 8px; padding: 3px 8px; cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.mask-touch-mini-btn:active { transform: scale(0.95); background: rgba(244,63,94,0.25); }

/* ── [mask-system-v3] 外显佩戴胶囊、顶栏指示点、编辑/克隆与高级折叠面板 ── */
#top-mask-btn { position: relative; }
#top-mask-btn.is-equipped::after {
  content: "";
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #F43F5E;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.9);
  pointer-events: none;
}
.chat-mask-pill {
  padding: 0 10px !important;
  gap: 4px !important;
  border-radius: 999px !important;
  max-width: 112px;
}
.chat-mask-pill-label {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(240, 220, 214, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
}
.chat-mask-pill.is-equipped {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(147, 51, 234, 0.18)) !important;
  border-color: rgba(244, 63, 94, 0.5) !important;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.18);
}
.chat-mask-pill.is-equipped .chat-mask-pill-label {
  color: #FBCFE8;
}
.mask-item-btn-icon {
  font-size: 11.5px; color: rgba(255,255,255,0.72); background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 2px 6px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mask-item-btn-icon:hover { background: rgba(244,63,94,0.18); color: #fff; border-color: rgba(244,63,94,0.4); }
.mask-global-toggle-row {
  display: flex; align-items: center; gap: 6px; font-size: 11.5px;
  color: #E9D5FF; background: rgba(147,51,234,0.1); border: 1px solid rgba(147,51,234,0.28);
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.mask-adv-details {
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  background: rgba(255,255,255,0.025); padding: 8px 10px;
}
.mask-adv-summary {
  font-size: 11.5px; font-weight: 600; color: #F472B6; cursor: pointer; user-select: none;
}
.mask-adv-body {
  display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.1);
}
.mask-vocal-chips-wrap { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.mask-vocal-chip {
  font-size: 10.5px; font-family: ui-monospace, Menlo, monospace;
  padding: 3px 7px; border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.12); transition: all 0.15s ease;
}
.mask-vocal-chip.on {
  background: rgba(244,63,94,0.24); color: #FFF; border-color: #F43F5E;
}

/* ══════════════════════════════════════════════════════════════════════
   [discover-wide-v1] 宽屏首页 = 左侧卡池 + 右侧 9:16 微动视频（2026-11-16 w1）
   ──────────────────────────────────────────────────────────────────────
   窄屏（9:16 手机 / 竖屏平板）：.discover-wide-side 全程 display:none，
   body 仍是 justify-content:center、#stage 仍是居中 9:16 —— 首页一个字都不变。

   宽屏（电脑 / 平板横屏 / 折叠屏展开）：
     · body.dws-mode 让左栏与 #stage 作为两个 flex item 居中并排，中间一条 gap；
     · 两栏共用同一个宽度变量 --dws-col-w = min(一半可用宽, 视口高×9/16)，
       且都是 aspect-ratio: 9/16 —— 所以左右严格等宽、等比，视觉对称；
     · #stage 内部一行没改 —— 微动视频、HUD、tabbar 还是原来那套 9:16。
   回滚：删掉本块 + index.html 的 <aside id="discover-wide-side"> + app.js 的
        renderDiscoverWideCards / syncDiscoverWide 即可。
   ══════════════════════════════════════════════════════════════════════ */

.discover-wide-side { display: none; }

@media (min-width: 820px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
  body.dws-mode {
    --dws-gap: 20px;
    /* [symmetric-v1] 两栏等宽、都严格 9:16。
       宽度取「一半可用宽」与「视口高 × 9/16」的较小值：
         · 正常宽屏 → 由高度决定，两栏各等于右侧 stage 的宽度，左右对称；
         · 接近正方形的视口（820×820 这种）→ 由宽度决定，两栏一起等比缩小，
           stage 高度随之变矮并垂直居中，不会溢出、也不会被压扁。 */
    --dws-col-w: min(calc((100vw - var(--dws-gap)) / 2), calc(100dvh * 9 / 16));
    justify-content: center;
    gap: var(--dws-gap);
  }
  /* stage 从「吃满高度」改成「由宽度按 9:16 推导高度」，与左栏同尺寸。
     ⚠ 必须排除 .chat-mode：聊天页的 #stage.chat-mode 是「放开 9:16 撑满全宽」，
     而 body.dws-mode #stage 特异性更高（多一个元素选择器），不排除会把聊天页
     的 stage 也钉成 506 宽（实测回归：1440 下聊天页 stage 只剩 506）。 */
  body.dws-mode #stage:not(.chat-mode) {
    flex: 0 0 auto;
    width: var(--dws-col-w);
    height: auto;
    max-width: none;
    aspect-ratio: 9 / 16;
  }

  body.dws-on .discover-wide-side {
    display: flex;
    flex: 0 0 auto;
    width: var(--dws-col-w);
    height: auto;
    aspect-ratio: 9 / 16;
    flex-direction: column;
    z-index: 3;
    border-radius: 24px;
    overflow: hidden;
    background:
      radial-gradient(ellipse at 18% 0%, rgba(236, 72, 153, 0.10), transparent 62%),
      linear-gradient(180deg, #0A0C15 0%, #05070D 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  body.dws-on #stage { border-radius: 24px; }
  body.dws-on #warm-dream-toast,
  body.dws-on .voice-toast {
    left: calc(50vw + (var(--dws-col-w, 0px) + var(--dws-gap, 20px)) / 2) !important;
    max-width: calc(var(--dws-col-w, 420px) - 28px) !important;
  }

  .discover-wide-side .dws-head {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px 24px 12px;
    max-width: 1030px;
    width: 100%;
    margin: 0 auto;
  }
  .discover-wide-side .dws-title {
    font-size: 21px; font-weight: 800; letter-spacing: 0.01em;
    color: #F3F4F6;
  }
  .discover-wide-side .dws-sub {
    margin-top: 5px;
    font-size: 12px; color: rgba(243, 244, 246, 0.48);
  }
  .discover-wide-side .dws-filters { display: flex; gap: 6px; }
  .discover-wide-side .dws-chip {
    padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-family: inherit; color: rgba(243, 244, 246, 0.62);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer; transition: all 0.15s ease;
  }
  .discover-wide-side .dws-chip:hover { color: #FFF; background: rgba(255, 255, 255, 0.09); }
  .discover-wide-side .dws-chip.on {
    color: #FFF;
    background: rgba(236, 72, 153, 0.16);
    border-color: rgba(236, 72, 153, 0.52);
  }

  .discover-wide-side .dws-scroll {
    flex: 1; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
    padding: 6px 24px 32px;
  }
  .discover-wide-side .dws-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

  /* 列数跟着「左栏实际可用宽度」走，而不是跟视口走 —— 883×707 这种窄宽屏
     左栏只有 467px，硬排两列会得到 195px 的卡片（标题折三行、头像挤成一团）。
     auto-fill + minmax(300px) 的结果：≤574 → 1 列；≈616 以上 → 2 列；≥932 → 3 列。 */
  .discover-wide-side .dws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    max-width: 1000px;
    margin: 0 auto;
  }

  .discover-wide-side .dwc {
    position: relative;
    display: flex; flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #0B0D14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .discover-wide-side .dwc:hover {
    transform: translateY(-2px);
    border-color: rgba(236, 72, 153, 0.36);
  }
  .discover-wide-side .dwc:hover .dwc-img {
    transform: scale(1.03);
  }
  .discover-wide-side .dwc:active { transform: translateY(0) scale(0.995); }
  .discover-wide-side .dwc.is-on {
    border-color: rgba(236, 72, 153, 0.85);
    box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.45), 0 12px 32px rgba(236, 72, 153, 0.22);
  }

  /* 封面：铺满整张 3:4 卡片（9:16 竖图采用 center top 从上往下截取），
     底部改用半透明渐变承载文字，既保住面部与文字清晰度，又尽量完整展现立绘。 */
  .discover-wide-side .dwc-cover {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #0B0D14;
  }
  .discover-wide-side .dwc-img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.3s ease;
  }
  .discover-wide-side .dwc-cover::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
      180deg,
      rgba(6, 8, 15, 0) 0%,
      rgba(6, 8, 15, 0) 48%,
      rgba(6, 8, 15, 0.38) 65%,
      rgba(6, 8, 15, 0.64) 83%,
      rgba(6, 8, 15, 0.76) 100%
    );
    pointer-events: none;
  }
  .discover-wide-side .dwc-badge {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    padding: 4px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
    color: #FCE7F3;
    background: rgba(8, 10, 18, 0.66);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
  }

  .discover-wide-side .dwc-body {
    position: relative;
    z-index: 2;
    padding: 8px 12px 0;
  }
  .discover-wide-side .dwc-name {
    font-size: 14.5px; font-weight: 700; line-height: 1.35;
    color: #FFFFFF;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.82);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .discover-wide-side .dwc-desc {
    margin-top: 4px;
    font-size: 12px; line-height: 1.48;
    color: rgba(243, 244, 246, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .discover-wide-side .dwc-meta {
    position: relative;
    z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 8px 12px 11px;
  }
  .discover-wide-side .dwc-avatars { display: flex; align-items: center; }
  .discover-wide-side .dwc-av {
    width: 26px; height: 26px; border-radius: 50%;
    object-fit: cover; object-position: center top;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
    margin-left: -8px;
    background: #1A1D28;
  }
  .discover-wide-side .dwc-av:first-child { margin-left: 0; }
  .discover-wide-side .dwc-count {
    font-size: 12px;
    color: rgba(243, 244, 246, 0.80);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
  }

  .discover-wide-side .dws-empty {
    max-width: 1000px; margin: 40px auto 0;
    text-align: center; font-size: 13px; color: rgba(243, 244, 246, 0.4);
  }
}


/* [mask-planA-v4] 自设弹窗顶部 · 平台级通用爽点模板一键套用条 */
.mask-tpl-quickbar {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.10), rgba(251, 191, 36, 0.08));
  border: 1px solid rgba(244, 114, 182, 0.24);
}
.mask-tpl-quickbar-head {
  font-size: 11.5px;
  font-weight: 600;
  color: #FBCFE8;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.mask-tpl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mask-tpl-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 18, 30, 0.72);
  color: #F9FAFB;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.mask-tpl-chip:hover, .mask-tpl-chip:active {
  background: rgba(244, 63, 94, 0.28);
  border-color: rgba(244, 114, 182, 0.65);
  color: #FFF;
  transform: translateY(-1px);
}


/* ══════════════ [reply-learnings-v1] 单句 👍/👎 快捷评价、立即重说徽章与点踩浮层 ══════════════ */
.msg-action-pill--rate {
  min-width: 30px;
  padding: 0 8px !important;
  font-size: 12.5px;
  opacity: 0.78;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.msg-action-pill--rate:hover,
.msg-action-pill--rate:active {
  opacity: 1;
  transform: translateY(-1px);
}
.msg-action-pill--rate.is-liked {
  opacity: 1;
  background: rgba(244, 114, 182, 0.2) !important;
  border-color: rgba(244, 114, 182, 0.55) !important;
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.22);
}
.msg-action-pill--rate.is-disliked {
  opacity: 1;
  background: rgba(251, 191, 36, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.48) !important;
}

.msg-learned-rewrite-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(232, 168, 124, 0.16), rgba(244, 114, 182, 0.14));
  border: 1px solid rgba(232, 168, 124, 0.36);
  color: #f3c8a6;
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
  max-width: 100%;
}
.msg-learned-rewrite-badge span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-dislike-sheet {
  position: fixed;
  inset: 0;
  z-index: 126000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dislike-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 6, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dislike-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: rgba(28, 21, 20, 0.96);
  border-top: 1px solid rgba(232, 168, 124, 0.28);
  border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.55);
  color: #f7ede8;
  animation: dislikeSheetUp 0.2s cubic-bezier(0.2, 0.85, 0.3, 1);
}
@keyframes dislikeSheetUp {
  from { transform: translateY(24px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}
.dislike-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 auto 12px;
}
.dislike-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.dislike-sheet-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff5f0;
}
.dislike-sheet-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: #e8a87c;
  line-height: 1.4;
}
.dislike-sheet-close {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #bba8a2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
}
.dislike-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.dislike-tag-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e5d6d0;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dislike-tag-chip.on {
  background: rgba(232, 168, 124, 0.22);
  border-color: #e8a87c;
  color: #fff7f2;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(232, 168, 124, 0.2);
}
.dislike-note-wrap {
  margin-top: 12px;
}
.dislike-note-input {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 9, 9, 0.55);
  color: #fff;
  font-size: 12.5px;
  outline: none;
}
.dislike-note-input:focus {
  border-color: rgba(232, 168, 124, 0.65);
}
.dislike-sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.dislike-btn-secondary {
  flex: 0 0 auto;
  padding: 0 14px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #d8c7c1;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.dislike-btn-secondary.is-primary-solo {
  flex: 1;
  background: linear-gradient(135deg, #e8a87c, #d97757);
  border: none;
  color: #1c1210;
  font-weight: 700;
}
.dislike-btn-primary {
  flex: 1;
  height: 40px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, #e8a87c, #e07a5f);
  color: #1a110f;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(224, 122, 95, 0.32);
}
.mp-item.is-learning {
  border-left: 3px solid #e8a87c;
}

/* ══════════════════════════════════════════════════════════════════════════
   [ugc-visual-sandbox-v1] 916-2 聊天室双层美化变量契约、平行时刻栏与安全护栏
   ══════════════════════════════════════════════════════════════════════════ */
:where(#chat-page[data-am2-skin]) {
  font-family: var(--am2-font-family, inherit);
}
:where(#chat-page[data-am2-skin] .am2-ai-bubble) {
  background: var(--am2-ai-bubble-bg, rgba(28, 21, 20, 0.78));
  border-color: var(--am2-ai-bubble-border, rgba(255, 255, 255, 0.12));
  color: var(--am2-ai-bubble-text, #f5ebe6);
  border-radius: var(--am2-bubble-radius, 16px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
:where(#chat-page[data-am2-skin] .am2-user-bubble) {
  background: var(--am2-user-bubble-bg, rgba(232, 168, 124, 0.24));
  border-color: var(--am2-user-bubble-border, rgba(232, 168, 124, 0.45));
  border-radius: var(--am2-bubble-radius, 16px);
}
:where(#chat-page[data-am2-skin] .am2-act-line) {
  color: var(--am2-narration-color, #e6c6b8);
}
:where(#chat-page[data-am2-skin] .am2-thought-line) {
  background: var(--am2-thought-bg, rgba(255, 255, 255, 0.06));
  border-left-color: var(--am2-accent, #e8a87c);
}
:where(#chat-page[data-am2-skin] .am2-scene-card) {
  border-color: var(--am2-ai-bubble-border, rgba(255, 255, 255, 0.14));
}

/* 铁壁安全锁：严防自定义 CSS 隐藏返回按钮、逃生开关或劫持登录支付弹窗 */
#chat-page .chat-back-btn,
#am2-plain-escape-btn,
#chat-auth-gate {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.am2-plain-escape-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f3e8ee;
  cursor: pointer;
  flex-shrink: 0;
}
.am2-plain-escape-pill:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.48);
}

.am2-moment-bar,
.am2-quick-cmd-bar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(26, 20, 18, 0.88);
  border-top: 1px solid rgba(201, 142, 138, 0.12);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.am2-moment-bar::-webkit-scrollbar,
.am2-quick-cmd-bar::-webkit-scrollbar { display: none; }

.am2-moment-lbl,
.am2-qc-lbl {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
  flex-shrink: 0;
}
.am2-moment-pill,
.am2-quick-chip {
  flex: 0 0 auto;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f5ebe6;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.am2-moment-pill.on {
  background: rgba(244, 63, 94, 0.24);
  border-color: var(--am2-accent, #fb7185);
  color: #fff;
}
.am2-quick-chip:hover {
  background: rgba(232, 168, 124, 0.22);
  border-color: var(--am2-accent, #e8a87c);
}
.am2-opening-card-slot {
  max-width: 860px;
  width: 100%;
  margin: 4px auto 8px;
}
.am2-state-host {
  margin-top: 6px;
  width: 100%;
}

/* ══ [bgm-plugins-v1] 房间氛围 BGM 胶囊、前景 GPU 粒子、旁支无痕徽章与伴聊插件抽屉 ══ */
.am2-bgm-pill {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.am2-bgm-pill.is-playing {
  border-color: rgba(232, 168, 124, 0.58);
  background: rgba(232, 168, 124, 0.18);
  box-shadow: 0 0 10px rgba(232, 168, 124, 0.25);
}
.am2-bgm-pill.is-playing .am2-bgm-disc {
  display: inline-block;
  animation: am2DiscSpin 5.5s linear infinite;
}
.am2-bgm-pill.is-ducking {
  border-color: rgba(56, 189, 248, 0.58);
}
@keyframes am2DiscSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.am2-bgm-popover {
  position: absolute;
  top: 56px;
  right: 14px;
  width: min(296px, calc(100% - 28px));
  z-index: 420;
  background: rgba(20, 15, 19, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px 13px;
  color: #f8fafc;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
}
.am2-bgm-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.am2-bgm-pop-head b { display: block; font-size: 13px; color: #fff; }
.am2-bgm-pop-head small { font-size: 10.5px; color: #94a3b8; }
.am2-bgm-mute-toggle {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.am2-bgm-mute-toggle.on {
  background: rgba(232, 168, 124, 0.28);
  border-color: #e8a87c;
}
.am2-bgm-vol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  margin-bottom: 8px;
}
.am2-bgm-vol-row input[type="range"] { flex: 1; accent-color: #e8a87c; }
.am2-bgm-track-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 150px;
  overflow-y: auto;
}
.am2-bgm-track-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
}
.am2-bgm-track-btn.on {
  border-color: #e8a87c;
  background: rgba(232, 168, 124, 0.16);
  color: #fff;
}
.am2-bgm-track-btn small { font-size: 10px; opacity: 0.68; }

.am2-quick-chip.is-tune {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(167, 139, 250, 0.42);
  color: #ede9fe;
}
.am2-quick-chip.is-tune.has-on {
  background: rgba(236, 72, 153, 0.24);
  border-color: rgba(244, 114, 182, 0.65);
  color: #fff;
}
.am2-quick-chip.is-widget {
  background: rgba(234, 179, 104, 0.16);
  border-color: rgba(234, 179, 104, 0.42);
  color: #fef3c7;
}
.am2-eph-dot { font-style: normal; font-size: 10.5px; }

.am2-ephemeral-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
  border: 1px dashed rgba(167, 139, 250, 0.45);
}

/* 前景 GPU 氛围粒子层（径向镂空避开上半屏人脸中心） */
.am2-particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none !important;
  overflow: hidden;
  z-index: 2;
  -webkit-mask-image: radial-gradient(ellipse 46% 36% at 50% 25%, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.92) 72%);
  mask-image: radial-gradient(ellipse 46% 36% at 50% 25%, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.92) 72%);
}
.am2-ptc {
  position: absolute;
  top: -8%;
  pointer-events: none;
  will-change: transform, opacity;
}
.am2-ptc.is-rain_streak {
  width: 1.2px;
  height: 26px;
  background: linear-gradient(180deg, transparent, rgba(186, 230, 253, 0.52));
  animation-name: am2RainFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.am2-ptc.is-sakura_petal {
  width: var(--ptc-sz, 7px);
  height: calc(var(--ptc-sz, 7px) * 0.72);
  border-radius: 70% 20% 70% 20%;
  background: rgba(251, 182, 206, 0.62);
  box-shadow: 0 0 6px rgba(244, 114, 182, 0.35);
  animation-name: am2PetalDrift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.am2-ptc.is-snow_dust {
  width: var(--ptc-sz, 5px);
  height: var(--ptc-sz, 5px);
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.72);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
  animation-name: am2PetalDrift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.am2-ptc.is-gold_stardust {
  top: auto;
  bottom: -6%;
  width: var(--ptc-sz, 4px);
  height: var(--ptc-sz, 4px);
  border-radius: 50%;
  background: rgba(253, 224, 71, 0.78);
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.65);
  animation-name: am2StarRise;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes am2RainFall {
  0% { transform: translate3d(0, -5vh, 0) rotate(11deg); opacity: 0; }
  15% { opacity: 0.75; }
  90% { opacity: 0.6; }
  100% { transform: translate3d(-24px, 106vh, 0) rotate(11deg); opacity: 0; }
}
@keyframes am2PetalDrift {
  0% { transform: translate3d(0, -4vh, 0) rotate(0deg); opacity: 0; }
  15% { opacity: 0.8; }
  50% { transform: translate3d(18px, 50vh, 0) rotate(140deg); opacity: 0.7; }
  100% { transform: translate3d(-14px, 104vh, 0) rotate(300deg); opacity: 0; }
}
@keyframes am2StarRise {
  0% { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  30% { opacity: 0.85; }
  75% { opacity: 0.55; }
  100% { transform: translate3d(12px, -88vh, 0) scale(1.15); opacity: 0; }
}

/* 聊天电梯按钮 */
.am2-chat-elevator {
  position: absolute;
  right: 10px;
  bottom: 136px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.am2-elev-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(18, 14, 18, 0.74);
  backdrop-filter: blur(8px);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* 插件与调音护眼抽屉（严格对齐右侧 #stage 视口） */
#am2-plugin-modal-root {
  position: absolute;
  inset: 0;
  z-index: 910;
  pointer-events: none;
  user-select: text;
  -webkit-user-select: text;
}
#am2-plugin-modal-root:empty { display: none; }
#am2-plugin-modal-root > * { pointer-events: auto; }
@media (min-width: 820px) and (min-aspect-ratio: 1/1) and (min-height: 560px) {
  #stage.chat-mode > #am2-plugin-modal-root {
    left: var(--cws-w, 0px);
    width: auto;
  }
}
.am2-plug-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 12, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.am2-plug-sheet {
  width: 100%;
  max-height: 82%;
  overflow-y: auto;
  background: #1a1418;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  color: #f8fafc;
  box-sizing: border-box;
}
.am2-plug-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.am2-plug-head b { display: block; font-size: 15px; color: #fff; }
.am2-plug-head small { font-size: 11.5px; color: #94a3b8; }
.am2-plug-close {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}
.am2-subtab-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.am2-subtab-pill.on {
  background: rgba(236, 72, 153, 0.24);
  border-color: #f472b6;
  color: #fff;
}
.am2-dir-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.am2-dir-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
}
.am2-dir-card.on {
  border-color: #f472b6;
  background: rgba(236, 72, 153, 0.16);
}
.am2-dir-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}
.am2-dir-title i {
  font-style: normal;
  font-size: 11px;
  color: #f472b6;
}
.am2-dir-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 3px;
  line-height: 1.4;
}
.am2-plug-inp {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 12.5px;
}
.am2-eph-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
  margin-top: 10px;
}
.am2-plug-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.am2-plug-btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
.am2-plug-btn.pri {
  border: none;
  background: linear-gradient(135deg, #be185d, #7e22ce);
  color: #fff;
}
.am2-reader-row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
}
.am2-tarot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.am2-tarot-card {
  border: 1px solid rgba(234, 179, 104, 0.42);
  border-radius: 12px;
  padding: 10px 8px;
  background: linear-gradient(160deg, rgba(45, 28, 52, 0.85), rgba(20, 14, 24, 0.92));
  text-align: center;
}
.am2-tarot-slot { font-size: 10px; color: #cbd5e1; margin-bottom: 4px; }
.am2-tarot-name { font-size: 13px; font-weight: 800; color: #fde68a; margin-bottom: 4px; }
.am2-tarot-orient {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  margin-bottom: 5px;
}
.am2-tarot-orient.rev {
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
}
.am2-tarot-desc { font-size: 10.5px; color: #e2e8f0; line-height: 1.4; }
.am2-dice-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 6px;
}
.am2-dice-box {
  flex: 1;
  border: 1px solid rgba(244, 114, 182, 0.45);
  border-radius: 14px;
  padding: 12px 10px;
  background: rgba(236, 72, 153, 0.12);
  text-align: center;
}
.am2-dice-box small { display: block; font-size: 10.5px; color: #f9a8d4; margin-bottom: 5px; }
.am2-dice-box b { font-size: 13px; color: #fff; line-height: 1.45; }

/* ── [icon-tooltip-v1] 全局桌面悬浮图标功能提示浮层 ─────────────────── */
.hm-hover-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  max-width: min(260px, calc(100vw - 20px));
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(24, 17, 20, 0.94);
  border: 1px solid rgba(214, 152, 148, 0.42);
  color: #FAF0EC;
  font-family: var(--wd-font-sans, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans TC", sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 4px, 0) scale(0.97);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}
.hm-hover-tooltip.is-wrap {
  white-space: normal;
}
.hm-hover-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
}
.hm-hover-tooltip[data-pos="top"] {
  transform: translate3d(0, -4px, 0) scale(0.97);
}
.hm-hover-tooltip[data-pos="top"].is-visible {
  transform: translate3d(0, 0, 0) scale(1);
}
.hm-hover-tooltip::before {
  content: '';
  position: absolute;
  left: var(--tip-arrow-x, 50%);
  width: 8px;
  height: 8px;
  background: rgba(24, 17, 20, 0.94);
  border-left: 1px solid rgba(214, 152, 148, 0.42);
  border-top: 1px solid rgba(214, 152, 148, 0.42);
  transform: translateX(-50%) rotate(45deg);
}
.hm-hover-tooltip[data-pos="bottom"]::before {
  top: -5px;
}
.hm-hover-tooltip[data-pos="top"]::before {
  bottom: -5px;
  transform: translateX(-50%) rotate(225deg);
}
@media (hover: none) and (pointer: coarse) {
  .hm-hover-tooltip { display: none !important; }
}

/* ── [ux-split-v1] 独立「互动小玩法」入口卡片样式 & 窄屏顶栏防溢出 ─────── */
.am2-play-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 2px;
}
.am2-play-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(214, 152, 148, 0.28);
  background: rgba(255, 255, 255, 0.045);
  color: #FAF0EC;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.am2-play-card:hover {
  background: rgba(214, 152, 148, 0.14);
  border-color: rgba(214, 152, 148, 0.52);
}
.am2-play-card:active { transform: scale(0.985); }
.am2-play-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(214, 152, 148, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.am2-play-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.am2-play-meta b { font-size: 13.5px; color: #FFF5F2; font-weight: 600; }
.am2-play-meta small { font-size: 11.5px; color: rgba(240, 220, 214, 0.68); line-height: 1.4; }
.am2-play-arrow { font-size: 18px; color: rgba(240, 220, 214, 0.55); flex-shrink: 0; }
@media (max-width: 420px) {
  .chat-page .chat-header-actions { gap: 2px; }
  .chat-page .chat-header-actions .chat-icon-btn { min-width: 26px; padding: 0 4px; font-size: 11.5px; }
}

/* ── [couple-polaroid-v2] 經典雙人拍立得相紙外框（與電影劇照徹底拉開視覺區隔） ── */
.msg-polaroid-card {
  margin-top: 10px;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
  padding: 7px 7px 10px 7px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(44, 32, 30, 0.96) 0%, rgba(25, 18, 17, 0.98) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.44), 0 1px 0 rgba(255, 228, 218, 0.1) inset;
  border: 1px solid rgba(226, 174, 158, 0.34);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.msg-polaroid-card:hover {
  border-color: rgba(236, 188, 172, 0.56);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.52), 0 1px 0 rgba(255, 228, 218, 0.16) inset;
}
.msg-polaroid-card:active {
  transform: scale(0.985);
}
.msg-polaroid-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 14;
  border-radius: 10px;
  overflow: hidden;
  background: #181514;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.msg-polaroid-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.03) saturate(1.04);
}
.msg-polaroid-card:hover .msg-polaroid-img.loaded {
  transform: scale(1.02);
}
.msg-polaroid-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(18, 13, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(236, 188, 172, 0.32);
  color: #FAF0EC;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.msg-polaroid-photo-wrap .msg-img-badge {
  z-index: 3;
}
.msg-polaroid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 4px 1px;
}
.msg-polaroid-caption {
  font-family: var(--wd-font-sans, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #F4E6DF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-polaroid-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: rgba(226, 194, 182, 0.62);
  flex-shrink: 0;
  letter-spacing: 0.4px;
}

/* ── [topbar-pill-v1] 聊天顶栏统一横版「小标志+文字」胶囊 + 右侧「更多」折叠收纳 ── */
.chat-page .chat-top-header {
  z-index: 45;
}
.chat-page .chat-header-actions {
  gap: 5px;
  flex: 0 0 auto;
}
.chat-page .chat-header-actions .chat-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto !important;
  min-width: 0;
  height: 28px;
  padding: 0 10px 0 8px !important;
  border-radius: 999px !important;
  background: rgba(201, 142, 138, 0.16);
  border: 1px solid rgba(201, 142, 138, 0.36);
  color: #F0DCD6;
  font-family: var(--wd-font-sans, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans TC", sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.chat-page .chat-header-actions .chat-action-pill:hover {
  background: rgba(201, 142, 138, 0.26);
  border-color: rgba(201, 142, 138, 0.54);
  color: #FFF5F2;
}
.chat-page .chat-header-actions .chat-action-pill:active {
  transform: scale(0.95);
}
.chat-page .chat-header-actions .chat-action-pill .chat-pill-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}
.chat-page .chat-header-actions .chat-action-pill .chat-pill-label {
  display: inline !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  white-space: nowrap;
}
.chat-page .chat-header-actions .chat-mask-pill {
  max-width: 112px;
}
.chat-page .chat-header-actions .chat-mask-pill .chat-mask-pill-label {
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-page .chat-header-actions .chat-more-btn.is-open {
  background: rgba(201, 142, 138, 0.30);
  border-color: rgba(201, 142, 138, 0.65);
  color: #FFF5F2;
}

.chat-more-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.chat-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 500;
  min-width: 204px;
  max-width: min(260px, calc(100vw - 24px));
  padding: 10px;
  border-radius: 14px;
  background: rgba(24, 17, 20, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(201, 142, 138, 0.34);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, -6px, 0) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}
.chat-more-wrap.is-open .chat-more-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(201, 142, 138, 0.15);
  border: 1px solid rgba(201, 142, 138, 0.34);
  color: #F0DCD6;
  font-family: var(--wd-font-sans, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans TC", sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item:hover {
  background: rgba(201, 142, 138, 0.28);
  border-color: rgba(201, 142, 138, 0.56);
  color: #FFF5F2;
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item:active {
  transform: scale(0.96);
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item .chat-pill-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item .chat-pill-label,
.chat-page .chat-header-actions .chat-more-menu .chat-more-item .chat-moments-pill-text {
  display: inline !important;
  font-size: 12px;
  line-height: 1;
  color: inherit;
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item .chat-like-count {
  font-size: 11px;
  opacity: 0.85;
  margin-left: -1px;
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item.liked {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.45);
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item.am2-bgm-pill {
  width: 100%;
  height: 32px;
  border-radius: 999px;
}
/* 评论与分享已收纳至「更多」菜单，不再挤占顶栏，各视口均可常驻展示 */
.chat-page .chat-header-actions .chat-more-menu .cws-opt-comment,
.chat-page .chat-header-actions .chat-more-menu .cws-opt-share {
  display: inline-flex !important;
}

@media (max-width: 480px) {
  .chat-page .chat-header-actions {
    gap: 3px;
  }
  .chat-page .chat-header-actions .chat-action-pill {
    height: 26px;
    padding: 0 7px 0 6px !important;
    gap: 3px;
    font-size: 11px;
  }
  .chat-page .chat-header-actions .chat-action-pill .chat-pill-icon {
    font-size: 11px;
  }
  .chat-page .chat-header-actions .chat-action-pill .chat-pill-label {
    font-size: 11px;
  }
  .chat-page .chat-header-actions .chat-mask-pill .chat-mask-pill-label {
    max-width: 48px;
  }
}

/* ── [qq-focus-only-v1] 快捷插入工具条默认隐藏，仅在点击/聚焦输入框时展开 ── */
.chat-page .chat-quick-quote-bar {
  display: none;
}
.chat-page .chat-quick-quote-bar.is-open {
  display: flex;
  animation: qqBarReveal 0.14s ease-out;
}
@keyframes qqBarReveal {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── [tone-pop-v1] 语气收拢至模型栏左侧「语气」胶囊 + 点击展开选择弹窗 ── */
.chat-reply-style-anchor {
  height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  pointer-events: none;
}
.crs-trigger-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #EDE7E3;
  font-family: var(--wd-font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.crs-trigger-pill:hover {
  background: rgba(201, 142, 138, 0.2);
  border-color: rgba(232, 174, 168, 0.45);
  color: #fff;
}
.crs-trigger-pill:active { transform: scale(0.96); }
.crs-trigger-pill.is-custom {
  border-color: rgba(232, 174, 168, 0.48);
  background: rgba(201, 142, 138, 0.18);
}
.crs-trigger-pill.is-spicy {
  border-color: rgba(251, 113, 133, 0.65);
  background: rgba(225, 45, 75, 0.24);
  color: #fff1f2;
}
.crs-trigger-pill .crs-label {
  color: inherit;
  font-size: 11.5px;
  font-weight: 500;
}
.crs-trigger-ico { font-size: 12px; line-height: 1; }
.crs-trigger-caret { font-size: 10px; opacity: 0.72; margin-left: -1px; }
.crs-trigger-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e5a29c;
  box-shadow: 0 0 6px rgba(229, 162, 156, 0.8);
  flex-shrink: 0;
}
.crs-trigger-dot.is-spicy {
  background: #fb7185;
  box-shadow: 0 0 7px rgba(251, 113, 133, 0.9);
}

.reply-style-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}
.rsm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 8, 0.64);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.rsm-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  border-radius: 18px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(38, 26, 26, 0.97) 0%, rgba(22, 15, 16, 0.98) 100%);
  border: 1px solid rgba(214, 152, 148, 0.34);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.64), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  animation: qqBarReveal 0.16s ease-out;
}
.rsm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.rsm-head-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rsm-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #FFF4F0;
}
.rsm-sub {
  font-size: 11.5px;
  color: rgba(235, 214, 206, 0.62);
}
.rsm-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 232, 226, 0.8);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rsm-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.rsm-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.rsm-list .crs-pill {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  text-align: left;
  white-space: normal;
  box-sizing: border-box;
}
.rsm-list .crs-opt-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.rsm-list .crs-pill.active .crs-opt-ico {
  background: rgba(255, 255, 255, 0.14);
}
.rsm-list .crs-opt-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rsm-list .crs-opt-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFF5F2;
  line-height: 1.3;
}
.rsm-list .crs-opt-desc {
  font-size: 11px;
  color: rgba(238, 220, 214, 0.68);
  line-height: 1.35;
}
.rsm-list .crs-pill.is-locked .crs-opt-name {
  color: rgba(244, 234, 228, 0.62);
}
.rsm-list .crs-opt-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.rsm-list .crs-opt-badge.is-on {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.rsm-list .crs-opt-badge.is-lock {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 224, 218, 0.6);
}
.rsm-list .monet-spicy-chip {
  width: 100%;
  margin-top: 2px;
  padding: 8px 12px;
  border-radius: 11px;
  justify-content: center;
  text-align: center;
}

/* ── [row2-fit-916-v2] 顶栏第二行 4 枚胶囊（语气 / 模型 / 额度 / 连拍）全端统一尺寸与视觉样式 ── */
.chat-page .chat-sub-model-bar .crs-trigger-pill,
.chat-page .chat-sub-model-bar .chat-model-tag,
.chat-page .chat-sub-model-bar .chat-quick-chat-pill,
.chat-page .chat-sub-model-bar .monet-autocomic-pill,
.chat-page .chat-sub-model-bar .monet-autocomic-pill.is-on {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 11px;
  gap: 5px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.075);
  color: #EDE7E3;
  font-family: var(--wd-font-sans);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}
.chat-page .chat-sub-model-bar .monet-autocomic-pill {
  margin-left: 0;
}
.chat-page .chat-sub-model-bar .crs-trigger-pill:hover,
.chat-page .chat-sub-model-bar .chat-model-tag:hover,
.chat-page .chat-sub-model-bar .chat-quick-chat-pill:hover,
.chat-page .chat-sub-model-bar .monet-autocomic-pill:hover {
  background: rgba(201, 142, 138, 0.2);
  border-color: rgba(232, 174, 168, 0.45);
  color: #fff;
}
.chat-page .chat-sub-model-bar .crs-trigger-pill:active,
.chat-page .chat-sub-model-bar .chat-model-tag:active,
.chat-page .chat-sub-model-bar .chat-quick-chat-pill:active,
.chat-page .chat-sub-model-bar .monet-autocomic-pill:active {
  transform: scale(0.96);
}
.chat-page .chat-sub-model-bar .crs-trigger-ico,
.chat-page .chat-sub-model-bar .model-sparkle,
.chat-page .chat-sub-model-bar .qcc-ico {
  font-size: 11.5px;
  line-height: 1;
}
.chat-page .chat-sub-model-bar .crs-label,
.chat-page .chat-sub-model-bar .qcc-label {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  line-height: 1;
}
.chat-page .chat-sub-model-bar .crs-trigger-caret,
.chat-page .chat-sub-model-bar .qcc-chevron {
  font-size: 11px;
  opacity: 0.72;
  line-height: 1;
}

@media (max-width: 560px), (max-aspect-ratio: 4/5) {
  .chat-page .chat-sub-model-bar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 2px 7px 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chat-page .chat-sub-model-bar::-webkit-scrollbar {
    display: none;
  }
  .chat-page .chat-sub-model-bar .chat-model-tag {
    margin-left: 0;
  }
  .chat-page .chat-sub-model-bar .crs-trigger-pill,
  .chat-page .chat-sub-model-bar .chat-model-tag,
  .chat-page .chat-sub-model-bar .chat-quick-chat-pill,
  .chat-page .chat-sub-model-bar .monet-autocomic-pill,
  .chat-page .chat-sub-model-bar .monet-autocomic-pill.is-on {
    height: 25px;
    padding: 0 7px;
    gap: 3px;
    font-size: 10.5px;
  }
  .chat-page .chat-sub-model-bar .crs-trigger-ico,
  .chat-page .chat-sub-model-bar .model-sparkle,
  .chat-page .chat-sub-model-bar .qcc-ico {
    font-size: 10.5px;
  }
}

/* ── [chat-input-height-guard-v1] 防止空输入框被切页/未稳态布局下的 scrollHeight 误撑成 90px 高框 ── */
.chat-page .chat-textarea {
  min-height: 22px;
  max-height: 90px;
  overflow-y: auto;
}
.chat-page .chat-textarea:placeholder-shown {
  height: 22px !important;
  overflow-y: hidden;
}
.chat-page .chat-textarea::placeholder {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ═══════════════════════════════════════════════════════════════════════════
   [w-ui-phase0 · 2026-11-27] Warm Cinema 暖影院設計系統大一統與高頻視覺精修
   1. 發現頁頂部微暗漸層 (#discover-top-scrim) + 「最新/最熱」亮底可讀性 + 暗金「劇場版專區」膠囊
   2. 發現頁標籤行收斂為單行 (≤4 枚)，保衛上 65% 人臉安全區
   3. 記憶資產抽屜重排：頂部全寬好感度 Hero 進度卡 + 下方 2×2 均分宮格 + 單色線性 SVG 圖示托
   4. 聊天頂欄 / 次行膠囊 / 語氣彈窗 / 二級頁收斂至香檳金 (#D4B483) × 玫瑰木 (#C98E8A)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 發現頁頂部漸層暗幕 & Tab 可讀性 ── */
#discover-top-scrim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 118px;
  background: linear-gradient(to bottom,
    rgba(12, 8, 7, 0.72) 0%,
    rgba(12, 8, 7, 0.34) 55%,
    transparent 100%);
  z-index: 30;
  pointer-events: none;
}
#stage.chat-mode #discover-top-scrim {
  visibility: hidden !important;
  pointer-events: none !important;
}
.dp-toptab {
  color: rgba(246, 238, 233, 0.74);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.78);
  transition: color 0.16s ease;
}
.dp-toptab:hover,
.dp-toptab.on {
  color: #FFFFFF;
}
.dp-toptab.on::after {
  background: var(--wc-gold, #D4B483);
  box-shadow: 0 0 8px rgba(212, 180, 131, 0.55);
}

/* 「劇場版專區」改為暗金描邊毛玻璃膠囊，消除原紫粉螢光割裂 */
.dp-toptab-theatre {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 5px 11px !important;
  border-radius: 9999px !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  color: var(--wc-gold-bright, #E8CFA2) !important;
  background: rgba(20, 14, 13, 0.56) !important;
  border: 1px solid rgba(212, 180, 131, 0.48) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32) !important;
  font-weight: 600 !important;
  text-shadow: none !important;
}
.dp-toptab-theatre:hover,
.dp-toptab-theatre:active {
  background: rgba(212, 180, 131, 0.22) !important;
  border-color: var(--wc-gold, #D4B483) !important;
  color: #FFF8EE !important;
}
.dp-toptab-theatre .dp-theatre-icon {
  display: inline-flex;
  align-items: center;
  color: var(--wc-gold, #D4B483);
}

/* 發現頁標籤收斂為單行不折行（保衛上 65% 人臉與呼吸感） */
.dp-tags {
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 6px;
}
.dp-tag {
  flex-shrink: 0;
  background: rgba(18, 14, 13, 0.42);
  border-color: rgba(236, 212, 198, 0.22);
  color: var(--wc-text-primary, #F6EEE9);
}

/* 寬屏發現頁左側篩選膠囊收斂至香檳金體系（去原螢光粉） */
.discover-wide-side .dws-chip.on {
  color: var(--wc-gold-bright, #E8CFA2);
  background: rgba(212, 180, 131, 0.16);
  border-color: rgba(212, 180, 131, 0.52);
}

/* ── 2. 記憶資產抽屜：頂部全寬好感度 Hero 進度卡 + 下方 2×2 均分宮格 ── */
.plus-drawer-sheet {
  background: linear-gradient(180deg, #241C19 0%, #181210 100%);
  border-top: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.24));
  box-shadow: var(--wc-shadow-sheet, 0 20px 54px rgba(0, 0, 0, 0.62));
}
.plus-drawer-handle {
  background: rgba(212, 180, 131, 0.32);
}
.plus-drawer-title {
  color: var(--wc-text-primary, #F6EEE9);
  letter-spacing: 0.4px;
}
.plus-asset-card.plus-hero-favor {
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 14px 15px;
  gap: 10px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(56, 41, 34, 0.88) 0%, rgba(34, 25, 22, 0.94) 100%);
  border: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.30));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
.plus-hero-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.plus-hero-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.plus-hero-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.plus-hero-num {
  color: var(--wc-gold-bright, #E8CFA2);
  font-weight: 600;
  margin-left: 4px;
}
.plus-hero-go {
  font-size: 20px;
  line-height: 1;
  color: var(--wc-gold, #D4B483);
  flex-shrink: 0;
}
.plus-hero-track {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.plus-hero-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wc-rose, #C98E8A), var(--wc-gold, #D4B483));
  transition: width 0.35s ease;
}

.plus-asset-ico-well {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 180, 131, 0.11);
  border: 1px solid rgba(212, 180, 131, 0.22);
  color: var(--wc-gold-bright, #E8CFA2);
  flex-shrink: 0;
}
.plus-asset-ico-well.is-hero {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(201, 142, 138, 0.18);
  border-color: rgba(201, 142, 138, 0.36);
  color: var(--wc-rose-bright, #E2ACA7);
}
.plus-drawer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.plus-drawer-grid .plus-asset-card {
  background: var(--wc-bg-2, #261D1A);
  border: 1px solid var(--wc-border-subtle, rgba(236, 212, 198, 0.11));
  border-radius: 14px;
  padding: 14px 12px;
  gap: 7px;
}
.plus-drawer-grid .plus-asset-card:hover {
  border-color: var(--wc-border-default, rgba(212, 180, 131, 0.30));
  background: var(--wc-bg-3, #322622);
}
.plus-asset-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--wc-text-primary, #F6EEE9);
}
.plus-asset-sub {
  font-size: 11px;
  color: var(--wc-text-muted, #A9958B);
  line-height: 1.45;
  margin-top: 0;
}
.plus-asset-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--wc-gold-bright, #E8CFA2);
  background: rgba(212, 180, 131, 0.13);
  border: 1px solid rgba(212, 180, 131, 0.24);
  opacity: 1;
}
.plus-asset-badge.is-hero-badge {
  color: var(--wc-gold-bright, #E8CFA2) !important;
  background: rgba(212, 180, 131, 0.18);
  border: 1px solid rgba(212, 180, 131, 0.38) !important;
}
.plus-asset-card.locked {
  opacity: 0.62;
}
.plus-asset-card.locked .plus-asset-ico-well {
  color: var(--wc-text-muted, #A9958B);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}
.plus-asset-card.locked .plus-asset-badge {
  color: var(--wc-text-secondary, #D4C2B8);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── 3. 聊天頂欄膠囊 & 語氣選擇彈窗 Warm Cinema 視覺統一 ── */
.chat-page .chat-header-actions .chat-action-pill .chat-pill-icon,
.chat-page .chat-header-actions .chat-more-menu .chat-more-item .chat-pill-icon,
.chat-page .chat-sub-model-bar .crs-trigger-ico,
.chat-page .chat-sub-model-bar .model-sparkle,
.chat-page .chat-sub-model-bar .qcc-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-page .chat-header-actions .chat-action-pill {
  background: rgba(212, 180, 131, 0.11);
  border-color: rgba(212, 180, 131, 0.26);
  color: var(--wc-text-primary, #F6EEE9);
}
.chat-page .chat-header-actions .chat-action-pill .chat-pill-icon {
  color: var(--wc-gold, #D4B483);
}
.chat-page .chat-header-actions .chat-action-pill:hover {
  background: rgba(212, 180, 131, 0.22);
  border-color: rgba(212, 180, 131, 0.50);
}
.chat-page .chat-header-actions .chat-more-menu {
  background: var(--wc-surface-3, rgba(28, 21, 19, 0.96));
  border-color: var(--wc-border-default, rgba(212, 180, 131, 0.28));
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(236, 212, 198, 0.14);
  color: var(--wc-text-primary, #F6EEE9);
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item .chat-pill-icon {
  color: var(--wc-gold, #D4B483);
}
.chat-page .chat-header-actions .chat-more-menu .chat-more-item:hover {
  background: rgba(212, 180, 131, 0.16);
  border-color: rgba(212, 180, 131, 0.42);
}

/* 語氣彈窗：單色線性 SVG 圖示框 + 香檳金選中態 */
.rsm-sheet {
  background: linear-gradient(180deg, #281F1C 0%, #1A1412 100%);
  border: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.28));
}
.rsm-sub {
  color: var(--wc-text-muted, #A9958B);
}
.rsm-list .crs-opt-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(212, 180, 131, 0.10);
  border: 1px solid rgba(212, 180, 131, 0.20);
  color: var(--wc-gold-bright, #E8CFA2);
}
.rsm-list .crs-pill.active {
  background: linear-gradient(135deg, rgba(212, 180, 131, 0.20), rgba(201, 142, 138, 0.20));
  border-color: var(--wc-gold, #D4B483);
  box-shadow: 0 2px 12px rgba(212, 180, 131, 0.16);
}
.rsm-list .crs-pill.active .crs-opt-ico {
  background: rgba(212, 180, 131, 0.22);
  border-color: rgba(212, 180, 131, 0.46);
  color: #FFF6E5;
}
.rsm-list .crs-pill.is-spicy.active {
  background: linear-gradient(135deg, rgba(168, 62, 78, 0.42), rgba(118, 42, 56, 0.54));
  border-color: var(--wc-danger, #DF8288);
}
.rsm-list .crs-pill.is-locked .crs-opt-ico {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--wc-text-muted, #A9958B);
}
.rsm-list .crs-opt-desc {
  color: var(--wc-text-secondary, #D4C2B8);
}
.rsm-list .crs-opt-badge.is-on {
  background: rgba(212, 180, 131, 0.22);
  color: var(--wc-gold-bright, #E8CFA2);
  border: 1px solid rgba(212, 180, 131, 0.36);
}
.rsm-list .crs-opt-badge.is-lock {
  background: rgba(255, 255, 255, 0.06);
  color: var(--wc-text-muted, #A9958B);
}

/* ── 4. 聊天下方點讚/反饋與次行收斂至 Warm Cinema ── */
.chat-page .chat-sub-model-bar .crs-trigger-pill:hover,
.chat-page .chat-sub-model-bar .chat-model-tag:hover,
.chat-page .chat-sub-model-bar .chat-quick-chat-pill:hover,
.chat-page .chat-sub-model-bar .monet-autocomic-pill:hover {
  background: rgba(212, 180, 131, 0.16);
  border-color: rgba(212, 180, 131, 0.42);
}
.chat-favor-badge {
  background: rgba(212, 180, 131, 0.14);
  color: var(--wc-gold-bright, #E8CFA2);
  border-color: rgba(212, 180, 131, 0.34);
}
.chat-favor-badge::before {
  color: var(--wc-gold, #D4B483);
}

/* ═══════════════════════════════════════════════════════════════════════════
   [w-ui-phase1 · 2026-11-27] Phase 1 視覺資產激活 + 氛圍設定抽屜全面升級
   1. 修復 #chat-page[data-am2-skin] 選擇器優先級，讓 8 套官方主題皮膚真實顯色
   2. 升級 .am2-plug-sheet 為 Warm Cinema 暖影院質感（雙滑桿 / 6 檔字號 / 8 皮膚 / 雙色調 / 隱私模糊鎖）
   3. 公共場合隱私模糊鎖 (#chat-page.am2-privacy-lock) 支援氣泡與 2K 劇照/拍立得單點顯影
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 8 套官方主題皮膚高優先級消費契約 ── */
#chat-page[data-am2-skin] {
  font-family: var(--am2-font-family, inherit);
}
#chat-page[data-am2-skin] .chat-msg-row.ai .chat-msg-bubble.am2-ai-bubble {
  background: var(--am2-ai-bubble-bg, rgba(28, 21, 20, 0.78));
  border: 1px solid var(--am2-ai-bubble-border, rgba(255, 255, 255, 0.14));
  color: var(--am2-ai-bubble-text, #f5ebe6);
  border-radius: var(--am2-bubble-radius, 16px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#chat-page[data-am2-skin] .chat-msg-row.ai .chat-msg-bubble.am2-ai-bubble .msg-dialogue-content {
  color: var(--am2-ai-bubble-text, #f5ebe6);
}
#chat-page[data-am2-skin] .chat-msg-row.user .chat-msg-bubble.am2-user-bubble {
  background: var(--am2-user-bubble-bg, rgba(232, 168, 124, 0.24));
  border: 1px solid var(--am2-user-bubble-border, rgba(232, 168, 124, 0.48));
  border-radius: var(--am2-bubble-radius, 16px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#chat-page[data-am2-skin] .am2-act-line,
#chat-page[data-am2-skin] .msg-turn-act {
  color: var(--am2-narration-color, #e6c6b8);
}
#chat-page[data-am2-skin] .am2-thought-line,
#chat-page[data-am2-skin] .msg-thought-line {
  background: var(--am2-thought-bg, rgba(255, 255, 255, 0.06));
  border-left-color: var(--am2-accent, #e8a87c);
}
#chat-page[data-am2-skin] .chat-msg-row.ai .chat-msg-bubble.am2-ai-bubble .msg-act-line {
  border-left-color: var(--am2-accent, #D4B483);
}
#chat-page[data-am2-skin] .am2-scene-card,
#chat-page[data-am2-skin] .msg-inline-image-box,
#chat-page[data-am2-skin] .msg-polaroid-card {
  border-color: var(--am2-ai-bubble-border, rgba(255, 255, 255, 0.14));
}

/* ── 2. 氛圍設定抽屜 Warm Cinema 質感與新控制項 ── */
.am2-plug-mask {
  background: rgba(12, 9, 8, 0.64);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.am2-plug-sheet {
  background: linear-gradient(180deg, #1E1715 0%, #161110 100%);
  border-top: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.24));
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.62);
  color: var(--wc-text-primary, #F6EEE9);
  max-height: 86%;
}
.am2-plug-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(236, 212, 198, 0.09);
  margin-bottom: 8px;
}
.am2-plug-head b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wc-text-primary, #F6EEE9);
}
.am2-plug-head small {
  display: block;
  margin-top: 3px;
  color: var(--wc-text-muted, #A9958B);
}
.am2-plug-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(236, 212, 198, 0.14);
  color: var(--wc-text-secondary, #D4C2B8);
}
.am2-plug-close:hover {
  background: rgba(212, 180, 131, 0.16);
  color: var(--wc-text-primary, #F6EEE9);
}
.am2-plug-btn.pri {
  background: var(--wc-gold-grad, linear-gradient(135deg, #DEC08E 0%, #C49E66 100%));
  color: var(--wc-gold-ink, #241811);
  font-weight: 700;
}
.am2-subtab-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(236, 212, 198, 0.14);
  color: var(--wc-text-secondary, #D4C2B8);
  border-radius: 999px;
  transition: all 0.15s ease;
}
.am2-subtab-pill.on {
  background: rgba(212, 180, 131, 0.20);
  border-color: var(--wc-gold, #D4B483);
  color: var(--wc-gold-bright, #E8CFA2);
  font-weight: 600;
}
.am2-reader-row {
  padding: 11px 0;
  border-bottom: 1px solid rgba(236, 212, 198, 0.08);
}
.am2-reader-row:last-child {
  border-bottom: none;
}
.am2-sec-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wc-text-primary, #F6EEE9);
}
.am2-sec-label small {
  font-weight: 400;
  font-size: 11px;
  color: var(--wc-text-muted, #A9958B);
}
.am2-mini-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(236, 212, 198, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wc-text-secondary, #D4C2B8);
  font-size: 11px;
  cursor: pointer;
}
.am2-mini-reset:hover {
  border-color: var(--wc-gold, #D4B483);
  color: var(--wc-gold-bright, #E8CFA2);
}

/* 2a. 公共場合隱私模糊鎖開關卡 */
.am2-privacy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(236, 212, 198, 0.14);
  cursor: pointer;
  transition: all 0.18s ease;
}
.am2-privacy-card.is-on {
  background: linear-gradient(135deg, rgba(212, 180, 131, 0.16), rgba(201, 142, 138, 0.14));
  border-color: rgba(212, 180, 131, 0.52);
}
.am2-privacy-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.am2-privacy-ico {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(212, 180, 131, 0.12);
  border: 1px solid rgba(212, 180, 131, 0.28);
  color: var(--wc-gold, #D4B483);
}
.am2-privacy-card.is-on .am2-privacy-ico {
  background: rgba(212, 180, 131, 0.24);
  border-color: var(--wc-gold, #D4B483);
  color: var(--wc-gold-bright, #E8CFA2);
}
.am2-privacy-meta b {
  display: block;
  font-size: 13px;
  color: var(--wc-text-primary, #F6EEE9);
}
.am2-privacy-meta small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--wc-text-muted, #A9958B);
  line-height: 1.4;
}
.am2-switch-pill {
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(236, 212, 198, 0.16);
  color: var(--wc-text-secondary, #D4C2B8);
}
.am2-privacy-card.is-on .am2-switch-pill {
  background: var(--wc-gold-grad, linear-gradient(135deg, #DEC08E 0%, #C49E66 100%));
  border-color: transparent;
  color: var(--wc-gold-ink, #241811);
}

/* 2b. 三聯滑桿（氣泡不透明度 / 背景柔焦 / 背景暗幕亮度） */
.am2-slider-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.am2-slider-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.am2-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--wc-text-secondary, #D4C2B8);
}
.am2-slider-head b {
  font-size: 11.5px;
  color: var(--wc-gold-bright, #E8CFA2);
  font-variant-numeric: tabular-nums;
}
.am2-range {
  width: 100%;
  accent-color: #D4B483;
  height: 4px;
  cursor: pointer;
}

/* 2c. 6 檔護眼字號 */
.am2-font-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.am2-font-pill {
  padding: 7px 2px;
  border-radius: 10px;
  border: 1px solid rgba(236, 212, 198, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wc-text-secondary, #D4C2B8);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.14s ease;
}
.am2-font-pill.on {
  background: rgba(212, 180, 131, 0.22);
  border-color: var(--wc-gold, #D4B483);
  color: var(--wc-gold-bright, #E8CFA2);
}

/* 2d. 8 套官方主題皮膚自選網格 */
.am2-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}
.am2-theme-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(236, 212, 198, 0.13);
  background: rgba(255, 255, 255, 0.035);
  color: var(--wc-text-primary, #F6EEE9);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}
.am2-theme-card.is-full {
  grid-column: 1 / -1;
}
.am2-theme-card.on {
  background: rgba(212, 180, 131, 0.16);
  border-color: var(--wc-gold, #D4B483);
  box-shadow: 0 2px 10px rgba(212, 180, 131, 0.14);
}
.am2-theme-dots {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.am2-theme-dot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
}
.am2-theme-dot + .am2-theme-dot {
  margin-left: -5px;
}
.am2-theme-info {
  min-width: 0;
  flex: 1;
}
.am2-theme-info b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--wc-text-primary, #F6EEE9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am2-theme-info small {
  display: block;
  font-size: 10.5px;
  color: var(--wc-text-muted, #A9958B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2e. 正文 / 動作雙色調色盤 */
.am2-tone-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 8px;
}
.am2-swatch-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.am2-swatch-lbl {
  font-size: 11.5px;
  color: var(--wc-text-secondary, #D4C2B8);
  flex-shrink: 0;
}
.am2-swatch-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.am2-swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.12s ease, border-color 0.14s ease;
}
.am2-swatch-btn.is-auto {
  width: auto;
  padding: 0 9px;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--wc-text-secondary, #D4C2B8);
}
.am2-swatch-btn.on {
  border-color: var(--wc-gold-bright, #E8CFA2);
  box-shadow: 0 0 0 2px rgba(212, 180, 131, 0.34);
  transform: scale(1.06);
}
.am2-swatch-btn.is-auto.on {
  background: rgba(212, 180, 131, 0.20);
  color: var(--wc-gold-bright, #E8CFA2);
}

/* ── 3. 公共場合隱私模糊鎖 (#chat-page.am2-privacy-lock) ── */
#chat-page.am2-privacy-lock .chat-msg-bubble:not(.am2-privacy-revealed) .msg-content-body {
  filter: blur(10px);
  -webkit-filter: blur(10px);
  user-select: none;
  transition: filter 0.22s ease, -webkit-filter 0.22s ease;
}
#chat-page.am2-privacy-lock .chat-msg-bubble {
  cursor: pointer;
  position: relative;
}
#chat-page.am2-privacy-lock .chat-msg-bubble:not(.am2-privacy-revealed)::after {
  content: '隱私保護中 · 點擊暫時顯影';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: rgba(232, 207, 162, 0.88);
  background: rgba(18, 14, 13, 0.22);
  border-radius: inherit;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.72);
}
#chat-page.am2-privacy-lock .chat-msg-bubble.am2-privacy-revealed .msg-content-body {
  filter: none;
  -webkit-filter: none;
  transition: filter 0.22s ease, -webkit-filter 0.22s ease;
}
#chat-page.am2-privacy-lock .msg-inline-image-box:not(.am2-privacy-revealed) .msg-inline-img,
#chat-page.am2-privacy-lock .msg-inline-image-box:not(.am2-privacy-revealed) .msg-img-scene,
#chat-page.am2-privacy-lock .msg-polaroid-card:not(.am2-privacy-revealed) .msg-polaroid-img,
#chat-page.am2-privacy-lock .msg-polaroid-card:not(.am2-privacy-revealed) .msg-polaroid-footer {
  filter: blur(14px);
  -webkit-filter: blur(14px);
  transform: scale(1.04);
  transition: filter 0.22s ease, transform 0.22s ease;
}
#chat-page.am2-privacy-lock .msg-inline-image-box:not(.am2-privacy-revealed)::after,
#chat-page.am2-privacy-lock .msg-polaroid-card:not(.am2-privacy-revealed)::after {
  content: '隱私模糊鎖 · 點擊顯影';
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #E8CFA2;
  background: rgba(18, 14, 13, 0.36);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}
#chat-page.am2-privacy-lock .msg-inline-image-box.am2-privacy-revealed .msg-inline-img,
#chat-page.am2-privacy-lock .msg-polaroid-card.am2-privacy-revealed .msg-polaroid-img {
  filter: none;
  -webkit-filter: none;
  transform: none;
}
/* 頂欄「氛圍」按鈕啟用隱私鎖時的微光標記 */
.chat-page .chat-header-actions .chat-action-pill.is-privacy-on {
  border-color: var(--wc-gold, #D4B483);
  background: rgba(212, 180, 131, 0.24);
  color: var(--wc-gold-bright, #E8CFA2);
}


/* ══════════════════════════════════════════════════════════════════════════
   [w-ui-phase2] 3D 破框靈動頭像雙層容器 + 高定雜誌檔案卡 + 卡司大殿 & Top 榜單破框
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. 高定雜誌檔案卡 (#character-profile-modal) ───────────────────────── */
.profile-mag-sheet {
  background: linear-gradient(180deg, #1E1715 0%, #15100F 100%);
  border-top: 1px solid rgba(212, 180, 131, 0.34);
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.72);
  max-height: 90vh;
}
.profile-mag-hero {
  position: relative;
  height: auto;
  min-height: 248px;
  padding: 14px 16px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(236, 212, 198, 0.10);
}
.profile-mag-bg {
  position: absolute;
  inset: -14px;
  width: calc(100% + 28px);
  height: calc(100% + 28px);
  object-fit: cover;
  object-position: center 22%;
  filter: blur(18px) saturate(1.12) brightness(0.46);
  transform: scale(1.06);
  pointer-events: none;
  z-index: 0;
}
.profile-mag-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 26% 62%, rgba(212, 180, 131, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(18, 13, 12, 0.42) 0%, rgba(22, 16, 15, 0.72) 62%, #1C1513 100%);
  pointer-events: none;
  z-index: 1;
}
.profile-mag-masthead {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-mag-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-mag-kicker {
  font-family: var(--wc-font-display, 'Playfair Display', serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--wc-gold-bright, #E8CFA2);
}
.profile-mag-issue {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(236, 212, 198, 0.62);
  font-weight: 600;
}
.profile-mag-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.profile-mag-icon-btn {
  position: static !important;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 13, 12, 0.56);
  border: 1px solid rgba(236, 212, 198, 0.22);
  color: #F6EEE9;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.profile-mag-icon-btn:hover {
  border-color: rgba(212, 180, 131, 0.62);
}
.profile-mag-icon-btn:active {
  transform: scale(0.92);
}

.profile-mag-stage {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-top: 28px;
}
/* 英雄級 3D 破框靈動頭像舞臺（底部圓環 + 2× 破框透明人物） */
.am2-popout-stage {
  position: relative;
  width: 118px;
  height: 118px;
  flex-shrink: 0;
  overflow: visible;
}
.am2-popout-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 180, 131, 0.62);
  box-shadow: 0 0 24px rgba(212, 180, 131, 0.24), inset 0 0 18px rgba(212, 180, 131, 0.16);
  pointer-events: none;
  z-index: 1;
}
.am2-popout-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(212, 180, 131, 0.28) 0%, rgba(42, 30, 27, 0.88) 72%, rgba(20, 14, 13, 0.96) 100%);
  border: 1px solid rgba(236, 212, 198, 0.22);
  box-shadow: inset 0 -10px 22px rgba(0, 0, 0, 0.55);
  z-index: 1;
}
.am2-popout-stage.is-3d .am2-popout-img {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  width: 122px;
  height: 162px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.68)) drop-shadow(0 0 12px rgba(212, 180, 131, 0.22));
  clip-path: inset(-120px 2px 0px 2px round 0 0 58px 58px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 84%, rgba(0, 0, 0, 0.15) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 84%, rgba(0, 0, 0, 0.15) 100%);
}
.am2-popout-stage.is-fallback .am2-popout-img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 16%;
  z-index: 2;
}
.am2-popout-3d-tag {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  z-index: 4;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1A1311;
  background: linear-gradient(135deg, #EAD1A3 0%, #C7A067 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.profile-mag-title-col {
  position: static !important;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 4px;
}
.profile-mag-title-col .profile-char-name {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #F6EEE9;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.profile-char-tagline {
  font-size: 12px;
  line-height: 1.45;
  color: #D4C2B8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-mag-sheet .p-tag {
  background: rgba(212, 180, 131, 0.13);
  border: 1px solid rgba(212, 180, 131, 0.24);
  color: #E8CFA2;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10.5px;
}

/* ── 2. 視覺化聲紋試聽條 (#profile-voiceprint-card) ─────────────────────── */
.profile-voiceprint-card {
  margin: 14px 16px 2px;
  padding: 11px 13px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(38, 28, 25, 0.92), rgba(26, 19, 17, 0.96));
  border: 1px solid rgba(212, 180, 131, 0.24);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.profile-voiceprint-card.is-playing {
  border-color: rgba(232, 207, 162, 0.56);
  box-shadow: 0 8px 26px rgba(212, 180, 131, 0.16);
}
.profile-vp-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(232, 207, 162, 0.45);
  background: linear-gradient(135deg, #DEC08E 0%, #B88E56 100%);
  color: #1A1311;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.profile-vp-play:active { transform: scale(0.92); }
.profile-vp-play .vp-ico-pause { display: none; }
.profile-voiceprint-card.is-playing .profile-vp-play .vp-ico-play { display: none; }
.profile-voiceprint-card.is-playing .profile-vp-play .vp-ico-pause { display: block; }
.profile-voiceprint-card.is-loading .profile-vp-play { opacity: 0.65; }
.profile-vp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.profile-vp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.profile-vp-label {
  font-size: 11px;
  font-weight: 700;
  color: #E8CFA2;
  letter-spacing: 0.06em;
}
.profile-vp-meta {
  font-size: 10.5px;
  color: #A9958B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-vp-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}
.profile-vp-wave i {
  display: block;
  flex: 1;
  max-width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(212, 180, 131, 0.36);
  transition: height 0.2s ease, background 0.2s ease;
}
.profile-vp-wave i:nth-child(3n+1) { height: 8px; }
.profile-vp-wave i:nth-child(4n+2) { height: 13px; }
.profile-vp-wave i:nth-child(5n+3) { height: 10px; }
.profile-voiceprint-card.is-playing .profile-vp-wave i {
  background: linear-gradient(180deg, #F3DFB9, #C49E66);
  animation: am2VpBar 0.85s ease-in-out infinite alternate;
}
.profile-voiceprint-card.is-playing .profile-vp-wave i:nth-child(2n) { animation-delay: 0.14s; }
.profile-voiceprint-card.is-playing .profile-vp-wave i:nth-child(3n) { animation-delay: 0.28s; }
.profile-voiceprint-card.is-playing .profile-vp-wave i:nth-child(5n) { animation-delay: 0.42s; }
@keyframes am2VpBar {
  0% { height: 4px; opacity: 0.65; }
  100% { height: 17px; opacity: 1; }
}
.profile-vp-quote {
  font-size: 11.5px;
  color: #D4C2B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 3. 可摺疊機密檔案區 (.profile-dossier-stack) ───────────────────────── */
.profile-dossier-stack {
  padding: 10px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-dossier-card {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(236, 212, 198, 0.12);
  overflow: hidden;
}
.profile-dossier-card[open] {
  border-color: rgba(212, 180, 131, 0.26);
}
.profile-dossier-sum {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  cursor: pointer;
  user-select: none;
}
.profile-dossier-sum::-webkit-details-marker { display: none; }
.profile-dossier-title {
  font-family: var(--wc-font-display, 'Playfair Display', serif);
  font-size: 13.5px;
  font-weight: 700;
  color: #F6EEE9;
}
.profile-dossier-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #D4B483;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(212, 180, 131, 0.12);
  border: 1px solid rgba(212, 180, 131, 0.24);
}
.profile-dossier-body {
  padding: 0 13px 12px;
  border-top: 1px solid rgba(236, 212, 198, 0.07);
}
.profile-dossier-body .profile-bio-text {
  margin: 10px 0 4px;
}
.profile-opening-bg-text {
  margin: 10px 0 6px;
  font-size: 12.5px;
  line-height: 1.62;
  color: #D4C2B8;
  white-space: pre-wrap;
}
.profile-status-preview-host {
  margin-top: 8px;
}
.profile-mag-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 15, 13, 0.96);
}
.profile-mag-footer .profile-story-cta-btn {
  flex: 1;
  background: linear-gradient(135deg, #DEC08E 0%, #B88E56 100%);
  color: #1A1311;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 22px rgba(212, 180, 131, 0.24);
}
.profile-mag-share-cta {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 180, 131, 0.34);
  color: #E8CFA2;
  cursor: pointer;
}
.profile-mag-share-cta:active { transform: scale(0.94); }

/* ── 4. 劇場「全員卡司大殿」3D 破框頭像底座 (.am2-popout-pedestal) ─────── */
.tcm-grid {
  row-gap: 18px;
  padding-top: 12px;
}
.tcm-actor-card {
  position: relative;
  overflow: visible;
  background: linear-gradient(155deg, rgba(36, 28, 25, 0.90), rgba(24, 18, 16, 0.95));
  border: 1px solid rgba(236, 212, 198, 0.13);
}
.tcm-actor-card.has-popout {
  padding-top: 11px;
  padding-bottom: 11px;
  border-color: color-mix(in srgb, var(--actor-color, #D4B483) 34%, rgba(236, 212, 198, 0.14));
}
.am2-popout-pedestal {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  overflow: visible;
}
.am2-popout-ped-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--actor-color, #D4B483) 26%, transparent), rgba(18, 13, 12, 0.92) 76%);
  border: 1.5px solid color-mix(in srgb, var(--actor-color, #D4B483) 72%, #fff);
  box-shadow: 0 0 14px color-mix(in srgb, var(--actor-color, #D4B483) 28%, transparent);
}
.am2-popout-ped-glow {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -2px;
  height: 12px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--actor-color, #D4B483) 42%, transparent);
  filter: blur(6px);
  pointer-events: none;
}
.am2-popout-ped-img {
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 58px;
  height: 76px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.62));
  clip-path: inset(-56px 1px 0px 1px round 0 0 28px 28px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 85%, rgba(0, 0, 0, 0.2) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 85%, rgba(0, 0, 0, 0.2) 100%);
}
.am2-popout-pedestal.is-fallback .tcm-actor-avatar {
  width: 52px;
  height: 52px;
}

/* ── 5. 發現頁寬屏卡池 & 發現列表 Top 3 榜單破框頭像徽章 ─────────────────── */
.discover-wide-side .dwc.is-top-rank,
.dl-card.is-top-rank {
  position: relative;
  border-color: rgba(212, 180, 131, 0.38);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(212, 180, 131, 0.14);
}
.dwc-rank-pill,
.dl-rank-pill {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1A1311;
  background: linear-gradient(135deg, #F2DCB2 0%, #C79F62 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.dwc-rank-pill.is-rank-2,
.dl-rank-pill.is-rank-2 {
  background: linear-gradient(135deg, #E8E2DC 0%, #B4AAA2 100%);
}
.dwc-rank-pill.is-rank-3,
.dl-rank-pill.is-rank-3 {
  background: linear-gradient(135deg, #E4BBA1 0%, #B07C5E 100%);
}
.am2-rank-popout {
  position: absolute;
  right: 8px;
  top: 94px;
  width: 46px;
  height: 46px;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.am2-rank-popout.is-dl {
  top: auto;
  bottom: 58px;
  right: 8px;
  width: 48px;
  height: 48px;
}
.am2-rank-popout-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(212, 180, 131, 0.32), rgba(20, 14, 13, 0.90) 76%);
  border: 1.5px solid rgba(232, 207, 162, 0.72);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.56);
}
.am2-rank-popout-img {
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 50px;
  height: 64px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.65));
  clip-path: inset(-44px 1px 0px 1px round 0 0 24px 24px);
}
/* [phase2-polish] 發現頁 Top 3 底欄 3D 破框頭像（零雙臉重疊，金環立體出圈） */
.discover-wide-side .dwc.is-top-rank,
.discover-wide-side .dwc.is-top-rank .dwc-meta,
.discover-wide-side .dwc.is-top-rank .dwc-avatars {
  overflow: visible;
}
.am2-dwc-popout-av {
  position: relative;
  width: 28px;
  height: 28px;
  overflow: visible;
  flex-shrink: 0;
}
.am2-dwc-popout-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(212, 180, 131, 0.34), rgba(20, 14, 13, 0.94) 76%);
  border: 1.5px solid rgba(232, 207, 162, 0.82);
  box-shadow: 0 0 10px rgba(212, 180, 131, 0.32);
}
.am2-dwc-popout-img {
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  width: 32px;
  height: 41px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
  clip-path: inset(-28px 1px 0px 1px round 0 0 15px 15px);
}


/* ══════════════════════════════════════════════════════════════════════════
   [w-ui-bgm-picker] Warm Cinema 客製化暗黑 BGM 選單（徹底取代系統白底原生 select）
   ══════════════════════════════════════════════════════════════════════════ */
.am2-bgm-picker {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.am2-bgm-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(236, 212, 198, 0.16);
  color: #F6EEE9;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.am2-bgm-trigger:hover,
.am2-bgm-picker.is-open .am2-bgm-trigger {
  background: rgba(212, 180, 131, 0.09);
  border-color: rgba(212, 180, 131, 0.45);
}
.am2-bgm-trig-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(212, 180, 131, 0.12);
  border: 1px solid rgba(212, 180, 131, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #D4C2B8;
}
.am2-bgm-trig-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.am2-bgm-trig-meta b {
  font-size: 13px;
  font-weight: 700;
  color: #F6EEE9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am2-bgm-trig-meta small {
  font-size: 11px;
  color: #A9958B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am2-bgm-trig-chev {
  color: #A9958B;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.am2-bgm-picker.is-open .am2-bgm-trig-chev {
  transform: rotate(90deg);
  color: #E8CFA2;
}

.am2-bgm-menu {
  padding: 10px;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(28, 21, 19, 0.98), rgba(19, 14, 13, 0.99));
  border: 1px solid rgba(212, 180, 131, 0.28);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.56);
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 276px;
  overflow-y: auto;
}
.am2-bgm-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.am2-bgm-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(236, 212, 198, 0.14);
  color: #D4C2B8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.am2-bgm-mode-btn:hover {
  border-color: rgba(212, 180, 131, 0.36);
  color: #F6EEE9;
}
.am2-bgm-mode-btn.on {
  background: rgba(212, 180, 131, 0.16);
  border-color: rgba(212, 180, 131, 0.62);
  color: #F6EEE9;
}
.am2-bgm-grp-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #A9958B;
  padding: 2px 2px 0;
}
.am2-bgm-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.am2-bgm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
@media (max-width: 440px) {
  .am2-bgm-grid {
    grid-template-columns: 1fr;
  }
}
.am2-bgm-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(236, 212, 198, 0.10);
  color: #F6EEE9;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}
.am2-bgm-opt:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(212, 180, 131, 0.32);
}
.am2-bgm-opt.on {
  background: rgba(212, 180, 131, 0.14);
  border-color: rgba(212, 180, 131, 0.62);
}
.am2-bgm-opt-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--bgm-tint, #D4B483) 26%, rgba(36, 26, 23, 0.92)), rgba(20, 15, 14, 0.95) 82%);
  border: 1px solid color-mix(in srgb, var(--bgm-tint, #D4B483) 42%, rgba(236, 212, 198, 0.14));
  box-shadow: inset 0 0 8px color-mix(in srgb, var(--bgm-tint, #D4B483) 14%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.am2-bgm-opt.on .am2-bgm-opt-badge {
  border-color: color-mix(in srgb, var(--bgm-tint, #D4B483) 78%, #FFF5E4);
  box-shadow: 0 0 12px color-mix(in srgb, var(--bgm-tint, #D4B483) 34%, transparent);
}
.am2-bgm-emoji {
  font-size: 13.5px;
  line-height: 1;
  filter: saturate(0.88) brightness(0.98);
  display: inline-block;
}
.am2-bgm-trig-ico {
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--bgm-tint, #D4B483) 22%, rgba(36, 26, 23, 0.92)), rgba(20, 15, 14, 0.95) 82%);
  border-color: color-mix(in srgb, var(--bgm-tint, #D4B483) 38%, rgba(236, 212, 198, 0.16));
}
/* 氛圍抽屜與 BGM 曲庫細暗金捲軸（消除系統亮白滾動條割裂感） */
.am2-tune-body,
.am2-bgm-menu {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 180, 131, 0.30) transparent;
}
.am2-tune-body::-webkit-scrollbar,
.am2-bgm-menu::-webkit-scrollbar {
  width: 5px;
}
.am2-tune-body::-webkit-scrollbar-track,
.am2-bgm-menu::-webkit-scrollbar-track {
  background: transparent;
}
.am2-tune-body::-webkit-scrollbar-thumb,
.am2-bgm-menu::-webkit-scrollbar-thumb {
  background: rgba(212, 180, 131, 0.28);
  border-radius: 999px;
}
.am2-tune-body::-webkit-scrollbar-thumb:hover,
.am2-bgm-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 180, 131, 0.50);
}
.am2-bgm-opt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.am2-bgm-opt-info b {
  font-size: 12px;
  font-weight: 600;
  color: #F6EEE9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am2-bgm-opt-info small {
  font-size: 10.5px;
  color: #A9958B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.am2-bgm-opt-chk {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}


/* ── [crisis-guard-v1] Warm Cinema 心理危機溫暖守護卡片 ───────────────────── */
.am2-crisis-card {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(38, 29, 26, 0.88);
  border: 1px solid rgba(212, 180, 131, 0.36);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  color: #F3EAE2;
  font-size: 12.5px;
  line-height: 1.55;
}
.am2-crisis-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: #D4B483;
  margin-bottom: 5px;
  font-size: 13px;
}
.am2-crisis-body {
  color: rgba(243, 234, 226, 0.86);
  margin-bottom: 8px;
}
.am2-crisis-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.am2-crisis-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 180, 131, 0.14);
  border: 1px solid rgba(212, 180, 131, 0.38);
  color: #F5DFBB;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease;
}
.am2-crisis-pill:hover {
  background: rgba(212, 180, 131, 0.25);
}
.am2-crisis-foot {
  margin-top: 7px;
  font-size: 11px;
  color: rgba(243, 234, 226, 0.58);
}


/* ── [longterm-memory-v1] 角色第一人稱私密手賬 & 四維雙證據畫像面板 ────────── */
.am2-secret-diary-hero {
  margin: 4px 16px 12px;
}
.am2-sd-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(46, 34, 29, 0.92), rgba(28, 21, 19, 0.95));
  border: 1px solid rgba(212, 180, 131, 0.34);
  margin-bottom: 10px;
}
.am2-sd-heading {
  font-size: 14px;
  font-weight: 700;
  color: #EBD2A9;
}
.am2-sd-sub {
  font-size: 11.5px;
  color: rgba(243, 234, 226, 0.65);
  margin-top: 2px;
}
.am2-sd-gen-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 180, 131, 0.55);
  background: rgba(212, 180, 131, 0.16);
  color: #F5E1BE;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.am2-sd-gen-btn:hover {
  background: rgba(212, 180, 131, 0.28);
}
.am2-secret-diary-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(34, 26, 23, 0.92);
  border: 1px solid rgba(201, 142, 138, 0.32);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  margin-bottom: 10px;
}
.am2-sd-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: rgba(243, 234, 226, 0.62);
  margin-bottom: 6px;
}
.am2-sd-mood {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201, 142, 138, 0.18);
  color: #E8B8B4;
  font-weight: 600;
}
.am2-sd-title {
  font-size: 14px;
  font-weight: 700;
  color: #F2DEC0;
  margin-bottom: 6px;
}
.am2-sd-content {
  font-size: 13px;
  line-height: 1.68;
  color: rgba(245, 238, 232, 0.92);
  white-space: pre-wrap;
}
.am2-portrait4d-card {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(36, 28, 25, 0.88);
  border: 1px solid rgba(212, 180, 131, 0.3);
}
.am2-p4d-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  color: #E8CFA4;
  margin-bottom: 8px;
}
.am2-p4d-cand {
  font-size: 11px;
  font-weight: 500;
  color: rgba(243, 234, 226, 0.6);
}
.am2-p4d-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.am2-p4d-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 180, 131, 0.24);
  font-size: 12px;
  color: #F3EAE2;
}
.am2-p4d-pill b {
  color: #D4B483;
  font-weight: 600;
}
.am2-p4d-pill em {
  font-style: normal;
  font-size: 10.5px;
  color: rgba(212, 180, 131, 0.78);
}
.am2-p4d-empty {
  font-size: 12px;
  color: rgba(243, 234, 226, 0.68);
  line-height: 1.5;
}
