/* =============================================================
   Davidcolin · 启动页
   ============================================================= */

/* ---------------- 1. 重置与设计变量 ---------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  color-scheme: light;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --c1: #6366f1;
  --c2: #a855f7;
  --c3: #ec4899;
  --c4: #22d3ee;

  --text: #0b1220;
  --muted: #5a6478;
  --faint: #8b94a8;

  --bg: #eef1ff;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .78);
  --stroke: rgba(255, 255, 255, .62);
  --stroke-2: rgba(15, 23, 42, .09);

  --shadow: 0 22px 60px -26px rgba(79, 70, 229, .38);
  --shadow-sm: 0 12px 32px -18px rgba(79, 70, 229, .32);

  --radius: 24px;
  --maxw: 1200px;
  --nav-h: 66px;

  --grad: linear-gradient(112deg, #6366f1 0%, #a855f7 34%, #ec4899 64%, #f59e0b 88%, #6366f1 100%);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --text: #e9eefb;
  --muted: #a5b2c9;
  --faint: #7a88a3;

  --bg: #05070f;
  --glass: rgba(17, 24, 39, .52);
  --glass-strong: rgba(15, 23, 42, .74);
  --stroke: rgba(148, 163, 184, .17);
  --stroke-2: rgba(148, 163, 184, .13);

  --shadow: 0 28px 70px -30px rgba(0, 0, 0, .85);
  --shadow-sm: 0 14px 36px -20px rgba(0, 0, 0, .75);
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color .45s ease;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }
::selection { background: rgba(168, 85, 247, .28); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(99, 102, 241, .5), rgba(236, 72, 153, .45));
  border-radius: 99px;
}
::-webkit-scrollbar-track { background: transparent; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- 2. 背景层 ---------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
  transition: background .45s ease;
}

.bg-aurora { position: absolute; inset: 0; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: .5;
  will-change: transform;
}
.blob-1 {
  width: 54vw; height: 54vw; left: -14vw; top: -16vw;
  background: radial-gradient(circle, rgba(99, 102, 241, .58), transparent 66%);
  animation: float-a 24s ease-in-out infinite alternate;
}
.blob-2 {
  width: 46vw; height: 46vw; right: -12vw; top: 4vh;
  background: radial-gradient(circle, rgba(236, 72, 153, .44), transparent 66%);
  animation: float-b 28s ease-in-out infinite alternate;
}
.blob-3 {
  width: 48vw; height: 48vw; left: 20vw; bottom: -20vw;
  background: radial-gradient(circle, rgba(34, 211, 238, .38), transparent 66%);
  animation: float-c 32s ease-in-out infinite alternate;
}
html[data-theme="dark"] .blob { mix-blend-mode: screen; opacity: .4; }

@keyframes float-a { to { transform: translate3d(6vw, 5vh, 0) scale(1.12); } }
@keyframes float-b { to { transform: translate3d(-5vw, 6vh, 0) scale(1.08); } }
@keyframes float-c { to { transform: translate3d(4vw, -6vh, 0) scale(1.15); } }

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--stroke-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--stroke-2) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 74%);
  opacity: .75;
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .bg-grain { opacity: .3; }

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(15, 23, 42, .16) 100%);
}
html[data-theme="dark"] .bg-vignette {
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(0, 0, 0, .55) 100%);
}

/* ---------------- 2.1 首屏插画：与父站共用背景图逻辑 ---------------- */
.hero-art {
  position: absolute;
  inset: 0 0 auto;
  height: min(116vh, 1040px);
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgba(0, 0, 0, .78) 62%, rgba(0, 0, 0, .3) 84%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgba(0, 0, 0, .78) 62%, rgba(0, 0, 0, .3) 84%, transparent 99%);
}

.hero-art-img {
  position: absolute;
  inset: -4% -2% 0;
  background-color: #e8ecff;
  background-image: url('../images/bg-light.webp');
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  animation: kenburns 46s ease-in-out infinite alternate;
  will-change: transform;
  transition: background-image .3s ease;
}
html[data-theme="dark"] .hero-art-img {
  background-image: url('../images/bg-dark.webp');
  background-color: #05070f;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(238, 241, 255, .30) 0%,
    rgba(238, 241, 255, .52) 42%,
    rgba(238, 241, 255, .86) 72%,
    var(--bg) 96%);
}
html[data-theme="dark"] .hero-art::after {
  background:
    linear-gradient(180deg, rgba(5, 7, 15, .94) 0%, rgba(5, 7, 15, .52) 82px, rgba(5, 7, 15, 0) 190px),
    linear-gradient(180deg,
      rgba(5, 7, 15, .55) 0%,
      rgba(5, 7, 15, .66) 42%,
      rgba(5, 7, 15, .88) 74%,
      var(--bg) 96%);
}

@keyframes kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.13) translate3d(-1.5%, -1.2%, 0); }
}

@media (max-width: 720px) {
  .hero-art { height: min(80vh, 640px); }
  .hero-art-img { background-position: 57% top; }
  html[data-theme="dark"] .hero-art-img { background-position: 42% top; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art-img { animation: none; }
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(139, 92, 246, .18), rgba(236, 72, 153, .07) 45%, transparent 68%);
  transform: translate3d(-50%, -50%, 0);
  transition: opacity .5s ease;
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }
html[data-theme="dark"] .cursor-glow {
  background: radial-gradient(circle, rgba(139, 92, 246, .26), rgba(34, 211, 238, .08) 45%, transparent 70%);
}

/* ---------------- 3. 顶栏 ---------------- */
.wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 26px;
}

.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--maxw), calc(100% - 36px));
  padding: 0 26px;
  transform: translateX(-50%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 15px 6px 6px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 30px -22px rgba(15, 23, 42, .55);
  pointer-events: auto;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.brand:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, .42);
  box-shadow: 0 18px 40px -24px rgba(99, 102, 241, .8);
}
.brand-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--c1), var(--c3));
  flex-shrink: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.brand-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.brand-avatar.fallback::after { content: "D"; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 13.5px; font-weight: 800; letter-spacing: .02em; }
.brand-text i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav-tools { display: flex; align-items: center; gap: 10px; pointer-events: auto; }

.nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 30px -22px rgba(15, 23, 42, .55);
  transition: color .3s, border-color .3s, transform .3s, background .3s;
}
.nav-chip svg { width: 16px; height: 16px; }
.nav-chip:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, .45);
  transform: translateY(-1px);
  background: rgba(139, 92, 246, .08);
}

.theme-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--text);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 12px 30px -22px rgba(15, 23, 42, .55);
  transition: transform .35s, background .3s, border-color .3s, box-shadow .3s;
}
.theme-btn:hover {
  transform: rotate(18deg) scale(1.06);
  border-color: rgba(139, 92, 246, .5);
  box-shadow: 0 18px 40px -24px rgba(99, 102, 241, .8);
}
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .ico-moon { display: block; }
.theme-btn .ico-sun { display: none; }
html[data-theme="dark"] .theme-btn .ico-moon { display: none; }
html[data-theme="dark"] .theme-btn .ico-sun { display: block; }

/* ---------------- 4. 首屏 ---------------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: calc(var(--nav-h) + 88px) 0 18px;
}

.hero-main { position: relative; min-width: 0; max-width: 660px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.chip-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}
.chip-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid rgba(34, 197, 94, .16);
  animation: pulse-ring 2.4s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0; }
}
.chip-sep { width: 1px; height: 11px; background: var(--stroke-2); }
.chip-sub { color: var(--faint); font-variant-numeric: tabular-nums; }

.hero-title { margin-top: 24px; }

.hero-hello {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(13.5px, 1.4vw, 16px);
  font-weight: 500;
  letter-spacing: .34em;
  color: var(--muted);
}

.name-grad {
  display: block;
  width: fit-content;
  font-size: clamp(52px, 6.6vw, 88px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.045em;
  padding-bottom: 8px;
  color: transparent;
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: name-shine 14s linear infinite;
}
@keyframes name-shine {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.hero-surname {
  display: block;
  margin-top: 4px;
  font-size: clamp(21px, 2.7vw, 33px);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(99, 102, 241, .48);
}
html[data-theme="dark"] .hero-surname { -webkit-text-stroke-color: rgba(196, 181, 253, .5); }

.hero-role {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.hero-role .role-line {
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c1), var(--c3));
}
.hero-role b { color: var(--text); font-weight: 700; letter-spacing: .01em; }

.hero-desc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 12.8px;
  letter-spacing: .01em;
  color: var(--muted);
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.hero-desc .prompt {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c2);
}
.caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: -2px;
  background: linear-gradient(180deg, var(--c1), var(--c3));
  border-radius: 2px;
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- 5. 必应搜索 ---------------- */
.search {
  position: relative;
  max-width: 720px;
  margin-top: 30px;
  padding: 14px 14px 12px;
  border-radius: 30px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--shadow-sm);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 70px;
  padding: 0 10px 0 20px;
  border-radius: 22px;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.search-box:focus-within {
  border-color: rgba(139, 92, 246, .55);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .13), var(--shadow);
  transform: translateY(-1px);
}

.bing-word {
  flex-shrink: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.045em;
  color: transparent;
  background: linear-gradient(135deg, #0a84ff 0%, #0078d4 45%, #00bcf2 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.search-divider { flex-shrink: 0; width: 1px; height: 24px; background: var(--stroke-2); }

.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16.5px;
  letter-spacing: .01em;
  color: var(--text);
}
.search-input::placeholder { color: var(--faint); }
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: inset 0 0 0 1000px var(--glass-strong);
}

.search-clear {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--faint);
  transition: color .25s, background .25s;
}
.search-clear[hidden] { display: none; }
.search-clear svg { width: 15px; height: 15px; }
.search-clear:hover { color: var(--text); background: var(--stroke-2); }

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  height: 50px;
  padding: 0 24px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(112deg, #6366f1, #a855f7 54%, #ec4899);
  background-size: 160% 100%;
  box-shadow: 0 12px 26px -12px rgba(99, 102, 241, .9);
  transition: transform .3s, background-position .4s, box-shadow .3s;
}
.search-btn svg { width: 17px; height: 17px; }
.search-btn:hover {
  transform: translateY(-1px);
  background-position: 100% 0;
  box-shadow: 0 18px 34px -14px rgba(168, 85, 247, .85);
}
.search-btn:active { transform: translateY(0); }

.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 30px;
  margin-top: 10px;
  padding: 8px 10px 2px 20px;
  border-top: 1px solid var(--stroke-2);
  font-size: 12px;
  color: var(--muted);
}

.history {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.history-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--faint);
  text-transform: uppercase;
}
.history-empty { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }

.history-chip {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: rgba(255, 255, 255, .36);
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .25s, border-color .25s, background .25s, transform .25s;
}
html[data-theme="dark"] .history-chip { background: rgba(15, 23, 39, .38); }
.history-chip:hover {
  color: var(--c1);
  border-color: rgba(139, 92, 246, .4);
  background: rgba(139, 92, 246, .08);
  transform: translateY(-1px);
}
.history-clear {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--faint);
  transition: color .25s, background .25s;
}
.history-clear:hover { color: var(--c3); background: rgba(236, 72, 153, .08); }

.search-hint { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 11px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid var(--stroke-2);
  background: var(--glass);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  box-shadow: 0 1px 0 var(--stroke-2);
}

.search-note {
  margin-top: 10px;
  font-size: 11.3px;
  letter-spacing: .02em;
  color: var(--muted);
}

/* ---------------- 7. 分区通用 ---------------- */
.section { position: relative; padding: 36px 0 0; }

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.sec-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .26em;
  color: var(--c2);
  margin-bottom: 6px;
}
.sec-title { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; }
.sec-sub {
  max-width: 430px;
  font-size: 12.8px;
  line-height: 1.7;
  color: var(--muted);
  text-align: right;
}

/* ---------------- 8. 应用卡片 ---------------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 20px 20px 18px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s, border-color .4s;
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--app-rgb), 0), rgba(var(--app-rgb), .9), rgba(var(--app-rgb), 0));
  opacity: 0;
  transition: opacity .4s;
}
.app-card::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -62px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--app-rgb), .16), transparent 68%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}
.app-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--app-rgb), .38);
  box-shadow: 0 26px 56px -30px rgba(var(--app-rgb), .55), var(--shadow-sm);
}
.app-card:hover::before,
.app-card:hover::after { opacity: 1; }

/* 整卡可点击的「近况」入口 */
.app-card-link { color: inherit; text-decoration: none; }
.app-card-link:focus-visible {
  outline: 2px solid rgba(var(--app-rgb), .65);
  outline-offset: 3px;
}

.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.app-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(var(--app-rgb), .95);
  flex-shrink: 0;
}
.app-icon svg { width: 29px; height: 29px; }
.app-wechat { background: linear-gradient(135deg, #24d67a, #07a955); }
.app-qq { background: linear-gradient(135deg, #35c5f8, #0a84e8); }
.app-diary { background: linear-gradient(135deg, #c084fc, #6d28d9); }
.app-meeting { background: linear-gradient(135deg, #3f97f0, #4f46e5); }

.app-tag {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--faint);
  background: rgba(255, 255, 255, .32);
}
html[data-theme="dark"] .app-tag { background: rgba(15, 23, 39, .38); }

.app-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.app-name em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.app-desc { font-size: 12.4px; line-height: 1.7; color: var(--muted); min-height: 42px; }

.app-action { display: flex; align-items: center; gap: 4px; margin-top: 2px; }

.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--app-rgb), .28);
  background: rgba(var(--app-rgb), .1);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  transition: background .3s, border-color .3s, transform .3s;
}
.app-btn svg { width: 14px; height: 14px; color: rgb(var(--app-rgb)); transition: transform .3s; }
.app-btn:hover {
  background: rgba(var(--app-rgb), .18);
  border-color: rgba(var(--app-rgb), .5);
  transform: translateY(-1px);
}
.app-btn:hover svg { transform: translateX(2px); }
.app-btn:active { transform: translateY(0); }

.app-mini {
  flex-shrink: 0;
  padding: 6px 7px;
  font-size: 11px;
  color: var(--faint);
  border-radius: 8px;
  transition: color .25s, background .25s;
}
.app-mini:hover { color: var(--c1); background: rgba(139, 92, 246, .08); }

.system-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(245, 158, 11, .4);
  background: rgba(245, 158, 11, .09);
  font-size: 12px;
  color: #b45309;
}
html[data-theme="dark"] .system-note { color: #fbbf24; background: rgba(245, 158, 11, .08); }
.system-note[hidden] { display: none; }
.system-note svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------------- 9. 直达面板 ---------------- */
.direct-card {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--shadow-sm);
}
.direct-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.direct-head h3 { font-size: 15.5px; font-weight: 800; letter-spacing: .01em; }
.direct-head p { font-size: 12px; color: var(--muted); }

.direct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 15px;
}
.field { min-width: 0; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--faint);
}
.field-row { display: flex; align-items: center; gap: 8px; }

.field-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--stroke-2);
  background: rgba(255, 255, 255, .42);
  font-size: 13.5px;
  color: var(--text);
  outline: 0;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
html[data-theme="dark"] .field-row input { background: rgba(15, 23, 39, .45); }
.field-row input::placeholder { color: var(--faint); }
.field-row input:focus {
  border-color: rgba(139, 92, 246, .55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .12);
  background: var(--glass-strong);
}

.mini-btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid var(--stroke-2);
  background: var(--glass-strong);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  transition: transform .25s, border-color .25s, background .25s, color .25s;
}
.mini-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, .45);
  color: var(--c1);
  background: rgba(139, 92, 246, .1);
}
.mini-btn:active { transform: translateY(0); }

.direct-note { margin-top: 11px; font-size: 10.8px; letter-spacing: .02em; color: var(--faint); }

/* ---------------- 10. 常用入口 ---------------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: transform .3s, border-color .3s, box-shadow .3s, background .3s;
}
.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, .4);
  background: var(--glass-strong);
  box-shadow: var(--shadow-sm);
}
.link-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--c1);
  background: rgba(99, 102, 241, .11);
  border: 1px solid rgba(99, 102, 241, .12);
}
.link-icon svg { width: 19px; height: 19px; }
.link-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.link-text b { font-size: 13.3px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-text i {
  margin-top: 3px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-left: auto;
  color: var(--faint);
  opacity: .55;
  transition: transform .3s, color .3s, opacity .3s;
}
.link-card:hover .link-arrow { color: var(--c1); opacity: 1; transform: translate(1px, -1px); }

/* ---------------- 11. 使用说明 ---------------- */
.section-tips { padding-top: 40px; }

.tips {
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  overflow: hidden;
}
.tips summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: background .25s;
}
.tips summary::-webkit-details-marker { display: none; }
.tips summary:hover { background: rgba(139, 92, 246, .06); }
.tips-plus {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--stroke-2);
}
.tips-plus::before,
.tips-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--muted);
  transform: translate(-50%, -50%);
  transition: transform .3s;
}
.tips-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.tips[open] .tips-plus::after { transform: translate(-50%, -50%) rotate(0deg); }

.tips-body {
  padding: 0 18px 18px;
  font-size: 12.6px;
  line-height: 1.85;
  color: var(--muted);
  border-top: 1px solid var(--stroke-2);
  padding-top: 14px;
}
.tips-body p + p { margin-top: 8px; }
.tips-body ul { margin: 8px 0; }
.tips-body li { position: relative; padding-left: 15px; }
.tips-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c2);
  opacity: .7;
}
.tips-body code {
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--stroke-2);
  background: rgba(139, 92, 246, .08);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c1);
}
.tips-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tips-links a {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  font-size: 11px;
  color: var(--muted);
  transition: color .25s, border-color .25s, background .25s;
}
.tips-links a:hover { color: var(--c1); border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .08); }

/* ---------------- 12. 页脚 ---------------- */
.footer {
  position: relative;
  margin-top: 44px;
  padding: 40px 0 64px;
  text-align: center;
  border-top: 1px solid var(--stroke-2);
  overflow: hidden;
}
.footer-mark {
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  font-size: clamp(64px, 13vw, 150px);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(99, 102, 241, .17);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.footer-line {
  width: 54px;
  height: 2px;
  margin: 0 auto 16px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c1), var(--c3));
}
.footer-main { position: relative; font-size: 12.8px; letter-spacing: .03em; color: var(--muted); }
.footer-links {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  font-size: 11.8px;
  color: var(--faint);
}
.footer-links-label { letter-spacing: .12em; opacity: .85; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  color: var(--muted);
  transition: color .3s, border-color .3s, background .3s, transform .3s;
}
.footer-link svg { width: 11px; height: 11px; opacity: .7; }
.footer-link:hover {
  color: var(--c1);
  border-color: rgba(139, 92, 246, .4);
  background: rgba(139, 92, 246, .08);
  transform: translateY(-1px);
}
.footer-beian {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 12px;
  font-size: 11.8px;
  color: var(--faint);
}
.footer-beian a { display: inline-flex; align-items: center; gap: 4px; transition: color .3s; }
.footer-beian a:hover { color: var(--c1); }
.beian-icon { width: 14px; height: 16px; }
html[data-theme="dark"] .beian-icon { filter: brightness(1.2); }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ---------------- 13. 启动提示 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 12px 11px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .93);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #f8fafc;
  box-shadow: 0 22px 60px -20px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 22px);
  transition: opacity .35s, visibility .35s, transform .35s cubic-bezier(.2, .8, .2, 1);
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16);
}
.toast-text { font-size: 12.5px; line-height: 1.5; }
.toast-action {
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 999px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(112deg, var(--c1), var(--c2), var(--c3));
  box-shadow: 0 8px 18px -8px rgba(168, 85, 247, .9);
  transition: transform .25s, box-shadow .25s;
}
.toast-action:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px rgba(168, 85, 247, .9); }
.toast-action[hidden] { display: none; }
.toast-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  color: rgba(248, 250, 252, .6);
  transition: color .25s, background .25s;
}
.toast-close svg { width: 13px; height: 13px; }
.toast-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* ---------------- 14. 响应式 ---------------- */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: calc(var(--nav-h) + 74px);
  }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sec-sub { max-width: 100%; text-align: left; }
  .brand-text i { display: none; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav { width: calc(100% - 32px); padding: 0 16px; top: 14px; }
  .hero { padding-top: calc(var(--nav-h) + 48px); gap: 30px; }
  .hero-hello { letter-spacing: .24em; margin-bottom: 10px; }
  .name-grad { font-size: clamp(42px, 12.4vw, 64px); }
  .hero-surname { font-size: clamp(18px, 5.6vw, 26px); letter-spacing: .15em; }

  .search { padding: 10px 10px 8px; border-radius: 24px; }
  .search-meta { margin-top: 8px; padding: 8px 8px 2px 15px; }
  .search-box { height: 62px; gap: 9px; padding: 0 8px 0 15px; border-radius: 18px; }
  .bing-word { font-size: 18px; }
  .search-divider { height: 20px; }
  .search-input { font-size: 15px; }
  .search-btn { height: 46px; padding: 0 15px; border-radius: 13px; font-size: 13px; }
  .search-btn svg { width: 15px; height: 15px; }
  .search-note { font-size: 10.8px; }
  .search-hint { display: none; }
  .hero-desc .caret { display: none; }

  .section { padding: 28px 0 0; }
  .sec-sub { font-size: 12.2px; }

  .app-grid { grid-template-columns: 1fr; gap: 12px; }
  .app-card { padding: 18px; }
  .app-desc { min-height: 0; }

  .direct-card { padding: 18px; }
  .direct-grid { grid-template-columns: 1fr; gap: 12px; }

  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .link-card { padding: 12px 13px; gap: 10px; }
  .link-icon { width: 34px; height: 34px; border-radius: 10px; }
  .link-text b { font-size: 12.5px; }
  .link-arrow { display: none; }

  .footer { margin-top: 32px; padding: 32px 0 52px; }
  .footer-mark { font-size: 74px; }
  .footer-main { max-width: 280px; margin: 0 auto; }

  .toast { bottom: 16px; padding: 10px 10px 10px 14px; gap: 8px; }
  .toast-text { font-size: 12px; }
  .toast-action { padding: 6px 10px; font-size: 11px; }
}

@media (max-width: 520px) {
  .nav-chip {
    width: 42px;
    padding: 0;
    font-size: 0;
    gap: 0;
    justify-content: center;
  }
  .nav-chip svg { width: 18px; height: 18px; }
  .brand { padding: 5px 12px 5px 5px; }

  .search-box { padding-left: 13px; }
  .bing-word { display: none; }
  .search-divider { display: none; }
  .search-btn span { display: none; }
  .search-btn { padding: 0 15px; }
  .search-btn svg { width: 18px; height: 18px; }

  .history-chip { max-width: 140px; }

  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-arrow { display: none; }

  .field-row { flex-wrap: wrap; }
  .field-row input { flex: 1 1 100%; }
  .mini-btn { flex: 1; }

  .toast { flex-wrap: wrap; }
  .toast-text { flex: 1 1 100%; order: 2; }
  .toast-dot { order: 1; }
  .toast-action { order: 3; margin-left: auto; }
  .toast-close { order: 4; }
}

/* ---------------- 15. 动效偏好 ---------------- */
@media (hover: none) {
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .name-grad { background-position: 0 0; }
}

/* ---------------- 16. 搜索框抖动反馈 ---------------- */
.search-box.shake { animation: search-shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes search-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* QQ 字母图标 */
.app-qq { font-size: 15px; font-weight: 800; letter-spacing: .04em; }

@media (max-width: 360px) {
  .link-grid { grid-template-columns: 1fr; }
}

/* ---------------- 17. 矮屏紧凑模式：让启动按钮尽量出现在首屏 ---------------- */
@media (min-width: 1081px) and (max-height: 900px) {
  .hero { padding: calc(var(--nav-h) + 52px) 0 8px; gap: 38px; }
  .hero-title { margin-top: 16px; }
  .hero-hello { margin-bottom: 8px; }
  .name-grad { font-size: clamp(48px, 5.4vw, 76px); }
  .hero-surname { margin-top: 2px; font-size: clamp(20px, 2.2vw, 27px); }
  .hero-role { margin-top: 12px; }
  .hero-desc { margin-top: 10px; padding: 8px 14px; }
  .search { margin-top: 20px; }
  .search-note { display: none; }
  .section { padding-top: 32px; }
  .sec-head { margin-bottom: 18px; }
  .app-card { gap: 10px; padding: 16px; }
  .app-icon { width: 48px; height: 48px; border-radius: 14px; }
  .app-icon svg { width: 26px; height: 26px; }
  .app-desc { display: none; }
  .app-name { font-size: 18px; }
  .app-btn { height: 38px; }
  .footer { margin-top: 30px; }
}

@media (min-width: 1081px) and (max-height: 780px) {
  .hero-desc { display: none; }
  .name-grad { font-size: clamp(44px, 4.8vw, 66px); }
  .hero-surname { font-size: 22px; }
  .search { margin-top: 16px; }
  .section { padding-top: 24px; }
  .app-tag { display: none; }
}

/* ---------------- 18. 插画上的浅色小字可读性 ---------------- */
html[data-theme="light"] .hero-hello,
html[data-theme="light"] .hero-role,
html[data-theme="light"] .history-empty,
html[data-theme="light"] .search-hint,
html[data-theme="light"] .search-note {
  text-shadow: 0 1px 10px rgba(255, 255, 255, .8), 0 0 2px rgba(255, 255, 255, .55);
}
