:root {
  --bg: #f5f6f2;
  --card: #ffffff;
  --text: #23262b;
  --muted: #7a7f87;
  --brand: #2f7d51;
  --brand-dark: #256243;
  --brand-soft: #eaf3ee;
  --border: #e4e6e0;
  --star: #ff9c2b;
  --danger: #c04851;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 25, 20, .05), 0 4px 16px rgba(20, 25, 20, .04);
}

* { box-sizing: border-box; }

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.4; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
code { background: #f0f1ec; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
}
.logo {
  font-size: 19px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: .5px;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.main-nav { display: flex; gap: 16px; white-space: nowrap; }
.main-nav a { color: #3c4148; font-size: 14.5px; }
.main-nav a:hover, .main-nav a.active { color: var(--brand); text-decoration: none; }

.header-search { display: flex; margin-left: auto; }
.header-search input {
  width: 190px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  outline: none;
  font-size: 13.5px;
  background: #fbfbf9;
}
.header-search input:focus { border-color: var(--brand); }
.header-search button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 0 6px 6px 0;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13.5px;
}
.header-search button:hover { background: var(--brand-dark); }

.user-area { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.user-area .btn-link { color: #3c4148; }
.avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #3c4148;
}
.avatar-btn:hover { text-decoration: none; }

/* ---------- layout ---------- */
#app { padding: 24px 16px 56px; min-height: 60vh; }
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.layout-full { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-title h2, .card-title h3 { margin: 0; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: #3c4148;
  font-size: 13.5px;
  cursor: pointer;
  transition: .15s;
}
.btn:hover { border-color: #c8ccd2; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); padding: 4px 8px; }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; font-size: 13px; color: #4a4f56; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }

/* ---------- tags & chips ---------- */
.tag {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 12px;
  margin: 0 6px 4px 0;
}
.chip {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 12.5px;
  color: #5a5f66;
  cursor: pointer;
  margin: 0 6px 6px 0;
  background: #fff;
  user-select: none;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- stars ---------- */
.stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; font-size: 13px; }
.stars .off { color: #d8dbd5; }
.score { color: var(--star); font-weight: 700; font-size: 18px; }

/* ---------- avatar ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  flex: none;
  overflow: hidden;
}

/* ---------- course list ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.course-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: .15s;
}
.course-card:hover { border-color: var(--brand); box-shadow: var(--shadow); text-decoration: none; }
.course-card .cc-name { font-size: 15px; font-weight: 700; color: #23262b; }
.course-card .cc-meta { font-size: 12.5px; color: var(--muted); }
.course-card .cc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

/* ---------- course detail ---------- */
.detail-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.detail-title { flex: 1 1 320px; }
.detail-score { text-align: center; min-width: 140px; border-left: 1px solid var(--border); padding-left: 20px; }
.detail-score .score { font-size: 34px; line-height: 1.1; }
.dist-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dist-bar { flex: 1; height: 7px; background: #eef0ea; border-radius: 4px; overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--star); }

/* ---------- review / post items ---------- */
.feed-item { padding: 14px 0; border-bottom: 1px solid #eef0ea; }
.feed-item:last-child { border-bottom: none; }
.feed-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.feed-body { color: #33373d; white-space: pre-wrap; word-break: break-word; }
.feed-actions { display: flex; gap: 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted); align-items: center; }
.feed-actions button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 0; font-family: inherit; }
.feed-actions button:hover { color: var(--brand); }
.feed-actions button.liked { color: var(--brand); font-weight: 600; }

.post-list .post-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid #eef0ea; align-items: flex-start; }
.post-item:last-child { border-bottom: none; }
.post-main { flex: 1; min-width: 0; }
.post-title { font-size: 15px; font-weight: 600; color: #23262b; }
.post-title:hover { color: var(--brand); }
.post-excerpt { color: var(--muted); font-size: 13px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { font-size: 12px; color: #9aa0a8; margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }
.reply-count { background: #eef0ea; color: #6b7076; border-radius: 10px; padding: 1px 9px; font-size: 12px; }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 20px; align-items: center; }
.pager button { min-width: 34px; }
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.stat-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 6px; }
.stat-row .num { font-size: 20px; font-weight: 700; color: var(--brand); }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.divider { height: 1px; background: #eef0ea; margin: 16px 0; }
.security-session-list { display: flex; flex-direction: column; gap: 9px; }
.security-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fafbf9; }
.setup-steps { display: grid; gap: 22px; padding-left: 24px; }
.setup-steps > li { padding-left: 5px; line-height: 1.7; }
.recovery-groups { display: grid; gap: 8px; margin: 12px 0; }
.recovery-group { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: #f7faf8; }
.recovery-group > b { color: var(--brand); text-align: center; }
.recovery-group code { min-width: 0; overflow-wrap: anywhere; color: #243d30; font: 600 13px/1.8 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .04em; }
.secret-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: #f7faf8; }
.secret-row code { min-width: 0; overflow-wrap: anywhere; color: #243d30; font: 600 13px/1.6 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
#totp-secret { user-select: all; }
.danger-zone { margin-top: 8px; padding: 13px 14px; border: 1px solid #e8c4c7; border-radius: 10px; background: #fffafa; }
.danger-zone summary { color: var(--danger); cursor: pointer; }
.rate-input { display: flex; gap: 4px; font-size: 26px; cursor: pointer; }
.rate-input span { color: #d8dbd5; transition: .1s; }
.rate-input span.on { color: var(--star); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid #eef0ea; text-align: left; }
table.data th { color: var(--muted); font-weight: 600; }

/* ---------- toast ---------- */
.toast-box { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #2c3035;
  color: #fff;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13.5px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  animation: toastIn .18s ease;
}
.toast.error { background: var(--danger); }
.toast.ok { background: var(--brand); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0 30px; background: #fff; font-size: 13px; color: #5a5f66; }
.site-footer p { margin: 0 0 4px; }

/* ---------- 认证标识与未读徽标 ---------- */
.verified-tag {
  display: inline-block; font-size: 11.5px; line-height: 1.7; padding: 0 6px;
  border-radius: 4px; background: var(--brand-soft); color: var(--brand);
  border: 1px solid #cfe4d8; margin-left: 4px; white-space: nowrap; font-weight: 400;
}
.unread-badge {
  display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 2px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; line-height: 16px; text-align: center; font-weight: 600;
}
.msg-link {
  display: inline-flex; align-items: center; font-size: 17px; color: var(--muted);
  padding: 2px 6px; border-radius: 6px;
}
.msg-link:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.btn-warn { color: #a06a1d; border-color: #e0c39a; background: #fdf6ea; }

/* ---------- 提示条 ---------- */
.notice {
  border: 1px solid var(--border); border-left-width: 3px; border-radius: 8px;
  padding: 12px 14px; background: #fbfcfb;
}
.notice.ok { border-left-color: var(--brand); background: var(--brand-soft); }
.notice.error { border-left-color: var(--danger); background: #fdf2f2; }
.notice.pending { border-left-color: var(--star); background: #fff8ee; }
.maintenance-notice { border-left-color: var(--danger); background: #fdf2f2; margin-bottom: 14px; }
.notice + form { margin-top: 14px; }

/* ---------- 文件选择预览 ---------- */
.file-chip {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fbfcfb; font-size: 13px;
}
.file-chip.bad { border-color: #e8c4c7; background: #fdf2f2; }
.file-chip .warn { color: var(--danger); font-weight: 600; }
.file-chip .ok-tag { color: var(--brand); font-weight: 600; }

/* ---------- 页签 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tab { padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; }
.tab:hover { color: var(--brand); text-decoration: none; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- 通知列表 ---------- */
.notice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice-row { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fff; }
.notice-row.unread { background: var(--brand-soft); border-color: #cfe4d8; }
.notice-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.notice-actions { margin-top: 8px; display: flex; gap: 8px; }

/* ---------- 私信 ---------- */
.conv-list { display: flex; flex-direction: column; gap: 8px; }
.conv-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.conv-row:hover { border-color: var(--brand); text-decoration: none; }
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { display: flex; flex-direction: column; }
.thread-head { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.msg-list { max-height: 420px; overflow-y: auto; padding: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.mine { flex-direction: row-reverse; }
.bubble {
  max-width: 74%; padding: 8px 12px; border-radius: 10px; background: #f2f4ef;
  border: 1px solid var(--border); line-height: 1.6;
}
.msg.mine .bubble { background: var(--brand-soft); border-color: #cfe4d8; }
.msg-form { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 12px; }
.msg-form textarea { flex: 1; min-height: 62px; resize: vertical; }

/* ---------- 管理后台 ---------- */
.admin-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-filter input[type="search"] { flex: 0 1 220px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: #fff; }
.admin-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.admin-card-head > div { flex: 1; min-width: 0; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.admin-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.admin-row-main { flex: 1; min-width: 0; }
.status-tag { display: inline-block; font-size: 11.5px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--border); background: #f5f6f2; color: var(--muted); }
.status-tag.pending { background: #fff8ee; border-color: #f0dcb8; color: #a06a1d; }
.status-tag.approved { background: var(--brand-soft); border-color: #cfe4d8; color: var(--brand); }
.status-tag.rejected { background: #fdf2f2; border-color: #e8c4c7; color: var(--danger); }
.status-tag.admin { background: #eef2fb; border-color: #ccd8ee; color: #3d6ea8; }

body.maintenance-lock .main-nav,
body.maintenance-lock .header-search,
body.maintenance-lock .site-footer { display: none; }
body.maintenance-lock .header-inner { justify-content: space-between; }

/* ---------- 课程代码（可多个） ---------- */
.course-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.code-chip {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid #dfe3da;
  border-radius: 4px;
  background: #fafbf8;
  color: #4a6b58;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 18px;
}

/* ---------- 教务表格导入 ---------- */
.edu-header-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 6px;
}

.edu-header-table th,
.edu-header-table td {
  border: 1px solid #eceee8;
  padding: 5px 8px;
  text-align: left;
}

.edu-header-table th { background: #f6f8f4; font-weight: 600; }
.edu-header-table td.ignored { color: #9aa39c; }

.edu-note {
  padding: 10px 12px;
  border: 1px dashed #d3d9cf;
  border-radius: 6px;
  background: #fbfcf9;
  font-size: 13px;
  line-height: 1.7;
  color: #5c665e;
}

/* ---------- 后台课程管理 ---------- */
.course-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f9f5;
}

/* ---------- 课程检索筛选栏 ---------- */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 12px;
  align-items: end;
}
.filter-grid > div { min-width: 0; }
.filter-grid .fg-wide { grid-column: span 2; }
.filter-grid .fg-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-grid label.small { display: block; margin-bottom: 4px; }
.filter-grid select,
.filter-grid input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
@media (max-width: 640px) {
  .filter-grid { grid-template-columns: 1fr; }
  .filter-grid .fg-wide { grid-column: span 1; }
}

.course-panel .field { margin-bottom: 10px; }

.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field-row > .field {
  flex: 1 1 140px;
  min-width: 0;
}

.merge-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .header-search { display: none; }
  .main-nav { gap: 12px; font-size: 13.5px; overflow-x: auto; }
}
@media (max-width: 640px) {
  .header-inner { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .detail-score { border-left: none; padding-left: 0; text-align: left; }
}

/* ========================================================================
   华政ICDB 2026 前端
   ======================================================================== */
:root {
  --bg: #f6f7f3;
  --card: #fff;
  --text: #26332c;
  --muted: #7b8780;
  --brand: #16754b;
  --brand-dark: #0d5535;
  --brand-soft: #e8f3ed;
  --border: #dfe5df;
  --star: #d9912e;
  --radius: 16px;
  --shadow: 0 16px 42px rgba(31, 62, 45, .08);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-size: 14px; }
body.modal-open { overflow: hidden; }
.wrap { max-width: 1160px; }

.site-header {
  border-bottom-color: rgba(218, 226, 220, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.header-inner { height: 72px; gap: 28px; }
.logo { display: grid; gap: 0; color: var(--brand-dark); line-height: 1.15; letter-spacing: 0; }
.logo b { font: 800 20px/1.1 Georgia, "STSong", serif; }
.logo small { margin-top: 3px; color: #8a958f; font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.main-nav { gap: 25px; }
.main-nav a { position: relative; padding: 25px 0 23px; color: #65716a; font-size: 13px; }
.main-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 15px; height: 2px; border-radius: 2px; background: var(--brand); }
.header-search input { width: 210px; border-color: #dfe6e1; border-radius: 11px 0 0 11px; background: #f8faf8; }
.header-search button { border-radius: 0 11px 11px 0; font-size: 12px; }
.user-area { gap: 8px; }
.user-area .btn { border-radius: 9px; }
.avatar-btn span:not(.avatar) { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }

#app { max-width: none; padding: 0 0 80px; }
#app > :not(.home-hero):not(.home-layout):not(.application-backdrop):not(.application-dialog) { max-width: 1128px; margin-left: auto; margin-right: auto; }
#app > .card, #app > .layout, #app > [style*="max-width"] { margin-top: 24px; }
.card { border-radius: 16px; box-shadow: 0 5px 22px rgba(37, 62, 48, .045); }
.btn { border-radius: 10px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], select, textarea { border-radius: 10px; padding: 10px 12px; }

/* 首页 hero */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(315px, .55fr);
  gap: 55px;
  align-items: center;
  max-width: 1128px;
  margin: 0 auto;
  padding: 68px 0 60px;
}
.eyebrow { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.hero-copy h1 { margin: 13px 0 17px; color: #26342d; font: 800 clamp(42px, 5vw, 66px)/1.12 Georgia, "STSong", serif; letter-spacing: -.045em; }
.hero-copy h1 em { color: var(--brand); font-style: normal; }
.hero-copy > p { max-width: 650px; margin: 0; color: #718078; font-size: 15px; line-height: 1.9; }
.hero-search {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  max-width: 720px;
  min-height: 64px;
  margin-top: 27px;
  padding: 6px;
  border: 1px solid #d9e1dc;
  border-radius: 18px;
  background: white;
  box-shadow: 0 16px 45px rgba(35, 73, 51, .08);
}
.hero-search > span { color: #7e8c84; text-align: center; font-size: 25px; }
.hero-search input { min-width: 0; padding: 10px 4px; border: 0; background: transparent; font-size: 14px; box-shadow: none !important; }
.hero-search button { align-self: stretch; padding: 0 23px; border: 0; border-radius: 13px; color: white; background: var(--brand); font-weight: 700; cursor: pointer; }
.quick-row { display: flex; align-items: center; gap: 7px; margin-top: 14px; color: #a0aaa4; font-size: 10px; }
.quick-row button { padding: 5px 9px; border: 0; border-radius: 7px; color: #77837c; background: #ebefec; font-size: 10px; cursor: pointer; }
.hero-stats { display: flex; gap: 45px; margin-top: 36px; }
.hero-stats div { display: grid; }
.hero-stats strong { color: #2b3a32; font: 700 26px/1.2 Georgia, serif; }
.hero-stats span { margin-top: 3px; color: #909b95; font-size: 10px; }

.radar-card { padding: 22px 23px 17px; border: 1px solid #dfe5df; border-radius: 19px; background: #fff; box-shadow: 0 18px 48px rgba(26, 63, 42, .08); }
.radar-card header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid #edf0ed; }
.radar-card header span { color: #98a29d; font-size: 9px; letter-spacing: .09em; }
.radar-card header h2 { margin: 2px 0 0; font: 700 19px Georgia, "STSong", serif; }
.radar-card header i { padding: 3px 7px; border-radius: 6px; color: #14814d; background: #e5f5ec; font-size: 8px; font-style: normal; font-weight: 800; }
.radar-course { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf0ed; color: inherit; }
.radar-course:hover { text-decoration: none; }
.radar-course .rank { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: #77827c; background: #f0f3f0; font: 700 11px Georgia, serif; }
.radar-course .rank.first { color: #9c681c; background: #fff0cf; }
.radar-course > span:nth-child(2) { display: grid; min-width: 0; }
.radar-course b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.radar-course small { margin-top: 1px; color: #939d97; font-size: 9px; }
.radar-course strong { color: var(--star); font: 700 17px Georgia, serif; }
.radar-card > a { display: flex; justify-content: space-between; padding-top: 15px; color: var(--brand); font-size: 11px; font-weight: 700; }

/* 首页内容 */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 276px; gap: 28px; max-width: 1128px; margin: 0 auto; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 17px; }
.home-section-heading span { color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.home-section-heading h2 { margin: 4px 0 0; font: 700 27px Georgia, "STSong", serif; }
.home-section-heading > a { color: var(--brand); font-size: 11px; font-weight: 700; }
.home-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-discussions { margin-top: 40px; }

/* 全站课程卡片 */
.course-grid { gap: 14px; }
.course-card { padding: 18px; border-radius: 16px; gap: 0; box-shadow: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.course-card:hover { transform: translateY(-3px); border-color: #b8d4c4; box-shadow: var(--shadow); }
.course-card-top { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.course-tag { padding: 4px 8px; border-radius: 7px; font-size: 9px; font-weight: 700; }
.course-tag.required { color: #8a552a; background: #fbecdc; }
.course-tag.elective { color: #286794; background: #e7f2fa; }
.course-tag.language { color: #6753a0; background: #eee9fa; }
.course-credit { color: #96a19b; font-size: 9px; }
.course-card .cc-name { margin-top: 10px; font: 700 18px Georgia, "STSong", serif; }
.course-card .cc-meta { margin-top: 4px; font-size: 10px; }
.course-card .cc-meta span { margin: 0 3px; color: #c5ccc8; }
.course-card .rating-line { display: flex; align-items: center; gap: 7px; min-height: 28px; margin: 13px 0 9px; }
.course-card .rating-line strong { color: #2c3d34; font: 700 21px Georgia, serif; }
.course-card .rating-line .stars { font-size: 10px; }
.course-card .rating-line > span:last-child { color: #98a29d; font-size: 9px; }
.tag-row { display: flex; gap: 5px; min-height: 24px; flex-wrap: wrap; }
.tag-row > span { padding: 4px 7px; border-radius: 6px; color: #557064; background: #f0f5f2; font-size: 9px; }
.course-card .cc-foot { margin-top: 13px; padding-top: 12px; border-top: 1px solid #edf0ed; color: #919b95; font-size: 9px; }
.course-card .cc-foot b { color: var(--brand); font-weight: 700; }

.discussion-list { overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: white; }
.discussion-list article { display: grid; grid-template-columns: 38px 1fr; gap: 13px; padding: 17px 19px; }
.discussion-list article + article { border-top: 1px solid #edf0ed; }
.discussion-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; font-size: 12px; font-weight: 700; background: #498365; }
.discussion-avatar.tone-1 { background: #c87951; }.discussion-avatar.tone-2 { background: #587faa; }.discussion-avatar.tone-3 { background: #8068a3; }
.discussion-meta { display: flex; gap: 8px; align-items: center; font-size: 10px; }
.discussion-meta span { color: #99a39e; }
.discussion-title { display: block; margin: 4px 0 2px; color: #2b3730; font-size: 13px; font-weight: 700; }
.discussion-list p { display: -webkit-box; margin: 0; overflow: hidden; color: #76827b; font-size: 10px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.discussion-list footer { display: flex; gap: 12px; margin-top: 7px; color: #9aa49f; font-size: 9px; }
.discussion-list footer span:first-child { color: var(--brand); }

.home-sidebar { padding-top: 49px; }
.home-sidebar .side-card, .contributor-card { margin-bottom: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: white; }
.contributor-card { position: relative; overflow: hidden; color: white; background: linear-gradient(145deg, #176e49, #0c5235); }
.contributor-card::after { content: "ICDB"; position: absolute; right: -12px; top: 12px; color: rgba(255,255,255,.07); font: 800 55px/1 Arial, sans-serif; letter-spacing: -.09em; transform: rotate(-7deg); }
.side-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 10px; background: rgba(255,255,255,.15); font-size: 20px; }
.contributor-card h3 { position: relative; z-index: 1; margin: 0 0 5px; font-size: 14px; }
.contributor-card p { position: relative; z-index: 1; margin: 0 0 15px; color: #c0d9cb; font-size: 9px; line-height: 1.7; }
.btn-white { position: relative; z-index: 1; width: 100%; display: flex; justify-content: center; padding: 10px; border: 0; border-radius: 10px; color: var(--brand-dark); background: white; font-size: 10px; font-weight: 800; cursor: pointer; }
.btn-white:hover { text-decoration: none; }
.side-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-title h3 { margin: 0; font: 700 14px Georgia, "STSong", serif; }
.side-title > span { padding: 3px 6px; border-radius: 5px; color: var(--brand); background: #e7f6ee; font-size: 7px; font-weight: 800; }
.side-title a { font-size: 9px; }
.activity-card ul { padding: 0; margin: 0; list-style: none; }
.activity-card li { display: flex; gap: 9px; padding: 9px 0; }
.activity-card li + li { border-top: 1px solid #eef1ef; }
.activity-dot { width: 7px; height: 7px; flex: none; margin-top: 5px; border-radius: 50%; background: #76ae8e; box-shadow: 0 0 0 4px #edf6f1; }
.activity-card p { margin: 0; color: #87918c; font-size: 9px; line-height: 1.55; }
.activity-card b { color: #4b5851; }.activity-card small { display: block; color: #abb3af; font-size: 8px; }
.notice-card p { margin: 0; padding: 9px 0; color: #59655f; font-size: 9px; }
.notice-card p + p { border-top: 1px solid #eef1ef; }
.notice-card p span { margin-right: 6px; color: #d65a55; font-size: 7px; font-weight: 800; }

/* 权限申请弹窗 */
.application-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15, 29, 21, .54); backdrop-filter: blur(5px); }
.application-dialog { position: fixed; z-index: 90; left: 50%; top: 50%; width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 40px); overflow: auto; border-radius: 22px; background: white; box-shadow: 0 28px 90px rgba(16,45,30,.28); opacity: 0; pointer-events: none; transform: translate(-50%, -46%) scale(.97); transition: .22s ease; }
.application-dialog.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.application-dialog > header { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 25px 20px; border-bottom: 1px solid var(--border); background: linear-gradient(145deg,#f1f8f4,#fff); }
.application-dialog > header span { color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.application-dialog > header h2 { margin: 4px 0; font: 700 25px Georgia, "STSong", serif; }
.application-dialog > header p { margin: 0; color: #859089; font-size: 10px; }
.application-close { width: 37px; height: 37px; border: 0; border-radius: 12px; color: #57645d; background: #e6efe9; font-size: 24px; cursor: pointer; }
.application-content { padding: 22px 25px 25px; }
.applicant-summary { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; margin-bottom: 18px; padding: 12px; border: 1px solid #dfe8e2; border-radius: 13px; background: #f7faf8; }
.applicant-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--brand); font-weight: 700; }
.applicant-summary div { display: grid; }.applicant-summary b { font-size: 12px; }.applicant-summary small { color: #8b9690; font-size: 9px; }
.verified-mark { padding: 5px 8px; border-radius: 7px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 700; }
#application-form > label { display: grid; gap: 7px; margin-top: 15px; color: #4e5b54; font-size: 11px; font-weight: 700; }
#application-form label > small { color: #9aa39e; font-size: 9px; font-weight: 400; text-align: right; }
#application-form .application-check { display: flex; align-items: flex-start; gap: 8px; padding: 11px; border-radius: 10px; color: #738078; background: #f6f8f6; font-size: 9px; font-weight: 400; line-height: 1.6; }
.application-check input { width: auto; margin-top: 3px; accent-color: var(--brand); }
#application-form footer, .application-actions { display: grid; grid-template-columns: .7fr 1.3fr; gap: 10px; margin-top: 20px; }
.application-status { display: grid; gap: 4px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid #dfe6e1; border-left: 3px solid var(--brand); border-radius: 10px; background: #f6faf8; }
.application-status.pending { border-left-color: var(--star); }.application-status.rejected { border-left-color: var(--danger); }
.application-status span, .application-status small { color: var(--muted); font-size: 10px; }
.application-readonly { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; font-size: 11px; }
.application-readonly > span { color: var(--muted); }.application-readonly p { margin: 0; }
.application-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 9px 0; }
.application-detail-grid div { display: grid; gap: 2px; padding: 9px; border-radius: 8px; background: #f6f8f6; }
.application-detail-grid span { color: var(--muted); font-size: 10px; }

.mobile-bottom { display: none; }

@media (max-width: 1180px) {
  .home-hero, .home-layout { width: calc(100% - 40px); }
  #app > :not(.home-hero):not(.home-layout):not(.application-backdrop):not(.application-dialog) { width: calc(100% - 40px); }
}
@media (max-width: 950px) {
  .home-hero { grid-template-columns: 1fr; gap: 24px; }
  .radar-card { display: none; }
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-top: 0; }
  .home-sidebar .side-card, .contributor-card { margin: 0; }
}
@media (max-width: 760px) {
  body { padding-bottom: 68px; }
  .site-header { position: sticky; }
  .header-inner { width: calc(100% - 28px); height: 62px; padding: 0; gap: 10px; }
  .logo b { font-size: 18px; }.logo small, .main-nav, .header-search { display: none; }
  .user-area { margin-left: auto; }.user-area .avatar-btn span:not(.avatar), .user-area .verified-tag, .user-area #logout-btn, .user-area .msg-link { display: none; }
  .user-area .btn { padding: 5px 9px; font-size: 11px; }
  #app { padding-bottom: 40px; }
  .home-hero, .home-layout, #app > :not(.home-hero):not(.home-layout):not(.application-backdrop):not(.application-dialog) { width: calc(100% - 28px); }
  .home-hero { padding: 38px 0 38px; }
  .hero-copy h1 { margin-top: 10px; font-size: clamp(34px, 11vw, 46px); line-height: 1.22; }
  .hero-copy > p { font-size: 12px; }
  .hero-search { grid-template-columns: 35px 1fr; min-height: 56px; border-radius: 15px; }
  .hero-search button { display: none; }
  .quick-row { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .quick-row > * { flex: none; }
  .hero-stats { justify-content: space-between; gap: 10px; margin-top: 25px; }
  .hero-stats strong { font-size: 21px; }.hero-stats span { font-size: 8px; }
  .home-section-heading h2 { font-size: 23px; }.home-section-heading > a { font-size: 10px; }
  .home-course-grid { grid-template-columns: 1fr; }
  .home-course-grid .course-card:nth-child(n+4) { display: none; }
  .home-sidebar { display: block; }
  .home-sidebar .side-card, .contributor-card { margin-top: 14px; }
  .home-sidebar .activity-card, .home-sidebar .notice-card { display: none; }
  .mobile-bottom { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: 67px; display: grid; grid-template-columns: repeat(4,1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
  .mobile-bottom a { display: grid; place-content: center; gap: 0; color: #8c9690; text-align: center; }
  .mobile-bottom a:hover { text-decoration: none; }.mobile-bottom span { font-size: 20px; line-height: 1; }.mobile-bottom b { font-size: 8px; font-weight: 600; }.mobile-bottom a.active { color: var(--brand); }
  .site-footer { display: none; }
  .toast-box { bottom: 82px; }
  .layout { gap: 14px; }
  .course-grid { grid-template-columns: 1fr; }
  .application-dialog { max-height: calc(100vh - 22px); border-radius: 18px; }
  .application-dialog > header { padding: 19px; }.application-dialog > header h2 { font-size: 21px; }.application-content { padding: 18px 19px 20px; }
  .admin-row { align-items: flex-start; flex-wrap: wrap; }.admin-row .admin-actions { width: 100%; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tab { flex: none; }
}
