:root {
  color-scheme: light;
  --paper: #f5f3ec;
  --ink: #122e29;
  --muted: #536761;
  --rule: #d6dcd1;
  --mint: #a7e4bd;
  --forest: #164c3b;
  --dark: #102321;
  --mono: "Cascadia Code", Consolas, monospace;
  font: 100%/1.6 "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: .22em; }
button { font: inherit; }
p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #ba561b; outline-offset: 3px; }
section[id], .demo[id] { scroll-margin-top: 1.25rem; }
.wrap { width: min(1200px, calc(100% - 5rem)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 5; padding: .6rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.6rem; }
.brand { display: inline-flex; flex: none; align-items: center; gap: .65rem; font-size: 1.28rem; font-weight: 760; text-decoration: none; letter-spacing: -.045em; }
.brand-mark { position: relative; display: inline-block; width: 1.7rem; aspect-ratio: 1; border-radius: .45rem; background: var(--forest); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 1px solid var(--mint); border-radius: 2px; inset: .38rem .62rem .38rem .37rem; transform: skewY(-18deg); }
.brand-mark::after { inset: .38rem .37rem .38rem .62rem; transform: skewY(18deg); }
.site-header nav, .footer-inner > div { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem clamp(.85rem, 3vw, 2rem); }
.site-header nav a, .footer-inner > div a, .header-source { font-size: .9rem; font-weight: 620; text-decoration: none; color: var(--muted); }
.site-header nav a:hover, .footer-inner a:hover, .header-source:hover { text-decoration: underline; color: var(--forest); }
.header-source { border: 1px solid var(--rule); padding: .35rem .8rem; border-radius: .4rem; }
.hero { min-height: 36rem; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.23fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 7vw, 6.5rem); }
.system-label { color: var(--forest); font: 600 .88rem/1.5 var(--mono); margin-bottom: .95rem; }
h1 { font-size: clamp(2.8rem, 5.45vw, 5rem); line-height: 1.13; letter-spacing: -.085em; font-weight: 790; }
h1 em { color: var(--forest); font-style: normal; }
.hero-description { max-width: 33rem; margin-top: 1.5rem; font-size: clamp(1rem, 1.65vw, 1.15rem); color: var(--muted); line-height: 1.75; }
.hero-actions, .download-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: 1.7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .55rem 1rem; font-weight: 680; border: 1px solid transparent; border-radius: .48rem; text-decoration: none; transition: background .18s ease, color .18s ease; }
.primary { background: var(--forest); color: #fff; }
.primary:hover { background: #23664f; }
.secondary { border-color: #b8c9bb; background: #ffffff58; }
.secondary:hover { background: #e5ede2; }
.demo { min-width: 0; overflow: hidden; background: var(--dark); color: #eaf6ef; border: 1px solid #2e544a; border-radius: 1.1rem; box-shadow: 0 1.6rem 3rem #142e271f, 0 .3rem .6rem #142e271f; }
.demo-titlebar, .demo-footer { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .75rem .95rem; background: #19312c; }
.demo-titlebar > span:first-child { display: flex; align-items: center; gap: .55rem; font-weight: 750; }
.demo-caption, .demo-footer { color: #b6cfc2; font-size: .875rem; }
.demo-mark { width: .9rem; height: .9rem; border-radius: 3px; border: 2px solid var(--mint); box-shadow: inset 0 0 0 2px #19312c; background: var(--mint); }
.demo-body { display: grid; grid-template-columns: 9.85rem minmax(0, 1fr); min-height: 22rem; border-block: 1px solid #36534b; }
.file-list { min-width: 0; padding: .55rem .4rem; background: #122a25; border-right: 1px solid #36534b; display: flex; flex-direction: column; gap: .2rem; }
.file-list button { display: flex; align-items: center; justify-content: flex-start; gap: .42rem; width: 100%; padding: .55rem .4rem; overflow: hidden; border-radius: .35rem; border: 1px solid transparent; color: #eaf6ef; background: transparent; text-align: left; font-size: .875rem; cursor: pointer; }
.file-list button:hover { background: #24403a; }
.file-list button[aria-selected="true"] { background: #285240; border-color: #537e6b; }
.file-list button > :last-child { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.file-type, .preview-heading > span { flex: none; padding: .12rem .28rem; background: #335144; color: #cbefda; border-radius: .25rem; font: 650 .76rem/1.35 var(--mono); }
.preview-panel { min-width: 0; min-height: 22rem; position: relative; }
.cad-panel { background: radial-gradient(ellipse at 48% 42%, #315049, #102723 78%); }
.cad-viewport { position: absolute; inset: 0; cursor: grab; }
.cad-viewport:active { cursor: grabbing; }
.cad-viewport canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.model-tools { position: absolute; left: .65rem; bottom: .65rem; display: flex; flex-wrap: wrap; gap: .4rem; pointer-events: none; }
.model-tools button { padding: .38rem .6rem; color: #e7f2eb; background: #142c26df; border: 1px solid #638073; border-radius: .36rem; font-size: .875rem; pointer-events: auto; cursor: pointer; }
.model-tools button:hover, .model-tools button[aria-pressed="true"] { background: #335546; }
.webgl-fallback { position: absolute; inset: 35% 1.2rem auto; text-align: center; color: #e2efe8; }
.media-panel, .document-panel, .archive-panel { padding: 1.05rem clamp(.85rem, 2.5vw, 1.65rem); background: #102723; }
.preview-heading { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.35rem; }
.media-panel canvas { display: block; width: 100%; margin-bottom: .9rem; border-radius: .4rem; background: #18332d; }
.media-panel audio { display: block; width: 100%; max-width: 100%; height: 2.5rem; }
.json-example { font: .9rem/1.8 var(--mono); color: #bde6e0; overflow-wrap: anywhere; }
.json-example b { color: #e7ca8d; font-weight: 500; }
.json-example summary { cursor: pointer; }
.json-example small { color: #bbd1c7; }
.json-example ul { border-left: 1px solid #426659; padding-left: 1.2rem; margin: .25rem .7rem; list-style: none; }
.archive-preview { padding: 0; margin: 0; list-style: none; }
.archive-preview li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem; border-bottom: 1px solid #36534b; padding: .55rem 0; overflow-wrap: anywhere; }
.archive-preview small { color: #c3d6ce; font-size: .88rem; }
kbd, code { padding: .12em .33em; border: 1px solid currentColor; border-radius: .26em; font: .85em/1.4 var(--mono); overflow-wrap: anywhere; }
code { border-color: var(--rule); }
.benefits { border-block: 1px solid var(--rule); background: #e9eee3; }
.benefits-grid, .guide-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 4vw, 3rem); padding-block: 1.75rem; }
.benefits h2 { font-size: 1.05rem; margin-bottom: .35rem; }
.benefits p, .format-card p, .guide-list p, .faq p, .download p { color: var(--muted); }
.section { padding-block: clamp(2.8rem, 7vw, 5.7rem); }
.section-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .55rem 2rem; margin-bottom: 1.9rem; }
.section-intro h2, .download h2 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); line-height: 1.16; letter-spacing: -.055em; }
.section-intro p { color: var(--muted); }
.format-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.format-card { padding: clamp(1rem, 3vw, 1.65rem); background: #fffef8; border: 1px solid var(--rule); border-top: 2px solid #78a989; border-radius: .65rem; }
.format-card h3, .guide-list h3 { margin-bottom: .35rem; font-size: 1.2rem; }
.format-card ul { display: flex; flex-wrap: wrap; gap: .42rem; margin: .95rem 0 0; padding: 0; list-style: none; }
.format-card li { padding: .22rem .46rem; border-radius: .3rem; background: #eaf0e5; color: #244b3c; font: 630 .875rem/1.4 var(--mono); }
.guide-section { background: #e9eee3; border-block: 1px solid var(--rule); }
.guide-list { margin: 0; padding: 0 0 1.1rem 1.4rem; }
.guide-list li::marker { color: var(--forest); font-weight: 700; }
.faq { border-top: 1px solid #b6c5b5; margin-top: 1rem; }
.faq details { border-bottom: 1px solid #b6c5b5; }
.faq summary { padding: .85rem 0; cursor: pointer; font-weight: 650; }
.faq p { padding: 0 0 1rem 1.05rem; max-width: 57rem; }
.download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: clamp(2.3rem, 6vw, 4.8rem); }
.download p { margin-top: .7rem; }
.download-actions { margin-top: 0; }
.text-link { padding-inline: .4rem; font-weight: 650; color: var(--forest); }
.site-footer { border-top: 1px solid var(--rule); }
@media (max-width: 1050px) { .wrap { width: calc(100% - 3rem); } }
@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.7rem; gap: 1.9rem; }
  .hero-copy { max-width: 42rem; }
}
@media (max-width: 580px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; padding-block: .8rem; min-height: auto; row-gap: .45rem; }
  .site-header nav { order: 3; width: 100%; justify-content: flex-start; }
  .demo-body { grid-template-columns: 1fr; min-height: 0; }
  .file-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid #36534b; }
  .preview-panel { min-height: 18rem; }
  .benefits-grid, .format-grid, .guide-list { grid-template-columns: 1fr; }
  .benefits-grid { gap: 1.1rem; }
  .footer-inner { padding-block: .7rem; align-items: flex-start; flex-direction: column; }
  .footer-inner > div { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
