/* ── 心墙 · 全站样式 ── */

/* 季节主题:默认秋日,按月份由服务端在 <html data-season="..."> 上切换 */
:root {
  --ink: #4a3f52;
  --muted: #9b8fa6;
  --danger: #d64545;
  --ok: #3aa76d;
  /* 秋日(9-11 月):枫叶橙 + 暖纸色 */
  --bg1: #fdf1e2;
  --bg2: #f9e8cf;
  --bg3: #fdeede;
  --card: #fffdf6;
  --line: #ecdfc8;
  --accent: #d97a3d;
  --accent-deep: #b95f28;
  --accent-soft: #fbe8d4;
  --glow2: #f7d9a4;
  --shadow: 0 6px 18px rgba(170, 120, 60, .14);
}

[data-season="spring"] {
  /* 春日(3-5 月):樱粉 + 新绿 */
  --bg1: #f2fbf1;
  --bg2: #e6f7ea;
  --bg3: #fdeef6;
  --card: #fdfefb;
  --line: #e0eedd;
  --accent: #e889b4;
  --accent-deep: #d06a9c;
  --accent-soft: #ffe3f0;
  --glow2: #d3f0d9;
  --shadow: 0 6px 18px rgba(210, 110, 160, .14);
}

[data-season="summer"] {
  /* 夏日(6-8 月):天空蓝 + 日光黄 */
  --bg1: #e9f6fe;
  --bg2: #d9eefe;
  --bg3: #eafbf3;
  --card: #fbfeff;
  --line: #d8e8f2;
  --accent: #2f9edb;
  --accent-deep: #1f7fb8;
  --accent-soft: #d8eefe;
  --glow2: #ffedb8;
  --shadow: 0 6px 18px rgba(50, 130, 190, .14);
}

[data-season="winter"] {
  /* 冬日(12-2 月):冰蓝 + 雪白 */
  --bg1: #eef4fc;
  --bg2: #e6eefb;
  --bg3: #f4f6ff;
  --card: #fbfdff;
  --line: #d8e2f0;
  --accent: #6f9bd6;
  --accent-deep: #4e7cb8;
  --accent-soft: #dde9f8;
  --glow2: #eef3fd;
  --shadow: 0 6px 18px rgba(90, 120, 170, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 关键:hidden 必须能压过自定义的 display(flex 等),否则弹窗/面板收不起来 */
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 75% 55% at 15% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(ellipse 65% 55% at 88% 18%, var(--glow2, transparent), transparent 60%),
    linear-gradient(165deg, var(--bg1), var(--bg2) 60%, var(--bg3));
  background-attachment: fixed;
  font-family: "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.7;
}

::selection { background: var(--accent); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 蜜罐字段:人类不可见 */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.site-header, main, .site-footer, .topbar { position: relative; z-index: 1; }

/* ── 季节粒子:春樱花瓣 / 夏气泡 / 秋落叶 / 冬雪 ── */
.bg-hearts { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.pt {
  position: absolute;
  top: -30px;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
/* 春:樱花花瓣,粉白两色,摇摆飘落 */
[data-season="spring"] .pt {
  border-radius: 0 55% 55% 55%;
  background: linear-gradient(135deg, #ffe3ef, #f8aac9);
  opacity: .75;
  animation-name: fall-sway;
}
[data-season="spring"] .pt:nth-child(even) {
  background: linear-gradient(135deg, #fff0f7, #fbc4dc);
}
/* 夏:透明气泡,缓缓上升 */
[data-season="summer"] .pt {
  border-radius: 50%;
  border: 1.5px solid rgba(70, 160, 220, .4);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .85),
              rgba(190, 225, 250, .2) 65%, transparent);
  opacity: .8;
  animation-name: rise;
}
/* 秋:落叶,橙红两色,旋转飘落 */
[data-season="autumn"] .pt {
  border-radius: 0 50% 0 50%;
  background: linear-gradient(135deg, #f2ae62, #c96a2a);
  opacity: .8;
  animation-name: fall-sway;
}
[data-season="autumn"] .pt:nth-child(even) {
  background: linear-gradient(135deg, #e8c05a, #b35a20);
}
/* 冬:雪花,冰蓝小点 + 六角雪花形 */
[data-season="winter"] .pt {
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffffff, #c9ddf4 75%);
  opacity: .9;
  animation-name: fall;
}
[data-season="winter"] .pt.flake {
  background: #bcd4ee;
  -webkit-mask: url('/static/icons/snowflake.svg') no-repeat center / contain;
  mask: url('/static/icons/snowflake.svg') no-repeat center / contain;
}
@keyframes fall {
  from { transform: translateY(-6vh) translateX(0); }
  to   { transform: translateY(106vh) translateX(-14px); }
}
@keyframes fall-sway {
  0%   { transform: translateY(-6vh) translateX(0)     rotate(0deg); }
  25%  { transform: translateY(22vh) translateX(26px)  rotate(100deg); }
  50%  { transform: translateY(50vh) translateX(-22px) rotate(200deg); }
  75%  { transform: translateY(78vh) translateX(18px)  rotate(300deg); }
  100% { transform: translateY(106vh) translateX(-10px) rotate(360deg); }
}
@keyframes rise {
  from { transform: translateY(106vh) translateX(0); }
  to   { transform: translateY(-8vh) translateX(16px); }
}

/* ── 顶部导航 ── */
/* z-index 必须高于下方内容:否则导航栏弹出的季节菜单会被
   后面的 .site-header / main(同样 z-index:1、DOM 更靠后)盖住点不到;
   页面刚加载的 1 秒内入场动画还会额外制造层叠上下文,更要靠它兜底 */
.topbar {
  position: relative;
  z-index: 100;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 18px 0;
}
.site-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink-soft, var(--muted));
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover { color: var(--accent-deep); border-color: var(--accent); }
.site-nav a.nav-reg {
  padding: 4px 14px;
  border: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-deep);
}
.site-nav a.nav-reg:hover {
  background: var(--accent-soft);
  border-color: var(--accent-deep);
  color: var(--accent-deep);
}
.nav-form { display: inline; margin: 0; }
.nav-form button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  padding-bottom: 2px;
}
.nav-form button:hover { color: var(--accent-deep); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink) !important;
  border: none !important;
}
.chip-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 13px;
  color: var(--accent-deep);
}

/* ── 页头 ── */
.site-header { text-align: center; padding: 30px 16px 6px; }
.site-header h1 {
  font-size: 44px;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--accent-deep);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline {
  margin-top: 10px;
  font-size: 14.5px;
  letter-spacing: .12em;
  color: var(--muted);
}
.season-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  letter-spacing: .05em;
}
.season-badge .ico { width: 13px; height: 13px; }

/* 季节切换:图标按钮 + 弹出菜单 */
.season-menu { position: relative; display: inline-flex; align-items: center; }
.season-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--accent-deep);
  cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s;
}
.season-btn .ico { width: 16px; height: 16px; }
.season-btn:hover { border-color: var(--accent); background: var(--accent-soft); transform: rotate(15deg); }
/* ── 消息通知:右上角铃铛 + 下拉面板 ── */
.notif-menu { position: relative; display: inline-flex; align-items: center; }
.notif-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1.5px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--accent-deep);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.notif-btn .ico { width: 16px; height: 16px; }
.notif-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.notif-dot {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #e2607e; color: #fff;
  font-size: 10.5px; font-style: normal; font-weight: 700; line-height: 16px;
  text-align: center;
}
.notif-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  width: 300px; max-width: 88vw; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 28px rgba(120, 90, 70, .18);
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px 8px; font-size: 13.5px; color: var(--accent-deep);
  border-bottom: 1px solid var(--line);
}
.notif-readall {
  border: none; background: none; color: var(--muted);
  font-size: 12px; font-family: inherit; cursor: pointer; padding: 2px 4px;
}
.notif-readall:hover { color: var(--accent-deep); }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: 8px 9px; border: none; border-radius: 9px;
  background: none; text-align: left; cursor: pointer;
  font-family: inherit; color: var(--ink); font-size: 13px;
}
.notif-item:hover { background: var(--accent-soft); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread .notif-text { font-weight: 600; }
.notif-item.unread .notif-text::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: #e2607e; vertical-align: 1px;
}
.notif-time { font-size: 11.5px; color: var(--muted); }
.notif-empty { padding: 16px 10px; font-size: 12.5px; color: var(--muted); text-align: center; }
.notif-all {
  display: block; padding: 8px; text-align: center;
  font-size: 12.5px; color: var(--accent-deep); text-decoration: none;
  border-top: 1px solid var(--line); margin-top: 4px;
}
.notif-all:hover { color: var(--accent); }
/* ── 举报:帖子/主页上的入口 + 后台审核区 ── */
.report-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--muted); font-size: 12.5px; text-decoration: none;
}
.report-link .ico { width: 13px; height: 13px; }
.report-link:hover { color: #d9534f; }
/* 主页头图上的举报入口:和私信按钮一样小小的 */
.profile-id .profile-report {
  margin-top: 10px; margin-left: 8px; padding: 4px 11px;
  border-radius: 999px; background: rgba(255, 255, 255, .82);
  font-size: 12.5px; color: var(--muted);
}
.profile-id .profile-report:hover { background: #fff; color: #d9534f; }
.report-form { max-width: 640px; margin: 0 auto; }
.report-form textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 12px; font-family: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--card); resize: vertical; margin-bottom: 10px;
}
.report-form textarea:focus { outline: none; border-color: var(--accent); }
/* 后台:举报列表 */
.report-row {
  padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.report-row.open { border-left: 4px solid #d9534f; }
.report-row.done { opacity: .75; }
.report-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.report-meta { color: var(--muted); font-size: 12.5px; }
.report-reason { margin: 6px 0; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; }
.report-imgs { display: flex; gap: 6px; margin-bottom: 6px; }
.report-imgs img, .report-imgs video { width: 80px; height: 60px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.report-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.report-punish { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-punish .plain-input { max-width: 120px; }
.danger-tag { background: #fde8e8; color: #c0392b; }
.inline-form { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ── 私信:主页展开的面板 / 聊天页 / 聊天列表 ── */
.dm-panel {
  max-width: 640px; margin: 16px auto 0; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
}
.dm-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--accent-deep);
}
/* 私信提醒语(后台「开发者设置」里可改) */
.dm-notice {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 0 0 10px; padding: 8px 12px;
  background: var(--accent-soft); border-radius: 10px;
  font-size: 12.5px; line-height: 1.7; color: var(--accent-deep);
}
.dm-notice .ico { width: 14px; height: 14px; margin-top: 2px; flex: none; }
.dm-panel-head .ico { width: 15px; height: 15px; }
.dm-close {
  border: none; background: none; color: var(--muted); cursor: pointer;
  font-size: 14px; font-family: inherit; padding: 2px 6px;
}
.dm-close:hover { color: var(--accent-deep); }
.dm-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 340px; min-height: 90px; overflow-y: auto;
  padding: 10px 4px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px;
}
.dm-list-page { max-height: 460px; }
/* 每条消息:头像 + 气泡(点头像去对方主页)。
   头像和气泡第一行对齐(不是沉到时间戳那一行),大小跟消息比例协调 */
.dm-msg { display: flex; align-items: flex-start; gap: 9px; }
.dm-msg.mine { flex-direction: row-reverse; }
.dm-avatar-link { flex: none; display: inline-flex; margin-top: 1px; }
.dm-avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: inline-flex;
  align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
  color: var(--accent-deep); border: 1px solid var(--line);
}
.dm-avatar-link:hover .dm-avatar { border-color: var(--accent); }
.dm-body {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  max-width: calc(82% - 44px);
}
.dm-msg.mine .dm-body { align-items: flex-end; }
.dm-bubble {
  max-width: 100%; padding: 7px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.7; word-break: break-word; white-space: pre-wrap;
}
.dm-msg.mine .dm-bubble { background: var(--accent); border-color: var(--accent); color: #fff; }
.dm-img { max-width: 100%; max-height: 200px; border-radius: 12px; cursor: zoom-in; }
.dm-img-video { max-width: 100%; max-height: 220px; border-radius: 12px; background: #000; }
.dm-time { font-size: 11px; color: var(--muted); }
.dm-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 0; }
.dm-form { margin-top: 10px; }
.dm-form textarea {
  width: 100%; padding: 9px 12px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 13.5px; color: var(--ink); background: var(--card);
}
.dm-form textarea:focus { outline: none; border-color: var(--accent); }
.dm-form-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}
.dm-form-foot .dm-send { margin-left: auto; }
.dm-img-name { font-size: 12px; color: var(--muted); max-width: 160px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.dm-hint { min-height: 17px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.dm-more { margin-top: 8px; font-size: 12.5px; text-align: right; }
.dm-more a { color: var(--accent-deep); text-decoration: none; }
.dm-more a:hover { color: var(--accent); }
/* 主页头图上的私信按钮:做小一点、淡一点,别挡着背景图 */
.profile-id .dm-open {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; padding: 4px 13px;
  font-size: 12.5px; font-weight: 500;
  background: rgba(255, 255, 255, .9);
  border: none; border-radius: 999px; color: var(--accent-deep);
  box-shadow: 0 2px 8px rgba(90, 60, 50, .18);
}
.profile-id .dm-open .ico { width: 13px; height: 13px; }
.profile-id .dm-open:hover { background: #fff; color: var(--accent); }
/* 聊天页 */
.dm-page {
  max-width: 640px; margin: 0 auto; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
}
/* 聊天列表(消息通知页的私信分类) */
.dm-convs { display: flex; flex-direction: column; gap: 8px; }
.dm-conv {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); text-decoration: none; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.dm-conv:hover { border-color: var(--accent); background: var(--accent-soft); }
.dm-conv.has-unread { border-color: var(--accent); }
.dm-conv-avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: var(--accent-deep);
}
.dm-conv-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dm-conv-main b { font-size: 13.5px; }
.dm-conv-last {
  font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-conv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dm-conv-time { font-size: 11.5px; color: var(--muted); }
.dm-conv-num {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e2607e; color: #fff; font-size: 11px; font-style: normal;
  font-weight: 700; line-height: 18px; text-align: center;
}
/* 铃铛下拉里的未读私信提示 */
.notif-dm {
  display: flex; align-items: center; gap: 7px;
  margin: 6px 2px; padding: 8px 10px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.notif-dm .ico { width: 15px; height: 15px; }

/* 消息通知页:帖子评论/收藏/评分三个分类按钮 */
.notif-tabs {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap; margin: 14px 0 2px;
}
.notif-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font-size: 13.5px; text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.notif-tab .ico { width: 15px; height: 15px; color: var(--muted); }
.notif-tab:hover { border-color: var(--accent); color: var(--accent-deep); }
.notif-tab.on {
  border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent-deep); font-weight: 600;
}
.notif-tab.on .ico { color: var(--accent-deep); }
.notif-tab-num {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: #e2607e; color: #fff; font-size: 10.5px; font-style: normal;
  font-weight: 700; line-height: 17px; text-align: center;
}

/* 全部消息页 */
.notif-page { display: flex; flex-direction: column; gap: 4px; }
.notif-page .notif-item { border: 1px solid var(--line); background: var(--card); }
.notif-page .notif-item.unread { background: var(--accent-soft); }

.season-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 156px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(120, 90, 70, .18);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.season-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.season-opt:hover { background: var(--accent-soft); }
.season-opt.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.season-opt em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.season-opt .ico { width: 15px; height: 15px; }
.sp-spring { color: #e889b4; }
.sp-summer { color: #e8a33d; }
.sp-autumn { color: #d97a3d; }
.sp-winter { color: #6f9bd6; }

/* 分区标签 */
.sec-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sec-tab {
  padding: 4px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: all .2s;
}
.sec-tab:hover { border-color: var(--accent); color: var(--accent-deep); }
.sec-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 发帖时的分区选择:标签式按钮组(触屏友好) */
.sec-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px 10px 5px 6px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
}
.sec-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
  color: var(--muted);
  font-size: 13px;
}
.sec-chip {
  padding: 5px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s;
}
.sec-chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.sec-chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── 个人名片 ── */
.hero {
  max-width: 640px;
  margin: 22px auto 22px;
  padding: 26px 24px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.hero-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px; height: 88px;
  margin: 0 auto 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: 0 4px 14px rgba(224, 96, 126, .3);
  font-size: 44px;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero h2 { font-size: 24px; color: var(--accent-deep); }
.hero-bio { max-width: 460px; margin: 8px auto 14px; font-size: 14.5px; color: var(--muted); }
.hero-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hero-links a {
  padding: 4px 16px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent-deep);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.hero-links a:hover { background: var(--accent); color: #fff; }
.hero-more { margin-top: 12px; font-size: 13.5px; }
.hero-more a { color: var(--accent-deep); text-decoration: none; border-bottom: 1px dashed var(--accent); padding-bottom: 1px; }
.hero-more a:hover { color: var(--accent); }
.hero-avatar .ico { width: 42px; height: 42px; color: var(--accent); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 2px;
}
.hero-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 13.5px;
}

/* ── 每日一言(首页公告栏上方)── */
.daily-quote {
  max-width: 640px;
  margin: 20px auto 18px;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, var(--card), var(--accent-soft));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.dq-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  position: relative;
  margin-bottom: 10px;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--accent-deep);
}
.dq-head .ico { width: 14px; height: 14px; }
.dq-submit {
  position: absolute;
  right: 0;
  font-size: 12.5px;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.dq-submit:hover { color: var(--accent-deep); border-color: var(--accent); }
.dq-text {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
  color: var(--ink);
}
.dq-text a { color: var(--accent-deep); }
.dq-empty { color: var(--muted); font-size: 15px; }
.dq-from {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.dq-user { color: var(--accent-deep); }
/* 后台:一模一样的审核条目 */
.quote-review {
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--accent-soft);
  border-radius: 12px;
}

/* ── 公告栏 ── */
.announce {
  max-width: 640px;
  margin: 20px auto 22px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.announce-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-deep);
}
.announce-item {
  padding: 5px 0;
  font-size: 13.5px;
}
.announce-main { display: flex; gap: 10px; }
.announce-time { flex: none; color: var(--muted); font-size: 12.5px; padding-top: 2px; }
.announce-content { color: var(--ink); }
.announce-imgs { display: flex; gap: 6px; margin-top: 6px; }
.announce-imgs img, .announce-imgs video {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
}

/* ── 关于作者页 ── */
.about-page { max-width: 680px; margin: 0 auto; padding: 26px 18px 40px; }
.about-text {
  margin-top: 22px;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.about-text h2 {
  margin-bottom: 12px;
  font-size: 19px;
  color: var(--accent-deep);
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.about-text p {
  text-indent: 2em;
  margin-bottom: 10px;
  font-size: 15px;
}
.about-back { margin-top: 18px; text-align: center; font-size: 14px; }
.about-back a { color: var(--muted); text-decoration: none; }
.about-back a:hover { color: var(--accent-deep); }

/* 通用图标(Lucide,MIT/ISC 许可,本地自托管;CSS mask 实现随文字换色) */
.ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.15em;
  background-color: currentColor;
  -webkit-mask: var(--ico) no-repeat center / contain;
  mask: var(--ico) no-repeat center / contain;
}
.ico-camera { --ico: url('/static/icons/camera.svg'); }
.ico-search { --ico: url('/static/icons/search.svg'); }
.ico-bell { --ico: url('/static/icons/bell.svg'); }
.ico-send { --ico: url('/static/icons/send.svg'); }
.ico-flag { --ico: url('/static/icons/flag.svg'); }
.ico-trash { --ico: url('/static/icons/trash-2.svg'); }
.ico-heart { --ico: url('/static/icons/heart.svg'); }
.ico-heart-filled { --ico: url('/static/icons/heart-filled.svg'); }
.ico-cmt { --ico: url('/static/icons/message-circle.svg'); }
.ico-refresh { --ico: url('/static/icons/refresh-cw.svg'); }
.ico-eyeoff { --ico: url('/static/icons/eye-off.svg'); }
.ico-lock { --ico: url('/static/icons/lock.svg'); }
.ico-pin { --ico: url('/static/icons/pin.svg'); }
.ico-flower-2 { --ico: url('/static/icons/flower-2.svg'); }
.ico-sun { --ico: url('/static/icons/sun.svg'); }
.ico-leaf { --ico: url('/static/icons/leaf.svg'); }
.ico-snowflake { --ico: url('/static/icons/snowflake.svg'); }
.ico-x { --ico: url('/static/icons/x.svg'); }
.ico-megaphone { --ico: url('/static/icons/megaphone.svg'); }
.ico-mail { --ico: url('/static/icons/mail.svg'); }
.ico-users { --ico: url('/static/icons/users.svg'); }
.ico-msgs { --ico: url('/static/icons/message-square.svg'); }
.ico-columns { --ico: url('/static/icons/columns-3.svg'); }
.ico-rows { --ico: url('/static/icons/rows-3.svg'); }
.ico-star { --ico: url('/static/icons/star.svg'); }
.ico-smile { --ico: url('/static/icons/smile.svg'); }
.ico-chevron { --ico: url('/static/icons/chevron-down.svg'); }
.ico-bookmark { --ico: url('/static/icons/bookmark.svg'); }
.ico-sort { --ico: url('/static/icons/arrow-up-down.svg'); }
.ico-clipboard { --ico: url('/static/icons/clipboard-list.svg'); }
.ico-feather { --ico: url('/static/icons/feather.svg'); }
.ico-bulb { --ico: url('/static/icons/lightbulb.svg'); }
.ico-thumb { --ico: url('/static/icons/thumbs-up.svg'); }
.ico-edit { --ico: url('/static/icons/pencil.svg'); }
.ico-eye { --ico: url('/static/icons/eye.svg'); }
.ico-link { --ico: url('/static/icons/link.svg'); }
.ico-share { --ico: url('/static/icons/share-2.svg'); }
.ico-copy { --ico: url('/static/icons/copy.svg'); }
.ico-crown { --ico: url('/static/icons/crown.svg'); }
.ico-shield { --ico: url('/static/icons/shield.svg'); }
.ico-user-cog { --ico: url('/static/icons/user-cog.svg'); }

/* ── 发帖区(便签纸 + 图钉)── */
.compose {
  position: relative;
  max-width: 640px;
  margin: 26px auto 22px;
  padding: 22px 24px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.compose .pin.ico {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 26px;
  height: 26px;
  color: var(--accent-deep);
  transform: translateX(-50%) rotate(-8deg);
}
#content {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: inherit;
  background: #fff;
  resize: vertical;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#content:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#content::placeholder { color: var(--muted); }

.compose-meta { margin-top: 12px; }
.row1 { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row1 input[type="text"] {
  flex: 1;
  min-width: 160px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
}
.row1 input[type="text"]:focus { border-color: var(--accent); }
.img-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px dashed var(--accent);
  border-radius: 10px;
  color: var(--accent-deep);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: background .2s;
}
.img-btn:hover { background: var(--accent-soft); }
.as-tip { font-size: 12.5px; color: var(--muted); }
.anon-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: background .2s, border-color .2s, color .2s;
}
.anon-check input { accent-color: var(--accent); }
.anon-check:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.img-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
}
.img-preview-item { position: relative; width: 104px; height: 84px; }
.img-preview-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.img-remove {
  position: absolute;
  top: -7px; right: -7px;
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(40, 30, 40, .78);
  color: #fff;
  cursor: pointer;
  transition: background .2s;
}
.img-remove:hover { background: var(--danger); }
.img-remove .ico { width: 11px; height: 11px; }
.img-count { align-self: center; font-size: 12.5px; color: var(--muted); }

.row2 {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 26px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(224, 96, 126, .35);
  transition: transform .15s, box-shadow .2s;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(224, 96, 126, .45); }
.submit-btn:active { transform: scale(.97); }
.compose .captcha-row { margin-bottom: 0; padding: 7px 10px; }
.guest-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.guest-hint a { color: var(--accent-deep); }

/* 未登录提示 */
.compose-login { text-align: center; padding: 12px 0 6px; }
.compose-login p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 12px;
}
.compose-login-btns { display: flex; justify-content: center; gap: 12px; }
.btn-main, .btn-ghost {
  display: inline-block;
  padding: 9px 30px;
  border-radius: 999px;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform .15s, background .2s;
}
.btn-main {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 12px rgba(224, 96, 126, .35);
}
.btn-ghost {
  border: 1.5px solid var(--accent);
  color: var(--accent-deep);
  background: transparent;
}
.btn-main:hover { transform: translateY(-2px); }
.btn-ghost:hover { background: var(--accent-soft); }

/* ── 提示消息 ── */
.flash-box {
  max-width: 640px;
  margin: 0 auto 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash {
  padding: 12px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 14.5px;
}
.flash.error { border-left-color: var(--danger); }
.flash.ok { border-left-color: var(--ok); }

/* ── 帖子墙(瀑布流)── */
.wall-bar {
  position: relative;
  z-index: 50;              /* 高于 .wall(入场动画播放期间 .wall 带 transform 会成层叠上下文),否则排序下拉会被帖子卡片盖住点不到 */
  max-width: 1120px;
  margin: 24px auto 0;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.layout-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.layout-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 13px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.layout-toggle button .ico { width: 13px; height: 13px; }
.layout-toggle button:hover { color: var(--accent-deep); }
.layout-toggle button.on { background: var(--accent-soft); color: var(--accent-deep); }

.wall {
  max-width: 1120px;
  margin: 12px auto 0;
  padding: 0 18px;
  column-count: 3;
  column-gap: 18px;
}
.note {
  break-inside: avoid;
  margin-bottom: 18px;
  padding: 16px 18px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;                 /* 点击卡片进入专属页 */
  transition: box-shadow .2s, transform .2s;
}
.note:hover { box-shadow: 0 8px 22px rgba(160, 120, 140, .2); }
.note:active { transform: scale(.995); }
.note-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 700;
  color: var(--accent-deep);
  font-size: 16px;
}
.avatar.small { width: 24px; height: 24px; font-size: 11.5px; }
.avatar-img {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.avatar-img.small { width: 24px; height: 24px; }
.note-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.note-meta b { font-size: 14.5px; }
.note-meta span { font-size: 12px; color: var(--muted); }
.del-btn { border: none; background: none; cursor: pointer; font-size: 15px; opacity: .35; transition: opacity .2s; }
.del-btn:hover { opacity: 1; }
.del-form { display: flex; gap: 8px; margin-top: 10px; }
.del-form input {
  flex: 1;
  padding: 7px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: inherit;
  outline: none;
}
.del-form button {
  padding: 7px 14px;
  border: none;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.note-body { white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.note-img {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  cursor: zoom-in;
}
/* 视频:和图片同款排版,用浏览器原生控件播放(不进灯箱)*/
.note-img-video {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  background: #000;
}

.note-foot { display: flex; gap: 14px; margin-top: 10px; }
.like-btn, .cmt-btn, .rate-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: color .2s, transform .15s;
}
.like-btn:hover, .cmt-btn:hover, .rate-btn:hover { color: var(--accent-deep); }
.like-btn:active, .rate-btn:active { transform: scale(1.15); }
.like-btn.liked { color: var(--accent); }
.like-btn .ico-heart-filled { display: none; }
.like-btn.liked .ico-heart { display: none; }
.like-btn.liked .ico-heart-filled { display: inline; }

/* 评分(1-10 分取代点赞) */
.rate-btn .ico-star { width: 15px; height: 15px; }
.rate-btn .avg { font-weight: 700; color: var(--ink); }
.rate-btn.rated { color: var(--gold, #b0822c); }
.rate-btn.rated .avg { color: var(--gold, #b0822c); }
.rate-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--accent-deep);
}
.rate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rate-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  color: var(--accent-deep);
  cursor: pointer;
  transition: background .2s;
}
.rate-close .ico { width: 11px; height: 11px; }
.rate-close:hover { background: #fff; }
.rate-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.rate-num {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.rate-num:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.rate-num.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

/* 卡片底部的分享按钮(点击复制链接) */
.share-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: color .2s, transform .15s;
}
.share-copy .ico { width: 14px; height: 14px; }
.share-copy:hover { color: var(--accent-deep); }
.share-copy:active { transform: scale(1.15); }
.share-copy.copied { color: var(--ok); }
.share-copy.copied .share-label { display: none; }
.share-copy.copied::after { content: '已复制'; }

/* 导航里的「管理」入口(管理员可见) */
.nav-admin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 13px !important;
  border: 1.5px solid var(--accent) !important;
  border-radius: 999px;
  color: var(--accent-deep) !important;
}
.nav-admin .ico { width: 13px; height: 13px; }
.nav-admin:hover { background: var(--accent-soft); }

/* ── 帖子专属页 ── */
.detail { max-width: 760px; margin: 0 auto; padding: 22px 18px 40px; }
.detail-share {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
/* 注意:这个按钮同时带 btn-main 和 share-copy 两个类,
   .share-copy 的规则在后面会盖掉主色,所以这里必须显式写全背景与文字颜色 */
.detail-share .btn-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 26px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 4px 12px rgba(224, 96, 126, .35);
  cursor: pointer;
  font-family: inherit;
  font-size: 14.5px;
  transition: transform .15s, background .2s;
}
.detail-share .btn-main:hover { transform: translateY(-2px); }
.detail-share .btn-main .ico { width: 15px; height: 15px; }
.detail-share .btn-main.copied { background: var(--ok); color: #fff; }
.detail-share .btn-main.copied::after { content: '✓'; margin-left: 2px; }
.detail-share-hint { font-size: 12.5px; color: var(--muted); }
.admin-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent-soft);
  border-radius: 12px;
  color: var(--accent-deep);
}
.admin-notice .ico { width: 15px; height: 15px; }
.detail-back { margin-bottom: 12px; font-size: 13.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-back a { color: var(--muted); text-decoration: none; }
.detail-back a:hover { color: var(--accent-deep); }
/* 帖子编号:和管理后台帖子表里的 ID 一致 */
.detail-no {
  padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.detail .wall { max-width: none; margin: 0; padding: 0; column-count: 1; }
.detail-cmts { margin-top: 20px; }
.detail-cmt-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-size: 17px;
  color: var(--accent-deep);
}
.detail .cmts { display: block; }

/* ── 后台:统计与标签导航 ── */
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-top h1 { font-size: 26px; color: var(--accent-deep); }
.admin-id { display: flex; align-items: center; gap: 10px; }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.stat-card {
  padding: 12px 8px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.stat-card b { display: block; font-size: 21px; color: var(--accent-deep); }
.stat-card span { font-size: 12.5px; color: var(--muted); }
.admin-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.admin-tabs a {
  padding: 5px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: all .18s;
}
.admin-tabs a:hover { background: var(--accent-soft); color: var(--accent-deep); }
.admin-panel {
  margin-bottom: 30px;
  scroll-margin-top: 70px;   /* 锚点跳转时不被吸顶标签挡住 */
}
.admin-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--accent-deep);
}
.panel-hint { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.admin-foot { margin-top: 10px; text-align: center; font-size: 13.5px; }
.admin-foot a { color: var(--muted); text-decoration: none; }
.admin-foot a:hover { color: var(--accent-deep); }

/* ── 用户公开主页 ── */
.avatar-link {
  display: inline-flex;
  border-radius: 50%;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s;
}
.avatar-link:hover { transform: scale(1.08); box-shadow: 0 0 0 2px var(--accent); }

.profile { max-width: 1120px; margin: 0 auto; padding: 0 18px 40px; }
.profile-hero {
  position: relative;
  margin-top: 18px;
  padding: 34px 24px 26px;
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg2));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.profile-hero.has-banner { min-height: 240px; }
.profile-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 12, 20, .28), rgba(20, 12, 20, .62));
}
.profile-hero:not(.has-banner) .profile-veil { display: none; }
.profile-id {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.profile-avatar {
  width: 92px;
  height: 92px;
  border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(60, 40, 50, .25);
}
.profile-avatar.letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
}
.profile-id h1 { font-size: 26px; color: var(--ink); }
.profile-bio { font-size: 15px; color: var(--muted); max-width: 520px; }
.profile-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.profile-hero.has-banner .profile-id h1,
.profile-hero.has-banner .profile-bio,
.profile-hero.has-banner .profile-meta { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.profile-edit { margin-top: 6px; }

.profile-panel { margin-top: 26px; }
.profile-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 18px;
  color: var(--accent-deep);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.photo-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform .15s;
}
.photo-grid img:hover { transform: scale(1.03); }

/* 「我的」页:右列(我的主页 + 账号安全)与精选照片管理 */
.me-col { display: flex; flex-direction: column; gap: 18px; }
.my-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.my-photo { position: relative; margin: 0; }
.my-photo img {
  width: 100%;
  height: 66px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
}
.my-photo-del {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(40, 30, 40, .78);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}
.my-photo-del:hover { background: var(--danger); }
.my-photo-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.my-photo-add .file-label { flex: 1; margin: 0; }

/* 「我的」页:账号安全折叠区(details/summary,无需 JS) */
.me-sec { padding: 0; text-align: left; }
.me-sec summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-deep);
  transition: background .2s;
}
.me-sec summary::-webkit-details-marker { display: none; }
.me-sec summary:hover { background: var(--accent-soft); }
.me-sec summary > .ico:first-child { width: 17px; height: 17px; flex: none; }
.me-sec .sec-sub {
  flex: 1;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}
.me-sec .sec-arrow {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: transform .25s;
}
.me-sec details[open] .sec-arrow { transform: rotate(180deg); }
.me-sec details[open] summary { background: var(--accent-soft); }
.me-sec .sec-body { padding: 4px 22px 20px; }
.me-sec .sec-h {
  margin: 16px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  font-size: 14.5px;
  color: var(--accent-deep);
}
.me-sec input[type="password"] {
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
}
.me-sec input[type="password"]:focus { border-color: var(--accent); }
.me-sec .auth-submit { width: 100%; padding: 10px; font-size: 14.5px; }

/* ── 首页精选区 ── */
.featured { max-width: 1120px; margin: 22px auto 0; padding: 0 18px; }
.featured-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 17px;
  color: var(--accent-deep);
}
.featured-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.feat-card {
  flex: none;
  width: 200px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.feat-card:hover { transform: translateY(-3px); }
.feat-img { width: 100%; height: 110px; object-fit: cover; }
.feat-body { padding: 10px 12px; }
.feat-text {
  font-size: 13.5px;
  line-height: 1.6;
  max-height: 4.8em;
  overflow: hidden;
  margin-bottom: 6px;
}
.feat-meta { font-size: 11.5px; color: var(--muted); }

/* ── 测验:展示区 / 分享 ── */
.quiz-panel {
  margin: 18px 0;                 /* 上下都留白,避免和相邻区块贴在一起 */
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
/* 测验页各区块统一纵向节奏 */
.quiz-wrap > * { margin-bottom: 0; }
.quiz-wrap > * + * { margin-top: 18px; }
.quiz-grid { margin: 18px 0; }
.quiz-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--accent-deep);
}
.quiz-god { border-left: 4px solid var(--gold, #b0822c); }
.god-item { padding: 10px 12px; margin-bottom: 8px; background: var(--accent-soft); border-radius: 10px; }
.god-item:last-child { margin-bottom: 0; }
.god-text { font-size: 14.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.god-edit {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--accent-soft);
  border-radius: 10px;
}
.god-edit textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
  background: #fff;
  color: inherit;
  outline: none;
  resize: vertical;
}
.god-edit-ops { display: flex; gap: 8px; margin-top: 6px; }
.quiz-start {
  text-align: center;
  padding: 28px 22px;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.quiz-start h1 { font-size: 26px; color: var(--accent-deep); margin-bottom: 8px; }
.quiz-start-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
  font-size: 13px;
  color: var(--muted);
}
.quiz-start-btn { display: inline-block; padding: 12px 44px; font-size: 16px; text-decoration: none; }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.qa-item {
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: 10px;
}
.qa-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; }
.qa-time { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.qa-quiz {
  font-size: 11.5px;
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qa-quiz:hover { color: var(--accent); }
/* 个人主页:测验结果卡片 */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.res-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .2s;
}
.res-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(160, 120, 140, .2); }
.res-card.res-private { border-left-color: var(--line); opacity: .78; }
.res-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.res-quiz {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
}
.res-quiz:hover { color: var(--accent); }
.res-code {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.res-flag {
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  font-size: 11.5px;
}
.res-flag.open { background: rgba(58, 167, 109, .16); color: var(--ok); }
.res-title { margin: 6px 0 2px; font-size: 15px; color: var(--ink); }
.res-ans { flex: 1; margin-top: 8px; }
.res-row { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.res-q { font-size: 11.5px; color: var(--muted); }
.res-a { font-size: 13.5px; }
.res-row.res-text .res-a {
  margin-top: 2px;
  padding: 6px 9px;
  background: var(--accent-soft);
  border-radius: 8px;
  line-height: 1.7;
}
.res-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.res-time { font-size: 11.5px; color: var(--muted); }
.res-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.res-btn {
  padding: 3px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.res-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.res-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }

/* 个人主页上的「公开/取消公开」开关 */
.quiz-pub-toggle {
  flex: none;
  padding: 2px 10px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.quiz-pub-toggle:hover { border-color: var(--accent); color: var(--accent-deep); }
.quiz-pub-toggle.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.qa-row { display: flex; flex-direction: column; gap: 1px; margin-bottom: 5px; font-size: 13px; }
.qa-q { color: var(--muted); font-size: 11.5px; }
.qa-a { color: var(--ink); }
.qa-text .qa-a {
  padding: 6px 9px;
  background: var(--card);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.7;
}
.quiz-q textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  background: #fff;
  color: inherit;
  outline: none;
  resize: vertical;
}
.quiz-q textarea:focus { border-color: var(--accent); }
.quiz-public {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.quiz-public input { accent-color: var(--accent); margin-top: 3px; }
.quiz-share textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  background: #fff;
  color: inherit;
  outline: none;
  resize: vertical;
}
.quiz-share-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.quiz-share-foot .btn-main { border: none; cursor: pointer; padding: 9px 26px; font-size: 14.5px; }
.sub-ans { margin-bottom: 4px; }
.sub-ans b { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.sub-ans span { font-size: 13px; }

/* ── 建议 / Bug 反馈区 ── */
.fb-wrap { max-width: 720px; margin: 0 auto; padding: 20px 18px 40px; }
.fb-form {
  padding: 16px 18px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.fb-kinds { display: flex; gap: 8px; margin-bottom: 12px; }
.fb-kind-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .2s;
}
.fb-kind-opt input { accent-color: var(--accent); }
.fb-kind-opt:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 600;
}
.fb-form textarea {
  width: 100%;
  min-height: 78px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  background: #fff;
  color: inherit;
  outline: none;
  resize: vertical;
}
.fb-form textarea:focus { border-color: var(--accent); }
.fb-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.fb-submit { padding: 9px 30px; border: none; cursor: pointer; font-size: 14.5px; }
.fb-login-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 14px;
  font-size: 14px;
  color: var(--muted);
}
.fb-login-tip a { color: var(--accent-deep); }

.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-item {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.fb-item.fb-done { border-left-color: var(--ok); opacity: .82; }
.fb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fb-kind {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.fb-kind.fb-bug { background: rgba(214, 69, 69, .14); color: var(--danger); }
.fb-kind.fb-idea { background: var(--accent-soft); color: var(--accent-deep); }
.fb-status { padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.fb-status.fb-open { background: rgba(176, 130, 44, .16); color: var(--gold, #b0822c); }
.fb-status.fb-done { background: rgba(58, 167, 109, .16); color: var(--ok); }
.fb-meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.fb-content { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.fb-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fb-imgs img, .fb-imgs video {
  width: 90px; height: 68px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
}
.fb-reply {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 13.5px;
}
.fb-reply b { flex: none; color: var(--accent-deep); }
.fb-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.fb-vote {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
}
.fb-vote .ico { width: 13px; height: 13px; }
.fb-vote:hover { border-color: var(--accent); color: var(--accent-deep); }
.fb-vote.voted { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.fb-reply-form { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.fb-reply-form input {
  flex: 1;
  min-width: 0;
  padding: 7px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: inherit;
  outline: none;
}

/* ── 测验 ── */
.quiz-wrap { max-width: 780px; margin: 0 auto; padding: 20px 18px 40px; }
.quiz-head { text-align: center; margin-bottom: 22px; }
.quiz-head h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 26px;
  color: var(--accent-deep);
}
.quiz-head h1 .ico { width: 22px; height: 22px; }
.quiz-sub { margin-top: 6px; font-size: 14px; color: var(--muted); }
/* 测验统计条 */
.quiz-totals {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.quiz-totals .stat,
.quiz-gstats .stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  white-space: nowrap;
}
.quiz-totals .ico,
.quiz-gstats .ico { width: 13px; height: 13px; }
.quiz-gstats .stat { display: inline-flex; margin-right: 6px; }

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.quiz-card {
  display: block;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .2s;
}
.quiz-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(160, 120, 140, .22); }
.quiz-card-top { display: flex; align-items: center; gap: 8px; }
.quiz-card h2 { font-size: 17px; color: var(--accent-deep); }
.quiz-desc { margin: 8px 0 12px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.quiz-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

.quiz-form { display: flex; flex-direction: column; gap: 16px; }
.quiz-q {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.quiz-q-text { display: flex; gap: 8px; font-size: 15.5px; margin-bottom: 12px; }
.quiz-q-no {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 700;
}
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14.5px;
  transition: border-color .2s, background .2s;
}
.quiz-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt input { accent-color: var(--accent); flex: none; }
.quiz-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-submit { align-self: center; padding: 12px 42px; font-size: 15.5px; border: none; cursor: pointer; }

.quiz-result {
  padding: 30px 26px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.quiz-result-from { font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.quiz-result-code {
  margin: 14px auto 6px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
}
.quiz-result-title { font-size: 24px; color: var(--accent-deep); margin-bottom: 12px; }
.quiz-result-desc { font-size: 15px; color: var(--ink); line-height: 1.9; max-width: 560px; margin: 0 auto; }
.quiz-result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.quiz-result-actions .btn-main,
.quiz-result-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
/* 自由作答测验的作答回执:回答左对齐(外层 .quiz-result 是居中排版的) */
.quiz-receipt { max-width: 560px; margin: 14px auto 0; text-align: left; }

/* 后台:测验管理(竖式列表,每个测验单独一页管理) */
.quiz-rows { display: flex; flex-direction: column; gap: 10px; }
.quiz-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .2s;
}
.quiz-row:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(160, 120, 140, .2); }
.quiz-row-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.quiz-row-title { font-size: 16.5px; font-weight: 600; color: var(--accent-deep); text-decoration: none; }
.quiz-row-title:hover { text-decoration: underline; }
.quiz-row-meta { font-size: 12.5px; color: var(--muted); }
.quiz-row-desc { font-size: 13px; color: var(--muted); }
.quiz-row-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quiz-admin-list { display: flex; flex-direction: column; gap: 6px; }
.quiz-admin-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .2s, border-color .2s;
}
.quiz-admin-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-admin-item.on { border-color: var(--accent); background: var(--accent-soft); }
.quiz-admin-item b { font-size: 14.5px; }
.quiz-admin-item span { font-size: 12px; color: var(--muted); }
.quiz-sec-title { margin: 22px 0 10px; font-size: 16px; color: var(--accent-deep); }
.quiz-admin-q {
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--accent-soft);
  border-radius: 12px;
}
.quiz-admin-q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quiz-admin-q-head b { font-size: 14.5px; }
.quiz-admin-opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.quiz-admin-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px 3px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
}
.quiz-admin-opt em { color: var(--accent-deep); font-style: normal; font-size: 11.5px; }
.quiz-admin-opt button {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 0 3px;
}
.quiz-admin-opt button:hover { color: var(--danger); }
.quiz-admin-addopt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.quiz-admin-addopt .dim { max-width: 92px; }
/* 选项表单里的「高级:维度/取值」——默认收起,展开时占一整行 */
.opt-advanced { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.opt-advanced summary { cursor: pointer; padding: 2px 0; }
.opt-advanced[open] { display: flex; gap: 6px; align-items: center; }
.opt-advanced[open] summary { flex: none; }

/* ── 开屏:进站动画(每次会话一次,点一下跳过)── */
.no-splash .splash { display: none; }
.splash {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 42%, var(--bg1), var(--bg2) 72%);
  cursor: pointer; overflow: hidden;
}
/* 背景:三团缓慢游动的柔光 */
.sp-blob { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.sp-blob.b1 { width: 360px; height: 360px; left: -90px; top: -70px;
  background: var(--accent-soft); opacity: .55; animation: sp-drift1 13s ease-in-out infinite alternate; }
.sp-blob.b2 { width: 300px; height: 300px; right: -80px; bottom: -60px;
  background: var(--accent-soft); opacity: .45; animation: sp-drift2 16s ease-in-out infinite alternate; }
.sp-blob.b3 { width: 220px; height: 220px; right: 14%; top: 8%;
  background: #fff; opacity: .5; animation: sp-drift3 11s ease-in-out infinite alternate; }
@keyframes sp-drift1 { from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes sp-drift2 { from { transform: translate(0, 0) scale(1.1); }
  to { transform: translate(-70px, -50px) scale(.95); } }
@keyframes sp-drift3 { from { transform: translate(0, 0); }
  to { transform: translate(-40px, 60px) scale(1.2); } }
/* 背景:升起的小光点 */
.sp-dot {
  position: absolute; bottom: -24px; border-radius: 50%;
  background: var(--accent); opacity: 0; pointer-events: none;
  animation-name: sp-rise; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes sp-rise {
  0% { transform: translateY(0) scale(.8); opacity: 0; }
  12% { opacity: .5; }
  85% { opacity: .35; }
  100% { transform: translateY(-108vh) scale(1.1); opacity: 0; }
}

.splash-inner { position: relative; text-align: center; }
/* 心形:一笔画出轮廓 → 填色 → 轻轻跳一下 */
.sp-heart-wrap { position: relative; display: block; width: 76px; height: 72px; margin: 0 auto 20px; }
.sp-heart { display: block; width: 76px; height: 72px;
  animation: sp-beat 2.6s ease-in-out 1.15s infinite; }
.sp-heart path {
  fill: transparent; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round;
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: sp-draw .95s cubic-bezier(.4, .1, .3, 1) .12s forwards,
             sp-fill .45s ease-out .88s forwards;
}
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@keyframes sp-fill { to { fill: var(--accent); } }
@keyframes sp-beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.09); }
  24% { transform: scale(1); }
  36% { transform: scale(1.05); }
  48% { transform: scale(1); }
}
/* 心形外的三层涟漪 */
.sp-rings { position: absolute; inset: 0; pointer-events: none; }
.sp-rings i {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border: 1.5px solid var(--accent); border-radius: 50%; opacity: 0;
  animation: sp-ring 2.8s cubic-bezier(.2, .6, .3, 1) infinite;
}
.sp-rings i:nth-child(2) { animation-delay: .9s; }
.sp-rings i:nth-child(3) { animation-delay: 1.8s; }
@keyframes sp-ring {
  0% { transform: scale(.7); opacity: 0; }
  12% { opacity: .5; }
  100% { transform: scale(2.6); opacity: 0; }
}
/* 标题:一个字一个字落下来 + 淡淡的光晕(别用 background-clip:text,
   它和逐字的 transform/blur 会打架,字会整片透明看不到) */
.splash-title {
  font-size: 42px; font-weight: 700; letter-spacing: .32em; text-indent: .32em;
  color: var(--accent-deep);
  text-shadow: 0 2px 18px rgba(224, 96, 126, .28);
}
.splash-title .ch { display: inline-block; opacity: 0;
  animation: sp-char .8s cubic-bezier(.2, 1.25, .35, 1) both; }
.splash-title .ch:last-child { color: var(--accent); }
@keyframes sp-char {
  0% { opacity: 0; transform: translateY(26px) scale(.72) rotate(-8deg); filter: blur(4px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
.splash-sub {
  margin-top: 16px; font-size: 14px; letter-spacing: .24em; text-indent: .24em;
  color: var(--muted); animation: splash-sub .9s ease .95s both;
}
@keyframes splash-sub {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
/* 底下一条细细的进度条,和自动收起的节奏一致 */
.sp-bar {
  display: block; width: 132px; height: 3px; margin: 26px auto 0;
  border-radius: 999px; background: var(--line); overflow: hidden;
  animation: splash-sub .6s ease 1.1s both;
}
.sp-bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  animation: sp-load 1.75s cubic-bezier(.35, .8, .3, 1) .2s forwards;
}
@keyframes sp-load { to { width: 100%; } }
.sp-skip {
  margin-top: 10px; font-size: 11.5px; letter-spacing: .18em; color: var(--muted);
  animation: splash-sub .6s ease 1.5s both;
}
/* 离场:从中心收成一圈光圈,像把幕布吸走 */
.splash.go {
  animation: sp-iris .85s cubic-bezier(.72, 0, .3, 1) both;
  pointer-events: none;
}
.splash.go .splash-inner { animation: splash-inner-out .7s ease both; }
@keyframes sp-iris {
  0% { clip-path: circle(160% at 50% 45%); }
  100% { clip-path: circle(0% at 50% 45%); }
}
@keyframes splash-inner-out {
  0% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
  100% { transform: scale(1.12) translateY(-18px); opacity: 0; filter: blur(7px); }
}
@media (prefers-reduced-motion: reduce) {
  .splash { display: none; }     /* 不喜欢动效的访客直接跳过开屏 */
}

/* ── 翻页条(帖子墙 / 测验 / 后台列表共用;模板 templates/_pager.html)── */
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; margin: 18px 0 6px;
}
.pager .pg {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 11px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink);
  font-size: 13px; text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.pager a.pg:hover { border-color: var(--accent); color: var(--accent-deep);
  background: var(--accent-soft); }
.pager .pg.on { background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600; }
.pager .pg.off { color: var(--muted); opacity: .45; }
.pager .pg-dots { color: var(--muted); padding: 0 2px; }
.admin-list-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.quiz-more { margin-top: 12px; text-align: center; }

/* ── 搜索:墙上/搜索页的搜索框 ── */
.wall-search {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--muted); font-size: 13px;
}
.wall-search:focus-within { border-color: var(--accent); }
.wall-search input {
  border: none; outline: none; background: none; width: 150px;
  font-family: inherit; font-size: 13px; color: var(--ink);
}
.wall-search input::placeholder { color: var(--muted); }
.search-head { max-width: 640px; margin: 24px auto 8px; text-align: center; }
.wall-search.big { width: 100%; padding: 9px 16px; font-size: 15px; }
.wall-search.big input { flex: 1; width: auto; font-size: 15px; }
.wall-search.big .btn-main { padding: 7px 22px; font-size: 13.5px; }
.search-count { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.search-count b { color: var(--accent-deep); }
/* 后台帖子管理:按编号找帖子 */
.admin-postno {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; color: var(--muted);
}
.admin-postno .dim { max-width: 140px; }

/* 排序:列表式下拉(点击展开,含说明文字) */
.sort-menu { position: relative; display: inline-flex; }
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.sort-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.sort-btn .ico-sort { width: 14px; height: 14px; color: var(--accent-deep); }
.sort-chevron { width: 13px; height: 13px; color: var(--muted); transition: transform .25s; }
.sort-menu.open .sort-chevron { transform: rotate(180deg); }
.sort-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 184px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(120, 90, 70, .2);
}
.sort-opt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--ink);
  transition: background .15s;
}
.sort-opt:hover { background: var(--accent-soft); }
.sort-opt.on { background: var(--accent-soft); }
.sort-opt.on .sort-name { color: var(--accent-deep); font-weight: 600; }
.sort-name { font-size: 13.5px; }
.sort-desc { font-size: 11.5px; color: var(--muted); }
.view-ico { width: 12px; height: 12px; opacity: .7; }
.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: color .2s, transform .15s;
}
.fav-btn .ico { width: 14px; height: 14px; }
.fav-btn:hover { color: var(--accent-deep); }
.fav-btn:active { transform: scale(1.15); }
.fav-btn.faved { color: var(--gold, #b0822c); }
.fav-btn.faved .ico-bookmark { --ico: url('/static/icons/bookmark-filled.svg'); }
.privacy-row { margin: 10px 0 4px; text-align: left; }

/* 最近登录记录 */
.login-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.login-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 12px;
  background: var(--accent-soft);
  border-radius: 9px;
  font-size: 12.5px;
  color: var(--ink);
}
.login-time { flex: none; color: var(--muted); }
.login-dev { flex: 1; min-width: 0; }
.login-ip { flex: none; color: var(--muted); font-family: Consolas, monospace; }

/* 「我的」页:签名输入与清除背景 */
.me-bio-input {
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: inherit;
  outline: none;
}
.me-bio-input:focus { border-color: var(--accent); }
.me-bio-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.clear-banner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}

/* 总管理员入口(首页底部链接 + 认领页) */
.owner-entry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.owner-entry .ico { width: 13px; height: 13px; }
.owner-card { max-width: 430px; }
.owner-card h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 21px;
}
.owner-card h1 .ico { width: 20px; height: 20px; color: var(--accent); }
.owner-explain {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  text-align: left;
}
.owner-explain b { color: var(--accent-deep); }
.owner-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 14.5px;
}
.owner-state .ico { width: 16px; height: 16px; }
.owner-card code {
  padding: 1px 6px;
  background: var(--accent-soft);
  border-radius: 4px;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  color: var(--accent-deep);
}

/* 总管理员设置页 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.perm-table td { text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; }
.perm-table .yes { color: var(--ok); font-weight: 700; }
.perm-table .no { color: var(--muted); }
.owner-hint code {
  padding: 1px 6px;
  background: var(--accent-soft);
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: var(--accent-deep);
}

/* 身份徽标 / 小标签 */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  white-space: nowrap;
}
.role-badge .ico { width: 13px; height: 13px; }
.role-badge.super { background: var(--accent); color: #fff; }
.role-badge.mod { background: var(--accent-soft); color: var(--accent-deep); }
.mini-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11.5px;
  white-space: nowrap;
}
.btn-ghost.small { padding: 5px 14px; font-size: 13px; border-radius: 8px; }
.auth-submit.small { width: auto; padding: 8px 22px; font-size: 13.5px; }
.plain-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: inherit;
  outline: none;
}
.plain-input:focus { border-color: var(--accent); }
td.ops { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
td.ops form { margin: 0; }
.file-label-line input[type="file"] { font-size: 12.5px; color: var(--muted); max-width: 100%; }

/* ── 关于页:管理团队 ── */
.team { display: flex; flex-direction: column; gap: 10px; }
.team-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--accent-soft);
  border-radius: 12px;
}
.team-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.team-info b { font-size: 14.5px; }
.team-info span { font-size: 12px; color: var(--muted); }
.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent-deep);
}
.team-badge .ico { width: 14px; height: 14px; }
.team-badge.owner { background: var(--accent); color: #fff; }
.team-empty { font-size: 13.5px; color: var(--muted); }

/* 评论图片 */
.cmt-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.cmt-imgs img, .cmt-imgs video {
  width: 76px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
}
.img-btn.tiny {
  padding: 7px 10px;
  font-size: 13px;
  border-style: solid;
}
.img-btn.tiny .ico { width: 14px; height: 14px; }
.img-picker { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 表情选择器 */
.emoji-picker { position: relative; display: inline-flex; align-items: center; }
.emoji-btn { cursor: pointer; }
.emoji-btn .ico { width: 15px; height: 15px; }
.emoji-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: 232px;
  max-height: 168px;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(120, 90, 70, .2);
}
.emoji-item {
  padding: 3px 0;
  border: none;
  border-radius: 6px;
  background: none;
  font-size: 17px;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.emoji-item:hover { background: var(--accent-soft); transform: scale(1.15); }

/* ── 评论区 ── */
.cmts { display: none; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cmts.open { display: block; }
.cmt {
  padding: 9px 12px;
  margin-bottom: 8px;
  background: #f8f1f4;
  border-radius: 10px;
  font-size: 14px;
}
.cmt-head { display: flex; align-items: center; gap: 8px; }
.cmt-name { font-size: 13px; font-weight: 600; color: var(--accent-deep); }
.cmt-time { flex: 1; font-size: 12px; color: var(--muted); }
.cmt .like-btn { font-size: 12.5px; }
.cmt-del {
  display: inline-flex;
  align-items: center;
  padding: 2px 3px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  opacity: .55;
  transition: color .2s, opacity .2s;
}
.cmt-del .ico { width: 13px; height: 13px; }
.cmt-del:hover { color: var(--danger); opacity: 1; }
.cmt-body { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.cmt-empty { padding: 10px 4px; font-size: 13px; color: var(--muted); text-align: center; }
.cmt-login-tip { padding: 10px 4px; font-size: 13px; color: var(--muted); text-align: center; }
.cmt-login-tip a { color: var(--accent-deep); }
.cmt-form-row { display: flex; gap: 6px; margin-top: 10px; }
.cmt-form-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  background: #fff;
  color: inherit;
  outline: none;
}
.cmt-form-row input[name="nickname"] { flex: none; width: 110px; }
.cmt-anon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.cmt-anon input { accent-color: var(--accent); }
.cmt-form-row button {
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

/* ── 登录 / 注册卡片 ── */
.auth-card {
  max-width: 400px;
  margin: 8vh auto 40px;
  padding: 34px 32px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-card h1 { margin-bottom: 18px; font-size: 22px; color: var(--accent-deep); }
.auth-card input[type="text"], .auth-card input[type="password"] {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
  background: #fff;
  color: inherit;
  outline: none;
}
.auth-card input:focus { border-color: var(--accent); }
.auth-card .flash { margin-bottom: 14px; text-align: left; }
.file-label {
  display: block;
  margin-bottom: 12px;
  padding: 9px;
  border: 1.5px dashed var(--accent);
  border-radius: 10px;
  color: var(--accent-deep);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.file-label:hover { background: var(--accent-soft); }
/* 注册页:邮箱验证码 */
.email-row { display: flex; gap: 8px; margin-bottom: 12px; }
.email-row input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
  background: #fff;
  color: inherit;
  outline: none;
}
.email-row input:focus { border-color: var(--accent); }
.code-btn {
  flex: none;
  padding: 0 16px;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent-deep);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.code-btn:hover:not(:disabled) { background: var(--accent-soft); }
.code-btn:disabled { border-color: var(--line); color: var(--muted); cursor: default; }
.code-row { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.code-row > input {
  flex: 1 1 120px;
  min-width: 96px;
  margin-bottom: 0 !important;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
  background: #fff;
  color: inherit;
  outline: none;
}
.code-row > input:focus { border-color: var(--accent); }
/* 图形验证码小块(与邮箱验证码同排) */
.captcha-box {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.captcha-box .captcha-q {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent-deep);
  white-space: nowrap;
}
/* 选择器要带上 [type="text"]:否则被 .auth-card input[type=text]{width:100%} 压过 */
.captcha-box input[type="text"] {
  width: 42px;
  min-width: 0;
  margin: 0 !important;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  background: #fff;
  color: inherit;
  outline: none;
}
.captcha-box input[type="text"]:focus { border-color: var(--accent); }
.captcha-box #captchaRefresh {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.code-hint {
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: left;
}
.code-hint b { color: var(--accent-deep); font-size: 14px; }
.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
}
.ok-tag { background: rgba(58, 167, 109, .16); color: var(--ok); }

.captcha-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.captcha-q { font-size: 15px; font-weight: 700; color: var(--accent-deep); }
.captcha-row input {
  width: 48px;
  margin: 0;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  outline: none;
}
#captchaRefresh { border: none; background: none; cursor: pointer; font-size: 15px; }
.auth-submit {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(224, 96, 126, .35);
  transition: transform .15s;
}
.auth-submit:hover { transform: translateY(-2px); }
.auth-hint { margin-top: 16px; font-size: 13px; color: var(--muted); }
.auth-hint a { color: var(--accent-deep); }

/* ── 我的主页 ── */
.me { max-width: 880px; margin: 0 auto; padding: 26px 18px 60px; }
.me-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.me-head h1 { font-size: 26px; color: var(--accent-deep); }
.me-head .btn-main { padding: 9px 24px; font-size: 14px; }
.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 34px; }
.me-card {
  padding: 26px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.me-card h3 { margin-bottom: 14px; font-size: 17px; color: var(--accent-deep); }
.me-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px; height: 96px;
  margin: 0 auto 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: 0 4px 14px rgba(224, 96, 126, .3);
  font-size: 40px;
  font-weight: 700;
  color: var(--accent-deep);
}
.me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-card h2 { font-size: 20px; }
.me-joined { margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.me-email {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  word-break: break-all;
}
.me-email .ico { width: 13px; height: 13px; }
.avatar-form { display: flex; gap: 10px; justify-content: center; align-items: center; }
.avatar-form .file-label { margin: 0; padding: 8px 14px; font-size: 13px; display: inline-block; }
.avatar-form .btn-ghost { padding: 8px 20px; font-size: 13.5px; }
.logout-form { margin-top: 16px; }
.danger-ghost { border-color: var(--danger); color: var(--danger); }
.danger-ghost:hover { background: rgba(214, 69, 69, .08); }
.avatar-tip { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.me-card input[type="password"] {
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
}
.me-card input[type="password"]:focus { border-color: var(--accent); }
.me-card .auth-submit { width: 100%; padding: 10px; font-size: 14.5px; }
.me-posts-title { font-size: 18px; margin-bottom: 12px; }
.me-posts {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.me-post {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.me-post:last-child { border-bottom: none; }
.me-post-time { flex: none; font-size: 12.5px; color: var(--muted); min-width: 64px; }
.me-post-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-post-img { text-decoration: none; }
.anon-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
}
.me-post form { flex: none; }

/* ── 加载更多 / 页脚 ── */
.more-wrap { text-align: center; margin: 8px 0 30px; }
#loadMore {
  padding: 10px 34px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
#loadMore:hover { background: var(--accent-soft); }
#loadMore:disabled { opacity: .5; cursor: default; }

.site-footer {
  padding: 26px 16px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent-deep); }

/* ── 管理后台 ── */
.admin { max-width: 980px; margin: 0 auto; padding: 30px 18px 60px; }
.admin h1 { margin-bottom: 14px; font-size: 26px; color: var(--accent-deep); }
.admin h2 { margin: 30px 0 10px; font-size: 18px; }
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--muted);
}
.admin-bar button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--accent-deep);
}
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--accent-soft); color: var(--accent-deep); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.clip { max-width: 320px; white-space: pre-wrap; word-break: break-word; }
.nowrap { white-space: nowrap; }
.danger {
  padding: 5px 12px;
  border: none;
  border-radius: 7px;
  background: var(--danger);
  color: #fff;
  cursor: pointer;
  font-size: 12.5px;
}
.empty-td { padding: 20px; text-align: center; color: var(--muted); }
.login-hint { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.login-hint a { color: var(--muted); text-decoration: none; }
.login-hint a:hover { color: var(--accent-deep); }

/* 开发者设置表单 */
.owner-form { padding: 18px; }
.owner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.owner-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}
.owner-form input[type="text"] {
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
}
.owner-form input[type="text"]:focus { border-color: var(--accent); }
.owner-form .file-label { margin: 0; }
.owner-link-row { display: flex; gap: 10px; margin-bottom: 10px; }
.owner-link-row input { flex: 1; }
.owner-about { grid-column: 1 / -1; }
.owner-about textarea {
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
  resize: vertical;
}
.owner-about textarea:focus { border-color: var(--accent); }
.announce-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
  resize: vertical;
}
.announce-form-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.announce-form-row .img-preview { margin-top: 0; }
.announce-form textarea:focus { border-color: var(--accent); }
.announce-form .auth-submit { width: auto; padding: 10px 30px; font-size: 14px; }
.announce-list { margin-top: 14px; }
.owner-form .auth-submit { width: auto; padding: 10px 30px; font-size: 14px; }
.owner-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.empty { padding: 26px; text-align: center; font-size: 14px; color: var(--muted); }
.empty a { color: var(--accent-deep); }

/* ── 图片灯箱 ── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;            /* 必须高于顶栏(100),否则顶部被导航挡住 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 20, 30, .84);
  opacity: 0;
  pointer-events: none;
  cursor: zoom-out;
  transition: opacity .25s;
}
#lightbox.show { opacity: 1; pointer-events: auto; }
#lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 12px;
  cursor: zoom-out;
}
/* 明显的关闭按钮:手机上尤其需要 */
#lightbox .lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
#lightbox .lb-close:hover { background: rgba(255, 255, 255, .3); transform: scale(1.06); }
#lightbox .lb-close .ico { width: 18px; height: 18px; }
#lightbox .lb-hint {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .6);
  font-size: 12.5px;
  letter-spacing: .06em;
  pointer-events: none;
}

/* ── 入场动画:页面元素依次淡入上浮 ──
   用 backwards 而不是 both:延迟期间元素先隐藏(from 状态),播完回到常态
   (transform 变回 none)。fill:both 会把 translateY(0) 永久留在元素上,
   等于给每个区块挂了一个永久层叠上下文 —— 这正是排序下拉/季节菜单
   「看得见点不到」的根因,别再改回 both。
   延迟按真实的 DOM 顺序递增(首页:顶栏 → 头图 → 每日一言 → 网站介绍
   → 公告栏 → 发帖区 → 精选 → 帖子栏 → 帖子墙 → 加载更多 → 页脚)。*/
.topbar, .site-header, .daily-quote, .hero, .announce, .compose, .flash-box,
.featured, .wall-bar, .more-wrap, .site-footer, .auth-card, .me, .login-card,
.admin, .about-page {
  animation: enter .55s cubic-bezier(.22, .8, .35, 1) backwards;
}
.site-header { animation-delay: .05s; }
.daily-quote { animation-delay: .09s; }
.hero { animation-delay: .13s; }
.announce { animation-delay: .17s; }
.compose { animation-delay: .22s; }
.flash-box { animation-delay: .26s; }
.featured { animation-delay: .3s; }
.wall-bar { animation-delay: .34s; }
.wall { animation: enter .55s cubic-bezier(.22, .8, .35, 1) .38s backwards; }
.more-wrap { animation-delay: .46s; }
.site-footer { animation-delay: .5s; }
.note { animation: fadein .5s ease backwards; }
.note:nth-child(1) { animation-delay: .05s; }
.note:nth-child(2) { animation-delay: .12s; }
.note:nth-child(3) { animation-delay: .19s; }
.note:nth-child(4) { animation-delay: .26s; }
.note:nth-child(5) { animation-delay: .33s; }
.note:nth-child(6) { animation-delay: .4s; }
@keyframes enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── 用户自选排版(桌面上生效;窄屏自动降列)── */
@media (min-width: 901px) {
  html[data-layout="1"] .wall { column-count: 1; max-width: 760px; }
  html[data-layout="3"] .wall { column-count: 3; }
}
@media (min-width: 601px) and (max-width: 900px) {
  html[data-layout="1"] .wall { column-count: 1; max-width: 760px; }
}
html[data-layout="1"] .wall-bar { max-width: 760px; }
html[data-layout="1"] .note-img { max-height: 520px; object-fit: cover; }

/* ── 响应式:平板 ── */
@media (max-width: 900px) {
  .wall { column-count: 2; }
  .topbar { padding: 12px 14px 0; }
  .wrap, .admin, .me, .about-page { padding-left: 16px; padding-right: 16px; }
}

/* ── 响应式:手机 ── */
@media (max-width: 600px) {
  .wall { column-count: 1; }

  /* 顶部导航:换行居中,不挤压 */
  .topbar { padding: 10px 12px 0; }
  .site-nav { justify-content: center; flex-wrap: wrap; gap: 10px 14px; font-size: 13.5px; }
  .season-btn { width: 30px; height: 30px; }
  .user-chip { font-size: 13.5px; }

  /* 页头与各区块留白收紧 */
  .site-header { padding: 22px 14px 4px; }
  .site-header h1 { font-size: 32px; letter-spacing: .35em; text-indent: .35em; }
  .tagline { font-size: 12.5px; letter-spacing: .06em; }
  .hero { margin: 16px 12px; padding: 20px 18px; }
  .announce { margin: 14px 12px; padding: 12px 14px; }
  .compose { margin: 16px 12px; padding: 18px 16px 14px; }
  .compose .pin { top: -12px; width: 22px; height: 22px; }

  /* 帖子墙:手机端固定单列,排版切换按钮隐藏(屏幕上放不下多列) */
  .wall-bar { flex-direction: column; align-items: center; gap: 10px; padding: 0 12px; }
  .sec-tabs { justify-content: center; }
  .layout-toggle { display: none; }
  .wall { padding: 0 12px; }
  .note { padding: 14px 15px 11px; }

  /* 发帖表单:控件换行、按钮满宽 */
  .row1 { width: 100%; }
  .sec-pick { width: 100%; }
  .img-btn, .anon-check { flex: 1 1 auto; justify-content: center; }
  .as-tip { width: 100%; text-align: center; }
  .row2 { flex-direction: column; align-items: stretch; }
  .submit-btn { width: 100%; }

  /* 评分:按钮加大,10 个一行放不下就换行 */
  .rate-num { width: 30px; height: 30px; font-size: 13px; }

  /* 评论表单:输入框占满一行,操作按钮排下一行 */
  .cmt-form-row { flex-wrap: wrap; }
  .cmt-form-row input[name="content"] { flex: 1 1 100%; }
  .cmt-form-row button[type="submit"] { flex: 1; }

  /* 个人中心 / 关于页 / 登录注册 */
  .me-grid { grid-template-columns: 1fr; }
  .me-post { flex-wrap: wrap; }
  .me-post-content { white-space: normal; }
  .me-head { gap: 10px; }
  .me-head h1 { font-size: 22px; }
  .about-page { padding: 18px 12px 30px; }
  .about-text { padding: 18px 16px; }
  .auth-card { margin: 5vh 12px 30px; padding: 26px 20px 20px; }
  .login-card { margin: 8vh 12px 0; padding: 26px 22px; }

  /* 管理后台:表单单列,表格横向滚动 */
  .admin { padding: 20px 12px 40px; }
  .admin-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .owner-grid { grid-template-columns: 1fr; }
  .owner-link-row { flex-direction: column; }
  .owner-form { padding: 14px; }
}

/* ── 响应式:超小屏(≤380px)── */
@media (max-width: 380px) {
  .site-header h1 { font-size: 27px; letter-spacing: .28em; text-indent: .28em; }
  .hero-stats .stat { padding: 3px 11px; font-size: 12.5px; }
  .rate-num { width: 26px; height: 26px; font-size: 12px; }
  .sec-chip { padding: 4px 11px; font-size: 12.5px; }
  .layout-toggle button { padding: 4px 10px; font-size: 12px; }
  .avatar { width: 34px; height: 34px; }
  .avatar-img { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  /* 用 * 统一关掉,而不是维护一份区块清单 —— 清单总会漏
     (漏过 .announce / .wall-bar,reduce 用户仍然看到它们动) */
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pt { display: none; }
}
