/* 瘦吗瘦吗 · 设计系统
   移动优先（390px 基准），桌面仅放大居中；四套皮肤：蜜桃 / 莓果 / 抹茶 / 夜莓。 */

/* ---------- 皮肤令牌 ---------- */
[data-skin="peach"] {
  --bg-1: #fff9f4; --bg-2: #ffeff4; --bg-3: #ffe2d8;
  --ink: #2a1b21; --ink-2: #7b5f6a; --ink-3: #8a737d;
  --line: rgba(66, 36, 48, .10);
  --glass: rgba(255, 255, 255, .62);
  --glass-brd: rgba(255, 255, 255, .82);
  --input-bg: rgba(255, 255, 255, .62);
  --sheet-1: #fffaf7; --sheet-2: #fff3f6;
  --accent: #ff6690; --accent-2: #ffa96b; --accent-3: #ffd3c0;
  --glow-1: rgba(255, 177, 150, .55);
  --glow-2: rgba(255, 138, 178, .42);
  --glow-3: rgba(255, 214, 170, .45);
  --sos: #e5485c;
  --shadow: 0 18px 50px -18px rgba(190, 83, 111, .42);
}
[data-skin="berry"] {
  --bg-1: #fcf7ff; --bg-2: #f3eaff; --bg-3: #ffe2f2;
  --ink: #251830; --ink-2: #6d5882; --ink-3: #7f6b91;
  --line: rgba(60, 36, 80, .10);
  --glass: rgba(255, 255, 255, .60);
  --glass-brd: rgba(255, 255, 255, .82);
  --input-bg: rgba(255, 255, 255, .60);
  --sheet-1: #fffaff; --sheet-2: #f7eeff;
  --accent: #a855f7; --accent-2: #ff5c8a; --accent-3: #e6c8ff;
  --glow-1: rgba(196, 140, 255, .50);
  --glow-2: rgba(255, 110, 160, .38);
  --glow-3: rgba(230, 200, 255, .42);
  --sos: #e5485c;
  --shadow: 0 18px 50px -18px rgba(140, 70, 180, .40);
}
[data-skin="matcha"] {
  --bg-1: #f7fcf6; --bg-2: #eef8ec; --bg-3: #e3f3d9;
  --ink: #1c2b23; --ink-2: #53695c; --ink-3: #677d6c;
  --line: rgba(36, 66, 48, .10);
  --glass: rgba(255, 255, 255, .62);
  --glass-brd: rgba(255, 255, 255, .84);
  --input-bg: rgba(255, 255, 255, .60);
  --sheet-1: #fbfff9; --sheet-2: #eff9ee;
  --accent: #2fa77e; --accent-2: #9bce4e; --accent-3: #cfe9a8;
  --glow-1: rgba(160, 220, 140, .48);
  --glow-2: rgba(60, 180, 150, .35);
  --glow-3: rgba(220, 235, 170, .40);
  --sos: #e5485c;
  --shadow: 0 18px 50px -18px rgba(50, 130, 90, .38);
}
[data-skin="night"] {
  --bg-1: #151017; --bg-2: #241221; --bg-3: #321522;
  --ink: #fff3f7; --ink-2: #d3b9c5; --ink-3: #b9a3ad;
  --line: rgba(255, 255, 255, .13);
  --glass: rgba(255, 255, 255, .075);
  --glass-brd: rgba(255, 255, 255, .16);
  --input-bg: rgba(255, 255, 255, .07);
  --sheet-1: #1e1420; --sheet-2: #271726;
  --accent: #ff5c8a; --accent-2: #b06cff; --accent-3: #ffb2c9;
  --glow-1: rgba(255, 92, 138, .32);
  --glow-2: rgba(176, 108, 255, .26);
  --glow-3: rgba(255, 180, 110, .18);
  --sos: #ff5c73;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .8);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  background: var(--bg-2);
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 75% at 12% 0%, var(--glow-1), transparent 62%),
    radial-gradient(95% 65% at 92% 10%, var(--glow-2), transparent 58%),
    radial-gradient(100% 70% at 50% 100%, var(--glow-3), transparent 62%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 58%, var(--bg-3));
  background-attachment: fixed;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .032;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/></filter><rect width='160' height='160' filter='n'/></svg>");
}
button { font-family: inherit; }
a { color: inherit; }
.ico { width: 22px; height: 22px; display: block; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 26px; height: 26px; }

.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(18px + env(safe-area-inset-top)) 20px 112px;
  animation: rise .45s cubic-bezier(.2, .8, .2, 1) both;
}
@media (min-width: 520px) {
  body { padding: 24px 0; }
  .app {
    min-height: calc(100vh - 48px);
    border-radius: 34px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: 0 40px 100px -34px rgba(70, 30, 50, .45);
    padding-bottom: 92px;
  }
}

/* ---------- 顶部身份 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 12px 26px -12px var(--accent);
  flex: none;
}
.who-text { min-width: 0; }
.nick {
  display: block; max-width: 180px;
  padding: 0; border: 0; background: none;
  color: var(--ink); font-size: 20px; font-weight: 750;
  letter-spacing: -.02em; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tagline { margin-top: 2px; font-size: 11px; color: var(--ink-3); letter-spacing: .12em; }
.brand {
  flex: none;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink-3); font-size: 10px; letter-spacing: .18em;
  cursor: pointer;
}

/* ---------- 身份卡 ---------- */
.id-card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 20px;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 14px 36px -26px rgba(60, 30, 40, .45);
  overflow: hidden;
}
.entry-row {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border: 0; background: none;
  color: var(--ink); font-size: 14px; text-align: left;
  cursor: pointer;
}
.entry-label { color: var(--ink-2); font-size: 13px; flex: none; }
.entry-value {
  flex: 1; min-width: 0; text-align: right;
  font-weight: 650; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.entry-value.is-empty { color: var(--ink-3); font-weight: 500; }
.entry-edit {
  flex: none; width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--ink-3); background: var(--input-bg);
}
.hairline { height: 1px; margin: 0 16px; background: var(--line); }

/* ---------- 主圆打卡 ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 0 4px;
}
.ring {
  position: relative; isolation: isolate;
  width: min(70vw, 248px); aspect-ratio: 1;
  padding: 0; border-radius: 50%;
  border: 1px solid var(--glass-brd);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .92), rgba(255, 255, 255, .30) 54%, rgba(255, 255, 255, .10) 100%),
    linear-gradient(150deg, rgba(255, 255, 255, .48), rgba(255, 255, 255, .12));
  box-shadow: 0 28px 64px -24px rgba(150, 60, 90, .5), inset 0 1px 0 rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  display: grid; place-items: center;
  color: var(--ink); cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ring::before {
  content: ""; position: absolute; inset: -3px; z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from -40deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
  opacity: .62;
}
.ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0; pointer-events: none;
  animation: pulse 3.2s ease-out infinite;
}
.ring.is-checked::after { animation: none; opacity: 0; }
.ring.is-checked::before { opacity: .9; }
.ring:active { transform: scale(.975); }
.ring.is-bursting { animation: none; }
.ring-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  transform: translateY(2px);
}
.ring-icon {
  width: 44px; height: 44px; margin-bottom: 7px;
  border-radius: 50%; display: grid; place-items: center;
  color: var(--accent);
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 8px 20px -12px var(--accent), inset 0 1px 0 #fff;
}
.ring-label { font-size: 10px; letter-spacing: .28em; color: var(--ink-2); text-indent: .28em; }
.ring-num {
  font-size: 46px; line-height: 1.04; font-weight: 800;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.ring-unit { margin-top: 1px; font-size: 11px; letter-spacing: .22em; color: var(--ink-3); text-indent: .22em; }
.hero-cta {
  margin-top: 18px;
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink-2); font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
}
.perm {
  margin-top: 10px; padding: 6px;
  border: 0; background: none; cursor: pointer;
  color: var(--ink-3); font-size: 11.5px; letter-spacing: .04em;
}
.perm:hover { color: var(--ink-2); }
.perm .arr { margin-left: 2px; }

/* 打卡扩散粒子 */
.burst-dot {
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); opacity: .9;
  pointer-events: none; z-index: 2;
  animation: burst .75s cubic-bezier(.15, .8, .3, 1) forwards;
}

/* ---------- 2 日提醒横幅 ---------- */
.missed-banner {
  margin-top: 20px; padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(229, 72, 92, .30);
  background: linear-gradient(125deg, rgba(255, 255, 255, .86), rgba(255, 232, 238, .78));
  box-shadow: 0 16px 40px -28px rgba(229, 72, 92, .5);
  animation: rise .32s ease both;
}
.missed-top { display: flex; align-items: center; gap: 8px; color: var(--sos); font-weight: 750; font-size: 15px; }
.missed-sub { margin: 6px 0 12px; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }
.missed-actions { display: flex; gap: 8px; }
.missed-actions .btn { height: 42px; flex: 1; font-size: 13px; border-radius: 13px; }

/* ---------- 说明块 ---------- */
.notice {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 22px 2px 6px;
  color: var(--ink-2); font-size: 12px; line-height: 1.8;
}
.notice-badge {
  flex: none; width: 16px; height: 16px; margin-top: 4px;
  border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--ink-3); color: var(--ink-3);
  font-size: 10px; font-weight: 700;
}
.notice p { margin: 0; }
.notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- 高级服务 ---------- */
.adv-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 0 10px; border: 0; background: none;
  color: var(--ink-2); font-size: 12px; letter-spacing: .08em; cursor: pointer;
}
.adv { padding: 4px 0 6px; animation: rise .3s ease both; }
.adv-head { display: flex; justify-content: center; margin-bottom: 14px; }
.adv-back {
  border: 0; background: none; color: var(--ink-2);
  font-size: 12px; letter-spacing: .08em; padding: 8px 12px; cursor: pointer;
}
.adv-card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 20px;
  padding: 15px 16px 17px;
  margin-bottom: 12px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 16px 40px -32px rgba(60, 30, 40, .5);
}
.adv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.adv-icon {
  width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--accent); background: var(--input-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.adv-card h3 { margin: 12px 0 3px; font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.adv-card p { margin: 0; color: var(--ink-3); font-size: 12px; line-height: 1.62; }
.adv-tag {
  display: inline-block; margin-left: 6px; padding: 2px 6px;
  border-radius: 6px; border: 1px solid var(--line);
  color: var(--ink-3); font-size: 10px; font-weight: 500; letter-spacing: .02em;
  vertical-align: 1px;
}

.switch {
  flex: none; width: 48px; height: 28px; padding: 2px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(120, 90, 105, .20);
  cursor: pointer;
  transition: background .22s ease, box-shadow .22s ease;
}
.switch[aria-checked="true"] {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 8px 18px -10px var(--accent);
}
.switch .knob {
  display: block; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.switch[aria-checked="true"] .knob { transform: translateX(20px); }
.switch:disabled { opacity: .45; cursor: not-allowed; }

.uid-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 4px 12px;
  color: var(--ink-3); font-size: 11.5px; letter-spacing: .06em;
}
.uid-row b { color: var(--ink-2); font-weight: 650; letter-spacing: .1em; }
.uid-copy {
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--input-bg);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
}

.skin-card {
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: 20px; padding: 15px 16px; margin-bottom: 12px;
}
.skin-card h3 { margin: 0 0 2px; font-size: 15px; }
.skin-card p { margin: 0; color: var(--ink-3); font-size: 11.5px; }
.skin-dots { display: flex; gap: 14px; padding: 14px 0 2px; }
.skin-dot {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid transparent; padding: 0; cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .35);
}
.skin-dot[data-value="peach"] { background: linear-gradient(140deg, #ff6690, #ffa96b); }
.skin-dot[data-value="berry"] { background: linear-gradient(140deg, #a855f7, #ff5c8a); }
.skin-dot[data-value="matcha"] { background: linear-gradient(140deg, #2fa77e, #9bce4e); }
.skin-dot[data-value="night"] { background: linear-gradient(140deg, #ff5c8a, #6d2d7a); }
.skin-dot[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 255, 255, .32); }
.skin-name { margin-left: 4px; align-self: center; font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }

.dev-tools {
  margin-top: 16px; padding: 14px 16px;
  border-radius: 18px; border: 1px dashed var(--line);
  background: rgba(255, 255, 255, .18);
}
.dev-tools h3 { margin: 0 0 4px; font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.dev-tools p { margin: 0 0 10px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.dev-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dev-actions .chip { height: 34px; }

/* ---------- SOS ---------- */
.sos {
  position: fixed; z-index: 30;
  right: 16px; bottom: calc(22px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  padding: 0; cursor: pointer;
  border: 1.5px solid var(--sos);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .92), rgba(255, 255, 255, .42));
  color: var(--sos); font-weight: 800; font-size: 12.5px; letter-spacing: .08em;
  box-shadow: 0 14px 34px -14px rgba(229, 72, 92, .65), inset 0 0 0 4px rgba(229, 72, 92, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sos:active { transform: scale(.94); }
@media (min-width: 520px) {
  .sos { right: calc(50vw - 215px + 20px); bottom: calc(46px + env(safe-area-inset-bottom)); }
}

.disclaimer {
  margin: 28px 6px 0;
  color: var(--ink-3); font-size: 11px; line-height: 1.75; text-align: center;
}

/* ---------- 浮层 ---------- */
body.sheet-open { overflow: hidden; }
.sheet-wrap {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 14, 22, .36);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .22s ease;
}
.sheet-wrap.is-open .sheet-backdrop { opacity: 1; }
.sheet {
  position: relative;
  width: 100%; max-width: 430px; max-height: 88vh; overflow: auto;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--glass-brd); border-bottom: 0;
  background: linear-gradient(180deg, var(--sheet-1), var(--sheet-2));
  box-shadow: 0 -24px 70px rgba(60, 20, 40, .30);
  transform: translateY(26px); opacity: 0;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.sheet-wrap.is-open .sheet { transform: none; opacity: 1; }
.sheet-wrap.is-closing .sheet { transform: translateY(34px); opacity: 0; }
.sheet-grip {
  width: 38px; height: 4px; margin: 4px auto 12px;
  border-radius: 999px; background: var(--line);
}
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-kicker { font-size: 10px; letter-spacing: .16em; color: var(--ink-3); min-height: 12px; }
.sheet-title { margin: 2px 0 0; font-size: 22px; font-weight: 780; letter-spacing: -.02em; }
.sheet-sub { margin: 8px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.sheet-body { padding-top: 16px; }
.icon-btn {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--input-bg);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
}

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 11.5px; color: var(--ink-2); letter-spacing: .04em; }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--input-bg); color: var(--ink);
  font-size: 15px; outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 144, .14);
}
.field-hint { margin: 6px 2px 0; font-size: 11px; color: var(--ink-3); line-height: 1.55; }
.field-error { margin: 6px 2px 0; font-size: 11.5px; color: var(--sos); }

.btn {
  height: 50px; padding: 0 18px; border-radius: 15px;
  border: 0; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 16px 32px -16px var(--accent); }
.btn.ghost { background: var(--input-bg); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: rgba(229, 72, 92, .10); color: #d63c50; border: 1px solid rgba(229, 72, 92, .32); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row-actions { display: flex; gap: 10px; margin-top: 6px; }
.row-actions .btn { flex: 1; }

/* 联系人 */
.contact-list { margin-top: 2px; }
.contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.contact-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 15px; font-weight: 750;
}
.contact-main { flex: 1; min-width: 0; }
.contact-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-meta { margin-top: 2px; font-size: 11.5px; color: var(--ink-3); }
.contact-actions { display: flex; gap: 6px; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--input-bg); color: var(--ink-2);
  font-size: 11.5px; text-decoration: none; cursor: pointer;
}
.chip:active { transform: scale(.97); }
.chip.icon-only { width: 32px; padding: 0; justify-content: center; }

.empty {
  padding: 26px 10px 24px; text-align: center; color: var(--ink-3);
}
.empty-art {
  width: 92px; height: 92px; margin: 0 auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .28));
  display: grid; place-items: center;
  color: var(--accent);
  box-shadow: 0 18px 40px -24px var(--accent), inset 0 0 0 1px var(--line);
}
.empty p { margin: 0 0 14px; font-size: 13px; line-height: 1.7; }

/* 求助文案框 */
.msg-box {
  margin: 12px 0; padding: 14px;
  border-radius: 16px; border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink-2); font-size: 13px; line-height: 1.7;
  word-break: break-word;
}
.fine { margin: 12px 2px 0; font-size: 11px; line-height: 1.65; color: var(--ink-3); }
.danger-text { color: var(--sos); }

/* 权限表 */
.perm-table { border-top: 1px solid var(--line); }
.perm-tr {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.5;
}
.perm-tr.head { color: var(--ink-3); font-size: 10.5px; letter-spacing: .04em; }
.perm-tr span:first-child { color: var(--ink); font-weight: 650; }
.perm-tr span:not(:first-child) { color: var(--ink-2); }
.perm-tr .no { color: var(--sos); }
.perm-tr .yes { color: var(--accent); }

/* ---------- 首启引导 ---------- */
.onboard {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(24, 12, 18, .40);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: fade .3s ease both;
}
.onboard-card {
  width: 100%; max-width: 392px; max-height: 92vh; overflow: auto;
  padding: 26px 22px 22px;
  border-radius: 28px;
  border: 1px solid var(--glass-brd);
  background: linear-gradient(180deg, var(--sheet-1), var(--sheet-2));
  box-shadow: 0 40px 100px -24px rgba(60, 20, 40, .6);
  animation: rise .4s cubic-bezier(.2, .8, .2, 1) both;
}
.onboard-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.onboard-logo {
  width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 12px 24px -12px var(--accent);
}
.onboard-brand strong { font-size: 18px; letter-spacing: .04em; }
.onboard h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.25; letter-spacing: -.03em; }
.onboard .lead { margin: 0 0 18px; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.onboard .disclaimer { margin-top: 14px; }
.onboard-skip {
  display: block; width: 100%; margin-top: 10px; padding: 8px;
  border: 0; background: none; color: var(--ink-3);
  font-size: 12px; cursor: pointer;
}

/* ---------- 记录页 / 关于页通用 ---------- */
.page-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.page-head .back {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  border: 1px solid var(--line); background: var(--glass);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
}
.page-head h1 { margin: 0; font-size: 20px; font-weight: 780; letter-spacing: -.02em; }
.page-head .count { margin-left: auto; color: var(--ink-3); font-size: 11.5px; letter-spacing: .06em; }
.panel {
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: 20px; padding: 16px; margin-bottom: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.panel h2 { margin: 0 0 8px; font-size: 16px; font-weight: 750; }
.panel p { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.75; }
.doc h2 { margin: 24px 0 8px; font-size: 17px; font-weight: 780; letter-spacing: -.01em; }
.doc h3 { margin: 18px 0 6px; font-size: 14px; font-weight: 700; }
.doc p, .doc li { color: var(--ink-2); font-size: 13px; line-height: 1.85; }
.doc ul { margin: 6px 0; padding-left: 18px; }
.doc .version { margin-top: 28px; color: var(--ink-3); font-size: 11px; text-align: center; }
.doc a { color: var(--accent); }

/* ---------- toast ---------- */
.toast-layer {
  position: fixed; left: 0; right: 0; bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 100; display: flex; justify-content: center; pointer-events: none;
}
.toast {
  max-width: 82vw; padding: 10px 16px; border-radius: 999px;
  background: rgba(28, 16, 22, .88); color: #fff;
  font-size: 12.5px; line-height: 1.5; text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  animation: toastIn .22s ease both;
}

/* ---------- 动画 ---------- */
@keyframes pulse {
  0% { transform: scale(1); opacity: .32; }
  70% { transform: scale(1.13); opacity: 0; }
  100% { transform: scale(1.13); opacity: 0; }
}
@keyframes burst {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Demo 专用组件 ---------- */
.demo-strip {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 9px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(229, 72, 92, .38);
  background: rgba(229, 72, 92, .07);
  color: var(--sos); font-size: 11.5px; line-height: 1.5;
}
.demo-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sos); box-shadow: 0 0 0 3px rgba(229, 72, 92, .16);
}

.demo-panel {
  margin-top: 22px; padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--glass-brd);
  background: var(--glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.demo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.demo-head h2 { margin: 0; font-size: 16px; font-weight: 760; letter-spacing: -.01em; }
.demo-head span { color: var(--ink-3); font-size: 10.5px; }

.step-list { margin-top: 6px; }
.step-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.step-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.step-no {
  flex: none; width: 24px; height: 24px; margin-top: 2px;
  border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--input-bg);
  color: var(--ink-3); font-size: 11.5px; font-weight: 700;
}
.step-row.is-done .step-no {
  border-color: transparent; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.step-body { flex: 1; min-width: 0; }
.step-title { font-size: 13.5px; font-weight: 700; }
.step-desc { margin-top: 1px; font-size: 11px; color: var(--ink-3); line-height: 1.55; }
.step-btn {
  flex: none; height: 30px; padding: 0 10px; margin-top: 1px;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--input-bg); color: var(--ink-2);
  font-size: 11.5px; cursor: pointer;
}
.step-btn.primary { border-color: transparent; color: var(--accent); background: rgba(255, 102, 144, .10); }

.stats { display: flex; gap: 10px; width: 100%; margin-top: 16px; }
.stat {
  flex: 1; padding: 11px 12px; border-radius: 16px;
  border: 1px solid var(--glass-brd); background: var(--glass);
  text-align: center;
}
.stat b { display: block; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { display: block; margin-top: 1px; color: var(--ink-3); font-size: 10.5px; letter-spacing: .1em; }
.stat.is-warn b { color: var(--sos); }

.self-note {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 14px; padding: 12px 13px;
  border-radius: 16px; border: 1px solid rgba(229, 72, 92, .26);
  background: rgba(229, 72, 92, .07);
  font-size: 11.5px; line-height: 1.6; color: var(--ink-2);
}
.self-note strong { color: var(--sos); font-size: 12.5px; }

.alerts-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 24px 2px 10px;
}
.alerts-head h2 { margin: 0; font-size: 16px; font-weight: 760; }
.alerts-head span { color: var(--ink-3); font-size: 10.5px; }

.wx-card {
  background: #fff; color: #1a1a1a;
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .07);
  box-shadow: 0 18px 40px -30px rgba(40, 20, 30, .55);
  margin-bottom: 12px;
  animation: rise .32s ease both;
}
.wx-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid #efefef;
  color: #6b7078; font-size: 11.5px;
}
.wx-logo {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  background: #07c160; color: #fff; font-size: 11px; font-weight: 800;
}
.wx-badge {
  margin-left: auto; padding: 2px 7px; border-radius: 5px;
  background: rgba(7, 193, 96, .10); color: #07934a;
  font-size: 10px; letter-spacing: .02em;
}
.wx-title { padding: 13px 14px 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.wx-time { padding: 5px 14px 0; color: #9aa0a8; font-size: 11px; }
.wx-body { padding: 9px 14px 14px; color: #3c4149; font-size: 13.5px; line-height: 1.7; }
.wx-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-top: 1px solid #efefef;
  color: #6b7078; font-size: 12px; cursor: pointer;
}
.wx-foot .arrow { color: #9aa0a8; }

.empty-alerts {
  padding: 22px 14px; border-radius: 18px;
  border: 1px dashed var(--line); background: rgba(255, 255, 255, .12);
  color: var(--ink-3); font-size: 12px; line-height: 1.7; text-align: center;
}

.pick-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.pick-row:last-child { border-bottom: 0; }
.pick-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 22px; height: 22px; margin: 0;
  border-radius: 7px; border: 1.5px solid var(--line);
  background: var(--input-bg); cursor: pointer;
  display: grid; place-items: center;
}
.pick-row input[type="checkbox"]:checked {
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.pick-row input[type="checkbox"]:checked::after {
  content: "✓"; color: #fff; font-size: 12px; font-weight: 700;
}
.pick-row input[type="checkbox"]:disabled { opacity: .4; }

.invite-card {
  padding: 15px 16px; border-radius: 20px;
  border: 1px solid var(--glass-brd); background: var(--glass);
  margin-bottom: 12px;
}
.invite-top { display: flex; align-items: center; gap: 10px; }
.invite-top .contact-avatar { width: 36px; height: 36px; border-radius: 12px; font-size: 14px; }
.invite-top h3 { margin: 0; font-size: 15px; font-weight: 750; }
.invite-top .meta { margin-top: 1px; color: var(--ink-3); font-size: 11px; }
.status-pill {
  margin-left: auto; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-3);
  font-size: 10.5px; white-space: nowrap;
}
.status-pill.bound { border-color: rgba(7, 193, 96, .35); color: #07934a; background: rgba(7, 193, 96, .08); }
.status-pill.pending { border-color: rgba(255, 150, 60, .35); color: #c2761c; }

.code-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 0 8px; padding: 9px 11px;
  border-radius: 11px; border: 1px dashed var(--line);
  background: rgba(255, 255, 255, .16);
  font-size: 11.5px; color: var(--ink-2);
}
.code-line b { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; }
.link-box {
  padding: 10px 11px; border-radius: 11px;
  background: var(--input-bg); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 11px; line-height: 1.5;
  word-break: break-all;
}
.invite-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

.bind-card {
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--glass-brd);
  background: var(--glass);
  margin-bottom: 14px;
}
.bind-head {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px;
  background: linear-gradient(120deg, #07c160, #05a851);
  color: #fff; font-size: 12.5px;
}
.bind-head .wx-logo { background: rgba(255, 255, 255, .22); width: 22px; height: 22px; }
.bind-head .demo-mini {
  margin-left: auto; padding: 2px 7px; border-radius: 5px;
  background: rgba(255, 255, 255, .22); font-size: 10px;
}
.bind-body { padding: 18px 16px 16px; }
.bind-title { margin: 0 0 6px; font-size: 20px; font-weight: 780; letter-spacing: -.02em; }
.bind-desc { margin: 0 0 16px; color: var(--ink-2); font-size: 12.5px; line-height: 1.7; }
.bind-step {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.bind-step-no {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--input-bg); border: 1px solid var(--line);
  color: var(--ink-3); font-size: 11px; font-weight: 700;
}
.bind-step.is-done .bind-step-no { background: #07c160; border-color: #07c160; color: #fff; }
.bind-step-main { flex: 1; min-width: 0; }
.bind-step-main h3 { margin: 1px 0 3px; font-size: 13.5px; font-weight: 700; }
.bind-step-main p { margin: 0 0 8px; color: var(--ink-3); font-size: 11.5px; line-height: 1.6; }
.bind-done {
  padding: 24px 18px; border-radius: 20px;
  border: 1px solid rgba(7, 193, 96, .28);
  background: rgba(7, 193, 96, .07);
  text-align: center;
}
.bind-done .ok {
  width: 46px; height: 46px; margin: 0 auto 10px;
  border-radius: 50%; display: grid; place-items: center;
  background: #07c160; color: #fff;
}
.bind-done h2 { margin: 0 0 5px; font-size: 17px; }
.bind-done p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.65; }

@media (max-width: 360px) {
  .step-btn { padding: 0 8px; }
  .invite-actions .chip { flex: 1; justify-content: center; }
}

.rel {
  display: inline-block; padding: 1px 6px; margin-left: 4px;
  border-radius: 6px; border: 1px solid var(--line);
  color: var(--ink-3); font-size: 10px; font-weight: 500; vertical-align: 1px;
}
.st { font-weight: 600; }
.st.bound { color: #07934a; }
.st.pending { color: #c2761c; }

