/* =========================================================
   林默邮箱 · 前端设计系统
   纯原生 CSS · 零依赖 · 支持浅色/深色 · 高级丝滑动画
   作者: WorkBuddy  (架构级整洁注释)
   ========================================================= */

/* ---------- 1. 设计令牌 (Design Tokens) ---------- */
:root {
  /* 浅色主题 */
  --bg-grad-1: #e8ecff;
  --bg-grad-2: #f3e8ff;
  --bg-grad-3: #e6f7ff;
  --surface:    #ffffff;
  --surface-2:  #f5f6fb;
  --surface-3:  #eef0f7;
  --text:       #16182b;
  --muted:      #6b7088;
  --faint:      #9aa0b8;
  --border:     #ecedf4;
  --primary:    #5b5bf0;
  --primary-2:  #8b5cf6;
  --accent:     #ec4899;
  --success:    #16a34a;
  --danger:     #ef4444;
  --primary-soft: rgba(91, 91, 240, .12);
  --shadow-sm:  0 2px 8px -4px rgba(40, 40, 90, .18);
  --shadow:     0 14px 38px -16px rgba(40, 40, 90, .30);
  --shadow-lg:  0 24px 60px -22px rgba(40, 40, 90, .42);
  --radius:     22px;
  --radius-sm:  14px;
  --nav-h:      74px;
  --top-h:      60px;
  --ease:       cubic-bezier(.22, 1, .36, 1);
  --ease-soft:  cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --bg-grad-1: #14173a;
  --bg-grad-2: #2a1140;
  --bg-grad-3: #0c2233;
  --surface:    #141728;
  --surface-2:  #1a1e31;
  --surface-3:  #21263c;
  --text:       #eef0f8;
  --muted:      #9096ad;
  --faint:      #646a85;
  --border:     #272c40;
  --primary:    #7c7cff;
  --primary-2:  #a78bfa;
  --accent:     #f472b6;
  --primary-soft: rgba(124, 124, 255, .16);
  --shadow-sm:  0 2px 10px -4px rgba(0, 0, 0, .5);
  --shadow:     0 16px 44px -18px rgba(0, 0, 0, .6);
  --shadow-lg:  0 28px 70px -24px rgba(0, 0, 0, .7);
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-grad-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden; /* 滚动交给 .page */
  transition: background .5s var(--ease-soft);
}

/* 环境氛围光斑 (纯 CSS 渐变, 随主题切换) */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 12% 8%,  var(--bg-grad-2) 0%, transparent 60%),
    radial-gradient(55% 45% at 92% 18%, var(--bg-grad-3) 0%, transparent 55%),
    radial-gradient(70% 60% at 50% 100%, var(--bg-grad-1) 0%, transparent 70%);
  filter: saturate(1.05);
  animation: ambient 18s ease-in-out infinite alternate;
}
@keyframes ambient {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -14px, 0) scale(1.06); }
}

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

/* ---------- 3. 应用骨架 ---------- */
.app {
  position: relative; z-index: 1;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 520px) {
  .app { height: min(920px, 96dvh); margin: 2dvh auto; border-radius: 30px; }
}

/* 顶部栏 */
.topbar {
  height: var(--top-h);
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand .logo {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 6px 16px -6px var(--primary);
}
.topbar .title { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; color: var(--muted);
  transition: background .2s var(--ease-soft), color .2s, transform .15s var(--ease);
}
.topbar .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.topbar .icon-btn:active { transform: scale(.9); }

/* 内容区 (可滚动) */
.page {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 20px 18px calc(var(--nav-h) + 24px);
  scroll-behavior: smooth;
}
.page::-webkit-scrollbar { width: 0; }

/* ---------- 4. 底部导航 ---------- */
.nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 30;
  height: var(--nav-h);
  display: flex; align-items: stretch;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--border);
}
.nav-ind {
  position: absolute; top: 8px; height: calc(var(--nav-h) - 24px);
  border-radius: 18px;
  background: var(--primary-soft);
  transition: left .38s var(--ease), width .38s var(--ease);
  z-index: 0;
}
.nav-item {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px;
  color: var(--faint);
  transition: color .3s var(--ease-soft), transform .25s var(--ease);
}
.nav-item svg { transition: transform .35s var(--ease), stroke .3s; }
.nav-item .label { font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { transform: translateY(-2px) scale(1.12); }
.nav-item:active { transform: scale(.92); }

/* ---------- 5. 按钮 ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 18px;
  border-radius: 16px; font-size: 15px; font-weight: 650;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease-soft), background .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 26px -10px var(--primary);
}
.btn-primary:hover { box-shadow: 0 16px 32px -10px var(--primary); }
.btn-ghost {
  background: var(--surface-2); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { width: auto; padding: 10px 14px; font-size: 13.5px; border-radius: 12px; }

/* 涟漪效果 */
.ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255,255,255,.5); pointer-events: none;
  animation: ripple .6s var(--ease-soft) forwards;
}
[data-theme="dark"] .ripple { background: rgba(255,255,255,.22); }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- 6. 卡片 / 通用 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.section-title {
  font-size: 13px; font-weight: 700; color: var(--muted);
  letter-spacing: .4px; text-transform: uppercase; margin: 4px 2px 12px;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.center { text-align: center; }

/* ---------- 7. 主页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: 24px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2) 55%, var(--accent));
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.16); filter: blur(4px);
}
.hero .hero-label { font-size: 12.5px; opacity: .85; font-weight: 600; letter-spacing: .4px; }
.hero .addr {
  position: relative; z-index: 1;
  margin-top: 8px; font-size: 20px; font-weight: 750; word-break: break-all;
  line-height: 1.35;
}
.hero .hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: 18px; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 650;
  background: rgba(255,255,255,.18); color: #fff;
  backdrop-filter: blur(6px);
  transition: background .2s, transform .15s var(--ease);
}
.hero .pill:active { transform: scale(.95); }
.hero .pill svg { width: 17px; height: 17px; }

/* 大号主行动按钮 */
.cta-row { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }

/* 最近邮件预览 */
.preview {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: transform .2s var(--ease), background .2s;
}
.preview:active { transform: scale(.985); }
.avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px;
}
.preview .p-body { min-width: 0; flex: 1; }
.preview .p-from { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .p-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .p-time { font-size: 11.5px; color: var(--faint); flex: 0 0 auto; }

/* 统计条 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.stat { text-align: center; padding: 14px 8px; border-radius: var(--radius-sm); background: var(--surface-2); }
.stat .num { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.stat .cap { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------- 8. 生成页 ---------- */
.field-label { font-size: 13px; font-weight: 650; color: var(--muted); margin: 0 2px 10px; display: block; }
.input {
  width: 100%; padding: 15px 16px; font-size: 15.5px;
  border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
.input::placeholder { color: var(--faint); }
.input:focus {
  border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* 域名选择器 */
.domain-list { display: flex; flex-direction: column; gap: 10px; }
.domain {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s var(--ease-soft), background .2s, transform .15s var(--ease);
}
.domain:active { transform: scale(.985); }
.domain .dot {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--border); display: grid; place-items: center;
  transition: border-color .2s;
}
.domain .dot::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); transform: scale(0); transition: transform .25s var(--ease);
}
.domain .d-name { font-size: 15.5px; font-weight: 650; flex: 1; }
.domain .d-tag { font-size: 11px; font-weight: 650; color: var(--primary); background: var(--primary-soft); padding: 3px 8px; border-radius: 8px; }
.domain.selected { border-color: var(--primary); background: var(--primary-soft); }
.domain.selected .dot { border-color: var(--primary); }
.domain.selected .dot::after { transform: scale(1); }
.domain.cooldown { opacity: .5; }
.domain.cooldown .d-tag { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }

/* 结果卡片 */
.result {
  margin-top: 20px; border-radius: var(--radius); padding: 22px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; box-shadow: var(--shadow);
}
.result .r-label { font-size: 12.5px; opacity: .85; font-weight: 600; }
.result .r-addr { font-size: 21px; font-weight: 750; margin: 8px 0 16px; word-break: break-all; line-height: 1.4; }
.result .r-actions { display: flex; gap: 10px; }
.result .r-actions .pill {
  flex: 1; justify-content: center; padding: 12px; border-radius: 13px;
  background: rgba(255,255,255,.2); font-weight: 650; font-size: 14px;
  transition: background .2s, transform .15s var(--ease);
}
.result .r-actions .pill:active { transform: scale(.95); }

/* ---------- 9. 收件箱 ---------- */
.ptr {
  position: absolute; top: var(--top-h); left: 0; right: 0; height: 54px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600;
  opacity: 0; transition: opacity .15s var(--ease-soft); z-index: 10;
}
.ptr .spinner { width: 18px; height: 18px; }
.ptr .spinner svg { width: 100%; height: 100%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.mail {
  display: flex; gap: 14px; padding: 15px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 11px;
  transition: transform .18s var(--ease), box-shadow .25s, border-color .2s;
}
.mail:active { transform: scale(.985); }
.mail.unread { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.mail .unread-dot { position: absolute; top: 16px; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.mail { position: relative; }
.mail .m-body { min-width: 0; flex: 1; }
.mail .m-from { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail .m-sub { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.mail .m-time { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.avatar.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }

.inbox-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.inbox-head .addr-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 650; color: var(--muted);
  background: var(--surface-2); padding: 7px 12px; border-radius: 11px;
  max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 空状态 */
.empty { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty .e-ico {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px;
  display: grid; place-items: center; color: var(--primary);
  background: var(--primary-soft);
}
.empty .e-ico svg { width: 38px; height: 38px; }
.empty .e-title { font-size: 16px; font-weight: 700; color: var(--text); }
.empty .e-sub { font-size: 13.5px; margin-top: 6px; }

/* ---------- 10. 邮件详情 (底部抽屉) ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10,12,24,.45); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease-soft), visibility .3s;
}
.sheet-mask.open { opacity: 1; visibility: visible; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 26px 26px 0 0;
  transform: translateY(100%); transition: transform .42s var(--ease);
  box-shadow: var(--shadow-lg);
}
.sheet.open { transform: translateY(0); }
.sheet .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--border); margin: 12px auto 4px; }
.sheet .s-head { padding: 6px 20px 14px; border-bottom: 1px solid var(--border); }
.sheet .s-subject { font-size: 18px; font-weight: 750; line-height: 1.35; }
.sheet .s-meta { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.sheet .s-meta b { color: var(--text); font-weight: 650; }
.sheet .s-body {
  padding: 18px 20px 28px; overflow-y: auto; font-size: 14.5px; line-height: 1.7;
  color: var(--text);
}
.sheet .s-body img { max-width: 100%; height: auto; border-radius: 10px; }
.sheet .s-body a { color: var(--primary); text-decoration: underline; }
.sheet iframe { width: 100%; height: 60dvh; border: none; background: #fff; }
.sheet .s-actions { display: flex; gap: 10px; padding: 0 20px 22px; }
.sheet .s-actions .pill {
  flex: 1; justify-content: center; padding: 13px; border-radius: 14px;
  font-weight: 650; font-size: 14px; background: var(--surface-2);
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s var(--ease);
}
.sheet .s-actions .pill:active { transform: scale(.96); }
.sheet .s-actions .pill.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* ---------- 11. 我的 ---------- */
.dev-card {
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.dev-card .shield {
  width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 26px -10px var(--primary);
}
.dev-card .d-title { font-size: 19px; font-weight: 800; }
.dev-card .d-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

.reg-form { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; opacity: .55; pointer-events: none; }
.reg-note {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 13px 15px; border-radius: 14px; font-size: 13px; color: var(--muted);
  background: var(--surface-2); border: 1px dashed var(--border);
}
.reg-note svg { flex: 0 0 auto; color: var(--primary); }

.kv { display: flex; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 650; }

/* ---------- 12. Toast ---------- */
.toast-wrap {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px);
  transform: translateX(-50%); z-index: 80;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 90%;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 13px;
  background: var(--text); color: var(--surface);
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn .35s var(--ease) both;
}
.toast.out { animation: toastOut .3s var(--ease-soft) forwards; }
.toast svg { width: 17px; height: 17px; flex: 0 0 auto; }
.toast.success svg { color: #4ade80; }
.toast.error svg { color: #f87171; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ---------- 13. 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .55s var(--ease) forwards; }
.reveal.d1 { animation-delay: .05s; }
.reveal.d2 { animation-delay: .12s; }
.reveal.d3 { animation-delay: .19s; }
.reveal.d4 { animation-delay: .26s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; border-radius: 12px;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* 旋转加载 */
.spin { animation: spin .8s linear infinite; }

/* ---------- 14. 收件箱搜索 / 筛选 ---------- */
.search-wrap { position: relative; }
.search-wrap .s-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; display: flex; }
.search {
  width: 100%; padding: 12px 14px 12px 44px;
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 14.5px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search::placeholder { color: var(--faint); }
.search:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.toolbar { display: flex; align-items: center; gap: 10px; margin: 12px 2px 14px; }
.toolbar .flex-spacer { flex: 1; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 11px;
  font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted);
  transition: background .2s var(--ease-soft), color .2s;
}
.filter-chip svg { transition: transform .2s; }
.filter-chip.active { background: var(--primary-soft); color: var(--primary); }

/* ---------- 15. 历史邮箱 ---------- */
.history { display: flex; flex-direction: column; gap: 9px; }
.hist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px; background: var(--surface-2);
  transition: transform .15s var(--ease), background .2s; cursor: pointer;
}
.hist-item:active { transform: scale(.985); }
.hist-item .h-addr { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item .hist-go { color: var(--faint); }
.hist-empty { font-size: 13px; padding: 6px 4px; }

/* ---------- 16. 左右滑动删除 ---------- */
.swipe-item { position: relative; overflow: hidden; border-radius: var(--radius-sm); }
.swipe-item.mail-swipe { margin-bottom: 11px; }
.mail-swipe .mail { margin-bottom: 0; }
.swipe-front {
  position: relative; z-index: 1;
  transition: transform .32s var(--ease); will-change: transform;
  touch-action: pan-y;   /* 垂直仍可滚动, 横向交由 JS 处理 */
}
.swipe-bg {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 0 24px; background: var(--danger); color: #fff;
  font-size: 13.5px; font-weight: 700; letter-spacing: .5px;
}
.swipe-bg svg { width: 18px; height: 18px; }
.swipe-item.collapsed {
  height: 0 !important; margin: 0 !important; opacity: 0; overflow: hidden;
  transition: height .28s var(--ease-soft), opacity .28s var(--ease-soft), margin .28s var(--ease-soft);
}
