/* ========================================= */
/* 核心容器墙与防污染基准 */
/* ========================================= */
ai { display: block; max-width: 600px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }

/* 思考推演引擎 (樱粉色调) */
ai thi { display: block; margin: 15px 10px; }
ai thi details { background: #fff0f6; border: 1px solid #fbcfe8; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(244, 114, 182, 0.1); transition: all 0.3s ease; }
ai thi summary { padding: 12px 16px; font-size: 14px; font-weight: 600; color: #db2777; background: linear-gradient(135deg, #fdf2f8, #fce7f3); cursor: pointer; list-style: none; outline: none; display: flex; align-items: center; user-select: none; }
ai thi summary::-webkit-details-marker { display: none; }
ai thi summary::before { content: "🌸"; margin-right: 10px; font-size: 16px; transition: transform 0.3s ease; }
ai thi details[open] summary::before { transform: rotate(90deg); }
ai thi details[open] summary { border-bottom: 1px dashed #fbcfe8; }
ai thi tc { display: block; padding: 15px 16px; font-size: 13px; color: #831843; line-height: 1.7; background: transparent; text-align: justify; }

/* 顶栏与正文 */
ai top { display: flex; flex-wrap: wrap; background: #ffffff; padding: 12px; border-radius: 10px; border: 1px solid #fbcfe8; box-shadow: 0 4px 15px rgba(244, 114, 182, 0.15); margin-bottom: 15px; font-size: 13px; line-height: 1.5; color: #334155; }
ai top e { display: block; width: 50%; box-sizing: border-box; padding: 2px 4px; color: #475569; } ai top e.line { width: 100%; border-top: 1px dashed #fbcfe8; padding-top: 8px; margin-top: 4px; } ai top e b { color: #db2777; }
ai txt { display: block; margin: 20px 10px; font-size: 15px; line-height: 1.7; color: #1e293b; text-align: justify; letter-spacing: 0.5px;}
ai txt p { margin-bottom: 12px; }

/* 手机终端壳体 */
ai ph { display: flex; flex-direction: column; position: relative; max-width: 340px; height: 550px; margin: 20px auto 15px; background: #ffffff; border-radius: 35px; border: 8px solid #fce7f3; padding: 15px 10px 5px; box-shadow: 0 15px 35px rgba(219, 39, 119, 0.2), inset 0 0 10px rgba(244, 114, 182, 0.1); overflow: hidden; color: #334155; box-sizing: border-box; }
ai ph tb { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; padding: 0 15px 5px; font-weight: 500; flex-shrink: 0; }
ai ph tit { display: block; color: #db2777; font-size: 16px; text-align: center; margin: 2px 0 4px; font-weight: 600; text-shadow: 0 0 5px rgba(244,114,182,0.3); flex-shrink: 0; }
ai ph gd { display: flex; flex-wrap: wrap; align-content: flex-start; padding: 5px 5px 10px; flex-grow: 1; }
ai ph gd > br, ai ph gd > p { display: none !important; }

/* 极简焦点驱动器 */
ai ph ap { display: flex; flex-direction: column; align-items: center; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; position: static; width: 33.33%; margin-bottom: 15px; box-sizing: border-box;}
ai ph ap > ic, ai ph ap > t { pointer-events: none; }
ai ph ap ic { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; font-size: 26px; box-shadow: 0 4px 10px rgba(244, 114, 182, 0.2); transition: transform 0.2s; color: white; }
ai ph ap:hover ic { transform: scale(1.05); }
ai ph ap t { margin-top: 8px; font-size: 11px; color: #64748b; font-weight: 600; white-space: nowrap; }

/* 隐藏与展开的 APP 视图 */
ai ph vw { display: none; cursor: default; }
ai ph ap:focus vw, ai ph ap:focus-within vw { display: flex; flex-direction: column; position: absolute; top: 45px; left: 0; right: 0; bottom: 0; background: #fff5f7; z-index: 100; animation: appFadeIn 0.2s ease-out forwards; pointer-events: auto; border-top-left-radius: 20px; border-top-right-radius: 20px; box-shadow: 0 -5px 15px rgba(0,0,0,0.05); }
@keyframes appFadeIn { 0% { opacity: 0; transform: translateY(15px); } 100% { opacity: 1; transform: translateY(0); } }
ai ph vw::before { content: '— 点击上方系统状态栏返回桌面 —'; display: block; text-align: center; font-size: 10px; color: #94a3b8; padding: 8px 0 4px; background: transparent; flex-shrink: 0; border-top-left-radius: 20px; border-top-right-radius: 20px; }

/* APP 色彩 */
ai ph .c1, ai ph .h1 { background: linear-gradient(135deg, #f472b6, #db2777); } ai ph .c2, ai ph .h2 { background: linear-gradient(135deg, #fb7185, #e11d48); } ai ph .c3, ai ph .h3 { background: linear-gradient(135deg, #38bdf8, #0284c7); } ai ph .c4, ai ph .h4 { background: linear-gradient(135deg, #fbbf24, #d97706); } ai ph .c5, ai ph .h5 { background: linear-gradient(135deg, #34d399, #059669); } ai ph .c6, ai ph .h6 { background: linear-gradient(135deg, #c084fc, #9333ea); } ai ph .c7, ai ph .h7 { background: linear-gradient(135deg, #4ade80, #16a34a); } ai ph .c8, ai ph .h8 { background: linear-gradient(135deg, #818cf8, #4f46e5); }

/* ========================================= */
/* 【本次修复核心】 基础 APP 组件与列表布局补全 */
/* ========================================= */
ai ph hd { display: block; padding: 12px 15px; color: white; font-weight: bold; font-size: 15px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); flex-shrink: 0; cursor: pointer; }
ai ph sc { position: relative; padding: 15px; overflow-y: auto; flex-grow: 1; display: block; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
ai ph sc::-webkit-scrollbar { width: 4px; } ai ph sc::-webkit-scrollbar-thumb { background: #fbcfe8; border-radius: 4px; }
ai ph bx { display: block; padding: 10px; margin-bottom: 10px; background: #ffffff; border-radius: 8px; border: 1px solid #fce7f3; font-size: 13px; line-height: 1.6; color:#475569;}
ai ph bx.trans { background: transparent; border: none; padding: 0; margin-bottom:5px; box-shadow:none;}
ai ph bx>b { display: block; color: #db2777; font-size: 13px; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid #fce7f3; }
ai ph g { display: block; padding: 0 5px; }
ai ph g i { display: block; font-size: 13px; color: #475569; padding: 8px 4px; border-bottom: 1px dashed #fce7f3; line-height: 1.5; outline: none; cursor: pointer; transition: all 0.3s ease; position: relative; word-break: break-word; }
ai ph g i p { margin: 0 !important; padding: 0 !important; }
ai ph g i > b, ai ph g i p > b { color: #be185d; pointer-events: none; }
ai ph g i:hover, ai ph g i:focus, ai ph g i:focus-within { background: #fdf2f8; border-radius: 6px; border-bottom-color: transparent; }

/* 丢失的二级列表通用 (WeChat & 商单列表) 恢复 */
ai ph cc { display: block; margin-bottom: 10px; background: #ffffff; border-radius: 8px; border: 1px solid #e2e8f0; overflow: hidden; outline: none; cursor: pointer;} ai ph ch { display: flex; align-items: center; padding: 10px; background: #f8fafc; pointer-events: none; } ai ph av { width: 36px; height: 36px; background: #22c55e; color: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: bold; flex-shrink: 0; } ai ph ci { margin-left: 10px; flex-grow: 1; overflow: hidden; } ai ph n { display: block; font-size: 14px; font-weight: 600; color: #334155; } ai ph m { display: block; font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; } 

/* 丢失的详情页与聊天记录 (WeChat 对话框) 恢复 */
ai ph cb { display: none; flex-direction: column; gap: 10px; padding: 15px 10px; background: #f1f5f9; position: absolute; top: 0; left: 0; width: 100%; min-height: 100%; box-sizing: border-box; z-index: 10; cursor: default;}
ai ph cc:focus-within cb, ai ph cc:focus cb { display: flex; animation: slideIn 0.2s ease-out; }
@keyframes slideIn { 0% { transform: translateX(20px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }

ai ph cbtop { display: flex; align-items: center; padding-bottom: 12px; border-bottom: 1px dashed #cbd5e1; margin-bottom: 5px; }
ai ph cbtop av { width: 42px; height: 42px; font-size: 18px; margin-right: 12px; border-radius: 12px; }
ai ph cbtop tx { display: flex; flex-direction: column; }
ai ph cbtop tx b { color: #1e293b; font-size: 15px; }
ai ph cbtop tx i { color: #64748b; font-size: 12px; font-style: normal; margin-top: 2px; }
ai ph msg { display: flex; width: 100%; } ai ph msg span { max-width: 80%; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; word-wrap: break-word; } ai ph msg.l { justify-content: flex-start; } ai ph msg.l span { background: #ffffff; color: #334155; border: 1px solid #e2e8f0; border-top-left-radius: 2px; } ai ph msg.r { justify-content: flex-end; } ai ph msg.r span { background: #22c55e; color: #ffffff; border-top-right-radius: 2px; box-shadow: 0 1px 2px rgba(34,197,94,0.2); }

/* 丢失的记忆表格恢复 */
ai ph mtb { display: grid; grid-template-columns: 60px 1fr; background: #ffffff; border-radius: 8px; border: 1px solid #fce7f3; overflow: hidden; font-size: 12px; } ai ph mth { background: #fdf2f8; color: #db2777; font-weight: bold; padding: 8px; border-bottom: 1px solid #fce7f3; text-align: center; } ai ph mtd { padding: 8px; color: #475569; border-bottom: 1px dashed #fce7f3; display: flex; align-items: center; line-height: 1.4; } ai ph mtb mtd:nth-child(4n+3), ai ph mtb mtd:nth-child(4n+4) { background: #fffbfe; } ai ph mtb mtd:nth-child(odd) { justify-content: center; font-weight: 600; color: #94a3b8; border-right: 1px dashed #fce7f3; }

/* ========================================= */
/* [自动注入] Bilibili 青春明亮风主题体系       */
/* 智能识别: .bili-view (直播) 或 .h3 (创作者) */
/* ========================================= */
ai ph ap:focus:has(.h3) vw, ai ph ap:focus-within:has(.h3) vw, ai ph ap:focus vw.bili-view, ai ph ap:focus-within vw.bili-view { background: #f8fafc !important; }
ai .bili-view hd, ai ph hd.h3 { background: #00aeec !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important; }
ai .bili-view bx, ai ph hd.h3 ~ sc bx { border-color: #e0f2fe !important; }
ai .bili-view bx>b, ai .bili-view .danmaku-area > b, ai ph hd.h3 ~ sc bx > b { color: #00aeec !important; border-bottom-color: #e0f2fe !important; }
ai .bili-view g i b, ai ph hd.h3 ~ sc bx g i b { color: #fb7299 !important; } 
ai ph ap:has(.c3) ic { background: #00aeec !important; } 

/* ========================================= */
/* [自动注入] Pornhub 限制级暗夜风主题体系      */
/* 智能识别: .ph-view (直播) 或 .h4 (创作者)  */
/* ========================================= */
ai ph ap:focus:has(.h4) vw, ai ph ap:focus-within:has(.h4) vw, ai ph ap:focus vw.ph-view, ai ph ap:focus-within vw.ph-view { background: #121212 !important; }
ai ph vw:has(.h4)::before, ai .ph-view::before { color: #64748b !important; }
ai .ph-view hd, ai ph hd.h4 { background: #000000 !important; color: #ff9000 !important; border-bottom: 2px solid #ff9000 !important; box-shadow: 0 2px 10px rgba(255,144,0,0.2) !important; }
ai .ph-view bx, ai ph hd.h4 ~ sc bx { background: #1c1c1c !important; border: 1px solid #333 !important; color: #e5e5e5 !important; }
ai .ph-view bx>b, ai .ph-view .danmaku-area > b, ai ph hd.h4 ~ sc bx > b { color: #ff9000 !important; border-bottom-color: #333 !important; }
ai .ph-view g i, ai ph hd.h4 ~ sc bx g i { color: #e5e5e5 !important; border-bottom-color: #333 !important; }
ai .ph-view g i b, ai ph hd.h4 ~ sc bx g i b { color: #ff9000 !important; font-weight: bold !important; } 
ai .ph-view g i:hover, ai ph hd.h4 ~ sc bx g i:hover { background: #2a2a2a !important; border-color:transparent !important; }
ai ph hd.h4 ~ sc bx p, ai ph hd.h4 ~ sc bx span { color: #e5e5e5 !important; }
ai ph ap:has(.c4) ic { background: #000000 !important; color:#ff9000 !important; border: 1px solid #333; } 

/* ========================================= */
/* 直播大屏组件与究极弹幕防污染               */
/* ========================================= */
ai .live-scrn { padding: 0; border: 1px solid #334155; height: 180px; display: flex; flex-direction: column; overflow: hidden; position: relative; border-radius: 12px; background-size: cover; background-position: center; margin-bottom: 10px; }
ai .live-scrn lv-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 13px; position: absolute; top: 0; left: 0; right: 0; z-index: 1; }
ai .danmaku-area { margin-top: 8px; }
ai .danmaku-area > b { font-size: 14px; display: block; margin-bottom: 8px; font-weight: 600; }
ai .danmaku-area lv-dm { display: block; max-height: 160px; overflow-y: auto; padding: 8px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
ai .danmaku-area lv-dm::-webkit-scrollbar { width: 5px; } ai .danmaku-area lv-dm::-webkit-scrollbar-track { background: transparent; } ai .danmaku-area lv-dm::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.5); border-radius: 3px; }

/* B站 画面与弹幕 */
ai .bili-scrn { border: 2px solid #00aeec; background: linear-gradient(135deg, #00aeec, #fb7299) !important; }
ai .bili-scrn lv-top { background: linear-gradient(to bottom, rgba(0,174,236,0.9), transparent) !important; }
ai .bili-scrn lv-id, ai .bili-scrn lv-hot { color: #fff; font-weight: 600; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
ai .bili-dm { background: #ffffff !important; border: 1px solid #e0f2fe !important; }
ai .bili-dm d, ai .bili-dm p { display: block; padding: 4px 6px; border-radius: 6px; margin-bottom: 2px; transition: background 0.2s; background: transparent !important; word-break: break-all; box-shadow: none !important; }
ai .bili-dm d:hover, ai .bili-dm p:hover { background: #f1f5f9 !important; }
ai .bili-dm d:nth-child(4n+1) b { color: #0ea5e9; } ai .bili-dm d:nth-child(4n+2) b { color: #ec4899; } ai .bili-dm d:nth-child(4n+3) b { color: #f59e0b; } ai .bili-dm d:nth-child(4n) b { color: #10b981; }
ai .bili-dm .gift { background: rgba(236,72,153,0.1) !important; color: #ec4899 !important; font-weight: bold; text-align: center; border-radius: 12px; padding: 4px 8px; border: 1px solid rgba(236,72,153,0.2); margin: 4px 0; }

/* PH 画面与弹幕级穿透修复 */
ai .ph-scrn { border: 2px solid #333 !important; background: #000000 !important; }
ai .ph-scrn lv-top { background: linear-gradient(to bottom, rgba(255,144,0,0.4), transparent) !important; }
ai .ph-scrn lv-id, ai .ph-scrn lv-hot { color: #fff !important; font-weight: bold; text-shadow: 1px 1px 2px #000; }
ai .ph-dm { background: #0a0a0a !important; border: 1px solid #333 !important; }
ai .ph-dm, ai .ph-dm *, ai .ph-dm p, ai .ph-dm span, ai .ph-dm d, ai .ph-dm div { color: #e5e5e5 !important; background-color: transparent !important; box-shadow: none !important; }
ai .ph-dm d, ai .ph-dm p { display: block; border-bottom: 1px dashed #2a2a2a !important; padding: 6px 4px !important; margin:0 !important; word-break: break-word; }
ai .ph-dm b, ai .ph-dm strong { color: #ff9000 !important; background-color: transparent !important; margin-right: 4px; }
ai .ph-dm .gift, ai .ph-dm .gift *, ai .ph-dm .gift p { color: #000 !important; background-color: #ff9000 !important; font-weight: 900 !important; text-align: center !important; border-radius: 4px !important; padding: 4px 8px !important; margin: 6px 0 !important; text-transform: uppercase !important; box-shadow: 0 0 8px rgba(255,144,0,0.3) !important; border:none !important; text-shadow: none !important; }

/* ========================================= */
/* [修复版] Secret Mall 商城卡片强制穿透与全屏覆盖 */
/* ========================================= */
ai ph .c9, ai ph .h9 { background: linear-gradient(135deg, #ff4757, #ff6b81) !important; } 

/* 核心修复1：当详情页展开时，自动锁死外层列表的滚动轴，彻底解决底部漏出问题 */
ai ph sc:has(cc:focus-within), ai ph sc:has(cc:focus) { overflow: hidden !important; }

/* 核心修复2：重塑详情页容器，使其脱离父级视口限制，获得独立全屏滚动权 */
ai ph cb { position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important; overflow-y: auto !important; z-index: 100 !important; background: #f1f5f9 !important; box-sizing: border-box !important; }

/* 核心修复3：强制击穿 Markdown 的降级干扰，赋予卡片最高权重的弹性盒子属性 */
ai ph cb gdi, ai ph cb > p { display: flex !important; flex-direction: column !important; background: #ffffff !important; border-radius: 8px !important; padding: 12px !important; margin-bottom: 10px !important; border: 1px solid #f1f5f9 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important; position: relative !important; font-style: normal !important;}
ai ph cb gdi b { font-size: 14px !important; color: #1e293b !important; margin-bottom: 6px !important; font-weight: 700 !important; line-height: 1.4 !important; display: block !important;}
ai ph cb gdi pr { font-size: 16px !important; color: #ff4757 !important; font-weight: 800 !important; margin-bottom: 6px !important; display: block !important; }
ai ph cb gdi i { font-size: 12px !important; color: #64748b !important; font-style: normal !important; line-height: 1.5 !important; margin-bottom: 8px !important; display: block !important; }
ai ph cb gdi u { font-size: 12px !important; color: #475569 !important; background: #f8fafc !important; padding: 8px !important; border-radius: 6px !important; text-decoration: none !important; display: flex !important; gap: 6px !important; align-items: flex-start !important; border: 1px dashed #e2e8f0 !important; line-height: 1.4 !important; }
ai ph cb gdi u span { background: #ff4757 !important; color: #fff !important; padding: 2px 5px !important; border-radius: 4px !important; font-size: 10px !important; font-weight: bold !important; flex-shrink: 0 !important; box-shadow: 0 1px 3px rgba(255,71,87,0.3) !important; display: inline-block !important;}

/* ========================================= */
/* [绝杀补丁] 详情页全屏覆盖防漏底机制       */
/* ========================================= */
/* 当任意列表项展开时，强制隐藏其他兄弟列表项，彻底抹杀滚动条溢出与漏底现象 */
ai ph sc:has(cc:focus-within) cc:not(:focus-within),
ai ph sc:has(cc:focus) cc:not(:focus) {
    display: none !important;
}
/* 确保详情页高度撑满整个列表容器 */
ai ph cb { min-height: 100% !important; }

/* 1. 修复：标签 <lbl> 独占一行并让文字两端对齐 */
ai ph lbl {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 13px !important;
    color: #475569 !important;
    margin-bottom: 4px !important;
    font-weight: 600 !important;
}

/* 2. 修复：进度条底槽 <pb> 赋予高度和灰色底色 */
ai ph pb {
    display: block !important;
    width: 100% !important;
    height: 8px !important; /* 这里控制进度条的粗细 */
    background: #e2e8f0 !important; /* 底槽的浅灰色 */
    border-radius: 4px !important;
    margin-bottom: 15px !important; /* 进度条与下方内容的间距 */
    overflow: hidden !important;
}

/* 3. 修复：进度条填充 <pf> 赋予高度，使其能显示您 HTML 中的渐变色 */
ai ph pf {
    display: block !important;
    height: 100% !important;
    border-radius: 4px !important;
    transition: width 0.3s ease !important; /* 添加平滑变动的动画效果 */
}

/* 浅粉色系行动选项面板 */
ai acts { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
  background: #fffbfa; /* 极浅的暖粉白背景 */
  padding: 15px; 
  border-radius: 12px; 
  border: 1px solid #fce7f3; /* 浅粉色边框 */
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.08); /* 淡淡的粉色光晕阴影 */
  margin-bottom: 20px; 
}
ai acts hd { 
  display: block; 
  font-size: 14px; 
  font-weight: bold; 
  color: #be185d; /* 深玫瑰粉，确保文字清晰度 */
  border-bottom: 2px solid #fce7f3; 
  padding-bottom: 8px; 
  margin-bottom: 5px; 
}
ai acts act { 
  display: block; 
  padding: 10px; 
  background: #fdf2f8; /* 浅粉色卡片底色 */
  border-radius: 8px; 
  font-size: 13px; 
  color: #831843; /* 深粉黑色字体，阅读不费力 */
  border-left: 3px solid #f472b6; /* 亮粉色左侧指示条 */
  transition: all 0.2s; 
  cursor: pointer; 
  margin: 0 !important; /* 强制重置外边距，彻底杜绝平台乱加间距 */
}
ai acts act b { 
  color: #9d174d; /* 强调文字使用更深的粉色 */
}
ai acts act:hover { 
  background: #fce7f3; /* 悬停时加深粉色 */
  border-left-color: #db2777; /* 悬停时指示条变深 */
  transform: translateX(2px); 
}

sec { display: none; }

/* =========================================
   【浅粉少女心】聊天框美化主题
   ========================================= */

/* 1. 统一气泡框背景：浅粉色渐变与柔和投影 */
.group.is-user > div:first-child, 
.group.is-assistant > div:first-child {
    background: linear-gradient(135deg, #FFF0F5 0%, #FFE4E1 100%) !important;
    border: 1px solid rgba(255, 182, 193, 0.5) !important;
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.15) !important;
    border-radius: 18px !important;
}

/* 2. 【最高优先级】深色文字以确保浅色背景上的绝对可读性 */
.rili-markdown-renderer, 
.rili-markdown-renderer * {
    color: #4A3A3E !important; /* 优雅的深褐红色 */
}

/* 3. 底部附加元素与操作按钮颜色自适应适配 */
.text-xs.font-mono.text-muted-foreground {
    color: #D18E9D !important;
}
.bg-muted.rounded.flex {
    background-color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 182, 193, 0.3) !important;
}
.bg-muted.rounded.flex button svg.lucide {
    stroke: #D18E9D !important;
}

/* =========================================
   现代化少女烧烤加载动效 3.0 - 终极脱框悬浮版
   (彻底根除背景叠加与切字错位问题)
   ========================================= */

/* 1. 精确抹杀平台原生的跳动加载点 */
.flex.gap-2.w-full.h-full.items-center.justify-center > span { 
    display: none !important; 
}

/* 2. 释放主容器枷锁：取消所有试图改变气泡大小的危险属性 */
.flex.gap-2.w-full.h-full.items-center.justify-center {
    position: relative !important; /* 建立新的坐标系锚点 */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    min-width: 32px !important; /* 给原生的粉色方块留一点呼吸空间 */
    background: transparent !important;
    overflow: visible !important; /* 终极核心指令：强制允许我们的文字溢出方块边界！ */
}

/* 3. 内核引擎：保留在粉色方块内的精致双色旋转环 */
.flex.gap-2.w-full.h-full.items-center.justify-center::before {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    border: 3px solid rgba(255, 105, 180, 0.15) !important;
    border-top-color: #FF69B4 !important; /* 热粉主轨道 */
    border-right-color: #FFB6C1 !important; /* 浅粉辅轨道 */
    animation: spin-core 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite !important;
}

/* 内核旋转动画 */
@keyframes spin-core { 
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); } 
}

/* 4. 越界流光字幕：绝对脱离原气泡束缚，悬浮向右伸展 */
.flex.gap-2.w-full.h-full.items-center.justify-center::after {
    content: "少女正在努力烧烤..." !important;
    position: absolute !important; /* 脱离文档流 */
    /* 重点：利用 calc 计算，让文字永远出现在气泡的最右侧边缘外 + 10px 间距处 */
    left: calc(100% + 10px) !important; 
    white-space: nowrap !important; /* 绝对禁止换行 */
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    
    /* 依然保留极具质感的现代流光文字技术 */
    background: linear-gradient(110deg, #FF69B4 0%, #FFA07A 50%, #FF69B4 100%) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    
    /* 增加一层极淡的发光阴影，让悬浮的文字脱离背景具有立体感 */
    filter: drop-shadow(0 2px 5px rgba(255, 105, 180, 0.12)) !important;
    
    animation: shimmer-text 2s linear infinite !important;
}

/* 流光循环动画 */
@keyframes shimmer-text { 
    to { background-position: 200% center; } 
}

/* 1. 基础容器与重置平台可能注入的换行空隙 */
ai ph g i { 
    display: block; 
    font-size: 13px; 
    color: #475569; 
    padding: 8px 4px; 
    border-bottom: 1px dashed #fce7f3; 
    line-height: 1.5; 
    outline: none; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    position: relative; 
    word-break: break-word; 
}

/* 抵消AI生成空行带来的巨大间隙 */
ai ph g i p {
    margin: 0 !important;
    padding: 0 !important;
}

ai ph g i > b, ai ph g i p > b { 
    color: #be185d; 
    pointer-events: none; 
}

/* 2. 交互反馈 (悬浮或点击时背景变色防抖动) */
ai ph g i:hover,
ai ph g i:focus, 
ai ph g i:focus-within { 
    background: #fdf2f8; 
    border-radius: 6px; 
    border-bottom-color: transparent; 
}

/* 3. 核心修复：使用 !important 暴力压制平台 Markdown 默认样式，确保默认隐藏且不倾斜 */
ai ph g i .dev { 
    display: block !important; 
    max-height: 0 !important; 
    opacity: 0 !important; 
    overflow: hidden !important; 
    font-size: 12px !important; 
    background: #fce7f3 !important; 
    border-radius: 6px !important; 
    padding: 0 8px !important; 
    margin-top: 0 !important; 
    color: #831843 !important; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important; 
    box-sizing: border-box !important; 
    pointer-events: none !important; 
    border: 1px solid transparent !important; 
    font-style: normal !important; /* 强制消除截图里那种丑陋的自动斜体 */
}

/* 内部 span 标签美化 */
ai ph g i .dev span { 
    font-weight: bold !important; 
    color: #db2777 !important; 
    background: #fbcfe8 !important; 
    padding: 1px 4px !important; 
    border-radius: 3px !important; 
    margin-right: 4px !important; 
}

/* 4. 展开动画 (悬浮或点击时完全展开，极大放宽高度限制) */
ai ph g i:hover .dev,
ai ph g i:focus .dev, 
ai ph g i:focus-within .dev { 
    max-height: 1000px !important; /* 拉高到 1000px，确保无论写多少小作文都不会被截断 */
    opacity: 1 !important; 
    padding: 8px !important; 
    margin-top: 8px !important; 
    border-color: #fbcfe8 !important; 
}