/* ==========================================================
   MotionGit 站内组件（依赖 base.css）
   用户中心、仓库页、表单的组件布局参考 GitHub / Primer 的信息结构
   （gitea-github-theme 的 Primer 令牌），视觉统一到 MotionGit 深色科技风格。
   ========================================================== */

:root {
  /* Primer dark 语义色（取自 primer/dark 令牌，与 base 色板对齐） */
  --success: #3fb950; --success-bg: rgba(46,160,67,.12); --success-bd: rgba(46,160,67,.4);
  --danger: #f85149;  --danger-bg: rgba(248,81,73,.1);   --danger-bd: rgba(248,81,73,.4);
  --attention: #d29922; --attention-bg: rgba(187,128,9,.12); --attention-bd: rgba(187,128,9,.4);
  --accent: #58a6ff;  --accent-bg: rgba(56,139,253,.1);  --accent-bd: rgba(56,139,253,.4);
  --done: #a371f7;    --done-bg: rgba(163,113,247,.12);  --done-bd: rgba(163,113,247,.4);
  --radius: 12px;
  --nav-h: 64px;
}

/* ---------- 页面骨架 ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.app main { flex: 1; padding-top: var(--nav-h); }
.app .nav { background: rgba(1,4,9,.72); backdrop-filter: blur(16px) saturate(170%); -webkit-backdrop-filter: blur(16px) saturate(170%); border-bottom-color: var(--hair); }
.app .nav-links a.on { color: var(--fg); }
.page { padding: clamp(40px, 5vw, 72px) 0 clamp(80px, 9vw, 140px); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 3vw, 48px); }
.page-title { margin: 0; font-size: clamp(28px, 1vw + 22px, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.page-sub { margin: 10px 0 0; color: var(--muted); font-size: clamp(15px, .3vw + 13px, 18px); max-width: 40em; }
.glow-top { position: relative; isolation: isolate; }
.glow-top::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: calc(var(--nav-h) * -1); height: 520px; pointer-events: none;
  background: radial-gradient(40% 70% at 50% 0%, rgba(31,111,235,.16), transparent 70%), radial-gradient(30% 50% at 68% 0%, rgba(163,113,247,.1), transparent 70%); }
.muted { color: var(--muted); } .subtle { color: var(--subtle); }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 导航：用户菜单 ---------- */
.nav-user { position: relative; }
.nav-user > button { display: flex; align-items: center; gap: 6px; padding: 2px; border-radius: 999px; }
.nav-user > button svg { width: 12px; height: 12px; color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--border), 0 20px 50px -12px rgba(0,0,0,.8); display: none; }
.menu.open { display: block; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.menu-head b { display: block; color: var(--fg); font-size: 14px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--fg-2); text-align: left; }
.menu a:hover, .menu button:hover { background: rgba(240,246,252,.06); color: var(--fg); }
.menu hr { border: 0; border-top: 1px solid var(--hair); margin: 6px 0; }

/* ---------- 头像 ---------- */
.avatar { --s: 32px; width: var(--s); height: var(--s); flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--s) * .42); color: #fff; background: linear-gradient(135deg, hsl(var(--h, 220) 70% 52%), hsl(calc(var(--h, 220) + 60) 70% 46%)); box-shadow: 0 0 0 1px rgba(240,246,252,.12); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { --s: 22px; } .avatar.md { --s: 40px; } .avatar.lg { --s: 96px; } .avatar.xl { --s: clamp(160px, 14vw, 260px); }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--fg); }
.field .hint { font-size: 13px; color: var(--subtle); }
.field .err-text { font-size: 13px; color: var(--danger); }
.input, .textarea, .select { width: 100%; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--fg); font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 120px; padding: 10px 12px; line-height: 1.6; resize: vertical; font-family: inherit; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b949e'%3E%3Cpath d='M4.4 6.2 8 9.8l3.6-3.6' stroke='%238b949e' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,139,253,.25); }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.input.mono { font-family: var(--mono); font-size: 14px; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; background: var(--bg-2); color: var(--muted); font-size: 14px; white-space: nowrap; }
.input-group .input { border-radius: 0 8px 8px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--fg-2); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger); border-color: var(--border); background: var(--bg-1); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: #238636; color: #fff; border-color: rgba(240,246,252,.1); }
.btn-success:hover { background: #2ea043; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------- 提示条 / 标签 ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; border: 1px solid var(--accent-bd); background: var(--accent-bg); color: var(--fg); }
.flash.ok { border-color: var(--success-bd); background: var(--success-bg); }
.flash.err { border-color: var(--danger-bd); background: var(--danger-bg); }
.flash.warn { border-color: var(--attention-bd); background: var(--attention-bg); }
.flash-global { position: fixed; z-index: 70; top: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%); max-width: min(640px, 92vw); box-shadow: 0 20px 50px -12px rgba(0,0,0,.8); animation: flashIn .4s var(--ease), flashOut .5s 5s forwards; }
@keyframes flashIn { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes flashOut { to { opacity: 0; visibility: hidden; } }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--border); }
.tag.green { color: #7ee787; box-shadow: inset 0 0 0 1px var(--success-bd); background: var(--success-bg); }
.tag.blue { color: #79c0ff; box-shadow: inset 0 0 0 1px var(--accent-bd); background: var(--accent-bg); }
.tag.purple { color: #d2a8ff; box-shadow: inset 0 0 0 1px var(--done-bd); background: var(--done-bg); }
.tag.yellow { color: #e3b341; box-shadow: inset 0 0 0 1px var(--attention-bd); background: var(--attention-bg); }
.tag.red { color: #ff7b72; box-shadow: inset 0 0 0 1px var(--danger-bd); background: var(--danger-bg); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 盒子（Primer Box） ---------- */
.box { border-radius: var(--radius); background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--border-muted); }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-muted); font-size: 14px; }
.box-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.box-body { padding: 20px 18px; }
.box-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--border-muted); font-size: 14px; }
.box-row:first-child { border-top: 0; }
.box-row:hover { background: rgba(240,246,252,.02); }
.box.danger { box-shadow: inset 0 0 0 1px var(--danger-bd); }
.box.danger .box-head { color: var(--danger); border-bottom-color: var(--danger-bd); }
.blank { padding: clamp(40px, 5vw, 72px) 24px; text-align: center; color: var(--muted); }
.blank h3 { margin: 14px 0 6px; font-size: 20px; color: var(--fg); }
.blank p { margin: 0 auto; max-width: 30em; }
.blank .btn { margin-top: 20px; }
.blank-ico { width: 48px; height: 48px; margin: 0 auto; color: var(--subtle); }

/* ---------- 标签页（Primer UnderlineNav） ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-muted); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { color: var(--fg); font-weight: 600; }
.tabs a.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); }
.tabs .count { min-width: 20px; padding: 0 6px; height: 18px; line-height: 18px; text-align: center; border-radius: 999px; font-size: 12px; background: var(--bg-3); color: var(--fg-2); }

/* ---------- 侧栏布局（设置页） ---------- */
.with-side { display: grid; grid-template-columns: clamp(220px, 16vw, 280px) minmax(0, 1fr); gap: clamp(28px, 3vw, 56px); align-items: start; }
.side-nav { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.side-nav h4 { margin: 18px 10px 6px; font-size: 12px; font-weight: 600; color: var(--subtle); letter-spacing: .04em; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14.5px; color: var(--fg-2); }
.side-nav a:hover { background: rgba(240,246,252,.05); }
.side-nav a.on { background: rgba(240,246,252,.07); color: var(--fg); font-weight: 600; }
.side-nav a.on::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.side-nav svg { width: 16px; height: 16px; color: var(--muted); }
.section-title { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.section-sub { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; }
.divider { border: 0; border-top: 1px solid var(--border-muted); margin: 32px 0; }
.settings-form { max-width: 560px; }

/* ---------- 登录 / 注册 ---------- */
.auth { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 48px 20px 80px; position: relative; isolation: isolate; overflow: hidden; }
.auth::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 50% at 50% 0%, rgba(31,111,235,.2), transparent 70%), radial-gradient(30% 40% at 70% 10%, rgba(163,113,247,.14), transparent 70%), linear-gradient(rgba(139,148,158,.05) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, rgba(139,148,158,.05) 1px, transparent 1px) 0 0 / 56px 56px; mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent); -webkit-mask-image: radial-gradient(60% 70% at 50% 20%, #000, transparent); }
.auth-card { width: min(420px, 100%); }
.auth-card .logo { justify-content: center; margin-bottom: 28px; }
.auth-card .logo svg { width: 44px; height: 44px; }
.auth-card h1 { margin: 0 0 6px; text-align: center; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card .page-sub { text-align: center; margin: 0 auto 28px; font-size: 15px; }
.auth-panel { padding: 28px; border-radius: 16px; background: rgba(13,17,23,.8); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--border-muted), 0 40px 80px -40px rgba(0,0,0,.9); }
.oauth { display: grid; gap: 10px; }
.oauth .btn { height: 44px; justify-content: center; border-color: var(--border); background: var(--bg-1); color: var(--fg); }
.oauth .btn:hover { border-color: var(--muted); }
.or { display: flex; align-items: center; gap: 14px; margin: 22px 0; font-size: 12.5px; color: var(--subtle); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border-muted); }
.auth-alt { margin-top: 20px; padding: 16px; border-radius: 12px; text-align: center; font-size: 14px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-muted); }
.auth-alt a, .link { color: var(--accent); }
.auth-alt a:hover, .link:hover { text-decoration: underline; }
.auth-legal { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--subtle); }
.auth-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 个人主页（GitHub profile） ---------- */
.profile { display: grid; grid-template-columns: clamp(240px, 18vw, 320px) minmax(0, 1fr); gap: clamp(28px, 3vw, 56px); align-items: start; }
.profile-card { position: sticky; top: calc(var(--nav-h) + 24px); }
.profile-card .avatar.xl { margin-bottom: 18px; }
.profile-card h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.profile-card .handle { font-size: 18px; color: var(--muted); font-weight: 300; }
.profile-card .bio { margin: 16px 0; font-size: 15px; color: var(--fg-2); }
.profile-card .btn { width: 100%; }
.pmeta { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--fg-2); }
.pmeta li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pmeta svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.pmeta a:hover { color: var(--accent); }
.pstats { display: flex; gap: 14px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.pstats b { color: var(--fg); }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--border-muted); }
.stat small { display: block; font-size: 13px; color: var(--muted); }
.stat b { display: block; margin-top: 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-feature-settings: "tnum"; }
.stat .soon { font-size: 13px; color: var(--subtle); font-weight: 500; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 10px 14px; border-bottom: 1px solid var(--border-muted); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border-muted); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table code { font-size: 13px; }
.table-wrap { overflow-x: auto; }

/* ---------- 列表行（模板行） ---------- */
.trow { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--border-muted); }
.trow:first-child { border-top: 0; }
.trow .th { border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair); }
.trow .th .motion-art { aspect-ratio: 16 / 9; }
.trow .th .art-micro, .trow .th .art-bottom { display: none; }
.trow h4 { margin: 0; font-size: 16px; font-weight: 600; }
.trow h4 a:hover { color: var(--accent); }
.trow p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.trow .acts { display: flex; gap: 8px; }

/* ---------- 代码块 ---------- */
pre.code, .code-inline { font-family: var(--mono); font-size: 13.5px; }
pre.code { margin: 0; padding: 16px 18px; overflow-x: auto; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border-muted); color: var(--fg-2); line-height: 1.65; }
.copy-wrap { position: relative; }
.copy-btn { position: absolute; top: 8px; right: 8px; height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12px; color: var(--muted); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--border); }
.copy-btn:hover { color: var(--fg); }

/* ---------- 文档排版（规范、说明、条款） ---------- */
.prose { font-size: clamp(15.5px, .25vw + 14px, 17.5px); line-height: 1.8; color: var(--fg-2); max-width: 46em; }
.prose h1 { font-size: clamp(30px, 1vw + 24px, 44px); line-height: 1.2; letter-spacing: -0.025em; color: var(--fg); margin: 0 0 16px; }
.prose h2 { font-size: 1.5em; line-height: 1.3; color: var(--fg); margin: 2.2em 0 .7em; padding-bottom: .35em; border-bottom: 1px solid var(--border-muted); letter-spacing: -0.015em; }
.prose h3 { font-size: 1.2em; color: var(--fg); margin: 1.8em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose code { font-family: var(--mono); font-size: .86em; padding: .15em .4em; border-radius: 6px; background: rgba(110,118,129,.2); color: var(--fg); }
.prose pre { margin: 0 0 1.2em; padding: 16px 18px; overflow-x: auto; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border-muted); font-size: .84em; line-height: 1.65; }
.prose pre code { padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .92em; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--border-muted); text-align: left; }
.prose th { background: var(--bg-1); color: var(--fg); }
.prose blockquote { margin: 0 0 1em; padding: .2em 1em; border-left: 3px solid var(--border); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border-muted); margin: 2em 0; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr) clamp(200px, 15vw, 260px); gap: clamp(32px, 4vw, 72px); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 28px); font-size: 13.5px; }
.toc h4 { margin: 0 0 10px; font-size: 12px; color: var(--subtle); letter-spacing: .04em; }
.toc a { display: block; padding: 5px 0 5px 12px; color: var(--muted); border-left: 1px solid var(--border-muted); }
.toc a:hover { color: var(--fg); border-left-color: var(--muted); }
.toc a.l3 { padding-left: 24px; font-size: 13px; }
.draft-banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 28px; border-radius: 10px; font-size: 13.5px; color: #e3b341; background: var(--attention-bg); box-shadow: inset 0 0 0 1px var(--attention-bd); }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 8px; font-size: 14px; color: var(--fg-2); }
.pager a:hover { background: rgba(240,246,252,.06); }
.pager .on { background: var(--accent); color: #fff; font-weight: 600; }
.pager .dis { color: var(--subtle); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .with-side, .profile, .doc { grid-template-columns: minmax(0, 1fr); }
  .side-nav, .profile-card, .toc { position: static; }
  .side-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; border-bottom: 1px solid var(--border-muted); }
  .side-nav h4 { display: none; }
  .side-nav a { white-space: nowrap; }
  .side-nav a.on::before { display: none; }
  .toc { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 20px; align-items: center; }
  .profile-card .avatar.xl { --s: 88px; margin: 0; grid-row: span 2; }
  .profile-card > :not(.avatar):not(.pc-head) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .trow { grid-template-columns: 88px minmax(0, 1fr); }
  .trow .acts { grid-column: 1 / -1; }
  .auth-panel { padding: 22px; }
  .page-head { align-items: flex-start; }
}
@media (min-width: 1680px) {
  :root { --nav-h: 72px; }
  .input, .select { height: 44px; font-size: 16px; }
  .field > label, .label { font-size: 15px; }
  .tabs a { font-size: 15.5px; padding: 14px 16px; }
  .side-nav a { font-size: 15.5px; padding: 9px 12px; }
  .box-head, .box-row { font-size: 15px; }
  .table { font-size: 15px; }
  .trow h4 { font-size: 17.5px; } .trow p { font-size: 14.5px; } .trow { grid-template-columns: 150px minmax(0, 1fr) auto; }
}
@media (min-width: 2200px) { :root { --nav-h: 80px; } }

/* ---------- 市场：分类与排序（链接版） ---------- */
.mcats .btn-cat { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: var(--muted); border: 1px solid var(--border-muted); transition: all .2s; white-space: nowrap; }
.mcats .btn-cat:hover { color: var(--fg); border-color: var(--border); }
.mcats .btn-cat.on { color: #0d1117; background: var(--fg); border-color: var(--fg); }
.mtabs a { display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.mtabs a:hover { color: var(--fg); }
.mtabs a.on { background: var(--bg-3); color: var(--fg); }
.vmeta h3 a:hover, .vsub a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.vthumb > img { display: block; }
@media (min-width: 1680px) { .mcats .btn-cat { height: 38px; padding: 0 16px; font-size: 15px; } .mtabs a { height: 32px; font-size: 14.5px; } }

/* ---------- 模板仓库页 ---------- */
.repo-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; margin-bottom: 18px; }
.repo-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: clamp(18px, .5vw + 15px, 24px); min-width: 0; }
.repo-title > svg { width: 20px; height: 20px; color: var(--muted); }
.repo-title a:hover { color: var(--accent); }
.repo-title h1 { margin: 0; font-size: inherit; font-weight: 700; letter-spacing: -0.01em; }
.repo-fork { grid-column: 1; display: flex; gap: 6px; align-items: center; font-size: 13.5px; }
.repo-fork svg { width: 14px; height: 14px; }
.repo-acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; }
.repo-acts .btn { gap: 6px; }
.repo-acts .cnt { margin-left: 4px; padding: 0 7px; min-width: 22px; height: 20px; line-height: 20px; border-radius: 999px; background: var(--bg-3); font-size: 12px; font-weight: 600; color: var(--fg-2); }
.repo-body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 22vw, 380px); gap: clamp(28px, 3vw, 48px); margin-top: 28px; align-items: start; }
.repo-stage .vthumb { border-radius: 14px; box-shadow: 0 0 0 1px var(--hair), 0 40px 100px -50px rgba(31,111,235,.55); }
.repo-stage .vthumb .motion-art { aspect-ratio: 16 / 9; }
.repo-stage .vthumb .art-micro, .repo-stage .vthumb .art-bottom { display: flex; }
.repo-stage:hover .vthumb { transform: none; }
.repo-stage:hover .motion-art { filter: none; }
.repo-h { display: flex; align-items: center; gap: 8px; margin: 40px 0 14px; font-size: 18px; font-weight: 600; }
.repo-h svg { width: 18px; height: 18px; color: var(--muted); }
.readme { max-width: none; }
.repo-side { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 0; }
.get-box { padding: 22px; box-shadow: inset 0 0 0 1px var(--border), 0 30px 60px -30px rgba(0,0,0,.9); }
.get-price { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.get-price .free { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
.get-price .subtle { font-size: 13px; }
.get-meta { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--subtle); }
.get-how { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-muted); font-size: 13.5px; color: var(--fg-2); }
.get-how b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.get-how ol { margin: 0 0 8px; padding-left: 18px; }
.get-how li { margin: 3px 0; }
.side-sec { padding: 22px 2px; border-bottom: 1px solid var(--border-muted); font-size: 14px; color: var(--fg-2); }
.side-sec h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--fg); }
.side-sec p { margin: 0; }
.side-sec .pmeta { margin-top: 14px; }
.side-sec code { font-size: 12.5px; padding: 1px 6px; border-radius: 5px; background: rgba(110,118,129,.2); }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.author-row { display: flex; gap: 12px; align-items: center; }
.author-row b { display: block; font-size: 15px; }
.author-row small { font-size: 13px; }
.author-row:hover b { color: var(--accent); }
.checks-mini { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.ck { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ck svg { width: 14px; height: 14px; }
.ck.pass svg { color: var(--success); } .ck.warn svg { color: var(--attention); } .ck.fail svg { color: var(--danger); }
.report summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; list-style: none; }
.report summary::-webkit-details-marker { display: none; }
.report summary svg { width: 14px; height: 14px; }
.report form { margin-top: 12px; }
.ftree .ftr { gap: 12px; padding: 10px 18px; }
.ftree .ftr > svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ftree .fp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.ftree .fs { font-size: 12.5px; min-width: 64px; text-align: right; }
.ftree .fh { font-size: 12px; min-width: 70px; text-align: right; }
@media (max-width: 1080px) {
  .repo-body { grid-template-columns: minmax(0, 1fr); }
  .repo-side { position: static; }
  .repo-head { grid-template-columns: minmax(0, 1fr); }
  .repo-acts { grid-column: 1; grid-row: auto; }
}
@media (max-width: 640px) { .ftree .fh { display: none; } }

/* ---------- 发布 ---------- */
.pub-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 40px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border-muted); background: var(--bg-1); }
.pub-step { position: relative; padding: 24px 26px; }
.pub-step + .pub-step { border-left: 1px solid var(--border-muted); }
.pub-step .ps-n { font-family: var(--mono); font-size: 12px; color: var(--subtle); }
.pub-step h3 { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; font-size: 17px; font-weight: 600; }
.pub-step p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.pub-step .link { font-size: 13.5px; }
.pub-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tip { position: relative; cursor: help; outline: none; }
.tip-i { width: 15px; height: 15px; color: var(--subtle); transition: color .2s; }
.tip:hover .tip-i, .tip:focus-visible .tip-i { color: var(--fg); }
.tip-b { position: absolute; z-index: 20; left: -6px; bottom: calc(100% + 12px); width: max-content; max-width: min(340px, 78vw); padding: 9px 13px; border-radius: 10px; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--fg); background: rgba(22,27,34,.97); box-shadow: inset 0 0 0 1px var(--border), 0 16px 36px -12px rgba(0,0,0,.85); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.tip-b::after { content: ""; position: absolute; left: 22px; top: 100%; border: 6px solid transparent; border-top-color: rgba(22,27,34,.97); }
.tip:hover .tip-b, .tip:focus-visible .tip-b { opacity: 1; transform: none; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px 20px; border-radius: 12px; border: 1.5px dashed var(--border); background: rgba(1,4,9,.4); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-bg); }
.drop.has { border-style: solid; border-color: var(--success-bd); background: var(--success-bg); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .drop-ico { width: 28px; height: 28px; color: var(--muted); margin-bottom: 4px; }
.drop b { font-size: 15px; font-weight: 600; word-break: break-all; }
.drop .subtle { font-size: 13px; }
.drop.sm { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; padding: 14px 16px; gap: 10px; text-align: left; }
.drop.sm .drop-ico { width: 20px; height: 20px; margin: 0; }
.drop.sm b { font-size: 14px; }
.drop.sm .subtle { flex-basis: 100%; font-size: 12.5px; }
.report-box { overflow: hidden; position: sticky; top: calc(var(--nav-h) + 20px); }
.rb-head { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border-muted); }
.rb-head > svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; }
.rb-head.ok > svg { color: #fff; background: #238636; }
.rb-head.bad > svg { color: #fff; background: #da3633; }
.rb-head b { display: block; font-size: 15px; }
.rb-head small { font-size: 13px; color: var(--muted); }
.rb-row { padding: 10px 18px; font-size: 14px; gap: 10px; }
.rb-list { padding: 8px 12px 12px; border-top: 1px solid var(--border-muted); display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.rb-f { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.rb-f svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 3px; }
.rb-f.error { background: var(--danger-bg); } .rb-f.error svg { color: var(--danger); }
.rb-f.warn { background: var(--attention-bg); } .rb-f.warn svg { color: var(--attention); }
.rb-f code { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); word-break: break-all; }
@media (max-width: 1080px) { .pub-grid { grid-template-columns: minmax(0, 1fr); } .report-box { position: static; } }
@media (max-width: 760px) { .pub-steps { grid-template-columns: minmax(0, 1fr); } .pub-step + .pub-step { border-left: 0; border-top: 1px solid var(--border-muted); } }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* 图标默认尺寸：避免在弹性容器中被拉伸 */
.app svg[viewBox="0 0 16 16"] { width: 16px; height: 16px; flex: 0 0 auto; }
.flash > svg, .draft-banner > svg { width: 16px; height: 16px; margin-top: 2px; }
.box-row > svg { width: 16px; height: 16px; }
.tabs a svg { width: 16px; height: 16px; color: var(--muted); }
.tabs a.on svg { color: var(--fg); }
.blank .blank-ico { width: 40px; height: 40px; }
.drop .drop-ico { width: 28px; height: 28px; }
.drop.sm .drop-ico { width: 20px; height: 20px; }
.rb-head > svg { width: 22px; height: 22px; }
.repo-title > svg { width: 20px; height: 20px; }
.menu a svg, .menu button svg { width: 16px; height: 16px; color: var(--muted); }
.btn svg[viewBox="0 0 16 16"] { width: 16px; height: 16px; }
.nav-user > button svg { width: 12px; height: 12px; }
.table-wrap .table { min-width: 600px; }

/* ---------- 卡片：样式分支色点 ---------- */
.vsub { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vsub-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsw { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 2px 7px 2px 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--border-muted); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.vsw i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px var(--bg); margin-right: -3px; }
.vsw span { margin-left: 8px; }
.vsw:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- 技术细节：等宽标签、刻度线、裁切角标 ---------- */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.kicker b { color: var(--fg); font-weight: 600; }
.kicker .sep { width: 18px; height: 1px; background: var(--border-strong); }
.ruler { position: relative; height: 10px; margin: 0 0 22px; background-image: repeating-linear-gradient(90deg, rgba(139,148,158,.28) 0 1px, transparent 1px 8px); mask-image: linear-gradient(90deg, #000 0, #000 70%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 0, #000 70%, transparent); }
.ruler::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, rgba(139,148,158,.6) 0 1px, transparent 1px 80px); }
.crop { position: absolute; inset: -10px; pointer-events: none; z-index: 4; }
.crop i { position: absolute; width: 14px; height: 14px; border-color: rgba(240,246,252,.45); border-style: solid; border-width: 0; }
.crop i:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.crop i:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.crop i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.crop i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.dotgrid { position: relative; isolation: isolate; }
.dotgrid::after { content: ""; position: absolute; z-index: -1; inset: calc(var(--nav-h) * -1) 0 auto 0; height: 560px; pointer-events: none; background-image: radial-gradient(rgba(139,148,158,.22) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent 75%); -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent 75%); }

/* ---------- 模板广场：头部 ---------- */
.idx-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; margin-bottom: 28px; }
.idx-head .page-title { font-size: clamp(32px, 1.6vw + 22px, 60px); }
.idx-stats { display: flex; gap: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--border-muted); background: rgba(13,17,23,.6); backdrop-filter: blur(8px); }
.idx-stats div { padding: 12px 20px; min-width: 110px; }
.idx-stats div + div { border-left: 1px solid var(--border-muted); }
.idx-stats small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--subtle); text-transform: uppercase; }
.idx-stats b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--fg); font-feature-settings: "tnum"; }
.idx-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: center; padding: 14px 0; margin-bottom: 28px; border-top: 1px solid var(--border-muted); border-bottom: 1px solid var(--border-muted); position: sticky; top: var(--nav-h); z-index: 20; background: rgba(1,4,9,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.idx-bar .mcats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.idx-bar .mcats::-webkit-scrollbar { display: none; }
.mcats .btn-cat .n { margin-left: 6px; font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.mcats .btn-cat.on .n { color: #57606a; }
.idx-tools { display: flex; gap: 10px; align-items: center; }
.idx-search { display: flex; align-items: center; gap: 8px; height: 36px; width: clamp(200px, 16vw, 320px); padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-muted); background: var(--bg-1); color: var(--subtle); }
.idx-search:focus-within { border-color: var(--accent); }
.idx-search svg { width: 14px; height: 14px; }
.idx-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--fg); font-size: 14px; }
.idx-meta { display: flex; justify-content: space-between; align-items: center; margin: -10px 0 18px; font-family: var(--mono); font-size: 12px; color: var(--subtle); }
@media (max-width: 1080px) { .idx-head, .idx-bar { grid-template-columns: minmax(0, 1fr); } .idx-tools { flex-wrap: wrap; } .idx-stats div { min-width: 0; flex: 1; } }
@media (max-width: 640px) { .idx-stats { display: grid; grid-template-columns: 1fr 1fr; } .idx-stats div:nth-child(3) { border-left: 0; } .idx-stats div:nth-child(n+3) { border-top: 1px solid var(--border-muted); } .idx-search { width: 100%; } .idx-bar { position: static; } }

/* ==========================================================
   模板详情页 v2：统一宽画幅 · 规格条 · 样式分支 · 技术细节
   ========================================================== */
.repo .repo-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; margin-bottom: 24px; }
.repo .repo-head .kicker svg { width: 14px; height: 14px; color: var(--muted); }
.repo .repo-head .kicker a:hover { color: var(--fg); }
.mono-pill { padding: 1px 8px; border-radius: 999px; font-family: var(--mono); font-size: 11.5px; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--border); text-transform: none; letter-spacing: 0; }
.repo .repo-title { margin-top: 12px; font-size: clamp(28px, 1.2vw + 20px, 48px); }
.repo .repo-title h1 { font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.repo-sum { margin: 10px 0 0; max-width: 48em; color: var(--muted); font-size: clamp(15px, .3vw + 13px, 18px); }
.repo .repo-acts { grid-column: 2; grid-row: 1; align-self: end; }
.repo .repo-fork { margin-top: 8px; }

.spec-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin: 0 0 8px; border-radius: 12px; background: rgba(13,17,23,.65); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--border-muted); overflow: hidden; }
.spec-strip div { padding: 12px 16px; min-width: 0; }
.spec-strip div + div { border-left: 1px solid var(--border-muted); }
.spec-strip dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.spec-strip dd { margin: 3px 0 0; font-family: var(--mono); font-size: 13.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-strip dd.ok::before, .spec-strip dd.warn::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; vertical-align: middle; background: var(--success); box-shadow: 0 0 8px var(--success); }
.spec-strip dd.warn::before { background: var(--attention); box-shadow: 0 0 8px var(--attention); }
.repo .tabs { margin-top: 8px; }
.repo .repo-body { grid-template-columns: minmax(0, 1fr) clamp(320px, 21vw, 400px); margin-top: 32px; }

.stage { position: relative; margin: 10px 10px 0; }
.stage .stage-frame { border-radius: 10px; box-shadow: 0 0 0 1px var(--hair), 0 50px 120px -50px rgba(31,111,235,.55); }
.stage .stage-frame .motion-art { aspect-ratio: 16 / 9; }
.stage .stage-frame .art-micro, .stage .stage-frame .art-bottom { display: flex; }
.stage:hover .vthumb { transform: none; }
.stage:hover .motion-art { filter: none; }
.stage-hud { position: absolute; z-index: 8; top: 14px; left: 14px; display: flex; gap: 6px; font-family: var(--mono); font-size: 11px; pointer-events: none; }
.stage-hud span { padding: 4px 9px; border-radius: 999px; color: #fff; background: rgba(1,4,9,.6); backdrop-filter: blur(8px); }
.stage-hud .rec { display: inline-flex; gap: 6px; align-items: center; }
.stage-hud .rec i { width: 6px; height: 6px; border-radius: 50%; background: #ff5f56; animation: pulse 1.4s ease-in-out infinite; }
.stage.swap .stage-frame { animation: stageSwap .5s var(--ease); }
@keyframes stageSwap { 0% { opacity: .2; transform: scale(.985); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
.stage-note { font-size: 12.5px; margin: 12px 0 0 10px; }

.style-rail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 22px 10px 0; padding: 6px; border-radius: 14px; background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--border-muted); }
.sr-k { padding: 0 10px 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--subtle); }
.sr-item { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 10px; border-radius: 10px; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.sr-item i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 3px color-mix(in srgb, var(--c) 40%, transparent); }
.sr-item:hover { color: var(--fg); background: rgba(240,246,252,.04); }
.sr-item.on { color: var(--fg); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--border); }
.sr-item.on i { box-shadow: 0 0 0 2px var(--bg-3), 0 0 0 3.5px var(--c), 0 0 14px var(--c); }
.sr-all { margin-left: auto; padding: 0 10px; font-size: 13px; color: var(--accent); }

.agent-tip { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin: 32px 0 0; padding: 18px 20px; border-radius: 14px; overflow: hidden; background: linear-gradient(120deg, rgba(121,192,255,.07), rgba(163,113,247,.07) 50%, rgba(247,120,186,.05)); box-shadow: inset 0 0 0 1px rgba(163,113,247,.28); }
.agent-tip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--grad); }
.at-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(163,113,247,.14); box-shadow: inset 0 0 0 1px rgba(163,113,247,.4); color: #d2a8ff; }
.at-ico svg { width: 16px; height: 16px; }
.agent-tip b { display: block; font-size: 15.5px; font-weight: 600; color: var(--fg); }
.agent-tip p { margin: 4px 0 0; font-size: 14.5px; color: var(--fg-2); line-height: 1.7; max-width: 52em; }

.sec-h { margin: 48px 0 16px; }
.sec-h h2 { margin: 8px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.ptable .cval { display: inline-flex; gap: 8px; align-items: center; }
.ptable .cval i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.flash-cell { animation: cellFlash 1s var(--ease); }
@keyframes cellFlash { 0% { background: rgba(163,113,247,.22); } 100% { background: transparent; } }

.get-box .get-price .tag { font-size: 12px; }
.get-kv { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border-muted); font-size: 12px; }
.get-kv div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.get-kv dt { color: var(--subtle); }
.get-kv dd { margin: 0; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handoff { font-size: 12.5px; white-space: pre-wrap; padding: 12px 14px 34px; margin-bottom: 8px; }
.get-how .copy-btn { top: auto; bottom: 16px; }

.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(280px, 22vw, 420px), 1fr)); gap: 28px 20px; }
.style-card .vthumb .motion-art { aspect-ratio: 16 / 9; }
.style-card .sc-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.style-card .sc-meta > div { display: flex; align-items: center; gap: 8px; }
.style-card .sc-meta i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.style-card .sc-meta code { font-size: 12px; }
.style-card p { margin: 4px 0 0 20px; font-size: 13.5px; }

@media (max-width: 1280px) { .spec-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .spec-strip div:nth-child(5) { border-left: 0; } .spec-strip div:nth-child(n+5) { border-top: 1px solid var(--border-muted); } }
@media (max-width: 1080px) { .repo .repo-head { grid-template-columns: minmax(0, 1fr); } .repo .repo-acts { grid-column: 1; grid-row: auto; } }
@media (max-width: 640px) {
  .spec-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-strip div:nth-child(odd) { border-left: 0; } .spec-strip div:nth-child(n+3) { border-top: 1px solid var(--border-muted); }
  .stage { margin: 8px 6px 0; } .stage-hud span:last-child { display: none; }
  .style-rail { margin: 18px 0 0; } .sr-all { margin-left: 0; }
  .agent-tip { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1680px) { .spec-strip dd { font-size: 15px; } .spec-strip div { padding: 14px 20px; } .agent-tip p { font-size: 15.5px; } .sr-item { height: 38px; font-size: 15px; } }

/* ---------- 使用 / 社区 ---------- */
.use-steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 16px; background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--border-muted); }
.use-steps li { position: relative; padding: clamp(24px, 2vw, 36px); }
.use-steps li + li { border-left: 1px solid var(--border-muted); }
.us-n { position: absolute; top: clamp(24px, 2vw, 36px); right: clamp(24px, 2vw, 36px); font-family: var(--mono); font-size: 12px; color: var(--subtle); }
.us-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(121,192,255,.08); box-shadow: inset 0 0 0 1px rgba(121,192,255,.3); color: #79c0ff; }
.us-ico svg { width: 20px; height: 20px; }
.use-steps h3 { margin: 20px 0 8px; font-size: clamp(18px, .4vw + 15px, 22px); font-weight: 600; }
.use-steps p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.use-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.use-grid .lg svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.comm-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; margin-top: 24px; }
.feed { position: relative; }
.feed::before { content: ""; position: absolute; left: 25px; top: 18px; bottom: 18px; width: 1px; background: var(--border-muted); }
.feed-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px 14px 44px; border-top: 1px solid var(--border-muted); font-size: 14px; }
.feed-row:first-child { border-top: 0; }
.feed-row:hover { background: rgba(240,246,252,.02); }
.feed-dot { position: absolute; left: 21px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px #58a6ff; }
.feed-row:first-child .feed-dot { background: #a371f7; box-shadow: 0 0 10px #a371f7; }
@media (max-width: 1080px) { .use-steps, .use-grid, .comm-grid { grid-template-columns: minmax(0, 1fr); } .use-steps li + li { border-left: 0; border-top: 1px solid var(--border-muted); } }
@media (max-width: 1080px) { .repo .repo-body { grid-template-columns: minmax(0, 1fr); } .repo .repo-side { position: static; } }
@media (max-width: 640px) { .stage-hud span:nth-child(2) { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* ---------- 作品墙页 ---------- */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 13vw, 300px), 1fr)); gap: 12px; }
.sc-tile { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg-1); box-shadow: 0 0 0 1px var(--hair); transition: transform .3s var(--ease), box-shadow .3s; }
.sc-tile:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(240,246,252,.18), 0 20px 40px -20px rgba(0,0,0,.9); }
.sc-tile img, .sc-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-tile video { opacity: 0; transition: opacity .3s; }
.sc-tile video.on { opacity: 1; }
.sc-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 8px; padding: 22px 10px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(1,4,9,.75)); opacity: 0; transition: opacity .2s; }
.sc-tile:hover .sc-cap { opacity: 1; }
.sc-cap small { font-family: var(--mono); font-size: 10.5px; color: rgba(255,255,255,.7); }

/* ---------- API 与额度 / 邀请 ---------- */
.credit-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); border-radius: 16px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border-muted); background: var(--bg-1); }
.cc-main { padding: 22px 24px; }
.cc-num { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 14px; }
.cc-num b { font-family: var(--mono); font-size: 44px; font-weight: 600; letter-spacing: -0.02em; }
.cc-num span { color: var(--muted); }
.cc-bar { height: 6px; border-radius: 6px; background: var(--bg-3); overflow: hidden; }
.cc-bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.cc-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.cc-cta { display: flex; gap: 14px; align-items: center; padding: 22px 24px; border-left: 1px solid var(--border-muted); background: linear-gradient(135deg, rgba(163,113,247,.1), rgba(247,120,186,.06)); }
.cc-cta:hover { background: linear-gradient(135deg, rgba(163,113,247,.16), rgba(247,120,186,.1)); }
.cc-cta > svg:first-child { width: 22px; height: 22px; color: #d2a8ff; }
.cc-cta div { flex: 1; } .cc-cta b { display: block; font-size: 15px; } .cc-cta small { color: var(--muted); font-size: 13px; }
.key-row { flex-wrap: wrap; }
.key-acts { display: flex; gap: 6px; align-items: center; }
.key-acts .input { width: 92px; height: 32px; font-size: 13px; }
.invite-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; padding: 24px; border-radius: 16px; background: linear-gradient(120deg, rgba(121,192,255,.06), rgba(163,113,247,.08)); box-shadow: inset 0 0 0 1px rgba(163,113,247,.3); }
.invite-hero h3 { margin: 10px 0 12px; font-size: 20px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.invite-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.invite-rules li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 14px; color: var(--fg-2); }
.invite-rules b { font-family: var(--mono); font-size: 18px; color: #d2a8ff; }
.invite-land { max-width: 760px; }
.gain { list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--border-muted); background: var(--bg-1); }
.gain li { display: grid; grid-template-columns: 44px 180px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 18px 22px; font-size: 14.5px; color: var(--muted); }
.gain li + li { border-top: 1px solid var(--border-muted); }
.gain b { color: var(--fg); font-size: 16px; }
.gn { font-family: var(--mono); font-size: 12px; color: var(--subtle); }

/* ---------- 模板页：分享、智能能力、保管提示 ---------- */
.share-hint { display: flex; gap: 8px; align-items: center; margin: -8px 0 18px; font-size: 13px; color: var(--muted); }
.share-hint svg { width: 14px; height: 14px; color: #d2a8ff; }
.smart { margin-top: 20px; padding: 18px 20px; border-radius: 14px; background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--border-muted); }
.sm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 14px 0; }
.sm-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border-muted); }
.sm-item svg { width: 18px; height: 18px; color: #79c0ff; }
.sm-item b { display: block; font-size: 14px; } .sm-item small { font-size: 12px; color: var(--subtle); font-family: var(--mono); }
.smart > p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.keep-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6; color: var(--fg-2); background: var(--attention-bg); box-shadow: inset 0 0 0 1px var(--attention-bd); }
.keep-note svg { width: 14px; height: 14px; margin-top: 3px; color: var(--attention); }
@media (max-width: 900px) { .credit-card, .invite-hero { grid-template-columns: minmax(0, 1fr); } .cc-cta { border-left: 0; border-top: 1px solid var(--border-muted); } .gain li { grid-template-columns: 32px minmax(0, 1fr); } .gain li > span:last-child { grid-column: 2; } }
