/* ============ 设计变量：宣纸 · 朱砂（AC1） ============ */
:root {
  --paper: #EEE5D2;
  --surface: #FBF6EC;
  --surface-2: #F3EBDB;
  --ink: #2B2219;
  --muted: #7C6C57;
  --line: #DCCDB0;
  --pine: #A93A28;          /* 主色：朱砂红（变量名沿用旧名） */
  --pine-ink: #FFF7EA;
  --mine: #F7E8D8;
  --danger: #A93A28;
  --shadow: 0 1px 0 rgba(90, 60, 30, .05), 0 10px 24px -18px rgba(90, 60, 30, .45);
  --frame: rgba(169, 58, 40, .14);
  --red: #8A2618;           /* 顶部横幅、底部装饰带 */
  --gold: #E2B866;
  --gold-text: #F6D9A8;
  --fiber-a: .09;

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font: var(--serif);
  --font-stamp: var(--serif);

  --r-card: 4px;
  --r-ctl: 4px;
  --col: 680px;
  --band: calc(78px + env(safe-area-inset-top));
  --fiber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E");
  --huiwen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M0 28h12V12h20v24H20V20' fill='none' stroke='%23F2C97A' stroke-opacity='.18' stroke-width='2'/%3E%3Cpath d='M28 56V44h16V24h12' fill='none' stroke='%23F2C97A' stroke-opacity='.18' stroke-width='2'/%3E%3C/svg%3E");
  --cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40' viewBox='0 0 120 40'%3E%3Cg fill='none' stroke='%23F2C97A' stroke-opacity='.35' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M8 30c0-7 6-12 12-12 2-6 8-10 14-10 8 0 14 6 14 14 5 0 9 4 9 8'/%3E%3Cpath d='M22 30c0-4 3-7 7-7s7 3 7 7'/%3E%3Cpath d='M68 30c0-7 6-12 12-12 2-6 8-10 14-10 8 0 14 6 14 14 5 0 9 4 9 8'/%3E%3Cpath d='M82 30c0-4 3-7 7-7s7 3 7 7'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}
/* 夜间模式：只有用户点了右上角的"夜间"才启用，默认始终是浅色 */
:root[data-theme="dark"] {
    --paper: #1A1612;
    --surface: #241E19;
    --surface-2: #2C251F;
    --ink: #EDE3CF;
    --muted: #A99A84;
    --line: #3B3229;
    --pine: #D46C53;
    --pine-ink: #1B1510;
    --mine: #2E241D;
    --danger: #E07A62;
    --shadow: 0 10px 24px -18px rgba(0, 0, 0, .7);
    --frame: rgba(212, 108, 83, .18);
    --red: #6E1D12;
    color-scheme: dark;
}

/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* 顶部朱红横幅 + 金边；底部朱红装饰带 + 金边 + 祥云；宣纸纹理 */
  background-image:
    linear-gradient(to bottom, var(--red) 0 var(--band), var(--gold) var(--band) calc(var(--band) + 3px), transparent calc(var(--band) + 3px)),
    linear-gradient(to top, var(--red) 0 calc(var(--composer-h, 150px) - 14px), var(--gold) calc(var(--composer-h, 150px) - 14px) calc(var(--composer-h, 150px) - 11px), transparent calc(var(--composer-h, 150px) - 11px)),
    var(--huiwen),
    var(--huiwen),
    var(--fiber);
  background-size: 100% 100%, 100% 100%, 56px 56px, 56px 56px, 240px 240px;
  background-repeat: no-repeat, no-repeat, repeat-x, repeat-x, repeat;
  background-position: 0 0, 0 0, 0 calc(var(--band) - 56px), 0 100%, 0 0;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* ============ 整体布局：顶部 + 可滚动消息流 + 底部输入框 ============ */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: var(--col);
  margin: 0 auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 8px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-name {
  margin: 0;
  font-family: var(--font-stamp);
  font-stretch: condensed;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--pine);
  padding: 6px 9px 5px;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  transform: rotate(-3deg);
  white-space: nowrap;
}
.brand-sub { margin: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }

.ghost-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 14px;
  color: var(--muted);
}
.ghost-btn:hover { color: var(--ink); border-color: var(--muted); }

/* 筛选条 */
.filters {
  display: flex;
  gap: 6px;
  padding: 6px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* 置顶公告 */
.pinned { padding: 0 16px 8px; display: grid; gap: 6px; }
.pin-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px dashed var(--pine);
  background: var(--surface);
  font-size: 14px;
}
.pin-label { flex: none; font-weight: 700; color: var(--pine); }
.pin-text {
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pin-card[aria-expanded="true"] .pin-text { -webkit-line-clamp: unset; display: block; }

/* 消息流 */
.feed {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 16px 16px;
  -webkit-overflow-scrolling: touch;
}
.feed-top { display: flex; justify-content: center; padding: 4px 0 12px; min-height: 8px; }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.empty {
  margin: 48px auto;
  max-width: 280px;
  text-align: center;
  color: var(--muted);
}
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* 单条发言 */
.post {
  list-style: none;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 12px 14px 8px;
  box-shadow: var(--shadow);
}
.post.is-mine { background: var(--mine); }
.post.is-admin { border-color: var(--pine); }
.post-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-right: 64px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.post-name { font-weight: 700; color: var(--ink); word-break: break-all; }
.badge {
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--pine);
  color: var(--pine-ink);
  font-weight: 700;
}
.post-time { white-space: nowrap; }
.post-body {
  margin: 6px 0 4px;
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.post-actions { display: flex; align-items: center; gap: 0; margin-left: -6px; flex-wrap: wrap; }
.act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 2px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.act:hover { background: var(--surface-2); color: var(--ink); }
.act[aria-pressed="true"] { color: var(--pine); font-weight: 700; }
.act .emo { font-size: 15px; }
.act-report { margin-left: auto; opacity: 0.7; }

/* 印章 —— 这个页面最有记忆点的元素 */
.stamp {
  --c: #6B7280;
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--font-stamp);
  font-stretch: condensed;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--c);
  padding: 5px 7px 4px;
  border: 2px solid var(--c);
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px var(--surface), inset 0 0 0 2px var(--c);
  transform: rotate(-8deg);
  opacity: 0.95;
  pointer-events: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.1 1.55'/%3E%3C/filter%3E%3Crect width='80' height='40' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.1 1.55'/%3E%3C/filter%3E%3Crect width='80' height='40' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .stamp { color: color-mix(in srgb, var(--c) 55%, white); border-color: color-mix(in srgb, var(--c) 55%, white); box-shadow: inset 0 0 0 1px var(--surface), inset 0 0 0 2px color-mix(in srgb, var(--c) 55%, white); }
.post.just-sent .stamp { animation: stamp-down 420ms cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes stamp-down {
  0% { transform: rotate(-20deg) scale(2.2); opacity: 0; }
  60% { transform: rotate(-6deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 0.95; }
}

/* 折叠 */
.folded-note {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 8px 10px;
  text-align: left;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}
.post.is-folded .post-body { opacity: 0.75; }

/* 新消息提示 */
.new-pill {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--composer-h, 150px) + 12px);
  z-index: 5;
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.35);
}

/* ============ 输入区 ============ */
.composer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}
@media (min-width: 700px) {
  .composer { border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-card) var(--r-card) 0 0; }
}
.identity { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.identity-label { flex: none; }
.identity-name { color: var(--ink); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { flex: none; border: 0; background: none; padding: 0; color: var(--pine); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.tag-picker { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tag-picker::-webkit-scrollbar { display: none; }
.tag-opt {
  --c: #6B7280;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  font-size: 13px;
  color: var(--muted);
}
.tag-opt[aria-checked="true"] { border-color: var(--c); color: var(--c); font-weight: 700; background: color-mix(in srgb, var(--c) 10%, transparent); }
:root[data-theme="dark"] .tag-opt[aria-checked="true"] { color: color-mix(in srgb, var(--c) 55%, white); border-color: color-mix(in srgb, var(--c) 55%, white); }

.compose-row { display: flex; gap: 8px; align-items: flex-end; margin: 0; }
.compose-row textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  max-height: 160px;
  padding: 9px 12px;
  font-size: 16px; /* 16px 防止 iOS 自动放大 */
  line-height: 1.5;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.compose-row textarea:focus { outline: none; border-color: var(--pine); background: var(--surface); }
.send-btn {
  flex: none;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-ctl);
  background: var(--pine);
  color: var(--pine-ink);
  font-weight: 700;
}
.send-btn:disabled { opacity: 0.5; cursor: default; }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: -4px; }
.counter.over { color: var(--danger); font-weight: 700; }

/* ============ 回复面板 ============ */
.sheet-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 20, 0.45);
  z-index: 20;
}
.sheet {
  position: fixed;
  z-index: 21;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  inset: auto 0 0 0;
  height: 92dvh;
  height: 92vh;
  border-radius: 18px 18px 0 0;
  animation: sheet-up 220ms ease-out both;
}
@supports (height: 1dvh) { .sheet { height: 92dvh; } }
@media (min-width: 900px) {
  .sheet { inset: 0 0 0 auto; width: 460px; height: 100%; border-radius: 0; animation-name: sheet-left; border-left: 1px solid var(--line); }
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes sheet-left { from { transform: translateX(24px); opacity: 0; } }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 16px; overscroll-behavior: contain; }
.replies { margin-top: 14px; padding-left: 14px; border-left: 2px solid var(--line); }
.replies .post { box-shadow: none; }
.replies-empty { color: var(--muted); font-size: 14px; padding: 6px 0; }
.sheet-compose { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }

/* ============ 弹窗 ============ */
.modal-backdrop { display: grid; place-items: center; padding: 16px; z-index: 30; }
.modal {
  width: 100%;
  max-width: 440px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
}
.modal h2 { margin: 0 0 4px; font-size: 19px; }
.modal .lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.modal ol { margin: 0 0 18px; padding-left: 1.3em; display: grid; gap: 8px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-primary {
  border: 0;
  border-radius: var(--r-ctl);
  padding: 10px 18px;
  background: var(--pine);
  color: var(--pine-ink);
  font-weight: 700;
}
.btn-secondary {
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 10px 16px;
  background: transparent;
}
.reasons { display: grid; gap: 8px; margin: 0 0 18px; }
.reasons label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
}
.reasons input { accent-color: var(--pine); }

/* ============ 提示 ============ */
.toast {
  position: fixed;
  left: 50%;
  top: calc(16px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}
.toast.is-error { background: var(--danger); color: #fff; }

.loading { color: var(--muted); font-size: 14px; text-align: center; padding: 24px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ============ 情绪指数行情条 ============ */
.ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 16px 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  text-align: left;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.ticker:hover { border-color: var(--muted); }
.ticker-name { flex: none; font-size: 13px; color: var(--muted); }
.ticker-val { flex: none; font-size: 18px; font-weight: 800; line-height: 1; color: var(--ink); font-family: var(--font-stamp); font-stretch: condensed; }
.ticker-chg { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); }
.ticker-chg[data-dir="flat"] { color: var(--muted); font-weight: 400; }
.ticker-sep { flex: none; width: 1px; height: 14px; background: var(--line); }
.ticker-meta { flex: none; font-size: 13px; color: var(--muted); }
.ticker-spark { flex: none; width: 64px; height: 20px; margin-left: auto; }
.spark-line { fill: none; stroke: var(--pine); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.spark-mid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 2; }
@media (max-width: 370px) { .ticker-sep, .ticker-meta { display: none; } }

/* ============ 最新 / 热门 ============ */
.viewbar { display: flex; align-items: center; gap: 8px; padding: 0 0 0 16px; min-width: 0; }
.viewbar .filters { flex: 1; min-width: 0; padding-left: 0; }
.seg {
  flex: none;
  display: inline-flex;
  padding: 2px;
  margin: 6px 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.seg-btn {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.seg-btn[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.hot-note { margin: -4px 16px 8px; font-size: 13px; color: var(--muted); }

/* ============ 情绪指数面板 ============ */
@media (min-width: 900px) { .mood-sheet { width: 520px; } }
.mood-hero { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; }
.mood-big {
  font-family: var(--font-stamp);
  font-stretch: condensed;
  font-weight: 900;
  font-size: 56px;
  line-height: 1;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
}
.mood-side { display: grid; gap: 2px; }
.mood-chg { font-weight: 700; font-size: 15px; }
.mood-sub { font-size: 13px; color: var(--muted); }
.mood-h { font-size: 15px; margin: 18px 0 8px; }
.chart-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 8px 6px 2px; }
.mood-chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.mood-chart .grid { stroke: var(--line); stroke-width: 1; }
.mood-chart .grid-mid { stroke-dasharray: 3 3; stroke: var(--muted); opacity: .5; }
.mood-chart .axis { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.mood-line { fill: none; stroke: var(--pine); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mood-dot { fill: var(--pine); stroke: var(--surface); stroke-width: 2; }
.crosshair { stroke: var(--muted); stroke-width: 1; }
.hit { fill: transparent; cursor: crosshair; }
.chart-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 2px 8px 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 24px; }
.chart-readout strong { color: var(--ink); font-size: 14px; }
.breakdown { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.bd-row { display: grid; grid-template-columns: 84px 1fr 28px; align-items: center; gap: 10px; font-size: 14px; }
.bd-label { white-space: nowrap; }
.bd-track { height: 10px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bd-bar { display: block; height: 100%; background: var(--pine); border-radius: 0 4px 4px 0; }
.bd-num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.mood-note { margin: 16px 0 4px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.btn-danger { background: var(--danger); color: #fff; }

@media (max-width: 420px) { .act { gap: 3px; padding: 2px 5px; } .act .emo { font-size: 14px; } }

/* ============ 三栏布局 ============ */
:root { --cinnabar: #B8432B; }
:root[data-theme="dark"] { --cinnabar: #E58A73; }
.side { display: none; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 16px 8px; }
.quick:has(#dailyQuick[hidden]) { grid-template-columns: 1fr; }
.quick-btn {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 7px 10px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface);
}
.quick-btn:hover { border-color: var(--muted); }
.quick-emo { font-size: 20px; line-height: 1; }
.quick-text { display: grid; min-width: 0; line-height: 1.3; }
.quick-text strong { font-size: 14px; }
.quick-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 1180px) {
  .layout {
    display: grid;
    grid-template-columns: 280px minmax(0, var(--col)) 280px;
    justify-content: center;
    gap: 28px;
    padding: 0 16px;
  }
  .layout .app { margin: 0; width: 100%; }
  .side {
    display: block;
    align-self: start;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 72px 0 24px;
  }
  .quick { display: none; }
}

/* ============ 侧栏卡片 ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  box-shadow: var(--shadow);
}
.info-sheet .card { box-shadow: none; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-title { margin: 0; font-size: 16px; }
.card-meta { font-size: 13px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.card-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.btn-small { padding: 7px 14px; font-size: 14px; }

.daily-q {
  margin: 4px 0 0;
  font-size: 19px;
  line-height: 1.55;
  font-weight: 700;
  word-break: break-word;
}

/* 每日一问在消息流里的样子 */
.post.is-daily { border: 1.5px dashed var(--pine); }
.post.is-daily .post-body { font-size: 17px; font-weight: 700; }
.post.is-daily .post-name { color: var(--pine); }
.post.is-daily .stamp { display: none; }

/* 在线人数 */
.brand-meta { display: grid; min-width: 0; }
.online { display: flex; align-items: center; gap: 5px; margin: 1px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #2E9E5B; box-shadow: 0 0 0 0 rgba(46,158,91,.5); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,158,91,.45); } 70%, 100% { box-shadow: 0 0 0 6px rgba(46,158,91,0); } }

/* ============ 今日秋招灵签 ============ */
:root {
  --paper-qian: #F3E7CC;
  --ink-qian: #2A1E14;
  --red-qian: #B8432B;
  --bamboo: #C9A15A;
  --bamboo-dark: #8C6A2E;
  --lacquer: #8E2A1C;
  --serif-qian: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
}

/* 签筒 */
.tube-wrap { position: relative; width: 150px; height: 230px; margin: 8px auto 0; cursor: pointer; transform-origin: 50% 90%; }
.tube-wrap.small { width: 84px; height: 128px; cursor: default; }
.sticks { position: absolute; left: 50%; bottom: 150px; width: 0; }
.small .sticks { bottom: 84px; }
.stick {
  position: absolute; bottom: -40px; left: var(--x);
  width: 8px; height: calc(var(--h) + 40px); margin-left: -4px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(90deg, var(--bamboo-dark), var(--bamboo) 40%, #E2C48A 60%, var(--bamboo));
  transform: rotate(var(--r)); transform-origin: 50% 100%;
}
.stick::before { content: ""; position: absolute; top: 3px; left: 1px; right: 1px; height: 10px; border-radius: 2px; background: var(--red-qian); }
.small .stick { width: 5px; margin-left: -2.5px; }
.small .stick::before { height: 6px; }
.tube {
  position: absolute; left: 0; right: 0; bottom: 0; height: 160px;
  border-radius: 10px 10px 22px 22px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), transparent 18%, rgba(255,255,255,.12) 35%, transparent 55%, rgba(0,0,0,.25)),
    linear-gradient(180deg, #A8392A, var(--lacquer));
  box-shadow: inset 0 6px 0 rgba(0,0,0,.25), 0 14px 24px -12px rgba(0,0,0,.5);
  display: grid; place-items: center;
}
.tube::before, .tube::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: linear-gradient(90deg, #9C7A35, #E3C27A, #9C7A35); }
.tube::before { top: 16px; }
.tube::after { bottom: 20px; }
.small .tube { height: 88px; border-radius: 6px 6px 14px 14px; }
.small .tube::before { top: 9px; height: 5px; }
.small .tube::after { bottom: 11px; height: 5px; }
.tube-label {
  writing-mode: vertical-rl; letter-spacing: .25em;
  font-family: var(--serif-qian); font-weight: 900; font-size: 20px; color: #F6DFA6;
  padding: 8px 4px; border: 1.5px solid rgba(246,223,166,.7); border-radius: 3px;
}
.small .tube-label { font-size: 11px; padding: 4px 2px; }

.tube-wrap.shaking { animation: tube-shake 1.3s ease-in-out; }
.tube-wrap.shaking .stick { animation: stick-rattle 160ms ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes tube-shake {
  0% { transform: rotate(0); }
  10% { transform: rotate(-16deg) translateY(-6px); } 22% { transform: rotate(14deg); }
  34% { transform: rotate(-18deg) translateY(-8px); } 46% { transform: rotate(16deg); }
  58% { transform: rotate(-14deg) translateY(-6px); } 70% { transform: rotate(12deg); }
  82% { transform: rotate(-22deg) translateY(-10px); } 100% { transform: rotate(-8deg); }
}
@keyframes stick-rattle { from { transform: rotate(var(--r)) translateY(0); } to { transform: rotate(calc(var(--r) * -1)) translateY(-10px); } }
.fly-stick {
  position: absolute; left: 50%; bottom: 150px; width: 26px; height: 180px; margin-left: -13px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(90deg, var(--bamboo-dark), #E9CF96 45%, var(--bamboo));
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  display: grid; justify-items: center; align-content: start; padding-top: 14px;
  animation: fly-out 1s cubic-bezier(.2,.9,.3,1.2) forwards;
}
.fly-stick span { writing-mode: vertical-rl; font-family: var(--serif-qian); font-weight: 900; font-size: 15px; color: var(--red-qian); letter-spacing: .1em; }
@keyframes fly-out {
  0% { transform: translateY(80px) rotate(-8deg); opacity: 0; }
  30% { opacity: 1; }
  60% { transform: translateY(-120px) rotate(12deg) scale(1.15); }
  100% { transform: translateY(-140px) rotate(0) scale(1.3); }
}
.tube-wrap.popped { transform: rotate(-8deg); }

/* 舞台 */
.qian-stage {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; overflow-y: auto;
  padding: calc(56px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,190,110,.22), transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(0,0,0,.4), transparent 60%),
    #6E1F14;
  color: #F6E3BC;
  animation: fade-in 220ms ease-out both;
}
.qian-close {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 16px; z-index: 2;
  border: 1px solid rgba(246,227,188,.4); background: transparent; color: #F6E3BC;
  border-radius: 999px; padding: 5px 14px; font-size: 14px;
}
.qian-box { width: 100%; max-width: 420px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.qian-title { margin: 0; font-family: var(--serif-qian); font-size: 30px; font-weight: 900; letter-spacing: .2em; color: #FBE7B5; }
.qian-sub { margin: -6px 0 0; font-size: 14px; opacity: .85; }
.qian-note { margin: 0; font-size: 12px; opacity: .7; }
.qian-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 132px; padding: 11px 22px; border-radius: 999px;
  border: 0; background: linear-gradient(180deg, #F6D58A, #D9A84E); color: #5A1A10;
  font-family: var(--serif-qian); font-weight: 900; font-size: 17px; letter-spacing: .15em;
  text-decoration: none; box-shadow: 0 6px 18px -6px rgba(0,0,0,.5);
}
.qian-btn:disabled { opacity: .6; }
.qian-btn.ghost { background: transparent; color: #F6E3BC; border: 1px solid rgba(246,227,188,.5); box-shadow: none; }
.qian-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.qian-stage :focus-visible, .share-overlay :focus-visible { outline-color: #FBE7B5; }

/* 签纸 */
.slip {
  width: 100%; max-width: 380px;
  background: var(--paper-qian);
  color: var(--ink-qian);
  padding: 10px;
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.55);
  font-family: var(--serif-qian);
  text-align: left;
  background-image:
    repeating-linear-gradient(0deg, rgba(120,90,50,.035) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.35), transparent 60%);
}
.slip-frame { border: 3px solid var(--red-qian); outline: 1px solid var(--red-qian); outline-offset: -8px; padding: 18px 20px 14px; display: grid; gap: 12px; }
.slip-top { display: flex; justify-content: space-between; color: var(--red-qian); font-weight: 700; font-size: 15px; letter-spacing: .15em; border-bottom: 1px solid var(--red-qian); padding-bottom: 8px; }
.slip-main { display: flex; flex-direction: row-reverse; justify-content: center; align-items: flex-start; gap: 22px; padding: 6px 0 2px; min-height: 230px; }
.slip-level { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.slip-name { writing-mode: vertical-rl; font-size: 54px; font-weight: 900; line-height: 1; letter-spacing: .08em; }
.slip-seal {
  display: grid; place-items: center;
  width: 56px; height: 56px; padding: 4px;
  background: var(--red-qian); color: var(--paper-qian);
  font-weight: 900; font-size: 22px; line-height: 1.05; text-align: center;
  box-shadow: inset 0 0 0 3px var(--red-qian), inset 0 0 0 5px var(--paper-qian);
  transform: rotate(-6deg);
  writing-mode: vertical-rl;
}
.slip-poem { writing-mode: vertical-rl; display: flex; flex-direction: column; gap: 14px; }
.slip-poem p { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: .2em; line-height: 1.5; }
.slip-jie { margin: 0; font-size: 15px; line-height: 1.7; }
.slip-jie b { color: var(--red-qian); margin-right: 8px; }
.slip-yj { display: grid; gap: 6px; font-size: 15px; }
.slip-yj-item { display: flex; align-items: center; gap: 8px; }
.slip-yj-item i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--paper-qian); font-weight: 900; font-size: 13px; flex: none; }
.slip-yj-item.yi i { background: #2F5D50; }
.slip-yj-item.ji i { background: var(--red-qian); }
.slip-stars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: 13px; }
.slip-stars li { display: flex; justify-content: space-between; }
.slip-stars b { color: var(--red-qian); font-weight: 400; letter-spacing: 1px; }
.slip-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #6B5A44; border-top: 1px solid #C9AE7C; padding-top: 8px; flex-wrap: wrap; }

.slip.unfold { animation: unfold 700ms cubic-bezier(.2,.8,.2,1) both; transform-origin: 50% 0; }
.slip.unfold .slip-seal { animation: seal-press 420ms 650ms cubic-bezier(.2,1.5,.4,1) both; }
@keyframes unfold { 0% { transform: scaleY(.05) translateY(-40px); opacity: 0; } 40% { opacity: 1; } 100% { transform: none; } }
@keyframes seal-press { 0% { transform: rotate(-20deg) scale(2.4); opacity: 0; } 100% { transform: rotate(-6deg) scale(1); opacity: 1; } }

/* 侧栏紧凑版签纸 */
.slip.compact { max-width: none; padding: 7px; box-shadow: none; border: 1px solid #D9C49A; }
.slip.compact .slip-frame { padding: 12px 12px 10px; gap: 8px; border-width: 2px; outline-offset: -6px; }
.slip.compact .slip-top { font-size: 12px; padding-bottom: 6px; }
.slip.compact .slip-main { min-height: 150px; gap: 14px; }
.slip.compact .slip-name { font-size: 36px; }
.slip.compact .slip-seal { width: 40px; height: 40px; font-size: 15px; }
.slip.compact .slip-poem p { font-size: 16px; }
.slip.compact .slip-jie, .slip.compact .slip-yj { font-size: 13px; }
.slip.compact .slip-yj-item i { width: 20px; height: 20px; font-size: 11px; }
.side-qian { display: grid; justify-items: center; gap: 10px; text-align: center; }
.side-qian .card-note { margin: 0; }
.side-qian .tube-wrap { margin-top: 30px; }

/* 分享图弹层 */
.share-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; overflow-y: auto;
  padding: 24px 16px; background: rgba(28,10,6,.96);
  animation: fade-in 200ms ease-out both;
}
.share-inner { display: grid; justify-items: center; gap: 12px; width: 100%; max-width: 380px; }
.share-img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); -webkit-touch-callout: default; user-select: auto; }
.share-tip { margin: 0; color: #F6E3BC; font-size: 13px; text-align: center; }

@keyframes fade-in { from { opacity: 0; } }

/* ============ 宣纸 · 朱砂：组件 ============ */
.top { height: var(--band); padding-top: env(safe-area-inset-top); padding-bottom: 0; margin-bottom: 10px; }
.brand-name {
  font-family: var(--serif); font-weight: 900; font-size: 20px; letter-spacing: .02em;
  color: var(--red); background: #FBE3A6; border: 0; border-radius: 4px; padding: 7px 10px 6px;
  box-shadow: inset 0 0 0 2px #FBE3A6, inset 0 0 0 3.5px var(--red);
  transform: rotate(-2deg);
}
.top .brand-sub, .top .online { color: var(--gold-text); }
.top .ghost-btn { color: var(--gold-text); border-color: rgba(246, 217, 168, .45); }
.top .ghost-btn:hover { color: #FFF1D6; border-color: var(--gold-text); }
@media (min-width: 1180px) { .side { padding-top: 104px; } }

.post, .card { position: relative; border-radius: var(--r-card); }
.post::before, .card::before {
  content: ""; position: absolute; inset: 4px; border: 1px solid var(--frame); border-radius: 2px; pointer-events: none;
}
.chip, .ticker, .quick-btn { border-radius: var(--r-ctl); background: var(--surface); }
.seg { border-radius: var(--r-ctl); }
.seg-btn { border-radius: 3px; }
.chip[aria-pressed="true"], .seg-btn[aria-selected="true"] {
  background: linear-gradient(180deg, #F6D58A, #D9A84E); border-color: transparent; color: #5A1A10; box-shadow: none;
}
.send-btn, .btn-primary { background: linear-gradient(180deg, #B93A26, #8E2414); color: #FFF0D6; letter-spacing: .1em; }
.ticker-val, .mood-big { font-family: var(--serif); }
.composer { background: var(--surface); position: relative; }
@media (min-width: 700px) { .composer { border-radius: 6px 6px 0 0; } }
/* 输入框上方的装饰：一条朱红祥云边 */
.composer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
  background: var(--cloud) center bottom / 120px 40px repeat-x, var(--red);
  border-top: 2px solid var(--gold);
  border-radius: 6px 6px 0 0;
  pointer-events: none;
}
.toast { font-family: var(--font); }

/* ============ 广场 / 离谱题库 切换 ============ */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 16px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); overflow: hidden; }
.board-tab { border: 0; background: transparent; padding: 9px 8px; font-size: 15px; font-weight: 700; color: var(--muted); font-family: var(--serif); letter-spacing: .05em; }
.board-tab + .board-tab { border-left: 1px solid var(--line); }
.board-tab[aria-selected="true"] { background: var(--red); color: #FBE3A6; }
.off { display: none !important; }

.weird-intro {
  display: grid; gap: 2px; margin: 0 16px 10px; padding: 10px 12px;
  border: 1px dashed var(--pine); border-radius: var(--r-ctl); background: var(--surface);
  font-size: 13px; color: var(--muted); line-height: 1.6;
}
.weird-intro strong { color: var(--pine); font-size: 15px; }

/* 题目卡片 */
.q-card { padding-top: 12px; }
.q-src { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.q-text { margin: 8px 0 6px; font-size: 19px; font-weight: 700; line-height: 1.55; word-break: break-word; }
.q-best {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 8px; width: 100%;
  margin: 2px 0 6px; padding: 8px 10px; text-align: left;
  border: 0; border-left: 3px solid #D9A84E; border-radius: 0 4px 4px 0; background: var(--surface-2);
  font-size: 14px; color: var(--ink);
}
.q-best-tag { font-weight: 700; color: #B07A1E; white-space: nowrap; }
.q-best-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.q-best-lol { color: var(--muted); white-space: nowrap; }
.act-answer { font-weight: 700; color: var(--pine); }
.post.is-best { border-color: #D9A84E; box-shadow: 0 0 0 1px #D9A84E inset; }
.best-badge { font-size: 12px; font-weight: 700; color: #5A1A10; background: linear-gradient(180deg, #F6D58A, #D9A84E); padding: 1px 7px; border-radius: 3px; }
.feed-bottom { display: flex; justify-content: center; padding: 12px 0 4px; }
.feed-bottom:empty { display: none; }

/* 管理后台：只用宣纸底，不要横幅装饰 */
body.admin-page { background-image: var(--fiber); background-size: 240px 240px; background-repeat: repeat; background-position: 0 0; }

/* 右上角按钮组：夜间切换 + 规则 */
.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn { padding: 4px 9px; line-height: 1.2; }
.brand { flex: 1; min-width: 0; }
.brand-sub { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 430px) { .top .brand-sub { display: none; } }

/* ============ 意见箱 ============ */
@media (min-width: 1180px) {
  .side-left { display: flex; flex-direction: column; gap: 14px; height: 100vh; padding-bottom: calc(var(--composer-h, 150px) + 8px); }
  .side-left .feedback-card { margin-top: auto; }
}
.feedback-card .card-title { margin-bottom: 4px; }
.feedback-card .card-note { margin: 0 0 10px; }
.btn-secondary.btn-small { padding: 6px 12px; font-size: 14px; }
.mobile-only { display: inline-flex; }
@media (min-width: 1180px) { .mobile-only { display: none; } }
.fb-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.fb-text {
  width: 100%; resize: vertical; padding: 10px 12px; margin: 0 0 14px;
  font-size: 16px; line-height: 1.6; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2);
}
.fb-text:focus { outline: none; border-color: var(--pine); background: var(--surface); }
.terms { margin: -6px 0 16px; font-size: 13px; color: var(--muted); }
.terms summary { cursor: pointer; color: var(--pine); }
.terms p { margin: 6px 0 0; line-height: 1.6; }
.readonly-note { margin: 8px 0 12px; padding: 10px 12px; border: 1px dashed var(--pine); border-radius: var(--r-ctl); background: var(--surface); color: var(--pine); font-size: 14px; }
.modal-actions .btn-secondary:first-child { margin-right: auto; }

/* 隐藏的发言（只有自己看得到） */
.post.is-hidden { background: repeating-linear-gradient(135deg, var(--surface) 0 10px, var(--surface-2) 10px 20px); border-style: dashed; }
.post.is-hidden .post-body, .post.is-hidden .q-text { opacity: .6; }
.post.is-hidden .stamp { opacity: .35; }
.hidden-note { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.act-hide { margin-left: auto; }
.act-hide + .act-del { margin-left: 0; }

/* ============ 三个版块切换 ============ */
.boards { grid-template-columns: repeat(3, 1fr); }
.board-tab { padding: 9px 4px; font-size: 14px; white-space: nowrap; }

/* 安全说明 */
.safe-box { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.safe-box strong { color: var(--pine); }
.safe-box ul { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--ink); }
.safe-link { margin-left: auto; text-decoration: none; color: var(--muted); }

/* ============ 情报站 ============ */
.intel { display: grid; gap: 10px; padding-bottom: 24px; }
.intel-h { margin: 14px 0 0; font-size: 17px; font-family: var(--serif); display: flex; align-items: baseline; gap: 8px; }
.report-card .card-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.report-form { display: grid; gap: 10px; }
.report-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8px; }
.report-row input {
  min-width: 0; padding: 9px 12px; font-size: 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2);
}
.report-row input:focus { outline: none; border-color: var(--pine); background: var(--surface); }
.rp-stages { flex-wrap: wrap; }
.report-form .btn-primary { justify-self: start; padding: 9px 26px; }
.report-card .card-note { margin-top: 8px; }

.prog-list, .prog-recent, .cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prog-card { position: relative; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.prog-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prog-name { font-size: 16px; }
.prog-today { font-size: 12px; font-weight: 700; color: #5A1A10; background: linear-gradient(180deg, #F6D58A, #D9A84E); padding: 1px 7px; border-radius: 3px; }
.prog-head .card-meta { margin-left: auto; }
.prog-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.prog-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.prog-pill b { font-variant-numeric: tabular-nums; }
.prog-pill.is-offer { border-color: var(--pine); color: var(--pine); }
.prog-pill.is-reject { color: var(--muted); }
.prog-empty { padding: 16px; border: 1px dashed var(--line); border-radius: var(--r-card); color: var(--muted); font-size: 14px; display: grid; gap: 2px; }
.prog-empty strong { color: var(--ink); }
.prog-recent li { font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.prog-recent li:last-child { border-bottom: 0; }
.prog-recent .card-meta { margin-right: 6px; }

.cal-filters { padding-left: 0; padding-right: 0; }
.cal-item { padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.cal-item.is-ended { opacity: .7; }
.cal-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.cal-status { font-weight: 700; padding: 1px 8px; border-radius: 3px; font-size: 12px; }
.s-open { background: var(--pine); color: var(--pine-ink); }
.s-soon { background: linear-gradient(180deg, #F6D58A, #D9A84E); color: #5A1A10; }
.s-ended { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.cal-date { color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-left { margin-left: auto; color: var(--pine); font-weight: 700; }
.cal-title { margin: 6px 0 2px; font-size: 15px; }
.cal-title strong { margin-right: 2px; }
.cal-cat { margin-left: 8px; font-size: 12px; color: var(--muted); }
.cal-desc { margin: 2px 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.cal-links { margin: 6px 0 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.cal-links a { color: var(--pine); }
.cal-links .cal-src { color: var(--muted); }
.cal-more { display: flex; justify-content: center; }
.cal-note { margin: 4px 0 0; }

/* ============ 我的消息 ============ */
.bell { position: relative; }
.bell-dot {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--gold); color: #5A1A10; font: 700 11px/18px system-ui, sans-serif; text-align: center;
  box-shadow: 0 0 0 2px var(--red);
}
.notif-sub { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notif-item {
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); color: var(--ink); font: inherit;
}
.notif-item:hover { border-color: var(--pine); }
.notif-item.is-new { background: var(--mine); border-color: var(--gold); }
.notif-ic { font-size: 22px; line-height: 30px; text-align: center; }
.notif-main b { font-size: 15px; }
.notif-quote { margin-top: 4px; padding-left: 8px; border-left: 3px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; word-break: break-word; }
.notif-meta { margin-top: 4px; color: var(--muted); font-size: 12px; word-break: break-word; }
.notif-empty { white-space: pre-line; padding: 24px 12px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.8; }
/* 窄屏手机：按钮多了，把标题和按钮都收紧一点，避免挤到一起 */
@media (max-width: 400px) {
  .top .brand-name { font-size: 17px; padding: 6px 8px 5px; white-space: nowrap; }
  .top-actions { gap: 4px; }
  .top .icon-btn { padding: 4px 7px; }
  .top #rulesBtn { padding-left: 9px; padding-right: 9px; }
}
/* 特别窄的手机：顶部的 📮 收起来（规则弹窗里也有意见箱入口） */
@media (max-width: 350px) { .top #feedbackTop { display: none; } }

/* 签纸：幸运物 / 贵人 */
.slip-extra { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.slip-extra span { white-space: nowrap; }

/* ============ 迷你月历 ============ */
.mini-cal-card { padding-bottom: 14px; }
.mini-cal-inline { padding: 12px 14px; }
@media (min-width: 1180px) {
  .mini-cal-inline { display: none; }      /* 宽屏左栏已经有一份 */
  .side-left { overflow-y: auto; scrollbar-width: none; }
  .side-left::-webkit-scrollbar { display: none; }
}
.mc-nav { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 6px; }
.mc-month { font-size: 15px; }
.mc-arrow { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.mc-arrow:hover { border-color: var(--pine); color: var(--pine); }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mc-wd { font-size: 11px; color: var(--muted); padding: 2px 0 4px; }
.mc-day {
  position: relative; display: grid; place-items: center; height: 36px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer;
}
.mini-cal-card .mc-day { height: 31px; font-size: 12px; }
.mc-day:hover { background: var(--surface-2); }
.mc-day.is-past { color: var(--muted); }
.mc-day.in-range { background: rgba(169, 58, 40, .08); }
.mc-day.is-today .mc-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--pine); color: var(--pine); font-weight: 700; }
.mc-day.is-sel { background: var(--pine); color: var(--pine-ink); }
.mc-day.is-sel .mc-num { color: var(--pine-ink); box-shadow: none; }
.mc-day.is-sel .mc-dots i { box-shadow: 0 0 0 1.5px var(--pine-ink); }
.mc-dots { position: absolute; bottom: 3px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.mc-dots i, .mc-legend span::before { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.dot-due, .lg-due::before { background: #C0392B; }
.dot-event, .lg-event::before { background: #D9A84E; }
.dot-begin, .lg-begin::before { background: #2F7D5B; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.mc-legend span::before { content: ""; margin-right: 4px; vertical-align: 1px; }
.mc-legend .lg-tip::before { display: none; }
.mc-sub { margin: 10px 0 4px; font-size: 13px; font-weight: 700; color: var(--ink); }
.mc-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 13px; line-height: 1.5; }
.mc-list li { padding-left: 10px; border-left: 2px solid var(--line); }
.mc-when { display: block; color: var(--pine); font-size: 12px; }

/* 情报站：二级筛选、按日期筛选、来源类型 */
.cal-sub { margin-top: -4px; }
.chip-sub { font-size: 13px; padding: 4px 10px; }
.cal-day-note { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--mine); font-size: 14px; }
.cal-day-note[hidden] { display: none; }
.src-type { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 3px; font-size: 11px; line-height: 17px; text-decoration: none; vertical-align: 1px; }
.st-gov { background: var(--pine); color: var(--pine-ink); }
.st-edu { background: #2F5D50; color: #F3EBDB; }
.st-media { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
