/* =========================================================
   听风树洞 · 重度拟物化主样式
   木纹、纸笺、墨水、铸字按钮、树洞主视觉
   ========================================================= */

:root {
  --wood-dark:    #3b2616;
  --wood:         #6b4423;
  --wood-light:   #8a5a2b;
  --wood-hi:      #b07a3e;
  --paper:        #f4ecd8;
  --paper-shade:  #e6dcc0;
  --paper-edge:   #d4c39b;
  --ink:          #2c2416;
  --ink-soft:     #5b4a32;
  --leaf:         #4a6b2a;
  --leaf-light:   #6e9a3c;
  --bark:         #4a311c;
  --accent:       #c0392b;
  --gold:         #b8860b;
  --shadow-deep:  0 14px 28px rgba(0,0,0,.45), 0 6px 10px rgba(0,0,0,.35);
  --shadow-mid:   0 6px 14px rgba(0,0,0,.30), 0 2px 4px rgba(0,0,0,.22);
  --shadow-soft:  0 2px 6px rgba(0,0,0,.20);
  --paper-shadow: 0 1px 1px rgba(255,255,255,.4) inset, 0 8px 22px rgba(60,40,20,.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", serif;
  color: var(--ink);
  /* 木纹底：多层渐变模拟木板纹理 */
  background-color: var(--wood-dark);
  background-image:
    repeating-linear-gradient(90deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 120px, rgba(0,0,0,.06) 121px, rgba(0,0,0,0) 122px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 60px, rgba(255,220,170,.04) 61px, rgba(0,0,0,0) 62px),
    radial-gradient(ellipse at 50% -10%, rgba(176,122,62,.35), transparent 60%),
    linear-gradient(180deg, #2a1a0d 0%, #3b2616 25%, #4a311c 55%, #3b2616 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* 木板上的钉子装饰 */
.board-nails::before, .board-nails::after {
  content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d4b878 0%, #8a6a30 60%, #4a311c 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.3);
}

a { color: var(--leaf-light); text-decoration: none; }
a:hover { color: var(--gold); text-shadow: 0 1px 0 rgba(255,255,255,.2); }

/* ===== 顶部木板招牌 ===== */
.brand-board {
  position: relative;
  max-width: 1100px;
  margin: 28px auto 10px;
  padding: 18px 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.15)),
    repeating-linear-gradient(90deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 30px, rgba(0,0,0,.05) 31px, rgba(0,0,0,0) 32px),
    linear-gradient(180deg, #8a5a2b, #6b4423);
  border: 2px solid #2a1808;
  border-radius: 10px;
  box-shadow: var(--shadow-deep), inset 0 0 0 2px rgba(176,122,62,.4);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.brand-board::before, .brand-board::after {
  content: ""; position: absolute; top: 10px; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d4b878 0%, #8a6a30 60%, #4a311c 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.brand-board::before { left: 14px; }
.brand-board::after  { right: 14px; }

.brand-logo {
  display: flex; align-items: center; gap: 12px;
}
.brand-logo .mark {
  font-size: 36px; line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.5));
}
.brand-logo .title {
  font-size: 26px; font-weight: 900; letter-spacing: 4px;
  color: #f4ecd8;
  text-shadow: 0 2px 0 #2a1808, 0 3px 6px rgba(0,0,0,.6);
}
.brand-logo .sub {
  display: block; font-size: 12px; color: #e0c98f; letter-spacing: 6px; margin-top: 2px;
  text-shadow: 0 1px 0 #2a1808;
}
.brand-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.brand-nav a, .brand-nav .who {
  color: #f4ecd8; font-size: 14px; padding: 6px 12px; border-radius: 6px;
  border: 1px solid rgba(255,235,200,.25); background: rgba(0,0,0,.2);
  transition: all .15s ease;
}
.brand-nav a:hover { background: rgba(255,235,200,.18); color: #ffe9b0; }

/* ===== 树洞主视觉（SVG 场景容器） ===== */
.tree-scene {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 24px;
  height: 360px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,.5), transparent 60%),
    linear-gradient(180deg, #1a1208 0%, #2a1a0d 60%, #3b2616 100%);
  border: 2px solid #2a1808;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
}
.tree-scene .moon {
  position: absolute; top: 30px; right: 60px; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8e0 0%, #f0d99b 50%, #c8a866 100%);
  box-shadow: 0 0 40px rgba(255,240,200,.5), 0 0 80px rgba(255,240,200,.25);
}
.tree-scene .stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 18%, #fff, transparent),
    radial-gradient(1px 1px at 40% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60% 12%, #ffe9b0, transparent),
    radial-gradient(1px 1px at 78% 25%, #fff, transparent),
    radial-gradient(1px 1px at 88% 38%, #fff, transparent),
    radial-gradient(1px 1px at 15% 35%, #ffe9b0, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .6; } to { opacity: 1; } }

.tree-scene svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; }

.tree-scene .hole-glow {
  animation: hole-breathe 5s ease-in-out infinite alternate;
  transform-origin: center;
}
@keyframes hole-breathe {
  from { filter: drop-shadow(0 0 4px rgba(255,200,120,.4)); }
  to   { filter: drop-shadow(0 0 16px rgba(255,200,120,.8)); }
}

.tree-scene .enter-link {
  position: absolute; top: 58%; left: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; font-size: 15px; letter-spacing: 2px;
  color: #2a1808; font-weight: 700;
  background: linear-gradient(180deg, #fff0c8, #e0b870);
  border: 1px solid #6b4423; border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6);
}
.tree-scene .enter-link:hover { transform: translate(-50%,-50%) translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6); color: #6b4423; }

/* ===== 通用容器 ===== */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }

/* ===== 纸笺卡片（帖子主体） ===== */
.paper {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 8%),
    linear-gradient(135deg, var(--paper) 0%, var(--paper-shade) 100%);
  color: var(--ink);
  border: 1px solid var(--paper-edge);
  border-radius: 4px;
  box-shadow: var(--paper-shadow);
  padding: 22px 24px 18px;
  /* 纸笺横线 */
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 8%),
    repeating-linear-gradient(180deg, transparent 0, transparent 27px, rgba(120,90,50,.10) 28px),
    linear-gradient(135deg, var(--paper) 0%, var(--paper-shade) 100%);
}
/* 右上角折角 */
.paper.foldable::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 18px 18px 0;
  border-color: transparent var(--paper-edge) transparent transparent;
  filter: drop-shadow(-1px 1px 1px rgba(0,0,0,.2));
}
.paper.foldable::after {
  content: ""; position: absolute; top: 0; right: 0; width: 18px; height: 18px;
  background: linear-gradient(225deg, var(--paper) 50%, var(--paper-edge) 50%);
  box-shadow: -1px 1px 2px rgba(0,0,0,.15);
}
.paper h2, .paper h3 { margin-top: 0; }

/* 表单用纸笺：去掉横线，避免控件叠在「行线」上显得错位 */
.paper.form-paper {
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 12%),
    linear-gradient(135deg, var(--paper) 0%, var(--paper-shade) 100%);
  overflow: visible;
}

/* 发帖表单：强制纵向堆叠，防止控件横漂重叠 */
.compose-form { display: block; width: 100%; }
.compose-form .field {
  display: block;
  width: 100%;
  margin-bottom: 16px;
  clear: both;
  position: relative;
}
.compose-form .field > label {
  display: block;
  width: 100%;
  margin-bottom: 6px;
}
.compose-form .field > .input,
.compose-form .field > .textarea,
.compose-form .field > .select {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  float: none;
}
.compose-form .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.compose-form .form-row > .field {
  flex: 1 1 180px;
  min-width: 0;
  margin-bottom: 12px;
}
.compose-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed rgba(120,90,50,.25);
}
.compose-form .form-hint { margin: 0; flex: 1 1 200px; font-size: 12px; }
.compose-form .form-actions-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.char-count { font-weight: 400; letter-spacing: 0; }

/* 一张邮票样的标签 */
.stamp {
  display: inline-block; padding: 2px 10px; font-size: 12px; letter-spacing: 1px;
  color: var(--accent); border: 2px dashed currentColor; border-radius: 2px;
  transform: rotate(-3deg);
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

/* 帖子列表项 */
.post-item {
  margin-bottom: 22px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.post-item:hover {
  transform: translateY(-2px) rotate(-.3deg);
  box-shadow: 0 12px 28px rgba(60,40,20,.32), 0 4px 8px rgba(0,0,0,.2);
}
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-soft);
  border-bottom: 1px dashed rgba(120,90,50,.25);
  padding-bottom: 8px; margin-bottom: 12px;
}
.post-meta .avatar {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3d6, #c8a866);
  box-shadow: inset 0 0 0 2px #6b4423, 0 1px 2px rgba(0,0,0,.3);
}
.post-meta .nick { color: var(--bark); font-weight: 700; }
.post-title { font-size: 18px; font-weight: 800; color: var(--bark); margin: 4px 0 8px; }
.post-content { font-size: 15px; line-height: 1.85; color: var(--ink); }
.post-content p { margin: 0 0 10px; }
.post-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(120,90,50,.25);
  font-size: 13px; color: var(--ink-soft);
}

.mood-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 2px 9px; border-radius: 12px; color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.25);
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 2px 9px; border-radius: 12px;
  background: linear-gradient(180deg, #fff8e0, #d4b878);
  color: var(--bark); border: 1px solid #8a5a2b;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* ===== 拥抱按钮 ===== */
.hug-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 13px; cursor: pointer;
  border: 1px solid #6b4423; border-radius: 18px;
  color: var(--bark); font-weight: 700;
  background: linear-gradient(180deg, #fff0c8, #e0b870);
  box-shadow: 0 3px 6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.6);
  transition: all .12s ease;
}
.hug-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.6); }
.hug-btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0,0,0,.3), inset 0 1px 2px rgba(0,0,0,.2); }
.hug-btn.hugged { background: linear-gradient(180deg, #ffd5d5, #e07070); color: #6b1414; }

/* ===== 铸字按钮（主要操作） ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
  border-radius: 6px; border: 1px solid #4a311c; letter-spacing: 1px;
  color: #f4ecd8;
  background: linear-gradient(180deg, #8a5a2b 0%, #6b4423 50%, #4a311c 100%);
  box-shadow: 0 3px 6px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,235,200,.25), inset 0 -2px 4px rgba(0,0,0,.25);
  transition: all .12s ease;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 5px 10px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,235,200,.3); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0,0,0,.35), inset 0 2px 4px rgba(0,0,0,.3); }
.btn-primary { background: linear-gradient(180deg, #d4654a 0%, #c0392b 50%, #8b1f15 100%); border-color: #5a0d08; color: #fff5e8; }
.btn-leaf    { background: linear-gradient(180deg, #7bb34a 0%, #4a6b2a 55%, #2f4514 100%); border-color: #1f2f0a; color: #f4ffe0; }
.btn-ghost   { background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.18)); color: #f4ecd8; border-color: rgba(255,235,200,.3); }
.btn-sm      { padding: 5px 10px; font-size: 12px; border-radius: 4px; }
.btn-danger  { background: linear-gradient(180deg, #d4654a, #8b1f15); color: #fff5e8; }

/* ===== 表单控件 ===== */
.field { margin-bottom: 16px; display: block !important; width: 100% !important; clear: both !important; float: none !important; }
.field > label { display: block !important; width: 100% !important; float: none !important; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 700; letter-spacing: 1px; }
.field > .input, .field > .textarea, .field > .select,
.input, .textarea, .select {
  display: block !important;
  width: 100% !important; max-width: 100% !important; box-sizing: border-box !important;
  float: none !important;
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: linear-gradient(180deg, #fffdf4, #f4ecd8);
  border: 1px solid #b8a070; border-radius: 4px; padding: 9px 12px;
  box-shadow: inset 0 2px 4px rgba(120,90,50,.18), 0 1px 0 rgba(255,255,255,.6);
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: #6b4423;
  box-shadow: inset 0 2px 4px rgba(120,90,50,.22), 0 0 0 3px rgba(176,122,62,.25);
}
.textarea { min-height: 160px; resize: vertical; line-height: 1.7; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b4423 50%), linear-gradient(135deg, transparent 50%, #6b4423 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

.help-text { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.error-text { color: var(--accent); font-size: 12.5px; margin-top: 4px; }

/* ===== 布局 ===== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-main { grid-template-columns: 1fr 280px; }

/* 省份标签（昵称旁） */
.region-tag {
  display: inline-block;
  font-size: 11px;
  line-height: 1.2;
  padding: 2px 7px;
  margin-left: 2px;
  border-radius: 10px;
  color: #6b4423;
  background: rgba(176, 122, 62, .18);
  border: 1px solid rgba(107, 68, 35, .25);
  vertical-align: middle;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .grid-main, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .tree-scene { height: 240px; margin-bottom: 12px; }
  .brand-board {
    margin: 12px 10px 8px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .brand-logo .title { font-size: 20px; }
  .brand-nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 13px;
  }
  .brand-nav a, .brand-nav button {
    padding: 6px 4px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
  .wrap { padding: 0 10px 40px; max-width: 100%; }
  .paper, .post-item { padding: 14px 14px; border-radius: 8px; }
  .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: center;
    font-size: 13px;
  }
  .post-title { font-size: 17px; line-height: 1.45; }
  .post-content { font-size: 15px; line-height: 1.75; }
  .post-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .post-foot .row {
    width: 100%;
    justify-content: stretch;
  }
  .post-foot .btn, .post-foot .hug-btn {
    flex: 1;
    justify-content: center;
    min-height: 40px;
  }
  .cat-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .cat-bar a { flex: 0 0 auto; }
  .sidebar { order: 2; padding: 12px; }
  .sidebar-grid { gap: 5px; }
  .sidebar-grid li a { padding: 6px 7px; font-size: 12px; min-height: 34px; }
  .site-foot { font-size: 12px; padding: 20px 12px 32px; }
  .input, .textarea, .select { font-size: 16px; } /* 避免 iOS 自动放大 */
  .flash-wrap { margin: 0 10px; }
  .compose-form .form-actions { flex-direction: column; align-items: stretch; }
  .compose-form .form-actions-btns { width: 100%; }
  .compose-form .form-actions-btns .btn { flex: 1; }
  .pagination a, .pagination span { min-width: 32px; height: 32px; font-size: 12px; }
}

@media (max-width: 480px) {
  .tree-scene { height: 200px; }
  .brand-logo .mark { font-size: 28px; }
  .mood-chip, .cat-chip { font-size: 11px; padding: 2px 8px; }
}

/* 侧栏木板 */
.sidebar {
  background: linear-gradient(180deg, rgba(255,235,200,.06), rgba(0,0,0,.15)), linear-gradient(180deg, #6b4423, #4a311c);
  border: 2px solid #2a1808; border-radius: 10px; padding: 16px; color: #f4ecd8;
  box-shadow: var(--shadow-mid);
}
.sidebar h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: 2px; color: #ffe9b0; border-bottom: 1px solid rgba(255,235,200,.2); padding-bottom: 8px; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: 8px 4px; border-bottom: 1px dashed rgba(255,235,200,.15); font-size: 14px; }
.sidebar li a { color: #f4ecd8; display: block; }
.sidebar li a:hover { color: #ffe9b0; }
.sidebar .count { float: right; color: #b0a070; font-size: 12px; }

/* 分类 / 心情：两列紧凑网格，减少手机端纵向占位 */
.sidebar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sidebar-grid li {
  padding: 0;
  border-bottom: none;
  min-width: 0;
}
.sidebar-grid li a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 235, 200, .12);
  font-size: 13px;
  line-height: 1.3;
  min-height: 36px;
}
.sidebar-grid li a:hover,
.sidebar-grid li a.active {
  background: rgba(255, 235, 200, .16);
  border-color: rgba(255, 235, 200, .35);
  color: #ffe9b0;
}
.sidebar-grid .sidebar-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-grid .count {
  float: none;
  flex-shrink: 0;
  margin-left: auto;
  opacity: .85;
}
.sidebar-moods li a {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 6px;
}
.sidebar-moods .mood-chip {
  font-size: 11px;
  padding: 2px 7px;
  max-width: 100%;
}

/* 分类导航条 */
.cat-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px;
  padding: 12px; background: linear-gradient(180deg, #6b4423, #4a311c);
  border: 2px solid #2a1808; border-radius: 8px;
  box-shadow: var(--shadow-mid);
}
.cat-bar a {
  padding: 6px 12px; border-radius: 4px; font-size: 13px; color: #f4ecd8;
  border: 1px solid rgba(255,235,200,.2); background: rgba(0,0,0,.15);
}
.cat-bar a.active, .cat-bar a:hover { background: rgba(255,235,200,.2); color: #ffe9b0; border-color: rgba(255,235,200,.4); }

/* ===== Flash 消息 ===== */
.flash-wrap { margin: 12px auto; max-width: 1100px; padding: 0 16px; }
.flash {
  padding: 10px 16px; border-radius: 6px; margin-bottom: 8px; font-size: 14px;
  border: 1px solid; box-shadow: var(--shadow-soft);
}
.flash-info    { background: linear-gradient(180deg,#fff3d6,#e0b870); color: #4a311c; border-color: #8a5a2b; }
.flash-success { background: linear-gradient(180deg,#e8f5d8,#9bb86a); color: #1f2f0a; border-color: #4a6b2a; }
.flash-error   { background: linear-gradient(180deg,#ffe0d6,#e07070); color: #5a0d08; border-color: #8b1f15; }
.flash-warning { background: linear-gradient(180deg,#fff0c8,#e0b870); color: #5a4014; border-color: #8a5a2b; }

/* ===== 危机提示卡 ===== */
.crisis-card {
  background:
    linear-gradient(180deg, rgba(255,235,200,.4), rgba(255,235,200,0) 30%),
    linear-gradient(135deg, #fff3d6, #e6c988);
  border: 2px solid #8a5a2b; border-radius: 8px; padding: 16px 18px; margin: 14px 0;
  box-shadow: var(--shadow-mid); position: relative;
}
.crisis-card::before { content: "🕊"; position: absolute; top: -16px; left: 14px; font-size: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.crisis-card h4 { margin: 0 0 6px; color: #5a0d08; }
.crisis-card p { margin: 0; font-size: 14px; line-height: 1.7; color: #4a311c; }

/* ===== 分页 ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; flex-wrap: wrap; align-items: center; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px; font-size: 13px; font-weight: 700;
  border-radius: 6px; border: 1px solid #6b4423;
  background: linear-gradient(180deg, #fff0c8, #d4b878); color: #4a311c;
  box-shadow: 0 2px 4px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.5);
  text-decoration: none;
}
.pagination a:hover { background: linear-gradient(180deg, #ffe9b0, #c8a866); }
.pagination .cur { background: linear-gradient(180deg, #6b4423, #4a311c); color: #f4ecd8; border-color: #2a1808; }
.pagination .ellipsis {
  border: none; background: transparent; box-shadow: none;
  color: #ffe9b0; min-width: 18px; font-weight: 700;
}
.pagination .muted { opacity: .45; cursor: default; }

/* ===== 页脚 ===== */
.site-foot {
  max-width: 1100px; margin: 30px auto 40px; padding: 16px 28px; text-align: center;
  color: #d4b878; font-size: 12px; letter-spacing: 1px;
  border-top: 1px solid rgba(255,235,200,.15);
}
.site-foot a { color: #ffe9b0; }

/* ===== 详情页评论 ===== */
.comment-item {
  background: linear-gradient(180deg, #fffdf4, #f4ecd8);
  border: 1px solid #d4c39b; border-radius: 4px; padding: 12px 14px;
  margin-bottom: 10px; box-shadow: var(--shadow-soft);
  border-left: 4px solid #b07a3e;
}
.comment-item .meta { font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.comment-item .body { font-size: 14px; line-height: 1.7; }

/* ===== 心情日历 ===== */
.mood-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 560px; }
.mood-cal-cell {
  aspect-ratio: 1/1; border-radius: 6px; padding: 4px; font-size: 11px;
  background: linear-gradient(180deg, #fffdf4, #e6dcc0);
  border: 1px solid #d4c39b; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.mood-cal-cell.has-mood { color: #fff; }
.mood-cal-cell .e { font-size: 18px; align-self: center; }

.mood-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--ink-soft); }
.mood-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }

/* ===== 空状态 ===== */
.empty {
  text-align: center; padding: 50px 20px; color: var(--ink-soft);
}
.empty .big { font-size: 56px; margin-bottom: 10px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }

/* 工具类 */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.right { text-align: right; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px;
  color: #fff;
}
.badge-pending { background: #b8860b; }
.badge-approved { background: #4a6b2a; }
.badge-rejected { background: #8b1f15; }
.badge-banned { background: #8b1f15; }
.badge-active { background: #4a6b2a; }
.badge-admin { background: #6b4423; }

/* 滚动条 */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #2a1a0d; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #8a5a2b, #4a311c); border-radius: 6px; border: 2px solid #2a1a0d; }
