/* 云娃 - 移动端优先 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #fff5f5;
  color: #333;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
input, textarea { user-select: text; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:root {
  --primary: #FF6B6B;
  --primary-dark: #E5566B;
  --bg: #fff5f5;
  --card: #ffffff;
  --text: #333;
  --text-light: #888;
  --border: #eee;
  --bubble-me: linear-gradient(135deg, #FF6B6B 0%, #FF9090 100%);
  --bubble-other: #f0f0f0;
}
.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(env(safe-area-inset-bottom) + 56px);
}
/* ============= 登录页 ============= */
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 28px 40px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.logo {
  font-size: 56px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #FF6B6B 0%, #FFB199 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.tagline {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 48px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  height: 50px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 16px;
  background: var(--card);
  transition: border-color 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}
.code-input-row {
  display: flex;
  gap: 10px;
}
.code-input-row input {
  flex: 1;
}
.btn-send {
  height: 50px;
  padding: 0 16px;
  background: #FFE5E5;
  color: var(--primary);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.btn-send:disabled {
  opacity: 0.5;
  color: var(--text-light);
  background: #f0f0f0;
}
.btn-primary {
  height: 52px;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: #fff;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
  transition: transform 0.1s, box-shadow 0.2s;
}
.btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}
.btn-primary:disabled {
  opacity: 0.6;
}
.btn-secondary {
  height: 52px;
  background: var(--card);
  color: var(--text);
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  margin-top: 12px;
}
.tip {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  min-height: 20px;
}
.tip.error { color: var(--primary); }
.dev-tip {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  background: #fff8e1;
  padding: 8px 12px;
  border-radius: 8px;
}
/* ============= 顶栏 ============= */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.me-info, .peer-info {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}
.btn-back {
  width: 36px;
  height: 36px;
  font-size: 24px;
  color: var(--text);
}
.btn-text {
  font-size: 14px;
  color: var(--text-light);
  padding: 6px 10px;
}
.btn-icon {
  width: 40px;
  height: 40px;
  font-size: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  transition: transform 0.1s;
}
.btn-icon:active { transform: scale(0.95); }
.btn-record.recording {
  background: var(--primary);
  color: #fff;
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
/* ============= 匹配页 ============= */
.match-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.match-card {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border-radius: 28px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.1);
}
.match-icon {
  font-size: 80px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.match-card h2 {
  font-size: 26px;
  color: var(--text);
  margin-bottom: 12px;
}
.match-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
}
.match-card.searching .match-icon {
  animation: spin 2s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.match-actions {
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--border);
}
.btn-large {
  width: 100%;
  font-size: 18px;
}
/* ============= 聊天页 ============= */
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.msg-row {
  display: flex;
  margin-bottom: 12px;
  align-items: flex-end;
}
.msg-row.me { justify-content: flex-end; }
.msg-row.other { justify-content: flex-start; }
.bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
  position: relative;
}
.msg-row.me .bubble {
  background: var(--bubble-me);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-row.other .bubble {
  background: var(--bubble-other);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.bubble-time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}
.msg-row.other .bubble-time { text-align: left; }
.bubble.voice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}
.bubble.voice .wave {
  font-size: 14px;
  letter-spacing: 1px;
}
.bubble.voice.playing .wave {
  animation: wave 0.6s linear infinite;
}
@keyframes wave {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.bubble.system {
  background: #fff8e1;
  color: #b07a1d;
  font-size: 13px;
  max-width: 80%;
  text-align: center;
  margin: 8px auto;
  padding: 6px 12px;
  border-radius: 12px;
}
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--border);
}
#msg-input {
  flex: 1;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 0 16px;
  font-size: 16px;
  background: #f8f8f8;
}
#msg-input:focus { outline: none; border-color: var(--primary); background: #fff; }
/* ============= 通话弹窗 ============= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.call-box {
  text-align: center;
  color: #fff;
  padding: 40px;
}
.call-avatar {
  font-size: 100px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}
.call-status {
  font-size: 18px;
  margin-bottom: 8px;
}
.call-time {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 40px;
  font-variant-numeric: tabular-nums;
}
.call-actions {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.btn-call {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 32px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.btn-accept { background: #4CAF50; }
.btn-reject { background: #F44336; }
/* ============= Toast ============= */
.toast {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 15px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; }
/* ============= 好友/联系人页 ============= */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.search-bar input {
  flex: 1;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 0 16px;
  font-size: 15px;
  background: #f8f8f8;
  transition: border-color 0.2s, background 0.2s;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.btn-search {
  height: 40px;
  padding: 0 18px;
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.25);
  transition: transform 0.1s, box-shadow 0.2s;
}
.btn-search:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(255, 107, 107, 0.25);
}
.contacts-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}
.contact-item:active {
  background: #f8f8f8;
}
.contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD0D0 0%, #FFB199 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-status {
  font-size: 12px;
  color: var(--text-light);
}
.contact-status.online {
  color: #4CAF50;
}
.contacts-empty {
  text-align: center;
  padding: 60px 32px;
  color: var(--text-light);
}
.contacts-empty p {
  margin: 0;
  line-height: 1.8;
  font-size: 15px;
}
.contacts-empty p:first-child {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}
.contacts-hint {
  font-size: 13px !important;
  opacity: 0.7;
}
/* ============= 底部 tab 栏 ============= */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.tab.active {
  color: var(--primary);
  font-weight: 600;
}
.tab:active {
  opacity: 0.7;
}
/* ============= 编辑资料弹窗 ============= */
.profile-card {
  width: min(92%, 380px);
  background: var(--card);
  border-radius: 16px;
  padding: 24px 22px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  animation: pop-in 0.18s ease-out;
}
@keyframes pop-in {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.profile-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}
.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD0D0 0%, #FFB199 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  flex-shrink: 0;
}
.btn-upload-avatar {
  height: 32px;
  padding: 0 16px;
  background: #FFE5E5;
  color: var(--primary);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.15s;
}
.btn-upload-avatar:active { opacity: 0.7; }
.btn-upload-avatar:disabled { opacity: 0.5; }
.profile-field {
  margin-bottom: 18px;
}
.profile-field label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.profile-field input {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
}
.profile-field input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.profile-actions {
  display: flex;
  gap: 10px;
}
.btn-cancel, .btn-save {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-cancel {
  background: #f5f5f5;
  color: var(--text);
}
.btn-save {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.25);
}
.btn-cancel:active, .btn-save:active { transform: scale(0.98); }
.btn-save:disabled { opacity: 0.5; }
/* contact-item.me 自身卡也允许点击 */
.contact-item.me {
  cursor: pointer;
  transition: background 0.15s;
}
.contact-item.me:active {
  background: #f8f8f8;
}
#my-avatar-preview {
  background-size: cover;
  background-position: center;
}
/* 子 tab 切换 (动态/我的) */
.mine-tabs {
  display: flex;
  margin: 12px 16px 0;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 3px;
  gap: 0;
}
.mine-tab {
  flex: 1;
  padding: 8px 0;
  background: none;
  border: none;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
}
.mine-tab.active {
  background: #fff;
  color: #FF6B6B;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
/* ==================== 我的 / 动态页面 ==================== */
#page-mine {
  display: flex;
  flex-direction: column;
  background: #fff5f5;
  height: 100%;
  overflow: hidden;
}
#page-mine > * { flex-shrink: 0; }
#page-mine .mine-posts { min-height: 0; flex: 1 1 auto; }
#page-mine .mine-detail { min-height: 0; flex: 1 1 auto; }
#mine-tab-feed, #mine-tab-mine { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
#mine-tab-feed > .mine-posts, #mine-tab-mine > .mine-detail { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
#mine-tab-mine[style*="display:none"] { display: none !important; }
#mine-tab-feed[style*="display:none"] { display: none !important; }
/* 头部 */
.mine-header {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 50%, #FFB6B6 100%);
  padding: 20px 20px 24px;
  color: #fff;
  position: relative;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}
.mine-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: #fff5f5;
  border-radius: 20px 20px 0 0;
}
.mine-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mine-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4) center/cover;
  border: 3px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.mine-info {
  flex: 1;
  margin-left: 14px;
}
.mine-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mine-meta {
  font-size: 12px;
  opacity: 0.9;
}
.btn-edit-profile {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.btn-edit-profile:active {
  background: rgba(255, 255, 255, 0.4);
}
/* 统计 */
.mine-stats {
  display: flex;
  justify-content: space-around;
  background: #fff;
  margin: 0 16px;
  padding: 16px 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 1;
  position: relative;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: #999;
}
/* 发动态按钮区 */
.mine-compose-bar {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  margin: 12px 16px 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  gap: 10px;
}
.compose-hint {
  flex: 1;
  color: #999;
  font-size: 14px;
  padding: 8px 14px;
  background: #f5f5f5;
  border-radius: 20px;
}
.btn-compose {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}
.btn-compose:active {
  transform: scale(0.97);
}
/* 帖子列表 */
.mine-posts {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  -webkit-overflow-scrolling: touch;
}
.mine-empty {
  text-align: center;
  color: #bbb;
  padding: 60px 20px;
  font-size: 14px;
}
/* 帖子卡片 */
.post-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB6B6, #FF6B6B) center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}
.post-author {
  flex: 1;
  margin-left: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-time {
  font-size: 12px;
  color: #999;
  margin-left: 8px;
  flex-shrink: 0;
}
.post-delete {
  background: none;
  border: none;
  color: #bbb;
  font-size: 12px;
  padding: 4px 8px;
  margin-left: 4px;
}
.post-delete:active {
  color: #FF6B6B;
}
.post-content {
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  margin-bottom: 10px;
  word-break: break-word;
  white-space: pre-wrap;
}
/* 图片网格 */
.post-images {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.post-images.single {
  grid-template-columns: 1fr;
}
.post-images.double {
  grid-template-columns: 1fr 1fr;
}
.post-images.many {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
}
.post-image {
  aspect-ratio: 1;
  background-color: #f0f0f0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 4px;
  cursor: pointer;
}
.post-images.single .post-image {
  aspect-ratio: 4 / 3;
  max-height: 240px;
}
/* 点赞 / 评论操作 */
.post-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f5;
  font-size: 13px;
  color: #999;
}
.post-action {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: none;
  border: none;
  color: #999;
  font-size: 13px;
  cursor: pointer;
}
.post-action:active {
  opacity: 0.6;
}
.post-action.liked {
  color: #FF6B6B;
  font-weight: 600;
}
.post-action .icon {
  font-size: 16px;
}
/* 评论列表 */
.post-comments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #eee;
}
.post-comment {
  display: flex;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 6px;
}
.post-comment-author {
  color: #FF6B6B;
  font-weight: 600;
  margin-right: 4px;
  flex-shrink: 0;
}
.post-comment-text {
  color: #333;
  word-break: break-word;
  flex: 1;
}
.post-comment-time {
  color: #bbb;
  font-size: 11px;
  margin-left: 6px;
  flex-shrink: 0;
}
.post-comment-delete {
  background: none;
  border: none;
  color: #ccc;
  font-size: 11px;
  margin-left: 4px;
  padding: 0;
}
/* ==================== 发布动态弹层 ==================== */
#compose-modal .modal-content {
  width: 92%;
  max-width: 480px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
.compose-card {
  background: #fff;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  overflow: hidden;
}
.compose-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.compose-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}
.compose-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  -webkit-overflow-scrolling: touch;
}
.compose-textarea {
  width: 100%;
  min-height: 120px;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  font-family: inherit;
  background: transparent;
}
.compose-textarea::placeholder {
  color: #bbb;
}
.compose-counter {
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.compose-counter.over {
  color: #FF6B6B;
}
.compose-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.compose-image {
  position: relative;
  aspect-ratio: 1;
  background-color: #f0f0f0;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
}
.compose-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compose-add {
  aspect-ratio: 1;
  background: #fafafa;
  border: 1.5px dashed #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ccc;
}
.compose-add:disabled {
  opacity: 0.4;
}
.compose-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid #f0f0f0;
}
#btn-add-image {
  background: #f5f5f5;
  color: #666;
  border: none;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
}
#btn-add-image:active {
  background: #e8e8e8;
}
.compose-spacer {
  flex: 1;
}
.btn-compose-save {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}
.btn-compose-save:active {
  transform: scale(0.97);
}
.btn-compose-save:disabled {
  opacity: 0.5;
}
/* ==================== 评论弹层 ==================== */
#comments-modal .modal-content {
  width: 100%;
  max-width: 500px;
  height: 80vh;
  max-height: 80vh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
}
.comments-card {
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  font-weight: 600;
}
.comments-header button {
  font-size: 18px;
  color: #999;
  background: none;
  border: none;
  padding: 0;
}
.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  -webkit-overflow-scrolling: touch;
}
.comment-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB6B6, #FF6B6B) center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.comment-content {
  flex: 1;
  margin-left: 10px;
}
.comment-meta {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-right: 8px;
}
.comment-time {
  font-size: 11px;
  color: #bbb;
}
.comment-text {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  word-break: break-word;
}
.comment-delete {
  background: none;
  border: none;
  color: #ccc;
  font-size: 12px;
  padding: 0 0 0 6px;
}
.comments-input {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
  gap: 8px;
}
.comments-input input {
  flex: 1;
  height: 38px;
  border: 1px solid #e0e0e0;
  border-radius: 19px;
  padding: 0 14px;
  font-size: 14px;
  background: #fafafa;
  outline: none;
}
.comments-input input:focus {
  border-color: #FF6B6B;
  background: #fff;
}
.comments-input button {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 19px;
  font-size: 13px;
  font-weight: 600;
}
.comments-input button:disabled {
  opacity: 0.4;
}
.comments-empty {
  text-align: center;
  color: #bbb;
  padding: 40px 20px;
  font-size: 14px;
}
#comments-modal {
  align-items: flex-end;
  justify-content: center;
}
/* ==================== 我的 tab 详细页 ==================== */
.mine-detail {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
  -webkit-overflow-scrolling: touch;
}
.detail-section {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.detail-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}
.detail-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #FF6B6B, #FF8E8E);
  border-radius: 2px;
  margin-right: 8px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detail-item {
  text-align: center;
  padding: 12px 8px;
  background: #fafafa;
  border-radius: 8px;
}
.detail-num {
  font-size: 22px;
  font-weight: 700;
  color: #FF6B6B;
  margin-bottom: 4px;
}
.detail-label {
  font-size: 12px;
  color: #999;
}
.detail-list {
  display: flex;
  flex-direction: column;
}
.detail-empty {
  text-align: center;
  color: #bbb;
  padding: 20px;
  font-size: 13px;
}
.detail-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}
.detail-row:last-child { border-bottom: none; }
.detail-row:active { background: #f8f8f8; }
.detail-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB6B6, #FF6B6B) center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  margin-right: 10px;
}
.detail-row-body {
  flex: 1;
  min-width: 0;
}
.detail-row-title {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 2px;
}
.detail-row-sub {
  font-size: 12px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-row-time {
  font-size: 11px;
  color: #bbb;
  flex-shrink: 0;
  margin-left: 8px;
}
.mine-posts-loading {
  text-align: center;
  padding: 14px;
  color: #999;
  font-size: 13px;
}
.mine-posts-end {
  text-align: center;
  padding: 16px 0;
  color: #ccc;
  font-size: 12px;
  letter-spacing: 0.5px;
}
