/* =========================================================
   观心社区 · 设计系统
   绿色系 · 清爽 · 圆角卡片 · 顺滑动效
   ========================================================= */

/* ---------- 令牌 ---------- */
:root {
  --c-bg:        #F5F7F6;
  --c-bg-soft:   #ECF1EE;
  --c-surface:   #FFFFFF;
  --c-text:      #1F2A24;
  --c-text-2:    #68736D;
  --c-text-3:    #9BA69F;
  --c-line:      rgba(31, 42, 36, .08);
  --c-primary:   #25A067;
  --c-primary-2: #4CBE87;
  --c-primary-soft: rgba(37, 160, 103, .10);
  --c-like:      #FF4D6D;
  --c-danger:    #E5484D;
  --grad-primary: linear-gradient(135deg, #4CBE87 0%, #25A067 100%);
  --grad-hero:   linear-gradient(165deg, #6CCB9C 0%, #2FAE74 45%, #1B9159 100%);

  --r-s: 11px;
  --r-m: 16px;
  --r-l: 20px;
  --r-xl: 26px;

  --sh-s: 0 1px 2px rgba(31,42,36,.04), 0 2px 8px rgba(31,42,36,.05);
  --sh-m: 0 4px 16px rgba(31,42,36,.09), 0 1px 4px rgba(31,42,36,.05);
  --sh-l: 0 18px 44px rgba(31,42,36,.18);

  --ease-out:  cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --appbar-h: 52px;
  --tabbar-h: 60px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "MiSans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI",
               "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
input, textarea, button { font-family: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
img { display: block; }
::selection { background: rgba(37, 160, 103, .18); }

.hidden { display: none !important; }

/* ---------- 通用动效 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  70% { transform: scale(.92); }
  100% { transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  from { background-position: 150% 0; }
  to   { background-position: -50% 0; }
}
@keyframes slideUpIn {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes sheetIn {
  from { transform: translateY(32px); opacity: .4; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes toastIn {
  from { transform: translateY(16px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes floatHeart {
  0%   { transform: translateY(0) scale(.6); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translateY(-46px) scale(1.25); opacity: 0; }
}
@keyframes pageIn {
  from { transform: translateX(28px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes pageOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(30px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* =========================================================
   启动闪屏
   ========================================================= */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background:
    radial-gradient(120% 70% at 50% -10%, #DDF3E7 0%, rgba(245,247,246,0) 60%),
    var(--c-bg);
  transition: opacity .4s var(--ease-out);
}
.boot.off { opacity: 0; pointer-events: none; }
.boot-logo {
  width: 76px; height: 76px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-hero); color: #fff; font-size: 36px;
  box-shadow: 0 16px 34px rgba(27, 145, 89, .30);
  animation: pop .7s var(--ease-spring) both;
}
.boot-name { font-size: 17px; font-weight: 600; letter-spacing: .06em; color: var(--c-text-2); }
.boot-spinner {
  width: 22px; height: 22px; margin-top: 6px; border-radius: 50%;
  border: 2.5px solid rgba(37, 160, 103, .18); border-top-color: var(--c-primary);
  animation: spin .8s linear infinite;
}

/* =========================================================
   登录 / 注册
   ========================================================= */
.auth {
  position: fixed; inset: 0; z-index: 50;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(130% 60% at 50% -8%, #D9F2E5 0%, rgba(245, 247, 246, 0) 58%),
    var(--c-bg);
  padding-bottom: calc(30px + var(--sab));
}
.auth-hero {
  padding: calc(56px + var(--sat)) 28px 34px;
  text-align: center;
}
.auth-logo {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-hero); color: #fff; font-size: 34px;
  box-shadow: 0 14px 32px rgba(27, 145, 89, .28);
}
.auth-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.auth-sub { margin: 8px 0 0; font-size: 14px; color: var(--c-text-2); letter-spacing: .04em; }

.auth-card {
  margin: 0 18px;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-m);
  border: 1px solid rgba(255, 255, 255, .7);
  padding: 18px 18px 20px;
  animation: fadeUp .5s var(--ease-out) both;
}

.seg {
  position: relative; display: flex; background: var(--c-bg-soft);
  border-radius: 14px; padding: 4px; margin-bottom: 18px;
}
.seg-btn {
  position: relative; z-index: 1; flex: 1; height: 40px; border-radius: 11px;
  font-size: 15px; font-weight: 500; color: var(--c-text-2);
  transition: color .25s;
}
.seg-btn.active { color: var(--c-text); font-weight: 600; }
.seg-ink {
  position: absolute; top: 4px; left: 4px; height: calc(100% - 8px);
  width: calc(50% - 4px); border-radius: 11px; background: #fff;
  box-shadow: var(--sh-s);
  transition: transform .3s var(--ease-out);
}
.seg[data-ink="1"] .seg-ink { transform: translateX(100%); }

.chips { display: flex; gap: 8px; margin-bottom: 14px; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; color: var(--c-text-2);
  background: var(--c-bg-soft); border: 1.5px solid transparent;
  transition: all .22s var(--ease-out);
}
.chip.active {
  color: var(--c-primary); background: var(--c-primary-soft);
  border-color: rgba(37, 160, 103, .28); font-weight: 600;
}

.field { margin-bottom: 12px; }
.field input {
  width: 100%; height: 50px; padding: 0 16px;
  border-radius: 14px; border: 1.5px solid transparent;
  background: var(--c-bg-soft); color: var(--c-text);
  font-size: 16px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input::placeholder { color: var(--c-text-3); }
.field input:focus {
  background: #fff; border-color: rgba(37, 160, 103, .45);
  box-shadow: 0 0 0 4px rgba(37, 160, 103, .10);
}

.auth-error {
  max-height: 0; overflow: hidden; opacity: 0;
  color: var(--c-danger); font-size: 13px; line-height: 1.5;
  transition: all .25s var(--ease-out);
}
.auth-error.show { max-height: 60px; opacity: 1; margin: 4px 2px 10px; }

.auth-links { display: flex; justify-content: center; padding-top: 12px; }
.link { font-size: 13.5px; color: var(--c-text-2); padding: 6px 10px; }
.link:active { color: var(--c-primary); }
.auth-note { margin: 12px 2px 0; font-size: 12.5px; color: var(--c-text-3); line-height: 1.6; }
.auth-footnote {
  margin: 22px 0 0; text-align: center; font-size: 12px; color: var(--c-text-3); letter-spacing: .05em;
}
.auth-preview {
  margin: 12px 24px 0; padding: 10px 14px; text-align: center;
  font-size: 12.5px; color: #2F7D5A; background: rgba(37, 160, 103, .12);
  border-radius: 12px; line-height: 1.6;
}

/* 验证码输入 */
.otp-holder { margin: 12px 0 4px; }
.otp-tip { margin: 0 0 10px; font-size: 13px; color: var(--c-text-2); }
.otp-holder-inner { position: relative; }
.otp {
  display: flex; justify-content: space-between; gap: 8px;
  position: relative;
}
.otp input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  font-size: 16px; /* 防止 iOS 缩放 */
  border: none; background: transparent; color: transparent; caret-color: transparent;
}
.otp-box {
  flex: 1; height: 54px; border-radius: 13px;
  background: var(--c-bg-soft); border: 1.5px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--c-text);
  transition: all .2s var(--ease-out);
}
.otp-box.active {
  background: #fff; border-color: rgba(37, 160, 103, .5);
  box-shadow: 0 0 0 4px rgba(37, 160, 103, .10);
}
.otp-box.filled { background: #fff; border-color: rgba(31,42,36,.10); }

/* =========================================================
   按钮
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 15px;
  font-size: 16px; font-weight: 600; color: var(--c-text);
  background: var(--c-bg-soft);
  transition: transform .16s var(--ease-out), opacity .2s, box-shadow .2s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 8px 20px rgba(37, 160, 103, .28);
}
.btn.primary:active { box-shadow: 0 4px 12px rgba(37, 160, 103, .26); }
.btn.soft {
  background: var(--c-primary-soft); color: var(--c-primary);
}
.btn.ghost { background: transparent; color: var(--c-text-2); }
.btn.danger { background: rgba(229, 72, 77, .10); color: var(--c-danger); }
.btn.sm { height: 38px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .ico { display: inline-flex; }
.btn .ico svg { width: 18px; height: 18px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-text-2); transition: background .2s, transform .16s;
}
.icon-btn:active { transform: scale(.92); background: var(--c-bg-soft); }
.icon-btn svg { width: 21px; height: 21px; }

/* 圆形小按钮 */
.round-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-bg-soft); color: var(--c-text-2);
  transition: transform .16s, background .2s, color .2s;
}
.round-btn:active { transform: scale(.9); }
.round-btn svg { width: 20px; height: 20px; }

/* =========================================================
   主框架
   ========================================================= */
.shell { position: fixed; inset: 0; }

.appbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding-top: var(--sat);
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.7) blur(16px);
  backdrop-filter: saturate(1.7) blur(16px);
  border-bottom: 1px solid var(--c-line);
}
.appbar-inner {
  height: var(--appbar-h); max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-dot {
  width: 28px; height: 28px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff; font-size: 13px;
  box-shadow: 0 4px 10px rgba(37, 160, 103, .30);
}
#appbarTitle { font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.appbar-actions { display: flex; align-items: center; gap: 4px; }

.viewport {
  position: fixed; left: 0; right: 0;
  top: calc(var(--appbar-h) + var(--sat));
  bottom: calc(var(--tabbar-h) + var(--sab));
  overflow: hidden;
}
.view {
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.view::-webkit-scrollbar { display: none; }
.view > .view-inner {
  max-width: 640px; margin: 0 auto;
  padding: 14px 14px calc(96px + var(--sab));
}
.view.view-in { animation: fadeUp .28s var(--ease-out) both; }

/* 底部导航（手机端：白底毛玻璃 + 绿色药丸选中态） */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding-bottom: var(--sab);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--c-line);
  box-shadow: 0 -6px 18px rgba(31, 42, 36, .05);
}
.tabbar-inner { height: var(--tabbar-h); max-width: 640px; margin: 0 auto; display: flex; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--c-text-3); transition: color .22s;
}
.tab-ico {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 30px; border-radius: 999px;
  transition: background .25s, transform .3s var(--ease-spring);
}
.tab-ico svg { width: 23px; height: 23px; }
.tab-label { font-size: 10.5px; font-weight: 500; letter-spacing: .02em; transition: color .22s; }
.tab.active { color: var(--c-primary); }
.tab.active .tab-label { font-weight: 700; }
.tab.active .tab-ico { background: var(--c-primary-soft); }
.tab:active .tab-ico { transform: scale(.9); }

/* 悬浮按钮 */
.fab {
  position: fixed; z-index: 40;
  right: max(18px, calc(50vw - 320px + 18px));
  bottom: calc(var(--tabbar-h) + var(--sab) + 20px);
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 12px 26px rgba(37, 160, 103, .36), 0 2px 6px rgba(37, 160, 103, .28);
  transition: transform .28s var(--ease-spring), opacity .25s;
}
.fab .fab-ico { display: flex; transition: transform .3s var(--ease-spring); }
.fab .fab-ico svg { width: 25px; height: 25px; }
.fab:active { transform: scale(.9); }
.fab.off { transform: scale(0) translateY(20px); opacity: 0; pointer-events: none; }

/* =========================================================
   骨架屏 / 空状态 / 加载
   ========================================================= */
.skel {
  border-radius: 14px;
  background: linear-gradient(100deg, #E9EFEA 40%, #F6F9F7 50%, #E9EFEA 60%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}
.empty {
  padding: 64px 30px; text-align: center; animation: fadeUp .4s var(--ease-out) both;
}
.empty-ico {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary-soft); color: var(--c-primary);
}
.empty-ico svg { width: 32px; height: 32px; }
.empty-title { font-size: 15.5px; font-weight: 600; }
.empty-sub { margin-top: 6px; font-size: 13px; color: var(--c-text-3); line-height: 1.6; }
.empty .btn { margin-top: 18px; }

.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.spin.dark { border-color: rgba(37,160,103,.2); border-top-color: var(--c-primary); }

/* 下拉刷新 */
.ptr {
  height: 0; display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; color: var(--c-text-3); font-size: 12px;
  transition: height .25s var(--ease-out);
}
.ptr .spin { width: 16px; height: 16px; }

/* 加载更多 */
.load-more { padding: 18px 0 6px; text-align: center; color: var(--c-text-3); font-size: 13px; }

/* =========================================================
   照片墙
   ========================================================= */
.masonry { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-auto-rows: 6px; }
.ph-card {
  position: relative; border-radius: var(--r-m); overflow: hidden;
  background: var(--c-bg-soft); box-shadow: var(--sh-s);
  animation: fadeIn .45s var(--ease-out) both;
  transition: transform .18s var(--ease-out);
}
.ph-card:active { transform: scale(.975); }
.ph-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.ph-card img.ld { opacity: 1; }
.ph-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px;
  background: linear-gradient(transparent, rgba(18, 26, 21, .6));
  color: #fff; font-size: 12.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ph-like {
  position: absolute; top: 8px; right: 8px;
  display: flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(18, 26, 21, .42); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 11.5px; font-weight: 600;
}
.ph-like svg { width: 13px; height: 13px; }
.ph-like.liked { color: #FFB3C2; }

/* =========================================================
   照片查看器
   ========================================================= */
.viewer {
  position: fixed; inset: 0; z-index: 80;
  background: #0F1512; color: #fff;
  opacity: 0; transition: opacity .28s ease;
  touch-action: none;
}
.viewer.open { opacity: 1; }
.viewer-track {
  position: absolute; top: 0; bottom: 0; left: 0;
  display: flex; height: 100%;
  will-change: transform;
}
.viewer-slide {
  width: 100vw; height: 100%; flex: 0 0 100vw;
  display: flex; align-items: center; justify-content: center;
  padding: 0; 
}
.viewer-slide img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}
.viewer-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding: calc(10px + var(--sat)) 12px 30px;
  background: linear-gradient(rgba(0,0,0,.55), transparent);
  display: flex; align-items: center; gap: 10px;
}
.viewer-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 36px 18px calc(22px + var(--sab));
  background: linear-gradient(transparent, rgba(0,0,0,.62));
}
.viewer-caption { font-size: 14.5px; line-height: 1.55; max-height: 88px; overflow-y: auto; }
.viewer-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.viewer-meta .avatar { width: 26px; height: 26px; font-size: 12px; }
.viewer-meta .vm-name { font-size: 13.5px; font-weight: 600; }
.viewer-meta .vm-time { font-size: 12px; color: rgba(255,255,255,.55); }
.viewer-actions { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.viewer-actions .spacer { flex: 1; }
.v-like {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: #fff;
}
.v-like svg { width: 24px; height: 24px; }
.v-like.liked { color: var(--c-like); }
.v-like .float-heart {
  position: absolute; pointer-events: none; color: var(--c-like);
  animation: floatHeart .8s var(--ease-out) both;
}
.viewer-close {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.14); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.viewer-close svg { width: 19px; height: 19px; }
.viewer-count {
  position: absolute; top: calc(16px + var(--sat)); left: 50%; transform: translateX(-50%);
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75); letter-spacing: .06em;
  z-index: 2;
}
.viewer-spin {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.viewer-spin .spin { width: 28px; height: 28px; border-width: 3px; border-color: rgba(255,255,255,.2); border-top-color: #fff; }

/* =========================================================
   论坛
   ========================================================= */
.post-card {
  background: var(--c-surface); border-radius: var(--r-l);
  box-shadow: var(--sh-s); border: 1px solid rgba(255,255,255,.8);
  padding: 16px; margin-bottom: 12px;
  transition: transform .18s var(--ease-out);
  animation: fadeUp .4s var(--ease-out) both;
}
.post-card:active { transform: scale(.983); }
.post-title {
  font-size: 16.5px; font-weight: 650; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-excerpt {
  margin-top: 6px; font-size: 14px; color: var(--c-text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-thumbs {
  display: grid; gap: 5px; margin-top: 12px; border-radius: 13px; overflow: hidden;
}
.post-thumbs.n1 { grid-template-columns: 1fr; }
.post-thumbs.n1 img { aspect-ratio: 16 / 10; }
.post-thumbs.n2 { grid-template-columns: 1fr 1fr; }
.post-thumbs.n3 { grid-template-columns: 1fr 1fr 1fr; }
.post-thumbs.n2 img, .post-thumbs.n3 img { aspect-ratio: 1; }
.post-thumbs img { width: 100%; height: 100%; object-fit: cover; background: var(--c-bg-soft); }
.post-meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.post-meta .spacer { flex: 1; }
.meta-name { font-size: 13px; font-weight: 500; color: var(--c-text-2); }
.meta-time { font-size: 12px; color: var(--c-text-3); }
.stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--c-text-3); font-weight: 500;
}
.stat svg { width: 15px; height: 15px; }
.stat.liked { color: var(--c-like); }
.stat.bump { animation: pop .4s var(--ease-spring); }

/* 头像 */
.avatar {
  border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; letter-spacing: 0;
  background: #CFD8D2;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.a0 { background: linear-gradient(135deg, #5FC392, #279A64); }
.avatar.a1 { background: linear-gradient(135deg, #7BC6A4, #3E9E75); }
.avatar.a2 { background: linear-gradient(135deg, #8FB8F2, #5B7FE8); }
.avatar.a3 { background: linear-gradient(135deg, #F2B96B, #E08A2E); }
.avatar.a4 { background: linear-gradient(135deg, #D6A5F2, #9B6BE0); }
.avatar.a5 { background: linear-gradient(135deg, #F29CB1, #E0607F); }

/* =========================================================
   帖子详情（整页浮层）
   ========================================================= */
.page-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: var(--c-bg);
  display: flex; flex-direction: column;
  animation: pageIn .3s var(--ease-out) both;
  box-shadow: -12px 0 40px rgba(31,42,36,.12);
}
.page-overlay.out { animation: pageOut .26s var(--ease-out) both; }
.page-bar {
  flex: 0 0 auto; padding-top: var(--sat);
  background: rgba(250, 252, 251, .95);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line);
}
.page-bar-inner {
  height: var(--appbar-h); max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
}
.page-bar-title {
  flex: 1; font-size: 16.5px; font-weight: 650; text-align: center;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.page-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain; scrollbar-width: none;
}
.page-body::-webkit-scrollbar { display: none; }
.page-body-inner { max-width: 640px; margin: 0 auto; padding: 18px 16px calc(24px + var(--sab)); }

.pd-title { font-size: 20px; font-weight: 700; line-height: 1.45; }
.pd-author { display: flex; align-items: center; gap: 10px; margin: 14px 0 18px; }
.pd-author .avatar { width: 38px; height: 38px; font-size: 16px; }
.pd-author .pa-name { font-size: 14px; font-weight: 600; }
.pd-author .pa-time { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
.pd-author .spacer { flex: 1; }
.pd-content { font-size: 15.5px; line-height: 1.75; color: #2F3833; white-space: pre-wrap; word-break: break-word; }
.pd-images { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pd-images img { width: 100%; border-radius: var(--r-m); background: var(--c-bg-soft); }
.pd-actions {
  display: flex; align-items: center; gap: 14px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--c-line);
}
.pd-actions .spacer { flex: 1; }

/* 评论 */
.cm-section-title {
  margin: 26px 0 14px; font-size: 14px; font-weight: 650; color: var(--c-text-2);
  display: flex; align-items: center; gap: 6px;
}
.cm-item { display: flex; gap: 10px; margin-bottom: 16px; animation: fadeUp .35s var(--ease-out) both; }
.cm-item .avatar { width: 30px; height: 30px; font-size: 13px; }
.cm-main { flex: 1; min-width: 0; }
.cm-head { display: flex; align-items: center; gap: 8px; }
.cm-name { font-size: 12.5px; font-weight: 600; color: var(--c-text-2); }
.cm-time { font-size: 11.5px; color: var(--c-text-3); }
.cm-del { margin-left: auto; color: var(--c-text-3); font-size: 12px; padding: 2px 6px; }
.cm-del:active { color: var(--c-danger); }
.cm-text {
  margin-top: 4px; font-size: 14.5px; line-height: 1.65; color: var(--c-text);
  word-break: break-word; white-space: pre-wrap;
}
.cm-empty { padding: 26px 0 10px; text-align: center; color: var(--c-text-3); font-size: 13px; }

.comment-bar {
  flex: 0 0 auto; padding: 10px 12px calc(10px + var(--sab));
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--c-line);
}
.comment-bar-inner { max-width: 640px; margin: 0 auto; display: flex; align-items: flex-end; gap: 9px; }
.comment-input {
  flex: 1; min-height: 44px; max-height: 110px; padding: 11px 15px;
  border-radius: 22px; border: 1.5px solid transparent;
  background: var(--c-bg-soft); font-size: 15.5px; line-height: 1.5;
  outline: none; resize: none; color: var(--c-text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.comment-input:focus {
  background: #fff; border-color: rgba(37, 160, 103, .4);
  box-shadow: 0 0 0 4px rgba(37, 160, 103, .08);
}
.comment-send {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 6px 14px rgba(37, 160, 103, .3);
  transition: transform .16s var(--ease-out), opacity .2s;
}
.comment-send:active { transform: scale(.9); }
.comment-send svg { width: 20px; height: 20px; }
.comment-send[disabled] { opacity: .45; }

/* =========================================================
   我的
   ========================================================= */
.pf-head {
  position: relative; overflow: hidden;
  background: var(--grad-hero); border-radius: var(--r-xl);
  padding: 24px 20px; color: #fff;
  box-shadow: 0 14px 30px rgba(27, 145, 89, .25);
  animation: fadeUp .45s var(--ease-out) both;
}
.pf-head::after {
  content: ''; position: absolute; right: -40px; top: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.pf-head::before {
  content: ''; position: absolute; left: -30px; bottom: -70px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.pf-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.pf-avatar {
  width: 68px; height: 68px; border-radius: 50%; flex: 0 0 auto;
  border: 2.5px solid rgba(255,255,255,.65);
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
}
.pf-avatar .avatar { width: 100%; height: 100%; }
.pf-name { font-size: 20px; font-weight: 700; }
.pf-sub { margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.82); }
.pf-edit {
  margin-left: auto; align-self: flex-start;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.2); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .16s;
}
.pf-edit:active { transform: scale(.94); }

.pf-stats {
  display: flex; margin-top: 18px; position: relative; z-index: 1;
  background: rgba(255,255,255,.16); border-radius: var(--r-m);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 12px 0;
}
.pf-stat { flex: 1; text-align: center; }
.pf-stat b { display: block; font-size: 19px; font-weight: 700; }
.pf-stat span { font-size: 11.5px; color: rgba(255,255,255,.8); }

.section-title {
  margin: 24px 4px 12px; font-size: 14px; font-weight: 650; color: var(--c-text-2);
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .link { font-size: 12.5px; }

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mini-grid .ph-card img { aspect-ratio: 1; }

.row {
  display: flex; align-items: center; gap: 13px;
  background: var(--c-surface); border-radius: var(--r-m);
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: var(--sh-s); border: 1px solid rgba(255,255,255,.8);
  transition: transform .16s var(--ease-out);
}
.row:active { transform: scale(.985); }
.row-ico {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-primary-soft); color: var(--c-primary);
}
.row-ico svg { width: 18px; height: 18px; }
.row-label { flex: 1; font-size: 15px; font-weight: 500; }
.row-sub { font-size: 12px; color: var(--c-text-3); margin-top: 1px; font-weight: 400; }
.row-arrow { color: var(--c-text-3); display: flex; }
.row-arrow svg { width: 17px; height: 17px; }
.row.danger .row-ico { background: rgba(229,72,77,.1); color: var(--c-danger); }
.row.danger .row-label { color: var(--c-danger); }
.row.simple { padding: 15px 16px; }

/* 我的帖子条目 */
.my-post {
  background: var(--c-surface); border-radius: var(--r-m); padding: 14px 16px;
  margin-bottom: 10px; box-shadow: var(--sh-s); border: 1px solid rgba(255,255,255,.8);
}
.my-post .pt { font-size: 15px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.my-post .pm { margin-top: 5px; font-size: 12px; color: var(--c-text-3); display: flex; gap: 10px; }

/* =========================================================
   底部弹层 / 对话框 / 轻提示
   ========================================================= */
.sheet-mask {
  position: fixed; inset: 0; z-index: 90; background: rgba(22, 30, 26, .45);
  opacity: 0; transition: opacity .28s ease;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-mask.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px;
  max-height: calc(88vh - var(--sat));
  background: var(--c-bg); border-radius: 24px 24px 0 0;
  padding: 10px 16px calc(18px + var(--sab));
  display: flex; flex-direction: column;
  transform: translateY(40px); opacity: .5;
  transition: transform .32s var(--ease-out), opacity .3s;
}
.sheet-mask.open .sheet { transform: translateY(0); opacity: 1; }
.sheet.dragging { transition: none; }
.sheet-handle {
  width: 40px; height: 5px; border-radius: 99px; background: rgba(31,42,36,.14);
  margin: 4px auto 12px; flex: 0 0 auto; cursor: grab;
}
.sheet-title { font-size: 17px; font-weight: 700; margin: 0 2px 14px; flex: 0 0 auto; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { display: none; }

.sheet .field textarea {
  width: 100%; min-height: 48px; padding: 13px 16px;
  border-radius: 14px; border: 1.5px solid transparent;
  background: var(--c-bg-soft); color: var(--c-text);
  font-size: 16px; line-height: 1.6; outline: none; resize: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.sheet .field textarea:focus {
  background: #fff; border-color: rgba(37, 160, 103, .45);
  box-shadow: 0 0 0 4px rgba(37, 160, 103, .10);
}

/* 选图器 */
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 14px; }
.pick-cell {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  background: var(--c-bg-soft); animation: fadeIn .3s var(--ease-out) both;
}
.pick-cell img { width: 100%; height: 100%; object-fit: cover; }
.pick-del {
  position: absolute; top: 5px; right: 5px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(18, 26, 21, .6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pick-del svg { width: 13px; height: 13px; }
.pick-add {
  aspect-ratio: 1; border-radius: 14px; border: 1.8px dashed rgba(31,42,36,.16);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--c-text-3); font-size: 12px;
  transition: border-color .2s, color .2s, transform .16s;
}
.pick-add:active { transform: scale(.96); }
.pick-add svg { width: 24px; height: 24px; }

/* 上传进度 */
.up-overlay {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(22, 30, 26, .5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s;
}
.up-overlay.open { opacity: 1; }
.up-card {
  width: 240px; background: #fff; border-radius: var(--r-xl); padding: 26px 22px;
  text-align: center; box-shadow: var(--sh-l);
  animation: sheetIn .3s var(--ease-out) both;
}
.up-ico { margin: 0 auto 14px; color: var(--c-primary); display: flex; justify-content: center; }
.up-title { font-size: 15px; font-weight: 650; }
.up-sub { margin-top: 6px; font-size: 12.5px; color: var(--c-text-3); }
.up-bar { margin-top: 16px; height: 6px; border-radius: 99px; background: var(--c-bg-soft); overflow: hidden; }
.up-bar-fill {
  height: 100%; width: 30%; border-radius: 99px; background: var(--grad-primary);
  animation: upslide 1.1s ease-in-out infinite alternate;
}
@keyframes upslide { from { margin-left: 0; } to { margin-left: 70%; } }

/* 对话框 */
.dialog-mask {
  position: fixed; inset: 0; z-index: 96;
  background: rgba(22, 30, 26, .45);
  display: flex; align-items: center; justify-content: center; padding: 30px;
  opacity: 0; transition: opacity .22s;
}
.dialog-mask.open { opacity: 1; }
.dialog {
  width: 100%; max-width: 316px; background: #fff; border-radius: var(--r-xl);
  padding: 24px 20px 16px; text-align: center;
  box-shadow: var(--sh-l);
  animation: sheetIn .3s var(--ease-spring) both;
}
.dialog-title { font-size: 16.5px; font-weight: 700; }
.dialog-text { margin-top: 8px; font-size: 14px; color: var(--c-text-2); line-height: 1.6; }
.dialog-btns { display: flex; gap: 10px; margin-top: 20px; }
.dialog-btns .btn { flex: 1; height: 44px; font-size: 15px; }

/* 轻提示 */
.toast-root {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--sab) + 28px);
  z-index: 99; display: flex; justify-content: center; pointer-events: none;
}
.toast {
  max-width: min(84vw, 420px);
  background: rgba(31, 40, 35, .94); color: #fff;
  padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; line-height: 1.45; text-align: center;
  box-shadow: 0 10px 26px rgba(31,40,35,.28);
  animation: toastIn .3s var(--ease-spring) both;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.toast.out { transition: opacity .3s, transform .3s; opacity: 0; transform: translateY(8px); }
.toast.warn { background: rgba(180, 83, 9, .95); }

/* 桌面端适配：居中窄栏 */
@media (min-width: 700px) {
  .auth-card { max-width: 430px; margin: 0 auto; }
  .auth-hero { padding-top: calc(72px + var(--sat)); }
  .fab { right: calc(50vw - 320px + 18px); }
  .tabbar-inner, .appbar-inner { border-left: 1px solid var(--c-line); border-right: 1px solid var(--c-line); }
}

/* ---------- 细节补充 ---------- */
#loginSendCode, #signupSendCode { width: 100%; }
.btn.soft.pd-like { gap: 6px; }
.btn.soft.pd-like.liked { background: rgba(255, 77, 109, .12); color: var(--c-like); }
.ob-avatar-wrap { text-align: center; padding: 6px 0 2px; }
.ob-avatar-btn { border: 0; padding: 0; background: none; border-radius: 50%; }
.ob-avatar { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; margin: 0 auto; box-shadow: var(--sh-m); }
.ob-avatar .avatar { width: 100%; height: 100%; }
.ob-hint { font-size: 12px; color: var(--c-text-3); margin-top: 8px; }
