:root {
  color-scheme: light;
  --night: #0f0f0f;
  --graphite: #282828;
  --lime: #e1fd09;
  --ink: #20211e;
  --muted: #565953;
  --paper: #f8f8f4;
  --line: #dedfd7;
  --gutter: clamp(18px, 4vw, 52px);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
  scroll-padding-top: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #5c6d08; outline-offset: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }
figure, p, blockquote { margin: 0; }
p + p { margin-top: .8em; }
h1, h2 { margin: 0; line-height: 1.2; font-weight: 750; }
.shell { width: min(100%, 1430px); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; top: 12px; left: 12px; z-index: 4; padding: 6px 14px; background: #fff; transform: translateY(-180%); }
.skip:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 2; background: var(--night); color: #f6f6f0; border-bottom: 1px solid #323232; }
.masthead { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 730; text-decoration: none; }
.download { display: inline-flex; align-items: center; gap: 10px; padding-block: 6px; color: #f5f5ef; font-size: 14px; text-decoration: none; }
.download span { color: var(--lime); }
.download:hover { text-decoration: underline; }
.site-header :focus-visible, .hero :focus-visible, .image-dialog :focus-visible { outline-color: var(--lime); }

.hero { color: #f4f5ed; background: var(--night); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(44px, 6vw, 91px); }
.hero-copy { padding-block: 12px; }
.platform { color: #b6b8aa; margin-bottom: clamp(15px, 2vw, 25px); font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; letter-spacing: .035em; }
#page-title { font-size: clamp(40px, 5.15vw, 78px); line-height: 1.14; letter-spacing: -.055em; }
.hero-intro { max-width: 27em; margin-top: 21px; color: #bfc1b6; font-size: clamp(15px, 1.4vw, 17px); }
.hero-actions { margin-top: 33px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 23px; }
.hero-actions a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.primary { min-height: 43px; border-radius: 8px; padding: 8px 15px; background: var(--lime); color: var(--night); font-weight: 740; }
.primary:hover { background: #edff65; }
.secondary { color: #f2f3ed; font-size: 14px; }
.secondary:hover { text-decoration: underline; }
.secondary span { color: var(--lime); }
.hero-screen { min-width: 0; overflow: hidden; border: 1px solid #424440; border-radius: 16px; background: #191a18; box-shadow: 0 24px 62px #0007; }
.hero-screen .screenshot { border: 0; border-radius: 0; }
.hero-screen .screenshot:focus-visible { outline-offset: -4px; }
.hero-screen img { width: 100%; }
.hero-screen figcaption { display: flex; gap: 8px 16px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid #424440; padding: 11px 15px; margin: 0; color: #c5c6ba; }

.guide-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(28px, 4vw, 70px); align-items: start; padding-block: clamp(38px, 5vw, 76px) 78px; }
.contents { position: sticky; top: 92px; padding-block: 4px; }
.contents nav > p { margin: 0 0 12px 12px; color: var(--muted); font-size: 12px; font-weight: 690; }
.contents a { display: flex; align-items: baseline; gap: 9px; padding: 7px 10px; border-radius: 6px; color: #454741; text-decoration: none; font-weight: 550; }
.contents a:hover { background: #eceee4; }
.contents a[aria-current] { background: #e8edcd; color: #242b10; font-weight: 730; }
.contents a span { color: #566327; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.contents .nav-extra { margin-top: 13px; }
.contents small { display: block; margin: 18px 12px 0; font-size: 12px; color: var(--muted); }
main { min-width: 0; }
.chapter { padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.chapter + .chapter { padding-top: 39px; }
.chapter h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(24px, 3vw, 35px); letter-spacing: -.04em; }
.step { display: inline-grid; place-items: center; flex: none; width: 37px; height: 34px; color: #283014; background: #e8edcd; border: 1px solid #dbe0bf; border-radius: 7px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 14px; letter-spacing: 0; }
.step-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(22px, 3vw, 47px); align-items: start; margin-top: 22px; }
.instructions ol { margin: 0; padding-left: 1.5em; }
.instructions li { padding-left: 4px; }
.instructions li + li { margin-top: 9px; }
.instructions li::marker { color: #4b5d1c; font-weight: 750; }
.note { margin-top: 19px; padding: 11px 14px; border-left: 3px solid #92a24a; background: #eff1e7; color: #3f4633; font-size: 14px; }
.screenshot { display: block; overflow: hidden; border: 1px solid #383b33; border-radius: 12px; background: var(--night); cursor: zoom-in; }
.screenshot img { width: 100%; }
figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.chapter-lead { margin-top: 15px; color: var(--muted); }
.example { margin-block: 20px; padding: 15px 18px; border: 1px solid #d9dfba; border-radius: 10px; background: #f0f4da; }
.example > span { display: block; color: #4a581a; font-size: 12px; font-weight: 750; }
.example blockquote { margin-top: 4px; font-weight: 640; }
.workflow { list-style: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 0; margin: 21px 0; border: 1px solid var(--line); border-radius: 11px; counter-reset: flow; }
.workflow li { padding: 13px 15px; counter-increment: flow; min-width: 0; }
.workflow li + li { border-left: 1px solid var(--line); }
.workflow strong::before { content: counter(flow) ". "; color: #596527; }
.workflow span { display: block; color: var(--muted); font-size: 14px; }
.inline-detail { margin-top: 16px; }
.inline-detail summary { color: #3c4c14; font-weight: 700; }
.inline-detail > p { margin: 8px 0 0; color: var(--muted); }
summary { width: fit-content; cursor: pointer; }
summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.source-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; margin: 12px 0; }
.source-list dt { font-weight: 700; }
.source-list dd { color: var(--muted); font-size: 14px; margin: 0; }
.wide-figure { margin-top: 18px; }
.reference h2 { font-size: clamp(23px, 2.65vw, 30px); }
.reference > p { margin-top: 13px; }
.reference code { overflow-wrap: anywhere; }
.prompt-box { margin-top: 15px; max-width: 680px; padding: 13px 15px; border: 1px solid #d9dfba; border-radius: 10px; background: #f0f4da; }
.prompt-box textarea { display: block; width: 100%; min-height: 105px; padding: 9px 11px; border: 1px solid #b9c39b; border-radius: 7px; background: #fcfdf8; color: var(--ink); resize: vertical; font: inherit; overflow-wrap: anywhere; }
.prompt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 16px; margin-top: 9px; }
.prompt-actions .primary { min-height: 38px; border: 1px solid #bdcf23; font-size: 14px; }
.prompt-actions a { color: #394518; font-size: 14px; }
.copy-row { display: flex; gap: 8px; max-width: 420px; margin-top: 12px; }
.copy-row input { min-width: 0; flex: 1; padding: 7px 11px; border: 1px solid #b7baad; border-radius: 7px; background: #fff; color: var(--ink); font-family: "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.copy-row button, .image-toolbar button { padding: 6px 11px; border: 1px solid #606653; border-radius: 7px; color: var(--ink); background: #edefe6; white-space: nowrap; font-size: 13px; }
.copy-row button:hover { background: #e4eacb; }
.reference .copy-status { margin-top: 5px; color: #465524; font-size: 13px; }
.faq { margin-top: 15px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 700; }
.faq p { margin-top: 7px; color: var(--muted); max-width: 63ch; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .shell { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 15px; padding-block: 22px; }

.image-dialog { margin: auto; padding: 0; max-width: min(96vw, 1300px); max-height: 94vh; overflow: auto; border: 1px solid #515348; border-radius: 12px; background: var(--night); color: #f4f5ed; }
.image-dialog::backdrop { background: #000b; }
.image-toolbar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; gap: 14px; background: #282828; font-size: 13px; }
.image-toolbar button { padding: 3px 10px; }
.image-dialog img { margin-inline: auto; max-height: calc(94vh - 66px); object-fit: contain; }

@media (max-width: 1050px) {
  .guide-layout { grid-template-columns: 175px minmax(0,1fr); gap: 26px; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: minmax(0,1fr); padding-block: 35px; gap: 23px; }
  .hero-copy { padding: 0; }
  .hero-intro { margin-top: 14px; }
  .hero-actions { margin-top: 20px; }
  .guide-layout { display: block; padding-top: 27px; }
  .contents { position: static; margin-bottom: 27px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .contents nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .contents nav > p { width: 100%; margin: 0 0 5px; }
  .contents a { padding: 4px 7px; font-size: 13px; }
  .contents .nav-extra { margin: 0; }
  .contents small { margin: 7px 0 0; }
  .contents small br { display: none; }
}
@media (max-width: 550px) {
  :root { scroll-padding-top: 78px; }
  .masthead { min-height: 56px; }
  .brand { font-size: 14px; }
  .brand img { width: 28px; height: 28px; }
  .download { font-size: 13px; }
  .step-grid { grid-template-columns: minmax(0,1fr); }
  .workflow { grid-template-columns: minmax(0,1fr); }
  .workflow li + li { border-left: 0; border-top: 1px solid var(--line); }
  .source-list { grid-template-columns: minmax(0,1fr); }
  .chapter { padding-bottom: 29px; }
  .chapter + .chapter { padding-top: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
