/* ===== 吐槽站 样式系统 ===== */
:root {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --bg-elev: #ffffff;
  --text: #1f2330;
  --text-soft: #6b7280;
  --text-faint: #9aa1ad;
  --primary: #6d5efc;
  --primary-2: #9b5cff;
  --primary-soft: #efeaff;
  --accent: #ff5a7a;
  --line: #ececf3;
  --shadow: 0 8px 30px rgba(31,35,48,.08);
  --shadow-sm: 0 2px 10px rgba(31,35,48,.06);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1080px;
}
[data-theme="dark"] {
  --bg: #0f1117;
  --bg-soft: #171a23;
  --bg-elev: #1d212c;
  --text: #e8eaf0;
  --text-soft: #9aa1b2;
  --text-faint: #6b7280;
  --primary: #8b7bff;
  --primary-2: #b07bff;
  --primary-soft: #241f3d;
  --line: #2a2f3d;
  --shadow: 0 10px 30px rgba(0,0,0,.4);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ===== 顶部导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg-soft) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 19px; box-shadow: 0 6px 16px rgba(109,94,252,.4);
}
.brand b { background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-spacer { flex: 1; }
.nav-links { display: flex; gap: 6px; align-items: center; }
#navAuth { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex-shrink: 0; }
#navAuth .btn-ghost { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--text-soft); font-weight: 600; font-size: 14px;
  transition: .2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--primary-soft); color: var(--primary); }
.btn {
  border: none; cursor: pointer; font-weight: 700; font-size: 14px; font-family: inherit;
  padding: 9px 18px; border-radius: 999px; transition: transform .12s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 16px rgba(109,94,252,.35); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(109,94,252,.45); }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-danger { background: #fff0f3; color: var(--accent); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: transparent; border: 1px solid var(--line); cursor: pointer; font-size: 17px; color: var(--text-soft); }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }

/* ===== 布局 ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 18px 90px; }
.hero {
  background: linear-gradient(135deg, rgba(109,94,252,.12), rgba(255,90,122,.10));
  border: 1px solid var(--line); border-radius: 24px; padding: 26px 24px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.hero h1 { font-size: clamp(22px, 4vw, 30px); line-height: 1.25; }
.hero p { color: var(--text-soft); margin-top: 6px; }
.hero .emoji { font-size: 46px; }
.stats { display: flex; gap: 18px; margin-left: auto; }
.stat { text-align: center; }
.stat b { font-size: 22px; }
.stat span { display: block; color: var(--text-faint); font-size: 12px; }

/* ===== 筛选条 ===== */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
}
.search input { border: none; background: transparent; outline: none; flex: 1; font-size: 14px; color: var(--text); font-family: inherit; }
.seg { display: flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: none; background: transparent; padding: 9px 16px; cursor: pointer; font-weight: 700; color: var(--text-soft); font-family: inherit; font-size: 14px; }
.seg button.active { background: var(--primary); color: #fff; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text-soft);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; transition: .18s; white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 卡片流 ===== */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: transform .16s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card .badge {
  align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.card h3 { font-size: 17px; line-height: 1.4; }
.card .excerpt { color: var(--text-soft); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card .tag { font-size: 11px; color: var(--text-faint); background: var(--bg); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.card .meta { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 12.5px; margin-top: auto; }
.card .meta .author { display: flex; align-items: center; gap: 6px; }
.card .meta .av { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--accent)); color:#fff; display:grid; place-items:center; font-size: 11px; font-weight:700; }
.card .meta .right { margin-left: auto; display: flex; gap: 12px; }
.card .featured { position: absolute; top: 12px; right: 12px; background: linear-gradient(135deg,#ffb020,#ff7a00); color:#fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 8px; }

/* ===== 文章详情 ===== */
.post { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; max-width: 760px; margin: 0 auto; }
.post .badge { font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px; display: inline-flex; gap: 6px; }
.post h1 { font-size: 26px; margin: 14px 0 8px; line-height: 1.35; }
.post .byline { color: var(--text-faint); font-size: 13px; display: flex; gap: 14px; margin-bottom: 18px; }
.post .body { font-size: 16px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.post .actions { display: flex; gap: 12px; margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.like-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--bg-soft); padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--text-soft); font-family: inherit; font-size: 14px; }
.like-btn.liked { color: var(--accent); border-color: var(--accent); background: #fff0f3; }

.comments { max-width: 760px; margin: 22px auto 0; }
.comments h2 { font-size: 18px; margin-bottom: 14px; }
.cmt { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cmt .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--accent)); color:#fff; display:grid; place-items:center; font-weight:700; flex-shrink: 0; }
.cmt .c-body { flex: 1; }
.cmt .c-name { font-weight: 700; font-size: 14px; }
.cmt .c-time { color: var(--text-faint); font-size: 12px; margin-left: 8px; font-weight: 400; }
.cmt .c-text { margin-top: 4px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.cmt-form { display: flex; gap: 10px; margin-top: 14px; }
.cmt-form textarea { flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-family: inherit; font-size: 14px; resize: vertical; min-height: 44px; background: var(--bg-soft); color: var(--text); }

/* ===== 表单 / 写文章 ===== */
.box { max-width: 720px; margin: 0 auto; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.box h1 { font-size: 22px; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px;
  font-family: inherit; font-size: 15px; background: var(--bg-soft); color: var(--text); outline: none; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { min-height: 180px; resize: vertical; }
.hint { color: var(--text-faint); font-size: 12px; margin-top: 5px; }
.box h2 { font-size: 18px; margin-bottom: 16px; }
.muted { color: var(--text-faint); font-size: 14px; font-weight: 400; }
.profile-meta { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.profile-meta li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.profile-meta li span { color: var(--text-faint); }
.profile-meta li b { font-weight: 700; word-break: break-all; }
.field input:disabled { opacity: .7; cursor: not-allowed; }
@media (max-width: 540px) { .profile-meta { grid-template-columns: 1fr; } }
.preview-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; margin-top: 4px; }

/* ===== 弹窗（登录/注册） ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(15,17,23,.5); backdrop-filter: blur(4px); display: none; place-items: center; z-index: 100; padding: 16px; }
.modal-mask.show { display: grid; }
.modal { width: 100%; max-width: 400px; background: var(--bg-elev); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { font-size: 20px; margin-bottom: 4px; }
.modal .sub { color: var(--text-faint); font-size: 13px; margin-bottom: 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: transparent; font-weight: 700; cursor: pointer; color: var(--text-soft); font-family: inherit; }
.tabs button.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.modal .field { margin-bottom: 13px; }
.modal .close { position: absolute; }
.modal-x { float: right; cursor: pointer; font-size: 20px; color: var(--text-faint); background: none; border: none; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: #1f2330; color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #e11d48; }

/* ===== 底部导航（移动端） ===== */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-soft); border-top: 1px solid var(--line); z-index: 60; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1; text-align: center; color: var(--text-faint); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; }
.bottom-nav a .ic { font-size: 20px; }
.bottom-nav a.active { color: var(--primary); }

.empty { text-align: center; color: var(--text-faint); padding: 60px 20px; }
.empty .big { font-size: 46px; margin-bottom: 10px; }

.loader { text-align: center; color: var(--text-faint); padding: 30px; }
.loading-more { text-align: center; padding: 16px; color: var(--text-faint); }

/* ===== 后台 ===== */
.admin-wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 18px 60px; }
.admin-grid { display: grid; grid-template-columns: 200px 1fr; gap: 22px; }
.admin-side { display: flex; flex-direction: column; gap: 6px; }
.admin-side a { padding: 11px 14px; border-radius: 12px; color: var(--text-soft); font-weight: 700; cursor: pointer; }
.admin-side a:hover, .admin-side a.active { background: var(--primary-soft); color: var(--primary); }
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kpi b { font-size: 28px; display: block; }
.kpi span { color: var(--text-faint); font-size: 13px; }
.table { width: 100%; border-collapse: collapse; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { background: var(--bg-soft); color: var(--text-soft); font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.mini-btn { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 8px; padding: 5px 11px; cursor: pointer; font-size: 13px; font-family: inherit; color: var(--text-soft); }
.mini-btn:hover { color: var(--primary); border-color: var(--primary); }
.mini-btn.danger:hover { color: var(--accent); border-color: var(--accent); }

/* ===== 举报入口（首页） ===== */
.fab-report {
  display: none; position: fixed; right: 16px; bottom: 84px; z-index: 55;
  width: 52px; height: 52px; border-radius: 50%; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, var(--accent), #ff8a5c); color: #fff;
  box-shadow: 0 8px 22px rgba(255,90,122,.45);
}
.hero-report { background: linear-gradient(135deg, rgba(255,90,122,.14), rgba(109,94,252,.10)); }

/* ===== 图片：卡片 / 详情 ===== */
.card-imgs { display: grid; gap: 6px; border-radius: 12px; overflow: hidden; }
.card-imgs img { width: 100%; height: 108px; object-fit: cover; cursor: zoom-in; display: block; background: var(--bg); }
.card-imgs.n1 img { height: 170px; }
.card-imgs.n2 { grid-template-columns: 1fr 1fr; }
.card-imgs.n3 { grid-template-columns: 1fr 1fr 1fr; }
.card-imgs { position: relative; }
.more-imgs {
  position: absolute; right: 8px; bottom: 8px; background: rgba(15,17,23,.62); color: #fff;
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px;
}
.post-imgs { display: grid; gap: 8px; margin-top: 16px; }
.post-imgs img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; cursor: zoom-in; border: 1px solid var(--line); }
.post-imgs.n2 { grid-template-columns: 1fr 1fr; }
.post-imgs.n2 img { max-height: 260px; }

/* 大图查看 */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,12,18,.88); z-index: 300;
  display: none; place-items: center; padding: 20px;
}
.lightbox.show { display: grid; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-x {
  position: absolute; top: 16px; right: 18px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.16); color: #fff; font-size: 18px; cursor: pointer;
}

/* ===== 上传组件 ===== */
.up-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.up-add {
  width: 92px; height: 92px; border-radius: 14px; border: 2px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; color: var(--text-faint); transition: .18s; background: var(--bg-soft);
}
.up-add:hover { border-color: var(--primary); color: var(--primary); }
.up-plus { font-size: 24px; line-height: 1; }
.up-tip { font-size: 11px; }
.up-item {
  position: relative; width: 92px; height: 92px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-soft); display: grid; place-items: center;
}
.up-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.up-del {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(15,17,23,.66); color: #fff; font-size: 12px; cursor: pointer; line-height: 1;
}
.up-cover {
  position: absolute; left: 4px; bottom: 4px; background: rgba(109,94,252,.92); color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 6px;
}
.up-loading .spin {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line);
  border-top-color: var(--primary); animation: spin .8s linear infinite; display: block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 验证码 ===== */
.cap-row { display: flex; gap: 10px; align-items: center; }
.cap-row input { flex: 1; }
.cap-img {
  width: 140px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  cursor: pointer; background: var(--bg-soft); flex-shrink: 0; object-fit: cover;
}

/* ===== 开关行 ===== */
.switch-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); cursor: pointer;
}
.switch-row input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.switch-txt { font-size: 14px; font-weight: 600; }
.switch-txt em { color: var(--text-faint); font-style: normal; font-weight: 400; font-size: 12.5px; }

/* ===== 举报类型卡片 ===== */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.type-card {
  position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px;
  cursor: pointer; background: var(--bg-soft); transition: .18s; display: block;
}
.type-card input { position: absolute; opacity: 0; pointer-events: none; }
.type-card:hover { border-color: var(--primary); }
.type-card.active { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 4px 14px rgba(109,94,252,.16); }
.tc-icon { font-size: 20px; }
.tc-label { display: block; font-weight: 700; font-size: 14px; margin-top: 4px; }
.tc-desc { display: block; color: var(--text-faint); font-size: 12px; line-height: 1.5; margin-top: 3px; }

/* ===== 文章选择器 ===== */
.pick-wrap { position: relative; }
.pick-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; padding: 6px;
}
.pick-item { padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.pick-item:hover { background: var(--primary-soft); }
.pick-item b { color: var(--primary); font-size: 12px; }
.pick-item span { margin-left: auto; color: var(--text-faint); font-size: 11.5px; white-space: nowrap; }
.pick-item.empty { color: var(--text-faint); cursor: default; }
.picked {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 9px 12px;
  background: var(--primary-soft); border-radius: 12px; font-size: 13.5px; flex-wrap: wrap;
}
.picked-txt { font-weight: 600; color: var(--primary); }
.link-strong { color: var(--primary); font-weight: 700; }
.req { color: var(--accent); }
.hint .link-strong { text-decoration: underline; }

/* ===== 匿名标记 ===== */
.anon-mark {
  font-style: normal; font-size: 11px; font-weight: 700; color: #7c3aed;
  background: rgba(124,58,237,.12); padding: 1px 6px; border-radius: 6px; margin-left: 4px;
}
.danger-lite { color: var(--accent); }
.report-btn { color: var(--accent); border-color: rgba(255,90,122,.4); }

/* ===== 提交成功 ===== */
.done-box { text-align: center; padding: 20px 10px; }
.done-icon { font-size: 52px; margin-bottom: 8px; }
.done-box h2 { font-size: 20px; margin-bottom: 10px; }

/* ===== 后台：新增模块 ===== */
.side-badge {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px; margin-left: 6px;
}
.table-scroll { overflow-x: auto; }
.op-cell { white-space: nowrap; }
.op-cell .mini-btn { margin-right: 3px; }
.ua-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-faint); font-size: 12px; }
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 4px 0; }
.pager .hint { margin-right: auto; }
.pager .mini-btn { min-width: 34px; }
.pager .mini-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 700; }
.pager .mini-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pager-gap { color: var(--text-faint); padding: 0 2px; }
.st-ok { color: var(--primary); font-weight: 700; }
.st-off { color: var(--accent); font-weight: 700; }

.word-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.word-add > input[type=text] {
  flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-family: inherit; font-size: 14px; background: var(--bg-soft); color: var(--text); outline: none;
}
.word-list { display: flex; flex-wrap: wrap; gap: 8px; }
.word-item {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 13px; font-size: 13px;
}
.word-x {
  border: none; background: var(--bg); color: var(--text-faint); width: 20px; height: 20px;
  border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1;
}
.word-x:hover { background: var(--accent); color: #fff; }

.rep-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px;
}
.rep-card.pending { border-left: 4px solid var(--accent); }
.rep-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rep-type { font-weight: 700; font-size: 14.5px; }
.rep-id { color: var(--text-faint); font-size: 12.5px; }
.rep-st { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.rep-st.warn { background: rgba(255,90,122,.14); color: var(--accent); }
.rep-st.ok { background: rgba(34,197,94,.14); color: #16a34a; }
.rep-st.muted { background: var(--bg); color: var(--text-faint); }
.rep-time { margin-left: auto; color: var(--text-faint); font-size: 12.5px; }
.rep-detail { font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.rep-meta { color: var(--text-soft); font-size: 12.5px; margin-top: 6px; }
.rep-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rep-imgs img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.rep-note {
  margin-top: 8px; background: var(--bg); border-radius: 10px; padding: 8px 12px;
  font-size: 13px; color: var(--text-soft);
}
.rep-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.rep-body { font-size: 13.5px; line-height: 1.7; color: var(--text-soft); max-height: 300px; overflow-y: auto; }
.rep-body p { margin-bottom: 6px; }
.rep-actions { display: flex; gap: 10px; margin-top: 8px; }
.rep-actions .btn { flex: 1; }

.pwd-row { display: flex; gap: 8px; }
.pwd-row input { flex: 1; }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { gap: 8px; padding: 10px 12px; }
  .brand { font-size: 16px; gap: 7px; }
  .brand .logo { width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
  #writeBtn { display: none; }
  .hero { padding: 20px; }
  .stats { margin-left: 0; width: 100%; justify-content: space-around; }
  .feed { grid-template-columns: 1fr; }
  .bottom-nav { display: flex; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-side { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .admin-side a { white-space: nowrap; }
  .wrap { padding-bottom: 80px; }
  .post, .comments, .box { border-radius: 16px; }
  .fab-report { display: grid; }
  .type-grid { grid-template-columns: 1fr; }
  .post-imgs.n2 { grid-template-columns: 1fr; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 9px 10px; }
  .rep-time { margin-left: 0; width: 100%; }
}

/* ===== 后台 · 站点设置 ===== */
#setForm textarea { min-height: 62px; }
.set-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.set-preview {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(135deg, rgba(109,94,252,.10), rgba(236,72,153,.08));
}
.set-preview .logo {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 23px; background: linear-gradient(135deg, var(--primary), #a855f7);
  box-shadow: 0 6px 16px rgba(109,94,252,.28); flex: 0 0 auto;
}
.set-pv-name { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.set-pv-slogan { color: var(--text-soft); font-size: 13px; margin-top: 4px; word-break: break-all; }

/* ===== 后台：账号安全 ===== */
.admin-me { display: none; }
@media (min-width: 900px) { .admin-me { display: inline; } }
.acct-now {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 15px; margin-bottom: 18px;
}
.acct-now-item { min-width: 0; }
.acct-now-item span { display: block; color: var(--text-faint); font-size: 12px; margin-bottom: 3px; }
.acct-now-item b { font-size: 13.5px; word-break: break-all; }
.alert-box {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 15px; font-size: 13.5px; line-height: 1.75;
}
.alert-box .ab-ic { font-size: 18px; line-height: 1.3; flex: 0 0 auto; }
.alert-box.warn { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.38); }
.alert-box.ok   { background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.30); }
.acct-help { color: var(--text-soft); font-size: 13px; line-height: 1.95; padding-left: 18px; margin: 0 0 14px; }
.acct-help code, .alert-box code, .box .hint code {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.side-badge.warn { background: #f59e0b; }
@media (max-width: 720px) {
  .acct-now { grid-template-columns: 1fr; gap: 10px; }
  /* 后台窄屏：品牌名不折行，「访问前台」让位（桌面端仍在） */
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
  .nav-front { display: none; }
}

/* ===== 热度分（最热排序时显示在卡片时间行） ===== */
.hot-score { color: var(--accent); font-weight: 700; }

/* ===== 上一篇 / 下一篇（快速看下一篇） ===== */
.post-nav {
  max-width: 760px; margin: 18px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.pn-item {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 15px; transition: transform .16s, border-color .18s, box-shadow .2s;
}
.pn-item:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pn-item.next { text-align: right; align-items: flex-end; }
.pn-item.disabled { opacity: .55; cursor: not-allowed; }
.pn-item.disabled:hover { transform: none; border-color: var(--line); box-shadow: none; }
.pn-label { font-size: 12px; font-weight: 700; color: var(--text-faint); }
.pn-title {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.pn-hint { max-width: 760px; margin: 8px auto 0; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ===== 猜你喜欢（个性化推荐） ===== */
.rec-box { max-width: 760px; margin: 24px auto 0; }
.rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rec-head h2 { font-size: 18px; }
.rec-reason { color: var(--text-faint); font-size: 12.5px; }
.rec-head .mini-btn { margin-left: auto; }
.rec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec-item {
  display: flex; gap: 10px; align-items: flex-start; min-width: 0;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: transform .16s, border-color .18s;
}
.rec-item:hover { border-color: var(--primary); transform: translateY(-2px); }
.rec-badge {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
}
.rec-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rec-main b {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rec-main em { font-style: normal; font-size: 12px; color: var(--text-faint); }

@media (max-width: 720px) {
  .post-nav { grid-template-columns: 1fr; }
  .pn-hint { display: none; }
  .rec-list { grid-template-columns: 1fr; }
  .rec-head .mini-btn { margin-left: 0; }
}
