/* ============================================================
   台风.dev · 白空与星 — 白色为主的二次元配色
   取色自友利奈绪：星之森制服绯红 × 领结琥珀 × 瞳色钴蓝 × 银发冷灰
   昼：白空（white-dominant）  夜：星空（Charlotte 星夜）
   ============================================================ */

:root {
  --bg: #f8f9fb;
  --bg2: #eef1f5;
  --surface: #ffffff;
  --surface2: #f4f6f9;
  --overlay: rgba(255, 255, 255, .9);
  --line: #dfe5ec;
  --line-strong: #b9c4d0;
  --ink: #20242c;
  --muted: #556070;
  --faint: #6e7a8a;

  --brand: #e8506a;
  --brand-deep: #c92a3d;
  --brand-ink: #a61e2e;
  --sky: #4dabf7;
  --sky-deep: #1971c2;
  --lav: #b197fc;
  --lav-deep: #6741d9;
  --mint: #37b24d;
  --amber: #f2b632;
  --amber-deep: #946800;
  --magenta: #d6336c;
  --green: #2f9e44;
  --red: #e03131;
  --violet: #7048e8;
  --blue: #228be6;

  --grad-brand: linear-gradient(120deg, #f2b632, #e8506a 48%, #4dabf7);
  --grad-btn: linear-gradient(120deg, #d6334c, #a61e2e);
  --hard: 0 4px 0 var(--line);
  --shadow: 0 18px 44px -18px rgba(32, 36, 44, .22);
  --radius: 18px;
  --nav-h: 76px;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --star-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.4 7.6L22 12l-7.6 2.4L12 22l-2.4-7.6L2 12l7.6-2.4z' fill='%23ffffff'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
  --bg: #10141d;
  --bg2: #161c28;
  --surface: #1a2130;
  --surface2: #232c3d;
  --overlay: rgba(16, 20, 29, .9);
  --line: rgba(116, 192, 252, .2);
  --line-strong: rgba(116, 192, 252, .42);
  --ink: #f2f5fa;
  --muted: #b9c3d2;
  --faint: #8b97a8;
  --brand: #ff8787;
  --brand-deep: #ff6b6b;
  --brand-ink: #ffc9c9;
  --sky: #74c0fc;
  --sky-deep: #74c0fc;
  --lav: #b197fc;
  --lav-deep: #b197fc;
  --mint: #69db7c;
  --amber: #fcc419;
  --amber-deep: #fcc419;
  --magenta: #f783ac;
  --green: #69db7c;
  --red: #ff6b6b;
  --violet: #b197fc;
  --blue: #74c0fc;
  --hard: 0 4px 0 rgba(116, 192, 252, .14);
  --shadow: 0 18px 44px -18px rgba(0, 0, 0, .65);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--sans);
  background: var(--bg);
  background-image: radial-gradient(rgba(77, 171, 247, .07) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--ink);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}
html.theme-anim body { transition: background-color .4s ease, color .4s ease; }
[data-theme="dark"] body { background-image: radial-gradient(rgba(252, 196, 25, .06) 1.5px, transparent 1.5px); }

::selection { background: rgba(242, 182, 50, .45); }

/* ---- 星色滚动条 ---- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--amber), var(--brand));
  border-radius: 8px; border: 2.5px solid var(--bg2);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--brand-deep), var(--sky-deep)); }
* { scrollbar-width: thin; scrollbar-color: var(--brand) var(--bg2); }

a { color: var(--brand-deep); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
kbd {
  font-family: var(--mono); font-size: .72em; color: var(--muted);
  border: 1.5px solid var(--line-strong); border-bottom-width: 3px;
  border-radius: 6px; padding: 1px 6px; background: var(--surface);
}
svg { display: block; }

/* ---- 主题切换：圆形扩散 ---- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ============ 飘落星屑 ============ */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.petal {
  position: absolute; top: -6vh;
  background: linear-gradient(135deg, #fff, var(--amber));
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 5px rgba(242, 182, 50, .55));
  animation: petal-fall linear infinite;
}
[data-theme="dark"] .petal { filter: drop-shadow(0 0 7px rgba(252, 196, 25, .8)); }
@keyframes petal-fall {
  0% { transform: translate3d(0, -6vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--sway), 108vh, 0) rotate(var(--spin)); }
}
.burst {
  position: fixed; z-index: 220; pointer-events: none;
  width: 12px; height: 12px;
  background: linear-gradient(135deg, #fff, var(--amber));
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: burst-fly .8s cubic-bezier(.2, .7, .3, 1) forwards;
}
.burst-heart { background: none; clip-path: none; width: auto; height: auto; color: var(--brand-deep); font-size: 15px; line-height: 1; }
@keyframes burst-fly {
  from { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.4); opacity: 0; }
}

/* ============ 阅读进度条 ============ */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 120;
  height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--amber), var(--brand), var(--sky), var(--lav));
  border-radius: 0 4px 4px 0;
  transform-origin: left; transform: scaleX(0);
}

/* ============ 导航：下滑收成浮动胶囊 ============ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.nav-inner {
  max-width: 1180px; margin: 0 auto; height: var(--nav-h);
  padding: 0 24px; display: flex; align-items: center; gap: 26px;
  border: 2px solid transparent; border-radius: 0;
  transition: all .45s cubic-bezier(.35, 1.3, .4, 1);
}
.nav.scrolled .nav-inner {
  max-width: 920px; height: 58px; margin: 10px auto;
  padding: 0 20px; border-radius: 999px;
  background: var(--overlay);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--line-strong);
  box-shadow: var(--hard), var(--shadow);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--brand-deep); }
.logo-mark { width: 32px; height: 32px; animation: spin-slow 18s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.logo-text { font-weight: 900; font-size: 1.16rem; color: var(--ink); letter-spacing: .5px; }
.logo-text i { font-style: normal; color: var(--brand-deep); font-family: var(--mono); }

.nav-links { position: relative; display: flex; gap: 2px; margin-left: 6px; }
.nav-links a {
  position: relative; padding: 8px 15px; border-radius: 999px;
  color: var(--muted); font-size: .95rem; font-weight: 700;
  transition: color .2s, background .2s, transform .2s;
}
.nav-links a:hover { color: var(--brand-deep); background: var(--surface2); transform: translateY(-1px); }
.nav-links a.active { color: var(--brand-deep); }
.nav-indicator {
  position: absolute; bottom: 1px; height: 3px; border-radius: 3px;
  background: var(--grad-brand);
  transition: left .4s cubic-bezier(.5, 1.5, .4, 1), width .4s cubic-bezier(.5, 1.5, .4, 1), opacity .3s;
  pointer-events: none;
}

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 2px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 8px 12px;
  box-shadow: var(--hard);
  transition: color .2s, border-color .2s, transform .15s, box-shadow .15s;
}
.icon-btn:hover { color: var(--brand-deep); border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 6px 0 var(--line); }
.icon-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--line); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-btn { display: none; }

/* ============ 主容器 ============ */
.view { min-height: 70vh; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ============ Hero：白空封面 ============ */
.hero { position: relative; overflow: hidden; padding: calc(var(--nav-h) + 64px) 0 110px; }
.hero-cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 32%;
  transition: filter .5s ease;
}
[data-theme="dark"] .hero-cover { filter: brightness(.34) saturate(.7) hue-rotate(-8deg); }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(248, 249, 251, .1) 0%, rgba(248, 249, 251, .42) 62%, var(--bg) 99%);
}
[data-theme="dark"] .hero-veil { background: linear-gradient(180deg, rgba(16, 20, 29, .3) 0%, rgba(16, 20, 29, .66) 62%, var(--bg) 99%); }
.wave-divider { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 34px; }

.hero-inner {
  position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .84rem; font-weight: 700; color: var(--brand-deep);
  border: 2px solid var(--line-strong); border-radius: 999px;
  padding: 6px 18px; background: var(--surface); box-shadow: var(--hard);
}
.hero-eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.hero-title {
  margin: 24px 0 16px; font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.3; font-weight: 900; letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .65);
}
[data-theme="dark"] .hero-title { text-shadow: 0 2px 14px rgba(0, 0, 0, .6); }
.hero-title .grad {
  color: var(--brand-deep);
  background: linear-gradient(transparent 64%, rgba(242, 182, 50, .55) 64%);
  border-radius: 4px; padding: 0 4px;
}
[data-theme="dark"] .hero-title .grad { color: var(--brand); background: linear-gradient(transparent 64%, rgba(252, 196, 25, .28) 64%); }
.type-cursor { display: inline-block; width: 4px; height: .9em; vertical-align: -.1em; background: var(--brand-deep); margin-left: 5px; border-radius: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-sub { max-width: 600px; color: var(--muted); font-size: 1.04rem; font-weight: 600; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
[data-theme="dark"] .hero-sub { text-shadow: none; }
.hero-sub b { color: var(--brand-ink); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin: 30px 0 30px; }
.stat b { display: block; font-size: 1.85rem; font-weight: 900; font-family: var(--mono); color: var(--brand-deep); }
.stat span { color: var(--faint); font-size: .84rem; font-weight: 700; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 999px; font-size: .98rem; font-weight: 800;
  border: 2px solid transparent; transition: transform .18s, box-shadow .18s, background .2s, color .2s;
}
.btn:active { transform: scale(.96); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: 0 5px 0 #7d1622, 0 14px 30px -12px rgba(201, 42, 61, .5); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 0 #7d1622, 0 20px 36px -12px rgba(201, 42, 61, .6); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #7d1622; }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--hard); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); transform: translateY(-3px); box-shadow: 0 6px 0 var(--line); }

/* ---- 看板娘：友利奈绪（透明贴纸） ---- */
.hero-mascot { position: relative; background: none; border: none; padding: 100px 0 0; justify-self: center; }
.hero-mascot img {
  width: min(360px, 80vw);
  filter: drop-shadow(0 16px 26px rgba(32, 36, 44, .22));
  transform: rotate(1.5deg); animation: mascot-float 5.5s ease-in-out infinite;
  transition: transform .3s;
}
[data-theme="dark"] .hero-mascot img { filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)) drop-shadow(0 0 22px rgba(252, 196, 25, .18)); }
.hero-mascot:hover img { transform: rotate(-1deg) scale(1.03); }
.hero-mascot.bounce img { animation: mascot-bounce .6s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes mascot-float { 50% { translate: 0 -12px; } }
@keyframes mascot-bounce { 35% { transform: rotate(-4deg) scale(1.07) translateY(-14px); } 70% { transform: rotate(3deg) scale(.97); } }
.mascot-bubble {
  position: absolute; top: 0; left: 4%; z-index: 2; max-width: 260px;
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: 16px;
  padding: 10px 16px; font-size: .87rem; font-weight: 700; color: var(--muted);
  box-shadow: var(--hard); transform: rotate(-3deg); text-align: left;
  transition: opacity .3s;
}
.mascot-bubble::after {
  content: ""; position: absolute; bottom: -9px; left: 44%;
  width: 14px; height: 14px; background: var(--surface);
  border-right: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong);
  transform: rotate(45deg);
}
.mascot-bubble.fade { opacity: 0; }

/* ============ 区块 ============ */
.section { padding: 58px 0 30px; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.6rem; font-weight: 900; }
.section-head h2::before { content: "✦ "; color: var(--amber); }
.section-sub { color: var(--faint); font-size: .9rem; font-weight: 600; }
.section-head .more { margin-left: auto; font-size: .9rem; font-weight: 800; }

/* ============ 筛选条 ============ */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  padding: 7px 18px; border-radius: 999px; font-size: .88rem; font-weight: 800;
  background: var(--surface); border: 2px solid var(--line); color: var(--muted);
  box-shadow: var(--hard); transition: all .2s;
}
.chip:nth-child(odd) { transform: rotate(-1.2deg); }
.chip:nth-child(even) { transform: rotate(1deg); }
.chip:hover { color: var(--brand-deep); border-color: var(--line-strong); transform: rotate(0) translateY(-2px); }
.chip.active { background: #fff4d6; border-color: var(--amber); color: var(--amber-deep); transform: rotate(-2deg) scale(1.05); }
[data-theme="dark"] .chip.active { background: rgba(252, 196, 25, .16); color: var(--amber); }
.sort-select {
  margin-left: auto; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); color: var(--ink); border: 2px solid var(--line);
  font-family: inherit; font-size: .88rem; font-weight: 700; outline: none; box-shadow: var(--hard);
}
.sort-select:focus { border-color: var(--brand); }

/* ============ 文章卡片：白贴纸 ============ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--hard);
  transition: transform .25s cubic-bezier(.3, 1.4, .4, 1), border-color .25s, box-shadow .25s;
}
.post-card:hover { transform: translateY(-6px) rotate(-.5deg); border-color: var(--line-strong); box-shadow: 0 9px 0 var(--line), var(--shadow); }
.post-card.featured { grid-column: 1 / -1; flex-direction: row; }
.post-card.featured .card-cover { width: 42%; min-height: 260px; flex-shrink: 0; }
.post-card.featured .card-title { font-size: 1.45rem; }

.card-cover {
  position: relative; height: 150px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 24% 30%, hsl(var(--h) 65% 93% / .9), transparent 58%),
    radial-gradient(circle at 80% 76%, hsl(calc(var(--h) + 40) 60% 90% / .8), transparent 55%),
    linear-gradient(150deg, hsl(var(--h) 45% 97%), hsl(calc(var(--h) + 40) 40% 93%));
}
[data-theme="dark"] .card-cover {
  background:
    radial-gradient(circle at 24% 30%, hsl(var(--h) 50% 32% / .85), transparent 58%),
    radial-gradient(circle at 80% 76%, hsl(calc(var(--h) + 25) 45% 27% / .75), transparent 55%),
    linear-gradient(150deg, hsl(var(--h) 40% 21%), hsl(calc(var(--h) + 40) 35% 16%));
}
.card-cover::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: var(--star-uri); background-size: 82px 82px; background-position: 12px 8px;
}
[data-theme="dark"] .card-cover::after { opacity: .14; }
.cover-glyph {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 2.9rem; font-weight: 800;
  color: hsl(var(--h) 50% 36%); text-shadow: 0 2px 0 rgba(255, 255, 255, .7);
  transition: transform .35s cubic-bezier(.3, 1.6, .4, 1);
}
[data-theme="dark"] .cover-glyph { color: hsl(var(--h) 80% 78%); text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.post-card:hover .cover-glyph { transform: scale(1.16) rotate(-6deg); }
.cover-badge {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  font-size: .74rem; font-weight: 900; letter-spacing: 1px;
  padding: 4px 14px; border-radius: 999px; transform: rotate(-3deg);
  background: linear-gradient(120deg, var(--amber), var(--brand-deep)); color: #fff;
  box-shadow: 0 3px 0 rgba(125, 22, 34, .35);
}

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px; flex: 1; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: .76rem; font-weight: 800; padding: 3px 12px; border-radius: 999px;
  color: hsl(var(--th, 350) 60% 34%); background: hsl(var(--th, 350) 65% 96%);
  border: 1.5px solid hsl(var(--th, 350) 55% 84%); transform: rotate(-1deg);
}
.tag:nth-child(even) { transform: rotate(1.4deg); }
[data-theme="dark"] .tag { color: hsl(var(--th, 350) 80% 76%); background: hsl(var(--th, 350) 40% 24% / .6); border-color: hsl(var(--th, 350) 50% 42%); }
.card-title { font-size: 1.12rem; font-weight: 900; line-height: 1.55; color: var(--ink); transition: color .2s; }
.post-card:hover .card-title { color: var(--brand-deep); }
.card-excerpt {
  color: var(--muted); font-size: .9rem; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  margin-top: auto; padding-top: 12px; border-top: 2px dashed var(--line);
  display: flex; gap: 14px; flex-wrap: wrap; color: var(--faint); font-size: .78rem; font-family: var(--mono); font-weight: 600;
}
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.card-link { position: absolute; inset: 0; z-index: 2; }
.card-link:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; border-radius: var(--radius); }

.empty-state { text-align: center; padding: 70px 20px; color: var(--faint); font-weight: 700; }
.empty-state .big { font-size: 3rem; font-family: var(--mono); color: var(--line-strong); }
.empty-kaomoji { font-size: 2.6rem; color: var(--line-strong); margin-bottom: 14px; animation: mascot-float 4s ease-in-out infinite; }
.empty-title { font-size: 1.25rem; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
.empty-sub { font-size: .92rem; color: var(--muted); margin-bottom: 22px; }
.empty-state .btn { margin: 0 auto; }
.post-grid > .empty-state { grid-column: 1 / -1; background: var(--surface); border: 2px dashed var(--line-strong); border-radius: var(--radius); }
.footer-empty { color: var(--faint); font-size: .9rem; font-weight: 600; }

/* ============ 文章页 ============ */
.post-page { padding-top: calc(var(--nav-h) + 36px); }
.post-layout {
  max-width: 1180px; margin: 0 auto; padding: 0 24px 60px;
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px;
}
.post-main { min-width: 0; }
.post-hero { margin-bottom: 30px; }
.crumb { font-size: .86rem; font-weight: 700; color: var(--faint); margin-bottom: 18px; display: inline-flex; gap: 8px; align-items: center; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--brand-deep); }
.post-title { font-size: clamp(1.55rem, 3.4vw, 2.2rem); font-weight: 900; line-height: 1.45; margin: 14px 0 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--faint); font-size: .84rem; font-family: var(--mono); font-weight: 600; align-items: center; }
.post-meta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-banner {
  height: 180px; border-radius: var(--radius); margin: 26px 0 8px;
  position: relative; overflow: hidden; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--hard);
  background:
    radial-gradient(circle at 20% 30%, hsl(var(--h) 65% 93% / .9), transparent 55%),
    radial-gradient(circle at 82% 70%, hsl(calc(var(--h) + 40) 60% 90% / .8), transparent 55%),
    linear-gradient(150deg, hsl(var(--h) 45% 97%), hsl(calc(var(--h) + 40) 40% 93%));
}
[data-theme="dark"] .post-banner {
  background:
    radial-gradient(circle at 20% 30%, hsl(var(--h) 50% 32% / .85), transparent 55%),
    radial-gradient(circle at 82% 70%, hsl(calc(var(--h) + 25) 45% 27% / .75), transparent 55%),
    linear-gradient(150deg, hsl(var(--h) 40% 21%), hsl(calc(var(--h) + 40) 35% 16%));
}
.post-banner::after { content: ""; position: absolute; inset: 0; opacity: .45; background-image: var(--star-uri); background-size: 96px 96px; }
[data-theme="dark"] .post-banner::after { opacity: .12; }
.post-banner .cover-glyph { font-size: 3.8rem; }

/* ---- Markdown 正文 ---- */
.md { font-size: 1.02rem; color: var(--ink); }
.md > * { margin-bottom: 1.15em; }
.md h2 {
  font-size: 1.45rem; font-weight: 900; margin: 2em 0 .8em;
  padding-left: 15px; border-left: 5px solid var(--brand); border-radius: 2px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.md h3 { font-size: 1.16rem; font-weight: 800; margin: 1.6em 0 .7em; color: var(--sky-deep); scroll-margin-top: calc(var(--nav-h) + 20px); }
.md h3::before { content: "▸ "; color: var(--amber); }
.md strong { color: var(--brand-deep); font-weight: 800; }
.md em { color: var(--lav-deep); font-style: normal; border-bottom: 2px dotted var(--lav); }
.md a { border-bottom: 2px solid var(--line-strong); font-weight: 700; }
.md a:hover { border-bottom-color: var(--brand); color: var(--brand-deep); }
.md ul, .md ol { padding-left: 1.6em; }
.md li { margin-bottom: .4em; }
.md li::marker { color: var(--brand); font-weight: 800; }
.md blockquote {
  padding: 14px 20px; border-radius: 0 16px 16px 0;
  border-left: 5px solid var(--amber);
  background: linear-gradient(90deg, rgba(242, 182, 50, .12), transparent);
  color: var(--muted);
}
.md blockquote p { color: var(--muted); margin: 0; }
.md hr { border: none; height: 3px; border-radius: 3px; background: var(--grad-brand); opacity: .55; margin: 2em 0; }
.md code:not(pre code) {
  font-family: var(--mono); font-size: .85em; font-weight: 600;
  background: #fdf1f2; color: var(--brand-ink);
  border: 1.5px solid #f3d3d8; border-radius: 7px; padding: 2px 7px;
}
[data-theme="dark"] .md code:not(pre code) { background: var(--surface2); color: var(--brand-ink); border-color: var(--line); }
.md table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.md th, .md td { padding: 10px 16px; border: 2px solid var(--line); text-align: left; white-space: nowrap; }
.md th { background: var(--surface2); color: var(--brand-deep); font-weight: 800; }
.md tr:nth-child(even) td { background: rgba(77, 171, 247, .05); }

/* ---- 代码块：星夜 ink ---- */
.code-block { border-radius: 16px; overflow: hidden; border: 2px solid var(--line); background: #141a26; box-shadow: var(--hard); }
.code-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: rgba(252, 196, 25, .07); border-bottom: 2px solid rgba(116, 192, 252, .16); }
.code-dots { display: flex; gap: 6px; }
.code-dots i { width: 10px; height: 10px; border-radius: 50%; }
.code-dots i:nth-child(1) { background: #ff8787; }
.code-dots i:nth-child(2) { background: #fcc419; }
.code-dots i:nth-child(3) { background: #69db7c; }
.code-lang { font-family: var(--mono); font-size: .74rem; font-weight: 700; color: #8b97a8; letter-spacing: 1.5px; text-transform: uppercase; margin-left: 6px; }
.copy-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1.5px solid rgba(116, 192, 252, .4);
  color: #b9c3d2; font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 4px 12px;
  transition: all .2s;
}
.copy-btn:hover { color: #fcc419; border-color: #fcc419; transform: translateY(-1px); }
.copy-btn.ok { color: #69db7c; border-color: #69db7c; }
.copy-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.code-block pre { padding: 16px 18px; overflow-x: auto; }
.code-block code { font-family: var(--mono); font-size: .86rem; line-height: 1.75; color: #eef2f7; white-space: pre; }
.tok-kw { color: #ff8787; } .tok-str { color: #fcc419; } .tok-com { color: #7d8ea0; font-style: italic; }
.tok-num { color: #b197fc; } .tok-fn { color: #74c0fc; }

/* ---- 丝线目录 ---- */
.toc { position: sticky; top: calc(var(--nav-h) + 28px); align-self: start; max-height: calc(100vh - var(--nav-h) - 60px); overflow-y: auto; padding-left: 20px; }
.toc::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--amber), var(--brand), var(--sky)); opacity: .55; }
.toc-dot {
  position: absolute; left: 1px; top: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--brand-deep); border: 2.5px solid var(--surface);
  box-shadow: 0 0 10px var(--amber); transition: top .25s ease;
}
.toc-title { font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: 2px; color: var(--faint); margin-bottom: 12px; }
.toc-title::before { content: "✦ "; color: var(--amber); }
.toc a {
  display: block; padding: 5px 12px; font-size: .85rem; font-weight: 600; color: var(--muted);
  border-radius: 10px; transition: all .2s; line-height: 1.55;
}
.toc a.h3 { padding-left: 26px; font-size: .8rem; }
.toc a:hover { color: var(--brand-deep); background: var(--surface2); }
.toc a.active { color: var(--brand-deep); background: rgba(232, 80, 106, .1); font-weight: 800; }

/* ---- 点赞 / 分享 ---- */
.post-actions { display: flex; gap: 14px; margin: 40px 0 10px; flex-wrap: wrap; }
.like-btn, .share-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 26px; border-radius: 999px; font-size: .94rem; font-weight: 800;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--muted);
  box-shadow: var(--hard); transition: all .2s;
}
.like-btn svg, .share-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.like-btn:hover { color: var(--brand-deep); border-color: var(--brand); transform: translateY(-2px); }
.like-btn.liked { color: #fff; background: var(--grad-btn); border-color: transparent; box-shadow: 0 5px 0 #7d1622; }
.like-btn.liked svg { fill: currentColor; animation: heart-pop .45s cubic-bezier(.3, 1.8, .4, 1); }
@keyframes heart-pop { 40% { transform: scale(1.5) rotate(-8deg); } }
.share-btn:hover { color: var(--sky-deep); border-color: var(--sky); transform: translateY(-2px); }

/* ---- 上一篇 / 下一篇 ---- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 34px 0; }
.pn-card {
  padding: 18px 22px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--line); box-shadow: var(--hard); transition: all .2s; color: var(--ink);
}
.pn-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: 0 7px 0 var(--line); }
.pn-card.next { text-align: right; }
.pn-dir { font-size: .76rem; font-family: var(--mono); font-weight: 700; color: var(--faint); display: block; margin-bottom: 6px; }
.pn-title { font-weight: 800; font-size: .94rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-card:hover .pn-title { color: var(--brand-deep); }
.pn-card.placeholder { visibility: hidden; }

/* ---- 相关文章 ---- */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rel-card { padding: 18px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--hard); color: var(--ink); transition: all .2s; }
.rel-card:hover { border-color: var(--line-strong); transform: translateY(-4px) rotate(-.6deg); }
.rel-card .tag { margin-bottom: 10px; display: inline-block; }
.rel-title { font-size: .92rem; font-weight: 800; line-height: 1.6; }
.rel-card:hover .rel-title { color: var(--brand-deep); }

/* ---- 评论区 ---- */
.comments { margin-top: 46px; }
.comment-form { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 26px; box-shadow: var(--hard); }
.comment-form h3 { font-size: 1.05rem; font-weight: 900; margin-bottom: 14px; }
.comment-form h3 span { color: var(--brand-deep); font-family: var(--mono); }
.cf-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cf-row input {
  flex: 1; min-width: 180px; padding: 11px 16px; border-radius: 14px;
  background: var(--bg); border: 2px solid var(--line); color: var(--ink);
  font-family: inherit; font-size: .92rem; font-weight: 600; outline: none; transition: border-color .2s;
}
.comment-form textarea {
  width: 100%; min-height: 96px; resize: vertical; padding: 12px 16px;
  border-radius: 14px; background: var(--bg); border: 2px solid var(--line);
  color: var(--ink); font-family: inherit; font-size: .92rem; font-weight: 600; outline: none; transition: border-color .2s;
}
.cf-row input:focus, .comment-form textarea:focus { border-color: var(--brand); }
.cf-foot { display: flex; align-items: center; margin-top: 12px; gap: 14px; }
.cf-hint { color: var(--faint); font-size: .8rem; font-weight: 600; }
.cf-foot .btn { margin-left: auto; padding: 9px 24px; font-size: .9rem; }

.comment { display: flex; gap: 14px; padding: 18px 4px; border-bottom: 2px dashed var(--line); animation: comment-in .45s cubic-bezier(.3, 1.4, .4, 1); }
@keyframes comment-in { from { opacity: 0; translate: 0 14px; } }
.comment-avatar {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.05rem; color: #fff; transform: rotate(-3deg);
  background: linear-gradient(135deg, hsl(var(--ah) 70% 62%), hsl(calc(var(--ah) + 60) 65% 52%));
  border: 2px solid #fff; box-shadow: var(--hard);
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.comment-name { font-weight: 800; font-size: .94rem; }
.comment-date { color: var(--faint); font-size: .78rem; font-family: var(--mono); }
.comment-del { margin-left: auto; background: none; border: none; color: var(--faint); font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; transition: all .2s; }
.comment-del:hover { color: var(--red); background: rgba(224, 49, 49, .1); }
.comment-text { color: var(--muted); font-size: .92rem; word-break: break-word; }
.no-comment { color: var(--faint); text-align: center; padding: 26px; font-size: .9rem; font-weight: 700; }

/* ============ 归档页 ============ */
.page-head { padding: calc(var(--nav-h) + 52px) 0 10px; }
.page-head h1 { font-size: 2.1rem; font-weight: 900; }
.page-head h1::before { content: "✦ "; color: var(--amber); }
.page-head p { color: var(--muted); margin-top: 8px; font-weight: 600; }

.archive-year { font-family: var(--mono); font-size: 1.5rem; font-weight: 900; color: var(--brand-deep); margin: 36px 0 8px; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--amber), var(--brand), transparent); }
.tl-item { position: relative; padding: 13px 0 13px 14px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.tl-item::before {
  content: ""; position: absolute; left: -27px; top: 24px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); transition: all .2s;
}
.tl-item:hover::before { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 12px var(--amber); transform: scale(1.2); }
.tl-date { font-family: var(--mono); font-size: .84rem; font-weight: 700; color: var(--faint); flex-shrink: 0; }
.tl-title { font-weight: 800; color: var(--ink); font-size: 1.02rem; transition: color .2s; }
.tl-item:hover .tl-title { color: var(--brand-deep); }
.tl-tags { display: flex; gap: 6px; }

/* ============ 标签页 ============ */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 14px; padding: 26px 0 10px; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 999px; font-weight: 800;
  color: hsl(var(--th) 60% 34%); background: hsl(var(--th) 65% 96%);
  border: 2px solid hsl(var(--th) 55% 84%); box-shadow: 0 3px 0 hsl(var(--th) 55% 88%);
  transition: all .2s; transform: rotate(-1deg);
}
.tag-pill:nth-child(even) { transform: rotate(1.2deg); }
[data-theme="dark"] .tag-pill { color: hsl(var(--th) 80% 76%); background: hsl(var(--th) 40% 24% / .6); border-color: hsl(var(--th) 50% 42%); box-shadow: 0 3px 0 hsl(var(--th) 45% 18%); }
.tag-pill:hover { transform: translateY(-4px) rotate(0) scale(1.05); }
.tag-pill b { font-family: var(--mono); font-size: .8em; opacity: .75; }
.tag-section-title { display: flex; align-items: center; gap: 12px; margin: 40px 0 18px; font-size: 1.3rem; font-weight: 900; }

/* ============ 关于页 ============ */
.about-hero { display: flex; gap: 40px; align-items: center; padding: 26px 0 10px; flex-wrap: wrap; }
.about-mascot { position: relative; flex-shrink: 0; padding-top: 88px; }
.about-mascot img {
  width: 250px; transform: rotate(-2deg);
  filter: drop-shadow(0 14px 22px rgba(32, 36, 44, .2));
  animation: mascot-float 6s ease-in-out infinite;
}
[data-theme="dark"] .about-mascot img { filter: drop-shadow(0 14px 26px rgba(0,0,0,.6)) drop-shadow(0 0 20px rgba(252,196,25,.16)); }
.about-mascot .mascot-bubble { top: 0; left: auto; right: 0; max-width: 200px; transform: rotate(3deg); }
.about-mascot .mascot-bubble::after { right: auto; left: 30%; }
.about-bio { flex: 1; min-width: 260px; }
.about-bio h2 { font-size: 1.7rem; font-weight: 900; margin-bottom: 10px; }
.about-bio h2 i { font-style: normal; color: var(--brand-deep); font-family: var(--mono); }
.about-bio p { color: var(--muted); max-width: 620px; font-weight: 600; }
.about-links { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 36px; }
.panel { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--hard); }
.panel h3 { font-size: 1.08rem; font-weight: 900; margin-bottom: 20px; }
.panel h3::before { content: "✦ "; color: var(--amber); }
.skill-empty { text-align: center; padding: 6px 0 2px; }
.radar-ghost { width: min(250px, 78%); margin: 0 auto 12px; }
.radar-core { animation: pulse 2.4s ease-in-out infinite; }
.skill-zero {
  display: inline-block; margin-top: 10px;
  font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--faint);
  border: 1.5px dashed var(--line-strong); border-radius: 999px; padding: 3px 14px;
}

.fact-list { display: grid; gap: 14px; }
.fact { display: flex; gap: 14px; align-items: flex-start; }
.fact-ico { width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transform: rotate(-3deg);
  background: hsl(var(--fh) 65% 96%); color: hsl(var(--fh) 60% 36%); border: 2px solid hsl(var(--fh) 55% 86%); }
[data-theme="dark"] .fact-ico { background: hsl(var(--fh) 40% 24% / .6); color: hsl(var(--fh) 80% 76%); border-color: hsl(var(--fh) 50% 42%); }
.fact-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fact b { display: block; font-size: .94rem; font-weight: 800; }
.fact span { color: var(--muted); font-size: .84rem; font-weight: 600; }

.heatmap-panel { margin-top: 26px; }
.gh-profile { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.gh-avatar {
  width: 76px; height: 76px; border-radius: 22px; flex-shrink: 0; overflow: hidden;
  border: 2px solid var(--line-strong); box-shadow: var(--hard);
  background: var(--surface2) var(--star-uri) center / 40px no-repeat;
}
.gh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gh-id { flex: 1; min-width: 220px; }
.gh-id b { font-size: 1.1rem; font-weight: 900; }
.gh-id a { font-family: var(--mono); font-weight: 700; margin-left: 8px; }
.gh-id p { color: var(--muted); font-size: .9rem; font-weight: 600; margin: 4px 0 10px; }
.gh-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.gh-chips span {
  font-size: .78rem; font-weight: 700; color: var(--muted);
  border: 1.5px solid var(--line); background: var(--surface2);
  border-radius: 999px; padding: 3px 12px;
}
.gh-chips b { color: var(--brand-deep); font-family: var(--mono); margin-right: 4px; }
.gh-stale {
  font-size: .74rem; font-weight: 800; color: var(--amber-deep);
  background: rgba(242, 182, 50, .16); border: 1.5px dashed var(--amber);
  border-radius: 999px; padding: 3px 12px;
}
.gh-repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.repo-card {
  display: flex; flex-direction: column; gap: 8px;
  border: 2px solid var(--line); border-radius: 14px; padding: 16px;
  background: var(--surface2); color: var(--ink); transition: all .2s;
}
.repo-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: 0 6px 0 var(--line); }
.repo-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.repo-top b { font-weight: 800; font-size: .95rem; color: var(--brand-deep); }
.repo-vis { font-size: .7rem; font-family: var(--mono); font-weight: 700; color: var(--faint); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; }
.repo-card p {
  color: var(--muted); font-size: .82rem; font-weight: 600; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.repo-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .74rem; font-family: var(--mono); font-weight: 700; color: var(--faint); margin-top: auto; }
.repo-lang { display: inline-flex; align-items: center; gap: 6px; }
.repo-lang i { width: 9px; height: 9px; border-radius: 50%; }
.gh-note { color: var(--faint); font-size: .78rem; font-weight: 600; margin-top: 8px; }
.gh-skeleton { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.sk-avatar { width: 76px; height: 76px; border-radius: 22px; }
.sk-lines { flex: 1; display: grid; gap: 10px; }
.gh-skeleton i, .sk-avatar {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--line) 50%, var(--surface2) 75%);
  background-size: 200% 100%; animation: sk-shimmer 1.2s linear infinite;
}
.sk-lines i { height: 14px; }
.sk-lines i:nth-child(2) { width: 70%; }
.sk-lines i:nth-child(3) { width: 45%; }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sk-grid i { height: 96px; border-radius: 14px; }
@keyframes sk-shimmer { to { background-position: -200% 0; } }
.gh-error { text-align: center; padding: 26px 10px; }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 4px; overflow-x: auto; padding: 6px 2px 10px; }
.hm-cell { width: 13px; height: 13px; border-radius: 4px; background: var(--surface2); border: 1px solid var(--line); transition: transform .15s; }
.hm-cell:hover { transform: scale(1.35); outline: 2px solid var(--amber); }
.hm-cell.l1 { background: #d0ebff; } .hm-cell.l2 { background: #74c0fc; }
.hm-cell.l3 { background: #339af0; } .hm-cell.l4 { background: #1971c2; box-shadow: 0 0 6px rgba(51, 154, 240, .5); }
[data-theme="dark"] .hm-cell.l1 { background: #1f2b47; } [data-theme="dark"] .hm-cell.l2 { background: #2b4a7a; }
[data-theme="dark"] .hm-cell.l3 { background: #3f74b8; } [data-theme="dark"] .hm-cell.l4 { background: #74c0fc; }
.hm-legend { display: flex; align-items: center; gap: 5px; justify-content: flex-end; color: var(--faint); font-size: .76rem; font-weight: 700; margin-top: 6px; }
.hm-legend .hm-cell { cursor: default; }
.hm-legend .hm-cell:hover { transform: none; outline: none; }

/* ============ 页脚 ============ */
.footer { position: relative; background: var(--bg2); margin-top: 90px; }
.footer-wave { position: absolute; top: -32px; left: 0; width: 100%; height: 33px; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 44px 24px 30px;
  display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: 32px;
}
.footer-brand p { color: var(--faint); font-size: .88rem; font-weight: 600; margin-top: 12px; }
.footer-col h4 { font-size: .8rem; letter-spacing: 2px; color: var(--faint); margin-bottom: 14px; font-family: var(--mono); font-weight: 700; }
.footer-col a { display: block; color: var(--muted); font-size: .9rem; font-weight: 600; padding: 4px 0; transition: color .2s, transform .2s; }
.footer-col a:hover { color: var(--brand-deep); transform: translateX(3px); }
.footer-base {
  max-width: 1180px; margin: 0 auto; padding: 18px 24px;
  border-top: 2px dashed var(--line-strong); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--faint); font-size: .8rem; font-family: var(--mono); font-weight: 600;
}
.footer-wind { color: var(--brand-deep); }

/* ============ 回到顶部 ============ */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--hard);
  opacity: 0; pointer-events: none; translate: 0 14px; transition: all .3s;
}
.back-top.show { opacity: 1; pointer-events: auto; translate: 0 0; }
.back-top:hover { background: var(--grad-btn); color: #fff; border-color: transparent; transform: translateY(-3px); }
.back-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ============ 搜索 ============ */
.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(32, 36, 44, .38); backdrop-filter: blur(7px);
  display: flex; justify-content: center; align-items: flex-start; padding: 12vh 20px 20px;
  animation: fade-in .18s ease;
}
[data-theme="dark"] .search-overlay { background: rgba(5, 8, 14, .62); }
.search-overlay[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }
.search-panel {
  width: 640px; max-width: 100%; max-height: 70vh; display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--line-strong);
  border-radius: 22px; overflow: hidden; box-shadow: 0 8px 0 var(--line), var(--shadow);
  animation: panel-in .26s cubic-bezier(.2, .9, .3, 1.25);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-18px) scale(.96); } }
.search-input-row { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 2px dashed var(--line); }
.search-input-row svg { width: 19px; height: 19px; fill: none; stroke: var(--brand-deep); stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0; }
.search-input-row input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-size: 1.05rem; font-weight: 700; font-family: inherit; }
.search-input-row input::placeholder { color: var(--faint); font-weight: 600; }
.search-results { overflow-y: auto; padding: 8px; flex: 1; }
.search-item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 12px 16px; border-radius: 14px; transition: background .15s; }
.search-item.active, .search-item:hover { background: var(--surface2); }
.si-title { font-weight: 800; font-size: .95rem; color: var(--ink); display: block; }
.search-item.active .si-title { color: var(--brand-deep); }
.si-excerpt { color: var(--faint); font-size: .8rem; font-weight: 600; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.si-tags { display: flex; gap: 6px; margin-top: 6px; }
.search-item mark { background: #fff3bf; color: var(--amber-deep); border-radius: 4px; padding: 0 3px; }
[data-theme="dark"] .search-item mark { background: rgba(252, 196, 25, .25); color: #ffe066; }
.search-empty { text-align: center; color: var(--faint); padding: 36px 16px; font-size: .92rem; font-weight: 700; }
.search-hints { display: flex; gap: 20px; padding: 10px 20px; border-top: 2px dashed var(--line); color: var(--faint); font-size: .76rem; font-weight: 700; }
.search-hints kbd { margin-right: 3px; }

/* ============ Toast ============ */
.toast-stack { position: fixed; bottom: 26px; left: 50%; translate: -50% 0; z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 2px solid var(--line);
  border-left: 6px solid var(--green); color: var(--ink);
  padding: 12px 24px; border-radius: 999px; font-size: .9rem; font-weight: 800;
  box-shadow: var(--hard), var(--shadow); animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.3);
}
.toast.warn { border-left-color: var(--amber); }
.toast.err { border-left-color: var(--red); }
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; translate: 0 18px; scale: .9; } }
@keyframes toast-out { to { opacity: 0; translate: 0 18px; } }

/* ============ 入场动画 ============ */
.reveal { opacity: 0; translate: 0 26px; scale: .98; transition: opacity .6s ease, translate .6s cubic-bezier(.3, 1.3, .4, 1), scale .6s cubic-bezier(.3, 1.3, .4, 1); }
.reveal.in { opacity: 1; translate: 0 0; scale: 1; }
.hero-copy > * { animation: hero-in .7s cubic-bezier(.3, 1.3, .4, 1) backwards; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .14s; }
.hero-copy > *:nth-child(3) { animation-delay: .23s; }
.hero-copy > *:nth-child(4) { animation-delay: .32s; }
.hero-copy > *:nth-child(5) { animation-delay: .41s; }
.hero-mascot { animation: hero-in .8s cubic-bezier(.3, 1.3, .4, 1) .3s backwards; }
@keyframes hero-in { from { opacity: 0; translate: 0 30px; scale: .96; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: 0 0; scale: 1; }
  .petals { display: none; }
}

/* ============ 友链页 ============ */
.links-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.friend-card {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--line); box-shadow: var(--hard); color: var(--ink);
  transition: all .2s;
}
.friend-card:hover { border-color: var(--brand); transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 7px 0 var(--line); }
.friend-avatar {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; overflow: hidden;
  border: 2px solid var(--line-strong);
  background: var(--surface2) var(--star-uri) center / 26px no-repeat;
}
.friend-avatar.sm { width: 40px; height: 40px; border-radius: 12px; background-size: 20px; }
.friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
.friend-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.friend-body b { font-weight: 800; font-size: .98rem; }
.friend-card:hover .friend-body b { color: var(--brand-deep); }
.friend-body p { color: var(--muted); font-size: .82rem; font-weight: 600; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.friend-host { font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--faint); }
.friend-badge {
  position: absolute; top: -10px; right: 12px;
  font-size: .68rem; font-weight: 900; letter-spacing: 1px;
  padding: 2px 10px; border-radius: 999px; transform: rotate(2deg);
  background: linear-gradient(120deg, var(--amber), var(--brand)); color: #fff;
  box-shadow: 0 2px 0 rgba(125, 22, 34, .3);
}
.link-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 26px; align-items: start; }
.link-form .cf-row input.invalid { border-color: var(--red); }
.link-preview { position: sticky; top: calc(var(--nav-h) + 24px); }
.link-preview .friend-card { pointer-events: none; }
.link-preview .friend-badge { display: none; }
.app-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--line); box-shadow: var(--hard); margin-bottom: 12px;
  animation: comment-in .4s cubic-bezier(.3, 1.4, .4, 1);
}
.app-body { flex: 1; min-width: 0; }
.app-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-top b { font-weight: 800; font-size: .95rem; }
.app-body p { color: var(--muted); font-size: .84rem; font-weight: 600; margin-top: 2px; }
.status-chip { font-size: .7rem; font-weight: 900; padding: 2px 10px; border-radius: 999px; border: 1.5px solid; }
.st-pending { color: var(--amber-deep); border-color: var(--amber); background: rgba(242, 182, 50, .14); }
.st-approved { color: var(--green); border-color: var(--green); background: rgba(47, 158, 68, .12); }
.st-rejected { color: var(--red); border-color: var(--red); background: rgba(224, 49, 49, .1); }
[data-theme="dark"] .st-pending { color: var(--amber); }
[data-theme="dark"] .st-approved { color: var(--green); }
[data-theme="dark"] .st-rejected { color: var(--red); }
.app-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 260px; }
.btn.sm { padding: 5px 12px; font-size: .76rem; border-radius: 999px; box-shadow: 0 2px 0 var(--line); }
.btn.sm.danger:hover { color: var(--red); border-color: var(--red); }
.toast-action {
  margin-left: 6px; background: var(--grad-btn); color: #fff; border: none;
  font-size: .78rem; font-weight: 800; border-radius: 999px; padding: 4px 14px;
}

/* ============ RSS 面板 ============ */
.rss-panel { width: 560px; }
.rss-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 2px dashed var(--line); }
.rss-head h3 { font-size: 1.1rem; font-weight: 900; }
.rss-head h3::first-letter { color: var(--amber); }
.rss-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.rss-what { color: var(--muted); font-size: .92rem; font-weight: 600; line-height: 1.8; }
.rss-what b { color: var(--brand-deep); }
.rss-url-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rss-url-row code {
  flex: 1; min-width: 200px; font-family: var(--mono); font-size: .8rem; font-weight: 600;
  background: var(--surface2); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 9px 12px; color: var(--sky-deep); word-break: break-all;
}
.rss-url-row .btn { padding: 8px 18px; font-size: .84rem; }
.rss-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.rss-actions .btn { padding: 10px 22px; font-size: .9rem; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 56px; }
  .hero-mascot { justify-self: start; margin-left: 30px; }
}

@media (max-width: 720px) {
  :root { --nav-h: 68px; }
  .nav-inner { gap: 10px; padding: 0 14px; }
  .nav.scrolled .nav-inner { max-width: calc(100% - 16px); margin: 8px auto; padding: 0 14px; }
  .search-trigger kbd { display: none; }
  .menu-btn { display: flex; }
  .nav-indicator { display: none; }
  .nav-links {
    position: fixed; top: calc(var(--nav-h) + 4px); left: 10px; right: 10px;
    flex-direction: column; gap: 2px; padding: 12px;
    background: var(--overlay); backdrop-filter: blur(16px);
    border: 2px solid var(--line-strong); border-radius: 20px; box-shadow: var(--hard), var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; animation: panel-in .25s cubic-bezier(.2, .9, .3, 1.2); }
  .nav-links a { padding: 12px 16px; }

  .hero { padding: calc(var(--nav-h) + 40px) 0 90px; }
  .hero-mascot { margin-left: 16px; padding-top: 112px; }
  .mascot-bubble { left: 0; max-width: 230px; }
  .hero-stats { gap: 22px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card.featured { flex-direction: column; }
  .post-card.featured .card-cover { width: 100%; min-height: 160px; }
  .post-nav { grid-template-columns: 1fr; }
  .pn-card.placeholder { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .gh-repos { grid-template-columns: 1fr; }
  .sk-grid { grid-template-columns: 1fr; }
  .links-wall { grid-template-columns: 1fr; }
  .link-layout { grid-template-columns: 1fr; }
  .link-preview { position: static; }
  .app-row { flex-wrap: wrap; }
  .app-body { flex: 1 1 calc(100% - 60px); }
  .app-actions { flex: 1 1 100%; max-width: none; justify-content: flex-start; }
  .link-form .cf-foot { flex-wrap: wrap; }
  .link-form .cf-hint { flex: 1 1 100%; }
  .link-form .cf-foot .btn { margin-left: 0; flex: 1 1 100%; justify-content: center; }
  .about-mascot .mascot-bubble { right: 0; max-width: 190px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .sort-select { margin-left: 0; width: 100%; }
  .tl-item { gap: 8px; }
  .wrap, .hero-inner, .post-layout { padding-left: 16px; padding-right: 16px; }
  .back-top { right: 16px; bottom: 16px; }
}

@media (max-width: 380px) {
  .nav-inner { gap: 8px; padding: 0 10px; }
  .logo-mark { display: none; }
  .logo-text { font-size: 1rem; }
}