/* ============================================================
 * GitHub Store 复刻版 — 设计系统
 * 设计令牌取自原站 entry.css（明暗双主题 / 玻璃拟态 / aura / grain）
 * ============================================================ */

:root {
  --page-max: 82rem;
  --header-h: 4rem;
  --radius-sm: .375rem;
  --radius-md: .625rem;
  --radius-lg: .875rem;
  --radius-xl: 1.125rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  --blur-glass: 18px;
  --ease-smooth: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --grain-img: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='.75' numOctaves='4' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath d='M0 0h200v200H0z' filter='url(%23a)'/%3E%3C/svg%3E");
  --brand-50: 250 250 250;
  --brand-100: 244 244 245;
  --brand-200: 228 228 231;
  --brand-300: 212 212 216;
  --brand-400: 161 161 170;
  --brand-500: 113 113 122;
  --brand-600: 82 82 91;
  --brand-700: 63 63 70;
  --brand-800: 39 39 42;
  --brand-900: 24 24 27;
  --brand-950: 9 9 11;
}

[data-theme=light] {
  color-scheme: light;
  --surface: 246 247 251;
  --surface-1: 255 255 255;
  --surface-2: 255 255 255;
  --surface-3: 240 242 248;
  --surface-inv: 15 23 42;
  --content: 13 20 36;
  --content-2: 71 85 105;
  --content-3: 139 149 168;
  --content-inv: 255 255 255;
  --line: 224 228 240;
  --line-soft: 238 241 248;
  --line-strong: 200 207 224;
  --brand: 24 24 27;
  --brand-hover: 9 9 11;
  --brand-soft: 240 241 243;
  --brand-fg: 255 255 255;
  --accent: 82 82 91;
  --accent-400: 161 161 170;
  --accent-500: 113 113 122;
  --accent-600: 82 82 91;
  --vivid: 39 39 42;
  --vivid-400: 113 113 122;
  --vivid-500: 82 82 91;
  --vivid-600: 39 39 42;
  --success: 15 145 96;
  --success-soft: 224 247 236;
  --warning: 180 105 8;
  --warning-soft: 254 243 217;
  --danger: 214 45 63;
  --danger-soft: 254 232 234;
  --info: 37 99 235;
  --info-soft: 226 238 255;
  --glass-bg: 255 255 255/.72;
  --glass-line: 255 255 255/.6;
  --shadow-soft: 0 1px 2px rgba(13, 20, 36, .04);
  --shadow-card: 0 1px 2px rgba(13, 20, 36, .04), 0 8px 24px -12px rgba(13, 20, 36, .12);
  --shadow-pop: 0 4px 12px -2px rgba(13, 20, 36, .08), 0 18px 40px -18px rgba(13, 20, 36, .18);
  --shadow-float: 0 24px 64px -24px rgba(13, 20, 36, .28);
  --shadow-glow: 0 8px 30px -8px rgb(var(--brand)/.45);
  --shadow-inset: inset 0 1px 0 0 hsla(0, 0%, 100%, .7);
  --aura-1: rgb(var(--brand)/.1);
  --aura-2: rgb(var(--accent-500)/.1);
  --aura-3: rgb(var(--vivid-500)/.09);
  --grain-strength: .05;
  --scroll-thumb: 190 197 214;
  --code-bg: 246 248 250;
  --code-inline-bg: 175 184 193/.22;
}

[data-theme=dark] {
  color-scheme: dark;
  --surface: 8 9 14;
  --surface-1: 18 20 28;
  --surface-2: 25 28 38;
  --surface-3: 33 37 49;
  --surface-inv: 241 245 249;
  --content: 240 244 250;
  --content-2: 160 170 187;
  --content-3: 110 120 138;
  --content-inv: 13 20 36;
  --line: 40 45 59;
  --line-soft: 29 33 44;
  --line-strong: 58 65 84;
  --brand: 244 244 245;
  --brand-hover: 228 228 231;
  --brand-soft: 42 44 50;
  --brand-fg: 9 9 11;
  --accent: 161 161 170;
  --accent-400: 212 212 216;
  --accent-500: 161 161 170;
  --accent-600: 113 113 122;
  --vivid: 228 228 231;
  --vivid-400: 212 212 216;
  --vivid-500: 228 228 231;
  --vivid-600: 161 161 170;
  --success: 52 211 153;
  --success-soft: 6 43 33;
  --warning: 251 191 36;
  --warning-soft: 51 34 4;
  --danger: 251 113 133;
  --danger-soft: 60 12 22;
  --info: 96 165 250;
  --info-soft: 15 32 62;
  --glass-bg: 18 20 28/.66;
  --glass-line: 255 255 255/.08;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-pop: 0 4px 12px -2px rgba(0, 0, 0, .5), 0 18px 40px -18px rgba(0, 0, 0, .7);
  --shadow-float: 0 24px 64px -24px rgba(0, 0, 0, .85);
  --shadow-glow: 0 8px 30px -8px rgba(0, 0, 0, .55);
  --shadow-inset: inset 0 1px 0 0 hsla(0, 0%, 100%, .06);
  --aura-1: rgb(var(--brand)/.14);
  --aura-2: rgb(var(--accent-500)/.12);
  --aura-3: rgb(var(--vivid-500)/.12);
  --grain-strength: .07;
  --scroll-thumb: 55 62 80;
  --code-bg: 13 17 23;
  --code-inline-bg: 110 118 129/.35;
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: rgb(var(--content));
  background: rgb(var(--surface));
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.125em; flex-shrink: 0; }
.icon.filled { fill: currentColor; stroke: none; }

::selection { background: rgb(var(--brand)/.2); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgb(var(--scroll-thumb)); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--scroll-thumb-hover)); background-clip: padding-box; }

/* ---------- Aura background + grain ---------- */

.aura {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.aura::before {
  content: "";
  position: absolute;
  width: 56rem; height: 30rem;
  left: 50%; top: -14rem;
  transform: translateX(-50%);
  background:
    radial-gradient(38rem 20rem at 22% 42%, var(--aura-1), transparent 70%),
    radial-gradient(30rem 18rem at 78% 30%, var(--aura-2), transparent 70%),
    radial-gradient(26rem 16rem at 55% 68%, var(--aura-3), transparent 70%);
  filter: blur(48px);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--grain-img);
  background-size: 200px;
  opacity: var(--grain-strength);
}

/* ---------- Layout ---------- */

.container-page {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(var(--blur-glass)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(1.4);
  background: rgb(var(--glass-bg));
  border-bottom: 1px solid rgb(var(--line)/.7);
}
.header-inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand .logo-mark { width: 30px; height: 30px; }
.brand .t1 { color: rgb(var(--content)); }
.brand .t2 { color: rgb(var(--content)); }

.main-nav { display: flex; align-items: center; gap: .1rem; margin-left: .5rem; }
.main-nav a {
  padding: .38rem .7rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  color: rgb(var(--content-2));
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.main-nav a:hover { color: rgb(var(--content)); background: rgb(var(--content)/.05); }
.main-nav a.active { color: rgb(var(--brand)); font-weight: 600; background: rgb(var(--brand-soft)/.7); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 2.2rem; height: 2.2rem;
  border-radius: var(--radius-md);
  color: rgb(var(--content-2));
  font-size: 1.05rem;
  transition: background .15s, color .15s;
  position: relative;
}
.icon-btn:hover { background: rgb(var(--content)/.06); color: rgb(var(--content)); }
.icon-btn.fav-active { color: rgb(var(--danger)); }

.lang-btn, .theme-btn {
  width: auto;
  padding: 0 .6rem;
  font-size: .85rem;
}

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 11rem;
  background: rgb(var(--surface-1));
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: .35rem;
  z-index: 60;
  animation: pop .18s var(--ease-spring);
}
.dropdown-menu button, .dropdown-menu a {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .45rem .65rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: rgb(var(--content-2));
  text-align: left;
}
.dropdown-menu button:hover, .dropdown-menu a:hover { background: rgb(var(--content)/.05); color: rgb(var(--content)); }
.dropdown-menu button.active { color: rgb(var(--brand)); background: rgb(var(--brand-soft)); font-weight: 600; }

.mobile-toggle { display: none; }
.mobile-nav { display: none; }

/* ---------- Hero ---------- */

.hero {
  padding: 4.5rem 0 1.5rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)/.6);
  font-size: .8rem;
  color: rgb(var(--content-2));
  margin-bottom: 1.6rem;
  backdrop-filter: blur(8px);
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgb(var(--success));
  box-shadow: 0 0 0 3px rgb(var(--success)/.15);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.12;
}
.hero h1 .en { font-family: var(--font-mono); letter-spacing: -.04em; }
.hero .subtitle {
  max-width: 44rem;
  margin: 1.1rem auto 0;
  color: rgb(var(--content-2));
  font-size: 1.02rem;
}

.hero-search-wrap { max-width: 40rem; margin: 2rem auto 0; position: relative; }
.hero-search {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .65rem .55rem 1.1rem;
  border-radius: var(--radius-2xl);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)/.75);
  backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s, border-color .2s;
}
.hero-search:focus-within { border-color: rgb(var(--brand)/.5); box-shadow: var(--shadow-glow); }
.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: .95rem;
  color: rgb(var(--content));
}
.hero-search input::placeholder { color: rgb(var(--content-3)); }
.hero-search kbd {
  font-family: var(--font-mono);
  font-size: .68rem;
  padding: .18rem .5rem;
  border-radius: .4rem;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-3));
  color: rgb(var(--content-3));
}

/* 搜索建议 */
.suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  background: rgb(var(--surface-1));
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  z-index: 40;
  text-align: left;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .9rem;
  cursor: pointer;
}
.suggest-item:hover, .suggest-item.hl { background: rgb(var(--brand-soft)/.6); }
.suggest-item img { width: 26px; height: 26px; border-radius: 8px; }
.suggest-item .n { font-weight: 600; font-size: .9rem; }
.suggest-item .f { color: rgb(var(--content-3)); font-size: .78rem; font-family: var(--font-mono); }
.suggest-item .s { margin-left: auto; color: rgb(var(--content-3)); font-size: .8rem; display: flex; gap: .25rem; align-items: center; }
.suggest-empty { padding: .9rem; text-align: center; color: rgb(var(--content-3)); font-size: .86rem; }

.hot-tags {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.hot-tags .label { color: rgb(var(--content-3)); font-size: .82rem; display: inline-flex; align-items: center; gap: .3rem; }
.hot-tags a {
  padding: .22rem .75rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)/.6);
  font-size: .8rem;
  color: rgb(var(--content-2));
  transition: all .15s;
}
.hot-tags a:hover { color: rgb(var(--brand)); border-color: rgb(var(--brand)/.4); background: rgb(var(--brand-soft)); }

/* 统计条 */
.hero-stats {
  margin: 2.2rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 3rem;
}
.hero-stats .stat { display: flex; align-items: center; gap: .6rem; }
.hero-stats .icon { color: rgb(var(--content-2)); font-size: 1.1rem; }
.hero-stats b { color: rgb(var(--content)); font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { color: rgb(var(--content-3)); font-size: .84rem; }

/* 平台/用途行 */
.chip-rows { padding: 1.8rem 0 .6rem; }
.chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  padding: .8rem 0;
  border-top: 1px solid rgb(var(--line-soft));
}
.chip-row .row-label { color: rgb(var(--content-3)); font-size: .82rem; min-width: 2.4rem; }
.chip-row a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  color: rgb(var(--content-2));
  transition: color .15s;
}
.chip-row a:hover { color: rgb(var(--brand)); }
.chip-row a .cnt { color: rgb(var(--content-3)); font-size: .74rem; font-family: var(--font-mono); }

/* ---------- Section ---------- */

.section { padding: 1.2rem 0 2.5rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.2rem; }
.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.section-desc { color: rgb(var(--content-3)); font-size: .88rem; margin-top: .2rem; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  color: rgb(var(--brand));
  font-size: .88rem;
  font-weight: 600;
  transition: transform .15s;
}
.section-link:hover { transform: translateX(2px); }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(21.5rem, 1fr));
  gap: 1rem;
}

/* ---------- Repo Card ---------- */

.repo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1rem 1.1rem .85rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  box-shadow: var(--shadow-soft);
  transition: transform .18s var(--ease-smooth), box-shadow .18s, border-color .18s;
}
.repo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop);
  border-color: rgb(var(--line-strong));
}
.card-top { display: flex; align-items: flex-start; gap: .7rem; }
.card-avatar {
  position: relative;
  width: 42px; height: 42px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgb(var(--brand-400)), rgb(var(--vivid-500)));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}
/* 头像图片绝对定位铺满容器：加载成功时覆盖首字母，失败移除后露出字母回退 */
.card-avatar img, .avatar-lg img, .avatar-sm img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-avatar i, .avatar-lg i, .avatar-sm i { font-style: normal; }
.avatar-sm {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 9px;
  overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, rgb(var(--brand-400)), rgb(var(--vivid-500)));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .85rem;
}
.card-title { flex: 1; min-width: 0; }
.card-title .name {
  font-weight: 700;
  font-size: .98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-title .full {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: rgb(var(--content-3));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-stars { display: flex; align-items: center; gap: .28rem; color: rgb(var(--warning)); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.card-desc {
  color: rgb(var(--content-2));
  font-size: .85rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.64em;
}
.card-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .14rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.badge.version { background: rgb(var(--brand-soft)); color: rgb(var(--brand)); border: 1px solid rgb(var(--brand)/.18); }
.badge.lang { background: rgb(var(--surface-3)); color: rgb(var(--content-2)); border: 1px solid rgb(var(--line)); }
.badge.lang .dot { width: 8px; height: 8px; border-radius: 50%; background: #999; }
.badge.success { background: rgb(var(--success-soft)); color: rgb(var(--success)); }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .55rem;
  border-top: 1px solid rgb(var(--line-soft));
  color: rgb(var(--content-3));
  font-size: .76rem;
}
.plat-icons { display: flex; gap: .55rem; color: rgb(var(--content-3)); font-size: .92rem; }
.card-updated { display: inline-flex; align-items: center; gap: .3rem; }

/* fav heart on card（固定右上角，不遮挡正文与更新时间） */
.card-fav {
  position: absolute;
  top: .55rem; right: .55rem;
  color: rgb(var(--content-3));
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .18s, transform .18s, color .15s;
  background: rgb(var(--surface-1));
  border-radius: 50%;
}
.card-fav .icon { width: 15px; height: 15px; }
.repo-card:hover .card-fav { opacity: 1; transform: none; }
.card-fav:hover { color: rgb(var(--danger)); }
.card-fav.on { opacity: 1; transform: none; color: rgb(var(--danger)); }
/* 为右上角心标预留空间，避免与星标重叠 */
.card-top .card-stars { margin-right: 1.5rem; }

/* ---------- Page header（列表页通用） ---------- */

.page-head { padding: 2.2rem 0 .8rem; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: rgb(var(--content-3));
  margin-bottom: 1rem;
}
.breadcrumb a:hover { color: rgb(var(--brand)); }
.breadcrumb .icon { font-size: .95rem; }
.page-title { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.page-sub { color: rgb(var(--content-2)); margin-top: .4rem; max-width: 46rem; }
.page-meta { color: rgb(var(--content-3)); font-size: .84rem; margin-top: .5rem; display: flex; align-items: center; gap: .4rem; }

/* 探索页 */
.explore-layout {
  display: grid;
  grid-template-columns: 14.5rem 1fr;
  gap: 1.8rem;
  align-items: start;
  padding: 1.5rem 0 3rem;
}
.filter-panel { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.filter-panel h3 {
  display: flex; align-items: center; gap: .4rem;
  font-size: .92rem; font-weight: 700;
  margin-bottom: .7rem;
}
.filter-group { margin-bottom: 1.3rem; }
.filter-group .g-label { font-size: .74rem; color: rgb(var(--content-3)); font-weight: 600; margin-bottom: .35rem; }
.filter-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .38rem .6rem;
  border-radius: var(--radius-md);
  font-size: .87rem;
  color: rgb(var(--content-2));
  transition: all .13s;
  text-align: left;
}
.filter-item:hover { background: rgb(var(--content)/.05); color: rgb(var(--content)); }
.filter-item.active { background: rgb(var(--brand-soft)); color: rgb(var(--brand)); font-weight: 600; }
.filter-item .cnt { margin-left: auto; font-size: .74rem; color: rgb(var(--content-3)); font-family: var(--font-mono); }
.filter-item.active .cnt { color: rgb(var(--brand)/.7); }

.explore-main .search-row { display: flex; gap: 1rem; align-items: center; margin-bottom: .9rem; }
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .9rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  box-shadow: var(--shadow-soft);
}
.search-box input { flex: 1; border: none; outline: none; background: transparent; font-size: .9rem; color: rgb(var(--content)); }
.search-box input::placeholder { color: rgb(var(--content-3)); }
.search-box .cnt { font-size: .82rem; color: rgb(var(--content-3)); white-space: nowrap; }
.search-box .cnt b { color: rgb(var(--brand)); font-family: var(--font-mono); }

.sort-tabs {
  display: inline-flex;
  gap: .15rem;
  padding: .25rem;
  border-radius: var(--radius-lg);
  background: rgb(var(--surface-3)/.7);
  border: 1px solid rgb(var(--line-soft));
  margin-bottom: 1.1rem;
}
.sort-tabs button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .8rem;
  border-radius: var(--radius-md);
  font-size: .82rem;
  color: rgb(var(--content-2));
  transition: all .15s;
}
.sort-tabs button:hover { color: rgb(var(--content)); }
.sort-tabs button.active {
  background: rgb(var(--surface-1));
  color: rgb(var(--brand));
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.empty-state { text-align: center; padding: 4rem 1rem; color: rgb(var(--content-3)); }
.empty-state .icon { font-size: 2.2rem; margin-bottom: .8rem; }
.empty-state p { margin-bottom: 1rem; }

/* 平台/分类页 */
.big-icon {
  width: 4rem; height: 4rem;
  border-radius: var(--radius-2xl);
  background: rgb(var(--brand-soft));
  color: rgb(var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.plat-hero { display: flex; align-items: center; gap: 1.1rem; }
.plat-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.plat-chips a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .85rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  font-size: .82rem;
  color: rgb(var(--content-2));
  transition: all .15s;
}
.plat-chips a:hover { color: rgb(var(--brand)); border-color: rgb(var(--brand)/.4); }
.plat-chips a.active { background: rgb(var(--brand)); color: rgb(var(--brand-fg)); border-color: rgb(var(--brand)); }

details.install-tips {
  margin-top: 1.1rem;
  font-size: .84rem;
  color: rgb(var(--content-2));
}
details.install-tips summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgb(var(--content-3));
  list-style: none;
}
details.install-tips summary::-webkit-details-marker { display: none; }
details.install-tips ul { margin: .5rem 0 0; padding-left: 1.2rem; }

/* 语言页 / 标签页 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem 0 3rem; }
.tag-cloud a {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  font-size: .9rem;
  color: rgb(var(--content-2));
  transition: all .15s;
}
.tag-cloud a:hover { border-color: rgb(var(--brand)/.5); color: rgb(var(--brand)); background: rgb(var(--brand-soft)); }
.tag-cloud .cnt { font-family: var(--font-mono); font-size: .74rem; color: rgb(var(--content-3)); }

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: .8rem;
  padding: 1.2rem 0 3rem;
}
.lang-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  transition: all .15s;
}
.lang-card:hover { border-color: rgb(var(--brand)/.4); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.lang-card .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.lang-card b { font-size: .95rem; }
.lang-card .cnt { margin-left: auto; color: rgb(var(--content-3)); font-family: var(--font-mono); font-size: .8rem; }

/* ---------- Repo 详情 ---------- */

.repo-hero { padding: 1.8rem 0 0; }
.repo-hero .head-row { display: flex; align-items: flex-start; gap: 1rem; }
.repo-hero .avatar-lg {
  position: relative;
  width: 4.2rem; height: 4.2rem;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: linear-gradient(135deg, rgb(var(--brand-400)), rgb(var(--vivid-500)));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}
.repo-hero .avatar-lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.repo-hero h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.repo-hero .meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .35rem; color: rgb(var(--content-2)); font-size: .86rem; }
.repo-hero .meta a, .repo-hero .meta span { display: inline-flex; align-items: center; gap: .35rem; }
.repo-hero .meta a:hover { color: rgb(var(--brand)); }
.repo-hero .meta .lic { background: rgb(var(--surface-3)); padding: .06rem .55rem; border-radius: 999px; font-size: .76rem; border: 1px solid rgb(var(--line)); }
.repo-desc { color: rgb(var(--content-2)); margin-top: .9rem; max-width: 52rem; }
.repo-actions { margin-left: auto; display: flex; gap: .5rem; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  font-size: .85rem;
  font-weight: 600;
  color: rgb(var(--content-2));
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: rgb(var(--line-strong)); color: rgb(var(--content)); box-shadow: var(--shadow-soft); }
.btn.primary {
  background: linear-gradient(120deg, rgb(var(--brand)), rgb(var(--vivid)));
  color: rgb(var(--brand-fg));
  border: none;
  box-shadow: var(--shadow-glow);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.fav-on { color: rgb(var(--danger)); border-color: rgb(var(--danger)/.4); background: rgb(var(--danger-soft)); }
.btn.sm { padding: .3rem .7rem; font-size: .78rem; }

.repo-stats-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 2rem;
  margin-top: 1.3rem;
  padding: .8rem 1.2rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)/.7);
  backdrop-filter: blur(10px);
  font-size: .88rem;
  color: rgb(var(--content-2));
}
.repo-stats-bar .item { display: flex; align-items: center; gap: .45rem; }
.repo-stats-bar .icon { color: rgb(var(--content-3)); }
.repo-stats-bar b { color: rgb(var(--content)); font-family: var(--font-mono); font-weight: 700; }
.repo-stats-bar .vpill {
  background: rgb(var(--brand-soft));
  color: rgb(var(--brand));
  font-family: var(--font-mono);
  font-weight: 700;
  padding: .1rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
}

.repo-tabs {
  display: flex;
  gap: .2rem;
  margin-top: 1.8rem;
  border-bottom: 1px solid rgb(var(--line));
  overflow-x: auto;
}
.repo-tabs button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: rgb(var(--content-3));
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .15s;
}
.repo-tabs button:hover { color: rgb(var(--content)); }
.repo-tabs button.active { color: rgb(var(--brand)); border-bottom-color: rgb(var(--brand)); }

.repo-layout {
  display: grid;
  grid-template-columns: 1fr 19rem;
  gap: 1.6rem;
  align-items: start;
  padding: 1.5rem 0 3.5rem;
}

.version-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.version-head .vname { font-weight: 800; font-size: 1.05rem; }
.version-head .vdate { color: rgb(var(--content-3)); font-size: .84rem; }
.mirror-select {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--brand)/.3);
  background: rgb(var(--brand-soft)/.5);
  color: rgb(var(--brand));
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}

.plat-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; }
.plat-tabs button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  font-size: .85rem;
  font-weight: 600;
  color: rgb(var(--content-2));
  transition: all .15s;
}
.plat-tabs button:hover { border-color: rgb(var(--brand)/.4); color: rgb(var(--brand)); }
.plat-tabs button.active { background: rgb(var(--brand)); border-color: rgb(var(--brand)); color: rgb(var(--brand-fg)); }
.plat-tabs button .cnt { font-size: .72rem; opacity: .75; font-family: var(--font-mono); }

.mirror-tip {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: rgb(var(--accent-600));
  font-size: .8rem;
  margin-bottom: .8rem;
}
[data-theme=dark] .mirror-tip { color: rgb(var(--accent)); }

.asset-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  margin-bottom: .55rem;
  transition: border-color .15s, box-shadow .15s;
}
.asset-row:hover { border-color: rgb(var(--brand)/.35); box-shadow: var(--shadow-soft); }
.asset-info { flex: 1; min-width: 0; }
.asset-name {
  font-family: var(--font-mono);
  font-size: .84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.reco-badge {
  font-size: .68rem;
  font-family: inherit;
  background: rgb(var(--success-soft));
  color: rgb(var(--success));
  border: 1px solid rgb(var(--success)/.25);
  padding: .02rem .5rem;
  border-radius: 999px;
  font-weight: 700;
}
.asset-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .25rem; font-size: .74rem; color: rgb(var(--content-3)); }
.asset-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.asset-meta .ext, .asset-meta .arch {
  font-family: var(--font-mono);
  background: rgb(var(--surface-3));
  border: 1px solid rgb(var(--line));
  padding: .01rem .45rem;
  border-radius: .35rem;
}
.asset-actions { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.asset-actions .icon-btn { width: 2rem; height: 2rem; font-size: .92rem; }
.asset-actions .dl {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, rgb(var(--brand)), rgb(var(--vivid)));
  color: rgb(var(--brand-fg));
  font-size: .8rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: filter .15s;
}
.asset-actions .dl:hover { filter: brightness(1.1); }

/* readme */
.readme { font-size: .92rem; line-height: 1.75; }
.readme h1, .readme h2, .readme h3 { margin: 1.4em 0 .5em; letter-spacing: -.01em; }
.readme h1 { font-size: 1.35rem; } .readme h2 { font-size: 1.15rem; } .readme h3 { font-size: 1rem; }
.readme h1:first-child, .readme h2:first-child { margin-top: 0; }
.readme p { margin: .6em 0; color: rgb(var(--content-2)); }
.readme ul { padding-left: 1.3rem; margin: .5em 0; color: rgb(var(--content-2)); }
.readme li { margin: .25em 0; }
.readme pre {
  background: rgb(var(--code-bg));
  border: 1px solid rgb(var(--line-soft));
  border-radius: var(--radius-lg);
  padding: .9rem 1.1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.7;
  margin: .8em 0;
}
.readme code { font-family: var(--font-mono); font-size: .84em; background: rgb(var(--code-inline-bg)); padding: .12em .4em; border-radius: .35rem; }
.readme pre code { background: none; padding: 0; }
.readme.clamped { max-height: 26rem; overflow: hidden; position: relative; }
.readme .expand-more {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3rem 0 .5rem;
  text-align: center;
  background: linear-gradient(transparent, rgb(var(--surface-1)));
}
.readme .expand-more button { color: rgb(var(--brand)); font-weight: 600; font-size: .86rem; }

/* 相关项目 */
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }

/* 历史版本 */
.hist-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgb(var(--line-soft));
  margin-bottom: .45rem;
  font-size: .87rem;
  cursor: pointer;
  transition: all .15s;
  background: rgb(var(--surface-1));
}
.hist-row:hover { border-color: rgb(var(--brand)/.35); }
.hist-row .v { font-family: var(--font-mono); font-weight: 700; color: rgb(var(--brand)); min-width: 11rem; }
.hist-row .d { color: rgb(var(--content-3)); font-size: .8rem; min-width: 7rem; }
.hist-row .c { margin-left: auto; color: rgb(var(--content-3)); font-size: .78rem; display: flex; align-items: center; gap: .35rem; }
.hist-row .chev { color: rgb(var(--content-3)); transition: transform .2s; }
.hist-row.open .chev { transform: rotate(90deg); }
.hist-assets { padding: .2rem 0 .6rem; }
.hist-assets .asset-row { background: rgb(var(--surface-3)/.4); }

/* 详情侧栏 */
.side-card {
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-xl);
  background: rgb(var(--surface-1));
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
}
.side-card h3 {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: .8rem;
}
.side-card h3 .icon { color: rgb(var(--brand)); }
.maint-status { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; }
.maint-status .dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--success)); box-shadow: 0 0 0 3px rgb(var(--success)/.15); }
.maint-status.stale .dot { background: rgb(var(--warning)); box-shadow: 0 0 0 3px rgb(var(--warning)/.15); }
.maint-sub { color: rgb(var(--content-3)); font-size: .78rem; margin-top: .3rem; }

.lic-box {
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-3)/.5);
  border-radius: var(--radius-lg);
  padding: .7rem .9rem;
  margin-bottom: .8rem;
}
.lic-box .name { font-weight: 800; font-size: 1.05rem; }
.lic-box .type { color: rgb(var(--content-3)); font-size: .78rem; margin-top: .1rem; }
.lic-box .link { margin-left: auto; color: rgb(var(--content-3)); }
.lic-group { margin-bottom: .6rem; }
.lic-group .g { font-size: .74rem; color: rgb(var(--content-3)); margin-bottom: .3rem; }
.lic-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.lic-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .74rem;
  padding: .14rem .6rem;
  border-radius: 999px;
  background: rgb(var(--success-soft));
  color: rgb(var(--success));
  font-weight: 600;
}
.lic-chip.req { background: rgb(var(--info-soft)); color: rgb(var(--info)); }
.lic-chip.lim { background: rgb(var(--surface-3)); color: rgb(var(--content-2)); border: 1px solid rgb(var(--line)); }
.lic-note { color: rgb(var(--content-3)); font-size: .78rem; line-height: 1.6; }

.lang-bar {
  display: flex;
  height: .55rem;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: .8rem;
}
.lang-bar i { display: block; height: 100%; }
.lang-list .row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  padding: .18rem 0;
  color: rgb(var(--content-2));
}
.lang-list .dot { width: 9px; height: 9px; border-radius: 50%; }
.lang-list .pct { margin-left: auto; font-family: var(--font-mono); font-size: .76rem; color: rgb(var(--content-3)); }

/* ---------- 表单页（提交/设置） ---------- */

.form-card {
  max-width: 40rem;
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-2xl);
  background: rgb(var(--surface-1));
  box-shadow: var(--shadow-card);
  padding: 2rem;
}
.form-card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: .3rem; }
.form-card .hint { color: rgb(var(--content-3)); font-size: .85rem; margin-bottom: 1.4rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .6rem .9rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-2));
  outline: none;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgb(var(--brand)/.55);
  box-shadow: 0 0 0 3px rgb(var(--brand)/.12);
}
.rules { margin: 1rem 0 1.4rem; padding-left: 1.2rem; color: rgb(var(--content-2)); font-size: .86rem; }
.rules li { margin: .35rem 0; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgb(var(--line-soft));
}
.setting-row:last-child { border-bottom: none; }
.setting-row .info b { display: block; font-size: .92rem; }
.setting-row .info span { color: rgb(var(--content-3)); font-size: .8rem; }
.seg {
  display: inline-flex;
  gap: .2rem;
  padding: .22rem;
  background: rgb(var(--surface-3));
  border-radius: var(--radius-md);
  border: 1px solid rgb(var(--line-soft));
}
.seg button {
  padding: .3rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: rgb(var(--content-2));
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.seg button.active { background: rgb(var(--surface-1)); color: rgb(var(--brand)); font-weight: 600; box-shadow: var(--shadow-soft); }
.danger-zone button { color: rgb(var(--danger)); }
.danger-zone button:hover { background: rgb(var(--danger-soft)); color: rgb(var(--danger)); }

/* ---------- 镜像源页 ---------- */

.mirror-list { max-width: 44rem; padding: 1rem 0 3rem; }
.mirror-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1));
  margin-bottom: .7rem;
  cursor: pointer;
  transition: all .15s;
}
.mirror-item:hover { border-color: rgb(var(--brand)/.4); }
.mirror-item.active { border-color: rgb(var(--brand)); box-shadow: 0 0 0 3px rgb(var(--brand)/.12); }
.mirror-item .radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgb(var(--line-strong));
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mirror-item.active .radio { border-color: rgb(var(--brand)); }
.mirror-item.active .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--brand)); }
.mirror-item b { font-size: .95rem; }
.mirror-item .desc { color: rgb(var(--content-3)); font-size: .8rem; margin-top: .1rem; }
.mirror-item .latency {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: rgb(var(--success));
  background: rgb(var(--success-soft));
  padding: .15rem .6rem;
  border-radius: 999px;
}

/* ---------- 下架页 ---------- */

.table-wrap {
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-xl);
  background: rgb(var(--surface-1));
  overflow: hidden;
  max-width: 52rem;
  margin-bottom: 3rem;
}
table.data { width: 100%; border-collapse: collapse; font-size: .87rem; }
table.data th, table.data td { text-align: left; padding: .75rem 1.1rem; border-bottom: 1px solid rgb(var(--line-soft)); }
table.data th { color: rgb(var(--content-3)); font-weight: 600; font-size: .78rem; background: rgb(var(--surface-3)/.5); }
table.data tr:last-child td { border-bottom: none; }
table.data .mono { font-family: var(--font-mono); font-size: .8rem; }
.reason-pill { font-size: .76rem; background: rgb(var(--danger-soft)); color: rgb(var(--danger)); padding: .1rem .6rem; border-radius: 999px; }

/* ---------- About ---------- */

.about-wrap { max-width: 46rem; padding: 1rem 0 3rem; }
.about-wrap h2 { font-size: 1.25rem; font-weight: 800; margin: 2rem 0 .7rem; display: flex; align-items: center; gap: .5rem; }
.about-wrap h2 .icon { color: rgb(var(--brand)); }
.about-wrap h2:first-child { margin-top: 0; }
.about-wrap p, .about-wrap li { color: rgb(var(--content-2)); font-size: .92rem; line-height: 1.75; }
.about-wrap ul { padding-left: 1.2rem; }
.about-wrap .qa { margin-bottom: 1.2rem; }
.about-wrap .qa b { display: block; font-size: .95rem; margin-bottom: .3rem; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1rem 0; }
.feature-item {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .9rem 1rem;
  border: 1px solid rgb(var(--line));
  border-radius: var(--radius-lg);
  background: rgb(var(--surface-1));
}
.feature-item .icon { color: rgb(var(--brand)); font-size: 1.1rem; margin-top: .15rem; }
.feature-item b { font-size: .88rem; display: block; }
.feature-item span { color: rgb(var(--content-3)); font-size: .78rem; }
.flow {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin: 1rem 0; font-size: .82rem;
}
.flow .step {
  padding: .4rem .9rem;
  background: rgb(var(--brand-soft));
  color: rgb(var(--brand));
  border-radius: 999px;
  font-weight: 600;
}
.flow .icon { color: rgb(var(--content-3)); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgb(var(--surface-inv));
  color: rgb(var(--content-inv));
  padding: .6rem 1.3rem;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all .25s var(--ease-spring);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .icon { color: rgb(var(--success)); }
[data-theme=dark] .toast .icon { color: rgb(var(--success)); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)/.6);
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0 1.5rem;
}
.footer-grid h4 { font-size: .82rem; font-weight: 700; color: rgb(var(--content-3)); margin-bottom: .7rem; }
.footer-grid .desc { color: rgb(var(--content-2)); font-size: .85rem; max-width: 26rem; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.footer-grid ul a { color: rgb(var(--content-2)); font-size: .85rem; transition: color .15s; }
.footer-grid ul a:hover { color: rgb(var(--brand)); }
.footer-bottom {
  border-top: 1px solid rgb(var(--line-soft));
  padding: 1.1rem 0 1.4rem;
  text-align: center;
  color: rgb(var(--content-3));
  font-size: .78rem;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .repo-layout { grid-template-columns: 1fr; }
  .repo-side { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .explore-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .mobile-toggle { display: inline-flex; }
  .mobile-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: rgb(var(--surface-1));
    border-bottom: 1px solid rgb(var(--line));
    box-shadow: var(--shadow-pop);
    padding: .6rem 1rem 1rem;
    z-index: 49;
  }
  .mobile-nav a { padding: .6rem .8rem; border-radius: var(--radius-md); font-weight: 600; }
  .mobile-nav a.active { color: rgb(var(--brand)); background: rgb(var(--brand-soft)); }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .repo-actions { flex-wrap: wrap; }
  .related-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .filter-panel { grid-template-columns: 1fr; }
  .repo-side { grid-template-columns: 1fr; }
  .hero-stats { gap: .8rem 1.8rem; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.fade-in { animation: fadeUp .3s var(--ease-smooth); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   V2 增强样式：详情页 / 语言 / 标签 / 提交 / 设置 / 关于
   ============================================================ */

/* ---------- 通用：统计 pills ---------- */
.stat-pills { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.stat-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line));
  border-radius: 999px; padding: .38rem .9rem; font-size: .84rem;
  color: rgb(var(--content-2)); box-shadow: var(--shadow-soft);
}
.stat-pill .icon { color: rgb(var(--brand)); font-size: .95rem; }
.stat-pill b { color: rgb(var(--content)); font-weight: 700; font-family: var(--font-mono); }

/* ---------- 开发语言页 ---------- */
.lang-toolbar { display: flex; align-items: center; gap: 1rem; margin: .6rem 0 1rem; }
.lang-toolbar .search-box { flex: 1; max-width: 26rem; }
.sort-select-wrap { margin-left: auto; display: flex; align-items: center; gap: .5rem; color: rgb(var(--content-3)); font-size: .8rem; }
.sort-select-wrap select {
  padding: .42rem .8rem; border-radius: var(--radius-md); border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)); color: rgb(var(--content)); font-size: .84rem; cursor: pointer;
}
.palette-wrap {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  padding: 1rem 1.2rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-soft);
}
.palette-label { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; color: rgb(var(--content-2)); margin-bottom: .6rem; }
.palette-label .hint { color: rgb(var(--content-3)); font-weight: 400; }
.palette-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.palette-bar i { display: block; height: 100%; min-width: 6px; transform-origin: left center; animation: barIn .65s var(--ease-smooth) backwards; }
@keyframes barIn { from { transform: scaleX(0); opacity: .4; } }
.palette-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .7rem; font-size: .76rem; color: rgb(var(--content-2)); }
.palette-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.palette-legend .dot { width: 9px; height: 9px; border-radius: 50%; }

.lang-grid-v2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; padding: 0 0 3rem; }
.lang-card-v2 {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  padding: .95rem 1rem; box-shadow: var(--shadow-soft); transition: transform .18s var(--ease-smooth), border-color .18s, box-shadow .18s;
}
.lang-card-v2:hover { transform: translateY(-2px); border-color: rgb(var(--brand)/.4); box-shadow: var(--shadow-pop); }
.lc-head { display: flex; align-items: center; gap: .5rem; }
.lc-title { display: inline-flex; align-items: center; gap: .5rem; color: rgb(var(--content)); min-width: 0; }
.lc-title b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-title:hover { color: rgb(var(--brand)); }
.lc-head .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.lc-head .pct {
  margin-left: auto; font-size: .72rem; font-family: var(--font-mono); font-weight: 700;
  color: rgb(var(--brand)); background: rgb(var(--brand-soft)); padding: .1rem .5rem; border-radius: 999px;
}
.lc-stats { display: flex; gap: 1rem; margin: .55rem 0 .6rem; font-size: .78rem; color: rgb(var(--content-3)); }
.lc-stats span { display: inline-flex; align-items: center; gap: .3rem; }
.lc-stats .icon { font-size: .85rem; }
.lc-stats .star { color: rgb(var(--warning)); }
.lc-top { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; border-top: 1px dashed rgb(var(--line)); padding-top: .55rem; }
.lc-top .lb { font-size: .72rem; color: rgb(var(--content-3)); margin-right: .15rem; }
.lc-top a {
  font-size: .74rem; font-family: var(--font-mono); color: rgb(var(--content-2));
  background: rgb(var(--surface-3)); border: 1px solid rgb(var(--line)); border-radius: 999px; padding: .12rem .55rem;
  transition: color .15s, border-color .15s;
}
.lc-top a:hover { color: rgb(var(--brand)); border-color: rgb(var(--brand)/.4); }

/* ---------- 标签云页 ---------- */
.tag-toolbar { text-align: center; margin: .8rem 0 .4rem; }
.tag-toolbar .tag-search { max-width: 24rem; margin: 0 auto; }
.tag-hint { color: rgb(var(--content-3)); font-size: .78rem; margin-top: .55rem; }
.cloud {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .55rem 1.35rem;
  padding: 2rem 0 3.5rem; max-width: 64rem; margin: 0 auto;
}
.cloud-tag {
  font-weight: 700; letter-spacing: -.01em; line-height: 1.3; position: relative;
  color: var(--tagc, rgb(var(--content)));
  background: color-mix(in srgb, var(--tagc, rgb(var(--content))) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--tagc, rgb(var(--content))) 22%, transparent);
  border-radius: 999px; padding: .26rem .85rem;
  opacity: 0; animation: cloudIn .4s var(--ease-smooth) forwards;
  transition: transform .15s, background .15s, box-shadow .15s;
}
@keyframes cloudIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cloud-tag:hover {
  transform: scale(1.08);
  background: color-mix(in srgb, var(--tagc, rgb(var(--content))) 17%, transparent);
  box-shadow: 0 3px 14px color-mix(in srgb, var(--tagc, rgb(var(--content))) 24%, transparent);
}
.cloud-tag sup { font-size: .6em; font-weight: 600; opacity: .75; margin-left: .15rem; font-family: var(--font-mono); }

/* ---------- 提交仓库页 ---------- */
.submit-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.4rem; align-items: start; padding: .8rem 0 3rem; }
.step-card {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  padding: 1.3rem 1.6rem 1.5rem; box-shadow: var(--shadow-soft); margin-bottom: 1.1rem;
}
.step-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; }
.step-head.next { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px dashed rgb(var(--line)); }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, rgb(var(--brand)), rgb(var(--brand2, var(--brand))));
  color: rgb(var(--brand-fg)); font-weight: 800; font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgb(var(--brand)/.35);
}
.step-head b { font-size: 1rem; }
.input-ico-wrap { position: relative; display: flex; align-items: center; }
.input-ico-wrap .icon { position: absolute; left: .8rem; color: rgb(var(--content-3)); pointer-events: none; }
.input-ico-wrap input {
  width: 100%; padding: .68rem .9rem .68rem 2.4rem; border-radius: var(--radius-md);
  border: 1px solid rgb(var(--line)); background: rgb(var(--surface-2)); color: rgb(var(--content));
  font-size: .9rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input-ico-wrap input:focus { border-color: rgb(var(--brand)/.5); box-shadow: 0 0 0 3px rgb(var(--brand)/.12); }
.cat-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.cat-chips button {
  padding: .38rem .95rem; border-radius: 999px; border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-2)); color: rgb(var(--content-2)); font-size: .82rem; cursor: pointer; transition: all .15s;
}
.cat-chips button:hover { border-color: rgb(var(--brand)/.4); color: rgb(var(--brand)); }
.cat-chips button.active { background: rgb(var(--brand-soft)); border-color: rgb(var(--brand)/.5); color: rgb(var(--brand)); font-weight: 600; }
.captcha-row { display: flex; align-items: center; gap: .7rem; }
.captcha-row canvas { border-radius: var(--radius-md); border: 1px solid rgb(var(--line)); }
.captcha-row input {
  flex: 1; padding: .6rem .9rem; border-radius: var(--radius-md); border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-2)); color: rgb(var(--content)); font-size: .9rem; outline: none;
}
.captcha-row input:focus { border-color: rgb(var(--brand)/.5); box-shadow: 0 0 0 3px rgb(var(--brand)/.12); }
.btn-gradient {
  width: 100%; margin-top: .4rem; padding: .78rem 1rem; border: none; border-radius: var(--radius-md);
  background: rgb(var(--brand));
  color: rgb(var(--brand-fg)); font-weight: 700; font-size: .95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  box-shadow: 0 6px 20px rgb(var(--brand)/.18); transition: filter .15s;
}
.btn-gradient:hover { background-position: 100% 0; filter: brightness(1.06); }
.step-card.result { border-color: rgb(var(--success)/.4); }
.result-head { display: flex; align-items: center; gap: .5rem; color: rgb(var(--success)); font-weight: 700; margin-bottom: 1rem; }
.result-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; }
.result-row .rn { font-weight: 800; font-size: 1.05rem; }
.result-row .rf { color: rgb(var(--content-3)); font-size: .82rem; font-family: var(--font-mono); }
.result-row .badge { margin-left: auto; }
.result-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: rgb(var(--content-2)); font-size: .82rem; padding: .6rem 0; border-top: 1px dashed rgb(var(--line)); }
.result-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.result-note { color: rgb(var(--content-3)); font-size: .82rem; line-height: 1.6; margin: .6rem 0 1rem; }
.submit-side .stepper { display: flex; flex-direction: column; }
.stepper-item { display: flex; align-items: flex-start; gap: .7rem; position: relative; padding-bottom: 1.15rem; }
.stepper-item:last-child { padding-bottom: 0; }
.stepper-item:not(:last-child) .st-line { content: ""; position: absolute; left: 13px; top: 26px; bottom: 2px; width: 2px; background: rgb(var(--line)); }
.stepper-item.done:not(:last-child) .st-line { background: rgb(var(--brand)/.45); }
.st-num {
  width: 27px; height: 27px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  border: 2px solid rgb(var(--line)); background: rgb(var(--surface-1)); color: rgb(var(--content-3));
  font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.stepper-item.done .st-num { background: rgb(var(--brand)); border-color: rgb(var(--brand)); color: rgb(var(--brand-fg)); }
.st-label { font-size: .86rem; color: rgb(var(--content-2)); padding-top: .3rem; }
.stepper-item.done .st-label { color: rgb(var(--content)); font-weight: 600; }
.side-note {
  background: rgb(var(--surface-2)); border: 1px dashed rgb(var(--line-strong, var(--line))); border-radius: var(--radius-lg);
  padding: .9rem 1.1rem; color: rgb(var(--content-2)); font-size: .82rem; line-height: 1.6; margin: 1rem 0;
}
.side-note p { margin: 0; }
.mini-rules { margin: 0; padding-left: 1.1rem; color: rgb(var(--content-2)); font-size: .82rem; line-height: 1.7; }
.mini-rules li { margin: .3rem 0; }

/* ---------- 设置页 ---------- */
.settings-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.4rem; align-items: start; padding: .8rem 0 3rem; }
.mirror-card {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); margin-bottom: 1.1rem; overflow: hidden;
}
.mc-head { display: flex; align-items: center; gap: .8rem; padding: 1.05rem 1.4rem; border-bottom: 1px solid rgb(var(--line)); }
.mc-ico {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: rgb(var(--brand-soft)); color: rgb(var(--brand));
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.mc-ico.alt { background: rgb(var(--info-soft)); color: rgb(var(--info)); }
.mc-ico.alt2 { background: rgb(var(--success-soft)); color: rgb(var(--success)); }
.mc-head > div { flex: 1; min-width: 0; }
.mc-head b { font-size: .95rem; display: block; }
.mc-head .mc-sub { color: rgb(var(--content-3)); font-size: .78rem; }
.mc-head .badge.lang { margin: 0 .4rem; }
.mc-body { padding: .7rem 1rem; }
.mc-body.plain { padding: 0 1.4rem; }
.mirror-row-v2 {
  display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
}
.mirror-row-v2:hover { background: rgb(var(--content)/.03); }
.mirror-row-v2.active { background: rgb(var(--brand-soft)/.55); border-color: rgb(var(--brand)/.35); }
.mirror-row-v2 .radio {
  width: 17px; height: 17px; border-radius: 50%; border: 2px solid rgb(var(--line-strong, var(--line)));
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: border-color .15s;
}
.mirror-row-v2.active .radio { border-color: rgb(var(--brand)); }
.mirror-row-v2.active .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--brand)); }
.m-ico { color: rgb(var(--content-3)); font-size: 1rem; display: flex; }
.mirror-row-v2.active .m-ico { color: rgb(var(--brand)); }
.m-info { flex: 1; min-width: 0; }
.m-info b { font-size: .9rem; display: block; }
.m-info .mono { color: rgb(var(--content-3)); font-size: .76rem; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mirror-row-v2 .latency { font-size: .76rem; color: rgb(var(--content-3)); font-family: var(--font-mono); }
.add-mirror-form { padding: .4rem .9rem .8rem; }
.am-row { display: flex; gap: .6rem; }
.am-row input {
  flex: 1; min-width: 0; padding: .55rem .8rem; border-radius: var(--radius-md);
  border: 1px solid rgb(var(--line)); background: rgb(var(--surface-2)); color: rgb(var(--content)); font-size: .84rem; outline: none;
}
.am-row input:focus { border-color: rgb(var(--brand)/.5); }
.custom-empty {
  text-align: center; padding: 2.4rem 1rem; border: 1.5px dashed rgb(var(--line-strong, var(--line)));
  border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; gap: .45rem;
}
.ce-ico {
  width: 46px; height: 46px; border-radius: 14px; background: rgb(var(--surface-3));
  color: rgb(var(--content-3)); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: .3rem;
}
.custom-empty b { font-size: .92rem; color: rgb(var(--content)); }
.custom-empty > span:not(.ce-ico) { font-size: .8rem; color: rgb(var(--content-3)); }
.custom-empty .btn { margin-top: .6rem; }
.side-hint { color: rgb(var(--content-3)); font-size: .8rem; line-height: 1.65; margin: .3rem 0 .9rem; }
.side-cta {
  width: 100%; justify-content: center; display: flex; align-items: center; gap: .5rem;
  margin-top: 1rem; padding: .65rem 1rem; border-radius: var(--radius-md);
}
.settings-side .side-card { margin-bottom: 0; }

/* ---------- 关于页 ---------- */
.about-layout { display: grid; grid-template-columns: 1fr 240px; gap: 1.6rem; align-items: start; padding: .8rem 0 3rem; }
.about-sec { scroll-margin-top: calc(var(--header-h, 64px) + 1.2rem); margin-bottom: 2.6rem; }
.about-sec h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .9rem; padding-left: .8rem; border-left: 3px solid rgb(var(--brand)); }
.about-sec p { color: rgb(var(--content-2)); font-size: .92rem; line-height: 1.8; margin: .5rem 0; }
.about-sec .lead { color: rgb(var(--content)); font-weight: 600; font-size: .96rem; }
.about-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.about-feat {
  display: flex; gap: .8rem; background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line));
  border-radius: var(--radius-lg); padding: 1rem 1.1rem; box-shadow: var(--shadow-soft);
  transition: transform .18s var(--ease-smooth), border-color .18s;
}
.about-feat:hover { transform: translateY(-2px); border-color: rgb(var(--brand)/.35); }
.feat-ico { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.feat-ico.brand { background: rgb(var(--brand-soft)); color: rgb(var(--brand)); }
.feat-ico.info { background: rgb(var(--info-soft)); color: rgb(var(--info)); }
.feat-ico.success { background: rgb(var(--success-soft)); color: rgb(var(--success)); }
.feat-ico.warn { background: rgb(var(--warning-soft)); color: rgb(var(--warning)); }
.about-feat b { font-size: .9rem; display: block; margin-bottom: .2rem; }
.about-feat div span { color: rgb(var(--content-3)); font-size: .8rem; line-height: 1.6; display: block; }
.timeline { position: relative; padding-left: 6px; }
.tl-item { display: flex; gap: 1rem; position: relative; padding-bottom: 1.4rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: linear-gradient(rgb(var(--brand)/.4), rgb(var(--line))); }
.tl-item:last-child::before { display: none; }
.tl-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  background: linear-gradient(135deg, rgb(var(--brand)), rgb(var(--brand2, var(--brand)))); color: rgb(var(--brand-fg));
  font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgb(var(--brand)/.3);
}
.tl-body b { font-size: .95rem; display: flex; align-items: center; gap: .35rem; }
.tl-body b .icon { color: rgb(var(--content-3)); }
.tl-body span { color: rgb(var(--content-2)); font-size: .84rem; line-height: 1.65; display: block; margin-top: .25rem; max-width: 40rem; }
.faq-list { display: flex; flex-direction: column; gap: .6rem; }
.faq-item { background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.2rem; background: none; border: none; cursor: pointer;
  color: rgb(var(--content)); font-size: .92rem; font-weight: 600; text-align: left;
}
.faq-q .chev { color: rgb(var(--content-3)); transition: transform .25s var(--ease-smooth); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease-smooth); }
.faq-item.open .faq-a { max-height: 16rem; }
.faq-a p { margin: 0; padding: 0 1.2rem 1.1rem; color: rgb(var(--content-2)); font-size: .86rem; line-height: 1.7; }
.contrib-card {
  display: flex; align-items: center; gap: .9rem; background: rgb(var(--surface-1));
  border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-soft);
}
.contrib-card > div { flex: 1; }
.contrib-card b { font-size: .92rem; display: block; }
.contrib-card div span { color: rgb(var(--content-3)); font-size: .82rem; line-height: 1.6; }
.disclaimer {
  margin-top: 1.1rem; background: rgb(var(--warning-soft)/.5); border: 1px solid rgb(var(--warning)/.3);
  border-radius: var(--radius-lg); padding: 1rem 1.2rem;
}
.disclaimer b { display: flex; align-items: center; gap: .45rem; color: rgb(var(--warning)); font-size: .86rem; margin-bottom: .4rem; }
.disclaimer p { margin: 0; color: rgb(var(--content-2)); font-size: .8rem; line-height: 1.7; }
.about-side { position: sticky; top: calc(var(--header-h, 64px) + 1.5rem); }
.toc { display: flex; flex-direction: column; gap: .15rem; }
.toc button {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: var(--radius-md);
  border: none; background: none; color: rgb(var(--content-2)); font-size: .86rem; cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.toc button:hover { background: rgb(var(--content)/.04); color: rgb(var(--content)); }
.toc button.active { background: rgb(var(--brand-soft)); color: rgb(var(--brand)); font-weight: 600; }
.toc button .icon { color: rgb(var(--content-3)); }
.toc button.active .icon { color: rgb(var(--brand)); }

/* ---------- 仓库详情页 V2 ---------- */
.repo-hero-card {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-xl, 20px);
  padding: 1.5rem 1.7rem; box-shadow: var(--shadow-soft); margin-top: .8rem;
}
.hr-title { flex: 1; min-width: 0; }
.owner-badge {
  display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-mono); font-size: .8rem;
  background: rgb(var(--surface-3)); border: 1px solid rgb(var(--line)); border-radius: 999px; padding: .14rem .65rem;
  color: rgb(var(--content-2)); transition: color .15s, border-color .15s;
}
.owner-badge:hover { color: rgb(var(--brand)); border-color: rgb(var(--brand)/.4); }
.meta-pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed rgb(var(--line)); }
.mpill {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; color: rgb(var(--content-2));
  background: rgb(var(--surface-2)); border: 1px solid rgb(var(--line)); border-radius: 999px; padding: .26rem .75rem;
  transition: color .15s, border-color .15s;
}
.mpill .icon { color: rgb(var(--content-3)); font-size: .85rem; }
a.mpill:hover { color: rgb(var(--brand)); border-color: rgb(var(--brand)/.4); }
.repo-tabs.anchor-tabs {
  position: sticky; top: calc(var(--header-h, 64px)); z-index: 40;
  background: rgb(var(--bg-1, var(--surface-1))/.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); margin-top: 1.1rem; padding: .3rem;
  display: flex; gap: .2rem; box-shadow: var(--shadow-soft);
}
.repo-tabs.anchor-tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .6rem 1rem; border: none; background: none; cursor: pointer;
  color: rgb(var(--content-2)); font-size: .88rem; font-weight: 500; border-radius: var(--radius-md);
  transition: background .15s, color .15s;
}
.repo-tabs.anchor-tabs button:hover { color: rgb(var(--content)); background: rgb(var(--content)/.04); }
.repo-tabs.anchor-tabs button.active { color: rgb(var(--brand)); background: rgb(var(--brand-soft)); font-weight: 700; }
.repo-section {
  scroll-margin-top: calc(var(--header-h, 64px) + 4.6rem);
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-xl, 20px);
  padding: 1.3rem 1.6rem 1.5rem; box-shadow: var(--shadow-soft); margin-bottom: 1.3rem;
}
.sec-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.sec-ico { color: rgb(var(--brand)); display: flex; }
.sec-head b { font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; }
.sec-head .badge.version { font-family: var(--font-mono); }
.sec-date { color: rgb(var(--content-3)); font-size: .8rem; }
.sec-link { margin-left: auto; color: rgb(var(--brand)); font-size: .82rem; font-weight: 600; display: inline-flex; align-items: center; gap: .2rem; }
.sec-empty { color: rgb(var(--content-3)); font-size: .86rem; }
.sec-more {
  width: 100%; margin-top: .8rem; padding: .6rem; border-radius: var(--radius-md);
  border: 1px dashed rgb(var(--line-strong, var(--line))); background: none; cursor: pointer;
  color: rgb(var(--content-2)); font-size: .82rem; display: flex; align-items: center; justify-content: center; gap: .4rem;
  transition: color .15s, border-color .15s;
}
.sec-more:hover { color: rgb(var(--brand)); border-color: rgb(var(--brand)/.4); }
.readme-v2 h3 {
  font-size: .98rem; font-weight: 700; margin: 1.2rem 0 .5rem;
  display: flex; align-items: center; gap: .5rem;
}
.readme-v2 h3::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: rgb(var(--brand)); }
.readme-v2 h3:first-child { margin-top: 0; }
.readme-v2 p { color: rgb(var(--content-2)); font-size: .9rem; line-height: 1.8; margin: .4rem 0; }
.dot-list { list-style: none; padding: 0; margin: .4rem 0; }
.dot-list li {
  position: relative; padding-left: 1.2rem; color: rgb(var(--content-2)); font-size: .88rem; line-height: 1.75; margin: .3rem 0;
}
.dot-list li::before {
  content: ""; position: absolute; left: .2rem; top: .62em; width: 6px; height: 6px; border-radius: 50%;
  background: rgb(var(--brand)/.7);
}
.readme-v2 pre {
  background: rgb(var(--code-bg, var(--surface-3))); border: 1px solid rgb(var(--line));
  border-radius: var(--radius-md); padding: .9rem 1.1rem; overflow-x: auto; font-size: .82rem; line-height: 1.6;
}
.hist-head {
  display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr 7.5rem 6.5rem 2rem; gap: .8rem; align-items: center;
  padding: 0 .9rem .5rem; color: rgb(var(--content-3)); font-size: .74rem; font-weight: 600;
  border-bottom: 1px solid rgb(var(--line)); margin-bottom: .2rem;
}
.hist-block { border-bottom: 1px solid rgb(var(--line)/.6); }
.hist-block:last-child { border-bottom: none; }
.hist-row-v2 {
  display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr 7.5rem 6.5rem 2rem; gap: .8rem; align-items: center;
  padding: .75rem .9rem; cursor: pointer; border-radius: var(--radius-md); transition: background .15s;
}
.hist-row-v2:hover { background: rgb(var(--content)/.03); }
.hist-row-v2 .hp { display: flex; gap: .45rem; color: rgb(var(--content-3)); font-size: .95rem; }
.hist-row-v2 .hd { color: rgb(var(--content-3)); font-size: .8rem; font-family: var(--font-mono); }
.hist-row-v2 .hc { color: rgb(var(--content-3)); font-size: .78rem; display: flex; align-items: center; gap: .35rem; }
.hist-row-v2 .chev { color: rgb(var(--content-3)); transition: transform .2s; justify-self: end; }
.hist-row-v2.open .chev { transform: rotate(90deg); }
.hist-assets { padding: .2rem .6rem .8rem; }
.donut-wrap { display: flex; align-items: center; gap: .9rem; }
.donut { flex-shrink: 0; }
.donut .track { stroke: rgb(var(--content)/.07); }
.donut .seg {
  animation: donutSeg .9s cubic-bezier(.22, 1, .36, 1) backwards;
  transition: stroke-width .22s, filter .22s;
}
@keyframes donutSeg { from { stroke-dasharray: 0 var(--c); opacity: 0; } }
.donut .seg:hover { stroke-width: 18; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .18)); }
.donut .donut-n { font-size: 1.3rem; font-weight: 800; fill: rgb(var(--content)); font-family: var(--font-mono); animation: donutPop .55s .2s cubic-bezier(.22, 1, .36, 1) backwards; }
@keyframes donutPop { from { opacity: 0; } }
.donut .donut-l { font-size: .55rem; fill: rgb(var(--content-3)); }
.donut-wrap .lang-list { flex: 1; min-width: 0; }
.proj-link {
  display: flex; align-items: center; gap: .65rem; padding: .5rem 0; border-bottom: 1px dashed rgb(var(--line)/.7);
}
.proj-link:last-child { border-bottom: none; }
.pl-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: rgb(var(--surface-3)); color: rgb(var(--content-2));
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.proj-link b { font-size: .84rem; display: block; }
.proj-link div span { color: rgb(var(--content-3)); font-size: .74rem; font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 10.5rem; }
.proj-link > div { flex: 1; min-width: 0; }
.proj-link .link { color: rgb(var(--content-3)); display: flex; }
.proj-link .link:hover { color: rgb(var(--brand)); }
.mini-repo {
  display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-radius: var(--radius-md);
  transition: transform .15s;
}
.mini-repo:hover { transform: translateX(2px); }
.mini-repo .mr-info { flex: 1; min-width: 0; }
.mini-repo b { font-size: .86rem; display: block; }
.mini-repo .mr-info span { color: rgb(var(--warning)); font-size: .76rem; display: inline-flex; align-items: center; gap: .25rem; }
.seg.sm button { padding: .28rem .7rem; font-size: .76rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .lang-grid-v2 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .submit-layout, .settings-layout, .about-layout { grid-template-columns: 1fr; }
  .about-side { position: static; }
  .toc { flex-direction: row; flex-wrap: wrap; }
  .lang-grid-v2 { grid-template-columns: repeat(2, 1fr); }
  .hist-head { display: none; }
  .hist-row-v2 { grid-template-columns: auto 1fr auto; }
  .hist-row-v2 .hp, .hist-row-v2 .hc { display: none; }
  .repo-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lang-grid-v2 { grid-template-columns: 1fr; }
  .about-feat-grid { grid-template-columns: 1fr; }
  .repo-tabs.anchor-tabs button { font-size: .78rem; padding: .55rem .5rem; }
  .repo-tabs.anchor-tabs button .icon { display: none; }
}

/* ---------- 详情页：协议卡站内跳转 ---------- */
.lic-box a.name { color: inherit; transition: color .15s; }
.lic-box a.name:hover { color: rgb(var(--brand)); }
.lic-box .link { transition: color .15s, background .15s; }
.lic-box .link:hover { color: rgb(var(--brand)); }
.lic-more {
  margin-top: .7rem; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; font-weight: 700; color: rgb(var(--brand));
}
.lic-more .icon { width: 14px; height: 14px; transition: transform .18s; }
.lic-more:hover .chev, .lic-more:hover .icon:first-child { transform: translateX(2px); }

/* ---------- 开源协议指南页 ---------- */
.type-badge {
  display: inline-flex; align-items: center; padding: .14rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.type-badge.permissive { background: rgb(var(--success)/.14); color: rgb(var(--success)); }
.type-badge.weak { background: rgb(var(--warning)/.16); color: rgb(var(--warning)); }
.type-badge.strong { background: rgb(var(--danger, 239 68 68)/.13); color: rgb(var(--danger, 239 68 68)); }

.licguide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: .6rem 0 1.6rem; }
.licguide-p { color: rgb(var(--content-2)); font-size: .88rem; line-height: 1.75; }
.licguide-ul { display: grid; gap: .5rem; color: rgb(var(--content-2)); font-size: .86rem; line-height: 1.6; }
.licguide-ul li { padding-left: 1.1rem; position: relative; }
.licguide-ul li::before {
  content: ''; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--brand));
}
.licguide-h2 { font-size: 1.15rem; font-weight: 800; color: rgb(var(--content)); margin: 1.4rem 0 .9rem; }
.licguide-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.licguide-type {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem 1rem; box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
  transition: transform .18s var(--ease-smooth), box-shadow .18s;
}
.licguide-type:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.licguide-type::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; }
.licguide-type.permissive::before { background: rgb(var(--success)); }
.licguide-type.weak::before { background: rgb(var(--warning)); }
.licguide-type.strong::before { background: rgb(var(--danger, 239 68 68)); }
.licguide-type .lt-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; color: rgb(var(--content)); }
.licguide-type .lt-ico { display: inline-flex; }
.licguide-type p { color: rgb(var(--content-2)); font-size: .84rem; line-height: 1.7; margin-bottom: .7rem; }
.licguide-type .lt-eg {
  font-family: var(--font-mono); font-size: .72rem; color: rgb(var(--content-3));
  background: rgb(var(--surface-3)); border-radius: 999px; padding: .16rem .6rem;
}
.licguide-tablewrap {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); overflow-x: auto; margin-bottom: 1.4rem;
}
.licguide-table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 40rem; }
.licguide-table thead th {
  text-align: left; padding: .7rem .9rem; font-size: .74rem; color: rgb(var(--content-3));
  border-bottom: 1px solid rgb(var(--line)); white-space: nowrap;
}
.licguide-table tbody td { padding: .66rem .9rem; border-bottom: 1px solid rgb(var(--line)/.6); }
.licguide-table tbody tr:last-child td { border-bottom: none; }
.licguide-table tbody tr { transition: background .15s; }
.licguide-table tbody tr:hover { background: rgb(var(--content)/.03); }
.licguide-table .lt-name { font-weight: 700; color: rgb(var(--content)); transition: color .15s; }
.licguide-table .lt-name:hover { color: rgb(var(--brand)); }
.licguide-table .ok .icon { width: 15px; height: 15px; color: rgb(var(--success)); }
.licguide-table .share { color: rgb(var(--content-2)); }
.licguide-table .num { font-family: var(--font-mono); font-weight: 700; color: rgb(var(--content-2)); }
.licguide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.licguide-card {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  padding: 1rem 1.1rem .9rem; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: .55rem;
  transition: transform .18s var(--ease-smooth), border-color .18s, box-shadow .18s;
}
.licguide-card:hover { transform: translateY(-2px); border-color: rgb(var(--brand)/.4); box-shadow: var(--shadow-pop); }
.licguide-card .lcg-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.licguide-card .lcg-head b { color: rgb(var(--content)); font-size: .92rem; }
.licguide-card p {
  color: rgb(var(--content-2)); font-size: .8rem; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.licguide-card .lcg-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  font-size: .76rem; color: rgb(var(--content-3)); border-top: 1px dashed rgb(var(--line)); padding-top: .55rem;
}
.licguide-card .lcg-foot span { display: inline-flex; align-items: center; gap: .3rem; }
.licguide-card .lcg-foot .chev { transition: transform .18s; }
.licguide-card:hover .chev { transform: translateX(3px); color: rgb(var(--brand)); }
.licguide-note {
  display: flex; align-items: flex-start; gap: .5rem; color: rgb(var(--content-3)); font-size: .78rem; line-height: 1.6;
  padding: 1.2rem 0 3rem;
}
.licguide-note .icon { flex-shrink: 0; margin-top: .1rem; }

.licdetail-head {
  background: rgb(var(--surface-1)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  padding: 1.3rem 1.5rem; box-shadow: var(--shadow-soft); margin: .6rem 0 1.2rem;
}
.licdetail-head .lh-title { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.licdetail-head h1 { font-size: 1.5rem; font-weight: 800; color: rgb(var(--content)); }
.licdetail-head .lh-sub { color: rgb(var(--content-2)); font-size: .9rem; line-height: 1.75; margin: .6rem 0 .9rem; }
.licdetail-head .lh-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.licdetail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.2rem; align-items: start; padding-bottom: 3rem; }
.licdetail-main { display: grid; gap: 1rem; }
.licdetail-side { display: grid; gap: 1rem; }

@media (max-width: 900px) {
  .licguide-types, .licguide-cards { grid-template-columns: 1fr; }
  .licguide-grid { grid-template-columns: 1fr; }
  .licdetail-grid { grid-template-columns: 1fr; }
}

/* ---------- 详情页资产懒加载骨架 ---------- */
.skeleton-list { display: grid; gap: .5rem; padding: .4rem 0 .6rem; }
.skeleton-row {
  height: 46px; border-radius: var(--radius-md, 12px);
  background: linear-gradient(100deg, rgb(var(--content)/.05) 30%, rgb(var(--content)/.10) 50%, rgb(var(--content)/.05) 70%);
  background-size: 220% 100%;
  animation: skeletonSweep 1.1s var(--ease-smooth, ease) infinite;
}
@keyframes skeletonSweep { from { background-position: 140% 0; } to { background-position: -40% 0; } }

/* ---------- 提交页：审核操作按钮行 ---------- */
.result-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }

/* 历史版本：预发布标记。
   徽章是 inline-flex，列宽不足时「预发布」会被挤成一字一行 —— 版本号交给 .vname
   负责省略，pre-tag 禁止换行，徽章自身允许收缩。 */
.badge.version { min-width: 0; }
.badge.version .vname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge.version .pre-tag {
  font-style: normal; font-size: .62rem; font-weight: 700; margin-left: .34rem;
  padding: .06rem .34rem; border-radius: 999px; flex: none; white-space: nowrap;
  background: rgb(var(--warning, 245 158 11)/.18); color: rgb(var(--warning, 180 83 9));
  vertical-align: middle;
}
