/* 教程样式全部限定在 .lc-tutorial；复用商户工作台的主题变量。 */
.lc-tutorial {
  --lct-bg: var(--bg, #f4f7fc);
  --lct-panel: var(--panel, #fff);
  --lct-soft: var(--panel-2, #f7f9fd);
  --lct-line: var(--line-2, rgba(20, 32, 56, .14));
  --lct-text: var(--text, #16203a);
  --lct-secondary: var(--text-2, #2b3a57);
  --lct-muted: var(--muted, #66748c);
  --lct-accent: var(--accent, #4f6ef7);
  --lct-accent-soft: var(--accent-soft, rgba(79, 110, 247, .09));
  color: var(--lct-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  width: 100%;
  min-width: 0;
  max-width: 1500px;
  margin: 0 auto;
  isolation: isolate;
}
.lc-tutorial *, .lc-tutorial *::before, .lc-tutorial *::after { box-sizing: border-box; }
.lc-tutorial [hidden] { display: none !important; }
.lc-tutorial button, .lc-tutorial input, .lc-tutorial select, .lc-tutorial textarea { font: inherit; }
.lc-tutorial button { cursor: pointer; }
.lc-tutorial :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--lct-accent);
  outline-offset: 3px;
}
.lct-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 4px 2px 26px; }
.lct-eyebrow { color: var(--lct-accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.lct-header h1 { font-size: clamp(21px, 2vw, 28px); line-height: 1.4; margin: 6px 0 8px; letter-spacing: -.02em; }
.lct-header p { margin: 0; color: var(--lct-muted); font-size: 13px; max-width: 66ch; }
.lct-store { max-width: 260px; overflow-wrap: anywhere; color: var(--lct-muted); background: var(--lct-panel); border: 1px solid var(--lct-line); border-radius: 8px; padding: 6px 12px; font-size: 11px; flex-shrink: 0; }
.lct-layout { display: grid; grid-template-columns: 246px minmax(0, 1fr); align-items: start; gap: 22px; }
.lct-sidebar { position: sticky; top: 18px; background: var(--lct-panel); border: 1px solid var(--lct-line); border-radius: 13px; overflow: hidden; }
.lct-directory { padding: 17px 12px 16px; max-height: calc(100dvh - 52px); overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; }
.lct-search-label { display: block; margin: 0 4px 6px; font-size: 12px; font-weight: 650; color: var(--lct-secondary); }
.lct-search { display: flex; align-items: center; gap: 7px; padding: 0 10px; background: var(--lct-soft); border: 1px solid var(--lct-line); border-radius: 8px; }
.lct-search svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: var(--lct-muted); stroke-width: 1.8; }
.lct-search input { width: 100%; min-width: 0; padding: 9px 0; color: var(--lct-text); background: transparent; border: 0; outline-offset: 0; font-size: 12px; }
.lct-search input::placeholder { color: var(--lct-muted); opacity: 1; }
.lct-search-clear { border: 0; background: transparent; color: var(--lct-muted); padding: 2px 4px; min-width: 24px; min-height: 30px; font-size: 21px !important; }
.lct-search-state { padding: 8px 4px 3px; color: var(--lct-muted); font-size: 10px; min-height: 30px; }
.lct-nav-category { margin: 16px 8px 6px; color: var(--lct-muted); font-size: 11px; letter-spacing: .05em; }
.lct-nav button { display: grid; width: 100%; gap: 2px; text-align: left; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--lct-secondary); padding: 9px 10px; margin-top: 3px; transition: background-color .16s ease, color .16s ease; }
.lct-nav button span { font-size: 12px; font-weight: 600; }
.lct-nav button small { font-size: 10px; color: var(--lct-muted); line-height: 1.6; }
.lct-nav button:hover { background: var(--lct-soft); }
.lct-nav button[aria-current="page"] { color: var(--lct-accent); border-color: var(--lct-line); background: var(--lct-accent-soft); }
.lct-nav button[aria-current="page"] small { color: var(--lct-secondary); }
.lct-sidebar-help { border-top: 1px solid var(--lct-line); margin: 18px 5px 0; padding-top: 14px; font-size: 11px; color: var(--lct-muted); }
.lct-menu-toggle { display: none !important; }
.lct-reading { min-width: 0; }
.lct-article { background: var(--lct-panel); border: 1px solid var(--lct-line); border-radius: 13px; padding: clamp(19px, 2.3vw, 34px); min-width: 0; outline: none; }
.lct-article-head { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--lct-line); }
.lct-article-head h2 { margin: 4px 0 8px; font-size: clamp(20px, 1.8vw, 25px); letter-spacing: -.02em; line-height: 1.4; }
.lct-article-head p { margin: 0; color: var(--lct-muted); font-size: 13px; }
.lct-body { font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
.lct-body > p { color: var(--lct-secondary); }
.lct-body code { color: var(--lct-secondary); border: 1px solid var(--lct-line); background: var(--lct-soft); border-radius: 4px; padding: 1px 4px; font-family: Consolas, "SFMono-Regular", monospace; font-size: .93em; overflow-wrap: anywhere; }
.lct-body h3 { color: var(--lct-text); }
.lct-section-title { font-size: 16px; line-height: 1.5; margin: 28px 0 13px; }
.lct-figure { margin: 0 0 28px; border: 1px solid var(--lct-line); border-radius: 10px; overflow: auto; background: var(--lct-soft); scrollbar-width: thin; }
.lct-figure-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 13px; border-bottom: 1px solid var(--lct-line); }
.lct-figure-top > span { color: var(--lct-accent); font-size: 11px; font-weight: 700; }
.lct-figure-top small { color: var(--lct-muted); font-size: 10px; }
.lct-figure svg { display: block; width: 100%; min-width: 620px; height: auto; color: var(--lct-text); background: var(--lct-bg); }
.lct-figure figcaption { min-width: 0; padding: 10px 13px; font-size: 11px; color: var(--lct-muted); border-top: 1px solid var(--lct-line); background: var(--lct-panel); line-height: 1.75; }
.lct-video { margin: 0 0 28px; border: 1px solid var(--lct-line); border-radius: 10px; overflow: hidden; background: var(--lct-soft); }
.lct-video video { display: block; width: 100%; max-height: 70dvh; aspect-ratio: 16 / 9; background: #102142; }
.lct-video figcaption { padding: 12px 14px; font-size: 12px; color: var(--lct-secondary); line-height: 1.8; }
.lct-steps { list-style: none; counter-reset: lct-step; padding: 0; margin: 20px 0 26px; }
.lct-steps > li { counter-increment: lct-step; position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 0 0 23px; }
.lct-steps > li::before { content: counter(lct-step, decimal-leading-zero); display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--lct-accent); background: var(--lct-accent-soft); font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 750; }
.lct-steps > li:not(:last-child)::after { content: ""; position: absolute; top: 35px; bottom: 7px; left: 14px; width: 1px; background: var(--lct-line); }
.lct-steps h3 { margin: 0 0 6px; font-size: 14px; font-weight: 650; line-height: 1.7; }
.lct-steps p { margin: 0; color: var(--lct-secondary); max-width: 80ch; }
.lct-note { margin: 18px 0; padding: 13px 16px; background: var(--lct-soft); border: 1px solid var(--lct-line); border-left: 3px solid var(--lct-accent); border-radius: 3px 8px 8px 3px; }
.lct-note > b { display: block; color: var(--lct-text); font-size: 12px; }
.lct-note p { margin: 4px 0 0; color: var(--lct-secondary); font-size: 12px; line-height: 1.85; }
.lct-note-warn { border-left-color: var(--warn, #d98a00); background: var(--warn-soft, var(--lct-soft)); }
.lct-table-wrap { max-width: 100%; margin: 21px 0; overflow-x: auto; border: 1px solid var(--lct-line); border-radius: 8px; scrollbar-width: thin; }
.lct-table-wrap table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.lct-table-wrap th { padding: 10px 12px; color: var(--lct-text); font-weight: 650; background: var(--lct-soft); vertical-align: top; }
.lct-table-wrap td { padding: 11px 12px; border-top: 1px solid var(--lct-line); color: var(--lct-secondary); vertical-align: top; line-height: 1.85; min-width: 126px; }
.lct-table-wrap td:first-child { color: var(--lct-text); }
.lct-inventory { margin-top: 30px; padding-top: 4px; border-top: 1px solid var(--lct-line); }
.lct-config-index { display: flex; gap: 8px; flex-wrap: wrap; margin: 15px 0 20px; }
.lct-config-index .lct-button { text-align: left; max-width: 100%; white-space: normal; }
.lct-config { padding: 17px 0; border-top: 1px solid var(--lct-line); scroll-margin-top: 20px; }
.lct-config:focus { outline: 2px solid var(--lct-accent); outline-offset: 5px; border-radius: 3px; }
.lct-config h3 { margin: 0 0 7px; font-size: 14px; }
.lct-config p { margin: 7px 0; color: var(--lct-secondary); }
.lct-config summary { color: var(--lct-muted); cursor: pointer; font-size: 11px; }
.lct-config-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.lct-live-panel { margin: 24px 0; padding: 20px; border: 1px solid var(--lct-line); background: var(--lct-soft); border-radius: 10px; }
.lct-live-panel > .lct-note:first-child { margin-top: 0; }
.lct-live-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.lct-live-head h3 { margin: 4px 0 0; font-size: 15px; }
.lct-live-badge { font-size: 10px; color: var(--lct-muted); border: 1px solid var(--lct-line); border-radius: 5px; padding: 3px 7px; flex: 0 0 auto; }
.lct-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.lct-controls label { display: grid; gap: 5px; font-size: 11px; color: var(--lct-muted); flex: 1 1 170px; min-width: 0; }
.lct-controls select { max-width: 100%; width: 100%; padding: 8px 10px; border: 1px solid var(--lct-line); background: var(--lct-panel); color: var(--lct-text); font-size: 12px; border-radius: 6px; min-height: 38px; }
.lct-live-values { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 15px 0; }
.lct-live-values div { min-width: 120px; }
.lct-live-values dt { color: var(--lct-muted); font-size: 10px; }
.lct-live-values dd { margin: 0; color: var(--lct-text); font: 12px/1.8 Consolas, "SFMono-Regular", monospace; overflow-wrap: anywhere; }
.lct-copy { margin: 15px 0; min-width: 0; }
.lct-copy-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 7px; }
.lct-copy-head label { font-size: 11px; color: var(--lct-secondary); }
.lc-tutorial .lct-code { display: block; width: 100%; min-width: 0; max-width: 100%; border: 1px solid var(--lct-line); border-radius: 7px; background: var(--lct-panel); color: var(--lct-secondary); padding: 11px 12px; font: 12px/1.8 Consolas, "SFMono-Regular", "Microsoft YaHei", monospace; tab-size: 2; box-shadow: none; }
.lc-tutorial input.lct-code { text-overflow: ellipsis; min-height: 42px; }
.lc-tutorial textarea.lct-code { resize: vertical; min-height: 92px; white-space: pre; overflow: auto; }
.lct-button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 37px; padding: 7px 12px; border: 1px solid var(--lct-line); border-radius: 7px; background: var(--lct-panel); color: var(--lct-secondary); font-size: 12px !important; line-height: 1.6; text-decoration: none; transition: background-color .16s ease, transform .12s ease; }
.lct-button:hover { background: var(--lct-accent-soft); color: var(--lct-accent); text-decoration: none; }
.lct-button:active { transform: scale(.98); }
.lct-button-primary { color: var(--lct-accent); background: var(--lct-accent-soft); border-color: var(--lct-accent); }
.lct-button-small { padding: 3px 10px; min-height: 29px; font-size: 11px !important; flex-shrink: 0; }
.lct-actions { display: flex; gap: 9px; flex-wrap: wrap; margin: 14px 0 3px; }
.lct-fine { margin: 12px 0 0; color: var(--lct-muted); font-size: 10px; line-height: 1.75; }
.lct-details { border-top: 1px solid var(--lct-line); margin: 14px 0 0; padding: 10px 0; }
.lct-details summary { color: var(--lct-accent); font-size: 12px; cursor: pointer; }
.lct-pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 20px 0 0; }
.lct-pager > .lct-button { max-width: 43%; text-align: left; }
.lct-page-number { color: var(--lct-muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lct-feedback { position: sticky; bottom: 14px; margin: 18px 0 0 auto; max-width: 490px; padding: 0; border-radius: 8px; color: var(--lct-secondary); background: var(--lct-panel); font-size: 12px; line-height: 1.7; z-index: 2; }
.lct-feedback:not(:empty) { border: 1px solid var(--lct-line); padding: 10px 14px; box-shadow: var(--shadow-sm, 0 2px 8px rgba(23, 42, 84, .06)); }
.lct-no-results { padding: 38px 12px; }
.lct-no-results h2 { font-size: 22px; margin: 6px 0; }
.lct-no-results p { margin: 10px 0 22px; color: var(--lct-muted); font-size: 13px; }
.lct-loading > p { color: var(--lct-muted); margin: 7px 0 15px; font-size: 12px; }
.lct-skeleton { display: block; height: 12px; width: 90%; background: var(--lct-line); border-radius: 4px; margin-top: 10px; }
.lct-skeleton-short { width: 58%; }
.lct-downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.lct-download { min-width: 0; padding: 18px; background: var(--lct-soft); border: 1px solid var(--lct-line); border-radius: 9px; }
.lct-download-kind { color: var(--lct-accent); font-size: 11px; font-weight: 650; }
.lct-download h3 { margin: 6px 0 5px; font-size: 15px; }
.lct-download p { color: var(--lct-muted); font-size: 11px; line-height: 1.85; margin: 6px 0; }
.lct-release-notes { white-space: pre-wrap; max-height: 190px; overflow: auto; }
html[data-theme="dark"] .lc-tutorial { color-scheme: dark; }
@media (max-width: 1160px) {
  .lct-layout { grid-template-columns: 214px minmax(0, 1fr); gap: 15px; }
  .lct-store { max-width: 180px; }
  .lct-article { padding: 22px; }
}
@media (max-width: 820px) {
  .lct-header { display: block; padding-bottom: 19px; }
  .lct-store { display: inline-block; max-width: 100%; margin-top: 12px; }
  .lct-layout { display: block; }
  .lct-sidebar { position: static; margin-bottom: 15px; }
  .lct-menu-toggle { display: flex !important; width: 100%; justify-content: space-between; border: 0; border-radius: 0; min-height: 45px; padding: 11px 15px; }
  .lct-directory { display: none; max-height: min(70dvh, 600px); border-top: 1px solid var(--lct-line); padding: 14px; }
  .lct-menu-open .lct-directory { display: block; }
  .lct-nav button { padding: 11px 10px; }
  .lct-nav button span { font-size: 13px; }
  .lct-search input { font-size: 16px; }
  .lct-downloads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .lct-article { padding: 17px 14px; }
  .lct-body { font-size: 13px; }
  .lct-article-head { margin-bottom: 20px; padding-bottom: 17px; }
  .lct-figure svg { min-width: 660px; }
  .lct-figure-top { flex-wrap: wrap; }
  .lct-steps > li { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding-bottom: 23px; }
  .lct-steps > li::before { width: 26px; height: 26px; }
  .lct-steps > li:not(:last-child)::after { left: 12px; }
  .lct-steps h3 { font-size: 13px; }
  .lct-live-panel { padding: 14px; }
  .lct-live-head { display: block; }
  .lct-live-badge { display: inline-block; margin-top: 8px; }
  .lct-controls label { flex-basis: 100%; }
  .lc-tutorial :is(select, input, textarea) { font-size: 16px; }
  .lc-tutorial .lct-code { font-size: 12px; }
  .lct-table-wrap td { min-width: 145px; }
  .lct-pager { gap: 8px; align-items: stretch; }
  .lct-pager > .lct-button { font-size: 10px !important; padding: 7px; max-width: 42%; }
  .lct-page-number { align-self: center; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc-tutorial *, .lc-tutorial *::before, .lc-tutorial *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .lct-button:active { transform: none; }
}
@media print {
  .lct-sidebar, .lct-pager, .lct-feedback, .lct-search, .lct-copy button, .lct-actions { display: none !important; }
  .lct-layout { display: block; }
  .lct-article { border: 0; padding: 0; }
  .lct-figure { break-inside: avoid; }
}
