:root {
  --bg: #110e0c;
  --surface: #1a1613;
  --surface-raised: #231e1a;
  --text: #ede7e2;
  --muted: #a99e95;
  --accent: #ff8a3d;
  --accent-ink: #2a1203;
  --success: #4ade80;
  --line: #2f2823;
  --header-top: #26201b;
  --header-bottom: #17130f;
  --header-highlight: rgb(255 255 255 / 0.07);
  --header-shadow: rgb(0 0 0 / 0.45);
  --footer-background: #0a0806;
  --measure: 70ch;
  --radius: 12px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --content-max: 1100px;
  --page-inline: max(var(--gutter), calc((100% - var(--content-max)) / 2));
  --section-space: clamp(2rem, 4vw, 3rem);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
  color-scheme: dark light;
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf7f3;
    --surface: #ffffff;
    --surface-raised: #f4eee8;
    --text: #1c1612;
    --muted: #6b5e54;
    --accent: #c2410c;
    --accent-ink: #ffffff;
    --success: #15803d;
    --line: #e8e0d8;
    --header-top: #ffffff;
    --header-bottom: #f2ebe4;
    --header-highlight: rgb(255 255 255 / 0.9);
    --header-shadow: rgb(67 38 14 / 0.12);
    --footer-background: #1f1915;
  }
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); overflow-wrap: break-word; }
body > main, body > .doc { width: 100%; }
img, video, canvas { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
p, li { text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code { background: var(--surface-raised); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { max-width: 100%; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.55; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }

html { scroll-padding-top: 5rem; }
.site-header { position: sticky; top: 0; z-index: 60; display: flex; gap: 2rem; align-items: center; padding: 1rem var(--page-inline); border-bottom: 1px solid var(--line); background: linear-gradient(to bottom, var(--header-top), var(--header-bottom)); box-shadow: inset 0 1px 0 var(--header-highlight), 0 1px 0 var(--line), 0 6px 16px -6px var(--header-shadow); }
.logo { display: inline-flex; align-items: center; font: 700 1.25rem var(--mono); color: var(--text); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.logo-mark { width: 1.6em; height: 1.6em; flex: none; margin-right: 0.5rem; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.18)); transition: transform 0.2s ease; }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .logo:hover .logo-mark { transform: none; } }
.logo span { color: var(--accent); }
.site-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }

.author-photo { position: relative; display: grid; place-items: center; width: 72px; height: 72px; flex: none; overflow: hidden; border-radius: 30%; background: var(--accent); color: var(--accent-ink); font: 700 1.4rem var(--mono); }
.author-photo::before { content: attr(data-initials); }
.author-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@supports (corner-shape: squircle) {
  .author-photo { border-radius: 50%; corner-shape: squircle; }
}
.author-name { margin: 0; font-weight: 700; font-size: 1.1rem; }
.author-role { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.author-links { display: grid; gap: 0.35rem; margin: 1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.author-links a, .author-email { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.author-links a:hover, .author-email:hover { background: var(--surface-raised); }
.author-links svg { width: 1.1rem; height: 1.1rem; flex: none; fill: currentColor; color: var(--muted); }
.author-email-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.85rem; }
.hero { position: relative; isolation: isolate; min-height: min(80vh, 760px); display: grid; grid-template-rows: auto 1fr auto; padding: clamp(2.5rem, 7vw, 5.5rem) var(--page-inline) clamp(2rem, 5vw, 3.5rem); overflow: hidden; background: #000; color: #fff; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-copy { grid-row: 1; max-width: 40rem; text-shadow: 0 1px 2px rgb(0 0 0 / 0.55), 0 4px 24px rgb(0 0 0 / 0.55); }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); max-width: 16ch; margin: 0 0 0.75rem; letter-spacing: -0.03em; }
.hero-actions { grid-row: 3; align-self: end; gap: 0.75rem 1rem; }
.hero-actions .button { padding: 0.8rem 1.4rem; box-shadow: 0 8px 24px rgb(0 0 0 / 0.35); }
.hero .button-glass { background: rgb(255 255 255 / 0.14); color: #fff; border: 1px solid rgb(255 255 255 / 0.55); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); }
.hero .button-glass:hover { background: rgb(255 255 255 / 0.24); }
.hero p { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 40ch; margin: 0; color: #fff; font-weight: 500; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button { display: inline-block; padding: 0.7rem 1.25rem; border-radius: 999px; font-weight: 600; text-decoration: none; background: var(--accent); color: var(--accent-ink); }
.button-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }

.strip { margin: 0; padding: 0.9rem var(--page-inline); text-align: center; font-family: var(--mono); font-size: 0.9rem; background: var(--surface); border-block: 1px solid var(--line); color: var(--muted); }

.section { padding: var(--section-space) var(--page-inline); }
.section > :last-child { margin-bottom: 0; }
.section > h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.5rem; }
.section-lead { color: var(--muted); margin: 0 0 1.5rem; max-width: 62ch; }
.section-more { margin-top: 1.5rem; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding: 0; margin: 0; list-style: none; }
.card { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card-kicker { display: block; font: 0.8rem var(--mono); color: var(--accent); margin-bottom: 0.5rem; }
.card-upcoming { opacity: 0.55; }
.card-upcoming .card-kicker { color: var(--muted); }

.feature-game { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: center; }
.feature-game p:first-child { margin-top: 0; }
.section > h2 + .feature-game { margin-top: 1rem; }
.feature-game img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; }
.feature-list { columns: 2 220px; padding-left: 1.2rem; }
.feature-screenshot { display: block; margin-bottom: 1.5rem; }
.feature-screenshot img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.feature-screenshot:hover img { border-color: var(--accent); }
.explainer { display: grid; gap: 1.75rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.explainer h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.explainer p { margin: 0; color: var(--muted); }
.faq { margin: 0; max-width: 70ch; }
.status-badge { display: inline-block; margin-left: 0.6rem; padding: 0.2rem 0.6rem; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font: 600 0.75rem var(--mono); letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.faq dt { margin-top: 1.25rem; font-weight: 600; }
.faq dd { margin: 0.3rem 0 0; color: var(--muted); }

.page-header { padding: var(--section-space) var(--page-inline) 0.5rem; }
.page-header h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.page-header p { color: var(--muted); margin: 0; max-width: 60ch; }
.page-header p + .button-row { margin-top: 1.5rem; }

.doc { display: grid; grid-template-columns: 240px minmax(0, var(--measure)); gap: 3rem; width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding: 2rem var(--gutter) 3rem; }
.doc-sidebar { position: sticky; top: 5rem; align-self: start; max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; font-size: 0.93rem; }
.doc-sidebar-heading { margin: 1.25rem 0 0.4rem; font: 600 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.doc-sidebar a, .doc-sidebar-upcoming { display: block; padding: 0.3rem 0.6rem; border-radius: 6px; color: var(--muted); text-decoration: none; }
.doc-sidebar-upcoming { opacity: 0.5; }
.doc-sidebar a:hover { color: var(--text); }
.doc-sidebar a[aria-current] { background: var(--surface-raised); color: var(--text); }
.doc article h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 0; letter-spacing: -0.02em; }
.doc article h2 { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.doc-meta { color: var(--muted); font-size: 0.9rem; }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs a { color: inherit; }
.learn-box { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 1rem 1.25rem; }
.doc .learn-box h2 { margin: 0 0 0.25rem; padding: 0; border: 0; font-size: 1rem; }
.learn-box ul { margin: 0; }
.note { background: var(--surface-raised); border-radius: 8px; padding: 0.9rem 1.1rem; font-size: 0.95rem; }
.demo { margin: 1.5rem 0; }
.demo canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); border: 1px solid var(--line); background: #000; }
.demo figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.pager a { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; text-decoration: none; }
.pager a[rel="next"] { text-align: right; }
.pager small { display: block; color: var(--muted); }

.article { width: 100%; max-width: calc(46rem + 2 * var(--gutter)); margin: 0 auto; padding: var(--section-space) var(--gutter) 3rem; }
.article > h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 0.75rem; letter-spacing: -0.02em; }
.article > h2 { margin-top: 2.75rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: clamp(1.35rem, 3vw, 1.65rem); }
.article > h3 { margin-top: 1.75rem; font-size: 1.15rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0 0 1.5rem; color: var(--muted); font-size: 0.9rem; }
.article-meta > * + *::before { content: "·"; margin-right: 1rem; }
.article-lead { font-size: 1.15rem; line-height: 1.6; }
.article-toc { margin: 1.75rem 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.article-toc h2 { margin: 0 0 0.5rem; font-size: 0.8rem; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.article-toc ol { margin: 0; padding-left: 1.25rem; }
.article-toc li { margin: 0.2rem 0; }
.article-figure { margin: 1.75rem 0; }
.article-figure img, .article-figure svg, .article-figure iframe { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article-figure iframe { aspect-ratio: 16 / 9; }
.article-figure figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.88rem; }
.article-takeaways { margin: 2rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--surface); }
.article-takeaways h2 { margin: 0 0 0.4rem; padding: 0; border: 0; font-size: 1.05rem; }
.article-takeaways ul { margin: 0; padding-left: 1.2rem; }
.article-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.article-pager a { flex: 1; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.article-pager a:hover { border-color: var(--accent); }
.article-pager a[rel="next"] { text-align: right; }
.article-pager small { display: block; color: var(--muted); }
.article-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.article-list-item { display: block; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; }
.article-list-item:hover { border-color: var(--accent); }
.article-list-item h2, .article-list-item h3 { margin: 0.2rem 0 0.35rem; font-size: 1.2rem; }
.article-list-item p { margin: 0; color: var(--muted); }
.article-list-meta { color: var(--accent); font: 0.8rem var(--mono); }
.card-date { display: block; margin-top: 0.75rem; color: var(--muted); font: 0.8rem var(--mono); }

.support-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.support-table th, .support-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }

.site-footer { --text: #ede7e2; --muted: #a99e95; --accent: #ff8a3d; --line: #2f2823; margin-top: auto; border-top: 1px solid var(--line); background: var(--footer-background); color: var(--text); }
.footer-nav a:hover { color: var(--text); }
.footer-inner { padding: 2rem var(--page-inline); display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-note { width: 100%; margin: 0; color: var(--muted); font-size: 0.85rem; }

.game-page { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: #060913; }
.game-page .site-header { flex: none; position: relative; z-index: 100; padding-inline: var(--gutter); color: var(--text); }
.game-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; contain: layout paint; }
.game-fullscreen-button { position: absolute; right: 0.75rem; bottom: 0.75rem; z-index: 50; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; border: 1px solid rgb(255 255 255 / 0.25); background: rgb(2 6 23 / 0.55); color: #fff; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.game-fullscreen-button:hover { border-color: var(--accent); color: var(--accent); }
.game-fullscreen-button svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-exit-fullscreen, .is-game-fullscreen .icon-enter-fullscreen { display: none; }
.is-game-fullscreen .icon-exit-fullscreen { display: block; }
.is-game-fullscreen .site-header { position: fixed; top: 0; left: 0; right: 0; transform: translateY(-100%); transition: transform 0.25s ease; box-shadow: 0 6px 24px rgb(0 0 0 / 0.35); }
.is-game-fullscreen.is-header-peeking .site-header { transform: none; }

.lesson-title-accent { color: var(--accent); }
.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 1.75rem; }
.lesson-nav-bottom { margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.lesson-button { display: inline-block; padding: 0.5rem 1.1rem; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.lesson-button:hover { filter: brightness(1.08); }
.lesson-button[rel="next"] { margin-left: auto; }
.lesson-intro { font-size: 1.08rem; }
.example { margin: 1.5rem 0; padding: 1rem 1.25rem 1.25rem; border-radius: 8px; background: var(--surface-raised); }
.example > h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.example > p { margin: 0 0 0.75rem; }
.example pre { margin: 0 0 1rem; background: var(--surface); }
.run-button { display: inline-block; padding: 0.5rem 1.1rem; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.run-button:hover { filter: brightness(1.08); }
.example-demo { margin: 1.5rem 0; }
.example-demo iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); background: #000; }
.example-demo figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem; }
.callout { margin: 1.25rem 0; padding: 0.85rem 1.1rem; border-left: 4px solid; border-radius: 0 8px 8px 0; background: var(--surface); font-size: 0.97rem; }
.callout > strong:first-child { display: block; margin-bottom: 0.2rem; }
.callout-note { border-color: #60a5fa; }
.callout-tip { border-color: var(--accent); }
.callout-warning { border-color: #f59e0b; }
.exercise { margin: 1rem 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.exercise > p:first-child { margin-top: 0; }
.exercise summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.exercise details[open] summary { margin-bottom: 0.5rem; }
.exercise pre { margin: 0.5rem 0 0; }
.reference-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1rem 0; }
.reference-table th, .reference-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.reference-table thead th { background: var(--surface-raised); }
.reference-table code { white-space: nowrap; }
.doc-sidebar-home { font-weight: 600; }
.tutorial-start { margin-top: 1.5rem; }
.section-tight { padding-block: 1.25rem; }
.section-tight:last-child { padding-bottom: 3rem; }
.page-header + .section-tight { padding-top: 1.5rem; }
.tutorial-sample { max-width: 46rem; }
.code-keyword { color: #c792ea; }
.code-type { color: #82aaff; }
.code-attribute { color: #f78c6c; }
.code-string { color: #c3e88d; }
.code-number { color: #f78c6c; }
.code-comment { color: var(--muted); font-style: italic; }
.code-tag { color: #f07178; }
@media (prefers-color-scheme: light) {
  .code-keyword { color: #7c3aed; }
  .code-type { color: #1d4ed8; }
  .code-attribute { color: #c2410c; }
  .code-string { color: #15803d; }
  .code-number { color: #b45309; }
  .code-tag { color: #b91c1c; }
}

@media (max-width: 800px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .reference-table code { white-space: normal; }
  .reference-table th, .reference-table td { overflow-wrap: anywhere; padding: 0.45rem 0.4rem; }
  .example { padding: 0.85rem 0.85rem 1rem; }
  .lesson-nav { margin-bottom: 1.25rem; }
  .doc-sidebar { position: static; order: 2; max-height: none; overflow: visible; border-top: 1px solid var(--line); padding-top: 1rem; }
  .site-header { gap: 1rem; }
  .site-nav { gap: 1rem; }
}

@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; row-gap: 0.35rem; padding-block: 0.6rem; }
  .site-nav { width: 100%; margin-left: 0; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 0.25rem; font-size: clamp(0.8rem, 3.7vw, 0.95rem); }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 6.5rem; }
  .doc-sidebar { top: auto; }
  .hero { min-height: min(70vh, 560px); }
  .button-row .button { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero { background: #000 var(--hero-poster) center / cover; }
}

.wgpu3d-demo { margin: 1.75rem 0; }
.wgpu3d-demo-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(circle at 50% 35%, #2b3a55, #0c0f16 70%); }
.wgpu3d-demo-stage canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.wgpu3d-demo-stage canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); }
.wgpu3d-demo-start { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); padding: 0.75rem 1.4rem; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 1rem system-ui, sans-serif; cursor: pointer; box-shadow: 0 8px 24px rgb(0 0 0 / 0.35); }
.wgpu3d-demo-start:disabled { opacity: 0.5; cursor: default; }
.wgpu3d-demo.is-running .wgpu3d-demo-start { display: none; }
.wgpu3d-demo-message { position: absolute; inset: auto 1rem 1rem; margin: 0; padding: 0.6rem 0.8rem; border-radius: 8px; background: rgb(0 0 0 / 0.65); color: #fff; font-size: 0.9rem; }
.wgpu3d-demo-hud { position: absolute; top: 0.75rem; left: 0.75rem; padding: 0.35rem 0.7rem; border-radius: 8px; background: rgb(0 0 0 / 0.5); color: #fff; font: 600 0.9rem var(--mono); pointer-events: none; }
.wgpu3d-demo-hud:empty { display: none; }
.wgpu3d-demo-control { position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.4rem 0.8rem; border: 1px solid rgb(255 255 255 / 0.4); border-radius: 999px; background: rgb(0 0 0 / 0.45); color: #fff; font: 600 0.85rem system-ui, sans-serif; cursor: pointer; }
.wgpu3d-demo:not(.is-running) .wgpu3d-demo-control { display: none; }
.wgpu3d-demo figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.88rem; }
.wgpu3d-download { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wgpu3d-download code { font-size: 0.85rem; }
.api-signature { margin: 1.5rem 0 0.4rem; font: 600 0.95rem var(--mono); color: var(--accent); }

.about-profile { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.about-profile .author-name { margin: 0; font-size: 1.3rem; }
.about-links { max-width: 22rem; margin-top: 0.5rem; padding-top: 0; border-top: 0; }
.about-note { color: var(--muted); font-size: 0.85rem; }

.not-found-stage { position: relative; height: min(78vh, 720px); min-height: 420px; overflow: hidden; background: linear-gradient(#2a1b3d, #c2532c 70%, #3b2a1f 70%); color: #fff; }
.not-found-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; outline: none; touch-action: none; opacity: 0; transition: opacity 0.6s ease; }
.not-found-stage.is-3d canvas { opacity: 1; }
.not-found-fallback { position: absolute; inset: 0 0 auto; margin: 0; padding-top: 8%; text-align: center; font: 900 clamp(7rem, 26vw, 16rem)/1 var(--mono); letter-spacing: -0.04em; color: #ff8a3d; text-shadow: 0 6px 0 #a8461a, 0 12px 0 #6e2c10, 0 24px 40px rgb(0 0 0 / 0.45); }
.not-found-stage.is-3d .not-found-fallback { display: none; }
.not-found-copy { position: absolute; inset: auto 0 0 0; padding: 3rem var(--page-inline) 1.5rem; background: linear-gradient(to top, rgb(10 8 6 / 0.85), rgb(10 8 6 / 0.55) 60%, transparent); pointer-events: none; }
.not-found-copy > * { pointer-events: auto; max-width: 40rem; }
.not-found-code { margin: 0; color: #ffb27a; font: 600 0.85rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.not-found-copy h1 { margin: 0.2rem 0 0.4rem; font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -0.02em; }
.not-found-copy p { margin: 0 0 1rem; color: #f3ebe4; }
.not-found-copy .button-ghost { color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.not-found-drive, .not-found-hint { display: none; }
.not-found-stage.is-3d .not-found-drive { display: inline-block; }
.not-found-stage.is-driving .not-found-drive { display: none; }
.not-found-stage.is-driving .not-found-hint { display: block; }
.not-found-hint { margin-top: 0.75rem !important; font-size: 0.9rem; }
.not-found-stage.is-driving .not-found-copy { padding-top: 1.5rem; padding-bottom: 1rem; background: linear-gradient(to top, rgb(10 8 6 / 0.75), transparent); }
.not-found-stage.is-driving .not-found-copy > :is(.not-found-code, h1, p:not(.not-found-hint)) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.not-found-stage.is-driving .not-found-copy .button-row { display: inline-flex; vertical-align: middle; margin-right: 1rem; }
.not-found-stage.is-driving .not-found-copy .button { padding: 0.45rem 1rem; }
.not-found-stage.is-driving .not-found-hint { display: inline-block; margin: 0 !important; vertical-align: middle; }
.about-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.about-icon-links { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.about-icon-links a, .about-icon-links button { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.about-icon-links a:hover, .about-icon-links button:hover { background: var(--surface-raised); color: var(--accent); }
.about-icon-links svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.site-nav { align-items: center; }
.site-nav a.site-nav-cta { padding: 0.2rem 0.75rem; border: 1.5px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 600; line-height: 1.4; transition: background-color 0.15s ease, color 0.15s ease; }
.site-nav a.site-nav-cta:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.site-nav a.site-nav-cta[aria-current] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 720px) { .site-nav a.site-nav-cta { padding: 0 0.4rem; border-width: 1px; } .site-nav a.site-nav-about { gap: 0.2rem; } }
@media (max-width: 370px) { html { scroll-padding-top: 8.5rem; } .site-nav { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; gap: 0.45rem 0.5rem; font-size: 0.95rem; } }
.site-nav a.site-nav-about { display: inline-flex; align-items: center; gap: 0.3rem; }
.site-nav-icon { width: 1.05em; height: 1.05em; flex: none; fill: currentColor; }

.official-links-lead { color: var(--muted); }
.official-cards { margin: 1rem 0 0; }
.official-cards .card h3 { font-size: 1rem; }
.official-cards .card-kicker { overflow-wrap: anywhere; }
.resource-contents ul { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.resource-contents a { display: inline-block; padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; text-decoration: none; font-size: 0.9rem; }
.resource-contents a:hover { border-color: var(--accent); }
