:root {
  --surface: #ffffff;
  --page: #f4f6f9;
  --soft: #f7f9fc;
  --blue-soft: #edf3ff;
  --ink: #182033;
  --ink-soft: #46536a;
  --muted: #748097;
  --line: #dce2eb;
  --line-strong: #c9d2df;
  --blue: #3468e8;
  --blue-dark: #2856c2;
  --green: #16845a;
  --green-soft: #edf8f3;
  --amber: #a96808;
  --amber-soft: #fff7e8;
  --red: #c43c4b;
  --font: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }
code { color: #3157a5; font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }

.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 68px; border-bottom: 1px solid #e2e5eb; background: rgba(255, 255, 255, .96); padding: 0 max(28px, calc((100vw - 1400px) / 2)); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: flex-end; justify-content: center; gap: 3px; width: 32px; height: 32px; border-radius: 7px; background: var(--blue); padding: 7px; }
.brand-mark i { display: block; width: 3px; border-radius: 2px 2px 0 0; background: #fff; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 17px; }
.brand-mark i:nth-child(3) { height: 12px; }
.brand strong { font-size: 16px; }
.brand-category { border-left: 1px solid #dfe3ea; margin-left: 4px; padding-left: 14px; color: #7c8595; font-size: 11px; }
.site-header > nav { display: flex; align-items: center; gap: 28px; }
.site-header > nav a, .header-link { color: #596477; font-size: 12px; font-weight: 650; text-decoration: none; }
.site-header > nav a:hover, .header-link:hover { color: var(--blue); }
.header-actions { display: flex; align-items: center; justify-self: end; gap: 18px; }
.header-actions .header-link + .header-link { border-left: 1px solid #dfe3ea; padding-left: 18px; }

.guide-shell { display: grid; grid-template-columns: 230px minmax(0, 920px); gap: 44px; width: min(calc(100% - 56px), 1194px); margin: 0 auto; padding: 36px 0 70px; }
.guide-sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar-title { display: grid; border-bottom: 1px solid var(--line); padding: 0 10px 15px; }
.sidebar-title span { color: var(--muted); font-size: 12px; }
.sidebar-title strong { margin-top: 2px; font-size: 15px; }
.step-nav { display: grid; padding: 10px 0; }
.step-nav a { position: relative; display: grid; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 62px; border-radius: 7px; padding: 8px 10px; color: var(--muted); text-decoration: none; }
.step-nav a::before { position: absolute; top: 0; bottom: 0; left: 25px; z-index: -1; width: 1px; background: var(--line); content: ""; }
.step-nav a:first-child::before { top: 50%; }
.step-nav a:last-child::before { bottom: 50%; }
.step-nav a > span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--page); font-family: var(--mono); font-size: 10px; font-weight: 800; }
.step-nav a div { display: grid; }
.step-nav strong { color: var(--ink-soft); font-size: 13px; }
.step-nav small { margin-top: 1px; font-size: 10px; }
.step-nav a:hover, .step-nav a[aria-current="step"] { background: #eaf0fb; color: var(--blue); }
.step-nav a[aria-current="step"] > span { border-color: var(--blue); background: var(--blue); color: #fff; }
.step-nav a[aria-current="step"] strong { color: var(--blue); }
.sidebar-help { display: grid; gap: 5px; border-top: 1px solid var(--line); margin-top: 4px; padding: 17px 10px 0; }
.sidebar-help strong { color: var(--ink-soft); font-size: 12px; }
.sidebar-help span { color: var(--muted); font-size: 11px; line-height: 1.55; }

.guide-content { min-width: 0; }
.eyebrow, .step-owner { display: block; color: var(--blue); font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 6px; padding: 8px 15px; font-size: 13px; font-weight: 750; text-decoration: none; cursor: pointer; }
.button--primary { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.button--primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button--secondary { border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft); }
.button--secondary:hover { border-color: #9fb1cd; color: var(--blue); }
.button:disabled { opacity: .7; cursor: wait; }
.guide-step, .after-section, .reference-section { border-top: 1px solid var(--line-strong); margin-top: 34px; padding: 42px 0 10px; }
.guide-content > .guide-step:first-child { border-top: 0; margin-top: 0; padding-top: 4px; }
.step-heading { display: grid; grid-template-columns: 51px minmax(0, 1fr); gap: 19px; }
.step-number { display: grid; place-items: center; align-self: start; width: 51px; height: 51px; border-radius: 8px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 13px; font-weight: 800; }
.step-heading h2, .section-heading h2 { margin: 5px 0 0; font-size: 27px; line-height: 1.3; letter-spacing: 0; }
.step-heading p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.step-owner--ai { color: #6b49c8; }
.step-owner--review { color: var(--green); }

.setup-block { margin-top: 30px; }
.setup-block + .setup-block { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 30px; }
.substep-heading { display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: start; gap: 14px; }
.substep-heading > span { display: grid; place-items: center; width: 43px; height: 30px; border-radius: 5px; background: var(--blue-soft); color: var(--blue); font-family: var(--mono); font-size: 10px; font-weight: 800; }
.substep-heading strong { display: block; font-size: 17px; }
.substep-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-top: 27px; overflow: hidden; }
.choice-row article { min-width: 0; padding: 21px; }
.choice-row article + article { border-left: 1px solid var(--line); }
.choice-row article > span { color: var(--blue); font-size: 11px; font-weight: 750; }
.choice-row strong { display: block; margin-top: 6px; font-size: 15px; }
.choice-row p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.completion-mark { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; }
.completion-mark > span { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 900; }
.completion-mark div { display: grid; }
.completion-mark strong { color: var(--green); font-size: 12px; }
.completion-mark p { margin: 1px 0 0; color: var(--muted); font-size: 12px; }

.instruction-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(340px, 1.05fr); gap: 38px; align-items: center; margin-top: 28px; }
.instruction-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.instruction-list li { display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 13px; border-bottom: 1px solid var(--line); padding: 15px 0; }
.instruction-list li:first-child { padding-top: 0; }
.instruction-list li > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-family: var(--mono); font-size: 11px; font-weight: 800; }
.instruction-list strong { font-size: 14px; }
.instruction-list p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.operation-preview, .key-preview { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 19px; box-shadow: 0 12px 30px rgba(40, 55, 83, .07); }
.preview-bar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
.preview-bar span { font-size: 13px; font-weight: 750; }
.preview-bar small { color: var(--muted); font-size: 10px; }
.game-row { display: grid; grid-template-columns: 41px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #a9c1f4; border-radius: 7px; background: #f4f7ff; margin-top: 13px; padding: 13px; }
.game-row > i { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 6px; background: var(--blue); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.game-row div, .create-row div { display: grid; }
.game-row strong, .create-row strong { font-size: 13px; }
.game-row span, .create-row small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.game-row b { color: var(--blue); font-size: 10px; }
.create-row { display: grid; grid-template-columns: 41px minmax(0, 1fr); align-items: center; gap: 12px; border: 1px dashed var(--line-strong); border-radius: 7px; margin-top: 10px; padding: 12px 13px; }
.create-row > span { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 6px; background: var(--soft); color: var(--blue); font-size: 19px; }
.step-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; }
.step-footer .completion-mark { margin-top: 0; }
.key-preview label { display: grid; gap: 6px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.key-preview input { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); padding: 8px 10px; color: var(--ink); }
.key-value { display: grid; gap: 6px; border: 1px solid #aec3ef; border-radius: 7px; background: #f3f7ff; margin-top: 12px; padding: 12px; }
.key-value span { color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 800; }
.key-value code { font-size: 13px; }
.key-preview > a { display: inline-flex; margin-top: 14px; color: var(--blue); font-size: 11px; font-weight: 750; text-decoration: none; }
.security-callout { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; border: 1px solid #efd9ac; border-radius: 7px; background: var(--amber-soft); margin-top: 21px; padding: 15px 17px; }
.security-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f4d99e; color: var(--amber); font-family: var(--mono); font-size: 13px; font-weight: 900; }
.security-callout strong { font-size: 13px; }
.security-callout p { margin: 3px 0 0; color: #705d3f; font-size: 12px; }

.handoff-block { margin-top: 30px; }
.handoff-block + .handoff-block { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 30px; }
.handoff-action, .ai-result-panel { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-top: 18px; overflow: hidden; }
.handoff-action__prompt { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 25px; align-items: center; padding: 20px 22px; }
.handoff-action strong, .handoff-action p { display: block; }
.handoff-action p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.primary-task__actions { display: grid; gap: 8px; min-width: 138px; }
.ai-result-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); }
.ai-work-list { display: grid; }
.ai-work-list > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px 20px; }
.ai-work-list > div + div { border-top: 1px solid var(--line); }
.ai-work-list span { color: #6b49c8; font-family: var(--mono); font-size: 10px; font-weight: 800; }
.ai-work-list p { margin: 0; color: var(--muted); font-size: 12px; }
.ai-work-list p strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 13px; }
.acceptance-list { border-left: 1px solid var(--line); background: var(--soft); padding: 20px 22px; }
.acceptance-list > strong { font-size: 13px; }
.acceptance-list ul { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.acceptance-list li { position: relative; padding-left: 20px; color: var(--ink-soft); font-size: 12px; }
.acceptance-list li::before { position: absolute; top: 1px; left: 0; color: var(--green); content: "✓"; font-weight: 900; }
.dashboard-result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-top: 18px; overflow: hidden; }
.dashboard-result > div { padding: 20px 22px; }
.dashboard-result > div + div { border-left: 1px solid var(--line); }
.dashboard-result strong { font-size: 13px; }
.dashboard-result p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.section-heading > p { max-width: 370px; margin: 0 0 2px; color: var(--muted); font-size: 13px; }
.optimization-prompt-card { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr); gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-top: 25px; overflow: hidden; }
.optimization-prompt-card__content { min-width: 0; padding: 24px; }
.optimization-prompt-card__eyebrow { color: var(--blue); font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.optimization-prompt-card h3 { margin: 7px 0 0; font-size: 19px; }
.optimization-prompt-card__content > p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.optimization-flow { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; }
.optimization-flow li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; border-top: 1px solid var(--line); padding: 14px 0; }
.optimization-flow li:last-child { padding-bottom: 0; }
.optimization-flow li > span { color: #6b49c8; font-family: var(--mono); font-size: 10px; font-weight: 800; }
.optimization-flow strong { display: block; font-size: 13px; }
.optimization-flow p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.optimization-prompt-card__action { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 24px; border-left: 1px solid var(--line); background: var(--soft); padding: 24px; }
.optimization-safety-note { display: grid; gap: 5px; }
.optimization-safety-note span { color: var(--green); font-family: var(--mono); font-size: 10px; font-weight: 800; }
.optimization-safety-note strong { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.optimization-safety-note p { margin: 0; color: var(--muted); font-size: 11px; }
.optimization-prompt-card__action .button { width: 100%; }

.environment-table { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-top: 24px; overflow: hidden; }
.environment-row { display: grid; grid-template-columns: 90px repeat(2, minmax(0, 1fr)); gap: 16px; align-items: center; min-height: 55px; border-top: 1px solid var(--line); padding: 12px 16px; }
.environment-row:first-child { border-top: 0; }
.environment-row--head { min-height: 40px; background: var(--soft); color: var(--muted); font-size: 10px; font-weight: 750; }
.environment-row strong { font-size: 12px; }
.environment-row a { color: #3157a5; font-family: var(--mono); font-size: 11px; text-decoration: none; overflow-wrap: anywhere; }
.environment-tip { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.guide-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 45px; padding-top: 24px; color: var(--muted); font-size: 11px; }
.guide-footer nav { display: flex; gap: 18px; }
.guide-footer a { text-decoration: none; }
.guide-footer a:hover { color: var(--blue); }

.copy-toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); border: 1px solid #b9dfcf; border-radius: 7px; background: #f0fbf6; color: #126143; padding: 11px 14px; font-size: 12px; font-weight: 650; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .15s ease, transform .15s ease; }
.copy-toast--visible { opacity: 1; transform: translateY(0); }
.copy-toast--error { border-color: #f0bac1; background: #fff1f2; color: var(--red); }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(52, 104, 232, .35); outline-offset: 3px; }

@media (max-width: 980px) {
  .guide-shell { grid-template-columns: 205px minmax(0, 1fr); gap: 28px; width: calc(100% - 40px); }
  .instruction-layout { grid-template-columns: 1fr; }
  .ai-result-panel { grid-template-columns: 1fr; }
  .acceptance-list { border-top: 1px solid var(--line); border-left: 0; }
  .optimization-prompt-card { grid-template-columns: 1fr; }
  .optimization-prompt-card__action { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 58px; padding: 0 15px; }
  .site-header > nav, .brand-category, .header-link:first-child { display: none; }
  .brand strong { font-size: 14px; }
  .brand-mark { width: 29px; height: 29px; }
  .header-actions .header-link + .header-link { border-left: 0; padding-left: 0; }
  .guide-shell { display: block; width: auto; margin: 0 16px; padding: 20px 0 45px; }
  .guide-sidebar { display: none; }
  .guide-step, .after-section, .reference-section { margin-top: 27px; padding-top: 31px; }
  .step-heading { grid-template-columns: 42px minmax(0, 1fr); gap: 13px; }
  .step-number { width: 42px; height: 42px; }
  .step-heading h2, .section-heading h2 { font-size: 23px; }
  .choice-row { grid-template-columns: 1fr; }
  .choice-row article + article { border-top: 1px solid var(--line); border-left: 0; }
  .instruction-layout { gap: 22px; }
  .step-footer, .section-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .handoff-action__prompt { grid-template-columns: 1fr; }
  .dashboard-result { grid-template-columns: 1fr; }
  .dashboard-result > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .environment-row { grid-template-columns: 1fr; gap: 3px; }
  .environment-row--head { display: none; }
  .environment-row a + a { margin-top: 7px; }
  .guide-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
}

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