/* ==========================================================================
   友约 · UI v4
   方向：保留「浅灰底 + 白卡片 + 蓝/玫红」的原有气质，重建设计令牌，
        统一圆角/间距/层级/字号，补齐加载态、空状态与交互反馈。
   ========================================================================== */

/* ── 1. 设计令牌 ───────────────────────────────────────────────────────── */
:root {
  /* 底色与卡片 */
  --page:        #F2F4F7;   /* 页面底 */
  --page-2:      #E9EDF2;   /* 次级底（按下态、占位） */
  --card:        #FFFFFF;

  /* 文字层级 */
  --ink:         #171B21;   /* 主文本 */
  --ink-2:       #646E7C;   /* 次要文本 */
  --ink-3:       #98A2B0;   /* 占位 / 辅助 */

  /* 描边 */
  --line:        #EDF0F4;   /* 分割线 */
  --line-2:      #DFE5EC;   /* 输入框 / 描边按钮 */

  /* 品牌蓝（保留 #4F90E0，补齐按下态与「文字用」对比色） */
  --blue:        #4F90E0;
  --blue-600:    #3B7AC9;
  --blue-ink:    #2E6EBD;   /* 文字场景，对比度 ≥ 4.5:1 */
  --blue-soft:   #EAF2FC;
  --blue-ring:   #D6E6FA;

  /* 品牌玫红 */
  --rose:        #D0728C;
  --rose-600:    #B85A76;
  --rose-ink:    #B4536C;
  --rose-soft:   #FBEAF0;

  /* 语义色 */
  --green:       #2F9B7C;
  --green-soft:  #E7F6F1;
  --amber:       #C9861F;
  --amber-soft:  #FBF2E1;

  /* 圆角 */
  --r-xs: 8px;  --r-sm: 10px;  --r-md: 14px;  --r-lg: 18px;  --r-xl: 24px;  --r-full: 999px;

  /* 间距 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;

  /* 层级阴影（由近及远） */
  --sh-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --sh-2: 0 4px 14px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
  --sh-3: 0 14px 34px rgba(16, 24, 40, .13);

  /* 动效 */
  --ease: cubic-bezier(.22, .61, .36, 1);

  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ── 2. 基础重置 ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #E4E8EE;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* 修复：作者样式 display:flex 会盖掉 UA 的 [hidden]{display:none}，
   导致「返回按钮」「底部导航」永远隐藏不掉 */
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--blue-ring); }

/* ── 3. 手机外框 ───────────────────────────────────────────────────────── */
.phone {
  position: relative;
  width: 390px; height: 100vh; max-height: min(844px, calc(100vh - 44px));
  background: var(--page);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 44px;
  box-shadow: 0 0 0 11px #14181F, 0 0 0 12.5px rgba(255, 255, 255, .10),
              0 40px 80px rgba(16, 24, 40, .34);
}

/* ── 4. 状态栏 ─────────────────────────────────────────────────────────── */
.statusbar {
  flex: 0 0 44px; height: 44px; padding: 0 26px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; letter-spacing: .2px; color: var(--ink);
  background: var(--page);
}
.sb-time { font-variant-numeric: tabular-nums; }
.sb-notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 26px; border-radius: var(--r-full); background: #14181F;
}
.sb-icons { display: flex; align-items: center; gap: 6px; color: rgba(23, 27, 33, .78); }
.sb-ic { width: 17px; height: 12px; display: block; fill: currentColor; }
.sb-battery {
  position: relative; width: 25px; height: 12.5px; padding: 1.6px;
  border: 1.6px solid rgba(23, 27, 33, .42); border-radius: 4px;
}
.sb-battery::after {
  content: ""; position: absolute; right: -3.6px; top: 3.4px;
  width: 2px; height: 5.5px; border-radius: 0 1px 1px 0; background: rgba(23, 27, 33, .38);
}
.sb-battery i { display: block; height: 100%; width: 72%; border-radius: 1.5px; background: currentColor; }

/* ── 5. 标题栏 ─────────────────────────────────────────────────────────── */
.appbar {
  flex: 0 0 52px; height: 52px; padding: 0 6px;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  background: var(--page);
}
.appbar-title {
  grid-column: 2; margin: 0; text-align: center;
  font-size: 18px; font-weight: 700; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-back { grid-column: 1; }
.appbar-action { grid-column: 3; }
.appbar-back, .appbar-action {
  width: 44px; height: 44px; padding: 0;
  border: none; background: transparent; color: var(--ink); border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease), transform .12s var(--ease);
}
.appbar-back:active, .appbar-action:active { background: rgba(23, 27, 33, .06); transform: scale(.93); }

/* ── 6. 内容区 ─────────────────────────────────────────────────────────── */
.content {
  flex: 1; min-height: 0; padding: 2px 16px 16px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.content::-webkit-scrollbar { display: none; }

.section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 4px 10px; font-size: 12px; font-weight: 700;
  letter-spacing: .4px; color: var(--ink-2);
}
.section-title:first-child { margin-top: 6px; }
.section-title .cnt {
  padding: 1px 7px; border-radius: var(--r-full);
  background: var(--page-2); color: var(--ink-2); font-size: 11px; font-weight: 700;
}

/* ── 7. 空状态 / 骨架屏 ────────────────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 52px 24px;
}
.empty-ico {
  width: 64px; height: 64px; margin-bottom: 14px; border-radius: 22px;
  background: var(--card); box-shadow: var(--sh-1); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
}
.empty-ico svg { width: 29px; height: 29px; }
.empty-t { font-size: 15px; font-weight: 700; letter-spacing: -.1px; }
.empty-d { margin-top: 5px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.empty .btn { margin-top: 16px; }

.sk-list { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.sk-block { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; }
.sk {
  border-radius: var(--r-xs);
  background: linear-gradient(90deg, #EDF0F4 25%, #F6F8FA 37%, #EDF0F4 63%);
  background-size: 400% 100%; animation: sk 1.4s ease-in-out infinite;
}
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.sk-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.sk-av { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.sk-line { height: 12px; }

.spinner {
  width: 26px; height: 26px; margin: 0 auto; border-radius: 50%;
  border: 2.5px solid var(--line-2); border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center-load { display: flex; justify-content: center; padding: 44px 0; }

/* ── 8. 列表卡片 ───────────────────────────────────────────────────────── */
.cardlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  cursor: pointer; transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.card:active { transform: scale(.985); box-shadow: var(--sh-2); }
.card .body { flex: 1; min-width: 0; }
.card .title {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 15px; font-weight: 600; letter-spacing: -.1px;
}
.card .sub {
  margin-top: 4px; font-size: 13px; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta {
  flex: 0 0 auto; text-align: right; font-size: 12px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.card .meta svg { width: 16px; height: 16px; }
.arrow { display: flex; color: var(--ink-3); }
.arrow svg { width: 17px; height: 17px; }

/* 头像 */
.avatar {
  position: relative; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #4F90E0), var(--c2, #8FB8F0));
  color: #fff; font-size: 16px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 38px; height: 38px; font-size: 14px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 76px; height: 76px; font-size: 26px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 7px; font-size: 11px; font-weight: 600; line-height: 1.45; white-space: nowrap;
}
.tag.blue  { background: var(--blue-soft);  color: var(--blue-ink); }
.tag.rose  { background: var(--rose-soft);  color: var(--rose-ink); }
.tag.gray  { background: var(--page-2);     color: var(--ink-2); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }

/* 认证徽章（浅色底场景） */
.authpills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.authpill {
  padding: 2px 7px; border-radius: 6px; line-height: 1.5;
  font-size: 10px; font-weight: 600; background: var(--green-soft); color: var(--green);
}
.authpill.off { background: var(--page-2); color: var(--ink-3); }
/* 深色照片上的变体 */
.swipe-card .authpill          { background: rgba(255, 255, 255, .20); color: #fff; backdrop-filter: blur(4px); }
.swipe-card .authpill.off      { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .55); }

/* ── 9. 底部导航 ───────────────────────────────────────────────────────── */
.tabbar {
  flex: 0 0 auto; padding-bottom: var(--safe-b);
  display: flex; align-items: stretch;
  background: rgba(255, 255, 255, .90);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; min-height: 58px; padding: 8px 0 7px; gap: 3px;
  border: none; background: transparent; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tab-ico {
  position: relative; width: 44px; height: 26px; border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s var(--ease);
}
.tab-ico svg { width: 23px; height: 23px; transition: transform .18s var(--ease); }
.tab-label { font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .2px; }
.tab.active { color: var(--blue-ink); }
.tab.active .tab-ico { background: var(--blue-soft); }
.tab.active .tab-ico svg { transform: scale(1.06); }
.tab:active .tab-ico { transform: scale(.93); }
.tab .badge {
  position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--rose); color: #fff; border-radius: var(--r-full);
  font-size: 10px; font-weight: 700; font-style: normal; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

/* ── 10. 按钮 ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  -webkit-user-select: none; user-select: none;
  transition: transform .12s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(79, 144, 224, .28); }
.btn-primary:active { background: var(--blue-600); }
.btn-rose { background: var(--rose); color: #fff; box-shadow: 0 2px 8px rgba(208, 112, 140, .28); }
.btn-rose:active { background: var(--rose-600); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:active { background: var(--page-2); }
.btn-line { background: transparent; color: var(--blue-ink); border-color: var(--blue); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { min-height: 50px; border-radius: var(--r-lg); font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── 11. 表单 ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%; min-height: 44px; padding: 11px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--card); color: var(--ink); font-size: 15px; outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
textarea.input { resize: vertical; min-height: 92px; line-height: 1.6; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2398A2B0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}

/* ── 12. 底部弹层 ──────────────────────────────────────────────────────── */
.sheet { position: absolute; inset: 0; z-index: 50; display: flex; align-items: flex-end; }
.sheet-mask {
  position: absolute; inset: 0; background: rgba(16, 24, 40, .45);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: maskIn .22s var(--ease);
}
.sheet-panel {
  position: relative; width: 100%; max-height: 88%; overflow-y: auto; scrollbar-width: none;
  padding: 0 20px calc(20px + var(--safe-b));
  background: var(--card); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--sh-3);
  animation: sheetUp .32s var(--ease);
}
.sheet-panel::-webkit-scrollbar { display: none; }
.sheet-grab {
  width: 36px; height: 4px; margin: 8px auto 12px; border-radius: var(--r-full);
  background: var(--line-2); cursor: pointer;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 16px; font-size: 17px; font-weight: 700; letter-spacing: -.2px;
}
.sheet-head .x {
  width: 30px; height: 30px; padding: 0; border: none; border-radius: 50%;
  background: var(--page-2); color: var(--ink-2); line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s var(--ease);
}
.sheet-head .x:active { background: var(--line-2); }
.sheet-head .x svg { width: 16px; height: 16px; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* ── 13. 登录页 ────────────────────────────────────────────────────────── */
.login-wrap {
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  padding: 28px 24px calc(28px + var(--safe-b));
}
.login-logo {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 24px;
  background: linear-gradient(135deg, #4F90E0 0%, #7C6FE0 55%, #D0728C 100%);
  color: #fff; font-size: 32px; font-weight: 800; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 26px rgba(79, 144, 224, .32);
}
.login-h1 { margin: 0 0 8px; text-align: center; font-size: 25px; font-weight: 800; letter-spacing: -.4px; }
.login-sub { margin: 0 0 28px; text-align: center; font-size: 14px; color: var(--ink-2); }
.login-card { padding: 20px 18px 22px; background: var(--card); border-radius: var(--r-xl); box-shadow: var(--sh-2); }
.login-card .field:last-of-type { margin-bottom: 20px; }
.login-tip { margin: 18px 0 0; text-align: center; font-size: 12px; line-height: 1.75; color: var(--ink-3); }

/* ── 14. 翻牌子 ────────────────────────────────────────────────────────── */
.swipe { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.swipe-card {
  position: relative; flex: 1; min-height: 0; margin-top: 4px;
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-2);
  background: linear-gradient(160deg, #E7ECF3, #F3F6F9);
  display: flex; align-items: flex-end;
}
.swipe-card .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.swipe-card .grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 20, .80) 0%, rgba(10, 14, 20, .34) 38%, transparent 68%);
}
.swipe-card .info { position: relative; width: 100%; padding: 18px 18px 20px; color: #fff; cursor: pointer; }
.swipe-card .info .nm {
  display: flex; align-items: center; gap: 8px;
  font-size: 24px; font-weight: 800; letter-spacing: -.4px;
}
.swipe-card .info .nm .age { font-size: 16px; font-weight: 600; opacity: .88; }
.swipe-card .info .bio {
  margin-top: 6px; font-size: 13.5px; line-height: 1.55; opacity: .92;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.swipe-card .info .meta2 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 9px; font-size: 12.5px; opacity: .88;
}
.swipe-card .info .meta2 .dotsep { opacity: .5; }
.swipe-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--c1, #4F90E0), var(--c2, #8FB8F0));
  color: rgba(255, 255, 255, .92); font-size: 84px; font-weight: 800; line-height: 1;
}
.swipe-actions { display: flex; gap: 12px; padding: 14px 2px 2px; }
.swipe-actions .btn { flex: 1; min-height: 52px; border-radius: var(--r-lg); font-size: 16px; }

/* ── 15. 网格（喜欢 / 被喜欢） ─────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  overflow: hidden; cursor: pointer;
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.tile:active { transform: scale(.98); box-shadow: var(--sh-2); }
.tile .ph { position: relative; height: 132px; overflow: hidden; background: var(--page-2); }
.tile .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .ph .initial {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--c1, #4F90E0), var(--c2, #8FB8F0));
}
.tile .nm {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px 12px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── 16. 详情页 ────────────────────────────────────────────────────────── */
.detail { display: flex; flex-direction: column; min-height: 100%; }
.detail-photos { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.detail-photos::-webkit-scrollbar { display: none; }
.detail-photos img {
  height: 220px; flex: 0 0 auto; object-fit: cover;
  border-radius: var(--r-md); box-shadow: var(--sh-1); background: var(--page-2);
}
.detail-name {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 6px 2px 0; font-size: 21px; font-weight: 800; letter-spacing: -.3px;
}
.detail-name .age { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.detail-bio { margin: 8px 2px 16px; font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.detail-actions { display: flex; gap: 10px; margin: 16px 0 8px; }
.detail-actions .btn { flex: 1; }
.kv {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.kv:last-of-type { border-bottom: none; }
.kv .k { font-size: 13.5px; color: var(--ink-2); }
.kv .v { font-weight: 600; text-align: right; }

/* ── 17. 广场动态 ──────────────────────────────────────────────────────── */
.post { padding: 16px; margin-bottom: 10px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .nm {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-head .tm { flex: 0 0 auto; font-size: 12px; color: var(--ink-3); }
.post-content { margin: 12px 0; font-size: 15px; line-height: 1.68; white-space: pre-wrap; word-break: break-word; }
.post-imgs { display: grid; gap: 6px; margin-bottom: 10px; }
.post-imgs.n1 { grid-template-columns: 1fr; }
.post-imgs.n2 { grid-template-columns: 1fr 1fr; }
.post-imgs.n3 { grid-template-columns: repeat(3, 1fr); }
.post-imgs.n4 { grid-template-columns: 1fr 1fr; }
.post-imgs img {
  width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in;
  border-radius: var(--r-sm); background: var(--page-2);
}
.post-imgs.n1 img { aspect-ratio: 16 / 10; }
.post-foot {
  display: flex; gap: 4px; padding-top: 10px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2);
}
.post-foot .act {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: var(--r-full); cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.post-foot .act:first-child { margin-left: -8px; }
.post-foot .act:active { background: var(--page-2); }
.post-foot .act svg { width: 17px; height: 17px; }
.post-foot .act.on { color: var(--rose); }
.post-foot .act.danger { margin-left: auto; }
.post-foot .act.danger:active { background: var(--rose-soft); color: var(--rose-ink); }
.comment { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: none; }
.comment .nm { font-size: 13px; font-weight: 600; }
.comment .ct { margin-top: 3px; font-size: 14px; line-height: 1.6; }
.comment .tm { margin-top: 4px; font-size: 11px; color: var(--ink-3); }

/* ── 18. 聊天 ──────────────────────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 10px;
}
.chat-scroll::-webkit-scrollbar { display: none; }
.chat-row { display: flex; flex-direction: column; max-width: 78%; }
.chat-row.me { align-self: flex-end; align-items: flex-end; }
.chat-row.them { align-self: flex-start; align-items: flex-start; }
.bubble {
  padding: 9px 13px; border-radius: 18px;
  font-size: 15px; line-height: 1.55; word-break: break-word; white-space: pre-wrap;
}
.chat-row.me .bubble {
  background: linear-gradient(135deg, var(--blue), #5C9BE6); color: #fff;
  border-bottom-right-radius: 6px; box-shadow: 0 2px 8px rgba(79, 144, 224, .24);
}
.chat-row.them .bubble { background: var(--card); color: var(--ink); box-shadow: var(--sh-1); border-bottom-left-radius: 6px; }
.chat-scroll .empty { margin: auto; padding: 40px 24px; }
.bubble-time { margin: 4px 4px 0; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chat-input {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.chat-input .input { flex: 1; min-height: 42px; padding: 10px 14px; }
.chat-input .btn { min-height: 42px; padding: 0 16px; flex: 0 0 auto; }

/* ── 19. 我的 ──────────────────────────────────────────────────────────── */
.profile {
  display: flex; align-items: center; gap: 14px; padding: 16px; margin: 6px 0 12px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1);
  cursor: pointer; transition: transform .14s var(--ease);
}
.profile:active { transform: scale(.99); }
.profile-meta { flex: 1; min-width: 0; }
.profile-name {
  display: flex; align-items: center; gap: 7px;
  font-size: 18px; font-weight: 700; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden;
}
.profile-sub { margin-top: 5px; font-size: 12.5px; color: var(--ink-2); }

.wallet {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px;
  padding: 18px; margin-bottom: 14px; border-radius: var(--r-lg); color: #fff;
  background: linear-gradient(135deg, #4F90E0 0%, #6E7FE0 52%, #D0728C 100%);
  box-shadow: 0 8px 22px rgba(79, 144, 224, .28);
}
.wallet::before, .wallet::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .09);
}
.wallet::before { right: -40px; top: -56px; width: 150px; height: 150px; }
.wallet::after { right: 26px; bottom: -62px; width: 110px; height: 110px; background: rgba(255, 255, 255, .07); }
.wallet .wcell, .wallet .wbtn { position: relative; z-index: 1; }
.wallet .wcell { flex: 1; }
.wallet .wv { font-size: 24px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.wallet .wl { margin-top: 3px; font-size: 12px; opacity: .9; }

.menulist { list-style: none; margin: 0 0 14px; padding: 0; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.menulist li {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px;
  font-size: 15px; cursor: pointer; transition: background .12s var(--ease);
}
.menulist li + li { border-top: 1px solid var(--line); }
.menulist li:active { background: var(--page); }
.menulist li .mi {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue-ink);
}
.menulist li .mi svg { width: 17px; height: 17px; }
.menulist li .mi.rose  { background: var(--rose-soft);  color: var(--rose-ink); }
.menulist li .mi.green { background: var(--green-soft); color: var(--green); }
.menulist li .mi.amber { background: var(--amber-soft); color: var(--amber); }
.menulist li .mi.gray  { background: var(--page-2);     color: var(--ink-2); }
.menulist li .mt { flex: 1; font-weight: 500; }
.menulist li .mv { font-size: 13px; color: var(--ink-3); }
.menulist li .arrow { display: flex; color: var(--ink-3); }
.menulist li .arrow svg { width: 17px; height: 17px; }

/* ── 20. 待处理申请 ────────────────────────────────────────────────────── */
.req {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.req .body { flex: 1; min-width: 0; }
.req .rq-t { font-size: 15px; font-weight: 700; }
.req .rq-d { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); }
.req .acts { flex: 0 0 auto; display: flex; gap: 8px; }

/* ── 21. Toast ─────────────────────────────────────────────────────────── */
.toast {
  position: absolute; left: 50%; bottom: 92px; z-index: 60;
  display: flex; align-items: center; gap: 8px; max-width: 78%;
  padding: 11px 18px; border-radius: 14px;
  background: rgba(23, 27, 33, .94); color: #fff; font-size: 13.5px; text-align: center;
  box-shadow: var(--sh-3); animation: toastIn .24s var(--ease);
}
.toast-ic { display: flex; color: #7FD3A8; }
.toast-ic svg { width: 16px; height: 16px; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── 22. 响应式与无障碍 ────────────────────────────────────────────────── */
@media (max-width: 440px) {
  body { background: var(--page); }
  .phone {
    width: 100%; height: 100vh; height: 100dvh; max-height: none;
    border-radius: 0; box-shadow: none;
  }
  .statusbar { display: none; }   /* 真机由系统状态栏接管 */
  .content { padding-bottom: calc(16px + var(--safe-b)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
