/* ============================================================
   校园万能墙 - 全局样式
   设计主题：校园墙 / 便利贴墙
   墙面暖纸背景，帖子是「贴」在墙上的纸条，带胶带与图钉细节。
   主色：粉笔青（校园蓝绿）  点赞：粉笔粉  匿名：粉笔黄
   ============================================================ */

:root {
  /* 墙面与纸 */
  --wall: #f3efe6;            /* 墙面暖纸底 */
  --wall-deep: #ece6d8;       /* 墙面深一档（顶部/底部） */
  --paper: #fffdf7;           /* 便利贴纸白 */
  --paper-warm: #fff8e6;      /* 暖黄便利贴 */
  --paper-pink: #ffeef1;      /* 粉便利贴 */
  --paper-mint: #e9f7f2;      /* 薄荷便利贴 */

  /* 粉笔色 */
  --chalk-teal: #0e9f8f;      /* 主强调：粉笔青 */
  --chalk-teal-dark: #0b7f73;
  --chalk-teal-soft: #e0f2ef;
  --chalk-pink: #e85d75;      /* 点赞/互动：粉笔粉 */
  --chalk-pink-soft: #fdeef1;
  --chalk-yellow: #f0a500;    /* 匿名/警示：粉笔黄 */
  --chalk-yellow-soft: #fdf3dd;
  --chalk-red: #d64545;       /* 危险/删除 */
  --chalk-red-soft: #fdecec;
  --chalk-green: #2f9e6e;     /* 成功 */
  --chalk-green-soft: #e6f5ee;

  /* 墨色文字 */
  --ink: #2d2a26;
  --ink-2: #5c574f;
  --ink-3: #8a8478;

  --line: #e6dfd0;            /* 分隔线 */
  --radius: 14px;
  /* 分层透明阴影：1px 描边环 + 微抬升 + 环境深度 */
  --shadow:
    0 0 0 1px rgba(80, 70, 50, 0.05),
    0 1px 2px -1px rgba(80, 70, 50, 0.06),
    0 3px 10px rgba(80, 70, 50, 0.08);
  --shadow-lift:
    0 0 0 1px rgba(80, 70, 50, 0.06),
    0 2px 4px -1px rgba(80, 70, 50, 0.08),
    0 10px 24px rgba(80, 70, 50, 0.14);
  --nav-h: 58px;
  --header-h: 54px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--wall);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* 文字换行：标题均衡、正文避免孤行 */
h1, h2, h3, .app-title, .section-title, .stat-label, .profile-name {
  text-wrap: balance;
}
p, li, .post-content, .comment-text, .notify-content, .todo-meta,
.review-content, .doc-card p, .waiting-text, .banned-text, .auth-sub {
  text-wrap: pretty;
}

/* 数字跳动：动态数字等宽，避免布局抖动 */
.like-count, .comment-count, .stat-num, .pay-amount,
#comment-total, #likers-total, .badge, .char-count {
  font-variant-numeric: tabular-nums;
}

/* 墙面纹理：细密噪点 + 顶部/底部深一档，营造「墙」的层次 */
.app-body {
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.5), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(180,160,120,0.12), transparent 46%),
    var(--wall);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

a { color: var(--chalk-teal); text-decoration: none; }
img, video { max-width: 100%; display: block; }
/* 图片描边：纯黑低透明度，避免边缘脏感 */
img {
  outline: 1px solid oklch(0 0 0 / 0.08);
  outline-offset: -1px;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; }

/* 品牌手写字（便利贴手写感） */
.brand-font, .app-title, .auth-brand h1, .waiting-card h1, .banned-card h1 {
  font-family: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", cursive;
  letter-spacing: 0.02em;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--chalk-teal); color: #fff; box-shadow: 0 2px 8px rgba(14,159,143,0.3); }
.btn-primary:hover { background: var(--chalk-teal-dark); }
.btn-danger { background: var(--chalk-red); color: #fff; }
.btn-danger:hover { background: #b93a3a; }
.btn-ghost { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--chalk-teal); color: var(--chalk-teal); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 14px; border-radius: 8px; }

/* ---------- 认证页（登录/注册/等待/封禁） ---------- */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.55), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(180,160,120,0.14), transparent 45%),
    var(--wall);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  padding: 32px 28px;
  position: relative;
  border: 1px solid rgba(230,223,208,0.6);
}
/* 卡片顶部一条「胶带」 */
.auth-card::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 120px; height: 26px;
  background: rgba(240,165,0,0.55);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-logo {
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--chalk-teal), #12b3a0);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(14,159,143,0.35);
  transform: rotate(-4deg);
}
.auth-brand h1 { font-size: 26px; color: var(--ink); }
.auth-sub { color: var(--ink-3); font-size: 13px; margin-top: 6px; }

/* ---------- 表单 ---------- */
.form .field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus { border-color: var(--chalk-teal); box-shadow: 0 0 0 3px rgba(14,159,143,0.12); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row .btn { white-space: nowrap; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.agree-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-height: 44px;
  padding: 4px 10px;
  margin: -4px -10px;
  border-radius: 10px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.checkbox:active { background: rgba(14,159,143,0.06); }
/* 自定义可见方框：appearance:none + 勾号 SVG */
.checkbox input {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin: 0;
  border: 2px solid rgba(80,70,50,0.28);
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.checkbox input:checked {
  background: var(--chalk-teal)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5 6.5 12 13 4'/%3E%3C/svg%3E")
    center / 13px 13px no-repeat;
  border-color: var(--chalk-teal);
}
.form-error { color: var(--chalk-red); font-size: 13px; min-height: 20px; margin-top: 10px; text-align: center; }
.email-display {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--paper-warm);
  color: var(--ink);
  font-size: 14px;
  word-break: break-all;
}
.back-login {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-3);
  text-decoration: none;
}
.back-login:hover { color: var(--chalk-teal); }

/* ---------- 等待开通页 ---------- */
.waiting-card { text-align: center; }
.waiting-icon { font-size: 52px; margin-bottom: 12px; display: inline-block; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.waiting-card h1 { font-size: 26px; margin-bottom: 8px; }
.waiting-text { color: var(--ink-2); margin-bottom: 20px; }
.waiting-text strong { color: var(--chalk-red); }
.pay-box {
  background: var(--paper-warm);
  border: 1px dashed var(--chalk-yellow);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.pay-amount { font-size: 34px; font-weight: 700; color: var(--chalk-teal); margin-bottom: 12px; }
.pay-qr { width: 160px; height: 160px; margin: 0 auto 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.pay-contact { font-size: 14px; color: var(--ink-2); }
/* 免费开通名额提示 */
.free-box {
  background: var(--paper-warm);
  border: 1px dashed var(--chalk-teal);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.free-icon { font-size: 40px; margin-bottom: 10px; }
.free-text { color: var(--ink-2); font-size: 15px; line-height: 1.7; }

/* ---------- 封禁页 ---------- */
.banned-card { text-align: center; }
.banned-icon { font-size: 52px; margin-bottom: 12px; }
.banned-card h1 { font-size: 26px; margin-bottom: 8px; }
.banned-text { color: var(--ink-2); margin-bottom: 8px; }

/* ---------- 文档页（协议/隐私） ---------- */
.doc-body { display: flex; justify-content: center; padding: calc(var(--header-h) + 32px) 20px; }
.doc-card {
  width: 100%; max-width: 640px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid rgba(230,223,208,0.6);
  overflow-wrap: break-word;
  word-break: break-word;
}
.doc-card h1 { font-size: 24px; margin-bottom: 16px; font-family: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", cursive; }
.doc-card h2 { font-size: 17px; margin: 18px 0 8px; color: var(--chalk-teal-dark); }
.doc-card p { color: var(--ink-2); margin-bottom: 10px; }
.doc-back { margin-top: 20px; }

/* ---------- 应用主框架 ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(243,239,230,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.app-title { font-size: 22px; font-weight: 700; flex: 1; color: var(--ink); }
.back-btn, .back-link {
  font-size: 26px;
  color: var(--ink-2);
  line-height: 1;
  padding: 4px 8px 4px 2px; /* 箭头光学居中：左侧少一点 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  transition: background 0.15s, transform 0.08s;
}
.back-btn:active, .back-link:active { transform: scale(0.96); }
.back-btn:hover, .back-link:hover { background: rgba(230,223,208,0.5); }
.header-right { display: flex; gap: 8px; }
.header-tabs { display: flex; gap: 4px; background: rgba(230,223,208,0.5); padding: 3px; border-radius: 21px; }
.tab-btn {
  padding: 5px 16px;
  border-radius: 18px;
  font-size: 14px;
  color: var(--ink-2);
  background: transparent;
  transition: background 0.15s, color 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn:active { transform: scale(0.96); }
.tab-btn.active { background: var(--paper); color: var(--chalk-teal); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.admin-entry {
  font-size: 13px;
  color: var(--chalk-teal);
  background: var(--chalk-teal-soft);
  padding: 5px 12px;
  border-radius: 14px;
  font-weight: 600;
  transition: background 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.admin-entry:active { transform: scale(0.96); }

/* ---------- 底部导航（像墙脚的一排图钉） ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,253,247,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 30;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-3);
  font-size: 11px;
  transition: color 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:active { transform: scale(0.96); }
.nav-item.active { color: var(--chalk-teal); }
.nav-icon {
  font-size: 22px;
  line-height: 1;
  /* emoji 光学居中：视觉重心略偏上，微调下移 */
  transform: translateY(1px);
}

/* ---------- 帖子卡片（便利贴） ---------- */
.feed { max-width: 640px; margin: 0 auto; padding: calc(var(--header-h) + 16px) 12px 24px; }
.post-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
  margin-bottom: 16px;
  position: relative;
  border: 1px solid rgba(230,223,208,0.5);
  transition: transform 0.18s, box-shadow 0.18s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
/* 顶部胶带条 */
.post-card::before {
  content: "";
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 96px; height: 20px;
  background: rgba(240,165,0,0.5);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  border-radius: 2px;
}
/* 入场：便利贴「贴上墙」 */
.post-card.stick-in {
  animation: stickIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes stickIn {
  from { opacity: 0; transform: translateY(14px) rotate(1.5deg) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
.post-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.post-author { font-weight: 600; font-size: 15px; color: var(--ink); }
.anon-tag {
  font-size: 11px;
  color: #8a6a00;
  background: var(--chalk-yellow-soft);
  border: 1px solid rgba(240,165,0,0.4);
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.post-time { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.post-content { color: var(--ink); font-size: 15px; line-height: 1.75; word-break: break-word; }
.post-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.like-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 14px; transition: color 0.15s, transform 0.08s; -webkit-tap-highlight-color: transparent; }
.like-btn:active { transform: scale(0.96); }
.like-btn.liked { color: var(--chalk-pink); }
.like-btn.liked .like-icon { animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.comment-count { color: var(--ink-2); font-size: 14px; text-decoration: none; transition: color 0.15s, transform 0.08s; }
.comment-count:active { transform: scale(0.96); }
.likers-btn { color: var(--ink-2); font-size: 13px; transition: color 0.15s, transform 0.08s; }
.likers-btn:active { transform: scale(0.96); }
.report-btn { margin-left: auto; color: var(--ink-3); font-size: 13px; transition: color 0.15s, transform 0.08s; }
.report-btn:active { transform: scale(0.96); }
.del-btn { margin-left: auto; color: var(--chalk-red); font-size: 13px; transition: color 0.15s, transform 0.08s; }
.del-btn:active { transform: scale(0.96); }

/* ---------- 媒体网格 ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
}
.media-grid.single { grid-template-columns: 1fr; }
.media-grid img, .media-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.media-grid.single img, .media-grid.single video { aspect-ratio: auto; max-height: 420px; }

/* ---------- 加载/空状态 ---------- */
.feed-loading { text-align: center; color: var(--ink-3); padding: 24px; font-size: 14px; }
.feed-empty { text-align: center; color: var(--ink-3); padding: 60px 20px; }
.feed-empty p { margin-bottom: 16px; }

/* ---------- 帖子详情 ---------- */
.detail { max-width: 640px; margin: 0 auto; padding: calc(var(--header-h) + 16px) 12px calc(env(safe-area-inset-bottom) + 132px); }
.comments-section { margin-top: 20px; }
.comments-section h2 { font-size: 17px; margin-bottom: 12px; color: var(--ink); }
.comment-list { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; border: 1px solid rgba(230,223,208,0.5); }
.comment-item { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-author { font-weight: 600; font-size: 14px; color: var(--ink); }
.comment-time { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.comment-text { font-size: 14px; color: var(--ink); word-break: break-word; }
.del-comment { color: var(--chalk-red); font-size: 12px; transition: transform 0.08s; }
.del-comment:active { transform: scale(0.96); }
.report-comment { color: var(--ink-3); font-size: 12px; margin-top: 6px; transition: transform 0.08s; }
.report-comment:active { transform: scale(0.96); }
.comment-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.reply-comment { color: var(--chalk-teal); font-size: 12px; font-weight: 600; transition: transform 0.08s; }
.reply-comment:active { transform: scale(0.96); }
.reply-to { color: var(--chalk-teal); font-size: 13px; }
.comment-replies {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--chalk-teal-soft);
}
.reply-item { padding: 8px 0; }

/* 评论输入栏 */
.comment-input-bar {
  position: fixed;
  left: 0; right: 0; bottom: var(--nav-h);
  background: rgba(255,253,247,0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 8px 12px;
  z-index: 25;
}
.reply-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--chalk-teal-soft);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
}
.reply-hint span { color: var(--chalk-teal); font-weight: 600; }
.reply-cancel {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.reply-cancel:active { transform: scale(0.96); }
.comment-input-row { display: flex; align-items: center; gap: 8px; }
.comment-input-bar input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  outline: none;
  background: #fff;
}
.comment-input-bar input:focus { border-color: var(--chalk-teal); }
.anon-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
  min-height: 44px;
  padding: 4px 6px;
  border-radius: 10px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.anon-check:active { background: rgba(14,159,143,0.06); }
.anon-check input {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin: 0;
  border: 2px solid rgba(80,70,50,0.28);
  border-radius: 5px;
  cursor: pointer;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.anon-check input:checked {
  background: var(--chalk-teal)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5 6.5 12 13 4'/%3E%3C/svg%3E")
    center / 12px 12px no-repeat;
  border-color: var(--chalk-teal);
}

/* 点赞用户列表 */
.likers-list { max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.liker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.liker-item:last-child { border-bottom: none; }
.liker-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, var(--chalk-teal), #12b3a0);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.liker-name { font-size: 14px; color: var(--ink); }

/* ---------- 发帖页 ---------- */
.publish-main { max-width: 640px; margin: 0 auto; padding: calc(var(--header-h) + 16px) 12px 24px; }
.publish-textarea {
  width: 100%;
  min-height: 160px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  resize: vertical;
  line-height: 1.75;
  background: var(--paper);
}
.publish-textarea:focus { border-color: var(--chalk-teal); box-shadow: 0 0 0 3px rgba(14,159,143,0.12); }
.char-count { text-align: right; font-size: 12px; color: var(--ink-3); margin: 6px 0 16px; }
.media-picker { display: flex; gap: 12px; margin-bottom: 16px; }
.pick-btn {
  flex: 1;
  text-align: center;
  padding: 14px;
  border: 1px dashed var(--chalk-teal);
  border-radius: var(--radius);
  color: var(--chalk-teal);
  background: var(--chalk-teal-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}
.pick-btn:hover { background: #d3ece7; }
.pick-btn:active { transform: scale(0.96); }
.media-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.media-thumb { position: relative; border-radius: 8px; overflow: hidden; }
.media-thumb img, .media-thumb video { width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.remove-media {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.08s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.remove-media:active { transform: scale(0.96); }
/* 扩展命中区域到 44px（移动端触控） */
.remove-media::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
}
.anon-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 16px;
  cursor: pointer;
}

/* ---------- 个人中心 ---------- */
.page-main { max-width: 640px; margin: 0 auto; padding: calc(var(--header-h) + 16px) 12px 24px; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(230,223,208,0.5);
  position: relative;
}
.profile-card::before {
  content: "";
  position: absolute;
  top: -9px; left: 24px;
  transform: rotate(-2deg);
  width: 70px; height: 20px;
  background: rgba(240,165,0,0.5);
  border-radius: 2px;
}
.profile-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--chalk-teal), #12b3a0);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(14,159,143,0.3);
}
.profile-name { font-size: 19px; font-weight: 700; }
.profile-email { font-size: 13px; color: var(--ink-3); }
.profile-role {
  display: inline-block;
  font-size: 12px;
  color: var(--chalk-teal);
  background: var(--chalk-teal-soft);
  padding: 1px 10px;
  border-radius: 10px;
  margin-top: 4px;
  font-weight: 600;
}
.stats-row {
  display: flex;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 0;
  margin-bottom: 16px;
  border: 1px solid rgba(230,223,208,0.5);
}
.stat-item { flex: 1; text-align: center; }
.stat-num { font-size: 22px; font-weight: 700; color: var(--chalk-teal); }
.stat-label { font-size: 12px; color: var(--ink-3); }
.menu-list {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(230,223,208,0.5);
}
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  color: var(--ink);
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
  transition: background 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--wall); transform: scale(0.98); }
.menu-arrow {
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1;
  /* › 字形视觉重心偏左，微调右移 */
  transform: translateX(1px);
}
.menu-danger { color: var(--chalk-red); }

/* 通知 */
.notify-section { margin-bottom: 16px; }
.section-title { font-size: 17px; margin-bottom: 12px; color: var(--ink); }
.section-title .badge {
  background: var(--chalk-pink);
  color: #fff;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 10px;
}
.notify-list { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(230,223,208,0.5); }
.notify-item {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
  transition: background 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.notify-item:last-child { border-bottom: none; }
.notify-item:active { background: var(--wall); transform: scale(0.98); }
.notify-item.unread { background: var(--chalk-teal-soft); }
.notify-title { font-weight: 600; font-size: 14px; }
.notify-content { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.notify-time { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 我的帖子 ---------- */
.status-tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 600; }
.st-pending { color: #8a6a00; background: var(--chalk-yellow-soft); }
.st-published { color: var(--chalk-green); background: var(--chalk-green-soft); }
.st-rejected { color: var(--chalk-red); background: var(--chalk-red-soft); }
.st-deleted { color: var(--ink-3); background: var(--wall); }
.reject-reason {
  margin-top: 10px;
  font-size: 13px;
  color: var(--chalk-red);
  background: var(--chalk-red-soft);
  padding: 8px 12px;
  border-radius: 8px;
}

/* ---------- 待办页 ---------- */
.todo-section { margin-bottom: 20px; }
.todo-list { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(230,223,208,0.5); }
.todo-item {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
  transition: background 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.todo-item:last-child { border-bottom: none; }
.todo-item:active { background: var(--wall); transform: scale(0.98); }
.todo-title { font-size: 14px; font-weight: 600; }
.todo-meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---------- 审核/举报处理页 ---------- */
.review-body { display: flex; justify-content: center; padding: 24px 16px; }
.review-card {
  width: 100%;
  max-width: 640px;
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid rgba(230,223,208,0.5);
  position: relative;
}
.review-card::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 110px; height: 22px;
  background: rgba(240,165,0,0.5);
  border-radius: 2px;
}
.review-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.badge {
  background: var(--chalk-yellow);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
}
.badge-warn { background: var(--chalk-yellow); }
.review-admin { font-size: 12px; color: var(--ink-3); }
.review-card h1 { font-size: 22px; margin-bottom: 20px; font-family: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", cursive; }
.review-section { margin-bottom: 24px; }
.review-section h2 {
  font-size: 15px;
  color: var(--chalk-teal-dark);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-weight: 600;
}
.info-list div { display: flex; padding: 6px 0; font-size: 14px; }
.info-list dt { width: 90px; color: var(--ink-3); flex-shrink: 0; }
.info-list dd { color: var(--ink); word-break: break-word; }
.review-content {
  background: var(--wall);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}
.review-actions { display: flex; gap: 12px; margin-top: 8px; }
.review-actions .btn { flex: 1; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lift);
  animation: modalIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
/* 退出动画：比入场更柔和、更短 */
.modal-mask.closing { animation: fadeOut 0.15s ease-out forwards; }
.modal-mask.closing .modal { animation: modalOut 0.15s ease-out forwards; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.modal h3 { font-size: 18px; margin-bottom: 16px; }
/* 弹窗头部（标题 + 叉号） */
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h3 { margin-bottom: 0; }
.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-3);
  background: rgba(80,70,50,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.08s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { background: rgba(80,70,50,0.12); color: var(--ink); }
.modal-close:active { transform: scale(0.96); }
/* 协议/隐私弹窗正文 */
.doc-modal-body {
  max-height: 62vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
  padding: 2px 6px 2px 2px;
}
.doc-modal-body h1 { font-size: 0; }
.doc-modal-body h2 { font-size: 15px; color: var(--ink); font-weight: 600; margin: 14px 0 6px; }
.doc-modal-body p { margin-bottom: 8px; }
.doc-modal-body .doc-back { display: none; }
.modal select, .modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
  margin-bottom: 12px;
}
.modal select:focus, .modal textarea:focus { border-color: var(--chalk-teal); }
.modal-actions { display: flex; gap: 12px; margin-top: 8px; }
.modal-actions .btn { flex: 1; }
/* 平台迁移公告弹窗正文 */
.notice-body { color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.notice-body p { margin-bottom: 12px; }
.notice-body p:last-child { margin-bottom: 0; }
.notice-body strong { color: var(--chalk-teal); }

/* ---------- 无障碍：键盘焦点 ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--chalk-teal);
  outline-offset: 2px;
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
