/* =====================================================
   班级主页 · 现代化风格样式
   ===================================================== */

/* ---------- 字体 ---------- */
@import url('https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Regular.min.css');
@import url('https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Medium.min.css');
@import url('https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Semibold.min.css');
@import url('https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Bold.min.css');

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #98a2b3;
  --line: #e6eaf2;
  --primary: #2e6bff;
  --primary-deep: #1f4fd8;
  --cyan: #00c2ff;
  --grad: linear-gradient(135deg, #2e6bff 0%, #00c2ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(46,107,255,.12), rgba(0,194,255,.12));
  --amber: #ffb020;
  --danger: #e5484d;
  --ok: #18a058;
  --dark: #0b1220;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 6px 16px -4px rgba(16,24,40,.1), 0 2px 6px rgba(16,24,40,.05);
  --shadow-lg: 0 20px 44px -12px rgba(16,24,40,.18);
  --font: 'MiSans', 'MiSans VF', -apple-system, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 600; letter-spacing: .01em; }
p { margin: 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- 动画 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes blobFloat { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(24px,-30px) scale(1.08); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { animation: fadeUp .6s cubic-bezier(.22,.8,.36,1) both; animation-delay: calc(var(--i, 0) * 80ms); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s, color .18s, opacity .18s;
  user-select: none;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px -6px rgba(46,107,255,.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(46,107,255,.6); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-danger { background: #fee4e2; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.24); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 15.5px; }
.btn svg { flex: none; }

/* ---------- 输入 ---------- */
.input, .textarea, .select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: var(--surface);
  transition: border-color .18s, box-shadow .18s; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(46,107,255,.12); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* ---------- 徽章 / 标签 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--grad-soft); color: var(--primary-deep);
}
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--ink-2); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.pub { background: #e7f8f0; color: var(--ok); }
.badge.draft { background: #fdf1dc; color: #b7791f; }
.badge.pin { background: var(--grad); color: #fff; }
.badge.role { background: var(--grad-soft); color: var(--primary-deep); }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.78); backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(230,234,242,.9);
}
.nav-inner { display: flex; align-items: center; gap: 26px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16.5px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; background: var(--grad);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 12px -3px rgba(46,107,255,.5);
}
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a {
  padding: 7px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: background .18s, color .18s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a.active { background: var(--grad-soft); color: var(--primary-deep); }
.nav-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.user-chip { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 6px; border-radius: 999px; transition: background .18s; }
.user-chip:hover { background: var(--surface-2); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 600; flex: none;
}
.user-name { font-size: 13.5px; font-weight: 500; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 110;
}
.dropdown.open { display: block; animation: fadeUp .2s ease both; }
.dropdown a, .dropdown button {
  display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; color: var(--ink-2); background: none; border: none; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 70px; }
.hero .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }
.hero .b1 { width: 480px; height: 480px; background: rgba(46,107,255,.35); top: -180px; left: -120px; animation: blobFloat 14s ease-in-out infinite; }
.hero .b2 { width: 420px; height: 420px; background: rgba(0,194,255,.28); bottom: -200px; right: -80px; animation: blobFloat 18s ease-in-out infinite reverse; }
.hero .b3 { width: 260px; height: 260px; background: rgba(255,176,32,.25); top: 20px; right: 34%; animation: blobFloat 16s ease-in-out 2s infinite; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.hero-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(24,160,88,.15); }
.hero-title { font-size: clamp(34px, 5vw, 56px); font-weight: 700; margin: 22px 0 6px; letter-spacing: .02em; }
.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-slogan { font-size: clamp(15px, 1.6vw, 18px); color: var(--ink-2); max-width: 520px; }
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 38px; margin-top: 46px; flex-wrap: wrap; }
.stat .stat-num { font-size: 28px; font-weight: 700; color: var(--ink); }
.stat .stat-num em { font-style: normal; font-size: 15px; color: var(--ink-3); margin-left: 3px; }
.stat .stat-label { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.hero-visual { position: relative; min-height: 380px; }
.float-card {
  position: absolute; border-radius: 20px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-lg); border: 4px solid #fff; width: 58%;
}
.float-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.float-card .fc-ph { aspect-ratio: 4/3; background: var(--grad-soft); display: grid; place-items: center; color: var(--primary); font-weight: 600; }
.float-card.f1 { top: 0; left: 6%; transform: rotate(-4deg); animation: blobFloat 9s ease-in-out infinite; }
.float-card.f2 { bottom: 24px; right: 0; width: 54%; transform: rotate(3.5deg); animation: blobFloat 11s ease-in-out 1.2s infinite; }
.float-card.f3 { top: 42%; left: 40%; width: 34%; transform: rotate(-2deg); animation: blobFloat 10s ease-in-out .6s infinite; }
.hero-quote {
  position: absolute; bottom: -6px; left: 0; padding: 12px 20px; border-radius: 16px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px); box-shadow: var(--shadow-md);
  font-size: 13px; color: var(--ink-2); border: 1px solid var(--line);
}

/* ---------- 区块 ---------- */
.section { padding: 64px 0 20px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.sec-tag { font-size: 12.5px; font-weight: 600; letter-spacing: .12em; color: var(--primary); text-transform: uppercase; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 8px; }
.sec-sub { color: var(--ink-3); font-size: 14px; margin-top: 8px; }
.sec-more { flex: none; }

/* ---------- 文章卡片 ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.a-card {
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(230,234,242,.7);
  transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column;
  position: relative;
}
.a-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.a-cover { aspect-ratio: 16/9.6; overflow: hidden; background: var(--grad-soft); position: relative; }
.a-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.a-card:hover .a-cover img { transform: scale(1.06); }
.a-cover .cover-ph { width: 100%; height: 100%; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary); font-weight: 600; font-size: 15px; }
.pin-badge { position: absolute; top: 14px; left: 14px; z-index: 2; }
.a-body { padding: 20px 22px 18px; display: flex; flex-direction: column; flex: 1; }
.a-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.a-title { font-size: 17.5px; font-weight: 600; transition: color .18s; }
.a-card:hover .a-title { color: var(--primary); }
.a-excerpt { color: var(--ink-2); font-size: 13.5px; margin-top: 8px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.a-meta { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: 12.5px; }
.a-meta .m-item { display: inline-flex; align-items: center; gap: 5px; }
.a-meta .spacer { margin-left: auto; }
.a-meta .author { color: var(--ink-2); font-weight: 500; }

/* ---------- 空状态 / 骨架 ---------- */
.empty {
  text-align: center; padding: 70px 20px; color: var(--ink-3);
  background: var(--surface); border-radius: var(--radius-lg); border: 1.5px dashed var(--line);
}
.empty .big { font-size: 40px; margin-bottom: 12px; }
.sk {
  border-radius: 12px; min-height: 16px;
  background: linear-gradient(100deg, #eef1f6 40%, #f8fafd 50%, #eef1f6 60%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.load-more { display: flex; justify-content: center; margin-top: 34px; }

/* ---------- 相册 ---------- */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.g-item {
  position: relative; border-radius: 18px; overflow: hidden; cursor: zoom-in;
  background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid rgba(230,234,242,.7);
}
.g-item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .45s ease; }
.g-item:hover img { transform: scale(1.07); }
.g-item .g-cap {
  position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px; color: #fff; font-size: 12.5px;
  background: linear-gradient(transparent, rgba(11,18,32,.72)); opacity: 0; transition: opacity .25s;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.g-item:hover .g-cap { opacity: 1; }
.g-item .g-del {
  background: rgba(255,255,255,.16); border: none; color: #fff; width: 26px; height: 26px;
  border-radius: 8px; cursor: pointer; display: grid; place-items: center; font-size: 14px;
}
.g-item .g-del:hover { background: var(--danger); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.strip-grid .g-item img { aspect-ratio: 4/3.4; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(11,18,32,.9); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 88vw; max-height: 84vh; border-radius: 12px; box-shadow: var(--shadow-lg); animation: fadeUp .3s ease both; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,.12); border: none; color: #fff; cursor: pointer;
  width: 46px; height: 46px; border-radius: 50%; font-size: 20px; display: grid; place-items: center; transition: background .2s;
}
.lb-btn:hover { background: rgba(255,255,255,.26); }
.lb-prev { left: 26px; } .lb-next { right: 26px; } .lb-close { top: 22px; right: 26px; }
.lb-count { position: absolute; bottom: 26px; color: rgba(255,255,255,.75); font-size: 13px; letter-spacing: .1em; }

/* ---------- 文章详情 ---------- */
.article-sheet {
  max-width: 800px; margin: 44px auto 20px; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid rgba(230,234,242,.7);
  padding: clamp(28px, 5vw, 56px); position: relative;
}
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13.5px; margin: 30px 0 -12px; }
.back-link:hover { color: var(--primary); }
.art-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.art-title { font-size: clamp(26px, 4vw, 38px); margin: 16px 0 14px; }
.art-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--ink-3); font-size: 13.5px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.art-meta .m-item { display: inline-flex; align-items: center; gap: 6px; }
.art-cover { margin: 26px 0; border-radius: 16px; overflow: hidden; }
.prose { font-size: 15.5px; color: #29303d; line-height: 1.9; }
.prose h1, .prose h2, .prose h3 { margin: 1.4em 0 .6em; }
.prose h1 { font-size: 24px; } .prose h2 { font-size: 21px; } .prose h3 { font-size: 18px; }
.prose h2::before { content: ''; display: inline-block; width: 5px; height: 18px; border-radius: 3px; background: var(--grad); margin-right: 10px; vertical-align: -2px; }
.prose p { margin: .9em 0; }
.prose a { color: var(--primary); }
.prose a:hover { text-decoration: underline; }
.prose blockquote { margin: 1.1em 0; padding: 12px 18px; background: var(--grad-soft); border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0; color: var(--ink-2); }
.prose img { border-radius: 14px; margin: 1.1em auto; box-shadow: var(--shadow-md); }
.prose ul, .prose ol { padding-left: 1.5em; margin: .8em 0; }
.prose li { margin: .3em 0; }
.prose hr { border: none; border-top: 1.5px dashed var(--line); margin: 1.8em 0; }
.prose code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: .9em; }

/* 点赞 */
.like-box { display: flex; justify-content: center; padding: 34px 0 10px; margin-top: 20px; border-top: 1px dashed var(--line); }
.like-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 34px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  font-size: 15.5px; font-weight: 600; color: var(--ink-2); font-family: inherit;
  transition: all .22s ease;
}
.like-btn:hover { border-color: #ff8fa3; color: #f43f5e; transform: translateY(-2px); }
.like-btn.liked { background: linear-gradient(135deg,#f43f5e,#ff8fa3); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -6px rgba(244,63,94,.5); }
.like-btn.liked svg { fill: #fff; }
.like-btn.pop svg { animation: pop .4s ease; }

/* ---------- 评论 ---------- */
.comment-wrap { max-width: 800px; margin: 40px auto 70px; }
.comment-wrap h2 { font-size: 21px; margin-bottom: 20px; }
.c-form { background: var(--surface); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); border: 1px solid rgba(230,234,242,.7); }
.c-row { display: flex; gap: 12px; margin-bottom: 12px; }
.c-row .input { flex: 1; }
.c-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 12px; }
.c-hint { font-size: 12.5px; color: var(--ink-3); }
.c-list { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.c-item { display: flex; gap: 13px; background: var(--surface); padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(230,234,242,.7); box-shadow: var(--shadow-sm); }
.c-main { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.c-name { font-weight: 600; font-size: 14px; }
.c-time { color: var(--ink-3); font-size: 12px; }
.c-del { margin-left: auto; background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: 12.5px; }
.c-del:hover { color: var(--danger); }
.c-content { font-size: 14.5px; color: #29303d; word-break: break-word; white-space: pre-wrap; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(11,18,32,.92); color: #fff; padding: 11px 22px; border-radius: 999px;
  font-size: 14px; z-index: 500; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; box-shadow: var(--shadow-lg); backdrop-filter: blur(8px);
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(229,72,77,.95); }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(11,18,32,.5); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 22px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg); animation: fadeUp .3s ease both; max-height: 88vh; display: flex; flex-direction: column;
}
.modal-lg { max-width: 960px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px 0; }
.modal-head h3 { font-size: 18px; }
.modal-close { background: var(--surface-2); border: none; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; color: var(--ink-2); font-size: 16px; }
.modal-close:hover { background: var(--line); }
.modal-body { padding: 20px 26px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 0 26px 24px; }

/* 图片选择器 */
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; max-height: 340px; overflow-y: auto; padding: 4px; }
.pick-cell { border-radius: 12px; overflow: hidden; cursor: pointer; border: 2.5px solid transparent; position: relative; background: var(--surface-2); }
.pick-cell img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.pick-cell:hover { border-color: var(--primary); }
.pick-up { display: grid; place-items: center; min-height: 110px; border: 2px dashed var(--line); border-radius: 12px; color: var(--ink-3); font-size: 13px; cursor: pointer; gap: 6px; text-align: center; }
.pick-up:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 页脚 ---------- */
.footer { background: var(--dark); color: rgba(255,255,255,.72); margin-top: 70px; }
.footer-inner { padding: 52px 0 30px; }
.f-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.f-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; font-size: 17px; }
.f-brand .logo-mark { box-shadow: none; }
.f-desc { max-width: 420px; font-size: 13.5px; margin-top: 14px; color: rgba(255,255,255,.55); line-height: 1.8; }
.f-links { display: flex; gap: 34px; }
.f-links .col { display: flex; flex-direction: column; gap: 10px; }
.f-links .col b { color: #fff; font-size: 13.5px; margin-bottom: 2px; }
.f-links a { font-size: 13px; color: rgba(255,255,255,.6); }
.f-links a:hover { color: #fff; }
.f-copy { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: rgba(255,255,255,.4); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* =====================================================
   后台管理
   ===================================================== */
body.admin { background: var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.auth-wrap .blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .4; }
.auth-wrap .b1 { width: 420px; height: 420px; background: rgba(46,107,255,.4); top: -140px; left: -100px; animation: blobFloat 14s infinite; }
.auth-wrap .b2 { width: 380px; height: 380px; background: rgba(0,194,255,.3); bottom: -140px; right: -80px; animation: blobFloat 17s infinite reverse; }
.auth-card {
  position: relative; width: 100%; max-width: 400px; background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px); border-radius: 24px; padding: 40px 36px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.7);
}
.auth-card .logo-mark { width: 46px; height: 46px; border-radius: 14px; font-size: 19px; margin-bottom: 18px; }
.auth-card h2 { font-size: 22px; margin-bottom: 6px; }
.auth-card .sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 26px; }

.adm { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.adm-side {
  background: var(--dark); color: rgba(255,255,255,.66); padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh;
}
.side-logo { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 600; padding: 6px 10px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 12px;
  font-size: 14px; color: rgba(255,255,255,.66); transition: background .18s, color .18s;
}
.side-nav a svg { flex: none; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -6px rgba(46,107,255,.6); }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font-size: 13px; }
.side-user .nm { color: #fff; font-weight: 500; }
.side-user .rl { font-size: 11.5px; color: rgba(255,255,255,.45); }
.adm-main { padding: 30px 36px 60px; min-width: 0; }
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.adm-top h1 { font-size: 23px; }
.adm-top .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; }
.adm-page { display: none; }
.adm-page.on { display: block; animation: fadeUp .35s ease both; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 26px; }
.s-card { background: var(--surface); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow-sm); border: 1px solid rgba(230,234,242,.7); display: flex; gap: 15px; align-items: center; }
.s-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; font-size: 20px; }
.s-ico.blue { background: rgba(46,107,255,.1); color: var(--primary); }
.s-ico.cyan { background: rgba(0,194,255,.12); color: #0891b2; }
.s-ico.amber { background: rgba(255,176,32,.14); color: #b7791f; }
.s-ico.green { background: rgba(24,160,88,.1); color: var(--ok); }
.s-ico.red { background: rgba(229,72,77,.1); color: var(--danger); }
.s-num { font-size: 24px; font-weight: 700; }
.s-label { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }

.panel { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm); border: 1px solid rgba(230,234,242,.7); padding: 22px 24px; }
.panel-title { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.table th { text-align: left; padding: 10px 12px; color: var(--ink-3); font-weight: 500; font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #fafbfd; }
.t-title { font-weight: 500; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-actions { display: flex; gap: 8px; white-space: nowrap; }
.t-actions .link-btn { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--primary); padding: 4px 8px; border-radius: 8px; font-family: inherit; }
.t-actions .link-btn:hover { background: var(--grad-soft); }
.t-actions .link-btn.danger { color: var(--danger); }
.t-actions .link-btn.danger:hover { background: #fee4e2; }
.t-sub { color: var(--ink-3); font-size: 12px; }
.t-content { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.img-cell { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.img-cell img { aspect-ratio: 1; object-fit: cover; width: 100%; cursor: zoom-in; }
.img-cell .ic-info { position: absolute; inset: auto 0 0 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(11,18,32,.72)); color: #fff; font-size: 11.5px; display: flex; justify-content: space-between; align-items: center; opacity: 0; transition: opacity .2s; }
.img-cell:hover .ic-info { opacity: 1; }
.ic-info .ic-acts { display: flex; gap: 6px; }
.ic-info button { background: rgba(255,255,255,.18); border: none; color: #fff; border-radius: 7px; padding: 3px 9px; font-size: 11.5px; cursor: pointer; }
.ic-info button:hover { background: rgba(255,255,255,.32); }
.ic-info button.del:hover { background: var(--danger); }

/* 编辑器 */
.ed-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ed-toolbar button {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 13px;
  font-size: 12.5px; cursor: pointer; color: var(--ink-2); font-family: inherit; transition: all .15s;
}
.ed-toolbar button:hover { border-color: var(--primary); color: var(--primary); background: var(--grad-soft); }
.ed-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ed-wrap .textarea { min-height: 400px; font-size: 14px; line-height: 1.8; }
.ed-preview { border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px 18px; overflow-y: auto; max-height: 430px; background: #fbfcfe; }
.cover-pick { display: flex; align-items: center; gap: 14px; }
.cover-thumb { width: 110px; height: 68px; border-radius: 10px; background: var(--grad-soft); display: grid; place-items: center; color: var(--primary); font-size: 12px; overflow: hidden; flex: none; border: 1.5px dashed var(--line); cursor: pointer; }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { min-height: 320px; }
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 12px 16px; gap: 8px; }
  .side-logo { padding: 0 10px 0 0; }
  .side-nav { flex-direction: row; }
  .side-nav a { white-space: nowrap; padding: 9px 14px; }
  .side-foot { border-top: none; padding-top: 0; margin-left: auto; flex-direction: row; align-items: center; }
  .side-user .col-nm { display: none; }
  .adm-main { padding: 22px 18px 50px; }
  .ed-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { gap: 0; overflow-x: auto; }
  .nav-links a { padding: 7px 11px; font-size: 13px; }
  .user-name { display: none; }
  .hero { padding: 56px 0 50px; }
  .hero-stats { gap: 24px; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .article-sheet { margin: 20px 12px 16px; }
  .f-links { gap: 20px; }
}
