/* ============================================================
   森林徒步 · 户外社群官网样式
   配色: 森林绿 #2E7D4F / 深林绿 #1D5C3A / 暖沙 #F7F3EA / 炭灰 #26322B
   移动优先, 桌面端自动扩展
   ============================================================ */

:root {
  --green: #2E7D4F;
  --green-dark: #1D5C3A;
  --green-light: #E8F2EB;
  --accent: #E8833A;
  --accent-dark: #C96A22;
  --sand: #F7F3EA;
  --card: #FFFFFF;
  --ink: #26322B;
  --ink-2: #5C6B62;
  --ink-3: #93A098;
  --line: #E7E0D2;
  --danger: #C0392B;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(38, 50, 43, .07);
  --shadow-lg: 0 8px 28px rgba(38, 50, 43, .14);
  --topbar-h: 60px;
  --tabbar-h: 58px;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 确保 hidden 属性总是隐藏元素（防止 display:flex 等覆盖） */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--ink); }
::placeholder { color: var(--ink-3); }

/* ---------- 顶部导航（桌面） ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--topbar-h);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  box-shadow: 0 2px 12px rgba(29, 92, 58, .25);
  display: none;
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 28px; padding: 0 24px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.logo-img { height: 32px; width: auto; border-radius: 8px; background: #fff; padding: 2px 6px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.logo-name { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.logo-sub { font-size: 12px; opacity: .8; margin-left: 2px; }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a {
  padding: 8px 16px; border-radius: 999px; font-size: 15px;
  transition: background .2s;
}
.topnav a:hover, .topnav a.active { background: rgba(255,255,255,.16); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn-user {
  padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.18);
  color: #fff; font-size: 14px; transition: background .2s;
}
.btn-user:hover { background: rgba(255,255,255,.3); }
.btn-user.solid { background: var(--accent); font-weight: 600; }
.btn-user.solid:hover { background: var(--accent-dark); }
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* ---------- 主容器 ---------- */
.app {
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
}
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.page-margin-top { padding-top: calc(var(--topbar-h) + 18px); }

/* ---------- 英雄区 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(232,131,58,.35) 0%, transparent 55%),
    linear-gradient(160deg, #1D5C3A 0%, #2E7D4F 55%, #3E8E5F 100%);
  color: #fff; padding: 64px 20px 54px;
}
.hero::after {
  content: ''; position: absolute; inset: auto -20% -2px -20%; height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath d='M0 120 L0 60 Q 180 10 360 55 T 720 50 T 1080 60 T 1440 40 L 1440 120 Z' fill='%23F7F3EA'/%3E%3C/svg%3E") no-repeat bottom / cover;
  pointer-events: none;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 5px 14px; border-radius: 999px; font-size: 13px; backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: 34px; font-weight: 900; letter-spacing: 2px; margin: 16px 0 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.hero p.desc { font-size: 15px; opacity: .92; max-width: 560px; }
.hero-stats { display: flex; gap: 26px; margin-top: 26px; }
.hero-stats .num { font-size: 22px; font-weight: 800; }
.hero-stats .lbl { font-size: 12.5px; opacity: .8; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 15px; font-weight: 700;
  transition: transform .15s, box-shadow .2s, background .2s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(232,131,58,.4); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.28); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(46,125,79,.35); }
.btn-green:hover { background: var(--green-dark); }
.btn-outline { border: 1.5px solid var(--green); color: var(--green); background: #fff; }
.btn-outline:hover { background: var(--green-light); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 16px; font-size: 13.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 区块标题 ---------- */
.section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.section-title::before {
  content: ''; width: 5px; height: 20px; border-radius: 3px;
  background: linear-gradient(var(--green), var(--accent));
}
.section-more { font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 3px; }
.section-more:hover { color: var(--green); }

/* ---------- 公司实力数据条 ---------- */
.highlights-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.highlight-card {
  background: linear-gradient(150deg, var(--green-dark), var(--green));
  color: #fff; border-radius: var(--radius); padding: 20px 14px; text-align: center;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.highlight-card::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.hl-num { font-size: 26px; font-weight: 900; letter-spacing: 1px; }
.hl-label { font-size: 12.5px; opacity: .88; margin-top: 4px; }

/* ---------- 产品卡片 ---------- */
.products-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); border-top: 3px solid var(--green);
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-name { font-size: 17px; font-weight: 800; }
.pc-tag {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff;
}
.pc-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; margin-top: 8px; }
.pc-kws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- 活动卡片 ---------- */
.activity-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s; position: relative;
}
.activity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cover { position: relative; height: 150px; overflow: hidden; }
.cover .cover-img { width: 100%; height: 100%; object-fit: cover; }
.cover-badge {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.42); backdrop-filter: blur(4px);
}
.cover-badge.hot { background: var(--accent); }
.cover .date-chip {
  position: absolute; right: 10px; bottom: -14px;
  background: var(--green); color: #fff; padding: 6px 12px;
  border-radius: 10px; font-size: 12px; font-weight: 700;
  box-shadow: 0 3px 8px rgba(29,92,58,.35); display: flex; flex-direction: column; align-items: center; line-height: 1.25;
}
.date-chip .d { font-size: 17px; }
.card-body { padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 15.5px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--green-light); color: var(--green-dark); font-size: 12px; font-weight: 600; }
.tag.diff-进阶 { background: #FDEBDD; color: var(--accent-dark); }
.tag.diff-挑战 { background: #FBE3E0; color: var(--danger); }
.tag.diff-入门 { background: var(--green-light); color: var(--green-dark); }
.tag.free { background: #FFF4E0; color: #B7791F; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.card-foot .price { font-size: 16px; font-weight: 800; color: var(--accent); }
.card-foot .price.free { color: var(--green); }
.card-foot .price small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.seats { font-size: 12px; color: var(--ink-2); }
.seats b { color: var(--accent-dark); }

.activities-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.activities-list { display: flex; flex-direction: column; gap: 12px; }
.activity-row {
  background: var(--card); border-radius: var(--radius-sm); padding: 13px;
  display: flex; gap: 13px; box-shadow: var(--shadow); align-items: center;
  transition: transform .15s;
}
.activity-row:active { transform: scale(.99); }
.activity-row .row-cover { width: 74px; height: 74px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.activity-row .row-cover .cover-img { width: 100%; height: 100%; object-fit: cover; }
.activity-row .row-main { flex: 1; min-width: 0; }
.activity-row .row-title { font-size: 14.5px; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row .row-meta { font-size: 12px; color: var(--ink-2); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.activity-row .row-right { text-align: right; flex-shrink: 0; }

/* ---------- 滤镜栏 ---------- */
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 7px 16px; border-radius: 999px; font-size: 13.5px;
  background: var(--card); color: var(--ink-2); border: 1px solid var(--line);
  transition: all .2s;
}
.filter-chip.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

/* ---------- 帖子卡片 ---------- */
.post-card {
  display: block; background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px; transition: transform .15s;
}
.post-card:active { transform: scale(.995); }
.post-author { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-light); font-weight: 800; font-size: 15px; color: var(--green-dark);
  overflow: hidden; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author .who { font-size: 14px; font-weight: 600; line-height: 1.3; }
.post-author .when { font-size: 12px; color: var(--ink-3); }
.post-author .cat {
  margin-left: auto; padding: 3px 10px; border-radius: 999px;
  background: var(--green-light); color: var(--green-dark); font-size: 12px; font-weight: 600;
}
.post-title { font-size: 16px; font-weight: 700; margin: 12px 0 6px; line-height: 1.45; }
.pin-badge {
  display: inline-block; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 2px;
}
.post-excerpt { font-size: 14px; color: var(--ink-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-actions { display: flex; gap: 18px; margin-top: 12px; color: var(--ink-3); font-size: 13px; }
.post-actions span { display: flex; align-items: center; gap: 5px; }
.post-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.post-actions .liked { color: var(--accent); }
.post-actions .liked svg { fill: var(--accent); stroke: var(--accent); }

/* ---------- 活动详情 ---------- */
.detail-hero { position: relative; border-radius: 0 0 26px 26px; overflow: hidden; }
.detail-hero .cover { height: 230px; }
.detail-hero .back-btn {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.35);
  color: #fff; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); font-size: 18px;
}
.detail-hero .hero-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff;
}
.detail-hero .hero-title h2 { font-size: 20px; font-weight: 800; line-height: 1.4; }
.detail-hero .hero-title .meta { font-size: 12.5px; opacity: .9; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }

.detail-card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin-top: 14px;
}
.detail-card h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.detail-card h3::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--green); }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-item { background: var(--sand); border-radius: 10px; padding: 11px; }
.info-item .k { font-size: 12px; color: var(--ink-3); }
.info-item .v { font-size: 14.5px; font-weight: 700; margin-top: 2px; }
.info-item .v.orange { color: var(--accent); }

.detail-text { font-size: 14.5px; color: var(--ink-2); line-height: 1.8; white-space: pre-line; }
/* 合照口号 */
.cheers-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.cheer-card {
  flex: 1 1 calc(50% - 10px); min-width: 130px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 12px;
  text-align: center; font-size: 15px; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow); line-height: 1.5; transition: all .2s;
}
.cheer-card:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }
@media (max-width: 480px) {
  .cheer-card { flex: 1 1 100%; }
}
/* 常见问题（FAQ） */
.faq-list { padding: 4px 16px 12px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  cursor: pointer; font-size: 14.5px; font-weight: 700; color: var(--ink);
  padding: 13px 0; list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '＋'; color: var(--green); font-weight: 800; transition: transform .2s; }
.faq-item[open] summary::after { content: '－'; }
.faq-item .faq-a { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; padding: 0 0 14px; }

/* 报名面板 */
.signup-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--card); border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0,0,0,.12); display: none;
}
body.has-signup .signup-panel { display: block; }
body.has-signup .app { padding-bottom: calc(var(--tabbar-h) + 110px + env(safe-area-inset-bottom)); }
.signup-row { display: flex; align-items: center; gap: 12px; }
.signup-row .left { flex: 1; }
.signup-row .price { font-size: 20px; font-weight: 800; color: var(--accent); }
.signup-row .price small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.signup-row .seats { font-size: 12px; color: var(--ink-2); }

/* ---------- 帖子详情 ---------- */
.post-detail { padding-top: 14px; }
.pd-head {
  background: var(--card); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow);
}
.pd-title { font-size: 19px; font-weight: 800; line-height: 1.45; margin-top: 14px; }
.pd-content {
  font-size: 15px; line-height: 1.85; color: #33403A; margin-top: 12px; word-break: break-word;
}
.pd-content p { margin: 0 0 10px; }
.pd-content h4 { font-size: 16px; font-weight: 800; margin: 16px 0 8px; color: var(--ink); }
.pd-content ul { margin: 0 0 10px; padding-left: 20px; }
.pd-content li { margin-bottom: 4px; }
.pd-content img.pd-img { max-width: 100%; border-radius: 10px; margin: 8px 0; display: block; }
.pd-content code { background: var(--sand); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 13px; }
.pd-content a { color: var(--green); font-weight: 600; word-break: break-all; }
.pd-actions { display: flex; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pd-report { margin-top: 10px; text-align: right; font-size: 12px; color: var(--ink-3); }
.pd-report a { color: var(--danger); margin-left: 4px; font-weight: 600; }
.like-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: 999px; border: 1.5px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all .2s;
}
.like-btn.liked { background: #FDEEE2; border-color: var(--accent); color: var(--accent); }
.like-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.like-btn.liked svg { fill: var(--accent); stroke: var(--accent); }

.comment-box { margin-top: 14px; background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.comment-box textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  resize: none; min-height: 74px; outline: none; transition: border .2s; background: var(--sand);
}
.comment-box textarea:focus { border-color: var(--green); background: #fff; }
.comment-box .send-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.comment-box .tip { font-size: 12.5px; color: var(--ink-3); }

.comment-item { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-item .body { flex: 1; min-width: 0; }
.comment-item .c-who { display: flex; align-items: baseline; gap: 8px; }
.comment-item .c-name { font-size: 13.5px; font-weight: 600; }
.comment-item .c-time { font-size: 11.5px; color: var(--ink-3); }
.comment-item .c-text { font-size: 14px; color: #33403A; margin-top: 3px; line-height: 1.6; }
.c-actions { display: flex; gap: 14px; margin-top: 7px; }
.c-act {
  font-size: 12.5px; color: var(--ink-3); cursor: pointer; user-select: none;
  padding: 2px 10px; border-radius: 999px; background: var(--sand); line-height: 1.7;
}
.c-act:active { transform: scale(.96); }
.c-act.on { color: var(--accent-dark); background: #FDEBDD; font-weight: 700; }
.c-replies {
  margin-top: 10px; margin-left: 4px; padding-left: 12px;
  border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px;
}
.c-reply { display: flex; gap: 8px; align-items: flex-start; }
.c-reply .c-name { font-size: 12.5px; }
.c-reply .c-text { font-size: 13px; }
.c-reply .c-actions { margin-top: 4px; }
.c-reply-box { margin-top: 10px; }
.c-reply-box textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-size: 13px; font-family: inherit; resize: none; min-height: 52px; box-sizing: border-box; outline: none;
}
.c-reply-box textarea:focus { border-color: var(--green); background: #fff; }

/* ---------- 表单页 ---------- */
.form-page { padding-top: 20px; max-width: 460px; margin: 0 auto; }
.form-card { background: var(--card); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow); }
.form-title { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.form-sub { font-size: 13px; color: var(--ink-3); text-align: center; margin-bottom: 20px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 13px; outline: none; transition: border .2s, box-shadow .2s; background: #FDFCF9;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,125,79,.12);
}
.field textarea { resize: vertical; min-height: 140px; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
/* 发帖编辑器工具栏 */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.et-btn {
  padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 8px;
  background: #FDFCF9; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .2s;
}
.et-btn:hover { border-color: var(--green); color: var(--green); background: #fff; }
.upload-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.up-item {
  display: flex; align-items: center; gap: 8px; max-width: 100%;
  background: var(--sand); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px;
}
.up-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.up-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.up-state { color: var(--ink-3); }
.up-state.err { color: var(--danger); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px;
  border: 1.5px solid var(--line); color: var(--ink-2); transition: all .2s;
}
.chip.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.form-foot { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 16px; }
.form-foot a { color: var(--green); font-weight: 700; }

/* ---------- 个人中心 ---------- */
.profile-head {
  background: linear-gradient(150deg, var(--green-dark), var(--green));
  color: #fff; border-radius: 0 0 26px 26px; padding: 34px 20px 30px; position: relative;
}
.profile-head .inner { display: flex; align-items: center; gap: 16px; }
.profile-head .avatar { width: 62px; height: 62px; border-width: 3px; font-size: 24px; }
.profile-head .nick { font-size: 20px; font-weight: 800; }
.profile-head .uname { font-size: 13px; opacity: .8; margin-top: 2px; }
.profile-head .bio { font-size: 13px; opacity: .85; margin-top: 6px; }
.profile-stats { display: flex; gap: 0; margin: 18px -4px 0; }
.profile-stats .ps { flex: 1; text-align: center; background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 4px; margin: 0 4px; }
.profile-stats .ps b { font-size: 18px; display: block; }
.profile-stats .ps span { font-size: 12px; opacity: .85; }
.menu-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 16px; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 500; transition: background .15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--green-light); }
.menu-item .m-icon {
  width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--green-light); color: var(--green-dark); flex-shrink: 0;
}
.menu-item .m-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.menu-item .m-arrow { margin-left: auto; color: var(--ink-3); font-size: 16px; }
.menu-item .m-badge { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .m-icon { background: #FBE3E0; color: var(--danger); }

/* ---------- 我的帖子列表 ---------- */
.my-post-row {
  background: var(--card); border-radius: var(--radius-sm); padding: 13px 15px;
  box-shadow: var(--shadow); margin-bottom: 10px; display: flex; gap: 12px; align-items: center;
}
.my-post-row .mp-main { flex: 1; min-width: 0; }
.my-post-row .mp-title { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-post-row .mp-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 12px; }
.my-post-row .mp-cat { flex-shrink: 0; font-size: 12px; color: var(--green-dark); background: var(--green-light); padding: 3px 9px; border-radius: 999px; }

/* ---------- 关于我们 ---------- */
.about-hero {
  background: linear-gradient(160deg, #1D5C3A, #2E7D4F); color: #fff;
  padding: 40px 20px 46px; border-radius: 0 0 26px 26px; text-align: center;
}
.about-logo {
  height: 76px; width: auto; margin: 0 auto 14px; display: block;
  background: rgba(255,255,255,.96); padding: 10px 18px; border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.about-hero .company { font-size: 13px; opacity: .85; letter-spacing: 2px; }
.about-hero h2 { font-size: 26px; font-weight: 900; margin: 8px 0 8px; letter-spacing: 1px; }
.about-hero p { font-size: 14px; opacity: .9; max-width: 560px; margin: 0 auto; }
.principles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.principle { background: var(--card); border-radius: var(--radius); padding: 18px 14px; text-align: center; box-shadow: var(--shadow); }
.principle .p-icon { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; background: var(--green-light); color: var(--green-dark); display: flex; align-items: center; justify-content: center; }
.principle .p-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.principle h4 { font-size: 14.5px; font-weight: 700; }
.principle p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.5; }

.contact-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border: none; }
.contact-row .c-ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--green-light);
  color: var(--green-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-row .c-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.contact-row .c-lbl { font-size: 12px; color: var(--ink-3); }
.contact-row .c-val { font-size: 14.5px; font-weight: 600; }

/* ---------- 小程序联动 ---------- */
.mp-card {
  background: linear-gradient(140deg, #1D5C3A, #2E7D4F); color: #fff;
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.mp-card::after {
  content: '小程序'; position: absolute; right: -18px; top: -24px; font-size: 84px;
  font-weight: 900; opacity: .07; transform: rotate(-12deg); pointer-events: none;
}
.mp-card h3 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.mp-card .mp-desc { font-size: 13px; opacity: .9; margin: 8px 0 12px; }
.mp-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-size: 12.5px; }
.mp-feats li { list-style: none; display: flex; align-items: center; gap: 6px; opacity: .92; }
.mp-feats svg { width: 14px; height: 14px; flex-shrink: 0; }
.mp-cta { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* 弹层 */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(20, 30, 24, .55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(3px); animation: fadeIn .2s;
}
.modal {
  background: var(--card); border-radius: 18px; width: 100%; max-width: 340px;
  padding: 22px; text-align: center; animation: popIn .25s; box-shadow: var(--shadow-lg);
  max-height: 84vh; overflow-y: auto;
}
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.modal .m-desc { font-size: 13px; color: var(--ink-2); margin-bottom: 14px; line-height: 1.6; }
.modal-close { margin-top: 16px; }
.qr-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 0 auto 12px; width: 200px; }
.qr-wrap img { width: 100%; }
.qr-tip { font-size: 12.5px; color: var(--ink-2); background: var(--sand); border-radius: 10px; padding: 10px; text-align: left; line-height: 1.65; }

/* ---------- 管理后台 ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.admin-head h2 { font-size: 20px; font-weight: 800; }
.admin-sub { font-size: 12.5px; color: var(--ink-3); }
.admin-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.as-card {
  background: var(--card); border-radius: 12px; padding: 14px 8px; text-align: center;
  box-shadow: var(--shadow);
}
.as-card b { display: block; font-size: 22px; font-weight: 800; color: var(--green); }
.as-card span { font-size: 12px; color: var(--ink-2); }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.admin-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.admin-card-head h3 { font-size: 15.5px; font-weight: 800; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.admin-table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.cell-title { font-weight: 600; min-width: 180px; }
.cell-sub { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.cell-ops { white-space: nowrap; text-align: right; }
.btn-del { background: #FBE3E0; color: var(--danger); font-weight: 600; }
.btn-del:hover { background: var(--danger); color: #fff; }
.admin-form { text-align: left; margin-top: 8px; }
.admin-form .field { margin-bottom: 10px; }
.admin-form .field input, .admin-form .field select, .admin-form .field textarea {
  background: #FDFCF9; font-size: 13.5px; padding: 9px 11px;
}
.admin-form .field textarea { min-height: 90px; }
.af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.af-row.t3 { grid-template-columns: 1fr 1fr 1fr; }
.config-list { font-size: 13.5px; }
.config-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.config-row:last-child { border-bottom: none; }
.config-row span { color: var(--ink-3); }
.config-row b { font-weight: 600; text-align: right; word-break: break-all; }

/* 站点配置编辑表单 */
.config-form h4 { font-size: 14px; font-weight: 800; margin: 14px 0 10px; color: var(--green-dark); }
.config-form .field input, .config-form .field textarea {
  background: #FDFCF9; font-size: 13.5px; padding: 9px 11px;
}
.config-form .field textarea { min-height: 70px; }
.cf-item {
  background: var(--sand); border-radius: 10px; padding: 10px; margin-bottom: 10px;
}
.cf-item .af-row { grid-template-columns: 1fr 1fr; }

/* 同步面板 */
.sync-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.sync-info { background: var(--sand); border-radius: 10px; padding: 10px 12px; }
.sync-info span { display: block; font-size: 12px; color: var(--ink-3); }
.sync-info b { display: block; font-size: 13.5px; margin-top: 2px; word-break: break-all; }
.sync-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sync-log { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; }
.sync-log-row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.sync-log-row:last-child { border-bottom: none; }
.sync-log-row .sl-time { flex-shrink: 0; font-size: 12px; color: var(--ink-3); }
.sync-log-row .sl-type { flex-shrink: 0; }
.sync-log-row .sl-msg { word-break: break-all; }
.sync-log-row.error .sl-msg { color: var(--danger); }
@media (min-width: 860px) {
  .admin-stats { grid-template-columns: repeat(5, 1fr); }
}

/* 微信扫码登录 */
.wxqr-wrap {
  width: 280px; margin: 6px auto 12px; border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; background: #fff; overflow: hidden;
}
.wxqr-wrap iframe { display: block; }
.login-alt { margin-top: 14px; text-align: left; }
.login-alt summary {
  text-align: center; font-size: 13px; color: var(--ink-2); cursor: pointer;
  padding: 8px; user-select: none;
}
.login-alt summary:hover { color: var(--green); }
.sms-login { text-align: left; }

/* ---------- 底部 Tab（移动） ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--ink-3); transition: color .2s;
}
.tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tabbar a.active { color: var(--green); font-weight: 700; }
.tabbar a.active svg { stroke-width: 2.1; }
.tabbar a .tab-dot {
  position: absolute; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- 通用 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty .e-ico { font-size: 42px; margin-bottom: 10px; }
.empty p { font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 30px); transform: translateX(-50%) translateY(20px);
  background: rgba(30, 40, 34, .92); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 13.5px; z-index: 300; opacity: 0; pointer-events: none;
  transition: all .25s; max-width: 86vw; text-align: center; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.skeleton { background: linear-gradient(90deg, #eee 25%, #f7f7f7 37%, #eee 63%); background-size: 400% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* 覆盖封面（无真实图片时用渐变+山峰SVG） */
.cover-img.cover-grad {
  display: flex; align-items: flex-end; justify-content: flex-start; padding: 10px;
}
.cover-grad svg.mountain { width: 100%; height: 100%; }

/* ---------- 页脚（备案号 / 举报入口，合规） ---------- */
.site-footer {
  background: #1D5C3A; color: rgba(255,255,255,.72); text-align: center;
  padding: 16px 14px calc(16px + var(--tabbar-h) + env(safe-area-inset-bottom));
  font-size: 12px; line-height: 1.8; margin-top: 10px;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer .footer-links a:hover { opacity: .85; }
.site-footer .dot { margin: 0 8px; opacity: .5; }
.site-footer .footer-copy { opacity: .6; }

/* ---------- 举报页 / 举报弹层 ---------- */
.report-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.report-cats .chip {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2);
  padding: 7px 13px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.report-cats .chip.active { border-color: var(--green); background: var(--green); color: #fff; font-weight: 600; }
.report-note { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.7; }

/* ============================================================
   响应式: 桌面端
   ============================================================ */
@media (min-width: 860px) {
  body { font-size: 15.5px; }
  .topbar { display: block; }
  .app { padding-top: var(--topbar-h); padding-bottom: 40px; }
  .tabbar { display: none; }
  .site-footer { padding-bottom: 22px; }
  .page-margin-top { padding-top: 0; }
  .hero { padding: 88px 32px 78px; }
  .hero h1 { font-size: 46px; }
  .hero p.desc { font-size: 16.5px; }
  .hero-stats .num { font-size: 28px; }
  .hero-stats .lbl { font-size: 13.5px; }
  .section-title { font-size: 21px; }

  .activities-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .activities-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .activity-row { flex-direction: column; align-items: stretch; text-align: left; }
  .activity-row .row-cover { width: 100%; height: 140px; }
  .activity-row .row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .activity-row .row-right { text-align: left; margin-top: 8px; }

  .principles-grid { grid-template-columns: repeat(4, 1fr); }
  .highlights-grid { grid-template-columns: repeat(4, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .detail-hero .cover { height: 320px; }
  .detail-hero .hero-title h2 { font-size: 28px; }
  .detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
  .detail-layout .side { position: sticky; top: calc(var(--topbar-h) + 18px); }
  .signup-panel { position: static; display: block; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 14px; padding: 16px; }
  body.has-signup .app { padding-bottom: 40px; }
  .toast { bottom: 40px; }
  .form-page { padding-top: 40px; }
  .profile-head { border-radius: 26px; margin-top: 24px; }
  .mp-feats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 859px) {
  .page { padding: 0 14px; }
}
