/* ==========================================================================
   ICQ · 导航 —— 前台样式
   设计取向：纸张底色 + 细描边 + 一丢丢绿。动效只走 transform / opacity。
   ========================================================================== */

:root {
  --bg: #f4f3ee;
  --bg-2: #eeece4;
  --surface: #fffdf8;
  --surface-2: #f8f6ef;
  --ink: #14171a;
  --ink-2: #4b5158;
  --ink-3: #8b9098;
  --line: #e3e0d5;
  --line-2: #d2cec0;
  --dot: rgba(20, 23, 26, .10);

  --accent: #1cb86b;
  --accent-08: rgba(28, 184, 107, .08);
  --accent-14: rgba(28, 184, 107, .14);
  --accent-20: rgba(28, 184, 107, .20);
  --accent-ink: #17975a;

  --coral: #ff6b57;
  --amber: #f3c14b;
  --blue: #3aa0ff;

  --radius: 16px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-1: 0 1px 2px rgba(16, 18, 28, .04), 0 10px 26px -18px rgba(16, 18, 28, .35);
  --shadow-2: 0 2px 4px rgba(16, 18, 28, .05), 0 24px 44px -26px rgba(16, 18, 28, .45);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC",
          "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #101217;
  --bg-2: #14171d;
  --surface: #171b22;
  --surface-2: #1c212a;
  --ink: #eef1f5;
  --ink-2: #a8b0bb;
  --ink-3: #6f7885;
  --line: #262c35;
  --line-2: #333b47;
  --dot: rgba(240, 244, 250, .12);
  --accent-08: rgba(28, 184, 107, .10);
  --accent-14: rgba(28, 184, 107, .18);
  --accent-20: rgba(28, 184, 107, .26);
  --accent-ink: #4fd892;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .30), 0 12px 28px -20px rgba(0, 0, 0, .8);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 28px 52px -30px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #101217;
    --bg-2: #14171d;
    --surface: #171b22;
    --surface-2: #1c212a;
    --ink: #eef1f5;
    --ink-2: #a8b0bb;
    --ink-3: #6f7885;
    --line: #262c35;
    --line-2: #333b47;
    --dot: rgba(240, 244, 250, .12);
    --accent-08: rgba(28, 184, 107, .10);
    --accent-14: rgba(28, 184, 107, .18);
    --accent-20: rgba(28, 184, 107, .26);
    --accent-ink: #4fd892;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .30), 0 12px 28px -20px rgba(0, 0, 0, .8);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 28px 52px -30px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .45s var(--ease), color .45s var(--ease);
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

::selection { background: var(--accent-20); color: var(--ink); }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, dl, dd, dt { margin: 0; }

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

img, svg { display: block; }

/* 滚动条 */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip:focus { transform: none; }

.wrap, .topbar__in, .foot__in {
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.ico { width: 20px; height: 20px; flex: none; }
.ico--lg { width: 22px; height: 22px; }

/* ==========================================================================
   公告条
   ========================================================================== */
.announce {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter);
  background: var(--accent-08);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.announce p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
  box-shadow: 0 0 0 4px var(--accent-14);
  animation: pulse 2.4s var(--ease) infinite;
}
.announce__link { flex: none; color: var(--accent-ink); font-weight: 600; border-bottom: 1px solid var(--accent-14); }
.announce__link:hover { border-color: var(--accent); }
.announce__close {
  margin-left: auto; flex: none;
  width: 24px; height: 24px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-3);
  font-size: 17px; line-height: 1; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.announce__close:hover { background: var(--accent-14); color: var(--ink); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-08); }
  50% { box-shadow: 0 0 0 7px transparent; }
}

/* ==========================================================================
   顶栏
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.topbar.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 12px 30px -26px rgba(16, 18, 28, .5);
}
.topbar__in {
  display: flex; align-items: center; gap: 18px;
  height: 66px;
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__mark { width: 30px; height: 30px; display: grid; place-items: center; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand__text em {
  font-style: normal; font-size: 9.5px; letter-spacing: .16em;
  color: var(--ink-3); text-transform: uppercase; margin-top: 2px;
}

.flower { width: 100%; height: 100%; overflow: visible; }
.petal { transform-origin: 32px 32px; }
.petal--a { fill: var(--accent); }
.petal--b { fill: var(--coral); }
.petal--c { fill: var(--amber); }
.petal--d { fill: var(--blue); }
.flower__core { fill: var(--surface); stroke: var(--ink); stroke-width: 2.4; }

.topnav { display: flex; align-items: center; gap: 4px; margin-left: 10px; flex-wrap: wrap; }
.topnav a {
  position: relative;
  padding: 7px 10px; border-radius: 8px;
  font-size: 13px; color: var(--ink-2);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.topnav a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px;
  height: 1.5px; border-radius: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.topnav a:hover { color: var(--ink); }
.topnav a:hover::after { transform: scaleX(1); }

.topbar__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }

.iconbtn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), background-color .2s var(--ease);
}
.iconbtn:hover { color: var(--accent-ink); border-color: var(--accent-14); transform: translateY(-1px); }
.iconbtn .ico { width: 17px; height: 17px; }
.iconbtn .ico--sun { display: none; }
html[data-theme="dark"] .iconbtn .ico--moon { display: none; }
html[data-theme="dark"] .iconbtn .ico--sun { display: block; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .iconbtn .ico--moon { display: none; }
  html[data-theme="auto"] .iconbtn .ico--sun { display: block; }
}

.ghostbtn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 11px;
  font-size: 13px; color: var(--ink);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.ghostbtn:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.ghostbtn--solid { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ghostbtn--solid:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

/* ==========================================================================
   首屏
   ========================================================================== */
main { position: relative; }

.hero {
  position: relative;
  padding: clamp(44px, 8vw, 92px) 0 8px;
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin-inline: auto;
  max-width: 900px;
}
.hero__spot {
  position: absolute; inset: -20% -10% auto -30%; height: 640px;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(320px 320px at var(--spot-x, 18%) var(--spot-y, 10%), var(--accent-14), transparent 70%),
    radial-gradient(circle at 50% 50%, var(--dot) 1px, transparent 1.2px) 0 0 / 26px 26px;
  -webkit-mask-image: radial-gradient(70% 70% at 30% 20%, #000 20%, transparent 78%);
  mask-image: radial-gradient(70% 70% at 30% 20%, #000 20%, transparent 78%);
  opacity: .55;
  transition: opacity .6s var(--ease);
}
.hero > :not(.hero__spot) { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: ""; width: 18px; height: 1.5px; border-radius: 2px; background: var(--accent);
}

.hero__title {
  margin: 18px 0 0;
  font-size: clamp(2.15rem, 5.4vw, 3.55rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero__title .ch {
  display: inline-block;
  transform-origin: 50% 100%;
}
.hero__title .ch--space { width: .28em; }

.hero__sub {
  margin-top: 16px;
  max-width: 560px;
  font-size: clamp(14.5px, 1.5vw, 16px);
  color: var(--ink-2);
  line-height: 1.75;
}

/* 搜索 */
.search {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin-top: 30px;
  width: min(560px, 100%);
  height: 54px; padding: 0 14px 0 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-08), var(--shadow-1);
  transform: translateY(-1px);
}
.search__ico { width: 19px; height: 19px; color: var(--ink-3); flex: none; }
.search:focus-within .search__ico { color: var(--accent-ink); }
.search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: 0;
  font: inherit; font-size: 15px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__kbd {
  flex: none;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface-2);
  font: 600 11px/1 var(--font); color: var(--ink-3);
}

.hero__hint { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }

.search__result {
  margin-top: 14px;
  font-size: 12.5px; color: var(--ink-2);
}
.search__result strong { color: var(--accent-ink); font-variant-numeric: tabular-nums; }

/* 统计条 */
.stats {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0; margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.stats > div {
  display: flex; flex-direction: column; gap: 1px;
  padding-right: clamp(20px, 4vw, 44px);
  margin-right: clamp(20px, 4vw, 44px);
  border-right: 1px solid var(--line);
}
.stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stats dt { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.stats dd {
  font-size: 19px; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stats__date { font-size: 15px !important; font-weight: 600 !important; color: var(--ink-2); }
.stats__author { font-size: 15px !important; font-weight: 600 !important; color: var(--accent-ink); }

/* ==========================================================================
   分组与卡片
   ========================================================================== */
.sections {
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin: clamp(40px, 6vw, 66px) auto 0;
  padding-bottom: 20px;
}

.section { padding-block: 30px; scroll-margin-top: 90px; }
.section + .section { border-top: 1px solid var(--line); }

.section__head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.section__ico {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-08);
  color: var(--accent-ink);
  border: 1px solid var(--accent-14);
}
.section__meta { min-width: 0; }
.section__meta h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
}
.section__count {
  min-width: 20px; height: 18px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.section__meta p { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.section__line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(to right, var(--line), transparent);
  margin-left: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 13px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  column-gap: 13px;
  align-items: center;
  padding: 15px 15px 15px 14px;
  min-height: 84px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(130deg, rgba(255, 255, 255, .55), transparent 42%);
  opacity: 0; transition: opacity .3s var(--ease);
}
html[data-theme="dark"] .card::after { background: linear-gradient(130deg, rgba(255, 255, 255, .07), transparent 42%); }

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: var(--shadow-2);
  background: var(--surface);
}
.card:hover::after { opacity: 1; }
.card:active { transform: translateY(-1px) scale(.997); }

.card__ico {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: background-color .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease), transform .35s var(--ease-out);
}
.card:hover .card__ico {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(-4deg) scale(1.03);
}

.card__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card__title {
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 650; letter-spacing: -.005em;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__badge {
  flex: none;
  font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  padding: 1.5px 5px; border-radius: 5px;
  background: var(--accent-14); color: var(--accent-ink);
}
.card__desc {
  font-size: 12px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__host {
  display: block; margin-top: 3px;
  font-size: 10.5px; letter-spacing: .02em; color: var(--ink-3);
  opacity: .85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__arrow {
  width: 15px; height: 15px; color: var(--ink-3);
  transition: transform .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
  opacity: .55;
}
.card:hover .card__arrow { transform: translate(2px, -2px); color: var(--accent-ink); opacity: 1; }

/* 搜索结果为空 */
.empty {
  width: min(560px, 100% - var(--gutter) * 2);
  margin: 10px auto 70px;
  padding: 38px 26px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.empty__title { font-size: 15px; font-weight: 700; }
.empty__sub { margin: 6px 0 18px; font-size: 13px; color: var(--ink-3); }
.empty--first { margin: 46px auto 80px; }

/* ==========================================================================
   页脚
   ========================================================================== */
.foot {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
}
.foot__in {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 22px; flex-wrap: wrap;
}
.foot__brand { display: flex; flex-direction: column; gap: 6px; }
.foot__mark { width: 24px; height: 24px; }
.foot__brand p { font-size: 12.5px; color: var(--ink-3); }
.foot__author { font-size: 11px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.foot__links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot__links a {
  font-size: 12.5px; color: var(--ink-2);
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.foot__links a:hover { color: var(--accent-ink); border-bottom-color: var(--accent-14); }

/* ==========================================================================
   回到顶部
   ========================================================================== */
.totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, border-color .2s, color .2s;
}
.totop.on { opacity: 1; visibility: visible; transform: none; }
.totop:hover { color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }
.totop svg { width: 18px; height: 18px; }

/* ==========================================================================
   加载动画：三幕 —— 花瓣拼合 → 进度冲刺 → 幕布拉开
   ========================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  pointer-events: none;
}
.loader.is-done { pointer-events: none; }

.loader__stagebox {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  transition: opacity .35s var(--ease), transform .5s var(--ease);
}
.loader.is-out .loader__stagebox { opacity: 0; transform: translateY(-14px) scale(.96); }

.loader__mark { width: 68px; height: 68px; }
.flower--load .petal,
.flower--load .flower__core {
  opacity: 0;
  transform: scale(.2) rotate(-40deg);
  transform-origin: 32px 32px;
  animation: petalIn .78s cubic-bezier(.34, 1.46, .64, 1) forwards;
}
.flower--load .petal--a { animation-delay: .02s; }
.flower--load .petal--b { animation-delay: .10s; }
.flower--load .petal--c { animation-delay: .18s; }
.flower--load .petal--d { animation-delay: .26s; }
.flower--load .flower__core { animation-delay: .36s; }

.loader__word {
  font-size: 13px; font-weight: 800; letter-spacing: .56em;
  text-indent: .56em;
  color: var(--ink);
  opacity: 0;
  animation: wordIn .9s var(--ease) .45s forwards;
}
.loader__bar {
  width: clamp(170px, 44vw, 230px); height: 3px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.loader__bar i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--amber) 65%, var(--coral));
  transition: width .52s cubic-bezier(.4, 0, .2, 1);
}
.loader__stage {
  font-size: 11px; letter-spacing: .14em; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  min-height: 16px;
}

.loader__curtain {
  position: absolute; top: 0; bottom: 0; width: 52%;
  background: var(--bg);
  z-index: 1;
  transition: transform .78s cubic-bezier(.76, 0, .24, 1);
  will-change: transform;
}
.loader__curtain--l { left: 0; transform: translateX(0); }
.loader__curtain--r { right: 0; transform: translateX(0); }
.loader__curtain--l::after {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0;
  width: 1px; background: var(--accent);
  opacity: .5;
}
.loader.is-open .loader__curtain--l { transform: translateX(-101%); }
.loader.is-open .loader__curtain--r { transform: translateX(101%); }

@keyframes petalIn {
  0% { opacity: 0; transform: scale(.2) rotate(-50deg); }
  60% { opacity: 1; transform: scale(1.06) rotate(6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes wordIn {
  from { opacity: 0; letter-spacing: .3em; transform: translateY(6px); }
  to { opacity: 1; letter-spacing: .62em; transform: none; }
}

/* 花瓣拼好后轻轻呼吸，避免整屏死寂 */
.loader:not(.is-open) .loader__mark .flower { animation: breathe 2.6s var(--ease) .9s infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.045) rotate(4deg); }
}

/* ==========================================================================
   入场编排（只在 JS 可用时启用，避免无脚本时内容不可见）
   ========================================================================== */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}
html.js [data-reveal].in {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .75s var(--ease-out);
}
html.js .section .card { opacity: 0; transform: translateY(14px); }
html.js .section.in .card {
  opacity: 1; transform: none;
  animation: cardIn .62s var(--ease-out) both;
  animation-delay: calc(min(var(--i), 7) * 42ms + 60ms);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* 标题逐字入场 */
html.js .hero__title .ch {
  opacity: 0;
  transform: translateY(.42em) rotate(3deg);
}
html.js body.is-ready .hero__title .ch {
  animation: charIn .66s var(--ease-out) both;
  animation-delay: calc(var(--i) * 26ms + 40ms);
}
@keyframes charIn {
  from { opacity: 0; transform: translateY(.42em) rotate(3deg); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* 统计数字在进入视口时滚一下 */
html.js .stats.in dd[data-count] { animation: numIn .6s var(--ease-out) both; }
@keyframes numIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   减少动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .loader { display: none; }
  html.js [data-reveal],
  html.js .section .card,
  html.js .hero__title .ch { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 860px) {
  .topnav { display: none; }
  .topbar__in { height: 60px; }
  .hero { padding-top: 34px; }
  .stats > div { padding-right: 22px; margin-right: 22px; }
  .stats dd { font-size: 17px; }
}

@media (max-width: 600px) {
  .announce { font-size: 12px; gap: 8px; padding: 9px 16px; }
  .announce__link { display: none; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .card { min-height: 76px; padding: 13px; }
  .card__ico { width: 38px; height: 38px; border-radius: 11px; }
  .card__title { font-size: 14px; }
  .card__host { display: none; }
  .section { padding-block: 24px; }
  .section__line { display: none; }
  .hero__sub { font-size: 14px; }
  .search { height: 50px; }
  .stats { gap: 10px 0; }
  .stats > div:nth-child(3) { border-right: 0; }
  .foot__in { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .brand__text em { display: none; }
  .ghostbtn { padding: 0 11px; }
}

/* 大屏留白更从容 */
@media (min-width: 1400px) {
  :root { --wrap: 1240px; }
}

/* 搜索过滤 / 空分组 */
.is-hidden { display: none !important; }

/* ==========================================================================
   每日一言 + 访问量
   ========================================================================== */
.quote {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  margin: 26px 0 0; padding: 15px 18px 15px 16px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2);
  position: relative;
}
.quote__mark { width: 20px; height: 20px; flex: none; fill: var(--accent-14); transform: translateY(3px); }
.quote__text { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.quote__by { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

#visitCount { transition: color .3s ease; }
#visitCount.is-bump { animation: bump .5s var(--ease-out); }
@keyframes bump {
  0% { transform: none; }
  35% { transform: translateY(-3px) scale(1.06); color: var(--accent-ink); }
  100% { transform: none; }
}

/* ==========================================================================
   底部条形播放器
   ========================================================================== */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 9px clamp(10px, 2.4vw, 26px) calc(9px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 -14px 34px -26px rgba(0, 0, 0, .55);
}
.player[hidden] { display: none; }

.player__bar {
  display: flex; align-items: center; gap: 12px;
  max-width: var(--wrap); margin: 0 auto;
}

.player__art {
  position: relative; flex: none; width: 46px; height: 46px;
  border-radius: 10px; overflow: hidden; background: var(--accent-14);
}
.player__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player__art img[hidden] { display: none; }
.player__artfallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-ink); }
.player__pulse {
  position: absolute; inset: auto 0 0; height: 3px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center; transition: transform .2s linear;
}
.player.is-playing .player__pulse { transform: scaleX(1); }

.player__meta { min-width: 0; flex: 0 1 172px; display: flex; flex-direction: column; gap: 2px; }
.player__meta b {
  font-size: 13px; font-weight: 650; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player__meta em { font-style: normal; font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.player__track { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
.player__seek {
  position: relative; flex: 1; height: 4px; border-radius: 999px;
  background: var(--line); cursor: pointer; touch-action: none;
}
.player__seek::after { content: ""; position: absolute; inset: -9px 0; }
.player__seek:focus-visible { outline: 2px solid var(--accent-20); outline-offset: 5px; }
.player__seekfill {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: var(--accent); position: relative;
}
.player__seekfill::after {
  content: ""; position: absolute; right: -4px; top: 50%; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); transform: translateY(-50%);
  box-shadow: 0 0 0 3px var(--accent-14); opacity: 0; transition: opacity .18s ease;
}
.player__seek:hover .player__seekfill::after, .player__seek:focus-visible .player__seekfill::after { opacity: 1; }
.player__time { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

.player__ctrl { display: flex; align-items: center; gap: 6px; flex: none; }
.player__btn {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.player__btn svg { width: 14px; height: 14px; }
.player__btn:hover { background: var(--accent-08); }
.player__btn:focus-visible { outline: 2px solid var(--accent-20); outline-offset: 2px; }
.player__btn--play { width: 38px; height: 38px; border: 0; background: var(--accent); color: #fff; }
.player__btn--play:hover { filter: brightness(1.06); transform: scale(1.03); }
.player__ico-pause { display: none; }
.player.is-playing .player__ico-play { display: none; }
.player.is-playing .player__ico-pause { display: block; }

.player__mini {
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-3); display: grid; place-items: center; cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.player__mini svg { width: 15px; height: 15px; }
.player__mini:hover { background: var(--accent-08); color: var(--ink); }
.player__mini.is-on { color: var(--accent-ink); }
.player__mini.is-one::after {
  content: "1"; font-size: 8.5px; font-weight: 700; line-height: 1;
  position: absolute; transform: translate(8px, 5px);
}

.player__vol { display: flex; align-items: center; gap: 5px; color: var(--ink-3); }
.player__vol svg { width: 14px; height: 14px; }
.player__vol input {
  width: 62px; height: 4px; -webkit-appearance: none; appearance: none;
  border-radius: 99px; background: var(--line); cursor: pointer;
}
.player__vol input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.player__vol input::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%; background: var(--accent);
  border: 2px solid var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.player__list {
  max-width: var(--wrap); margin: 0 auto 8px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); overflow: hidden;
  max-height: min(320px, 52vh); display: flex; flex-direction: column;
}
.player__list[hidden] { display: none; }
.player__listhead {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3);
}
.player__listhead b { font-size: 12.5px; color: var(--ink); }
.player__listclose {
  margin-left: auto; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1;
}
.player__listclose:hover { background: var(--accent-08); color: var(--ink); }
.player__items { list-style: none; margin: 0; padding: 6px; overflow: auto; overscroll-behavior: contain; }
.player__item {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px;
  align-items: center; padding: 7px 8px; border-radius: 9px; cursor: pointer;
}
.player__item:hover { background: var(--accent-08); }
.player__item.is-current { background: var(--accent-14); }
.player__item.is-current .player__no { color: var(--accent-ink); font-weight: 700; }
.player__no { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.player__it { min-width: 0; display: flex; flex-direction: column; }
.player__it b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__it em { font-style: normal; font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__idur { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.player__empty { padding: 14px 10px; font-size: 12px; color: var(--ink-3); }
.player__tip { margin: 0; padding: 8px 12px 10px; font-size: 10.5px; line-height: 1.6; color: var(--ink-3); border-top: 1px solid var(--line); }

/* ==========================================================================
   落雪 / 落花图层
   ========================================================================== */
.snow { position: fixed; inset: 0; z-index: 35; pointer-events: none; overflow: hidden; }
.snow canvas { display: block; width: 100%; height: 100%; }

body { padding-bottom: 0; }
.player ~ main, body:has(.player) main { padding-bottom: 64px; }

@media (max-width: 600px) {
  .player__bar { flex-wrap: wrap; row-gap: 7px; }
  .player__meta { flex: 1 1 auto; }
  .player__ctrl { margin-left: auto; }
  .player__track { order: 3; flex: 1 1 100%; gap: 8px; }
  .player__time { font-size: 10px; }
  .player__vol { display: none; }
  .player__list { max-height: min(280px, 46vh); margin: 0 8px 8px; }
  .quote { flex-direction: column; align-items: flex-start; gap: 6px; }
  .quote__by { margin-left: 0; }
}

