:root {
  --bg: #F6F4EF;
  --card: #FFFFFF;
  --brand: #E08291;
  --brand-deep: #c96a7a;
  --brand-soft: #fbe9ec;
  --ink: #2A2625;
  --sub: #9A938E;
  --line: #ECE8E1;
  --green: #6fbf8b;
  --amber: #e6a955;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, 'PingFang SC', 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }

/* 页面容器 */
.page { padding: 0 16px 96px; }
.page-head { padding: 18px 4px 12px; }
.page-title { font-size: 22px; font-weight: 700; margin: 0; }
.page-sub { color: var(--sub); font-size: 13px; margin-top: 4px; }

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  gap: 10px; padding: 12px 16px; background: rgba(246,244,239,0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .t-title { font-weight: 700; font-size: 17px; flex: 1; }
.topbar .t-back { width: 32px; height: 32px; display:flex; align-items:center; justify-content:center; font-size: 20px; }

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  margin-bottom: 14px; border: 1px solid var(--line);
}
.card-h { font-weight: 700; font-size: 15px; margin: 0 0 12px; display:flex; align-items:center; justify-content:space-between; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; padding: 13px 18px; font-size: 15px; font-weight: 600;
  background: var(--brand); color: #fff; width: 100%; cursor: pointer;
}
.btn:active { opacity: .85; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--brand-soft); color: var(--brand-deep); }
.btn.line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 8px 14px; font-size: 13px; width: auto; border-radius: 10px; }
.btn.danger { background: #f6e3e3; color: #d06666; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display:block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.input, select, textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 16px; color: var(--ink); outline: none; font-family: inherit;
}
.input:focus, select:focus, textarea:focus { border-color: var(--brand); }
select { -webkit-appearance: menulist; appearance: menulist; min-height: 48px; }
textarea { resize: vertical; min-height: 72px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row2 { display: flex; gap: 10px; }
.row2 .field { flex: 1; }

/* 头像 */
.avatar {
  border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.avatar.sm { width: 38px; height: 38px; font-size: 14px; }
.avatar.md { width: 48px; height: 48px; font-size: 18px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

/* 列表行 */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .name { font-weight: 600; font-size: 15px; }
.list-item .desc { color: var(--sub); font-size: 12.5px; margin-top: 2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* 标签徽章 */
.tag { display:inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; background: var(--brand-soft); color: var(--brand-deep); }
.tag.green { background: #e4f3ea; color: #4f9c6c; }
.tag.amber { background: #f8edd9; color: #c0863a; }
.tag.gray { background: #f0ede7; color: #8a8378; }

/* 统计网格 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-box { background: var(--card); border-radius: var(--radius); padding: 16px; border: 1px solid var(--line); }
.stat-box .num { font-size: 26px; font-weight: 800; color: var(--brand-deep); }
.stat-box .lbl { font-size: 12.5px; color: var(--sub); margin-top: 2px; }

/* 底部Tab */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px;
  display: flex; background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 30;
}
.tab { flex: 1; display:flex; flex-direction:column; align-items:center; gap: 3px; padding: 9px 0 8px; color: #b3aca5; font-size: 11px; cursor:pointer; }
.tab .ic { font-size: 21px; line-height: 1; }
.tab.active { color: var(--brand-deep); font-weight: 600; }

/* 空状态 */
.empty { text-align:center; padding: 60px 20px; color: var(--sub); }
.empty .eic { font-size: 46px; margin-bottom: 10px; opacity:.6; }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display:flex; align-items:flex-end; justify-content:center; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; }
.sheet-h { font-size: 17px; font-weight: 700; margin-bottom: 16px; display:flex; justify-content:space-between; align-items:center; }
.sheet-h .x { color: var(--sub); font-size: 22px; }

/* 登录页 */
.login-wrap { min-height: 100vh; display:flex; flex-direction:column; justify-content:center; padding: 30px 26px 84px; }
.login-logo { width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 16px; background: var(--brand); display:flex; align-items:center; justify-content:center; color:#fff; font-size:40px; font-weight:800; }
.login-name { text-align:center; font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.login-en { text-align:center; color: var(--sub); font-size: 13px; letter-spacing: 3px; margin: 4px 0 36px; }
.login-card { background:#fff; border-radius: 20px; padding: 22px 18px; border:1px solid var(--line); }
.login-tip { text-align:center; color: var(--sub); font-size:12px; margin-top:16px; }

/* 角色切换条 */
.role-switch { display:flex; gap:8px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:6px; margin-bottom:14px; }
.role-switch .r { flex:1; text-align:center; padding:9px 4px; border-radius:10px; font-size:13px; color:var(--sub); }
.role-switch .r.on { background: var(--brand); color:#fff; font-weight:600; }

/* 风采 */
.post-img { width:100%; height:160px; border-radius:12px; background:linear-gradient(135deg,#f6d9de,#e9b9c1); margin-bottom:10px; display:flex;align-items:center;justify-content:center;font-size:40px; }
.heart { color: var(--brand); cursor:pointer; }

.muted { color: var(--sub); font-size: 12.5px; }
.flex { display:flex; align-items:center; gap:8px; }
.between { justify-content:space-between; }
.mt8{margin-top:8px;} .mt12{margin-top:12px;} .mt16{margin-top:16px;}

/* 网站底部备案信息（登录页/首页显示，已登录主界面由底部Tab覆盖） */
.site-footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; box-sizing: border-box;
  text-align: center; padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  font-size: 11px; color: #a9a29b; line-height: 1.7;
  background: rgba(246,244,239,0.96); border-top: 1px solid var(--line);
  z-index: 25;
}
.site-footer span { display: block; }
.site-footer a { color: #a9a29b; text-decoration: none; }
