/* 天使助手（helper.js）要用的样式，从旧版 style.css / settings.css 抽出来的。
   新版 v2 不加载 style.css，所以单独给它这一份；旧版继续用 style.css，两边互不影响。
   改助手的样子时记得两边一起改，或者哪天把旧版也切到这个文件来。 */
#angel,#helper-sheet{
  --blue:#2f8fdd; --blue-l:#5fb6f3; --num:#3d8fd6; --ink:#1b3a53;
  --ico-play:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}
#angel{position:fixed;left:10px;bottom:calc(200px + env(safe-area-inset-bottom));z-index:31;width:60px;height:60px;cursor:pointer;-webkit-tap-highlight-color:transparent;animation:angel-float 3.6s ease-in-out infinite}
#angel img{position:relative;z-index:2;width:60px;height:60px;border-radius:50%;object-fit:cover;display:block;box-shadow:0 0 0 3px #fff,0 0 0 5px #7cc4f5,0 8px 20px #2d7ca54d;transition:transform .2s}
#angel:active img{transform:scale(.94)}
#angel .halo{position:absolute;left:50%;top:50%;width:76px;height:76px;margin:-38px 0 0 -38px;border-radius:50%;background:radial-gradient(circle,#fff6c4cc 0,#ffe08a55 45%,transparent 70%);animation:angel-halo 2.8s ease-in-out infinite;pointer-events:none}
#angel::before{content:"";position:absolute;left:-14px;top:12px;width:22px;height:34px;border-radius:60% 40% 60% 40%;background:linear-gradient(160deg,#fff,#dff0ff);box-shadow:0 2px 6px #2d7ca530;transform-origin:right center;animation:angel-wing 1.3s ease-in-out infinite;z-index:1}
#angel::after{content:"";position:absolute;right:-14px;top:12px;width:22px;height:34px;border-radius:40% 60% 40% 60%;background:linear-gradient(200deg,#fff,#dff0ff);box-shadow:0 2px 6px #2d7ca530;transform-origin:left center;animation:angel-wing 1.3s ease-in-out infinite reverse;z-index:1}
#angel .bubble{position:absolute;left:68px;bottom:14px;z-index:3;width:max-content;max-width:min(62vw,250px);padding:9px 12px;border-radius:16px 16px 16px 4px;background:#ffffffee;color:var(--ink);font-size:13.5px;line-height:1.5;box-shadow:0 8px 22px #2d7ca540;backdrop-filter:blur(8px);animation:angel-pop .35s ease-out}
#angel .bubble[hidden]{display:none}
#angel .bubble::before{content:"";position:absolute;left:-6px;bottom:8px;border:6px solid transparent;border-right-color:#ffffffee;border-left:0}
#angel .bubble b{color:#2b76ab}
body.player-open #angel{left:auto;right:12px;top:8px;bottom:auto;width:42px;height:42px;animation:none}
body.player-open #angel img{width:42px;height:42px}
body.player-open #angel .halo,body.player-open #angel::before,body.player-open #angel::after,body.player-open #angel .bubble{display:none}
#angel,#angel .halo,#angel::before,#angel::after{animation:none}
#helper-sheet{position:fixed;inset:0;z-index:45;display:none;align-items:flex-end;background:#14384d55;padding:10px}
#helper-sheet.open{display:flex}
.helper-card{display:flex;flex-direction:column;height:min(78vh,640px);padding:14px 14px 10px}
.helper-card .sheet-head strong{display:flex;align-items:center;gap:8px;font-size:18px}
.helper-card .sheet-head img{width:30px;height:30px;border-radius:50%;object-fit:cover}
#helper-log{flex:1;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:4px 2px;-webkit-overflow-scrolling:touch}
.hm{max-width:88%;padding:10px 13px;border-radius:16px;font-size:15px;line-height:1.6;white-space:pre-wrap;word-break:break-word}
.hm.me{align-self:flex-end;background:linear-gradient(180deg,var(--blue-l),var(--blue));color:#fff;border-bottom-right-radius:5px}
.hm.ai{align-self:flex-start;background:#eef6fd;color:var(--ink);border-bottom-left-radius:5px}
.hm .hs{display:flex;align-items:center;gap:8px;width:100%;margin:6px 0 0;border:0;border-radius:12px;padding:8px 10px;background:#fff;color:var(--ink);font-size:14px;text-align:left;box-shadow:0 2px 6px #4a9ad820}
.hm .hs b{color:var(--num);font-weight:700;font-variant-numeric:tabular-nums}
.hm .hs em{flex:1;font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hm .hs::after{content:"";flex:none;width:22px;height:22px;border-radius:50%;background:var(--ico-play) center/10px no-repeat,linear-gradient(180deg,var(--blue-l),var(--blue))}
.hm .hgo{display:inline-block;margin-top:6px;border:0;border-radius:999px;padding:6px 12px;background:#fff;color:#2b76ab;font-weight:700;font-size:13px;box-shadow:0 2px 6px #4a9ad820}
#helper-chips{display:flex;gap:6px;overflow-x:auto;padding:8px 0 6px;scrollbar-width:none}
#helper-chips::-webkit-scrollbar{display:none}
#helper-chips button{flex:none;border:1px solid #cfe6f7;border-radius:999px;padding:6px 11px;background:#fff;color:#2b76ab;font-size:12.5px;font-weight:600}
#helper-form{display:flex;gap:8px}
#helper-form input{flex:1;min-width:0;border:1px solid #cfe6f7;border-radius:999px;padding:10px 14px;font-size:15px;outline:none}
#helper-form input:focus{border-color:var(--blue)}
#helper-form button[type="submit"]{border:0;border-radius:999px;padding:0 16px;background:linear-gradient(180deg,var(--blue-l),var(--blue));color:#fff;font-weight:700}
#helper-mic{flex:none;width:40px;height:44px;border:0;background:none;padding:0;color:#2b76ab;display:grid;place-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:12px}
#helper-mic.on{color:#f26a3a;animation:mic-pulse 1s ease-in-out infinite}
#helper-mic[hidden]{display:none}
.hm .verse{display:block;margin-top:6px;padding:8px 10px;border-left:3px solid var(--blue);background:#dcefff;border-radius:6px;font-style:normal;color:#1c3d5a;font-size:14px;line-height:1.6}
.hm .verse small{display:block;text-align:right;color:#4f7594;font-size:12px;margin-top:2px}
body.visit-visible #angel{opacity:0;pointer-events:none;transition:opacity .25s}
#angel{transition:opacity .25s}
.sheet-card{width:min(560px,100%);margin:0 auto;background:#fff;border-radius:24px;padding:18px;box-shadow:0 18px 50px #1238}
.sheet-head{display:flex;align-items:center;justify-content:space-between;font-size:20px;margin-bottom:8px}
.sheet-head button{width:38px;height:38px;background:#eaf6fd;color:#26698f;font-size:25px}
.sheet-card label{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 2px;border-bottom:1px solid #e6f0f6;text-align:left}
.sheet-card label span{display:flex;flex-direction:column;gap:4px}
.sheet-card label small,.sheet-card p,.setting-group small{color:#7891a2}
.sheet-card label>input{width:24px;height:24px;accent-color:#3ca8e3}
.sheet-card p{font-size:13px;line-height:1.55;margin:15px 2px 2px}
@keyframes angel-pop{from{opacity:0;transform:translateY(6px) scale(.9)}to{opacity:1;transform:none}}
@keyframes mic-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.18)}}

/* 这两条写在最后，才盖得住上面抄过来的原始定位：
   新版底下是标签栏，助手按钮要往上挪，别压住「我的」。 */
#angel{left:12px;bottom:calc(118px + env(safe-area-inset-bottom));z-index:24}
#player.on ~ #angel,body.v2-hide-angel #angel{display:none}
/* 小一号：60px 的天使压住太多字 */
#angel{width:48px;height:48px}
#angel img{width:48px;height:48px}
#angel .halo{width:60px;height:60px;margin:-30px 0 0 -30px}
#angel::before,#angel::after{top:8px;width:17px;height:27px}
#angel::before{left:-11px}
#angel::after{right:-11px}
#angel .bubble{left:56px}
