/* 苹果风格全局：圆润、毛玻璃、留白、微动效 */
:root {
  --bg-a: #f2f4f8;
  --bg-b: #e9edf3;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --line: rgba(0, 0, 0, 0.07);
  --text: #1b1d22;
  --text-soft: #555a66;
  --muted: #8f96a3;
  --primary: #0a84ff;
  --primary-soft: rgba(10, 132, 255, 0.14);
  --success: #30d158;
  --warn: #ff9f0a;
  --danger:  #ff453a;
  --shadow-l: 0 30px 60px rgba(17, 24, 39, 0.14), 0 10px 22px rgba(17, 24, 39, 0.08);
  --shadow-s: 0 6px 18px rgba(17, 24, 39, 0.08);
  --radius-l: 24px;
  --radius-m: 16px;
  --radius-s: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-a: #111317;
    --bg-b: #0c0d10;
    --card: rgba(30, 33, 40, 0.68);
    --card-solid: #1e2129;
    --line: rgba(255, 255, 255, 0.08);
    --text: #e8eaef;
    --text-soft: #b3b8c3;
    --muted: #7a808e;
    --primary: #409cff;
    --primary-soft: rgba(64, 156, 255, 0.22);
    --shadow-l: 0 30px 60px rgba(0, 0, 0, 0.55), 0 10px 22px rgba(0, 0, 0, 0.35);
    --shadow-s: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(10, 132, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(191, 90, 242, 0.14), transparent 55%),
    radial-gradient(900px 600px at 50% 110%, rgba(48, 209, 88, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-a), var(--bg-b));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }

/* 顶部 Hero */
.hero {
  position: relative;
  padding: 42px 44px 44px;
  border-radius: var(--radius-l);
  background: var(--card);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,0) 40%);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.brand {
  display: flex; align-items: center; gap: 16px;
}
.brand-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, #5ea7ff 0%, #a07bff 55%, #ff7ab6 100%);
  color: white; font-weight: 800; font-size: 26px;
  display: grid; place-items: center; letter-spacing: 2px;
  box-shadow: 0 10px 26px rgba(90, 120, 255, .32);
}
.brand h1 {
  margin: 0; font-size: 34px; letter-spacing: 2px; font-weight: 700;
}
.brand small {
  color: var(--text-soft); font-weight: 500; letter-spacing: .5px;
  display: block; margin-top: 4px; font-size: 14px;
}
.hero-stats {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 16px 18px;
  box-shadow: var(--shadow-s);
  transition: transform .3s ease;
}
.stat:hover { transform: translateY(-3px); }
.stat .label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }

@media (max-width: 780px) {
  .hero { padding: 28px 22px 32px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .brand h1 { font-size: 26px; }
}

/* 按钮 */
.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--primary); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease, background .2s;
  box-shadow: 0 6px 16px rgba(10, 132, 255, 0.25);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: var(--card-solid); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-s);
}
.btn.warn { background: var(--warn); box-shadow: 0 6px 16px rgba(255, 159, 10, .25); }
.btn.danger { background: var(--danger); box-shadow: 0 6px 16px rgba(255, 69, 58, .25); }
.btn.mini { padding: 6px 10px; font-size: 12px; border-radius: 10px; box-shadow: none; }

/* 标签 */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 600;
}
.chip.neutral {
  background: rgba(143, 150, 163, 0.18); color: var(--text-soft);
}
.chip.gold {
  background: linear-gradient(135deg, rgba(255,193,68,.25), rgba(255,149,40,.25));
  color: #b77200;
}
@media (prefers-color-scheme: dark) {
  .chip.gold { color: #f3c06b; }
}

/* 区块标题 */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 42px 4px 16px;
}
.section-title h2 { margin: 0; font-size: 20px; letter-spacing: 1px; }
.section-title span { color: var(--muted); font-size: 13px; }

/* 成员列表 */
.member-list {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 18px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-s);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-l);
}
.card-head {
  display: flex; align-items: center; gap: 14px;
}
.avatar {
  border-radius: 50%;
  width: 56px; height: 56px;
  background: #cdd5e2 center/cover no-repeat;
  flex: 0 0 56px;
  border: 2px solid rgba(255,255,255,.45);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  object-fit: cover;
  overflow: hidden;
}
.avatar.lg { width: 84px; height: 84px; flex: 0 0 84px; }
.avatar.sm { width: 36px; height: 36px; flex: 0 0 36px; }

.member-main { flex: 1; min-width: 0; }
.member-name { font-size: 17px; font-weight: 700; }
.member-meta {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px;
  color: var(--text-soft); font-size: 13px; align-items: center;
}
.merit {
  margin-left: auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.merit .n { font-size: 24px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(135deg, #ffb24e, #ff5e7e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.merit .lbl { color: var(--muted); font-size: 12px; letter-spacing: 1px; }

/* 展开区域 */
.toggle {
  margin-top: 14px;
  width: 100%;
  background: transparent; border: 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 12px;
  color: var(--text-soft); font-size: 13px; font-weight: 600;
  transition: background .2s ease, color .2s;
}
.toggle:hover { background: rgba(10, 132, 255, 0.08); color: var(--text); }
.toggle .chev {
  transition: transform .3s ease; font-size: 12px; color: var(--muted);
}
.card.open .toggle .chev { transform: rotate(180deg); }
.collapse {
  max-height: 0; overflow: hidden;
  transition: max-height .4s cubic-bezier(.2,.8,.2,1);
}
.card.open .collapse { max-height: 1600px; }
.detail {
  margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.sub-title {
  font-size: 12px; color: var(--muted); letter-spacing: 1px;
  margin: 12px 2px 6px; text-transform: uppercase; font-weight: 700;
}
.record-item {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(143, 150, 163, 0.08);
  margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; font-size: 13.5px;
  animation: fadein .35s ease both;
}
.record-item .delta.pos { color: var(--success); font-weight: 700; }
.record-item .delta.neg { color: var(--danger); font-weight: 700; }
.record-item .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.record-item .op { color: var(--text-soft); margin-top: 4px; font-size: 12px; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 公告弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  display: none; place-items: center; padding: 24px;
  animation: fadein .3s ease both;
}
.modal-mask.show { display: grid; }
.modal {
  width: min(640px, 96vw);
  max-height: 88vh; overflow: auto;
  background: var(--card-solid);
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: var(--shadow-l);
  border: 1px solid var(--line);
  animation: popin .35s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes popin {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal .row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 10px;
}
.modal h3 { margin: 0; font-size: 18px; }
.modal .meta { color: var(--muted); font-size: 12px; }
.modal .body { margin: 12px 2px 8px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.modal .body img { max-width: 100%; border-radius: 14px; margin-top: 8px; display: block; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.modal-stack .modal + .modal { margin-top: 14px; }

/* 表格 */
table.sheet {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--card-solid);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-s);
  border: 1px solid var(--line);
  font-size: 14px;
}
table.sheet th, table.sheet td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.sheet th {
  background: rgba(143, 150, 163, 0.08);
  color: var(--text-soft); font-size: 12px; letter-spacing: 1px;
  font-weight: 700;
}
table.sheet tr:last-child td { border-bottom: 0; }

/* 后台布局 */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  padding: 24px 16px;
  background: var(--card);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand-logo { width: 46px; height: 46px; font-size: 18px; border-radius: 14px; }
.sidebar h1 { font-size: 18px; margin: 0; }
.sidebar small { color: var(--muted); font-size: 12px; }
.nav { margin-top: 24px; display: flex; flex-direction: column; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--text-soft);
  padding: 10px 14px; border-radius: 12px;
  font-weight: 600; font-size: 14px;
  transition: background .2s, color .2s;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.nav a:hover { background: rgba(143, 150, 163, 0.1); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-user { display: flex; align-items: center; gap: 10px; padding: 6px; }
.foot-user .who { font-size: 13px; color: var(--text); font-weight: 600; }
.foot-user .r { font-size: 12px; color: var(--muted); }

.content { padding: 30px 36px 80px; }
.panel {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 22px;
  box-shadow: var(--shadow-s);
}
.panel + .panel { margin-top: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: 1px; }
.panel .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

label { font-size: 13px; color: var(--text-soft); font-weight: 600; display: block; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(143, 150, 163, 0.06);
  color: var(--text);
  font: inherit; font-size: 14px;
  transition: border-color .2s ease, background .2s;
  outline: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  background: var(--card-solid);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.row-btns .right { margin-left: auto; display: flex; gap: 10px; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 96vw);
  background: var(--card);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-l);
  padding: 32px 28px 28px;
  animation: popin .4s ease both;
}
.login-card .brand { justify-content: center; flex-direction: column; gap: 10px; text-align: center; }
.login-card .brand h1 { letter-spacing: 4px; }
.login-card .field + .field { margin-top: 12px; }
.login-card .btn { width: 100%; margin-top: 18px; padding: 12px; font-size: 15px; }

/* 头像上传小控件 */
.avatar-editor {
  display: flex; gap: 14px; align-items: center;
}
.avatar-editor .avatar { cursor: pointer; }
.avatar-editor .tips { color: var(--muted); font-size: 12.5px; }
.avatar-editor input[type=file] { display: none; }

.tabs {
  display: inline-flex; padding: 4px;
  background: rgba(143, 150, 163, 0.12);
  border-radius: 14px; gap: 2px; margin-bottom: 14px;
}
.tabs button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px 14px; border-radius: 11px; color: var(--text-soft);
  font-weight: 600; font-size: 13.5px; transition: all .2s ease;
}
.tabs button.active { background: var(--card-solid); color: var(--text); box-shadow: var(--shadow-s); }

.stack-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* 移动端后台布局 */
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .content { padding: 22px 16px 60px; }
  .panel .grid2, .panel .grid3 { grid-template-columns: 1fr; }
}

.empty {
  padding: 22px; text-align: center; color: var(--muted);
  border-radius: 14px; background: rgba(143, 150, 163, 0.06);
  font-size: 13.5px;
}

/* ============ 公告卡片：图文比例优化 + 手机自适应 ============ */
.ann-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(143, 150, 163, 0.04);
  margin-top: 12px;
  transition: background .2s ease, transform .25s ease, box-shadow .25s ease;
}
.ann-card:hover {
  background: rgba(143, 150, 163, 0.07);
  transform: translateY(-1px);
  box-shadow: var(--shadow-s);
}
.ann-card.without-image { display: block; }
.ann-card.with-image {
  display: grid;
  grid-template-columns: minmax(200px, 28%) 1fr;
  gap: 18px;
  align-items: flex-start;
}
.ann-media img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--card-solid);
  border: 1px solid var(--line);
}
.ann-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 6px;
}
.ann-title { font-size: 16px; letter-spacing: .5px; }
.ann-meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.ann-content {
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.8;
  word-break: break-word;
  font-size: 14.5px;
  margin-top: 4px;
}

/* ============ 前台公开站点的 sidebar/nav tab ============ */
.public-layout .sidebar {
  height: 100vh;
}
.public-layout .hero-stats.compact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 0;
}
.public-layout .hero-stats.compact .stat {
  padding: 10px 12px;
  box-shadow: none;
}
.public-layout .hero-stats.compact .stat .value {
  font-size: 18px; font-weight: 700; margin-top: 2px;
}
.public-layout .hero-stats.compact .stat .label {
  font-size: 11px;
}
.public-layout .content { padding: 30px 36px 80px; }

/* 站标（logo）：苹果风圆角 */
.site-logo {
  width: 100%; height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}
.brand-logo img.site-logo + span { display: none; }
.brand-logo {
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}

/* 未读公告弹窗：统一外壳 + 高级感装饰 + 无框分隔条目（彻底去重复框） */
.ann-dialog {
  position: relative;
  width: min(700px, 96vw);
  max-height: 86vh;
  display: flex; flex-direction: column;
  background: var(--card-solid);
  border-radius: 26px;
  box-shadow:
    0 30px 80px -20px rgba(30, 27, 75, 0.45),
    0 10px 30px -12px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 0 0 1px rgba(99, 102, 241, 0.08);
  overflow: hidden;
  animation: dialogIn .5s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes dialogIn {
  0%   { opacity: 0; transform: translateY(28px) scale(.96) rotateX(6deg); filter: blur(4px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}
.modal-mask:has(.ann-dialog) {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(236, 72, 153, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.7));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  animation: maskIn .4s ease both;
}
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }

.ann-dialog__ribbon {
  position: relative;
  height: 6px;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 40%, #ec4899 80%, #f97316 100%);
  overflow: hidden;
}
.ann-dialog__ribbon::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  transform: translateX(-100%);
  animation: shine 2.8s ease-in-out infinite .6s;
}
@keyframes shine {
  0%, 40% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(120%); }
}
.ann-dialog__badge {
  position: absolute;
  top: 16px; left: 24px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(236, 72, 153, 0.92));
  color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  box-shadow: 0 8px 22px -8px rgba(139, 92, 246, 0.6), 0 0 0 1px rgba(255,255,255,.25) inset;
  z-index: 2;
}
.ann-dialog__badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
  animation: pulse 1.6s ease-in-out infinite;
}
.ann-dialog__badge .label { opacity: .92; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .85; }
}

.ann-dialog__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 32px 28px 14px;
}
.ann-dialog__head h3 {
  margin: 10px 0 2px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .2px;
  background: linear-gradient(135deg, #1f2937 0%, #4338ca 60%, #be185d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ann-dialog__head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.ann-dialog__close {
  margin-top: 4px;
  width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.ann-dialog__close:hover {
  transform: rotate(90deg);
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.ann-dialog__body {
  padding: 4px 28px 2px;
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
}
.ann-dialog__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 28px 24px;
  margin-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.04));
}

/* 公告条目：无框、分割线区分，避免和外层卡片重复 */
.ann-stack {
  list-style: none; margin: 0; padding: 6px 0 14px;
  display: flex; flex-direction: column;
}
.ann-stack__item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 18px 0 20px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.22);
  opacity: 0; transform: translateY(8px);
  animation: itemIn .55s cubic-bezier(.16, 1, .3, 1) forwards;
}
.ann-stack__item:last-child { border-bottom: 0; padding-bottom: 10px; }
@keyframes itemIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
.ann-stack__marker {
  padding-top: 2px;
}
.ann-stack__marker .n {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 10px;
  font-size: 12px; font-weight: 800;
  background: linear-gradient(135deg, #eef2ff, #fce7f3);
  color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15) inset;
}
.ann-stack__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 6px;
}
.ann-stack__top .t {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #0f172a;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.new-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .6px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 4px 10px -4px rgba(239, 68, 68, 0.55);
}
.ann-stack__top .m {
  color: var(--muted);
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  padding-top: 3px;
}
.ann-stack__top .m .who { color: var(--text-soft); font-weight: 600; }
.dot-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .5;
}
.ann-stack__cover {
  margin: 8px 0 6px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.ann-stack__cover img {
  width: 100%; display: block;
  aspect-ratio: 16 / 9; object-fit: cover;
}
.ann-stack__content {
  margin: 4px 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.5), rgba(252, 231, 243, 0.25));
  border-left: 3px solid #8b5cf6;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 按钮升级 */
.btn.ghost-soft {
  background: rgba(148, 163, 184, 0.08);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all .2s ease;
}
.btn.ghost-soft:hover {
  background: rgba(148, 163, 184, 0.14);
  color: #0f172a;
  transform: translateY(-1px);
}
.btn.primary-gradient {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff;
  border: 0;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 0.7), 0 0 0 1px rgba(255,255,255,.18) inset;
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}
.btn.primary-gradient::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);
  transform: translateX(-100%);
  transition: transform .6s ease;
}
.btn.primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(139, 92, 246, 0.8), 0 0 0 1px rgba(255,255,255,.25) inset;
  filter: saturate(1.1);
}
.btn.primary-gradient:hover::after { transform: translateX(100%); }
.btn.primary-gradient:active { transform: translateY(0) scale(.98); }

@media (max-width: 820px) {
  .ann-dialog {
    width: min(96vw, 700px);
    border-radius: 22px;
    max-height: 90vh;
  }
  .ann-dialog__head { padding: 28px 18px 10px; }
  .ann-dialog__head h3 { font-size: 19px; }
  .ann-dialog__body { padding: 4px 18px 2px; }
  .ann-dialog__foot { padding: 14px 18px 20px; flex-wrap: wrap; }
  .ann-dialog__foot .btn { flex: 1; }
  .ann-dialog__badge { left: 18px; top: 14px; font-size: 11px; padding: 5px 10px; }
  .ann-stack__item { grid-template-columns: 28px 1fr; gap: 10px; padding: 14px 0 16px; }
  .ann-stack__top { flex-direction: column; gap: 2px; }
  .ann-stack__top .m { padding-top: 0; }
  .ann-stack__content { padding: 8px 12px; font-size: 13.5px; }
}

/* ============ 手机适配 ============ */
@media (max-width: 820px) {
  .public-layout .sidebar { height: auto; }
  .public-layout .hero-stats.compact { grid-template-columns: 1fr 1fr; }
  .public-layout .content { padding: 20px 14px 60px; }

  .ann-card.with-image {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ann-media img {
    min-height: 160px;
    max-height: 220px;
    aspect-ratio: 16 / 10;
  }

  .member-list {
    grid-template-columns: 1fr;
  }

  table.sheet {
    font-size: 13px;
    display: block; overflow-x: auto;
  }
  table.sheet th, table.sheet td { padding: 10px 10px; }

  .container { padding: 20px 14px 60px; }
  .nav {
    flex-direction: row !important;
    overflow-x: auto;
    padding: 4px;
    background: rgba(143, 150, 163, 0.08);
    border-radius: 14px;
    gap: 2px;
  }
  .nav a {
    flex: 0 0 auto;
    padding: 8px 14px;
    white-space: nowrap;
    font-size: 13.5px;
  }

  .modal-stack-wrap,
  .modal {
    width: min(96vw, 640px);
  }

  .brand-logo { width: 44px; height: 44px; font-size: 18px; border-radius: 14px; }
  .sidebar h1 { font-size: 16px; }

  .panel { padding: 16px; border-radius: 20px; }
  .panel h2 { font-size: 16px; letter-spacing: .5px; }

  .hero { padding: 26px 20px 28px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat .value { font-size: 20px; }
  .brand h1 { font-size: 24px; }

  .content { padding: 18px 14px 60px; }
  .panel .grid2, .panel .grid3 { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px 14px; }
  .ann-card { padding: 14px; border-radius: 16px; }
  .ann-title { font-size: 15px; }
  .ann-content { font-size: 14px; line-height: 1.75; }
  .ann-media img { min-height: 140px; aspect-ratio: 16 / 9; }
  .chip { font-size: 11.5px; }
  .card { padding: 14px; border-radius: 20px; }
  .avatar { width: 48px; height: 48px; flex: 0 0 48px; }
  .avatar.lg { width: 72px; height: 72px; flex: 0 0 72px; }
  .merit .n { font-size: 20px; }
  .member-name { font-size: 15.5px; }
  table.sheet { font-size: 12.5px; }
  table.sheet th, table.sheet td { padding: 8px 8px; }
}

/* =========================================================
 * 粒子背景 canvas（放在 body 第一层，z-index=0，随内容不滚动）
 * ========================================================= */
#glowParticles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  display: block;
}
/* 把布局抬到粒子上面（.modal-mask 要保持 position fixed，绝对不能在这里写 position） */
.layout, .login-wrap, .container { position: relative; z-index: 2; }

/* =========================================================
 * 排行榜子 tab（滑块下划线 + 按钮样式）
 * ========================================================= */
.rank-tabs-wrap {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.rank-tabs-wrap::-webkit-scrollbar { display: none; }
.rank-tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  background: rgba(143, 150, 163, 0.12);
  border-radius: 14px;
  gap: 2px;
}
.rank-tabs button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 11px; color: var(--text-soft);
  font-weight: 700; font-size: 13.5px; white-space: nowrap;
  transition: color .25s ease;
  position: relative;
  z-index: 1;
}
.rank-tabs button.active { color: var(--primary); }
.rank-slider {
  position: absolute;
  left: 0; top: 4px;
  height: calc(100% - 8px);
  border-radius: 11px;
  background: var(--card-solid);
  box-shadow: var(--shadow-s);
  transition: transform .32s cubic-bezier(.2,.9,.25,1), width .32s cubic-bezier(.2,.9,.25,1);
  z-index: 0;
  will-change: transform, width;
}

/* =========================================================
 * 滑入动画（从右滑进来，略带上抬）
 * ========================================================= */
.slide-pane.slide-in { animation: slideInRight .42s cubic-bezier(.2,.9,.25,1) both; }
@keyframes slideInRight {
  0%   { opacity: 0; transform: translateX(26px) translateY(6px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* 表格滚动容器（桌面也给横滚，避免宽表格挤爆） */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  margin-top: 4px;
  border: 1px solid var(--line);
  background: var(--card-solid);
}
.table-wrap > table.sheet {
  border: 0;
  margin: 0;
  min-width: 640px;
  display: table; /* 桌面保持表格自适应 */
}
@media (max-width: 820px) {
  .table-wrap > table.sheet { display: block; overflow-x: auto; }
}

/* =========================================================
 * 移动端：前台/后台统一顶部汉堡 + 侧边栏抽屉
 * ========================================================= */
.mobile-top {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--line);
}
.mobile-top .burger {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card-solid);
  color: var(--text); font-size: 20px; font-weight: 700;
  display: grid; place-items: center;
  cursor: pointer;
}
.mobile-top .m-title { font-size: 15px; font-weight: 700; letter-spacing: 1.5px; }

.side-close {
  display: none;
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card-solid);
  color: var(--text-soft);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  z-index: 5;
}

@media (max-width: 820px) {
  .mobile-top { display: flex; }

  /* 手机端：侧边栏默认隐藏在左边抽屉里，点汉堡滑出 */
  .public-layout { grid-template-columns: 1fr; }
  .public-layout .sidebar,
  .layout:not(.public-layout) .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: min(82vw, 300px);
    height: 100vh;
    z-index: 999;
    transform: translateX(-104%);
    transition: transform .32s cubic-bezier(.2,.9,.25,1);
    overflow-y: auto;
    box-shadow: 20px 0 60px rgba(0,0,0,.28);
    padding-top: 54px;
  }
  .sidebar.open { transform: none; }
  .side-close { display: grid; place-items: center; }

  /* 遮罩：.sidebar.open + :before 伪元素在 body 上不好弄，改成 sibling 处理 —— 用 layout:before */
  .layout:has(.sidebar.open)::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    z-index: 998;
    animation: fadeIn .25s ease both;
  }
  @keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
}

/* =========================================================
 * 公告图片比例统一 & 点击放大手型
 * ========================================================= */
.ann-media img {
  aspect-ratio: 16 / 9 !important;
  min-height: 160px;
  max-height: 280px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform .3s ease, box-shadow .3s ease;
}
.ann-media img:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 28px rgba(17,24,39,.18);
}
.ann-stack__cover img { cursor: zoom-in; }
@media (max-width: 820px) {
  .ann-media img { min-height: 150px; }
}
@media (max-width: 420px) {
  .ann-media img { aspect-ratio: 16 / 9 !important; min-height: 140px; }
}

/* =========================================================
 * 军功榜二级分类按钮（全部榜/行政榜/主力榜/普通成员榜）
 * ========================================================= */
.rank-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rank-filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(143, 150, 163, .08);
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12.5px;
  transition: transform .18s ease, background .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.rank-filters button:hover {
  transform: translateY(-1px);
  background: rgba(143, 150, 163, .14);
  color: var(--text);
}
.rank-filters button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px -8px var(--primary);
}
@media (max-width: 520px) {
  .rank-filters button { padding: 6.5px 11px; font-size: 12px; }
}

