/* ============================================
   AI Toolkit Share · Liquid Glass · Single Page
   Apple / visionOS inspired
   ============================================ */

:root {
  --bg: #050507;
  --bg-2: #0b0b10;
  --ink: #f5f5f7;
  --ink-2: rgba(245, 245, 247, 0.72);
  --ink-3: rgba(245, 245, 247, 0.48);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  /* Apple blue */
  --blue: #0a84ff;
  --blue-2: #2997ff;

  /* Accent palette per tool */
  --c-step: #ff6a3d;
  --c-cf: #f48120;
  --c-cur: #5e9bff;
  --c-page: #b07bff;
  --c-md: #6ad4a3;
  --c-sk: #ffd166;
  --c-clone: #4dd0e1;
  --c-gamma: #ff7ab6;
  --c-draw: #8be9fd;

  --radius: 22px;
  --radius-sm: 14px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display',
    'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono',
    Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: radial-gradient(ellipse at top, #11121a 0%, var(--bg) 55%, #020204 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--ink); border-bottom: 1px dashed rgba(255,255,255,0.25); }

/* ===== Background liquid orbs ===== */
.bg-orbs {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: float 22s ease-in-out infinite;
}
.orb-1 { width: 520px; height: 520px; left: -120px; top: -80px;
  background: radial-gradient(circle, #1f63ff 0%, transparent 65%); }
.orb-2 { width: 480px; height: 480px; right: -100px; top: 10%;
  background: radial-gradient(circle, #ff5fb1 0%, transparent 65%); animation-delay: -6s; }
.orb-3 { width: 600px; height: 600px; left: 30%; bottom: -200px;
  background: radial-gradient(circle, #00d4ff 0%, transparent 65%); animation-delay: -12s; }
.orb-4 { width: 380px; height: 380px; right: 10%; bottom: 5%;
  background: radial-gradient(circle, #ffb84d 0%, transparent 65%); animation-delay: -18s; }

@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.06); }
  66% { transform: translate(-30px,20px) scale(0.95); }
}

.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Liquid Glass material ===== */
.glass {
  position: relative;
  background: rgba(20, 22, 30, 0.45);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 20px 50px rgba(0,0,0,0.45);
  overflow: hidden;
  isolation: isolate;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 10px 18px;
  border-radius: 999px;
  height: 52px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-2), #ff5fb1);
  box-shadow: 0 0 10px rgba(41,151,255,0.6);
}
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  font-size: 13px; color: var(--ink-2);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

/* ===== Hero ===== */
.hero {
  position: relative; z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  /* 导航约 68px 高：上内边距略大于其下沿，首屏可露出标题 + 9 卡 */
  padding: clamp(88px, 11vh, 118px) 28px clamp(28px, 4vh, 44px);
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-3);
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 4.8vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}
.grad {
  background: linear-gradient(120deg, #2997ff 0%, #b07bff 50%, #ff7ab6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(12px, 1.45vw, 18px);
  color: var(--ink-2);
  max-width: none;
  margin: 0 auto 20px;
  line-height: 1.5;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.hero-meta {
  display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}

/* ===== Grid ===== */
.grid-wrap {
  position: relative; z-index: 1;
  max-width: 1240px;
  /* 底部留白：与 next-month 收束后仍留一点与「我的个人栈」的呼吸距 */
  margin: 12px auto clamp(40px, 6vh, 80px);
  padding: 0 28px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

/* ===== Card ===== */
.card {
  position: relative;
  padding: 20px 20px 18px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1),
              border-color 0.3s;
  min-height: clamp(168px, 18vh, 200px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.20);
}
.card::before {
  content: "";
  position: absolute; inset: -2px;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 0%),
    var(--accent, rgba(41,151,255,0.35)) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.mono {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 15px; font-weight: 700;
  color: #fff;
  background: var(--accent, var(--blue));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 8px 20px rgba(0,0,0,0.35);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-left: auto;
}
.card-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 2px;
}
.card-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-slogan {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
  margin: 4px 0 8px;
}
a.card-url {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.35;
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin: 0 0 8px;
  padding-bottom: 1px;
  transition: color 0.2s;
}
a.card-url:hover {
  color: var(--accent, var(--blue));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.card-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.card-cta .arrow {
  width: 14px; height: 14px;
  transition: transform 0.3s;
}
.card:hover .card-cta .arrow { transform: translateX(4px); }
.card:hover .card-cta { color: var(--ink); }

/* ===== Next month outro (Apple 风：留白 + 极短文字) ===== */
.next-month {
  text-align: center;
  padding: clamp(32px, 4vh, 56px) 0 clamp(24px, 3vh, 40px);
}
.next-month .nm-rule {
  display: block;
  width: 64px;
  height: 1px;
  margin: 0 auto 18px;
  background: rgba(255, 255, 255, 0.08);
}
.next-month .nm-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.next-month .nm-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Inline mini visual on card (idle state) */
.card-mini {
  position: absolute;
  right: -10px; bottom: -10px;
  width: 140px; height: 100px;
  opacity: 0.25;
  pointer-events: none;
  filter: blur(0.4px);
}

/* ===== Stack ===== */
.stack-wrap {
  position: relative; z-index: 1;
  max-width: 1240px;
  margin: clamp(20px, 3vh, 40px) auto 80px;
  padding: 0 28px;
}
.section-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.section-sub {
  color: var(--ink-2);
  font-size: 16px;
  margin: 0 0 28px;
}
.stack-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 740px) {
  .stack-row { grid-template-columns: repeat(2, 1fr); }
}
.stack-item {
  padding: 18px 20px;
  border-radius: 16px;
}
.stack-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.stack-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #fff 0%, #b8c0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== About ===== */
.about-wrap {
  position: relative; z-index: 1;
  max-width: 1240px;
  margin: 0 auto 100px;
  padding: 0 28px;
}
.about {
  padding: 36px 40px;
  border-radius: 24px;
}
.about h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.about p {
  color: var(--ink-2);
  font-size: clamp(12px, 1.65vw, 16px);
  line-height: 1.65;
  margin: 0;
  max-width: none;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
/* 避免 .glass 的 overflow:hidden 裁掉段落底部横滑条 */
.about.glass {
  overflow: visible;
}

/* ===== Footer ===== */
.footer {
  position: relative; z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 28px 60px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
@media (max-width: 640px) {
  .footer { flex-direction: column; gap: 8px; text-align: center; }
}

/* ===== Drawer ===== */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 80;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }

/* ===== Drawer = Center Modal ===== */
.drawer {
  position: fixed;
  top: 50%; left: 50%;
  width: min(960px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  z-index: 90;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 0.35s ease,
    width 0.5s cubic-bezier(0.2, 0.9, 0.2, 1),
    max-height 0.5s cubic-bezier(0.2, 0.9, 0.2, 1),
    border-radius 0.4s ease;
  border-radius: 28px;
  background: rgba(18, 20, 28, 0.6);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  display: flex; flex-direction: column;
}
.drawer.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.drawer-actions {
  position: absolute; top: 18px; right: 18px;
  display: flex; gap: 8px;
  z-index: 3;
}
.drawer-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  display: inline-flex; align-items: center; justify-content: center;
}
.drawer-btn:hover { background: rgba(255,255,255,0.16); }
.drawer-close { font-size: 22px; }
.drawer-close:hover { transform: rotate(90deg); }
.drawer-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  padding: 32px 36px;
  overflow-y: auto;
  flex: 1;
  align-items: stretch;
}
@media (max-width: 760px) {
  .drawer-inner {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
  }
}
.drawer .d-stage {
  height: 100%;
  min-height: 320px;
  margin-bottom: 0;
}
.drawer .d-info-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.drawer .d-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

/* ====== Fullscreen Immersive Mode ====== */
.drawer.fullscreen {
  top: 50%; left: 50%;
  width: 100vw;
  max-height: 100vh;
  height: 100vh;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 0;
  background: rgba(8, 9, 14, 0.82);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
}
.drawer.fullscreen .drawer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  padding: 80px 80px 60px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
}
@media (max-width: 1100px) {
  .drawer.fullscreen .drawer-inner {
    grid-template-columns: 1fr;
    padding: 60px 32px;
    gap: 28px;
  }
}
.drawer.fullscreen .d-stage {
  height: 100%;
  min-height: 60vh;
}
.drawer.fullscreen .d-name { font-size: 44px; }
.drawer.fullscreen .d-slogan { font-size: 22px; line-height: 1.5; }
.drawer.fullscreen .d-mono {
  width: 72px; height: 72px;
  border-radius: 20px;
  font-size: 26px;
}
.drawer.fullscreen .d-info-col {
  display: flex; flex-direction: column;
}
.drawer.fullscreen .d-grid {
  grid-template-columns: 1fr;
}
.drawer.fullscreen .d-block {
  padding: 22px 24px;
}
.drawer.fullscreen .d-block-text { font-size: 16px; }
.drawer.fullscreen .d-list li { font-size: 16px; padding: 14px 0; }

/* drawer content */
.d-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.d-mono {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 20px; font-weight: 700;
  color: #fff;
  background: var(--accent, var(--blue));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 8px 20px rgba(0,0,0,0.4);
}
.d-name { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.d-tag { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; }

.d-slogan {
  font-size: 18px;
  color: var(--ink-2);
  margin: 18px 0 26px;
  line-height: 1.55;
}

.d-stage {
  position: relative;
  height: 240px;
  border-radius: 18px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line-2);
  overflow: hidden;
  margin-bottom: 26px;
}

.d-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.d-block {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.d-block-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.d-block-text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
}

.d-list {
  list-style: none;
  padding: 0; margin: 0 0 24px;
}
.d-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
  display: flex; align-items: flex-start; gap: 12px;
}
.d-list li:last-child { border-bottom: 0; }
.d-list .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent, var(--blue));
  margin-top: 8px; flex-shrink: 0;
  box-shadow: 0 0 10px var(--accent, var(--blue));
}

.d-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.d-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
a.d-link-primary {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  transition: color 0.2s;
}
a.d-link-primary:hover {
  color: var(--accent, var(--blue));
  text-decoration: underline;
  text-underline-offset: 3px;
}
.d-foot .d-link:last-child { flex-shrink: 0; }

/* ============ Per-tool stage animations ============ */

/* common helpers */
.center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ===== 01 step1.dev — Prompt → Wireframe → Page ===== */
/* 三阶段循环 6s：0-2s prompt, 2-4s wireframe, 4-6s page */

.anim-step1 .s1-prompt,
.anim-step1 .s1-wf,
.anim-step1 .s1-pg {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 86%; height: 78%;
  border-radius: 14px;
  opacity: 0;
}

/* 阶段 1：Prompt 输入框 */
.anim-step1 .s1-prompt {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,106,61,0.35);
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 28px;
  font-family: var(--font-mono);
  animation: s1Prompt 6s ease-in-out infinite;
}
.anim-step1 .s1-prompt-tag {
  font-size: 10px;
  color: var(--c-step);
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}
.anim-step1 .s1-prompt-text {
  font-size: 18px;
  color: #fff;
  line-height: 1.5;
}
.anim-step1 .s1-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--c-step);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* 阶段 2：Wireframe（线框） */
.anim-step1 .s1-wf {
  background: rgba(255,255,255,0.03);
  border: 1.5px dashed rgba(255,255,255,0.4);
  padding: 22px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto auto 1fr;
  gap: 12px;
  animation: s1Wf 6s ease-in-out infinite;
}
.anim-step1 .s1-wf-bar {
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
  height: 14px;
}
.anim-step1 .s1-wf-bar.w1 { width: 70%; height: 22px; grid-column: 1; }
.anim-step1 .s1-wf-bar.w2 { width: 90%; grid-column: 1; }
.anim-step1 .s1-wf-bar.w3 { width: 60%; grid-column: 1; }
.anim-step1 .s1-wf-img {
  grid-column: 2; grid-row: 1 / 4;
  background:
    linear-gradient(135deg, transparent 47%, rgba(255,255,255,0.25) 49%, rgba(255,255,255,0.25) 51%, transparent 53%),
    linear-gradient(45deg, transparent 47%, rgba(255,255,255,0.25) 49%, rgba(255,255,255,0.25) 51%, transparent 53%),
    rgba(255,255,255,0.06);
  border: 1px dashed rgba(255,255,255,0.35);
  border-radius: 6px;
}
.anim-step1 .s1-wf-btn {
  grid-column: 1;
  width: 100px; height: 30px;
  border: 1.5px dashed rgba(255,255,255,0.5);
  border-radius: 6px;
}

/* 阶段 3：成稿页面 */
.anim-step1 .s1-pg {
  background:
    radial-gradient(ellipse at top right, rgba(255,106,61,0.25), transparent 60%),
    linear-gradient(180deg, #14161e, #0a0c12);
  border: 1px solid rgba(255,106,61,0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 30px 60px rgba(255,106,61,0.25);
  padding: 0;
  overflow: hidden;
  animation: s1Pg 6s ease-in-out infinite;
}
.anim-step1 .s1-pg-nav {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.anim-step1 .s1-pg-logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c-step), #ff8f6b);
  box-shadow: 0 0 12px rgba(255,106,61,0.5);
}
.anim-step1 .s1-pg-link {
  width: 36px; height: 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.2);
}
.anim-step1 .s1-pg-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  height: calc(100% - 56px);
}
.anim-step1 .s1-pg-text { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.anim-step1 .s1-pg-h1 {
  height: 16px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.6));
  border-radius: 4px;
}
.anim-step1 .s1-pg-h1.short { width: 70%; }
.anim-step1 .s1-pg-sub {
  height: 8px; width: 90%;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  margin-top: 6px;
}
.anim-step1 .s1-pg-cta {
  margin-top: 14px;
  width: fit-content;
  padding: 10px 18px;
  background: var(--c-step);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 24px rgba(255,106,61,0.6);
}
.anim-step1 .s1-pg-image {
  position: relative;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,180,120,0.6), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(255,106,61,0.5), transparent 60%),
    linear-gradient(135deg, #2b1d1a, #1a1116);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.anim-step1 .s1-pg-glow {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,160,0.5), transparent 70%);
  filter: blur(20px);
  animation: float 6s ease-in-out infinite;
}

/* 阶段标签条 */
.anim-step1 .s1-stage-tag {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  z-index: 5;
}
.anim-step1 .s1-stage-tag .dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  margin-left: 6px;
  margin-right: -2px;
}
.anim-step1 .s1-d1 { animation: s1Dot 6s ease-in-out infinite 0s; }
.anim-step1 .s1-d2 { animation: s1Dot 6s ease-in-out infinite -4s; }
.anim-step1 .s1-d3 { animation: s1Dot 6s ease-in-out infinite -2s; }

@keyframes s1Prompt {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.96); }
  5%, 30% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  35%, 100% { opacity: 0; }
}
@keyframes s1Wf {
  0%, 30% { opacity: 0; transform: translate(-50%,-50%) scale(0.94); }
  38%, 60% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  68%, 100% { opacity: 0; }
}
@keyframes s1Pg {
  0%, 60% { opacity: 0; transform: translate(-50%,-50%) scale(0.94); filter: blur(8px); }
  70%, 95% { opacity: 1; transform: translate(-50%,-50%) scale(1); filter: blur(0); }
  100% { opacity: 0; }
}
@keyframes s1Dot {
  0%, 25% { background: var(--c-step); box-shadow: 0 0 8px var(--c-step); }
  35%, 100% { background: rgba(255,255,255,0.2); box-shadow: none; }
}

/* ===== 02 Cloudflare — 0 元部署到全球边缘 ===== */
.anim-cf { padding: 20px; }

/* 左侧本地源文件 */
.anim-cf .cf-src {
  position: absolute;
  left: 6%; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 2;
}
.anim-cf .cf-file {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  opacity: 0;
  animation: cfFileIn 5s ease-in-out infinite;
}
.anim-cf .cf-file.s2 { animation-delay: 0.2s; }
.anim-cf .cf-file.s3 { animation-delay: 0.4s; }
.anim-cf .cf-file-icon {
  font-size: 9px; font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(244,129,32,0.25);
  color: var(--c-cf);
}
@keyframes cfFileIn {
  0%, 5% { opacity: 0; transform: translateX(-12px); }
  15%, 35% { opacity: 1; transform: translateX(0); }
  45%, 100% { opacity: 0.4; transform: translateX(0); }
}

/* 中间上传光束 */
.anim-cf .cf-beam {
  position: absolute;
  left: 22%;
  top: 50%;
  transform: translateY(-50%);
  width: 26%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-cf), transparent);
  filter: blur(0.5px);
  box-shadow: 0 0 10px var(--c-cf);
  opacity: 0;
  animation: cfBeam 5s ease-in-out infinite;
}
@keyframes cfBeam {
  0%, 35% { opacity: 0; transform: translateY(-50%) scaleX(0); transform-origin: left; }
  45%, 60% { opacity: 1; transform: translateY(-50%) scaleX(1); transform-origin: left; }
  70%, 100% { opacity: 0; }
}

/* 中央发光地球 */
.anim-cf .cf-center {
  position: absolute;
  left: 56%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.anim-cf .cf-globe {
  position: relative;
  width: 160px; height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(244,129,32,0.55), transparent 60%),
    radial-gradient(circle at 65% 70%, rgba(244,129,32,0.3), transparent 60%),
    radial-gradient(circle at center, #1b1d24 0%, #07080b 100%);
  border: 1px solid rgba(244,129,32,0.4);
  box-shadow:
    inset 0 0 60px rgba(244,129,32,0.3),
    0 0 90px rgba(244,129,32,0.35);
  animation: cfGlobePulse 5s ease-in-out infinite;
}
.anim-cf .cf-globe-rings {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    repeating-linear-gradient(0deg, transparent 0 14px, rgba(255,255,255,0.07) 14px 15px),
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,0.07) 14px 15px);
  mask: radial-gradient(circle, #000 60%, transparent 100%);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 100%);
  animation: spin 30s linear infinite;
}
.anim-cf .cf-node {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-cf);
  box-shadow: 0 0 8px var(--c-cf), 0 0 16px var(--c-cf);
  opacity: 0;
  animation: cfNode 5s ease-in-out infinite;
}
.anim-cf .cf-node.n1 { left: 28%;  top: 22%; animation-delay: 1.6s; }
.anim-cf .cf-node.n2 { left: 70%;  top: 30%; animation-delay: 1.8s; }
.anim-cf .cf-node.n3 { left: 18%;  top: 60%; animation-delay: 2.0s; }
.anim-cf .cf-node.n4 { left: 78%;  top: 65%; animation-delay: 2.2s; }
.anim-cf .cf-node.n5 { left: 45%;  top: 84%; animation-delay: 2.4s; }
.anim-cf .cf-node.n6 { left: 50%;  top: 12%; animation-delay: 2.6s; }
@keyframes cfNode {
  0%, 30% { opacity: 0; transform: scale(0.4); }
  40%, 90% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.6; }
}
@keyframes cfGlobePulse {
  0%, 100% { box-shadow: inset 0 0 60px rgba(244,129,32,0.3), 0 0 90px rgba(244,129,32,0.35); }
  50% { box-shadow: inset 0 0 60px rgba(244,129,32,0.4), 0 0 130px rgba(244,129,32,0.55); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 右下角：¥0 徽章 */
.anim-cf .cf-badge {
  position: absolute;
  right: 6%; bottom: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(244,129,32,0.25), rgba(244,129,32,0.08));
  border: 1px solid rgba(244,129,32,0.5);
  border-radius: 14px;
  text-align: right;
  box-shadow: 0 12px 28px rgba(244,129,32,0.3);
  animation: cfBadgePop 5s ease-in-out infinite;
  z-index: 3;
}
.anim-cf .cf-badge-price {
  font-family: var(--font-mono);
  font-size: 32px; font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff, var(--c-cf));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.anim-cf .cf-badge-text {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--c-cf);
  letter-spacing: 0.18em;
  margin-top: 4px;
}
.anim-cf .cf-badge-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-top: 4px;
}
@keyframes cfBadgePop {
  0%, 60% { opacity: 0; transform: scale(0.8) translateY(10px); }
  72%, 95% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0.95; transform: scale(1); }
}

/* 右上角：LIVE 状态 */
.anim-cf .cf-status {
  position: absolute;
  right: 6%; top: 14px;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(40,200,64,0.4);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #4ade80;
  letter-spacing: 0.06em;
  opacity: 0;
  animation: cfStatus 5s ease-in-out infinite;
  z-index: 3;
}
.anim-cf .cf-led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: blink 1s ease-in-out infinite;
}
@keyframes cfStatus {
  0%, 70% { opacity: 0; }
  80%, 100% { opacity: 1; }
}

/* 03 Cursor CLI — terminal */
.anim-cur .term {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 78%; height: 75%;
  background: #0a0c12;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c8d1ff;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.anim-cur .term::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 22px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--line);
}
.anim-cur .term::after {
  content: ""; position: absolute;
  left: 12px; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff5f57;
  box-shadow: 14px 0 0 #febc2e, 28px 0 0 #28c840;
}
.anim-cur .lines {
  margin-top: 18px;
  position: relative;
}
.anim-cur .ln {
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  margin-bottom: 5px;
  animation: type 5s steps(40, end) infinite;
}
.anim-cur .ln.l1 { animation-delay: 0s; }
.anim-cur .ln.l2 { animation-delay: 1s; color: #8be9fd; }
.anim-cur .ln.l3 { animation-delay: 2s; color: #f1fa8c; }
.anim-cur .ln.l4 { animation-delay: 3s; color: #50fa7b; }
.anim-cur .ln.l5 { animation-delay: 4s; color: var(--c-cur); }
.anim-cur .glow {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 18px;
  background: linear-gradient(90deg, transparent, rgba(94,155,255,0.25), transparent);
  animation: scan 3s linear infinite;
  pointer-events: none;
}
@keyframes type { 0%,5% {width:0} 30%,100% {width:100%} }
@keyframes scan { 0% { transform: translateY(0);} 100% { transform: translateY(180px);} }

/* ===== 04 page-agent — Agent 自动操作浏览器 ===== */
.anim-page .pa-browser {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 88%; height: 86%;
  background: #14161e;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 30px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(176,123,255,0.15);
  overflow: hidden;
}
.anim-page .pa-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
}
.anim-page .pa-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}
.anim-page .pa-url {
  flex: 1;
  height: 22px;
  margin: 0 8px;
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  display: flex; align-items: center;
  padding: 0 10px;
  letter-spacing: 0.04em;
}
.anim-page .pa-auto {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--c-page);
  letter-spacing: 0.16em;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(176,123,255,0.2);
  border: 1px solid rgba(176,123,255,0.4);
  animation: blink 1s ease-in-out infinite;
}
.anim-page .pa-body {
  padding: 18px 22px;
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
  flex: 1;
  min-height: 0;
}
.anim-page .pa-browser { display: flex; flex-direction: column; }
.anim-page .pa-row {
  display: flex; align-items: center; gap: 10px;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.anim-page .pa-label {
  width: 70px; height: 8px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  flex-shrink: 0;
}
.anim-page .pa-input {
  flex: 1;
  height: 28px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  display: flex; align-items: center;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  position: relative;
  overflow: hidden;
}
.anim-page .pa-typed {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
}
.anim-page .pa-row-1 { animation: paRowFocus 7s ease-in-out infinite; }
.anim-page .pa-row-1 .pa-typed { animation: paType 7s steps(20, end) infinite; }
.anim-page .pa-row-2 { animation: paRowFocus 7s ease-in-out infinite 1.4s; }
.anim-page .pa-row-2 .pa-typed { animation: paType 7s steps(20, end) infinite 1.4s; }
.anim-page .pa-row-3 { animation: paRowFocus 7s ease-in-out infinite 2.8s; }
.anim-page .pa-row-3 .pa-typed { animation: paType 7s steps(20, end) infinite 2.8s; }

.anim-page .pa-submit {
  margin-top: 6px;
  width: fit-content;
  padding: 8px 18px;
  background: var(--c-page);
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 18px rgba(176,123,255,0.4);
  position: relative;
  animation: paBtnPress 7s ease-in-out infinite 4.2s;
}
.anim-page .pa-ripple {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transform: translate(-50%,-50%) scale(1);
  animation: paRipple 7s ease-in-out infinite 4.4s;
}
.anim-page .pa-toast {
  position: absolute;
  right: 22px; bottom: 14px;
  padding: 8px 14px;
  background: rgba(40,200,64,0.18);
  border: 1px solid rgba(40,200,64,0.5);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #4ade80;
  opacity: 0;
  animation: paToast 7s ease-in-out infinite 5s;
}
.anim-page .pa-cursor {
  position: absolute;
  top: 80%; left: 15%;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 0 6px var(--c-page)) drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  animation: paCursor 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes paRowFocus {
  0%, 5% { opacity: 0.5; }
  10%, 25% { opacity: 1; }
  30%, 100% { opacity: 0.7; }
}
@keyframes paType {
  0%, 8% { width: 0; }
  20%, 100% { width: 100%; }
}
@keyframes paBtnPress {
  0%, 90% { transform: scale(1); box-shadow: 0 8px 18px rgba(176,123,255,0.4); }
  93%, 96% { transform: scale(0.94); box-shadow: 0 4px 12px rgba(176,123,255,0.6); }
  100% { transform: scale(1); }
}
@keyframes paRipple {
  0%, 90% { opacity: 0; transform: translate(-50%,-50%) scale(0.5); }
  92% { opacity: 0.8; transform: translate(-50%,-50%) scale(0.5); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(8); }
}
@keyframes paToast {
  0%, 90% { opacity: 0; transform: translateY(8px); }
  95%, 100% { opacity: 1; transform: translateY(0); }
}
@keyframes paCursor {
  /* 起始：浏览器外左下 */
  0%   { top: 95%; left: 5%;  transform: scale(1); opacity: 0.85; }
  /* 移动到 row1 输入框（约 10-18% 高） */
  10%  { top: 16%; left: 55%; transform: scale(1); opacity: 1; }
  18%  { top: 16%; left: 55%; transform: scale(0.78); }
  21%  { top: 16%; left: 55%; transform: scale(1); }
  /* 移动到 row2（约 30-38% 高） */
  28%  { top: 32%; left: 60%; transform: scale(1); }
  35%  { top: 32%; left: 60%; transform: scale(0.78); }
  38%  { top: 32%; left: 60%; transform: scale(1); }
  /* 移动到 row3（约 48% 高） */
  45%  { top: 48%; left: 65%; transform: scale(1); }
  52%  { top: 48%; left: 65%; transform: scale(0.78); }
  55%  { top: 48%; left: 65%; transform: scale(1); }
  /* 移动到 Submit 按钮（约 70% 高，左侧） */
  65%  { top: 70%; left: 18%; transform: scale(1); }
  72%  { top: 70%; left: 18%; transform: scale(0.7); }
  76%  { top: 70%; left: 18%; transform: scale(1); }
  92%  { top: 70%; left: 18%; opacity: 1; }
  100% { top: 95%; left: 5%;  opacity: 0.4; }
}

/* ===== 05 awesome-design-md — 复制大厂设计系统 → 即生成 UI ===== */
/* 周期 15s：每 3s 切换一个品牌，5 个品牌轮播 */

.anim-md .md-brands {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  display: flex; gap: 6px;
  justify-content: center;
  z-index: 2;
}
.anim-md .md-brand {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-2);
  color: var(--ink-3);
  text-transform: lowercase;
  transition: all 0.4s;
  animation: mdBrandActive 15s ease-in-out infinite;
}
.anim-md .b-apple  { animation-delay: 0s; }
.anim-md .b-stripe { animation-delay: -12s; }
.anim-md .b-linear { animation-delay: -9s; }
.anim-md .b-vercel { animation-delay: -6s; }
.anim-md .b-notion { animation-delay: -3s; }

@keyframes mdBrandActive {
  0%, 18% {
    background: rgba(106,212,163,0.25);
    border-color: var(--c-md);
    color: #fff;
    box-shadow: 0 0 16px rgba(106,212,163,0.5);
    transform: translateY(-2px);
  }
  22%, 100% {
    background: rgba(255,255,255,0.05);
    border-color: var(--line-2);
    color: var(--ink-3);
    box-shadow: none;
    transform: translateY(0);
  }
}

/* 左侧：复制命令 */
.anim-md .md-copy {
  position: absolute;
  left: 6%; top: 56px; bottom: 14px;
  width: 44%;
  background: #0a0c12;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 18px;
  display: flex; flex-direction: column;
  font-family: var(--font-mono);
  font-size: 11px;
}
.anim-md .md-copy::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 22px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
}
.anim-md .md-copy::after {
  content: ""; position: absolute;
  left: 10px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff5f57;
  box-shadow: 12px 0 0 #febc2e, 24px 0 0 #28c840;
}
.anim-md .md-copy-line {
  margin-top: 24px;
  display: flex; align-items: flex-start; gap: 8px;
  flex-wrap: wrap;
}
.anim-md .md-prompt { color: var(--c-md); }
.anim-md .md-cmd-text { color: #fff; word-break: break-all; }
.anim-md .md-brand-slot {
  position: relative;
  display: inline-block;
  min-width: 70px;
  height: 1em;
  vertical-align: baseline;
}
.anim-md .md-tok {
  position: absolute;
  left: 0; top: 0;
  color: var(--c-md);
  font-weight: 700;
  opacity: 0;
  animation: mdTokSwap 15s ease-in-out infinite;
}
.anim-md .t-apple  { animation-delay: 0s;   }
.anim-md .t-stripe { animation-delay: -12s; }
.anim-md .t-linear { animation-delay: -9s;  }
.anim-md .t-vercel { animation-delay: -6s;  }
.anim-md .t-notion { animation-delay: -3s;  }
@keyframes mdTokSwap {
  0%, 1%   { opacity: 0; }
  2%, 18%  { opacity: 1; }
  19%, 100% { opacity: 0; }
}
.anim-md .md-copy-status {
  margin-top: 14px;
  display: flex; align-items: center; gap: 8px;
  color: #4ade80;
  font-size: 10px;
  opacity: 0;
  animation: mdStatus 15s ease-in-out infinite;
}
.anim-md .md-spinner {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: blink 0.8s ease-in-out infinite;
}
@keyframes mdStatus {
  0%, 8% { opacity: 0; }
  12%, 18% { opacity: 1; }
  22%, 100% { opacity: 0.6; }
}
.anim-md .md-copy-btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 8px 14px;
  background: var(--c-md);
  color: #07120c;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(106,212,163,0.4);
  animation: mdBtnPress 15s ease-in-out infinite;
}
@keyframes mdBtnPress {
  0%, 4% { transform: scale(1); }
  6% { transform: scale(0.92); }
  8%, 100% { transform: scale(1); }
}

/* 右侧：按品牌生成的 UI 预览 */
.anim-md .md-preview {
  position: absolute;
  right: 6%; top: 56px; bottom: 14px;
  width: 44%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: rgba(0,0,0,0.3);
}
.anim-md .md-mock {
  position: absolute; inset: 0;
  padding: 14px;
  opacity: 0;
  animation: mdMock 15s ease-in-out infinite;
}

/* —— Apple 风：白底 / 简洁 / 居中 / 大标题 —— */
.anim-md .m-apple {
  background: #f5f5f7;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 22px;
  animation-delay: 0s;
}
.anim-md .m-apple-nav {
  position: absolute; top: 0; left: 0; right: 0; height: 16px;
  background: rgba(0,0,0,0.85);
}
.anim-md .m-apple-h1 {
  width: 70%; height: 16px; border-radius: 3px;
  background: #1d1d1f;
}
.anim-md .m-apple-sub {
  width: 50%; height: 8px; border-radius: 3px;
  background: rgba(0,0,0,0.5);
}
.anim-md .m-apple-cta {
  margin-top: 8px;
  padding: 6px 16px;
  background: #0071e3;
  color: #fff;
  font-size: 11px; font-weight: 500;
  border-radius: 999px;
}

/* —— Stripe 风：紫色渐变 + 卡片 —— */
.anim-md .m-stripe { animation-delay: -12s; background: #0a2540; padding: 0; }
.anim-md .m-stripe-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(0,212,255,0.4), transparent 50%),
    linear-gradient(-45deg, rgba(170,75,200,0.5), transparent 60%),
    #0a2540;
}
.anim-md .m-stripe-h1 {
  position: absolute; top: 28px; left: 14px;
  width: 60%; height: 14px; border-radius: 3px;
  background: #fff;
}
.anim-md .m-stripe-card {
  position: absolute; bottom: 14px; left: 14px; right: 14px; height: 60px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* —— Linear 风：暗色 + 侧边栏 + 列表 —— */
.anim-md .m-linear { animation-delay: -9s; background: #08090a; padding: 0; }
.anim-md .m-linear-side {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 38px;
  background: #0e0f12;
  border-right: 1px solid #1a1c20;
}
.anim-md .m-linear-side::before {
  content: ""; position: absolute; top: 12px; left: 8px;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, #5e6ad2, #8b85e8);
  border-radius: 6px;
}
.anim-md .m-linear-list {
  position: absolute; left: 50px; top: 16px; right: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.anim-md .m-linear-list > div {
  height: 12px;
  background: rgba(94,106,210,0.2);
  border-left: 2px solid #5e6ad2;
  border-radius: 2px;
}

/* —— Vercel 风：黑底 + 三角 logo + 极简 —— */
.anim-md .m-vercel { animation-delay: -6s; background: #000; }
.anim-md .m-vercel-tri {
  position: absolute; left: 50%; top: 26%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 30px solid #fff;
}
.anim-md .m-vercel-h1 {
  position: absolute; left: 50%; top: 60%;
  transform: translateX(-50%);
  width: 60%; height: 10px;
  background: #fff;
  border-radius: 2px;
}
.anim-md .m-vercel-btn {
  position: absolute; left: 50%; bottom: 16px;
  transform: translateX(-50%);
  padding: 6px 18px;
  background: #fff;
  color: #000;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
}

/* —— Notion 风：白底 + emoji + 块编辑 —— */
.anim-md .m-notion { animation-delay: -3s; background: #fff; padding: 16px; }
.anim-md .m-notion-emoji {
  font-size: 22px;
  margin-bottom: 6px;
}
.anim-md .m-notion-h1 {
  width: 80%; height: 14px; border-radius: 3px;
  background: #37352f;
  margin-bottom: 12px;
}
.anim-md .m-notion-block {
  height: 8px; border-radius: 3px;
  background: rgba(55,53,47,0.55);
  margin-bottom: 6px;
}
.anim-md .m-notion-block.s { width: 70%; }

@keyframes mdMock {
  0%   { opacity: 0; transform: translateY(8px) scale(0.96); }
  4%, 18% { opacity: 1; transform: translateY(0) scale(1); }
  22%, 100% { opacity: 0; transform: translateY(-8px) scale(0.96); }
}

/* 06 karpathy-skills — cards */
.anim-sk .deck {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 140px; height: 180px;
}
.anim-sk .sk-card {
  position: absolute; inset: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,209,102,0.18), rgba(255,209,102,0.04));
  border: 1px solid rgba(255,209,102,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  animation: deck 4s ease-in-out infinite;
}
.anim-sk .sk-card::before {
  content: ""; position: absolute; top: 14px; left: 14px; right: 14px; height: 6px;
  border-radius: 3px; background: rgba(255,209,102,0.6);
}
.anim-sk .sk-card::after {
  content: ""; position: absolute; top: 26px; left: 14px; right: 30px; height: 4px;
  border-radius: 3px; background: rgba(255,255,255,0.18);
  box-shadow: 0 8px 0 rgba(255,255,255,0.18), 0 16px 0 rgba(255,255,255,0.12);
}
.anim-sk .sk-card.s1 { animation-delay: 0s; }
.anim-sk .sk-card.s2 { animation-delay: -1.3s; }
.anim-sk .sk-card.s3 { animation-delay: -2.6s; }
@keyframes deck {
  0% { transform: translateY(40px) rotate(-8deg); opacity: 0; }
  20%, 70% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(-40px) rotate(8deg); opacity: 0; }
}

/* 07 cloner-template — wireframe ghost solidify */
.anim-clone .ghost, .anim-clone .solid {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 40%; height: 80%;
  border-radius: 10px;
}
.anim-clone .ghost { left: 6%;
  border: 2px dashed rgba(77,208,225,0.5);
  background:
    linear-gradient(rgba(77,208,225,0.15) 8px, transparent 8px) 0 14px / 90% 18px no-repeat,
    linear-gradient(rgba(77,208,225,0.10) 8px, transparent 8px) 0 42px / 70% 14px no-repeat,
    linear-gradient(rgba(77,208,225,0.10) 8px, transparent 8px) 0 64px / 80% 14px no-repeat;
}
.anim-clone .solid { right: 6%;
  background: linear-gradient(180deg, rgba(77,208,225,0.18), rgba(0,0,0,0.4));
  border: 1px solid rgba(77,208,225,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  position: absolute;
}
.anim-clone .solid::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: 12px; height: 8px;
  background: #4dd0e1; border-radius: 4px;
}
.anim-clone .solid::after {
  content: ""; position: absolute; left: 12px; bottom: 12px;
  width: 60px; height: 22px; background: #4dd0e1; border-radius: 6px;
  box-shadow: 0 8px 18px rgba(77,208,225,0.5);
}
.anim-clone .arrow-c {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  font-size: 22px; color: #4dd0e1;
  text-shadow: 0 0 12px rgba(77,208,225,0.6);
  animation: arrowPulse 1.6s ease-in-out infinite;
}

/* 08 gamma — slides assembling */
.anim-gamma .slide {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 78%; height: 75%;
  background: linear-gradient(180deg, rgba(255,122,182,0.10), rgba(0,0,0,0.4));
  border: 1px solid rgba(255,122,182,0.3);
  border-radius: 12px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr 1fr;
  gap: 10px;
}
.anim-gamma .b {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  opacity: 0;
  animation: slideIn 4s ease-out infinite;
}
.anim-gamma .b.title { grid-column: 1 / -1; height: 18px;
  background: linear-gradient(90deg, var(--c-gamma), rgba(255,122,182,0.3));
  animation-delay: 0s; }
.anim-gamma .b.b1 { animation-delay: 0.4s; }
.anim-gamma .b.b2 { animation-delay: 0.8s; }
.anim-gamma .b.b3 { animation-delay: 1.2s; }
.anim-gamma .b.b4 { animation-delay: 1.6s;
  background: rgba(255,122,182,0.4); }
@keyframes slideIn {
  0%, 5% { opacity: 0; transform: translateY(20px); }
  20%, 85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0); }
}

/* 09 next-ai-drawio — nodes draw themselves */
.anim-draw svg { width: 100%; height: 100%; }
.anim-draw .node {
  fill: rgba(139,233,253,0.15);
  stroke: var(--c-draw);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgba(139,233,253,0.4));
  animation: nodePop 5s ease-in-out infinite;
}
.anim-draw .node.n2 { animation-delay: 0.6s; }
.anim-draw .node.n3 { animation-delay: 1.2s; }
.anim-draw .node.n4 { animation-delay: 1.8s; }
.anim-draw .node.n5 { animation-delay: 2.4s; }
.anim-draw .edge {
  fill: none;
  stroke: var(--c-draw);
  stroke-width: 1.5;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: drawLine 5s ease-in-out infinite;
}
.anim-draw .edge.e2 { animation-delay: 0.6s; }
.anim-draw .edge.e3 { animation-delay: 1.2s; }
.anim-draw .edge.e4 { animation-delay: 1.8s; }
@keyframes nodePop {
  0%, 5% { opacity: 0; transform-origin: center; transform: scale(0.6); }
  20%, 85% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; }
}
@keyframes drawLine {
  0%, 5% { stroke-dashoffset: 80; opacity: 0; }
  25%, 85% { stroke-dashoffset: 0; opacity: 1; }
  100% { opacity: 0; }
}

/* misc */
/* ===== 09 · knowledge & rules · 故事抽屉 ===== */
.ar-story {
  --c-base: rgba(255, 255, 255, 0.45);
  --c-know: var(--c-md);
  --c-rule: var(--c-cur);
  --c-why:  var(--c-page);

  width: 100%;
  margin: 0 auto;
  color: var(--ink);
  font-family: var(--font-sans);
}

/* 默认抽屉（约 960px 宽）：让 9 卡走单列，覆盖默认两栏 grid */
.drawer-inner:has(.ar-story) {
  display: block;
  padding: 28px 32px 36px;
}

/* 用户手动按 F 进入全屏后再放大留白 */
.drawer.fullscreen .drawer-inner:has(.ar-story) {
  padding: 56px 48px 72px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .drawer-inner:has(.ar-story) { padding: 22px 18px 32px; }
  .drawer.fullscreen .drawer-inner:has(.ar-story) { padding: 40px 18px 48px; }
}

.ar-story-head {
  text-align: left;
  margin-bottom: 26px;
}
.ar-story-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ar-story-title {
  font-size: 26px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0 0 10px;
}
.drawer.fullscreen .ar-story-title { font-size: 38px; line-height: 1.18; }
.ar-story-title .grad {
  background: linear-gradient(135deg, var(--c-know), var(--c-rule), var(--c-why));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ar-story-sub {
  font-size: 16px;
  color: var(--ink-2);
  margin: 0;
}
.ar-story-sub em {
  font-style: normal;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  padding: 0 2px;
}

/* 时间线 + 章节 */
.ar-rail {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
}
.ar-dots {
  list-style: none;
  margin: 0;
  padding: 0;
  position: sticky;
  top: 12px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding-top: 18px;
}
.ar-dots::before {
  content: '';
  position: absolute;
  top: 24px; bottom: 4px;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, var(--line) 0%, var(--line-2) 50%, transparent);
  transform: translateX(-50%);
  z-index: 0;
}
.ar-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--line-2);
  position: relative;
  z-index: 1;
  transition: all 0.35s ease;
}
.ar-dot.is-active {
  width: 12px; height: 12px;
  background: var(--c-page);
  border-color: var(--c-page);
  box-shadow: 0 0 0 4px rgba(176, 123, 255, 0.18), 0 0 16px rgba(176, 123, 255, 0.45);
}
.ar-dot.d1.is-active { background: var(--c-base); border-color: var(--c-base); box-shadow: 0 0 0 4px rgba(255,255,255,0.08); }
.ar-dot.d2.is-active { background: var(--c-know); border-color: var(--c-know); box-shadow: 0 0 0 4px rgba(106,212,163,0.18), 0 0 16px rgba(106,212,163,0.45); }
.ar-dot.d3.is-active { background: var(--c-rule); border-color: var(--c-rule); box-shadow: 0 0 0 4px rgba(94,155,255,0.18), 0 0 16px rgba(94,155,255,0.45); }
.ar-dot.d4.is-active { background: var(--c-why);  border-color: var(--c-why);  box-shadow: 0 0 0 4px rgba(176,123,255,0.18), 0 0 16px rgba(176,123,255,0.45); }

.ar-sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.drawer.fullscreen .ar-sections { gap: 56px; }

.ar-sec {
  position: relative;
  padding-left: 4px;
}
.ar-sec-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.ar-sec-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.ar-sec-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.drawer.fullscreen .ar-sec-title { font-size: 22px; }
.ar-sec-title code {
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  margin-right: 4px;
}
.drawer.fullscreen .ar-sec-title code { font-size: 18px; }
.ar-sec-note {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
  margin: 6px 0 18px;
}
.ar-sec-note.small {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
}
.ar-sec-note em {
  font-style: normal;
  color: var(--ink);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}
.ar-sec-note code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

/* 通用入场动画 */
.ar-tree, .ar-arrow, .ar-quote, .ar-item, .ar-why-list > li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.ar-tree.is-in, .ar-arrow.is-in, .ar-quote.is-in,
.ar-item.is-in, .ar-why-list > li.is-in {
  opacity: 1;
  transform: translateY(0);
}
.ar-items .ar-item:nth-child(1).is-in { transition-delay: 0.04s; }
.ar-items .ar-item:nth-child(2).is-in { transition-delay: 0.10s; }
.ar-items .ar-item:nth-child(3).is-in { transition-delay: 0.16s; }
.ar-items .ar-item:nth-child(4).is-in { transition-delay: 0.22s; }
.ar-items .ar-item:nth-child(5).is-in { transition-delay: 0.28s; }
.ar-why-list > li:nth-child(1).is-in { transition-delay: 0.04s; }
.ar-why-list > li:nth-child(2).is-in { transition-delay: 0.12s; }
.ar-why-list > li:nth-child(3).is-in { transition-delay: 0.20s; }

/* Section 1: 传统目录 */
.ar-sec-base { color: rgba(255, 255, 255, 0.7); }
.ar-tree {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  white-space: pre;
  overflow-x: auto;
  color: rgba(255, 255, 255, 0.6);
}
.drawer.fullscreen .ar-tree { font-size: 13.5px; padding: 16px 18px; }
.ar-tree.base { filter: grayscale(0.5); }
.ar-arrow {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-align: center;
  text-transform: uppercase;
  animation: arArrow 2.4s ease-in-out infinite;
}
@keyframes arArrow {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* Section 2 / 3: 条目卡 */
.ar-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ar-item {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c-page);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.55s ease, opacity 0.55s ease;
}
.drawer.fullscreen .ar-item {
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  padding: 14px 16px;
}
.ar-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.ar-sec-know .ar-item { border-left-color: var(--c-know); }
.ar-sec-rule .ar-item { border-left-color: var(--c-rule); }

.ar-path {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
  width: fit-content;
  word-break: break-all;
}
.ar-sec-know .ar-path { color: var(--c-know); }
.ar-sec-rule .ar-path { color: var(--c-rule); }

.ar-text { min-width: 0; }
.ar-title {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.ar-title strong { font-weight: 600; }
.ar-why {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Section 4: 总结 */
.ar-sec-why .ar-why-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ar-sec-why .ar-why-list > li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c-why);
}
.ar-why-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(176, 123, 255, 0.12);
  color: var(--c-why);
  border: 1px solid rgba(176, 123, 255, 0.35);
  height: fit-content;
  white-space: nowrap;
}
.ar-quote {
  margin: 18px 0 22px;
  padding: 18px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(176,123,255,0.10), rgba(106,212,163,0.06));
  border: 1px solid rgba(176, 123, 255, 0.25);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
}
.drawer.fullscreen .ar-quote { padding: 22px 24px; font-size: 17px; }
.ar-quote strong {
  background: linear-gradient(135deg, var(--c-why), var(--c-know));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.ar-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* 响应式：窄屏取消两栏 */
@media (max-width: 720px) {
  .ar-story-title { font-size: 26px; }
  .ar-rail { grid-template-columns: 1fr; }
  .ar-dots { display: none; }
  .ar-item { grid-template-columns: 1fr; }
  .ar-sec-why .ar-why-list > li { grid-template-columns: 1fr; }
}

/* ===== 手机端整体收紧（≤ 640px） ===== */
@media (max-width: 640px) {
  /* 顶部导航：缩小高度与字号，避免压住 hero */
  .nav {
    top: 10px;
    gap: 16px;
    padding: 8px 14px;
    height: 44px;
    border-radius: 999px;
  }
  .brand { font-size: 13px; }
  .brand-dot { width: 8px; height: 8px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 12px; }

  /* Hero：留白收紧；副标题在窄屏允许换行（不再横滚） */
  .hero {
    padding: clamp(70px, 12vh, 96px) 20px clamp(20px, 3vh, 32px);
  }
  .hero h1 { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.12; }
  .lede {
    font-size: 13px;
    white-space: normal;
    overflow: visible;
    text-align: left;
    padding: 0 4px 4px;
  }
  .hero-meta { gap: 8px; }
  .chip { font-size: 11px; padding: 5px 10px; }

  /* 9 卡：横向 padding 收紧；卡片更紧凑 */
  .grid-wrap { padding: 0 16px; }
  .grid { gap: 12px; }
  .card {
    padding: 16px 16px 14px;
    min-height: auto;
  }
  .card-head { gap: 10px; }
  .mono { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; }
  .card-name { font-size: 16px; }

  /* NEXT MONTH：垂直空隙再缩 */
  .next-month { padding: 24px 0 16px; }
  .next-month .nm-title { font-size: 13px; letter-spacing: 0.18em; }

  /* 个人栈 / 关于：边距更小、长段不再横滚改为换行 */
  .stack-wrap { padding: 0 16px; }
  .stack-row { gap: 12px; }
  .stack-item { padding: 14px 16px; border-radius: 14px; }
  .stack-name { font-size: 16px; }

  .about-wrap { padding: 0 16px; margin-bottom: 80px; }
  .about { padding: 24px 22px; border-radius: 18px; }
  .about p {
    font-size: 13.5px;
    white-space: normal;
    overflow: visible;
    line-height: 1.7;
  }

  /* 页脚 */
  .footer { padding: 18px 16px 48px; gap: 6px; }

  /* 抽屉：更小的圆角 + 更小的关闭/全屏按钮（更适合触摸） */
  .drawer { width: calc(100vw - 16px); border-radius: 18px; }
  .drawer-actions { top: 12px; right: 12px; gap: 6px; }
  .drawer-btn { width: 32px; height: 32px; font-size: 18px; }
  .drawer-inner { padding: 22px 16px; }
  .drawer.fullscreen { width: 100vw; border-radius: 0; }
  .drawer.fullscreen .drawer-inner { padding: 56px 16px 40px; }

  /* 9 号卡 · 故事抽屉：在手机端进一步压紧 */
  .ar-story-title { font-size: 22px; }
  .ar-story-sub { font-size: 14px; }
  .ar-sec-title { font-size: 17px; }
  .ar-sec-title code { font-size: 14px; }
  .ar-tree { font-size: 11.5px; padding: 12px 14px; }
  .ar-item { padding: 10px 12px; }
  .ar-path { font-size: 12px; padding: 5px 8px; }
  .ar-quote { padding: 14px 16px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
