:root {
  color-scheme: light;
  --bg: #f4f9f0;
  --surface: #ffffff;
  --surface-2: #eef6e8;
  --ink: #1e2a20;
  --ink-2: #3e4f42;
  --muted: #7d8f80;
  --line: #dbe8d6;
  --accent: #3f7d52;
  --accent-2: #8cc07c;
  --bloom: #e2919f;
  --accent-soft: rgba(63, 125, 82, 0.12);
  --code-bg: #eef5e8;
  --code-ink: #34483a;
  --header-bg: rgba(244, 249, 240, 0.86);
  --shadow: 0 1px 2px rgba(45, 74, 52, 0.05), 0 16px 34px -24px rgba(45, 74, 52, 0.4);
  --shadow-hover: 0 2px 6px rgba(45, 74, 52, 0.07), 0 26px 44px -26px rgba(45, 74, 52, 0.45);
  --width: 720px;
  --petal-rose: #e08c9c;
  --petal-blush: #f0bcc8;
  --petal-sun: #efc76a;
  --petal-core: #f8dd9d;
  --leaf: #85b878;
  --stem: #6a9c66;
  --grass: #6fa562;
  --grass-2: #4f8549;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111a14;
  --surface: #17231a;
  --surface-2: #1d2b21;
  --ink: #e8f1e6;
  --ink-2: #c2d2c4;
  --muted: #849b89;
  --line: #2a3a2d;
  --accent: #8fce8a;
  --accent-2: #b6e0a8;
  --bloom: #e6a3b1;
  --accent-soft: rgba(143, 206, 138, 0.14);
  --code-bg: #1c2a20;
  --code-ink: #d9e6d6;
  --header-bg: rgba(17, 26, 20, 0.86);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 36px -24px rgba(0, 0, 0, 0.9);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.55), 0 26px 46px -26px rgba(0, 0, 0, 1);
  --petal-rose: #d0828f;
  --petal-blush: #e0a8b3;
  --petal-sun: #d4ae62;
  --petal-core: #e5cd90;
  --leaf: #6f9c68;
  --stem: #5b8559;
  --grass: #79ab6d;
  --grass-2: #94c286;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111a14;
    --surface: #17231a;
    --surface-2: #1d2b21;
    --ink: #e8f1e6;
    --ink-2: #c2d2c4;
    --muted: #849b89;
    --line: #2a3a2d;
    --accent: #8fce8a;
    --accent-2: #b6e0a8;
    --bloom: #e6a3b1;
    --accent-soft: rgba(143, 206, 138, 0.14);
    --code-bg: #1c2a20;
    --code-ink: #d9e6d6;
    --header-bg: rgba(17, 26, 20, 0.86);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 36px -24px rgba(0, 0, 0, 0.9);
    --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.55), 0 26px 46px -26px rgba(0, 0, 0, 1);
    --petal-rose: #d0828f;
    --petal-blush: #e0a8b3;
    --petal-sun: #d4ae62;
    --petal-core: #e5cd90;
    --leaf: #6f9c68;
    --stem: #5b8559;
    --grass: #79ab6d;
    --grass-2: #94c286;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(
      1200px 460px at 50% -200px,
      rgba(160, 205, 140, 0.34),
      transparent 70%
    ),
    radial-gradient(800px 380px at 100% 12%, rgba(226, 145, 159, 0.1), transparent 68%),
    url("assets/pattern.svg");
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: auto, auto, 200px 200px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

html[data-theme="dark"] body,
html:not([data-theme="light"]) body {
  background-image: radial-gradient(
      1200px 460px at 50% -200px,
      rgba(74, 122, 80, 0.34),
      transparent 70%
    ),
    radial-gradient(800px 380px at 100% 12%, rgba(150, 88, 100, 0.16), transparent 68%),
    url("assets/pattern.svg");
}

::selection {
  background: rgba(140, 192, 124, 0.35);
}

a {
  color: inherit;
}

/* ---------- 布局骨架 ---------- */

.header-inner,
main,
.site-footer {
  width: 100%;
  min-width: 0;
  max-width: calc(var(--width) + 48px);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---------- 页头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.brand::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 0 100% 0 100%;
  transform: rotate(-45deg);
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.site-nav a {
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-nav a:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.site-nav a.is-active {
  color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.theme-toggle {
  font: inherit;
  font-size: 12px;
  line-height: 1;
  margin-left: 4px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-2);
}

main {
  flex: 1 0 auto;
  padding-top: 8px;
  padding-bottom: 84px;
}

/* ---------- 首页 Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 40px;
  padding: 52px 4px 40px;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-size: 42px;
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-desc {
  margin: 16px 0 0;
  max-width: 26em;
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
}

.hero-meta {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hero-art-wrap {
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-art-wrap.is-blooming .hero-art {
  animation: flower-pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  box-shadow: 0 20px 40px -28px rgba(45, 74, 52, 0.55);
  animation: art-float 8s ease-in-out infinite;
}

@keyframes art-float {
  0%,
  100% {
    transform: translateY(0) rotate(-0.5deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

html[data-theme="dark"] .hero-art {
  filter: brightness(0.82) saturate(0.9);
}

/* ---------- 文章卡片列表 ---------- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.post-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.post-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-2);
}

.post-item:hover::before {
  opacity: 1;
}

.post-link {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 24px 26px;
  text-decoration: none;
  color: inherit;
}

.post-num {
  padding-top: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.post-title {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.15s ease;
}

.post-item:hover .post-title {
  color: var(--accent);
}

.post-summary {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--muted);
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.post-meta-row .dot {
  opacity: 0.5;
}

.tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(140, 192, 124, 0.35);
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.empty-note {
  padding: 40px 26px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

/* ---------- 文章页 ---------- */

.back-link {
  display: inline-block;
  margin: 30px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--accent);
}

.prose {
  margin-top: 16px;
  padding: 44px 46px 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.prose h1 {
  margin: 0;
  font-size: 33px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.prose .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prose .post-body {
  margin-top: 32px;
}

.prose p {
  margin: 1.15em 0;
  color: var(--ink-2);
}

.prose h2 {
  margin: 2.2em 0 0.7em;
  font-size: 21px;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.prose h2::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 11px;
  transform: translateY(1px) rotate(-45deg);
  border-radius: 0 100% 0 100%;
  background: linear-gradient(140deg, var(--accent-2), var(--accent));
}

.prose h3 {
  margin: 1.9em 0 0.6em;
  font-size: 17.5px;
  font-weight: 650;
  color: var(--ink);
}

.prose ul,
.prose ol {
  margin: 1.15em 0;
  padding-left: 1.35em;
  color: var(--ink-2);
}

.prose li {
  margin: 0.42em 0;
}

.prose li::marker {
  color: var(--accent-2);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(140, 192, 124, 0.55);
  transition: text-decoration-color 0.15s ease;
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose strong {
  font-weight: 650;
  color: var(--ink);
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 10px 18px;
  border-left: 3px solid var(--accent-2);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  color: var(--muted);
}

.prose blockquote p {
  margin: 0.4em 0;
  color: var(--muted);
}

.prose hr {
  margin: 2.8em 0;
  border: none;
  border-top: 1px solid var(--line);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.6em 0;
  box-shadow: var(--shadow);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 0.15em 0.42em;
  border-radius: 5px;
}

.prose pre {
  margin: 1.6em 0;
  padding: 18px 20px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
  line-height: 1.72;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 13.5px;
  color: var(--code-ink);
}

.table-wrap {
  margin: 1.6em 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.prose .table-wrap table {
  margin: 0;
  min-width: 460px;
}

.prose table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 14.5px;
  table-layout: auto;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose tr:last-child td {
  border-bottom: none;
}

.prose th {
  font-weight: 650;
  color: var(--ink);
  background: var(--surface-2);
}

/* ---------- 上下篇 ---------- */

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  font-size: 14px;
}

.post-nav a {
  flex: 1 1 0;
  min-width: 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.post-nav a:hover {
  border-color: var(--accent-2);
  color: var(--accent);
  transform: translateY(-1px);
}

.post-nav .nav-next {
  text-align: right;
}

/* ---------- 页脚 ---------- */

.site-footer {
  position: relative;
  padding-top: 28px;
  padding-bottom: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 24px;
  width: 44px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--bloom));
  opacity: 0.75;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.site-footer a:hover {
  color: var(--accent);
  border-color: var(--accent-2);
}

/* ---------- 会动的花草 ---------- */

.petal-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.float-petal {
  position: absolute;
  top: -10vh;
  left: var(--x);
  width: var(--sz);
  height: var(--sz);
  border-radius: 62% 10% 62% 10%;
  opacity: 0;
  filter: blur(0.3px);
  animation: petal-fall var(--dur) linear var(--delay) infinite;
}

.float-petal.tone-rose,
.burst-petal.tone-rose {
  background: var(--petal-rose);
}

.float-petal.tone-blush,
.burst-petal.tone-blush {
  background: var(--petal-blush);
}

.float-petal.tone-sun,
.burst-petal.tone-sun {
  background: var(--petal-sun);
}

@keyframes petal-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.62;
  }
  85% {
    opacity: 0.4;
  }
  100% {
    transform: translate3d(var(--dx), 106vh, 0) rotate(320deg);
    opacity: 0;
  }
}

.garden-bed {
  position: relative;
  margin-top: 12px;
  margin-bottom: -4px;
  border-radius: 18px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.garden-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.garden-hint {
  display: block;
  margin: -2px 0 10px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.garden-bed:hover .garden-hint,
.garden-bed:focus-visible .garden-hint {
  opacity: 1;
  color: var(--accent);
}

.garden-svg .stem {
  fill: none;
  stroke: var(--stem);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.92;
}

.garden-svg .leaf {
  fill: var(--leaf);
  opacity: 0.85;
}

.garden-svg .blade {
  fill: none;
  stroke: var(--leaf);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.45;
}

.garden-svg .ground {
  fill: var(--leaf);
  opacity: 0.22;
}

.petal.tone-rose {
  fill: var(--petal-rose);
}

.petal.tone-blush {
  fill: var(--petal-blush);
}

.petal.tone-sun {
  fill: var(--petal-sun);
}

.petal.bright {
  opacity: 0.8;
}

.core {
  fill: var(--petal-core);
}

.core-dot {
  fill: rgba(120, 96, 40, 0.32);
}

/* ---------- 文章页的小草（点正文会长出来） ---------- */

.article-grass-wrap {
  position: relative;
  margin-top: 18px;
  margin-bottom: -46px;
  user-select: none;
}

.article-grass {
  position: relative;
  height: 104px;
  overflow: hidden;
  pointer-events: none;
}

.ag-clump {
  position: absolute;
  bottom: 0;
  left: var(--x);
  transform-origin: 50% 100%;
  transform: translateX(-50%) scaleY(0.18);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.ag-clump svg {
  display: block;
  overflow: visible;
}

.ag-blade {
  fill: var(--grass);
}

.ag-stem {
  fill: none;
  stroke: var(--stem);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.ag-bloom {
  fill: var(--petal-blush);
}

.ag-bloom.halo {
  opacity: 0.2;
}

.ag-blade.alt {
  fill: var(--grass-2);
  opacity: 0.9;
}

.ag-bloom.bloom-1 {
  fill: var(--petal-rose);
}

.ag-bloom.bloom-2 {
  fill: var(--petal-sun);
}

.article-grass.is-grown .ag-clump {
  opacity: 0.92;
  animation: clump-grow 1.2s cubic-bezier(0.2, 0.9, 0.25, 1) var(--d) forwards;
}

@keyframes clump-grow {
  0% {
    transform: translateX(-50%) scaleY(0.18);
  }
  62% {
    transform: translateX(-50%) scaleY(1.06);
  }
  82% {
    transform: translateX(-50%) scaleY(0.97);
  }
  100% {
    transform: translateX(-50%) scaleY(1);
  }
}

.ag-hint {
  margin: 0;
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.72;
  transition: opacity 0.3s ease;
}

.article-grass-wrap.is-grown .ag-hint {
  opacity: 0;
}

/* 首页卡片右下角的一小丛草，鼠标移到卡片上会长起来 */

.card-tuft {
  position: absolute;
  right: 16px;
  bottom: 0;
  opacity: 0.32;
  pointer-events: none;
  transform-origin: 50% 100%;
  transform: scaleY(0.42);
  transition: opacity 0.3s ease, transform 0.55s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.card-tuft svg {
  display: block;
}

.post-item:hover .card-tuft {
  opacity: 0.8;
  transform: scaleY(1);
}

.plant {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: plant-sway 4.6s ease-in-out infinite alternate;
}

.flower {
  transform-box: fill-box;
  transform-origin: 50% 88%;
  animation: flower-nod 5.2s ease-in-out infinite alternate;
}

.blade {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: blade-sway 5.8s ease-in-out infinite alternate;
}

@keyframes plant-sway {
  from {
    transform: rotate(-2.2deg);
  }
  to {
    transform: rotate(2.2deg);
  }
}

@keyframes flower-nod {
  from {
    transform: rotate(-4deg);
  }
  to {
    transform: rotate(4deg);
  }
}

@keyframes blade-sway {
  from {
    transform: rotate(-4.5deg);
  }
  to {
    transform: rotate(4.5deg);
  }
}

.garden-bed.is-blooming .flower {
  animation: flower-pop 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes flower-pop {
  0% {
    transform: scale(1) rotate(0deg);
  }
  35% {
    transform: scale(1.5) rotate(-7deg);
  }
  65% {
    transform: scale(0.93) rotate(4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.burst-petal {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 62% 10% 62% 10%;
  pointer-events: none;
  animation: petal-burst 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

@keyframes petal-burst {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(0.4);
    opacity: 1;
  }
  70% {
    opacity: 0.85;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty)))
      rotate(var(--rot)) scale(1);
    opacity: 0;
  }
}

a:focus-visible,
button:focus-visible,
.garden-bed:focus-visible,
.hero-art-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.garden-bed:focus-visible,
.hero-art-wrap:focus-visible {
  border-radius: 20px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 2px 30px;
  }

  .hero-art-wrap {
    order: -1;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-art {
    max-width: none;
    margin: 0;
  }

  .hero-title {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    padding-top: 11px;
    padding-bottom: 11px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand {
    font-size: 15px;
  }

  .site-nav {
    gap: 2px;
    font-size: 13.5px;
  }

  .site-nav a {
    padding: 5px 9px;
  }

  .hero-title {
    font-size: 30px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-meta {
    margin-top: 18px;
    padding-top: 14px;
  }

  .post-link {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 20px;
  }

  .post-num {
    padding-top: 0;
  }

  .post-title {
    font-size: 18.5px;
  }

  .prose {
    margin-top: 10px;
    padding: 26px 20px 34px;
    border-radius: 20px;
  }

  .prose h1 {
    font-size: 25px;
  }

  .post-nav {
    flex-direction: column;
    gap: 12px;
  }

  .post-nav a {
    text-align: left;
  }

  .post-nav .nav-next {
    text-align: left;
  }

  .garden-hint {
    font-size: 10.5px;
    margin-bottom: 8px;
  }

  .article-grass {
    height: 76px;
  }

  .ag-clump:nth-child(even) {
    display: none;
  }

  .ag-hint {
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plant,
  .flower,
  .blade,
  .float-petal,
  .hero-art {
    animation: none !important;
  }

  .article-grass .ag-clump {
    animation: none !important;
    transform: translateX(-50%) scaleY(1);
    opacity: 0.8;
  }

  .petal-layer {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }
}
