/* oss / 吞吞 project site
   Light-first with prefers-color-scheme dark. No external fonts or icon packs.
   Motion is limited to transform/opacity and is disabled for reduced motion. */

:root {
  color-scheme: light dark;
  --bg: #eef3f8;
  --bg-soft: #e7eef5;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --ink: #0d1a2b;
  --muted: #51657b;
  --line: #d5e0ea;
  --line-strong: #b9c9d9;
  --accent: #0f9f8f;
  --accent-strong: #08796d;
  --accent-soft: #d8f5f0;
  --navy: #0d1a2b;
  --code-bg: #0b1220;
  --code-ink: #dbeafe;
  --code-muted: #8fa6c0;
  --shadow: 0 24px 70px -34px rgb(13 26 43 / 0.35);
  --shadow-soft: 0 14px 40px -28px rgb(13 26 43 / 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: "SF Pro Display", "Avenir Next", "Segoe UI", "PingFang SC",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Consolas,
    monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09111d;
    --bg-soft: #0d1726;
    --surface: #101c2d;
    --surface-2: #132237;
    --ink: #e7eff9;
    --muted: #9aacc0;
    --line: #22344b;
    --line-strong: #324a66;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #0d302c;
    --navy: #e7eff9;
    --code-bg: #060b13;
    --code-ink: #e2ecf8;
    --code-muted: #8ea6bf;
    --shadow: 0 24px 70px -34px rgb(0 0 0 / 0.8);
    --shadow-soft: 0 14px 40px -28px rgb(0 0 0 / 0.65);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #061411;
}

.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;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand-pet {
  width: 34px;
  height: 34px;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-pet {
  transform: rotate(-5deg) translateY(-2px);
}

.brand-word {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}

.brand-word span {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav a,
.mobile-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 150ms ease;
}

.nav a:hover,
.mobile-nav a:hover,
.nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 7px 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.mobile-nav {
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 49;
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 24px 18px;
  box-shadow: var(--shadow-soft);
}

#top-sentinel {
  height: 1px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 4px;
}

.mobile-nav a {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms ease, background-color 150ms ease,
    border-color 150ms ease, color 150ms ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: #04110e;
}

.btn-ghost {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 0.86rem;
}

.btn-lg {
  min-height: 50px;
  padding: 13px 22px;
}

.hero {
  padding: 52px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 44px;
  align-items: center;
  min-height: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 11ch;
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  font-weight: 850;
}

h1 .accent {
  color: var(--accent-strong);
}

.hero-copy {
  max-width: 35rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.13rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 20px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.84rem;
  list-style: none;
}

.hero-note li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-note li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 68% 22%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 36%),
    radial-gradient(circle at 24% 82%, color-mix(in srgb, #60a5fa 16%, transparent), transparent 34%),
    linear-gradient(145deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 24px;
  pointer-events: none;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 500ms ease;
}

.hero-stage.is-ready #hero-canvas {
  opacity: 1;
}

.mascot-motion {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.hero-mascot {
  width: min(72%, 390px);
  height: auto;
  filter: drop-shadow(0 30px 34px rgb(13 26 43 / 0.18));
  animation: float 6s ease-in-out infinite;
}

.hero-orbit {
  position: absolute;
  z-index: 1;
  width: 84%;
  aspect-ratio: 1;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 50%;
  animation: spin 26s linear infinite;
  pointer-events: none;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 16%, transparent);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 12px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-strip div {
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}

.proof-strip div:first-child {
  border-left: 0;
  padding-left: 0;
}

.proof-strip strong {
  display: block;
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.proof-strip span {
  color: var(--muted);
  font-size: 0.8rem;
}

.section {
  padding: 76px 0;
}

.section-tight {
  padding: 56px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 820;
}

.section-head p {
  max-width: 65ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.bento-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.bento-card h3 {
  max-width: 22ch;
  font-size: 1.26rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.bento-card p {
  max-width: 45ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bento-card img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 20px;
  padding: 8px;
  border-radius: 12px;
  background: #f4f7fb;
}

.image-zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
}

.bento-card .image-zoom {
  margin-top: 20px;
}

.bento-card .image-zoom img {
  margin-top: 0;
}

.image-zoom img {
  display: block;
  width: 100%;
  height: auto;
  padding: 8px;
  border-radius: 12px;
  background: #f4f7fb;
  transition: outline-color 150ms ease;
}

.image-zoom:hover img,
.image-zoom:focus-visible img {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.split-visual .image-zoom {
  border-radius: var(--radius);
  overflow: hidden;
}

.split-visual .image-zoom img {
  padding: 0;
  border-radius: 0;
}

.bento-card .card-visual {
  margin-top: 18px;
}

.span-7 {
  grid-column: span 7;
}

.span-5 {
  grid-column: span 5;
}

.span-4 {
  grid-column: span 4;
}

.span-8 {
  grid-column: span 8;
}

.bento-card.dark {
  background: #0b1626;
  color: #e7eff9;
}

.bento-card.dark p {
  color: #a9bdd4;
}

.bento-card.dark .mini-code {
  border-color: rgb(255 255 255 / 0.14);
  background: rgb(0 0 0 / 0.22);
  color: #dbeafe;
}

@media (prefers-color-scheme: dark) {
  .bento-card.dark {
    background: #14243a;
  }
}

.bento-card.tint {
  background:
    radial-gradient(circle at 86% 12%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 38%),
    var(--surface);
}

.mini-code {
  margin: 18px 0 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  white-space: pre;
}

.ec-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 20px;
}

.ec-grid i {
  display: block;
  aspect-ratio: 1;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 82%, var(--surface));
}

.ec-grid i:nth-child(n + 9) {
  background: color-mix(in srgb, #60a5fa 65%, var(--surface));
}

.ec-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.ec-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--accent);
  vertical-align: 1px;
}

.ec-legend span:last-child::before {
  background: #60a5fa;
}

.bento-card.mesh {
  background-color: var(--surface);
  background-image: radial-gradient(circle, var(--line-strong) 1px, transparent 1.2px);
  background-size: 14px 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.chip-row span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
}

.iteration {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.iteration-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 112px;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.iteration-tag {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.iteration-row h3 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.iteration-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.iteration-pet {
  justify-self: end;
  width: 78px;
  height: auto;
  opacity: 0.92;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.iteration-row:hover .iteration-pet {
  transform: translateY(-4px) rotate(3deg);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: center;
}

.split > *,
.install-grid > *,
.ecosystem > *,
.doc-layout > *,
.intro-grid > * {
  min-width: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: start;
}

.intro-copy h2 {
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 820;
}

.intro-copy p {
  max-width: 65ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.intro-copy .intro-lede {
  max-width: 30ch;
  margin-top: 20px;
  color: var(--ink);
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.project-facts {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.project-facts h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.project-facts dl {
  display: grid;
  margin: 16px 0 0;
}

.project-facts dl > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.project-facts dl > div:first-child {
  border-top: 0;
}

.project-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.project-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.project-facts dd a {
  font-size: 0.82rem;
}

.code-card,
.code-card pre,
.prose,
.doc-nav,
.steps,
.table-wrap {
  min-width: 0;
}

.split.reverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.split-visual {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f7fb;
  box-shadow: var(--shadow-soft);
}

.split-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.split h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

.split p {
  margin: 16px 0 0;
  color: var(--muted);
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  color: var(--text, var(--ink));
  font-size: 0.93rem;
}

.feature-list li::before {
  content: "→";
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-weight: 700;
}

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 30px;
  align-items: start;
}

.steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 44px;
  color: var(--muted);
  font-size: 0.94rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.steps strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.code-card {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  color: var(--code-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.copy-btn {
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.05);
  color: var(--code-ink);
  padding: 5px 10px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.code-card pre {
  margin: 0;
  padding: 20px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  tab-size: 2;
}

.code-card code {
  font-family: inherit;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
}

.tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.tab-panel[hidden] {
  display: none;
}

.release-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.release-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.release-row time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.release-row strong {
  font-size: 1rem;
}

.release-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.release-row a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: nowrap;
}

.ecosystem {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: start;
}

.eco-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.eco-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.eco-row b {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-strong);
}

.eco-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

.eco-row a {
  font-size: 0.84rem;
  font-weight: 700;
}

.download-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 18%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.download-band h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.download-band p {
  max-width: 58ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
}

.qr-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.qr-card button {
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.qr-card img {
  display: block;
  width: 112px;
  height: auto;
  border-radius: 10px;
}

.qr-card h3 {
  font-size: 1rem;
}

.qr-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.qr-card:hover img {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

dialog {
  width: min(92vw, 460px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 100px -20px rgb(0 0 0 / 0.55);
}

dialog::backdrop {
  background: rgb(4 10 18 / 0.66);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  font-size: 1.1rem;
}

.dialog-close {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 5px 10px;
  font-size: 0.8rem;
}

#qr-large {
  display: block;
  width: 100%;
  height: auto;
  margin: 18px auto 0;
  border-radius: 12px;
  background: #fff;
}

#image-dialog {
  width: min(96vw, 1400px);
  max-width: 1400px;
  padding: 18px;
}

.dialog-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-btn {
  min-width: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 5px 9px;
  font-size: 0.9rem;
  line-height: 1;
}

.zoom-btn:hover,
.zoom-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* 缩放舞台：图片绝对居中，JS 用 transform 缩放/平移；滚轮、双指、拖动、双击。 */
.image-stage {
  position: relative;
  height: min(74vh, 860px);
  margin-top: 14px;
  overflow: hidden;
  border-radius: 12px;
  background: #f4f7fb;
  cursor: grab;
  touch-action: none;
}

.image-stage.is-dragging {
  cursor: grabbing;
}

#image-large {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%);
  transform-origin: center;
  border-radius: 0;
  background: transparent;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 640px) {
  #image-dialog {
    width: 96vw;
    padding: 12px;
  }

  .image-stage {
    height: 60vh;
  }
}

.dialog-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.doc-hero {
  padding: 64px 0 34px;
  border-bottom: 1px solid var(--line);
}

.doc-hero h1 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.doc-hero p {
  max-width: 65ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  padding: 42px 0 76px;
  align-items: start;
}

.doc-nav {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.doc-nav a {
  padding: 7px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.doc-nav a:hover {
  color: var(--accent-strong);
}

.prose {
  max-width: 860px;
}

.prose h2 {
  margin-top: 44px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 30px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 6px;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.86em;
}

.prose pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: inherit;
}

.callout {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}

.callout img {
  width: 60px;
  height: auto;
}

.callout p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--ink);
  background: var(--surface-2);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

tr:last-child td {
  border-bottom: 0;
}

td {
  color: var(--muted);
}

.changelog-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.changelog-entry {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.changelog-entry summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.changelog-entry summary::-webkit-details-marker {
  display: none;
}

.changelog-entry summary strong {
  font-size: 1.1rem;
}

.changelog-entry summary time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.changelog-entry summary span {
  color: var(--muted);
  font-size: 0.88rem;
}

.changelog-entry .entry-body {
  padding: 12px 0 0 2px;
}

.changelog-entry .entry-body ul {
  margin: 0;
  padding-left: 20px;
}

.changelog-entry .entry-body li {
  color: var(--muted);
  font-size: 0.9rem;
}

.anchor-link {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.anchor-link:hover {
  color: var(--accent-strong);
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr));
  gap: 40px;
  padding: 48px 0 30px;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-brand img {
  width: 54px;
  height: 54px;
}

.footer-brand p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-brand .footer-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.footer-links h2 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 7px;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--accent-strong);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-info .dot {
  color: var(--line-strong);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--accent-strong);
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease;
}

.to-top[hidden] {
  display: none;
}

.to-top:hover {
  transform: translateY(-4px) rotate(-4deg);
}

.to-top img {
  width: 58px;
  height: 58px;
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

.mascot-motion .static {
  display: none;
}

@media (max-width: 960px) {
  .hero-grid,
  .split,
  .split.reverse,
  .install-grid,
  .ecosystem,
  .intro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    min-height: 0;
    gap: 30px;
  }

  .hero-stage {
    min-height: 0;
    width: min(100%, 560px);
    justify-self: center;
  }

  .split.reverse .split-visual {
    order: -1;
  }

  .span-7,
  .span-5,
  .span-4,
  .span-8 {
    grid-column: span 12;
  }

  .bento-card {
    min-height: 0;
  }

  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .doc-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 32px, 1180px);
  }

  .nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .hero {
    padding-top: 38px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .hero-copy {
    font-size: 0.98rem;
  }

  .hero-stage {
    border-radius: 26px;
  }

  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proof-strip div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .proof-strip div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .section {
    padding: 54px 0;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .bento-card {
    padding: 22px;
  }

  .iteration-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
  }

  .iteration-pet {
    display: none;
  }

  .release-row,
  .eco-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .release-row a {
    margin-top: 4px;
  }

  .download-band {
    padding: 24px;
  }

  .donate-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding-top: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-legal {
    align-items: flex-start;
    flex-direction: column;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
    width: 56px;
    height: 56px;
  }

  .to-top img {
    width: 51px;
    height: 51px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-mascot,
  .hero-orbit,
  .iteration-pet {
    animation: none;
  }

  #hero-canvas,
  .hero-orbit {
    display: none;
  }

  .mascot-motion .motion {
    display: none;
  }

  .mascot-motion .static {
    display: block;
  }

}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* 首页首屏：矮视口下压缩 hero，保证 hero + 数据条在一屏内 */
@media (min-width: 860px) and (max-height: 820px) {
  .hero {
    padding: 26px 0 24px;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero-stage {
    width: min(100%, calc(100svh - 230px));
    min-height: 320px;
    justify-self: end;
  }

  .hero-copy {
    margin-top: 16px;
    line-height: 1.6;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-note {
    margin-top: 14px;
  }

  h1 {
    font-size: clamp(2.6rem, 5vw, 4.4rem);
  }
}

/* Site search */
.search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.search-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.search-toggle-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.search-toggle kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
}

body.search-open {
  overflow: hidden;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 10vh 20px 24px;
}

.search-overlay[hidden] {
  display: none;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(4 10 18 / 0.58);
  backdrop-filter: blur(4px);
}

.search-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(72vh, 680px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.search-icon {
  color: var(--accent-strong);
  font-size: 1.2rem;
  line-height: 1;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
}

.search-bar input::placeholder {
  color: var(--muted);
}

.search-close {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
}

.search-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.search-results {
  overflow: auto;
  padding: 8px;
}

.search-result {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.search-result:hover,
.search-result.is-active {
  background: var(--accent-soft);
}

.search-result-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 750;
  line-height: 1.35;
}

.search-result-page {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.search-result-snippet {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.search-result mark {
  border-radius: 3px;
  background: var(--accent);
  color: #04110e;
  padding: 0 2px;
}

.search-empty {
  margin: 0;
  padding: 26px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.search-footer {
  padding: 8px 16px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.search-flash {
  animation: search-flash 1.8s ease;
}

@keyframes search-flash {
  0%,
  100% {
    background: transparent;
  }
  25% {
    background: var(--accent-soft);
  }
}

@media (max-width: 720px) {
  .search-toggle-label,
  .search-toggle kbd {
    display: none;
  }

  .search-toggle {
    padding: 7px 9px;
  }

  .search-overlay {
    padding: 5vh 12px 16px;
  }

  .search-panel {
    max-height: 86vh;
  }

  .search-meta .search-hint {
    display: none;
  }
}
