:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e6e9f0;
  --text: #1f2733;
  --muted: #7a8494;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --danger: #ef4444;
  --success: #16a34a;
  --warn: #f59e0b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(31, 39, 51, 0.08);
}

/* ---------- 社区信息流 ---------- */
.social-layout { display: block; }
.social-main { min-width: 0; }
.social-main .view-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.composer { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; margin-bottom: 20px; padding: 20px; }
.composer-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 800; }
.composer .form { gap: 12px; }
.composer-actions { display: flex; justify-content: flex-end; gap: 8px; }
.feed-tabs { display: flex; align-items: center; gap: 16px; margin: 12px 0; padding: 0 4px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.feed-tabs button { padding: 0 0 9px; margin-bottom: -11px; border: 0; border-bottom: 2px solid var(--primary); background: transparent; color: var(--text); font-weight: 800; cursor: pointer; }
.feed { display: grid; gap: 12px; }
.feed .card, .feed .question-card, .feed .spare-card { margin: 0; padding: 20px; border-radius: 12px; transition: box-shadow .2s, border-color .2s; }
.feed .card:hover, .feed .question-card:hover, .feed .spare-card:hover { border-color: #b8c8ef; box-shadow: 0 8px 24px rgba(16,19,24,.08); }
.question-title, .req-title { width: 100%; margin: 0; text-align: left; font-size: 18px; }
.question-snippet { max-width: 72ch; margin: 12px 0; color: var(--body-text); font-size: 15px; line-height: 1.75; }
.q-like { border-color: var(--line); color: var(--muted); background: #fff; }
.q-like:hover, .q-like.liked { border-color: #f0a8c8; color: #d92b79; background: #fff5fa; }
.post-author { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.post-author b { color: var(--text); font-size: 14px; }
.equipment-choice { justify-content: center; text-align: center; }
.equipment-choice > span:nth-of-type(2) { flex: 0 1 auto; }
.post-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.social-sidebar { display: none; }
.daily-chem-card { padding: 20px; background: #101a31; color: #fff; border-color: #101a31; }
.daily-chem-card h3 { margin: 0 0 10px; color: #fff; font-size: 20px; }
.daily-chem-card p { color: #c9d3e8; font-size: 14px; line-height: 1.7; }
.daily-chem-card .eyebrow { color: #87a9ff; }
.daily-chem-fact { margin: 14px 0; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #eef3ff; font-size: 13px; line-height: 1.6; }
.daily-chem-card .link-btn { padding: 0; color: #9db7ff; }
.sidebar-card h3 { margin: 0 0 8px; font-size: 17px; }
.sidebar-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.side-stat { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-stat strong { color: var(--primary); font-size: 24px; }
.side-stat span { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .social-layout { grid-template-columns: 1fr; } .social-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .social-main .view-head { align-items: flex-start; flex-direction: column; } .social-main .view-head .btn { width: 100%; } .social-sidebar { grid-template-columns: 1fr; } .composer { grid-template-columns: 1fr; } }

* { box-sizing: border-box; }

/* 关键修复：任何带 hidden 属性的元素都强制隐藏，避免被 display 规则覆盖 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  line-height: 1.6;
}

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.brand-icon { font-size: 24px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 15px;
  position: relative;
}
.nav-btn:hover { background: #eef2f9; color: var(--text); }
.nav-btn.active { background: var(--primary); color: #fff; }
.user-area { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hello { font-weight: 600; }
.settings-form { max-width: 680px; }
.settings-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.settings-stats div { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--primary-soft); }
.settings-stats strong { color: var(--primary); font-size: 22px; overflow-wrap: anywhere; }
.settings-stats span { color: var(--muted); font-size: 13px; }
.common-lab-row { display: flex; gap: 8px; margin-bottom: 8px; }
.common-lab-row input { flex: 1; min-width: 0; }

.badge {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: 5px;
}

/* ---------- 布局 ---------- */
.container { max-width: 980px; margin: 0 auto; padding: 24px 20px 60px; }
.view-head { margin-bottom: 18px; }
.view-head h2 { margin: 0 0 4px; font-size: 22px; }
.muted { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- 登录/注册 ---------- */
.auth-wrap { display: flex; justify-content: center; padding-top: 40px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 34px;
  width: 100%;
  max-width: 420px;
}
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-logo { font-size: 40px; }
.auth-head h1 { margin: 8px 0 4px; font-size: 22px; }
.auth-head p { margin: 0; color: var(--muted); font-size: 14px; }

.tabs { display: flex; gap: 6px; margin-bottom: 18px; background: #eef2f9; border-radius: 10px; padding: 4px; }
.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 15px;
}
.tab.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  background: #fbfcfe;
  transition: border .15s, box-shadow .15s;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #fff;
}
.form-error { color: var(--danger); font-size: 13px; min-height: 1.2em; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 14px; font-weight: 600; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: normal; cursor: pointer; flex-direction: row;
}
.radio input { accent-color: var(--primary); width: auto; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  background: #eef2f9;
  color: var(--text);
  transition: transform .05s, background .15s;
}
.btn:hover { background: #e2e8f2; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.ghost:hover { background: #f1f4f9; color: var(--text); }
.btn.block { width: 100%; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: #fee2e2; color: var(--danger); }
.btn.danger:hover { background: #fecaca; }
.btn.warn { background: #fef3c7; color: #b45309; }
.btn.warn:hover { background: #fde68a; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.cards { display: flex; flex-direction: column; gap: 14px; }

.filter-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px;
}
.search-input {
  flex: 1; min-width: 200px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 13px; font-size: 14px; background: #fff;
}
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.select {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  font-size: 14px; background: #fff; color: var(--text);
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 14px; font-size: 14px; cursor: pointer;
}
.chip input { accent-color: var(--primary); }

.req-card { cursor: pointer; }
.req-card:hover { border-color: var(--primary); }
.req-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.req-title { font-size: 17px; font-weight: 700; margin: 0; }
.req-meta { color: var(--muted); font-size: 13px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 16px; }

.cat-tag {
  display: inline-block; font-size: 12px; padding: 2px 9px;
  border-radius: 12px; font-weight: 600; white-space: nowrap;
  background: #e0f2fe; color: #0369a1;
}
.cat-tag.equipment { background: #fef3c7; color: #b45309; }

.tag {
  display: inline-block; font-size: 12px; padding: 2px 9px;
  border-radius: 12px; font-weight: 600; white-space: nowrap;
}
.tag.open { background: #dcfce7; color: var(--success); }
.tag.closed { background: #e5e7eb; color: var(--muted); }
.tag.borrowed { background: #fef3c7; color: #b45309; }
.tag.returned { background: #e0e7ff; color: #4338ca; }
.tag.urgent { background: #fee2e2; color: #dc2626; }
.req-card.urgent { border-color: #fecaca; background: #fffafa; }
.help-count { font-size: 13px; color: var(--primary); font-weight: 600; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* ---------- 帮助者条目 ---------- */
.help-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
  background: #fbfcfe;
}
.help-item .hl { font-weight: 700; }
.help-item .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.help-item .note { font-size: 13px; margin-top: 6px; color: var(--text); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 50;
}
.modal {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  padding: 26px; position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 14px;
  border: none; background: transparent; font-size: 26px; line-height: 1;
  cursor: pointer; color: var(--muted);
}
.modal-close:hover { color: var(--text); }
.modal h3 { margin: 0 0 14px; font-size: 19px; padding-right: 30px; }
.detail { margin-bottom: 18px; }
.detail .row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.detail .row .k { color: var(--muted); min-width: 96px; flex-shrink: 0; }
.detail .row .v { font-weight: 600; }
.detail .divider { margin: 16px 0 8px; font-weight: 700; color: var(--text); }
.detail .no-help { color: var(--muted); font-size: 14px; }

/* ---------- 通知 ---------- */
.notif-item { padding: 14px 16px; }
.notif-item.unread { border-left: 4px solid var(--primary); background: #f0f6ff; }
.notif-item .time { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: #1f2733; color: #fff; padding: 12px 20px; border-radius: 10px;
  box-shadow: var(--shadow); font-size: 14px; z-index: 100; max-width: 90%;
}
.toast.error { background: var(--danger); }

/* ---------- 校徽 ---------- */
.school-logo {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: contain; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.school-logo.lg { width: 64px; height: 64px; box-shadow: none; }

/* ---------- 公告弹窗 ---------- */
.announce-mask { z-index: 90; }
.announce-modal { text-align: center; }
.announce-head {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.announce-head h3 { margin: 0; font-size: 18px; }
.announce-body { text-align: left; margin-bottom: 20px; font-size: 15px; line-height: 1.9; }
.announce-body p { margin: 0 0 10px; }
.announce-body .contact { font-size: 16px; margin-bottom: 0; }

/* ---------- 开发者信息 ---------- */
.about-card { padding: 22px; }
.about-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.about-emoji { font-size: 36px; line-height: 1; }
.about-title { font-size: 19px; font-weight: 700; }
.about-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.about-p { margin: 0 0 10px; font-size: 15px; line-height: 1.9; }
.about-section { margin: 14px 0 0; }
.about-label { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.about-list { margin: 0 0 8px; padding-left: 20px; }
.about-list li { font-size: 15px; line-height: 2; }
.about-footer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.about-powerline { font-size: 15px; font-weight: 600; color: var(--primary); margin-top: 6px; }

/* ---------- 举报 ---------- */
.report-modal { max-width: 520px; }
.report-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.report-preset {
  border: 1px solid var(--line); background: #f7f9fc; border-radius: 20px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--text);
}
.report-preset:hover { background: #eef2f9; border-color: var(--primary); }
.report-item { display: flex; flex-direction: column; gap: 8px; }
.report-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.report-reason { font-size: 15px; font-weight: 600; }
.report-item .note-line { font-size: 13px; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- 内容审核（先审后发） ---------- */
.review-item { display: flex; flex-direction: column; gap: 8px; }
.review-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-top .time { margin-left: auto; }
.review-title { font-size: 16px; font-weight: 700; word-break: break-all; }
.review-item .note-line { font-size: 13px; }
.tab-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tab-chip.active { border-color: var(--primary); background: #eef4ff; color: var(--primary-dark); }
.review-pending-tip {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #b45309;
  font-size: 13px;
}

/* ---------- 验证码 ---------- */
.cap-box { display: flex; flex-direction: column; gap: 8px; }
.cap-row { display: flex; align-items: center; gap: 10px; }
.cap-input { width: 100%; }

/* ---------- 化学信息（发布表单） ---------- */
.chem-fields {
  border: 1px dashed var(--line); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 14px; background: #fbfcfe;
}
.chem-structure { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.structure-preview {
  max-width: 240px; max-height: 160px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; padding: 4px;
}
.chem-struct { max-width: 100%; max-height: 260px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; }
.chem-struct-wrap { display: flex; justify-content: flex-start; }

/* ---------- 分子结构画板 ---------- */
.sketch-modal { max-width: 720px; }
.sketch-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.sketch-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.sketch-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 13px; cursor: pointer; color: var(--text);
  min-width: 34px; text-align: center;
}
.sketch-btn:hover { background: #eef2f9; }
.sketch-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sketch-btn.danger { color: var(--danger); }
.sketch-btn:disabled { opacity: .4; cursor: not-allowed; }
.sketch-btn.tmpl { background: #f0f7ff; border-color: #bfdbfe; }
.sketch-btn.tmpl:hover { background: #dbeafe; }
#sketchCanvas {
  width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; touch-action: none; cursor: crosshair; display: block;
}
.sketch-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.sketch-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ---------- 管理员 ---------- */
.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-info { flex: 1; min-width: 0; }
.admin-name { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-name .muted { font-weight: normal; }
.admin-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- 统计与分页 ---------- */
.stats-bar {
  display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px; color: var(--muted); font-size: 14px;
}
.stats-bar b { color: var(--primary); font-size: 16px; margin: 0 2px; }
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.page-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 8px; padding: 6px 11px; font-size: 14px; cursor: pointer;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-ellipsis { color: var(--muted); padding: 0 2px; }
.page-info { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- 通知操作 ---------- */
.view-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notif-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.notif-msg { flex: 1; word-break: break-word; }
.notif-del { flex-shrink: 0; }

/* ---------- 认证：邮箱验证 / 找回密码 ---------- */
.auth-links { display: flex; justify-content: center; margin-top: 2px; }
.link-btn {
  border: none; background: transparent; color: var(--primary);
  font-size: 13px; cursor: pointer; padding: 4px;
}
.link-btn:hover { text-decoration: underline; }
.mail-code-tip { font-size: 12px; color: var(--muted); }

/* ---------- 注销账户 ---------- */
.btn.dangerish { color: var(--danger); border-color: transparent; background: transparent; }
.btn.dangerish:hover { background: #fee2e2; color: var(--danger); }
.delete-warning { display: flex; gap: 12px; align-items: flex-start; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 14px 16px; }
.warning-icon { font-size: 24px; }
.warning-text { font-size: 15px; line-height: 1.7; color: #7c2d12; }
.delete-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.admin-actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 科研导航 ---------- */
.nav-wrap { display: flex; gap: 18px; align-items: flex-start; }
.nav-sidebar {
  width: 168px; flex-shrink: 0; position: sticky; top: 68px; max-height: calc(100vh - 80px);
  overflow-y: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px;
}
.nav-cat-btn {
  border: none; background: transparent; text-align: left; cursor: pointer;
  padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--text);
}
.nav-cat-btn:hover { background: #eef2f9; }
.nav-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.nav-cat-section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.nav-cat-title { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.nav-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nav-link-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fbfcfe; color: var(--text); transition: border-color .15s, background .15s;
}
.nav-link-card:hover { border-color: var(--primary); background: #f0f6ff; }
.nav-link-name { font-size: 14px; font-weight: 500; }
.nav-link-desc { font-size: 12px; color: var(--muted); }
.nav-link-icon {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  position: relative; display: flex; align-items: center; justify-content: center;
  background: #eef2f9; overflow: hidden;
}
.nav-link-icon-fallback { color: var(--primary); font-size: 13px; font-weight: 700; }
.nav-link-icon img { width: 28px; height: 28px; object-fit: contain; position: absolute; inset: 0; background: #fff; }

@media (max-width: 720px) {
  .nav-wrap { flex-direction: column; }
  .nav-sidebar { width: 100%; position: static; max-height: none; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .nav-cat-btn { padding: 6px 10px; font-size: 13px; }
}

/* ---------- 搜索与发布工作台 ---------- */
.filter-panel { display: grid; gap: 14px; margin-bottom: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.search-main, .chem-search-bar .ac-wrap { position: relative; }
.search-main .search-input, .chem-search-bar .search-input { width: 100%; min-height: 48px; padding: 0 96px 0 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; }
.search-icon { position: absolute; top: 50%; left: 16px; width: 15px; height: 15px; border: 2px solid var(--primary); border-radius: 50%; transform: translateY(-60%); pointer-events: none; }
.search-icon::after { content: ""; position: absolute; right: -6px; bottom: -4px; width: 7px; height: 2px; background: var(--primary); transform: rotate(45deg); }
.search-shortcut { position: absolute; top: 50%; right: 14px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; transform: translateY(-50%); }
.filter-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.filter-actions .select { min-width: 150px; }
.search-suggestions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; color: var(--muted); font-size: 13px; }
.suggestion-link { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--primary); cursor: pointer; }
.suggestion-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.publish-choice-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr); gap: 24px; margin-bottom: 28px; }
.choice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.choice-card { position: relative; display: flex; align-items: center; gap: 10px; min-height: 74px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(36,87,255,.1); }
.choice-icon, .urgent-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.choice-card strong, .urgent-card strong { display: block; color: var(--text); font-size: 14px; }
.choice-card small, .urgent-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.choice-check { display: none; margin-left: auto; color: var(--primary); font-style: normal; }
.choice-card:has(input:checked) .choice-check { display: block; }
.urgent-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; align-self: end; min-height: 74px; padding: 14px; border: 1px solid #f2d9a5; border-radius: 10px; background: #fffaf0; cursor: pointer; text-align: center; }
.urgent-card input { position: absolute; opacity: 0; }
.urgent-toggle { position: relative; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: #d6dbe4; }
.urgent-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.urgent-card:has(input:checked) { border-color: #e7a528; background: #fff4d9; }
.urgent-card:has(input:checked) .urgent-toggle { background: #e7a528; }
.urgent-card:has(input:checked) .urgent-toggle::after { transform: translateX(16px); }
.form-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text); font-weight: 800; }
.form-section-title small { color: var(--muted); font-size: 12px; font-weight: 400; }
.publish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.publish-grid .field-wide { grid-column: 1 / -1; }
.chem-fields { display: block; }
.chem-fields summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 700; }
.chem-fields summary::-webkit-details-marker { display: none; }
.chem-fields summary small { color: var(--muted); font-weight: 400; }
.chem-fields summary span { margin-left: auto; color: var(--primary); font-size: 20px; }
.chem-fields-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.chem-fields-body .form-field { grid-column: 1 / -1; }
@media (max-width: 720px) { .publish-choice-grid, .publish-grid, .chem-fields-body { grid-template-columns: 1fr; } .choice-cards { grid-template-columns: 1fr; } .publish-grid .field-wide, .chem-fields-body .form-field { grid-column: auto; } .chem-search-bar { flex-direction: column; } }

@media (max-width: 640px) {
  .topbar-inner { padding: 10px 14px; }
  .nav { gap: 4px; }
  .nav-btn { padding: 6px 10px; font-size: 14px; }
  .container { padding: 18px 14px 50px; }
}

/* ---------- 化学检索 / 联想下拉 ---------- */
.chem-search-bar { display: flex; gap: 10px; margin-bottom: 10px; }
.chem-search-bar .ac-wrap { flex: 1; min-width: 0; }
.ac-wrap { position: relative; display: block; }
.ac-wrap input { width: 100%; }
.ac-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12); max-height: 300px; overflow: auto;
  display: flex; flex-direction: column;
}
.ac-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: none; background: transparent; padding: 8px 12px; cursor: pointer;
  font-size: 14px; color: var(--text); border-bottom: 1px solid #f1f5f9;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: #eef4ff; }
.ac-name { flex: 0 1 auto; }
.ac-cas { font-size: 12px; flex: 1; text-align: right; }
.tag.precursor { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.chem-result-top { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.chem-result { margin-bottom: 10px; }
.chem-note { margin-top: 4px; font-size: 13px; color: #92400e; }
.prewrap { white-space: pre-line; }

/* ---------- 问题求助 ---------- */
.question-card { margin-bottom: 12px; cursor: pointer; }
.question-card:hover { border-color: var(--primary); }
.question-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.question-title { margin: 0; font-size: 17px; }
.question-actions { display: flex; gap: 6px; flex-shrink: 0; }
.question-snippet { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.q-modal { max-width: 640px; }
.answer-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  background: #fbfcfe;
}
.answer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.answer-head .a-del { margin-left: auto; }
.answer-content { font-size: 14px; line-height: 1.7; white-space: pre-line; }

/* ---------- 免责声明 ---------- */
.hazard-modal { max-width: 520px; }
.hazard-warning {
  border: 1px solid #fca5a5; background: #fef2f2; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px; font-size: 14px; line-height: 1.9; color: #7f1d1d;
}
.hazard-warning p { margin: 0 0 8px; }
.hazard-warning p:last-child { margin-bottom: 0; }
#hazardItems { margin-bottom: 4px; }
#hazardItems p { margin: 0 0 6px; }

/* ---------- 空闲试剂 / 点赞 ---------- */
.spare-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.spare-row .row-ac { flex: 2.4; min-width: 0; }
.spare-row .spare-cas { flex: 1.2; }
.spare-row .spare-amount { flex: 1.6; }
.spare-row .spare-row-del { flex-shrink: 0; }
.spare-card { cursor: pointer; margin-bottom: 12px; }
.spare-card:hover { border-color: var(--primary); }
.btn.q-like.liked { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
@media (max-width: 640px) {
  .spare-row { flex-wrap: wrap; }
  .spare-row .row-ac { flex: 1 1 100%; }
}
.hazard-agree {
  display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 8px; cursor: pointer;
}
.hazard-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ---------- 提建议 ---------- */
.suggest-card { margin-top: 14px; }
.about-label { margin-bottom: 8px; }

/* ---------- 化学检索结果 ---------- */
.chem-group-title {
  font-size: 14px; font-weight: 700; margin: 14px 0 8px; color: var(--text);
}
.chem-group-title.approx { color: var(--muted); font-weight: 600; }
.chem-result.exact { border-color: var(--primary); background: #f7fbff; }
.chem-result.approx .chem-result-top.clickable { cursor: pointer; }
.chem-cas-inline { font-size: 12px; margin-left: auto; }
.chem-detail { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; }
.chem-row { display: flex; gap: 12px; margin-bottom: 6px; line-height: 1.7; }
.chem-k {
  flex: 0 0 84px; color: var(--muted); font-size: 13px; text-align: right;
}
.chem-v { flex: 1; word-break: break-word; }

/* ---------- 视觉升级：实验室工作台 ---------- */
:root {
  --bg: #f4f7f8;
  --card: #ffffff;
  --line: #dce7e8;
  --text: #18323a;
  --muted: #6c8186;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #e6fffa;
  --shadow: 0 12px 30px rgba(25, 66, 70, 0.08);
  --shadow-hover: 0 16px 34px rgba(25, 66, 70, 0.14);
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(20, 184, 166, 0.09), transparent 28rem),
    linear-gradient(180deg, #f8fbfb 0, var(--bg) 320px);
}

.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(15, 118, 110, 0.14);
  box-shadow: 0 4px 20px rgba(25, 66, 70, 0.05);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: 1180px;
  padding: 14px 24px;
  gap: 18px;
}

.brand { color: var(--text); letter-spacing: -0.02em; }
.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.1);
}
.brand-name { max-width: 230px; line-height: 1.25; }

.nav {
  flex: 1;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-btn {
  color: #587176;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  transition: color .18s, background .18s, transform .18s;
}
.nav-btn:hover { background: #edf8f7; color: var(--primary); transform: translateY(-1px); }
.nav-btn.active {
  background: var(--primary);
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.2);
}

.container { max-width: 1180px; padding-top: 34px; }
.view-head { margin-bottom: 22px; }
.view-head h2 {
  color: var(--text);
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  letter-spacing: -0.03em;
}
.view-head h2::after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  margin-top: 8px;
  border-radius: 99px;
  background: #2dd4bf;
}

.card, .auth-card, .stats-bar, .nav-sidebar, .nav-cat-section {
  border-color: rgba(15, 118, 110, 0.12);
  box-shadow: var(--shadow);
}
.card {
  padding: 22px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.req-card:hover, .question-card:hover, .spare-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.auth-wrap {
  min-height: calc(100vh - 150px);
  align-items: center;
  padding: 30px 0 70px;
}
.auth-card {
  position: relative;
  overflow: hidden;
  max-width: 460px;
  padding: 38px;
}
.auth-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  top: -80px;
  border-radius: 50%;
  background: var(--accent);
}
.auth-head, .tabs, .auth-card form { position: relative; }
.auth-logo {
  display: inline-grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 20px;
  background: var(--accent);
  font-size: 32px;
}
.auth-head h1 { font-size: 24px; letter-spacing: -0.03em; }

.form input, .form textarea, .search-input, .select {
  border-color: #d7e5e6;
  background: #fbfefe;
  border-radius: 12px;
}
.form input:focus, .form textarea:focus, .search-input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}
.btn {
  border-radius: 11px;
  font-weight: 600;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
}
.btn.primary:hover { background: linear-gradient(135deg, #115e59, #0f766e); }

.filter-row {
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}
.stats-bar {
  gap: 0;
  justify-content: space-around;
  padding: 14px 18px;
  background: linear-gradient(135deg, #ffffff, #f0fdfa);
}
.stats-bar span { flex: 1; text-align: center; }
.stats-bar span + span { border-left: 1px solid var(--line); }
.stats-bar b { color: var(--primary); }

.tag.open { background: #d1fae5; color: #047857; }
.cat-tag { background: #dff8f5; color: #0f766e; }
.cat-tag.equipment { background: #fff4d6; color: #a16207; }

.nav-cat-section { box-shadow: none; }
.nav-link-card { border-color: #e0ecec; background: #fbfefe; }
.nav-link-card:hover { border-color: #2dd4bf; background: #effcfb; }

@media (max-width: 720px) {
  .topbar-inner { align-items: flex-start; }
  .brand { flex: 1 1 100%; }
  .brand-name { max-width: none; }
  .nav { order: 3; flex-basis: 100%; }
  .user-area { position: absolute; top: 14px; right: 18px; }
  .hello { display: none; }
  .container { padding-top: 24px; }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 22px; }
  .stats-bar { align-items: stretch; }
  .stats-bar span { font-size: 12px; }
  .stats-bar b { display: block; font-size: 18px; }
  .filter-row { padding: 10px; }
  .search-input { min-width: 0; width: 100%; }
  .view-head-actions { width: 100%; }
  .view-head-actions .btn { width: 100%; }
}

/* ---------- 导航重构：高频任务 + 更多工具 ---------- */
.topbar-inner { position: relative; flex-wrap: nowrap; }
.brand { flex: 0 0 auto; min-width: 240px; }
.nav {
  min-width: 0;
  align-items: center;
  overflow: visible;
}
.nav-primary {
  display: flex;
  min-width: 0;
  gap: 3px;
}
.nav-primary .nav-btn {
  padding-inline: 10px;
}
.nav-more {
  position: relative;
  flex: 0 0 auto;
}
.nav-more summary {
  list-style: none;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #587176;
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
}
.nav-more-trigger:hover, .nav-more[open] .nav-more-trigger,
.nav-more.has-active .nav-more-trigger {
  background: #edf8f7;
  color: var(--primary);
}
.more-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.nav-more.has-active .nav-more-trigger {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .18);
}
.nav-more-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 180px;
  padding: 8px;
  border: 1px solid rgba(15, 118, 110, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 36px rgba(25, 66, 70, .16);
}
.nav-more-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 28px;
  width: 11px;
  height: 11px;
  background: #fff;
  border-left: 1px solid rgba(15, 118, 110, .14);
  border-top: 1px solid rgba(15, 118, 110, .14);
  transform: rotate(45deg);
}
.nav-more-menu .nav-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
}
.nav-more-menu .nav-btn.active {
  color: #fff;
}

@media (max-width: 900px) {
  .brand { min-width: 190px; }
  .brand-name { max-width: 180px; font-size: 16px; }
  .nav-primary .nav-btn { padding-inline: 8px; font-size: 14px; }
}

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .nav {
    order: 3;
    flex-basis: 100%;
    padding-top: 4px;
    border-top: 1px solid rgba(15, 118, 110, .1);
    overflow: visible;
  }
  .nav-primary { flex: 1; overflow-x: auto; scrollbar-width: none; }
  .nav-primary::-webkit-scrollbar { display: none; }
  .nav-primary .nav-btn { flex: 0 0 auto; }
  .nav-more-menu { position: fixed; top: 112px; right: 14px; }
}

@media (max-width: 480px) {
  .topbar-inner { padding: 11px 14px; }
  .brand-name { max-width: 170px; font-size: 15px; }
  .user-area { top: 11px; right: 14px; }
  .nav-more-trigger { padding-inline: 9px; font-size: 14px; }
}

/* ---------- 设计规范 v1：编辑型科研工作台 ---------- */
:root {
  --bg: #f7f9fc;
  --card: #fff;
  --line: #dce3ee;
  --text: #101318;
  --body-text: #27364d;
  --muted: #718096;
  --primary: #2457ff;
  --primary-dark: #1741d0;
  --primary-soft: #eef3ff;
  --accent: #2457ff;
  --danger: #e25563;
  --success: #17b978;
  --warn: #f59e0b;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(16, 19, 24, .06);
  --shadow-hover: 0 12px 30px rgba(16, 19, 24, .1);
}
html, body {
  background-color: var(--bg);
  color: var(--body-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}
body {
  background-image: linear-gradient(rgba(234, 240, 250, .64) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 240, 250, .64) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center top;
}
.topbar {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16, 19, 24, .02);
  backdrop-filter: none;
}
.topbar-inner {
  max-width: 1280px;
  min-height: 64px;
  padding: 0 32px;
}
.brand { gap: 10px; font-size: 16px; color: var(--text); }
.brand-icon { display: inline-flex; align-items: center; gap: 3px; width: 26px; height: 22px; border-radius: 0; background: transparent; box-shadow: none; }
.brand-icon i:first-child { width: 17px; height: 15px; border-radius: 3px; background: #101318; }
.brand-icon i:last-child { width: 6px; height: 18px; border-radius: 2px; background: var(--primary); }
.brand-name { max-width: none; white-space: nowrap; }
.nav { justify-content: center; gap: 2px; }
.nav-primary .nav-btn, .nav-more-trigger { min-height: 44px; padding: 9px 16px; border-radius: 0; color: var(--body-text); font-size: 14px; font-weight: 600; }
.nav-primary .nav-btn:hover, .nav-more-trigger:hover, .nav-more[open] .nav-more-trigger { background: transparent; color: var(--primary); transform: none; }
.nav-primary .nav-btn.active { position: relative; background: transparent; color: var(--primary); box-shadow: none; }
.nav-primary .nav-btn.active::after { content: ""; position: absolute; right: 12px; bottom: 0; left: 12px; height: 2px; background: var(--primary); }
.nav-more.has-active .nav-more-trigger { background: transparent; color: var(--primary); box-shadow: none; }
.user-area { gap: 8px; }
.hello { color: var(--body-text); font-size: 14px; }
.school-logo { width: 34px; height: 34px; box-shadow: none; }
.container { max-width: 1280px; padding: 48px 32px 80px; }
.view-head { margin-bottom: 32px; max-width: 850px; }
.view-head h2 { margin-bottom: 8px; color: var(--text); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -.055em; line-height: 1.12; }
.view-head h2::after { display: none; }
.view-head .muted { max-width: 680px; color: var(--body-text); font-size: 16px; line-height: 1.75; }
.auth-wrap { min-height: calc(100vh - 160px); justify-content: flex-end; align-items: center; padding: 34px 5% 70px; position: relative; }
.auth-wrap::before { content: "让实验室里的资源\A流动起来。"; position: absolute; left: 4%; top: 23%; max-width: 560px; white-space: pre-line; color: var(--text); font-size: clamp(2.4rem, 5vw, 4.6rem); font-weight: 800; letter-spacing: -.07em; line-height: 1.05; }
.auth-wrap::after { content: "借试剂 · 借耗材 · 借设备 · 答问题"; position: absolute; left: 4.2%; top: 50%; color: var(--body-text); font-size: 16px; letter-spacing: .04em; }
.auth-card { z-index: 1; max-width: 420px; padding: 32px; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.auth-card::before { display: none; }
.auth-logo { width: 48px; height: 42px; border-radius: 8px; background: var(--primary-soft); font-size: 25px; }
.auth-logo span { display: block; position: relative; width: 13px; height: 23px; border: 2px solid var(--primary); border-top: 0; border-radius: 3px 3px 7px 7px; transform: rotate(38deg); }
.auth-logo span::before { content: ""; position: absolute; top: -5px; left: -3px; width: 15px; height: 5px; border: 2px solid var(--primary); border-radius: 3px; background: var(--primary-soft); }
.auth-head h1 { margin-top: 14px; color: var(--text); font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.auth-head p { font-size: 14px; line-height: 1.6; }
.tabs { margin-bottom: 24px; padding: 0; gap: 18px; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.tab { flex: 0 0 auto; padding: 10px 2px; border-radius: 0; color: var(--muted); }
.tab.active { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.card, .stats-bar, .auth-card, .nav-sidebar, .nav-cat-section { border-color: var(--line); border-radius: 12px; box-shadow: none; }
.card { padding: 24px; transition: border-color .2s, box-shadow .2s; }
.card:hover, .req-card:hover, .question-card:hover, .spare-card:hover { border-color: #b8c8ef; box-shadow: var(--shadow-hover); transform: none; }
.cards { gap: 12px; }
.req-title, .question-title { color: var(--text); font-size: 18px; font-weight: 750; }
.req-meta, .question-snippet, .help-item .meta { color: var(--muted); }
.btn { min-height: 42px; padding: 9px 18px; border-radius: 8px; color: var(--body-text); font-weight: 700; transition: background .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:hover { transform: none; }
.btn.primary { background: var(--primary); box-shadow: 0 6px 14px rgba(36, 87, 255, .18); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { border-color: var(--line); color: var(--body-text); }
.btn.ghost:hover { border-color: #b8c8ef; background: var(--primary-soft); }
.form { gap: 16px; }
.form label, .form-label { color: var(--body-text); font-size: 14px; font-weight: 700; }
.form input, .form textarea, .search-input, .select { min-height: 44px; border-color: var(--line); border-radius: 8px; background: var(--card); color: var(--text); font-size: 16px; }
.form input:focus, .form textarea:focus, .search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.filter-row { gap: 12px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.chip { min-height: 42px; border-color: var(--line); border-radius: 999px; background: var(--card); }
.stats-bar { gap: 0; margin-bottom: 20px; padding: 16px 20px; background: var(--card); }
.stats-bar span { color: var(--muted); }
.stats-bar b { color: var(--text); font-size: 24px; font-weight: 800; }
.stats-bar span + span { border-left-color: var(--line); }
.cat-tag, .tag { border-radius: 999px; font-weight: 700; }
.cat-tag { background: var(--primary-soft); color: var(--primary); }
.cat-tag.equipment { background: #fff6df; color: #a16207; }
.tag.open { background: #e9fbf3; color: #087a4b; }
.tag.closed { background: #f1f3f6; color: var(--muted); }
.tag.urgent { background: #fff0f1; color: #b42332; }
.modal { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(16, 19, 24, .16); }
.modal-mask { background: rgba(16, 19, 24, .42); }
.toast { border-radius: 8px; box-shadow: var(--shadow); }
.nav-link-card { border-color: var(--line); border-radius: 10px; background: var(--card); }
.nav-link-card:hover { border-color: #b8c8ef; background: var(--primary-soft); }
@media (max-width: 900px) { .container { padding-inline: 24px; } .auth-wrap { justify-content: center; padding-inline: 0; } .auth-wrap::before, .auth-wrap::after { display: none; } }
@media (max-width: 720px) { .topbar-inner { min-height: auto; padding: 10px 16px; } .container { padding: 32px 16px 60px; } .view-head { margin-bottom: 24px; } .view-head h2 { font-size: 2rem; } .nav-primary .nav-btn, .nav-more-trigger { padding-inline: 12px; } .auth-wrap { min-height: auto; padding-top: 24px; } }
@media (max-width: 480px) { .auth-card { padding: 24px 20px; } .stats-bar { padding: 14px 10px; } .stats-bar b { font-size: 20px; } .card { padding: 18px 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* ---------- 开发者信息：赞助区 ---------- */
.sponsor-card { margin-top: 16px; }
.sponsor-codes { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 14px; }
.sponsor-code { width: 150px; margin: 0; text-align: center; }
.sponsor-code img { display: block; width: 150px; height: 150px; object-fit: contain; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sponsor-code figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; }
.sponsor-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 150px; height: 150px; padding: 6px; border: 1px dashed var(--line); border-radius: 12px; background: var(--primary-soft); color: var(--muted); font-size: 14px; font-weight: 700; }
.sponsor-ph small { font-size: 12px; font-weight: 400; }
.sponsor-note { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); color: var(--body-text); font-size: 13px; line-height: 1.7; }
.sponsor-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.sponsor-list-head small { color: var(--muted); font-size: 12px; font-weight: 400; }
.sponsor-marquee { max-height: 264px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; }
.sponsor-marquee.is-scrollable { overflow-y: auto; }
.sponsor-marquee.is-scrolling .sponsor-track { animation: sponsorScroll 24s linear infinite; }
.sponsor-marquee.is-scrolling:hover .sponsor-track { animation-play-state: paused; }
.sponsor-marquee ul { margin: 0; padding: 0; list-style: none; }
.sponsor-marquee li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sponsor-name { font-weight: 700; overflow-wrap: anywhere; }
.sponsor-amount { color: var(--primary); font-weight: 700; }
.sponsor-time { color: var(--muted); font-size: 13px; text-align: right; }
.sponsor-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }
@keyframes sponsorScroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

/* ---------- 个人信息：页内标签 ---------- */
.profile-tip { margin: 0 0 14px; font-size: 14px; }

@media (max-width: 560px) {
  .sponsor-codes { justify-content: center; }
  .sponsor-code, .sponsor-code img, .sponsor-ph { width: 100%; max-width: 220px; }
  .sponsor-marquee li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .sponsor-time { grid-column: 1 / -1; text-align: left; }
}

/* ---------- 添加到主屏幕引导（PWA） ---------- */
.install-hint {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(31, 39, 51, .1);
  font-size: 14px;
}
.install-hint-icon { flex: 0 0 auto; font-size: 20px; line-height: 1; }
.install-hint-text { flex: 1 1 auto; color: var(--body-text); line-height: 1.55; }
.install-hint-actions { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; }
/* 引导条出现时把 toast 抬高，避免互相遮挡 */
body.has-install-hint .toast { bottom: 96px; }
@media (max-width: 480px) {
  .install-hint { flex-wrap: wrap; }
  .install-hint-text { flex: 1 1 100%; font-size: 13px; }
  .install-hint-actions { flex: 1 1 100%; justify-content: flex-end; }
}
