/* ========================================
   校园新生AI助手 - 样式表
   设计风格：微信小程序风、清新、现代
   ======================================== */

/* ===== CSS 变量 ===== */
:root {
  --primary: #4F6EF6;
  --primary-light: #E8EDFE;
  --primary-dark: #3A56D4;
  --secondary: #6C5CE7;
  --bg: #F0F2F5;
  --card-bg: #FFFFFF;
  --text-main: #1A1A2E;
  --text-sub: #8E8E93;
  --text-light: #AEAEB2;
  --border: #E5E5EA;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 430px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 0px;
  --input-bar-h: 122px;
}

/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 15px;
  color: var(--text-main);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ===== App 容器 ===== */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ===== 顶部导航栏 ===== */
.navbar {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(79, 110, 246, 0.25);
  z-index: 10;
}

/* 首页导航栏：白底深色，去掉蓝色 */
.navbar-home {
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: var(--shadow);
}
.navbar-home .nav-title {
  color: var(--text-main);
}
.navbar-home .nav-status {
  color: var(--text-sub);
}
/* 设置页导航：返回键 + 居中标题 + 占位 */
.navbar-set .nav-back {
  color: var(--text-main);
  font-size: 16px;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-set .nav-title {
  flex: 1;
  text-align: center;
}
.navbar-set .nav-placeholder {
  width: 48px;
  flex-shrink: 0;
}

.navbar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.navbar .nav-info {
  flex: 1;
  min-width: 0;
}

.navbar .nav-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.navbar .nav-subtitle {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.navbar .nav-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 20px;
  margin-top: 3px;
}

.navbar .nav-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 4px #4ADE80;
}

.navbar .nav-admin {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.navbar .nav-admin:active {
  background: rgba(255, 255, 255, 0.35);
}

.navbar .nav-login {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.navbar .nav-login:active {
  background: rgba(255, 255, 255, 0.4);
}

/* ===== 聊天区域 ===== */
.chat-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.chat-area::-webkit-scrollbar {
  width: 3px;
}

.chat-area::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* 首页内的问答区：不再独立滚动/占满，改为普通流，问答气泡依次排在欢迎区下方，随主页整体滚动 */
.home-chat {
  flex: none;
  overflow: visible;
  padding: 4px 0 0;
}

/* ===== 欢迎卡片 ===== */
.welcome-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.welcome-card .welcome-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.welcome-card .welcome-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-card .welcome-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ===== 分类标签 ===== */
.category-section {
  margin-bottom: 16px;
}

.category-section .section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 10px;
  padding: 0 4px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.category-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px 4px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.category-item:active {
  transform: scale(0.94);
}

.category-item .cat-icon {
  font-size: 26px;
  line-height: 1;
}

.category-item .cat-name {
  font-size: 11px;
  color: var(--text-main);
  font-weight: 500;
}

/* ===== 消息气泡 ===== */
.message {
  display: flex;
  margin-bottom: 16px;
  animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.ai {
  flex-direction: row;
  gap: 8px;
}

.message.user {
  flex-direction: row-reverse;
  gap: 8px;
}

.message .msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.message.ai .msg-avatar {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.message.user .msg-avatar {
  background: #E5E5EA;
  color: var(--text-sub);
  font-size: 16px;
}

.message .msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  position: relative;
  white-space: pre-wrap;
}

.message.ai .msg-bubble {
  background: var(--card-bg);
  color: var(--text-main);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow);
}

/* AI 生成标识 */
.ai-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 9px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--secondary);
  background: rgba(108, 92, 231, 0.1);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 10px;
}

.message.user .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-top-right-radius: 4px;
}

/* ===== 打字动画 ===== */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
  animation: typingBounce 1.2s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* 正在联网搜索 文字提示 */
.typing-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted, #94a3b8);
}

/* 不确定进度条（滑动动画，表示加载中） */
.typing-progress {
  margin-top: 8px;
  height: 3px;
  width: 150px;
  max-width: 60vw;
  background: rgba(148, 163, 184, 0.22);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.typing-progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--primary, #6c5ce7), var(--secondary, #00b894));
  border-radius: 3px;
  animation: typingProgressSlide 1.2s ease-in-out infinite;
}

@keyframes typingProgressSlide {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

/* ===== 推荐问题 ===== */
.suggestions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--primary-light);
  border: 1px solid rgba(79, 110, 246, 0.15);
  border-radius: 20px;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  align-self: flex-start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-chip:active {
  transform: scale(0.96);
  background: rgba(79, 110, 246, 0.15);
}

.suggestion-chip .sug-icon {
  font-size: 14px;
  flex-shrink: 0;
}

/* ===== 分类问题列表 ===== */
.category-questions {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.category-questions .cq-header {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-questions .cq-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s;
}

.category-questions .cq-item:last-child {
  border-bottom: none;
}

.category-questions .cq-item:active {
  background: var(--primary-light);
}

.category-questions .cq-text {
  font-size: 14px;
  flex: 1;
}

.category-questions .cq-arrow {
  color: var(--text-light);
  font-size: 14px;
}

/* ===== 输入区域 ===== */
.input-area {
  flex-shrink: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  padding-bottom: calc(10px + var(--safe-bottom));
  margin-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.input-area .input-wrap {
  flex: 1;
  background: var(--bg);
  border-radius: 22px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
  min-height: 40px;
}

.input-area .input-wrap:focus-within {
  border-color: var(--primary);
  background: #fff;
}

.input-area input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.5;
}

.input-area input::placeholder {
  color: var(--text-light);
}

.input-area .send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.15s;
  opacity: 0.5;
  pointer-events: none;
}

.input-area .send-btn.active {
  opacity: 1;
  pointer-events: auto;
}

.input-area .send-btn:active {
  transform: scale(0.9);
}

/* ===== 快捷按钮 ===== */
.quick-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 8px;
  overflow-x: auto;
  background: var(--card-bg);
  -webkit-overflow-scrolling: touch;
}

.quick-actions::-webkit-scrollbar {
  display: none;
}

.quick-action {
  flex-shrink: 0;
  padding: 6px 12px;
  background: var(--primary-light);
  border-radius: 16px;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: transform 0.15s;
}

.quick-action:active {
  transform: scale(0.94);
}

/* ===== 底部提示 ===== */
.footer-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  padding: 6px 0;
  background: var(--card-bg);
}

/* ===== 首页（入口页） ===== */
.home-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px calc(16px + var(--tabbar-h) + var(--input-bar-h) + var(--safe-bottom));
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
/* 内部容器用 margin:auto 居中：内容矮时整体居中，内容高时不裁切顶部、可滚动 */
.home-inner {
  width: 100%;
  margin: auto 0;
}

.home-hero {
  background: transparent;
  border-radius: var(--radius);
  padding: 26px 20px 28px;
  margin-bottom: 0;
  text-align: center;
  color: var(--text-main);
  box-shadow: none;
}
.home-hero-icon {
  font-size: 46px;
  margin-bottom: 8px;
}
.home-hero-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.5px;
}
.home-hero-desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.92;
}
.home-cta {
  display: inline-block;
  margin-top: 18px;
  padding: 13px 44px;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  border-radius: 26px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(79, 110, 246, 0.35);
  transition: transform 0.15s;
}
.home-cta:active {
  transform: scale(0.96);
}

/* 首页「开始聊天」下方的四模块（一行横排，无图标） */
.home-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 24px;
}
.mod-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 14px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.mod-card:active {
  transform: scale(0.95);
  box-shadow: var(--shadow-lg);
}

/* ===== 千问风格首页（大标题 + 推荐问题 + 底部输入栏） ===== */
.qw-hero {
  padding: 12px 4px 22px;
  text-align: left;
  color: var(--text-main);
}
.qw-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.5px;
}
.qw-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

.qw-suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.qw-sug-card {
  display: inline-block;
  max-width: 100%;
  background: #F5F5F7;
  border-radius: 14px;
  padding: 11px 16px;
  font-size: 15px;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.45;
  transition: background 0.15s, transform 0.15s;
}
.qw-sug-card:active {
  background: #EBEBEF;
  transform: scale(0.98);
}

/* 底部输入栏（固定在 tabbar 上方） */
.home-input-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  max-width: var(--max-width);
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 8px 12px 10px;
  z-index: 55;
  box-sizing: border-box;
}

.qw-tools {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.qw-tools::-webkit-scrollbar { display: none; }
.qw-tool {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #F5F5F7;
  border: none;
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-main);
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.qw-tool:active { background: #EBEBEF; }

.qw-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F5F5F7;
  border-radius: 24px;
  padding: 9px 12px;
}
.qw-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.4;
}
.qw-input-wrap input::placeholder { color: #AEAEB2; }
.qw-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.qw-send {
  background: var(--primary);
  color: #fff;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.15s;
}
.qw-send.active {
  opacity: 1;
  pointer-events: auto;
}
.qw-send:active { transform: scale(0.92); }

.qw-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
}

.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 16px 6px;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s;
}
.feature-card:active {
  transform: scale(0.95);
}
.feature-icon {
  font-size: 28px;
  line-height: 1;
}
.feature-name {
  font-size: 13px;
  font-weight: 600;
}

/* 首页分类作为链接时去掉下划线 */
a.category-item {
  text-decoration: none;
  color: inherit;
}

/* ===== 滚动到底部按钮 ===== */
.scroll-bottom-btn {
  position: absolute;
  bottom: 80px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 5;
}

.scroll-bottom-btn.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-bottom-btn:active {
  transform: scale(0.9);
}

/* ===== 响应式 ===== */
@media (min-width: 500px) {
  .app-container {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  }
}

/* ===== 管理后台样式 ===== */
.admin-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header h1 {
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-header .back-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 4px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-toolbar select,
.admin-toolbar input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.admin-toolbar select:focus,
.admin-toolbar input:focus {
  border-color: var(--primary);
}

.admin-toolbar .btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.admin-toolbar .btn:active {
  opacity: 0.7;
}

.admin-toolbar .btn-primary {
  background: var(--primary);
  color: #fff;
}

.admin-toolbar .btn-secondary {
  background: var(--border);
  color: var(--text-main);
}

.admin-toolbar .btn-danger {
  background: #FF3B30;
  color: #fff;
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.qa-card .qa-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.qa-card .qa-question {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.qa-card .qa-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.qa-card .qa-actions button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qa-card .qa-actions .btn-edit {
  background: var(--primary-light);
  color: var(--primary);
}

.qa-card .qa-actions .btn-del {
  background: #FFEAEA;
  color: #FF3B30;
}

.qa-card .qa-answer {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 8px;
  max-height: 100px;
  overflow: hidden;
  position: relative;
}

.qa-card .qa-answer.expanded {
  max-height: none;
}

.qa-card .qa-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qa-card .qa-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
}

.qa-card .qa-keywords {
  font-size: 11px;
  color: var(--text-light);
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
}

.modal-header .close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  background: #fff;
  color: var(--text-main);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.form-group .hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.modal-footer button {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.modal-footer .btn-cancel {
  background: var(--bg);
  color: var(--text-sub);
}

.modal-footer .btn-save {
  background: var(--primary);
  color: #fff;
}

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* ===== 让 toast 默认可见（JS 直接 append 并定时移除，不切换 show 类） ===== */
.toast {
  opacity: 1;
  animation: toastIn 0.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== 底部 tab 切换 ===== */
.tabbar {
  display: none !important;
  background: var(--card-bg, #fff);
  border-top: 1px solid var(--border, #eee);
  flex-shrink: 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding-bottom: var(--safe-bottom);
  max-width: var(--max-width);
  margin: 0 auto;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  padding: 6px 4px;
  font-size: 12px;
  color: var(--text-sub, #666);
  text-decoration: none;
  transition: color 0.15s;
}
.tab-item .tab-ico {
  font-size: 21px;
  line-height: 1;
}
.tab-item.active {
  color: var(--primary, #4F6EF6);
  font-weight: 600;
}

/* ===== 我的页面 ===== */
.profile-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px calc(16px + var(--tabbar-h) + var(--safe-bottom));
}
.profile-card {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #F0F3FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}
.profile-avatar-edit { position: relative; cursor: pointer; overflow: hidden; }
.profile-avatar-edit.uploading { opacity: .6; }
.profile-avatar-edit .avatar-cam {
  position: absolute;
  right: -2px; bottom: -2px;
  font-size: 16px;
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.profile-avatar-edit img { border-radius: 50%; }
.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}
.profile-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub, #888);
}
.profile-menu {
  background: var(--card-bg, #fff);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.profile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  text-decoration: none;
  color: var(--text-main);
  border-bottom: 1px solid var(--border, #f0f0f0);
  transition: background 0.15s;
}
.profile-item:last-child { border-bottom: none; }
.profile-item:active { background: #F5F5F7; }
.profile-item .pm-ico { font-size: 20px; }
.profile-item .pm-text { flex: 1; font-size: 15px; }
.profile-item .pm-arrow { color: #ccc; font-size: 20px; }
.profile-tip {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-sub, #aaa);
}
/* 「我的」页头像卡下方信息行（学号等） */
.profile-meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-sub, #888);
  min-height: 16px;
}

/* ===== 设置页 ===== */
.settings-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px calc(16px + var(--tabbar-h) + var(--safe-bottom));
}
.set-avatar-block {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 16px;
}
.set-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #F0F3FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
}
.set-avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.set-btn {
  display: inline-block;
  background: var(--primary, #4F6EF6);
  color: #fff;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
}
.set-emoji-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.emoji-opt {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F5F5F7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  border: 2px solid transparent;
}
.emoji-opt.active {
  border-color: var(--primary, #4F6EF6);
}
.set-form {
  background: var(--card-bg, #fff);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.set-row {
  display: flex;
  align-items: center;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border, #f0f0f0);
}
.set-row:last-child { border-bottom: none; }
.set-label {
  width: 64px;
  font-size: 15px;
  color: var(--text-main);
  flex-shrink: 0;
}
.set-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: var(--text-main);
  text-align: right;
}
.set-gender {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.gender-opt {
  border: 1px solid var(--border, #ddd);
  background: #fff;
  border-radius: 18px;
  padding: 6px 18px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
}
.gender-opt.active {
  border-color: var(--primary, #4F6EF6);
  background: var(--primary, #4F6EF6);
  color: #fff;
}
.set-save {
  width: 100%;
  border: none;
  background: var(--primary, #4F6EF6);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s;
}
.set-save:active { transform: scale(0.98); }
.set-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-sub, #aaa);
}

/* ===== 管理员登录屏 ===== */
.login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--primary, #4F6EF6) 0%, var(--secondary, #7B5CF0) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-box {
  width: 300px;
  max-width: 86vw;
  background: #fff;
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main, #222);
}
.login-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub, #888);
}
.login-input {
  width: 100%;
  margin-top: 20px;
  padding: 13px 14px;
  border: 1px solid var(--border, #e2e2e2);
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}
.login-input:focus { border-color: var(--primary, #4F6EF6); }
.login-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: var(--primary, #4F6EF6);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}
.login-btn:active { transform: scale(0.98); }
.login-err {
  margin-top: 12px;
  min-height: 16px;
  font-size: 13px;
  color: #FF3B30;
}

/* ===== 论坛 ===== */
.forum-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  padding-bottom: calc(12px + var(--tabbar-h) + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 0;
  color: var(--text-light, #999);
}
.loading-text { font-size: 13px; }
.empty-box {
  text-align: center;
  color: var(--text-light, #999);
  font-size: 14px;
  padding: 50px 20px;
  line-height: 1.6;
}
/* ===== 论坛优化（校园墙风格）===== */
.forum-filter {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg, #f5f6fa);
  border-bottom: 1px solid var(--border, #eceef2);
}
.filter-tabs { display: flex; gap: 8px; }
.filter-refresh {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #4F6EF6;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform .5s;
}
.filter-refresh:active { transform: rotate(180deg); }
.ptr {
  height: 0;
  overflow: hidden;
  text-align: center;
  color: #9aa0ac;
  font-size: 13px;
  background: transparent;
  transition: height .25s ease;
}
.ptr-text { display: inline-block; line-height: 44px; }
.filter-tab {
  padding: 6px 16px;
  border: none;
  border-radius: 16px;
  background: #e9ebf0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.filter-tab.active {
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,110,246,0.35);
}

.post-card {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 14px 14px 4px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 6px 16px rgba(0,0,0,0.04);
}
.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; font-weight: 600;
  flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
}
.post-avatar.anon { background: #cfd3dc; color: #fff; }
.post-avatar.color { font-size: 16px; }
.post-avatar.img { padding: 0; }
.post-avatar.img img { width: 100%; height: 100%; object-fit: cover; }
/* 头像外链：原生 <a> 跳转主页，去掉默认下划线/颜色，保持原尺寸布局 */
.avatar-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; line-height: 0; }
.post-meta { display: flex; flex-direction: column; min-width: 0; }
.post-author { font-size: 14px; font-weight: 600; color: var(--text-main, #222); line-height: 1.3; }

/* 性别标签：昵称旁的 ♂/♀ 小圆标 */
.gender-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; line-height: 15px; border-radius: 50%;
  font-size: 10px; font-weight: 700; color: #fff; margin-left: 4px; vertical-align: middle;
}
.gender-tag.male { background: #2f86ff; }
.gender-tag.female { background: #ff5b9a; }
.post-time { font-size: 12px; color: var(--text-light, #999); margin-top: 2px; }
.post-del {
  margin-left: auto;
  cursor: pointer; user-select: none;
  font-size: 15px; opacity: .45;
  padding: 4px 6px; border-radius: 6px;
  transition: all .15s;
}
.post-del:hover { opacity: 1; background: rgba(255,59,48,0.12); }

.post-content {
  font-size: 15.5px;
  line-height: 1.65;
  color: #2b2b2b;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.post-grid.n1 { grid-template-columns: 1fr; max-width: 220px; }
.post-grid.n2, .post-grid.n4 { grid-template-columns: repeat(2, 1fr); max-width: 300px; }
.post-grid img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 10px; background: #f0f1f4;
}
.post-grid.n1 img, .post-grid.n2 img, .post-grid.n4 img { aspect-ratio: 4/3; }

.post-actions {
  display: flex;
  gap: 28px;
  padding: 9px 0;
  border-top: 1px solid #f2f3f5;
  font-size: 13px;
  color: #8a8f99;
}
.post-like, .post-comment {
  cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 5px;
  transition: transform .15s;
}
.post-like .heart { font-size: 17px; line-height: 1; transition: transform .2s; }
.post-like.liked { color: #ff4d4f; font-weight: 600; }
.post-like.liked .heart { transform: scale(1.15); }
.post-like:active { transform: scale(0.95); }

.fab-post {
  position: fixed;
  right: 18px;
  bottom: 80px;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(79,110,246,0.45);
  cursor: pointer;
  z-index: 50;
}
.fab-post:active { transform: scale(0.92); }

/* 论坛邮件小窗（回复通知） */
.mail-fab {
  position: fixed;
  right: 18px;
  bottom: 146px;
  width: 50px; height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(79,110,246,.38);
  z-index: 60;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.mail-fab:active { transform: scale(0.92); }
.mail-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #ff3b30; color: #fff;
  font-size: 11px; line-height: 18px; font-weight: 700;
  border-radius: 9px; text-align: center;
  box-sizing: border-box;
}
.mail-panel {
  position: fixed;
  right: 16px;
  bottom: 206px;
  width: min(86vw, 330px);
  max-height: 58vh; overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  z-index: 70;
  padding: 12px 12px 8px;
  box-sizing: border-box;
}
.dark .mail-panel { background: #1f2330; }
.mail-panel-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.mail-panel-close { cursor: pointer; color: #999; font-size: 16px; padding: 0 4px; }
.mail-panel-list { max-height: 42vh; overflow-y: auto; }
.mail-item { padding: 8px 6px; border-bottom: 1px solid #f0f0f0; font-size: 13px; line-height: 1.4; }
.dark .mail-item { border-color: #333; }
.mail-item.unread { background: rgba(79,110,246,.07); border-radius: 8px; }
.mail-item .mi-name { color: var(--primary, #4F6EF6); font-weight: 600; }
.mail-item .mi-snip { display: block; color: #666; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .mi-unread { display: inline-block; background: #ff3b30; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-right: 6px; vertical-align: middle; }
.dark .mail-item .mi-snip { color: #aaa; }
.mail-empty { color: #999; text-align: center; padding: 20px 0; font-size: 13px; }
.mail-panel-all { display: block; text-align: center; color: var(--primary, #4F6EF6); margin-top: 6px; padding: 6px 0; font-size: 13px; }

/* 弹层 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
.modal-card {
  background: var(--card-bg, #fff);
  width: 100%;
  max-width: 560px;
  border-radius: 18px 18px 0 0;
  padding: 18px;
  box-sizing: border-box;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}
.modal-close { font-size: 18px; color: var(--text-light, #999); cursor: pointer; padding: 4px; }
.post-input {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px;
  font-size: 15px;
  resize: none;
  box-sizing: border-box;
  font-family: inherit;
}
.anon-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  font-size: 14px;
  color: var(--text-sub, #555);
}
.post-img-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
}
.img-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 20px;
  background: #f5f6fa;
  color: #4F6EF6;
  font-size: 14px;
  cursor: pointer;
}
.img-pick-btn:active { transform: scale(0.96); }
.img-hint { font-size: 13px; color: var(--text-sub, #888); }
.post-img-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 2px;
}
.post-img-preview:empty { display: none; }
.img-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.modal-submit {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.modal-submit:disabled { opacity: 0.6; }
.comment-list {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f2f3f5;
}
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; font-weight: 600; flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
}
.comment-avatar.anon { background: #cfd3dc; color: #fff; }
.comment-avatar.img { padding: 0; }
.comment-avatar.img img { width: 100%; height: 100%; object-fit: cover; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { font-size: 12px; color: var(--text-light, #999); margin-bottom: 3px; }
.comment-text { font-size: 14px; color: #2b2b2b; line-height: 1.55; word-break: break-word; }
.comment-del {
  margin-left: auto; align-self: center;
  cursor: pointer; user-select: none;
  opacity: .45; padding: 4px 6px; border-radius: 6px; font-size: 14px;
}
.comment-del:hover { opacity: 1; background: rgba(255,59,48,0.12); }
.comment-input-row { display: flex; gap: 8px; }
.comment-input {
  flex: 1;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 14px;
  box-sizing: border-box;
}
.comment-send {
  padding: 0 18px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* ===== 找回入口引导 ===== */
/* 齿轮（管理端入口）已移至首页工具栏「兼职」旁（home.js 中 data-admin 工具），此处不再保留浮标容器 */
/* 加学长微信胶囊（保持原绿色样式），现作为独立浮标定位在右上角 */
.wechat-fab {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #07C160;
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wechat-fab:active { transform: scale(0.95); }
.wx-icon { flex-shrink: 0; }

/* ===== 加学长微信卡片 ===== */
.wechat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 320;
}
.wechat-overlay.show { display: flex; }

.wechat-modal {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 20px;
  padding: 22px 20px 16px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  animation: rgIn 0.22s ease-out;
}
.wechat-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 28px; height: 28px;
  border: none; background: transparent;
  font-size: 22px; line-height: 1; color: #bbb;
  cursor: pointer;
}
.wechat-close:active { color: #888; }

.wechat-head { margin-bottom: 14px; }
.wechat-avatar {
  width: 54px; height: 54px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #07C160;
  color: #fff;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
}
.wechat-title { font-size: 18px; font-weight: 700; color: #1a1a2e; }
.wechat-sub { font-size: 12px; color: #999; margin-top: 4px; }

.wechat-qr-wrap {
  width: 180px; height: 180px;
  margin: 4px auto 12px;
  border-radius: 12px;
  background: #f5f5f7;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.wechat-qr { width: 100%; height: 100%; object-fit: contain; }
.wechat-qr-fallback { font-size: 12px; color: #999; padding: 0 14px; line-height: 1.5; }

.wechat-id-row {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  background: #f5f5f7;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.wechat-id-label { font-size: 12px; color: #999; }
.wechat-id { font-size: 15px; font-weight: 700; color: #1a1a2e; letter-spacing: 0.3px; }
.wechat-copy {
  border: none;
  background: #07C160;
  color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.wechat-copy:active { opacity: 0.85; }

.wechat-foot { border-top: 1px solid #f0f0f0; padding-top: 10px; }
.wechat-retention-link {
  font-size: 12px;
  color: #07C160;
  text-decoration: none;
  cursor: pointer;
}

.retention-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}
.retention-overlay.show { display: flex; }

.retention-modal {
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 20px 18px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  animation: rgIn 0.22s ease-out;
}
@keyframes rgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.retention-modal-head { margin-bottom: 14px; }
.retention-modal-title { font-size: 17px; font-weight: 700; color: var(--text-main); }
.retention-modal-sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; line-height: 1.5; }

.retention-steps { display: flex; flex-direction: column; gap: 12px; }
.rg-step { display: flex; gap: 10px; align-items: flex-start; }
.rg-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rg-step div { font-size: 13.5px; color: var(--text-main); line-height: 1.55; }
.rg-step b { color: var(--primary-dark); }

/* 找回引导弹窗内的阿濠学长二维码 */
.rg-qr-wrap {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.rg-qr {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
  object-fit: cover;
}
.rg-qr-tip {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
}

.retention-actions { display: flex; gap: 10px; margin-top: 18px; }
.retention-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.retention-btn.ghost { background: var(--bg); color: var(--text-main); }
.retention-btn.primary { background: var(--primary); color: #fff; }
.retention-btn:active { opacity: 0.85; }

/* ===== 校园兼职页 ===== */
.parttime-hero {
  background: linear-gradient(135deg, #07C160, #06a050);
  color: #fff;
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 16px;
}
.pt-hero-title { font-size: 19px; font-weight: 700; }
.pt-hero-sub { font-size: 13px; opacity: 0.92; margin-top: 6px; }

.parttime-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.pt-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pt-badge {
  background: #07C160; color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 8px;
}
.pt-card-title { font-size: 17px; font-weight: 700; color: var(--text-main); }
.pt-desc { font-size: 14px; color: var(--text-sub); line-height: 1.6; margin-bottom: 14px; }

.pt-qr-wrap {
  width: 200px; height: 200px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.pt-qr { width: 100%; height: 100%; object-fit: contain; }
.pt-qr-tip { text-align: center; font-size: 13px; color: var(--text-main); margin-bottom: 14px; }

.pt-steps { margin: 0 0 14px; padding-left: 20px; }
.pt-steps li { font-size: 14px; color: var(--text-main); line-height: 1.9; }

.pt-note {
  font-size: 12.5px; color: #d4380d;
  background: #fff2e8; border-radius: 10px;
  padding: 10px 12px; line-height: 1.5;
}

.parttime-faq { margin-bottom: 20px; }
.pt-faq-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 13.5px; color: var(--text-sub);
  line-height: 1.6; margin-bottom: 10px;
}
.pt-faq-item b { color: var(--text-main); }

/* 兼职页通用容器（与论坛/聊天页同款文档流布局） */
.page {
  padding: 16px;
  padding-bottom: calc(16px + var(--tabbar-h) + var(--safe-bottom));
  max-width: var(--max-width);
  margin: 0 auto;
  box-sizing: border-box;
}
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 4px 0 12px;
}

/* ===== 消息中心 ===== */
.msg-tabs {
  display: flex;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border, #eee);
  position: sticky;
  top: 0;
  z-index: 20;
}
.msg-tab {
  flex: 1;
  text-align: center;
  padding: 13px 0;
  font-size: 15px;
  color: var(--text-sub, #666);
  position: relative;
}
.msg-tab.active {
  color: var(--primary, #4F6EF6);
  font-weight: 700;
}
.msg-tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--primary, #4F6EF6);
}
.msg-pane {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 calc(8px + var(--tabbar-h) + var(--safe-bottom));
}
.msg-list { display: flex; flex-direction: column; }
.msg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border, #f0f0f0);
  cursor: pointer;
}
.msg-item:active { background: #f7f8fa; }
.msg-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
  overflow: hidden;
}
.msg-avatar.img img { width: 100%; height: 100%; object-fit: cover; }
.msg-body { flex: 1; min-width: 0; }
.msg-line { font-size: 15px; color: var(--text-main, #222); }
.msg-sub {
  font-size: 13px;
  color: var(--text-sub, #888);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70vw;
}
.msg-time { font-size: 12px; color: #bbb; margin-top: 4px; }
.msg-arrow { color: #ccc; font-size: 20px; }
.msg-right { text-align: right; flex-shrink: 0; }
.dm-unread {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  text-align: center;
  margin-top: 6px;
}

/* 聊天视图 */
.chat-view {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: var(--max-width);
  background: #ededed;
  z-index: 80;
  display: flex;
  flex-direction: column;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border, #eee);
  font-weight: 600;
}
.chat-back { color: var(--primary, #4F6EF6); font-size: 15px; cursor: pointer; }
.chat-peer { font-size: 16px; }
.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-empty { text-align: center; color: #aaa; font-size: 13px; margin-top: 40px; }
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-end; }
.chat-row.theirs { justify-content: flex-start; }
.chat-bubble {
  max-width: 72%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}
.chat-row.mine .chat-bubble {
  background: var(--primary, #4F6EF6);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-row.theirs .chat-bubble {
  background: #fff;
  color: #222;
  border-bottom-left-radius: 4px;
}
.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--card-bg, #fff);
  border-top: 1px solid var(--border, #eee);
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border, #ddd);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 15px;
  outline: none;
}
.chat-send {
  border: none;
  background: var(--primary, #4F6EF6);
  color: #fff;
  border-radius: 20px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
}
.chat-send:disabled { opacity: 0.5; }

/* tabbar 未读红点 */
.tab-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  margin-right: -22px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  text-align: center;
  font-weight: 600;
}

/* 帖子详情页 */
.post-detail { padding: 12px 12px 0; }
.post-detail .post-card { margin: 0; }
.comment-list { padding: 8px 12px 96px; }
.post-comment-count { color: #889; font-size: 14px; margin-left: 14px; }
.comment-input-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #eef0f4; box-sizing: border-box;
}
.comment-input-bar .comment-input {
  flex: 1; padding: 11px 14px; border: 1.5px solid #e2e8f2; border-radius: 22px;
  font-size: 15px; outline: none; background: #fafcff;
}
.comment-input-bar .comment-send {
  flex: 0 0 auto; padding: 0 20px; border: 0; border-radius: 22px;
  background: linear-gradient(90deg,#1f8fff,#4da3ff); color: #fff; font-size: 15px; font-weight: 700;
}

/* 用户卡弹层 */
.user-card { text-align: center; padding-bottom: 24px; }
.user-card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main, #222);
  margin: 18px 0 20px;
}
.user-card-dm {
  display: inline-block;
  background: var(--primary, #4F6EF6);
  color: #fff;
  text-decoration: none;
  padding: 10px 28px;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
}

/* ===== 个人主页 / 我的动态 ===== */
.nav-back {
  font-size: 26px; line-height: 1; color: #fff; cursor: pointer;
  width: 36px; text-align: left; user-select: none;
}
.nav-msg { font-size: 20px; width: 36px; text-align: right; }

.user-page { padding: 12px 14px 24px; }
.user-header {
  background: var(--card-bg, #fff);
  border-radius: 18px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 6px 16px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}
.user-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; background: linear-gradient(135deg, #4F6EF6, #7C5CF6); color: #fff;
  overflow: hidden;
}
.user-name { font-size: 19px; font-weight: 700; color: var(--text-main, #222); }
.user-tags { margin: 8px 0 2px; min-height: 22px; }
.user-tag {
  display: inline-block; font-size: 12px; color: #6b7280;
  background: #f1f2f5; border-radius: 11px; padding: 3px 10px; margin: 0 4px;
}
.user-stats { display: flex; justify-content: center; gap: 28px; margin: 14px 0 4px; }
.ustat { display: flex; flex-direction: column; align-items: center; }
.ustat b { font-size: 18px; color: var(--text-main, #222); }
.ustat span { font-size: 12px; color: var(--text-light, #999); margin-top: 2px; }
.user-dm-btn {
  border: none; cursor: pointer;
  background: var(--primary, #4F6EF6); color: #fff;
  padding: 9px 30px; border-radius: 22px; font-size: 15px; font-weight: 600;
}
.user-follow-btn {
  border: 1px solid var(--primary, #4F6EF6); cursor: pointer;
  background: #fff; color: var(--primary, #4F6EF6);
  padding: 9px 26px; border-radius: 22px; font-size: 15px; font-weight: 600;
}
.user-follow-btn.followed {
  background: #f1f2f5; color: #6b7280; border-color: #e5e5ea;
}
.user-follow-btn:disabled { opacity: .6; }
.user-actions { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }

/* 个人主页 Tab：动态 / 粉丝 / 关注 */
.user-tabs {
  display: flex; background: var(--card-bg, #fff); border-radius: 14px;
  padding: 4px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.user-tab {
  flex: 1; text-align: center; padding: 11px 0; font-size: 14px;
  color: var(--text-sub, #8E8E93); border-radius: 12px; cursor: pointer;
}
.user-tab.active { background: var(--primary-light, #E8EDFE); color: var(--primary, #4F6EF6); font-weight: 600; }
.user-tab-content { min-height: 220px; }
.user-tab-content .post-list { margin-top: 0; }

.profile-dynamic { margin: 16px 0 8px; }
.pd-more { float: right; font-size: 13px; color: var(--primary, #4F6EF6); font-weight: 500; text-decoration: none; }
.loading-mini { text-align: center; color: var(--text-light, #999); font-size: 13px; padding: 24px 0; }

/* 我的页快捷入口：我发布的 / 我关注的 */
.profile-quick {
  display: flex; gap: 12px; margin: 16px 0 8px;
}
.quick-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card-bg, #fff); border-radius: 16px;
  padding: 18px 0; text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 6px 16px rgba(0,0,0,0.04);
  transition: transform .08s;
}
.quick-item:active { transform: scale(.97); background: #F5F5F7; }
.quick-ico { font-size: 28px; margin-bottom: 6px; }
.quick-text { font-size: 14px; color: var(--text-main, #222); font-weight: 600; }

/* 我关注的 / 粉丝 页面 */
.followers-page { padding: 12px 14px 24px; }
.follow-tabs {
  display: flex; background: var(--card-bg, #fff); border-radius: 14px;
  padding: 4px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.follow-tab {
  flex: 1; text-align: center; padding: 10px 0; font-size: 14px;
  color: var(--text-sub, #8E8E93); border-radius: 12px; cursor: pointer;
}
.follow-tab.active { background: var(--primary-light, #E8EDFE); color: var(--primary, #4F6EF6); font-weight: 600; }
.follow-list { background: var(--card-bg, #fff); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.follow-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  text-decoration: none; color: var(--text-main, #222); border-bottom: 1px solid #f2f3f5;
}
.follow-item:last-child { border-bottom: none; }
.follow-item:active { background: #F5F5F7; }
.follow-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden; }
.follow-info { flex: 1; min-width: 0; }
.follow-name { font-size: 15px; font-weight: 600; }
.follow-arrow { color: #ccc; font-size: 20px; }

/* 帖子卡补充（动态列表复用） */
.post-ava { width: 40px; height: 40px; flex-shrink: 0; }
.post-name { font-size: 14px; font-weight: 600; color: var(--text-main, #222); line-height: 1.3; }
.post-text {
  font-size: 15.5px; line-height: 1.65; color: #2b2b2b;
  white-space: pre-wrap; word-break: break-word; margin-bottom: 10px;
}
.post-foot {
  display: flex; gap: 24px; padding: 9px 0;
  border-top: 1px solid #f2f3f5; font-size: 13px; color: #8a8f99;
}
.post-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* 用户卡：发私信 + 查看主页 */
.user-card-actions { display: flex; gap: 12px; justify-content: center; }
.user-card-home {
  display: inline-block;
  background: #f1f2f5; color: #4b4f58;
  text-decoration: none;
  padding: 10px 24px; border-radius: 22px;
  font-size: 15px; font-weight: 600;
}

/* ============================================================
   统一头像占位（data:/http 真实图片 → <img>；否则灰色人形占位）
   头像只能来自用户自己上传的真实图片，不再使用 emoji / 字母渐变
   ============================================================ */
.post-avatar.ph, .comment-avatar.ph, .msg-avatar.ph,
.post-ava.ph, .user-avatar.ph, .set-avatar.ph, .profile-avatar.ph {
  background: #eef0f4;
  color: #aeb4c0;            /* 人形 SVG 颜色（currentColor） */
}
.post-avatar.ph, .comment-avatar.ph, .msg-avatar.ph, .post-ava.ph {
  font-size: 0;             /* 防止残留字符影响布局 */
}
.profile-avatar.ph { background: #eef0f4; color: #b3b8c2; }
.profile-avatar.has-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.user-avatar.img { padding: 0; }
.user-avatar.img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.set-avatar.has-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.set-avatar.ph { background: #eef0f4; color: #aeb4c0; }

/* 「我的」页：未上传头像时的上传提示 */
.profile-avatar-hint {
  text-align: center;
  font-size: 13px;
  color: var(--primary, #4F6EF6);
  margin: -2px 0 8px;
  cursor: pointer;
  font-weight: 500;
}

/* ============================================================
   帖子详情页 post.html
   ============================================================ */
.post-detail { padding: 14px 16px 96px; }
.pd-card {
  background: var(--card-bg, #fff);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.pd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pd-head .pd-meta { min-width: 0; }
.pd-author { font-size: 15px; font-weight: 600; color: var(--text-main, #222); }
.pd-time { font-size: 12px; color: var(--text-light, #999); margin-top: 2px; }
.pd-del { margin-left: auto; cursor: pointer; font-size: 15px; opacity: .45; padding: 4px 6px; }
.pd-del:hover { opacity: 1; background: rgba(255,59,48,.12); }
.pd-content {
  font-size: 16px; line-height: 1.7; color: #1f2024;
  white-space: pre-wrap; word-break: break-word; margin-bottom: 12px;
}
.pd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.pd-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
.pd-actions {
  display: flex; align-items: center; gap: 20px;
  padding-top: 12px; border-top: 1px solid #f2f3f5;
  font-size: 14px; color: #8a8f99;
}
.pd-like { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pd-like .heart { font-size: 20px; color: #c2c6cf; transition: transform .12s; }
.pd-like.liked .heart { color: #ff4d4f; }
.pd-like:active .heart { transform: scale(1.25); }

.pd-comments-title { font-size: 15px; font-weight: 700; color: var(--text-main, #222); margin: 20px 4px 8px; }
.pd-comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f2f3f5; }
.pd-comment-body { flex: 1; min-width: 0; }
.pd-comment-meta { font-size: 12px; color: var(--text-light, #999); margin-bottom: 3px; }
.pd-comment-text { font-size: 14px; color: #2b2b2b; line-height: 1.55; word-break: break-word; }
.pd-comment-del { margin-left: auto; align-self: center; font-size: 14px; opacity: .4; cursor: pointer; }
.pd-comment-del:hover { opacity: 1; color: #ff4d4f; }

/* 楼中楼回复 */
.pd-comment-reply { margin-left: 34px; background: #f7f8fa; border-radius: 10px; padding: 8px 10px; border-bottom: none; margin-top: 2px; }
.comment-reply { margin-left: 26px; background: #f7f8fa; border-radius: 10px; padding: 6px 8px; }
.pd-reply-to, .comment-reply-to { color: #2f86ff; font-weight: 600; }
.pd-comment-reply-btn, .comment-reply-btn { display: inline-block; margin-top: 6px; font-size: 12px; color: #8a93a0; cursor: pointer; user-select: none; }
.pd-comment-reply-btn:active, .comment-reply-btn:active { color: #2f86ff; }

/* 底部固定发评论栏 */
.pd-comment-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  background: var(--card-bg, #fff);
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
  box-sizing: border-box;
  max-width: 480px; margin: 0 auto;
}
.pd-comment-bar-row { display: flex; gap: 10px; padding: 10px 14px; }
.pd-comment-bar input {
  flex: 1; padding: 11px 14px; border: 1.5px solid #e2e8f2; border-radius: 22px;
  font-size: 15px; outline: none; background: #fafcff;
}
.pd-comment-bar input:focus { border-color: var(--primary, #4F6EF6); background: #fff; }
.pd-comment-bar button {
  border: 0; border-radius: 22px; padding: 0 20px;
  background: linear-gradient(90deg, #1f8fff, #4da3ff); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.pd-comment-bar button:disabled { opacity: .6; }

/* 正在回复提示条（帖子详情页嵌套在评论栏顶部 / 论坛弹层独立显示） */
.reply-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; font-size: 13px; color: var(--text-sub, #666);
  background: #eef4ff; border-bottom: 1px solid #e3ecff;
}
.reply-bar .reply-name { color: #2f86ff; font-weight: 600; }
.reply-bar .reply-cancel { color: #999; cursor: pointer; }
.reply-bar .reply-cancel:active { color: #ff4d4f; }

/* ===== 校园VR 模块（沉浸式全屏） ===== */
.vr-full {
  display: block;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}
/* 沉浸式：隐藏顶部导航栏与底部 tabbar，让全景铺满整屏 */
.vr-full .navbar,
.vr-full .tabbar { display: none; }
.vr-area {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}
.vr-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
/* 悬浮返回按钮（顶左，半透明，不挡全景） */
.vr-back {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 12px;
  z-index: 30;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 24px;
  line-height: 38px;
  text-align: center;
  text-decoration: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.vr-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #111;
  color: #fff;
  z-index: 5;
}
.vr-spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vr-spin 0.9s linear infinite;
}
@keyframes vr-spin { to { transform: rotate(360deg); } }
.vr-loading-text { font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.vr-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  background: #111;
  color: #fff;
  z-index: 6;
}
.vr-fallback-emoji { font-size: 48px; }
.vr-fallback-title { font-size: 17px; font-weight: 600; }
.vr-fallback-desc { font-size: 13px; color: rgba(255, 255, 255, 0.75); line-height: 1.6; }
.vr-fallback-btn {
  margin-top: 6px;
  padding: 11px 26px;
  border-radius: 999px;
  background: var(--primary, #4F6EF6);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

/* ===== 论坛优化 v2：搜索 + 分类频道（校园墙风格） ===== */
.forum-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg, #f5f6fa);
  border-bottom: 1px solid var(--border, #eceef2);
}
.forum-search .search-ico { font-size: 15px; opacity: .55; }
.forum-search-input {
  flex: 1;
  height: 34px;
  border: none;
  outline: none;
  background: #fff;
  border-radius: 17px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-main, #222);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.forum-search-clear {
  width: 24px; height: 24px;
  border: none; border-radius: 50%;
  background: #d8dbe2; color: #fff;
  font-size: 12px; line-height: 1; cursor: pointer;
}

.forum-channels {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  background: var(--bg, #f5f6fa);
  border-bottom: 1px solid var(--border, #eceef2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.forum-channels::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border: none;
  border-radius: 18px;
  background: #fff;
  color: #5b606b;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all .2s;
}
.cat-chip .cat-ico { font-size: 14px; }
.cat-chip.active {
  background: linear-gradient(135deg, #4F6EF6, #7C5CF6);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,110,246,0.35);
}

/* 帖子上的分类标签 */
.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  margin-bottom: 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c, #8a8f99);
  background: #eef0f3;
  background: color-mix(in srgb, var(--c, #8a8f99) 14%, #fff);
}

/* 发帖弹层里的分类选择 */
.post-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.post-cat-chip {
  padding: 6px 12px;
  border: 1px solid #e3e6ec;
  border-radius: 14px;
  background: #f6f7f9;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.post-cat-chip.active {
  border-color: var(--c);
  color: var(--c);
  background: #eef0f3;
  background: color-mix(in srgb, var(--c) 12%, #fff);
}

/* 帖子操作栏：分享 */
.post-share {
  margin-left: auto;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  color: #8a8f99;
}
.post-share:active { transform: scale(0.95); }

/* 排序栏更紧凑 */
.forum-filter { padding: 8px 14px; }

/* ============ 通用返回箭头 ============ */
.nav-back {
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  width:32px; height:32px; border-radius:50%; border:none;
  background:rgba(0,0,0,0.05); color:var(--text-main); font-size:18px;
  display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:10;
}
.nav-back:active { background:rgba(0,0,0,0.1); }
.navbar.has-back .avatar { display:none; }

/* ============ 校园资讯 ============ */
.news-card { background:var(--card-bg); border-radius:14px; margin:10px 14px; padding:14px 16px; box-shadow:0 1px 3px rgba(0,0,0,0.04); }
.news-tag { display:inline-block; font-size:11px; padding:2px 8px; border-radius:4px; background:var(--primary-light); color:var(--primary-dark); margin-bottom:8px; }
.news-tag.top { background:#FFE8E8; color:#E5484D; }
.news-title { font-size:16px; font-weight:600; color:var(--text-main); line-height:1.4; }
.news-content { font-size:14px; color:var(--text-sub); line-height:1.6; margin-top:8px; }
.news-meta { font-size:12px; color:#AEAEB2; margin-top:10px; }
.news-admin-bar { display:flex; gap:8px; padding:10px 14px; }
.news-admin-bar button { flex:1; border:none; border-radius:8px; padding:9px; font-size:14px; cursor:pointer; background:var(--primary); color:#fff; }
.news-admin-bar button.outline { background:#fff; color:var(--primary); border:1px solid var(--primary); }

/* ============ 活动报名 ============ */
.event-card { background:var(--card-bg); border-radius:14px; margin:10px 14px; overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,0.04); }
.event-cover { width:100%; height:130px; object-fit:cover; background:#eef0f3; display:block; }
.event-body { padding:12px 16px 14px; }
.event-title { font-size:16px; font-weight:600; color:var(--text-main); }
.event-meta-row { font-size:13px; color:var(--text-sub); margin-top:6px; display:flex; gap:4px; align-items:center; }
.event-desc { font-size:14px; color:var(--text-sub); line-height:1.6; margin-top:8px; }
.event-actions { display:flex; align-items:center; gap:10px; margin-top:12px; }
.event-signup-btn { border:none; border-radius:20px; padding:8px 20px; font-size:14px; font-weight:600; background:var(--primary); color:#fff; cursor:pointer; flex:1; }
.event-signup-btn.signed { background:#34C759; }
.event-signup-btn:active { transform:scale(0.97); }
.event-count { font-size:13px; color:var(--text-sub); }
.event-del { font-size:13px; color:#E5484D; background:none; border:none; cursor:pointer; }

/* ============ 校园黄页 ============ */
.yp-group-title { font-size:13px; color:var(--text-sub); padding:14px 16px 6px; font-weight:600; }
.yp-card { background:var(--card-bg); margin:0 14px; padding:12px 16px; border-radius:12px; display:flex; align-items:center; gap:12px; margin-bottom:8px; }
.yp-icon { width:40px; height:40px; border-radius:10px; background:var(--primary-light); display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.yp-info { flex:1; min-width:0; }
.yp-name { font-size:15px; font-weight:600; color:var(--text-main); }
.yp-desc { font-size:12px; color:var(--text-sub); margin-top:2px; }
.yp-call { width:40px; height:40px; border-radius:50%; border:none; background:#34C759; color:#fff; font-size:18px; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; text-decoration:none; }
.yp-call:active { transform:scale(0.92); }

/* ============ 校园百科 ============ */
.wiki-card { background:var(--card-bg); border-radius:14px; margin:10px 14px; padding:14px 16px; box-shadow:0 1px 3px rgba(0,0,0,0.04); }
.wiki-cat-tag { display:inline-block; font-size:11px; padding:2px 8px; border-radius:4px; background:#FFF3E0; color:#E67E22; margin-bottom:8px; }
.wiki-title { font-size:15px; font-weight:600; color:var(--text-main); }
.wiki-content { font-size:13px; color:var(--text-sub); line-height:1.65; margin-top:8px; }
.wiki-expand { font-size:13px; color:var(--primary); margin-top:8px; cursor:pointer; }

/* ============ 举报弹层 ============ */
.report-mask { position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:200; display:flex; align-items:flex-end; justify-content:center; }
.report-card { background:var(--card-bg); width:100%; max-width:var(--max-width); border-radius:16px 16px 0 0; padding:16px 18px calc(20px + var(--safe-bottom)); }
.report-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.report-head span:first-child { font-size:16px; font-weight:600; }
.report-close { font-size:20px; color:var(--text-sub); cursor:pointer; background:none; border:none; }
.report-reasons { display:flex; flex-direction:column; gap:10px; }
.report-reason { padding:12px 14px; border-radius:10px; border:1px solid var(--border); font-size:14px; color:var(--text-main); cursor:pointer; background:#fff; }
.report-reason:active, .report-reason.sel { border-color:var(--primary); background:var(--primary-light); }

/* ============ 暗黑模式 ============ */
body.dark { --bg:#0F1115; --card-bg:#1C1F26; --text-main:#F2F2F7; --text-sub:#98989F; --border:#2A2E36; --primary-light:#2A3150; background:var(--bg); color:var(--text-main); }
body.dark .navbar { background:var(--primary); }
body.dark .qw-input-wrap, body.dark .qw-tool { background:#262A33; }
body.dark .forum-search { background:var(--card-bg); }
body.dark .forum-search-input { background:#262A33; color:var(--text-main); }

/* ============================================================
   桌面端布局（视口 >= 900px 视为电脑）
   左侧固定导航栏 + 右侧主内容区；手机端（< 900px）完全保持 H5 原样。
   ============================================================ */
.desktop-sidebar {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 248px;
  height: 100vh;
  background: linear-gradient(180deg, #1e3a8a 0%, #294bb0 58%, #2f56c4 100%);
  color: #fff;
  flex-direction: column;
  z-index: 300;
  box-shadow: 2px 0 18px rgba(20,30,60,.18);
}
.desktop-sidebar .ds-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.desktop-sidebar .ds-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.desktop-sidebar .ds-name { font-size: 17px; font-weight: 700; line-height: 1.2; }
.desktop-sidebar .ds-sub { font-size: 11px; opacity: .72; margin-top: 2px; }
.desktop-sidebar .ds-nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.desktop-sidebar .ds-group-title {
  font-size: 11px; letter-spacing: .08em; opacity: .55; padding: 14px 12px 6px;
}
.desktop-sidebar .ds-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin: 2px 0;
  border-radius: 10px; color: #eaf0ff; text-decoration: none;
  font-size: 14px; transition: background .15s, color .15s;
}
.desktop-sidebar .ds-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.desktop-sidebar .ds-link.active { background: #fff; color: #1e3a8a; font-weight: 600; }
.desktop-sidebar .ds-link .ds-ico { font-size: 17px; width: 20px; text-align: center; }
.desktop-sidebar .ds-foot {
  padding: 12px 18px; font-size: 11px; opacity: .6;
  border-top: 1px solid rgba(255,255,255,.12);
}

@media (min-width: 99999px) { /* 桌面布局已禁用：统一用手机样式（底部tab+单列居中） */
  body { padding-left: 248px; overflow: hidden; background: #eef1f7; }
  .desktop-sidebar { display: flex; }

  .app-container {
    height: 100vh; max-width: none; width: auto; margin: 0;
    border-radius: 0; box-shadow: none;
    display: flex; flex-direction: column; overflow: hidden;
  }
  .page { height: 100vh; max-width: none; width: auto; margin: 0; border-radius: 0; box-shadow: none; overflow-y: auto; }
  .page .navbar { position: sticky; top: 0; z-index: 5; }

  /* 滚动容器（仅 app-container 的直接内容子元素） */
  .app-container > .home-area,
  .app-container > .chat-area,
  .app-container > .forum-area,
  .app-container > .profile-area,
  .app-container > .settings-area,
  .app-container > .vr-area,
  .app-container > .post-list,
  .app-container > .lq-wrap,
  .app-container > .auth-wrap,
  .app-container > .msg-list,
  .app-container > .follow-list,
  .app-container > .qa-list,
  .app-container > .content-area,
  .app-container > .page-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 内容留白 */
  .app-container > .profile-area,
  .app-container > .settings-area,
  .app-container > .vr-area,
  .app-container > .post-list,
  .app-container > .lq-wrap,
  .app-container > .auth-wrap,
  .app-container > .msg-list,
  .app-container > .follow-list,
  .app-container > .qa-list,
  .app-container > .content-area,
  .app-container > .page-body { padding: 28px 40px; }
  .app-container > .chat-area { padding: 24px 40px; }
  .app-container > .forum-area { padding: 20px 40px; }
  .app-container > .home-area { padding: 24px 0; }
  .app-container > .home-area > .home-inner,
  .app-container > .home-area > .home-chat,
  .app-container > .home-area > .home-input-bar { padding: 0 40px; }
  .home-inner, .home-chat, .home-input-bar {
    max-width: 960px; margin-left: auto; margin-right: auto;
  }
  .home-input-bar {
    position: sticky; bottom: 0; background: var(--bg);
    padding-top: 12px; padding-bottom: 12px;
  }

  .navbar { border-radius: 0; }
  .tabbar { display: none !important; }

  .message .msg-bubble { max-width: 68%; }

  .quick-actions { padding: 12px 40px 0; flex-wrap: wrap; }
  .input-area { padding: 10px 40px 18px; }

  /* 论坛两列网格 */
  .app-container > .forum-area {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px; align-content: start;
  }
  .app-container > .forum-area > .loading-box,
  .app-container > .forum-area > .empty-state { grid-column: 1 / -1; }

  .forum-search, .forum-channels, .forum-filter { padding-left: 40px; padding-right: 40px; }
  .forum-channels { flex-wrap: wrap; }

  .modal-mask, .report-mask, .mail-panel, .mail-fab, .fab-post, .wechat-fab { max-width: none !important; margin: 0 !important; }
  .modal-card, .report-card { max-width: 560px; }

}

body.dark .yp-icon, body.dark .qw-send { background:var(--primary-light); }

.theme-toggle { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:var(--card-bg); margin:10px 14px; border-radius:12px; }
.theme-toggle .t-label { font-size:15px; color:var(--text-main); }
.theme-toggle .t-sub { font-size:12px; color:var(--text-sub); }
.theme-switch { width:48px; height:28px; border-radius:14px; border:none; cursor:pointer; background:#ccc; position:relative; transition:background .2s; }
.theme-switch::after { content:''; position:absolute; width:24px; height:24px; border-radius:50%; background:#fff; top:2px; left:2px; transition:left .2s; box-shadow:0 1px 3px rgba(0,0,0,.3); }
body.dark .theme-switch { background:var(--primary); }
body.dark .theme-switch::after { left:22px; }

.empty-state { text-align:center; padding:60px 20px; color:var(--text-sub); }
.empty-state .es-emoji { font-size:48px; margin-bottom:12px; }
.empty-state .es-text { font-size:14px; }

/* ============ 通用模块卡片 / 分段标签 / 徽章 ============ */
.seg-tabs { display:flex; gap:6px; padding:12px 14px 4px; }
.seg-tab { flex:1; text-align:center; padding:9px 0; border-radius:10px; font-size:14px; color:var(--text-sub); background:var(--card-bg); border:1px solid var(--border); cursor:pointer; transition:all .15s; }
.seg-tab.active { color:#fff; background:var(--primary); border-color:var(--primary); font-weight:600; }

.mod-card { background:var(--card-bg); border-radius:14px; margin:10px 14px; padding:14px 16px; box-shadow:0 1px 3px rgba(0,0,0,0.04); }
.mod-card .mc-title { font-size:16px; font-weight:600; color:var(--text-main); margin-bottom:6px; line-height:1.4; }
.mod-card .mc-desc { font-size:14px; color:var(--text-main); line-height:1.6; white-space:pre-wrap; word-break:break-word; }
.mod-card .mc-meta { font-size:12px; color:var(--text-sub); margin-top:8px; display:flex; flex-wrap:wrap; gap:10px; }
.mod-card .mc-del { color:#E5484D; cursor:pointer; }
.tag-pill { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; background:var(--primary-light); color:var(--primary); }
.tag-pill.gray { background:#EFEFF4; color:var(--text-sub); }
body.dark .tag-pill.gray { background:#2A2E36; }
.price-tag { color:#E5484D; font-weight:700; font-size:17px; }
.price-tag .cur { font-size:13px; }
.origin-price { color:var(--text-sub); font-size:12px; text-decoration:line-through; margin-left:6px; }
.status-badge { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; }
.status-badge.pending { background:#FFF3E0; color:#E08A00; }
.status-badge.doing { background:#E6F0FF; color:#2D6FE0; }
.status-badge.done { background:#E6F7EC; color:#1A9E54; }
.status-badge.sold { background:#EFEFF4; color:#8A8A8E; }
body.dark .status-badge.pending { background:#3A2E12; }
body.dark .status-badge.doing { background:#1E2A45; }
body.dark .status-badge.done { background:#143024; }
body.dark .status-badge.sold { background:#2A2E36; }
.contact-line { margin-top:8px; font-size:13px; color:var(--primary); background:var(--primary-light); padding:7px 10px; border-radius:8px; word-break:break-all; }

.img-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; margin-top:10px; }
.img-grid img { width:100%; aspect-ratio:1/1; object-fit:cover; border-radius:8px; background:#EFEFF4; }
body.dark .img-grid img { background:#2A2E36; }

.like-row { display:flex; align-items:center; gap:16px; margin-top:10px; padding-top:10px; border-top:1px solid var(--border); }
.like-btn, .cmt-btn { display:flex; align-items:center; gap:5px; font-size:13px; color:var(--text-sub); cursor:pointer; background:none; border:none; }
.like-btn .ic { font-size:16px; }
.like-btn.liked { color:#E5484D; }
.cmt-list { margin-top:10px; background:var(--bg); border-radius:10px; padding:8px 10px; }
.cmt-item { font-size:13px; color:var(--text-main); padding:4px 0; line-height:1.5; }
.cmt-item .nm { color:var(--primary); font-weight:600; margin-right:6px; }
.cmt-empty { font-size:12px; color:var(--text-sub); padding:4px 0; }

.fab { position:fixed; right:18px; bottom:calc(28px + var(--safe-bottom)); width:54px; height:54px; border-radius:50%; background:var(--primary); color:#fff; font-size:28px; line-height:54px; text-align:center; box-shadow:0 6px 18px rgba(0,0,0,0.25); z-index:120; cursor:pointer; border:none; }
.fab:active { transform:scale(0.94); }

.field { margin-bottom:12px; }
.field-label { font-size:13px; color:var(--text-sub); margin-bottom:6px; display:block; }
.field-input, .field-text, .field-sel { width:100%; box-sizing:border-box; border:1px solid var(--border); border-radius:10px; padding:11px 12px; font-size:15px; background:#fff; color:var(--text-main); font-family:inherit; }
.field-text { resize:vertical; min-height:84px; }
.field-sel { appearance:none; }
body.dark .field-input, body.dark .field-text, body.dark .field-sel { background:#262A33; }
.row-2 { display:flex; gap:10px; }
.row-2 .field { flex:1; }
.pick-row { display:flex; flex-wrap:wrap; gap:8px; }
.pick-chip { padding:7px 13px; border-radius:999px; font-size:13px; border:1px solid var(--border); background:#fff; color:var(--text-sub); cursor:pointer; }
.pick-chip.on { background:var(--primary); color:#fff; border-color:var(--primary); }
body.dark .pick-chip { background:#262A33; }
.img-pick { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.img-thumb { position:relative; width:64px; height:64px; border-radius:8px; overflow:hidden; }
.img-thumb img { width:100%; height:100%; object-fit:cover; }
.img-thumb .rm { position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; font-size:12px; line-height:18px; text-align:center; cursor:pointer; }
.img-add { width:64px; height:64px; border-radius:8px; border:1px dashed var(--border); color:var(--text-sub); font-size:26px; display:flex; align-items:center; justify-content:center; cursor:pointer; background:#fff; }
body.dark .img-add { background:#262A33; }

.my-group-title { font-size:13px; color:var(--text-sub); padding:14px 16px 4px; }
.my-row { background:var(--card-bg); margin:8px 14px; border-radius:12px; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; cursor:pointer; box-shadow:0 1px 3px rgba(0,0,0,0.04); }
.my-row .my-main { flex:1; min-width:0; }
.my-row .my-title { font-size:15px; color:var(--text-main); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.my-row .my-sub { font-size:12px; color:var(--text-sub); margin-top:3px; }
.my-row .my-del { color:#E5484D; font-size:13px; margin-left:12px; flex-shrink:0; }
.no-login-tip { text-align:center; padding:80px 20px; color:var(--text-sub); }
.modal-card.tall { max-height:90vh; overflow-y:auto; -webkit-overflow-scrolling:touch; }

