/* 新手指引样式 — 任务条 / 高亮水波纹 / 领奖弹窗.
   整体走娃娃机赛博投影风(青色全息), 与 .cm-ad-popup.cm-holo 弹窗皮肤一致. */

/* 复用主题色 — 与 .cm-holo 同款青 */
.guide-bar,
.guide-ripple,
.guide-claim {
  --g-cyan: #ffffff;           /* iOS玻璃: 去青改中性白 */
  --g-cyan-bright: #ffffff;
  --g-glow: rgba(255, 255, 255, .5);
}

/* ── 任务条 — 左下角紧贴屏幕左缘, 在底部 tab 栏上方; 左直角右圆角 ── */
.guide-bar {
  position: absolute;
  left: 0;
  /* why: 底部 tab 栏高 38px(见 .cm-tabbar), 任务条压其正上方留 4px 缝, 不重叠 */
  bottom: 42px;
  z-index: 13; /* why: 高于 tab 栏(12) 与总览 iframe, 任务条任何页签都看得见 */
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 76%; /* why: 留出右侧空间, 长文案不顶满屏宽 */
  box-sizing: border-box;
  padding: 7px 12px 7px 10px;
  /* why: 左直角(0) 右圆角(13px) — 需求钦定"左侧跟屏幕边缘对齐直角, 右侧圆角" */
  border-radius: 0 13px 13px 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-left: none;
  background:
    linear-gradient(180deg, rgba(8, 24, 40, .92), rgba(6, 16, 30, .94));
  box-shadow: 0 0 14px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  /* why: 钦定"解锁后图标可大于引导边框边界" — 不裁切, 让抖动放大的礼盒溢出条外;
     文案超长的省略由 .guide-bar-text 自己 overflow:hidden 处理, 不靠这里裁 */
  overflow: visible;
  cursor: default;
  /* why: 升级抽屉打开时任务条要平滑下移让位 (is-upg-yield), 退出再滑回原位 */
  transition: bottom .28s cubic-bezier(.4, 0, .2, 1);
}
/* why(让位升级钮): 打开升级抽屉, 三个升级钮底边(实测 vh670)压到任务条顶(vh662)约 8px;
   用户钦定"下移的是任务条, 不许升级钮上移". 任务条从 bottom 42px 下移到 30px (-12px):
   条顶降到 vh674 越过钮底, 让出钮; 代价是条底缘轻压 tab 栏顶 ~8px (仅左侧 娃娃机/总览),
   引导期可接受 (此刻玩家聚焦升级钮 + 高亮的升级 tab). 退出升级 is-upg-yield 去掉 → 滑回 42px.
   why(家园复用): 进家园页同样加 is-upg-yield 下移 — 家园 iframe 顶到底, 任务条下移更贴边不挡内容 (用户钦定"像点升级那样下降") */
.guide-bar.is-upg-yield {
  bottom: 30px;
}
.guide-bar-label {
  color: var(--g-cyan);
  font-weight: 800;
  letter-spacing: .04em;
  text-shadow: 0 0 8px var(--g-glow);
  flex: none;
}
.guide-bar-text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .02em;
}
.guide-bar-reward {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
}

/* 领奖短浮层 — 点礼盒后在任务条右上方闪一下实际奖励, 跟飞向顶部动画并行. */
.guide-reward-toast {
  position: absolute;
  right: 4px; /* why: 贴任务条右侧礼盒附近, 明确告诉玩家这次点领奖给了什么 */
  bottom: calc(100% + 6px); /* why: 浮在任务条上方 6px, 不压住任务文案和底部 tab */
  z-index: 14; /* why: 高于任务条自身和水波纹, 但仍低于全屏弹窗层 */
  display: grid;
  gap: 3px; /* why: 放大后两行多留 1px 呼吸, 仍保持一个整体 */
  padding: 6px 9px; /* why: 用户要求稍大一点, 内边距同步加一小档但不挡太多画面 */
  border-radius: 10px; /* why: 贴合任务条右圆角的全息小胶囊 */
  border: 1px solid rgba(255, 255, 255, .22);
  background: var(--cm-glass-specular), rgba(14, 18, 32, .5);
  box-shadow: var(--cm-glass-shadow);
  -webkit-backdrop-filter: var(--cm-glass-backdrop-fb);
  backdrop-filter: var(--cm-glass-backdrop);
  pointer-events: none;
  animation: guideRewardToast 1s ease-out forwards;
}
.guide-reward-toast-row {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  text-shadow: var(--cm-glass-text-outline);
  white-space: nowrap;
}
.guide-reward-toast-row img {
  width: 16px; /* why: 用户要求稍大一点, 16px 更容易分辨金币/体力位图 */
  height: 16px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .45));
}
.guide-reward-toast-row b {
  font-weight: 900;
}
@keyframes guideRewardToast {
  0%   { transform: translateY(5px) scale(.92); opacity: 0; }
  18%  { transform: translateY(0) scale(1.04); opacity: 1; }
  70%  { transform: translateY(-2px) scale(1); opacity: 1; }
  100% { transform: translateY(-8px) scale(.96); opacity: 0; }
}

/* 完成态 — 整条发亮脉冲, 提示可领奖 */
.guide-bar.is-ready {
  cursor: pointer;
  border-color: rgba(255, 220, 150, .8);
  animation: guideBarGlow 1.1s ease-in-out infinite;
}
@keyframes guideBarGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 210, 130, .3), inset 0 0 18px rgba(255, 210, 130, .1); }
  50%      { box-shadow: 0 0 26px rgba(255, 210, 130, .7), inset 0 0 26px rgba(255, 210, 130, .2); }
}
/* 奖励图标抖动弹跳变大变小 — 需求钦定"内部奖励图标开始抖动弹跳变大变小" */
.guide-bar-reward.is-shaking {
  animation: guideRewardShake .6s ease-in-out infinite; /* why: 0.6s 一轮, 抖+缩放都塞得下又够欢快 */
}
/* why: 钦定"解锁后图标可大于边框" — 放大峰值拉到 1.7, 配 .guide-bar overflow:visible 溢出条外更抢眼 */
.guide-bar-reward.is-shaking {
  /* why: 放大基点压在底部中线, 让礼盒往上"长出"条外而不是向下穿到 tab 栏 */
  transform-origin: 50% 80%;
}
@keyframes guideRewardShake {
  0%, 100% { transform: rotate(0)     scale(1);    }
  20%      { transform: rotate(-12deg) scale(1.7);  }
  45%      { transform: rotate(10deg)  scale(1.25); }
  70%      { transform: rotate(-7deg)  scale(1.55); }
}

/* ── 高亮水波纹 — 罩在目标元素上的脉冲环, 不挡点击 ── */
.guide-ripple {
  position: absolute;
  z-index: 1; /* why: JS 按目标最外层 stacking context 动态写入“目标层 + 1”；1 仅是测量前的安全低层兜底。 */
  pointer-events: none; /* why: 只做视觉引导, 点击穿透到真正的目标元素 */
  border-radius: 14px;
}
.guide-ripple-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, .96); /* why: 任务牵引出的目标提示统一改为白色, 不再沿用蓝色水波 */
  box-shadow:
    0 0 10px rgba(255, 255, 255, .98),
    0 0 24px rgba(255, 255, 255, .72),
    inset 0 0 10px rgba(255, 255, 255, .58); /* why: 外侧双层白光 + 内侧亮边, 在明暗场景里都能清晰标出可点击目标 */
  animation: guideTargetWhiteFlash 1.8s ease-out infinite; /* why: 1.8s 保留可读的外扩过程, 同时比原 2.8s 蓝色慢波更像明确闪烁提示 */
  transform-origin: center;
}
/* why: 三环按 1.8s 周期三等分错开, 保持目标周围始终有一圈白闪正在外扩 */
.guide-ripple-ring-2 { animation-delay: .6s; }
.guide-ripple-ring-3 { animation-delay: 1.2s; }
@keyframes guideTargetWhiteFlash {
  0%   { transform: scale(1);    opacity: 0;   filter: brightness(.82); }
  10%  { transform: scale(1.05); opacity: 1;   filter: brightness(1.8); }
  24%  { transform: scale(1.16); opacity: .48; filter: brightness(1.02); }
  38%  { transform: scale(1.27); opacity: .94; filter: brightness(1.62); }
  100% { transform: scale(1.7);  opacity: 0;   filter: brightness(1); }
}

/* why: 点击手指 (.guide-finger / .guide-finger-tap) 与任务条呼吸提示 (.guide-bar.is-hint) 已移除 —
   需求钦定"每步自动显示水波纹引导, 不要点击手指, 也不再需要点任务条展开". 只保留上面的水波纹脉冲环. */

/* ── 领奖弹窗 ──
   why: 复用新手礼包同款全息皮 (.cm-rate-mask + .cm-ad-popup.cm-holo + .cm-gift-list + .cm-rate-boost-btn,
   均在 styles.css), 这里不重复定义, 仅留 .guide-claim 作 hook 备用(暂无额外覆盖). */

/* ═══════════ 主界面 UI v2 任务条换皮 ═══════════
   why: 用户拆层图里任务入口是独立透明 PNG 底板 + clipboard icon + arrow icon; 这里只换皮, 引导状态/领奖逻辑沿用原实现. */
.guide-bar {
  left: var(--ui-task-x, 3.1%); /* why: 用户本次 UI editor 导出任务条 x=3.1%, 主变量缺失时也保持同一位置 */
  /* why(用户需求3a "任务与左侧卡片冲突就往下挪, 间距同卡片; 卡片少自动回正"): --stack-task-y 由 app.jsx 累加布局算出(卡链底 + 同款 gap),
     冲突时优先生效把任务条下移; 不冲突时 app 清空该变量, 回落 UI editor 导出的 80.4% 原位 */
  top: var(--stack-task-y, var(--ui-task-y, 80.4%));
  bottom: auto;
  /* why(用户改稿"文字长就把框slice后拉长中段"): 宽度随内容(fit-content)增长, 短任务保持导出宽(min-width), 超长封顶(max-width);
     框改 9-slice(border-image): 左右圆角端固定不拉伸, 只中段横向 stretch → 文字再长两端也不变形. 高固定(不再用 aspect-ratio 让宽高联动). */
  width: fit-content;
  min-width: var(--ui-task-w, 42%);
  max-width: 90%;
  height: calc(46 * var(--ui-editor-unit)); /* why: 定高(约46设计px), 让 border-image 中段随宽度拉伸而高不变 */
  display: flex;
  align-items: center;
  gap: calc(6 * var(--ui-editor-unit));
  /* why: 左内边距留给固定 icon, 右留给箭头; 中段是文字, 文字撑宽→border-image 中段拉长 */
  padding: 0 calc(26 * var(--ui-editor-unit)) 0 calc(36 * var(--ui-editor-unit));
  border: 0 solid transparent;
  border-width: 0 calc(23 * var(--ui-editor-unit)); /* why: 保留左右端 23u 透明间距(icon/箭头定位基准不变); 框本身改由下方 ::after 铺满整元素画 */
  /* why(bug fix "任务条左右有线头"): 原来用 border-image 拿未染色的原始 PNG 画左右端帽, 露在染青的 ::after 之外 = 两端灰色"线头".
     删掉 border-image, 端帽统一交给 ::after(下面 extend 到元素两端 + 青色染色滤镜) → 两端与中段同色, 无线头. */
  border-image: none;
  box-shadow: none;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  text-shadow: var(--cm-glass-text-outline);
  overflow: visible;
  transform: scale(var(--ui-task-scale, 1));
  transform-origin: bottom left;
  isolation: isolate;
  /* 用户: 任务提示特效改回蓝色 — 去四色镭射, 恢复青蓝辉光(+黑投影保可读) */
  filter:
    drop-shadow(0 0 2px rgba(126, 230, 255, .6))
    drop-shadow(0 0 7px rgba(103, 232, 255, .55))
    drop-shadow(0 5px 10px rgba(0, 0, 0, .42));
}
.guide-bar.is-upg-yield {
  top: var(--ui-task-yield-y, 82.1%); /* why: 升级抽屉打开时继续给按钮让位, 相对新版底栏高度下移一小段即可 */
}
.guide-bar::before {
  content: "";
  position: absolute;
  /* why(修"外发光比框长一大截"): 玻璃底回到 inset:0(框内) — 保证不外溢成比 PNG 更宽的一条; 外发光已移到 .guide-bar 的 filter:drop-shadow(沿药丸轮廓, 不外溢).
     这里只留框内玻璃磨砂底 + 顶部内高光, 不再自己出外发光。 */
  inset: 0 0 var(--ui-asset-bottom-safe, 0%) 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight, .16)), rgba(255, 255, 255, .035)),
    rgba(8, 22, 34, var(--ui-glass-alpha, .34)); /* why: 任务条 PNG 底下补可调玻璃底, 与主 HUD 统一质感 */
  backdrop-filter: blur(var(--ui-glass-blur, 10px)) saturate(var(--ui-glass-sat, 145%));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur, 10px)) saturate(var(--ui-glass-sat, 145%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26); /* why: 只留玻璃内高光; 外发光挪到 .guide-bar filter, 免矩形超出圆角端 */
  z-index: -1;
  pointer-events: none;
}
.guide-bar-icon,
.guide-bar-arrow {
  position: absolute;
  top: 50%;
  background-position: top center;
  background-size: 100% calc(100% - var(--ui-asset-bottom-safe, 0%));
  background-repeat: no-repeat;
  pointer-events: none;
}
.guide-bar-icon {
  /* why(用户改稿"icon尺寸全程不变"): 尺寸从"框宽10%"(框变宽icon就变大)改成"框高62%"(框高恒定→icon恒定);
     位置也从"框宽7%"改成固定 editor px, 框变宽时 icon 不跟着往右跑, 稳定贴在左端帽里. */
  left: calc(9 * var(--ui-editor-unit));
  height: 62%;
  width: auto;
  aspect-ratio: 36 / 38;
  --tk: #7ee6ff; /* 用户: 任务icon改回蓝色(完成态仍变黄, 见下) */
  /* why(#5): 弃 PNG 改 CSS 绘制剪贴板(板身圆角边框 + 3 横线 + 顶部夹子), 尺寸固定不再"时大时小";
     why(用户改稿"线条太粗"): 边框 2px→1px, 横线高 8%→4.5%, 辉光 6px→3px(粗辉光也读作粗线) */
  background:
    linear-gradient(var(--tk), var(--tk)) no-repeat 50% 36% / 54% 4.5%,
    linear-gradient(var(--tk), var(--tk)) no-repeat 50% 54% / 54% 4.5%,
    linear-gradient(var(--tk), var(--tk)) no-repeat 50% 72% / 54% 4.5%,
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)) no-repeat 0 0 / 100% 100%;
  border: 1px solid var(--tk);
  border-radius: 22%;
  box-sizing: border-box;
  filter: drop-shadow(0 0 3px var(--tk));
  transform: translateY(-50%) translate(var(--ui-task-icon-dx, 0px), var(--ui-task-icon-dy, 0px)) scale(var(--ui-task-icon-scale, 1));
  /* why(用户改稿"完成时变化中心不在图片中心"): 夹子(::before)在盒顶上方(top:-11%)使视觉重心偏上 —
     缩放原点从盒中心(50% 50%)上移到 50% 45%, 让完成弹动绕"剪贴板视觉中心"缩放, 不再感觉偏下 */
  transform-origin: 50% 45%;
}
/* why(#5): 剪贴板顶部夹子; why(用户改稿"线条太粗"): 夹子同步收细 42%x26% → 34%x17% */
.guide-bar-icon::before {
  content: ""; position: absolute; left: 50%; top: -11%;
  width: 34%; height: 17%;
  transform: translateX(-50%);
  background: var(--tk);
  border-radius: 32%;
}
.guide-bar-arrow {
  /* why(用户改稿): 同 icon — 尺寸按框高(恒定), 位置固定, 框变宽时箭头稳定贴右端帽不乱跑 */
  right: calc(7 * var(--ui-editor-unit));
  height: 42%;
  width: auto;
  aspect-ratio: 20 / 33;
  background-image: url("../assets/ui/main-v2/icon_task_arrow.png");
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55));
  transform: translateY(-50%) translate(var(--ui-task-arrow-dx, 0px), var(--ui-task-arrow-dy, 0px)) scale(var(--ui-task-arrow-scale, 1));
  transform-origin: center;
}
.guide-bar-label {
  flex: none;
  color: #74e8ff;
  font-size: var(--ui-task-label-font, 12px);
  font-weight: 900;
  line-height: var(--ui-text-line-safe, 1.12);
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(126, 230, 255, .72);
  transform: translate(var(--ui-task-label-dx, 0px), var(--ui-task-label-dy, 0px));
}
.guide-bar-text {
  min-width: 0;
  padding-left: calc(4 * var(--ui-editor-unit, 1px)); /* why: 白色任务详情与蓝色“任务”标签留出明确间隔，整体向右移且不再裁首字符。 */
  color: #ffffff;
  font-size: var(--ui-task-text-font, 12px);
  font-weight: 600;
  line-height: var(--ui-text-line-safe, 1.12); /* why: guide 可独立加载, fallback 对齐 v2 文字安全行高 */
  letter-spacing: 0;
  /* why(用户改稿"文字长就拉长框"): 文字单行 nowrap 撑宽框(fit-content); 超过框 max-width 90% 才 ellipsis 截断, 不再溢出右端帽外 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left; /* why: 长句从阅读起点产生正向溢出，统一滚动器才能从句首连续播放到句尾。 */
  transform: translate(var(--ui-task-text-dx, 0px), var(--ui-task-text-dy, 0px));
}
.guide-bar-reward {
  display: none;
}
.guide-bar.is-ready {
  border-color: transparent;
  animation: guideUiV2Ready 1.1s ease-in-out infinite; /* why: 保留原完成态 1.1s 心跳提醒, 只改成 PNG 底板发光 */
}
@keyframes guideUiV2Ready {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 210, 130, .34)); }
  50%      { filter: drop-shadow(0 0 16px rgba(255, 210, 130, .78)); }
}
/* why(#5): 完成态 — 剪贴板图标变黄 + 弹跳(scale 独立属性叠加定位 transform 不冲突) */
.guide-bar.is-ready .guide-bar-icon {
  --tk: #ffd23a;
  animation: cmTaskIconBounce .72s cubic-bezier(.34, 1.6, .5, 1) infinite;
}
/* why(用户改稿"缩放旋转不要太大有一点就行, 无位移, 绕图片正中心"): 完成待领取只做微缩放+微旋转(纯 scale/rotate 属性, 零位移),
   绕 transform-origin(已设视觉正中心)脉动 → 完成后 icon 只是"跟着框轻微动一下", 大变化交给框(变黄+发光) */
@keyframes cmTaskIconBounce { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: 1.1; rotate: 3deg; } }
/* why(#5): 完成态 — 整个任务框(::after PNG 底板)由原色染成黄色 + 呼吸发光, 近似"玻璃框变黄" */
.guide-bar.is-ready::after {
  animation: cmTaskFrameYellow 1.3s ease-in-out infinite;
}
@keyframes cmTaskFrameYellow {
  0%, 100% { filter: grayscale(1) sepia(1) saturate(2.2) hue-rotate(6deg) brightness(1.08) drop-shadow(0 0 calc(8 * var(--ui-unit)) rgba(255, 210, 60, .55)); }
  50%      { filter: grayscale(1) sepia(1) saturate(2.6) hue-rotate(6deg) brightness(1.32) drop-shadow(0 0 calc(18 * var(--ui-unit)) rgba(255, 210, 60, .9)); }
}
/* why(#5 part4b): 换新任务时(guide-ui 给 .guide-bar 上按 step 的 key → 重挂)从下方渐显弹入到位.
   用 translate/opacity 独立属性(不占 transform, 与 scale(var(--ui-task-scale)) 叠加); 老任务框上滑消失需 React 退场协调, 列为后续细化. */
@keyframes cmTaskEnter {
  /* why(用户"新任务从底下顶上来渐显"): 从下方 55% 淡入到位, 与退场 cmTaskExit 对称, 干脆不弹晃(去掉 -7% 过冲) */
  0%   { opacity: 0; translate: 0 55%; }
  100% { opacity: 1; translate: 0 0; }
}
/* why(用户"原任务条向上移动并渐隐"): 退场 ghost 上移 55% + 淡出, forwards 停在终态直到被 React 移除 */
@keyframes cmTaskExit {
  0%   { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 -55%; }
}
.guide-bar { animation: cmTaskEnter .4s cubic-bezier(.2, .7, .2, 1); }
.guide-bar-exit {
  animation: cmTaskExit .4s cubic-bezier(.4, 0, .6, 1) forwards !important; /* why: !important 压过 .guide-bar 的 cmTaskEnter; forwards 停淡出终态 */
  pointer-events: none; /* why: 退场 ghost 不接收点击 */
  z-index: 12; /* why: 略低于新任务条(13) — 新条从下顶上时盖在退场旧条上 */
}

/* why: 任务条独立加载在 styles.css 之后, 这里重复声明层级: 玻璃在 PNG 下, 文字/icon 在上. */
.guide-bar {
  --ui-frame-image: url("../assets/ui/main-v2/task_button_base.png");
  --ui-task-frame-hue: var(--ui-tune-task-hue, 209deg); /* why: 用户用实机调色器定稿任务 PNG 色相角为 209deg。 */
  --ui-task-frame-sat: var(--ui-tune-task-sat, .76); /* why: 用户定稿任务 PNG 饱和倍率为 0.76。 */
  --ui-task-frame-bright: var(--ui-tune-task-bright, 1.41); /* why: 用户定稿任务 PNG 亮度倍率为 1.41。 */
  background: none !important;
}
.guide-bar::before,
.guide-bar::after {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe, 0%) 0;
  pointer-events: none;
}
.guide-bar::before {
  z-index: 0;
  border-radius: var(--ui-task-glass-radius, 23px); /* why: 任务玻璃底单独使用半高药丸圆角，贴合 task_button_base.png 两端轮廓；不放大全局玻璃圆角影响其他 UI。 */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .05)),
    var(--ui-tune-task-base, rgba(0, 4, 128, .64)); /* why: 用户用实机调色器定稿深蓝任务玻璃底色与 64% 透明度。 */
  backdrop-filter: blur(var(--ui-glass-blur, 1px)) saturate(var(--ui-glass-sat, 84%));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur, 1px)) saturate(var(--ui-glass-sat, 84%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 16px rgba(255, 255, 255, var(--ui-glass-glow, .06));
}
.guide-bar::after {
  z-index: 1;
  /* why(bug fix "线头"): 框只留这一层染青 ::after(保持原 inset:0 = padding 盒范围, 不外扩),
     配合上面删掉的 border-image → 原来那条青框位置/长度不变, 只是没了外面那截未染色的灰"线头". */
  background: var(--ui-frame-image) top center/100% calc(100% - var(--ui-asset-bottom-safe, 0%)) no-repeat;
  opacity: var(--ui-tune-task-texture-opacity, .77); /* why: 用户定稿任务 PNG 纹理透明度为 77%。 */
  filter:
    grayscale(1)
    sepia(1)
    saturate(var(--ui-task-frame-sat))
    hue-rotate(var(--ui-task-frame-hue))
    brightness(var(--ui-task-frame-bright))
    drop-shadow(0 0 7px hsl(var(--ui-task-frame-hue) 94% 70% / var(--ui-machine-glow-alpha, .32)));
  transition: none;
}
.guide-bar > *:not(.guide-reward-toast) {
  position: relative;
  z-index: 2;
}
/* why(bug fix "任务完成点击后任务条短暂延长"): 领奖浮层 .guide-reward-toast 本该 position:absolute 脱离流,
   但上面 .guide-bar > * 同优先级且更靠后, 把它覆盖成 relative → 进了 flex 流当内联子项撑宽任务条,
   显示 1s 后消失框缩回 = "短暂延长". 用 :not 把它排除, 恢复它自己的 absolute(不占框宽). */
/* why(修"任务条整条重复拖尾残影"): 真机 GPU 下任务条在播放的娃娃机视频上出现"整条(含文字)向右下重复拖尾"的合成残影;
   软件渲染的 headless 复现不出此 GPU 坑, 故按根因修. 根因: ::before 的 backdrop-filter 让任务条进入"实时采样身后视频"
   的合成层, 视频每帧更新而旧层未清 → 拖尾; 任务条恰压在视频最动的中心, 最明显. 玻璃质感本由 task_button_base.png 提供,
   这 1px backdrop 模糊几乎不可见 → 去掉即消除残影, 观感几乎不变. (若仍有残影, 下一步试去 isolation / ::after filter) */
.guide-bar::before {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* why(用户改稿"所有全息框加镭射色散"): 任务条是青色全息皮肤家族一员 — ::before/::after 被玻璃层/PNG 底板占用,
   且 PNG 底板盖住条面(inset 阴影会被压住看不见) → 镭射走"外圈四色光晕"(在 PNG 之外), 重述原青辉光后叠加.
   why(用户改稿"外发光没圆角很突兀"): v2 皮肤曾把 radius 清 0(视觉靠 PNG) — 光晕跟的是元素圆角,
   这里补回 左直角+右圆角(对齐 PNG 形状, 半径同玻璃圆角 var), 光晕就贴着圆角走 */
.guide-bar {
  /* why(用户"外发光比框长一大截/对不准"): 这是最后一条生效的 .guide-bar 规则 — 原矩形 box-shadow(青辉光+四色镭射)跟着"左直角右圆角"的元素圆角走,
     但 PNG 底框是两端都圆的药丸 → 左端方角 + box-shadow 外扩 = 那条比框长一截、对不准的光. 全删; 外发光+镭射统一交给 .guide-bar 的 filter:drop-shadow(沿 PNG 真实 alpha 轮廓, 天生贴边). */
  border-radius: 0 var(--ui-glass-radius, 14px) var(--ui-glass-radius, 14px) 0;
  box-shadow: none;
}
