/* ===== 芊羽Wing 公共样式(全站共用,各页只留自己特有的内联样式)===== */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
/* 手机端双击不放大交互元素(不禁用双指缩放);键盘聚焦可见 */
a, button, input, .btn, .chip, .sug, .tb-btn, .copybtn, .gobtn, .chat-send, .chat-jump{ touch-action:manipulation; }
/* ⚠️ 这里**不能**写 border-radius —— 它改的是元素自身的形状,不是描边的形状。
   写了会把圆形浮钮、胶囊按钮在聚焦时压成 6px 圆角的方块(用户报过「浮动按钮变方形了」)。
   现代浏览器的 outline 本来就会自动沿着元素自己的 border-radius 走,不需要这一行。 */
a:focus-visible, button:focus-visible, input:focus-visible, .btn:focus-visible, .chip:focus-visible,
.sug:focus-visible, .chat-jump:focus-visible, .search input:focus-visible, .chat-input input:focus-visible{
  outline:2px solid var(--accent); outline-offset:2px; }
:root{
  --bg1:#f6f2ea; --bg2:#ece3d3;
  --card:rgba(255,255,255,.72); --border:rgba(0,0,0,.07);
  --text:#463a26; --muted:#6f6656; --accent:#a67c30;
  --btn:#ffffff; --btn-border:rgba(0,0,0,.08); --btn-hover:#faf5ea;
  --bar:rgba(241,236,226,.78); --bar-border:rgba(0,0,0,.06); --head-fade:rgba(241,236,226,.55);
  --accent-fill:#8c6724;   /* 实心控件底色:比 --accent 深,保证浅底白字 ≥4.5:1 */
  --accent-text:#7d5b1f;   /* 浅底上的金色「正文」:--accent 只有 3.7:1 不达标,这个 4.8:1 */
  --ring:#b58a3c; --bagua:rgba(120,96,40,.42); --tj-gold:#c2953f; --tj-deep:#e6d4ac;
}
[data-theme="dark"]{
  --bg1:#0e0d13; --bg2:#161320;
  --card:rgba(28,26,36,.6); --border:rgba(255,255,255,.08);
  --text:#cfc7b7; --muted:#8d857a; --accent:#c9a45f;
  --btn:rgba(40,37,50,.7); --btn-border:rgba(255,255,255,.09); --btn-hover:rgba(56,52,68,.85);
  --bar:rgba(19,17,26,.78); --bar-border:rgba(255,255,255,.07); --head-fade:rgba(19,17,26,.5);
  --accent-fill:var(--accent);   /* 深色主题用深字,对比已达标 */
  --accent-text:var(--accent);   /* 深底上浅金本就 ~7:1,无需压暗 */
  --ring:#d4af6a; --bagua:rgba(212,175,106,.5); --tj-gold:#d4af6a; --tj-deep:#4a3f2a;
}
html,body{ min-height:100%; }
body{
  font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--text);
  background:radial-gradient(120% 90% at 50% 0%, var(--bg2), transparent 60%), var(--bg1);
  min-height:100dvh; display:flex; flex-direction:column; align-items:center;
  padding:64px 16px 18px;
  transition:background .4s ease, color .4s ease;
}

/* ===== 背景氛围层(固定全屏,叠在底色之上、内容之下;深色·宇宙鸿荒 / 浅色·霞光流彩)===== */
body::before, body::after{ content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; }
/* 浅色·霞光流彩(往金色主题调过的柔和极光,克制不刺眼)*/
body::before{
  background:
    radial-gradient(45% 40% at 15% 16%, rgba(255,178,116,.15), transparent 70%),
    radial-gradient(50% 46% at 86% 22%, rgba(140,198,206,.13), transparent 72%),
    radial-gradient(55% 52% at 74% 86%, rgba(222,142,190,.11), transparent 72%);
  animation:bgDriftA 34s ease-in-out infinite alternate;
}
body::after{
  background:linear-gradient(116deg, transparent 28%, rgba(255,190,120,.05), rgba(150,205,200,.06), rgba(225,150,195,.05), transparent 72%);
  animation:bgDriftB 44s ease-in-out infinite alternate;
}
@keyframes bgDriftA{ from{ transform:translate3d(-1.5%,-1%,0); } to{ transform:translate3d(1.5%,1%,0); } }
@keyframes bgDriftB{ from{ transform:translate3d(2%,0,0); } to{ transform:translate3d(-2%,0,0); } }
/* 深色·宇宙鸿荒(星云 + 细星点,静态;偶尔一道流星)*/
[data-theme="dark"] body::before{
  background:
    radial-gradient(42% 32% at 18% 22%, rgba(122,92,205,.15), transparent 70%),
    radial-gradient(46% 36% at 82% 28%, rgba(58,112,192,.13), transparent 72%),
    radial-gradient(52% 42% at 70% 84%, rgba(202,150,72,.10), transparent 72%),
    radial-gradient(1.4px 1.4px at 30px 42px, rgba(255,244,214,.55), transparent),
    radial-gradient(1px 1px at 190px 90px, rgba(255,255,255,.45), transparent),
    radial-gradient(1.2px 1.2px at 250px 250px, rgba(205,222,255,.5), transparent),
    radial-gradient(1px 1px at 60px 150px, rgba(255,255,255,.4), transparent),
    radial-gradient(1.1px 1.1px at 170px 40px, rgba(255,240,210,.45), transparent),
    radial-gradient(1px 1px at 120px 200px, rgba(210,225,255,.4), transparent);
  background-size: cover,cover,cover, 320px 320px,320px 320px,320px 320px, 230px 230px,230px 230px,230px 230px;
  background-repeat: no-repeat,no-repeat,no-repeat, repeat,repeat,repeat, repeat,repeat,repeat;
  animation:none;
}
[data-theme="dark"] body::after{
  inset:auto; top:0; left:0; width:240px; height:2px; border-radius:2px;
  background:linear-gradient(90deg, transparent, rgba(255,240,205,.9));
  filter:drop-shadow(0 0 6px rgba(255,235,190,.6));
  opacity:0; transform:translate(-24vw,10vh) rotate(12deg);
  animation:meteor 14s ease-in infinite;
}
/* 放平轨迹 + 头亮尾淡朝行进方向 → 横向划过,不再像坠落 */
@keyframes meteor{
  0%{ opacity:0; transform:translate(-24vw,10vh) rotate(12deg); }
  4%{ opacity:.9; }
  16%{ opacity:0; transform:translate(122vw,44vh) rotate(12deg); }
  100%{ opacity:0; transform:translate(122vw,44vh) rotate(12deg); }
}
@media (prefers-reduced-motion: reduce){
  body::before, body::after{ animation:none !important; }
  [data-theme="dark"] body::after{ display:none; }
}

/* ===== 顶栏 ===== */
.topbar{
  position:fixed; top:0; left:0; right:0; z-index:50;
  height:54px; display:flex; align-items:center; justify-content:space-between;
  padding:0 16px;
  background:var(--bar);
  backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
}
/* 底边不用硬线,改向下渐隐,避免与页面背景形成生硬分界 */
.topbar::after{ content:""; position:absolute; left:0; right:0; top:100%; height:16px; pointer-events:none;
  background:linear-gradient(to bottom, var(--head-fade), transparent); }
.tb-btn{
  flex:0 0 auto; width:38px; height:38px; border-radius:11px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:var(--btn); border:1px solid var(--btn-border); color:var(--text);
  text-decoration:none; font-size:18px; line-height:1;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  transition:transform .15s ease, background .2s ease;
}
.tb-btn:active{ transform:scale(.92); }
.tb-btn svg{ width:20px; height:20px; display:block; }
.toggle.spin{ animation:tspin .5s ease; }
@keyframes tspin{ from{ transform:rotate(0); } to{ transform:rotate(360deg); } }
.icon-sun{ display:none; }
[data-theme="dark"] .icon-sun{ display:inline; }
[data-theme="dark"] .icon-moon{ display:none; }
/* 精致标题:金渐线 + 双闪星 + 微光 */
.tb-title{ flex:1; display:flex; align-items:center; justify-content:center; gap:9px; min-width:0; }
.tb-title::before,.tb-title::after{ content:""; width:22px; height:1px; flex:0 0 auto; }
.tb-title::before{ background:linear-gradient(90deg,transparent,var(--accent)); }
.tb-title::after{ background:linear-gradient(90deg,var(--accent),transparent); }
.tb-title .s{ flex:0 0 auto; color:var(--accent); font-size:10px; animation:twinkle 2.2s ease-in-out infinite; }
.tb-title .s.b{ animation-delay:1.1s; }
/* 浅色:发光是给深底设计的,压在浅底上会让本就很重的 800 字重显得又黑又发毛 →
   浅色不发光、字色调柔一档(仍有 6.7:1);深色维持金色微光 */
.tb-title .tt{ font-size:16.5px; font-weight:750; letter-spacing:4px; padding-left:4px;
  color:#5a4a33; white-space:nowrap; text-shadow:none; }
[data-theme="dark"] .tb-title .tt{ font-weight:800; color:var(--text);
  text-shadow:0 1px 9px rgba(180,140,60,.38);
  text-shadow:0 1px 9px color-mix(in srgb, var(--accent) 45%, transparent); }
@keyframes twinkle{ 0%,100%{ opacity:.32; transform:scale(.8); } 50%{ opacity:1; transform:scale(1); } }
/* 首页顶栏品牌太极 */
.brand{ position:relative; z-index:2; display:flex; align-items:center; gap:9px; font-weight:800; font-size:15px; letter-spacing:.5px; }
.brand .logo{ width:30px; height:30px; display:block; animation:spin 14s linear infinite; }

.wrap{ width:100%; max-width:400px; }

/* ===== 昵称 / 标签 / 简介(首页 & 部分子页)===== */
.name{ font-size:20px; font-weight:800; letter-spacing:.5px; display:flex; align-items:center; justify-content:center; gap:6px; }
.name .badge{ font-size:14px; color:var(--accent); }

/* ===== 引语 + 金线分隔(传音石 / 返佣)===== */
/* ⚠️ 必须写成 div.intro:body 上的 class="intro" 是「页面进场动画」标记(见 body.intro .loader),
   与这里的引语块同名。写成裸 .intro 会命中 <body>,让整页继承 text-align:center ——
   子页面的聊天气泡文字就会变居中,而首页(body 没有 intro)却是好的。 */
div.intro{ text-align:center; }
.intro .lead{ font-size:clamp(12.5px,3.6vw,14.5px); color:var(--muted); letter-spacing:.5px; line-height:1.7; }
.intro .lead b{ color:var(--accent-text); font-weight:600; }
.intro .orn{ display:flex; align-items:center; justify-content:center; gap:10px; color:var(--accent); margin:clamp(11px,2vh,16px) 0 clamp(16px,2.6vh,22px); }
.intro .orn::before,.intro .orn::after{ content:""; width:44px; height:1px; }
.intro .orn::before{ background:linear-gradient(90deg,transparent,var(--accent)); }
.intro .orn::after{ background:linear-gradient(90deg,var(--accent),transparent); }
.intro .orn svg{ width:19px; height:19px; display:block; flex:0 0 auto; animation:spin 6s linear infinite; }

/* ===== 吸顶:搜索 + 分组(工具页,仅吸顶后显背景)===== */
.stickybar{ position:sticky; top:54px; z-index:40; margin:0 -16px;
  padding:clamp(10px,2vh,16px) 16px 14px;
  transition:background .2s ease, box-shadow .2s ease; }
.stickybar.stuck{ background:var(--bar); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); box-shadow:0 6px 14px rgba(0,0,0,.05); }

/* ===== 搜索 ===== */
.search{ display:flex; align-items:center; gap:9px; padding:11px 14px; border-radius:12px;
  background:var(--btn); border:1px solid var(--btn-border); box-shadow:0 2px 10px rgba(0,0,0,.05);
  margin-bottom:clamp(11px,1.8vh,15px); }
.search svg{ width:18px; height:18px; color:var(--muted); flex:0 0 auto; }
.search input{ flex:1; min-width:0; border:none; outline:none; background:transparent; color:var(--text); font-size:16px; }
.search input::placeholder{ color:var(--muted); }
.search input::-webkit-search-cancel-button{ -webkit-appearance:none; }

/* ===== 分组 chips ===== */
.chips-wrap{ position:relative; margin-bottom:0; }
.chips{ display:flex; gap:8px; overflow-x:auto; padding:3px 1px; scrollbar-width:none; -webkit-overflow-scrolling:touch;
  --mask:none; -webkit-mask-image:var(--mask); mask-image:var(--mask); }
.chips::-webkit-scrollbar{ display:none; }
.chips-wrap.more-r .chips{ --mask:linear-gradient(90deg,#000 82%,transparent); }
.chips-wrap.more-l .chips{ --mask:linear-gradient(90deg,transparent,#000 18%); }
.chips-wrap.more-l.more-r .chips{ --mask:linear-gradient(90deg,transparent,#000 18%,#000 82%,transparent); }
.hint{ position:absolute; top:50%; margin-top:-11px; width:22px; height:22px; pointer-events:none; z-index:2;
  color:var(--accent); opacity:0; transition:opacity .25s ease; filter:drop-shadow(0 0 5px var(--accent)); }
.hint svg{ width:100%; height:100%; display:block; }
.hint-r{ right:-2px; } .hint-l{ left:-2px; }
.chips-wrap.more-r .hint-r{ opacity:.95; animation:nudgeR 1.05s ease-in-out infinite; }
.chips-wrap.more-l .hint-l{ opacity:.95; animation:nudgeL 1.05s ease-in-out infinite; }
@keyframes nudgeR{ 0%,100%{ transform:translateX(0); } 42%{ transform:translateX(-5px); } 60%{ transform:translateX(-1px); } }
@keyframes nudgeL{ 0%,100%{ transform:translateX(0); } 42%{ transform:translateX(5px); } 60%{ transform:translateX(1px); } }
.chip{
  flex:0 0 auto; font-size:13px; font-weight:600; padding:7px 15px; border-radius:999px; cursor:pointer;
  color:var(--muted); background:var(--btn); border:1px solid var(--btn-border); white-space:nowrap;
  transition:color .15s ease, background .15s ease, border-color .15s ease;
}
.chip:active{ transform:scale(.96); }
.chip.active{ color:#fdf7ec; background:var(--accent-fill); border-color:var(--accent-fill); font-weight:700; }
[data-theme="dark"] .chip.active{ color:#2a2012; }

/* ===== 按钮列表 + 五行 canvas 层 ===== */
.links{ display:flex; flex-direction:column; gap:clamp(9px,1.6vh,13px); }
.btn{
  position:relative; overflow:hidden; isolation:isolate;
  display:flex; align-items:center; gap:12px;
  width:100%; padding:clamp(13px,1.9vh,17px) 16px; border-radius:13px;
  background:var(--btn); border:1px solid var(--btn-border);
  color:var(--text); text-decoration:none;
  box-shadow:0 2px 10px rgba(0,0,0,.05);
  transition:transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active{ transform:scale(.985); }
.btn .ico,.btn .lbl,.btn .go{ position:relative; z-index:2; }
.btn canvas.fxc{ position:absolute; inset:0; z-index:1; border-radius:inherit; pointer-events:none; }
.btn .ico{ flex:0 0 26px; display:flex; align-items:center; justify-content:center; color:var(--accent); }
.btn .ico svg{ width:22px; height:22px; display:block; }
.btn .lbl{ flex:1; min-width:0; text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:15px; }
.btn .lbl .t{ font-weight:700; }
.btn .lbl .dot{ margin:0 7px; color:var(--muted); }
.btn .lbl .d{ font-size:13px; font-weight:500; color:var(--muted); }
.btn .go{ flex:0 0 auto; color:var(--muted); font-size:22px; line-height:1; opacity:.5; transition:opacity .15s ease, transform .15s ease; }
/* 返佣行是「复制」按钮不是跳转,所以给文字标签而不是 › 箭头 —— 免得看着像能点进去 */
.btn .copy-go{ font-size:12px; font-weight:700; letter-spacing:.5px; opacity:.75;
  color:var(--accent-text); padding:4px 9px; border-radius:8px;
  border:1px solid var(--btn-border); background:var(--btn); }
.btn.copied .copy-go{ color:#fdf7ec; background:var(--accent-fill); border-color:var(--accent-fill); opacity:1; }
[data-theme="dark"] .btn.copied .copy-go{ color:#2a2012; }
@media (hover:hover) and (pointer:fine){
  .tb-btn:hover{ background:var(--btn-hover); }
  .chip:hover{ border-color:var(--accent); }
  .btn:hover{ background:var(--btn-hover); box-shadow:0 5px 16px rgba(0,0,0,.1); }
  .btn:hover .go{ opacity:.85; transform:translateX(3px); }
}

/* ===== 空分类占位 ===== */
.empty{ display:none; text-align:center; color:var(--muted); font-size:13.5px; padding:40px 0 20px; }
.empty.show{ display:block; }
.empty .taiji{ width:32px; height:32px; display:block; margin:0 auto 10px; opacity:.85; animation:spin 9s linear infinite; }

/* ===== 页脚 ===== */
.foot{ margin-top:auto; padding-top:22px; display:flex; flex-direction:column; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); }
.foot .orn{ display:flex; align-items:center; justify-content:center; gap:10px; color:var(--accent); line-height:1; }
.foot .orn::before,.foot .orn::after{ content:""; width:40px; height:1px; }
.foot .orn::before{ background:linear-gradient(90deg,transparent,var(--accent)); }
.foot .orn::after{ background:linear-gradient(90deg,var(--accent),transparent); }
.foot .orn i{ font-style:normal; font-size:12px; opacity:.9; }
.foot a{ color:var(--accent-text); text-decoration:none; }

/* ===== 跳转过渡加载层(太极 + 八卦旋转)===== */
.loader{
  position:fixed; inset:0; z-index:200;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(120% 90% at 50% 42%, var(--bg2), var(--bg1));
  opacity:0; visibility:hidden; transition:opacity .4s ease, visibility .4s;
}
.loader.show{ opacity:1; visibility:visible; transition:opacity .25s ease; }
body.intro .loader{ opacity:1; visibility:visible; animation:loaderOut .32s ease .04s forwards; }
@keyframes loaderOut{ to{ opacity:0; visibility:hidden; } }
.core{ position:relative; width:130px; height:130px; }
.lbagua{ position:absolute; inset:0; animation:spin 9s linear infinite; }
.lbagua i{ position:absolute; top:0; left:0; transform:translate(-50%,-50%); }
.lbagua i span{ display:inline-block; font-size:17px; color:var(--bagua); text-shadow:0 0 8px var(--bagua); animation:spin 9s linear infinite reverse; }
.ltaiji{ position:absolute; inset:40px; animation:spin 2.6s linear infinite; filter:drop-shadow(0 0 10px var(--accent)); }
.ltaiji svg{ width:100%; height:100%; display:block; }

@keyframes spin{ to{ transform:rotate(360deg); } }

@media (prefers-reduced-motion: reduce){
  .toggle.spin,.tb-title .s,.brand .logo,.intro .orn svg,.empty .taiji,
  .lbagua,.lbagua i span,.ltaiji,
  .chips-wrap.more-r .hint-r,.chips-wrap.more-l .hint-l{ animation:none; }
  .chips-wrap.more-r .hint-r,.chips-wrap.more-l .hint-l{ opacity:.9; }
  body.intro .loader{ animation:loaderOut .3s ease .1s forwards; }
}

/* ================= 三手机布局(桌面 ≥900px,900~1240 用 zoom 等比缩放) ================= */
/* 侧列(传音石/千羽宗)内容样式——移动端侧列 display:none,这些规则无害 */
/* 侧列/中列顶部栏统一 54px,三个标题同一水平线;.phone-topbar 里的标题(.tb-title flex:1)横向撑满居中 */
.hp-side .intro{ margin-bottom:clamp(12px,2vh,18px); }   /* 左右两台同间距 → 首个按钮与首条气泡齐平 */
/* ===== 右手机:问芊羽(假聊天;侧列移动端隐藏,这些规则无害)===== */
.hp-chat .chat-log{ flex:1 1 auto; min-height:0; overflow-y:auto; scrollbar-width:none; padding-right:2px;
  display:flex; flex-direction:column; gap:8px; }   /* flex 列 + align-self:气泡按内容收缩 */
.hp-chat .chat-log::-webkit-scrollbar{ display:none; }
.msg{ max-width:88%; flex:0 0 auto; padding:9px 12px; border-radius:14px; font-size:13px; line-height:1.65; word-break:break-word; }
.msg.qy{ align-self:flex-start; background:var(--btn); border:1px solid var(--btn-border); border-bottom-left-radius:5px; color:var(--text); }
.msg.me{ align-self:flex-end; background:var(--accent-fill); border:1px solid var(--accent-fill); border-bottom-right-radius:5px; color:#fdf7ec; }
[data-theme="dark"] .msg.me{ color:#2a2012; }
/* 消息多了以后上下边缘硬切太生硬 → 遮罩渐隐;--fade-t/-b 由脚本按滚动位置给,
   到顶/到底那一侧就归 0(没被切就不该淡)。桌面第三台手机与 H5 全屏弹窗共用,故放全局。 */
.hp-chat .chat-log{ --fade-t:0px; --fade-b:0px;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 var(--fade-t), #000 calc(100% - var(--fade-b)), transparent 100%);
  mask-image:linear-gradient(to bottom, transparent 0, #000 var(--fade-t), #000 calc(100% - var(--fade-b)), transparent 100%);
  transition:none; }
.msg.qy b{ color:var(--accent); font-weight:800; }
.chat-jump{ display:inline-flex; align-items:center; gap:4px; margin-top:2px; padding:5px 12px; border-radius:999px;
  font-size:12.5px; font-weight:700; text-decoration:none; color:var(--accent-fill);
  background:var(--btn); border:1px solid var(--btn-border); }
@media (hover:hover) and (pointer:fine){ .chat-jump:hover{ border-color:var(--accent); background:var(--btn-hover); } }
.chat-sugwrap{ flex:0 0 auto; margin-top:10px; }
/* 居中 + 两侧细金线,与站内风格一致 */
.chat-sugtitle{ font-size:12px; color:var(--muted); margin:0 0 10px; display:flex; align-items:center;
  justify-content:center; gap:9px; letter-spacing:1px; }
.chat-sugtitle::before,.chat-sugtitle::after{ content:""; width:26px; height:1px; }
.chat-sugtitle::before{ background:linear-gradient(90deg,transparent,var(--accent)); }
.chat-sugtitle::after{ background:linear-gradient(90deg,var(--accent),transparent); }
/* 上下边缘渐隐:上面慢慢消失、下面慢慢出现 */
.chat-sugs{ height:242px;                    /* 5 行 × 42 + 4 × 8 间距 */
  overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y;   /* 可拖/可滚轮/可触屏滑 */
  scrollbar-width:none;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-image:linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%); }
.chat-sugs::-webkit-scrollbar{ display:none; }
/* 自动飘的动画**由 JS 用 Web Animations API 驱动**(见 app.js 的 startDrift),这里不写 animation。
   ⚠️ 两条都别改回去:
   ① 别改回「JS 每帧写 scrollTop」—— 滚动偏移会被吸附到设备像素,20px/s 时每帧位移不足一个
      设备像素,会攒几帧才动一下,看着一帧一帧的;
   ② 别改回「CSS @keyframes + var(--rx-seg)」—— 弹窗没打开时元素是 display:none、量到的高度是 0,
      动画只能用 fallback 0 起跑;而**真机浏览器对「动画开始后再改 var() 要不要重算」行为不一致**,
      结果就是 H5 点开后位移永远是 0(完全不滚)。WAAPI 直接传算好的像素值,没有这层不确定性。 */
.sug-track{ display:flex; flex-direction:column; gap:8px; }
.sug{ flex:0 0 42px; height:42px; width:100%; display:flex; align-items:center; gap:7px; padding:0 12px;
  border-radius:12px; background:var(--btn); border:1px solid var(--btn-border); color:var(--text);
  cursor:pointer; text-align:left; font-size:13px; overflow:hidden; white-space:nowrap;
  transition:background .15s ease, border-color .15s ease, transform .12s ease; }
.sug .t{ font-weight:700; flex:0 0 auto; }
.sug .dot{ color:var(--muted); flex:0 0 auto; }
.sug .d{ color:var(--muted); font-size:12px; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.sug:active{ transform:scale(.985); }
@media (hover:hover) and (pointer:fine){ .sug:hover{ background:var(--btn-hover); border-color:var(--accent); } }
.chat-input{ flex:0 0 auto; display:flex; gap:8px; align-items:center; margin-top:10px; }
.chat-input input{ flex:1 1 auto; min-width:0; height:42px; padding:0 14px; border-radius:12px;
  border:1px solid var(--btn-border); background:var(--btn); color:var(--text); font-size:16px; outline:none; }
.chat-input input::placeholder{ color:var(--muted); }
.chat-input input:focus{ border-color:var(--accent); }
.chat-send{ flex:0 0 42px; height:42px; border-radius:12px; cursor:pointer;
  border:1px solid var(--accent-fill); background:var(--accent-fill); color:#fdf7ec;
  display:flex; align-items:center; justify-content:center; transition:transform .12s ease; }
[data-theme="dark"] .chat-send{ color:#2a2012; }
.chat-send svg{ width:19px; height:19px; }
.chat-send:active{ transform:scale(.94); }

/* ===== 子页通用零件(下载页/命令页/千羽宗原先各自内联抄了一份,现合并到这里单一维护)===== */
.hero{ text-align:center; margin-bottom:clamp(14px,2.4vh,22px); }
.emblem{ width:72px; height:72px; border-radius:20px; margin:0 auto 14px;
  display:flex; align-items:center; justify-content:center; color:var(--accent);
  border:1px solid var(--btn-border); background:radial-gradient(circle at 50% 40%, rgba(198,150,80,.22), rgba(198,150,80,.05));
  box-shadow:0 8px 26px rgba(0,0,0,.2), 0 0 22px var(--accent); }
.emblem svg{ width:36px; height:36px; }
.name .ver{ color:var(--accent); font-size:13.5px; font-weight:700; }
.sub{ margin-top:9px; font-size:13px; color:var(--muted); }
.tip{ margin-top:14px; text-align:center; font-size:12px; color:var(--muted); line-height:1.7; }
/* 下载分区 */
.dlsec{ margin-top:clamp(13px,2.2vh,18px); }
.dlsec .h{ font-size:12.5px; font-weight:700; color:var(--muted); margin:0 0 9px 2px; letter-spacing:.5px; display:flex; align-items:center; gap:7px; }
.dlsec .h::before{ content:""; width:3px; height:12px; border-radius:2px; background:var(--accent); }
.dlrow{ display:flex; gap:10px; }
.dlbtn{ flex:1; display:flex; align-items:center; justify-content:center; gap:8px; padding:14px 10px; border-radius:12px;
  text-decoration:none; border:1px solid var(--btn-border); background:var(--btn); color:var(--text); font-size:14px; font-weight:600;
  box-shadow:0 2px 10px rgba(0,0,0,.05); transition:transform .12s ease, background .15s ease, border-color .15s ease; }
.dlbtn:active{ transform:scale(.98); }
.dlbtn svg{ width:19px; height:19px; flex:0 0 auto; color:var(--accent); }
@media (hover:hover) and (pointer:fine){ .dlbtn:hover{ background:var(--btn-hover); border-color:var(--accent); } }
/* 金色主行动按钮(复制命令 / 前往千羽宗):底色用 --accent-fill,浅色下白字才够对比 */
.copybtn,.gobtn{ width:100%; display:flex; align-items:center; justify-content:center; gap:9px;
  padding:15px; border-radius:13px; cursor:pointer; text-decoration:none;
  border:1px solid var(--accent-fill); background:var(--accent-fill);
  color:#fdf7ec; font-size:15px; font-weight:700; box-shadow:0 4px 14px rgba(166,124,48,.28);
  transition:transform .12s ease, filter .15s ease; }
[data-theme="dark"] .copybtn, [data-theme="dark"] .gobtn{ color:#2a2012; }
.copybtn:active,.gobtn:active{ transform:scale(.98); }
.copybtn svg{ width:18px; height:18px; flex:0 0 auto; }

/* ===== H5:若星AI = 右下角浮钮 + 欢迎气泡 + 全屏弹窗 =====
   复用的就是桌面第三台手机那份 markup(.hp-chat),不另写一份,免得两边内容跑偏。
   关闭态**保持 display:none**(靠上面的 .hp-side 规则)——很关键:轮播/渐隐都靠
   offsetParent===null 判断「不可见就别空转」,若改用 visibility 隐藏它们会在后台白烧。
   桌面(≥900)会把这里的 fixed/transform 全部还原成第三台手机。 */
.hp-chat{ position:fixed; inset:0; z-index:80; background:var(--bg1);
  flex-direction:column; transform:translateY(100%);
  transition:transform .32s cubic-bezier(.32,.72,0,1); }
body.rx-open .hp-chat{ display:flex; }        /* 先显示(display 不能过渡) */
body.rx-in   .hp-chat{ transform:none; }      /* 下一帧再滑上来 */
body.rx-open{ overflow:hidden; }              /* 锁背景滚动,免得弹窗里滑动穿透 */
body.rx-open .hp-chat .phone-topbar{ position:relative; flex:0 0 auto; height:56px;
  display:flex; align-items:center; justify-content:center; padding:0 56px; }
body.rx-open .hp-chat .phone-scroll{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
  padding:6px 16px calc(10px + env(safe-area-inset-bottom,0px)); overflow:hidden; }
body.rx-open .hp-chat div.intro{ flex:0 0 auto; margin-bottom:0; }
body.rx-open .hp-chat div.intro .orn{ margin:10px 0; }
body.rx-open .hp-chat .chat-log{ flex:1 1 auto; min-height:0; padding-top:6px; }
/* 注:曾把消息改成贴底排(首条 margin-top:auto),用户要求第一句话在**上面**,已撤销,勿再加 */
/* 弹窗右上角关闭键(JS 注入) */
.rx-close{ position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:11px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:var(--btn); border:1px solid var(--btn-border); color:var(--text); }
.rx-close svg{ width:19px; height:19px; display:block; }
.rx-close:active{ transform:translateY(-50%) scale(.92); }

/* 浮钮 */
/* 位置抽成变量,气泡跟着一起算 —— 免得改了钮的位置忘了改气泡。
   底距用 vh 参与:矮屏(如 iPhone SE)不至于顶到内容,高屏也不会贴到屏幕最下沿。 */
:root{ --rx-b:calc(clamp(26px,5.2vh,46px) + env(safe-area-inset-bottom,0px)); --rx-s:58px; }
.rx-fab{ position:fixed; z-index:70;
  right:clamp(14px,4vw,22px); bottom:var(--rx-b);
  width:var(--rx-s); height:var(--rx-s); border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:var(--accent); border:1.5px solid var(--ring);
  background:var(--btn);
  background:radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 20%, var(--btn)), var(--btn) 74%);
  box-shadow:0 8px 22px rgba(0,0,0,.22), 0 0 20px -8px var(--accent);
  transition:transform .15s ease; }
/* 深色:原来是一整块亮金饼,压在近黑页面上很突兀 → 改深底 + 金线八卦,与三台手机机身同一套语言 */
[data-theme="dark"] .rx-fab{ box-shadow:0 10px 26px rgba(0,0,0,.55), 0 0 22px -6px var(--accent); }
.rx-fab:active{ transform:scale(.92); }
.rx-fab svg{ width:100%; height:100%; display:block; }
.rx-fab .rx-gua{ transform-box:view-box; transform-origin:50% 50%; animation:spin 26s linear infinite; }
.rx-fab .rx-taiji{ transform-box:view-box; transform-origin:50% 50%; animation:spin 15s linear infinite reverse; }
body.rx-open .rx-fab{ opacity:0; pointer-events:none; }   /* 弹窗开着就别露出来 */

/* 欢迎气泡:从浮钮左上角冒出 */
.rx-bubble{ position:fixed; z-index:70;
  right:clamp(14px,4vw,22px); bottom:calc(var(--rx-b) + var(--rx-s) + 10px);
  max-width:min(76vw,300px); padding:10px 32px 10px 13px;
  border-radius:14px; border-bottom-right-radius:5px;
  background:var(--btn); border:1px solid var(--btn-border); color:var(--text);
  font-size:13px; line-height:1.62; text-align:left;
  box-shadow:0 8px 22px rgba(0,0,0,.18); cursor:pointer;
  opacity:0; transform:translateY(8px) scale(.96); transform-origin:100% 100%;
  pointer-events:none;
  transition:opacity .3s ease, transform .3s cubic-bezier(.32,.72,0,1); }
.rx-bubble.show{ opacity:1; transform:none; pointer-events:auto; }
.rx-bubble b{ color:var(--accent-text); font-weight:700; }
.rx-bubble .x{ position:absolute; top:3px; right:3px; width:26px; height:26px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:0; cursor:pointer; color:var(--muted); font-size:15px; line-height:1; }
@media (prefers-reduced-motion: reduce){
  .hp-chat, .rx-bubble{ transition:none; }
  .rx-fab .rx-gua, .rx-fab .rx-taiji{ animation:none; }
}

/* 移动端(默认):包裹层不产生盒子 + 侧列隐藏 → 与现状像素一致 */
.hp, .phone-mid{ display:contents; }
.hp-side{ display:none; }

/* 手机外框配色 + 顶部条不透明底色(挡住下方滚动内容) */
:root{ --phone-bg:rgba(255,255,255,.42); --phone-edge:rgba(0,0,0,.09); --phone-head:rgba(248,244,237,.985);
  --phone-shadow:0 14px 34px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,.05); }
[data-theme="dark"]{ --phone-bg:rgba(22,20,30,.5); --phone-edge:rgba(255,255,255,.09); --phone-head:rgba(18,16,23,.985);
  /* 近黑底上纯黑阴影等于没有 → 用更深的投影 + 一圈极淡金描边把机身「抬」起来 */
  --phone-shadow:0 16px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(212,175,106,.10), inset 0 0 0 1px rgba(255,255,255,.045); }

/* ≥900px 一律三手机;900→1240 用 zoom 等比例缩放(内部布局比例不变,不挤字) */
@media (min-width:900px){
  /* 桌面三手机有毛玻璃机身,背景一直动会逼它每帧重算模糊 → 停掉背景动画,模糊只算一次(大幅省耗) */
  body.phones::before, body.phones::after{ animation:none !important; }
  body.phones{ display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100dvh; padding:2.2vh 16px; }
  body.solo .hp{ grid-template-columns:424px; }   /* 传音石直链:内容即左手机,单独一台居中,不重复三列 */
  .hp{ display:grid; grid-template-columns:358px 424px 358px; gap:24px;
    justify-content:center; align-items:center; margin:0 auto; zoom:var(--z,1); }
  /* 每一列 = 一个手机;高度按缩放比补偿,渲染后仍约占 90vh */
  .hp-side, .phone-mid{
    display:flex; flex-direction:column; height:calc(min(90vh,900px) / var(--z,1));
    -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
    border-radius:26px; overflow-y:auto; overflow-x:hidden; scrollbar-width:none;
    background:var(--phone-bg); border:1px solid var(--phone-edge);
    box-shadow:var(--phone-shadow);
    -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
    position:relative; contain:paint;
  }
  .hp-side::-webkit-scrollbar, .phone-mid::-webkit-scrollbar{ display:none; }
  /* 侧列(传音石/千羽宗)内容整体垂直居中 */
  /* 左右手机都顶部对齐,三台手机标题在同一水平线 */
  .hp-side{ padding:0; overflow:hidden; }               /* 外框只裁剪,滚动交给内层 */
  .phone-topbar{ flex:0 0 54px; height:54px; display:flex; align-items:center; justify-content:center; padding:0 16px; }
  .phone-topbar .tb-title{ min-width:0; }
  .phone-scroll{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
    padding:0 20px 18px; scrollbar-width:none; }
  .phone-scroll::-webkit-scrollbar{ display:none; }
  .hp-left .phone-scroll{ overflow-y:auto; justify-content:flex-start; padding-top:10px; }  /* 顶部对齐,与另两台起始行齐平 */
  .hp-left .links{ gap:clamp(11px,2vh,16px); }                          /* 联系按钮间距加大,填充竖向空间 */
  .hp-left .links{ margin-top:0; }
  .hp-chat .phone-scroll{ overflow:hidden; padding-top:10px; }           /* 聊天自管内部:log 滚、输入贴底 */
  /* 引语 + 太极:与左手机同款,定高不伸缩,第一条气泡在它下面 */
  .hp-side .intro{ flex:0 0 auto; }
  /* 聊天区要同时满足两件事:
     ① 切割(渐隐)线紧贴太极下方 —— 滚动时内容从那里开始被裁
     ② 未滚动时第一条气泡仍与左手机第一个按钮齐平
     做法:把原本属于 intro 的下边距挪进 chat-log 的 padding-top。
     padding 属于滚动区内部,内容会从它下面滚上去并在盒子上沿被裁 → 两件事同时成立。
     ⚠️ 别再把这段间距改回 margin,那样切割线会被一起推下去(用户明确指出过)。 */
  .hp-chat .intro{ margin-bottom:0; }
  .hp-chat .intro .orn{ margin-bottom:10px; }
  .hp-chat .chat-log{ padding-top:calc(clamp(16px,2.6vh,22px) + clamp(12px,2vh,18px) - 10px); }
  /* 顶栏 → 手机顶部条:不透明底,内容滚过时不透上来 */
  body.phones .topbar{ position:sticky; top:0; left:auto; right:auto; width:auto; height:54px; flex:0 0 54px; z-index:41;
    border-radius:26px 26px 0 0; background:var(--phone-head);
    -webkit-backdrop-filter:none; backdrop-filter:none; }   /* 底色近乎不透明,无需实时模糊 */
  /* padding-top 必须为 0:否则顶栏与吸顶之间留一条缝,内容会从缝里滚过去 */
  body.phones .wrap{ max-width:none; width:100%; margin:0; padding:0 20px 20px; }
  body.phones .foot{ padding-bottom:22px; }   /* 否则被 margin-top:auto 顶到贴手机底边 */
  body.phones .wrap > *:first-child:not(.stickybar){ margin-top:12px; }
  body.phones .topbar::after{ display:none; }   /* 手机内顶栏与吸顶是连续实心头部,不需要渐隐 */
  /* 吸顶搜索/分组:手机内不透明贴合,始终有底(手机内滚动 window scroll 不触发 .stuck) */
  body.phones .stickybar{ position:sticky; top:54px; margin:0 -20px 12px; padding:12px 20px; z-index:30;
    background:var(--phone-head); -webkit-backdrop-filter:none; backdrop-filter:none;
    box-shadow:0 8px 14px rgba(0,0,0,.06); }
  /* H5 的全屏弹窗形态在这里全部还原成「第三台手机」 */
  .hp-chat{ position:relative; inset:auto; transform:none; transition:none; z-index:auto; }
  .rx-fab, .rx-bubble, .rx-close{ display:none !important; }
  .hp-dup{ display:none !important; }   /* 中列隐藏「传音石」按钮(左手机即是它);千羽宗仍显示 */
  .fly{ display:none; }                 /* 首页那把飞剑是为全宽顶栏设计的,手机里不放 */
  /* 注:曾把首页 logo 绝对居中求「三台顶部对称」,用户明确要留在左上角(与 H5 一致),已撤销,勿再加 */
  .phone-mid .loader{ position:absolute; border-radius:26px; }   /* 过渡只盖中间那个手机 */
}

/* 等比例缩放档位:只用递增 min-width(靠层叠覆盖,小数宽度不会掉档);
   z = (视口宽-48)/1188,边距预算留 48px 以容纳 Windows 经典滚动条 */
@media (min-width:900px){  .hp{ --z:.71; } }
@media (min-width:940px){  .hp{ --z:.75; } }
@media (min-width:980px){  .hp{ --z:.78; } }
@media (min-width:1020px){ .hp{ --z:.81; } }
@media (min-width:1060px){ .hp{ --z:.85; } }
@media (min-width:1100px){ .hp{ --z:.88; } }
@media (min-width:1140px){ .hp{ --z:.91; } }
@media (min-width:1180px){ .hp{ --z:.95; } }
@media (min-width:1220px){ .hp{ --z:.98; } }
@media (min-width:1240px){ .hp{ --z:1; } }
/* ≥1280:原尺寸 + 宽屏继续长宽 */
@media (min-width:1280px){
  .hp{ grid-template-columns:minmax(358px,410px) minmax(424px,470px) minmax(358px,410px);
    width:100%; max-width:1360px; }
}

/* ===== 降级:浏览器不支持 zoom(如 Firefox<126)时,1240 以下退回单列,
   而不是让三手机按原尺寸溢出。只在不支持的浏览器里生效,不影响正常路径 ===== */
@supports not (zoom:1){
  /* ⚠️ 必须带 min-width:900px:这个降级块只为解决「不支持 zoom 时三手机会溢出」,
     900 以下本来就是单列,用不上它。而它里面的 .hp-side{display:none !important}
     会盖过 body.rx-open .hp-chat{display:flex} → H5 弹窗永远打不开,
     偏偏浮钮的隐藏规则只写在 min-width:900 里 → 钮还在、点了却只锁死页面滚动。 */
  @media (min-width:900px) and (max-width:1239.98px){
    .hp, .phone-mid{ display:contents !important; }
    .hp-side{ display:none !important; }
    body.phones{ justify-content:flex-start !important; padding:64px 16px 18px !important; }
    body.phones .topbar{ position:fixed !important; top:0; left:0 !important; right:0 !important;
      width:auto !important; border-radius:0 !important; }
    body.phones .topbar::after{ display:block !important; }
    body.phones .wrap{ max-width:400px !important; padding:0 !important; }
    body.phones .stickybar{ margin:0 -16px !important; padding:clamp(10px,2vh,16px) 16px 14px !important;
      background:transparent !important; box-shadow:none !important; }
    body.phones .stickybar.stuck{ background:var(--bar) !important; }
  }
}
