/* AI 导航 — 参照小米 AI（超级小爱）设计语言：
   暖白底、橙→紫→蓝渐变点缀、大圆角、黑色粗标题、深色页脚 */
:root {
  --mi-orange: #ff6900;
  --mi-orange-deep: #f25b00;
  --mi-blue: #3f7dfb;
  --mi-violet: #7c6bff;
  --grad-brand: linear-gradient(120deg, #ff8a3d 0%, #ff6900 38%, #8b7bff 72%, #3f7dfb 100%);
  --accent: var(--mi-orange);
  --accent-soft: rgba(255, 105, 0, 0.09);
  --star: #ff9d2b;
  --bg: #faf9f7;
  --card: #ffffff;
  --fill: #f4f2ee;
  --text: #17181a;
  --text-sub: #55585e;
  --text-faint: #9b9fa6;
  --border: #eeece7;
  --radius: 18px;
  --shadow: 0 2px 14px rgba(23, 24, 26, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden 属性必须压过组件自身的 display（如 .modal-mask 的 flex） */
[hidden] { display: none !important; }

::selection { background: rgba(255, 105, 0, 0.18); }

body {
  font-family: "MiSans", "MiSans VF", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--mi-orange); outline-offset: 2px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(255, 105, 0, 0.28);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.nav-btn {
  border: none; background: none; cursor: pointer;
  font-size: 14px; color: var(--text-sub);
  padding: 8px 12px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, color .12s;
}
.nav-doodle { width: 17px; height: 17px; opacity: 0.75; }
.nav-btn:hover .nav-doodle { opacity: 1; }
.nav-btn.active .nav-doodle { opacity: 1; color: var(--accent); }
.nav-btn:hover { background: var(--fill); color: var(--text); }
.nav-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-count { font-size: 12px; color: var(--accent); }
.lang-btn {
  border: 1px solid var(--border); background: var(--card); cursor: pointer;
  color: var(--text-sub); font-size: 12.5px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
  transition: border-color .12s, color .12s;
}
.lang-btn:hover { border-color: rgba(255, 105, 0, 0.5); color: var(--accent); }

/* ---------- Hero（小爱式渐变氛围光） ---------- */
.hero { position: relative; text-align: center; padding: 64px 0 26px; }

/* ---------- 手绘装饰 ---------- */
.doodle { position: absolute; pointer-events: none; }
.doodle-bot { width: 110px; height: 110px; left: 4%; top: 46px; transform: rotate(-6deg); animation: doodle-float 5s ease-in-out infinite; }
.doodle-arrow { width: 130px; height: 102px; right: 4%; top: 60px; transform: rotate(4deg); animation: doodle-float 6s ease-in-out 0.8s infinite; }
@keyframes doodle-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}
@media (max-width: 860px) {
  .doodle { display: none; }
}

.view-head h2 { position: relative; }
.doodle-underline { width: 84px; height: 10px; display: block; margin-top: 2px; }

.doodle-ic { width: 17px; height: 17px; vertical-align: -3px; margin-right: 2px; }
.cat-chip .doodle-ic { opacity: 0.85; }
.cat-chip.active .doodle-ic { opacity: 1; }

/* 侧边手绘线条：固定于页面两侧，宽屏可见、窄屏自动隐藏 */
.side-doodle {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 96px; height: auto; opacity: 0.5;
  pointer-events: none; z-index: 0;
  animation: doodle-float 7s ease-in-out infinite;
}
.side-doodle-left { left: max(12px, calc(50% - 684px)); }
.side-doodle-right { right: max(12px, calc(50% - 684px)); animation-delay: -3.5s; }
@media (max-width: 1399px) {
  .side-doodle { width: 64px; opacity: 0.42; }
  .side-doodle-left { left: max(10px, calc(50% - 648px)); }
  .side-doodle-right { right: max(10px, calc(50% - 648px)); }
}
@media (max-width: 1279px) {
  .side-doodle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .side-doodle { animation: none; }
}

.footer-wave { display: block; width: 100%; height: 40px; margin-bottom: 6px; }
.site-footer { position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -80px -60px 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(540px 300px at 16% 10%, rgba(255, 138, 61, 0.16), transparent 65%),
    radial-gradient(640px 340px at 86% 4%, rgba(63, 125, 251, 0.13), transparent 65%),
    radial-gradient(520px 320px at 54% 34%, rgba(124, 107, 255, 0.09), transparent 70%);
}
.hero h1 { font-size: 40px; line-height: 1.22; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 14px; }
.hero .accent {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-sub); max-width: 640px; margin: 0 auto 28px; font-size: 15px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin: -12px auto 20px; max-width: 680px; }
.hero-links a { font-size: 12.5px; color: var(--text-faint); text-decoration: none; border-bottom: 1px dashed var(--border); padding-bottom: 1px; }
.hero-links a:hover { color: var(--accent); border-color: rgba(255, 105, 0, 0.4); }
.search-box {
  max-width: 580px; margin: 0 auto; position: relative;
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 8px 0 18px; height: 52px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.search-box:focus-within {
  border-color: rgba(255, 105, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 105, 0, 0.12);
}
.search-icon { display: flex; align-items: center; } .search-icon svg { width: 17px; height: 17px; }
.search-box input {
  flex: 1; border: none; outline: none; background: none;
  font-size: 15px; padding: 0 10px; color: var(--text);
}
.search-box input::placeholder { color: var(--text-faint); }

/* ---------- Hero 入场：首屏错落淡入（纯 CSS，不影响布局与 SEO） ---------- */
@keyframes hero-rise {
  from { opacity: 0; translate: 0 16px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes hero-pop {
  from { opacity: 0; scale: 0.86; }
  to   { opacity: 1; scale: 1; }
}
.hero h1          { animation: hero-rise .62s var(--ease-spring) both; }
.hero-sub         { animation: hero-rise .62s var(--ease-spring) .09s both; }
.hero-links       { animation: hero-rise .58s var(--ease-spring) .17s both; }
.hero .search-box { animation: hero-rise .58s var(--ease-spring) .25s both; }
.doodle-bot  { animation: doodle-float 5s ease-in-out infinite, hero-pop .7s var(--ease-spring) .32s both; }
.doodle-arrow{ animation: doodle-float 6s ease-in-out .8s infinite, hero-pop .7s var(--ease-spring) .46s both; }
@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-sub, .hero-links, .hero .search-box { animation: none !important; }
}
.search-clear {
  border: none; background: var(--fill); color: var(--text-faint);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 12px;
  transition: background .12s, color .12s;
}
.search-clear:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- 分类栏 ---------- */
.category-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 6px;
  scrollbar-width: none;
  cursor: grab;
}
.category-bar.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.category-bar::after { content: ""; flex: none; width: 6px; }
.category-bar::-webkit-scrollbar { display: none; }
.cat-chip {
  border: 1px solid var(--border); background: var(--card);
  color: var(--text-sub); font-size: 14px; white-space: nowrap;
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  flex: none;
  transition: all .14s;
}
.cat-chip:hover { border-color: rgba(255, 105, 0, 0.5); color: var(--accent); }
.cat-chip.active {
  background: var(--grad-brand); border-color: transparent;
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 105, 0, 0.26);
}
.cat-count { opacity: .65; font-size: 12px; margin-left: 4px; }

/* ---------- 卡片网格 ---------- */
.grid-meta {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px;
  color: var(--text-faint); font-size: 13px; padding: 12px 2px 10px;
}
.grid-meta-right { display: flex; align-items: center; gap: 10px; }
.region-toggle {
  border: 1px solid var(--border); background: var(--card);
  color: var(--text-sub); font-size: 12.5px;
  padding: 4px 12px; border-radius: 999px; cursor: pointer;
  transition: all .12s;
}
.region-toggle:hover { border-color: rgba(255, 105, 0, 0.5); color: var(--accent); }
.region-toggle.active {
  background: var(--grad-brand); border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 3px 10px rgba(255, 105, 0, 0.25);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px; padding-bottom: 44px;
}
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 16px 14px;
  cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow);
  transition: transform .14s, border-color .14s, box-shadow .14s;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 138, 61, 0.5);
  box-shadow: 0 10px 26px rgba(255, 105, 0, 0.10);
}
.card-top { display: flex; align-items: center; gap: 10px; }
.card-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--fill); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; }
.card-icon.doodle-fallback .doodle-ic { width: 24px; height: 24px; color: #b8bdc4; }
.modal-icon.doodle-fallback .doodle-ic { width: 30px; height: 30px; color: #b8bdc4; }
.card-name { font-weight: 700; font-size: 15px; }
.card-cat { font-size: 12px; color: var(--text-faint); }
.card-desc {
  font-size: 13px; color: var(--text-sub);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px; color: var(--mi-orange-deep); background: var(--accent-soft);
  padding: 2px 8px; border-radius: 999px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.card-visit {
  font-size: 12.5px; color: var(--text-faint); text-decoration: none;
  display: inline-flex; align-items: center; gap: 3px;
  transition: color .12s;
}
.card-visit:hover { color: var(--accent); }
.star-btn {
  border: none; background: none; cursor: pointer;
  font-size: 19px; color: #d4d2cd; line-height: 1; padding: 2px;
  transition: transform .1s, color .1s;
}
.star-btn:hover { transform: scale(1.15); color: var(--star); }
.star-btn.active { color: var(--star); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 0; color: var(--text-faint); }
.empty-icon { margin-bottom: 12px; opacity: .55; color: var(--text-faint); }
.empty-icon svg { width: 56px; height: 56px; }
.empty p { margin-bottom: 14px; }
.empty-region-hint { color: var(--mi-orange-deep); font-size: 13.5px; margin-top: 4px; }
#grid-empty .btn + .btn { margin-left: 8px; }
#grid-empty .empty-region-hint + .btn { margin-bottom: 8px; }

/* ---------- 视图 ---------- */
.view-head { display: flex; align-items: center; justify-content: space-between; padding: 30px 2px 16px; }
.view-head h2 { font-size: 24px; letter-spacing: -0.01em; font-weight: 800; }

.about { max-width: 720px; padding: 30px 2px 40px; }
.about h2 { margin-bottom: 14px; font-weight: 800; }
.about h3 { margin: 24px 0 8px; font-size: 16px; }
.about p, .about li { color: var(--text-sub); font-size: 14.5px; }
.about ul { padding-left: 20px; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text-sub);
  font-size: 13.5px; padding: 8px 15px; border-radius: 10px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: all .12s;
}
.btn:hover { border-color: rgba(255, 105, 0, 0.5); color: var(--accent); }
.btn.primary {
  background: var(--mi-orange); border-color: var(--mi-orange); color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 105, 0, 0.24);
}
.btn.primary:hover { background: var(--mi-orange-deep); border-color: var(--mi-orange-deep); color: #fff; }
.btn.danger:hover { border-color: #e5484d; color: #e5484d; }

/* ---------- 详情弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 17, 19, 0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal {
  background: var(--card); border-radius: 22px; width: 100%; max-width: 460px;
  padding: 24px 22px; position: relative;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(16, 17, 19, 0.22);
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  border: none; background: var(--fill); color: var(--text-faint);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 12px;
  transition: background .12s, color .12s;
}
.modal-close:hover { background: var(--accent-soft); color: var(--accent); }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.modal-icon {
  width: 54px; height: 54px; border-radius: 15px; background: var(--fill);
  display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden;
}
.modal-icon img { width: 100%; height: 100%; object-fit: cover; }
.modal-cat { font-size: 12.5px; color: var(--text-faint); }
.modal-desc { color: var(--text-sub); font-size: 14.5px; margin-bottom: 12px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.modal-block { background: var(--fill); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.modal-block.personal {
  background: linear-gradient(120deg, rgba(255, 138, 61, 0.08), rgba(63, 125, 251, 0.06));
  border-left: 3px solid var(--mi-orange);
  border-radius: 6px 12px 12px 6px;
}
.modal-block.personal p { font-style: normal; }
.modal-block.personal strong { color: var(--text); font-weight: 800; }
.modal-block.personal { line-height: 1.75; }

/* ---------- 用户口碑 ---------- */
.modal-block.reviews { background: var(--fill); }
.score-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.score-chip {
  font-size: 12px; font-weight: 700; color: var(--mi-orange-deep);
  background: var(--card); border: 1px solid rgba(255, 105, 0, 0.35);
  padding: 3px 10px; border-radius: 999px;
}
.review-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-tag { font-size: 12px; font-weight: 700; display: inline-block; margin-bottom: 4px; }
.review-tag.good { color: #15803d; }
.review-tag.bad { color: #c2410c; }
.review-cols ul { list-style: none; }
.review-cols li {
  font-size: 12.5px; color: var(--text-sub); line-height: 1.5;
  padding-left: 12px; position: relative; margin-bottom: 4px;
}
.review-cols li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5;
}
@media (max-width: 480px) {
  .review-cols { grid-template-columns: 1fr; }
}
.modal-label {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block; margin-bottom: 4px;
}
.modal-block p { font-size: 14px; color: var(--text-sub); }
.modal-note { font-size: 12px !important; color: var(--text-faint) !important; margin-top: 2px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.btn.star.active { border-color: var(--star); color: var(--star); }

/* ---------- 页脚（小爱式深色区块） ---------- */
.site-footer { background: #101113; padding: 24px 0; margin-top: 20px; }
.site-footer p { text-align: center; color: #8b8f96; font-size: 12.5px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: #17181a; color: #fff; font-size: 13.5px;
  padding: 9px 18px; border-radius: 999px; z-index: 200;
  box-shadow: 0 8px 24px rgba(16, 17, 19, 0.3);
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 广告位与 Cookie 选择 ---------- */
.ad-card { border: 1px dashed #d8d4cc; background: transparent; box-shadow: none; cursor: default; }
.ad-card:hover { transform: none; border-color: #d8d4cc; box-shadow: none; }
.ad-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 10.5px; color: var(--text-faint);
  border: 1px solid var(--border); background: var(--card);
  padding: 1px 8px; border-radius: 999px;
}
.ad-card h4 { font-size: 14.5px; color: var(--text-sub); font-weight: 700; margin: 14px 0 4px; }
.ad-card .ad-sub { font-size: 12.5px; color: var(--text-faint); line-height: 1.55; }
.ad-card .ad-body { margin-top: 6px; min-height: 60px; }

.sticky-ad {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--card); border-top: 1px solid var(--border);
  padding: 8px 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 -4px 16px rgba(16, 17, 19, 0.06);
}
.sticky-ad .ad-tag { position: static; flex: none; }
.sticky-ad .sticky-body { flex: 1; font-size: 12.5px; color: var(--text-sub); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* 自有产品轮播在横幅内解除单行截断，避免名称/卖点被裁掉 */
.sticky-ad .sticky-body .my-ad { flex-wrap: nowrap; gap: 8px; padding: 0; }
.sticky-ad .sticky-body .my-ad > span:last-of-type:not(:first-child) { display: flex; flex-direction: column; min-width: 0; }
.sticky-ad .sticky-body .my-ad strong { font-size: 13.5px; white-space: normal; }
.sticky-ad .sticky-body .my-ad span span { font-size: 11.5px; white-space: normal; }
.sticky-ad .sticky-body .my-ad span[style*="font-size:30px"] { font-size: 22px !important; }
.sticky-ad .sticky-close {
  border: none; background: var(--fill); width: 24px; height: 24px;
  border-radius: 50%; cursor: pointer; color: var(--text-faint); font-size: 11px; flex: none;
}
body.has-sticky-ad { padding-bottom: 54px; }
@media (min-width: 721px) {
  .sticky-ad { display: none; }
  body.has-sticky-ad { padding-bottom: 0; }
}

.consent-bar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: 300; width: calc(100% - 24px); max-width: 720px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(16, 17, 19, 0.18);
  padding: 14px 16px; display: flex; gap: 12px; align-items: center;
  animation: toast-in .2s ease-out;
}
.consent-bar p { flex: 1; font-size: 13px; color: var(--text-sub); }
.consent-bar a { color: #b34a00; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; font-size: 12.5px; }
.consent-bar a:hover { text-decoration: underline; }
.consent-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 560px) {
  .consent-bar { flex-direction: column; align-items: stretch; }
  .consent-actions { justify-content: flex-end; }
}

/* ---------- API 价格 ---------- */
.prices-note { color: var(--text-sub); font-size: 13.5px; padding: 0 2px 14px; }
.price-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.price-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.price-table th {
  background: var(--fill); color: var(--text-sub); font-weight: 700;
  text-align: right; padding: 10px 14px; font-size: 12.5px; white-space: nowrap;
}
.price-table th.col-model { text-align: left; }
.price-table td {
  padding: 9px 14px; border-top: 1px solid var(--border);
  text-align: right; color: var(--text-sub);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.price-table td.model-name { text-align: left; color: var(--text); font-weight: 600; }
.price-table tr.vendor-row td {
  text-align: left; border-top: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(255, 138, 61, 0.07), rgba(63, 125, 251, 0.05));
}
.vendor-name { font-weight: 800; color: var(--text); margin-right: 8px; }
.region-badge {
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-faint);
}
.region-badge.cn { color: var(--mi-orange-deep); border-color: rgba(255, 105, 0, 0.35); background: rgba(255, 105, 0, 0.07); }
.vendor-note { font-size: 11.5px; color: var(--text-faint); margin-left: 10px; }
.prices-foot { font-size: 12.5px; color: var(--text-faint); padding: 12px 2px 40px; }
.prices-foot a { color: var(--accent); text-decoration: none; }
.prices-foot a:hover { text-decoration: underline; }

/* ---------- 热门榜 ---------- */
.rank-list { list-style: none; padding: 0 0 40px; }
.rank-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 8px;
  cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.rank-item:hover { transform: translateX(3px); border-color: rgba(255, 138, 61, 0.5); box-shadow: 0 6px 18px rgba(255, 105, 0, 0.08); }
.rank-num {
  flex: none; width: 30px; text-align: center; font-weight: 800; font-size: 15px;
  color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.rank-num.top1 { color: #e0a400; }
.rank-num.top2 { color: #8f98a3; }
.rank-num.top3 { color: #c07a3e; }
.rank-icon {
  flex: none; width: 34px; height: 34px; border-radius: 10px; overflow: hidden;
  background: var(--fill); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.rank-icon img { width: 100%; height: 100%; object-fit: cover; }
.rank-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rank-name { font-weight: 700; font-size: 14.5px; }
.rank-meta { font-size: 12px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { flex: none; width: 140px; height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad-brand); }
.rank-hot { flex: none; width: 40px; text-align: right; font-size: 13px; font-weight: 700; color: var(--mi-orange-deep); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .rank-bar { display: none; }
  .rank-meta { max-width: 46vw; }
}

/* ---------- 同类工具 / 可点标签 ---------- */
.similar-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.similar-chip {
  border: 1px solid var(--border); background: var(--card); color: var(--text-sub);
  font-size: 12.5px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  transition: all .12s;
}
.similar-chip:hover { border-color: rgba(255, 105, 0, 0.5); color: var(--accent); }
.tag-btn { border: none; cursor: pointer; transition: transform .1s; }
.tag-btn:hover { transform: translateY(-1px); }

/* ---------- 提交工具 ---------- */
.submit-template {
  background: var(--fill); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; line-height: 1.7; color: var(--text-sub);
  white-space: pre-wrap; font-family: inherit; margin: 10px 0 14px;
}
.submit-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.footer-links { margin-top: 10px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: #9aa0a6; font-size: 12.5px; text-decoration: none; }
.footer-links a:hover { color: var(--mi-orange); }

/* ---------- 跑分榜 ---------- */
.bench-switch { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 2px 14px; }
.bench-switch .similar-chip.active {
  background: var(--grad-brand); border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 3px 10px rgba(255, 105, 0, 0.25);
}

/* 进度条：自动播放时的切换倒计时 */
.bench-progress { height: 3px; border-radius: 999px; background: var(--fill); overflow: hidden; margin: 0 2px 16px; }
.bench-progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad-brand); }
.bench-row.leader .bench-barbox { animation: leader-pulse 2.6s ease-in-out infinite; }
@keyframes leader-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(16, 17, 19, 0.06); }
  50% { box-shadow: 0 4px 20px rgba(255, 105, 0, 0.35); }
  }
/* ---------- 跑分竞赛舞台（Bar Chart Race） ---------- */
.bench-stage { position: relative; transition: height 0.45s ease; }
.bench-row {
  position: absolute; left: 0; display: flex; align-items: center; gap: 12px;
  height: 50px; width: 100%;
  transition: top 0.75s cubic-bezier(0.22, 0.61, 0.36, 1), width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.4s ease;
}
.bench-row.unscored { opacity: 0.45; }
.bench-rank {
  flex: none; width: 34px; text-align: center;
  font-weight: 800; font-size: 15px; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.bench-row.top1 .bench-rank { color: #e0a400; }
.bench-row.top2 .bench-rank { color: #8f98a3; }
.bench-row.top3 .bench-rank { color: #c07a3e; }
.bench-barbox {
  position: relative; flex: 1 1 auto; min-width: 0; height: 46px;
  border-radius: 12px; background: var(--fill); overflow: hidden;
  box-shadow: 0 2px 8px rgba(16, 17, 19, 0.06);
}
.bench-fill {
  position: absolute; inset: 0; width: 100%;
  background: linear-gradient(90deg, #ff8a3d, #d96a1f, #8b5cf6, #3f7dfb, #ff8a3d);
  background-size: 300% 100%;
  animation: bench-flow 6s linear infinite;
}
@keyframes bench-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.bench-label {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  z-index: 1; color: #fff; line-height: 1.25; pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); max-width: calc(100% - 90px);
}
.bench-label b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bench-label i { display: block; font-style: normal; font-size: 11px; opacity: 0.85; }
.bench-score {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 1; color: #fff; font-weight: 800; font-size: 16px;
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
.bench-price {
  flex: none; width: 96px; text-align: right;
  font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.bench-row.unscored .bench-barbox { opacity: 0.4; }
.bench-row.unscored .bench-label b { color: var(--text-sub); text-shadow: none; }
.bench-genbadge {
  position: absolute; right: 56px; top: 50%; transform: translateY(-50%);
  z-index: 1; font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85); color: #55585e;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.bench-row.unscored .bench-fill { opacity: 0.25; }
@media (prefers-reduced-motion: reduce) {
  .bench-row, .bench-barbox { transition: none; }
  .bench-fill { animation: none; }
}
@media (max-width: 640px) {
  .bench-price { display: none; }
  .bench-label b { font-size: 12.5px; max-width: 52vw; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 40px 0 18px; }
  .hero h1 { font-size: 27px; }
  .brand-name { display: none; }
  .nav-btn { padding: 8px 9px; font-size: 13px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 13px 12px 11px; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------- UI 精修覆盖层 ---------- */

/* 统一缓动变量 */
:root { --ease-spring: cubic-bezier(0.34, 1.3, 0.5, 1); }

/* 卡片精修：更顺滑的抬升与描边过渡 */
.card { transition: transform .22s var(--ease-spring), box-shadow .22s ease, border-color .22s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(255, 105, 0, 0.13), 0 2px 8px rgba(16, 17, 19, 0.05); border-color: rgba(255, 105, 0, 0.4); }
.card:hover .card-name { color: var(--accent); }
.card-name { transition: color .18s ease; }

/* 卡片 logo 衬底：浅渐变圆角托底，规避透明 logo 发灰 */
.card-icon, .modal-icon {
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.09), rgba(63, 125, 251, 0.08));
  box-shadow: inset 0 0 0 1px rgba(16, 17, 19, 0.04);
}

/* 收藏星标：悬停弹性放大 + 轻微旋转反馈 */
.btn.star { transition: transform .18s var(--ease-spring), color .18s ease, border-color .18s ease; }
.btn.star:hover { transform: scale(1.22) rotate(-8deg); }
.btn.star.active { animation: star-pop .28s var(--ease-spring); }
@keyframes star-pop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* 弹窗：顶部渐变饰条 + 更柔和入场（保留纵向滚动，避免长文案被裁） */
.modal { overflow-x: hidden; overflow-y: auto; }
.modal::before {
  content: '';
  display: block;
  height: 5px;
  margin: -22px -22px 16px;
  background: var(--grad-brand);
  opacity: 0.85;
}
.modal-mask { backdrop-filter: blur(3px); transition: opacity .2s ease; }
.modal-block.reviews { border-left: 3px solid rgba(255, 105, 0, 0.35); }

/* 口碑配色柔化：好评/吐槽行前加手绘风圆点 */
.review-cols li { position: relative; padding-left: 14px; }
.review-cols li::before {
  content: '';
  position: absolute; left: 0; top: 0.52em;
  width: 7px; height: 7px; border-radius: 50% 45% 55% 48%;
}
.review-cols .good li::before { background: #22a35a; }
.review-cols .bad li::before { background: #e5744a; }

/* 按钮与导航统一弹性缓动 */
.btn, .nav-btn, .lang-btn, .cat-chip { transition: all .18s var(--ease-spring); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255, 105, 0, 0.28); }
.btn:active, .nav-btn:active, .cat-chip:active { transform: scale(0.96); }
.cat-chip.active { background: linear-gradient(135deg, var(--mi-orange), #ff8e3c); }

/* 空状态手绘化：图标改为手绘风容器 + 呼吸动画 */
.empty-icon {
  width: 72px; height: 72px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; opacity: 1;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.1), rgba(63, 125, 251, 0.1));
  border: 2px dashed rgba(255, 105, 0, 0.35);
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  animation: empty-breathe 3.2s ease-in-out infinite;
}
@keyframes empty-breathe {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.05) rotate(2deg); }
}

/* 页脚涂鸦纹理：淡色星形与圆点装饰 */
.site-footer::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 3px at 8% 30%, rgba(255,255,255,0.07) 98%, transparent),
    radial-gradient(circle 2px at 22% 70%, rgba(255,255,255,0.05) 98%, transparent),
    radial-gradient(circle 2.5px at 45% 40%, rgba(255,255,255,0.06) 98%, transparent),
    radial-gradient(circle 2px at 68% 65%, rgba(255,255,255,0.05) 98%, transparent),
    radial-gradient(circle 3px at 88% 35%, rgba(255,255,255,0.07) 98%, transparent);
  pointer-events: none;
}
.site-footer .container { position: relative; }

/* 减少动态偏好：关闭所有装饰动画 */
@media (prefers-reduced-motion: reduce) {
  .doodle, .empty-icon { animation: none !important; }
  .btn.star:hover { transform: none; }
  .card:hover { transform: none; }
}

/* ---------- 本地部署指南（#/local） ---------- */
.local-note {
  color: var(--text-sub); font-size: 14px; line-height: 1.75;
  max-width: 820px; margin: 0 0 22px;
}
.local-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px 24px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(17, 20, 26, 0.03);
}
.local-h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 10px; }
.local-h4 { font-size: 15px; font-weight: 700; margin: 22px 0 12px; color: var(--text); }
.local-p { color: var(--text-sub); font-size: 14px; line-height: 1.8; margin: 0 0 16px; }
.local-p code, .local-tip code {
  background: var(--fill); border-radius: 5px; padding: 1px 5px;
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--mi-orange-deep);
}
.local-tip {
  color: var(--text-sub); font-size: 13px; line-height: 1.8;
  margin: 14px 0 0; padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.07), rgba(63, 125, 251, 0.05));
  border-left: 3px solid rgba(255, 105, 0, 0.45);
  border-radius: 0 10px 10px 0;
}
.local-tip strong { color: var(--text); }

.local-table { min-width: 520px; }
.local-table th { white-space: nowrap; }
.local-table td { font-variant-numeric: tabular-nums; }
.local-table tr.pick-row { background: rgba(255, 105, 0, 0.055); }
.local-table tr.pick-row td { font-weight: 700; }
.pick-badge {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em;
  color: #fff; background: var(--mi-orange); border-radius: 999px;
  vertical-align: 1px;
}
/* 单元格内条形：宽度表示相对大小，数值跟在后面 */
.local-table td.bar-cell { position: relative; min-width: 96px; }
.cell-bar {
  display: block; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 105, 0, 0.75), rgba(255, 138, 61, 0.35));
  margin-bottom: 3px; transition: width .5s var(--ease-spring);
}
.local-table td.bar-cell.tg .cell-bar {
  background: linear-gradient(90deg, rgba(43, 127, 255, 0.7), rgba(43, 127, 255, 0.28));
}
.proto-kind {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  font-size: 10.5px; font-weight: 700; border-radius: 999px;
  vertical-align: 1px;
}
.proto-kind.infer { color: var(--mi-orange-deep); background: rgba(255, 105, 0, 0.12); }
.proto-kind.tool { color: #2b6fd6; background: rgba(43, 127, 255, 0.12); }

/* 体积对比：原始 F16 轨道 + Q4_K_M 实际占比 */
.shrink-bars { display: flex; flex-direction: column; gap: 10px; }
.shrink-row { display: flex; align-items: center; gap: 12px; }
.shrink-label {
  width: 44px; flex: none; font-size: 13px; font-weight: 800;
  color: var(--text-sub); font-variant-numeric: tabular-nums;
}
.shrink-track {
  position: relative; flex: 1; height: 22px; border-radius: 7px;
  background: var(--fill); overflow: hidden;
}
.shrink-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; }
.shrink-bar.orig { background: repeating-linear-gradient(45deg, rgba(120, 124, 132, 0.16) 0 6px, rgba(120, 124, 132, 0.08) 6px 12px); }
.shrink-bar.q4 { background: linear-gradient(90deg, #ff6900, #ff9d4d); }
.shrink-val { width: 132px; flex: none; font-size: 12.5px; color: var(--text-sub); text-align: right; font-variant-numeric: tabular-nums; }
.shrink-val em { font-style: normal; color: var(--muted); }
.shrink-val strong { color: var(--mi-orange-deep); }

/* 显存档位卡片 */
.vram-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; }
.vram-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 15px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg);
  transition: transform .18s var(--ease-spring), border-color .18s;
}
.vram-card:hover { transform: translateY(-2px); border-color: rgba(255, 105, 0, 0.4); }
.vram-size { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.vram-line { font-size: 12.5px; color: var(--text-sub); display: flex; justify-content: space-between; gap: 8px; }
.vram-line strong { color: var(--text); font-variant-numeric: tabular-nums; }
.vram-line .vram-need { color: var(--mi-orange-deep); }
.vram-who { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

/* 上下文滑块 */
.ctx-calc { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.ctx-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-sub); }
.ctx-row input[type="range"] { flex: 1; min-width: 180px; accent-color: var(--mi-orange); }
#local-calc-out {
  font-weight: 800; color: var(--mi-orange-deep); font-variant-numeric: tabular-nums;
  min-width: 132px; text-align: right;
}

/* 蒸馏步骤 */
.distill-steps { margin: 0; padding: 0; list-style: none; counter-reset: ds; }
.distill-steps li {
  position: relative; padding: 0 0 18px 0; margin: 0;
}
.distill-steps li:last-child { padding-bottom: 0; }
.distill-steps li::before {
  content: ''; position: absolute; left: 21px; top: 30px; bottom: 0;
  width: 2px; background: repeating-linear-gradient(to bottom, rgba(255, 105, 0, 0.3) 0 5px, transparent 5px 10px);
}
.distill-steps li:last-child::before { display: none; }
.distill-steps strong {
  display: inline-block; margin-bottom: 5px;
  font-size: 14.5px; font-weight: 800; color: var(--text);
}
.distill-steps span {
  display: block; padding-left: 0;
  font-size: 13.5px; line-height: 1.8; color: var(--text-sub);
}

@media (max-width: 640px) {
  .local-card { padding: 18px 16px; border-radius: 16px; }
  .shrink-val { width: 96px; font-size: 11.5px; }
  .shrink-label { width: 34px; font-size: 12px; }
  .vram-grid { grid-template-columns: 1fr 1fr; }
  #local-calc-out { min-width: auto; text-align: left; }
}

/* 窄屏导航：8 个入口放不下，改为横向滚动而不是撑破页面 */
@media (max-width: 900px) {
  .header-inner { overflow: hidden; }
  .main-nav {
    overflow-x: auto; overflow-y: hidden;
    flex-wrap: nowrap; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-btn, .lang-btn { flex: none; }
  .lang-btn { margin-left: 8px; }
}
@media (max-width: 480px) {
  .nav-btn { padding: 8px 8px; font-size: 12.5px; }
  .nav-btn .nav-doodle { width: 15px; height: 15px; }
}

/* 页脚内联链接：浏览器默认蓝(#0000EE)压在深色底上只有 2:1 对比度，几乎看不清；
 * 改用品牌浅橙（10.7:1），并保留下划线让它一眼可辨是链接。 */
.site-footer p a {
  color: #ffb27a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color .15s;
}
.site-footer p a:hover { color: #ffc53d; }
.site-footer p a:focus-visible {
  outline: 2px solid #ffb27a;
  outline-offset: 2px;
  border-radius: 3px;
}

/* 正文/说明区的行内链接：统一为品牌橙，避免浏览器默认蓝在暖白底上显得突兀 */
.about a, .submit-template a, #submit-body a {
  color: #b34a00; /* 5.1:1 on the warm-white page background */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.about a:hover, #submit-body a:hover { color: var(--mi-orange); }
.about a:focus-visible, #submit-body a:focus-visible {
  outline: 2px solid rgba(255, 105, 0, 0.55);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- 详情弹窗：套餐档位表 ---------- */
#modal-plans { margin-top: 12px; }
.plan-list { display: flex; flex-direction: column; gap: 8px; }

.plan-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  background: var(--bg);
  transition: border-color .16s;
}
.plan-row:hover { border-color: rgba(255, 105, 0, 0.35); }
/* 推荐档：左侧橙色标记 */
.plan-row.rec {
  border-color: rgba(255, 105, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.07), rgba(63, 125, 251, 0.04));
  box-shadow: inset 3px 0 0 var(--mi-orange);
}

.plan-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.plan-name {
  font-size: 14px; font-weight: 800; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 7px;
}
.plan-price {
  font-size: 13.5px; font-weight: 800; color: var(--mi-orange-deep);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.plan-badge {
  font-style: normal; font-size: 10.5px; font-weight: 800;
  padding: 1px 7px; border-radius: 999px; letter-spacing: 0.02em;
}
.plan-badge.rec { color: #fff; background: var(--mi-orange); }
.plan-badge.pop { color: var(--mi-orange-deep); background: rgba(255, 105, 0, 0.14); }
.plan-badge.free { color: #2b6fd6; background: rgba(43, 127, 255, 0.13); }

.plan-quota, .plan-fit {
  font-size: 12.5px; line-height: 1.65; color: var(--text-sub);
  margin: 2px 0 0;
}
.plan-quota b, .plan-fit b {
  color: var(--text); font-weight: 700;
}
.plan-note {
  font-size: 11.5px; color: var(--muted);
  margin: 10px 0 0; line-height: 1.6;
}

@media (max-width: 640px) {
  .plan-head { flex-wrap: wrap; gap: 4px; }
  .plan-price { font-size: 13px; }
}
