/* ============================================================
   天枢 TIANSHU · v3 设计系统
   色彩即语义：深海军蓝=底座 / 蓝=品牌 / 金=资金 / 如意橙=智能体
   分身三色：客服#4DA3FF · 调度#F5B841 · 星探#A78BFA
   动效基调：Apple 克制流（发光、浮起、脉冲、扫光，全部 GPU 合成）
   ============================================================ */
:root {
  --navy-900: #071431;
  --navy-800: #0A1F44;
  --navy-700: #10294D;
  --blue: #2E7DF6;
  --blue-bright: #4DA3FF;
  --gold: #F5B841;
  --ruyi: #FF9E5E;
  --purple: #A78BFA;
  --silver: #E8EEF7;
  --dim: #9FB3D1;
  --line: rgba(232, 238, 247, 0.12);
  --ok: #34D399;
  --r-card: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(46,125,246,.18), transparent 60%),
    radial-gradient(900px 400px at -10% 20%, rgba(245,184,65,.07), transparent 55%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  background-attachment: fixed;
  color: var(--silver); min-height: 100vh; padding-bottom: 76px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(7,20,49,0.72); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.45); animation: logoShine 4.5s ease-in-out infinite; }
@keyframes logoShine { 0%,72%,100% { filter: brightness(1); } 86% { filter: brightness(1.4) drop-shadow(0 0 8px rgba(77,163,255,.9)); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: .5px; }
.brand-text span { font-size: 10.5px; color: var(--blue-bright); opacity: .85; letter-spacing: 1px; }
.stat-chip { font-size: 11.5px; background: rgba(46,125,246,.16); border: 1px solid var(--line); padding: 5px 10px; border-radius: 20px; white-space: nowrap; }

main { padding: 16px; max-width: 720px; margin: 0 auto; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
h2 { font-size: 19px; margin: 4px 0 8px; }
h3.sec-title { font-size: 15px; margin: 20px 0 10px; display: flex; align-items: baseline; gap: 8px; }
h3.sec-title small { font-size: 11px; color: var(--dim); font-weight: 400; }
.hint { font-size: 12px; color: var(--dim); margin: 4px 0 12px; line-height: 1.6; }

/* ---------- Hero：城市低空大脑 ---------- */
.card-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 24px 20px;
  background: linear-gradient(135deg, #0D2C63 0%, #0A1F44 55%, #123B7E 100%);
  border: 1px solid rgba(77,163,255,.25);
  box-shadow: 0 14px 40px rgba(4,12,32,.55), inset 0 1px 0 rgba(255,255,255,.08);
}
.card-hero h1 { margin: 0 0 8px; font-size: 24px; letter-spacing: 1px; }
.card-hero p { margin: 0; font-size: 13px; color: #B9CCEF; line-height: 1.8; }
.hero-status {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 12px; color: #CDE3FF; background: rgba(77,163,255,.14);
  border: 1px solid rgba(77,163,255,.35); padding: 6px 12px; border-radius: 20px;
}
.hero-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: blink 1.6s ease infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero-rings { position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; pointer-events: none; }
.hero-rings i {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(77,163,255,.35); animation: radar 3.2s ease-out infinite;
}
.hero-rings i:nth-child(2) { animation-delay: 1.05s; }
.hero-rings i:nth-child(3) { animation-delay: 2.1s; }
@keyframes radar { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.stat-grid.four { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 12px 8px; text-align: center;
}
.stat-card b.num { display: block; font-size: 20px; color: var(--blue-bright); }
.stat-card span { font-size: 11px; color: var(--dim); }
.stat-card.gold b.num { color: var(--gold); }

/* ---------- 快捷操作 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick {
  background: rgba(245,184,65,.07); border: 1px solid rgba(245,184,65,.3); border-radius: var(--r-card);
  color: var(--silver); padding: 14px 6px; font-size: 13px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .15s ease, background .2s ease;
}
.quick span { font-size: 22px; }
.quick:active { transform: scale(.93); }
.quick:hover { background: rgba(245,184,65,.14); }

/* ---------- 卡片 ---------- */
.card-list { display: grid; gap: 12px; }
.card {
  background: rgba(255,255,255,.045); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 15px; }
.card .meta { font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.tab-pane.active .card { animation: rise .4s cubic-bezier(.2,.8,.25,1) backwards; }
.tab-pane.active .card:nth-child(2) { animation-delay: .05s; }
.tab-pane.active .card:nth-child(3) { animation-delay: .1s; }
.tab-pane.active .card:nth-child(4) { animation-delay: .15s; }
.tab-pane.active .card:nth-child(5) { animation-delay: .2s; }
.tab-pane.active .card:nth-child(6) { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.badge { font-size: 11px; padding: 2px 9px; border-radius: 20px; display: inline-block; }
.b-pending { background: rgba(245,184,65,.16); color: var(--gold); }
.b-active { background: rgba(77,163,255,.18); color: var(--blue-bright); }
.b-completed { background: rgba(52,211,153,.16); color: var(--ok); }
.b-released { background: rgba(232,238,247,.14); color: var(--silver); }

button.act, .quick, .agent-input button, .chip, .agent-suggest button, .fab {
  position: relative; overflow: hidden;
  transition: transform .13s ease, box-shadow .2s ease, filter .2s ease;
}
button.act {
  margin-top: 8px; background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  color: #fff; border: 0; padding: 9px 16px; border-radius: 11px; font-size: 13px; cursor: pointer;
  box-shadow: 0 5px 16px rgba(46,125,246,.35);
}
button.act::after, .gold-btn::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); animation: shine 3s ease-in-out infinite;
}
@keyframes shine { 0%,62% { left: -80%; } 100% { left: 130%; } }
button.act:active, .quick:active { transform: scale(.93); filter: brightness(1.2); }
.gold-btn { background: linear-gradient(135deg, #E8A62B, var(--gold)); color: #1A1205; font-weight: 600; }

.row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.row:last-child { border-bottom: 0; }

/* 待抢单：呼吸金光 */
.card:has(.b-pending) { border-color: rgba(245,184,65,.45); animation: goldGlow 2s ease-in-out infinite; }
@keyframes goldGlow { 0%,100% { box-shadow: 0 0 0 rgba(245,184,65,0); } 50% { box-shadow: 0 0 18px rgba(245,184,65,.3); } }

/* ---------- 商城筛选 ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.chip {
  white-space: nowrap; background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--silver); border-radius: 18px; padding: 7px 14px; font-size: 12.5px; cursor: pointer;
}
.chip.active { background: rgba(77,163,255,.2); border-color: var(--blue-bright); color: var(--blue-bright); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 62px; display: flex;
  background: rgba(7,20,49,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; background: none; border: 0; color: #7E93B5; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: 11px; cursor: pointer;
  transition: transform .15s ease, color .2s ease;
}
.tab span { font-size: 19px; }
.tab:active { transform: scale(.86); }
.tab.active { color: var(--blue-bright); text-shadow: 0 0 14px rgba(77,163,255,.8); }
.tab.active span { animation: bounce .45s cubic-bezier(.2,.8,.25,1); display: inline-block; }
@keyframes bounce { 0% { transform: translateY(0) } 42% { transform: translateY(-6px) } 100% { transform: translateY(0) } }

/* ---------- 如意 ---------- */
.fab {
  position: fixed; right: 16px; bottom: 78px; width: 58px; height: 58px; border-radius: 50%; padding: 4px;
  background: rgba(14,33,64,.5); border: 1.5px solid rgba(255,158,94,.7); cursor: pointer;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);   /* 磨砂玻璃质感 */
  box-shadow: 0 6px 20px rgba(255,150,60,.45); z-index: 30; overflow: hidden;
  animation: ruyiPulse 2.4s ease-in-out infinite;
}
.fab img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.fab:active { transform: scale(.9); }
@keyframes ruyiPulse {
  0%,100% { box-shadow: 0 6px 18px rgba(255,150,60,.4), 0 0 0 0 rgba(255,158,94,.35); }
  50% { box-shadow: 0 8px 26px rgba(255,150,60,.6), 0 0 0 12px rgba(255,158,94,0); }
}
.ruyi-head { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,158,94,.6); }
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; height: 80vh;
  background: rgba(7,20,49,.72); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);  /* 磨砂玻璃 */
  border-top: 1px solid rgba(255,158,94,.35); border-radius: 20px 20px 0 0; z-index: 40;
  display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.2,.8,.25,1);
  box-shadow: 0 -18px 50px rgba(0,0,0,.5);
}
.drawer.hidden { transform: translateY(102%); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.head-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.head-text strong { font-size: 15px; }
.head-text span { font-size: 11px; color: var(--dim); }
.drawer-head .x { background: none; border: 0; color: var(--silver); font-size: 24px; cursor: pointer; }
.agent-chips { display: flex; gap: 8px; padding: 10px 14px 0; }
.agent-chips button {
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--silver);
  border-radius: 16px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.agent-chips button[data-agent] { border-color: color-mix(in srgb, var(--c) 55%, transparent); color: var(--c); }
.agent-chips button:active { transform: scale(.93); }
.agent-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 13px; font-size: 14px; line-height: 1.6; animation: rise .25s ease backwards; }
.msg .who { font-size: 11px; opacity: .75; margin-bottom: 3px; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.agent-suggest { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 8px; }
.agent-suggest button { white-space: nowrap; background: rgba(46,125,246,.12); border: 1px solid var(--line); color: var(--silver); border-radius: 16px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.agent-input { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.agent-input input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 11px; padding: 10px; color: var(--silver); outline: none; }
.agent-input input:focus { border-color: rgba(255,158,94,.6); }
.agent-input button { background: var(--blue); color: #fff; border: 0; border-radius: 11px; padding: 0 15px; cursor: pointer; }
#agentMic { background: rgba(255,255,255,.07); font-size: 15px; }
#agentMic.rec { background: rgba(255,90,90,.4); animation: blink 1s infinite; }
.agent-foot { font-size: 10.5px; color: #6F86A8; text-align: center; padding-bottom: 10px; }
.hidden { display: none; }
.foot-links { text-align: center; font-size: 13px; margin: 18px 0; }
.foot-links a { color: var(--blue-bright); text-decoration: none; }

/* ============================================================
   v4 追加层：身份体系 / 反馈闭环 / 放大镜按键 / 悬浮球拖动
   ============================================================ */

/* 按键 = 放大镜确认（按下放大 + 光圈，替代缩小跳动） */
button.act:active, .quick:active, .chip:active, .agent-input button:active,
.agent-suggest button:active, .role-chips button:active {
  transform: scale(1.12);
  filter: brightness(1.18);
  box-shadow: 0 0 0 5px rgba(77,163,255,.22), 0 6px 20px rgba(46,125,246,.4);
  z-index: 2;
}
.gold-btn:active { box-shadow: 0 0 0 5px rgba(245,184,65,.25), 0 6px 20px rgba(245,184,65,.4); }
.tab:active span { transform: scale(1.3); display: inline-block; }

/* 悬浮球拖动定位（JS 会改 left/top） */
.fab { touch-action: none; }
.fab:active { transform: scale(1.1); }

/* 身份切换 */
.role-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.role-chips button {
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--silver);
  border-radius: 12px; padding: 10px 4px; font-size: 12.5px; cursor: pointer;
}
.role-chips button.active {
  background: rgba(77,163,255,.18); border-color: var(--blue-bright); color: var(--blue-bright);
  box-shadow: 0 0 12px rgba(77,163,255,.3);
}

/* 发单表单 */
.form-grid { display: grid; gap: 8px; margin: 8px 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-grid input, .form-grid select {
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; color: var(--silver); font-size: 13px; outline: none; width: 100%;
}
.form-grid input:focus, .form-grid select:focus { border-color: rgba(245,184,65,.6); }
.form-grid select option { color: #0A1F44; }

/* 迷你开关 */
.mini-toggle {
  background: rgba(77,163,255,.18); border: 1px solid var(--blue-bright); color: var(--blue-bright);
  border-radius: 14px; padding: 4px 14px; font-size: 12px; cursor: pointer;
}

/* v5 声控模式 */
.agent-chips button.on {
  background: rgba(52,211,153,.2); border-color: var(--ok); color: var(--ok);
  box-shadow: 0 0 10px rgba(52,211,153,.35);
}
.fab.listening { border-color: rgba(52,211,153,.85); animation: ruyiListen 1.6s ease-in-out infinite; }
@keyframes ruyiListen {
  0%,100% { box-shadow: 0 6px 18px rgba(52,211,153,.4), 0 0 0 0 rgba(52,211,153,.35); }
  50% { box-shadow: 0 8px 26px rgba(52,211,153,.6), 0 0 0 14px rgba(52,211,153,0); }
}

/* ============================================================
   v6 声控三态可视化：一眼分清 待命/聆听/说话/关闭
   ============================================================ */
.fab { overflow: visible; }

/* ① 声控待命：青色旋环（虚线环旋转 = 在听唤醒词） */
.fab.voice-standby { border-color: rgba(34,211,238,.9); }
.fab.voice-standby::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px dashed rgba(34,211,238,.85);
  animation: fabSpin 3s linear infinite;
}
@keyframes fabSpin { to { transform: rotate(360deg); } }

/* ② 对话聆听：绿色急促呼吸（= 正在听你说话） */
.fab.listening {
  border-color: rgba(52,211,153,.95);
  animation: fabListen 1s ease-in-out infinite;
}
@keyframes fabListen {
  0%,100% { box-shadow: 0 6px 18px rgba(52,211,153,.45), 0 0 0 0 rgba(52,211,153,.4); }
  50% { box-shadow: 0 8px 26px rgba(52,211,153,.7), 0 0 0 12px rgba(52,211,153,0); }
}

/* ③ 朗读说话：橙色声浪（= 如意在开口回答） */
.fab.speaking {
  border-color: rgba(255,158,94,.95);
  animation: fabSpeak .7s ease-in-out infinite;
}
@keyframes fabSpeak {
  0%,100% { box-shadow: 0 6px 18px rgba(255,158,94,.4); transform: scale(1); }
  50% { box-shadow: 0 10px 30px rgba(255,158,94,.8), 0 0 0 16px rgba(255,158,94,0); transform: scale(1.06); }
}

/* 状态徽标：声控开启时常亮小青点 */
.fab.voice-standby i, .fab.listening i {
  position: absolute; top: -2px; right: -2px; width: 12px; height: 12px;
  border-radius: 50%; background: #22D3EE; border: 2px solid #0A1F44;
}
.fab.listening i { background: #34D399; }

/* ============================================================
   v8 应用内升级：版本徽标 + 一键升级弹窗（平时隐藏）
   ============================================================ */
.ver-badge {
  margin-left: 6px; padding: 2px 8px; border-radius: 10px;
  background: rgba(77,163,255,.15); border: 1px solid rgba(77,163,255,.4);
  color: var(--blue-bright); font-size: 10.5px; font-weight: 700;
  align-self: center; white-space: nowrap;
}
.update-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4,12,30,.78); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
/* 关键修复：hidden 必须压过 display:flex（否则透明蒙层会挡住全屏点击） */
.update-mask.hidden { display: none !important; }
.update-card {
  width: min(88vw, 340px); background: linear-gradient(160deg, #0E2A57, #071431);
  border: 1px solid rgba(77,163,255,.45); border-radius: 20px;
  padding: 26px 22px; text-align: center; color: var(--silver);
  animation: updatePop .45s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 40px rgba(77,163,255,.18);
}
@keyframes updatePop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.update-icon { font-size: 42px; margin-bottom: 6px; }
.update-card h3 { margin: 4px 0 8px; font-size: 18px; }
.update-card p { font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.6; }
.update-later {
  display: block; margin: 10px auto 0; background: none; border: 0;
  color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: underline;
}

/* v8.1 升级反馈：进度条 / 按钮升级态 / 版本徽标红点 */
.update-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin: 4px 0 6px; }
.update-bar i { display: block; height: 100%; width: 35%; border-radius: 6px;
  background: linear-gradient(90deg, var(--blue-bright), var(--gold)); animation: barSlide 1.1s ease-in-out infinite; }
@keyframes barSlide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
#updateGo.upgrading { opacity: .85; pointer-events: none; filter: saturate(1.3); }
.ver-badge { cursor: pointer; }
.ver-badge.pend { border-color: rgba(255,158,94,.85); color: #FF9E5E; position: relative; }
.ver-badge.pend::after { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: #FF9E5E; border: 2px solid #071431; animation: pendBlink 1.2s infinite; }
@keyframes pendBlink { 50% { opacity: .25; } }

/* ===== v8.6 交互反馈系统 ===== */
/* 思考三点跳动动画 */
.thinking-msg .dots, #thinkDot .dots { display: flex; align-items: center; gap: 5px; color: var(--dim); font-size: 13px; }
#thinkDot .dots i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; animation: dotJump 1s infinite; }
#thinkDot .dots i:nth-child(1) { background: #FF9E5E; }
#thinkDot .dots i:nth-child(2) { background: #F5B841; animation-delay: .15s; }
#thinkDot .dots i:nth-child(3) { background: #4DA3FF; animation-delay: .3s; }
#thinkDot .dots span { margin-left: 4px; }
@keyframes dotJump { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* 状态大气泡（聆听/说话/待命 3 秒提示） */
#voiceBubble {
  position: fixed; left: 50%; bottom: 150px; z-index: 60;
  transform: translateX(-50%) translateY(14px) scale(.92);
  max-width: 78vw; padding: 13px 20px; border-radius: 18px;
  background: rgba(10, 25, 55, .72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(120, 180, 255, .45);
  color: #EAF2FF; font-size: 15px; line-height: 1.55; text-align: center;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: .28s cubic-bezier(.2, .8, .25, 1);
}
#voiceBubble.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* 按键说明气泡（长按 0.5 秒弹出） */
.key-tip {
  position: fixed; z-index: 70; max-width: 250px; padding: 10px 13px; border-radius: 12px;
  background: rgba(8, 20, 45, .94); border: 1px solid rgba(120, 180, 255, .5);
  color: #EAF2FF; font-size: 13px; line-height: 1.55;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .55); pointer-events: none;
  animation: keyTipIn .18s ease-out;
}
@keyframes keyTipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* 头像说话/思考时闪烁脉冲 */
#fabAvatar.pulse, #ruyiHeadAvatar.pulse { animation: avatarPulse 1.1s ease-in-out infinite; }
@keyframes avatarPulse { 0%, 100% { filter: brightness(1); transform: scale(1); } 50% { filter: brightness(1.4); transform: scale(1.07); } }

/* 聆听光环随真实音量呼吸（麦克风收到声音时肉眼可见） */
.fab.listening { box-shadow: 0 0 0 calc(4px + var(--micLv, 0) * 12px) rgba(52, 211, 153, .32), 0 6px 22px rgba(52, 211, 153, .5); transition: box-shadow .1s linear; }

/* ===== v8.7：语音浮层 / 消息操作 / 长按说明 ===== */
/* 语音浮层：长按如意或点麦克风后，在当前页面直接语音交互（不跳转） */
.voice-panel {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 55;
  width: min(92vw, 460px); padding: 12px 14px 10px;
  background: rgba(10, 25, 55, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(120, 180, 255, .5); border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55); color: #EAF2FF;
}
.voice-panel .vp-head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #9FD9C9; margin-bottom: 8px; }
.voice-panel .vp-dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; animation: blink 1.2s infinite; }
.voice-panel .vp-body { font-size: 14.5px; line-height: 1.6; min-height: 22px; max-height: 38vh; overflow-y: auto; }
.voice-panel .vp-body .vp-you { color: #CDE3FF; }
.voice-panel .vp-body .vp-bot { color: #FFF; }
.voice-panel .vp-actions { display: flex; gap: 8px; margin-top: 10px; }
.voice-panel .vp-actions button {
  flex: 1; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); color: #EAF2FF;
  border-radius: 12px; padding: 9px 0; font-size: 13px; cursor: pointer;
}
.voice-panel .vp-actions button:active { transform: scale(.95); filter: brightness(1.2); }

/* 消息操作：复制 / 朗读 / 详情（每条如意回答标配，对标主流智能体） */
.msg-actions { display: flex; gap: 6px; margin-top: 8px; }
.msg-act {
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--dim);
  border-radius: 10px; padding: 4px 10px; font-size: 11.5px; cursor: pointer;
}
.msg-act:active { transform: scale(.94); filter: brightness(1.25); color: var(--blue-bright); }
.msg-meta { margin-top: 8px; padding: 8px 10px; font-size: 11px; color: var(--dim);
  background: rgba(255, 255, 255, .04); border-radius: 10px; line-height: 1.5; }

/* 长按说明：禁止系统菜单/选中，确保 iOS 长按能弹出说明气泡 */
[data-tip] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }

/* ================= v8.8：大字模式 / 背景虚化 / 头像 / 品牌展示 / 宣传片 ================= */
/* 对话/语音/品牌页打开时，主页背景整体虚化，焦点集中在如意 */
body.ui-dim #view, body.ui-dim .topbar, body.ui-dim .tabbar {
  filter: blur(6px) saturate(.85);
  pointer-events: none;
  user-select: none;
  transition: filter .35s ease;
}
/* 如意回复大字模式：先放大清晰展示约5秒再回常规字号 */
.msg-row { display: flex; gap: 8px; align-items: flex-start; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; border: 2px solid rgba(255,158,94,.45); object-fit: cover; background:#12233f; }
.msg-main { flex: 1 1 auto; min-width: 0; }
.msg-body.big-text {
  font-size: 1.22em;
  line-height: 1.5;
  transform: scale(1.04);
  transform-origin: left top;
  transition: all .8s ease;
  text-shadow: 0 0 1px rgba(255,255,255,.15);
}
/* 点击放大镜反馈：所有可点按钮按下时有放大确认 */
button, .msg-act, .chip, .tab { -webkit-tap-highlight-color: transparent; }
button:active, .msg-act:active { transform: scale(1.12); transition: transform .12s ease; }
/* 品牌入口按钮 */
.brand-btn { margin-top: 12px; }
/* 宣传片首播浮层 */
.promo-mask {
  position: fixed; inset: 0; z-index: 1200;
  background: #000; display: flex; align-items: center; justify-content: center;
}
.promo-mask.hidden { display: none; }
#promoVideo { width: 100%; height: 100%; object-fit: contain; background: #000; }
.promo-skip {
  position: absolute; right: 14px; bottom: 26px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: 14px; backdrop-filter: blur(6px);
  animation: promoPulse 2s ease-in-out infinite;
}
@keyframes promoPulse { 0%,100% { opacity:.75 } 50% { opacity:1 } }
/* 品牌展示浮层：幻灯片 + BGM */
.brand-mask {
  position: fixed; inset: 0; z-index: 1100;
  background: linear-gradient(180deg, #071431 0%, #0a1f4d 100%);
  display: flex; flex-direction: column; padding: 14px;
}
.brand-mask.hidden { display: none; }
.brand-head { display: flex; justify-content: space-between; align-items: center; color: #dceaff; padding-bottom: 8px; }
.brand-head strong { font-size: 17px; }
.brand-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
#brandSlide {
  max-width: 100%; max-height: 100%;
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.55);
  object-fit: contain;
  animation: slideIn .8s ease;
}
@keyframes slideIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
.brand-actions { display: flex; gap: 10px; justify-content: center; padding-top: 12px; }
.brand-actions button {
  padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(120,180,255,.35);
  background: rgba(20,40,80,.7); color: #dceaff; font-size: 15px;
}

/* v8.9 品牌页正式二维码 */
.brand-qr { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 10px; }
.brand-qr img { width: 64px; height: 64px; border-radius: 10px; background: #fff; padding: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.brand-qr span { color: #9fc4f5; font-size: 13px; letter-spacing: .5px; }
