/* AI Project Community — GitHub 一比一设计系统 */
:root {
  --canvas: #ffffff;
  --canvas-subtle: #f6f8fa;
  --canvas-inset: #f6f8fa;
  --canvas-overlay: #ffffff;

  --border: #d1d9e0;
  --border-muted: rgba(31, 35, 40, .15);
  --border-subtle: rgba(31, 35, 40, .08);

  --fg: #1f2328;
  --fg-muted: #59636e;
  --fg-subtle: #6e7781;

  --accent: #0969da;
  --accent-subtle: #ddf4ff;
  --success: #1a7f37;
  --success-subtle: #dafbe1;
  --attention: #9a6700;
  --attention-subtle: #fff8c5;
  --danger: #cf222e;
  --danger-subtle: #ffebe9;
  --done: #8250df;
  --done-subtle: #fbefff;

  --btn-bg: #f6f8fa;
  --btn-hover: #eff2f5;
  --btn-primary-bg: #1f883d;
  --btn-primary-hover: #1a7f37;

  --header-bg: #24292f;
  --header-border: #3d444d;

  --radius: 6px;
  --radius-sm: 4px;
  --shadow-rest: 0 1px 0 rgba(31, 35, 40, .04);
  --shadow-card: 0 1px 3px rgba(31, 35, 40, .06);
  --shadow-pop: 0 8px 24px rgba(140, 149, 159, .2);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: break-word;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { fill: currentColor; vertical-align: text-bottom; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 1012px; margin: 0 auto; padding: 0 32px; }

/* ============================================================ 顶栏 */
.gh-header {
  background: var(--header-bg);
  color: #fff;
  height: 62px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.gh-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 32px; width: 100%;
  display: flex; align-items: center; gap: 16px;
}
.gh-logo { color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -.1px; }
.gh-logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 6px; background: #fff; color: var(--header-bg);
  display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700;
}
.gh-nav { display: flex; gap: 2px; }
.gh-nav a {
  color: #f0f3f6; font-size: 14px; padding: 6px 10px; border-radius: 6px; opacity: .82;
}
.gh-nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; opacity: 1; }
.gh-nav a.on { opacity: 1; font-weight: 600; }
.gh-spacer { flex: 1; }
.gh-search { position: relative; width: 250px; }
.gh-search input[type=text] {
  width: 100%; height: 32px; padding: 0 30px 0 32px; border-radius: 6px;
  border: 1px solid #57606a; background: rgba(255,255,255,.06); color: #fff; font-size: 13.5px;
  font-family: inherit; outline: none;
}
.gh-search input[type=text]::placeholder { color: #9ba3ad; }
.gh-search input[type=text]:focus { background: #fff; color: var(--fg); border-color: #fff; box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
.gh-search .ico { position: absolute; left: 10px; top: 9px; color: #9ba3ad; pointer-events: none; }
.gh-search kbd {
  position: absolute; right: 8px; top: 7px; font-family: var(--mono); font-size: 10px;
  border: 1px solid #57606a; color: #9ba3ad; border-radius: 3px; padding: 0 4px; line-height: 16px;
}
.gh-actions { display: flex; align-items: center; gap: 10px; }
.gh-actions .btn-ghost-light {
  color: #f0f3f6; border: 1px solid #57606a; background: transparent; height: 28px; font-size: 12.5px;
  padding: 0 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px;
}
.gh-actions .btn-ghost-light:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.gh-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 12px; font-family: var(--mono); }

/* ============================================================ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--border-muted); background: var(--btn-bg); color: var(--fg);
  font-family: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--btn-hover); border-color: rgba(31,35,40,.25); text-decoration: none; color: var(--fg); }
.btn:active { background: #e6eaef; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; opacity: .72; }
.btn-primary { background: var(--btn-primary-bg); border-color: rgba(31,35,40,.15); color: #fff; }
.btn-primary:hover { background: var(--btn-primary-hover); color: #fff; }
.btn-primary:active { background: #176b32; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-lg { height: 40px; padding: 0 16px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-muted); }
.btn-ghost:hover { background: var(--canvas-subtle); border-color: transparent; color: var(--fg); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-subtle); border-color: rgba(207,34,46,.4); color: var(--danger); }
.btn-icon { padding: 0; width: 32px; }

.btn-group { display: inline-flex; }
.btn-group .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group .btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; }
.btn-group .btn:not(:first-child):not(:last-child) { border-radius: 0; }

/* ============================================================ 通用块 */
.card {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--canvas); border-radius: var(--radius) var(--radius) 0 0;
  font-size: 14px; font-weight: 600;
}
.card-body { padding: 16px; }

.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--canvas-subtle);
  font-size: 12px; font-weight: 500; color: var(--fg-muted); white-space: nowrap;
}
.badge-green { border-color: #aceebb; background: var(--success-subtle); color: var(--success); }
.badge-blue { border-color: #b6e3ff; background: var(--accent-subtle); color: #0550ae; }
.badge-red { border-color: #ffcecb; background: var(--danger-subtle); color: var(--danger); }
.badge-purple { border-color: #e2ccff; background: var(--done-subtle); color: var(--done); }

.label-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--accent-subtle); color: #0550ae; font-size: 11.5px; font-weight: 500;
}

.counter {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--border-muted); color: var(--fg); font-size: 12px; font-weight: 600;
}

.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }
.mono { font-family: var(--mono); }
.tiny { font-size: 12px; }

.avatar {
  border-radius: 50%; display: inline-grid; place-items: center; color: #fff;
  font-weight: 600; flex: none; font-family: var(--mono); overflow: hidden;
}
.avatar-sm { width: 20px; height: 20px; font-size: 10px; }
.avatar-md { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }
.empty {
  border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px 20px;
  text-align: center; background: var(--canvas-subtle);
}
.empty h3 { margin: 0 0 6px; font-size: 15px; }
.empty p { margin: 0; color: var(--fg-muted); font-size: 13px; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.field .hint { font-size: 12px; color: var(--fg-muted); }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=date], textarea, select {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--fg);
  background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 12px; outline: none; transition: border-color .12s, box-shadow .12s;
}
input { height: 32px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(9,105,218,.3); }
textarea { resize: vertical; min-height: 80px; line-height: 1.6; padding: 8px 12px; }
select { height: 32px; padding-right: 28px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { display: none; }
.switch .track { width: 44px; height: 24px; border-radius: 12px; background: var(--border); position: relative; transition: background .15s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--btn-primary-bg); }
.switch input:checked + .track::after { transform: translateX(20px); }

/* ============================================================ 探索页 */
.explore-head { padding: 24px 0 8px; }
.explore-head h1 { font-size: 24px; font-weight: 400; margin: 0 0 8px; letter-spacing: -.3px; }
.explore-head p { margin: 0; color: var(--fg-muted); font-size: 14px; }

.explore-layout { display: grid; grid-template-columns: 250px 1fr 300px; gap: 24px; align-items: start; padding: 20px 0 64px; }
.explore-nav { position: sticky; top: 86px; }
.explore-nav .nav-group-title { font-size: 12px; font-weight: 600; color: var(--fg-muted); padding: 0 8px; margin-bottom: 6px; }
.explore-nav a, .explore-nav button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 7px 10px; border-radius: var(--radius); border: 0; background: transparent;
  color: var(--fg); font-family: inherit; font-size: 13.5px; cursor: pointer;
}
.explore-nav a:hover, .explore-nav button:hover { background: var(--canvas-subtle); text-decoration: none; }
.explore-nav .active { background: var(--canvas-subtle); font-weight: 600; }
.explore-nav .cnt { margin-left: auto; font-size: 11.5px; color: var(--fg-subtle); font-family: var(--mono); }

.type-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.section-head h2 { font-size: 20px; font-weight: 400; margin: 0; letter-spacing: -.3px; }

.repo-row {
  display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border);
}
.repo-row:last-child { border-bottom: 0; }
.repo-row .repo-ico { color: var(--fg-muted); padding-top: 2px; flex: none; }
.repo-row-main { flex: 1; min-width: 0; }
.repo-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.repo-title a { color: var(--accent); }
.repo-title .owner { color: var(--fg-muted); font-weight: 400; }
.repo-desc { margin: 6px 0 10px; font-size: 13px; color: var(--fg-muted); line-height: 1.5; }
.repo-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--fg-muted); }
.repo-meta .lang { display: inline-flex; align-items: center; gap: 6px; }
.repo-meta .star-count { display: inline-flex; align-items: center; gap: 4px; }
.repo-row .star-btn {
  align-self: flex-start; flex: none;
}
.star-btn.on { background: var(--attention-subtle); border-color: #d4a72c; color: var(--attention); }

.aside-block { margin-bottom: 20px; }
.aside-block .aside-title { font-size: 12px; font-weight: 600; color: var(--fg-muted); margin-bottom: 10px; }
.aside-repo { padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.aside-repo:last-child { border-bottom: 0; }
.aside-repo .name { font-size: 13.5px; font-weight: 600; }
.aside-repo .desc { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }

/* ============================================================ 项目页（仓库） */
.repo-head { display: flex; align-items: center; gap: 10px; padding: 16px 0 12px; flex-wrap: wrap; }
.repo-head .crumb { display: flex; align-items: center; gap: 8px; font-size: 20px; letter-spacing: -.3px; }
.repo-head .crumb a { color: var(--accent); font-weight: 400; }
.repo-head .crumb strong { font-weight: 600; color: var(--fg); }
.repo-head .badge { margin-left: 2px; }
.repo-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.repo-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.repo-tabs::-webkit-scrollbar { display: none; }
.repo-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px 12px;
  border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--fg-muted); white-space: nowrap; border-radius: 6px 6px 0 0;
}
.repo-tab:hover { background: var(--canvas-subtle); color: var(--fg); }
.repo-tab.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
.repo-tab .counter { margin-left: 2px; }

.repo-layout { display: grid; grid-template-columns: 1fr 296px; gap: 32px; padding: 16px 0 64px; align-items: start; }

.file-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.branch-select {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--btn-bg);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.file-toolbar .seg { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.file-toolbar .seg > * { border: 0; border-right: 1px solid var(--border); height: 30px; border-radius: 0; font-size: 12.5px; }
.file-toolbar .seg > *:last-child { border-right: 0; }
.file-toolbar .go-file { flex: 1; min-width: 160px; max-width: 260px; }
.file-toolbar .go-file input { height: 30px; font-size: 12.5px; }
.code-btn { margin-left: auto; }

.commit-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--canvas-subtle); font-size: 12.5px; color: var(--fg-muted);
}
.commit-bar .who { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; }
.commit-bar .msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-muted); font-weight: 400; }
.commit-bar .hash { font-family: var(--mono); font-size: 11.5px; }

.file-table { border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px; cursor: pointer;
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--canvas-subtle); }
.file-row .file-ico { color: var(--fg-muted); flex: none; }
.file-row .fname { flex: 1; color: var(--fg); font-weight: 500; }
.file-row .fmsg { flex: 2; color: var(--fg-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .ftime { color: var(--fg-muted); font-size: 12px; white-space: nowrap; }

.readme-box { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.readme-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
  border-bottom: 1px solid var(--border); background: var(--canvas-subtle);
  font-size: 12.5px; color: var(--fg-muted); font-family: var(--mono);
}
.readme-body { padding: 32px 40px; }

.repo-about { display: flex; flex-direction: column; gap: 20px; }
.about-block h3 { font-size: 16px; font-weight: 600; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.about-block p { font-size: 13px; color: var(--fg-muted); margin: 0 0 12px; line-height: 1.6; }
.about-link { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; color: var(--accent); }
.about-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.about-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 0; font-size: 12.5px; color: var(--fg-muted); }
.about-stats span { white-space: nowrap; }
.about-stats svg { color: var(--fg-muted); }
.about-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.about-row .tag { font-family: var(--mono); font-size: 11.5px; color: var(--fg-muted); }

/* ============================================================ 列表/表格 */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--canvas-subtle); }
.list-row .main { flex: 1; min-width: 0; }
.list-row .title { font-size: 13.5px; font-weight: 600; }
.list-row .sub { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }

.log-entry { padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.log-entry:last-child { border-bottom: 0; }
.log-entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log-entry-title { font-size: 14px; font-weight: 600; }
.log-entry-body { margin-top: 8px; font-size: 13px; color: var(--fg-muted); white-space: pre-wrap; line-height: 1.65; }
.log-entry-meta { margin-top: 8px; font-size: 11.5px; color: var(--fg-subtle); font-family: var(--mono); display: flex; gap: 10px; }

table.gh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.gh-table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--fg-muted); padding: 8px 16px; background: var(--canvas-subtle); border-bottom: 1px solid var(--border); }
table.gh-table td { padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
table.gh-table tr:last-child td { border-bottom: 0; }

/* 插件 */
.plugin-row { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--border-subtle); align-items: center; }
.plugin-row:last-child { border-bottom: 0; }
.plugin-ico {
  width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--canvas-subtle); display: grid; place-items: center; flex: none;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--fg);
}
.plugin-row .main { flex: 1; min-width: 0; }
.plugin-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plugin-desc { font-size: 12.5px; color: var(--fg-muted); margin-top: 3px; line-height: 1.55; }
.plugin-meta { font-size: 11.5px; color: var(--fg-subtle); margin-top: 5px; font-family: var(--mono); }

/* ============================================================ 个人主页 */
.profile-head { display: flex; gap: 32px; padding: 32px 0 16px; }
.profile-avatar-wrap { width: 164px; flex: none; }
.profile-avatar {
  width: 164px; height: 164px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-family: var(--mono); font-size: 54px; font-weight: 600;
  border: 1px solid var(--border); box-shadow: var(--shadow-rest);
}
.profile-main { flex: 1; padding-top: 8px; }
.profile-name { font-size: 24px; font-weight: 400; margin: 0 0 4px; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name .badge { font-size: 11px; height: 20px; }
.profile-handle { font-size: 16px; color: var(--fg-muted); margin-bottom: 12px; }
.profile-bio { font-size: 15px; color: var(--fg-muted); margin: 0 0 16px; max-width: 620px; line-height: 1.55; }
.profile-actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--fg-muted); margin-bottom: 12px; }
.profile-facts span { display: inline-flex; align-items: center; gap: 6px; }
.profile-facts strong { color: var(--fg); }

.profile-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 32px; padding: 16px 0 64px; align-items: start; }

.pinned-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.pinned-head h2 { font-size: 16px; font-weight: 600; margin: 0; display: flex; gap: 6px; align-items: center; }
.pinned-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pinned-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--canvas); display: flex; flex-direction: column; min-height: 118px; }
.pinned-card:hover { border-color: var(--accent); }
.pinned-card .pc-head { display: flex; gap: 8px; align-items: flex-start; }
.pinned-card .pc-name { font-size: 14px; font-weight: 600; color: var(--accent); word-break: break-all; }
.pinned-card .pc-desc { font-size: 12px; color: var(--fg-muted); margin: 8px 0 12px; line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pinned-card .pc-foot { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--fg-muted); }
.pinned-empty { border: 1px dashed var(--border); border-radius: var(--radius); padding: 20px; font-size: 12.5px; color: var(--fg-muted); text-align: center; }

.contrib-card { border: 1px solid var(--border); border-radius: var(--radius); }
.contrib-head { padding: 14px 16px; font-size: 13px; color: var(--fg-muted); }
.contrib-head strong { color: var(--fg); font-weight: 600; }
.contrib-scroll { overflow-x: auto; padding: 0 16px 8px; }
.contrib-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); gap: 3px; width: max-content; }
.contrib-cell { width: 11px; height: 11px; border-radius: 2px; background: #ebedf0; }
.contrib-cell[data-l="1"] { background: #9be9a8; }
.contrib-cell[data-l="2"] { background: #40c463; }
.contrib-cell[data-l="3"] { background: #30a14e; }
.contrib-cell[data-l="4"] { background: #216e39; }
.contrib-legend { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px 16px; font-size: 11.5px; color: var(--fg-muted); }
.contrib-months { display: grid; grid-auto-flow: column; gap: 3px; padding: 0 16px; font-size: 11px; color: var(--fg-muted); width: max-content; }
.contrib-months span { width: 11px; }

.activity-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.activity-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.activity-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.activity-ico { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; flex: none; color: var(--fg-muted); background: var(--canvas-subtle); }
.activity-body { flex: 1; }
.activity-title { font-size: 13.5px; }
.activity-title strong { font-weight: 600; }
.activity-sub { font-size: 12px; color: var(--fg-muted); margin-top: 3px; }
.activity-when { font-size: 11.5px; color: var(--fg-subtle); white-space: nowrap; }

/* ============================================================ 工作台 */
.page-head { padding: 24px 0 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 400; margin: 0 0 4px; letter-spacing: -.3px; }
.page-head .sub { font-size: 14px; color: var(--fg-muted); }
.page-head-actions { display: flex; gap: 8px; align-items: center; }

.studio-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }

/* ============================================================ 弹窗 */
.modal-backdrop { position: fixed; inset: 0; background: rgba(31,35,40,.5); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal {
  background: var(--canvas); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow-pop); width: 100%; max-height: 88vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { padding: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 14px; font-weight: 600; }
.modal-body { padding: 16px; overflow: auto; }
.modal-foot { padding: 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.icon-x { border: 0; background: transparent; color: var(--fg-muted); cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: var(--radius-sm); }
.icon-x:hover { background: var(--canvas-subtle); color: var(--fg); }

.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--fg); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 13px; box-shadow: var(--shadow-pop);
}
.toast.err { background: var(--danger); }

/* 空态/加载 */
.loading { padding: 40px; text-align: center; color: var(--fg-muted); font-size: 13px; }

/* Markdown */
.markdown { font-size: 15px; line-height: 1.65; color: var(--fg); }
.markdown h1 { font-size: 26px; font-weight: 600; margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); letter-spacing: -.4px; }
.markdown h2 { font-size: 20px; font-weight: 600; margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.markdown h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.markdown h4 { font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
.markdown p { margin: 10px 0; }
.markdown ul { margin: 10px 0; padding-left: 24px; }
.markdown li { margin: 4px 0; }
.markdown code { font-family: var(--mono); font-size: 12.5px; background: var(--canvas-subtle); padding: 2px 6px; border-radius: var(--radius-sm); }
.markdown pre { background: var(--canvas-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; margin: 14px 0; }
.markdown pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.6; }
.markdown table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: 7px 12px; text-align: left; }
.markdown th { background: var(--canvas-subtle); font-weight: 600; }
.markdown blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--border); color: var(--fg-muted); background: var(--canvas-subtle); }

/* 登录页 */
.auth-page { min-height: calc(100vh - 62px); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.auth-card { width: 100%; max-width: 340px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 24px; }
.auth-title { text-align: center; font-size: 20px; font-weight: 400; margin-bottom: 20px; }
.auth-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--canvas); }
.auth-error { margin-bottom: 12px; padding: 8px 12px; border: 1px solid rgba(207,34,46,.4); background: var(--danger-subtle); color: var(--danger); border-radius: var(--radius); font-size: 12.5px; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--fg-muted); }

/* 类型选择 */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-opt { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; background: var(--canvas); }
.type-opt:hover { background: var(--canvas-subtle); }
.type-opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-subtle); }
.type-opt .t { font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.type-opt .d { font-size: 11.5px; color: var(--fg-muted); margin-top: 2px; line-height: 1.4; }

/* 托管页 */
.hosted-body { background: var(--canvas-subtle); }
.hosted-bar { height: 48px; background: var(--header-bg); color: #fff; display: flex; align-items: center; gap: 10px; padding: 0 32px; }
.hosted-bar a { color: #fff; font-weight: 600; }
.hosted-main { max-width: 900px; margin: 0 auto; padding: 32px 24px 64px; }
.hosted-card { background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius); }
.hosted-head { display: flex; align-items: center; gap: 20px; padding: 24px; }
.hosted-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 400; }

@media (max-width: 1100px) {
  .explore-layout { grid-template-columns: 220px 1fr; }
  .explore-layout > aside:last-child { display: none; }
  .repo-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; gap: 20px; }
  .profile-avatar-wrap { width: 112px; }
  .profile-avatar { width: 112px; height: 112px; font-size: 38px; }
}
@media (max-width: 760px) {
  .container, .container-narrow { padding: 0 16px; }
  .gh-header-inner { padding: 0 16px; gap: 10px; }
  .gh-nav { display: none; }
  .gh-search { width: 150px; }
  .explore-layout { grid-template-columns: 1fr; }
  .explore-nav { display: none; }
  .pinned-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .readme-body { padding: 20px; }
  .repo-head .crumb { font-size: 16px; }
  .file-row .fmsg { display: none; }
}


/* ============================================================ 页脚 */
.gh-footer { border-top: 1px solid var(--border); margin-top: 48px; background: var(--canvas); }
.gh-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 32px 24px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 12px; color: var(--fg-muted);
}
.gh-footer-left { display: flex; align-items: center; gap: 10px; }
.gh-footer .logo-mark { width: 22px; height: 22px; font-size: 10px; background: var(--header-bg); color: #fff; }
.gh-footer-left .muted { color: var(--fg-subtle); }
.gh-footer-links { display: flex; gap: 20px; }
.gh-footer-links a { color: var(--accent); }
.gh-footer-links a:hover { text-decoration: underline; }

/* ============================================================ 搜索页 */
.search-inline { display: flex; gap: 8px; align-items: center; }
.search-inline input[type=text] { width: 300px; height: 32px; }
.search-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 8px 0 12px; overflow-x: auto; }
.search-tab {
  padding: 8px 12px; font-size: 14px; color: var(--fg-muted); border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.search-tab:hover { background: var(--canvas-subtle); color: var(--fg); text-decoration: none; }
.search-tab.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
.search-summary { font-size: 13px; color: var(--fg-muted); margin: 12px 0; }
.search-summary strong { color: var(--fg); }
.repo-list { display: block; }
.plugin-name { font-weight: 600; font-size: 14px; }
@media (max-width: 760px) {
  .search-inline { width: 100%; }
  .search-inline input[type=text] { width: 100%; flex: 1; }
}

/* ============================================================ 移动端导航 */
.gh-menu-btn {
  display: none; width: 32px; height: 32px; border-radius: 6px; border: 1px solid #57606a;
  background: rgba(255,255,255,.06); color: #fff; place-items: center; cursor: pointer; flex: none;
}
.gh-drawer {
  display: none; position: fixed; top: 62px; left: 0; right: 0; z-index: 60;
  background: var(--header-bg); border-bottom: 1px solid #30363d; padding: 8px 16px 16px;
  box-shadow: 0 12px 24px rgba(0,0,0,.35);
}
.gh-drawer.on { display: block; }
.gh-drawer a {
  display: block; color: #f0f3f6; padding: 11px 8px; border-radius: 6px; font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.gh-drawer a:last-child { border-bottom: 0; }
.gh-drawer a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
@media (max-width: 760px) {
  .gh-menu-btn { display: grid; }
  .gh-actions .btn-ghost-light { display: none; }
}

.forked-note { flex-basis: 100%; order: 3; margin: -2px 0 0 0; font-size: 12px; color: var(--fg-muted); }

/* ============================================================ 版本对比 */
.diff-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff-col { border: 1px solid var(--border); border-radius: 6px; overflow: auto; max-height: 55vh; font-family: var(--mono); font-size: 12px; }
.diff-head { padding: 8px 10px; background: var(--canvas-subtle); border-bottom: 1px solid var(--border); font-size: 12px; position: sticky; top: 0; }
.diff-line { padding: 2px 10px; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.diff-line.del { background: #ffebe9; }
.diff-line.add { background: #e6ffec; }
@media (max-width: 760px) { .diff-cols { grid-template-columns: 1fr; } .diff-col { max-height: 35vh; } }

/* ============================================================ 模板库 */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; padding-bottom: 40px; }
.tpl-card { border: 1px solid var(--border); border-radius: 6px; background: var(--canvas); display: flex; flex-direction: column; overflow: hidden; }
.tpl-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.tpl-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.tpl-head .badge { margin-left: auto; }
.tpl-desc { font-size: 13px; color: var(--fg-muted); padding: 10px 16px 0; margin: 0; }
.tpl-readme {
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-muted); background: var(--canvas-subtle);
  border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle);
  margin: 10px 0 0; padding: 10px 16px; max-height: 150px; overflow: auto; white-space: pre-wrap; line-height: 1.6;
}
.tpl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; margin-top: auto; }
@media (max-width: 760px) { .tpl-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .gh-logo { font-size: 0; gap: 0; }
  .gh-logo .logo-mark { font-size: 12px; }
  .gh-search { display: none; }
}

/* ============================================================ 讨论 / 点评 */
.comment-compose { border: 1px solid var(--border); border-radius: 6px; background: var(--canvas-subtle); padding: 12px; margin-bottom: 18px; }
.comment-compose textarea { width: 100%; background: var(--canvas); }
.comment-compose-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.comment-list { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.comment-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.comment-item:last-child { border-bottom: 0; }
.comment-item:hover { background: var(--canvas-subtle); }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.comment-head strong { font-weight: 600; }
.comment-del { margin-left: auto; border: 0; background: transparent; color: var(--fg-muted); cursor: pointer; padding: 2px 4px; border-radius: 4px; display: grid; place-items: center; }
.comment-del:hover { background: var(--canvas-subtle); color: var(--danger, #cf222e); }
.comment-body { margin-top: 6px; font-size: 13.5px; color: var(--fg); line-height: 1.7; word-break: break-word; }

/* ============================================================ 趋势 */
.trend-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.trend-list { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.trend-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.trend-row:last-child { border-bottom: 0; }
.trend-row:hover { background: var(--canvas-subtle); }
.trend-row .repo-row-main { flex: 1; min-width: 0; }
.trend-rank { width: 22px; text-align: right; font-family: ui-monospace, monospace; font-size: 13px; color: var(--fg-muted); flex: none; }
.trend-rank.top { color: var(--fg); font-weight: 700; }
.trend-rank.sm { width: 14px; font-size: 11px; }
.trend-row .repo-desc { margin: 4px 0 8px; font-size: 13px; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.creator-row:last-child { border-bottom: 0; }
.creator-row a { color: var(--fg); }
.creator-row .tiny.mono { margin-left: auto; color: var(--fg-muted); }
.plugin-ico.sm { width: 28px; height: 28px; font-size: 11px; flex: none; }
@media (max-width: 1000px) { .trend-layout { grid-template-columns: 1fr; } }

/* 表单双列 + 模型卡 */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.model-card-mini { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-subtle); display: grid; gap: 4px; font-size: 12px; }
.model-card-mini strong { font-weight: 600; }

.markdown img { max-width: 100%; border: 1px solid var(--border); border-radius: 6px; margin: 8px 0; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

.head-actions { display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.seg a { padding: 5px 10px; font-size: 12px; color: var(--fg-muted); border-right: 1px solid var(--border); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--canvas-subtle); color: var(--fg); font-weight: 600; }

.btn.starred { color: #9a6700; border-color: #d4a72c; background: #fff8c5; }
.btn.starred:hover { background: #fcf0b5; }

/* 关注动态 */
.feed-list { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.feed-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.feed-item:last-child { border-bottom: 0; }
.feed-item:hover { background: var(--canvas-subtle); }
.feed-main { flex: 1; min-width: 0; }
.feed-line { font-size: 13.5px; line-height: 1.7; }
.feed-line a { color: var(--fg); }
.feed-line .tag { font-size: 11px; background: var(--canvas-subtle); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.feed-detail { margin-top: 4px; font-size: 13px; color: var(--fg-muted); }

/* 作品画廊 */
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gallery-item { position: relative; display: block; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--canvas-subtle); }
.gallery-item img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-item:hover { border-color: var(--accent); }
.gallery-cap { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
@media (max-width: 720px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item.failed { min-height: 220px; display: grid; place-items: center; }
.gallery-item.failed img { display: none; }
.gallery-item.failed::before { content: "图片加载失败，点此打开原图"; color: var(--fg-muted); font-size: 12px; }

/* 通知 */
.bell-link { position: relative; display: inline-flex; align-items: center; }
.bell-dot { position: absolute; top: -5px; right: -7px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 2em; background: var(--accent); color: #fff; font-size: 10px; line-height: 15px; text-align: center; font-weight: 600; }
.notif-list { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); align-items: flex-start; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--canvas-subtle); }
.notif-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--canvas-subtle); color: var(--fg-muted); flex: none; }
.notif-ico.star { color: #9a6700; background: #fff8c5; }
.notif-ico.teacher { color: #1a7f37; background: #dafbe1; }
.notif-main { flex: 1; min-width: 0; }
.notif-line { font-size: 13.5px; line-height: 1.6; }
.notif-line strong { font-weight: 600; }

/* ============================================================ 学校空间 / 赛事 */
.org-hero, .event-hero { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.org-mark { width: 64px; height: 64px; border-radius: 8px; background: var(--org-color, #2da44e); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none; }
.org-hero-main { flex: 1; min-width: 0; }
.org-kicker, .event-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.org-type, .event-status { display: inline-block; font-size: 11px; line-height: 1.6; padding: 0 8px; border: 1px solid; border-radius: 2em; }
.org-hero h1, .event-hero h1 { font-size: 26px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.3px; }
.org-hero p, .event-hero p { margin: 0 0 10px; color: var(--fg-muted); font-size: 14px; }
.org-stats, .event-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--fg-muted); }
.org-stats strong { color: var(--fg); }
.org-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.org-layout, .event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.org-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.org-card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; background: var(--canvas); display: block; color: var(--fg); }
.org-card:hover { border-color: var(--accent); text-decoration: none; }
.org-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.org-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.org-card p { margin: 0 0 12px; color: var(--fg-muted); font-size: 13px; min-height: 38px; }
.org-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--fg-muted); }
.org-event-list { display: grid; gap: 8px; }
.org-event-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; color: var(--fg); }
.org-event-card:hover { background: var(--canvas-subtle); text-decoration: none; }
.org-event-card > div { flex: 1; min-width: 0; }
.event-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.select-inline { width: auto; padding: 5px 10px; font-size: 12px; }
.team-list { display: grid; gap: 10px; }
.team-card { border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; }
.team-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-top strong { font-size: 15px; }
.team-members { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 10px 0; font-size: 12px; align-items: center; }
.team-member { display: inline-flex; align-items: center; gap: 5px; }
.board-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border-subtle); font-size: 13px; }
.board-row:last-child { border-bottom: 0; }
.board-name { flex: 1; color: var(--fg); }
.board-score { font-family: var(--mono); font-weight: 600; }
.callout { border: 1px dashed var(--border); border-radius: 6px; padding: 12px 14px; color: var(--fg-muted); font-size: 13px; margin-bottom: 14px; background: var(--canvas-subtle); }
@media (max-width: 1000px) { .org-layout, .event-layout { grid-template-columns: 1fr; } .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .org-grid { grid-template-columns: 1fr; } .org-hero { flex-wrap: wrap; } .org-actions { flex-direction: row; width: 100%; } }

/* 赛事页头部按纵向排版，避免继承 org-hero 的横向 flex */
.event-hero { display: block; padding: 20px 0 18px; }
.event-hero .event-kicker { margin-bottom: 8px; }
.event-hero h1 { font-size: 30px; line-height: 1.25; }
.event-hero .event-facts { margin-top: 10px; }
.event-hero .event-actions { margin-top: 14px; flex-wrap: wrap; }
.event-hero .about-topics { margin-top: 12px; }

/* 在线演示（项目外部站点 iframe） */
.demo-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--canvas);
}
.demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas-subtle, #f6f8fa);
  flex-wrap: wrap;
}
.demo-frame {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  min-height: 460px;
  border: 0;
  background: #fff;
}
.demo-note {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.7;
  color: var(--fg-muted);
  background: var(--canvas-subtle, #f6f8fa);
}
@media (max-width: 700px) {
  .demo-frame { height: 62vh; min-height: 380px; }
  .demo-toolbar { align-items: flex-start; }
}

/* ---------------------------------------------------- campus hybrid layer */
.campus-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 28px;
  overflow: hidden;
  margin: 28px 0 30px;
  padding: 38px 42px;
  border: 1px solid #30363d;
  border-radius: 10px;
  background:
    radial-gradient(900px 380px at 88% -10%, rgba(46, 160, 67, .20), transparent 65%),
    radial-gradient(700px 300px at 0% 110%, rgba(9, 105, 218, .18), transparent 60%),
    linear-gradient(135deg, #0d1117 0%, #161b22 60%, #0d1117 100%);
  color: #f0f6fc;
}
.campus-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(240,246,252,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(240,246,252,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.55), transparent 80%);
  pointer-events: none;
}
.campus-hero-copy { position: relative; z-index: 1; }
.campus-eyebrow {
  color: #7ee787;
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .13em;
}
.campus-hero h1 {
  margin: 16px 0 14px;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.12;
  letter-spacing: -.035em;
  color: #fff;
}
.campus-hero h1 em { color: #7ee787; font-style: normal; }
.campus-hero p {
  max-width: 640px;
  margin: 0 0 22px;
  color: #b1bac4;
  font-size: 14px;
  line-height: 1.75;
}
.campus-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-hero {
  background: #238636;
  border: 1px solid #2ea043;
  color: #fff;
  font-weight: 600;
}
.btn-hero:hover { background: #2ea043; color: #fff; }
.btn-hero-ghost {
  background: transparent;
  border: 1px solid #484f58;
  color: #f0f6fc;
}
.btn-hero-ghost:hover { background: #21262d; color: #fff; }
.campus-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #30363d;
}
.campus-metrics span { display: flex; flex-direction: column; gap: 2px; }
.campus-metrics strong { color: #fff; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.campus-metrics label { color: #8b949e; font-size: 11px; letter-spacing: .02em; }
.campus-orbit {
  position: relative;
  min-height: 260px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit-ring {
  position: absolute;
  border: 1px solid rgba(126, 231, 135, .25);
  border-radius: 50%;
}
.orbit-ring.ring-1 { width: 240px; height: 240px; }
.orbit-ring.ring-2 { width: 170px; height: 170px; border-color: rgba(88, 166, 255, .24); }
.orbit-core {
  width: 82px; height: 82px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(126,231,135,.6);
  background: radial-gradient(circle at 30% 20%, #2ea043, #12261c 70%);
  box-shadow: 0 0 0 8px rgba(46,160,67,.08), 0 0 42px rgba(46,160,67,.28);
  color: #fff;
  font: 700 24px/1 ui-monospace, monospace;
  letter-spacing: -.05em;
}
.orbit-chip {
  position: absolute;
  padding: 4px 9px;
  border: 1px solid #30363d;
  border-radius: 999px;
  background: #161b22;
  color: #c9d1d9;
  font: 600 9px/1 ui-monospace, monospace;
  letter-spacing: .12em;
}
.chip-1 { top: 18%; left: 5%; }
.chip-2 { top: 13%; right: 13%; color: #7ee787; border-color: rgba(126,231,135,.4); }
.chip-3 { bottom: 15%; left: 16%; color: #79c0ff; border-color: rgba(121,192,255,.4); }
.orbit-caption {
  position: absolute;
  right: 4%;
  bottom: 4%;
  color: #6e7681;
  font: 500 9px/1.5 ui-monospace, monospace;
  letter-spacing: .08em;
  text-align: right;
}
.home-spaces { margin: 0 0 30px; }
.space-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.space-card {
  display: flex;
  flex-direction: column;
  min-height: 155px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--fg);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.space-card:hover { border-color: #8c959f; transform: translateY(-2px); box-shadow: var(--shadow-card); }
.space-card-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--fg-muted); font-size: 11px; }
.space-card h3 { margin: 12px 0 5px; font-size: 16px; line-height: 1.35; }
.space-card p { margin: 0; color: var(--fg-muted); font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.space-card-foot { display: flex; gap: 12px; margin-top: auto; padding-top: 14px; color: var(--fg-muted); font-size: 11px; }
.space-arrow { margin-left: auto; color: var(--accent); font-weight: 700; }
.space-empty {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--canvas-subtle);
}
.space-empty strong { font-size: 14px; }
.space-empty p { margin: 4px 0 0; color: var(--fg-muted); font-size: 12px; line-height: 1.6; }

@media (max-width: 900px) {
  .campus-hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .campus-orbit { min-height: 170px; }
  .orbit-ring.ring-1 { width: 170px; height: 170px; }
  .orbit-ring.ring-2 { width: 120px; height: 120px; }
  .space-strip { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .campus-hero { margin-top: 18px; padding: 24px 18px; }
  .campus-metrics { gap: 18px; }
  .campus-metrics strong { font-size: 19px; }
  .space-empty { align-items: flex-start; flex-direction: column; }
}
