/* ============================================================
   塔里木高级中学校园墙 · 样式
   色彩与图形语言提取自校徽 塔高.png
   ============================================================ */

:root {
  --blue-900: #0B2559;
  --blue-800: #102E6B;
  --blue-700: #143C8C;
  --blue-600: #1A4FA8;
  --blue-500: #2B63BE;

  --cyan-700: #0A6E8C;
  --cyan-600: #008CB4;
  --cyan-500: #1B8FB5;
  --cyan-400: #46A9C1;
  --cyan-200: #A0C8DC;
  --cyan-100: #D6EAF1;
  --cyan-50: #EDF5F9;

  --gold-700: #A87833;
  --gold-600: #C89545;
  --gold-500: #DCB567;
  --gold-300: #EBD3A3;
  --gold-100: #F9F2E2;

  --ink-900: #141A26;
  --ink-700: #2C3444;
  --ink-500: #4A5568;
  --ink-400: #6B7688;
  --ink-300: #98A2B3;
  --line: #E3E9F2;
  --bg: #F4F7FB;
  --white: #FFFFFF;

  --like: #E4586B;
  --success: #2E9E6B;
  --danger: #D64545;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 3px rgba(16, 46, 107, .07), 0 6px 16px -8px rgba(16, 46, 107, .12);
  --shadow-float: 0 6px 20px rgba(16, 46, 107, .22), 0 2px 6px rgba(16, 46, 107, .14);

  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --topbar-h: 56px;
  --tabbar-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

/* ============================================================
   基础组件
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-700));
  color: #fff;
  box-shadow: 0 4px 14px -3px rgba(20, 60, 140, .45);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px -3px rgba(20, 60, 140, .55); }

.btn-ghost {
  background: var(--cyan-50);
  color: var(--cyan-700);
  border: 1px solid var(--cyan-100);
}
.btn-ghost:hover { background: var(--cyan-100); }

.btn-plain { color: var(--ink-500); }
.btn-plain:hover { color: var(--ink-700); }

.btn-danger { background: #FDF0F0; color: var(--danger); border: 1px solid #F7DADA; }

.input {
  width: 100%;
  height: 44px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1.5px solid var(--line);
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(70, 169, 193, .16);
}
.input::placeholder { color: var(--ink-300); }

textarea.input {
  height: auto;
  padding: 12px 15px;
  line-height: 1.7;
  resize: vertical;
  min-height: 110px;
}

.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-400);
  margin-bottom: 7px;
  letter-spacing: .3px;
}
.field-hint {
  font-size: 11.5px;
  color: var(--ink-300);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-700));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex: 0 0 auto;
  user-select: none;
}
.avatar-xs { width: 22px; height: 22px; font-size: 10px; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-md { width: 38px; height: 38px; font-size: 15px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner-dark {
  border-color: var(--line);
  border-top-color: var(--cyan-600);
}
@keyframes spin { to { transform: rotate(360deg); } }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   外壳布局
   ============================================================ */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300) 18%, var(--cyan-400) 45%, var(--blue-700) 76%, var(--gold-500));
  opacity: .8;
  pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 0 1 auto; }
.brand-logo { width: 30px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.brand-text { min-width: 0; overflow: hidden; }
.brand-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 手机屏幕放不下英文全称，先藏起来，平板以上再显示 */
.brand-sub {
  display: none;
  font-size: 10px;
  color: var(--ink-300);
  letter-spacing: .4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search {
  display: none;
  align-items: center;
  gap: 8px;
  width: 280px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-300);
  font-size: 12.5px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-400);
  transition: background .16s ease, color .16s ease;
}
.icon-btn:hover { background: var(--cyan-50); color: var(--blue-700); }
.back-btn { margin-left: -8px; margin-right: -2px; }

.shell {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.page {
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: calc(var(--tabbar-h) + 24px);
}

/* 详情页不显示底部导航，评论栏自己贴着屏幕底边，不需要再留导航高度 */
.page-detail { padding-bottom: 0; }

.sidebar, .rightbar { display: none; }

/* ============================================================
   话题胶囊
   ============================================================ */

.chips {
  display: flex;
  gap: 8px;
  padding: 12px 14px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg);
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--white);
  color: var(--ink-500);
  border: 1px solid var(--line);
  transition: all .16s ease;
}
.chip:hover { border-color: var(--cyan-200); color: var(--cyan-700); }
.chip.active {
  background: var(--blue-700);
  color: #fff;
  border-color: var(--blue-700);
  font-weight: 600;
  box-shadow: 0 3px 10px -2px rgba(20, 60, 140, .4);
}

/* ============================================================
   信息流
   ============================================================ */

.feed {
  display: flex;
  gap: 10px;
  padding: 0 12px 12px;
  align-items: flex-start;
}
.feed-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
  cursor: pointer;
}
.card:hover {
  box-shadow: 0 4px 10px rgba(16,46,107,.1), 0 14px 30px -12px rgba(16,46,107,.24);
}

/* 用 aspect-ratio + 绝对定位让图片真正填满容器。
   早先用 padding-bottom 撑高度，img 的 height:100% 并不等于容器内容高度，
   结果图片只占一半、下面露出底色。 */
.card-media {
  position: relative;
  width: 100%;
  background: var(--cyan-100);
  overflow: hidden;
}
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.card:hover .card-media img { transform: scale(1.03); }

.card-badge {
  position: absolute;
  left: 8px; top: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(11, 37, 89, .62);
  backdrop-filter: blur(6px);
}
.card-badge.hot {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: #3A2408;
}

.card-text-only {
  padding: 14px 13px 12px;
  background: linear-gradient(150deg, var(--cyan-50), #fff 66%);
  border-left: 3px solid var(--cyan-400);
}
.card-quote {
  font-size: 19px;
  line-height: .7;
  color: var(--cyan-200);
  font-family: Georgia, serif;
  margin-bottom: 3px;
}
.card-text-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-900);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-text-excerpt {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-500);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body { padding: 9px 11px 10px; }
.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-900);
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-400);
}
.card-meta .name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.stat.liked { color: var(--like); font-weight: 600; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(100deg, #EDF1F7 30%, #F7FAFD 50%, #EDF1F7 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s infinite linear;
  border-radius: 6px;
}
@keyframes shimmer {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}
.skeleton-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.skeleton-card .s-img { height: 150px; }
.skeleton-card .s-line { height: 11px; margin: 9px 11px 0; }
.skeleton-card .s-line.short { width: 55%; margin-bottom: 11px; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 56px 24px 60px;
  color: var(--ink-400);
}
.empty-art { width: 128px; margin: 0 auto 18px; opacity: .9; }
.empty h3 { font-size: 15px; font-weight: 700; color: var(--ink-700); margin-bottom: 7px; }
.empty p { font-size: 12.5px; line-height: 1.7; color: var(--ink-300); }

.load-more {
  display: flex;
  justify-content: center;
  padding: 18px 0 10px;
}

/* ============================================================
   悬浮按钮与底部导航（手机）
   ============================================================ */

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--cyan-600), var(--blue-700));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-float);
  z-index: 55;
  transition: transform .16s ease;
}
.fab:active { transform: scale(.93); }
.fab::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  opacity: .5;
  pointer-events: none;
}

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 58;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  color: var(--ink-300);
  transition: color .16s ease;
  position: relative;
}
.tab.active { color: var(--blue-700); font-weight: 600; }
.tab.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 2.5px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--cyan-600), var(--blue-700));
}

/* ============================================================
   详情页
   ============================================================ */

.detail { background: var(--white); min-height: 100%; }
.detail-hero { position: relative; background: #0B2559; }
.detail-hero img { width: 100%; max-height: 62vh; object-fit: contain; background: #0B2559; }

.gallery { position: relative; }
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  background: #0B2559;
}
.gallery-slide img { width: 100%; max-height: 62vh; object-fit: contain; }
.gallery-dots {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.gallery-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transition: all .2s ease;
}
.gallery-dot.on { background: #fff; width: 16px; border-radius: 3px; }
.gallery-dot { cursor: pointer; }

/* 左右翻页按钮：手机上可以滑动，电脑上鼠标拖不动横向滚动条，靠这个 */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 37, 89, .55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .18s ease, transform .18s ease;
  z-index: 3;
}
.gallery-nav span {
  font-size: 26px;
  line-height: 1;
  font-weight: 300;
  margin-top: -3px;
}
.gallery-nav:hover {
  background: rgba(11, 37, 89, .82);
  transform: translateY(-50%) scale(1.06);
}
.gallery-nav:active { transform: translateY(-50%) scale(.96); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }


/* ============================================================
   图片放大查看
   ============================================================ */

/* 图片本身现在是可点的，给个提示 */
.detail-hero { cursor: zoom-in; }
.gallery-slide { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 16, 38, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  animation: lb-in .18s ease;
}
@keyframes lb-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 图片舞台：给缩放留出滚动空间 */
.lb-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .16s ease;
  transform-origin: center center;
}
.lb-img.zoomed {
  cursor: zoom-out;
  /* 放大后允许拖拽查看局部 */
  max-width: none;
  max-height: none;
}

/* 缩放控制条 */
.lb-zoom {
  position: absolute;
  bottom: 20px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.lb-zoom-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
  font-family: inherit;
}
.lb-zoom-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .28); }
.lb-zoom-btn:disabled { opacity: .3; cursor: default; }
.lb-zoom-btn.reset {
  width: auto;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.lb-zoom-val {
  min-width: 44px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.lb-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease;
  z-index: 2;
}
.lb-close:hover { background: rgba(255, 255, 255, .26); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, transform .18s ease;
  z-index: 2;
}
.lb-nav span {
  font-size: 34px;
  line-height: 1;
  font-weight: 300;
  margin-top: -4px;
}
.lb-nav:hover { background: rgba(255, 255, 255, .26); transform: translateY(-50%) scale(1.05); }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }

.lb-count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .4px;
  font-variant-numeric: tabular-nums;
}

/* 手机上收窄边距，按钮小一点 */
@media (max-width: 768px) {
  .lightbox { padding: 20px 12px; }
  .lb-nav { width: 42px; height: 42px; }
  .lb-nav span { font-size: 28px; }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
  .lb-close { width: 36px; height: 36px; top: 12px; right: 12px; font-size: 22px; }
  .lb-count { bottom: 14px; }
}

/* 右上角的页码 */
.gallery-count {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(11, 37, 89, .6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  backdrop-filter: blur(6px);
  z-index: 3;
  font-variant-numeric: tabular-nums;
}

/* 手机上按钮小一点，别挡着图 */
@media (max-width: 768px) {
  .gallery-nav { width: 34px; height: 34px; }
  .gallery-nav span { font-size: 22px; }
  .gallery-nav.prev { left: 8px; }
  .gallery-nav.next { right: 8px; }
}

.detail-body { padding: 16px 16px 0; }
.detail-topic {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--cyan-50);
  color: var(--cyan-700);
  border: 1px solid var(--cyan-100);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}
.detail-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: .2px;
  color: var(--ink-900);
}
.detail-author {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.detail-author .info { flex: 1 1 auto; min-width: 0; }
.detail-author .n { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.detail-author .m { font-size: 11px; color: var(--ink-300); margin-top: 2px; }

.detail-text {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-700);
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-400);
  transition: color .16s ease, transform .16s ease;
}
.action:hover { color: var(--ink-700); }
.action.liked { color: var(--like); }
.action.liked svg { fill: var(--like); }
.action:active { transform: scale(.94); }
.action.push-right { margin-left: auto; }

@keyframes likePop {
  0% { transform: scale(1); }
  38% { transform: scale(1.42); }
  62% { transform: scale(.92); }
  100% { transform: scale(1); }
}
.like-pop { animation: likePop .42s cubic-bezier(.28,.9,.4,1.2); }

/* ============================================================
   评论
   ============================================================ */

.comments { padding: 4px 16px 120px; }
.comments-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 16px 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}
.comments-head span { font-size: 11.5px; font-weight: 500; color: var(--ink-300); }

.comment {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #F0F4F9;
}
.comment:last-child { border-bottom: 0; }
.comment.reply { padding-left: 38px; }
.comment-main { flex: 1 1 auto; min-width: 0; }
.comment-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.comment-name { font-size: 12px; font-weight: 600; color: var(--ink-500); }
.comment-class { font-size: 10.5px; color: var(--ink-300); }
.comment-time { font-size: 10.5px; color: var(--ink-300); margin-left: auto; flex: 0 0 auto; }
.comment-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-700);
  margin-top: 4px;
  word-break: break-word;
}
.comment-reply-hi { color: var(--cyan-600); font-weight: 500; }
.comment-ops {
  display: flex;
  gap: 14px;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-300);
}
.comment-ops button:hover { color: var(--cyan-700); }

.comment-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 56;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.comment-bar .input { height: 38px; border-radius: var(--radius-pill); background: var(--bg); }
.comment-bar .send {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 17px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-700));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.comment-bar .send:disabled { opacity: .45; }
.reply-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 2px;
  font-size: 11.5px;
  color: var(--cyan-700);
}
.reply-hint button { color: var(--ink-300); }

/* ============================================================
   发布页
   ============================================================ */

.publish { padding: 16px 16px 140px; max-width: 640px; margin: 0 auto; }

.grid9 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell .del {
  position: absolute;
  right: 4px; top: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(11,37,89,.72);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.cell-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1.4px dashed var(--cyan-200);
  background: var(--cyan-50);
  color: var(--cyan-600);
  font-size: 10.5px;
  transition: all .16s ease;
}
.cell-add:hover { border-color: var(--cyan-400); background: var(--cyan-100); }
.cell-add:disabled { opacity: .5; cursor: not-allowed; }

.anon-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.anon-row .t { flex: 1 1 auto; }
.anon-row .t b { display: block; font-size: 13px; font-weight: 600; color: var(--ink-700); }
.anon-row .t span { display: block; font-size: 11px; color: var(--ink-300); margin-top: 2px; }

.tip {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-100);
  border: 1px solid var(--gold-300);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--gold-700);
  margin-bottom: 20px;
}
.tip b { font-weight: 700; }

.publish-actions { display: flex; gap: 10px; }
.publish-actions .btn { flex: 1 1 auto; height: 44px; }

/* ============================================================
   个人中心
   ============================================================ */

.profile { padding: 0 0 100px; }

.profile-head {
  background:
    radial-gradient(700px 300px at 82% -20%, rgba(220,181,103,.28), transparent 62%),
    linear-gradient(150deg, var(--blue-800), var(--blue-700) 58%, var(--blue-600));
  padding: 26px 18px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.profile-head::after {
  content: "1960";
  position: absolute;
  right: 16px; bottom: -14px;
  font-size: 62px;
  font-weight: 700;
  font-family: Consolas, monospace;
  letter-spacing: 3px;
  color: rgba(255,255,255,.06);
  pointer-events: none;
}
.profile-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.profile-avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.42);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex: 0 0 auto;
}
.profile-id { flex: 1 1 auto; min-width: 0; }
.profile-name { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.profile-meta { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 4px; }

.profile-stats {
  display: flex;
  gap: 26px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}
.profile-stat .n { font-size: 18px; font-weight: 700; }
.profile-stat .l { font-size: 11px; color: rgba(255,255,255,.66); margin-top: 1px; }

.profile-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
}
.profile-tab {
  flex: 1 1 0;
  padding: 14px 0 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-400);
  position: relative;
  transition: color .16s ease;
}
.profile-tab.active { color: var(--blue-700); font-weight: 700; }
.profile-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 2.5px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--cyan-600), var(--blue-700));
}

.profile-list { padding: 12px 14px 20px; }
.mine-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
  cursor: pointer;
}
.mine-thumb {
  width: 78px; height: 78px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--cyan-50);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan-200);
}
.mine-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mine-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mine-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mine-meta {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-300);
}

.settings-list {
  padding: 14px;
}
.setting-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--ink-700);
}
.setting-item .si-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--cyan-50);
  color: var(--cyan-700);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.setting-item .si-text { flex: 1 1 auto; }
.setting-item .si-sub { font-size: 11px; color: var(--ink-300); margin-top: 2px; }

/* ============================================================
   登录页
   ============================================================ */

.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background:
    radial-gradient(900px 460px at 12% -10%, rgba(0, 140, 180, .3), transparent 62%),
    radial-gradient(800px 420px at 92% 8%, rgba(220, 181, 103, .16), transparent 60%),
    linear-gradient(160deg, #0B2559 0%, #102E6B 48%, #143C8C 100%);
}
.login-card {
  width: 100%;
  max-width: 372px;
  background: var(--white);
  border-radius: 22px;
  padding: 34px 26px 30px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .45);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--cyan-400) 46%, var(--blue-700));
}
.login-logo { width: 62px; margin: 0 auto 14px; }
.login-title {
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: .4px;
}
.login-sub {
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-300);
  margin: 6px 0 24px;
  letter-spacing: .3px;
}
.login-error {
  padding: 9px 13px;
  border-radius: 9px;
  background: #FDF0F0;
  border: 1px solid #F7DADA;
  color: var(--danger);
  font-size: 12.5px;
  margin-bottom: 14px;
}
.login-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-300);
  line-height: 1.7;
}
.login-foot b { color: var(--gold-600); font-family: Consolas, monospace; letter-spacing: .5px; }

/* ============================================================
   Toast
   ============================================================ */

.toast-layer {
  position: fixed;
  left: 0; right: 0;
  top: 68px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}
.toast {
  max-width: 340px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(20, 26, 38, .92);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  backdrop-filter: blur(8px);
  animation: toastIn .22s ease;
}
.toast.err { background: rgba(168, 40, 40, .95); }
.toast.ok { background: rgba(24, 110, 76, .95); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   平板
   ============================================================ */

@media (min-width: 768px) {
  :root { --topbar-h: 62px; }
  .topbar { padding: 0 20px; gap: 14px; }
  .brand-logo { width: 34px; height: 38px; }
  .brand-name { font-size: 16.5px; }
  .brand-sub { display: block; font-size: 10.5px; }
  .topbar-search { display: flex; }
  .chips { padding: 14px 20px 12px; }
  .feed { padding: 0 18px 18px; gap: 14px; }
  .feed-col { gap: 14px; }
  .card-title { font-size: 13.5px; }
  .detail-body { padding: 20px 24px 0; }
  .comments { padding: 4px 24px 130px; }
  .publish { padding: 20px 24px 130px; }
  .profile-list { padding: 16px 18px 24px; }
  .login-card { padding: 38px 32px 32px; }
}

/* ============================================================
   桌面
   ============================================================ */

@media (min-width: 1180px) {
  .shell { padding: 0 20px; gap: 22px; }

  .sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 196px;
    padding: 20px 0;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    align-self: flex-start;
  }
  .side-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10.5px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-500);
    margin-bottom: 3px;
    cursor: pointer;
    transition: all .16s ease;
  }
  .side-item:hover { background: var(--cyan-50); color: var(--blue-700); }
  .side-item.active {
    background: linear-gradient(100deg, var(--blue-700), var(--blue-600));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 5px 14px -4px rgba(20, 60, 140, .45);
  }
  .side-sep { height: 1px; background: var(--line); margin: 13px 10px; }
  .side-foot {
    margin-top: auto;
    padding: 14px;
    border-top: 1px solid var(--line);
  }
  .side-foot .y {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-600);
    font-family: Consolas, monospace;
    letter-spacing: 1.5px;
  }
  .side-foot .t { font-size: 10.5px; color: var(--ink-300); margin-top: 3px; line-height: 1.5; }

  .rightbar {
    display: flex;
    flex-direction: column;
    flex: 0 0 272px;
    gap: 14px;
    padding: 20px 0;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    align-self: flex-start;
    overflow-y: auto;
  }
  .panel {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px 16px;
    box-shadow: var(--shadow-card);
  }
  .panel h3 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 11px;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .panel h3::before {
    content: "";
    width: 3px; height: 13px;
    border-radius: 2px;
    background: linear-gradient(var(--cyan-600), var(--blue-700));
  }
  .topic-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 12.5px;
    cursor: pointer;
  }
  .topic-row:last-child { border-bottom: 0; padding-bottom: 0; }
  .topic-row:hover .tn { color: var(--blue-700); }
  .topic-rank {
    width: 17px; height: 17px;
    border-radius: 5px;
    background: var(--cyan-50);
    color: var(--cyan-700);
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
  }
  .topic-row:nth-child(2) .topic-rank,
  .topic-row:nth-child(3) .topic-rank { background: var(--gold-100); color: var(--gold-700); }
  .topic-row .tn { flex: 1 1 auto; color: var(--ink-700); font-weight: 500; transition: color .16s ease; }
  .topic-row .tc { font-size: 10.5px; color: var(--ink-300); }

  .notice-row {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--ink-500);
  }
  .notice-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--cyan-400);
    margin-top: 7px;
    flex: 0 0 auto;
  }
  .panel-about {
    background: linear-gradient(150deg, var(--blue-800), var(--blue-700) 62%, var(--blue-600));
    color: #fff;
    position: relative;
    overflow: hidden;
  }
  .panel-about::after {
    content: "1960";
    position: absolute;
    right: 10px; bottom: -10px;
    font-size: 42px;
    font-weight: 700;
    font-family: Consolas, monospace;
    letter-spacing: 2px;
    color: rgba(255,255,255,.07);
  }
  .panel-about img { width: 30px; margin-bottom: 9px; }
  .panel-about h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
  .panel-about p {
    font-size: 11px;
    line-height: 1.7;
    color: rgba(255,255,255,.74);
    position: relative;
    z-index: 1;
  }

  .feed { padding: 0 0 24px; gap: 14px; }
  .page { padding-bottom: 24px; }
  .fab, .tabbar { display: none; }

  .grid9 { grid-template-columns: repeat(4, 1fr); }
  .comment-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 100%;
    max-width: 760px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-radius: 14px 14px 0 0;
  }
  .toast-layer { top: 76px; }
}

/* ------------------------------------------------------------
   瀑布流列数：手机两条，平板及以上三条。
   多算了一列放在 DOM 里，靠这里控制是否显示，避免切换设备时重新组织数据。
   ------------------------------------------------------------ */
.feed-col-2 { display: none; }

@media (min-width: 768px) {
  .feed-col-2 { display: flex; }
}

/* ============================================================
   铃铛红点
   ============================================================ */

.bell-btn { position: relative; }
.bell-dot {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--like);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  border: 1.5px solid var(--white);
}
.topbar-search-btn { display: flex; }
@media (min-width: 768px) {
  .topbar-search-btn { display: none; }
}

/* ============================================================
   通知面板
   ============================================================ */

.notif-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(11, 37, 89, .38);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: flex-end;
}
.notif-panel {
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(11, 37, 89, .18);
  animation: notifIn .22s ease;
}
@keyframes notifIn {
  from { transform: translateX(24px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.notif-head h3 { font-size: 15.5px; font-weight: 700; color: var(--ink-900); }
.notif-list { flex: 1 1 auto; overflow-y: auto; }
.notif-item {
  display: flex;
  gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid #F0F4F9;
  cursor: pointer;
  transition: background .15s ease;
}
.notif-item:hover { background: var(--cyan-50); }
.notif-item.unread { background: #FBFDFF; }
.notif-item.unread::before {
  content: "";
  position: absolute;
  margin-left: -8px;
  margin-top: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--like);
}
.notif-item .avatar { margin-top: 2px; }
.notif-item .nt-like { background: linear-gradient(135deg, var(--like), #f08a99); }
.notif-item .nt-comment,
.notif-item .nt-reply { background: linear-gradient(135deg, var(--cyan-500), var(--blue-700)); }
.ni-body { flex: 1 1 auto; min-width: 0; }
.ni-text { font-size: 13px; line-height: 1.5; color: var(--ink-700); }
.ni-text b { color: var(--ink-900); font-weight: 600; }
.ni-snippet {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-400);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ni-time { margin-top: 5px; font-size: 10.5px; color: var(--ink-300); }

/* ============================================================
   举报弹窗
   ============================================================ */

.dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(11, 37, 89, .42);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dialog {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 24px 60px -12px rgba(11, 37, 89, .4);
  overflow: hidden;
  animation: dialogIn .2s ease;
}
@keyframes dialogIn {
  from { transform: scale(.96); opacity: .7; }
  to { transform: none; opacity: 1; }
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h3 { font-size: 15px; font-weight: 700; color: var(--ink-900); }
.dialog-body { padding: 16px; }
.dialog-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}
.dialog-actions .btn { flex: 1 1 auto; height: 42px; }
.reason-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.reason-chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 12.5px;
  color: var(--ink-500);
  transition: all .15s ease;
}
.reason-chip:hover { border-color: var(--cyan-200); color: var(--cyan-700); }
.reason-chip.active {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: #fff;
  font-weight: 600;
}

/* ============================================================
   搜索页
   ============================================================ */

.search-wrap {
  display: flex;
  gap: 9px;
  padding: 12px 14px;
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
  background: var(--bg);
}
.search-box {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1.5px solid var(--line);
  color: var(--ink-300);
}
.search-box:focus-within { border-color: var(--cyan-400); box-shadow: 0 0 0 3px rgba(70,169,193,.14); }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--ink-900);
  outline: none;
}
.search-input::placeholder { color: var(--ink-300); }
.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-500);
  flex: 0 0 auto;
}
.search-go { flex: 0 0 auto; height: 42px; padding: 0 18px; }
.search-count {
  padding: 0 14px 12px;
  font-size: 12px;
  color: var(--ink-400);
}

/* ============================================================
   编辑提示
   ============================================================ */

.edit-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: var(--cyan-50);
  border: 1px solid var(--cyan-100);
  color: var(--cyan-700);
  font-size: 12.5px;
}

/* ============================================================
   管理后台
   ============================================================ */

.admin { padding: 18px 14px 120px; }
.admin-head { margin-bottom: 16px; }
.admin-head h1 { font-size: 21px; font-weight: 700; color: var(--ink-900); }
.admin-head p { font-size: 12px; color: var(--ink-400); margin-top: 4px; }

.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
  padding-bottom: 2px;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-500);
  white-space: nowrap;
}
.admin-tab.active {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: #fff;
  font-weight: 600;
}
.admin-badge {
  display: inline-block;
  margin-left: 5px;
  min-width: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--like);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 15px;
  box-shadow: var(--shadow-card);
  border-left: 3px solid var(--cyan-400);
}
.stat-card.warn { border-left-color: var(--like); }
.sc-n { font-size: 22px; font-weight: 700; color: var(--blue-700); line-height: 1.2; }
.stat-card.warn .sc-n { color: var(--like); }
.sc-l { font-size: 11.5px; color: var(--ink-400); margin-top: 3px; }

.admin-hint {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-100);
  border: 1px solid var(--gold-300);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--gold-700);
}
.admin-hint code {
  font-family: Consolas, monospace;
  background: rgba(255,255,255,.6);
  padding: 1px 5px;
  border-radius: 4px;
}

.admin-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow-card);
}
.ai-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-reason {
  font-size: 12px;
  font-weight: 700;
  color: var(--like);
  background: #FDF0F0;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}
.ai-status {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  flex: 0 0 auto;
}
.ai-status.pending { background: #FFF4E5; color: #B26A00; }
.ai-status.handled { background: #FDECEC; color: var(--danger); }
.ai-status.dismissed { background: var(--line); color: var(--ink-400); }
.ai-status.published { background: #E9F7F0; color: var(--success); }
.ai-status.hidden { background: #FDECEC; color: var(--danger); }
.ai-status.ai_blocked { background: #FDECEC; color: var(--danger); font-weight: 700; }
.ai-status.admin { background: var(--gold-100); color: var(--gold-700); }
.ai-status.owner { background: linear-gradient(135deg, #143C8C, #008CB4); color: #fff; }
.ai-status.student { background: var(--cyan-50); color: var(--cyan-700); }
.ai-time { margin-left: auto; font-size: 10.5px; color: var(--ink-300); }
.ai-target { font-size: 12.5px; color: var(--ink-700); line-height: 1.6; }
.ai-target b { font-weight: 600; color: var(--ink-900); }
.ai-sub { font-size: 11px; color: var(--ink-300); margin-top: 5px; }
.ai-detail {
  font-size: 11.5px;
  color: var(--ink-500);
  background: var(--bg);
  padding: 7px 10px;
  border-radius: 7px;
  margin-top: 7px;
  line-height: 1.6;
}
.ai-ops { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }

.admin-table {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #F0F4F9;
}
.admin-row:last-child { border-bottom: 0; }
.ar-main { flex: 1 1 auto; min-width: 0; }
.ar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.ar-title:hover { color: var(--blue-700); }
.ar-meta { font-size: 11px; color: var(--ink-300); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-admin { color: var(--gold-700); }
.side-admin.active { color: #fff; }

/* ============================================================
   先审后发：待审提示、锁定评论条、我的投稿状态徽章
   ============================================================ */

.review-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 13px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #FFF4E5;
  color: #B26A00;
  font-size: 12.5px;
  line-height: 1.55;
}
.review-banner svg { flex: 0 0 auto; margin-top: 1px; }
.review-banner.is-rejected { background: #FDECEC; color: var(--danger); }

.comment-bar-locked {
  justify-content: center;
  font-size: 12.5px;
  color: var(--ink-400);
}

.post-badge {
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 600;
  flex: 0 0 auto;
}
.post-badge.is-pending { background: #FFF4E5; color: #B26A00; }
.post-badge.is-rejected { background: #FDECEC; color: var(--danger); }

/* 侧边栏「管理后台」的待审数量标记 */
.side-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  flex: 0 0 auto;
}

/* 管理后台批量操作条 */
.admin-bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: 12px;
  color: var(--ink-500);
  flex-wrap: wrap;
}
.admin-bulk .bulk-count { margin-right: auto; font-weight: 600; color: var(--ink-900); }
.admin-check { flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--blue-700); }

/* 头像：上传了图片就显示图片，圆形裁切；没有就还是昵称首字 */
.avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* 个人中心里的管理后台入口（手机端进后台的唯一入口） */
.admin-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 14px 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #143C8C, #008CB4);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(20, 60, 140, .22);
}
.admin-entry .ae-text { font-size: 14px; font-weight: 700; }
.admin-entry .ae-badge {
  padding: 1px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .22);
  font-size: 10.5px;
  font-weight: 600;
}
.admin-entry .ae-hint {
  margin-left: auto;
  font-size: 10.5px;
  opacity: .78;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-entry .ae-arrow { transform: rotate(180deg); opacity: .8; flex: 0 0 auto; }

/* ============================================================
   置顶
   ============================================================ */

.card-badge.pin {
  background: linear-gradient(135deg, #DCB567, #C99533);
  color: #4A3300;
  font-weight: 700;
}
.card-badge.pin-inline {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;      /* 不加这句会和基础的 left:8px 打架，标签被拉成整行 */
  width: auto;
}
.card-text-only { position: relative; }

/* 管理后台里的「置顶」小标 */
.pin-mark {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: linear-gradient(135deg, #DCB567, #C99533);
  color: #4A3300;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

/* 「取消置顶」按钮：已置顶时给个金色描边，一眼看出状态 */
.btn.is-pinned {
  color: var(--gold-700);
  border-color: var(--gold-100);
}

/* ============================================================
   强制改密码
   ============================================================ */

.force-pwd {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: var(--bg);
}
.force-pwd-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
}
.force-pwd-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-700));
  color: #fff;
  margin-bottom: 14px;
}
.force-pwd h1 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 8px;
}
.force-pwd-sub {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-400);
  margin-bottom: 18px;
}
.force-pwd-err {
  margin: 8px 0;
  padding: 8px 11px;
  border-radius: 9px;
  background: #FDECEC;
  color: var(--danger);
  font-size: 12px;
}
.force-pwd-hint {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--ink-300);
  text-align: center;
}

/* 管理后台里标一下「这个账号还没改初始密码」 */
.must-pwd-mark {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #FFF4E5;
  color: #B26A00;
  font-size: 10px;
  font-weight: 600;
}

/* ============================================================
   校园公告
   ============================================================ */

/* 手机端首页顶部的公告条，电脑端藏掉（那边有右侧栏） */
.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #FFF9EC;
  border: 1px solid #F5E3BC;
  color: #7A5A12;
  font-size: 12.5px;
  line-height: 1.6;
}
.notice-bar svg { flex: 0 0 auto; margin-top: 2px; color: #C99533; }
.notice-bar-text > div { padding: 1px 0; }

@media (min-width: 1024px) {
  .notice-bar { display: none; }
}

/* 管理后台的公告编辑区 */
.notice-editor {
  margin-top: 14px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.notice-editor .ne-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.notice-editor h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}
.notice-editor .ne-hint {
  font-size: 11px;
  color: var(--ink-300);
}
.notice-editor textarea.input {
  width: 100%;
  resize: vertical;
  line-height: 1.7;
  font-size: 13px;
}

/* ============================================================
   实时监控仪表盘
   ============================================================ */

.monitor { padding-bottom: 20px; }

.mon-error {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #FDECEC;
  color: var(--danger);
  font-size: 12.5px;
}

.mon-label {
  font-size: 11.5px;
  color: var(--ink-400);
  letter-spacing: .02em;
}

/* 顶部带宽大卡 */
.mon-hero {
  display: flex;
  gap: 20px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0E2B5C, #1B4DB8);
  color: #fff;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.mon-hero-main { flex: 1 1 220px; min-width: 200px; }
.mon-hero .mon-label { color: rgba(255,255,255,.65); }
.mon-big {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.mon-big .unit {
  font-size: 14px;
  font-weight: 500;
  margin-left: 6px;
  opacity: .75;
}
.mon-sub { font-size: 11.5px; color: rgba(255,255,255,.6); }

.mon-hero-chart { flex: 1 1 260px; min-width: 220px; }
.mon-spark {
  width: 100%;
  height: 60px;
  display: block;
  background: rgba(255,255,255,.06);
  border-radius: 8px;
}
.mon-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  align-items: center;
  flex-wrap: wrap;
}
.mon-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
}
.mon-peak { margin-left: auto; color: rgba(255,255,255,.5); }

/* 指标小卡 */
.mon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.mon-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.mon-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 4px 0 8px;
  font-variant-numeric: tabular-nums;
}
.mon-value .unit { font-size: 12px; font-weight: 500; color: var(--ink-400); margin-left: 3px; }
.mon-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--ink-100);
  overflow: hidden;
}
.mon-bar > div { height: 100%; border-radius: 3px; transition: width .4s ease; }
.mon-foot {
  font-size: 11px;
  color: var(--ink-300);
  margin-top: 6px;
  line-height: 1.5;
}

/* 分区 */
.mon-section {
  padding: 14px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}
.mon-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-700);
  margin-bottom: 12px;
}
.mon-disks { display: flex; flex-direction: column; gap: 10px; }
.mon-disk-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-500);
  margin-bottom: 5px;
}
.mon-disk-head b { color: var(--ink-800); font-size: 12.5px; }

.mon-reqs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.mon-req-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.mon-req-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-300);
  margin-top: 4px;
}
.mon-req-detail .bad { color: var(--danger); }

.mon-biz { display: flex; flex-wrap: wrap; gap: 22px; }
.mon-biz-item { display: flex; flex-direction: column; }
.mon-biz-item b {
  font-size: 20px;
  color: var(--blue-700);
  font-variant-numeric: tabular-nums;
}
.mon-biz-item span { font-size: 11px; color: var(--ink-300); }

.mon-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* AI 预审标签 */
.ai-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  cursor: help;
}
.ai-tag.safe { background: #E9F7F0; color: var(--success); }
.ai-tag.suspect { background: #FFF4E5; color: #B26A00; }
.ai-tag.blocked { background: #FDECEC; color: var(--danger); }
.ai-tag.unknown { background: var(--line); color: var(--ink-400); }

/* ============================================================
   账号在线状态
   ============================================================ */

.online-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
}
.online-summary .os-item {
  text-align: center;
  min-width: 66px;
}
.online-summary .os-n {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-700);
  line-height: 1.2;
}
.online-summary .os-l {
  font-size: 10.5px;
  color: var(--ink-400);
  margin-top: 2px;
}

.online-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-200);
}
.online-dot.on {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}
.admin-row.row-online { background: #F7FDFA; }

.online-ip {
  flex: 0 0 auto;
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: var(--ink-500);
  direction: rtl;
  text-align: left;
}
.online-time {
  flex: 0 0 auto;
  width: 66px;
  text-align: right;
  font-size: 11px;
  color: var(--ink-400);
}

/* 年级 / 班级单独一列，比小字醒目 */
.online-class {
  flex: 0 0 auto;
  width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan-700);
  text-align: right;
}
.online-class.empty { color: var(--ink-300); font-weight: 400; }

/* 在线页的列名提示 */
.online-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 6px;
  font-size: 10.5px;
  color: var(--ink-300);
}
.online-head .oh-name { flex: 1 1 auto; }
.online-head .oh-class { flex: 0 0 auto; width: 88px; text-align: right; }
.online-head .oh-ip { flex: 0 0 auto; max-width: 168px; width: 168px; }
.online-head .oh-time { flex: 0 0 auto; width: 66px; text-align: right; }

/* ============================================================
   AI 助手聊天
   ============================================================ */

.ai-fab {
  position: fixed;
  right: 18px;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 58;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-700));
  box-shadow: 0 6px 18px rgba(20, 60, 140, .3);
}
.ai-fab span { font-size: 9px; font-weight: 700; letter-spacing: .5px; margin-top: -1px; }

.chat-mask {
  position: fixed;
  inset: 0;
  z-index: 62;
  background: rgba(11, 26, 51, .42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.chat-panel {
  width: 100%;
  max-width: 520px;
  height: min(72vh, 620px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  box-shadow: 0 -8px 30px rgba(11, 26, 51, .22);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.chat-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}
.chat-quota {
  margin-left: auto;
  margin-right: 4px;
  font-size: 11px;
  color: var(--ink-400);
}
.chat-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-row { display: flex; }
.chat-row.user { justify-content: flex-end; }
.chat-bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-row.assistant .chat-bubble {
  background: var(--white);
  color: var(--ink-900);
  border-bottom-left-radius: 5px;
  box-shadow: var(--shadow-card);
}
.chat-row.user .chat-bubble {
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-700));
  color: #fff;
  border-bottom-right-radius: 5px;
}
.chat-error {
  align-self: center;
  padding: 6px 12px;
  border-radius: 9px;
  background: #FDECEC;
  color: var(--danger);
  font-size: 11.5px;
}
/* 等模型出第一个字时的三个点 */
.chat-dots { display: inline-flex; gap: 3px; padding: 2px 0; }
.chat-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-300);
  animation: chatDot 1.1s infinite ease-in-out;
}
.chat-dots i:nth-child(2) { animation-delay: .15s; }
.chat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.chat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--line);
}
.chat-bar .input { flex: 1 1 auto; height: 38px; border-radius: var(--radius-pill); background: var(--bg); }
.chat-send {
  flex: 0 0 auto;
  width: 40px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-700));
}
.chat-send:disabled { opacity: .45; }

@media (min-width: 768px) {
  .admin { padding: 24px 24px 40px; max-width: 900px; margin: 0 auto; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .notif-mask { justify-content: flex-end; }
  .notif-panel { max-width: 420px; }
}


@media (max-width: 768px) {
  .lb-zoom { bottom: 56px; right: 10px; padding: 4px 6px; }
  .lb-zoom-btn { width: 28px; height: 28px; font-size: 15px; }
  .lb-zoom-val { min-width: 38px; font-size: 10.5px; }
}

/* ============================================================
   拉黑名单（个人中心设置页）
   ============================================================ */

.setting-block {
  margin-top: 14px;
  padding: 14px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.sb-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-800);
  margin-bottom: 6px;
}
.sb-head svg { color: var(--ink-400); }
.sb-count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-500);
  font-size: 10.5px;
  font-weight: 700;
}
.sb-hint {
  font-size: 11px;
  color: var(--ink-300);
  line-height: 1.6;
  margin-bottom: 10px;
}
.sb-empty {
  padding: 14px 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-300);
}
.sb-list { display: flex; flex-direction: column; gap: 8px; }
.sb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--ink-100);
}
.sb-row:first-child { border-top: none; }
.sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-700));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sb-main { flex: 1 1 auto; min-width: 0; }
.sb-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-meta { font-size: 10.5px; color: var(--ink-300); margin-top: 1px; }
.sb-btn {
  height: 28px;
  font-size: 11.5px;
  padding: 0 12px;
  flex: 0 0 auto;
}

/* ============================================================
   话题管理（管理后台）
   ============================================================ */

.topic-admin { padding-bottom: 16px; }

.ta-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ta-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}
.ta-hint { font-size: 11px; color: var(--ink-300); }

.ta-add {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.ta-add .input { flex: 1 1 auto; }
.ta-add .btn { flex: 0 0 auto; padding: 0 20px; }

.ta-list { display: flex; flex-direction: column; gap: 8px; }

.ta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.ta-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ta-hash { color: var(--cyan-600); margin-right: 2px; }
.ta-count {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--ink-400);
  font-variant-numeric: tabular-nums;
}
.ta-btn {
  flex: 0 0 auto;
  height: 28px;
  font-size: 11.5px;
  padding: 0 12px;
}

/* 添加图片那格用 label，要恢复按钮该有的手型和居中 */
.cell-add {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.cell-add.is-busy { opacity: .65; cursor: default; }
/* 文件选择器铺满「添加图片」那格：点格子 = 点 input 本身 */
.cell-add { position: relative; overflow: hidden; }
.cell-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  /* 手机上让它能盖住整个格子并接收点击 */
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
}


/* 版本标识，方便确认前端是不是最新的 */
.build-tag {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  color: var(--ink-300);
  text-align: center;
  letter-spacing: .5px;
}

/* ============================================================
   原生文件选择按钮
   ============================================================ */

/* 直接把 input 做成格子样子，用户点到的就是浏览器自己的控件 */
.file-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  border: 2px dashed var(--cyan-300);
  background: var(--cyan-50);
  color: var(--cyan-700);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  /* 原生控件在不同系统上的默认样式先全部去掉 */
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.file-cell:active { background: var(--cyan-100); }

/* 让内部那个「选择文件」按钮铺满整个格子，看起来像个正常按钮 */
.file-cell::file-selector-button {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.file-cell::-webkit-file-upload-button {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* 投稿页顶部的版本横幅，方便确认拿到的是最新版 */
.build-banner {
  margin: 0 0 10px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #FFF4E5;
  color: #B26A00;
  font-size: 11px;
  text-align: center;
  font-weight: 600;
  letter-spacing: .3px;
}

/* 从桌面图标打开时的提示条 */
.desktop-tip {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #FFF4E5;
  border: 1px solid #F5DFB8;
  color: #8A5A00;
  font-size: 11.5px;
  line-height: 1.65;
}
.desktop-tip b { color: #B26A00; }

/* ============================================================
   用户主页
   ============================================================ */

.userpage { padding: 16px 16px 24px; }

.up-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.up-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-700));
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
.up-avatar img { width: 100%; height: 100%; object-fit: cover; }

.up-main { flex: 1 1 auto; min-width: 0; }
.up-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.up-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 700;
}
.up-meta {
  font-size: 11.5px;
  color: var(--ink-400);
  margin-top: 4px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.up-meta.muted { color: var(--ink-300); font-size: 11px; }

.up-stats {
  display: flex;
  margin-top: 12px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.up-stat {
  flex: 1 1 0;
  padding: 14px 8px;
  text-align: center;
  border-right: 1px solid var(--ink-100);
}
.up-stat:last-child { border-right: none; }
.up-stat b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: var(--blue-700);
  font-variant-numeric: tabular-nums;
}
.up-stat span { font-size: 11px; color: var(--ink-400); }

.up-actions { margin-top: 12px; display: flex; gap: 8px; }
.up-actions .btn { flex: 0 0 auto; padding: 0 18px; height: 34px; font-size: 12.5px; }

.up-blocked {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink-50);
  color: var(--ink-400);
  font-size: 12.5px;
  text-align: center;
}

.up-section-title {
  margin: 18px 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-700);
}
.up-empty {
  padding: 36px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-300);
}

.up-posts { display: flex; flex-direction: column; gap: 10px; }
.up-post {
  padding: 13px 15px;
  background: var(--white);
  border-radius: 13px;
  box-shadow: var(--shadow-card);
}
.up-post-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
  line-height: 1.45;
}
.up-post-title:hover { color: var(--blue-700); }
.up-post-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-300);
  flex-wrap: wrap;
}
.up-topic { color: var(--cyan-600); font-weight: 600; }
.up-post-like {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}
.up-post-body {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-600);
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 头像可点：给个手型提示 */
.clickable-avatar { cursor: pointer; }
.clickable-avatar:active { opacity: .75; }

@media (max-width: 768px) {
  .userpage { padding: 12px 12px 20px; }
  .up-head { padding: 14px; }
  .up-avatar { width: 56px; height: 56px; font-size: 21px; }
  .up-name { font-size: 16.5px; }
}

/* ============================================================
   AI 运维
   ============================================================ */

.ops-panel { padding-bottom: 16px; }

.ops-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ops-head h3 { font-size: 15px; font-weight: 700; color: var(--ink-900); }
.ops-sub {
  font-size: 11.5px;
  color: var(--ink-400);
  margin-top: 4px;
  line-height: 1.6;
}
.ops-sub b { color: var(--ink-700); }
.ops-head .btn { flex: 0 0 auto; margin-left: auto; }

.ops-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.ops-stat {
  flex: 1 1 0;
  padding: 12px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.ops-stat b {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}
.ops-stat span { font-size: 11px; color: var(--ink-400); }
.ops-stat.bad b { color: var(--danger); }
.ops-stat.warn b { color: #B26A00; }

.ops-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ops-empty {
  padding: 44px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-300);
}

.ops-list { display: flex; flex-direction: column; gap: 6px; }

.ops-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  background: var(--white);
  border-radius: 11px;
  box-shadow: var(--shadow-card);
  border-left: 3px solid var(--ink-200);
}
.ops-row.lv-info { border-left-color: #4CAF50; }
.ops-row.lv-warn { border-left-color: #E0A030; background: #FFFDF7; }
.ops-row.lv-error { border-left-color: var(--danger); background: #FFFafa; }

.ops-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  flex: 0 0 auto;
  background: #4CAF50;
}
.lv-warn .ops-dot { background: #E0A030; }
.lv-error .ops-dot { background: var(--danger); }

.ops-main { flex: 1 1 auto; min-width: 0; }
.ops-action {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-800);
  line-height: 1.5;
}
.ops-detail {
  font-size: 11.5px;
  color: var(--ink-400);
  margin-top: 2px;
  line-height: 1.6;
  word-break: break-all;
}

.ops-right {
  flex: 0 0 auto;
  text-align: right;
}
.ops-time {
  font-size: 10.5px;
  color: var(--ink-300);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ops-ms { font-size: 10px; color: var(--ink-200); margin-top: 2px; }

@media (max-width: 768px) {
  .ops-stats { gap: 6px; }
  .ops-stat { padding: 10px 6px; }
  .ops-stat b { font-size: 17px; }
  .ops-row { padding: 9px 11px; }
}

/* ============================================================
   超级管理员
   ============================================================ */

.admin-tab-super {
  background: linear-gradient(135deg, #FF6B6B, #C0392B) !important;
  color: #fff !important;
  font-weight: 700;
}
.admin-tab-super.active {
  background: linear-gradient(135deg, #E74C3C, #922B21) !important;
}

.super-panel { padding-bottom: 16px; }

.sp-warn {
  padding: 10px 14px;
  border-radius: 11px;
  background: #FFF1F0;
  border: 1px solid #FFCCC7;
  color: #A8071A;
  font-size: 11.5px;
  margin-bottom: 14px;
  line-height: 1.6;
}

.sp-block {
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 14px;
  margin-bottom: 12px;
}
.sp-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-restore { margin-left: auto; height: 26px; font-size: 11px; padding: 0 12px; }
.sp-hint { font-size: 11px; color: var(--ink-300); margin-bottom: 10px; line-height: 1.6; }
.sp-empty {
  padding: 22px 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-300);
}

.sp-switches { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--ink-50);
  font-size: 12px;
  color: var(--ink-700);
  cursor: pointer;
  user-select: none;
}
.sp-switch input { cursor: pointer; width: 15px; height: 15px; }

.sp-list { display: flex; flex-direction: column; gap: 8px; }
.sp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--ink-100);
}
.sp-row:first-child { border-top: none; }
.sp-row-main { flex: 1 1 auto; min-width: 0; }
.sp-row-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-row-meta {
  font-size: 11px;
  color: var(--ink-400);
  margin-top: 3px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sp-real { color: var(--ink-300); font-size: 10.5px; }
.sp-btn { flex: 0 0 auto; height: 27px; font-size: 11px; padding: 0 12px; }

.sp-audit { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; }
.sp-audit-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
  padding: 6px 0;
  border-bottom: 1px solid var(--ink-50);
  flex-wrap: wrap;
  line-height: 1.5;
}
.sp-audit-time { color: var(--ink-300); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.sp-audit-who { color: var(--blue-600); font-weight: 600; flex: 0 0 auto; }
.sp-audit-what { color: var(--ink-700); flex: 1 1 auto; }
.sp-audit-diff { color: var(--ink-400); font-size: 10.5px; flex: 0 0 auto; }

/* 改数据弹层 */
.sp-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(6, 16, 38, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sp-dialog {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.sp-dialog h3 { font-size: 15px; font-weight: 700; color: var(--ink-900); margin-bottom: 6px; }
.sp-dialog-title {
  font-size: 12px;
  color: var(--ink-500);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-dialog-real {
  font-size: 11px;
  color: var(--ink-300);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-100);
}
.sp-field { margin-bottom: 11px; }
.sp-field label {
  display: block;
  font-size: 11.5px;
  color: var(--ink-500);
  margin-bottom: 5px;
  font-weight: 600;
}
.sp-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.sp-dialog-actions .btn { height: 34px; padding: 0 18px; font-size: 12.5px; }

/* 造数据输入栏 */
.sp-seed-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  margin-bottom: 10px;
  background: #FFF9F0;
  border: 1px solid #FFE0B2;
  border-radius: 10px;
  font-size: 11.5px;
  color: #8A5A00;
  flex-wrap: wrap;
}
.sp-seed-input { width: 90px !important; height: 30px !important; font-size: 12px !important; padding: 0 8px !important; }
.sp-seed-hint { color: #A97930; font-size: 10.5px; }

/* ============================================================
   超管 · 账号管理
   ============================================================ */

.sp-count {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-500);
  font-size: 10.5px;
  font-weight: 700;
}

.su-toolbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.su-search { flex: 1 1 140px; height: 32px !important; font-size: 12px !important; }
.su-tbtn { height: 32px; font-size: 11.5px; padding: 0 12px; flex: 0 0 auto; }

.su-batch {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  margin-bottom: 10px;
  background: #EEF6FF;
  border: 1px solid #CFE4FF;
  border-radius: 9px;
  font-size: 11.5px;
  color: #1A5FB4;
  flex-wrap: wrap;
}
.su-batch-btn {
  border: none;
  background: #fff;
  color: #1A5FB4;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.su-batch-btn:hover { background: #DCEBFF; }
.su-batch-btn.danger { color: var(--danger); }
.su-batch-btn.danger:hover { background: #FFE8E6; }

.su-list { display: flex; flex-direction: column; gap: 1px; max-height: 480px; overflow-y: auto; }

.su-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--ink-50);
}
.su-check { margin-top: 3px; cursor: pointer; flex: 0 0 auto; width: 15px; height: 15px; }
.su-main { flex: 1 1 auto; min-width: 0; }
.su-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-800);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.su-meta { font-size: 10.5px; color: var(--ink-300); margin-top: 2px; }

.su-tag {
  padding: 0 5px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  background: var(--ink-100);
  color: var(--ink-500);
}
.su-tag.role-超级 { background: linear-gradient(135deg, #FF6B6B, #C0392B); color: #fff; }
.su-tag.role-墙主 { background: var(--blue-50); color: var(--blue-700); }
.su-tag.role-管理员 { background: var(--cyan-50); color: var(--cyan-700); }
.su-tag.hidden { background: #F0F0F0; color: #888; }
.su-tag.banned { background: #FFE8E6; color: var(--danger); }
.su-tag.noaudit { background: #FFF4E5; color: #B26A00; }

.su-ops {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  max-width: 190px;
  justify-content: flex-end;
}
.su-op {
  border: none;
  background: var(--ink-50);
  color: var(--ink-600);
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.su-op:hover { background: var(--ink-100); }
.su-op.danger { color: var(--danger); }
.su-op.danger:hover { background: #FFE8E6; }

.su-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-600);
  cursor: pointer;
}
.su-check-label input { width: 15px; height: 15px; cursor: pointer; }

@media (max-width: 768px) {
  .su-ops { max-width: 100%; justify-content: flex-start; margin-top: 6px; }
  .su-row { flex-wrap: wrap; }
  .su-main { flex: 1 1 100%; }
}

/* ============================================================
   超管 · 数据库查询
   ============================================================ */

.sql-presets {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.sql-preset {
  border: none;
  background: var(--ink-50);
  color: var(--ink-600);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.sql-preset:hover { background: var(--ink-100); }

.sql-input {
  width: 100% !important;
  font-family: ui-monospace, Consolas, monospace !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  padding: 9px 11px !important;
  resize: vertical;
  box-sizing: border-box;
}

.sql-actions { display: flex; gap: 8px; margin-top: 8px; }
.sql-actions .btn { height: 32px; font-size: 12px; padding: 0 16px; }

.sql-error {
  margin-top: 9px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #FFF1F0;
  border: 1px solid #FFCCC7;
  color: #A8071A;
  font-size: 11.5px;
  line-height: 1.6;
}

.sql-result { margin-top: 10px; }
.sql-meta {
  font-size: 10.5px;
  color: var(--ink-400);
  margin-bottom: 6px;
}
.sql-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink-100);
  border-radius: 9px;
  max-height: 360px;
  overflow-y: auto;
}
.sql-table {
  border-collapse: collapse;
  font-size: 11px;
  width: max-content;
  min-width: 100%;
}
.sql-table th {
  background: var(--ink-50);
  color: var(--ink-600);
  font-weight: 700;
  text-align: left;
  padding: 6px 10px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--ink-100);
}
.sql-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--ink-50);
  color: var(--ink-700);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace;
}
.sql-table tr:hover td { background: #FAFCFF; }

/* select 下拉的样式对齐 */
.sp-field select.input {
  height: 36px;
  padding: 0 10px;
  font-size: 12.5px;
}
