/* ============================================================
   邻序 App 移动端样式
   ============================================================ */

:root {
  --primary: #ff5c8a;
  --primary-2: #ff8e6e;
  --primary-grad: linear-gradient(135deg, #ff5c8a 0%, #ff8e6e 100%);
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1d2129;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --line: #eef0f4;
  --green: #22c55e;
  --blue: #3b82f6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(20, 25, 45, 0.06);
  --shadow-lg: 0 12px 40px rgba(20, 25, 45, 0.12);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 54px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { overflow: hidden; }

#app { height: 100%; display: flex; flex-direction: column; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; outline: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ---------------- 视图容器 ---------------- */
.view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
}
.view.no-tabbar { padding-bottom: var(--safe-bottom); }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 50;
}
.tabbar a {
  flex: 1; height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-3); position: relative;
  transition: color .2s;
}
.tabbar a .ico { font-size: 20px; line-height: 1; }
.tabbar a .txt { font-size: 11px; }
.tabbar a.active { color: var(--primary); }
.tabbar a.active .ico { transform: scale(1.12); }
.badge {
  position: absolute; top: 6px; left: 55%;
  min-width: 8px; height: 8px; border-radius: 4px;
  background: #ff3b30; font-style: normal;
}
.badge.num {
  min-width: 16px; height: 16px; border-radius: 8px;
  font-size: 10px; color: #fff; line-height: 16px; text-align: center;
  padding: 0 4px; left: 52%;
}

/* ---------------- 通用组件 ---------------- */
.page-head {
  padding: calc(var(--safe-top) + 14px) 16px 12px;
  background: var(--card);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.page-head .sub { color: var(--text-3); font-size: 12px; margin-top: 2px; }

.nav-back {
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: var(--card); position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
}
.nav-back .btn-back { font-size: 20px; width: 28px; height: 28px; display: grid; place-items: center; }
.nav-back h1 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; text-align: center; }
.nav-back .right { width: 28px; text-align: right; font-size: 13px; color: var(--primary); }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: 12px 14px; overflow: hidden;
}
.card-pad { padding: 16px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 48px; border-radius: 24px;
  background: var(--primary-grad); color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: .5px;
  transition: transform .12s, opacity .2s;
}
.btn:active { transform: scale(.975); opacity: .9; }
.btn[disabled] { opacity: .5; }
.btn.ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn.gray { background: #f1f2f6; color: var(--text-2); }
.btn.sm { height: 34px; width: auto; padding: 0 16px; font-size: 13px; border-radius: 17px; }
.btn.danger { background: linear-gradient(135deg,#ff6b6b,#ff3b30); }

.field { padding: 0 16px; margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.field .input-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #f7f8fa; border-radius: var(--radius-sm);
  padding: 0 14px; height: 48px; border: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.field .input-wrap:focus-within { border-color: var(--primary); background: #fff; }
.field input, .field textarea, .field select {
  flex: 1; border: none; background: transparent; height: 100%; width: 100%;
}
.field textarea { height: auto; padding: 12px 0; resize: none; line-height: 1.55; }
.field .tip { font-size: 11px; color: var(--text-3); margin-top: 5px; }
/* label 里的补充说明，如「须年满 18 周岁」 */
.field label .lbl-note { font-style: normal; color: var(--primary); margin-left: 4px; }
/* 出生日期的年龄校验反馈：空着不占位，选中后出现 */
.field .age-hint { font-size: 11.5px; line-height: 1.55; margin-top: 6px; }
.field .age-hint:empty { display: none; }
.field .age-hint.bad { color: #e5484d; }
.field .age-hint.ok { color: var(--green); }

.empty { text-align: center; padding: 60px 30px; color: var(--text-3); }
.empty .em { font-size: 44px; margin-bottom: 12px; opacity: .5; }
.empty p { margin: 4px 0; font-size: 13px; }

.avatar {
  border-radius: 50%; object-fit: cover; background: #eceef3;
  flex-shrink: 0; display: block;
}
.avatar-fallback {
  border-radius: 50%; background: var(--primary-grad); color: #fff;
  display: grid; place-items: center; font-weight: 600; flex-shrink: 0;
}
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: #fff0f4; color: var(--primary); font-size: 11px; margin: 0 6px 6px 0;
}
.tag.blue { background: #eef4ff; color: var(--blue); }
.tag.gray { background: #f2f3f7; color: var(--text-2); }

/* ---------------- 登录 / 注册 ---------------- */
.auth-wrap {
  min-height: 100%; display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + 48px) 0 40px;
  background: linear-gradient(180deg, #fff0f4 0%, #f6f7fb 40%);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .circle {
  width: 78px; height: 78px; border-radius: 26px; margin: 0 auto 16px;
  background: var(--primary-grad); display: grid; place-items: center;
  color: #fff; font-size: 34px; box-shadow: 0 10px 30px rgba(255, 92, 138, .35);
}
.auth-logo h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: 1px; }
.auth-logo p { margin: 0; color: var(--text-2); font-size: 13px; }
.auth-tabs {
  display: flex; margin: 0 16px 22px; background: #ecedf2;
  border-radius: 22px; padding: 4px;
}
.auth-tabs button {
  flex: 1; height: 38px; border-radius: 18px; font-size: 14px;
  color: var(--text-2); transition: all .22s;
}
.auth-tabs button.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.gender-pick { display: flex; gap: 10px; padding: 0 16px; margin-bottom: 14px; }
.gender-pick button {
  flex: 1; height: 52px; border-radius: var(--radius-sm); background: #f7f8fa;
  border: 1.5px solid transparent; color: var(--text-2); font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .2s;
}
.gender-pick button.active { border-color: var(--primary); background: #fff0f4; color: var(--primary); font-weight: 600; }
.auth-foot { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 18px; line-height: 1.7; }

/* ---------------- 网页版引导页（手机端 App 是唯一入口） ----------------
   网页版能看到的**全部内容**就是这一页：没有任何输入框和提交按钮。
   样式沿用 .auth-wrap / .auth-logo / .auth-foot，这里只加卡片和步骤条。 */
.apponly-card {
  margin: 4px 16px 20px; padding: 16px 18px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
}
.apponly-card .t { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.apponly-card .t strong { color: var(--primary); }
.apponly-card .d { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.apponly-steps { margin: 0 16px; display: flex; flex-direction: column; gap: 13px; }
.apponly-steps > div {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text-2); line-height: 1.6;
}
.apponly-steps b {
  flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
  background: var(--primary-grad); color: #fff;
  font-size: 12px; font-weight: 600; display: grid; place-items: center;
}

/* ---------------- 发现（滑卡） ---------------- */

/* 发现页锁成一屏：顶栏 / 筛选 / 卡片 / 按钮 依次排下来，卡片区 flex:1 吃掉
   剩下的高度。这样任何机型上按钮都稳稳落在首屏里，不用先上滑一下。

   ⚠️ 卡片区别再用 `height: calc(100vh - 魔数)` 了。那个魔数得手工凑齐
   「顶栏 + 筛选 + 按钮 + 底部导航」的全部高度，稍有改动就对不上，
   实测 360x640 / 390x844 / 412x915 三种机型都正好多出 102px，
   把红心顶出视口 40px（详见 README Q22）。 */
.view.view-fixed {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.view.view-fixed > .swipe-top,
.view.view-fixed > .filter-bar,
.view.view-fixed > .swipe-actions { flex: none; }

.swipe-area {
  position: relative;
  height: calc(100vh - var(--tabbar-h) - var(--safe-bottom) - 224px - var(--safe-top));
  min-height: 180px; padding: 0 16px;
  touch-action: pan-y;
}
/* 发现页是 flex 布局时，卡片区改为吃掉剩余空间（不再依赖上面的 100vh 算式，
   上面那条只作为 .view 不是 flex 容器时的兜底） */
.view.view-fixed > .swipe-area {
  flex: 1;
  height: auto;
  min-height: 180px;
}
.swipe-card {
  position: absolute; inset: 0 16px;
  border-radius: 22px; overflow: hidden; background: #ddd;
  box-shadow: var(--shadow-lg);
  will-change: transform;
}
.swipe-card img { width: 100%; height: 100%; object-fit: cover; }
.swipe-card .ph {
  width: 100%; height: 100%; background: linear-gradient(160deg, #ffd6e2, #ffeadd);
  display: grid; place-items: center; font-size: 60px; color: #fff;
}
.swipe-card .mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: 55%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.72) 78%);
}
.swipe-card .info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px 22px; color: #fff;
}
.swipe-card .info .name { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.swipe-card .info .name .age {
  font-size: 13px; font-weight: 400; background: rgba(255,255,255,.22);
  padding: 2px 8px; border-radius: 10px;
}
.swipe-card .info .meta { font-size: 12.5px; opacity: .92; margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.swipe-card .info .bio {
  font-size: 12.5px; opacity: .85; margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.swipe-card .info .tags { margin-top: 10px; }
.swipe-card .info .tags .tag { background: rgba(255,255,255,.2); color: #fff; }
.swipe-stamp {
  position: absolute; top: 26px; font-size: 26px; font-weight: 800;
  padding: 6px 16px; border-radius: 12px; border: 3px solid; letter-spacing: 2px;
  opacity: 0; transition: opacity .15s;
}
.swipe-stamp.like { right: 22px; color: #22c55e; border-color: #22c55e; transform: rotate(14deg); }
.swipe-stamp.nope { left: 22px; color: #ff3b30; border-color: #ff3b30; transform: rotate(-14deg); }

.swipe-actions {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 14px 0 6px;
}
.act-btn {
  width: 58px; height: 58px; border-radius: 50%; background: #fff;
  box-shadow: 0 6px 20px rgba(20,25,45,.12); display: grid; place-items: center;
  font-size: 24px; transition: transform .14s;
}
.act-btn:active { transform: scale(.9); }
.act-btn.no { color: #ff3b30; }
.act-btn.yes { color: #ff5c8a; width: 66px; height: 66px; font-size: 28px; }
.act-btn.sup { color: #3b82f6; width: 48px; height: 48px; font-size: 20px; }
.swipe-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) 18px 8px;
}
.swipe-top .quota { font-size: 12px; color: var(--text-3); }
.swipe-top .quota b { color: var(--primary); }

.filter-bar { display: flex; gap: 8px; padding: 0 16px 8px; overflow-x: auto; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar button {
  flex-shrink: 0; height: 30px; padding: 0 14px; border-radius: 15px;
  background: #fff; color: var(--text-2); font-size: 12.5px; border: 1px solid var(--line);
}
.filter-bar button.active { background: #fff0f4; color: var(--primary); border-color: #ffd0dd; font-weight: 600; }

/* ---------------- 列表 / 用户行 ---------------- */
.user-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.user-row:active { background: #fafbfd; }
.user-row .info { flex: 1; min-width: 0; }
.user-row .name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.user-row .name .dot { width: 7px; height: 7px; border-radius: 50%; background: #d1d5db; }
.user-row .name .dot.on { background: var(--green); }
.user-row .desc {
  font-size: 12.5px; color: var(--text-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-row .unread {
  min-width: 18px; height: 18px; border-radius: 9px; background: #ff3b30; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; padding: 0 5px;
}
.chip-row { display: flex; gap: 2px; }
.chip-row .sm-act {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 17px; background: #f5f6f9;
}
.chip-row .sm-act.yes { color: var(--primary); }
.chip-row .sm-act.no { color: var(--text-3); }

.seg {
  display: flex; gap: 18px; padding: 12px 16px 6px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.seg button { font-size: 14px; color: var(--text-2); padding-bottom: 8px; position: relative; }
.seg button.active { color: var(--text); font-weight: 600; }
.seg button.active::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 20px; height: 3px; border-radius: 2px; background: var(--primary);
}

/* ---------------- 聊天 ---------------- */
.chat-view { display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  background: #fff; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.chat-head .btn-back { font-size: 20px; width: 26px; }
.chat-head .who { flex: 1; }
.chat-head .who .n { font-size: 15px; font-weight: 600; }
.chat-head .who .s { font-size: 11px; color: var(--text-3); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px 14px 8px; }
.chat-body .day { text-align: center; font-size: 11px; color: var(--text-3); margin: 12px 0; }
.msg { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.msg .bubble {
  max-width: 68%; padding: 10px 14px; border-radius: 16px;
  background: #fff; font-size: 14.5px; line-height: 1.55;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); word-break: break-word;
  border-top-left-radius: 4px;
}
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble {
  background: var(--primary-grad); color: #fff; border-top-left-radius: 16px;
  border-top-right-radius: 4px;
}
.msg .bubble img { border-radius: 10px; max-width: 180px; }
.msg .bubble.recalled { background: #f1f2f6; color: var(--text-3); font-style: italic; font-size: 13px; }
.msg .time { font-size: 10px; color: var(--text-3); align-self: flex-end; margin-bottom: 2px; }
.chat-input {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: #fff; border-top: 1px solid var(--line);
}
.chat-input .box {
  flex: 1; display: flex; align-items: center; background: #f5f6f9;
  border-radius: 20px; padding: 0 14px; height: 40px;
}
.chat-input input { flex: 1; border: none; background: transparent; }
.chat-input .send {
  width: 62px; height: 38px; border-radius: 19px; background: var(--primary-grad);
  color: #fff; font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.chat-input .send[disabled] { opacity: .45; }
.chat-input .ic { font-size: 20px; color: var(--text-3); width: 30px; text-align: center; }
.typing-tip { font-size: 11px; color: var(--text-3); padding: 0 16px 6px; height: 16px; }

/* ---------------- 我的 ---------------- */
.me-head {
  padding: calc(var(--safe-top) + 26px) 18px 26px;
  background: var(--primary-grad); color: #fff;
  display: flex; align-items: center; gap: 14px;
  border-radius: 0 0 26px 26px;
}
.me-head .avatar, .me-head .avatar-fallback { border: 2.5px solid rgba(255,255,255,.7); }
.me-head .info { flex: 1; min-width: 0; }
.me-head .n { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.me-head .vip {
  font-size: 10px; background: linear-gradient(135deg,#ffd76e,#ffb300); color: #7a4b00;
  padding: 2px 7px; border-radius: 8px; font-weight: 700;
}
.me-head .d { font-size: 12.5px; opacity: .9; margin-top: 5px; }
.me-head .edit { font-size: 12px; background: rgba(255,255,255,.22); padding: 5px 12px; border-radius: 14px; }

.me-stats {
  display: flex; background: #fff; border-radius: var(--radius);
  margin: -16px 14px 0; padding: 16px 0; box-shadow: var(--shadow); position: relative;
}
.me-stats .item { flex: 1; text-align: center; }
.me-stats .item b { display: block; font-size: 19px; font-weight: 700; }
.me-stats .item span { font-size: 11.5px; color: var(--text-3); }

.menu { background: #fff; border-radius: var(--radius); margin: 12px 14px; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #fafbfd; }
.menu-item .mi { width: 22px; text-align: center; font-size: 17px; }
.menu-item .arrow { color: var(--text-3); font-size: 15px; }
.menu-item .val { color: var(--text-3); font-size: 13px; }

/* 资料页 */
.profile-hero {
  background: var(--primary-grad); color: #fff; text-align: center;
  padding: calc(var(--safe-top) + 20px) 16px 24px;
}
.profile-hero .avatar, .profile-hero .avatar-fallback { margin: 0 auto 12px; border: 3px solid rgba(255,255,255,.6); }
.profile-hero .n { font-size: 21px; font-weight: 700; }
.profile-hero .m { font-size: 12.5px; opacity: .9; margin-top: 6px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; }
.photo-grid .ph {
  position: relative; padding-top: 118%; border-radius: 12px; overflow: hidden;
  background: #f2f3f7;
}
.photo-grid .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-grid .ph .del {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: 13px;
  display: grid; place-items: center;
}
.photo-grid .ph .mark {
  position: absolute; bottom: 5px; left: 5px; font-size: 10px;
  background: rgba(0,0,0,.55); color: #fff; padding: 1px 6px; border-radius: 6px;
}
.photo-grid .add {
  border: 1.5px dashed #d5d8e0; display: grid; place-items: center;
  color: var(--text-3); font-size: 26px; border-radius: 12px; padding-top: 118%;
  position: relative;
}
.photo-grid .add span { position: absolute; inset: 0; display: grid; place-items: center; }

/* ---------------- 相册里的视频 ----------------
   视频和图片共用一套网格：缩略图用 <video preload="metadata"> 的首帧，
   比「黑方块 + 播放键」信息量大得多，用户一眼能看出是哪段。
   首帧在部分机型上要几百毫秒才解码出来，所以底下垫一层深色，
   解码完成前不会闪白。 */
.photo-grid .ph video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #1d2129;
}
.photo-grid .ph .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 26px; pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .65);
}
.photo-grid .ph .vtip {
  position: absolute; top: 5px; left: 5px; font-size: 10px;
  background: rgba(0, 0, 0, .55); color: #fff; padding: 1px 6px; border-radius: 6px;
}

/* ---------------- 全屏播放视频 ---------------- */
.video-view {
  position: fixed; inset: 0; z-index: 1000; background: #000;
  display: grid; place-items: center;
}
.video-view video { width: 100%; max-height: 100%; background: #000; }
.video-view .vv-close {
  position: absolute; top: calc(14px + var(--safe-top)); right: 14px;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 16px;
  display: grid; place-items: center;
}
.video-view .vv-close:active { background: rgba(255, 255, 255, .3); }
.info-list { background: #fff; border-radius: var(--radius); margin: 0 14px 12px; overflow: hidden; }
.info-list .row {
  display: flex; justify-content: space-between; padding: 14px 16px;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.info-list .row:last-child { border-bottom: none; }
.info-list .row .k { color: var(--text-2); }
.info-list .row .v { color: var(--text); font-weight: 500; }

/* ---------------- Toast / Modal / Loading ---------------- */
.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.9);
  background: rgba(0,0,0,.78); color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 14px; max-width: 76vw; text-align: center; z-index: 999;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.modal-wrap { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-box {
  position: relative; width: 82vw; max-width: 340px; background: #fff;
  border-radius: 18px; padding: 22px 20px 16px; box-shadow: var(--shadow-lg);
  animation: pop .2s ease-out;
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-box h3 { margin: 0 0 10px; font-size: 16.5px; text-align: center; }
/* ⚠️ 必须 pre-line：ui.confirm 是用 textContent 写入的，
   弹窗文案里那些 \n 在没有这个属性时会被折叠成空格 ——
   多段话挤成一整行，读起来像坏掉了。pre-line 只保留换行、照旧折叠空格。 */
.modal-box .body { font-size: 14px; color: var(--text-2); text-align: center; margin-bottom: 16px; line-height: 1.6; white-space: pre-line; }
.modal-box .acts { display: flex; gap: 10px; }
.modal-box .acts .btn { height: 42px; font-size: 14.5px; }

/* ---------------- 出生日期：可点击的日期行 ---------------- */
.pick-wrap { cursor: pointer; }
.pick-wrap .pick-val { flex: 1; font-size: 15px; color: var(--text-3); }
.pick-wrap .pick-val.on { color: var(--text); }
.pick-wrap .pick-arrow { color: var(--text-3); font-size: 17px; line-height: 1; }

/* ---------------- 日期选择滚轮（年 / 月 / 日） ---------------- */
/* 弹层改为贴底展开 */
.modal-wrap.sheet { place-items: end center; }
.modal-box.dp-box {
  width: 100%; max-width: 480px; padding: 0;
  border-radius: 18px 18px 0 0; overflow: hidden;
  animation: dp-up .22s ease-out;
}
@keyframes dp-up { from { transform: translateY(100%); } to { transform: none; } }

.dp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--line);
}
.dp-act { font-size: 15px; color: var(--text-2); padding: 6px 4px; }
.dp-act-ok { color: var(--primary); font-weight: 600; }
.dp-title { font-size: 15px; font-weight: 600; text-align: center; }
.dp-title b { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); margin-top: 2px; }

.dp-cols { position: relative; display: flex; padding: 8px; }
/* 中间那条高亮带，滚动时静止不动 */
.dp-hi {
  position: absolute; left: 8px; right: 8px; top: 50%; height: 40px; margin-top: -20px;
  background: #fff1f5; border-radius: 10px; pointer-events: none;
}
.dp-col {
  position: relative; flex: 1; height: 200px; overflow-y: auto;
  padding: 80px 0;                    /* (= 可见高度 - 行高) / 2，让首尾也能滚到中间 */
  scroll-snap-type: y proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.dp-col[data-k="y"] { flex: 1.15; }
.dp-col::-webkit-scrollbar { display: none; }
.dp-item {
  height: 40px; line-height: 40px; text-align: center;
  font-size: 17px; color: var(--text-3); scroll-snap-align: center;
  transition: color .15s;
}
.dp-item.on { color: var(--text); font-weight: 600; }

/* ---------------- 城市选择器（底部弹层 + 搜索 + 分省格子） ---------------- */
/* 复用 dp 的贴底弹层外壳，只是内容改成可滚动的城市列表 */
.modal-box.cp-box {
  display: flex; flex-direction: column;
  height: 78vh; max-height: 620px;
}
.cp-search { flex: none; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cp-search input {
  width: 100%; height: 38px; padding: 0 14px; border-radius: 12px;
  background: #f4f5f8; border: 1px solid transparent; font-size: 14.5px;
  -webkit-appearance: none; appearance: none;
}
.cp-search input:focus { border-color: var(--primary); background: #fff; }
.cp-list {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; padding: 4px 0 12px;
}
.cp-list::-webkit-scrollbar { display: none; }
.cp-sec { font-size: 12px; color: var(--text-3); padding: 10px 16px 6px; }
.cp-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px; }
.cp-chip {
  padding: 8px 13px; border-radius: 10px; background: #f4f5f8;
  color: var(--text-2); font-size: 13.5px; line-height: 1.2; transition: all .15s;
}
.cp-chip:active { background: #e9ebf1; }
.cp-chip.on {
  background: #fff0f4; color: var(--primary); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--primary);
}
.cp-empty { text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.9; padding: 46px 0; }
/* 省级格子：比城市格宽一点，右下角带个城市数量 */
.cp-prov { padding: 8px 15px; }
.cp-prov i { font-style: normal; font-size: 10px; color: var(--text-3); margin-left: 4px; vertical-align: 1px; }
.cp-prov.on i { color: var(--primary); }
/* 第二级的面包屑：返回 + 当前省份 */
.cp-crumb {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; background: #fafbfd; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2);
}
.cp-back { color: var(--primary); font-size: 13px; padding: 2px 0; flex: none; }

/* ---------------- 兴趣标签选择器（标签墙 + 已选计数） ---------------- */
/* 复用 cp 的外壳和格子，只多一条「已选 n/8 + 清空」的状态条 */
.tp-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: #fafbfd; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3);
}
.tp-clear { color: var(--primary); font-size: 12.5px; padding: 2px 0; }
/* 「保密」这类值为空的选项，滚轮里也要能一眼看出是「不填」 */
.dp-item[data-v=""] { color: var(--text-3); font-style: italic; }

.loading {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.55); z-index: 998;
}
.spinner {
  width: 32px; height: 32px; border: 3px solid #ffd6e2; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, #f0f1f5 25%, #e6e8ee 37%, #f0f1f5 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 匹配成功动画层 */
.match-layer {
  position: fixed; inset: 0; z-index: 950; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(255,92,138,.96), rgba(255,142,110,.96));
  color: #fff; text-align: center; animation: pop .3s ease-out;
}
.match-layer .t { font-size: 26px; font-weight: 800; letter-spacing: 3px; margin-bottom: 8px; }
.match-layer .s { font-size: 13px; opacity: .9; margin-bottom: 26px; }
.match-layer .av { display: flex; justify-content: center; gap: -10px; margin-bottom: 26px; }
.match-layer .av .avatar, .match-layer .av .avatar-fallback {
  border: 3px solid rgba(255,255,255,.85); margin: 0 -10px;
}
.match-layer .btn { width: 180px; margin: 0 auto; background: #fff; color: var(--primary); }

@media (min-width: 520px) {
  body { background: #e9ebf1; }
  #app { max-width: 480px; margin: 0 auto; background: var(--bg); box-shadow: 0 0 40px rgba(0,0,0,.08); position: relative; }
  .tabbar { max-width: 480px; left: 50%; transform: translateX(-50%); }
}

/* ============================================================
   附近的人 / 会员 / 聊天增强
   ============================================================ */

/* ---------------- 发现页顶栏右侧（今日剩余次数） ---------------- */
.swipe-top-right { display: flex; align-items: center; gap: 10px; }

/* 卡片上的 VIP 小标 / 列表里的年龄、VIP 小标 */
.vip-tag { background: linear-gradient(135deg, #ffd76e, #ffb300); color: #7a4b00; }
.age-mini { font-size: 11px; font-weight: 400; color: var(--text-3); }
.vip-mini {
  font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 6px;
  background: linear-gradient(135deg, #ffd76e, #ffb300); color: #7a4b00;
}

/* ---------------- 定位状态条 ---------------- */
.geo-bar {
  display: flex; align-items: center; gap: 11px;
  margin: 0 14px 10px; padding: 11px 13px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.geo-bar .gb-ico { font-size: 19px; flex: none; }
.geo-bar .gb-body { flex: 1; min-width: 0; }
.geo-bar .gb-body b { display: block; font-size: 13px; font-weight: 600; }
.geo-bar .gb-body span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.geo-bar.ok { background: #f2fbf5; border-color: #d6f2e0; }
.geo-bar.ok .gb-body b { color: #15803d; }
.geo-bar.ok .gb-body span { color: #4d9e6d; text-decoration: underline; }
.geo-bar.warn { background: #fff8f2; border-color: #ffe2cc; }
.geo-bar.warn .gb-body b { color: #b45309; }
.geo-bar .gb-btn {
  flex: none; height: 32px; padding: 0 15px; border-radius: 16px;
  background: var(--primary-grad); color: #fff; font-size: 13px; font-weight: 600;
}
.geo-bar .gb-btn:active { opacity: .88; }

/* ---------------- 附近列表 ---------------- */
.near-row {
  display: flex; align-items: center; gap: 12px;
  margin: 0 14px 10px; padding: 12px 13px;
  background: var(--card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.near-row:active { background: #fafbfd; }
.near-row .info { flex: 1; min-width: 0; }
.near-row .name {
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.near-row .name .dot { width: 7px; height: 7px; border-radius: 50%; background: #d1d5db; }
.near-row .name .dot.on { background: var(--green); }
.near-row .desc {
  font-size: 12.5px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.near-row .near-acts { display: flex; gap: 6px; flex: none; }
.near-row .near-acts .sm-act {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px;
  background: #f5f6fa; color: var(--text-3);
}
.near-row .near-acts .sm-act.yes { background: #fff0f4; color: var(--primary); }
.near-row .near-acts .sm-act:active { transform: scale(.92); }

.nearby-foot { display: flex; justify-content: center; padding: 4px 14px 26px; }
.more-tip { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 10px 0; }

/* ---------------- 「喜欢我的」会员锁 ---------------- */
.vip-lock {
  margin: 6px 14px 20px; padding: 24px 18px 20px;
  background: linear-gradient(180deg, #fff9fb 0%, #ffffff 45%);
  border: 1px solid #ffe4ec; border-radius: var(--radius);
  text-align: center;
}
.vip-lock .vl-num { font-size: 15px; color: var(--text-2); }
.vip-lock .vl-num b { font-size: 27px; color: var(--primary); font-weight: 800; margin-right: 3px; }
.vip-lock .vl-wall {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 9px; margin: 18px 0 16px;
}
.vip-lock .blur-av {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd8e4, #ffe7d6);
  filter: blur(3px);
}
.vip-lock .vl-tip { font-size: 12.5px; color: var(--text-3); line-height: 1.7; margin: 0 0 16px; }
.vip-lock .btn { width: auto; padding: 0 26px; margin: 0 auto; display: inline-block; }

/* ---------------- 我的：会员入口 ---------------- */
.vip-entry {
  display: flex; align-items: center; gap: 12px;
  margin: 0 14px 12px; padding: 14px 15px;
  background: linear-gradient(120deg, #2b2118 0%, #4a3527 55%, #6b4a2f 100%);
  border-radius: var(--radius); color: #ffe9c9;
  box-shadow: 0 6px 18px rgba(70, 45, 20, .22);
}
.vip-entry:active { opacity: .94; }
.vip-entry .ve-ico { font-size: 22px; flex: none; }
.vip-entry .ve-body { flex: 1; min-width: 0; }
.vip-entry .ve-t {
  font-size: 15px; font-weight: 700; color: #ffe0a8;
  display: flex; align-items: center; gap: 6px;
}
.vip-entry .ve-s {
  font-size: 11.5px; color: #d8b890; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vip-entry .arrow { color: #b9915f; font-size: 15px; }

/* ---------------- 会员中心页 ---------------- */
.vip-head {
  margin: 4px 14px 14px; padding: 22px 18px;
  background: linear-gradient(120deg, #2b2118 0%, #4a3527 55%, #6b4a2f 100%);
  border-radius: var(--radius); color: #ffe9c9; text-align: center;
}
.vip-head.on { background: linear-gradient(120deg, #3a2a16 0%, #6b4a1f 50%, #a06f28 100%); }
.vip-head .vh-ico { font-size: 34px; line-height: 1; }
.vip-head .vh-t { font-size: 19px; font-weight: 800; color: #ffdf9e; margin-top: 8px; letter-spacing: .5px; }
.vip-head .vh-s { font-size: 12.5px; color: #d3b78f; margin-top: 6px; }

.vip-stats {
  display: flex; margin: 0 14px 14px; padding: 14px 0;
  background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.vip-stats .item { flex: 1; text-align: center; }
.vip-stats .item b { display: block; font-size: 19px; font-weight: 700; color: var(--primary); }
.vip-stats .item span { font-size: 11.5px; color: var(--text-3); }

/* 套餐选择：三档并排，点一下换选中。价格是接口下发的，这里只管画 */
.vip-plans-t {
  margin: 0 14px 9px; font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.vip-plans { display: flex; gap: 8px; margin: 0 14px 14px; }
.vip-plans .vp-item {
  flex: 1; position: relative; padding: 16px 4px 12px; text-align: center;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.vip-plans .vp-item.on {
  border-color: #e8b04b;
  background: linear-gradient(180deg, #fffaf0 0%, #fff2d6 100%);
  box-shadow: 0 6px 18px rgba(196, 146, 40, .16);
}
.vip-plans .vp-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  padding: 1px 8px; border-radius: 8px; white-space: nowrap;
  background: linear-gradient(135deg, #ffd76e, #ffb300);
  color: #7a4b00; font-size: 10px; font-weight: 700;
}
.vip-plans .vp-name { font-size: 12.5px; color: var(--text-2); }
.vip-plans .vp-item.on .vp-name { color: #8a6420; font-weight: 600; }
.vip-plans .vp-price { margin-top: 5px; color: var(--text); }
.vip-plans .vp-price i { font-style: normal; font-size: 13px; font-weight: 700; }
.vip-plans .vp-price b { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.vip-plans .vp-item.on .vp-price { color: #b37b1a; }
.vip-plans .vp-sub { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
/* 月付那档没有「省」，用 min-height 占位，保证三列高度一致 */
.vip-plans .vp-save { font-size: 10.5px; color: var(--green); margin-top: 3px; min-height: 15px; }
.vip-plans .vp-item.on .vp-save { color: #d98324; font-weight: 600; }

.vip-bens {
  margin: 0 14px 14px; background: var(--card);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden;
}
.vip-bens .vb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border-bottom: 1px solid var(--line);
}
.vip-bens .vb-row:last-child { border-bottom: none; }
.vip-bens .vb-ico { font-size: 19px; width: 24px; text-align: center; flex: none; }
.vip-bens .vb-body { flex: 1; min-width: 0; }
.vip-bens .vb-body b { display: block; font-size: 14px; font-weight: 600; }
.vip-bens .vb-body span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.vip-bens .vb-ok { font-size: 11px; color: var(--green); flex: none; }

.vip-foot { padding: 4px 14px calc(24px + var(--safe-bottom)); text-align: center; }
.vip-foot .vf-tip { font-size: 11.5px; color: var(--text-3); margin-top: 10px; line-height: 1.6; }

/* ---------------- 聊天：扩展面板 ---------------- */
.chat-panel {
  border-top: 1px solid var(--line);
  background: #f7f8fb;
  padding: 12px 10px calc(10px + var(--safe-bottom));
  animation: panel-up .18s ease-out;
}
@keyframes panel-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.panel-grid { display: flex; gap: 6px; }
.panel-grid .panel-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line);
}
.panel-grid .panel-item:active { background: #f2f3f8; }
.panel-grid .pi-ico { font-size: 22px; line-height: 1; }
.panel-grid .pi-t { font-size: 11.5px; color: var(--text-2); }

.emoji-grid {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 2px; max-height: 190px; overflow-y: auto;
}
.emoji-grid .emoji {
  font-size: 23px; line-height: 1; padding: 6px 0; border-radius: 8px;
  background: transparent;
}
.emoji-grid .emoji:active { background: #eceef5; }

/* ---------------- 聊天：按住说话 ---------------- */
.hold-wrap { display: flex; align-items: center; gap: 8px; flex: 1; }
.hold-wrap .kb-btn {
  flex: none; width: 30px; text-align: center; font-size: 17px; color: var(--text-3);
}
.hold-wrap .hold-btn {
  flex: 1; height: 38px; border-radius: 19px;
  background: #fff; border: 1px solid #e2e5ec;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.hold-wrap .hold-btn.on {
  background: #eceef4; border-color: #d8dce6; color: var(--text-3);
}

/* 录音中的浮层提示 */
.rec-tip {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  min-width: 130px; padding: 14px 18px; border-radius: 14px;
  background: rgba(28, 32, 42, .88); color: #fff;
  font-size: 12.5px; line-height: 1.6; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 900;
}
.rec-tip.show { opacity: 1; }
.rec-tip.bad { background: rgba(200, 40, 60, .9); }

/* ---------------- 聊天：语音条 ---------------- */
.msg .bubble.voice {
  display: flex; align-items: center; gap: 8px;
  min-width: 96px; max-width: 62%;
  cursor: pointer;
}
.msg .bubble.voice .vw {
  display: flex; align-items: center; gap: 2px; height: 18px;
}
.msg .bubble.voice .vw i {
  width: 3px; border-radius: 2px; background: var(--primary);
  animation: none;
}
.msg .bubble.voice .vw i:nth-child(1) { height: 7px; }
.msg .bubble.voice .vw i:nth-child(2) { height: 13px; }
.msg .bubble.voice .vw i:nth-child(3) { height: 17px; }
.msg .bubble.voice .vw i:nth-child(4) { height: 10px; }
.msg.me .bubble.voice .vw i { background: #fff; }
.msg .bubble.voice.playing .vw i { animation: wave .6s ease-in-out infinite; }
.msg .bubble.voice.playing .vw i:nth-child(2) { animation-delay: .15s; }
.msg .bubble.voice.playing .vw i:nth-child(3) { animation-delay: .3s; }
.msg .bubble.voice.playing .vw i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { 0%,100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
.msg .bubble.voice .vd { font-size: 11.5px; color: var(--text-3); flex: none; }
.msg.me .bubble.voice .vd { color: rgba(255,255,255,.85); }

/* ---------------- 聊天：位置卡片 ---------------- */
.msg .bubble.loc { padding: 0; overflow: hidden; min-width: 150px; }
.msg .bubble.loc .loc-t {
  padding: 9px 12px 7px; font-size: 13.5px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.msg.me .bubble.loc .loc-t { border-bottom-color: rgba(255,255,255,.25); }
.msg .bubble.loc .loc-p {
  height: 76px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  background: repeating-linear-gradient(45deg, #eef1f7, #eef1f7 8px, #e7ebf3 8px, #e7ebf3 16px);
}
.msg .bubble.loc .loc-pin { font-size: 21px; line-height: 1; }
.msg .bubble.loc .loc-hint { font-size: 10.5px; color: var(--text-3); }

