/* ============ 客户端 H5 门户（公开链接 · 白标尊享） ============ */
body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 40px 24px;
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(29,78,216,.05), transparent),
    radial-gradient(700px 400px at 0% 100%, rgba(14,116,144,.04), transparent), var(--canvas);
  flex-wrap: wrap;
}

/* ---------- 说明侧栏 ---------- */
.side-info { width: 320px; }
.side-info .logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.side-info .logo-row .lg { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #1D4ED8, #0E7490);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.side-info h1 { font-size: 20px; letter-spacing: -.01em; }
.side-info h1 small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 3px; letter-spacing: .02em; }
.side-info ul { list-style: none; margin-top: 6px; display: flex; flex-direction: column; gap: 13px; }
.side-info li { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.side-info li .i { color: var(--brand); margin-top: 2px; }
.side-info li b { color: var(--ink); }
.wx-btn { margin-top: 22px; }

/* ---------- 手机 ---------- */
.phone {
  position: relative; width: 392px; height: 800px; border-radius: 48px; background: #0B0F19;
  padding: 12px; box-shadow: 0 40px 100px -30px rgba(15,23,42,.45), 0 0 0 1px rgba(15,23,42,.08); flex: none;
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden;
  background: #F6F8FB; display: flex; flex-direction: column; }
.notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 26px;
  background: #0B0F19; border-radius: 999px; z-index: 60; }
.statusbar { flex: none; height: 44px; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 26px 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.statusbar .sic { display: flex; gap: 5px; align-items: center; }

/* 顶部品牌头 */
.h5-head { flex: none; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 10px; }
.h5-head .row1 { display: flex; align-items: center; gap: 10px; }
.h5-head .co { display: flex; align-items: center; gap: 8px; }
.h5-head .co .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #0F172A, #1E3A8A);
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.h5-head .co b { font-size: 14px; }
.h5-head .co small { display: block; font-size: 10.5px; color: var(--ink-3); }
.h5-head .team { margin-left: auto; display: flex; align-items: center; }
.h5-head .team .avatar { width: 26px; height: 26px; font-size: 10px; border: 2px solid #fff; margin-left: -7px; }
.h5-head .team .online { font-size: 10.5px; color: var(--emerald); display: flex; align-items: center; gap: 4px; margin-right: 8px; }
.h5-head .online i { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.h5-head .row2 { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--ink-3);
  background: var(--slate-soft); border: 1px solid var(--line-soft); border-radius: 8px; padding: 5px 9px; }
.h5-head .row2 .i { width: 12px; height: 12px; color: var(--emerald); }

/* 消息区 */
.h5-msgs { flex: 1; overflow-y: auto; padding: 14px 14px 8px; }
.h5-sys { text-align: center; font-size: 10.5px; color: var(--ink-3); margin: 4px 0 12px; line-height: 1.6; }
.h5-sys .badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.h5-sys .badge .i { width: 12px; height: 12px; color: var(--emerald); }

.h5m { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.h5m .avatar { width: 30px; height: 30px; font-size: 11px; }
.h5m .b { max-width: 76%; }
.h5m .who { font-size: 10.5px; color: var(--ink-3); margin: 0 2px 3px; }
.h5m .txt { background: #fff; border: 1px solid var(--line); border-radius: 3px 12px 12px 12px; padding: 8px 11px;
  font-size: 13px; line-height: 1.55; box-shadow: var(--shadow-sm); word-break: break-word; }
.h5m.me { flex-direction: row-reverse; }
.h5m.me .txt { background: var(--brand-soft); border-color: var(--brand-border); border-radius: 12px 3px 12px 12px; }
.h5m .tm { font-size: 9.5px; color: var(--ink-3); margin: 3px 2px 0; text-align: right; }

.h5-attach { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 9px; background: var(--slate-soft);
  border: 1px solid var(--line); border-radius: 8px; }
.h5-attach b { font-size: 11.5px; display: block; }
.h5-attach span { font-size: 10px; color: var(--ink-3); }

/* 确认卡 */
.h5-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); max-width: 86%; }
.h5-card .ch { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
.h5-card .ch b { font-size: 12px; }
.h5-card .cb { padding: 9px 11px; font-size: 11px; color: var(--ink-2); display: flex; flex-direction: column; gap: 5px; }
.h5-card .cb .mono { font-size: 10px; color: var(--ink-3); }
.h5-card .cf { padding: 9px 11px; border-top: 1px solid var(--line-soft); background: var(--panel-2); }
.h5-card .cf .go { width: 100%; height: 36px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px; }
.h5-card .cf .go:active { background: var(--brand-strong); }
.h5-card.signed .cf .go { background: var(--emerald); pointer-events: none; }

/* 输入区 */
.h5-input { flex: none; display: flex; gap: 8px; padding: 10px 12px calc(14px); background: #fff; border-top: 1px solid var(--line); align-items: center; }
.h5-input button { width: 34px; height: 34px; border-radius: 50%; color: var(--ink-3); display: flex; align-items: center; justify-content: center; flex: none; }
.h5-input button:active { background: var(--slate-soft); }
.h5-input input { flex: 1; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--slate-soft);
  padding: 0 14px; font-size: 13px; outline: 0; }
.h5-input input:focus { border-color: #B6C6F0; background: #fff; }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: ty 1s ease infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ty { 40% { transform: translateY(-4px); opacity: .5; } }

/* 微信通知横幅 */
.wx-banner { position: absolute; top: 0; left: 0; right: 0; z-index: 80; padding: 46px 12px 10px;
  background: rgba(15,23,42,.82); backdrop-filter: blur(14px); color: #fff; cursor: pointer;
  transform: translateY(-110%); transition: transform .45s cubic-bezier(.32,.72,.25,1); }
.wx-banner.show { transform: translateY(0); }
.wx-banner .br { display: flex; align-items: center; gap: 9px; }
.wx-banner .ic { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg,#2563EB,#0E7490);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.wx-banner b { font-size: 12px; display: block; }
.wx-banner p { font-size: 11.5px; color: #CBD5E1; margin-top: 1px; }
.wx-banner .now { margin-left: auto; font-size: 10px; color: #94A3B8; flex: none; }

/* 签批浮层（手机内） */
.sheet { position: absolute; inset: 0; z-index: 70; background: rgba(15,23,42,.5); backdrop-filter: blur(3px);
  display: none; align-items: flex-end; }
.sheet.show { display: flex; }
.sheet-in { width: 100%; max-height: 94%; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0;
  padding: 14px 18px 26px; animation: sheet-in .32s cubic-bezier(.32,.72,.25,1); }
@keyframes sheet-in { from { transform: translateY(60px); opacity: 0; } }
.sheet-grip { width: 38px; height: 4.5px; border-radius: 99px; background: #CBD5E1; margin: 0 auto 14px; }
.sheet h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.sheet .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.dwg-box { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0D1424; }
.dwg-box svg { display: block; width: 100%; }
.dwg-cap { display: flex; align-items: center; gap: 6px; padding: 8px 11px; background: var(--slate-soft); font-size: 10.5px; color: var(--ink-2); }
.pledge { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin: 6px 0 12px; }
.pledge h4 { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; margin-bottom: 8px; }
.pledge .pr { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; }
.pledge .pr span { color: var(--ink-3); }
.pledge .pr b { font-weight: 500; }
.sign-area { margin-top: 4px; }
.sign-canvas-wrap { position: relative; height: 120px; border: 1.5px dashed #CBD5E1; border-radius: 12px; background:
  linear-gradient(#fff 96%, transparent), repeating-linear-gradient(0deg, transparent 0 27px, rgba(148,163,184,.16) 27px 28px); overflow: hidden; }
.sign-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sign-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; pointer-events: none; }
.sign-actions { display: flex; gap: 10px; margin-top: 12px; }
.sign-actions .primary { flex: 1; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 14.5px; font-weight: 600; }
.sign-actions .ghost { padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }

/* 成功态 */
.success { text-align: center; padding: 26px 10px 10px; }
.success .ok { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; background: var(--emerald-soft);
  border: 1px solid var(--emerald-border); color: var(--emerald); display: flex; align-items: center; justify-content: center;
  animation: pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.success h3 { justify-content: center; }
.success .meta { margin-top: 14px; font-size: 12px; color: var(--ink-2); background: var(--slate-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; text-align: left; line-height: 1.9; }
.success .meta b { float: right; font-weight: 500; color: var(--ink); }
.success .done-btn { margin-top: 16px; width: 100%; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }

/* ---------- 语音消息 / 撤回（H5） ---------- */
.h5-voice { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.h5-voice .vplay { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none; }
.h5-voice .vplay.playing { background: var(--emerald); animation: pulse-dot 1.2s ease infinite; }
.h5-voice .vbars { display: flex; align-items: center; gap: 2px; height: 16px; }
.h5-voice .vbars i { width: 2px; border-radius: 2px; background: var(--brand); opacity: .7; }
.h5-voice .vdur { font-size: 10.5px; color: var(--ink-3); margin-left: auto; }
.h5m.me .h5-voice .vbars i, .h5m.me .h5-voice .vplay { background: var(--brand); }
.vtag { margin-top: 5px; font-size: 10px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.vtag .i { width: 11px; height: 11px; color: var(--emerald); }
.h5-tomb { font-size: 11.5px; color: var(--ink-3); background: var(--slate-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 11px; display: inline-flex; gap: 6px; align-items: center; }
.h5-tomb .i { width: 12px; height: 12px; }
#h5Mic.rec-on { color: #fff; background: var(--red); animation: pulse-dot 1.2s ease infinite; }
