:root {
  color-scheme: light;
  --paper: #f4f2ec;
  --paper-deep: #ebe6db;
  --ink: #1d2524;
  --muted: #6c7572;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(32, 50, 47, 0.1);
  --green: #1d6457;
  --green-dark: #154a41;
  --sage: #dce9e3;
  --gold: #d49b4e;
  --shadow: 0 16px 45px rgba(37, 48, 44, 0.09), 0 2px 8px rgba(37, 48, 44, 0.05);
  --radius: 22px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid rgba(29, 100, 87, 0.28); outline-offset: 3px; }

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: -1;
}
.ambient-one { top: -220px; left: calc(50% - 470px); background: rgba(190, 216, 205, 0.42); }
.ambient-two { right: calc(50% - 520px); bottom: -280px; background: rgba(226, 191, 139, 0.24); }

.home-shell {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
  padding: 62px 0 38px;
}
.brand-header { text-align: center; margin-bottom: 28px; }
.brand-mark {
  width: 94px;
  height: 94px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 31px;
  color: #fff;
  background: linear-gradient(145deg, #287565, var(--green-dark));
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 18px 42px rgba(21, 74, 65, 0.22), inset 0 1px rgba(255,255,255,.24);
  transform: rotate(-3deg);
}
.brand-mark span { font-family: Georgia, "Songti SC", serif; font-size: 46px; line-height: 1; transform: rotate(3deg); }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .19em; }
.brand-header h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 8vw, 46px); line-height: 1.12; letter-spacing: .08em; }
.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 15px; letter-spacing: .05em; }

.notice-card, .nav-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.notice-card { margin-bottom: 17px; padding: 23px 24px 21px; border-radius: var(--radius); }
.notice-topline { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ba879; box-shadow: 0 0 0 5px rgba(59,168,121,.12); }
.notice-card h2 { margin: 0; font-size: 16px; letter-spacing: .03em; }
.notice-card p { margin: 0 0 15px; color: var(--muted); font-size: 14px; }
.endpoint-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(220, 233, 227, .48); }
.endpoint-row code { min-width: 0; flex: 1; overflow-wrap: anywhere; font-family: var(--mono); color: var(--green-dark); font-size: 13px; }
.copy-button { flex: 0 0 auto; padding: 6px 11px; border: 0; border-radius: 9px; color: #fff; background: var(--green); font-size: 12px; font-weight: 700; cursor: pointer; }
.copy-button:hover { background: var(--green-dark); }

.link-stack { display: grid; gap: 12px; }
.nav-card {
  min-height: 88px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 15px;
  border-radius: 19px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nav-card:hover { transform: translateY(-2px); border-color: rgba(29,100,87,.15); box-shadow: 0 19px 46px rgba(37,48,44,.13); }
.nav-card.featured { background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(224,238,232,.93)); }
.card-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: var(--green-dark); background: var(--sage); font-family: Georgia, "Songti SC", serif; font-size: 17px; font-weight: 800; }
.nav-card:nth-child(3n + 2) .card-icon { color: #7b5221; background: #f3e7d4; }
.nav-card:nth-child(3n) .card-icon { color: #43586f; background: #e1e8ef; }
.card-copy { min-width: 0; display: flex; flex-direction: column; }
.card-copy strong { font-size: 16px; letter-spacing: .02em; }
.card-copy small { margin-top: 2px; color: var(--muted); font-size: 13px; }
.card-arrow { color: var(--green); font-size: 21px; transition: transform .2s ease; }
.nav-card:hover .card-arrow { transform: translateX(3px); }
.home-footer { margin-top: 28px; display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; }
.home-footer a { text-underline-offset: 3px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 10; padding: 9px 16px; border-radius: 999px; color: #fff; background: rgba(29,37,36,.93); box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: .22s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* 教程页面 */
.guide-page { background: #f7f5f0; }
.guide-topbar { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(247,245,240,.88); backdrop-filter: blur(14px); }
.topbar-inner { width: min(100% - 32px, 920px); min-height: 62px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mini-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; letter-spacing: .05em; }
.mini-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--green); font-family: Georgia, "Songti SC", serif; }
.topbar-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.topbar-link:hover { color: var(--green); }
.guide-layout { width: min(100% - 32px, 920px); margin: 0 auto; padding: 54px 0 80px; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 56px; }
.guide-content { min-width: 0; }
.guide-breadcrumb { margin: 0 0 12px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.guide-content h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 7vw, 52px); line-height: 1.16; letter-spacing: .02em; }
.guide-lead { max-width: 680px; margin: 15px 0 38px; color: var(--muted); font-size: 17px; }
.guide-content h2 { margin: 45px 0 13px; padding-top: 5px; font-size: 23px; letter-spacing: .01em; scroll-margin-top: 82px; }
.guide-content h3 { margin: 28px 0 9px; font-size: 17px; }
.guide-content p, .guide-content li { color: #46504e; }
.guide-content ul, .guide-content ol { padding-left: 23px; }
.guide-content li + li { margin-top: 7px; }
.guide-content a:not(.next-card) { color: var(--green); text-underline-offset: 3px; }
.callout { margin: 24px 0; padding: 17px 19px; border: 1px solid rgba(29,100,87,.13); border-left: 4px solid var(--green); border-radius: 14px; background: rgba(220,233,227,.46); }
.callout.warning { border-color: rgba(184,120,39,.18); border-left-color: var(--gold); background: rgba(243,231,212,.5); }
.callout strong { display: block; margin-bottom: 3px; }
.callout p { margin: 0; font-size: 14px; }
.code-block { position: relative; margin: 18px 0 24px; overflow: hidden; border-radius: 16px; color: #e6ecea; background: #172420; box-shadow: 0 12px 30px rgba(23,36,32,.13); }
.code-label { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 0 12px 0 16px; border-bottom: 1px solid rgba(255,255,255,.09); color: #9fb1ab; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.code-copy { border: 1px solid rgba(255,255,255,.13); border-radius: 7px; padding: 4px 8px; color: #dce7e3; background: rgba(255,255,255,.06); font-size: 11px; cursor: pointer; }
.code-block pre { margin: 0; padding: 18px; overflow: auto; }
.code-block code { font-family: var(--mono); font-size: 13px; line-height: 1.65; }
.inline-code { padding: .15em .38em; border-radius: 5px; color: var(--green-dark); background: #e6eee9; font-family: var(--mono); font-size: .88em; overflow-wrap: anywhere; }
.step-list { padding: 0 !important; counter-reset: step; list-style: none; }
.step-list > li { position: relative; margin: 0 0 22px; padding-left: 46px; }
.step-list > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--green); font-size: 13px; font-weight: 800; }
.step-list strong { color: var(--ink); }
.guide-toc { position: sticky; top: 90px; align-self: start; padding-left: 18px; border-left: 1px solid var(--line); }
.guide-toc strong { display: block; margin-bottom: 9px; font-size: 12px; letter-spacing: .09em; }
.guide-toc a { display: block; padding: 5px 0; color: var(--muted); font-size: 13px; text-decoration: none; }
.guide-toc a:hover { color: var(--green); }
.next-grid { margin-top: 50px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.next-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.65); text-decoration: none; }
.next-card small { display: block; color: var(--muted); font-size: 11px; }
.next-card strong { color: var(--green-dark); }
.next-card:hover { border-color: rgba(29,100,87,.25); background: #fff; }
.error-table { width: 100%; margin: 20px 0; border-collapse: collapse; font-size: 14px; }
.error-table th, .error-table td { padding: 12px 13px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.error-table th { color: var(--green-dark); background: rgba(220,233,227,.45); }
.error-table td { color: #46504e; background: rgba(255,255,255,.45); }

@media (max-width: 760px) {
  .guide-layout { grid-template-columns: 1fr; padding-top: 38px; }
  .guide-toc { display: none; }
}
@media (max-width: 520px) {
  .home-shell { width: min(100% - 24px, 680px); padding-top: 38px; }
  .brand-mark { width: 82px; height: 82px; border-radius: 27px; margin-bottom: 18px; }
  .brand-mark span { font-size: 40px; }
  .notice-card { padding: 19px 17px 17px; }
  .endpoint-row { align-items: stretch; flex-direction: column; padding: 11px; }
  .copy-button { align-self: flex-end; }
  .nav-card { min-height: 80px; grid-template-columns: 44px 1fr auto; gap: 12px; padding: 13px 14px; }
  .card-icon { width: 44px; height: 44px; border-radius: 13px; }
  .card-copy small { font-size: 12px; line-height: 1.45; }
  .guide-layout, .topbar-inner { width: min(100% - 26px, 920px); }
  .guide-layout { padding-bottom: 55px; }
  .guide-content h2 { margin-top: 38px; }
  .code-block { margin-left: -3px; margin-right: -3px; }
  .next-grid { grid-template-columns: 1fr; }
  .error-table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
