/* ============================================================
   AIPick · 样式
   设计原则：大留白、克制的层级、几乎只有黑白灰、动效只服务于反馈。
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg:            #fbfbfd;
  --bg-elev:       #ffffff;
  --bg-subtle:     #f5f5f7;
  --text:          #1d1d1f;
  --text-2:        #6e6e73;
  --text-3:        #86868b;
  --line:          rgba(0, 0, 0, .08);
  --line-strong:   rgba(0, 0, 0, .16);
  --accent:        #0071e3;
  --accent-soft:   rgba(0, 113, 227, .1);
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md:     0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px -14px rgba(0, 0, 0, .18);
  --shadow-lg:     0 2px 4px rgba(0, 0, 0, .04), 0 18px 44px -18px rgba(0, 0, 0, .26);
  --pill:          #ffffff;
  --nav-bg:        rgba(251, 251, 253, .72);
  --radius:        18px;
  --radius-sm:     12px;
  --maxw:          1120px;
  --ease:          cubic-bezier(.22, .61, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg:            #000000;
  --bg-elev:       #1c1c1e;
  --bg-subtle:     #151516;
  --text:          #f5f5f7;
  --text-2:        #a1a1a6;
  --text-3:        #86868b;
  --line:          rgba(255, 255, 255, .1);
  --line-strong:   rgba(255, 255, 255, .22);
  --accent:        #2997ff;
  --accent-soft:   rgba(41, 151, 255, .14);
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:     0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px -14px rgba(0, 0, 0, .8);
  --shadow-lg:     0 2px 6px rgba(0, 0, 0, .6), 0 18px 44px -18px rgba(0, 0, 0, 1);
  --pill:          #2c2c2e;
  --nav-bg:        rgba(0, 0, 0, .68);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.022em; line-height: 1.1; }
h1, h2 { text-wrap: balance; }        /* 标题尽量不出现孤字成行 */
p { margin: 0; }
.card-desc, .pick-desc, .why-grid p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent-soft); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* 通用图标线宽 */
.i {
  width: 18px; height: 18px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

/* 环境光：给极简页面一点体积感，不抢内容 */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(52rem 30rem at 12% -8%, rgba(0, 113, 227, .10), transparent 62%),
    radial-gradient(44rem 26rem at 92% 4%, rgba(120, 90, 255, .09), transparent 60%),
    radial-gradient(40rem 24rem at 50% 108%, rgba(0, 190, 170, .06), transparent 62%);
}
html[data-theme="dark"] .ambient {
  background:
    radial-gradient(52rem 30rem at 12% -8%, rgba(41, 151, 255, .16), transparent 62%),
    radial-gradient(44rem 26rem at 92% 4%, rgba(140, 100, 255, .13), transparent 60%),
    radial-gradient(40rem 24rem at 50% 108%, rgba(0, 190, 170, .08), transparent 62%);
}

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 22px; height: 56px;
  display: flex; align-items: center; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #2b8cff, #0060df);
  box-shadow: 0 2px 8px rgba(0, 113, 227, .35);
}
.brand-mark svg { width: 15px; height: 15px; }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; }
.brand-mark.small svg { width: 17px; height: 17px; }
.brand-name { font-size: 17px; }

/* 顶栏搜索：滚过 Hero 才出现 */
.nav-search {
  flex: 1; max-width: 300px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-3);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease), border-color .2s;
}
html[data-theme="dark"] .nav-search { background: rgba(255, 255, 255, .06); }
.nav-search.show { opacity: 1; transform: none; pointer-events: auto; }
.nav-search:focus-within { border-color: var(--accent); }
.nav-search input {
  flex: 1; min-width: 0; border: 0; background: none; color: var(--text);
  font-size: 14px; outline: none; letter-spacing: -0.01em;
  -webkit-appearance: none; appearance: none;
}
.nav-search input::-webkit-search-cancel-button { display: none; }

.nav-links { display: flex; align-items: center; gap: 22px; margin-left: 0; }
.nav-links a {
  font-size: 14px; color: var(--text-2);
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-search.show ~ .nav-links { margin-left: 0; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .moon { display: none; }
html[data-theme="dark"] .icon-btn .sun { display: none; }
html[data-theme="dark"] .icon-btn .moon { display: block; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 92px 22px 56px;
  text-align: center;
}

.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  color: var(--accent); margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(40px, 7.4vw, 76px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.06;
}
.hero h1 .dot { color: var(--accent); }

.lede {
  margin: 24px auto 0;
  max-width: 620px;
  font-size: clamp(16px, 2.1vw, 19px);
  color: var(--text-2);
  line-height: 1.55;
}
.lede strong { color: var(--text); font-weight: 600; }

/* 大搜索框 */
.search {
  margin: 38px auto 0;
  max-width: 620px;
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  color: var(--text-3);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-soft);
}
.search .i { width: 20px; height: 20px; }
.search input {
  flex: 1; min-width: 0; border: 0; background: none;
  color: var(--text); font-size: 16px; outline: none; letter-spacing: -0.01em;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { display: none; }
.kbd {
  font-family: var(--font); font-size: 12px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 2px 7px; background: var(--bg-subtle);
}

.search-hint {
  margin: 14px auto 0; max-width: 620px;
  font-size: 13px; color: var(--text-3); line-height: 1.6;
}
.search-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; padding: 1px 5px; border-radius: 5px;
  background: var(--bg-subtle); border: 1px solid var(--line); color: var(--text-2);
}
html[data-theme="dark"] .search-hint code { background: rgba(255, 255, 255, .06); }

.stats {
  list-style: none; margin: 30px 0 0; padding: 0;
  display: flex; align-items: center; justify-content: center; gap: 22px;
  color: var(--text-3); font-size: 13px;
}
.stats li { display: flex; align-items: baseline; gap: 5px; }
.stats b { font-size: 17px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats .sep { width: 1px; height: 14px; background: var(--line-strong); padding: 0; }

/* ---------- 区块 ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 64px 22px;
}

.page-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: 62px 22px 6px;
}
.page-head h1 { font-size: clamp(32px, 5.2vw, 54px); letter-spacing: -0.032em; }
.page-head .eyebrow { margin-bottom: 14px; }
.page-head .lede { margin-left: 0; margin-right: 0; max-width: 560px; }
.page-head .search { margin-left: 0; margin-right: 0; max-width: 560px; }
.page-head .search-hint { margin-left: 0; max-width: 560px; }

.section-head { margin-bottom: 28px; }
.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.head-note { font-size: 13px; color: var(--text-3); padding-bottom: 2px; }
.head-note a { color: var(--text-3); }
.head-note a:hover { color: var(--accent); }
.section-head h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.028em;
}
.section-head p { margin-top: 8px; color: var(--text-2); font-size: 15px; }

/* ---------- 新手三选 ---------- */
.picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.pick {
  position: relative;
  display: block;
  padding: 26px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.pick::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(20rem 10rem at 100% 0%, var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity .3s var(--ease); pointer-events: none;
}
.pick:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.pick:hover::after { opacity: 1; }

.pick-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pick-name { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.pick-desc { color: var(--text-2); font-size: 14.5px; line-height: 1.6; min-height: 3.2em; }
.pick-best {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-3);
  display: flex; align-items: center; gap: 7px;
}
.pick-best b { color: var(--text-2); font-weight: 500; }

/* ---------- 首页榜单 ---------- */
.rank-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  list-style: none; margin: 0; padding: 0;
}
.rank-card {
  position: relative;
  padding: 26px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.rank-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.rank-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.rank-hit:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* 名次数字做得很淡，它是秩序感不是主角 */
.rank-no {
  position: absolute; top: 18px; right: 22px;
  font-size: 32px; font-weight: 600; letter-spacing: -0.045em;
  color: var(--text); opacity: .16; font-variant-numeric: tabular-nums;
}
.rank-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rank-desc { color: var(--text-2); font-size: 14.5px; line-height: 1.6; text-wrap: pretty; }
.rank-note {
  margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-2); line-height: 1.55; text-wrap: pretty;
}
.rank-note b { color: var(--text-3); font-weight: 500; margin-right: 7px; }
.rank-foot { margin-top: 15px; display: flex; align-items: center; gap: 12px; }

.rank-rest { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.rank-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease);
}
.rank-row:hover { background: var(--bg-subtle); }
html[data-theme="dark"] .rank-row:hover { background: rgba(255, 255, 255, .03); }
.rank-row .rank-no {
  position: static; font-size: 15px; font-weight: 600; opacity: .4;
  min-width: 22px; text-align: right; letter-spacing: -0.02em;
}
.rank-name { font-weight: 600; font-size: 14.5px; letter-spacing: -0.02em; flex: 0 0 auto; }
.rank-best {
  color: var(--text-3); font-size: 13px; flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-more { margin: 22px 0 0; text-align: center; }
.rank-more .btn-ghost { display: inline-block; line-height: 38px; text-decoration: none; }

/* ---------- 首页分类入口 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.cat-card {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.cat-name { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.cat-n { margin-left: auto; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cat-arrow { width: 14px; height: 14px; color: var(--text-3); transition: transform .25s var(--ease), color .25s var(--ease); }
.cat-card:hover .cat-arrow { transform: translateX(3px); color: var(--accent); }

/* ---------- 筛选 ---------- */
.filters {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 26px;
}
.filter-primary { display: flex; flex-wrap: wrap; gap: 8px; }

/* 次级筛选（访问方式 / 费用）：从属于主分类，所以更小更轻，靠间距而不是线条分组 */
.filter-secondary { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.filter-set { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.filter-label { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
/* flex-basis + min-width:0 让这组在窄屏上自己换行，
   而不是整体被挤到下一行、把「费用」这种标签单独留在上面 */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 200px; min-width: 0; }
.filter-secondary .chip { height: 28px; padding: 0 11px; font-size: 13px; }
.filter-secondary .chip .n { font-size: 11px; }
.chip {
  height: 34px; padding: 0 15px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--pill);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2); font-size: 14px; letter-spacing: -0.01em;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--text); color: var(--bg); border-color: var(--text);
  font-weight: 500;
}
.chip .n { font-size: 12px; opacity: .55; }
/* 一键清空：长得像操作而不是选项，所以不用胶囊底色 */
.chip-clear { background: none; border-style: dashed; color: var(--text-3); }
.chip-clear:hover { color: var(--text); border-style: solid; }
.chip-clear .x {
  width: 12px; height: 12px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round;
}
.chip .star { width: 13px; height: 13px; fill: currentColor; stroke: none; }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 20px;
  min-height: 168px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              border-color .28s var(--ease), opacity .3s var(--ease);
  animation: cardIn .42s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}
.card:active { transform: translateY(-1px) scale(.995); }

/* 整卡可点击：用一层透明的覆盖链接，避免在 <a> 里嵌 <button>。
   交互控件（收藏、投票）统一用 z-index: 2 浮在覆盖层之上。
   注意：中间层（.card-foot / .card-actions / .rank-foot）绝对不能加 z-index，
   否则会创建层叠上下文，把子元素的 z-index 关在里面，按钮就点不到了。 */
.card-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-hit:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }

.logo {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  color: #fff; font-size: 17px; font-weight: 600;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), var(--shadow-sm);
}

.card-title { min-width: 0; }
.card-title h3 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.card-desc {
  color: var(--text-2); font-size: 13.8px; line-height: 1.6;
  flex: 1;
}

.card-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-actions { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.card-best {
  font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-go {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12.5px; color: var(--accent); font-weight: 500;
  opacity: 0; transform: translateX(-4px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
  white-space: nowrap;
}
.card:hover .card-go, .card:focus-visible .card-go { opacity: 1; transform: none; }
.card-go .i { width: 13px; height: 13px; stroke-width: 2.4; }

/* 触屏没有 hover，箭头常驻 */
@media (hover: none) {
  .card-go { opacity: 1; transform: none; }
  .fav { opacity: 1; }
}

/* 用户开始搜索/筛选后，再重排就不要每次都播放入场动画了 */
.grid.instant .card { animation: none; }

/* 投票按钮（放在卡片右下和榜单里） */
.vote {
  position: relative; z-index: 2;   /* 必须压过 .card-hit / .rank-hit */
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2); font-size: 12.5px; line-height: 1;
  cursor: pointer; flex: 0 0 auto;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease), transform .2s var(--ease);
}
html[data-theme="dark"] .vote { background: rgba(255, 255, 255, .06); }
.vote svg {
  width: 14px; height: 14px; fill: none;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.vote:hover { color: var(--text); border-color: var(--line-strong); }
.vote:active { transform: scale(.94); }
.vote.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.vote.on svg { fill: var(--accent); }
.vote.unavailable { opacity: .4; cursor: not-allowed; }
.vote-n { font-variant-numeric: tabular-nums; }
.vote-n:empty { display: none; }

/* 角标 */
.badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.badge {
  font-size: 11px; line-height: 1; padding: 4px 7px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--text-3);
  background: var(--bg-subtle); white-space: nowrap;
}
html[data-theme="dark"] .badge { background: rgba(255, 255, 255, .05); }
.badge.cn { color: #0a7d4f; border-color: rgba(10, 125, 79, .28); background: rgba(10, 125, 79, .09); }
html[data-theme="dark"] .badge.cn { color: #4ade9b; background: rgba(74, 222, 155, .12); border-color: rgba(74, 222, 155, .26); }
.badge.global { color: #9a5b00; border-color: rgba(154, 91, 0, .26); background: rgba(154, 91, 0, .08); }
html[data-theme="dark"] .badge.global { color: #f0b357; background: rgba(240, 179, 87, .12); border-color: rgba(240, 179, 87, .26); }
.badge.free { color: var(--text-2); }

/* 收藏按钮 */
.fav {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer;
  color: var(--text-3); opacity: 0;
  transition: opacity .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.fav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.card:hover .fav, .fav:focus-visible, .fav.on { opacity: 1; }.fav:hover { color: var(--text); transform: scale(1.14); }
.fav.on { color: #f5a623; }
.fav.on svg { fill: #f5a623; stroke: #f5a623; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 72px 20px; }
.empty-title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.empty-sub { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }
.btn-ghost {
  margin-top: 22px; height: 38px; padding: 0 20px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--text);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-ghost:active { transform: scale(.97); }

/* ---------- 收录标准 ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.why-grid article {
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.why-grid h3 { font-size: 16px; margin-bottom: 9px; }
.why-grid p { color: var(--text-2); font-size: 14px; line-height: 1.62; }

/* ---------- 反馈与采纳记录 ---------- */
.fb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.fb-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .26s var(--ease), box-shadow .26s var(--ease), border-color .26s var(--ease);
}
.fb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.fb-ico {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
}
.fb-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fb-body b { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.fb-sub { font-size: 13px; color: var(--text-2); line-height: 1.5; }

.changelog { margin-top: 34px; }
.changelog h3 { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; letter-spacing: -0.01em; }
.changelog ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.changelog li {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 13px 2px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.changelog time {
  font-size: 12.5px; color: var(--text-3); flex: 0 0 auto;
  font-variant-numeric: tabular-nums; min-width: 62px;
}
.cl-text { color: var(--text); flex: 1 1 240px; line-height: 1.5; }
.cl-from {
  font-size: 11.5px; color: var(--text-3); flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
  background: var(--bg-subtle);
}
html[data-theme="dark"] .cl-from { background: rgba(255, 255, 255, .05); }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 44px 22px 56px;
  background: var(--bg-subtle);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.fname { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.ftag { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.footer-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
.footer-links a:hover { color: var(--text); }
.footer-note {
  max-width: var(--maxw); margin: 26px auto 0;
  font-size: 12.5px; color: var(--text-3); line-height: 1.7;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translate(-50%, 18px);
  padding: 11px 20px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-size: 13.5px; letter-spacing: -0.01em;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; z-index: 80;
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 入场动效 ---------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  animation: reveal .8s var(--ease) both;
  animation-delay: var(--d, 0s);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav-search { display: none; }
  .nav-links a { display: none; }
  .hero { padding: 64px 20px 40px; }
  .section { padding: 48px 20px; }
  .br-lg { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .stats { gap: 16px; font-size: 12px; }
  .filter-secondary { gap: 10px 18px; }
  .page-head { padding: 44px 20px 4px; }
  .rank-no { font-size: 26px; top: 16px; right: 18px; }
  .rank-row .rank-best { display: none; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .search-hint { font-size: 12.5px; }
  .changelog time { min-width: 0; }
  .stats b { font-size: 15px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .picks { grid-template-columns: 1fr; }
  .card { min-height: 0; }
}

/* ---------- 无障碍与偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .toast, .filters, .search, .footer-links { display: none; }
  .card { break-inside: avoid; }
}
