html { overflow-x: clip; width: 100%; min-height: 100%; }
/* 上丁圈子 · 钩子统一主题 v1
   设计规范：继承钩子 (hook-app) 的绿色风格
   ═══════════════════════════════════════════ */

:root {
  /* 主色调 */
  --green-50:  #e8f5e9;
  --green-100: #c8e6c9;
  --green-400: #66bb6a;
  --green-500: #07C160;  /* 微信绿，主色 */
  --green-600: #06ad54;
  --green-700: #1a8a4a;
  --green-800: #0d6333;

  /* 渐变 */
  --gradient-header: linear-gradient(135deg, #1a8a4a 0%, #07c160 50%, #1ad06d 100%);
  --gradient-btn:   linear-gradient(135deg, #07c160, #06ad54);

  /* 页面 */
  --bg-page:   #f0f2f5;
  --bg-card:   #ffffff;
  --bg-input:  #f5f6f8;

  /* 文字 */
  --text-primary:   #1a1a2e;
  --text-secondary: #666666;
  --text-muted:     #999999;
  --text-faint:     #b0b0b0;
  --text-light:     #ccc;

  /* 边框 */
  --border:  #e8ecf0;
  --border2: #eee;

  /* 阴影 */
  --shadow-sm: 0 1px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 12px rgba(7,193,96,0.3);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);

  /* 圆角 */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ═══ 全局重置 ═══ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  width: 100%;
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  padding-bottom: 70px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
  overscroll-behavior: none;
}

/* ═══ 顶栏 ═══ */
.topbar {
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 48px;
  background: var(--gradient-header);
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.topbar .back {
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  margin-right: 10px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar .title {
  font-size: 16px;
  font-weight: 500;
  flex: 1;
}

/* 左侧 LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-right: 8px;
}
.logo-icon {
  font-size: 20px;
  cursor: pointer;
  position: relative;
  color: #fff;
}
.logo-icon .city {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  font-style: normal;
}
.logo-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.logo-tag {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  margin-left: 1px;
}

/* 圈子滚动条 */
.forum-bar {
  flex: 1;
  margin: 0 8px;
  height: 28px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 0 12px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-width: 0;
}
.forum-bar .scroll {
  white-space: nowrap;
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  line-height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
/* 菜单按钮 */
.menu-btn {
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  position: relative;
  color: #fff;
  margin-left: 4px;
}
.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  min-width: 140px;
}
.menu-dropdown.show { display: block; }
.menu-dropdown a {
  display: block;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.15s;
}
.menu-dropdown a:last-child { border-bottom: none; }
.menu-dropdown a:hover { background: var(--green-50); }

/* 发帖按钮（顶栏右侧）*/
.post-btn {
  padding: 5px 14px;
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.post-btn:hover { background: rgba(255,255,255,0.35); }

/* ═══ 列表/卡片 ═══ */
.list { padding: 12px; transition: opacity .12s ease; }

.post {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.post:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }

.post .cat {
  display: inline-block;
  padding: 2px 10px;
  background: var(--green-50);
  border-radius: 10px;
  font-size: 11px;
  color: var(--green-500);
  margin-bottom: 6px;
  font-weight: 500;
}
.post .t {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
  word-break: break-all;
  overflow-wrap: break-word;
}
.post .m {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  max-width: 100%;
}
.post .f {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}

/* ═══ 底部操作栏 ═══ */
.btn-bar {
  position: fixed;
  bottom: 0;
  max-width: 100vw;
  width: 100%;
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-bar a {
  text-decoration: none;
  color: var(--green-500);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.btn-bar input {
  flex: 1;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 13px;
  outline: none;
  background: var(--bg-input);
  transition: border-color 0.2s;
}
.btn-bar input:focus { border-color: var(--green-500); }
.btn-bar input::placeholder { color: var(--text-faint); }

/* ═══ 空状态 ═══ */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ═══ 弹窗（覆盖层） ═══ */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.overlay.show { display: flex; }

.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.panel h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.panel input,
.panel select,
.panel textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 10px;
  outline: none;
  background: var(--bg-input);
  transition: border-color 0.2s;
}
.panel input:focus,
.panel select:focus,
.panel textarea:focus {
  border-color: var(--green-500);
}
.panel textarea { min-height: 90px; resize: vertical; }
.panel button {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  margin-right: 6px;
  font-weight: 500;
  transition: opacity 0.2s;
}
.panel button:active { opacity: 0.8; }
.panel input[type="file"] {
  padding: 6px 0;
  font-size: 12px;
  border: none;
  background: transparent;
}

/* ═══ 帖子详情页 ═══ */
.content { padding: 16px; }
.post-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}
.meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ═══ 评论区 ═══ */
.comment {
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}
.comment:last-child { border-bottom: none; }
.comment .author {
  font-size: 13px;
  color: var(--green-500);
  font-weight: 600;
}
.comment .time {
  font-size: 11px;
  color: var(--text-light);
  margin-left: 8px;
}
.comment .text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}
.comment-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 8px;
}

/* ═══ 回复栏 ═══ */
.reply-bar {
  position: fixed;
  bottom: 0;
  max-width: 100vw;
  width: 100%;
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.reply-bar input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 14px;
  outline: none;
  background: var(--bg-input);
}
.reply-bar input:focus { border-color: var(--green-500); }
.reply-bar input::placeholder { color: var(--text-faint); }
.reply-bar button {
  height: 38px;
  padding: 0 20px;
  background: var(--gradient-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-xl);
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.reply-bar button:active { opacity: 0.85; }

/* ═══ 加载状态 ═══ */
.loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

