/* 全站账号组件：顶栏登录/试用/用户名下拉 + 居中弹层（毛玻璃）
   所有选择器 .ptw- 前缀，不与 landing / workspace / user 页面样式冲突 */

body.ptw-auth-open { overflow: hidden; }

/* ---------- 顶栏那一组 ---------- */
.ptw-entry { display: inline-flex; align-items: center; gap: 10px; }
.ptw-btn { appearance: none; font: inherit; font-size: 13px; line-height: 1; padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, .12); background: #fff; color: #1f2430; cursor: pointer; transition: .15s; white-space: nowrap; }
.ptw-btn:hover { border-color: rgba(0, 0, 0, .24); }
.ptw-btn-primary { background: #2f6bff; border-color: #2f6bff; color: #fff; }
.ptw-btn-primary:hover { background: #1e5ae6; border-color: #1e5ae6; }
.ptw-entry-login { background: #1f2430; border-color: #1f2430; color: #fff; }
.ptw-entry-login:hover { background: #000; border-color: #000; }
.ptw-entry-trial { background: transparent; color: #2f6bff; border-color: rgba(47, 107, 255, .45); }
.ptw-entry-trial:hover { background: rgba(47, 107, 255, .08); }

/* 用户名 + 下拉 */
.ptw-chip { position: relative; }
.ptw-chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(0, 0, 0, .12); background: #fff; cursor: pointer; font: inherit; font-size: 13px; color: #1f2430; max-width: 180px; }
.ptw-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptw-chip-caret { font-style: normal; font-size: 10px; color: #8a93a5; }
.ptw-chip-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; background: #fff; border: 1px solid #e6eaf2; border-radius: 10px; box-shadow: 0 10px 26px rgba(20, 26, 40, .12); padding: 6px; z-index: 60; }
.ptw-chip-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: transparent; border-radius: 7px; font: inherit; font-size: 13px; color: #1f2430; text-decoration: none; cursor: pointer; }
.ptw-chip-item:hover { background: #f4f6fb; }
.ptw-chip-logout { color: #c0392b; }

/* ---------- 遮罩 + 卡片 ---------- */
.ptw-auth { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.ptw-auth[hidden] { display: none !important; }
.ptw-auth-backdrop { position: absolute; inset: 0; background: rgba(16, 20, 30, .28); backdrop-filter: blur(10px) saturate(120%); -webkit-backdrop-filter: blur(10px) saturate(120%); }
.ptw-auth-card { position: relative; width: 400px; max-width: 100%; max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; padding: 26px 26px 20px; box-shadow: 0 24px 60px rgba(16, 20, 30, .22); animation: ptwPop .18s ease-out; }
@keyframes ptwPop { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }

.ptw-auth-x { position: absolute; right: 14px; top: 12px; width: 28px; height: 28px; border: 0; background: transparent; font-size: 20px; line-height: 1; color: #9aa2b1; cursor: pointer; border-radius: 8px; }
.ptw-auth-x:hover { background: #f2f4f9; color: #1f2430; }

.ptw-auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.ptw-auth-logo {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .09);
  display: flex; align-items: center; justify-content: center;
}
.ptw-auth-logo svg { height: 30px; width: auto; display: block; }
.ptw-auth-name { display: flex; align-items: center; gap: 14px; }
.ptw-auth-brandcol { display: flex; flex-direction: column; gap: 1px; flex: 0 0 auto; }
.ptw-auth-slogan {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding-left: 14px; border-left: 1px solid #e8edf6;
}
.ptw-auth-slogan p { margin: 0; }
.ptw-auth-l1 { font-size: 12.5px; font-weight: 600; color: #1f2430; line-height: 1.3; }
.ptw-auth-l2 { font-size: 11.5px; color: #8a93a3; line-height: 1.45; }
.ptw-auth-cn { font-size: 17px; font-weight: 700; color: #1f2430; letter-spacing: .5px; line-height: 1.25; }
.ptw-auth-en { display: flex; font-size: 7.5px; line-height: 1.1; letter-spacing: 1.1px; color: #9aa3b2; text-transform: uppercase; }
.ptw-auth-en i { font-style: normal; }
.ptw-auth-brand h2 { margin: 0; font-size: 17px; font-weight: 600; color: #1f2430; }
.ptw-auth-brand p { margin: 5px 0 0; font-size: 12px; line-height: 1.5; color: #6b7280; }
@media (max-width: 480px) {
  .ptw-auth-name { gap: 10px; }
  .ptw-auth-slogan { padding-left: 10px; }
  .ptw-auth-l2 { font-size: 11px; }
}

.ptw-auth-tabs { display: flex; gap: 6px; padding: 4px; background: #f1f4fa; border-radius: 10px; margin-bottom: 16px; }
.ptw-auth-tab { flex: 1; border: 0; background: transparent; padding: 8px 0; border-radius: 8px; font: inherit; font-size: 13px; color: #6b7280; cursor: pointer; }
.ptw-auth-tab.is-active { background: #fff; color: #1f2430; font-weight: 600; box-shadow: 0 1px 3px rgba(31, 36, 48, .08); }

.ptw-auth-form { display: flex; flex-direction: column; gap: 12px; }
.ptw-auth-form[hidden] { display: none !important; }
.ptw-auth-form label { display: flex; flex-direction: column; gap: 6px; }
.ptw-auth-form label > span { font-size: 12px; color: #6b7280; }
.ptw-auth-form input[type="email"], .ptw-auth-form input[type="password"], .ptw-auth-form input[type="text"] { height: 38px; padding: 0 12px; border: 1px solid #e6eaf2; border-radius: 9px; font: inherit; font-size: 13px; color: #1f2430; outline: none; }
.ptw-auth-form input:focus { border-color: #2f6bff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.ptw-auth-agree { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; font-size: 12px; color: #6b7280; }
.ptw-auth-agree input { margin: 2px 0 0; flex: 0 0 auto; }
.ptw-auth-agree span { font-size: 12px; color: #6b7280; line-height: 1.55; }
.ptw-auth-agree a { color: #2f6bff; text-decoration: none; }
.ptw-auth-agree a:hover { text-decoration: underline; }
.ptw-auth-submit { height: 40px; margin-top: 4px; border: 0; border-radius: 10px; background: #2f6bff; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ptw-auth-submit:hover { background: #1e5ae6; }

.ptw-auth-msg {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 9999; margin: 0; min-height: 0; padding: 10px 18px;
  max-width: min(86vw, 520px); border-radius: 10px;
  background: rgba(17, 24, 39, .86); color: #fff;
  font-size: 13px; line-height: 1.5; text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .28);
  display: none; pointer-events: none;
}
.ptw-auth-msg:not(:empty) { display: block; }
.ptw-auth-foot { margin-top: 4px; font-size: 12px; }
.ptw-auth-foot a { color: #6b7280; text-decoration: none; }
.ptw-auth-foot a:hover { color: #2f6bff; }

/* ---------- 试用说明 ---------- */
.ptw-trial-card { position: relative; width: 440px; max-width: 100%; max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 24px 60px rgba(16, 20, 30, .22); }
.ptw-trial-card h3 { margin: 0; font-size: 17px; font-weight: 600; color: #1f2430; }
.ptw-trial-sub { margin: 6px 0 16px; font-size: 12px; color: #6b7280; }
.ptw-trial-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.ptw-trial-steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 2px 10px; font-size: 13px; color: #1f2430; }
.ptw-trial-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: rgba(47, 107, 255, .1); color: #2f6bff; font-size: 12px; display: flex; align-items: center; justify-content: center; grid-row: span 2; }
.ptw-trial-steps b { font-weight: 600; }
.ptw-trial-steps span { font-size: 12px; color: #6b7280; }
.ptw-trial-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 560px) {
  .ptw-entry { gap: 6px; }
  .ptw-entry-trial { display: none; }      /* 窄屏先收掉试用，避免顶栏挤爆 */
  .ptw-auth-card, .ptw-trial-card { width: 100%; padding: 20px; }
}

/* ---- 第 6 步：左下角积分 / 试用提示条 ---- */
.ptw-bill {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(24, 28, 34, .74); color: #fff;
  font: 12px/1.5 -apple-system, 'PingFang SC', system-ui, sans-serif;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.ptw-bill:hover { transform: scale(1.03); }
/* 桌面端：并进工作台状态条那一行（右端），与左侧「已添加 N 张图片…」同字号同基线 */
.ptw-bill.in-status {
  position: static; left: auto; right: auto; top: auto; bottom: auto;
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  font: 12px/1.4 -apple-system, 'PingFang SC', system-ui, sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
  pointer-events: auto;
  transform: none;
  white-space: nowrap;
}
.ptw-bill.in-status:hover { transform: none; }
.ptw-bill[data-logged="0"] { background: rgba(29, 78, 216, .92); }
.ptw-bill-txt { white-space: nowrap; }
.ptw-bill-more { color: #cfe0ff; text-decoration: none; white-space: nowrap; }
.ptw-bill-more:hover { text-decoration: underline; }
/* 桌面：积分条贴在第二列的右下角（跟着三列布局走，不再固定在最左边压缩略列）；
   手机：整条通栏悬浮在页面底部 */
@media (min-width: 769px) {
  .ptw-bill { left: auto; right: calc(20px + clamp(460px, 44vw, 860px) + 20px); }
}
@media (max-width: 768px) {
  /* 手机：底部这条是「解析 + 积分」合成的一条 ——
     浅灰磨砂（半透明白 + 背景模糊）、10px 圆角、左右各 12px、贴底 10px，高度沿用原来的 32px */
  .ptw-bill {
    left: 12px; right: 12px; bottom: 10px;
    border-radius: 10px;
    padding: 3px 8px;
    gap: 6px;
    justify-content: space-between;
    /* 整条本身就是一块磨砂水晶：和原来那颗解析球同一套径向渐变（左上偏亮 → 右下偏灰），
       只是把每档颜色压上半透明，底下内容还能透过来 */
    background:
      radial-gradient(130% 170% at 30% 18%,
        rgba(255, 255, 255, .74) 0%,
        rgba(241, 245, 250, .66) 52%,
        rgba(219, 226, 235, .6) 100%);
    color: #4b5563;
    box-shadow: 0 5px 16px -6px rgba(31, 41, 55, .22), 0 1px 2px rgba(31, 41, 55, .08),
      inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    backdrop-filter: blur(12px) saturate(1.15);
  }
  .ptw-bill:hover { transform: none; }          /* 整条不缩放，动效交给解析块 */
  .ptw-bill[data-logged="0"] {                    /* 未登录也用同一套浅灰磨砂水晶 */
    background:
      radial-gradient(130% 170% at 30% 18%,
        rgba(255, 255, 255, .74) 0%,
        rgba(241, 245, 250, .66) 52%,
        rgba(219, 226, 235, .6) 100%);
    color: #4b5563;
  }
  .ptw-bill-more { color: #3b82f6; }
  /* 左段：解析 */
  .ptw-bill-parse { flex: 0 0 46%; display: flex; min-width: 0; }
  /* 右段：积分 · 1 页扣 1 分（贴右） */
  .ptw-bill-txt {
    flex: 1 1 auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 11px; color: #98a2b3;      /* 比「解析」小一号、浅一档，主次分开 */
  }
  .ptw-bill-more { flex: 0 0 auto; font-size: 11px; }
  /* 解析块：条内 26px 高、8px 圆角、文字居中；磨砂水晶底沿用，但和浅灰条靠描边区分 */
  /* 解析块不再自己画一块水晶 —— 整条已经是水晶了，这里只留文字和点击区 */
  .ptw-bill .btn-parse.is-flow {
    position: static; margin: 0; width: 100%; height: 26px;
    border-radius: 8px; font-size: 12.5px;
    justify-self: auto; align-self: auto; z-index: 1;
    background: transparent; box-shadow: none; color: #4b5563;
    font-weight: 600;
    /* 白色 1px 错位描边（右下），看着像刻进水晶里的凹字 */
    text-shadow: 1px 1px 0 rgba(255, 255, 255, .95);
    transition: color .15s ease, scale .12s ease;
  }
  .ptw-bill .btn-parse:hover { color: #409eff; }
  /* 解析块自身不再扩散光环（整条已经在发光，双层会打架） */
  .ptw-bill .btn-parse::before,
  .ptw-bill .btn-parse::after { border-radius: 8px; animation: none; box-shadow: none; }
  /* 光环铺在「整条」上：同样的 2.4s 节奏 + 错峰 0.8s，扩散半径 7 / 14px，
     颜色跟随解析状态（idle 蓝 / 完成绿），浅灰底上看得见 */
  .ptw-bill { --halo: 64, 158, 255; }
  .ptw-bill::before, .ptw-bill::after {
    content: ''; position: absolute; inset: 0;
    border-radius: 10px; pointer-events: none;
  }
  .ptw-bill::before { animation: bill-halo-1 2.4s ease-out infinite; }
  .ptw-bill::after  { animation: bill-halo-2 2.4s ease-out .8s infinite; }
  .ptw-bill:has(.btn-parse.parse-done) { --halo: 103, 194, 58; }
  /* 加载 / 完成时整条一起变色，不再只是左边一小块 */
  .ptw-bill:has(.btn-parse.is-loading) {
    background: radial-gradient(130% 170% at 30% 18%,
      rgba(121, 187, 255, .96) 0%, rgba(64, 158, 255, .94) 58%, rgba(45, 138, 235, .9) 100%);
    color: #fff;
  }
  .ptw-bill:has(.btn-parse.is-loading) .ptw-bill-txt,
  .ptw-bill:has(.btn-parse.is-loading) .ptw-bill-more { color: #fff; }
  .ptw-bill:has(.btn-parse.parse-done) {
    background: radial-gradient(130% 170% at 30% 18%,
      rgba(149, 212, 117, .96) 0%, rgba(103, 194, 58, .94) 58%, rgba(85, 176, 45, .9) 100%);
    color: #fff;
  }
  .ptw-bill:has(.btn-parse.parse-done) .ptw-bill-txt,
  .ptw-bill:has(.btn-parse.parse-done) .ptw-bill-more { color: #fff; }
  .ptw-bill .btn-parse.is-loading,
  .ptw-bill .btn-parse.parse-done { background: transparent; box-shadow: none; color: #fff; }
  /* 「完成」白字 + 1px 深绿错位底，绿底上不糊边 */
  .ptw-bill .btn-parse.parse-done { text-shadow: 1px 1px 0 rgba(67, 128, 34, .9); }
  .ptw-bill .btn-parse.parse-done:hover { text-shadow: 1px 1px 0 rgba(67, 128, 34, .9); }
}
/* 整条的光环：比解析球那两圈更贴边，避免 366 宽的条甩出大片光斑 */
@keyframes bill-halo-1 {
  0%        { box-shadow: 0 0 0 0 rgba(var(--halo), .28); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(var(--halo), 0); }
}
@keyframes bill-halo-2 {
  0%        { box-shadow: 0 0 0 0 rgba(var(--halo), .18); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(var(--halo), 0); }
}

/* ============ v2.80：手机端底部操作栏重构 ============ */
@media (max-width: 768px) {
  .ptw-bill {
    left: 12px; right: 12px; bottom: 12px;
    align-items: center; gap: 10px;
    padding: 8px 10px 8px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
    box-shadow: 0 -2px 16px rgba(31, 41, 55, .10), 0 12px 30px -12px rgba(31, 41, 55, .30),
      inset 0 1px 0 rgba(255, 255, 255, .9);
    color: #5b6478;
  }
  .ptw-bill:hover { transform: none; }
  .ptw-bill[data-logged="0"] { background: rgba(255, 255, 255, .72); color: #5b6478; }

  /* 左：积分信息 + 明细，上下两行 */
  .ptw-bill-info {
    order: 1; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  }
  .ptw-bill-txt {
    text-align: left; font-size: 12px; color: #8b95a6;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
  }
  .ptw-bill-more { font-size: 12px; color: #4f74d6; font-weight: 500; }

  /* 右：解析大按钮（宽 60%） */
  .ptw-bill-parse { order: 2; flex: 0 0 60%; display: flex; min-width: 0; }
  .ptw-bill .btn-parse.is-flow {
    width: 100%; height: 44px; margin: 0;
    border-radius: 12px; font-size: 15px; font-weight: 700;
    color: #fff; background: linear-gradient(135deg, #5b8cff 0%, #2f6bff 100%);
    box-shadow: 0 8px 18px rgba(47, 107, 255, .34);
    text-shadow: none;
  }
  .ptw-bill .btn-parse.is-flow:hover { color: #fff; filter: brightness(1.04); }
  .ptw-bill .btn-parse::before,
  .ptw-bill .btn-parse::after { display: none; }
  .ptw-bill::before, .ptw-bill::after { display: none; }

  /* 加载 / 完成：整条仍给出状态色，但按钮回到半透明，保持可读 */
  .ptw-bill:has(.btn-parse.is-loading) .btn-parse.is-flow,
  .ptw-bill:has(.btn-parse.parse-done) .btn-parse.is-flow {
    background: rgba(255, 255, 255, .22);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, .35);
  }
}

/* 桌面：积分 + 明细做成浅灰微标签 */
@media (min-width: 769px) {
  .ptw-bill.in-status {
    background: #f3f5f9; color: #5b6478;
    border: 1px solid #eceff5; box-shadow: none;
    padding: 3px 10px;
  }
  .ptw-bill.in-status .ptw-bill-more { color: #2f6bff; font-weight: 600; }
}

/* 桌面/手机通用：积分 + 明细同一行 */
.ptw-bill-info { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

@media (min-width: 769px) {
  .ptw-bill-info { flex: 0 0 auto; white-space: nowrap; }
}

/* ============ v2.81：手机端底部栏「去壳」——积分胶囊 + 独立解析长胶囊 ============ */
@media (max-width: 768px) {
  /* 底栏本身不再是一块白色底托：完全透明、无边框、无阴影，只当布局容器 */
  .ptw-bill,
  .ptw-bill[data-logged="0"],
  .ptw-bill:has(.btn-parse.is-loading),
  .ptw-bill:has(.btn-parse.parse-done) {
    left: 14px; right: 14px; bottom: 20px;
    align-items: center; gap: 12px;
    padding: 0; border: 0; border-radius: 0;
    background: transparent; color: #5b6478;
    box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .ptw-bill:hover { transform: none; }
  .ptw-bill::before, .ptw-bill::after { display: none; }

  /* 左：积分 · 明细 —— 独立的浅灰小胶囊，左下巴掌大的一颗 */
  .ptw-bill-info {
    order: 1; flex: 0 0 auto; min-width: 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
    padding: 6px 12px 7px; border-radius: 14px;
    background: rgba(244, 246, 250, .82);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    backdrop-filter: blur(10px) saturate(1.1);
    box-shadow: 0 6px 16px -8px rgba(15, 23, 42, .30), inset 0 1px 0 rgba(255, 255, 255, .8);
  }
  .ptw-bill-txt {
    flex: 0 0 auto; max-width: 108px;
    font-size: 11px; line-height: 1.35; color: #8b95a6;
    text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .ptw-bill-more {
    flex: 0 0 auto; font-size: 11.5px; line-height: 1.35;
    color: #2f6bff; font-weight: 600;
  }

  /* 右：解析 —— 不再套在任何框里，65% 宽的蓝色渐变长胶囊，右下独立悬浮 */
  .ptw-bill-parse {
    order: 2; flex: 0 0 65%; margin-left: auto;
    display: flex; min-width: 0;
  }
  .ptw-bill .btn-parse.is-flow {
    width: 100%; height: 48px; margin: 0; padding: 0 18px;
    border-radius: 999px; font-size: 16px; font-weight: 700;
    color: #fff; text-shadow: none;
    background: linear-gradient(135deg, #6aa5ff 0%, #3b82f6 52%, #2563eb 100%);
    box-shadow: 0 8px 20px rgba(59, 130, 246, .30),
      0 2px 6px rgba(37, 99, 235, .18),
      inset 0 1px 0 rgba(255, 255, 255, .35);
    transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  }
  .ptw-bill .btn-parse.is-flow:hover {
    color: #fff; filter: brightness(1.05);
    box-shadow: 0 10px 26px rgba(59, 130, 246, .38),
      0 2px 6px rgba(37, 99, 235, .18),
      inset 0 1px 0 rgba(255, 255, 255, .35);
  }
  /* 按下时的物理微缩（覆盖全局 0.92，力度更轻） */
  .ptw-bill .btn-parse.is-flow:active { scale: .96; }
  .ptw-bill .btn-parse::before,
  .ptw-bill .btn-parse::after { display: none; }

  /* 加载 / 完成：只让按钮自己变色，底栏与左胶囊保持原样 */
  .ptw-bill:has(.btn-parse.is-loading) .btn-parse.is-flow {
    background: linear-gradient(135deg, #79bbff 0%, #409eff 60%, #2f8ee8 100%);
    box-shadow: 0 8px 20px rgba(64, 158, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
  }
  .ptw-bill:has(.btn-parse.parse-done) .btn-parse.is-flow {
    background: linear-gradient(135deg, #95d475 0%, #67c23a 60%, #55a82d 100%);
    box-shadow: 0 8px 20px rgba(103, 194, 58, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
  }
}

/* v2.81 配套：手机端内容底部留出悬浮栏空间，最后一屏不被解析胶囊压住 */
@media (max-width: 768px) {
  .layout { padding-bottom: 44px; }
  .footer { margin-bottom: 0; }
}

/* ============ v2.82：手机端底部栏终极重构 · 毛玻璃渐变托底 + 极简积分 + 呼吸解析 ============ */
@media (max-width: 768px) {
  .ptw-bill,
  .ptw-bill[data-logged="0"],
  .ptw-bill:has(.btn-parse.is-loading),
  .ptw-bill:has(.btn-parse.parse-done) {
    left: 0; right: 0; bottom: 0;
    padding: 24px 18px calc(16px + env(safe-area-inset-bottom));
    gap: 12px;
    align-items: flex-end;
    justify-content: space-between;
    background: transparent; border: 0; border-radius: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .ptw-bill:hover { transform: none; }

  /* 托底独立一层：底部实、往上淡出到 0，两侧随容器通栏不可见；自带 12px 毛玻璃 */
  .ptw-bill::before {
    content: ''; position: absolute; inset: 0; display: block;
    z-index: 0; pointer-events: none;
    background: linear-gradient(to top,
      rgba(255, 255, 255, .94) 0%,
      rgba(255, 255, 255, .82) 32%,
      rgba(255, 255, 255, .40) 66%,
      rgba(255, 255, 255, 0) 100%);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
    backdrop-filter: blur(12px) saturate(1.15);
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 44%, transparent 100%);
    mask-image: linear-gradient(to top, #000 0%, #000 44%, transparent 100%);
  }
  .ptw-bill::after { display: none; }
  .ptw-bill-info, .ptw-bill-parse { position: relative; z-index: 1; }

  /* 左：一行浅灰说明，无底无框、不要「明细 →」 */
  .ptw-bill-info {
    order: 1; flex: 0 0 auto; min-width: 0; max-width: 52%;
    display: block; padding: 0 0 7px 2px;
    background: none; border: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .ptw-bill-txt {
    display: block; max-width: 100%;
    font-size: 12px; line-height: 1.45; color: #94a3b8;
    text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .ptw-bill-more { display: none; }

  /* 右：解析 —— 自适应宽度胶囊，右下角，左右留边距 */
  .ptw-bill-parse { order: 2; flex: 0 0 auto; margin-left: auto; display: flex; min-width: 0; }
  .ptw-bill .btn-parse.is-flow {
    width: auto; min-width: 122px; height: 46px; padding: 0 30px;
    border-radius: 999px; font-size: 15px; font-weight: 700; letter-spacing: .4px;
    color: #fff; text-shadow: none;
    background: linear-gradient(135deg, #6aa5ff 0%, #3b82f6 55%, #2563eb 100%);
    animation: ptwParseBreath 3.2s ease-in-out infinite;
    transition: scale .12s ease, filter .18s ease;
  }
  .ptw-bill .btn-parse.is-flow:hover { color: #fff; filter: brightness(1.05); animation: ptwParseBreath 3.2s ease-in-out infinite; }
  .ptw-bill .btn-parse.is-flow:active { scale: .96; }
  .ptw-bill .btn-parse::before,
  .ptw-bill .btn-parse::after { display: none; }

  /* 状态：只换按钮自己的底色和光环色 */
  .ptw-bill:has(.btn-parse.is-loading) .btn-parse.is-flow {
    background: linear-gradient(135deg, #79bbff 0%, #409eff 55%, #2f8ee8 100%);
    animation-name: ptwParseBreathBlue;
  }
  .ptw-bill:has(.btn-parse.parse-done) .btn-parse.is-flow {
    background: linear-gradient(135deg, #95d475 0%, #67c23a 55%, #55a82d 100%);
    animation-name: ptwParseBreathGreen;
  }
}
@keyframes ptwParseBreath {
  0%, 100% { box-shadow: 0 10px 24px rgba(59, 130, 246, .26), 0 2px 6px rgba(37, 99, 235, .14), 0 0 0 0 rgba(59, 130, 246, .18); }
  55%      { box-shadow: 0 12px 28px rgba(59, 130, 246, .32), 0 2px 8px rgba(37, 99, 235, .14), 0 0 0 11px rgba(59, 130, 246, 0); }
}
@keyframes ptwParseBreathBlue {
  0%, 100% { box-shadow: 0 10px 24px rgba(64, 158, 255, .28), 0 0 0 0 rgba(64, 158, 255, .26); }
  55%      { box-shadow: 0 12px 30px rgba(64, 158, 255, .34), 0 0 0 13px rgba(64, 158, 255, 0); }
}
@keyframes ptwParseBreathGreen {
  0%, 100% { box-shadow: 0 10px 24px rgba(103, 194, 58, .28), 0 0 0 0 rgba(103, 194, 58, .26); }
  55%      { box-shadow: 0 12px 30px rgba(103, 194, 58, .34), 0 0 0 13px rgba(103, 194, 58, 0); }
}

/* ============ v2.83：手机端底栏左字恒灰 + 深灰圆角底 + 与解析垂直居中对齐 ============ */
@media (max-width: 768px) {
  .ptw-bill { align-items: center; }
  .ptw-bill-info {
    display: flex; align-items: center;
    max-width: 50%; padding: 0 0 0 2px;
  }
  /* 任何状态（待解析 / 解析中 / 完成）都保持灰字，不再变白 */
  .ptw-bill .ptw-bill-txt,
  .ptw-bill:has(.btn-parse.is-loading) .ptw-bill-txt,
  .ptw-bill:has(.btn-parse.parse-done) .ptw-bill-txt,
  .ptw-bill[data-logged="0"] .ptw-bill-txt {
    color: #94a3b8;
    font-size: 12px; line-height: 1.3;
    padding: 5px 11px; border-radius: 999px;
    background: rgba(51, 65, 85, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
}

/* ============ v2.84：只给数字加圆角深色底，文字保持浅灰 ============ */
.ptw-bill-num { font-style: normal; }

@media (max-width: 768px) {
  /* 整句不再有底：撤掉上版的整块胶囊 */
  .ptw-bill .ptw-bill-txt,
  .ptw-bill:has(.btn-parse.is-loading) .ptw-bill-txt,
  .ptw-bill:has(.btn-parse.parse-done) .ptw-bill-txt,
  .ptw-bill[data-logged="0"] .ptw-bill-txt {
    padding: 0; background: none; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    color: #94a3b8;
  }
  /* 数字：圆角深灰底 + 亮字 */
  .ptw-bill-txt .ptw-bill-num {
    display: inline-block; margin: 0 4px 0 3px; padding: 2px 6px;
    border-radius: 8px;
    background: #e4e9f0;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .38);
    color: #1e293b; font-weight: 700; font-size: 11.5px; line-height: 1.35;
    letter-spacing: .2px;
  }
}

/* ===== v2.92：手机端积分文案改「剩余积分 x · 解析 1页 -1分」，加长后放宽左栏防省略 ===== */
@media (max-width: 768px) {
  .ptw-bill-info { max-width: 62%; }
  .ptw-bill .ptw-bill-txt { font-size: 11.5px; }
  .ptw-bill-txt .ptw-bill-num { margin: 0 3px 0 2px; padding: 2px 5px; }
}
