:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e6eaf2;
  --line-2: #eef1f7;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #eaf1ff;
  --gold: #f59e0b;
  --gold-soft: #fff5e4;
  --silver: #94a3b8;
  --bronze: #c2703c;
  --green: #16a34a;
  --red: #dc2626;
  --purple: #7c3aed;
  --nav-bg: #0f172a;
  --nav-ink: #c8d3e6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .14);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(244, 246, 251, .85), rgba(244, 246, 251, .85)), url('img/festival-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3dae6; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b9c3d4; }

/* ============ 登录 ============ */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background-color: #0f172a;
  background-image:
    linear-gradient(160deg, rgba(15, 23, 42, .45), rgba(15, 23, 42, .15) 45%, rgba(15, 23, 42, .5)),
    url('img/festival-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.auth-card {
  width: 100%; max-width: 420px; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 20px; box-shadow: 0 20px 60px rgba(2, 6, 23, .45); padding: 34px 32px 28px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth-brand .mark {
  width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 700;
}
.auth-brand h1 { font-size: 20px; margin: 0; letter-spacing: .5px; }
.auth-brand span { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; letter-spacing: 1.5px; }
.auth-sub { color: var(--ink-2); margin: 14px 0 20px; font-size: 13px; }
.demo-box {
  background: var(--panel-2); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-top: 18px; font-size: 12px; color: var(--ink-2);
}
.demo-box b { color: var(--ink); font-weight: 600; }
.demo-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 10px; margin-top: 6px; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  font-size: 12px; font-family: inherit; color: var(--ink-2); cursor: pointer;
  transition: all .15s; text-align: left;
}
.demo-row:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.demo-row span:first-child { color: var(--ink-3); }
.demo-row b { white-space: nowrap; }

/* ============ 布局 ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex: 0 0 232px; background: var(--nav-bg); color: var(--nav-ink);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 20;
}
.sidebar .brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 11px; }
.sidebar .brand .mark {
  width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px;
}
.sidebar .brand h1 { font-size: 16px; margin: 0; color: #fff; letter-spacing: .5px; }
.sidebar .brand small { display: block; font-size: 10px; letter-spacing: 2px; color: #6b7a99; }
.nav { padding: 6px 12px; flex: 1; overflow-y: auto; }
.nav-group { font-size: 11px; color: #5c6b8a; padding: 14px 10px 6px; letter-spacing: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--nav-ink); font-size: 13.5px; margin-bottom: 2px; cursor: pointer; position: relative;
}
.nav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(37, 99, 235, .22); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; background: var(--brand); border-radius: 0 3px 3px 0; }
.nav a .ico { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.nav a .tag { margin-left: auto; font-size: 10px; background: rgba(245, 158, 11, .18); color: #fcd34d; padding: 1px 6px; border-radius: 6px; }
.nav a.nav-ext .tag { background: rgba(148, 163, 184, .16); color: #93a3bd; font-size: 11px; }

.side-user { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; gap: 10px; }
.side-user .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; flex: 0 0 32px; }
.side-user .info { min-width: 0; flex: 1; }
.side-user .info b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.side-user .info span { display: block; font-size: 11px; color: #7b8aa8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .quit { background: none; border: 0; color: #7b8aa8; cursor: pointer; font-size: 15px; padding: 4px; }
.side-user .quit:hover { color: #fff; }

.main { flex: 1; margin-left: 232px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
  padding: 0 24px; position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 17px; margin: 0; font-weight: 650; }
.topbar .spacer { flex: 1; }
.search {
  position: relative; width: 260px;
}
.search input {
  width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); outline: none; transition: .15s;
}
.search input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 13px; }
.content { padding: 22px 24px 60px; max-width: 1280px; width: 100%; }

/* ============ 通用组件 ============ */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.section-head:first-child { margin-top: 0; }
.section-head h3 { font-size: 15.5px; margin: 0; font-weight: 650; }
.section-head .sub { font-size: 12px; color: var(--ink-3); }
.section-head .more { margin-left: auto; font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  transition: .15s; font-size: 13px; white-space: nowrap;
}
.btn:hover { border-color: #cdd5e3; background: var(--panel-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--red); border-color: #f3d3d3; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2);
}
.chip.blue { background: var(--brand-soft); border-color: #d5e3ff; color: var(--brand-2); }
.chip.gold { background: var(--gold-soft); border-color: #f7e2bd; color: #b45309; }
.chip.green { background: #eafaf0; border-color: #c7ecd6; color: #15803d; }
.chip.red { background: #fef2f2; border-color: #f6d5d5; color: #b91c1c; }
.chip.purple { background: #f4efff; border-color: #e2d6ff; color: #6d28d9; }
.chip.gray { background: #f1f4f9; border-color: var(--line); color: var(--ink-3); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; padding: 9px 14px; cursor: pointer; color: var(--ink-2);
  border-bottom: 2px solid transparent; font-size: 13.5px; white-space: nowrap;
}
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs button:hover { color: var(--ink); }

/* 冷知识研究所：分类筛选药丸按钮 */
.tab-pill {
  background: var(--card, #fff); border: 1px solid var(--line, #ececec); padding: 7px 16px;
  border-radius: 999px; cursor: pointer; color: var(--ink-2); font-size: 13px; white-space: nowrap;
  transition: all .15s ease;
}
.tab-pill:hover { border-color: var(--brand); color: var(--ink); }
.tab-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* 资讯中心：置顶知识库卡片 */
.pin-card {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  background: linear-gradient(135deg, #eef4ff, #f6f0ff);
  border: 1px solid #d9e2ff; border-radius: 14px; padding: 14px 16px;
}
.pin-card .pin-flag {
  flex: none; font-size: 12px; font-weight: 700; color: #fff; background: #ef4444;
  padding: 3px 9px; border-radius: 999px;
}
.pin-card .pin-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.pin-card .pin-body { flex: 1; min-width: 0; }
.pin-card .pin-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.pin-card .pin-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.pin-card .btn { flex: none; }

/* 资讯 Tab 计数徽标 */
.tabs .tcount {
  display: inline-block; min-width: 18px; text-align: center; font-size: 11px;
  background: var(--line, #ececec); color: var(--ink-3); border-radius: 999px; padding: 0 6px; margin-left: 2px;
}
.tabs button.active .tcount { background: rgba(255,255,255,.35); color: #fff; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; outline: none; transition: .15s; color: var(--ink);
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; flex: 0 0 auto; }
.avatar.lg { width: 52px; height: 52px; font-size: 19px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }

.section-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.banner code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.empty { text-align: center; padding: 52px 20px; color: var(--ink-3); }
.empty .big { font-size: 34px; opacity: .5; }
.empty p { margin: 8px 0 0; font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .num { font-size: 27px; font-weight: 700; letter-spacing: -.5px; }
.stat .lbl { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stat .ico { float: right; font-size: 22px; opacity: .18; }

/* ============ 列表卡片 ============ */
.item {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; display: flex; gap: 13px; transition: .15s; box-shadow: var(--shadow);
}
.item:hover { border-color: #cfd9ea; transform: translateY(-1px); box-shadow: 0 4px 18px rgba(15, 23, 42, .08); }
.item .thumb {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  font-size: 19px; flex: 0 0 42px; background: var(--brand-soft); color: var(--brand);
}
.item .thumb.gold { background: var(--gold-soft); color: #b45309; }
.item .thumb.green { background: #eafaf0; color: #15803d; }
.item .thumb.purple { background: #f4efff; color: #6d28d9; }
.item .body { min-width: 0; flex: 1; }
.item .title { font-size: 14.5px; font-weight: 600; margin: 0 0 4px; word-break: break-word; }
.item .desc { font-size: 12.8px; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; font-size: 11.8px; color: var(--ink-3); }
.item .acts { display: flex; align-items: flex-start; gap: 6px; flex: 0 0 auto; }

/* ============ 荣誉榜 ============ */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.pod {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 16px; text-align: center; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.pod::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.pod.r1 { order: 2; padding-top: 28px; }
.pod.r1::after { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.pod.r2 { order: 1; }
.pod.r2::after { background: linear-gradient(90deg, #cbd5e1, #94a3b8); }
.pod.r3 { order: 3; }
.pod.r3::after { background: linear-gradient(90deg, #d98b52, #b45f34); }
.pod .medal { font-size: 30px; line-height: 1; }
.pod .avatar { margin: 10px auto 8px; }
.pod .nm { font-size: 16px; font-weight: 700; }
.pod .dp { font-size: 12px; color: var(--ink-3); }
.pod .mt { font-size: 12.5px; color: var(--brand-2); margin-top: 8px; font-weight: 600; }
.pod .rs { font-size: 12px; color: var(--ink-2); margin-top: 8px; }

.champion {
  background: linear-gradient(120deg, #fff8ec, #ffffff 60%); border: 1px solid #f6e3c4;
  border-radius: var(--radius); padding: 20px; display: flex; gap: 18px; align-items: center; box-shadow: var(--shadow);
}
.champion .crown { font-size: 34px; }
.champion h4 { margin: 0 0 3px; font-size: 17px; }
.champion .metric { color: #b45309; font-weight: 650; font-size: 13.5px; }

.honor-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: flex; gap: 13px; align-items: flex-start;
}
.honor-card .rank {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; background: var(--panel-2); color: var(--ink-3); flex: 0 0 30px;
}
.honor-card .rank.top { background: var(--gold-soft); color: #b45309; }

/* ============ 访谈 / 课程 ============ */
.vcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .15s;
}
.vcard:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(15, 23, 42, .1); }
.vcard .cover {
  height: 132px; display: grid; place-items: center; position: relative; color: #fff;
}
.vcard .cover .play {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: grid; place-items: center; color: #111; font-size: 17px; padding-left: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
.vcard .cover .dur { position: absolute; right: 9px; bottom: 9px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 6px; }
.vcard .vbody { padding: 14px 15px 16px; flex: 1; display: flex; flex-direction: column; }
.vcard h4 { margin: 0 0 5px; font-size: 14.5px; font-weight: 650; line-height: 1.45; }
.vcard .who { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.vcard p { margin: 0; font-size: 12.8px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vcard .cover.vplay { height: 190px; background: #0b1220; padding: 0; }
.vcard .cover.vplay video { width: 100%; height: 100%; object-fit: contain; background: #0b1220; display: block; }

.ccard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; transition: .15s;
}
.ccard:hover { border-color: #cfd9ea; transform: translateY(-2px); }
.ccard .plat { font-size: 11.5px; color: var(--ink-3); }
.ccard h4 { margin: 0; font-size: 14.5px; font-weight: 650; line-height: 1.45; }

/* ============ 表格 ============ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-2); }
.table th { font-size: 12px; color: var(--ink-3); font-weight: 500; background: var(--panel-2); }
.table tbody tr:hover { background: var(--panel-2); }
.table td .avatar { display: inline-grid; vertical-align: middle; margin-right: 8px; }

/* ============ 弹窗 / 提示 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center;
  z-index: 100; padding: 20px; backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px;
  max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg);
}
.modal header {
  padding: 17px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
}
.modal header h3 { margin: 0; font-size: 16px; font-weight: 650; }
.modal header .x { margin-left: auto; background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink-3); line-height: 1; }
.modal .mbody { padding: 20px 22px; }
.modal footer {
  padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px;
  background: var(--panel-2); border-radius: 0 0 16px 16px;
}

.toast-box { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #0f172a; color: #fff; padding: 9px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: slide .22s ease;
}
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }
@keyframes slide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.banner { background: var(--brand-soft); border: 1px solid #d5e3ff; color: var(--brand-2); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 12.8px; margin-bottom: 14px; }
.banner.warn { background: var(--gold-soft); border-color: #f7e2bd; color: #b45309; }
.banner.ok { background: #eafaf0; border-color: #c7ecd6; color: #15803d; }

/* 历史上的今日 */
.otd-wrap {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7ed, #eef4ff);
  border: 1px solid #f2dfc4;
}
.otd-item { display: flex; gap: 12px; align-items: flex-start; padding: 6px 2px; }
.otd-year {
  flex: 0 0 52px; font-size: 15px; font-weight: 700; color: #b45309; text-align: right;
  font-family: ui-monospace, Consolas, monospace; padding-top: 1px;
}
.otd-body { flex: 1; min-width: 0; }
.otd-title { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.otd-title a { color: var(--ink); }
.otd-title a:hover { color: var(--brand-2); }
.otd-desc { font-size: 12.3px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }

/* 更早资讯折叠块 */
.older-block { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.older-block > summary { cursor: pointer; padding: 10px 14px; font-size: 13px; color: var(--ink-2); user-select: none; }
.older-block[open] > summary { border-bottom: 1px solid var(--line); }
.older-block .grid { padding: 12px 14px 14px; }

.lock {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px;
  color: var(--ink-3); font-size: 12.8px; display: flex; align-items: center; gap: 10px; background: var(--panel-2);
}

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(37, 99, 235, .25); border-top-color: var(--brand); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.loading { padding: 40px; text-align: center; color: var(--ink-3); }

.audio-mini { width: 100%; height: 34px; margin-top: 8px; }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: .25s; }
  .sidebar.open { transform: none; }
  /* iOS Safari 不支持 fixed 背景，改为随页滚动 */
  body, .auth-wrap { background-attachment: scroll; }
  .main { margin-left: 0; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 0 14px; }
  .search { width: 150px; }
  .g2, .g3, .g4, .stat-grid, .podium, .grid-form { grid-template-columns: 1fr; }
  .pod.r1, .pod.r2, .pod.r3 { order: initial; }
}
.menu-btn { display: none; background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink); }
@media (max-width: 860px) { .menu-btn { display: block; } }

/* 手机端侧边抽屉：遮罩 + 关闭按钮 */
.nav-close { display: none; margin-left: auto; background: none; border: 0; color: #93a3bd; font-size: 15px; cursor: pointer; padding: 6px; line-height: 1; }
.nav-close:hover { color: #fff; }
.nav-scrim { display: none; }
@media (max-width: 860px) {
  .nav-close { display: block; }
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 19;
    background: rgba(2, 6, 23, .55); opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .nav-scrim.show { opacity: 1; pointer-events: auto; }
}

/* ===== 客户专区 ===== */
.cust-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; }
.cust-strip::-webkit-scrollbar { height: 6px; }
.cust-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.cust-chip {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--ink-2); font-size: 13px; cursor: pointer; transition: .15s;
}
.cust-chip:hover { border-color: var(--brand); color: var(--ink); }
.cust-chip.active { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 600; }
.cust-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cust-chip .nm { color: var(--ink); }
.cust-chip .n { color: var(--ink-3); font-size: 11.5px; }

.cust-head {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 16px;
}
.cust-logo {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 600;
}
.cust-info { flex: 1; min-width: 0; }
.cust-info h4 { margin: 0 0 6px; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cust-info .meta { font-size: 12.5px; color: var(--ink-2); }
.cust-info p { margin: 6px 0 0; font-size: 12.8px; color: var(--ink-2); }

/* ===== 常用入口（ima / 官网 / 公众号 / 小鹅通） ===== */
.portal {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  color: inherit; text-decoration: none; transition: .16s; min-height: 118px;
}
.portal:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(37, 99, 235, .10); transform: translateY(-1px); }
.portal .pico { font-size: 22px; line-height: 1; }
.portal .ptitle { font-weight: 650; font-size: 14px; color: var(--ink); }
.portal .ptag { font-size: 11.5px; color: var(--brand-2); }
.portal .pdesc { font-size: 12px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.portal .pgo { margin-top: auto; font-size: 12px; color: var(--brand-2); font-weight: 600; }

.portal-hero {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 16px;
  border: 1px solid #d5e3ff; border-radius: 12px;
  background: linear-gradient(120deg, #eef4ff, #ffffff 60%);
}
.portal-hero .ph-ico { font-size: 26px; }
.portal-hero .ph-body { flex: 1; min-width: 0; }
.portal-hero .ph-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.portal-hero .ph-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

.portal-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--ink-2); text-decoration: none; transition: .15s;
}
.pchip:hover { border-color: var(--brand); color: var(--ink); background: var(--brand-soft); }
.pchip b { font-weight: 600; }

/* ===== 公告栏 ===== */
.notice-list { display: flex; flex-direction: column; gap: 14px; }
.notice {
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 16px 18px;
}
.notice.pinned { border-color: #f7e2bd; background: linear-gradient(120deg, #fffdf6, #ffffff 55%); }
.notice.expired { opacity: .82; }
.notice .nhead h4 { margin: 8px 0 4px; font-size: 16px; color: var(--ink); }
.notice .nm { font-size: 12.2px; color: var(--ink-3); }
.notice .nbody { margin-top: 10px; font-size: 13.6px; color: var(--ink-2); line-height: 1.75; }
.notice .nbody p { margin: 0 0 6px; }
.notice .nattach { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.notice .nattach img { width: 150px; height: 150px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f8fafc; }
.notice .nfoot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* ===== 鬼畜区 ===== */
.meme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.meme { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.meme .mmedia { height: 200px; background: #0b1220; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.meme .mmedia img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.meme .mmedia video { width: 100%; height: 100%; object-fit: contain; background: #0b1220; display: block; }
.meme .mbody { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.meme .mtitle { font-weight: 650; font-size: 13.5px; color: var(--ink); }
.meme .mmeta { font-size: 11.8px; color: var(--ink-3); margin-top: 3px; }

/* ===== 合作客户专区：账号卡片 ===== */
.cust-card {
  display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); transition: .15s;
}
.cust-card:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(37, 99, 235, .08); }
.cust-card .cust-info h4 { margin: 0 0 5px; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cust-card .cust-info .meta { font-size: 12.5px; color: var(--ink-2); }
.cust-card .cust-info p { margin: 5px 0 0; font-size: 12.6px; color: var(--ink-2); }
